When editing a C/C++ file, the "output" tab at the bottom is always showing something.

Hi @wantyapps!
Thanks for opening an issue.
As I currently don't have time to debug: what does it show? Can you provide the output or a screenshot?
This would be extremely helpful.

Here

I[16:58:54.155] <-- textDocument/didChange
I[16:58:54.659] Updating file /Users/uriarev/stuff/Programming/Projects/cr/swift/test.c with command
[]
/Library/Developer/CommandLineTools/usr/bin/clang -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk /Users/uriarev/stuff/Programming/Projects/cr/swift/test.c -fsyntax-only -resource-dir=/Library/Developer/CommandLineTools/usr/lib/clang/11.0.3
I[16:58:54.672] --> textDocument/publishDiagnostics
I[16:58:55.161] <-- textDocument/documentColor(9)
I[16:58:55.161] --> reply:textDocument/documentColor(9) 0 ms, error: -32601: method not found
[Error - 4:58:55 PM] Request textDocument/colorPresentation failed.
Message: method not found
Code: -32601
I[16:58:55.892] <-- textDocument/documentSymbol(10)
I[16:58:55.892] --> reply:textDocument/documentSymbol(10) 0 ms
I[17:00:24.478] <-- textDocument/documentColor(11)
I[17:00:24.478] --> reply:textDocument/documentColor(11) 0 ms, error: -32601: method not found
[Error - 5:00:24 PM] Request textDocument/colorPresentation failed.
Message: method not found
Code: -32601
I[17:00:24.485] <-- textDocument/documentSymbol(12)
I[17:00:24.486] --> reply:textDocument/documentSymbol(12) 1 ms
I[17:00:32.059] <-- textDocument/didChange
I[17:00:32.302] <-- textDocument/codeAction(13)
I[17:00:32.303] Updating file /Users/uriarev/stuff/Programming/Projects/cr/swift/test.c with command
[]
/Library/Developer/CommandLineTools/usr/bin/clang -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk /Users/uriarev/stuff/Programming/Projects/cr/swift/test.c -fsyntax-only -resource-dir=/Library/Developer/CommandLineTools/usr/lib/clang/11.0.3
I[17:00:32.316] --> textDocument/publishDiagnostics
I[17:00:32.316] --> reply:textDocument/codeAction(13) 13 ms
I[17:00:32.574] <-- textDocument/codeAction(14)
I[17:00:32.574] --> reply:textDocument/codeAction(14) 0 ms
I[17:00:33.054] <-- textDocument/documentColor(15)
I[17:00:33.054] --> reply:textDocument/documentColor(15) 0 ms, error: -32601: method not found
[Error - 5:00:33 PM] Request textDocument/colorPresentation failed.
Message: method not found
Code: -32601
I[17:00:33.373] <-- textDocument/documentSymbol(16)
I[17:00:33.373] --> reply:textDocument/documentSymbol(16) 0 ms
I[17:00:34.087] <-- textDocument/didChange
I[17:00:34.590] Updating file /Users/uriarev/stuff/Programming/Projects/cr/swift/test.c with command
[]
/Library/Developer/CommandLineTools/usr/bin/clang -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk /Users/uriarev/stuff/Programming/Projects/cr/swift/test.c -fsyntax-only -resource-dir=/Library/Developer/CommandLineTools/usr/lib/clang/11.0.3
I[17:00:34.601] --> textDocument/publishDiagnostics
I[17:00:35.089] <-- textDocument/documentColor(17)
I[17:00:35.089] --> reply:textDocument/documentColor(17) 0 ms, error: -32601: method not found
[Error - 5:00:35 PM] Request textDocument/colorPresentation failed.
Message: method not found
Code: -32601
I[17:00:35.417] <-- textDocument/documentSymbol(18)
I[17:00:35.417] --> reply:textDocument/documentSymbol(18) 0 ms
I[17:00:35.886] <-- textDocument/didChange
I[17:00:35.903] <-- textDocument/completion(19)
I[17:00:35.909] Code complete: sema context TopLevel, query scopes [] (AnyScope=true), expected type
I[17:00:35.909] Code complete: 1 results from Sema, 0 from Index, 0 matched, 0 from identifiers, 1 returned.
I[17:00:35.909] --> reply:textDocument/completion(19) 5 ms
I[17:00:36.134] <-- textDocument/codeAction(20)
I[17:00:36.134] Updating file /Users/uriarev/stuff/Programming/Projects/cr/swift/test.c with command
[]
/Library/Developer/CommandLineTools/usr/bin/clang -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk /Users/uriarev/stuff/Programming/Projects/cr/swift/test.c -fsyntax-only -resource-dir=/Library/Developer/CommandLineTools/usr/lib/clang/11.0.3
I[17:00:36.149] --> textDocument/publishDiagnostics
I[17:00:36.149] --> reply:textDocument/codeAction(20) 15 ms
I[17:00:36.412] <-- textDocument/codeAction(21)
I[17:00:36.415] --> reply:textDocument/codeAction(21) 3 ms
I[17:00:36.883] <-- textDocument/documentColor(22)
I[17:00:36.883] --> reply:textDocument/documentColor(22) 0 ms, error: -32601: method not found
[Error - 5:00:36 PM] Request textDocument/colorPresentation failed.
Message: method not found
Code: -32601
I[17:00:37.056] <-- textDocument/codeAction(23)
I[17:00:37.057] --> reply:textDocument/codeAction(23) 0 ms
I[17:00:37.210] <-- textDocument/documentSymbol(24)
I[17:00:37.210] --> reply:textDocument/documentSymbol(24) 0 ms
I[17:00:38.695] <-- textDocument/codeAction(25)
I[17:00:38.695] --> reply:textDocument/codeAction(25) 0 ms
I[17:00:41.651] <-- textDocument/codeAction(26)
I[17:00:41.651] --> reply:textDocument/codeAction(26) 0 ms
I[17:00:44.109] <-- textDocument/didChange
I[17:00:44.609] Updating file /Users/uriarev/stuff/Programming/Projects/cr/swift/test.c with command
[]
/Library/Developer/CommandLineTools/usr/bin/clang -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk /Users/uriarev/stuff/Programming/Projects/cr/swift/test.c -fsyntax-only -resource-dir=/Library/Developer/CommandLineTools/usr/lib/clang/11.0.3
I[17:00:44.624] --> textDocument/publishDiagnostics
I[17:00:45.113] <-- textDocument/documentColor(27)
I[17:00:45.113] --> reply:textDocument/documentColor(27) 0 ms, error: -32601: method not found
[Error - 5:00:45 PM] Request textDocument/colorPresentation failed.
Message: method not found
Code: -32601
I[17:00:47.778] <-- textDocument/documentSymbol(28)
I[17:00:47.778] --> reply:textDocument/documentSymbol(28) 0 ms
I[17:20:21.092] <-- textDocument/didChange
I[17:20:21.342] <-- textDocument/codeAction(29)
I[17:20:21.343] Updating file /Users/uriarev/stuff/Programming/Projects/cr/swift/test.c with command
[]
/Library/Developer/CommandLineTools/usr/bin/clang -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk /Users/uriarev/stuff/Programming/Projects/cr/swift/test.c -fsyntax-only -resource-dir=/Library/Developer/CommandLineTools/usr/lib/clang/11.0.3
I[17:20:21.357] --> textDocument/publishDiagnostics
I[17:20:21.357] --> reply:textDocument/codeAction(29) 14 ms
I[17:20:22.093] <-- textDocument/documentColor(30)
I[17:20:22.093] --> reply:textDocument/documentColor(30) 0 ms, error: -32601: method not found
[Error - 5:20:22 PM] Request textDocument/colorPresentation failed.
Message: method not found
Code: -32601
I[17:20:23.542] <-- textDocument/documentSymbol(31)
I[17:20:23.542] --> reply:textDocument/documentSymbol(31) 0 ms
I[17:20:23.547] <-- textDocument/codeAction(32)
I[17:20:23.547] --> reply:textDocument/codeAction(32) 0 ms
I[17:20:24.609] <-- textDocument/codeAction(33)
I[17:20:24.610] --> reply:textDocument/codeAction(33) 0 ms
I[17:20:26.119] <-- textDocument/didChange
I[17:20:26.619] Updating file /Users/uriarev/stuff/Programming/Projects/cr/swift/test.c with command
[]
/Library/Developer/CommandLineTools/usr/bin/clang -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk /Users/uriarev/stuff/Programming/Projects/cr/swift/test.c -fsyntax-only -resource-dir=/Library/Developer/CommandLineTools/usr/lib/clang/11.0.3
I[17:20:26.634] --> textDocument/publishDiagnostics
I[17:20:27.119] <-- textDocument/documentColor(34)
I[17:20:27.119] --> reply:textDocument/documentColor(34) 0 ms, error: -32601: method not found
[Error - 5:20:27 PM] Request textDocument/colorPresentation failed.
Message: method not found
Code: -32601
I[17:20:27.520] <-- textDocument/didClose
I[17:20:27.520] --> textDocument/publishDiagnostics
I[17:47:45.126] <-- workspace/didChangeConfiguration
I[17:47:45.126] <-- textDocument/didOpen
I[17:47:45.126] <-- textDocument/documentColor(35)
I[17:47:45.126] --> reply:textDocument/documentColor(35) 0 ms, error: -32601: method not found
I[17:47:45.126] <-- textDocument/documentSymbol(36)
I[17:47:45.126] <-- workspace/didChangeConfiguration
I[17:47:45.127] Updating file /Users/uriarev/stuff/Programming/Projects/cr/swift/test.c with command
[]
/Library/Developer/CommandLineTools/usr/bin/clang -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk /Users/uriarev/stuff/Programming/Projects/cr/swift/test.c -fsyntax-only -resource-dir=/Library/Developer/CommandLineTools/usr/lib/clang/11.0.3
[Error - 5:47:45 PM] Request textDocument/colorPresentation failed.
Message: method not found
Code: -32601
I[17:47:45.150] --> textDocument/publishDiagnostics
I[17:47:45.150] --> reply:textDocument/documentSymbol(36) 23 ms
could not open compilation database for /Users/uriarev/stuff/Programming/Projects/cr/swift/test.c
I[17:47:45.627] Updating file /Users/uriarev/stuff/Programming/Projects/cr/swift/test.c with command
[]
/Library/Developer/CommandLineTools/usr/bin/clang -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk /Users/uriarev/stuff/Programming/Projects/cr/swift/test.c -fsyntax-only -resource-dir=/Library/Developer/CommandLineTools/usr/lib/clang/11.0.3
I[17:47:45.630] Skipping rebuild of the AST for /Users/uriarev/stuff/Programming/Projects/cr/swift/test.c, inputs are the same.

This output window is really annoying. How to get rid of it?

I don't know! I am working on a project with both C and Swift, and this is annoying. What is this? How can I disable the "Output" Tab?

@wantyapps thanks for the details! Oh yes it's really annoying. You're using Apple's sourcekit-lsp not sourcekite as "driver", right?
As this extension does not control the output of sourcekit-lsp, we cannot silence the output, maybe we find a way to not focus the output.
As a temporary workaround you might try to stop it from popping up until we found a solution:
https://stackoverflow.com/a/51025285

Can I switch to sourcekite?

