Pricing page update

Description
Updated info and added a toggle for cloud or self-hosted features
Related Issue(s)
Closes #773
Checklist

[x] I have read the contribution guidelines
[x] I have considered the performance impact of these changes
[ ] Suitable unit/system level tests have been added and they pass
[ ] Documentation has been updated

Hi @joepavitt,
I've been working on this, and I could use your help with a few things. This is still a work in progress, the features table info is not completely updated yet. @iskerrett might be adding that info next week.
With the updated info for the tables, this might work as an iteration, but it still needs some fine-tuning. I would really appreciate your help with the following:
Features Table

The sticky top we added to the table only works on desktop. The overflow on mobile prevents it from working, and I haven't been able to solve it. I've added the sticky property to the first column as well, so the feature names are still visible while comparing two plans at a time. However, if the top row doesn't stick as well, it makes no sense, as it's not possible to know what you're looking at.

Also, I think we should add some visual cues for the hidden content when only two plans are visible at a time. I don't have a mockup yet, so any suggestions, ideas, or references are more than welcome.

Toggle Transition

Lastly, when the toggle is clicked, I'd like to add some transitions to the sections being toggled, so it's more obvious that something has changed. I tried a couple of things, but I only managed to delay the change. Ideally, I'd like the sections to fade in smoothly.

I'll be out next week, we can discuss it when I get back or if you'd like to get your hands on it, please feel free to do so.
Thanks in advance!

Thanks Yndira. I'm doing launch next week, but will take a look on Thursday/Friday

Great results! I like the switch between "Self-Hosted" and "Cloud". I have a few suggestions from my side (even though it's still in draft):

Consider removing the "Hosting" label. Currently, it feels redundant. When selecting "Self-Hosted," it displays "self-hosted" which seems repetitive.

The price for the "Self-Hosted Starter" is listed as $15. It should be labeled "Open Source" and the button should read "Download" or provide a link to "How to Install."

Is the open-source, self-hosted tier referred to as "Starter" or "Open-Source"?

All "content" discussion see https://docs.google.com/document/d/1dfFwM5_V_5928Fm2kxhOOnGOFJsiZUUyzN48z9mp2NQ/edit?usp=sharing

Thanks for the feedback.
I deleted the first row and replicated the button / link and price we have in the hero section for the self hosted / starter plan.
@iskerrett "endpoint security" still has the placeholder text for the tooltip in both tables, should I remove it? Or will you replace it with something else?

@iskerrett "endpoint security" still has the placeholder text for the tooltip in both tables, should I remove it? Or will you replace it with something else?

I actually don't know what this refers too so I am hoping @MarianRaphael can help here.   I couldn't find anything about end point security in our documentation.

And the "XX.X" text? I checked the document and it still says the same, shouldn't it be numbers instead?

I'm not a fan of the 3 x Red buttons

It's very uncomfortable on the eye to have that many bold primary buttons drawing your eye.

All the changes have been applied now. If you verify that everything is correct, then it will be ready to be merged next week.

@MarianRaphael I just updated the pricing for the team plan. Could you please take a look and check that it's all good?


Don't work 'antigen apply' in .zshrc

After last update Antigen command antigen apply in my .zshrc file not work.
But work if I just put it in console.
My ZSH config:
################################################################
# Antigen
################################################################

  source $HOME/.zsh/antigen/antigen.zsh

  # Load the oh-my-zsh's library.
  antigen use oh-my-zsh

  # Bundles from the default repo (robbyrussell's oh-my-zsh).
  antigen bundle command-not-found  # suggests package name with relevant command
  antigen bundle docker             # docker autocomplete plugin
  antigen bundle extract            # 'x' alias - swiss knife for archive extracting
  antigen bundle gem                # support for Ruby package manager
  antigen bundle git                # support for git
  antigen bundle git-flow-avh       # support for git-flow-avh completion
  antigen bundle history            # aliases: h for history, hsi for grepping history
  antigen bundle npm                # support for NodeJS package manager
  antigen bundle pip                # support for Python Package Manager
  antigen bundle rvm                # support for Ruby version manager
  antigen bundle react-native       # support for React Native CLI

  # Additional completion definitions for Zsh.
  antigen bundle zsh-users/zsh-completions src
  antigen bundle sdurrheimer/docker-compose-zsh-completion

  # Load the theme.
  antigen theme $HOME/.zsh/themes 'petrikoz' --no-local-clone

  # Tell antigen that you're done.
  antigen apply

################################################################
# Set ZSH options
################################################################
#== History ================
  setopt APPEND_HISTORY          # history appends to existing file
  setopt HIST_FIND_NO_DUPS       # history search finds once only
  setopt HIST_IGNORE_ALL_DUPS    # remove all earlier duplicate lines
  setopt HIST_REDUCE_BLANKS      # trim multiple insgnificant blanks in history
  setopt HIST_NO_STORE           # remove the history (fc -l) command from the history when invoked

  HISTFILE=$HOME/.zsh/history    # history file location
  HISTSIZE=1000000               # number of history lines kept internally
  SAVEHIST=1000000               # max number of history lines saved

...

Full config you can see in my account: https://github.com/petrikoz/dotfiles/blob/master/zsh/rc

Yep, delete .zcompdump* solve problem. Thank you and get well!

I'm gonna take a look as I get better (I'm sick). Did you tried antigen
reset? Otherwise manually delete .zcompdump*
Best regards,
On 04:04, Fri, Oct 21, 2016 Petr Zelenin<EMAIL_ADDRESS>wrote:

