Rou3 incorrect matching strategy

Environment
Bun
Reproduction
import { createRouter, addRoute, findRoute } from "rou3";

const router = createRouter();

addRoute(
  router,
  "get",
  "/files/:dir/:filename.:format,v:version",
  "Mixed route"
);

console.log(findRoute(router, "get", "/files/demo.yaml.dart,v1"));

Describe the bug
It is due to https://github.com/unjs/rou3/blob/main/src/operations/find.ts#L62 Resulting from incorrect behavior!
Under normal circumstances, this route should not have any matching results!
Additional context
No response
Logs
14 |   for (const [index, name] of paramsMap) {
15 |     const segment = index < 0 ? segments.slice(-1 * index).join("/") : segments[index];
16 |     if (typeof name === "string") {
17 |       params[name] = segment;
18 |     } else {
19 |       const match = segment.match(name);
                         ^
TypeError: undefined is not an object (evaluating 'segment.match')
      at getMatchParams (/Users/seven/workspace/test/node_modules/rou3/dist/index.mjs:19:21)
      at /Users/seven/workspace/test/node_modules/rou3/dist/index.mjs:113:29
      at map (:1:11)
      at /Users/seven/workspace/test/demo.ts:26:13

Bun v1.1.18 (macOS arm64)

The root cause of the bug 👉 https://github.com/unjs/rou3/issues/84#issuecomment-2226853375

with https://github.com/unjs/rou3/pull/123 last segments will be required unless specified with * or ** (optional), i hope you are happy with this middle ground solution.

Thanks for sharing testing result. I belove you might want to register /demo/:name + /demo routes in case above and /demo will be matching base:
import { createRouter, addRoute, findRoute } from "rou3";

const router = createRouter();

addRoute(router, "get", "/demo/:name", 1);
addRoute(router, "get", "/demo", 2);
addRoute(router, "get", "/demo/**", 3);

console.log(findRoute(router, "get", "/demo")); // 2
console.log(findRoute(router, "get", "/demo/test")); // 1 name: test
console.log(findRoute(router, "get", "/demo/test/bar")); // 3 _: test/bar

We could actually do more extensive runtime checks to iterate all array but it will cause performance degradations.
Please let me know if found any other issues 👍🏼

@pi0 Thank you for your reply, but there are some special circumstances when using Rou3 downstream.
Developers often allow mechanisms to override routing (although this should not happen as developers), but typically web framework developers allow their users to tolerate such error issues. When registering routes repeatedly, it should be indicated that this is an override behavior (unless otherwise specified).
I found that the specificity of using rou3 as a middleware in the UnJS ecosystem (H3) may be in line with this feature, but H3 also allows for the generation of this mechanism, which only matches the first data at a time without clear indication. As a result, routes that have been repeatedly registered are not included in the matching content, but the corresponding content has been saved.
This seems to be a waste of memory.

We store all cases in an array for the purpose of pattern matching findAllRoutes where we want all possibly matching routes.

I think issuing a warning message is a great solution


Make oidc-react compatible with Next.js and SSR

This PR aims to make the library compatible with Next.js and server-side rendering, where the window object is not available. Basically, if you don't provide a location of your own to AuthProvider and window is undefined, AuthProvider will return its children without doing anything. In Next.js, you will instead get authenticated on the subsequent client-side hydration.
fixes #340
fixes #329

Thanks for this! 🎉
I think we'd like some examples/guides on this (not needed to merge this issue of course), but if you'd like; I would love to get some sample repository or a new PR with a guide. There's a lot of questions related to SSR; so great addition! Thank you!

Btw, @gustavlrsn. Check out #329 on the SSR implementation. I'd love to get some feedback from you about your testing :)

I'm unsure about whether or not this truly fixes this for SSR. It may at least help it compile, which would allow folks to continue debugging it.
Only thing I would note is that the React.Fragment notation used was added somewhat recently, I think? I don't know what the minimum React version for oidc-react is, but that <> fragment notation likely ups it to something somewhat recent (within the past year or so?)

Yeah, this does not actually fix proper SSR, but rather make it possible to wait on the client-side render. I did run into some other issues though which made me try out another library, specifically I wanted to save the token in a cookie so that it would be available on the server, but could not get this to work. Also had a Error: no matching state found in storage error occasionally.
I found that the @auth0/nextjs-auth0 library is actually not specific for auth0 like the name and documentation might imply, but rather a standard OIDC implementation for Next.js (utilizing Next.js API routes). It works great and makes the session available server-side. This is what I would recommend for Next.js and OIDC.
Feel free to close this PR since I don't think it is ready yet, and might be a lot of work to actually get SSR to work properly.


Feature: Sync to livesplit split index to allow the program to sync with split changes in livesplit

Right now the autosplit always assumes it's correct. If it misses a split and you manual split it will be out of sync. Should be possible to sync to the Livesplit index, so if it misses a split and you manual, or if you choose to skip a split it will sync.

Added in 5689ba5c452bdf975f652e6a18de3efde5abfd1a


Fix memory leak in CFBundle_Executable.c

@swift-ci please test

Please add a better commit message than 'Fix memory leak'.  How was this detected?  What scenarios did it occur under?  Seems like this is the non-Windows Swift path, which means that Darwin would not be impacted?

Please add a better commit message than 'Fix memory leak'. How was this detected? What scenarios did it occur under? Seems like this is the non-Windows Swift path, which means that Darwin would not be impacted?

Found with Xcode static analyser.
On line 85 call CFURLCreateWithFileSystemPathRelativeToBase returns object with +1 retain count according to Create rule.

Found with Xcode static analyser.
On line 85 call CFURLCreateWithFileSystemPathRelativeToBase returns object with +1 retain count according to Create rule.

This should be added to the commit message, not a PR comment which will be lost after merge.
Personally, I would prefer it as a comment at the appropriate location in the code.

@valeriyvan yes, I was able to infer that from reading the code (the path that leaked the CFURL) - but that information belongs in the commit message so that someone going through the history doesn't need to reconstruct every bit of detail from the diff.

Personally, I would prefer it as a comment at the appropriate location in the code.

File CFBundle_Executable.c has 46 calls of CFRelease. No-one is commented. Why exactly this one should be commented? This is trivial bug. Someone just forgotten that retained object should be released. I don't see any reason why this call of CFRelease deserves to be commented.

The commit message should be reworked.

Updated commit message

Might be nice to actually follow git suggestions for formatting commit messages.

Fixed commit message.

@swift-ci please test


Turn off adaptive resampling to fix the discontinuities in the zoomed…

… out vector tiles. The discontinuity arises because the lower border of the upper tile gets adaptively resampled and follows a great arc, whereas the upper border of the lower tile does not. Turning off adaptive resampling means that a straight line is drawn for the border of each and they fit together, in the mercator projection. This might lead to artifacts near the polar regions or in other projections, but seems to work fine for most of the world using the mercator projection.

:+1:


[BUG] i have some bugs from custom components is not show element

i use angular 10 then i user angular form io newest,

history
i follow https://github.com/formio/angular-formio/wiki/Custom-Components-with-Angular-Elements for custom element
but

on this show button component
after drag & drop to right side

preview at builder not shown
please help, i want learn this library
thanks

the code is same but different version angular, because at angular 10 entryComponent is deprecated,
so i skip step add on entryComponent,

done, cause i overwrite FormioModule at another module


HTTP 500 when a browser makes a websocket connection in conjunction with Accept-Encoding: gzip header

A browser (at least chrome does it) usually sends an Accept-Encoding: gzip header with every request. For example:
GET /some-websocket-endpoint HTTP/1.1
Connection: Upgrade
Upgrade: websocket
Accept-Encoding: gzip, deflate, sdch, br

Now I am running fabio with gzip compression enabled and when i execute the example request fabio responds with a 500 error. It's not the upstream server sending the 500, but fabio. The error response is sent from here:
https://github.com/fabiolb/fabio/blob/master/proxy/http_raw_handler.go#L28
The reason this is failing is that w can't by type-cast (or how it's called in Go slang) to an http.Hijacker, as w is a GzipResponseWriter.
I am not sure if it's a proper fix, but what I've done to make it work was to modify the acceptsGzip function like this:
func acceptsGzip(r *http.Request) bool {
	return (strings.Contains(r.Header.Get(headerAcceptEncoding), encodingGzip) &&
		!strings.Contains(r.Header.Get("Upgrade"), "websocket"))
}

Is this on master? I think I've touched this code recently. I'll have a look later tonight.

Yes I can reproduce this on master

I was experimenting with master, because a similar issue regarding 500 errors and Websockets has been fixed recently and I was hoping that would solve my problem as it sounded very much like the same problem I am having. However, as you can see it was not the case.

I'll fix that tonight

I've pushed a fix that I think should fix this. Still need to write a test. Could you test this, please?

I appreciate your fast reaction! Unfortunately, the fix did not seem to help. For reference, I am running fabio with these parameters:
./fabio  -proxy.gzip.contenttype='^(text/.*|application/(javascript|json|hal+json|xml)|.*\+(json|xml))(;.*)?$'
Then I am doing the problematic request:
nc localhost 9999 < /failing-request
GET /channel2/sockjs/564/c4dvdxat/websocket HTTP/1.1
Host: localhost:9999
Connection: Upgrade
Upgrade: websocket
Accept-Encoding: gzip, deflate, sdch, br

I've added a fmt.Println() at the same location described above (http_raw_handler.go#28) and it indeed is running into the "not a hijacker" block again.

Here's how you can reproduce the problem:

run python -m http.server 1234
create file upsteam.json:{ "service": { "name": "upstream", "port": 1234, "tags": ["urlprefix-/upstream"], "check": { "id": "upstream",
"http": "http://localhost:1234", "interval": "10s", "timeout": "1s" } } }

run consul agent -dev -config-file=upstream.json
runfabio  -proxy.gzip.contenttype='^(text/.*|application/(javascript|json|hal+json|xml)|.*\+(json|xml))(;.*)$'

run nc localhost 9999 < failing-request  (for contents of failing-request see previous comment)

It was worth a shot. I'll add a proper test and fix it. I've got a long weekend ahead so this will probably happen next week - just to set expectations.

Fixed it in the wrong place. The new patch should fix it.
Also, the websocket lib I'm using for testing doesn't make it easy to set headers. Therefore, writing a test requires a bit more work. I need to replace it anyway but I was able to reproduce the behavior with curl and the --compressed flag.
Could you have another look, please?

I can confirm now that the fix is working. Thank you very much!

Cool. I'll write a test and merge it.


error creating the example

go-lambda create --role arn:aws:iam::account-id:role/lambda_basic_execution handler github.com/xlab/go-lambda/example
unknown shorthand flag: 'b' in -buildmode
See 'docker build --help'.
docker.go:59: exit status 125

Hi, please re-run with --verbose option, also share your environment details.


want disable text selection. but after change "disableTextLayer": to true, still can select text

Attach (recommended) or Link to PDF file here:
Configuration:

Web browser and its version: Qt webkit
Operating system and its version: win10
PDF.js version: 1.10.88
Is a browser extension:

Steps to reproduce the problem:
1.
2.
What is the expected behavior? (add screenshot)
i want disable text selection, so i disable text layer rendering by edit view.js, change "disableTextLayer": to true, but not working, i still can select text...
What went wrong? (add screenshot)
Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):