SPECS: macOS Catalina 10.15.6 running on 13" 2017 MacBook Pro

@wantyapps yes of course. You can easily switch between both drivers with this extension.
Here is how you set up sourcekite Using Sourcekite.
Depending on your project, it leads to different completions. Depending on your project, sourcekite and sourcekit-lsp have their pros and cons.

Trying to switch. Does it have this bug too?

The panel might come up if there are more critical errors (on crashes, ...), but only in Swift files.

thank you! Trying...

swift build -c release
error: terminated(72): OLDPWD=/Users/uriarev __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0 LIBRARY_PATH=/usr/local/lib XPC_SERVICE_NAME=0 PREFIX=/usr/local P9K_TTY=old MFLAGS= LOGNAME=uriarev XPC_FLAGS=0x0 MAKEFLAGS=PREFIX=/usr/local SECURITYSESSIONID=186a6 HOME=/Users/uriarev SHLVL=1 CPATH=/usr/local/include P9K_SSH=0 LaunchInstanceID=15E0764A-EEEF-41CF-A9B3-D3C32806F12E TERM=xterm-256color TERM_PROGRAM_VERSION=433 PWD=/Users/uriarev/sourcekite _=/usr/bin/make MAKELEVEL=1 LC_CTYPE=UTF-8 MAKEOVERRIDES=${--command-variables--} SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.DRRtpo44su/Listeners USER=uriarev SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk PATH=/Library/Frameworks/Python.framework/Versions/3.8/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Library/Apple/usr/bin TERM_PROGRAM=Apple_Terminal TMPDIR=/var/folders/g4/clpv5_sd0cgcd9yxhkdhj2300000gn/T/ TERM_SESSION_ID=66B85A21-0AA1-4322-928C-6A33132061DB SHELL=/bin/zsh xcrun --sdk macosx --find xctest output:
xcrun: error: unable to find utility "xctest", not a developer tool or in PATH
make: *** [release] Error 1

swift build -Xswiftc -framework -Xswiftc sourcekitd -Xswiftc -F -Xswiftc /Library/Developer/Toolchains/swift-latest.xctoolchain/usr/lib -Xlinker -rpath -Xlinker /Library/Developer/Toolchains/swift-latest.xctoolchain/usr/lib -c release
/Users/uriarev/sourcekite: error: package at '/Users/uriarev/sourcekite' is using Swift tools version 3.1.0 which is no longer supported; consider using '// swift-tools-version:5.2' to specify the current tools version
make: *** [release] Error 1

Did you use vknabel/sourcekite or jinmingjian/sourcekite? The latter is not supported anymore, please use vknabel/sourcekite.
When using Swift 5.2.4 everything worked fine for me, when cloning from master.
# using install instructions of readme
$ git clone https://github.com/vknabel/sourcekite
....
$ cd sourcekite
$ make install PREFIX=/usr/local
....
$ which sourcekite
/usr/local/bin/sourcekite

ok... trying

:D Worked!

is it supposed to debug?

Great to hear! What do you mean with is it supposed to debug??

Is this extension supposed to show you the problems in your code?

This is mostly about autocompletion, but it does show compile errors for Swift Package Manager projects.
If you wish to attach a debugger to your Swift Package Manager project, you can follow this blog post Debugging-Swift-in-VS-Code | vknabel.com.

Thank you! I love this extension!

Sadly we cannot prevent the output panel from coming up when using sourcekit-lsp while still staying compatible.

The entire bug report and all follow up here is not even once talking about the actual issue itself, meaning the reason why the console is opening, since fixing that issue will prevent it from opening. The fact that it is opening is no issue at all, it is supported to open when it runs into an error. It is just not support to run into errors all the time.
The actual error is that the LSP client tries to use the methods textDocument/documentColor and textDocument/colorPresentation and that the server response with -32601, which means "Method not found" according to LSP spec.
This is strange and unexpected, as I checked the source code of sourcekit-lsp and it does support both methods since 2019-05-29. I can even show you the commit: https://github.com/apple/sourcekit-lsp/commit/9f9cc9a73466dbe3f65279d862f6af67e8203e15
Unfortunately I see now way to find out from which Git revision a specific sourcekit-lsp executable has been build, there is not even a version number available, so I don't know if the problem is caused by the fact that the sourcekit-lsp version that Apple ships withe the dev tools is maybe outdated.
Yet not even that is the actual issue. The actual issue is that an LSP client should not try to call a method again and again after it has already been told that this method is not available. It should never try to call it again after receiving this error once and if that would be fixed, the panel would open at most once per file/session and not again for the same cause when closed.
And I don't understand this comment:

Sadly we cannot prevent the output panel from coming up when using sourcekit-lsp while still staying compatible.

Compatible to what?

Hey @CodingMarkus!

The entire bug report and all follow up here is not even once talking about the actual issue itself, meaning the reason why the console is opening, since fixing that issue will prevent it from opening. The fact that it is opening is no issue at all, it is supported to open when it runs into an error. It is just not support to run into errors all the time.

I agree on this: the actual error is that methods are being called, although they are not supported. Opening the panel is a feature, telling the users that something unexpected happened.
But from my perspective, this extension is not responsible for the bug itself. I did not explicitly mention it or explained why, due to the lack of time.

The actual error is that the LSP client tries to use the methods textDocument/documentColor and textDocument/colorPresentation and that the server response with -32601, which means "Method not found" according to LSP spec.

In general:

this extension starts a Language Client, which then starts a Language Server, in order to get Language Support in VS Code
the Language Server then tells the Language Client about its capabilities
thereafter the Client sends requests and the Server responds to them

This extension here uses<EMAIL_ADDRESS>for this. And in this case sourcekit-lsp is used as Language Server (this extension supports more servers).
Though back then I even tested if the same bug appeared in SourceKit-LSP for Visual Studio Code. Just to be sure and it did. If the behavior differs by now, feel free to open an issue.
As this extension never tells the Language Client about any specific requests or capabilities, I didn't see any reason to spend several hours more to investigate.
From my perspective there are two probable possibilities here:

the Language Client Node implementation has a bug
the Language Server pretends to support a specific capability, but does not respond correctly

And I don't understand this comment:

Sadly we cannot prevent the output panel from coming up when using sourcekit-lsp while still staying compatible.

Compatible to what?

Compatible to sourcekit-lsp and their reference VS Code extension, which needs to be built and installed by hand.
I hope you better understand why I didn't even try to fix the underlying issue. Somewhere I need to draw a line regarding responsibility, support, bug fixing or even new features.
If you have any questions or feedback left, don't hesitate!


Simplify RNN test that check if cuDNN is called

I removed redundant test case class which check if cuDNN is called and simplify the test.
merge #4046 first
related to #4045

#4046 has been merged.

I removed TestNStepRNNCudnnCall and merge it to TestNStepRNN. If this fix is OK, i'll apply the same fix to other tests.

Thank you for this PR.  I think we can go with this approach to get rid of some repetitions.
Just two considerations

I assume that TestCase members batch, length, etc. used to differ between cudnn and non-cudnn classes but that it's fine.
We could maybe reuse the backend injection decorator to test all cudnn configurations, but only if it is worth the effort.

Yes, IMO we need to refactor these test cases more and more. This PR only aims to merge two redundant test cases. I'll send another PR for these two points you suggests.

Okay, thank you very much. Then I think we should go with this approach for now!

For reference, https://github.com/chainer/chainer/pull/3499 also addresses the problem of repeated boilerplate code in our unit tests.

I fixed all RNN, GRU, and LSTM tests. Please review it.

jenkins, test this please.

jenkins, test this please.

jenkins, test this please.

LGTM!


memory order and consistency promises for Zephyr atomic API?

The Linux atomic operations document memory order behavior: in particular, while all are SMP safe, only the functions that return a value also have the necessary memory barriers to guarantee consistent ordering between threads (read-only and write-only operations do not have barriers).
The C11 <stdatomic.h> API also defines memory order and consistency behavior.
The Zephyr API specifies:

Using the kernel’s atomic APIs to manipulate an atomic variable guarantees that the desired operation occurs correctly, even if higher priority contexts also manipulate the same variable.

I own my pedantry, but "correctly" doesn't precisely identify the memory order semantics.
What is the promised memory order behavior for Zephyr's atomic functions, which provide RMW, RO, and WO behavior?

A specific example of what needs to be clarified:
If in one thread I use atomic_set(&pending, 1) and then another thread possibly on another core uses atomic_cas(&pending, 1, 0) is it guaranteed the second thread will see the value as 1 (assuming no other access intervenes)?
If the answer is "no", which I think would be the case for Linux, would changing the first to atomic_cas(&pending, 0, 1) change the answer to "yes"?

Nearly all systems, including all of our SMP-enabled arches, use the GCC builtins with __ATOMIC_SEQ_CST which is documented as "Enforces total ordering with all other __ATOMIC_SEQ_CST operations".
https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html
I haven't looked at how Linux implements atomic ops, I try to avoid looking at Linux source as much as I can for obvious reasons.
Certain Xtensa CPUs that aren't cache coherent between cores might not, @andyross knows more about this than I do, although this has implications for much more than just atomic operations.

The fix has been waiting for review and merge for 2 x 60 days already.

Make that six months.


dynamic configuration slowDBAccessThreshold rewrite confusing when not configured

Please answer these questions before submitting your issue.

Why do you submit this issue?
[x] Question or discussion
[ ] Bug
[ ] Requirement
[ ] Feature or performance improvement

Question

What do you want to know?
I use dynamic configuration(nacos)  to management alarm config, and not intent to manage slowDBAccessThreshold. So I do not config the agent-analyzer.default.slowDBAccessThreshold. But it worked weird, the default threshold will be changed to 10000, I read the code and found that if not config slowDBAccessThreshold in nacos, the code will rewrite the default threshold to 10000 because of triggering of DELETE notify. And this will confuse the user, where the 10000 comes from.

DBLatencyThresholdsAndWatcher

private void activeSetting(String config) {
        Map<String, Integer> newThresholds = new HashMap<>();
        String[] settings = config.split(",");
        for (String setting : settings) {
            String[] typeValue = setting.split(":");
            if (typeValue.length == 2) {
                newThresholds.put(typeValue[0].trim().toLowerCase(), Integer.parseInt(typeValue[1].trim()));
            }
        }
        if (!newThresholds.containsKey("default")) {
            newThresholds.put("default", 10000);
        }

        thresholds.set(newThresholds);
        settingsString.set(config);
    }

public void notify(ConfigChangeEvent value) {
        if (EventType.DELETE.equals(value.getEventType())) {
            activeSetting("");
        } else {
            activeSetting(value.getNewValue());
        }
    }

Requirement or improvement

Please describe your requirements or improvement suggestions.
Can I send an pull request to change the "DELETE" notify behavior?

from
private void activeSetting(String config) {
       // ...
        if (!newThresholds.containsKey("default")) {
            newThresholds.put("default", 10000);
        }

       // ...
    }

to (the default setting in application.yml)
private void activeSetting(String config) {
       // ...
        if (!newThresholds.containsKey("default")) {
            newThresholds.put("default", 200);
            newThresholds.put("mongodb", 50);
        }

       // ...
    }

I want to ask where is the delete event comes from? Why it happens? Did you really delete the key?

