Human-friendly timestamps

some views still use Date.now()-style timestamps, that should be replaced
e.g.:

the popup you get when you click on a match.
incoming-requests, chat-panel

seems fixed to me


Fetcher errors handling refactor

This PR modifies heavily how errors are handled by the fetcher. The previous way of doing, ie relying on the type of errors produced by the functions used to fetch, revealed to be unreliable.
Hence, add a new error rate based throttler to pause the fetching task when too many errors are produced, which is likely a sign that something bad is happening to the system (network is down, storage is full, etc).
Tests were written to ensure the throttler behaves correctly but please, review with care as there is probably room for some improvements.

@gilliek There are two things I see could be improved with regard to the current implementation:

The configuration is maybe a bit too complicated for the user. Maybe only propose the user to set the throttler wait time and the error rate? We could use a sliding window of 60 by default or something.
Deflating is slow since the routine needs to finish reading from the channel until it sees it closed. As it is in a separate goroutine, it probably does not matter much but it could probably be made better.

@Rolinh For the configuration stuff, I don't think it's a big issue. "Normal" users will just use sample config file, and if they don't know what value to use, they will just keep the default ones.
For the errbag.Deflate() method, I would suggest to add a non blocking deflate method that does something like go close(eb.errChan).

Actually, Deflate() does not block so there is no need to spawn a goroutine to close the channel. The problem is rather that it takes time for the channel to be emptied, which depends on the leak rate and the sliding window size. Maybe we shall send a signal to the routine to tell it to stop reading from the channel?

Ok then I misunderstood the problem.
I agree, sending a signal seems to be the appropriate way of handling it.

It does not make sense to have a sliding window or a wait time of 0 second, so I think it could be worth to add a check in the errbar.New func.
Besides, since the leak rate is a floating-point number, you should use a tolerance for the comparison (something like 0.001 should be enough). What do you think?

I think you are right. I kind of assumed that users of the lib would not be stupid as to set a sliding window of 0 because one can quickly deduce that it would prevent throttling but I we shall better be safe and assume the caller is dumb (or can make errors).
About the tolerance for the leak rate, I'm not quite sure using a tolerance is sufficient. Actually, leaking too fast does not make sense at all since it will prevent throttling almost the same way as if setting the sliding window to 0. Now, something does not make sense at all: leak rate is not quite a rate actually since the closer to 0 it is, the faster it leaks. It is kind of confusing and a somewhat inverted logic there that should be fixed imho.

Indeed :) There is also a situation where the user may use some kind of mathematic formula to determine the sliding window, and if the formula is incorrect (or has invalid values) it may return 0 and the user may never notice it.
I agree. Maybe we should set a reasonable minimum value for the leak rate.
Yeah the name leakingRate is quite confusing. What about renaming it into "leakInterval"? And leakInterval would be given in seconds.

In my opinion, it does not make sense to do complicated math to determine the sliding window size so I don't really see why a user would do that. Anyway, the check is worth adding.
I don't think that a simple renaming to leakInterval would solve the issue. What does the leakInterval mean for the user? How fast it leaks, right? Then, this should be specified as "the maximum number of errors per minute tolerated" or something of the like.

I never said complicated ;-)
In our case, obviously, it does not make sense. But one may want to minimize wasted time. To do so, he would  probably set wait time and sliding windows based on previous observations and automatically update this value at periodic interval. But anyway, the check is worth adding ;-)
It would just mean the interval between each leak. In other words, a leak occurs every X seconds.

What do you mean by "minimize wasted time" ?
Well, yeah, maybe leakInterval is fine after all.

What do you mean by "minimize wasted time" ?

Having a too high value for the wait time or a too small sliding window. In high-performance system, that may be significant.

Well, yeah, maybe leakInterval is fine after all.

Cool :smile:

I think I addressed all issues we raised here with that latest commit. Please, have a look.

LGTM :+1:


Update MD file on new branch 2017-21-25_17-11-40

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

split/updateTestRef.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Fix macOS amd64 build

The macos-latest label currently uses the macOS 14 M1 runner^1, the redka_darwin_amd64.zip release is actually an arm64 only binary.
❯ curl -sSL -O "https://github.com/nalgeon/redka/releases/download/v0.5.0/redka_darwin_amd64.zip"

❯ unzip redka_darwin_amd64.zip
Archive:  redka_darwin_amd64.zip
  inflating: redka

❯ file ./redka
./redka: Mach-O 64-bit executable arm64

❯ ./redka
exec: Failed to execute process './redka': Bad CPU type in executable.

Thanks a lot! Somehow I missed that.


Jcarter/update cleanup

Coverage decreased (-0.8%) to 85.294% when pulling 6d15c563821bdab3f59092af327614a400289192 on jcarter/update-cleanup into d4d14f6d180867a46a16eb399b4411121f4c4d14 on master.


[Bug] Missing REF Edge Between ClosureBinding and Local

Describe the bug
The variables captured by Java are not fully modelled, as there are edges missing between the ClosureBinding node and the Local node referred to by the ClosureBinding.closureBindingId.
To Reproduce
Steps to reproduce the behavior:

Generate a CPG of:

public class Foo {

 public void foo(Object arg) {
       String myValue = "abc";
       List<String> userPayload = new ArrayList<>();
       List<String> userNamesList = userPayload.stream.map(item -> {
         sink2(myValue);
         return item + myValue;
       });
       sink1(userNamesList);
       return;
 }

}

Run the query:

cpg.graph
  .nodes(NodeTypes.CLOSURE_BINDING)
  .collect { case x: ClosureBinding => x }
  .map(_._localViaRefOut).l

Observe the error: OUT edge with label REF to an adjacent LOCAL is mandatory, but not defined for this CLOSURE_BINDING node with id=12

Expected behavior
Ideally this would be connected fully, e.g., METHOD_REF -(CAPTURED)-> CLOSURE_BINDING -(REF)-> LOCAL.
Surely this could be done in a base pass automatically? This would alleviate frontends from all the fuss.
Screenshots
A snippet of some of the existing functionality with a tweaked AST dotfile:

Desktop (please complete the following information):

OS MacOS 14
Joern Version  2.0.141
Java version 19

Additionally, I note variables such as userNamesList and arg are considered captured when I don't think that is correct. Modelling the same in Python and JavaScript shows that only myValue and, in Python due to methods being set to local identifiers as method references, sink2 is included. Perhaps the scope of this ticket should be addressing that problem instead of the edge linking, which can be done in a pass.

Seems like the error is related to the arg parameter, which makes sense since the cardinality of this edge always expects a local. This requires a fix in the schema itself.

Fix: https://github.com/ShiftLeftSecurity/codepropertygraph/pull/1739


Refactor struct

To install with go get
go get github.com/kamijin-fanta/sakuraio-cli
sakuraio-cli --help # `export PATH=$PATH:$GOPATH/bin` is required.
$GOPATH/bin/sakuraio-cli --help

thx!


Added setting THUMBNAIL_REMOVE_URL_ARGS

Suggested setting to allow disabling removal of GET arguments from URL:s.

Coverage remained the same at ?% when pulling 7991c910aaeb04c515f9126723ec11b4f1bc7282 on schyffel:master into b6358d234d7de3927a2666a2a5ab3d7870c0e1d3 on jazzband:master.


formulae_detect: git fetch origin only if not official tap

Continuation of: https://github.com/Homebrew/homebrew-test-bot/pull/643

Makes sense thanks @dawidd6!


[WIP] 1.0.0

Description
To implement an admin client app.
Task

[ ] Documents

To write a coding rule

[x] app skelton
[ ] pagination
[ ] api client

[ ] private api

[ ] GET /posts
[ ] GET /posts/:id
[ ] POST /posts
[ ] PATCH /posts/:id
[ ] DELETE /posts/:id
[ ] GET /posts/:title/comments
[ ] GET /comments/:id
[ ] PATCH /comments/:id
[ ] GET /categories
[ ] GET /categories/:id
[ ] POST /categories
[ ] PATCH /categories/:id
[ ] DELETE /categories/:id
[ ] GET /tags
[ ] GET /tags/:id
[ ] POST /tags
[ ] PATCH /tags/:id
[ ] DELETE /tags/:id

[ ] tests

[memo]
https://github.com/PanJiaChen/vue-element-admin


Let us comment on and resolve review comments left by other in Description view

It seems that looking at the list of files, any comments that are outdated do not show up as a comment in the files. This creates a problem because if there is a line shift, it makes any comments in those lines as outdated and they don't show up even though they are not either marked as resolved or still needed. In the description it would be nice if we can have the ability to resolve or comment on any review comments left by others. Shows the full list of comments which is a good alternative to using the github site.

@assanesuzy you should be able to see these comments in the comments view (command "View: Focus on Comments View"). If you click on them there, it will open a file at the commit with the comment and you can reply there.
Does that work for you?
Side note: the comments view is not easy to find right now. We are going to make it easier to find.

That view is actually where my problem lies. The reason why I was mentioning the "Description" view is because the comments are not always up to date in the view you mentioned. There have been many instances where there were recent review comments added and they do not show up in the files in this same view. They are only visible in the "Description" view. I've tried refreshing and closing and opening, but the most recent review comments are never visible

@assanesuzy I think I understand now. The "review summary" comments only show in the Description:

However, the non-summary comments that are part of that review should be shown in the Comments view, so you should still be able to get to the non-summary comment from there. Does that work for you? If not, that's a bug and I'll look into it.
We are missing an easy way to go from the comment in the description view to the individual comments in files. We should add a button for this.

Interesting. What I'm missing is that section where it says "Add new review comment". When the I create a  PR and someone else leaves review summary with other non-summary comments, I am looking for the ability to leave a non-summary comment in response to whatever their comments are. I guess I'll wait for that feature to be released and I'll see if that fixes my issue. Thank you for your help.

I think this is the same thing I found missing.

If you've left a comment through a review, there's no way to reply to that comment in the Description view. Which you can inside of the GitHub Pull Request page.
Also if you click on the file name, it does not show that comment inside of the file, it's hidden in the margins, and you have to find which one of the comments it is and expand it.

@olafurw comments from you and resolved comments are collapsed into the margin by default. You can toggle expanding all comments by running the command Comments: Expand All comments.

Duplicate of https://github.com/microsoft/vscode-pull-request-github/issues/601


🐛 noUselessElse incorrectly flags valid else

Environment information
playground

What happened?
This an overly simplified example to trigger the bug:
https://biomejs.dev/playground/?indentStyle=space&quoteStyle=single&trailingComma=none&code=ZgB1AG4AYwB0AGkAbwBuACAAdABlAHMAdAAoACkAIAB7AAoAIAAgAGwAZQB0ACAAdgBhAGwAdQBlADsACgAKACAAIABpAGYAIAAoAGEAKQAgAHsACgAgACAAIAAgAHYAYQBsAHUAZQAgAD0AIAAxADsACgAgACAAfQAgAGUAbABzAGUAIABpAGYAIAAoAGIAKQAgAHsACgAgACAAIAAgAHIAZQB0AHUAcgBuACAAMgA7AAoAIAAgAH0AIABlAGwAcwBlACAAewAKACAAIAAgACAAdgBhAGwAdQBlACAAPQAgADMAOwAKACAAIAB9AAoACgAgACAAcgBlAHQAdQByAG4AIAB2AGEAbAB1AGUAOwAKAH0ACgA%3D
Expected result
If I follow biome's suggestions with the above code, I'll end up with
function test() {
  let value;

  if (a) {
    value = 1;
  } else if (b) {
    return 2;
  }

  value = 3;

  return value;
}