i want disable text selection, so i disable text layer rendering by edit view.js, change "disableTextLayer": to true, but not working, i still can select text...

Without any information regarding how exactly you're attempting to set disableTextLayer to true, there's unfortunately nothing we can do to help here!
As requested in both ISSUE_TEMPLATE.md and CONTRIBUTING.md, for issues with custom implementationd of PDF.js, please provide a complete (and runnable) example in order for the issue to be valid.

Closing since not enough information is provided. Try looking into how the mobile example works, because that uses the disableTextLayer flag: https://github.com/mozilla/pdf.js/blob/c26e49724400fb2c463f3348c8322daefc9539ed/examples/mobile-viewer/viewer.js#L25. If you're using the default viewer, try setting https://github.com/mozilla/pdf.js/blob/af71ea7a7dcb8cbb3d710a73584a0de8d65e5a96/web/default_preferences.json#L13.


discord: 0.10 -> 0.11

Motivation for this change
Discord 0.10 does not start any more as there is a newer version available.
Things done
Bumped to the current version 0.11.

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

discord 0.11 is already on master
Thanks for making the PR though :)

Was changed in https://github.com/NixOS/nixpkgs/commit/ded6c3db4ef5a2c50c033eeed7cd8c688369c137


[1.15.2] Deletes mods

When I use this everything works just fine but also half my mods are deleted out of the mods folder of my instance. (The uploaded client and server file still containe all mods.)

I cannot reproduce this, could you give me steps to reproduce it please?

I downloaded the latest ModpackUploader Version unziped it and moved all files into my Modpack Instance folder.
It's a 1.15.2 modpack
The .build.json: https://pastebin.com/SiKKB2Nn
The settings.ps1: https://pastebin.com/mt22HBZZ
Then I just started the ModpackUploader.bat
A .zip for the client and one for the server were created, uploaded and also placed inside my Instance folder. They contained all mods.
From the mod folder of the Instance ~50% of the mods were removed. Tried this twice and the mods that were deleted were different mods both times.

Don't include "mods" in the .build.json, it does that on it's own :)

Other than that, I don't know what could cause this, I'll have a look this evening if fixing the .build.json doesn't help.

Should I also remove the "mods" from the Server Contents to zip in settings.ps1?

Nope :)

Any update on this issue?

Not yet. Haven't got the time to test it again. Not sure if I will be able to today. Tomorrow for sure.

Removing the "mods" folder from the .build.json did the thing I think. No mod files got removed this time

Awesome :)

I can't do anything about that I'm afraid, the TwitchExportBuilder repo is archieved, so I can't make a bug report.

I just saw that the settings-linux.cfg is not in the generated server pack.
Maybe I just missed a setting for that.

$CONTENTS_TO_ZIP = @("mods", "config")
Everything you want in the server files go into that setting


Error: The type 'FileIOPermission' exists in both, System.Security.Permissions and mscorlib

Hi,
after installing Amazaon GameLift Server SDK 5.1.0, I get the error:
Library\PackageCache\com.unity.services.core@1.12.0\Editor\Core\Configuration\ProjectConfigurationBuildInjectorWithPlayerProcessor.cs(51,50):  error CS0433: The type 'FileIOPermission' exists in both 'System.Security.Permissions Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' and 'mscorlib Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089'
System.Security.Permissions Version=<IP_ADDRESS> is used by Amazaon GameLift Server SDK 5.1.0.
mscorlib Version=<IP_ADDRESS> seems to be part of Unity or .Net
<EMAIL_ADDRESS>is used by "com.unity.services.cloud-diagnostics 1.0.6"  and  "com.unity.purchasing 4.10.0"
What can I do? (Without removal of cloud-diagnostics and purchasing package)

Hi, are you using a compatible Unity editor (2021.3 LTS, 2022.3 LTS)? Please have Windows Dedicated Server Build Support module installed by going to Unity Hub -> Installs -> click on the gear button on the right of your editor -> Add modules and see if the issue resolves!

Hi @wenxiul , thx for your answer!
I'm using Unity 2022.3 LTS and want to build for Linux Server.
And I have all modules installed, including "Windows Dedicated Server Build".
But this did not solve my problem. What I did was, to setup it on my own, with downloading the required dll's from nuget and for System.Security.Permissions.dll I unchecked "Auto Reference", which did the trick.

Hello, I got a same problem.
How can I fix it?


not compiling with node 10

Hi,
debian is moving to node 10.15, but node-groove needs some fixes.

Also (as would be expected) doesn't compile with node 14

I'm really disappointed - this project does exactly what I need, but it - and it's parent project libgroove, have been dead since some time in 2017 and there's a lot of work needed to bring both back - work that's outside of my areas of expertise.
It's a shame, there really doesn't seem to be much of a 'drop-in' replacement that I can really leverage either.

It's a shame, there really doesn't seem to be much of a 'drop-in' replacement that I can really leverage either.
There is nothing even remotely close to this library that I know of. @gilphilbert Did you find any package that suits your needs?


add ZoneApi.iterateByName

For those who do not use multiple zone names, it should be possible to more easily lookup a zone by its name than the current search pattern:
zone = tryFind(zoneApi, Zones.nameEqualTo(zoneName)).orNull();

Having a method that returns all zones with a specific name can make this a bit easier, and possibly with less server-side impact.
zone = getNext(zoneApi.iterateByName(zoneName), null);

/**
 * Iterates across all zones with the specified {@code zoneName}, returning
 * their name and id (when present). Implementations are lazy when possible.
 * If there are no zones with the {@code zoneName}, the iterator will be
 * empty.
 */
Iterator<Zone> iterateByName(String zoneName);

done


excludeFiles doesn't work on windows

Running from cli from project directory:
"excludeFiles": ["public/js/views/subviews/**"] - doesn't work
"excludeFiles": ["C:/Projects/XXXXXXX/public/js/views/subviews/**"] - works

Where is your config located?

I'm using .jshintrc file and its located in C:/Projects/XXXXXXX/

.jshintrc? Not .jscsrc?

.jscsrc :) sorry for mistake

@aju have you tried "excludeFiles": ["./public/js/views/subviews/**"], also did you install jscs globally, or locally to your project?

I tired globally and locally (node node_modules/jscs/bin/jscs PATH). I tried with "./" at beginning no luck :(

@aju Please provide jscs -v, I can't repeat that with v1.11.2

1.11.2 win7 :(
Same files and same command on linux works as expected :/

Thanks. Feels like it will be hard.
Can you provide some additional information? Maybe spaces in path or something else?

Fixed. I was testing on node 0.11.X (unstable) updated to 0.12 (stable) and it works :)
Sorry for all the fuss.

Nice to know! Interesting bug.

Yeah - I think it was something wrong with cwd but haven't checked in details

Yea, looks like. Anyway, thanks for details and contribution. ;-)


Adding 2048 game

PR Description 📜
I am added new game 2048game.please review and merge it.
If any changes required please tell me :).This issue is assigned to me under Gssoc2023 and My issue number is #530
Fixes #530

Mark the task you have completed ✅

[ x] I follow CONTRIBUTING GUIDELINE & CODE OF CONDUCT of this project.
[x ] I have performed a self-review of my own code or work.
[x ] I have commented my code, particularly in hard-to-understand areas.
[ x] My changes generates no new warnings.
[ x] I have followed proper naming convention showed in CONTRIBUTING GUIDELINE
[ x] I have added screenshot for website preview in assets/images
[x ] I have added entries for my game in main README.md
[ x] I have added README.md in my folder
[ ] I have added working video of the game in README.md (optional)
[ x] I have specified the respective issue number for which I have requested the new game.

Add your screenshots(Optional) 📸

Thank you soo much for contributing to our repository 💗

Thank you @MohammadAsiya ,for creating the PR and contributing to our GameZone 💗
Review team will review the PR and will reach out to you soon! 😇
Make sure that you have marked all the tasks that you are done with ✅.
Thank you for your patience! 😀

Thank you  @MohammadAsiya , for your valuable time and contribution in our GameZone 💗.
It’s our GameZone, so Let’s build this GameZone altogether !!🤝
Hoping to see you soon with another PR again 😇
Wishing you all the best for your journey into Open Source🚀


cypress integrationFolder option seems not to be taken into account

I have the following cypress.json file:
{
  "env": {
    "TAGS": "not @wip"
  },
  "integrationFolder": "cypress/my-integration-folder",
  "fixturesFolder": "./shared/fixtures/graphql/responses",
  "ignoreTestFiles": [
    "*.js",
    "*.gif"
  ],
  "projectId": "g6v5sw",
  "reporter": "junit",
  "reporterOptions": {
    "mochaFile": "cypress/test-reports/cypress-e2e-report.[hash].xml",
    "toConsole": true
  },
  "video": true,
  "videoUploadOnPasses": false,
  "viewportHeight": 900,
  "viewportWidth": 1440
}

When I run my e2e tests, I get the following error:
Error: We've tried to resolve your step definitions at cypress/integration, but that doesn't seem to exist. [...]

I am using cypress 4.2.0 and cypress-cucumber-preprocessor 2.0.1. What am I doing wrong? It's like the cypress.json is not taken into account or just the integrationFolder option.