I want to ask where is the delete event comes from? Why it happens? Did you really delete the key?

I  didn't delete the key, I just not config it. And I checked the code, found that
ConfigWatcherRegister

void configSync() {
        // ...
                    if (newItemValue == null) {
                        if (watcher.value() != null) {
                            // Notify watcher, the new value is null with delete event type.
                            watcher.notify(
                                new ConfigChangeWatcher.ConfigChangeEvent(null, ConfigChangeWatcher.EventType.DELETE));
                        } else {
                            // Don't need to notify, stay in null.
                        }
      // ...

So if we don't config the dynamic config, it will send delete event.

If if (newItemValue == null) { and if (watcher.value() == null) { matched, nothing should happen, like // Don't need to notify, stay in null..

If if (newItemValue == null) { and if (watcher.value() == null) { matched, nothing should happen, like // Don't need to notify, stay in null..

But when init DBLatencyThresholdsAndWatcher, it will use default value to set the watcher value, so watcher.value() == null cannot be true and then trigger the delete event.
public DBLatencyThresholdsAndWatcher(String config, ModuleProvider provider) {
        // ...
        activeSetting(config);
    }

    private void activeSetting(String config) {
        // ...
        settingsString.set(config);
    }

@Override
    public String value() {
        return settingsString.get();
    }

OK, get your point this time. Then, this is a bug. It should be fixed like this.
If DBLatencyThresholdsAndWatcher never has a notified data, its #value method should always return null, rather than settingsString.get().
Also, we should keep initial settingsString forever, and fall back to it when we received delete event. Make sense?

settingsString

Yes, it make sense. I am thinking add a dynamicSettingsString to fix it. Can I send a pull request?

OK, get your point this time. Then, this is a bug. It should be fixed like this.
If DBLatencyThresholdsAndWatcher never has a notified data, its #value method should always return null, rather than settingsString.get().
Also, we should keep initial settingsString forever, and fall back to it when we received delete event. Make sense?

Yes, it make sense. I am thinking add a dynamicSettingsString to fix it. Can I send a pull request?

I also found the same problem, mark and  pay attention to the fix result.

I am thinking add a dynamicSettingsString to fix it

It should be named initialSettings.

Can I send a pull request?

Yes, please.


unified_analytics does not understand opt-out from legacy analytics

@jacob314
Currently, unified_analytics does not recognize opt-outs from the legacy analytics.   Jacob indicated that this functionality has been discussed as being a possible enhancement for 3.0 to reduce unnecessary prompting, so we should add the ability to read legacy analytics and forward an opt-out there to a reporting=0 in the new config file.   We should only forward an opt-out.

As a follow up, I think it would probably be best for the each client using this package to make the new package "aware" of the legacy opt out status.
This PR (https://github.com/flutter/flutter/pull/124606) is an example of how the flutter tool will set telemetry to false if the legacy analytics class is reporting that the developer has opted out
Thoughts @jcollins-g ? I feel like this may be easier than trying to find where each tool persists files for opt out status within the package

Perfect, I'll go ahead and close this issue then. Feel free to reopen if something comes up

hm let me know if this example explains it? I could totally be missing what you're trying to say.
So consider that a flutter developer has been using flutter for the past year and has already opted out. Once they upgrade to the new version that includes unified_analytics, the flutter tool will be able to communicate to unified_analytics to let it know that this user has already opted out. So internally within flutter tools, it will invoke the analytics.setTelemetry(false) method.
// Trivial example
if (!legacyAnalytics.enabled && unifiedAnalytics.telemetryEnabled) {
  unifiedAnalytics.setTelemetry(false)
}

We would essentially have any tool that is a client of this package do this check with it's legacy analytics runner.

... any tool that is a client of this package ...

I think that's the crux of the comment. Why should every tool repeat this code? The unified_analytics package could have the same check so that every tool would do the right thing without adding any code to the tool.

Because each client using this package would know how to access their telemetry opt in status best instead of having this package attempt to check for a persisted files that each tool uses. I think there would be a lot more variability encountered that can be error prone.
ie. in my example above, it's much easier for the client using the package to invoke the pseudo command 'legacyAnalytics.enabled` than it would be for the package to know where this state is being persisted for flutter_tools. Especially considering certain users may have several flutter versions on their machine

Because each client using this package would know how to access their telemetry opt in status best ...

One premise of the question is that, as far as we know, all of the current and future clients of this package were using the usage package to report analytics, so there is, as far as we know, only one place that would need to be queried.

Following discussion:
Need to check the following files:

Dart: $HOME/.dart/dartdev.json
Flutter: $HOME/.flutter

I believe that's all we need to check right? @jcollins-g

@eliasyishak Yes, that's correct to my reading of the code.


Failed to add a reactive to the instance object

Vue version
The last version
Link to minimal reproduction
https://play.vuejs.org/#eNp9UstuwjAQ/JWVLwQJhfRxogGpDw700FYt6smXKBgwdWzL3gBSlH/vxsGUQ0UUJfbs7O7M2g17tDbd14JNWO5LJy2CF1jbGdeyssYhNODEGlpYO1PBgKgDrrkuVeE9fEtxgIZrQFkJmEL2QGsojfbo6hKNS4YhTA9upU+p9JKYybDD2u5zRiKPgIVG4faFSgidzmLgVOLUSVPjlwIpMd1cFqWyI7jNsiy2oDfoAY9Ep0xyk3TZnfZkSLR83Bsny7RBUVlFTNoB5Nub8CdZIbtp+kWvom3zcSDk44ssNmLoqeVabtKdN5omGxxwVprKSiXcu0VJkjibRG+cFUqZw2vAaHRiFPFyK8qff/CdP3YYZx9OeJqW4Owcw8LRTPrw/OtNHGl9DlZmVStiXwl+Cm9U3WnsaU+1XpHsC15Quwj3Q+rN0s+PKLSPpjqhYfqBzxndmecr1v/k3qX38dRY+wsWAtll
Steps to reproduce
For example, the code for a playground
What is expected?
Instantiated objects can be reactive
What is actually happening?
I'm a beginner to vue3 and when I use other classes, I want to be able to respond to instance object properties; When I'm adding another reactive variable, the view changes together, which is very confusing, as shown below.
https://play.vuejs.org/#eNp9kl1rwjAUhv/KITerIFXZrlwV9uGFu9jGJrsKjFKjxrVJSFIVSv/7TtKmdjAtpU3e8yTnPSepyINS8aFkZEoSk2muLBhmSzWnghdKagsVaLaBGjZaFnCD6A0VVGR5agx8cXaEigqwvGAwg/E9jiGTwlhdZlbqaODD+NgdNzFuvUIyGjitdp9OCRwKS2GZPqR5hOpsHgLtFm0mgYmfU4sL421/U9x2CJPxeBxS4Ov9gLGI40qsJnKrnfdogFgAvvuEW3/BSsPFqJaXnZxdJKOmr9hRnFhWqBxpnAEku4n/Y9U+dVU1g6bIuk5GHfAXb60i3446Nhn1MpAhsQaL2/BtvDdS4CH7CijJZKF4zvSbshyLp2Qa2kxJmufy+OI1PEU2DHq2Y9nPP/renJxGybtmBrvFKOliNtXYlCa8+HxlJxx3wUKuyxzpK8EPZmReOo8N9liKNdrucd7t0l9VLrYrszhZJkwoyhn1F8HzlOD1fbpS+tnubXwXLhCpfwEicgWs
System Info
No response
Any additional comments?
No response

`
`
make state.time responsive

In case 1: The this.xxx executed in the constructor updates the state of the raw object, which doesn't trigger an effect. You need to modify the state through the proxy returned by ref. See this playground
In case 2: The second ref triggers an effect. When the component updates, it triggers a get on the first ref proxy, retrieving the value from the raw object.

@jh-Leong bro, thank you for your answer, I'm using a third-party library and I can't modify the state using the returned proxy at the moment

This behavior is expected. Perhaps you could join the discussion to provide more information and explore specific solutions?

@jh-leong is that I shouldn't use it that way? Is it my usage that is wrong? I doubt myself


if not signed, show another block instead of comments

e.g block with line: sign in to see comments

Hey @romankurnovskii, I would like to work on this issue


Fix isNaN

Fix https://github.com/CartoDB/carto-vl/issues/616

LGTM

Wow, a triple check, thank you!


Use embedded graphql strings instead of seperate .graphql files

Hey guys,
as I discussed in the Feedback issue (#1) I suggested a better (IMO) way of structuring the widgets and data requirements based on the design of react-relay.
I will try to lay here the way I think it should work.
GQLClientProvider
In relay, there is one object that manages the dispatching and processing of queries, subscriptions, mutations etc. It quite naturally translates to a GQLClientProvider here that all widgets in the tree will know to reference when wanting to perform some graphql operation.
  @override
  Widget build(BuildContext context) {
    return GQLClientProvider(
      client: _buildClient();
      child: MaterialApp(...)
    );
  }

Queries widgets, fragment widgets
The strength of relay, as stated in numerous lectures online, is its ability to localize and couple components and their data requirements. That way, it is less likely to add/remove component behaviour while forgetting to adjust the data requirements accordingly.
@query(r"""
query FetchArticle($articleId: ID!) {
  article($articleId) {
    title
    publicationDate

    ...ArticleAuthor_author
    ...ArticleComments_comments
  }
}
""")
class Article with $FetchArticleQuery extends StatelessWidget {

  final String articleId;
  const Article({Key key, this.articleId}) : super(key: key);

  // The actual build method is generated and sits in $FetchArticleQuery

  buildVars() => $FetchArticleQuery$Vars(articleId: this.articleId);

  Widget buildLoading(BuildContext context) {
    return CircularProgressIndicator();
  }

  Widget buildError(BuildContext, Error error) {
    return Text("$error");
  }

  @override
  Widget buildResult(BuildContext context, $FetchArticleQuery$Response data) {
    // Note how I don't have access here to author and comments
    // since they go directly through context to ArticleAuthor and ArticleComments.
    // This is "data-masking"

    return Column(
      children: [
        Text(data.article.title),
        Text(data.article.publicationDate.toString()),

        ArticleAuthor(),

        ArticleComments(),

      ]
    );
  }
}

@fragment(r"""
  fragment ArticleComments_comments {
    title,
    author {
      name
    }
  }
""")
class ArticleComments with $ArticleComments_commentsFragment extends StatelessWidget {

  const ArticleComments({Key key}) : super(key: key);
  // Here we don't need loading and error since it's only rendered after parent query was executed
  @override
  Widget buildFragment(BuildContext context, ArticleComments_commentsFragment$Data data) {
    return Column(
      children: data.map((comment) => Text(comment.title + comment.author.name))
    );
  }
}

@fragment("""
fragment ArticleAuthor_author {
  name
}
""")
class ArticleAuthor with $ArticleAuthor_authorFragment extends StatelessWidget {
  const ArticleAuthor({Key key}) : super(key: key);

  @override
  Widget buildFragment(BuildContext context, ArticleComments_authorFragment$Data data) {
    return Text(data.name);
  }
}

It's just a quick thought process, I'm not sure how to handle pagination, caching, offline mutations and so on. but it's a start. LMK what you think.

Please see my comment here regarding dependency injection.
As mentioned in the comment referenced above, I think the annotated queries within dart files could be helpful (I think we could use a single gql annotation for this).
Can you expand on the value of the query / fragment mixins over simply using the Query widget?

A few downsides to the Query widget approach:

Query widgets requires me to imperatively check for loading/error/success states in the result.
The query widgets can't have an annotation.
The query widget doesn't support masked fragments and therefore forces me to have the query far away from down-the-tree widgets that suppose to be able to update their fragment requirements at ease.

@iscriptology, I think you've got something interesting here.
Would you be able to go the extra mile and "generate" the mixins by hand using the constructs of this GraphQL client? That would be very useful really understand the implications beyond what's visible in the use case.
The "generated" mixins do not need to be the best and cleanest implementation possible, but they need to do the job.
Skip the pagination, caching etc. for now

I think this approach is too prescriptive with respect to how devs structure their widget trees.
First of all, it requires that the query be at the root of the tree. Consider the following example:
class AllPokemonScreen extends StatelessWidget {
  final client = GetIt.I<Client>();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('All Pokemon'),
      ),
      body: Query(
        client: client,
        queryRequest: AllPokemon(
          buildVars: (vars) => vars..first = 500,
        ),
        builder: (BuildContext context, QueryResponse<$AllPokemon> response) {
          if (response.loading)
            return Center(child: CircularProgressIndicator());

          final pokemons = response.data?.pokemons ?? [];

          return ListView.builder(
            itemCount: pokemons.length,
            itemBuilder: (context, index) => PokemonCard(
              pokemon: pokemons[index],
            ),
          );
        },
      ),
    );
  }
}

The mixin approach would require the dev to either create a separate widget for the query or put the query at the root. In the latter case, whenever there's an update to the data, it would re-render the entire widget tree. If there is an expensive build operation in the AppBar or any other widget outside of the Query above which doesn't depend on the query data, it would need to be re-rendered unnecessarily.
A second issue with this approach is that it assumes that devs want completely separate widget trees when there is an error or loading state. I often don't check the loading or error states until further down the widget tree, allowing the core structural widgets to load before data is available, resulting in a better user experience.
Consider this example:
class PokemonDetailScreen extends StatelessWidget {
  final client = GetIt.I<Client>();

  final String id;

  PokemonDetailScreen({this.id});

  @override
  Widget build(BuildContext context) {
    return Query(
      client: client,
      queryRequest: PokemonDetail(
        buildVars: (vars) => vars..id = id,
      ),
      builder: (BuildContext context, QueryResponse<$PokemonDetail> response) {
        final pokemon = response.data?.pokemon;

        return Scaffold(
          appBar: AppBar(
              title: Text(
            pokemon?.name,
          )),
          body: response.loading
              ? Center(
                  child: CircularProgressIndicator(),
                )
              : Column(
                  crossAxisAlignment: CrossAxisAlignment.stretch,
                  children: <Widget>[
                    if (pokemon != null)
                      PokemonCard(
                        pokemon: pokemon,
                      ),
                    Padding(
                      padding: const EdgeInsets.all(8.0),
                    ),
                    Text(
                      'Height',
                      style: Theme.of(context).textTheme.title,
                    ),
                    if (pokemon != null) Text('min: ${pokemon.height.minimum}'),
                    if (pokemon != null) Text('max: ${pokemon.height.maximum}'),
                    Padding(
                      padding: const EdgeInsets.all(8.0),
                    ),
                    Text(
                      'Weight',
                      style: Theme.of(context).textTheme.title,
                    ),
                    if (pokemon != null) Text('min: ${pokemon.weight.minimum}'),
                    if (pokemon != null) Text('max: ${pokemon.weight.maximum}'),
                  ],
                ),
        );
      },
    );
  }
}

In the mixin approach, I'd have to create a separate Scaffold, AppBar, and any other common components in buildLoading, buildError, and buildResult. Of course, I could create an additional build method that each of the above would call that builds the common components where I pass in data if it's available, but then what's the point of having separate build methods at all?

Good points @smkhalsa
Will try to fake a generated mixin that will also address those issues.
@klavs Hope to come up with one soon.

@smkhalsa @klavs
I played with some ideas, and it seems like no good option for mixin utilization. Yet I have some small tweaks that could make the usage of the library much more enjoyable.

Generate queries and fragments from annotations in addition to standalone graphql files.
Change (or compose) Query (in)to QueryBuilder with this added functionality:

Get client from context if no client explicitly provided. (Provider.of)
Provide all fragments through context and Provider.value widget. (I'm not sure how to do it, code generation I think is the only option cause it knows the query structure)

FragmentBuilder<T> widget that simply consumes the fragments provided through context and builds them.

Those are I think minor changes that will help a lot to flutter developers.
I "implemented" FragmentBuilder as it is straightforward:

class FragmentBuilder<T> extends StatelessWidget {
  final Function(BuildContext, T) builder;

  const FragmentBuilder({Key key, this.builder}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return builder(context, Provider.of<T>(context));
  }
}

QueryBuilder I think will require some code generation to provide all the fragments.
Let's see a usage example:

@gql(r"""
  query MyHomePage_query {
    ...AllFilmsList_allFilms
  }
""")
class MyHomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return QueryBuilder(
      query: MyHomePage_query(),
      builder: (context, QueryResponse<$MyHomePage_query> response) {
        // The QueryBuilder implicitly exposese through context the AllFilmsList_allFilms fragment
        return AllFilmsList();
      }
    );
  }
}

@gql(r"""
  fragment AllFilmsList_allFilms {
    allFilms {
      title
    }
  }
""")
class AllFilmsList extends StatelessWidget {
  const AllFilmsList({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return FragmentBuilder<$AllFilmsList_allFilms>(
      builder: (context, allFilms) {

      }
    );
  }
}

the mere fact that I can write my queries and fragments attached to my widgets is a huge benefit I think. The added use of provider to support those simple workflow will be much appreciated I think.
What do you guys think?

@iscriptology

Generate queries and fragments from annotations in addition to standalone graphql files.

I like this idea. I  suggest creating an issue in https://github.com/gql-dart/gql as this would need to be implemented in package:gql_build.

Get client from context if no client explicitly provided. (Provider.of)

Feel free to submit a PR for this.

Provide all fragments through context and Provider.value widget. (I'm not sure how to do it, code generation I think is the only option cause it knows the query structure)

I'm not quite sure what you mean. Can you provide an example?

FragmentBuilder widget that simply consumes the fragments provided through context and builds them.

I'm not sure why you need a FragmentBuilder widget. gql_build generates data.gql.dart files for each fragment automatically, so couldn't you simply pass a List<$AllFilmsList_allFilms> to AllFilmsList?

@iscriptology I like your ideas and your work in figuring out PoCs is especially useful.
But we have to stay true to the current limitations. When we start doing more in the tool, we... have to do more in the tool. Doing inline queries removes IDE support and ability to use external tools to help with GraphQL. More concretely, package:gql lacks the ability to validate documents, therefor writing GraphQL in annotations would not necessarily make the usage more enjoyable, before a supplemental tooling is implemented.
That said, it's a great goal to have and any help in achieving it is much appreciated!

Get client from context if no client explicitly provided. (Provider.of)

@iscriptology https://github.com/gql-dart/ferry/issues/9 may make this moot

I tweaked the apollo-vscode extension on my fork (iscriptology/apollo-tooling) and it looks like it could support the @gql annotation quite nicely: (code completion, jump-to-definition etc.)

I think we can regardless of all the discussion to implement @gql annotation in gql_build and see how to take it from there in the flutter side of things.

@klavs Hey,
is there any update regarding @gql code generation? It would be so effective for me...
Also if I need to open a feature-request elsewhere please LMK where

@iscriptology There's no ongoing work on this.
I recommend you build your queries in a separate file as if they were used via annotations. That will guarantee easy adoption and also provide a good test set for when such functionality is implemented.
At this point I am not 100 percent sure where such functionality belongs to. There will probably be some Ferry-specific code needed as well as some re-usable code in gql_code_builder.
Prototypes and POCs are always welcome. If you were to provide a usage example with as much edge cases covered as possible, it would greatly increase the chance of us implementing something like that.

Another interesting approach would be to do something like https://gqless.dev/

@smkhalsa This would be so awesome!!!

I'd be interested in moving this forward once https://github.com/dart-lang/build/issues/1689#issuecomment-728216143 is resolved.
Since Dart's build system currently can only generate files within the same directory as the source, the @gql annotation approach would result in a mess of generated files cluttering the source directory.

@smkhalsa I love the approach of https://gqless.dev/, why can't we proceed without https://github.com/dart-lang/build/issues/1689#issuecomment-728216143? I mean we just need to generate at the root level where schema.graphql resides right?

@itsparth to be clear, my comment above relates to using @gql annotations within source files, not to gqless.
Dart's build tool currently can only generate files as siblings of the source file. To prevent our source directories from getting cluttered with lots of generated files, we currently recommend creating a /graphql directory to contain your .graphql files (and the generated files). However, this obviously wouldn't work if we wanted to use @gql annotations from within our Dart source files.
With respect to gqless, I haven't put much thought into how to implement something equivalent in Dart. If you want to take a stab at a proof of concept, I'd love to explore it further though.

@smkhalsa Thanks for the clarification, I am interested in taking the gqless approach forward, will think about it and try to come up with a POC.


Yara getting "lost" during file/process scanning

Just a general question, I've read that the Yara library is thread safe but I'm seeing an issue in my implementation.  Can't share the code but it is working like this (running on Windows 10 VM):

Creating a single Yara scanner which has been set to use the ReversingLabs rule sets
A Go program runs and kicks off a Go routine which uses the same scanner instance to start running process scans on a list of processes
The main routine moves forward and starts scanning files (with same scanner instance) on the various volumes

At this point most times the process scans finish in about 15-20 minutes but the file scans seem to hang and never complete.  Any thoughts on this?  I'm testing now with two Yara scanner instances, one for the process Go routine and the other to process files just to get a different perspective.

You are not supposed to use the same Scanner for multiple concurrent ScanFile, ScanMem, ScanProc calls. Generate multiple Scanner objects from the same Rules to do concurrent / parallel scans.

I must have missed that in the docs, where is that stated specifically?

In go-yara's documentation, thread-safety is only mentioned in relation to setting variables. The underlying C struct (from YARA) is YR_SCANNER.

Thanks for the feedback!


Support for catalan language

https://en.wikipedia.org/wiki/Catalan_language

Thanks!

:catalonia: :ca:
GitHub needs to add support for a Catalan flag.


plugin to grant patron access

currently, because of the way we decoupled our patron channel permissions from the patreon bot's roles, we have a kludge set up where if someone sends a message and they should have patron channel access but don't, they gain it then, and if they do have it and shouldn't, they lose it then. ereshkigal could handle this instead so that it triggers on losing or gaining the relevant roles, thus not requiring the person to post a message to gain access, which there are not instructions for anywhere

resolved by 8c38c6bcfd6458a0ebe71bb943d1293ae4b04021


[WIP] Refactor of data/meta

Problem:
The whole meta data 'department' is filled with conditionals and special behaviour depending on the context. As we're using the context now for amp, the conditionals grew even more and became more confusing. Almost every function now has a special behaviour for different contexts.
This is a [WIP] issue and I will start to collect ideas on how the give this section a bit of love and refactor it to make it

better readable
adjusted to our codebase in Ghost
maintain the same and needed output in {{ghost_head}}

First idea is to refactor index.js to check there already for the content and make decisions from there.

Gonna close this with the later tag, as we probably won't revisit this until after Ghost 1.0


Clear advanced properties when changing theme

Is your feature request related to a problem? Please describe.
When some advanced props are set and user tries to change the theme - advanced props are not reset to default (i.e. removed) and the theme styles are not applied (actually they are overwritten by advanced props).
Describe the solution you'd like
Reset advanced props when theme is changed.
Describe alternatives you've considered
N/A
Additional context
https://user-images.githubusercontent.com/60817786/215271526-9f7853a4-a538-48b0-9594-f37e2a038a78.mov

I'm not sure I agree with this. If the user set specific overrides, I would think they should still apply. If the user does not want them, they can remove the advanced properties themselves without much difficulty. The way it is could also help prevent loss of work.

Maybe an alternative solution could be to have a button to clear advanced options?
There are only 10 options, so I don't think clearing them one-by-one is a significant amount of effort, but if being able to clear them quickly seems important, perhaps it could be added as an action next to the export button.
Feel free to let me know what you think.

Sounds good to me.
I'm not such a huge fan of confirm(), but there are some alternatives such as sweetalert2 that are nicer. I'm not really sure that it's all that necessary here though.
A "clear" button that calls the function you have written already seems like it would be sufficient.
I'm open to hearing what you think and I look forward to reviewing.

I have pushed changes to the #438. Here is how they look:
https://user-images.githubusercontent.com/60817786/215566468-7a0ce6c9-5d8a-4817-a786-9399280e3c78.mp4
Let me know whether the tooltip over disabled clear button is needed.

I think this looks great :+1:


Update ci.yml to include Apple Silicon

Huh, I didn't think KLU was broken on 1.6. I'll try to fix this

Weirdly enough only on 64-bit!


Disable validation on AWS where it doesn't work.

Also add an advanced routing rule that I forgot.

LGTM


Migrated to self contained vault, now fixFrontmatter command gives error

Please select the area your bug applies to. (Multiple selections are Possible. You can leave blank if you're not sure.)

[X] Workspace.  VSCode workspace, vaults, Intellisense/autocomplete, Dendron settings
[ ] Lookup.  Dendron's Lookup Command
[ ] Views.  Dendron Preview, Tree View, Side Panels in the UI
[ ] Schema.  Dendron Schemas
[ ] Pod.  Data import from / export to Dendron
[ ] Publish.  External Site Publish
[ ] Markdown.  Markdown features, such as syntax support and features

Describe the bug
I migrated my vault to self-contained following the instructions here:
Migrating to Self Contained Vaults
My notes are accessible via Lookup and everything seems to be working fine.
But now when I run the command Dendron: Doctor > fixFrontmatter it gives the following error:

error while running command: Cannot read properties of undefined (reading 'forEach')
Source: dendron (Extension)

To Reproduce
Steps to reproduce the behavior:

Run Dendron: Doctor > fixFrontmatter
See error

Screenshots

Desktop (please complete the following information)

OS: Windows 10
Browser: Chrome
Versions (all that apply to bug):

Dendron Extension: v0.96.0
VS Code version: 1.67.2

Here are screenshots of my folders and settings.
Dendron root folder:

Vault folder:

Vault notes folder:

Dendron folder - dendron.yml file:

Dendron folder - dendron.code-workspace file:

Vault folder - dendron.yml file:

Vault folder - dendron.code-workspace file:

thanks for the issue. will investigate!

Hi @bugfixd, could you move the notes folder from inside the vault folder into your workspace? The workspace should look like this:
├── .gitignore
├── dendron.code-workspace
├── dendron.yml
└── notes
   ├── root.md
   └── root.schema.yml

After moving the folder, restart VSCode. It should start working correctly then. Please let me know if you still have issues afterwards.

@bugfixd No, please revert the config files to the way they were before.
For dendron.yml:
workspace:
  vaults:
    - fsPath: .
      name: vault
      selfContained: true

For dendron.code-workspace:
{
    "path": "notes",
    "name": "vault"

Thanks @SeriousBug , changing those settings made my files accessible again.
However, fixFrontmatter is still not working — I'm still getting the same error as before. :(

@bugfixd Glad the files are working! Can you run the command Dendron:Dev: Open Logs, and paste the output here? I'll take a look to see if there's any more information about the error.

Can you run the command Dendron:Dev: Open Logs after you see the error, and paste the output here?

{"level":30,"time":1653582342168,"pid":4000,"hostname":"~","name":"dendron","ctx":"Logger:configure","msg":"exit","logLevel":"info"}
{"level":30,"time":1653582342284,"pid":4000,"hostname":"~","name":"dendron","ctx":"_activate","stage":"prod","isDebug":false,"logLevel":"info","logPath":"c:\Users\~\AppData\Roaming\Code\logs\20220526T122537\exthost1\dendron.dendron","extensionPath":"c:\Users\~\.vscode\extensions\dendron.dendron-0.96.0","extensionUri":"c:\Users\~\.vscode\extensions\dendron.dendron-0.96.0","workspaceFile":"c:\Users\~\Dendron\dendron.code-workspace","workspaceFolders":["c:\Users\~\Dendron\notes"]}
{"level":30,"time":1653582342321,"pid":4000,"hostname":"~","name":"SegmentClient","msg":"No cache path for Segment specified. Failed event uploads will not be retried."}
{"level":30,"time":1653582342322,"pid":4000,"hostname":"~","name":"SegmentClient","msg":"user telemetry setting: enabled by config"}
{"level":30,"time":1653582342323,"pid":4000,"hostname":"~","name":"SegmentClient","msg":"telemetry initializing"}
{"level":30,"time":1653582342323,"pid":4000,"hostname":"~","name":"SegmentClient","msg":"using existing id"}
{"level":30,"time":1653582342324,"pid":4000,"hostname":"~","name":"SegmentClient","msg":"anonymous id","anonymousId":"rp026ghx5stzsml665fur5p"}
{"level":30,"time":1653582342332,"pid":4000,"hostname":"~","name":"dendron","ctx":"DendronExtension","msg":"initialized"}
{"level":30,"time":1653582342370,"pid":4000,"hostname":"~","name":"dendron","ctx":"_activate","msg":"initializeWorkspace","wsType":"CODE","currentVersion":"0.96.0","previousGlobalVersion":"0.96.0","extensionInstallStatus":"NO_CHANGE"}
{"level":30,"time":1653582342381,"pid":4000,"hostname":"~","name":"SegmentClient","msg":"user telemetry setting: enabled by config"}
{"level":30,"time":1653582342381,"pid":4000,"hostname":"~","name":"SegmentClient","msg":"telemetry initializing"}
{"level":30,"time":1653582342382,"pid":4000,"hostname":"~","name":"SegmentClient","msg":"using existing id"}
{"level":30,"time":1653582342382,"pid":4000,"hostname":"~","name":"SegmentClient","msg":"anonymous id","anonymousId":"rp026ghx5stzsml665fur5p"}
{"level":30,"time":1653582342382,"pid":4000,"hostname":"~","name":"dendron","msg":"Telemetry is disabled? false"}
{"level":30,"time":1653582342382,"pid":4000,"hostname":"~","name":"dendron","msg":"Segment Residual Cache Path is at c:\Users\~\AppData\Roaming\Code\User\globalStorage\dendron.dendron\segmentresidualcache.log"}
{"level":30,"time":1653582342383,"pid":4000,"hostname":"~","name":"SegmentClient","msg":"Attempting to flush residual segment data from file."}
{"level":30,"time":1653582342386,"pid":4000,"hostname":"~","name":"dendron","ctx":"runMigrationsIfNecessary","changes":[],"workspaceInstallStatus":"NO_CHANGE"}
{"level":30,"time":1653582342398,"pid":4000,"hostname":"~","name":"dendron","ctx":"_activate","platform":"win32","extensions":[{"id":"dendron.dendron","version":"0.96.0","active":true},{"id":"dendron.dendron-paste-image"},{"id":"dendron.dendron-markdown-shortcuts"},{"id":"redhat.vscode-yaml","version":"1.7.0","active":false}],"vaults":[{"fsPath":".","name":"vault","selfContained":true}]}
{"level":30,"time":1653582342401,"pid":4000,"hostname":"~","name":"execServer","state":"enter"}
{"level":30,"time":1653582342425,"pid":4000,"hostname":"~","name":"execServer","state":"post:exec.node"}
{"level":30,"time":1653582343644,"pid":9984,"hostname":"~","name":"SegmentClient","msg":"No cache path for Segment specified.  Failed event uploads will not be retried."}
{"level":30,"time":1653582342322,"pid":4000,"hostname":"~","name":"SegmentClient","msg":"user telemetry setting: enabled by config"}
{"level":30,"time":1653582342323,"pid":4000,"hostname":"~","name":"SegmentClient","msg":"telemetry initializing"}
{"level":30,"time":1653582342323,"pid":4000,"hostname":"~","name":"SegmentClient","msg":"using existing id"}
{"level":30,"time":1653582342324,"pid":4000,"hostname":"~","name":"SegmentClient","msg":"anonymous id","anonymousId":"rp026ghx5stzsml665fur5p"}
{"level":30,"time":1653582342332,"pid":4000,"hostname":"~","name":"dendron","ctx":"DendronExtension","msg":"initialized"}
{"level":30,"time":1653582342370,"pid":4000,"hostname":"~","name":"dendron","ctx":"_activate","msg":"initializeWorkspace","wsType":"CODE","currentVersion":"0.96.0","previousGlobalVersion":"0.96.0","extensionInstallStatus":"NO_CHANGE"}
{"level":30,"time":1653582342381,"pid":4000,"hostname":"~","name":"SegmentClient","msg":"user telemetry setting: enabled by config"}
{"level":30,"time":1653582342381,"pid":4000,"hostname":"~","name":"SegmentClient","msg":"telemetry initializing"}
{"level":30,"time":1653582342382,"pid":4000,"hostname":"~","name":"SegmentClient","msg":"using existing id"}
{"level":30,"time":1653582342382,"pid":4000,"hostname":"~","name":"SegmentClient","msg":"anonymous id","anonymousId":"rp026ghx5stzsml665fur5p"}
{"level":30,"time":1653582342382,"pid":4000,"hostname":"~","name":"dendron","msg":"Telemetry is disabled? false"}
{"level":30,"time":1653582342382,"pid":4000,"hostname":"~","name":"dendron","msg":"Segment Residual Cache Path is at c:\Users\~\AppData\Roaming\Code\User\globalStorage\dendron.dendron\segmentresidualcache.log"}
{"level":30,"time":1653582342383,"pid":4000,"hostname":"~","name":"SegmentClient","msg":"Attempting to flush residual segment data from file."}
{"level":30,"time":1653582342386,"pid":4000,"hostname":"~","name":"dendron","ctx":"runMigrationsIfNecessary","changes":[],"workspaceInstallStatus":"NO_CHANGE"}
{"level":30,"time":1653582342398,"pid":4000,"hostname":"~","name":"dendron","ctx":"_activate","platform":"win32","extensions":[{"id":"dendron.dendron","version":"0.96.0","active":true},{"id":"dendron.dendron-paste-image"},{"id":"dendron.dendron-markdown-shortcuts"},{"id":"redhat.vscode-yaml","version":"1.7.0","active":false}],"vaults":[{"fsPath":".","name":"vault","selfContained":true}]}
{"level":30,"time":1653582342401,"pid":4000,"hostname":"~","name":"execServer","state":"enter"}
{"level":30,"time":1653582342425,"pid":4000,"hostname":"~","name":"execServer","state":"post:exec.node"}
{"level":30,"time":1653582343644,"pid":9984,"hostname":"~","name":"SegmentClient","msg":"No cache path for Segment specified.  I'll see if I can reproduce this issue, or add more logs so we can figure out why it's happening.
(Sorry for deleting your message, it was too long so I was having trouble navigating the page!)

@SeriousBug , fixFrontmatter is working again. 😊
(I didn't do anything other than edit some files, so I don't think it was fixed by anything I did.)
I'd like to mention a couple of other things about fixFrontmatter (please let me know if I should open a new issue):

The fixFrontmatter command is very slow. Can its speed be improved?

While fixFrontmatter is running, the Preview Pane does not update. Would it be possible to provide some kind of ongoing notification indicating that fixFrontmatter / Dendron Doctor is still running?

(Note: I use fixFrontmatter extensively to manually import large numbers of files because the import pod doesn't currently do what I need. FYI, my feature request regarding import is here: Import is replacing dots in filenames with dashes but I want it to recognize hierarchy · Issue #2884 · dendronhq/dendron)
Thanks for your help with this issue. 👍

@bugfixd Glad it's working!
One thing you can do is if you have only one note to fix, you can click on the "Change Scope" button on the top right to only fix that note.

Otherwise the doctor command will check every note you have to see if they need to be fixed, which can be slow. It seems like in your case you may have to do that unfortunately since you are importing a lot of files.
I'm not sure if there's much we can do to speed that up, but hopefully the import pod will eventually support what you need.

Hi @SeriousBug ,
I ran fixFrontmatter and got the same error message again. After a lot of troubleshooting, I think I narrowed it down to a problem with a filename!
To try to figure out if a specific file was causing the error, I started adding my files to Dendron in small batches and running fixFrontmatter after each batch until I got the error again. Then I narrowed the problem down to one specific file. I kept editing the file until all it contained was the basic frontmatter, and it still kept causing the error. Then I wondered if the problem had something to do with the filename, which included the number "1645612785605558".
To check if it was that number in the filename that was causing the problem, I removed that file from my Dendron vault, and then I created a new empty file with the filename "1645612785605558.md", and sure enough, with that file in my vault I kept getting the fixFrontmatter error every time I ran it. 😲
When I removed that file from my Dendron vault, fixFrontmatter started working again.
I have since added and removed that file multiple times, and the error only occurs when the file is in the vault.
Note that my original filename included text as well as a number, similar to this: "file.1645612785605558.md".
At this point I have successfully imported about 500 files into Dendron with filenames similar to the example above, but so far this is the only file that has caused the error.

@SeriousBug ,
It seems that numbers higher than "1645612785605558" are also causing the error.
I tried importing or creating about two dozen different files with numbers higher than "1645612785605558", and they also caused the same error until I removed them again.


Question about Volumized Order Blocks

Hi!
Great work!
I have a question about Volumized Order Block (tradingview script).Did you tried to convert this to python?

Hello,
Thank you for your support.
To answer your question, no I have not implemented any sort of "Volumized Order Block".
Currently order blocks are the last candle before a FVG.
Which specific Tradingview script are you referring to maybe I can look into implementing it.

1)Volumized Order Blocks | Flux Charts
2)MTF Order Block Finder
try to find by name
second one I've started to convert

I like the look of the "Volumized Order Blocks | Flux Charts"
and if you are implementing the "MTF Order Block Finder" already I recon there should be an optional parameter you can pass to the ob function where you can specify the timeframe you want and if there is no timeframe specified then use the current chart data given.

this is the code I've managed to write so far
import matplotlib.pyplot as plt
import numpy as np
from binance.client import Client
from datetime import datetime
import pandas as pd
from loguru import logger

# Basic Configuration
resolution = "5"  # Set the desired timeframe as a string
ob_period = 5
threshold = 0.3
bull_channels = 4
bear_channels = 4

# Advanced Configuration
doji = 0.05
fuzzy = 0.01
near_price = 0

# Style, Colors, and Drawing
style = "BOTH"
bullcolor = "green"
bearcolor = "red"
linewidth_hl = 1
linewidth_avg = 1

# Experimental
ob_shift = 1
ob_selector = "OHLC"
ob_search = 2

# Input Sanitization & Adjustments
ob_search = ob_search if ob_search >= ob_period else ob_period
ob_shift = ob_shift if ob_shift >= ob_period else ob_period
ob_period += 1

def import_data(symbol, start_str, timeframe):
    logger.info(
        "Importing data for symbol: {}, start: {}, timeframe: {}",
        symbol,
        start_str,
        timeframe,
    )
    client = Client()
    start_str = str(start_str)
    end_str = f"{datetime.now()}"
    df = pd.DataFrame(
        client.get_historical_klines(
            symbol=symbol, interval=timeframe, start_str=start_str, end_str=end_str
        )
    ).astype(float)
    df = df.iloc[:, :6]
    df.columns = ["timestamp", "open", "high", "low", "close", "volume"]
    df["time"] = df.timestamp
    df.time = pd.to_datetime(df.time, unit="ms")
    df = df.set_index("timestamp")
    df.index = pd.to_datetime(df.index, unit="ms")
    return df

# Returns the lowest wick of a data set and given search range
# A 'wick' is either: Low to Open, Low to Close
def low_wick_search(start_index, length, open_data, low_data, close_data):
    logger.info(
        "Searching for low wick at index {} with length {}", start_index, length
    )
    wick_high = float("nan")
    wick_low = float("nan")
    index = np.nan
    for i in range(length + 1):
        if low_data[start_index - i] > wick_low and i > 0:
            continue
        bar_dir = (
            1 if close_data[start_index - i] - open_data[start_index - i] > 0 else -1
        )
        wick_high = (
            close_data[start_index - i] if bar_dir == 1 else open_data[start_index - i]
        )
        wick_low = low_data[start_index - i]
        index = i
    return wick_high, wick_low, index

# Returns the highest wick of a data set and given search range
# A 'wick' is either: High to Open, High to Close
def high_wick_search(start_index, length, open_data, high_data, close_data):
    logger.info(
        "Searching for high wick at index {} with length {}", start_index, length
    )
    wick_high = float("nan")
    wick_low = float("nan")
    index = np.nan
    for i in range(length + 1):
        if high_data[start_index - i] < wick_high and i > 0:
            continue
        bar_dir = (
            1 if close_data[start_index - i] - open_data[start_index - i] > 0 else -1
        )
        wick_low = (
            open_data[start_index - i] if bar_dir == 1 else close_data[start_index - i]
        )
        wick_high = high_data[start_index - i]
        index = i
    return wick_high, wick_low, index

# Returns true if a candle has zero ticks (high, low, open, and close all equal)
def is_zero_candle(index, open_data, high_data, low_data, close_data):
    base = open_data[index]
    return (
        base == close_data[index]
        and base == high_data[index]
        and base == low_data[index]
    )

# Fetch historical stock data
symbol = "BTCUSDT"  # Replace with the desired stock symbol
start_date = "2023-01-01"
end_date = "2024-01-29"

data = import_data(symbol, start_str=start_date, timeframe="1d")

# Extract necessary columns from the fetched data
open_data = data["open"].values
high_data = data["high"].values
low_data = data["low"].values
close_data = data["close"].values

# Use the functions
# Example: Find the lowest wick in the first 10 candles
low_wick_result = low_wick_search(9, 10, open_data, low_data, close_data)
print("Low Wick Result:", low_wick_result)

# Example: Find the highest wick in the first 10 candles
high_wick_result = high_wick_search(9, 10, open_data, high_data, close_data)
print("High Wick Result:", high_wick_result)

# Example: Check if the first candle has zero ticks
zero_candle_result = is_zero_candle(0, open_data, high_data, low_data, close_data)
print("Is Zero Candle:", zero_candle_result)

bullishOB = close_data[ob_period] < open_data[ob_period]
logger.info("bullishOB: {}", bullishOB)
bearishOB = close_data[ob_period] > open_data[ob_period]
logger.info("bearishOB: {}", bearishOB)
upcandles = 0
downcandles = 0
# Entire OB sequence has enough price movement to be valid (filter low volatility noise)
relmove = (
    100 * ((abs(close_data[ob_period] - close_data[1])) / close_data[ob_period])
    > threshold
)
logger.info("relmove: {}", relmove)
# Can't start with a Doji (active by default)
doji_candle = (
    100 * abs(close_data[ob_period] - open_data[ob_period]) / open_data[ob_period]
    > doji
)
logger.info("doji: {}", doji_candle)

for i in range(1, ob_period):  # Check candles following the OB
    if is_zero_candle(i, open_data, high_data, low_data, close_data):
        continue

    t_close = close_data[i]
    t_open = open_data[i]

    if np.abs(100 * (t_close - t_open) / t_open) < fuzzy:
        upcandles += 1
        downcandles += 1
        continue

    if t_close > t_open:
        upcandles += 1
    elif t_close < t_open:
        downcandles += 1

if doji_candle and relmove:
    OB_bull = bullishOB and (upcandles == (ob_period - 1))
    logger.info("OB_bull: {},upcandles: {}", OB_bull, upcandles)
    OB_bear = bearishOB and (downcandles == (ob_period - 1))
    logger.info("OB_bear: {},downcandles: {}", OB_bear, downcandles)

    OB_bull_chigh, OB_bull_clow = float("nan"), float(
        "nan"
    )  # Initialize OB_bull_chigh and OB_bull_clow
    OB_bear_chigh, OB_bear_clow = float("nan"), float(
        "nan"
    )  # Initialize OB_bear_chigh and OB_bear_clow

    if OB_bull:
        logger.info("Bullish Order Block detected")
        if ob_selector == "Context":
            temp_high, temp_low, index = low_wick_search(
                ob_period, ob_search, open_data, low_data, close_data
            )
            selector_shift = index
            OB_bull_chigh = temp_high
            OB_bull_clow = temp_low
        elif ob_selector == "High/Low":
            OB_bull_chigh = high_data[ob_period - ob_shift]
            OB_bull_clow = low_data[ob_period - ob_shift]
        elif ob_selector == "OHLC":
            temp_high, temp_low, index = low_wick_search(
                ob_period - 1, 0, open_data, low_data, close_data
            )
            OB_bull_chigh = temp_high
            OB_bull_clow = temp_low

        OB_bull_avg = (OB_bull_chigh + OB_bull_clow) / 2

    if OB_bear:
        logger.info("Bearish Order Block detected")
        if ob_selector == "Context":
            temp_high, temp_low, index = high_wick_search(
                ob_period, ob_search, open_data, high_data, close_data
            )
            selector_shift = index
            OB_bear_chigh = temp_high
            OB_bear_clow = temp_low
        elif ob_selector == "High/Low":
            OB_bear_chigh = high_data[ob_period - 1]
            OB_bear_clow = low_data[ob_period - 1]
        elif ob_selector == "OHLC":
            temp_high, temp_low, index = high_wick_search(
                ob_period - 1, 0, open_data, high_data, close_data
            )
            OB_bear_chigh = temp_high
            OB_bear_clow = temp_low

        OB_bear_avg = (OB_bear_chigh + OB_bear_clow) / 2

# Plotting example (replace with your actual data)
plt.plot(data.index, data["close"], label="Close Price")

# Plotting order blocks
# if OB_bull:
#     plt.fill_between(
#         data.index[-ob_period:],
#         OB_bull_clow,
#         OB_bull_chigh,
#         color=bullcolor,
#         alpha=0.5,
#         label="Bullish Order Block",
#     )
#
# if OB_bear:
#     plt.fill_between(
#         data.index[-ob_period:],
#         OB_bear_clow,
#         OB_bear_chigh,
#         color=bearcolor,
#         alpha=0.5,
#         label="Bearish Order Block",
#     )

plt.title("Historical Stock Data with Order Blocks")
plt.xlabel("Date")
plt.ylabel("Close Price")
plt.legend()
plt.show()

`

Hi @rafalsza,
You don't seem to be using the OB function from smc, but instead you are identifying the order blocks using a different method, can I ask why this is?
And I think it would be more beneficial if you modify the existing OB function to add MTF support, what do you think?

yest,  that's my goal. I want to use smc with some modifications to identify MTF order blocks

oh I see, you then want to look into the "resample" pandas function, you will then be able to convert the timeframe of the OHLC data from one timeframe to another, then you can then call the OB function in smc using the resampled candle data.
I hope this helps.

that's a problem cause I cannot understand how to do it according to pinescript

@rafalsza I think I need a more detailed description on what you are trying to achieve so I can help you.
I create the SMC python functions from scratch and I don't copy any Pinescripts.

i'm interested in MTF order blocks and Volumized order blocks

Okay nice I will look into implementing these.

Hi,
Also im interested in order blocks and like you want to convert these scripts :
https://www.tradingview.com/v/bLdpFVuq/
or
https://www.tradingview.com/v/piIbWMpY/
these both scripts based on same logic btw.

Hello,
I like the sound of Volumized Order Block https://www.tradingview.com/v/bLdpFVuq/
Can any one tell me the logic behind how this is calculated and I will look to implement it.

Hello,
I like the sound of Volumized Order Block https://www.tradingview.com/v/bLdpFVuq/ Can any one tell me the logic behind how this is calculated and I will look to implement it.

that d be great !

For bullish order blocks, the script checks if the closing price crosses above the detected swing high. If the closing price crosses above the high of the detected swing, it considers this a potential bullish order block.
The script uses a loop to iterate over the detected swings (top) and, when the closing price crosses above the swing high, it marks the swing as crossed and calculates the relevant information for the order block, such as the start time, end time, and volume.
obVolume:
The total volume associated with the order block. It is calculated by summing the volumes of the bars within the order block.
bbVolume:
The volume associated with the breaker bar. If the order block is invalidated and marked as a breaker, this value represents the volume at the time of the break.
obLowVolume:
The volume associated with the lower boundary of the order block.
obHighVolume:
The volume associated with the upper boundary of the order block.
breaker:
A boolean indicating whether the order block has been invalidated (broken). If true, the order block has been broken by price movement.
maybe this will help

I can't seem to get my head around this one, and Its a bit out of my scope.
Can someone implement it and make a contribution push request to this project for me to review.

made it

Nice work! could you make a pull request to the project?

uploaded first version to my github
https://github.com/rafalsza/trading-scripts/blob/main/volumized_order_blocks.py
now we need to adapt the code to smartmoneyconcepts

uploaded first version to my github https://github.com/rafalsza/trading-scripts/blob/main/volumized_order_blocks.py now we need to adapt the code to smartmoneyconcepts

import ccxt
import pandas as pd
import pandas_ta as ta
import numpy as np
import os
from datetime import date, datetime, timezone, tzinfo
import time, schedule
import numpy as np
import requests
from math import floor
import ta as tl
import math
import functools
from pandas import DataFrame
import warnings
from io import StringIO
from pathlib import Path
from collections import deque
import itertools
import pprint
warnings.filterwarnings("ignore")
symbol = "ENJ/USDT"  # Binance
pos_size =1
timeframe = "15m"

# API TANIMLAMALARI
account_binance = ccxt.binance({
    "apiKey": 'API',
    "secret": 'Key',
    "enableRateLimit": True,
    'options': {
        'defaultType': 'future'
    }
})

while True:

    try:

        orderTime = datetime.utcnow()
        ohlcvLB = account_binance.fetch_ohlcv(symbol, timeframe)
        dfLB = pd.DataFrame(ohlcvLB, columns=['time', 'open', 'high', 'low', 'close', 'volume'])
        indiPoint = pd.DataFrame(columns=['time'])

        if len(ohlcvLB):

            def find_ob_swings2(df, length):
                ob_swings = {"top": [], "bottom": []}
                swing_type = 0

                # Calculate the highest high and lowest low for the specified length
                upper = df["high"].rolling(window=length).max()
                lower = df["low"].rolling(window=length).min()

                # Concatenate upper and lower to df
                df["upper"] = upper
                df["lower"] = lower

                # Initialize the previous swing type
                prev_swing_type = 0

                # Iterate over each index in the dataframe
                for i in range(len(df)):
                    try:
                        # Determine the swing type
                        if df["high"].iloc[i] > upper.iloc[i + length]:
                            swing_type = 0
                        elif df["low"].iloc[i] < lower.iloc[i + length]:
                            swing_type = 1

                        # Check if it's a new top or bottom
                        if swing_type == 0 and prev_swing_type != 0:
                            ob_swings["top"].append(
                                {
                                    "index": i,
                                    "loc": df.index[i],
                                    "price": df["high"].iloc[i],
                                    "volume": df["volume"].iloc[i],
                                    "crossed": False,
                                }
                            )
                        elif swing_type == 1 and prev_swing_type != 1:
                            ob_swings["bottom"].append(
                                {
                                    "index": i,
                                    "loc": df.index[i],
                                    "price": df["low"].iloc[i],
                                    "volume": df["volume"].iloc[i],
                                    "crossed": False,
                                }
                            )

                        # Update the previous swing type
                        prev_swing_type = swing_type
                    except IndexError:
                        pass

                return ob_swings["top"], ob_swings["bottom"]

            def findOrderBlocks(df, maxDistanceToLastBar, swingLength, obEndMethod, maxOrderBlocks):
                bullishOrderBlocksList = []
                bearishOrderBlocksList = []
                bar_index = len(df) - 1
                last_bar_index = max(0, bar_index - maxDistanceToLastBar)

                if bar_index > last_bar_index - maxDistanceToLastBar:
                    top, btm = find_ob_swings2(df, swingLength)
                    useBody = False

                    # Bullish Order Block
                    for close_index in range(len(df)):
                        close_price = df["close"].iloc[close_index]

                        bullishBreaked = 0
                        if len(bullishOrderBlocksList) > 0:
                            for i in range(len(bullishOrderBlocksList) - 1, -1, -1):
                                currentOB = bullishOrderBlocksList[i]
                                if not currentOB["breaker"]:
                                    if (
                                        obEndMethod == "Wick"
                                        and df.low.iloc[close_index - 1] < currentOB["bottom"]
                                    ) or (
                                        obEndMethod != "Wick"
                                        and df.low.iloc[close_index - 1]
                                        < currentOB[["open", "close"]].min()
                                    ):
                                        currentOB["breaker"] = True
                                        currentOB["breakTime"] = df.index[close_index - 1]
                                        currentOB["bbvolume"] = df["volume"].iloc[close_index - 1]
                                else:
                                    if df.high.iloc[close_index] > currentOB["top"]:
                                        bullishOrderBlocksList.pop(i)
                                    elif (
                                        i < 10
                                        and top[i]["price"] < currentOB["top"]
                                        and top[i]["price"] > currentOB["bottom"]
                                    ):
                                        bullishBreaked = 1

                        last_top_index = None
                        for i in range(len(top)):
                            if top[i]["index"] < close_index:
                                last_top_index = i
                        if last_top_index is not None:
                            swing_top_price = top[last_top_index]["price"]
                            if close_price > swing_top_price and not top[last_top_index]["crossed"]:
                                top[last_top_index]["crossed"] = True
                                boxBtm = df.high.iloc[close_index - 1]
                                boxTop = df.low.iloc[close_index - 1]
                                boxLoc = df.index[close_index - 1]
                                for j in range(1, close_index - top[last_top_index]["index"]):
                                    boxBtm = min(
                                        df.low.iloc[top[last_top_index]["index"] + j], boxBtm
                                    )
                                    if boxBtm == df.low.iloc[top[last_top_index]["index"] + j]:
                                        boxTop = df.high.iloc[top[last_top_index]["index"] + j]
                                    boxLoc = (
                                        df.index[top[last_top_index]["index"] + j]
                                        if boxBtm == df.low.iloc[top[last_top_index]["index"] + j]
                                        else boxLoc
                                    )

                                newOrderBlockInfo = {
                                    "top": boxTop,
                                    "bottom": boxBtm,
                                    "volume": df["volume"].iloc[close_index]
                                    + df["volume"].iloc[close_index - 1]
                                    + df["volume"].iloc[close_index - 2],
                                    "type": "Bull",
                                    "loc": boxLoc,
                                    "loc_number": close_index,
                                    "index": len(
                                        bullishOrderBlocksList
                                    ),
                                    "oblowvolume": df["volume"].iloc[close_index - 2],
                                    "obhighvolume": (
                                        df["volume"].iloc[close_index]
                                        + df["volume"].iloc[close_index - 1]
                                    ),
                                    "breaker": False,
                                }
                                bullishOrderBlocksList.insert(0, newOrderBlockInfo)
                                if len(bullishOrderBlocksList) > maxOrderBlocks:
                                    bullishOrderBlocksList.pop()
                                    # break

                    for close_index in range(len(df)):
                        close_price = df["close"].iloc[close_index]

                        # Bearish Order Block
                        bearishBreaked = 0
                        if len(bearishOrderBlocksList) > 0:
                            for i in range(len(bearishOrderBlocksList) - 1, -1, -1):
                                currentOB = bearishOrderBlocksList[i]
                                if not currentOB["breaker"]:
                                    if (
                                        obEndMethod == "Wick"
                                        and df.high.iloc[close_index] > currentOB["top"]
                                    ) or (
                                        obEndMethod != "Wick"
                                        and df.high.iloc[close_index - 1]
                                        > currentOB[["open", "close"]].max()
                                    ):
                                        currentOB["breaker"] = True
                                        currentOB["breakTime"] = df.index[close_index]
                                        currentOB["bbvolume"] = df["volume"].iloc[close_index]
                                else:
                                    if df.low.iloc[close_index] < currentOB["bottom"]:
                                        bearishOrderBlocksList.pop(i)
                                    elif (
                                        i < 10
                                        and btm[i]["price"] > currentOB["bottom"]
                                        and btm[i]["price"] < currentOB["top"]
                                    ):
                                        bearishBreaked = 1

                        last_btm_index = None
                        for i in range(len(btm)):
                            if btm[i]["index"] < close_index:
                                last_btm_index = i
                        if last_btm_index is not None:
                            swing_btm_price = btm[last_btm_index]["price"]
                            if close_price < swing_btm_price and not btm[last_btm_index]["crossed"]:
                                btm[last_btm_index]["crossed"] = True
                                boxBtm = df.low.iloc[close_index - 1]
                                boxTop = df.high.iloc[close_index - 1]
                                boxLoc = df.index[close_index - 1]
                                for j in range(1, close_index - btm[last_btm_index]["index"]):
                                    boxTop = max(
                                        df.high.iloc[btm[last_btm_index]["index"] + j], boxTop
                                    )
                                    boxBtm = (
                                        df.low.iloc[btm[last_btm_index]["index"] + j]
                                        if boxTop == df.high.iloc[btm[last_btm_index]["index"] + j]
                                        else boxBtm
                                    )
                                    boxLoc = (
                                        df.index[btm[last_btm_index]["index"] + j]
                                        if boxTop == df.high.iloc[btm[last_btm_index]["index"] + j]
                                        else boxLoc
                                    )

                                newOrderBlockInfo = {
                                    "top": boxTop,
                                    "bottom": boxBtm,
                                    "volume": df["volume"].iloc[close_index]
                                    + df["volume"].iloc[close_index - 1]
                                    + df["volume"].iloc[close_index - 2],
                                    "type": "Bear",
                                    "loc": boxLoc,
                                    "loc_number": close_index,
                                    "index": len(bearishOrderBlocksList),
                                    "oblowvolume": (
                                        df["volume"].iloc[close_index]
                                        + df["volume"].iloc[close_index - 1]
                                    ),
                                    "obhighvolume": df["volume"].iloc[close_index - 2],
                                    "breaker": False,
                                }
                                bearishOrderBlocksList.insert(0, newOrderBlockInfo)
                                if len(bearishOrderBlocksList) > maxOrderBlocks:
                                    bearishOrderBlocksList.pop()
                                    break

                return bullishOrderBlocksList

            test = findOrderBlocks(dfLB,100, 10,"Wick",1)
            pprint.pprint(test)
            break

    except Exception as e:
        print(e)
        continue

i guess these breaks should be deleted,
if len(bullishOrderBlocksList) > maxOrderBlocks:
                                    bullishOrderBlocksList.pop()
                                    # break
 if len(bearishOrderBlocksList) > maxOrderBlocks:
                                    bearishOrderBlocksList.pop()
                                    # break

otherwise it prints old order blocks, (e.g. : assume we want to print 1 ob, it prints first, not a last.) and maxDistanceToLastBar feature doesnt work properly, when i limit it "100" it still shows order block that older than 100 bars

ENJUSDT.P - 15m - Binance ( 18 Feb 2024 14:45 UTC+3)

you can't compare spot data with perpetual, these are different dataframes

you can't compare spot data with perpetual, these are different dataframes

I changed time frame and spot with futures klines in code. Smth wrong in code

i made some changes, check on last version


Android version

[x] Logo View (Some bezier stuffs.)
[x] Support themes.
[x] Example activity.
[x] Login activity

[x] UI
[x] Log in feauture
[x] Remember my account
[x] Form validation
[x] Return the result to callee Activity.

[x] Register activity

[x] UI
[x] Register feature
[x] Form validation
[x] Remember my account

[x] Support pre-defined Server URI
[x] Support hiding Server URI

Please review this.
It doesn't include some icons such Server, Email, Password. Since they don't match Android's TextInputLayout.

How easy to integrate this into user's app project? Need something about installation to the README?

@beeender Of course, README should be updated. Although it is not delivered by J Center or other repositories, I don't know how can users install this library easily.

I just downloaded and deployed it to one of the office Pixel tablets. It looks and behaves really nicely!
I think I found one small glitch. If you're holding the tablet in sideways, the keyboard overlays the password field, and there doesn't seem to be a way to scroll to it.
That's a very minor edge case, so I'm happy to merge this now and address it later.
Does anyone else think there are any outstanding issues that absolutely must be solved before we can go ahead and merge? :)
Thanks!

Althought README.md should be updated and its layout should be scrolled, I think they are not big issues and they can be another PRs.


[T3A3][T14-A1] Advay Pal

Ready for review.

@advaypal overall good work :+1:  keep it up.
there are a few minor issues which I have pointed out in the code.
Please check the comments added. Please ack & close the PR after reading comments.

Do I have to push my changes or should I just close the PR?


FixedPoint and fromBits

I'm not sure if this should be regarded as a chisel or firrtl problem. The following chisel
class A extends Module {
    val io = IO(new Bundle {
      val a = Output(Vec(1, UInt(32.W)))
      val b = Input( Vec(1, UInt(32.W)))
    })

    val c = Wire(FixedPoint(32, 30))
    c.fromBits(io.b(0))
    io.a.fromBits(c)
  }

produces the following firrtl
circuit DumpVerilogA :
  module DumpVerilogA :
    input clock : Clock
    input reset : UInt<1>
    output io : {a : UInt<32>[1], flip b : UInt<32>[1]}

    io is invalid
    io is invalid
    wire c : Fixed<32><<30>> @[FFTSpec.scala 168:17]
    c is invalid @[FFTSpec.scala 168:17]
    wire _T_13 : Fixed<32><<30>>
    _T_13 is invalid
    _T_13 <= io.b[0] @[FFTSpec.scala 169:15]
    wire _T_16 : UInt<32>[1] @[FFTSpec.scala 170:18]
    _T_16 is invalid @[FFTSpec.scala 170:18]
    node _T_18 = bits(c, 31, 0) @[FFTSpec.scala 170:18]
    _T_16[0] <= _T_18 @[FFTSpec.scala 170:18]

I get a firrtl.passes.CheckTypes$InvalidConnect error on _T_13 <= io.b[0]. Should this be legal firrtl? Should fromBits() do something special in chisel? Perhaps FixedPoint should have a flatten that gives an SInt.

No, this should not be legal firrtl, but instead fromBits() should use firrtl's asFixedPoint operator.

Thanks. I filed ucb-bar/chisel3#391


[Slack-V2] allow setting "answer to all messages" mode for an assistant in a specific slack channel

Closing as stale. Was not really asked by user AFAICT. Feel free to reopen if needed.


Add gemmt symbols

https://www.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-fortran/top/blas-and-sparse-blas-routines/blas-like-extensions/gemmt.html

I've altered the CI configuration, (previously everything except the FreeBSD tests refused to run on PRs from 3rd-party forks).  Can you rebase on latest main and try again?

I updated the test dependencies to get a newer version of MKL_jll in https://github.com/JuliaLinearAlgebra/libblastrampoline/pull/96, can you rebase and try again?

I updated the test dependencies to get a newer version of MKL_jll in #96, can you rebase and try again?

I rebased and I still have an undefined reference for dgemmt_ with LBT.

Ah, of course, the new symbols aren't exported.  You need to run the ext/gensymbol/generate_func_list.sh script.  That will write out new header files, which you need to commit in here as well.  The buildkite CI (which you should now be able to see, thank you for telling me it was still set to "private") has a job which outputs what the file should look like, if there is inconsistency between the source and generated header.

All tests passed now, thanks @staticfloat!
gemmt will be available with the release 0.3.22 of OpenBLAS for information: https://github.com/xianyi/OpenBLAS/pull/3796

Great, so once that's released and packaged, we can update the tests here to use gemmt with OpenBLAS as well.  :)


deploymentmanager-samples/examples/v2/gke/jinja/replicatedservice.yaml -- fails creation and deletion

Using this replication service template YAML and Jinja fails. The creation failing I could understand, maybe I made a mistake. But now the failed replication service is stuck in my Deployment manager and I cannot remove it:
Timeout after 180000 ms when fetching URL https://<IP_ADDRESS>/api/v1/namespaces/default/replicationcontrollers/gke-quickflask-repl-service-v1-replicated-service-v1-rc, reason: TIMEOUT_WEB
gke-quickflask-repl-service-v1 has resource warnings
gke-quickflask-repl-service-v1-replicated-service-v1-rc: Timeout after 180000 ms when fetching URL https://<IP_ADDRESS>/api/v1/namespaces/default/replicationcontrollers/gke-quickflask-repl-service-v1-replicated-service-v1-rc, reason: TIMEOUT_WEB
It would seem a replication controller and service could be handled by Kubernetes itself (with kubectl and Kubernetes based YAML templates, not necessarily by GKE. In any case, this seems like a bug.
#Kubernetes replication service template
#DEPLOY Kubernetes replication service
#gcloud deployment-manager deployments create gke-quickflask-repl-service-v1 --config replicatedservice.yaml

#kubectl delete replicationcontroller gke-quickflask-repl-service-v1

#gcloud deployment-manager deployments delete gke-quickflask-repl-service-v1
imports:

path: replicatedservice.jinja

resources:

name: replicated-service-v1
type: replicatedservice.jinja
properties:
clusterType: gke-cluster-demo-v1-type
image: gcr.io/$PROJECT_ID/quickflask-image:v1

This should be fixed now, can you retry?

I sent some errors for debug via email. I don't think it's fixed quite yet, b/c I still can't delete the replication controller from my GCP project in the GCP console.


open the social media links of fotter in a new tab

Open the social media links in a new tab.

I would like to work on this; Please assign it to me

@subhamkumarr assigned


Override TextField width

Inside the materialui/src/less/variables/custom-variables.less it states that @input-width: 320px; .. how can i override it ? i've tried @input-width: 100px inside my custom-overrides.less but still nothing happens .  pls help.. thank you

I have the same problem and i didn't even found a way to set pass a class to an specific textfield so i can change the style myself. Any way of doing this?

me too. I'm passing a className to the textfield component then set it's width....

Dupe of #393


fix: adds context around sequence errors returned during publishing

Signed-off-by: Jennifer Power<EMAIL_ADDRESS>Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change

[X] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

[X] Manually verified by publishing a sequence 2 imageset before sequence 1

Checklist:

[X] My code follows the style guidelines of this project
[X] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[X] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[X] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules

/lgtm


Center/origo not centered within the PieChart.

Describe the bug
The center of the PieChart doesnt align correctly within its parent. This shouldnt really be a problem if: flex: 1, alignItems: 'center', justifyContent: 'center', were the default and additional adding a prop for this that does make sense.
Tried using these and none of them helps:
innerCircleBorderWidth?: number;
innerCircleBorderColor?: ColorValue;
shiftInnerCenterX?: number;
shiftInnerCenterY?: number;
Having to use "paddings" within the stylecreations wont be optimal when it will differ majorly between mobile and tablets.
To Reproduce
Steps to reproduce the behavior:

Use the default PieChart and try it.

Expected behavior
It should always be centered within its parent, possibly with the option to offset it if thats even necessary at use.
Screenshots
Attached further down .

Device: [e.g. iPhone8+ and really any other]
OS: [e.g. iOS15+]
Version of the library being used [latest]

Hi @m4d0x 👋
Thanks for pointing out this issue. It has been fixed in version 1.3.12. You can now center the Pie chart by using alignItems: 'center', justifyContent: 'center' to the surrounding View