which breaks the previous logic.
If the a condition is truthy, then the last else should not run, regardless of what the b condition/block does.
Code of Conduct

[X] I agree to follow Biome's Code of Conduct

In fact the intended suggestion is:
function test() {
  let value;

  if (a) {
    value = 1;
  } else {
    if (b) {
      return 2;
    }
    value = 3;
  }

  return value;
}

The CLI does not make it clear then.
  ! This else clause can be omitted.

     6 │   } else if (b) {
     7 │     return 2;
   > 8 │   } else {
       │     ^^^^^^
   > 9 │     value = 3;
  > 10 │   }
       │   ^
    11 │
    12 │   return value;

  i This if statement uses an early breaking statement.

     4 │   if (a) {
     5 │     value = 1;
   > 6 │   } else if (b) {
       │          ^^^^^^^^
   > 7 │     return 2;
   > 8 │   } else {
   > 9 │     value = 3;
  > 10 │   }
       │   ^
    11 │
    12 │   return value;

Personally I'm 👎 on suggesting to ADD indentation/nested code, the else in this case if fine IMHO, the code flow remains vertical.

Personally I'm 👎 on suggesting to ADD indentation/nested code, the else in this case if fine IMHO, the code flow remains vertical.

I think you are right. When I implemented the rule I was wondering the same thing. I choose this behavior because this was the simplest one (we just have to check the previous branch, no tall of them). Let's think a bit about that and change the rule to ignore this kind of code.

Came here to report the same bug. If there is a branch before that doesn't return / break / continue then the rule can't be applied.


[macOS] waitable_event_posix.o fails to compile

Since 5e9a70ec9da7084d3485fe44df4344eb8cea13c1, develop branch has been failing to build on base/synchronisation/waitable_event_posix.o:
[214/374] c++ -MMD -MF base/synchronization/waitable_event_posix.o.d  -I/var/folders/sl/ygqg15cj1tx6qnxhyvs40rrh0000gn/T/tmpfSjQ4H/gen -I/Users/Artur/ungoogled-chromium/build/sandbox -DNO_TCMALLOC -D__STDC_FORMAT_MACROS -O2 -g0 -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -std=c++14 -c /Users/Artur/ungoogled-chromium/build/sandbox/base/synchronization/waitable_event_posix.cc -o base/synchronization/waitable_event_posix.o
FAILED: base/synchronization/waitable_event_posix.o
c++ -MMD -MF base/synchronization/waitable_event_posix.o.d  -I/var/folders/sl/ygqg15cj1tx6qnxhyvs40rrh0000gn/T/tmpfSjQ4H/gen -I/Users/Artur/ungoogled-chromium/build/sandbox -DNO_TCMALLOC -D__STDC_FORMAT_MACROS -O2 -g0 -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -std=c++14 -c /Users/Artur/ungoogled-chromium/build/sandbox/base/synchronization/waitable_event_posix.cc -o base/synchronization/waitable_event_posix.o
/Users/Artur/ungoogled-chromium/build/sandbox/base/synchronization/waitable_event_posix.cc:46:19: error: unknown type name 'WaitableEventKernel'; did you mean 'WaitableEvent'?
    : kernel_(new WaitableEventKernel(reset_policy, initial_state)) {}
                  ^~~~~~~~~~~~~~~~~~~
                  WaitableEvent