It seems that this library is so opinionated that it ignores the options in cypress. Whilst I agree that a logical pattern is useful, customisation is also important, especially if the parent library has an associated option.
Presumably it shouldn't be too difficult to respect the value of cypress's integrationFolder instead of hardcoding cypress/integration?

Sorry for the problem folks. It's not really about being opinionated but about the fact that we no longer read cypress configuration as we don't own it and it was problematic since cypress allowed that configuration to be put in different places and passed differently.
You can set the where you put the path to stepDefinitions with our own configuration:
https://github.com/TheBrainFamily/cypress-cucumber-preprocessor#configuration-option

Unless Cypress introduce a programmatic way to resolve & retrieve its configuration, any attempt at mimicking it would likely come with its own set of problems.

@lgandecki thanks for the clarification, I appreciate it is actually cypress not being very helpful with its config. Also, by opinionated, I didn't mean that was necessarily a bad thing, it can be very useful, but it's usually best to allow customisation where possible.
Regarding the options to set, can you give an example of how this would work?
If I set integrationFolder in cypress.json and nonGlobalStepBaseDir and stepDefinitions in cypress-cucumber-preprocessor section in package.json (withnonGlobalStepDefinitions set true, as recommended) then a custom directory works fine, however the actual values of the cypress-cucumber-preprocessor seem to be ignored, as I still have to follow the pattern of having step definitions next to gherkin files.
What I want to achieve is having feature (gherkin) files in a separate directory, so that it can be a submodule, editable by non-tech team, and step definitions separately (happy to mirror the well thought out structure of step definitions preferred in this project).

I have figured it out. If I set nonGlobalStepDefinitions to false, then stepDefinitions is honoured and it works the way I like.
Ideally I would like to enforce the preferred pattern with nonGlobalStepDefinitions set true, but still have the step definitions in a separate location to the features. For now, I can follow that as best practice.

@lgandecki couldn't the cypressIntegration value be set in the cypress-cucumber-preprocessor config in package.json as well? I realise that Cypress config isn't fixed to just from cypress.json but this would be better than nothing.

Due to personal reasons, the previous maintainers of this package are stepping down and handing the reigns over to me, a long-time contributor to the project and a user of it myself. This is a responsibility I'm very excited about. Furthermore, I'd like to thank @lgandecki ++ for all the work that they've done so far.
Read more about the transfer of ownership here.
The repository has however moved and all outstanding issues are being closed. This is not a reflection of the perceived importance of your reported issue. However, if after upgrading to the new version, you still find there to be an issue, feel free to open up another ticket or comment below. Please make sure to read CONTRIBUTING.md before doing so.


Update bodies.py

Optimization of the code to reduce code duplication and make it easier to add or modify predefined bodies in the future.
To optimize the code, using a dictionary to store the information for the predefined bodies and create instances of the Body class using a loop.

@sheetalneeraj Using globals() is a bad idea in general. Look into dataclass instead to streamline this code.

Also, note that the parent argument in each Body subclass takes the corresponding class and not a str. This is done in order to maintain functional relationship between Body objects. Using a dict here would not work for this reason.

#651 fixed this.


Reopen the editor windows return [PYTHON] File does not exist...

Environment:

Windows 10 64 bit 1703
x64dbg : snapshot_2017-06-30_19-50
x64dbgpy : latest version ( link )

Open x64dbg --> plugin --> x64dbgpy-Editor, everything works fine.
But after I close the editor window and tried to re-open the editor, it didn't launch and displayed the following message in the log tab:
[PYTHON] Executing script: "plugins\X64Dbg_editor\Editor_x64dbg.py"
[PYTHON] File does not exist...