After last update Antigen command antigen apply in my .zshrc file not
work.
But work if I just put it in console.
My ZSH config:
################################################################# Antigen################################################################
source $HOME/.zsh/antigen/antigen.zsh
Load the oh-my-zsh's library.
antigen use oh-my-zsh
Bundles from the default repo (robbyrussell's oh-my-zsh).
antigen bundle command-not-found  # suggests package name with relevant command
antigen bundle docker             # docker autocomplete plugin
antigen bundle extract            # 'x' alias - swiss knife for archive extracting
antigen bundle gem                # support for Ruby package manager
antigen bundle git                # support for git
antigen bundle git-flow-avh       # support for git-flow-avh completion
antigen bundle history            # aliases: h for history, hsi for grepping history
antigen bundle npm                # support for NodeJS package manager
antigen bundle pip                # support for Python Package Manager
antigen bundle rvm                # support for Ruby version manager
antigen bundle react-native       # support for React Native CLI
Additional completion definitions for Zsh.
antigen bundle zsh-users/zsh-completions src
antigen bundle sdurrheimer/docker-compose-zsh-completion
Load the theme.
antigen theme $HOME/.zsh/themes 'petrikoz' --no-local-clone
Tell antigen that you're done.
antigen apply
################################################################# Set ZSH options#################################################################== History ================
setopt APPEND_HISTORY          # history appends to existing file
setopt HIST_FIND_NO_DUPS       # history search finds once only
setopt HIST_IGNORE_ALL_DUPS    # remove all earlier duplicate lines
setopt HIST_REDUCE_BLANKS      # trim multiple insgnificant blanks in history
setopt HIST_NO_STORE           # remove the history (fc -l) command from the history when invoked
HISTFILE=$HOME/.zsh/history    # history file location
HISTSIZE=1000000               # number of history lines kept internally
SAVEHIST=1000000               # max number of history lines saved
...
Full config you can see in my account:
https://github.com/petrikoz/dotfiles/blob/master/zsh/rc
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/zsh-users/antigen/issues/297, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABxYq3eqOXwBnvpVEFlQiBXmQlZfxZdJks5q2GPrgaJpZM4Kc64o
.

I tried antigen reset. But it didn't help.
Then I removed .zcompdump file.
After this completion work normal in new shells (I use Tmux with many windows and panels).
This means antigen apply in my .zshrc file work nice.


ERROR - "Back to ROM, SDP" on i.MX 8M Mini

We're trying to flash the bootloader on CompuLab IOT-GATE-iMX8 EVK that is based on NXP i.MX 8MM application processor, we get the following error.
U-Boot SPL 2020.04-iot-gate-imx8-2.3-5.4.24-2.1.0+g4979a99482 (May 28 2021 - 06:32:44 +0000)
power_bd71837_init
DDRINFO(D): Nanya 2048G
DDRINFO: start DRAM init
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
DDRINFO(M): mr5-8 [ 0x5000010 ]
DDRINFO(E): mr5-8 [ 0x5000010 ]
Back to ROM, SDP

We referenced this issue, which talks about "Back to ROM, SDP" error and verified that we're using the latest and supported U-Boot version (v2020.04).

It is to be noted that, the above error message gets printed as soon as we changed to SDP. And when we try to run the UUU flashing script, it does not respond at all.

NOTE: We checked that the SDP is working by running the uuu -lsusb command and also checked that fastboot is enabled and working on the U-Boot.

CC @tkmozhi

@nxpfrankli can you comment on this?

Back to ROM, SDP is old method.
We have give up this way.
Please check config and nxp release uboot.
nxp 2020 uboot should already switch SPL SDP.

Our U-Boot version is 2020.04 yet we're seeing this error! What does that signify?

Please check config and nxp release uboot.

What should I be checking on these? Could you be more specific.

CC @tkmozhi

It is boards file.  refer: board/freescale/imx8mm_evk/spl.c
int spl_board_boot_device(enum boot_device boot_dev_spl)
{
switch (boot_dev_spl) {
case SD2_BOOT:
case MMC2_BOOT:
return BOOT_DEVICE_MMC1;
case SD3_BOOT:
case MMC3_BOOT:
return BOOT_DEVICE_MMC2;
case QSPI_BOOT:
return BOOT_DEVICE_NOR;
case NAND_BOOT:
return BOOT_DEVICE_NAND;
case USB_BOOT:
return BOOT_DEVICE_BOARD;
default:
return BOOT_DEVICE_NONE;
}
}
Need return BOOT_DEVICE_BOARD.

@nxpfrankli I've verified the above functions on the NXP i.MX 8MM EVK and everything works as expected. However in CompuLab BSP, it's seem like that they've scraped the SDP related parts.
If the CompuLab BSP is void of these options, how should I add these? Are there any references?
Thanks in advance.

CC @tkmozhi

what's your means?  board/freescale/imx8mm_evk/spl.c is refer code.

@nxpfrankli Thanks for your support 😇
The issue is resolved with this patch note from one of the collaborators (@vraevsky) of compulab-yokneam/meta-bsp-imx8mm repo.

@tkmozhi


PV2-3202 - .NET 6 upgrade

Known issues

DAS packages references via prerelease version
DAS-payments-v2-servicefabric-core deployment issues exist

Closed due to PR https://github.com/SkillsFundingAgency/das-payments-v2-datalocks/pull/10 taking priority


How to use it with zf2

I want to use this with zend framework 2 how to do this ?

are you using composer?

yes it is working but if i am installing it with doctrine/doctrine-mongo-odm-module than it is creating problem

@navneetccna did you ever find a workaround for this? I'm evaluating which other frameworks or ORMs to support for our customers who use PHP.

No did find any workaround for this.

Hi @navneetccna!
Looks like you're manually adding dependencies to your composer.json file. You added multiple require blocks while all requirements should have been added to your existing require block which says you need php 5.3.3 or up, and Zend Framework v2.2.
The preferred way to add more dependencies to your existing Zend Framework (or any PHP application) is do use composer require get-stream/stream. This will pick the latest suitable version of that library and install it.
If I start off from a application like yours with this composer.json file:
{
    "require": {
        "php": ">=5.3.3",
        "zendframework/zendframework": "2.2.*"
    }
}

and I run composer require get-stream/stream it adds it to composer.json file and installs this SDK, no problem.
But if I run composer require doctrine/doctrine-mongo-odm-module, I do run into problems. That's because more recent versions of that package depend on newer versions of Zend Framework.
You can get around that by adding a version constraint: composer require doctrine/doctrine-mongo-odm-module:"<0.11.0".
See https://packagist.org/packages/doctrine/doctrine-mongo-odm-module#0.11.0
I hope this helps you solve your dependency problems.


zig: fix impurities for Zig compiler and Zig outputs

Description of changes
By default, Zig will use the generate code for the native CPU. This is impure and leads to illegal instruction crashes for users which have different CPUs than the build bots.
Change Zig's default to -mcpu=baseline.
To test, I built on my new AMD Zen 3 machine used qemu to emulate an old Intel Sandy Bridge machine, and observed no crashes with this patch:
$ nix-shell -I ~/Projects/ -p ncdu \
    --run 'qemu-x86_64-static -cpu SandyBridge $(which ncdu)'

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
23.05 Release Notes (or backporting 22.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[ ] Fits CONTRIBUTING.md.

Split the commit per expression.

to me the explicit uses of -Dcpu=baseline look like the right tool for the job. Is there some reason this solution is unsatisfactory?

In my opinion, it shouldn't be the job of every package to make the toolchain deterministic. Nix' toolchains should be deterministic by default.
For example, Nix' C compiler wrapper scripts try hard to make the C compiler deterministic, going as far as to strip out -march=native options in build scripts automatically:
https://github.com/NixOS/nixpkgs/blob/b407ed671e416c7f39a72d731226d1d2642e965c/pkgs/build-support/cc-wrapper/cc-wrapper.sh#L108
I don't know what the policy for Nixpkgs is, but I am following the lead of how the C toolchain seems to work.

I think cpu-purity.patch as currently implemented is problematic, because it has far-reaching consequences well beyond the scope of making nixos packages use the baseline CPU. It's also a widely used data structure, and it's difficult to be sure this diff will not violate assumptions in many places of the codebase.

Okay, that makes sense. What is the best way to configure Zig to be deterministic by default regarding CPU code generation? (I understand there are complications with things like libc detection. I don't know if that's relevant to -mcpu.)

Wouldn't it be better to make a custom build step for Zig, used internally within Nixpkgs?
Relevant feature that the hypothetical build step can support https://github.com/NixOS/nixpkgs/issues/185665#issuecomment-1416592467:

I think a better way would be accessing the desired target architecture, operating system along with minimum/maximum OS version, and ABI, along with potentially the glibc version, from nix, and then specifying these via the standard -Dtarget option. I'm happy to assist in getting this working

Another way to do it would be to have a setup hook for zig to make baseline the default, so this will work automatically for existing uses of zig within nativeBuildInputs, and wouldn't change anything outside the nix context
I'm not familiar enough with zig to know how to do that, just throwing some ideas

Given the nature of discussion, I will put this in draft mode.

I am against the .patch file because it unconditionally changes the source code, effectively making it a fork. Yes, I am purist about the purity, but it should be reached by other means like config/build flags, env vars or stuff like that.
I believe the upstream developers (hello andrewrk :)) can provide such tooling.

@AndersonTorres this isn't your PR. It's getting feedback. Why did you put it in draft mode?

@AndersonTorres from outside this conversation, marking someone else's PR as draft seems like a breach of protocol.

There is no other suitable tool to provide a more accurate status. Also it can be easily reverted when desired.

Draft status reverted as desired.

Is it ready to merge? All tests are passing.

No. The current approach has notable drawbacks, as @andrewrk pointed out in https://github.com/NixOS/nixpkgs/pull/214440#pullrequestreview-1283978306

The current approach has notable drawbacks, as @andrewrk pointed out in https://github.com/NixOS/nixpkgs/pull/214440#pullrequestreview-1283978306

Can you reiterate them here (perhaps rephrased from the Nix point of view rather than upstream's)? I don't find @andrewrk's arguments compelling enough to block this patch. Maybe I'm misunderstanding something about how Nix should mandate purity.

I think what I'm hearing is:

drop / defer the purity patch, so downstream zig developers using nixpkgs#zig get the expected language defaults. If they want purity across baseline cpu variants, they should set the flag
it seems desirable to consolidate setting the flag for nixpkgs builds somehow, as we should expect the number of zig built packages in nixpkgs to continue to grow. How are default compiler flags usually set in nixpkgs for other compilers?

It seems like the time to add a default to baseline would be when Zig support is added to the nixpkgs builders.
I'm in favor of just patching in the build argument for each package for now, to get us un-broken.

Can you reiterate them here (perhaps rephrased from the Nix point of view rather than upstream's)?

I agree zig should default to baseline cpu when used as a dependency in nixpkgs, but zig is also used outside the nix sandbox, and the patch changes the default that could be confusing for users and upstream.

How are default compiler flags usually set in nixpkgs for other compilers?

I don't know much about the other compilers, but for rust it is abstracted away with buildRustPackage, and flags are added with things like cargoBuildFlags and cargoTestFlags. For zig, since we don't have something like buildRustPackage, the easiest solution might be to use setup hooks https://github.com/NixOS/nixpkgs/pull/214440#issuecomment-1416649075.

So we need to create a buildZigApp?

I think setup hooks are the best option here, creating a buildPhase that runs zig build with the required options.
What I'm not sure about is how we should handle cases like ncdu, where the flags wouldn't be able to be set automatically due to its use of a Makefile. We could either wrap Zig and make the flags be set conditionally, or we can just specify the flags manually for ncdu as we do now with its ZIG_FLAGS environment variable.
@strager If you'd like assistance with any of this, or have any better ideas based on these, feel free to reach out -- more than happy to help.

threw something together, just an idea and still need more work, feel free to open a new pr or update in this one
--- a/pkgs/development/compilers/zig/0.10.nix
+++ b/pkgs/development/compilers/zig/0.10.nix
@@ -4,6 +4,7 @@
 , cmake
 , coreutils
 , llvmPackages
+, makeWrapper
 , libxml2
 , zlib
 }:
@@ -22,6 +23,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [
     cmake
     llvmPackages.llvm.dev
+    makeWrapper
   ];

   buildInputs = [
@@ -49,11 +51,19 @@ stdenv.mkDerivation rec {
     "-DCMAKE_SKIP_BUILD_RPATH=ON"
   ];

+  postInstall = ''
+    mkdir -p $out/nix-support/bin
+    makeWrapper $out/bin/zig $out/nix-support/bin/zig \
+      --append-flags -Dcpu=baseline
+  '';
+
   doCheck = true;
   installCheckPhase = ''
     $out/bin/zig test --cache-dir "$TMPDIR" -I $src/test $src/test/behavior.zig
   '';

+  setupHook = ./setup-hook.sh;
+
   meta = with lib; {
     homepage = "https://ziglang.org/";
     description =
--- /dev/null
+++ b/pkgs/development/compilers/zig/setup-hook.sh
@@ -0,0 +1,5 @@
+zigWrapperHook() {
+    export PATH=@out@/nix-support/bin:$PATH
+}
+
+postUnpackHooks+=(zigWrapperHook)

As an alternative to that, we could also make a Zig wrapper a la cc-wrapper that sets flags based on commands/environment variables, and I'd be happy to work on this if you (@strager) don't mind.

https://github.com/NixOS/nixpkgs/issues/214356#issuecomment-1422547815

a patch that passes -DZIG_TARGET_MCPU=baseline when building the zig compiler would fix the originally reported immediate issue

It seems like we should do as @ifreund recommends, a one flag patch, and allow the zig builder story to bake awhile.

Agreed.
I can confirm that the following patch builds on both aarch64-linux and aarch64-darwin. @strager if you wouldn't mind updating this branch to this in the meantime, so we can fix the big issue at hand, that'd be great. Else, I'd be fine with filing a PR. Thanks!
diff --git a/pkgs/development/compilers/zig/0.10.nix b/pkgs/development/compilers/zig/0.10.nix
index 89f23b9ca25..966be329bef 100644
--- a/pkgs/development/compilers/zig/0.10.nix
+++ b/pkgs/development/compilers/zig/0.10.nix
@@ -47,6 +47,9 @@ stdenv.mkDerivation rec {
   cmakeFlags = [
     # file RPATH_CHANGE could not write new RPATH
     "-DCMAKE_SKIP_BUILD_RPATH=ON"
+
+    # ensure determinism in the compiler build
+    "-DZIG_TARGET_MCPU=baseline"
   ];

   doCheck = true;
diff --git a/pkgs/development/compilers/zig/0.9.1.nix b/pkgs/development/compilers/zig/0.9.1.nix
index e7c62a4cf93..637186f686e 100644
--- a/pkgs/development/compilers/zig/0.9.1.nix
+++ b/pkgs/development/compilers/zig/0.9.1.nix
@@ -62,6 +62,9 @@ stdenv.mkDerivation rec {
   cmakeFlags = [
     # file RPATH_CHANGE could not write new RPATH
     "-DCMAKE_SKIP_BUILD_RPATH=ON"
+
+    # ensure determinism in the compiler build
+    "-DZIG_TARGET_MCPU=baseline"
   ];

   doCheck = true;

Is it ready to merge? All tests are passing.

Is it ready to merge? All tests are passing.

It seems that people prefer #215994 and per-package workarounds instead of my fix-everything solution. I didn't test that patch, but it seems like it should do the right thing.

Hi @strager, please see https://github.com/NixOS/nixpkgs/pull/214440#issuecomment-1421655194 and the surrounding discussion for ideas with regards to the problem of what the compiler outputs. Do you have any thoughts on the matter?
(Lastly, I was waiting until some time passed before submitting my own PR with just the Zig compiler fix as a courtesy towards you for starting this work, but I assume the author of the other PR didn't see that there was a discussion here -- sorry about that.)

@strager Are you open to resurrecting this? I just reviewed another new zig package and would prefer your global implementation to setting baseline on all packages. (Which surely misses some)

We should be setting the baseline for all Nixpkg packages but we should do it through a different approach.
The current approach also affects packages built by the end users, when it should ideally only affect packages built by the system itself.
The following are relevant:
https://github.com/NixOS/nixpkgs/pull/214440#issuecomment-1421655194
https://github.com/ziglang/zig/issues/14281

[I] would prefer your global implementation to setting baseline on all packages. (Which surely misses some)

I agree. I think that Nix-built tools should behave the same whether you are building another Nix package or using the tool outside of Nix, and that behavior should be "it works".
Other people, such as @sagehane and Zig's lead maintainer, disagree and think that the "same" tool should behave in two different ways depending on how it's invoked. I'm not interested fighting this fight though.

tl;dr of what I'm trying to convey: How does modifying the behaviour of Zig aid the users to have consistent/predictable behaviour outside of the Nix build system? I would think it does the opposite.

I think that Nix-built tools should behave the same whether you are building another Nix package or using the tool outside of Nix, and that behavior should be "it works".

Every use-case has different needs. NixOS cares about reproducibility and end users might care more about other things, like optimising for their local machine or using a different baseline when sharing binaries with computers that are guaranteed to support x86_64-v2+, etc.
If anything, altering Zig's behaviour is far from "making it work". It's essentially a foot-gun for people who expect the behaviour to resemble that of upstream's.

Other people ... think that the "same" tool should behave in two different ways depending on how it's invoked.

Well yeah, is that strange? Isn't that how other compilers/build systems packaged by Nixpkgs work too? Or does something like GCC/make enforce compiling for a baseline when used for userspace too?

How does modifying the behaviour of Zig aid the users to have consistent/predictable behaviour outside of the Nix build system? I would think it does the opposite.

I agree that my proposal does not work toward that goal. I don't think that's a goal of Nix or Nixpkgs, but I could be wrong.

does something like GCC/make enforce compiling for a baseline when used for userspace too?

I am not advocating for "enforcing" compiling for the baseline. I am advocating for a compiling for the baseline by default.
I think both GCC and Clang compile for the baseline by default at least on Linux x86_64 (both upstream and in Nix).


Support go to the first and last group keyboard shortcut

Page up/down keys move between groups; however, I have not been able to find a way to go to the first group and the last group quickly, such as Ctrl+PG-Up/Down. It would be great if these shortcuts could be added.

I have implemented the ability to jump to the first and last category/group. However, I wasn't able to use Ctrl+PageUp and Ctrl+PageDown. Those keyboard shortcuts  are already used by browsers to move between browser tabs. Instead, I went with Alt+PageUp and Alt+PageDown. (On a Mac, the "Alt" would be "Option").
This functionality will be part of version 1.5, once we release it. That will probably be this weekend.

Awesome! Thanks, @julianna-ciq ! I will let you know my testing result once it's published.

We have shipped v1.5.0, which includes the Alt+PageUp and Alt+PageDown commands.


Commands are not working

Commands like antidote update or antidote purge are not working as expected.
Here's my .zshrc:
# drive config with antidote
ANTIDOTE_HOME=$ZDOTDIR/.zplugins
ANTIDOTE_DIR=$ZDOTDIR/.antidote

zstyle ':antidote:bundle' use-friendly-names 'yes'
zstyle ':antidote:bundle' file $ZDOTDIR/.zplugins.txt

zhome=${ZDOTDIR:-$HOME}
# load antidote
if [[ ! $ZDOTDIR/.zplugins.zsh -nt $ZDOTDIR/.zplugins.txt ]]; then
  [[ -e $ANTIDOTE_DIR ]] \
    || git clone --depth=1 https://github.com/mattmc3/antidote.git $ANTIDOTE_DIR
  (
    source $ANTIDOTE_DIR/antidote.zsh
    antidote bundle <$ZDOTDIR/.zplugins.txt >$ZDOTDIR/.zplugins.zsh
  )
fi
source $ZDOTDIR/.zplugins.zsh

autoload -Uz $zhome/.antidote/functions/antidote

Every command returns:
antidote:10: command not found: __antidote_main

I'm interested in exploring a bit why this isn't working, but I bet you just want to get back to good. Let's do that the simple way and just have you re-clone antidote:
ANTIDOTE_DIR=${ZDOTDIR:-~}/.antidote
[[ -d $ANTIDOTE_DIR ]] && rm -rf $ANTIDOTE_DIR
git clone --depth=1 https://github.com/mattmc3/antidote.git $ANTIDOTE_DIR
zsh

I have already clean installed antidote but this doesn't seem to work either. If you need more information I'll be more than happy to provide them, I wasn't too sure about what you'd need to investigate the issue.

@manuelcattelan - I'm so sorry this latest release caused an issue for you. After a little more research, I see where the problem was and have pushed a fix. Can you try the script above again? If that works for you, I'll tag a new release.

@mattmc3 The change you just pushed fixed this issue for me!

@AnthonyEnr1quez - Awesome! Thanks for the assist. Sorry for the trouble. I'll tag a release.

@manuelcattelan - Let me know if I need to re-open this issue, but pretty sure this bug is squashed.

@mattmc3 - Yup the fix works, you can tag a new release and don't worry for the issue. Thanks for your valuable work!


Please update plugin at the last version where's added PR that's open the bubble automatically.

Recently I've submitted a PR that allows the user open the application by tapping on the bubble button, can you update the release for this last commit on the master branch?

any updates?

already pr update


Enchanted book not selling

For some reason, just the Sharpness V enchanted book won't sell back to the shop. Other books sell back fine but that one specifically won't sell back if not bought directly from the shop.

I've seen a similar issue possibly related. Selling multiple items with the same enchant does not work. It will sell one, then show sold out even though another is in the chest. I presume it somehow identifies items in a different way.


Dd 1212

Fixes DD-1212
Description of changes
Filter out blank descriptions
Fixed the xpath expression to match both dcterms:description and dc:description
How to test
Related PRs
(Add links)

Notify
@DANS-KNAW/dataversedans

@ericdevries : I'll merge this and then address the two minor points in the comments, as those are trivial changes.


Can't install Veda atom package

npm ERR! tar.unpack unzip error /private/var/folders/7m/9j6vw_vs259cdq2ly2t_lrmw0000gn/T/d-118426-6956-x92wmw.2qt7mvlsor/package.tgz
npm ERR! addLocal Could not install /private/var/folders/7m/9j6vw_vs259cdq2ly2t_lrmw0000gn/T/d-118426-6956-x92wmw.2qt7mvlsor/package.tgz
npm ERR! Darwin 16.7.0
npm ERR! argv "/Users/leotreasure/ApplicationsH/Atom.app/Contents/Resources/app/apm/bin/node" "/Users/leotreasure/ApplicationsH/Atom.app/Contents/Resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/Users/leotreasure/.atom/.apm/.apmrc" "--userconfig" "/Users/leotreasure/.atom/.apmrc" "install" "/private/var/folders/7m/9j6vw_vs259cdq2ly2t_lrmw0000gn/T/d-118426-6956-x92wmw.2qt7mvlsor/package.tgz" "--runtime=electron" "--target=1.7.15" "--arch=x64" "--global-style"
npm ERR! node v6.9.5
npm ERR! npm  v3.10.10
npm ERR! code Z_DATA_ERROR
npm ERR! errno -3

npm ERR! incorrect data check
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>
npm ERR! tar.unpack untar error /private/var/folders/7m/9j6vw_vs259cdq2ly2t_lrmw0000gn/T/d-118426-6956-x92wmw.2qt7mvlsor/package.tgz

npm ERR! Please include the following file with any support request:
npm ERR!     /private/var/folders/7m/9j6vw_vs259cdq2ly2t_lrmw0000gn/T/apm-install-dir-118426-6956-r8y3b5.n8y5sif6r/npm-debug.log

It's mysteriously worked now!


React Redux example doesn't seem to make sense in a real-world context

Hi there, I'm trying to understand this example:
import { useSelector } from 'react-redux';

const getScore = memoize(state => ({
  score: heavyComputation(state.a + state.b),
  createdAt: Date.now(),
}));

const Component = ({ id }) => {
  const { score, title } = useSelector(useCallback(memoize(state => ({
    score: getScore(state),
    title: state.titles[id],
  })), [id]));
  return
{score.score} {score.createdAt} {title}
;
};

I realize the example is more about how this library can interoperate with React Redux than about giving a practical scenario, but it doesn't really help me to understand how you would use proxy-memoize to create create a memoized calculation based on both the Redux store's state and the component's props. The way it's written above, useCallback will simply tear down and rebuild the memoized function whenever id changes, so there will be never any opportunity to hit the cache in this scenario.
A simpler and more efficient way of formulating the above is this:
const Component = ({ id }) => {
  const score = useSelector(getScore);
  const title = useSelector(state => state.titles[id]);
  return
{score.score} {score.createdAt} {title}
;
};

If you were trying to actually calculate expensive derived data based on both state and props  with this library, how are you supposed you do it?

A simpler and more efficient way of formulating the above is this

You are absolutely right about this. Hmm, the example is too artificial..

If you were trying to actually calculate expensive derived data based on both state and props with this library, how are you supposed you do it?

That's exactly what I tried to show in the example.
const Component = ({ id }) => {
  const { score, title } = useSelector(useCallback(memoize(state => ({
    score: getScore(state),
    title: state.titles[id],
  })), [id]));
  return
{score.score} {score.createdAt} {title}
;
};

getScore is common part across components and the function in useCallback is specific to that component.
Does it make sense? sorry, if I misunderstand your point.

Thanks for the quick response! I guess one way to try to explain the thing I'm asking about is if we tried to do this:
`const Component = ({ id }) => {
  const { score, title } = useSelector(useCallback(memoize(
    state => ({
      score: getScore(state),
      title: doExpensiveWork(state.titles[id]),
    },
    { size: 5 }
  )), [id]));
  return
{score.score} {score.createdAt} {title}
;
};

Now, even though I've increased the cache size, if I invoke <Component /> and pass in a prop that alternates between two values, I will never receive a memoized result for title. The "cardinality" of the memoization is only for the selector state, not the props. This is a problem that re-reselect attempts to resolve, for example. Maybe this is outside the scope of what this library attempts to do, but in practice I feel like it's not that rare to get a derived state from both redux/selector state and props.

Let me ask for clarification. doExpensiveWork(state.titles[id]) Do we require to invoke for every ids? With this style, we need to. If it can do the expensive work only on state without props, we could split the function. What would the function implementation look like? That would help us reach some useful conclusion.

You're right, id is not really a useful reference point here -- presumably it's something unique to each item rendered and relatively stable. Maybe a more useful example would be something like, we're rendering a markdown document (the expensive work). The markdown document lives in state, but we also have a piece of information that comes from the component props (say, a string to be highlighted in the HTML output by the markdown). Let's say the document is a relatively stable value, and the string to highlight typically only varies between a few different values. If both these pieces of information were sourced from the state, we could set the memoize cache size and benefit from it. But when the dependent values come from different sources, it's less clear to me how to proceed in this scenario.

Assuming highlighting applies to the HTML output, not markdown source. (because otherwise, the expensive work needs to be done every time hightlighting changes.)
const getHTML = memoize((markdown) => expensiveWork(markdown));

const getHighlightedHTML = memoize(([state, props]) => {
  const html = getHTML(state.markdown); // only re-evaluated when state.markdown changes
  return highlightHTML(html, props.highlightKeyword);
});

So, we solve this kind of use cases by nesting memoize. useCallback is just a way to follow this pattern.

Ah, this makes a lot more sense to me now! Thanks for taking the time to explain it.

While you are here, would you be interested in opening a PR to improve README? I don't have much background on the real use cases of reselect, and you could help on it.

Yes, I think I would be up for this! I may spend a bit of time trying to use proxy-memoize in my project to make sure I better understand how to use it idiomatically. It's been a while since I've used reselect myself.

@dai-shi Thank you very much for the work done!
This is very valuable and can indeed replace the very outdated reselect approach!!
Hi @lostfictions ! Do you have a time to work with this?
I mean adding some helpful examples to compare with reselect / re-reselect?
For me, the example in the Readme looks very frightening. In the community, no one does react like that, so it can scare off new users of the library, since they will consider it as the only possible use case.

From the point of view of Reselect and Re-reselect - the most convenient to use with React and component properties - was the ability to move selectors logic away from component.
In the example in the Read.me, you described the selectors inside the component - it doesn't look very good and bloats the component files.
Therefore, it will be very cool to remove this example and show that we can pass not only one State, but also other values -id, etc. (as you indicated - using an array) and describe the logic of the selectors outside the react components

@vlanemcev Thanks for coming.
Can you elaborate your concern a bit more? I think I almost get it, but it would be nice to hear more.
If you are talking about the "Usage with React Redux" example snippet,
I agree it doesn't represent real use cases. It rather shows edge case. Yeah, we should improve README.
But, if it depends on a prop, useCallback is handy.
Would you be willing to provide a rough idea/code snippet? We can then polish or discuss based on it.

@dai-shi
Yeah, sure
Cache Size and Selector Instance Reuse
Heres example from react-redux useSelector() hook docs:
`import React from 'react'
import { useSelector } from 'react-redux'
import { createSelector } from 'reselect'
const selectCompletedTodosCount = createSelector(
(state) => state.todos,
(_, completed) => completed,
(todos, completed) =>
todos.filter((todo) => todo.completed === completed).length
)
export const CompletedTodosCount = ({ completed }) => {
const matchingCount = useSelector((state) =>
selectCompletedTodosCount(state, completed)
)
return {matchingCount}
}
export const App = () => {
return (
<>
Number of done todos:

</>
)
}`
This example shows how easy we are to pass an additional argument for our selector, which is obtained from the properties of the component. In most cases, this is the most common use case for selectors - we need to get some data by ID or another additional property, that doesn’t present in our Redux Store.
In the READ.me of this project, a very heavy example is shown, which will seem very cumbersome to users of reselect.
This is because people are used to describing the logic of selectors next to the reducers and actions themselves:
export const getTeamPlayerSelector = createSelector(
  (_: RootState, id: ITeam['id'] | undefined) => id,
  getPlayersSelector, // will return array with all farmers object
  (id, players) => players.filter((player) => player.profile.team_id === id),
);

And then in the Component we will use something like this:
const TeamPlayersList: TeamPlayersListComponentType = ({ t, navigation }) => {   const { data, isLoading, isOnline, isRefreshing, refreshResources } = useReduxFetch(     (state) => getTeamPlayersSelector(state, navigation.getParam('id')),   ---> this is selector function      fetchTeamPlayers,     navigation.getParam('id'),   );

Thanks for those clarifications.
Let me start with one.

In reselect we really love composing of selectors. It is because we want to re-use our selectors in any reasons.

If the reason is to organize selectors, it's totally fine.
const subtotalSelector = state => state.shop.items.reduce((acc, item) => acc + item.value, 0);

const taxSelector = state => {
  const subtotal = subtotalSelector(state);
  const taxPercent = state.shop.taxPercent;
  return subtotal * (taxPercent / 100),
};

export const totalSelector = memoize(state => {
  const subtotal = subtotalSelector(state);
  const tax = tasSelector(state)
  return { total: subtotal + tax };
);

This works.
You might ask this is duplicating calculation.
Yes, it is. But, the exported totalSelector is optimized. This is probably counter-intuitive to reselect users.
You could nest memoize.
const subtotalSelector = memoize(state => state.shop.items.reduce((acc, item) => acc + item.value, 0));

const taxSelector = memoize(state => {
  const subtotal = subtotalSelector(state);
  const taxPercent = state.shop.taxPercent;
  return subtotal * (taxPercent / 100),
});

export const totalSelector = memoize(state => {
  const subtotal = subtotalSelector(state);
  const tax = tasSelector(state)
  return { total: subtotal + tax };
);

Unless the internal selectors do heavy computation (in these cases, it depends on items size),
this is not recommended for performance. Again, this might be counter-intuitive.
So, what do you think?
Should we show the first example instead of the one in README, or the second one?
Do people care performance or organizing code?
This is the hard part of this library. It replaces reselect use cases in React, but the mental model has to be changed. (Or throw away the model of using memoization to get stable object references.)

@dai-shi Thank you very much for you explanations!

Should we show the first example instead of the one in README, or the second one?

I think we should show 2 examples that you described above with some explanation too.
This is because it will be developers responsibility to understand how to use selectors.
For example if we know that we will use this selector anywhere else
const subtotalSelector = memoize(state => state.shop.items.reduce((acc, item) => acc + item.value, 0));
we should wrap it in memoize() to have better performance and take care about our re-renders.
Can you please tell us what performance problems can be if we use nested memoize functions??

@dai-shi Btw,  I see a lot of potential in this library. It just needs to be promoted at a more formal level.
We need to go back to the Discussions post on the next development of re-select and ask Mark to add it to the official Redux documentation.

It just needs to be promoted at a more formal level.

Agreed. I appreciate for your help.

we should wrap it in memoize() to have better performance and take care about our re-renders.

This is the misconception if I understand what you are saying.
To just avoid re-renders in React, you don't need to wrap it in memoize().
If you do, it's an overhead.

Can we disassemble the principle of operation of memoize () in detail, line by line, in order to understand how it will work “under the hood”?

Let's start with simpler one.
const sumSelector = memoize((state) => {
  const x = { sum: state.a + state.b };
  const y = { sum: state.obj1.c + state.obj2.d };
  return { sum: x.sum + y.sum };
})

When you run sumSelector(...) for the first time.
It invokes the function, records tracking info and returns the result. It saves the input state and the result too.
In this case, the tracking info is like .a, .b, .obj1.c and .obj2.d.
Then, you run sumSelector(...) again.
Now, it compares two states, the previous one and the current one.
But it compares only the paths in the tracking info.
If it finds at least one change in a path, it will re-invoke the function and do the same.
Otherwise, it returns the previous result.
Please note that in this scenario, we didn't discuss object ref identity at all.
It doesn't matter how many new objects are created inside the function.
If this is clear enough, I can explain the nested scenario. But, I'd rather stop here and wait for questions.

@dai-shi Thanks for explanation!
Yeah, the example above is enough for understanding, could you please continue to describe nested example?

Okay, so let's see the example without nested memoize.
const subtotalSelector = state => state.shop.items.reduce((acc, item) => acc + item.value, 0);

const taxSelector = state => {
  const subtotal = subtotalSelector(state);
  const taxPercent = state.shop.taxPercent;
  return subtotal * (taxPercent / 100),
};

export const totalSelector = memoize(state => {
  const subtotal = subtotalSelector(state);
  const tax = taxSelector(state)
  return { total: subtotal + tax };
);

If you run totalSelector({ shop: { items: [{ id: 1, value: 100 }, { id: 2, value: 200 }], taxPercent: 10 } }),
the tracking info will be .shop.items.length, .shop.items[0].value, .shop.items[1].value, .shop.taxPercent. (it may include some more for array.prototype.)
The behavior is just the same as the previous example.
So, whether totalSelector re-evaluates the function does not depend on if totalSelector is composed from smaller pieces or just a big one. It's totally up to developers.
Now, if we have nested memoize, we need something tricky.
const subtotalSelector = memoize(...);

const taxSelector = memoize(...);

export const totalSelector = memoize(state => {
  const subtotal = subtotalSelector(state);
  const tax = taxSelector(state)
  return { total: subtotal + tax };
);

Now, what you pass to subtotalSelector is a proxy object, because that's how it collects tracking info.
So, if you have nested memoize, you will wrap proxies over and over, like proxy(proxy(state))).
This can't be avoided because we need to collect tracking info for subtotalSelector, taxSelector and totalSelector separately.
What's more difficult is when you re-evaluate.
Suppose we secondly invoke totalSelector({ shop: { items: [{ id: 1, value: 100 }, { id: 2, value: 200 }], taxPercent: 11 } }).
We only change the taxPercent.
From totalSelector point of view, because taxPercent is changed, it will re-evaluate the function.
taxSelector will also re-evaluate, so not a big deal.
subtotalSelector will not re-evaluate the function, because nothing in the tracking info is changed.
So, it will return a cached result.
Now, because subtotalSelector doesn't run the function, from totalSelector, it is just NO-OP.
This means, without any treatment, the tracking info after the second run becomes .shop.taxPercent only.
This is incorrect and if we run a new state with different shop.items, subtotalSelector doesn't run the function because the previous run was NO-OP.
To avoid this, we have a special treatment, which is if the inner memoize returns a cached result, it will also propagate the previous tracking info to the outer memoize, all recursively.
That said, this tracking info propagation and nested proxies should be very lightweight.
And, this library does support nested memoize scenario. But, it doesn't come with zero cost.
Okay, I think this isn't going to be noticeable cost.
So, I'm okay to change README to add nested memoize use case for reselect users.
Please feel free to ask questions for clarification.

btw, i don't know whether the first example without nesting or the second one with nesting is more performant. it's running array.reduce twice vs. wrapping proxies twice. if items are large the second one wins, if the items are just a few, the first one may win.

I assume this issue is not very active now.
While the issue is not solved, let's continue with new issues. Just created two:

#28
#29

Please feel free to open new issues for questions and suggestions.


public datasets for evaluation

Hi there,
I'm trying to set up public datasets for evaluation listed in Table 9, but got different train/test size for some datasets:

Facial Emotion Recognition 2013
Dataset I found on Kaggle has train dataset 28,709, Val(public test) 3,589, (Train+Val 32,298 in total) and Test (private test) 3,589.
STL-10
Tensorflow stl10 has training dataset with 5,000 images and testing dataset with 8,000.
EuroSAT
Tensorflow eurosat only has training dataset with 27,000 images.
RESISC45
The site Tensorflow refers to only have training dataset, which is 31,500 images.
GTSRB
This archive I found has 2 training datasets (GTSRB_Final_Training_Images.zip and GTSRB-Training_fixed.zip), but both have size different from Table 9.

This is what Table 9 shows:

Dataset
Classes
Train size
Test size
Evaluation metric

Facial Emotion Recognition 2013
8
32,140
3,574
accuracy

STL-10
10
1000
8000
accuracy

EuroSAT
10
10,000
5,000
accuracy

RESISC45
45
3,150
25,200
accuracy

GTSRB
43
26,640
12,630
accuracy

It would be greatly appreciated if you could point me to the source of data split shown in Table 9.

Same q here. Would be great and appreciate it if you could share which sources you get those public datasets for evaluation. Thanks

Hi, thanks for pointing out some of the details we were cursory or missing; upon investigating, we found that:

Facial Emotion Recognition 2013: We noticed an error in the table generation script which reported smaller numbers than it's supposed to; you can use the official numbers. We had a similar issue with the UCF-101 dataset.
STL-10: We reported the average of the 10 pre-defined folds as provided by the official source
EuroSAT: We realize that the paper is lacking a critical reproducibility info on EuroSAT; given the lack of the official splits and to make a class-balanced dataset, we randomly sampled 500 train/validation/test images for each class. Below is the code for deterministically sampling those images.

root = f"{DATA_ROOT}/eurosat/2750"
seed = 42
random.seed(seed)
train_paths, valid_paths, test_paths = [], [], []
for folder in [os.path.basename(folder) for folder in sorted(glob.glob(os.path.join(root, "*")))]:
    keep_paths = random.sample(glob.glob(os.path.join(root, folder, "*")), 1500)
    keep_paths = [os.path.relpath(path, root) for path in keep_paths]
    train_paths.extend(keep_paths[:500])
    valid_paths.extend(keep_paths[500:1000])
    test_paths.extend(keep_paths[1000:])

We could’ve used a better setup such as mean-per-class using all available data and would rather encourage future studies to do so, while we note that the comparisons in the paper used this same subset across all models, so their relative scores can still be considered “fair”.

RESISC-45: Similar to EuroSAT, we used our custom split given the lack of an official one:

root = f"{DATA_ROOT}/resisc45"
seed = 42
paths = sorted(glob.glob(os.path.join(root, "*.jpg")))
random.seed(seed)
random.shuffle(paths)
if split == 'train':
    paths = paths[:len(paths) // 10]
elif split == "trainval":
    paths = paths[:(len(paths) // 10)]  # 10% for training
elif split == 'valid':
    paths = paths[len(paths) // 10:(len(paths) // 10) * 2]
elif split == 'test':
    paths = paths[(len(paths) // 10) * 2:]
else:
    raise NotImplementedError

GTSRB: As @pj-ms found in #156, it turns out that we have used inconsistent train/test split.

Hi Jong, thanks so much for all those information! It is super helpful.
I have some questions about two more datasets and would really appreciate it if you could help. Thanks in advance.
Birdsnap:  the official site only provides the image url. When using the associated script to download the images, I ended up with ""“NEW_OK:40318, ALREADY_OK:0, DOWNLOAD_FAILED:5030, SAVE_FAILED:0, MD5_FAILED:4481, MYSTERY_FAILED:0.”. Have you folks experienced similar problems?
CLEVR(Counts): the CLIP paper says "2,500 random samples of the CLEVR
dataset (Johnson et al., 2017)", while the official data site says "A training set of 70,000 images and 699,989 questions, A validation set of 15,000 images and 149,991 questions, A test set of 15,000 images and 14,988 questions". The original dataset seems to be a VQA dataset. According to the prompts and words in the paper ", counting objects in synthetic
scenes (CLEVRCounts)". It seems that it is transformed into a counting classification dataset. Could you share a little bit information about how this was achieved? Thanks

Thanks!

Same q here. Would be great and appreciate it if you could share which sources you get those public datasets for evaluation. Thanks.
For example, here is the table of stats about FER-2013 dataset in the the other paper which is consistent with Kaggle page, but different than the stats reported from CLIP paper

In the paper  cited by CLIP paper about FER-2013, it says "The resulting
dataset contains 35887 images, with 4953 “Anger” images, 547 “Disgust” images, 5121 “Fear” images, 8989 “Happiness” images, 6077 “Sadness” images, 4002 “Surprise” images, and 6198 “Neutral” images.". This is consistent with the numbers on Kaggle page but different than the number reported in CLIP paper.

Hi, thanks for pointing out some of the details we were cursory or missing; upon investigating, we found that:

Facial Emotion Recognition 2013: We noticed an error in the table generation script which reported smaller numbers than it's supposed to; you can use the official numbers. We had a similar issue with the UCF-101 dataset.
STL-10: We reported the average of the 10 pre-defined folds as provided by the official source
EuroSAT: We realize that the paper is lacking a critical reproducibility info on EuroSAT; given the lack of the official splits and to make a class-balanced dataset, we randomly sampled 500 train/validation/test images for each class. Below is the code for deterministically sampling those images.

root = f"{DATA_ROOT}/eurosat/2750"
seed = 42
random.seed(seed)
train_paths, valid_paths, test_paths = [], [], []
for folder in [os.path.basename(folder) for folder in sorted(glob.glob(os.path.join(root, "*")))]:
    keep_paths = random.sample(glob.glob(os.path.join(root, folder, "*")), 1500)
    keep_paths = [os.path.relpath(path, root) for path in keep_paths]
    train_paths.extend(keep_paths[:500])
    valid_paths.extend(keep_paths[500:1000])
    test_paths.extend(keep_paths[1000:])

We could’ve used a better setup such as mean-per-class using all available data and would rather encourage future studies to do so, while we note that the comparisons in the paper used this same subset across all models, so their relative scores can still be considered “fair”.

RESISC-45: Similar to EuroSAT, we used our custom split given the lack of an official one:

root = f"{DATA_ROOT}/resisc45"
seed = 42
paths = sorted(glob.glob(os.path.join(root, "*.jpg")))
random.seed(seed)
random.shuffle(paths)
if split == 'train':
    paths = paths[:len(paths) // 10]
elif split == 'valid':
    paths = paths[len(paths) // 10:(len(paths) // 10) * 2]
elif split == 'test':
    paths = paths[(len(paths) // 10) * 2:]
else:
    raise NotImplementedError

GTSRB: As @pj-ms found in GTSRB dataset issue #156, it turns out that we have used inconsistent train/test split.

@jongwook Thank you so much for sharing these details. I have two more detailed questions:
For datasets EuroSAT and RESISC45, in your experiments is seed=42 always used for a deterministic sampling?
From Table 9, the train size of RESISC45 is 3,150. I got train set with 3,150 images and validation set with 3,150 images with your code. Are they supposed to be added together to form total train size as 6,300?
We would like to set our benchmarking settings comparable to CLIP if possible. However, when I run sampled EuroSAT with a few models ( such as ResNet50, ResNet101, efficientnet_b0, and clip ViT-B/32), scores I got are all about 2.3~4.6% less than their equivalent in Table 10. And, RESISC45 scores with models mentioned previously are close to what in Table 10, but 5% higher on ViT_base_patch16_224.


give mention to 'Rancher Support Matrix' on installing RKE based on R…

…ancher version
K3s update
The K3s documentation is moving. Please file any issues or pull requests at https://github.com/k3s-io/docs instead.
For Rancher (product) docs only
When contributing to docs, please update the versioned docs. For example, the docs in the v2.6 folder of the rancher folder.
Doc versions older than the latest minor version should only be updated to fix inaccuracies or make minor updates as necessary. The majority of new content should be added to the folder for the latest minor version.

Moved to our new repo as https://github.com/rancher/rancher-docs/pull/216.


Update Whitepaper Files.md

Hi @DavidAJohnston I have included weight request. Can you check again. Thank you


InvalidProviderConfig Passbolt error in unlocking key

Describe the bug
I'm having trouble configuring the passbolt provider on external-secrets
When I deploy the SecretStore on my cluster with the passbolt provider configuration
I get this error :
InvalidProviderConfig: Unable to Unlock UserPrivateKey using UserPassword: gopenpgp: error in unlocking key: openpgp: invalid data: private key checksum failure

To Reproduce

OS: Ubuntu 24.04 ARM on Raspberry pi
Kube: k3s v1.30.2
external-secrets: helm chart v0.9.20
passbolt: helm chart v1.1.1 and app v4.9.0-1-ce

I've taken the example from the documentation
apiVersion: external-secrets.io/v1beta1
kind: SecretStore
metadata:
  name: passbolt
  namespace: toto
spec:
  provider:
    passbolt:
      host: [host]
      auth:
        passwordSecretRef:
          key: password
          name: passbolt-credentials
        privateKeySecretRef:
          key: privateKey
          name: passbolt-credentials

For the password, I use my account's passphrase, and for the privatekey, the private key generated by passbolt
Its credentials are base64 encrypted to be deployed in opaque secret on the cluster
Expected behavior
Screenshots
Additional context
I tested my passphrase and privatekey with the go script and my credentials work

Hello
I close the issue, I found my problem. It came from the way I generated my secret: passbolt-credentials
I did it by applying a secret with stringData and it worked


Gh-1083: Add deprecation notice to README

Related Issue

Resolve #1083

Codecov Report

Merging #1084 (ff8012d) into develop (d4f0498) will decrease coverage by 20.70%.
Report is 6 commits behind head on develop.
The diff coverage is n/a.

Additional details and impacted files

@@              Coverage Diff               @@
##             develop    #1084       +/-   ##
==============================================
- Coverage      45.29%   24.59%   -20.70%
+ Complexity       101        8       -93
==============================================
  Files             25        3       -22
  Lines            892      248      -644
  Branches          72       20       -52
==============================================
- Hits             404       61      -343
+ Misses           458      178      -280
+ Partials          30        9       -21

see 22 files with indirect coverage changes

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6550760...ff8012d. Read the comment docs.


Implement the DSP primitive.

For chips that have these capabilities, a DSP implementation has been added in the form of all the primitives described in the Gowin documentation (UG287-1.3.3E_Gowin Digital Signal Processing (DSP) User Guide), namely:

PADD9
PADD18
MULT9X9
MULT18X18
MULT36X36
MULTALU18X18
MULTALU36X18
MULTADDALU18X18
ALU54D

The most complex but also the most useful is the MULTADDALU18X18 primitive - it allows you to easily make a typical FIR filter, while all connections between these primitives in the chain will be implemented by direct fixed wires with minimal delay.
MULT36X36 are not combined into chains, but they have a different task - this primitive can be found in Linux SOCs.
Added examples (in the examples/himbaechel directory) that are based on the tiny Riscv demonstrating calculations using UART. Only the TXD pin is used (can be found in the specific .CST file for each board), so on the large computer side, only GND and RXD are enough. Port speed 115200, no parity, 8 data bits, 1 stop bit, linefeed only.
Picocom launch example:
picocom -l --imap lfcrlf -b 115200 /dev/ttyU0

The source code for the riscv test programs is provided along with the assembly instructions, but they are not built during the compilation of the examples due to additional compilers.
Implemented the combination of primitives into chains using wires CASO-CASI, SO(A, B)-SI(A, B), as well as SBO-SBI for PADD.

This is not a simple thing and the number of combinations of these building blocks is quite large so that I foresee the need for easy correction of detected errors, and therefore the code contains some repetition of pieces.
Non-optimality: as can be seen from the set of primitives, Gowin provides already indivisible combinations (for example Mult and Alu) that are well packaged and connected inside. However, there is one exception: pre-adders. PADD18 and PADD9 exist as separate primitives and that's how we currently code them, but it's actually a small piece inside the DSP block. Gowin packages them with other primitives, we don't currently.
So keep in mind that when using pre-adders, additional delay may occur and more DSP blocks will definitely be occupied compared to Gowin.
We will solve this issue in the next version of the DSP with a more sophisticated packaging algorithm when we are convinced of the correct functioning of the primitives in principle.

Super exciting! Hopefully I can find some time to test and review soon.

Another fun challenge is going to be to teach Yosys about these cells.
For reference, this seems to be how ecp5 handles it https://github.com/YosysHQ/yosys/blob/b9d3bffda5abcbc5356936a7192c4a3c2b427c3e/techlibs/ecp5/synth_ecp5.cc#L298-L302
what's a bit weird to me is why they seem to map $mul cells and leave $macc cells alone, while I would think you want to map $macc cells to, well, multiply accumulate cells. But maybe the idea is that the MUL18 is the fundamental building block and the rest is just macro cells?
But I don't think our ALU pass knows about PADD and ALU54 cells, so for stuff like FIR filters, generating some MULTALU cell sound more effective? wdyt @gatecat ?


Can't download Iqiyi.com

C:\Users\XXXXXi>C:\Users\XXXX\Desktop\youtube-dl.exe https://www.iqiyi.com/w_19rrzixid9.html --verbose
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['https://www.iqiyi.com/w_19rrzixid9.html', '--verbose']
[debug] Encodings: locale cp936, fs mbcs, out cp936, pref cp936
[debug] youtube-dl version 2021.12.17
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.19041
[debug] exe versions: none
[debug] Proxy map: {}
[iqiyi] temp_id: download video page
ERROR: Can't find any video; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpupik7c6w\build\youtube_dl\YoutubeDL.py", line 815, in wrapper
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpupik7c6w\build\youtube_dl\YoutubeDL.py", line 836, in __extract_info
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpupik7c6w\build\youtube_dl\extractor\common.py", line 534, in extract
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpupik7c6w\build\youtube_dl\extractor\iqiyi.py", line 352, in _real_extract
youtube_dl.utils.ExtractorError: Can't find any video; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Reproduces with git master, and with yt-dlp. Check that the issue here does not apply.
Otherwise changes similar to those suggested in https://github.com/yt-dlp/yt-dlp/issues/2740 may be needed.

Yes, that works:
$ python -m youtube_dl -v -F 'https://www.iqiyi.com/w_19rrzixid9.html'
[debug] System config: [u'--prefer-ffmpeg']
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-F', u'https://www.iqiyi.com/w_19rrzixid9.html']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Git HEAD: 774b346f9
[debug] Python version 2.7.18 (CPython) - Linux-4.4.0-210-generic-i686-with-Ubuntu-16.04-xenial
[debug] exe versions: avconv 4.3, avprobe 4.3, ffmpeg 4.3, ffprobe 4.3
[debug] Proxy map: {}
[iqiyi] temp_id: download video page
[iqiyi] ec8c2b94f499662aad70497ecb8e6b52: Downloading JSON metadata
[iqiyi] ec8c2b94f499662aad70497ecb8e6b52: Downloading m3u8 information
[iqiyi] ec8c2b94f499662aad70497ecb8e6b52: Downloading m3u8 information
[info] Available formats for ec8c2b94f499662aad70497ecb8e6b52:
format code  extension  resolution note
hls-0        mp4        unknown
hls-1        mp4        unknown    (best)
$

PR to appear.


Awesome library, but need help with "circles emitter" :-P

Well, I have to admit, this is awesome work. Easy to use implementation, documented source code. What more could we ask ? Well, there is always more ... ^^
Let's get straight to the point.
I have to draw an empty circle, which means we can only see the border (the membrane) of the circle and that's it.
This is the XML content that draws a circle :
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:innerRadius="0dp"
    android:shape="ring"
    android:thicknessRatio="5"
    android:useLevel="false" >
    <solid android:color="@android:color/transparent" />

    <stroke
        android:width="2dp"
        android:color="@color/yellow" />
</shape>

So now I can add in a XML View's background and there I have my circle.
What I am looking for is that the yellow membrane/border of this circle is supposed to emit the particles and have these particles being drawn to the center of the circle. Unfortunately, I don't have sample to provide to show what I am looking for.
So to be simple and precise, the particles are generated all around the circle, from the inner-side of the border (so not from outside !). These particles must move very very slowly and must be drawn to the center of the circle. Moreoever, the fastest particles are supposed to die before reaching the center.
I hope I am clear enough.
If I try to have a ParticleSystem emit on the circle's View, it will emit particles both inside and outside the circle, because the View containing the circle is a square. So the X&Y coordinates do not match the circle's...
Is there a way to accomplish this ?
Thanks !

Interesting, this is not currently supported, but you could make fork and tweak the library to add an initializer that takes a radius and spawns particles around that with a random angle.
The second part it to get attracted by the center. That should be a modifier or maybe an initializer where the acceleration depends on the angle.
Tricky, and not supported directly, but doable.

I found a way by creating multiple emitters around the circle, but performance is bad as there are too many emitters and too many particles.
Thanks for the idea :+1:


Cannot install using Python 3.12.1

The Python requirement in ./pyproject.toml is very restrictive, preventing installation on recent versions of Python.
ERROR: Ignored the following versions that require a different python version: 0.0.1a1 Requires-Python <3.12,>=3.10; 0.0.1a2 Requires-Python <3.12,>=3.10; 0.0.1a3 Requires-Python <3.12,>=3.10; 0.0.1a4 Requires-Python <3.12,>=3.10; 0.0.1a5 Requires-Python <3.12,>=3.10; 0.1.0 Requires-Python <3.12,>=3.10; 0.2.0 Requires-Python <3.12,>=3.10; 0.2.1 Requires-Python <3.12,>=3.10; 0.3.0 Requires-Python <3.12,>=3.10; 0.3.1 Requires-Python <3.12,>=3.10

Released a new package 0.3.2 with mitigating version requirements for Python 3.12.


fix: update utah address point data

for some reason our data is not showing up on the map. Let's try these new config params and see if that helps. Please provide feedback if it is indeed accurate.

That looks better! 🎉

Awesome!!

Looks good, thank you!


Multiple subscriptions/switching subscriptions.

So i have a single page react native application where i am trying to load multiple publications of the same collection. Each publication is filtered to a sub-set of the collection.
However as i am only able to subscribe to notifications of changes to the collection via DDP-Client rather than the subscription i have no way of feeding only that publications data through as my datasource to my scroll view.
The other method i have taken is to send a filter through as part of the subscription and reload the subscription when i want to show alternative data. Unfortunately this also doesn't seem to work, the existing subscription doesn't seem to get cleared when i recall the same subscription with a different filter parameter.
So, before i start doing some nasty client side filtering is there a way of doing this that i'm missing?
Help much appreciated!
Thanks
Gareth

Hey @gazzer82, this is definitely an issue to solve -- I've been playing around with minimongo-cache to address this. I've got a demo app with an implementation here. It helps with the filtering -- see the quick start section for how to use it. Keep in mind this is still experimental :grin:


Automatically treat nested modules as submodules

fixes #4286

(This ended up being way simpler than I realized now that we support #[pyo3(submodule)]. If I realized it was so simple I'd have rolled it into the original :-))


feat(uuid): add partition table uuid support

Pull Request template
Why is this PR required? What issue does it fix?: #621
What this PR does?: Add partition table uuid support
Does this PR require any upgrade changes?: No
If the changes in this PR are manually verified, list down the scenarios covered::

on CentOS 7 host: 🆗
on CentOS 8 host: 🆗
on Ubuntu 16.04 host: 🆗

Any additional information for your reviewer? :
Mention if this PR is part of any design or a continuation of previous PRs
Checklist:

[x] Fixes #621
[x] PR Title follows the convention of  <type>(<scope>): <subject>
[ ] Has the change log section been updated?
[x] Commit has unit tests
[ ] Commit has integration tests
[ ] (Optional) Are upgrade changes included in this PR? If not, mention the issue/PR to track:
[ ] (Optional) If documentation changes are required, which issue on https://github.com/openebs/openebs-docs is used to track them:

Codecov Report

Merging #635 (ca9ae23) into master (426eeaa) will decrease coverage by 0.54%.
The diff coverage is 12.82%.

@@            Coverage Diff             @@
##           master     #635      +/-   ##
==========================================
- Coverage   47.26%   46.72%   -0.55%
==========================================
  Files          78       78
  Lines        3781     3814      +33
==========================================
- Hits         1787     1782       -5
- Misses       1838     1879      +41
+ Partials      156      153       -3

Impacted Files
Coverage Δ

cmd/ndm_daemonset/probe/uuid.go
92.59% <0.00%> (-7.41%)
:arrow_down:

pkg/features/features.go
100.00% <ø> (ø)

pkg/partition/partition.go
30.26% <0.00%> (-11.56%)
:arrow_down:

cmd/ndm_daemonset/probe/addhandler.go
73.75% <35.71%> (-3.73%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 426eeaa...ca9ae23. Read the comment docs.

Hello @akhilerm ,comments resolved.

@cospotato Can you resolve the conflicts so that CI can be run

@cospotato Can you resolve the conflicts so that CI can be run

OK, I will fix it.

@akhilerm Can you show the the Better Code Hub report of  this branch. I will try to refactor it. I tried to analysis in my repo. But it show lots of bad code smell which do not contained in this commit.

@cospotato  The changes for dependent feature gates have been merged, Can you rebase those changes into this PR so that we can merge this.

@cospotato The changes for dependent feature gates have been merged, Can you rebase those changes into this PR so that we can merge this.

@akhilerm OK. I will rebase it. Thank you.

@akhilerm Dose you means exclude the changes in deploy/helm ?

@akhilerm Dose you means exclude the changes in deploy/helm ?

Yes

@z0marlin Thank you. Fixed


Pull Request template needs improving

The PR template doesn't really fit well with this project but the following improvements would make it more worthwhile

All PRs should reference an issue unless it's a trivial docs change. Say that in a comment and remove "if necessary". Add a tick box to the checklist.
Screenshots are rarely the right format in this project, but it would be good to see "before" and "after" terminal output. Change title and remove "if necessary"
Add link to Contribution guidelines: https://github.com/aquasecurity/kube-hunter/blob/master/CONTRIBUTING.md
Remove the tick box about meaningful commit messages, I don't think anyone would read this or go back and change their messages after the event
Remove the tick box about automated testing, since this is covered in CI/CD anyway
Add a tick box for "I have added automated testing to cover this case"
Add a comment asking the submitter to explain if they haven't ticked all the boxes.

@sidhyatikku

@lizrice I would like to get assigned to this issue.

Resolved by #242


Add a Enable Powershell Remoting button... somewhere

Maybe on main push, under the computername? or maybe in scan-host? or both

Nope, Push for MDT doesn't use PSRemoting and instead uses Cim infrastructure to do things. so no need for an Enable-PSRemoting button


Implementing Oriented Bounding Box feature

Search before asking

[X] I have searched the Pytorch-Wildlife issues and found no similar bug report.

Description
I would like to suggest an Oriented Bounding Box feature for the detector. Currently, all bounding boxes have parallel and perpendicular lines relative to the sides of the image. For an animal that is walking down, it would make the bounding box smaller and in the same orientation if this is implemented. https://docs.ultralytics.com/datasets/obb/
Use case
The best use case for this would be in animal re-identification Deep Learning models. They are very susceptible to pose changes, so having the animal in question always horizontal would be a good addition.
Additional
No response
Are you willing to submit a PR?

[ ] Yes I'd like to help by submitting a PR!

Hello @acse-dc1823, thanks for asking! This is a feature that will require specific annotations. If the data has this type of annotations, we can have visualization functions for such bounding boxes. However, the majority of the training data for MegaDetector are regular bboxes, therefore, it might be a little difficult to directly incorporate such feature to the current detection model. Maybe in the future, we will fine-tune a model with datasets of such type of bounding boxes.


Enforce asterisk alignment for C++ and ObjC pointers

So far we've been using the default mode of prevailing-in-file, which
means we aren't consistent within each language what mode we use. Now
that clang-format can identify ObjC headers (which didn't used to be the
case), we can enforce different styles for the two languages.
This sets left-aligned for C++ to match the Flutter engine, and
right-aligned for ObjC to match the prevaling Apple style.
No version change: automated whitespace-only change with no actual effect on clients.
No CHANGELOG change: uninteresting mechanical change.
Pre-launch Checklist

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I read the Tree Hygiene wiki page, which explains my responsibilities.
[x] I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/plugins repo does use dart format.)
[x] I signed the CLA.
[ ] The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
[ ] I listed at least one issue that this PR fixes in the description above.
[x] I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
[ ] I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
[ ] I updated/added relevant documentation (doc comments with ///).
[x] I added new tests to check the change I am making, or this PR is test-exempt.
[x] All existing and new tests are passing.

@jmagman A lot more code here was using left-aligned than I expected. I assumed we'd want to follow Apple's usual style, but we could also use left-aligned for everything (or as I like to think of it "correct" 😁 ); I leave it entirely up to you.

FWIW the google style guides for objc and c++ are agnostic to the placement of the asterisks.

FWIW the google style guides for objc and c++ are agnostic to the placement of the asterisks.

Google style is agnostic, but I've never been on a team that doesn't have a team-level convention for this in order to have local consistency.

sgtm, whatever you all want to do.  I renamed the PR since it sounded very scary, potentially having to do with memory alignment instead of code formatting =)

🤷🏻 "pointer alignment" is the name of the clang-format setting.

In the context of formatting code "pointer alignment" makes sense in the context of making changes to a codebase it is ambiguous and scary.  I imaging someone investigating a mysterious crash and that PR title jumping out at them.


Support transformation schema for XML

The PR introduces XML transformer.
An example of usage
Faker faker = new Faker();
System.out.println(
    new XmlTransformer.XmlTransformerBuilder<Name>().pretty(true).build()
        .generate(faker.<Name>collection().suppliers(faker::name).maxLen(1).build(),
                Schema.of(field("root",() -> Arrays.asList(field("firstName", Name::firstName), field("username", Name::username))))));

Result:
<root>
    <firstName>Danial</firstName>
    <username>arden.little</username>
</root>

Sorry, but what happened here?

Sorry, but what happened here?
I have rebased it. :) + I am going to add docs.

Ah, great! Cause the PR looked fine to me, I was confused :)


Bring back coverage for certain configuration (MacOS/headful)

In https://github.com/puppeteer/puppeteer/pull/9913 we removed the following combinations from the test matrix:
- os: macos-latest
   suite: chrome-headful
  - os: macos-latest
    suite: firefox-headful
 - os: macos-latest
    suite: firefox-headless

Those combinations were taking more time than other, sometimes taking 25-30 minutes to finished. We should re-enable them once they start taking 15 min or less due to optimisations or better hardware.

cc @whimboo

@OrKoN do you known / remember if there are specific tests that take way longer especially for Firefox? It might help us to experiment in GitHub CI with our profiler turned on to see what exactly takes that much longer.

@whimboo I believe it is the overall slowness and possibly the slowness of the startup.

Over on https://bugzilla.mozilla.org/show_bug.cgi?id=1818080 I'm going to add profile markers for the Firefox profiler. Once done for BiDi, Marionette, and CDP we could do some profiler runs in Github actions to see what might causing the slowdowns. Especially if it's related to our CDP implementation or if it is a Firefox core issue.


TCP_Server opens 2 connections

Godot version:
Tried Beta 1, Beta 3, Stable 1.1
OS/device including version:
Windows 10 1903
Issue description:
I am trying
Steps to reproduce:
Minimal reproduction project:

Duplicate of #34151


Use graphql github api

https://developer.github.com/v4/guides/
Needs more research but should allow us to get more unauthenticated requests, as we can get all the data with one request.

Oooh, that looks interesting. Would that be of any use to the ProcBots framework too @hedss ?
(apologies if it's something you're already aware of / something you've already looked at)

It's on my radar, but I've no immediate plans to move to it (longterm, yes). There aren't any decent (from when I last looked) NPM based APIs for Github atm. The appeal of retrieving multiple sets of data in one query is extremely appealing, however.

Currently you have to use a gh token for every graphql request so it doesn't help me in this case, if you are going over the limits, the graphql rate limits are based on the number of resources queried, so it's hard to calculate allows more queries. However graphql api should also make things quicker because of the number of requests, but no big wins in terms of unauthenticated requests. cc @hedss.

@craig-mulligan Cheers Craig, that's really good to know. :+1:


Dependabot added

Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please delete options that are not relevant.

[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[x] This change requires a documentation update

Checklist:

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

Hello @Tushar98644!
Thank you for submitting this pull request Your pull request will be reviewed by maintainers shortly. Meanwhile make sure you have referenced the respected issue in this pr Your pr will not be merged if it does not refer respected pr and have read our Contributing Guidelines https://github.com/UBA-GCOEN/StichHub/blob/main/CONTRIBUTING.md And Code of Conduct https://github.com/UBA-GCOEN/StichHub/blob/main/CODE_OF_CONDUCT.md

Kindly review @Naresh-chandanbatve

Hello @UBA-GCOEN!
Thank you for submitting this pull request Your pull request will be reviewed by maintainers shortly. Meanwhile make sure you have referenced the respected issue in this pr Your pr will not be merged if it does not refer respected pr and have read our Contributing Guidelines https://github.com/UBA-GCOEN/StichHub/blob/main/CONTRIBUTING.md And Code of Conduct https://github.com/UBA-GCOEN/StichHub/blob/main/CODE_OF_CONDUCT.md

Hello @Naresh-chandanbatve!
Thank you for submitting this pull request Your pull request will be reviewed by maintainers shortly. Meanwhile make sure you have referenced the respected issue in this pr Your pr will not be merged if it does not refer respected pr and have read our Contributing Guidelines https://github.com/UBA-GCOEN/StichHub/blob/main/CONTRIBUTING.md And Code of Conduct https://github.com/UBA-GCOEN/StichHub/blob/main/CODE_OF_CONDUCT.md


Slugs are not unique

Hello,
I know that slug is meant to be unique because I could save a post with the same title and it generates the same slug  which leads to a confusion  when getting a record by slug from the database
Is this a potential quick fix?
Any ideas where to look and what to do?
Any help will be appreciated.

Yeah I guess str_slug needs to be replaced :)

and if anyone wants to use cviebrock eloquent sluggable we can use a technique by Tabacu (Author of backpack). Here is commit
https://github.com/Laravel-Backpack/CRUD/commit/1fd26a92d76c6694056b27d657943ba715765c29

I guess this issue is fixed with recent commits :)


load causes the program to be busy waiting.

I have a dynamic library written in C++ that can be used on Windows/Linux platforms.
I export the symbols I need by:
#if defined(PLATFORM_WINDOWS)
	#define WRAPPER_API extern "C" __declspec(dllexport)
#elif defined(PLATFORM_LINUX)
	#define WRAPPER_API extern "C" __attribute__((visibility("default")))
#else
	#error "unknown platform"
#endif

After that, I was able to find my exported symbols with the following command:
# windows
dumpbin /exports my_library.dll

# linux
nm --dynamic libmy_library.so

I use electron+typescript to write my program.
Everything was fine up to this point, it worked fine on Windows. Until I tried to use it on Linux/Ubuntu:
import koffi from "koffi"

const my_library = koffi.load(my_library_abs_path)

The program seems to be unresponsive, but I can find that the program process still exists.
After debugging, I found that the program stops here:
// https://www.npmjs.com/package/koffi/v/2.8.4?activeTab=code => index.js

var load = module.exports.load;
module.exports.load = (...args) => {
  let lib = load(...args); // <---------- see here
  lib.cdecl = util.deprecate((...args2) => lib.func("__cdecl", ...args2), "The koffi.stdcall() function was deprecated in Koffi 2.7, use koffi.func(...) instead", "KOFFI003");
  lib.stdcall = util.deprecate((...args2) => lib.func("__stdcall", ...args2), 'The koffi.stdcall() function was deprecated in Koffi 2.7, use koffi.func("__stdcall", ...) instead', "KOFFI004");
  lib.fastcall = util.deprecate((...args2) => lib.func("__fastcall", ...args2), 'The koffi.fastcall() function was deprecated in Koffi 2.7, use koffi.func("__fastcall", ...) instead', "KOFFI005");
  lib.thiscall = util.deprecate((...args2) => lib.func("__thiscall", ...args2), 'The koffi.thiscall() function was deprecated in Koffi 2.7, use koffi.func("__thiscall", ...) instead', "KOFFI006");
  return lib;
};

I don't know how to find the cause of this problem (I have only very shallow knowledge of js/ts), and the debugger can't step into load(.... .args).
We need more informations here :(
https://github.com/Koromix/rygel/blob/281eb07648595fc60a56b280653e795b1c564826/src/koffi/src/ffi.cc#L1604-L1618

https://github.com/Koromix/rygel/blob/281eb07648595fc60a56b280653e795b1c564826/src/koffi/src/ffi.cc#L1604-L1618
We need more debugging information here :(

Can you try again with Koffi 2.8.5 (just released) and see what happens?

Can you try again with Koffi 2.8.5 (just released) and see what happens?

It's still not working, as usual.
My shared library path is roughly as follows.
/home/my_name/my_project/node_modules/electron/dist/libs/libmy_library.so

I have checked that the target file exists before load.
We need a way to get more error messages.

I'm a pure C++ developer and only recently learned electron+typescript for some reason. It's too hard for me to compile your koffi, there are lots of errors that I can't solve 😿

Could you send me code code of the shared library of at least the shared library?
If private, send it here<EMAIL_ADDRESS>

Also, I agree that it is not clear how to build Koffi.
The build process uses CMake but through a wrapper command. Running CMake directly won't work.
I have added a check to the CMake script to error out if it is called directly, and some pointers in the Koffi README file to the proper build instructions.
But the instructions are easy (just one command, basically), it is documented here:
https://koffi.dev/contribute#build-from-source
Also, use the koffi2 branch for tests. The master branch contains code for Koffi 3.0 which changes a bunch of things.

before:
MY_(C++)PROGRAM -> link:
shared_library_a(C++)
shared_library_b(C++)
shared_library_c(C++)
shared_library_d(C++)
shared_library_e(C++)

now:
MY_(electron+typescript)PROGRAM -> link:
my_shared_library(C++)

my_shared_library -> link:
shared_library_a(C++)
shared_library_b(C++)
shared_library_c(C++) // <--- If my_shared_library does not link this library, the program will run normally.
shared_library_d(C++)
shared_library_e(C++)

I tried to add the following function to my_shared_library:
__attribute__((constructor)) void on_load()
{
	write_message_into_a_file("loaded");
}

__attribute__((destructor)) void on_unload()
{
	write_message_into_a_file("unloaded");
}

I find that messages are written to the file only when I don't link shared_library_c.
Maybe load could output some error messages?
https://github.com/Koromix/rygel/blob/281eb07648595fc60a56b280653e795b1c564826/src/koffi/src/ffi.cc#L1607-L1616
https://github.com/Koromix/rygel/blob/281eb07648595fc60a56b280653e795b1c564826/src/koffi/src/util.hh#L91-L102

It does. If dlopen() fails, this code uses dlerror() to get an error message from the libc/OS and then throws it as a JS exception.
There was a small error in the handling code in Koffi before 2.8.4 which could maybe trigger an infinite loop but this would happen very rarely (maybe never), if the error message somehow is empty or only contains colons or spaces, because of this while loop. Even then it would probably crash and not go into an infinite loop. Besides, this is fixed in Koffi 2.8.5.
However it appears you are getting stuck in dlopen(). After a shared library is loaded to memory, its constructors will be run (such as global and static C++ variables constructors) before dlopen() returns.
This means there are various ways for dlopen() to deadlock than I can think of:

Some kind of deadlock in the library or one of its dependencies: mutex deadlock, a condition variable that is never signaled, etc.
Some problem related to static order initialization fiasco, where one constructor somewhere is waiting for something that never comes true.
The shared library or one of its dependencies tries to dlopen() in a constructor (not sure about this one, this depends on how glibc or musl handle recursive dlopen).

This would not be related to Koffi. It is also possible that something in the Node.js environment is making one of your library dependencies block somehow.
I suggest you try loading your library with these two pieces of C code, without going through Koffi, to see how it goes:
// This one tries to statically link to your library.
// Run it to see if it works or blocks.

// Compilation: gcc -ggdb -o load_static load_static.c ./mylib.so
// Run: gdb ./load_static

#include <stdio.h>

int main(int argc, char **argv)
{
    printf("Hello world\n");
    return 0;
}

And the dynamic (dlopen) variant:
// This one tries to load your library with dlopen(), like Koffi does.
// Run it to see if it works or blocks.

// Compilation: gcc -ggdb -o load_dynamic load_dynamic.c
// Run: gdb ./load_dynamic

#include <stdio.h>
#include <dlfcn.h>

int main(int argc, char **argv)
{
    void *lib = dlopen("./mylib.so", RTLD_NOW | RTLD_LOCAL);
    if (!lib) {
        fprintf(stderr, "Failed to load library: %s\n", dlerror());
        return 1;
    }
    dlclose(lib);

    printf("Hello world\n");
    return 0;
}

It does. If dlopen() fails, this code uses dlerror() to get an error message from the libc/OS and then throws it as a JS exception. Try to load a file that does not exist, for example, with koffi.load('./missing.so').
There was a small error in the handling code in Koffi before 2.8.4 which could maybe trigger an infinite loop but this would happen very rarely (maybe never), if the error message somehow is empty or only contains colons or spaces, because of this while loop. Even then it would probably crash and not go into an infinite loop. Besides, this is fixed in Koffi 2.8.5.
However it appears you are getting stuck in dlopen(). After a shared library is loaded to memory, its init functions and its constructors (such as global and static C++ variables constructors, and functions marked with __attribute__((constructor))) will be run before dlopen() returns.
This means there are various ways for dlopen() to deadlock than I can think of:

Some kind of deadlock in the library or one of its dependencies: mutex deadlock, a condition variable that is never signaled, etc. during initialization (in a global constructor, a constructor function, etc.).
Some problem related to static order initialization fiasco, where one constructor somewhere is waiting for something that never comes true.
The shared library or one of its dependencies tries to dlopen() in a constructor (not sure about this one, this depends on how glibc or musl handle recursive dlopen).

This would not be related to Koffi. It is also possible that something in the Node.js environment is making one of your library dependencies block somehow.
I suggest you try loading your library with these two pieces of C code, without going through Koffi, to see how it goes:
// This one tries to statically link to your library.
// Run it to see if it works or blocks.

// Compilation: gcc -ggdb -o load_static load_static.c ./mylib.so
// Run: gdb ./load_static

#include <stdio.h>

int main(int argc, char **argv)
{
    printf("Hello world\n");
    return 0;
}

And the dynamic (dlopen) variant:
// This one tries to load your library with dlopen(), like Koffi does.
// Run it to see if it works or blocks.

// Compilation: gcc -ggdb -o load_dynamic load_dynamic.c
// Run: gdb ./load_dynamic

#include <stdio.h>
#include <dlfcn.h>

int main(int argc, char **argv)
{
    void *lib = dlopen("./mylib.so", RTLD_NOW | RTLD_LOCAL);
    if (!lib) {
        fprintf(stderr, "Failed to load library: %s\n", dlerror());
        return 1;
    }
    dlclose(lib);

    printf("Hello world\n");
    return 0;
}

I suggest you run these examples with gdb and it if blocks, interrupt it and get a backtrace (with bt).
You could also try running these examples with valgrind (with helgrind tool) to detect deadlocks or related issues: valgrind --tool=helgrind ./load_dynamic.

Static links work fine. But dlopen causes the program to be unresponsive.
#include <iostream>
#include <dlfcn.h>

int main()
{
	std::cout << "hello world\n";

	auto* library = dlopen("/home/my_name/my_project/out/build/linux-x64-Debug-GCC/bin/libmy_project.so", RTLD_NOW | RTLD_LOCAL); // <--- frozen here
	if (library == nullptr)
	{
		const auto error = dlerror();
		std::cout << "load failed: " << error << '\n';
	}
	else
	{
		std::cout << "load succeed\n";
		dlclose(library);
	}
}


Deprecate 1.20

Issue #, if available:
Deprecate 1.20
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/lgtm
/approve


CLI fails to run any command

Describe the bug
The CLI does not work anymore because the argument parsing throws an exception
Stack trace
$ npx mikro-orm migration:create
TypeError: Cannot read properties of undefined (reading 'length')
    at /home/jlario/projects/8belts-api/node_modules/.pnpm/@mikro-orm+cli@5.7.0_@mikro-orm+migrations@5.7.0_@mikro-orm+mysql@5.7.0_@mikro-orm+postgresql@5.7.0_pg@8.10.0/node_modules/@mikro-orm/cli/cli.js:14:16

To Reproduce
Steps to reproduce the behavior:

Run any CLI command, for example, npx mikro-orm migration:create

Expected behavior
Command runs
Additional context
From what I've been able to investigate, a Promise return value from yargs.parse() is not being awaited. See here:
https://github.com/mikro-orm/mikro-orm/blob/ed5f7782264ce9c710bab73b242730d3155406a8/packages/cli/src/cli.ts#L14
Versions

Dependency
Version

node
18.16.0

typescript
5.0.4

mikro-orm
5.7.0

Oops, I was expecting something from the yargs upgrade :] Thanks for the report, will fix this later today and ship a new stable.
PR welcome, if you are interested and have some spare time now, but this is quite critical so want to have it fixed during today.

Thanks for the quick reaction.
Am I interpreting it correctly that the bug was reported for 5.7.0, has been fixed, but there is no release since (I'm seeing 5.7.1-dev.2 as next)?
Thanks

Yes, exactly, didnt have time yesterday after work, will do it today.


Add QT token

Official announcement:  http://quantifyglobal.xyz/
Project team background:
Quantify Global project team has a very experienced team of senior experts, and the team members have many years of experience in the financial and blockchain industry. CEO Joson Yeo, Rich technical experience and project management experience, research fields include cryptography, introduction to algorithm, block chain principle, design, application and actual combat. Good at technical public relations, research, improvement and innovation, system architect background, design and implementation of large-scale concurrent control layered server architecture.At present, he is the chief operation and technical director of the company, leading the research and development of the underlying technology of the new public chain.
Project basic information:
Quantify Global is a one-stop quantitative trading platform for global digital currency, dedicated to building a global leading digital asset financial ecological environment of data, strategy and transaction.With its own high-performance public chain as the infrastructure, combined with the top community composed of global technology and financial elites, it provides customers with comprehensive, safe, convenient and professional asset management and value-added services in the field of digital currency. Its business scope covers savings, investment banking, insurance trust, futures, investment management and wealth management in the field of digital currency, and promotes digital currency investment Development in the field of capital.
Recommended Gas Limit (For ERC-20 project teams) for transaction: 60,000

欢迎在社区中推荐用户使用 imToken 2.0 管理资产。