/Users/Artur/ungoogled-chromium/build/sandbox/base/synchronization/waitable_event.h:54:19: note: 'WaitableEvent' declared here
class BASE_EXPORT WaitableEvent {
                  ^
/Users/Artur/ungoogled-chromium/build/sandbox/base/synchronization/waitable_event_posix.cc:46:7: error: member initializer 'kernel_' does not name a non-static data member or base class
    : kernel_(new WaitableEventKernel(reset_policy, initial_state)) {}
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/Artur/ungoogled-chromium/build/sandbox/base/synchronization/waitable_event_posix.cc:51:25: error: use of undeclared identifier 'kernel_'
  base::AutoLock locked(kernel_->lock_);
                        ^
/Users/Artur/ungoogled-chromium/build/sandbox/base/synchronization/waitable_event_posix.cc:52:3: error: use of undeclared identifier 'kernel_'
  kernel_->signaled_ = false;
  ^
/Users/Artur/ungoogled-chromium/build/sandbox/base/synchronization/waitable_event_posix.cc:56:25: error: use of undeclared identifier 'kernel_'
  base::AutoLock locked(kernel_->lock_);
                        ^
/Users/Artur/ungoogled-chromium/build/sandbox/base/synchronization/waitable_event_posix.cc:58:7: error: use of undeclared identifier 'kernel_'
  if (kernel_->signaled_)
      ^
/Users/Artur/ungoogled-chromium/build/sandbox/base/synchronization/waitable_event_posix.cc:61:7: error: use of undeclared identifier 'kernel_'
  if (kernel_->manual_reset_) {
      ^
/Users/Artur/ungoogled-chromium/build/sandbox/base/synchronization/waitable_event_posix.cc:62:5: error: use of undeclared identifier 'SignalAll'; did you mean 'Signal'?
    SignalAll();
    ^~~~~~~~~
    Signal
/Users/Artur/ungoogled-chromium/build/sandbox/base/synchronization/waitable_event_posix.cc:55:21: note: 'Signal' declared here
void WaitableEvent::Signal() {
                    ^
/Users/Artur/ungoogled-chromium/build/sandbox/base/synchronization/waitable_event_posix.cc:63:5: error: use of undeclared identifier 'kernel_'
    kernel_->signaled_ = true;
    ^
/Users/Artur/ungoogled-chromium/build/sandbox/base/synchronization/waitable_event_posix.cc:67:10: error: use of undeclared identifier 'SignalOne'; did you mean 'Signal'?
    if (!SignalOne())
         ^~~~~~~~~
         Signal
/Users/Artur/ungoogled-chromium/build/sandbox/base/synchronization/waitable_event_posix.cc:55:21: note: 'Signal' declared here
void WaitableEvent::Signal() {
                    ^
/Users/Artur/ungoogled-chromium/build/sandbox/base/synchronization/waitable_event_posix.cc:67:9: error: invalid argument type 'void' to unary expression
    if (!SignalOne())
        ^~~~~~~~~~~~
/Users/Artur/ungoogled-chromium/build/sandbox/base/synchronization/waitable_event_posix.cc:68:7: error: use of undeclared identifier 'kernel_'
      kernel_->signaled_ = true;
      ^
/Users/Artur/ungoogled-chromium/build/sandbox/base/synchronization/waitable_event_posix.cc:73:25: error: use of undeclared identifier 'kernel_'
  base::AutoLock locked(kernel_->lock_);
                        ^
/Users/Artur/ungoogled-chromium/build/sandbox/base/synchronization/waitable_event_posix.cc:75:23: error: use of undeclared identifier 'kernel_'
  const bool result = kernel_->signaled_;
                      ^
/Users/Artur/ungoogled-chromium/build/sandbox/base/synchronization/waitable_event_posix.cc:76:18: error: use of undeclared identifier 'kernel_'
  if (result && !kernel_->manual_reset_)
                 ^
/Users/Artur/ungoogled-chromium/build/sandbox/base/synchronization/waitable_event_posix.cc:77:5: error: use of undeclared identifier 'kernel_'
    kernel_->signaled_ = false;
    ^
/Users/Artur/ungoogled-chromium/build/sandbox/base/synchronization/waitable_event_posix.cc:174:3: error: use of undeclared identifier 'kernel_'
  kernel_->lock_.Acquire();
  ^
/Users/Artur/ungoogled-chromium/build/sandbox/base/synchronization/waitable_event_posix.cc:175:7: error: use of undeclared identifier 'kernel_'
  if (kernel_->signaled_) {
      ^
/Users/Artur/ungoogled-chromium/build/sandbox/base/synchronization/waitable_event_posix.cc:176:10: error: use of undeclared identifier 'kernel_'
    if (!kernel_->manual_reset_) {
         ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

I think you need to change this line's path to base/synchronization/waitable_event_mac.cc. The macOS GN bootstrap patch probably needs to be updated.

Okay, I've updated the macos-fix-gn-bootstrap patch. Now I get this error after building base:
ERROR at //chrome/BUILD.gn:591:7: Unknown substitution pattern
      "{{bundle_contents_dir}}/XPCServices/{{source_file_part}}",
      ^---------------------------------------------------------
Found a {{ at offset 0 and did not find a known substitution following it.
See //BUILD.gn:102:7: which caused the file to be included.
      "//chrome",
      ^---------

I'm not sure what's causing the issue. It looks to be a problem with the GN files, but it doesn't make a lot of sense. If anyone has ideas, let us know.

I have another error after changing waitable_event_mac line:
[372/372] c++  -o gn tools/gn/gn_main.o -framework AppKit -framework CoreFoundation -framework Foundation -framework Security libevent.a base.a gn_lib.a dynamic_annotations.a
FAILED: gn
c++  -o gn tools/gn/gn_main.o -framework AppKit -framework CoreFoundation -framework Foundation -framework Security libevent.a base.a gn_lib.a dynamic_annotations.a
Undefined symbols for architecture x86_64:
  "base::DispatchSourceMach::Resume()", referenced from:
      base::WaitableEvent::WaitMany(base::WaitableEvent**, unsigned long) in base.a(waitable_event_mac.o)
  "base::DispatchSourceMach::DispatchSourceMach(dispatch_queue_s*, unsigned int, void () block_pointer)", referenced from:
      base::WaitableEvent::WaitMany(base::WaitableEvent**, unsigned long) in base.a(waitable_event_mac.o)
  "base::DispatchSourceMach::~DispatchSourceMach()", referenced from:
      base::WaitableEvent::WaitMany(base::WaitableEvent**, unsigned long) in base.a(waitable_event_mac.o)
      void std::__1::vector<std::__1::unique_ptr<base::DispatchSourceMach, std::__1::default_delete<base::DispatchSourceMach> >, std::__1::allocator<std::__1::unique_ptr<base::DispatchSourceMach, std::__1::default_delete<base::DispatchSourceMach> > > >::__push_back_slow_path<std::__1::unique_ptr<base::DispatchSourceMach, std::__1::default_delete<base::DispatchSourceMach> > >(std::__1::unique_ptr<base::DispatchSourceMach, std::__1::default_delete<base::DispatchSourceMach> >&&) in base.a(waitable_event_mac.o)
  "base::mac::internal::MacOSXMinorVersion()", referenced from:
      base::WaitableEvent::WaitableEvent(base::WaitableEvent::ResetPolicy, base::WaitableEvent::InitialState) in base.a(waitable_event_mac.o)
      base::WaitableEvent::UseSlowWatchList(base::WaitableEvent::ResetPolicy) in base.a(waitable_event_mac.o)
      base::WaitableEvent::Signal() in base.a(waitable_event_mac.o)
      base::WaitableEvent::WaitMany(base::WaitableEvent**, unsigned long) in base.a(waitable_event_mac.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@tectiv3
Does #297 fix your problem with waitable_event_watcher?
With the bundle_contents_dir, it seems to be a context-dependent variable. The error is strange though, because it should be defined here, since that template is used in this file, which is a dependency here. It's quite possible that I'm misunderstanding the meaning of some keywords like public_deps, and how the namespaces are being modified as a result.

no, it didn't fix it. You still need to add
base/mac/dispatch_source_mach.cc
base/synchronization/waitable_event_watcher_mac.cc```

and

```  "base::mac::internal::MacOSXMinorVersion()", referenced from:
      base::WaitableEvent::WaitableEvent(base::WaitableEvent::ResetPolicy, base::WaitableEvent::InitialState) in base.a(waitable_event_mac.o)
      base::WaitableEvent::UseSlowWatchList(base::WaitableEvent::ResetPolicy) in base.a(waitable_event_mac.o)
      base::WaitableEvent::Signal() in base.a(waitable_event_mac.o)
      base::WaitableEvent::WaitMany(base::WaitableEvent**, unsigned long) in base.a(waitable_event_mac.o)
ld: symbol(s) not found for architecture x86_64

remains

but even after adding them,
      base::WaitableEvent::WaitableEvent(base::WaitableEvent::ResetPolicy, base::WaitableEvent::InitialState) in base.a(waitable_event_mac.o)
      base::WaitableEvent::UseSlowWatchList(base::WaitableEvent::ResetPolicy) in base.a(waitable_event_mac.o)>
      base::WaitableEvent::Signal() in base.a(waitable_event_mac.o)
      base::WaitableEvent::WaitMany(base::WaitableEvent**, unsigned long) in base.a(waitable_event_mac.o)
ld: symbol(s) not found for architecture x86_64```

remains

I assume you mean   "base::mac::internal::MacOSXMinorVersion()" is missing based on what your comment source shows (it's not visible for some reason).
Perhaps you could try adding the files
base/mac/mac_util.h
base/mac/mac_util.mm

to somewhere in this list.

yeah, I did, but it's failing on the next stuff that was nowhere to be found.

Undefined symbols for architecture x86_64:
  "_IOObjectRelease", referenced from:
      base::mac::GetModelIdentifier() in base.a(mac_util.o)
  "_IORegistryEntryCreateCFProperty", referenced from:
      base::mac::GetModelIdentifier() in base.a(mac_util.o)
  "_IOServiceGetMatchingService", referenced from:
      base::mac::GetModelIdentifier() in base.a(mac_util.o)
  "_IOServiceMatching", referenced from:
      base::mac::GetModelIdentifier() in base.a(mac_util.o)
  "base::DispatchSourceMach::Resume()", referenced from:
      base::WaitableEvent::WaitMany(base::WaitableEvent**, unsigned long) in base.a(waitable_event_mac.o)
  "base::DispatchSourceMach::DispatchSourceMach(dispatch_queue_s*, unsigned int, void () block_pointer)", referenced from:
      base::WaitableEvent::WaitMany(base::WaitableEvent**, unsigned long) in base.a(waitable_event_mac.o)
  "base::DispatchSourceMach::~DispatchSourceMach()", referenced from:
      base::WaitableEvent::WaitMany(base::WaitableEvent**, unsigned long) in base.a(waitable_event_mac.o)
      void std::__1::vector<std::__1::unique_ptr<base::DispatchSourceMach, std::__1::default_delete<base::DispatchSourceMach> >, std::__1::allocator<std::__1::unique_ptr<base::DispatchSourceMach, std::__1::default_delete<base::DispatchSourceMach> > > >::__push_back_slow_path<std::__1::unique_ptr<base::DispatchSourceMach, std::__1::default_delete<base::DispatchSourceMach> > >(std::__1::unique_ptr<base::DispatchSourceMach, std::__1::default_delete<base::DispatchSourceMach> >&&) in base.a(waitable_event_mac.o)
  "base::internal::ScopedNSProtocolTraitsRelease(objc_object*)", referenced from:
      base::mac::(anonymous namespace)::GetLoginItemForApp() in base.a(mac_util.o)
  "logging::OSStatusLogMessage::OSStatusLogMessage(char const*, int, int, int)", referenced from:
      base::mac::SetFileBackupExclusion(base::FilePath const&) in base.a(mac_util.o)
  "logging::OSStatusLogMessage::~OSStatusLogMessage()", referenced from:
      base::mac::SetFileBackupExclusion(base::FilePath const&) in base.a(mac_util.o)
  "_kIOMasterPortDefault", referenced from:
      base::mac::GetModelIdentifier() in base.a(mac_util.o)
ld: symbol(s) not found for architecture x86_64

those

@tectiv3
Based on the code around here in base/BUILD.gn and some quick grepping:

Add the following lines to the mac-specific base.sources list:
  'base/mac/scoped_typeref.h',
  'base/time/time_conversion_posix.cc',
  'base/time/time_mac.cc',
  'base/mac/dispatch_source_mach.cc',
  'base/mac/dispatch_source_mach.h',
  'base/mac/scoped_nsobject.mm',
  'base/mac/scoped_nsobject.h',
  'base/mac/mac_logging.mm',
  'base/mac/mac_logging.h',

Remove the following from the POSIX-specific base.sources list:
  'base/threading/platform_thread_internal_posix.cc',

Add the following to the mac libs list:
  '-framework', 'IOKit',

Technically, the following should be added to the if is_posix and not is_mac: section added by the patch, but it doesn't matter too much since this is a mac-specific patch
  'base/threading/platform_thread_internal_posix.cc',
  'base/synchronization/waitable_event_mac.cc',

Also, base/synchronization/waitable_event_posix.cc shouldn't be deleted in the patch

Probably would've been easier to send a patch instead of this...

I did some more investigation, and found out that the master branch version of chromium repo has documentation on bundle_contents_dir right after bundle_root_dir. However, there is no such reference in 62.0.3202.94, not even in the example for bundle_root_dir. I even did a grep for contents_dir, and found nothing in the GN source code for 62.0.3202.94.
Perhaps the version of GN that is included in 62.0.3202.94 is out-of-sync with the rest of the source tree? It wouldn't surprise me that they don't bother to keep it up-to-date, since GN is normally downloaded from Google via depot_tools (as done by gclient by reading DEPS in the root of the source tree; the name of the hook is gn_mac)

@Eloston thank you! I will try that "patch" tomorrow.

@Artur96 @tectiv3 Please clear out your source tree and update to the latest code in develop. I have changed LLVM+Clang from 4.0.0 to 5.0.0, and I'm trying out the GN code from 63 in 62, since I haven't seen a 62 source tree that has a GN implementing bundle_contents_dir. I have a feeling that this may break, but it's probably easier to fix than backport a GN change from 63 to 62.

@Eloston It does break indeed, but a bit further ;)
[365/365] c++  -o gn tools/gn/gn_main.o -framework AppKit -framework CoreFoundation -framework Foundation -framework Security libevent.a base.a gn_lib.a dynamic_annotations.a
FAILED: gn
c++  -o gn tools/gn/gn_main.o -framework AppKit -framework CoreFoundation -framework Foundation -framework Security libevent.a base.a gn_lib.a dynamic_annotations.a
Undefined symbols for architecture x86_64:
  "tracked_objects::ThreadData::InitializeThreadContext(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
      base::PlatformThread::SetName(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in base.a(platform_thread_mac.o)
  "tracked_objects::ThreadData::TallyRunOnNamedThreadIfTracking(base::TrackingInfo const&, tracked_objects::TaskStopwatch const&)", referenced from:
      base::SequencedWorkerPool::Inner::ThreadLoop(base::SequencedWorkerPool::Worker*) in base.a(sequenced_worker_pool.o)
      base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) in base.a(task_annotator.o)
  "tracked_objects::TaskStopwatch::Stop()", referenced from:
      base::SequencedWorkerPool::Inner::ThreadLoop(base::SequencedWorkerPool::Worker*) in base.a(sequenced_worker_pool.o)
      base::RunLoop::Run() in base.a(run_loop.o)
      base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) in base.a(task_annotator.o)
  "tracked_objects::TaskStopwatch::Start()", referenced from:
      base::SequencedWorkerPool::Inner::ThreadLoop(base::SequencedWorkerPool::Worker*) in base.a(sequenced_worker_pool.o)
      base::RunLoop::Run() in base.a(run_loop.o)
      base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) in base.a(task_annotator.o)
  "tracked_objects::TaskStopwatch::TaskStopwatch()", referenced from:
      base::SequencedWorkerPool::Inner::ThreadLoop(base::SequencedWorkerPool::Worker*) in base.a(sequenced_worker_pool.o)
      base::RunLoop::Run() in base.a(run_loop.o)
      base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) in base.a(task_annotator.o)
  "tracked_objects::TaskStopwatch::~TaskStopwatch()", referenced from:
      base::SequencedWorkerPool::Inner::ThreadLoop(base::SequencedWorkerPool::Worker*) in base.a(sequenced_worker_pool.o)
      base::RunLoop::Run() in base.a(run_loop.o)
      base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) in base.a(task_annotator.o)
  "base::TrackingInfo::TrackingInfo(tracked_objects::Location const&, base::TimeTicks)", referenced from:
      base::SequencedWorkerPool::Inner::PostTask(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const*, base::SequencedWorkerPool::SequenceToken, base::SequencedWorkerPool::WorkerShutdown, tracked_objects::Location const&, base::OnceCallback<void ()>, base::TimeDelta) in base.a(sequenced_worker_pool.o)
      base::PendingTask::PendingTask(tracked_objects::Location const&, base::OnceCallback<void ()>) in base.a(pending_task.o)
      base::PendingTask::PendingTask(tracked_objects::Location const&, base::OnceCallback<void ()>, base::TimeTicks, bool) in base.a(pending_task.o)
      base::PendingTask::PendingTask(tracked_objects::Location const&, base::OnceCallback<void ()>) in base.a(pending_task.o)
  "base::TrackingInfo::TrackingInfo()", referenced from:
      base::SequencedWorkerPool::Inner::ThreadLoop(base::SequencedWorkerPool::Worker*) in base.a(sequenced_worker_pool.o)
  "base::TrackingInfo::~TrackingInfo()", referenced from:
      base::SequencedWorkerPool::Inner::ThreadLoop(base::SequencedWorkerPool::Worker*) in base.a(sequenced_worker_pool.o)
      base::SequencedWorkerPool::Inner::PostTask(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const*, base::SequencedWorkerPool::SequenceToken, base::SequencedWorkerPool::WorkerShutdown, tracked_objects::Location const&, base::OnceCallback<void ()>, base::TimeDelta) in base.a(sequenced_worker_pool.o)
      std::__1::__tree<base::(anonymous namespace)::SequencedTask, base::(anonymous namespace)::SequencedTaskLessThan, std::__1::allocator<base::(anonymous namespace)::SequencedTask> >::destroy(std::__1::__tree_node<base::(anonymous namespace)::SequencedTask, void*>*) in base.a(sequenced_worker_pool.o)
      base::PendingTask::~PendingTask() in base.a(pending_task.o)
      base::PendingTask::~PendingTask() in base.a(pending_task.o)
  "base::subtle::ReadWriteLock::ReadAcquire()", referenced from:
      base::internal::IncomingTaskQueue::PostPendingTask(base::PendingTask*) in base.a(incoming_task_queue.o)
  "base::subtle::ReadWriteLock::ReadRelease()", referenced from:
      base::internal::IncomingTaskQueue::PostPendingTask(base::PendingTask*) in base.a(incoming_task_queue.o)
  "base::subtle::ReadWriteLock::WriteAcquire()", referenced from:
      base::internal::IncomingTaskQueue::WillDestroyCurrentMessageLoop() in base.a(incoming_task_queue.o)
  "base::subtle::ReadWriteLock::WriteRelease()", referenced from:
      base::internal::IncomingTaskQueue::WillDestroyCurrentMessageLoop() in base.a(incoming_task_queue.o)
  "base::subtle::ReadWriteLock::ReadWriteLock()", referenced from:
      base::internal::IncomingTaskQueue::IncomingTaskQueue(base::MessageLoop*) in base.a(incoming_task_queue.o)
      base::internal::IncomingTaskQueue::IncomingTaskQueue(base::MessageLoop*) in base.a(incoming_task_queue.o)
  "base::subtle::ReadWriteLock::~ReadWriteLock()", referenced from:
      base::internal::IncomingTaskQueue::~IncomingTaskQueue() in base.a(incoming_task_queue.o)
  "tracked_objects::TaskStopwatch::StartTime() const", referenced from:
      base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) in base.a(task_annotator.o)

Here is the patch to make it work:
--- ~/ungoogled-chromium/build/sandbox/tools/gn/bootstrap/bootstrap.py.orig	2017-12-01 12:30:14.000000000 +0900
+++ ~/ungoogled-chromium/build/sandbox/tools/gn/bootstrap/bootstrap.py	2017-12-01 12:26:54.000000000 +0900
@@ -707,10 +707,18 @@
         'base/process/process_iterator_mac.cc',
         'base/process/process_metrics_mac.cc',
         'base/strings/sys_string_conversions_mac.mm',
+        'base/threading/worker_pool_posix.cc',
+        'base/synchronization/read_write_lock_posix.cc',
         'base/synchronization/waitable_event_mac.cc',
         'base/sys_info_mac.mm',
         'base/time/time_mac.cc',
         'base/threading/platform_thread_mac.mm',
+        'base/mac/dispatch_source_mach.cc',
+        'base/tracking_info.cc',
+        'base/tracked_objects.cc',
+        'base/mac/mac_util.mm',
+        'base/mac/scoped_nsobject.mm',
+        'base/mac/mac_logging.mm',
     ])
     static_libraries['libevent']['include_dirs'].extend([
         os.path.join(SRC_ROOT, 'base', 'third_party', 'libevent', 'mac')
@@ -724,6 +732,7 @@
         '-framework', 'CoreFoundation',
         '-framework', 'Foundation',
         '-framework', 'Security',
+        '-framework', 'IOKit',
     ])

   if is_win:

Thank you @Eloston !!

[10075/24633] LIBTOOL-STATIC obj/chrome/browser/safe_browsing/libsafe_browsing.a
FAILED: obj/chrome/browser/safe_browsing/libsafe_browsing.a
rm -f obj/chrome/browser/safe_browsing/libsafe_browsing.a && TOOL_VERSION=1510603750 python ../../build/toolchain/mac/filter_libtool.py libtool -static  -o obj/chrome/browser/safe_browsing/libsafe_browsing.a
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: no files specified
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-sacLT] [-no_warning_for_no_symbols]
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -dynamic [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] [-compatibility_version #] [-current_version #] [-seg1addr 0x#] [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table <filename>] [-seg_addr_table_filename <file_system_path>] [-all_load] [-noall_load]

Or should I open another issue? Since this is another problem.

Included https://github.com/Eloston/ungoogled-chromium/issues/291#issuecomment-348392101 in 82ac9ac55257b5fe6462f7fea777ceac98ba95d3


Examples suggest wrong time complexity

Selection Sort, for example, makes the algorithm look extremely (impossibly) good at first glance - O(n) - because it's not showing the majority of the steps.
Instead of
    for (var j = i + 1; j < D.length; j++) {
        if (D[j] < D[minJ]) {
            tracer._select(j);
            minJ = j;
            tracer._deselect(j);
        }
    }

it has to be more like
    for (var j = i + 1; j < D.length; j++) {
        tracer._select(j);
        if (D[j] < D[minJ]) {
            minJ = j;
        }
        tracer._deselect(j);
    }

Bubble Sort has the same problem, as do Quicksort and Mergesort.
Normally I wouldn't mind, as showing time complexity is probably not the scope of these examples or your visualization, but the examples suggest that this is intended for beginners, and it might give them a false sense of the time complexity of these basic algorithms.
By the way, I really like the visualization, I think it could be quite helpful to aid teaching about algorithms.

@wnesensohn That makes sense!
@TornjV Thanks a lot for concerning this issue, but the pull request is reverted. (#32)
_notify method should only be used for the changed values, so that I think we should wrap up if statement with _select/_deselect and call _notify only in the if statement.
I hope you understand me.

#93

Frankly, I'm not sure regarding time complexity is effective for our project. It makes harder to understand the fundamental concept of the algorithm.

I'm not here to tell you what your project should or should not be, but
consider this: Is it helpful for understanding Selection Sort by hiding the
one step which defines this algorithm? Right now it visualizes like an
oracle selection sort, where it automatically picks always the right value.
Of course you and I know that there is no oracle, and that it has to
iterate over every unsorted element. I doubt that a novice will always get
this, though.
On May 28, 2016 05:02, "Jason Park"<EMAIL_ADDRESS>wrote:
Frankly, I'm not sure regarding time complexity is effective for our
project. It makes harder to understand the fundamental concept of the
algorithm.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/parkjs814/AlgorithmVisualizer/issues/28#issuecomment-222286680,
or mute the thread
https://github.com/notifications/unsubscribe/ABdHaqKFfZKHX8JUvvtyvpz_-24zGfQZks5qF7BQgaJpZM4IkwPJ
.

I totally agree with you for the case of Insertion Sort.
However, in regard to time complexity, _wait() method should be called exactly once in one iteration (for statement or recursive function).
Here is one of examples why that can be harder for learners to understand.
For the Binary Search algorithm, it currently calls _wait() methods twice — once after selecting range and once after selecting the middle index. If you remove _wait() method after selecting range, it may confuse learners to notice what each of steps is doing.

(called twice) http://jasonpark.me/AlgorithmVisualizer/#scratch-paper=d2c4ad43f01813846b8d77fdde12bb7f
(called once) http://jasonpark.me/AlgorithmVisualizer/#scratch-paper=d388613417375dbb9a85a2ed2ad961ef

It would be awesome if we can explain the concept of the algorithm as well as time complexity of it.
I have gone through all the algorithms and thought that it could be worthy enough to reduce some.
Since it is kind of big deal, I want to reopen this issue and gather more opinions from others.
Thanks.


Get redirect loop when pass custom form request class into action

Hello, I try to display and handle my form using single action, so I allow GET and POST verbs to this action, and then pass custom request to the action, like public function add(PostFormRequest $request), and I get redirect loop. When I remove PostFormRequest  from arguments all work fine, but not work validation, or when I remove GET verb I get MethodNotAllowedHttpException. So the question is how I can handle this? I need to create two separate actions for display and handling, or try to use Validator class?

can you share your current code ? maybe its easier and we can help =)

This is not the place for such questions or to get support for your problems. Github Issues are for Bug reports and feature requests. Please ask on the forum or on other pages like StackOverflow.

@lukasgeiter,  here question on StackOverflow, there is no answer. And in my humble opinion, if I cant handle and render form using single action, usign custom FormRequest, it something wrong goes inside framework. But if using two actions for display and handle form (here  on StackOverflow) is Laravel way I have nothing against... but it need to be better discribed in the docs.


Deleted directories do not update in the repository

Hi there,
I found out that when I do 'drive push' of my sync directory, those directories which I deleted from the local repository are not deleted in the cloud.
Why is that?
Thanks

Hello again @GonzaloSP,
A reproducible example would be great, also some information on your drive version and build, thanks.

Ping. I cannot reproduce this as I primarily do deletions locally or remotely in order to create deletions on the opposite side.

Works as intended, closing for lack of feedback.


[Marketplace]: Add opportunity to remove specific version of model from My application

EPAM AI DIAL chat version
0.18.0
How to reproduce
Steps:

add to My application several versions of one model, e.g. GPT-4 Turbo
go to My applications
hover GPT-4 Turbo tab and select Remove
click on GPT-4 Turbo tab

Actual result

Latest version of model was removed from My applications
no remove option

Expected result
Need to add Remove button on modal window of Model/Assistant/App
Remove button will remove only selected version
Design to be added
Confidential information

[X] I confirm that do not share any confidential information

Desktop:

add remove button to the bottom panel

https://www.figma.com/design/lwL5jneveZczAj5RLcLFH2/DIAL-Chat?node-id=11631-36996&t=R2CeoGAKVcWSDnzb-1
Tablet: the same as for desktop
Mobile:

hide buttons in drop down if there is more than one
show "v." for version

https://www.figma.com/design/lwL5jneveZczAj5RLcLFH2/DIAL-Chat?node-id=11630-59508&t=R2CeoGAKVcWSDnzb-1
Also let's show "Share" list in a separate modal window for mobile

https://www.figma.com/design/lwL5jneveZczAj5RLcLFH2/DIAL-Chat?node-id=12363-73084&t=R2CeoGAKVcWSDnzb-1

NOTE: check icons' tooltips on app' modal form

Verified on staging
related issue #2287, #2290


Potential deadlock due to calling callbacks while holding a lock

See golang mutexes aren't recursive / re-entrant
Bus.Publish(...) method locks mutex and calls callbacks under lock, so any access to the bus in callback will cause deadlock.
The following example reproduces issue:
package main

import (
	"fmt"

	"github.com/asaskevich/EventBus"
)

var bus EventBus.Bus

func showbug(a int, b int) {
	fmt.Printf("%d\n", a+b)

	if a == 20 {
		bus.Publish("main:calculator", a+1, b)
	}
}

func main() {
	bus = EventBus.New()
	bus.Subscribe("main:calculator", showbug)
	bus.Publish("main:calculator", 20, 40)
	bus.Unsubscribe("main:calculator", showbug)
}

We use another implementation of eventbus (inspired by yours) where this issue was fixed: github.com/ispringteam/goeventbus (see copySubscriptions method and nextID field)
Feel free to adapt our solution or introduce another one ;)

Thanks for this, i've been struggling with this lib for real time updates with gRPC streaming and faced many bugs related to unsubscribe. Moving to your implementation seems to fix the problem


Listing blog posts in a separated 'Blog' page

Hi,
First I'd like to thank you for your Jekyll theme, I'm using it on my personal website www.educoelho.com and it works great! Now I'd like to create some blog posts but haven't found out how to show it in a separated 'Blog' page.
I took a look at your sample code and realized that the template works fine when showing the blog posts in the 'index.html' (the website main page). However I'd like to have the index.html showing my personal information and show the blog posts in a 'Blog' page instead (just like the 'Curriculum' or 'Past' in my website).
The steps I've done so far are as follows:

Added Blog to the _includes/navigation.html
Created a sample blog post in _posts/2015-05-21-first-blog-post.md with the following content:

---
layout:     post
title:      My first blog post
date:       2015-05-21 15:20:00
summary:    This is an empty post to illustrate the pagination component with Pixyll.
categories: blog post bash
---

This is my first blog post with jekyll.

Then, when I rebuild the website I got the following warning message: "Pagination: Pagination is enabled, but I couldn't find an index.html page to use as the pagination template. Skipping pagination."
Could you give me some guidance on that?
Thanks.

@eduardocoelho
You may want to add the following parameter to _config.yml: paginate_path: "blog/page:num"
Also, make sure to adapt _includes/pagination.html accordingly :)

Thanks @dwlfrth, that works now.
Here are the steps I did:

Thanks @dwlfrth, that works now.
I Managed to work by doing the following:

Thanks @dwlfrth, that works now.
I did the following steps:

Added paginate_path: "blog/page:num" to _config.yml
Replaced occurrences of {{ site.baseurl }}/ by {{ site.baseurl }}/blog/ in _includes/pagination.html
Created a folder /blog/ in the site root and moved the sample index.html onto blog/index.html.

@eduardocoelho
Faced the exact same "issue" a month ago while migrating my stuff to Pixyll ;)
Pleasure!

Thanks @eduardocoelho and @dwlfrth for getting to the bottom of this and documenting your approach to implementing this. I'm sure it will be very useful for others in the future. Thanks! :beers:


Method to count the number of terms within a rule stage

Hi I am trying to build a term that returns true if the number of results is above a specific number:
let success = Term.rule("success") {
.fact("action", "s93663", .var("date"), .var("number1"), .var("number2"))
&&  List.count(list: (List.from(elements: .var("date")) , count: .var("count"))
&&  Nat.greaterOrEqual(  .var("count") , Nat.from(3))
}
I want to be able to count the instances of "date" in my set.
I know that it would be possible to count the items in the answerset in swift but I want to reuse the rule in other rules and I would like to be able to solve with LogicKit only.

I'm afraid you can't do this with LogicKit only. One design principle is precisely to avoid implementing Prolog's meta-operators within the logic language.
Is there any specific reason why you don't want to count the number of results outside of LogicKit?

Thanks, is there a way to get this info with a comparison in a “native” type of term?
Could you give an example of a similar syntax of native terms?
I want to use the number of results to feed them to another rule, that gives dynamically updated results.

On 13 Apr 2021, at 3:40 PM, Dimitri Racordon @.***> wrote:
I'm afraid you can't do this with LogicKit only. One design principle is precisely to avoid implementing Prolog's meta-operators within the logic language.
Is there any specific reason why you don't want to count the number of results outside of LogicKit?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/kyouko-taiga/LogicKit/issues/17#issuecomment-818703386, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHNINGIPQP42ONPZYNLCSATTIQ3ULANCNFSM42ZG3GAA.

If you take the introductory example from the readme, you can count the number of results by enumerating the answer set. This will give you a Swift.Int value that you can feed back in a dynamically generated knowledge base:
// ...
var answers = staticKB.ask(.fact("is stronger", .var("a"), .var("b")))
let count = Array(answers).count
let dynamicKB: KnowledgeBase = staticKB + [
  .fact("someNewFact", Nat.from(count)),
]

dynamicKB  will contain all the facts and rules from staticKB, plus a new fact generated dynamically from the result of a request.
Note that this won't work if LogicKit is unable to enumerate all results. So you need to make sure it is able to compute the exhaustive set of answers to a specific request.

Thanks.
Could this be done with the experimental native type if term?
Panagiotis Mavridis
69 Ermou str
Thessaloniki 54623
Greece
Email: @.***
Phone: +30 2310 282929
Mobile: +30 6944 690298

CONFIDENTIALITY NOTICE - The information enclosed with this transmission are the private, confidential property of the sender, and the material is privileged communication intended solely for the individual indicated. If you are not the intended recipient, you are notified that any review, disclosure, copying, distribution, or the taking of any other action relevant to the contents of this transmission are strictly prohibited. If you have received this transmission in error, please notify us immediately at the telephone provided above

On 13 Apr 2021, at 4:51 PM, Dimitri Racordon @.***> wrote:

If you take the introductory example from the readme, you can count the number of results by enumerating the answer set. This will give you a Swift.Int value that you can feed back in a dynamically generated knowledge base:
// ...
var answers = staticKB.ask(.fact("is stronger", .var("a"), .var("b")))
let count = Array(answers).count
let dynamicKB: KnowledgeBase = staticKB + [
.fact("someNewFact", Nat.from(count)),
]
dynamicKB will contain all the facts and rules from staticKB, plus a new fact generated dynamically from the result of a request.
Note that this won't work if LogicKit is unable to enumerate all results. So you need to make sure it is able to compute the exhaustive set of answers to a specific request.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Well, you can capture count in the closure of a native predicate. But that will be more complex and less efficient than creating a regular predicate.
// ...
let count = Array(answers).count
let dynamicKB: KnowledgeBase = staticKB + [
  .native({ t in t["x"]! == Nat.from(count) })
]

Native predicates are designed to handle cases where you can't get away with term equality (e.g., because you want to use Swift's subtyping).

Thanks. Still, there is need for a clause outside of LogicKit.
I would like to be able to capture the count without having to actually ask for an answer.
To help you understand the purpose of my application:
There is a database in place which is accessed and a set of facts are added to a Knowledgebase from the contents of the database.
In addition I am describing a set of rules that combine the facts to present some results.
I want to be able to design the ruleset without having to resort to swift code, otherwise I could do it with a set of if/then/else and case clauses.
I need the logic programming to be a separate independent part of my app.

On 13 Apr 2021, at 5:32 PM, Dimitri Racordon @.***> wrote:
Well, you can capture count in the closure of a native predicate. But that will be more complex and less efficient than creating a regular predicate.
// ...
let count = Array(answers).count
let dynamicKB: KnowledgeBase = staticKB + [
.native({ t in t["x"]! == Nat.from(count) })
]
Native predicates are designed to handle cases where you can't get away with term equality (e.g., because you want to use Swift's subtyping).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/kyouko-taiga/LogicKit/issues/17#issuecomment-818784261, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHNINGJJUWJN6PJON5AWYYTTIRIX7ANCNFSM42ZG3GAA.

Unless requests are issued dynamically to your knowledge base (and even then you could probably create new KBs dynamically in the request handler), there is no reason why you can't emit Swift code in response of what goes into your knowledge base.

Thank you very much.
Are there any plans to update/evolve LogicKit?

On 13 Apr 2021, at 6:00 PM, Dimitri Racordon @.***> wrote:
Unless requests are issued dynamically to your knowledge base (and even then you could probably create new KBs dynamically in the request handler), there is no reason why you can't emit Swift code in response of what goes into your knowledge base.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/kyouko-taiga/LogicKit/issues/17#issuecomment-818805477, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHNINGI77OPQL25BWJSASZDTIRMAVANCNFSM42ZG3GAA.

I haven't planned any significant update at the moment, but I am open to extend LogicKit with new features.
And of course, I plan to maintain the library to fix bug or migrate to new versions of Swift.

keep up the good work


Feature selection of normalized jump pilot

In this pr, the normalized profiles from the jump pilot are feature selected. This code takes a long time to run, so I want a review to catch any bugs or make any improvements before the fact. Then I plan on rerunning, and receiving another review before merging. Please let me know if you have any suggestions.

Thanks for reviewing @jenna-tomkinson! Could you re-review before I preprocess the data again?

Merging now!


Remove hardcoded cluster choice limit

Changes proposed in this pull request:

remove the hard coded cluster choice limit to user configurable value

Add number type check and also if the value is a positive value. I will submit a separate PR with doc updates

Doc code change : https://github.com/OpenRefine/openrefine.org/pull/221


Update the TypeScript version to 1.7.5

Hello.
Can you update the TypeScript version to 1.7.5, that was released recently?
The WebJars repo of typescript-node has been updated also.
Thank you.

I merged your changed and released the plugin as 0.1.10.

Thank you!


[AprilHorizon] Created LoggingAdvice class

 Implement Basic Tracking Layer

Thanks. Looks great to me! Congrats on our first pull request 🎉


cabana: Hack for WSL2 QDockWidget floating bug

This is a bug fix/workaround for an undocumented QT bug when using QDockWidget where floating widgets do not respond to mouse QEvents.
https://github.com/commaai/openpilot/discussions/26091#discussioncomment-5563395
Note that this will remove the undock button but still allows the user to drag the QDockWidget title bar to undock. Once the widget is floating the dock button is shown. This is done because pressing the floatButton will lead to the behavior of the widget not responding to any QEvents.

It's not good if the undock button disappears by default.
I suggest to use a conditional inclusion, only do this in wsl2 environment.

It's not good if the undock button disappears by default.
I suggest to use a conditional inclusion, only do this in wsl2 environment.

Kk no problem.

If this issue only occurs after restarting cabana, the problem may be restoring state before showing the main window. would a delayed call to restoreState(settings.window_state); fix it? : QTimer::singleShot(0, this{restoreState(settings.window_state);});

If this issue only occurs after restarting cabana, the real problem might be restoring state before showing the main window. would a delayed call to restoreState(settings.window_state) fix it ? : QTimer::singleShot(0, [this](){restoreState(settings.window_state);});

No, what I meant is that if I undock the widget, the widget is permanently broken even after restarting Cabana. The only way to get the widget to re-dock is to delete the settings file.


[Bug]: Amd64 architecture build released for arm64 image

zot version
latest docker image ("Id": "sha256:0880b2e3364c5a8dd6316862387bb17de090c3edc67f28980c58e3f19438f77b")
Describe the bug
Description
I was trying to execute the docker image on M1 Mac. I observed the zot-linux-arm64 application is packaged with amd64 docker image.
Fix
Rebuild the code from source & package the application with the correct architecture
Reproducible POC
docker run -p 5001:5000 ghcr.io/project-zot/zot-linux-arm64:latest

Alternatively, docker inspect ghcr.io/project-zot/zot-linux-arm64:latest also confirms the bug.

@rewanthtammana Thanks for filing this issue. We will root-cause and fix this asap.

Also curious, which platform are you deploying this on? considering OS=linux and ARCH=arm64

Apple Silicon M1

@rewanthtammana, this is the more appropriate image then? But it will likely have the same issue that we are defaulting some params to amd64
https://github.com/project-zot/zot/pkgs/container/zot-darwin-arm64

@rewanthtammana, can you pls your test now?
docker run -p 5001:5000 ghcr.io/project-zot/zot-linux-arm64:latest <- linux/arm64
docker run -p 5001:5000 ghcr.io/project-zot/zot-darwin-arm64:latest <- darwin/arm64

@rchincha There are no errors when I execute the docker commands but when I try to access the webpage, I get 404 errors. Is it expected?
docker run -p 5001:5000 ghcr.io/project-zot/zot-linux-arm64:latest
curl localhost:5001

Yes, that is the not the registry endpoint. I suggest reading up on:
https://github.com/opencontainers/distribution-spec/blob/main/spec.md
https://github.com/project-zot/zot#skopeo
If you are looking for a UI, it is coming in the next release, but a beta version is hosted at https://zothub.io

Awesome, thanks @rchincha


refactor redirects, routing, signin and signout

Issue #: /bcgov/entity#3258
Description of changes:

added Dashboard URL to config
updated Businesses URL in config
redirect to dashboard on invalid NR error
redirect to dashboard on account auth error
don't render 'main' element during errors
refactored initial fetch to work with signin
deleted obsolete assets and components
redirect to dashboard on cancel
refactored Actions for error handling and consistent code
return to dashboard after file & pay
moved Keycloak init inside LD block
redirect to Business Registy home page on startup error
ensured Filing ID is a number
refactored LegalApiMixin for error handling and consistent code
refactored and fixed routing, signin and signout
cleaned up config helper
fixed unit tests, including added missing axios stubs
misc other cleanup
misc small fixes (see additional commits)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the bcrs-entities-create-ui license (Apache 2.0).

One thing I noticed probably a separate issue is when I go to 'Review and Confirm' and do a browser refresh the 'Incorporation' fee doubles up (2 entries).

I'll have a look. Don't merge yet in case it's an easy fix :)

One thing I noticed probably a separate issue is when I go to 'Review and Confirm' and do a browser refresh the 'Incorporation' fee doubles up (2 entries).

I'll have a look. Don't merge yet in case it's an easy fix :)

OK, I fixed this. It was due to a redirect when the Review and Confirm page was created. The data is now set asynchronously in App.vue so this redirect was incorrect and obsolete. Due to timing, fetchData() was called a second time before it completed the first time, and thus initialized the Fee Summary twice. It's only called once now!

One thing I noticed probably a separate issue is when I go to 'Review and Confirm' and do a browser refresh the 'Incorporation' fee doubles up (2 entries).

I'll have a look. Don't merge yet in case it's an easy fix :)

OK, I fixed this. It was due to a redirect when the Review and Confirm page was created. The data is now fetched asynchronously in App.vue so this redirect was incorrect and obsolete. Due to timing, fetchData() was called a second time before it completed the first time, and thus initialized the Fee Summary twice. It's only called once now!

Looks good! thanks!


Cannot read property 'findIndex' of null

I run the latest docker image of filemanager
What are you trying to do?
Upload new file to filemanager, any kind of file, currently I test .md .txt .jpg .pdf, have the same result.
What did you expect to see?
I can upload any files.
What did you see instead (give full error messages and/or log)?
Nothing happen, I check Chrome console log and see this.
    at o.checkConflict (app.633cd4387611b3c6a7fd.js:7487)
    at o.n [as checkConflict] (vue.esm.js:181)
    at o.uploadInput (app.633cd4387611b3c6a7fd.js:7512)
    at o.n [as uploadInput] (vue.esm.js:182)
    at change (Listing.vue?6505:17)
    at HTMLInputElement.t (vue.esm.js:1814)

https://github.com/hacdias/filemanager/blob/dc7f389fdebf6af17e90675e3220d56e02ad68dc/assets/src/components/files/Listing.vue#L277

Which method are you using to upload? Using drag'n'drop or the upload button?

I used both drag'n'drop and upload button. This issue happen when the folder is empty only, I create a empty file and it works.

Oh, thanks. Gonna fix it.

The Docker image will build now and the fix will be available in some minutes.


[Early development] Introduce VGridBlock

Next, optimizations

@muukii This looks good! By the name VGridBlock, I assume we will get a horizontal HGridBlock in the future?

It's a bit confusing that both columns and rows use the word spacing:. What if we specify them using hSpacing: and vSpacing? (Though I understand it's different from SwiftUI's thinking)

@JohnEstropia yes, I thought too, it's a bit confusing. I just aligned with SwiftUI's LazyVGrid.init.

@muukii This looks good! By the name VGridBlock, I assume we will get a horizontal HGridBlock in the future?

Yes, I got knowledge of laying out grids.  I could create HGridLayout when we need it.

TextureSwiftSupport has the same layout
https://github.com/TextureCommunity/TextureSwiftSupport/blob/d488cc79a0ad9c260b3d4f53b69d4a9e9425e297/TextureSwiftSupport/SpecBuilder/VGridLayout.swift


Adding Mexico Senators

This PR is related to the issue https://github.com/opensanctions/crawler-planning/issues/19

Thank you!


Build with maven

Is this project distributed under any particular license? What would I need to do if I decide I would like to use this code in a project?

You're right, the license was missing. So I decided to make the code available under the MIT license now.
LICENSE file has been added.

Okay, I'll submit a new pull request. I deleted this one because I realized I used the wrong email address in my commits. I'll create a new one soon enough.


Fail to install

Many linux systems require pip3 install not pip install

You could report this upstream with these linux systems ;)
But in earnest, I updated the README, does this solve your problem?

Thank you

Thanks for reporting!


Can't copy "auto generated config yaml"

When I use the Option "Print auto generated config yaml" the code is shown, but i can not mark it fast enough, because sankey is relaoding (js?) to fast and the marked code is unmarked.
Is there a other way to get the code?

Change the throttle value?

Nope, don't work =(

got it via the source code, but i don't think that should be the way...

got it via the source code, but i don't think that should be the way...

You're right. I just keep forgetting to fix that. So let's keep this issue open


KE-11534 Upgrade Janino to 3.1.6 for Calcite 1.30

What changes were proposed in this pull request?

Why are the changes needed?

Does this PR introduce any user-facing change?

How was this patch tested?

Can one of the admins verify this patch?


Add omega dense enumeration as option to POSITDocker

Fixes #589 #541

Codecov Report

Merging #631 (72f59ad) into main (96c970f) will increase coverage by 2.03%.
The diff coverage is n/a.

Additional details and impacted files

@apayne97 should be simple enough.

@apayne97 thanks for the suggestions! Should be ready for another round of reviews.


Dimension $\xi$ breaks HoloMap

Calling a dimension of a HoloMap or DynamicMap $\xi$ fails with a javascript error
SyntaxError: malformed hexadecimal character escape sequence
As far as I can tell, this is a question of insufficient escaping. Holoviews produces code like
    widget_ids[0] = "_anim_widget0f74e25011d543c28d2ea4d20346da74_$\xi$";`

which obviously isn't good JS.

Thanks @tjol, the dimension names should be getting escaped, not sure why that isn't happening. Is this using current master?

I think this is related to PR #476 for processing escape codes. Looks like \x should be in the list...
@tjol I think the solution is to use a raw string r'\xi' as \x is always going to cause trouble in regular strings...

We were already escaping dimensions passed to Javascript in some cases but it seems I overlooked this when implementing that. I've added the fix to #575 and closed #574.

@jlstevens this is a javascript error, not a python one. Of course I'm already using a raw string.
@philippjfr yes, this is with the current master. It also happens with version 1.4.3 from PyPI.

This has been fixed in #575 so I'll close. Please reopen if you encounter any issues.

Thanks for fixing!


different cpu time usage on different machine?

When I refer to the eos code, I have a question: in cpu limit, cpu usage just base on system clock, so a transaction run on different machine, will consume different cpu time, so maybe a tansaction will be pushed to block on a faster cpu machine, but can't be pushed to block on a slower cpu machine because of time usage exceed. So how to resolve this problem in eos?
thank you

This is by design. since eos use subjective billing instead of objective billing.

Guess this ticket is already answered by #4572. I'm closing this issue

Thank you


debug add more log in scanner ctx to find timeout problem

Proposed changes
Issue Number: close #xxx

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall


GeoModelAdmin map widgets not showing

What version of Unfold are you using?
0.39.0
What version of Django are you using?
5.1.1
What browser are you using?
Firefox 130.0.1, Chrome 129.0
Did you checked changelog/commit history, if the bug is not already fixed?
Yes
Did you searched other issues, if the bug is not already fixed?
Yes
Did you checked documentation?
Yes
Are you able to replicate the bug in the demo site?
No, it does not use geographic data.
Describe your issue
My Django project uses the django.contrib.gis module, since it handles Models with geographic features. Unfortunately, ModelAdmins corresponding to these Models do not display the OSM widget (django.contrib.gis.forms.widgets:OSMWidget):

The map should appear between the "Location" label and the "Delete all features" link. The reason for this is its HTML container having 0 width and height, as stated by the console log message:

By manually adjusting CSS, the map is shown:

Thanks for report. As I don't have a lot of experience with this widget, would you mind to draft a PR?


[ENHANCEMENT] Docker support

Is your feature request related to a problem? Please describe.
I'm wanting to run this in a container using Docker. The problem is I do not know how to build from source. I've google'd my way through and couldn't find anything consistent.
Describe the solution you'd like
I'd love to see a sample Dockerfile that would allow me to run something like this locally.
Describe alternatives you've considered
I've run this locally with the npm commands shown in the readme successfully.
League ID
731604692018262016
Additional context
Add any other context or screenshots about the feature request here.

I haven't Docker-ized it myself, but this loos like a decent guide: https://blog.alexanderwolf.tech/how-to-dockerize-your-sveltekit-app/
I'm using the Vercel adapter for ease of deployment (especially for inexperienced developers), but I'd imagine you'd want to change to adapter-node instead (if your goal is to deploy this independently). Here's some info on svelte kit adapters: https://kit.svelte.dev/docs#adapters

@jwmoss Did the above help?

@jwmoss Did the above help?

It did not. I tried a handful of different variations, but couldn't figure it out.


Make errors more informative

Right now most of the errors are like "Error parsing arguments. Check command line." or "Error parsing file" and user has no idea what argument was the cause or what file was not parsed correctly.

I tried simply rethrowing exception instead of returning critical error code and it's MUCH more informative!

vs
Parsing bitmap to byte array

Unhandled Exception: Pixie.PixelProcessingException: Problem detected while processing pixel at 13,17 ---> Pixie.PixelProcessingException: Can't find corresponding bits to pixel color #FF0000. Check your config
   at Pixie.PixelMapper.ProcessPixel(Color color, Int32 bitsPerPixel, BitArray outputArray, Int32& outputArrayPosition) in H:\GitLocalRepos\PixelPixie\Pixie\PixelMapper.cs:line 117
   at Pixie.PixelMapper.ProcessSymbol(Int32 symbolXStart, Int32 symbolXEnd, Int32 symbolYStart, Int32 symbolYEnd) in H:\GitLocalRepos\PixelPixie\Pixie\PixelMapper.cs:line 96
   --- End of inner exception stack trace ---
   at Pixie.PixelMapper.ProcessSymbol(Int32 symbolXStart, Int32 symbolXEnd, Int32 symbolYStart, Int32 symbolYEnd) in H:\GitLocalRepos\PixelPixie\Pixie\PixelMapper.cs:line 100
   at Pixie.PixelMapper.MapPixels(Boolean skipHeaders) in H:\GitLocalRepos\PixelPixie\Pixie\PixelMapper.cs:line 63
   at Pixie.Program.ParseFontImage(ParseOptions options) in H:\GitLocalRepos\PixelPixie\Pixie\Program.cs:line 91
   at Pixie.Program.Main(String[] args) in H:\GitLocalRepos\PixelPixie\Pixie\Program.cs:line 22

Even a human-readable error message is already there.

Probably should add verbosity key or smth like that to control such behavior

Well, it's certainly beta then just "critical error"; I guess just printing exception message would be a more "correct" way to do it but that will require more severe changes.

Oops, wrong account :D
Well, it's certainly beta then just "critical error"; I guess just printing exception message would be a more "correct" way to do it but that will require more severe changes.


[BUG] ...

Describe the bug
Step 2 "Exercise the B2C Commerce Unit Tests
Execute the B2C Commerce unit-tests to verify that the B2C Commerce cartridge and OCAPI Hook code is trustworthy." fails with below error
To Reproduce
Execute npm run crm-sync:test:b2c
Screenshots

Your local environment details:

Node version (node -v): v18.2.0
NPM version (npm -v): 8.9.0
SFDX version (sfdx -v): sfdx-cli/7.152.0 win32-x86 node-v16.15.0

Your remote environment details:

Salesforce B2C Commerce version: [e.g. 21.10]
Salesforce Core version: [e.g. 52]

Additional context
After step 1 executes, step 2 gives some test class failures, and step 3 gives below error.

we are facing this exact same issue, although we are on the following versions -
Node version (node -v): v15.2.1
NPM version (npm -v): 7.0.8
SFDX version (sfdx -v): sfdx-cli/7.150.0 darwin-x64 node-v16.13.1

Hello,
(Please NEVER post credentials, either in text or screenshots)
Just tested on the latest version of the framework: v3.0.2. All working fine as you can see:
jbachelet@jbachel-ltmkcll ~/D/G/S/b2c-crm-sync (develop)> npm -v
8.1.2
jbachelet@jbachel-ltmkcll ~/D/G/S/b2c-crm-sync (develop)> node -v
v16.13.1
jbachelet@jbachel-ltmkcll ~/D/G/S/b2c-crm-sync (develop)> sfdx -v
 ›   Warning: sfdx-cli update available from 7.162.0 to 7.194.1.
sfdx-cli/7.162.0 darwin-x64 node-v16.16.0
jbachelet@jbachel-ltmkcll ~/D/G/S/b2c-crm-sync (develop)> npm run crm-sync:test:b2c

><EMAIL_ADDRESS>crm-sync:test:b2c
> mocha "test/b2c/**/*.test.js"

  int_b2ccrmsync/cartridge/scripts/b2ccrmsync/hooks/customer.process
    loggedIn
      ✓ should not do anything in case no profile is sent as parameter
      ✓ should not do anything in case the B2C CRM Sync site preference is disabled
      ✓ should not do anything in case the loggedIn-specific site preference is disabled
      ✓ should not do anything in case the profile has already been synched
      ✓ should fail to update the profile if no auth token is found, or an error occur, even if sync is enabled when the profile has already been synched
      ✓ should fail to update the profile if no auth token is found, or an error occur
      ✓ should call the rest service to process the profile and fail silently if the service replies an error
      ✓ should call the rest service to process the profile and fail silently if the service OK but contains errors
      ✓ should call the rest service to process the profile and update the profile custom attributes accordingly
    created
      ✓ should not do anything in case no profile is sent as parameter
      ✓ should not do anything in case the B2C CRM Sync site preference is disabled
      ✓ should fail to update the profile if no auth token is found, or an error occur
      ✓ should call the rest service to process the profile and fail silently if the service replies an error
      ✓ should call the rest service to process the profile and fail silently if the service OK but contains errors
      ✓ should call the rest service to process the profile and update the profile custom attributes accordingly
    updated
      ✓ should not do anything in case no profile is sent as parameter
      ✓ should not do anything in case the B2C CRM Sync site preference is disabled
      ✓ should fail to update the profile if no auth token is found, or an error occur
      ✓ should call the rest service to process the profile and fail silently if the service replies an error
      ✓ should call the rest service to process the profile and fail silently if the service OK but contains errors
      ✓ should call the rest service to process the profile and update the profile custom attributes accordingly
    synchronized
      ✓ should not do anything in case no profile is sent as parameter
      ✓ should not do anything in case the B2C CRM Sync site preference is disabled
      ✓ should fail to update the profile if no auth token is found, or an error occur
      ✓ should call the rest service to process the profile and fail silently if the service replies an error
      ✓ should call the rest service to process the profile and fail silently if the service OK but contains errors
      ✓ should call the rest service to process the profile and update the profile custom attributes accordingly

  int_b2ccrmsync/cartridge/scripts/b2ccrmsync/hooks/customer.retrieve
    retrieve
      ✓ should not do anything in case no profile is sent as parameter
      ✓ should not do anything in case the B2C CRM Sync site preference is disabled
      ✓ should fail to retrieve the profile if no auth token is found, or an error occur
      ✓ should fail to retrieve the profile if the object given in paremeters does not contain at least one required parameter
      ✓ should call the rest service to retrieve the profile and fail silently if the service replies an error
      ✓ should call the rest service to retrieve the profile and fail silently if the service OK but contains errors
      ✓ should call the rest service to retrieve the profile and abort because no profile have been found
      ✓ should call the rest service to retrieve the profile and update the profile custom attributes accordingly
      ✓ should call the rest service to retrieve the profile and update the profile custom attributes accordingly when sending an object as parameter

  int_b2ccrmsync/cartridge/scripts/b2ccrmsync/hooks/ocapi/shop.auth
    afterPOST
      ✓ should not do anything in case the B2C CRM Sync site preference is disabled
      ✓ should not do anything in case the B2C CRM Sync site hook is not present in the codebase
      ✓ should not do anything in case the customer is not authenticated
      ✓ should call the HookMgr if the preference is enabled and the customer is authenticated

  int_b2ccrmsync/cartridge/scripts/b2ccrmsync/hooks/ocapi/shop.customer
    afterPOST
      ✓ should not do anything in case the B2C CRM Sync site preference is disabled
      ✓ should not do anything in case the B2C CRM Sync site hook is not present in the codebase
      ✓ should not do anything in case the customer is not authenticated
      ✓ should call the HookMgr if the preference is enabled and the customer is authenticated
    afterPATCH
      ✓ should not do anything in case the B2C CRM Sync site preference is disabled
      ✓ should not do anything in case the B2C CRM Sync site hook is not present in the codebase
      ✓ should not do anything in case the customer is not authenticated
      ✓ should call the HookMgr if the preference is enabled and the customer is authenticated
    modifyGETResponse
      ✓ should not do anything in case the B2C CRM Sync site preference is disabled
      ✓ should not do anything in case the B2C CRM Sync site preference is enabled but the custom expand GET parameter is missing
      ✓ should call the PromotionMgr if the preference is enabled and the GET param is passed, but return no promotions
      ✓ should provide promotions if the customer is eligible to promotions

  int_b2ccrmsync/cartridge/scripts/b2ccrmsync/hooks/ocapi/shop.order
    afterPOST
      ✓ should not do anything in case the B2C CRM Sync site preference is disabled
      ✓ should not do anything in case the B2C CRM Sync site hook is not present in the codebase
      ✓ should call the HookMgr if the preference is enabled

  int_b2ccrmsync/cartridge/scripts/b2ccrmsync/hooks/ocapi/shop.promotion
    modifyGETResponse
      ✓ should not do anything in case the B2C CRM Sync site preference is disabled
      ✓ should not do anything in case the B2C CRM Sync site preference is enabled but the custom expand GET parameter is missing
      ✓ should try to add coupons if the preference is enabled and the GET param is passed, but return no coupons as the promotion is not based on coupons
      ✓ should provide coupon IDs if the customer is eligible to promotions based on coupons

  int_b2ccrmsync/cartridge/scripts/b2ccrmsync/hooks/order.process
    created
      ✓ should not do anything in case no order is sent as parameter
      ✓ should not do anything in case the b2c-crm-sync site preference is disabled
      ✓ should not do anything in case the b2c-crm-sync guest-orders site preference is disabled and the order is a guest-order
      ✓ should not do anything in case the b2c-crm-sync PlatformID site preference is disabled and the order is a registered-order
      ✓ should fail to update the order if no auth token is found, or an error occur
      ✓ should call the rest service to process the guest-order and fail silently if the service replies an error
      ✓ should call the rest service to process the guest-order and fail silently if the service OK but contains errors
      ✓ should call the rest service to process the guest-order and update the order's custom attributes accordingly
      ✓ should call the rest service to process the registered-order and update the order's custom attributes accordingly

  int_b2ccrmsync/cartridge/scripts/b2ccrmsync/models/authToken
    getValidToken
      ✓ should return a token object if found in the cache and the token is still valid
      ✓ should throw an error saying no valid token exist when nothing is found in the cache and the service fails
      ✓ should throw an error saying no valid token exist when the token from the cache is expired
      ✓ should call the service if the cached value is undefined

  int_b2ccrmsync/cartridge/scripts/b2ccrmsync/models/customer
    getRequestBody
      ✓ should return a stringified body of the given profil details passed in parameters, when the model does no hold a profile
      ✓ should return a stringified body of the given profil details passed in parameters, even if the model holds a profile
      ✓ should return a stringified body of the profile data sent within the model
      ✓ should return a stringified body of the profile data sent within the model, but without accountId nor contactId in case of first attempt
      ✓ should return an empty input body when no profile is given to the model
    updateStatus
      ✓ should save the given data into the profile custom attribute
      ✓ should not do anything in case no profile is sent within the model
    updateExternalId
      ✓ should save the given data into the profile custom attributes
      ✓ should only save the account ID into the profile custom attribute
      ✓ should only save the contact ID into the profile custom attribute
      ✓ should not do anything in case no profile is sent within the model
    updateSyncResponseText
      ✓ should save response text in the profile custom attribute if this is the first time the response text is saved and so the custom attribute is undefined
      ✓ should save response text in the profile custom attribute if this is the first time the response text is saved
      ✓ should save response text in the profile custom attribute, even if we already saved response texts previously
      ✓ should save response text in the profile custom attribute, and remove the first element of the array as the limit is reached
      ✓ should not do anything in case no profile is sent within the model

  int_b2ccrmsync/cartridge/scripts/b2ccrmsync/models/order
    getRequestBody
      ✓ should return a stringified body of the order data sent within the model
      ✓ should return a stringified body of the order data sent within the model, but without accountId nor contactId in case of first attempt
      ✓ should return undefined when no order is given to the model
    updateStatus
      ✓ should save the given data into the order custom attribute
      ✓ should not do anything in case no order is sent within the model
    updateExternalId
      ✓ should save the given data into the order custom attributes
      ✓ should only save the account ID into the order custom attribute
      ✓ should only save the contact ID into the order custom attribute
      ✓ should not do anything in case no order is sent within the model
    updateSyncResponseText
      ✓ should save response text in the order custom attribute if this is the first time the response text is saved and so the custom attribute is undefined
      ✓ should save response text in the order custom attribute if this is the first time the response text is saved
      ✓ should save response text in the order custom attribute, even if we already saved response texts previously
      ✓ should save response text in the order custom attribute, and remove the first element of the array as the limit is reached
      ✓ should not do anything in case no order is sent within the model

  int_b2ccrmsync/cartridge/scripts/b2ccrmsync/services/rest
    getServiceCallback
      ✓ should throw an error if no model is sent within the method
      ✓ should throw an error if no operation is sent within the method
      ✓ should throw an error if the given model and operation sent within the method are not valid (not present within the configuration)
      ✓ should return a service callback object when trying to get the customer retrieve service callback
      ✓ should return a service callback object when trying to get the customer process service callback

  int_b2ccrmsync/cartridge/scripts/b2ccrmsync/services/ServiceMgr
    getAuthService
      ✓ should return an instance of the LocaleServiceRegistry for the auth service
      ✓ should execute the service call
      ✓ should execute the mockFull method of the service, and so return the mock as result
    callRestService
      ✓ should throw an error if no model is sent within the method
      ✓ should throw an error if no state is sent within the method
      ✓ should throw an error if the given model and state sent within the method are not valid (not present within the configuration)
      ✓ should throw an error as their is no auth token retrieved for the retrieve customer call
      ✓ should throw an error as their is no auth token retrieved for the process customer call
      ✓ should execute the service call to retrieve the customer by using a valid Auth token
      ✓ should execute the service call to process the customer by using a valid Auth token
      ✓ should execute the mockFull method of the retrieve service, and so return the mock as result
      ✓ should execute the mockFull method of the process service, and so return the mock as result

  int_b2ccrmsync/cartridge/scripts/b2ccrmsync/util/helpers
    expandJSON
      ✓ should parse the given string into a valid object
      ✓ should parse the given string into a valid object and return it even if we provide a default value
      ✓ should fail in case we don't provide a string as first parameter, and so return an undefined object
      ✓ should fail in case we don't provide a string as first parameter, and so return the default object
      ✓ should fail to parse the object, and so return undefined as no default value is provided
      ✓ should fail to parse the object, and so return the provided default value
    isIntegrationEnabled
      ✓ should be enabled if both preferences are enabled
      ✓ should be disabled if the b2ccrm_syncIsEnabled preference is disabled
      ✓ should be disabled if the b2ccrm_syncCustomersEnabled preference is disabled
      ✓ should be disabled if both preferences are disabled
    sfdcContactIDIdentifierPresent
      ✓ should return false if the profile is undefined
      ✓ should return false if the profile is null
      ✓ should return false if the profile has no b2ccrm_contactId custom property
      ✓ should return false if the profile's b2ccrm_contactId custom property is undefined
      ✓ should return false if the profile's b2ccrm_contactId custom property is null
      ✓ should return false if the profile's b2ccrm_contactId custom property is an empty string
      ✓ should return true if the profile's b2ccrm_contactId custom property exists

  plugin_b2ccrmsync/cartridge/scripts/b2ccrmsync/hooks/ocapi/shop.customer.passwordReset
    afterPOST
      ✓ should not do anything in case the B2C CRM Sync site preference is disabled
      ✓ should not do anything in case the customer has no profile
      ✓ should call the agent helper and send the email to the customer if the preference is enabled and the customer has a profile

  139 passing (988ms)

jbachelet@jbachel-ltmkcll ~/D/G/S/b2c-crm-sync (develop)> npm run crm-sync:b2c:verify

><EMAIL_ADDRESS>crm-sync:b2c:verify
> node cli.js crm-sync:b2c:verify

----------------------------------------------------------------------------
 CRM-SYNC | v3.0.2 | crm-sync:b2c:verify: START
----------------------------------------------------------------------------
 -- Attempting to verify the B2C environment using the following environment details
┌──────────────────────────────┬──────────┬─────────────────────────────────────────────────────────────────────────────┐
│           Env. Property Name │ Is Valid │ Configured Property Value                                                   │
├──────────────────────────────┼──────────┼─────────────────────────────────────────────────────────────────────────────┤
│                  b2cHostName │   true   │ XXXX.dx.commercecloud.salesforce.com                                    │
├──────────────────────────────┼──────────┼─────────────────────────────────────────────────────────────────────────────┤
│                  b2cClientId │   true   │ 25c65b97-XXXX-XXXX-XXXX-XXXX                                        │
├──────────────────────────────┼──────────┼─────────────────────────────────────────────────────────────────────────────┤
│              b2cClientSecret │   true   │ XXXXXXXXXXXX                                                       │
├──────────────────────────────┼──────────┼─────────────────────────────────────────────────────────────────────────────┤
│               b2cCodeVersion │   true   │ SFRA_AP_05_04_2021                                                          │
├──────────────────────────────┼──────────┼─────────────────────────────────────────────────────────────────────────────┤
│                   b2cSiteIds │   true   │ RefArch                                                                     │
├──────────────────────────────┼──────────┼─────────────────────────────────────────────────────────────────────────────┤
│              b2cInstanceName │   true   │ XXXX                                                                     │
└──────────────────────────────┴──────────┴─────────────────────────────────────────────────────────────────────────────┘
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ B2C Commerce Authentication Token                                                                                │
├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ eyJ0eXAiOiJKV1QiLCJraWQiOiJEMWhPUDdEODN4TjBqZWlqaTI3WWFvZFRjL0E9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIyNWM2NWI5Ny1lZTcxL… │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
 -- Sites verification details - successfully verified these sites
┌─────────────────────────┬──────────┬────────────────────┬─────────────────────────────────────────────────────────────┐
│         Site Identifier │  Status  │     Storefront     │ Site URL                                                    │
├─────────────────────────┼──────────┼────────────────────┼─────────────────────────────────────────────────────────────┤
│                 RefArch │   200    │       online       │ /s/-/dw/data/v21_3/sites/RefArch                            │
└─────────────────────────┴──────────┴────────────────────┴─────────────────────────────────────────────────────────────┘
 -- Code version verification details
┌─────────────────────────┬──────────┬────────────────────┬──────────┬──────────────────────────────────────────────────┐
│                      Id │  Active  │   Last Modified    │  CMode   │ WebDAV Url                                       │
├─────────────────────────┼──────────┼────────────────────┼──────────┼──────────────────────────────────────────────────┤
│      SFRA_AP_05_04_2021 │   true   │ 05/02/23 12:05:00  │   21.7   │ /webdav/Sites/Cartridges/SFRA_AP_05_04_2021      │
└─────────────────────────┴──────────┴────────────────────┴──────────┴──────────────────────────────────────────────────┘

  ,--------------------------------------------------------------------------------------------------.
  |                                                                                |
  |   ▄▄▄▄▄▄▄▄▄▄▄  ▄         ▄  ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄  ▄   |
  |  ▐░░░░░░░░░░░▌▐░▌       ▐░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░▌  |
  |  ▐░█▀▀▀▀▀▀▀▀▀ ▐░▌       ▐░▌▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░▌  |
  |  ▐░▌          ▐░▌       ▐░▌▐░▌          ▐░▌          ▐░▌          ▐░▌          ▐░▌          ▐░▌  |
  |  ▐░█▄▄▄▄▄▄▄▄▄ ▐░▌       ▐░▌▐░▌          ▐░▌          ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░▌  |
  |  ▐░░░░░░░░░░░▌▐░▌       ▐░▌▐░▌          ▐░▌          ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░▌  |
  |   ▀▀▀▀▀▀▀▀▀█░▌▐░▌       ▐░▌▐░▌          ▐░▌          ▐░█▀▀▀▀▀▀▀▀▀  ▀▀▀▀▀▀▀▀▀█░▌ ▀▀▀▀▀▀▀▀▀█░▌▐░▌  |
  |            ▐░▌▐░▌       ▐░▌▐░▌          ▐░▌          ▐░▌                    ▐░▌          ▐░▌ ▀   |
  |   ▄▄▄▄▄▄▄▄▄█░▌▐░█▄▄▄▄▄▄▄█░▌▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄█░▌ ▄▄▄▄▄▄▄▄▄█░▌ ▄   |
  |  ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░▌  |
  |   ▀▀▀▀▀▀▀▀▀▀▀  ▀▀▀▀▀▀▀▀▀▀▀  ▀▀▀▀▀▀▀▀▀▀▀  ▀▀▀▀▀▀▀▀▀▀▀  ▀▀▀▀▀▀▀▀▀▀▀  ▀▀▀▀▀▀▀▀▀▀▀  ▀▀▀▀▀▀▀▀▀▀▀  ▀   |
  |                                                                                |
  |                                                                                |
  |                                     - Brought to You by the Full Power of Salesforce Architects  |
  |                                                 Architect Success, SCPPE, Services, & Alliances  |
  |                                                                                |
  |                                                                                |
  `--------------------------------------------------------------------------------------------------'

----------------------------------------------------------------------------
 CRM-SYNC | v3.0.2 | crm-sync:b2c:verify: END
----------------------------------------------------------------------------


fixed message deletion

trying to delete a message using the message object fails during compilation. this fixes that issue.

Thanks!


Updating the ReadMe

I was going to update the ReadMe, then realized it was a bit more complicated than I thought. There are a lot of instructions and links that are very specific to the Etcher project, for example the Debian repo info.

Add Etcher debian repository:
echo "deb https://dl.bintray.com/resin-io/debian stable etcher" | sudo tee /etc/apt/sources.list.d/etcher.l

Can we set up a Debian repo like this? Is it worth it at this point?

Can we set up a Debian repo like this?

We could, probably, but it's a lot of work to maintain a Debian repository. Also, it comes with some security issues, one needs to ensure nobody but the maintainers have access. Otherwise, attackers might upload insecure Linux kernels or programs with backdoors, which a Linux system using the repository will accept without any further checks.

Is it worth it at this point?

Being an AppImage developer, I think a Debian repository is way harder to use for the average user. With an AppImage, you just download a single file, and you have the entire app. No sudo, nothing complex, it just works. Such AppImages are already available from the release page.
I would therefore just remove any Etcher specific parts from the README and add a link to the release page.

I would therefore just remove any Etcher specific parts from the README

Done

add a link to the release page.

Link please?

https://github.com/TheAssassin/better-etcher/releases

I've updated the ReadMe to reflect the final name: Fetcher. I'm going to go ahead and close this Issue, unless there's anything else about the ReadMe that needs fixing?


Add least significant difference code

Code for calculating least significant difference (LSD) post hocs tests should be added

Notebook with function has been written, just needs to be integrated


fix(cjson): port cjson fix that throws error when T_END found in the

middle

Summary

Checklist

[ ] The Pull Request has tests
[x] A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
[ ] There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

Issue reference

Fix #[issue number]
https://github.com/Kong/lua-cjson/pull/1
KAG-4275

@fffonion can you rename:
build/openresty/patches/lua-cjson-<IP_ADDRESS>-error-on-t_end.patch  to build/openresty/patches/lua-cjson-<IP_ADDRESS>_01-error-on-t_end.patch


Navigation bar fix / Sign out fix

Restructure navigation bar, and add sign out functionality to sign out button

Awesome

😄 Could you merge for me? Doesn't look like I have the option


Cache busting the browser cache with asset handler

We had a problem with the asset handler, that it did not give the cached css/js file a new name after the content was edited - both in view.css/view.js and with theme .js/.css files. We traced it down to the implementation of CssAsset and JavascriptAsset - the cached filename is generated from the filenames of the included files, and does not take into account if the content has been changed. If the content of the included files changes, but the names do not, then there is a risk that the css and/or js files are cached in the browser cache.
Our solution was to include the last modified of each file to the generated file name. In code this means adding the following code to CssAsset (line 133) and JavascriptAsset (line 65):
$filetime = filemtime(DIR_BASE . $asset->getAssetURL());
$filename .= $asset->getAssetHashKey().$filetime;

I suggest a better and more general approach: see #2324