This happens in both w32dbg.exe & x64dbg.exe :(

I thought i fixed this.
Can you try lastest code(not release) just pushed
https://github.com/techbliss/X64dbg_script_editor/blob/master/X64Dbg_editor/Editor_x64dbg.py

Okay seems to work, updated release.
https://github.com/techbliss/X64dbg_script_editor/releases
Thank you once again.

the latest code work !!   \:smile:/


🐛 BUG: Bundling with Stripe and other packages leads to unclear error hint

What version of Wrangler are you using?
0.0.27
What operating system are you using?
Mac
Describe the Bug
I'm attempting to upload a bundle with the Stripe npm package and Durable Objects. But when attempting to upload, am getting error messages like these:
✘ [ERROR] Could not resolve "crypto"

    node_modules/stripe/lib/utils.js:5:23:
      5 │ const crypto = require('crypto');
        ╵                        ~~~~~~~~

  The package "crypto" wasn't found on the file system but is built into node. Are you trying to
  bundle for node? You can use "platform: 'node'" to do that, which will remove this error.

However, these do not specify where the platform: 'node' should be used (I have tried at various locations in wrangler.toml, webpack.config.js, and package.json, but nothing has worked so far)
The webpack config is below
const path = require('path');
const webpack = require("webpack");

module.exports = {
  // target: "javascript",
  entry: "./src/index.js",
  mode: "production",
  output: {
    path: path.resolve(__dirname, 'dist'),
    filename: "worker.js"
  },
  resolve: {
    extensions: ['.ts', '.tsx', '.js', '.mjs'],
    fallback: {
      "child_process": false,
      "http": false,
      "https": false,
      "buffer": require.resolve("buffer"),
      "crypto": require.resolve("crypto-browserify"),
      "events": require.resolve("events"),
      "path": require.resolve("path-browserify"),
      "stream": require.resolve("stream-browserify"),
    }
  },
  plugins: [
    new webpack.DefinePlugin({
      STRIPE_API_KEY: JSON.stringify(process.env.STRIPE_API_KEY)
    }),
    new webpack.ProvidePlugin({
      // Polyfill Node behavior of Buffer being available at the global level.
      Buffer: ['buffer', 'Buffer'],
    }),
  ]
};

Any help would be very much appreciated. Thanks!

Hi @rishsriv - are you running the webpack bundling via a custom build in Wrangler2?
Apart from defining the STRIPE_API_KEY from the environment, I think that the Wrangler 2 built in bundling should just work with this, meaning that you could drop the webpack custom build step. Not sure the best approach to actually provide that API key at build time though...

The problem here is that stripe uses some node libs, which we don't currently polyfill. We want to do this very badly, but couldn't fit it into v2, but will definitely do so in 2.1 (tracking here https://github.com/cloudflare/wrangler2/issues/101) The workaround is to do a custom build like you're currently doing, so I don't know webpack well enough to understand why your polyfill isn't working/applying itself.

Got it, thank you @petebacondarwin and @threepointone! Appreciate the responses. Will just wait for 2.1 then, I have offloaded Stripe authentication as a microservice in a VM for now.
Thanks again for the awesome work on this – working with wrangler2 has been a way better experience than wrangler. Better error hints ftw!

We published 0.0.28 that introduces a new experimental node_compat config / --node-compat flag. This might just fix issues with importing stripe and other packages that have dependencies on node builtins. Feel free to give it a spin, and let us know if you have an feedback or issues!

Closing this because I tried bundling a worker with stripe and it "worked". Happy to chat more if anything else comes up!


breadcrumbs not appearing for optional route paramters

Hi,
Currently i have this node set up in my Mvc.sitemap.
<mvcSiteMapNode title="Add on Services" controller="AddOnServices" action="Index">
    <mvcSiteMapNode title="Flight" controller="AddOnServices" action="Flight"></mvcSiteMapNode>
</mvcSiteMapNode>

So when i hit the URL, http://localhost/addonservices/flight
The breadcrumbs will appear as HOME > Add on Services > Flight
But when i have optional parameters in the URL, http://localhost/addonservices/flight/1/2.
The routeconfig are currently set as:
routes.MapRoute(
                name: "addonservices.flight",
                url: "addonservices/flight/{airline}/{type}",
                defaults: new { controller = "AddOnServices", action = "Flight", airline = UrlParameter.Optional , type = UrlParameter.Optional }
            );

The breadcrumbs disappears. I have tried adding in preservedRouteAttributes for both optional values but to no avail.
Please advise on how i can achieve breadcrumbs for both scenarios.
Thank you.

The route that you have provided does not match the second URL that you provided (http://localhost/addonservices/flight/1/2). You must be matching a different route in this case.
Whether the route parameters are optional or not does not matter. You must account for every route parameter that is not area, controller or action. You should supply them whether they are optional or required when using preservedRouteParameters.
Unfortunately, because you have not supplied a matching route I can't be specific. But I can tell you that whatever the key names of 1 and 2 are in the URL http://localhost/addonservices/flight/1/2 should be put into preservedRouteParameters.
If you don't have a matching route for that URL, then that is a problem with your MVC route configuration. You should have a route that matches the signature of the URL or MVC won't be able to match it.
	routes.MapRoute(
		name: "addonservices.flight.option1.option2",
		url: "addonservices/flight/{option1}/{option2}",
		defaults: new { controller = "AddOnServices", action = "Flight" }
	);

	routes.MapRoute(
		name: "addonservices.flight",
		url: "addonservices/flight/{airline}",
		defaults: new { controller = "AddOnServices", action = "Flight", airline = UrlParameter.Optional }
	);

And then to match the same URL with MvcSiteMapProvider, you need to specify the same values in the preservedRouteParameters of the node.
<mvcSiteMapNode title="Add on Services" controller="AddOnServices" action="Index">
    <mvcSiteMapNode title="Flight" controller="AddOnServices" action="Flight" preservedRouteParamters="option1,option2"></mvcSiteMapNode>
</mvcSiteMapNode>

Hi NightOwl888,
Thank you for your reply. I have edited the routes. Pasted the wrong the route values that i have in my application.
I did exactly what you said, using the preservedRouteParameters to ensure that the parameters are similiar to what they have been set in the RouteConfig file.
It is still not appearing. Does having dynamicnodes for some of the nodes causes an issue with the preservedRouteParameters ?

If it helps, the action looks like this

 public ActionResult Flight(int? page, int? airline, string type, string sort_order)
{

}

So basically on first entry, the breadcrumbs will appear(http://localhost/addonservices/flight/).
But if there are parameters present in the URL(http://localhost/addonservices/flight/1/sq), then the there is a mismatch? Am i configuring it wrong ?

Interestingly, if i were to hit the URL this way (http://localhost/addonservices/flight?airline=1&type=sq the breadcrumbs appear. Could this be due to the URL rewrite then?

Definitely. You didn't mention before you are using URL rewriting, but it is very unusual to use it in conjunction with routing because routing supports 2 way URL mapping and URL rewriting does not. When using routing you can generate a URL based on the route in addition to matching the incoming route. With URL rewriting you cannot generate URLs.
Typically, you would add as many routes as you need with required and/or optional parameters to match all of the segment lengths that you require. When you use routes the URL parameters are copied into the route value collection. However, when you use query string parameters the parameters are not copied into the route value collection. In that case, they are ignored by MvcSiteMapProvider by default and only utilized if you explicitly configure them as values or preservedRouteParameters.
I have never tested MvcSiteMapProvider with URL rewriting and I suspect it won't work right if you use URL rewriting.

Hmmm,
Thanks for the reply Nightowl88. Im not sure if  the term to use is URL re-writing. What i meant to say is for instance is that without configuring the Routeconfig to have this routes:

routes.MapRoute(
                name: "addonservices.flight",
                url: "addonservices/flight/{airline}",
                defaults: new { controller = "AddOnServices", action = "Flight", airline = UrlParameter.Optional, type = UrlParameter.Optional }
            );

routes.MapRoute(
                name: "addonservices.flightnettratedetails",
                url: "addonservices/flight/details/{_flightid}",
                defaults: new { controller = "AddOnServices", action = "FlightDetails" }
				constraints: new { _flightid = @"\d+" }
            );

Route "addonservices.flight" will generate (http://localhost/addonservices/flight/{airline}) while route "addonservices.flightnettratedetails" wille generate http://localhost/addonservices/flightdetails/{_flightid}). As i want the url to produce the following, http://localhost/flight/details, i would need to explicitly configure routeconfig to have the exact URL i want for easy identification.
Is this called URL rewriting via the use of RouteConfig ?
What i dont understand is how come http://localhost/addonservices/flight would generate the breadcrumbs while http://localhost/addonservices/flight/1/sq doesnt match the MvcSiteMapProvider configurations even with the use of preservedRouteParameters.
I changed how mvc display the URL via the Routeconfig for all the modules, could this cause MvcSiteMapProvider to be confused even if i have indicated the exact controller and action that the route mappings uses ?

A URL like http://localhost/addonservices/flight/1/sq will not match any of the MVC routes you have provided thus far. This is the problem, it has nothing to do with MvcSiteMapProvider.
MvcSiteMapProvider works off of the route values dictionary and cannot match this information unless you supply it there. You need a route to match the entire URL and put those extra values into the route values dictionary. I gave you an example before:
	routes.MapRoute(
		name: "addonservices.flight.option1.option2",
		url: "addonservices/flight/{option1}/{option2}",
		defaults: new { controller = "AddOnServices", action = "Flight" }
	);

But only you know what 1 and sq actually mean, so you need to put them into route values that are named in a meaningful way for your scenario. Then, you can use those same names in MvcSiteMapProvider to force a match with preservedRouteParameters.
But again, the crux of your problem is that you don't have a valid route that this URL (http://localhost/addonservices/flight/1/sq) will match (or at least you have not supplied one here). It may be matching the URL addonservices/flight/{airline} and then incorrectly putting the 1 into the airline key and then simply tossing out the sq, but I have not tried it to see what happens in this case. The bottom line is you are not accounting for this extra data so the routing framework is ignoring it or misplacing it instead of putting it where it needs to be.

Is this called URL rewriting via the use of RouteConfig ?

No, this is routing. You used the term URL rewriting incorrectly.

I changed how mvc display the URL via the Routeconfig for all the modules, could this cause MvcSiteMapProvider to be confused even if i have indicated the exact controller and action that the route mappings uses ?

Possibly. But, you need to account for all of the route values (not just controller and action) for each route.
MvcSiteMapProvider works off of the principle that the route value combination for each node must be unique. This implicitly means that all route values need to be accounted for both in your routing configuration and in the MvcSiteMapProvider node configuration in order to get a match. You will only get a match when the values on both sides (the route values dictionary and the MvcSiteMapProvider route values dictionary) are the same.

I am closing this issue as it was caused by a misconfiguration of .NET routing, and is now presumed to be resolved.


using this is against DRY principle

It kind of bothers me seeing '# using this' every time I go to djangopackages.com. It becomes obvious that it is a misrepresentation of '# using it' when compared to github stars.
Why does it not work? Because it is against DRY.,. People don't like to enter same information here and there..
So, I believe that field should be removed in favor of github stars which is already there.
Regards,

I respectfully disagree. The star system was not designed to indicate use according to the GitHub documentation. I do agree that the number of GitHub stars might be an interesting metric to see.

Nevertheless, GitHub stars is an indicator of the popularity per the same
documentation linked, and it works, the other doesn't.
On Sat, Oct 29, 2016 at 9:32 AM Michael Barr<EMAIL_ADDRESS>wrote:

I respectfully disagree. The star system was not designed to indicate use according
to the GitHub documentation
https://help.github.com/articles/about-stars/. I do agree that the
number of GitHub stars might be an interesting metric to see.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/pydanny/djangopackages/issues/339#issuecomment-257094754,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHwzjt7FJqQi-c3BNaS7ipu3j-xhgkczks5q41kPgaJpZM4IeKiO
.

I agree the "using this" is not very useful. I think the pip downloads are good metric to check as well. That is one I typically use.


average_pooling

hi, yu:
I want to ask the question about
pool = AveragePooling2D(pool_size=(8, 8), strides=(1, 1), padding="same")(relu)
The origin paper about w-resnet, the average pooling input size is 8X8,  and pool_size(8, 8), the output is 1
and now is  padding="same", the output is  (None, 16, 16, 512).
And I do not understand  the reason.

I hope you reply, thank you.

wide resnet paper fig 1b

wide resnet fig 1

It depends on the input size.
If the input image size is 64x64, the above results is normal.
(Regarding the current implementation, ave-pool 8x8 should be replaced by global average pooling in order to reduce the dimensionality of the following flatten and fc layers...)

Yes, I can not agree any more .
I mean that I do not understand why you do like this (using padding="same").
That do not reduce the dim.
You know the input of avg-pool is NoneX16x16x512, the output of avg-pool is also NoneX16X16X512.

Omg, I got what you meant!
The problem is strides=(1, 1) not padding="same".
I'll fix this issue.
AveragePooling2D(pool_size=(8, 8), strides=(1, 1), padding="same")(relu)

should be
AveragePooling2D(pool_size=(8, 8))(relu)  # or 16

or
GlobalAveragePooling2D()(relu)

GlobalAveragePooling is  better. I have try.


Field name id not honored inside of row field

Link to reproduction
No response
Describe the Bug
If a field named id is inside of a row field, it is not honored, and a _id is created in addition to a id property in the database.
To Reproduce
This configuration does not respect the id field name as the ID of the collection, with any saved documents having the id value in addition to an _id of ObjectId.   (Note: this is on Mongo - I did not test this on Postgres)
export const Tags: CollectionConfig = {
  slug: 'tags',
  fields: [
    { type: 'row', fields: [
      { name: 'id',  label: 'Name', type: 'text' },
    ]},
  ],
}

While this configuration works, with the value of id actually saving in Mongo as _id
export const Tags: CollectionConfig = {
  slug: 'tags',
  fields: [
    { name: 'id',  label: 'Name', type: 'text' },
  ],
}

Payload Version
2.5.0
Adapters and Plugins
db-mongodb

If we are going to allow the id field to be nested inside of a row, we should do the same for collapsible and tabs too.
This one little change is going to require a lot of changes and looping over fields. We can probably make a utility function just for getting the id field from the collection fields.


[Documentation - menus] Example images not showing

Describe the bug
Some example images are not showing properly.


Programmatically interacting with the EA Portal

Hello EA Team.  The assumption of this documentation is using the web GUI. Is it also possible to manage EA programmatically (for ex. using PowerShell, CLI, REST, or other similar method?).  Thanks

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 75cd0592-feab-b9b8-1110-a41003cb6121
Version Independent ID: bbd8157c-e998-c5c8-6330-957957a7fa09
Content: Get started with the Azure Enterprise portal
Content Source: articles/cost-management-billing/manage/ea-portal-get-started.md
Service: cost-management-billing
GitHub Login: @bandersmsft
Microsoft Alias: banders

@drmonroe Thanks for noting. We have a number of articles that address using APIs to mange enterprise enrollments. Are you suggesting that we add a link in this article to https://docs.microsoft.com/azure/cost-management-billing/manage/ea-portal-rest-apis?

#please-close


jax tutorial 3 (act fn): model saving code fails

Tutorial: -1 (Fill-in number of tutorial)
https://uvadlc-notebooks.readthedocs.io/en/latest/tutorial_notebooks/tutorial3/Activation_Functions.html#Training-a-model
Describe the bug
A clear and concise description of what the bug is.
This fails if you set overwrite=True ie force it to train and save , rather than use existing checkpoints.
for act_fn_name in act_fn_by_name:
    print(f"Training BaseNetwork with {act_fn_name} activation...")
    act_fn = act_fn_by_name[act_fn_name]()
    net_actfn = BaseNetwork(act_fn=act_fn)
    train_model(net_actfn, f"FashionMNIST_{act_fn_name}", overwrite=True)
    break

The error may be due to act_fn not having names...
This is the message
Training BaseNetwork with sigmoid activation...
Model file exists, but will be overwritten...
[Epoch  1] Training accuracy: 9.88%, Validation accuracy: 9.74%
	   (New best performance, saving model...)
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
[<ipython-input-45-47a1dc98c36e>](https://localhost:8080/#) in <module>
      3     act_fn = act_fn_by_name[act_fn_name]()
      4     net_actfn = BaseNetwork(act_fn=act_fn)
----> 5     train_model(net_actfn, f"FashionMNIST_{act_fn_name}", overwrite=True)
      6     break

1 frames
[<ipython-input-18-ab8f79a02441>](https://localhost:8080/#) in save_model(model, params, model_path, model_name)
     53     config_dict['act_fn'] = config_dict['act_fn'].__dict__
     54     for k in ['parent', 'name', '_state']:
---> 55         config_dict.pop(k)
     56         config_dict['act_fn'].pop(k)
     57     config_dict['act_fn']['name'] = model.act_fn.__class__.__name__.lower()

KeyError: 'parent'

Colab

Hi, thanks for pointing it out! The flax API seems to have changed again, the key parent has been changed to _parent_ref. To prevent future API breaks, I fixed the arguments of the model in the new commit a30e19dd1c8c94e61eb93258380a13826bcbda08.


[BUG] Tracebacks don't seem to work in JupyterLab

Read the docs
There doesn't seem to be an indicator that this wouldn't work.
Describe the bug
The traceback handler doesn't seem to do anything in IPython or xeus-python in Jupyter.
To Reproduce
import rich.traceback
rich.traceback.install(show_locals=True)

1 / 0

I feel like this might have worked in the recent past? At least I know I tried it and I thought I was in Jupyter, since I like to play around there. But it's not working now, certainly. It works in the regular REPL.
Platform
macOS, JupyterLab 3, rich 9.8.0
Diagnose
╭────────────────────────────────────────────────────────────────────────── <class 'rich.console.Console'> ───────────────────────────────────────────────────────────────────────────╮
│ A high level console interface.                                                                                │
│                                                                                │
│ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │
│ │ <console width=183 ColorSystem.TRUECOLOR>                                                                                │ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                │
│     color_system = 'truecolor'                                                                                │
│         encoding = 'utf-8'                                                                                │
│             file = <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>                                                                                │
│ is_dumb_terminal = False                                                                                │
│       is_jupyter = False                                                                                │
│      is_terminal = True                                                                                │
│   legacy_windows = False                                                                                │
│         no_color = False                                                                                │
│          options = ConsoleOptions(legacy_windows=False, min_width=1, max_width=183, is_terminal=True, encoding='utf-8', justify=None, overflow=None, no_wrap=False, highlight=None) │
│           record = False                                                                                │
│         safe_box = True                                                                                │
│             size = ConsoleDimensions(width=183, height=73)                                                                                │
│        soft_wrap = False                                                                                │
│           stderr = False                                                                                │
│            style = None                                                                                │
│         tab_size = 8                                                                                │
│            width = 183                                                                                │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
platform="Darwin"
WindowsConsoleFeatures(vt=False, truecolor=False)
rich @ file:///Users/runner/miniforge3/conda-bld/rich_1610416263198/work

Logging too?

Logging too?

I wouldn't really expect it to work I'm afraid. The hooks in the Python REPL are unlikely to be replicated in IPython, which may have its own mechanism for this.

I wouldn't really expect it to work I'm afraid. The hooks in the Python REPL are unlikely to be replicated in IPython, which may have its own mechanism for this.

I'd probably recommend at least have a little note, then, on the pages for logging handlers and exceptions, since Rich does advertise that it works in Jupyter? I really wanted to show this so I'm writing to a file then running that from the notebook. 🤦

I'd probably recommend at least have a little note, then, on the pages for logging handlers and exceptions, since Rich does advertise that it works in Jupyter? I really wanted to show this so I'm writing to a file then running that from the notebook. 🤦

I did look into it. I did get it kind of working in a temporary branch, but it cannot

I did look into it. I did get it kind of working in a temporary branch, but it cannot

You might be able to get Rich to work in this case using monkeypatching with just a two lines of code (redefinint shell.InteractiveShell.showtraceback and shell.InteractiveShell.showsyntaxerror. See https://github.com/aroberge/friendly-traceback/blob/master/friendly_traceback/ipython.py for an example.

@henryiii This work now. Thanks to @nathanrpage97


onBarCodeRead when read Code128 in android 4.4,it doesn‘ work

When I use the camera to scan the code128,it works good in android 5+,but when I use it in android ,it only can scan qr,but don't read the code128 data,what's wrong ??

Okay,I find the problem,it's not the code problem,it may be the code128.....When I use android 4.4 phone to scan the pc code128 photos,like this,

and I scan many of these photos,it works well,and the datas also appear....I think it may be not  sensitive..

Hi @wenwen1995
Can you please send me sample code for barcode reader for android and ios ?

It is ean13


[Bug] Env variable in authService Api key not matching with key defined in .env.example

Describe the bug
In services/authService.js  the env key for firebase api key is REACT_APP_FIREBASE_API_KEY but in .env.example the key is defined as REACT_APP_API_KEY, this does not allow the application to connect with firebase.
To Reproduce
Steps to reproduce the behavior:

Clone the project, install all the dependencies.
copy .env.example to .env file, put your firebase credentials.
Run the app using npm start.
see browser console, which gives a error for api key not valid.

Expected behavior
After setting up the project and setting up the .env file it should be able to connect to firebase when the app is running.

Logs

Environment

OS: MacOS Catalina.
Browser: Chrome

@NeelParihar I made a PR for this issue.

has thr pr been not merged yet because i am still getting the problem @Anurag5086

@san0808 Not yet. Please merge the PR #105 @Abhishek-kumar09 @rajatgupta24 .

Fix is merged.


Email issues

Hi,
I'm a newbie and have issues to get email working. I've configured the server (Amazon linux) to send email and it works fine from the CLI but I don't get the email to work from the application. If I try to subscribe I get the following error message in production.log:
ArgumentError (SMTP-AUTH requested but missing secret phrase):
lib/staytus/email.rb:38:in deliver'   app/models/subscriber.rb:41:in send_verification_email'
app/controllers/pages_controller.rb:58:in subscribe_by_email'   app/controllers/application_controller.rb:15:in set_time_zone'
I've googled but I can't find anything that solves my problem. Any suggestion on what I am missing?
BR
Veronica

Solved, changed sendmail to postfix and now it works


Build JupyterBook TOC

The JB demo I did a few weeks back showed the essentials for how a collection of notebooks can be turned into a 'book' website.  Now that we have some of those notebooks finalized, it may be time to start thinking about how the table of contents (TOC) should be organized to build that book.
A few thoughts:

TOC is not tied to the folder/file structure within the repo (although it can be).
A file in the repo won't show up in the compiled book unless it has an entry in the TOC
TOC can be set up as an outline, with arbitrary number of levels. For practical purposes, 3 or maybe 4 level is as deep as it should go. (this affects how the TOC is rendered in the left panel/frame in the book).

The jupyterbook documentation itself is a good reference and example.
The JB docs are at: https://jupyterbook.org/en/stable/intro.html
The TOC to create that structure/menu on the left panel is at https://github.com/executablebooks/jupyter-book/blob/master/docs/_toc.yml
BOOK is composed of one or more PARTS
PARTS are composed of one or more CHAPTERS
CHAPTERS can either be stand-alone or be composed from multiple SECTIONS
SECTIONS can themselves contain SECTIONS (i.e. sub-sections).

@amsnyder -- I've got a more complete TOC example in this branch (in _toc.yml), which I think will serve as a useful starting point to sketch out the initial book organization. I just filled in some ideas centered around the specific notebooks that I worked on...  it will need your larger vision to add in the rest of the material and reshape it into a coherent whole.

Related to TOC and jupyterbook building --
This TOC and template were based on the project pythia cookbook.  It still has some hooks in the _config.yml which mention pythia and link to bits and pieces of their website.  We should give some thought on how much of the pythia project we want to include, beyond the mention and credit that we're using their styling in the book build.
in particular:

[ ] navbar
[ ] footers
[ ] logos
[ ] favicon

I think the TOC should mimic the folder structure. Maybe each folder should be a part. We will need explainer text either in the TOC or in an introductory chapter to describe what type of content is in each part. Here's an example for dataset_prepreprocessing (quick draft, defintely needs perfected):

Sometimes data is published in file formats that are difficult or inefficient to work with. The HyTEST team often transforms our data inputs into more optimized formats, such as cloud optimized zarr stores. Because these optimized datasets are widely useful resources for the audience of this repository, we make them accessible to a larger audience, often through shared data storage, such as an S3 bucket. We upload the scripts that were used to transform these datasets from their source format into the optimized format in our dataset_preprocessing folder to improve transparency and reproducibility.

Within each part, we will might need chapters to group things together as archive, demos, tutorials (so that the reader understands what level of content they are getting. These will also need to be explained somewhere - here's a first draft of what you could use:

archive – a script, workflow, or similar that was used to produce a shared resource (like a dataset). The purpose of these files is to ensure transparency and reproducibility of this shared resource.
Demos – Demonstration of a technology/concept with minimally sufficient documentation of the process.
Tutorials – Fully built out learning tutorials intended to be used as training material for someone unfamiliar with a concept/technology.

Then there might be another level of grouping inside that. For example, inside the dataset preprocessing/archive, we might have a section for CONUS404. In the model_evaluation/tutorials, we will want a section for the NWM evaluation that contains all of the notebooks.
So I guess to summarize, I am suggesting that we very much mimic the folder structure and make sure we have enough explainer text for someone new to understand what to expect in each grouping of content.

Closing this PR as un-merged. . . See #194


AVX gradients

Accelerate basic gradient calculations using AVX instructions. Maybe optionally turned on via cmake. Speedups are in the range of 6-7x for logistic regression calculation on an AWS machine.
Added basic AVX wrapper class to simplify usage of AVX in future.

Codecov Report

Merging #2878 into master will increase coverage by 0.56%.
The diff coverage is 93.33%.

@@             Coverage Diff              @@
##             master    #2878      +/-   ##
============================================
+ Coverage     43.13%   43.69%   +0.56%
============================================
  Files           152       92      -60
  Lines         11574     8703    -2871
  Branches       1164      722     -442
============================================
- Hits           4992     3803    -1189
+ Misses         6252     4753    -1499
+ Partials        330      147     -183

Impacted Files
Coverage Δ
Complexity Δ

src/objective/regression_obj.cc
86.31% <93.33%> (-0.62%)
0 <0> (ø)

python-package/xgboost/libpath.py
62.5% <0%> (-8.34%)
0% <0%> (ø)

src/data/sparse_page_raw_format.cc
82.69% <0%> (-1.93%)
0% <0%> (ø)

...a/ml/dmlc/xgboost4j/scala/spark/XGBoostModel.scala

.../src/main/java/ml/dmlc/xgboost4j/java/DMatrix.java

...c/main/scala/ml/dmlc/xgboost4j/scala/Booster.scala

...c/xgboost4j/scala/example/PredictLeafIndices.scala

...l/dmlc/xgboost4j/java/example/util/DataLoader.java

...ost4j/scala/example/spark/SparkWithDataFrame.scala

.../scala/ml/dmlc/xgboost4j/scala/spark/XGBoost.scala

... and 53 more

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 40c6e2f...543c4ed. Read the comment docs.

Have you considered using boost.simd? It allows to abstract away the specific architecture and support SSE2/AVX/AVX2 etc.

I have considered it but boost is very monolithic. I think these changes are very lightweight and AVX is almost universally supported.

@RAMitchell I'm curious: does the gradient calculation become a significant contributor to runtime in some situations? I'm not really happy about the increasing messiness of the code, but if it helps, then why not.
@superbobry So far this project managed to stay clean from the dependency on boost. Besides, boost.simd would pull in practically all the boost. While there are some other, even header-only, I believe, simd libraries, I lean towards @RAMitchell's lightweight approach.
I did some testing of the AVX sigmoid and exp code using a quick Rcpp wrapper
https://gist.github.com/khotilov/3dcf8ce42631880bbaf8d03d457d0eb2
curve(approximate_sigmoid(x) - 1/(1 + exp(-x)), -12, 12, n = 1000); grid()

The exp4096 mostly underestimates the exp:
curve(log(exp4096(x)) - x, -9, 9, n = 1000); grid()

# verify the monotonicity
x <- seq(from=-12, to=12, length.out = 8*100)
min(diff(approximate_sigmoid(x)))
## 0
min(diff(exp4096(x)))
## 1.84265e-07

library(microbenchmark)
x <- runif(1000000)
microbenchmark(exp4096(x), exp(x))
## Unit: milliseconds
##        expr       min        lq      mean    median        uq       max neval cld
##  exp4096(x)  5.636702  5.842971  8.801399  6.394068  9.333585 133.17423   100  a
##      exp(x) 50.410999 51.238929 53.008278 51.859162 54.684212  75.79283   100   b
microbenchmark(approximate_sigmoid(x), 1/(1+exp(x)))
## Unit: milliseconds
##                    expr       min        lq      mean    median        uq       max neval cld
##  approximate_sigmoid(x)  5.719951  5.929213  7.354263  6.180529  9.400727  14.57115   100  a
##          1/(1 + exp(x)) 54.512440 55.593252 59.545110 56.124107 58.769688 187.05631   100   b

@khotilov I'm currently working on optimising for p3 aws instances. 50% of the runtime was  gradient calculations for binary classification when I started optimising. I got it down from 50 seconds to about 2.7 seconds now.
I agree with you that its a little messy at the moment. I might be able to come up with something better.
Thanks for the great charts!

SIMD is great, to implement it cleanly. perhaps we can use some packet templates that defers to scalr version when the simd is not available. The packet math in mshadow might be a good reference

I see float8 is already doing that in some sens, so only a fallback implementionn is needed

I have considerably improved the accuracy of the exp to around 1e-6. The sigmoid should be around 1e-7.

Also the code is now far less messy in src\objective\regression_obj.cc.


Contracts::put_code benchmarks

#3885 and #3819 note that put_code can take too long on large wasm files, and cause block production to fail. This PR adds benchmarks for this using compiled ink examples.

Here's the resulting time for erc20 by the way:
wasms/erc20.wasm        time:   [6.4462 ms 6.5215 ms 6.5997 ms]
                        thrpt:  [7.6973 MiB/s 7.7897 MiB/s 7.8806 MiB/s]

This seems pretty fast, so maybe the problems only occur under certain conditions?

@Stefie maybe you could run these benchmarks on your machine?

this does benchmark put_code in native. I don't remember precisely but thoughts wasm was used always for block production. maybe in wasm the put_code performance are very different 🤔 ?

Oh, good point! What would be the best way to benchmark in wasm then?

Oh, good point! What would be the best way to benchmark in wasm then?

I don't know @pepyakin ?

@expenses you can setup a wasm blob like this one: https://github.com/paritytech/substrate/tree/master/primitives/runtime-interface/test-wasm
Expose a function benchmark_put_code or whatever. This function internally calls 1000x put_code. And you call this function from your benchmark. See here for on how to call it.

@Stefie maybe you could run these benchmarks on your machine?

Sorry, I was out of office yesterday. If you tell me how, I'm happy to do that! I never ran any benchmarking tests for Substrate.
The times I mentioned in https://github.com/paritytech/substrate/issues/3885 were with the latest Docker image from https://hub.docker.com/r/parity/substrate/tags

@bkchr is this even possible, given that GenesisConfigs and TestExternalities only works under std?

@expenses please look at the linked code, you create the storage etc from std and just call into wasm to execute the benchmark method.

Here's the output from instrumentation.

Closing due to solutions having arised.


Error handling issue with custom ErrorType

Hi, Session always return the error in .Failure closure as APIError, but i send a custom ErrorType and there is no way to cast the error to another, here is a example:
public enum CustomError: ErrorType {
    case ValidationError(message: String)
}

public struct EmailSignupRequest: StarflowRequest {
    public typealias Response = STAccessToken
    public func errorFromObject(object: AnyObject, URLResponse: NSHTTPURLResponse) -> ErrorType? {
        guard let dictionary = object as? [String: AnyObject] else {
            return nil
        }
        guard let message = dictionary["error_description"] as? String else {
            return nil
        }
        return CustomError.ValidationError(message: message)
    }
}

and when i send the request like this i can print the error and it shows as CustomError.ValidationError but i can't handle the error!
let req = EmailSignupRequest()
Session.sendRequest(req) { result in
   switch result {
        case .Success(_):
           print("success")
        case .Failure(let error):
           print("did get error signin up  \(error)")
        }

    }
}

when i do like this
let error = error as? StarflowKitError i get Cast from 'APIError' to unrelated type 'CustomError' always fails

Sorry but i found that we could do like this
case .Failure(let error):
      switch error {
          case .UnacceptableStatusCode(_, let error as CustomError):
              switch error {
                case .ValidationError(let message):
                    self.loading.textLabel.text = message
                 }
          default:
              print(error)
          }
      }

In current version of APIKit, RequestType calls its errorFromObject(_:URLResponse:) if acceptableStatusCode doesn't contain NSHTTPURLResponse.statusCode. Then, it wraps the error returned by errorFromObject(_:URLResponse:) in UnacceptableStatusCode.
https://github.com/ishkawa/APIKit/blob/559efccb9be4f144bc4f2c8fb8133e5afc3a52bf/APIKit/RequestType.swift#L141-L144
Consequently, you might be able to get CustomError as below:
let request = EmailSignupRequest()

Session.sendRequest(request) { result in
    switch result {
    case .Success:
        print("success")

    case .Failure(let error):
        if case .UnacceptableStatusCode(let customError as CustomError) = error {
            // customError is CustomError
        }
    }
}

Yeah, Exactly!! thank you for answer! sorry if i ask so many questions here, i really love APIKit :)

No problem! I would love to answer your next question :smile:


Add ability to adjust brightness of screen

Is this available for both SPI/I2C? What kind of brightness range are we talking about?

Should be agnostic of SPI/I2C ... page 36 of the SSD1306 spec has this:

10.1.7 Set Contrast Control for BANK0 (81h)
This command sets the Contrast Setting of the display. The chip has 256 contrast steps from 00h to FFh. The segment output current increases as the contrast step value increases.

I'm guessing that the SH1106 has a similar command - if it has - then in the device class, we could add a method contrast(self, level) that asserts 0 <= level <= 255 and then calls self.command(const.SETCONTRAST , level)
In the __init__ methods, remove specific command here https://github.com/rm-hull/ssd1306/blob/master/oled/device.py#L222 and same for the sh1106 init, and replace with self.contrast(0xCF) or whatever the sh1106 value shows
Add something to the demo to loop over the contrast values, showing a fade in/out effect

Add something to the demo to loop over the contrast values, showing a fade in/out effect

Reminds me of the plain demo.py, the ON/OFF operations should display ON, blank screen, ON, blank screen etc. Now it just blinks a few times, almost looking buggy.


Ease adding scripts that depend on jQuery

It's currently very cumbersome to add scripts to the theme that must load in the footer to benefit from the jQuery support already present. Either we must

list main.min.js and https://use.fontawesome.com/releases/v5.7.1/js/all.js (but without the defer, integrity and crossorigin options), or
customise the scripts.html include, or
copy across all JS assets, download the package.json and banner.js files from GitHub (using the right versions) to be able to build the asset locally.

Yet all I want to do is load one extra, small JS file to handle contact form submission with AJAX and some validation..
Please add a simple option to load additional scripts in the footer, in addition to main.min.js and font-awesome. Perhaps a extra_scripts list?

The default layout almost never changes (aside from bumping a theme version number in comments) and is therefore safe for overriding.
You could add your script here by copying _layouts/default.html to your repo and override the bundled one.

Right, that's another work-around then. Not ideal, not when adding additional scripts in the footer would be fairly common, I think?

Which is where footer_scripts or overriding _includes/footer/custom.html come into play.

But neither footer_scripts nor _includes/footers/custom.html let me place an extra script tag after the existing scripts (so after jQuery and magnific-popup have been loaded).

Have a look at PR #2116 and let me know if this meets your need.
You can test by using this gem in your Gemfile
gem 'minimal-mistakes-jekyll', :git => 'https://github.com/mmistakes/minimal-mistakes.git', :branch => 'after-footer-scripts'

And then adding your "after footer" script paths to _config.yml like so:
after_footer_scripts:
  - /assets/js/custom-script-loads-after-footer.js

This is absolutely perfect. It fits my needs exactly, I no longer would need to customise the default.html layout or scripts.html include.


Find the id when the for property is an object

The component had partial support for an object being bound to the for property but the _toggle() function expected it to be a string only. This PR adds support for objects in _toggle() as well and adds test to ensure that binding an object to for works as expected.
Note that this PR is for v1, we haven't moved to v2 yet so I did not make these changes in that stream.

The build failure doesn't appear to be related to these changes - the tests all pass on my local machine.

@PredixDev/predix-maintainers are you the right team to take a look at this?

@PredixDev/px is!

I just restarted the tests to see if they pass.

Can you provide a usage example of what this PR enables? Thanks.

There are two code paths for the for binding: a string and an object. The string code path expects an ID and queries the DOM for it but the query is limited to siblings. Binding an object allows you to use the popover for any DOM node, not just siblings. There was a problem with the toggle code though, it didn't support this.for being an object, only a string. This PR fixes that problem so strings and objects can both be used successfully.

Just to elaborate a little bit: you can see a usage example in the added tests, see https://github.com/PredixDev/px-popover/pull/20/files#diff-6669ba6959d7040bd49d07452a6ec2f0R188

Thanks for your comments @davidrleonard. I have updated the code to check that it is an HTMLElement.
I believe that this PR makes the component better, not worse. It does not make it perfect - there are still many more changes which would be worthwhile (as you mentioned in your comments).
The existing code allows for to be bound to a DOM node but then is completely broken when dealing with that case. This PR makes it so that the happy path of binding px-popover to a non-sibling DOM node is functional, and the added unit tests cover that use case.
This PR is only meant to be an incremental improvement to some undocumented behavior. If that behavior were to become officially supported or the existing code to be refactored then probably that should be done in the 2.x stream anyway IMO.

Thanks for making that change.
We can’t accept this PR until all the issues mentioned above are addressed. We will need to support this component and this new API behavior going forward, including addressing any bugs that arise from explicitly supporting using HTMLElement references in the for property. This change should either work completely for all intended use cases, or we shouldn’t add it in.

I'm confused - the existing behavior that you already have to support is worse than what is in this PR.
Again, this PR is not intended to explicitly support HTMLElement references in the for property, only as a step toward that by fixing the existing (broken) undocumented behavior.
Anyway thanks for your time, we will just have to maintain our own fork for now then.


jspm doesn't play nice with local packages

I'm trying to use jspm as a low-friction way to generate an import map for some package dependencies. One of those dependencies is on the local filesystem, loaded with essentially "other-pkg": "file:../../pkg/other-pkg". When I run generator.install('other-pkg') it generates an import map that includes the relative URL to that package's entrypoint: ../../pkg/other-pkg/index.js.
This behavior makes sense as a default, but I'm just trying to serve my local package directory—the other-pkg directory won't be served. I tried passing defaultProvider: 'nodemodules' in the hope that it would cause the import map to point to node_modules/other-pkg/index.js, but it didn't do so for reasons I don't entirely understand.
I also tried using npm pack, which is usually an effective general workaround for local dependencies being weird. My package.json ended up including "other-pkg": "file:../../pkg/other-pkg/other-pkg-1.2.3.tgz", though, and JSPM choked on this entirely saying it was "Unable to resolve file:///.../other-pkg-1.2.3.tgs/".

As far as I can understand your use case is to generate mappings for an installed package that is pointing to another location in the file system than the one through the "dependencies" field.

When you're using file: dependencies, there are two reasonable interpretations of "the [location] through the 'dependencies field". It could either mean the path literally referred to by file: (the more literalistic interpretation) or the path in node_modules to which npm linked the package (the interpretation that's more consistent with non-file: dependencies). I think the latter is more likely to be functional, because it's guaranteed to be accessible to the server if any packages are, but what I'm asking for here is just the ability to explicitly designate which interpretation I want.
For tarball dependencies, though, there is no ambiguity. If I have "other-pkg": "file:.../other-pkg-1.2.3.tgz", jspm's behavior today is simply broken. It crashes. The contents of that package are only available from node_modules, and jspm instead tries to read them from a directory that doesn't exist.

A minimal example, with a local directory and local tarball dependency: edgecase.tgz
{
  "name": "pkg",
  "type": "module",
  "exports": "./index.js",
  "dependencies": {
    "dep": "file:../dep",
    "tar": "file:../tar.tgz"
  }
}

Linking the index.js module does indeed bomb jspm:
$ jspm link ./index.js
   Error: Unable to resolve file:///edgecase/tar.tgz/ resolving tar imported from file:///edgecase/tar.tgz/.

I think it comes down to whether jspm should behave like the npm installer, or like the node resolver, when it's linking/installing stuff. It's currently doing the former (i.e. treating file deps as file:// URLs, see here), which I think is the right default because most packages it traces through won't have been installed, for instance. But for the nodemodules provider maybe we should do the latter for the root package, since in that case you're basically saying "give me an import map that works like node does, against my node_modules", right? Either way, jspm should handle tarball dependencies without throwing its toys!
@nex3 You might be able to work around the problem with resolutions (see https://github.com/jspm/generator#resolutions) for the file deps, it allows you to specify custom resolution overrides:
$ jspm link ./index.js --provider nodemodules --resolution tar=./node_modules/tar --resolution dep=./node_modules/dep && cat importmap.json
{
  "env": [
    "browser",
    "development",
    "module"
  ],
  "imports": {
    "dep": "./node_modules/dep/index.js",
    "tar": "./node_modules/tar/index.js"
  },
  "scopes": {
    "./node_modules/": {
      "@lit/reactive-element": <EMAIL_ADDRESS>      "lit": "./node_modules/lit/index.js",
      "lit-element/lit-element.js": "./node_modules/lit-element/development/lit-element.js",
      "lit-html": "./node_modules/lit-html/development/lit-html.js",
      "lit-html/is-server.js": "./node_modules/lit-html/development/is-server.js",
      "react": "./node_modules/tar/node_modules/react/index.js"
    }
  }
}

Generator should map into node_modules correctly for this use-case now, let us know if you hit any snags 🙏

Looks great, thanks folks!


Update nugets to latest ASP MVC 5 and Core

hi, can you please update so it builds with target .net 4.72

Hi, the app does not support core, if you try to update probably you need to rewrite plenty of code.

Hi, for Angular I can refer https://github.com/DimitarYosifov

Hello @MichaelaIvanova  can you please at least update to latest MVC nugets and check in.

@MichaelaIvanova Hi, I am new to github and contributing to open source. If you don't mind, i would like to have a crack at updating your MVC project to 4.7.2


Modularized :: Impossible to open / Failed to concatenate segments:

For every recording I'm getting a Impossible to open error followed by a Failed to concatenate segments error. Video is being recorded so I'm not sure what is going on.
[2022-03-10 16:22:52] [INFO    ] [viseron.components.ffmpeg.recorder.FrontEast2] - Starting recorder
[2022-03-10 16:22:52] [INFO    ] [viseron.components.nvr.FrontEast2] - Starting motion detector
[2022-03-10 16:22:54] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 9
[2022-03-10 16:22:55] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 8
[2022-03-10 16:22:56] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 7
[2022-03-10 16:22:57] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 6
[2022-03-10 16:22:58] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 5
[2022-03-10 16:22:59] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 4
[2022-03-10 16:23:00] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 3
[2022-03-10 16:23:01] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 2
[2022-03-10 16:23:02] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 1
[2022-03-10 16:23:03] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 0
[2022-03-10 16:23:03] [INFO    ] [viseron.components.nvr.FrontEast2] - Pausing motion detector
[2022-03-10 16:23:03] [INFO    ] [viseron.components.ffmpeg.recorder.FrontEast2] - Stopping recorder
[concat @ 0x55ffb625e500] Impossible to open 'file:/segments/FrontEast2/20220310162243.mp4'
pipe:: No such file or directory
[2022-03-10 16:23:16] [ERROR   ] [viseron.components.ffmpeg.recorder.FrontEast2] - Failed to concatenate segments: Command '['ffmpeg', '-hide_banner', '-loglevel', 'error', '-y', '-protocol_whitelist', 'file,pipe', '-f', 'concat', '-safe', '0', '-i', '-', '-c:v', 'h264', '-c:a', 'copy', '-movflags', '+faststart', '/recordings/FrontEast2/2022-03-10/FrontE_2022-03-10-162252.mp4']' returned non-zero exit status 1.
[2022-03-10 16:41:35] [INFO    ] [viseron.components.ffmpeg.recorder.FrontEast2] - Starting recorder
[2022-03-10 16:41:35] [INFO    ] [viseron.components.nvr.FrontEast2] - Starting motion detector
[2022-03-10 16:41:37] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 9
[2022-03-10 16:41:38] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 8
[2022-03-10 16:41:39] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 7
[2022-03-10 16:41:40] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 6
[2022-03-10 16:41:41] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 5
[2022-03-10 16:41:42] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 4
[2022-03-10 16:41:43] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 3
[2022-03-10 16:41:44] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 2
[2022-03-10 16:41:45] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 1
[2022-03-10 16:41:46] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 0
[2022-03-10 16:41:46] [INFO    ] [viseron.components.nvr.FrontEast2] - Pausing motion detector
[2022-03-10 16:41:46] [INFO    ] [viseron.components.ffmpeg.recorder.FrontEast2] - Stopping recorder
[2022-03-10 16:42:02] [INFO    ] [viseron.components.ffmpeg.recorder.FrontEast2] - Starting recorder
[2022-03-10 16:42:02] [INFO    ] [viseron.components.nvr.FrontEast2] - Starting motion detector
[2022-03-10 16:42:03] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 9
[2022-03-10 16:42:04] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 8
[2022-03-10 16:42:05] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 7
[2022-03-10 16:42:06] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 6
[2022-03-10 16:42:07] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 5
[2022-03-10 16:42:08] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 4
[2022-03-10 16:42:09] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 3
[2022-03-10 16:42:10] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 2
[2022-03-10 16:42:11] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 1
[2022-03-10 16:42:12] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 0
[2022-03-10 16:42:12] [INFO    ] [viseron.components.nvr.FrontEast2] - Pausing motion detector
[2022-03-10 16:42:12] [INFO    ] [viseron.components.ffmpeg.recorder.FrontEast2] - Stopping recorder
[2022-03-10 16:42:16] [ERROR   ] [viseron.components.ffmpeg.recorder.FrontEast2] - Could not get duration for: /segments/FrontEast2/20220310164133.mp4. Error: /segments/FrontEast2/20220310164133.mp4: No such file or directory

[2022-03-10 16:42:16] [ERROR   ] [viseron.components.ffmpeg.recorder.FrontEast2] - Could not get duration for: /segments/FrontEast2/20220310164139.mp4. Error: /segments/FrontEast2/20220310164139.mp4: No such file or directory

[concat @ 0x563b39df6500] Impossible to open 'file:/segments/FrontEast2/20220310164153.mp4'
pipe:: No such file or directory
[2022-03-10 16:42:16] [ERROR   ] [viseron.components.ffmpeg.recorder.FrontEast2] - Failed to concatenate segments: Command '['ffmpeg', '-hide_banner', '-loglevel', 'error', '-y', '-protocol_whitelist', 'file,pipe', '-f', 'concat', '-safe', '0', '-i', '-', '-c:v', 'h264', '-c:a', 'copy', '-movflags', '+faststart', '/recordings/FrontEast2/2022-03-10/FrontE_2022-03-10-164202.mp4']' returned non-zero exit status 1.

Strange, i am not seeing this on my end. Can you post your config?
There was a bug in the functionality that retries setup of a component that fails, which resulted in the domain being setup multiple times.
That mihgt be the cause. I pushed a fix for it yesterday

Strange, i am not seeing this on my end. Can you post your config? There was a bug in the functionality that retries setup of a component that fails, which resulted in the domain being setup multiple times. That mihgt be the cause. I pushed a fix for it yesterday

I'll refresh my docker later today. This is my config (I switched to deepstack to see if I can get better performance)
cat config.yaml
ffmpeg:
  camera:
    BackEast:
       name: Back_East
       host: !secret camera_ip_back_east
       username: !secret camera_us_back_east
       password: !secret camera_pw_back_east
       path: /cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif/trackID=0
       port: 554
       fps: 29
       recorder:
         idle_timeout: 1
         extension: mkv
         filename_pattern: 'BackE_%Y-%m-%d-%H%M%S'
         lookback: 12
         retain: 90
         thumbnail:
           filename_pattern: 'BackE_%Y-%m-%d-%H%M%S'
    FrontEast2:
       name: Front_East2
       host: !secret camera_ip_front_east2
       username: !secret camera_us_front_east2
       password: !secret camera_pw_front_east2
       path: /cam/realmonitor?channel=1&subtype=0&proto=Private3
       port: 80
       fps: 29
       recorder:
         idle_timeout: 10
         codec: h264
         filename_pattern: 'FrontE_%Y-%m-%d-%H%M%S'
         lookback: 7
         retain: 90
         thumbnail:
           filename_pattern: 'FrontE_%Y-%m-%d-%H%M%S'
    FrontWest:
       name: Front_West
       host: !secret camera_ip_front_west
       username: !secret camera_us_front_west
       password: !secret camera_pw_front_west
       path: /Streaming/Channels/101?transportmode=unicast&profile=Profile_1
       port: 554
       fps: 25
       recorder:
         idle_timeout: 10
         codec: h264
         filename_pattern: 'FrontW_%Y-%m-%d-%H%M%S'
         lookback: 7
         retain: 90
         thumbnail:
           filename_pattern: 'FrontW_%Y-%m-%d-%H%M%S'

deepstack:
  host: xxxx.xxxx.xxxx.xxxx
  port: 5000
  object_detector:
    image_width: 1024
    image_height: 1024
    cameras:
      FrontEast2:
        fps: 1
        scan_on_motion_only: false
        labels:
          - label: person
            trigger_recorder: true
          - label: dog
            trigger_recorder: true
          - label: cat
            trigger_recorder: true
          - label: truck
            trigger_recorder: true
            require_motion: true
          - label: car
            trigger_recorder: true
            require_motion: true
      FrontWest:
        fps: 1
        labels:
          - label: person
            trigger_recorder: true
          - label: dog
            trigger_recorder: true
          - label: cat
            trigger_recorder: true
          - label: truck
            trigger_recorder: true
            require_motion: true
          - label: car
            trigger_recorder: true
            require_motion: true
      BackEast:
        fps: 2

background_subtractor:
  motion_detector:
    cameras:
      FrontEast2:
        fps: 1
        mask:
          - coordinates:
              - x: 957
                y: 1515
              - x: 957
                y: 676
              - x: 1186
                y: 438
              - x: 2100
                y: 438
              - x: 2684
                y: 590
              - x: 2684
                y: 1
              - x: 1
                y: 1
              - x: 1
                y: 1515
      FrontWest:
        fps: 1
        mask:
          - coordinates:
              - x: 294
                y: 0
              - x: 1920
                y: 0
              - x: 1920
                y: 206
              - x: 1651
                y: 136
              - x: 1120
                y: 114
              - x: 321
                y: 233
          - coordinates:
              - x: 1
                y: 537
              - x: 1
                y: 1080
              - x: 1920
                y: 1080
              - x: 1920
                y: 810
              - x: 1278
                y: 870
              - x: 526
                y: 1015
      BackEast:
        fps: 1
        mask:
          - coordinates:
              - x: 1914
                y: 1
              - x: 320
                y: 1
              - x: 320
                y: 148
              - x: 872
                y: 33
              - x: 1914
                y: 174

nvr:
  FrontEast2:
  FrontWest:
  BackEast:

webserver:

mqtt:
  broker: !secret mqtt_host
  port: !secret mqtt_port
  username: !secret mqtt_us
  password: !secret mqtt_pw
  client_id: viseron
  home_assistant:

logger:
  default_level: info
  logs:
    viseron.components.data_stream: info
    viseron.components.background_subtractor: info
    viseron.components.mog2: info

After updating this morning, I see a couple more. This is the most recent:
[2022-03-11 14:44:20] [INFO    ] [viseron.components.ffmpeg.recorder.FrontEast2] - Starting recorder
[2022-03-11 14:44:21] [INFO    ] [viseron.components.nvr.FrontEast2] - Starting motion detector
[2022-03-11 14:44:24] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 9
[2022-03-11 14:44:25] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 8
[2022-03-11 14:44:26] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 7
[2022-03-11 14:44:27] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 6
[2022-03-11 14:44:28] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 5
[2022-03-11 14:44:29] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 4
[2022-03-11 14:44:30] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 3
[2022-03-11 14:44:31] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 2
[2022-03-11 14:44:32] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 1
[2022-03-11 14:44:33] [INFO    ] [viseron.components.nvr.FrontEast2] - Stopping recording in: 0
[2022-03-11 14:44:33] [INFO    ] [viseron.components.nvr.FrontEast2] - Pausing motion detector
[2022-03-11 14:44:33] [INFO    ] [viseron.components.ffmpeg.recorder.FrontEast2] - Stopping recorder
[concat @ 0x55dfa2405500] Impossible to open 'file:/segments/FrontEast2/20220311144331.mp4'
pipe:: No such file or directory
pipe:: Input/output error
    Last message repeated 7 times
[2022-03-11 14:44:44] [ERROR   ] [viseron.components.ffmpeg.recorder.FrontEast2] - Could not get duration for: /segments/FrontEast2/20220311144302.mp4. Error: /segments/FrontEast2/20220311144302.mp4: No such file or directory

[2022-03-11 14:44:44] [ERROR   ] [viseron.components.ffmpeg.recorder.FrontEast2] - Could not get duration for: /segments/FrontEast2/20220311144256.mp4. Error: /segments/FrontEast2/20220311144256.mp4: No such file or directory

[2022-03-11 14:44:45] [ERROR   ] [viseron.components.ffmpeg.recorder.FrontEast2] - Could not get duration for: /segments/FrontEast2/20220311144416.mp4. Error: /segments/FrontEast2/20220311144416.mp4: No such file or directory

[2022-03-11 14:44:45] [ERROR   ] [viseron.components.ffmpeg.recorder.FrontEast2] - Could not get duration for: /segments/FrontEast2/20220311144346.mp4. Error: /segments/FrontEast2/20220311144346.mp4: No such file or directory

[2022-03-11 14:44:45] [ERROR   ] [viseron.components.ffmpeg.recorder.FrontEast2] - Could not get duration for: /segments/FrontEast2/20220311144316.mp4. Error: /segments/FrontEast2/20220311144316.mp4: No such file or directory

[2022-03-11 14:44:45] [ERROR   ] [viseron.components.ffmpeg.recorder.FrontEast2] - Could not get duration for: /segments/FrontEast2/20220311144322.mp4. Error: /segments/FrontEast2/20220311144322.mp4: No such file or directory

[2022-03-11 14:44:45] [ERROR   ] [viseron.components.ffmpeg.recorder.FrontEast2] - Could not get duration for: /segments/FrontEast2/20220311144356.mp4. Error: /segments/FrontEast2/20220311144356.mp4: No such file or directory

[2022-03-11 14:44:45] [ERROR   ] [viseron.components.ffmpeg.recorder.FrontEast2] - Could not get duration for: /segments/FrontEast2/20220311144411.mp4. Error: /segments/FrontEast2/20220311144411.mp4: No such file or directory

[2022-03-11 14:44:45] [ERROR   ] [viseron.components.ffmpeg.recorder.FrontEast2] - Could not get duration for: /segments/FrontEast2/20220311144311.mp4. Error: /segments/FrontEast2/20220311144311.mp4: No such file or directory

[2022-03-11 14:44:45] [WARNING ] [viseron.components.ffmpeg.recorder.FrontEast2] - Could not find matching start segment. Using earliest possible
[concat @ 0x559a3962c500] Impossible to open 'file:/segments/FrontEast2/20220311144246.mp4'
pipe:: No such file or directory
[2022-03-11 14:44:45] [ERROR   ] [viseron.components.ffmpeg.recorder.FrontEast2] - Failed to concatenate segments: Command '['ffmpeg', '-hide_banner', '-loglevel', 'error', '-y', '-protocol_whitelist', 'file,pipe', '-f', 'concat', '-safe', '0', '-i', '-', '-c:v', 'h264', '-c:a', 'copy', '-movflags', '+faststart', '/recordings/FrontEast2/2022-03-11/FrontE_2022-03-11-144420.mp4']' returned non-zero exit status 1.

I have the same problem with roflcoopter/viseron:latest image running on a RPi3. The same image works fine with my PC

This was fixed recently in v2, seemed to happen when multiple recordings started back 2 back.
Please open a new issue if it still persists