_ Prechecks _

+1 :green_heart:
dupname
0m  0s
No case conflicting files found.

+1 :green_heart:
hbaseanti
0m  0s
Patch does not have any anti-patterns.

+1 :green_heart:
@author
0m  0s
The patch does not contain any @author tags.

_ master Compile Tests _

+1 :green_heart:
mvninstall
3m  2s
master passed

+1 :green_heart:
compile
0m 31s
master passed

+1 :green_heart:
checkstyle
0m 12s
master passed

+1 :green_heart:
spotless
0m 55s
branch has no errors when running spotless:check.

+1 :green_heart:
spotbugs
0m 39s
master passed

_ Patch Compile Tests _

+1 :green_heart:
mvninstall
3m  8s
the patch passed

+1 :green_heart:
compile
0m 31s
the patch passed

+1 :green_heart:
javac
0m 31s
hbase-backup generated 0 new + 0 unchanged - 52 fixed = 0 total (was 52)

+1 :green_heart:
checkstyle
0m 11s
the patch passed

+1 :green_heart:
whitespace
0m  0s
The patch has no whitespace issues.

+1 :green_heart:
hadoopcheck
15m  5s
Patch does not cause any errors with Hadoop 3.1.2 3.2.2 3.3.1.

+1 :green_heart:
spotless
1m  0s
patch has no errors when running spotless:check.

-1 :x:
spotbugs
0m 48s
hbase-backup generated 6 new + 0 unchanged - 0 fixed = 6 total (was 0)

_ Other Tests _

+1 :green_heart:
asflicense
0m 15s
The patch does not generate ASF License warnings.

33m 36s

Reason
Tests

FindBugs
module:hbase-backup

Impossible downcast of toArray() result to org.apache.hadoop.hbase.TableName[] in org.apache.hadoop.hbase.backup.impl.BackupCommands$BackupSetCommand.processSetAdd(String[])  At BackupCommands.java:to org.apache.hadoop.hbase.TableName[] in org.apache.hadoop.hbase.backup.impl.BackupCommands$BackupSetCommand.processSetAdd(String[])  At BackupCommands.java:[line 1093]

Impossible downcast of toArray() result to String[] in org.apache.hadoop.hbase.backup.impl.BackupSystemTable.getRegionNameFromOrigBulkLoadRow(String)  At BackupSystemTable.java:to String[] in org.apache.hadoop.hbase.backup.impl.BackupSystemTable.getRegionNameFromOrigBulkLoadRow(String)  At BackupSystemTable.java:[line 1751]

Impossible downcast of toArray() result to String[] in org.apache.hadoop.hbase.backup.impl.BackupSystemTable.getTableNameFromOrigBulkLoadRow(String)  At BackupSystemTable.java:to String[] in org.apache.hadoop.hbase.backup.impl.BackupSystemTable.getTableNameFromOrigBulkLoadRow(String)  At BackupSystemTable.java:[line 1745]

Impossible downcast of toArray() result to String[] in org.apache.hadoop.hbase.backup.util.BackupUtils.findMostRecentBackupId(String[])  At BackupUtils.java:to String[] in org.apache.hadoop.hbase.backup.util.BackupUtils.findMostRecentBackupId(String[])  At BackupUtils.java:[line 741]

Impossible downcast of toArray() result to String[] in org.apache.hadoop.hbase.backup.util.BackupUtils.parseTableNames(String)  At BackupUtils.java:to String[] in org.apache.hadoop.hbase.backup.util.BackupUtils.parseTableNames(String)  At BackupUtils.java:[line 287]

Impossible downcast of toArray() result to String[] in org.apache.hadoop.hbase.backup.util.BackupUtils$1.getTimestamp(String)  At BackupUtils.java:to String[] in org.apache.hadoop.hbase.backup.util.BackupUtils$1.getTimestamp(String)  At BackupUtils.java:[line 601]

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4622/1/artifact/yetus-general-check/output/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/4622

Optional Tests
dupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile

uname
Linux 5627ce41fd98 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/hbase-personality.sh

git revision
master / 01b45e285d

Default Java
AdoptOpenJDK-1.8.0_282-b08

spotbugs
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4622/1/artifact/yetus-general-check/output/new-spotbugs-hbase-backup.html

Max. process+thread count
64 (vs. ulimit of 30000)

modules
C: hbase-backup U: hbase-backup

Console output
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4622/1/console

versions
git=2.17.1 maven=3.6.3 spotbugs=4.2.2

Powered by
Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Comment

+0 :ok:
reexec
0m 39s
Docker mode activated.

-0 :warning:
yetus
0m  3s
Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck

_ Prechecks _

_ master Compile Tests _

+1 :green_heart:
mvninstall
2m 23s
master passed

+1 :green_heart:
compile
0m 15s
master passed

+1 :green_heart:
shadedjars
3m 48s
branch has no errors when building our shaded downstream artifacts.

+1 :green_heart:
javadoc
0m 11s
master passed

_ Patch Compile Tests _

+1 :green_heart:
mvninstall
2m 31s
the patch passed

+1 :green_heart:
compile
0m 15s
the patch passed

+1 :green_heart:
javac
0m 15s
the patch passed

+1 :green_heart:
shadedjars
3m 47s
patch has no errors when building our shaded downstream artifacts.

+1 :green_heart:
javadoc
0m 11s
the patch passed

_ Other Tests _

+1 :green_heart:
unit
9m 40s
hbase-backup in the patch passed.

24m 42s

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4622/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/4622

Optional Tests
javac javadoc unit shadedjars compile

uname
Linux 7cd41c68ca82 5.4.0-1071-aws #76~18.04.1-Ubuntu SMP Mon Mar 28 17:49:57 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/hbase-personality.sh

git revision
master / 01b45e285d

Default Java
AdoptOpenJDK-11.0.10+9

Test Results
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4622/2/testReport/

Max. process+thread count
2997 (vs. ulimit of 30000)

modules
C: hbase-backup U: hbase-backup

Console output
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4622/2/console

versions
git=2.17.1 maven=3.6.3

Powered by
Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Comment

+0 :ok:
reexec
0m 41s
Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  0s
No case conflicting files found.

+1 :green_heart:
hbaseanti
0m  0s
Patch does not have any anti-patterns.

+1 :green_heart:
@author
0m  0s
The patch does not contain any @author tags.

_ master Compile Tests _

+1 :green_heart:
mvninstall
2m 30s
master passed

+1 :green_heart:
compile
0m 23s
master passed

+1 :green_heart:
checkstyle
0m  8s
master passed

+1 :green_heart:
spotless
0m 41s
branch has no errors when running spotless:check.

+1 :green_heart:
spotbugs
0m 26s
master passed

_ Patch Compile Tests _

+1 :green_heart:
mvninstall
2m  6s
the patch passed

+1 :green_heart:
compile
0m 22s
the patch passed

+1 :green_heart:
javac
0m 22s
hbase-backup generated 0 new + 0 unchanged - 52 fixed = 0 total (was 52)

+1 :green_heart:
checkstyle
0m  7s
the patch passed

+1 :green_heart:
whitespace
0m  0s
The patch has no whitespace issues.

+1 :green_heart:
hadoopcheck
11m 50s
Patch does not cause any errors with Hadoop 3.1.2 3.2.2 3.3.1.

+1 :green_heart:
spotless
0m 39s
patch has no errors when running spotless:check.

+1 :green_heart:
spotbugs
0m 29s
the patch passed

_ Other Tests _

+1 :green_heart:
asflicense
0m  9s
The patch does not generate ASF License warnings.

25m 50s

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4622/2/artifact/yetus-general-check/output/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/4622

Optional Tests
dupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile

uname
Linux 0654daf31d55 5.4.0-1025-aws #25~18.04.1-Ubuntu SMP Fri Sep 11 12:03:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/hbase-personality.sh

git revision
master / 01b45e285d

Default Java
AdoptOpenJDK-1.8.0_282-b08

Max. process+thread count
69 (vs. ulimit of 30000)

modules
C: hbase-backup U: hbase-backup

Console output
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4622/2/console

versions
git=2.17.1 maven=3.6.3 spotbugs=4.2.2

Powered by
Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Comment

+0 :ok:
reexec
1m  9s
Docker mode activated.

-0 :warning:
yetus
0m  2s
Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck

_ Prechecks _

_ master Compile Tests _

+1 :green_heart:
mvninstall
2m 28s
master passed

+1 :green_heart:
compile
0m 16s
master passed

+1 :green_heart:
shadedjars
3m 44s
branch has no errors when building our shaded downstream artifacts.

+1 :green_heart:
javadoc
0m 14s
master passed

_ Patch Compile Tests _

+1 :green_heart:
mvninstall
2m 17s
the patch passed

+1 :green_heart:
compile
0m 16s
the patch passed

+1 :green_heart:
javac
0m 16s
the patch passed

+1 :green_heart:
shadedjars
3m 42s
patch has no errors when building our shaded downstream artifacts.

+1 :green_heart:
javadoc
0m 13s
the patch passed

_ Other Tests _

+1 :green_heart:
unit
10m 45s
hbase-backup in the patch passed.

26m 10s

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4622/2/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/4622

Optional Tests
javac javadoc unit shadedjars compile

uname
Linux c14508a31575 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/hbase-personality.sh

git revision
master / 01b45e285d

Default Java
AdoptOpenJDK-1.8.0_282-b08

Test Results
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4622/2/testReport/

Max. process+thread count
2919 (vs. ulimit of 30000)

modules
C: hbase-backup U: hbase-backup

Console output
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4622/2/console

versions
git=2.17.1 maven=3.6.3

Powered by
Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache9 I don't agree to use stringsplitter here so if you prefer we can just close this.

Lets apply the new spotless rule for the automated fix, and then come back to this PR.

@Apache9 It is fine to handle the string split warnings some other way, but I thought I would take this approach. I had a bit of trouble actually using Splitter. I'm sure I could figure it out but there are other things that seem more important. string#split works in these cases and is good enough IMHO. Is this ok?
Or, we could just leave these in place and also not add the @SuppressWarnings("StringSplitter"), that is fine with me too. In other words, no change for the string#split cases.

Usually there is no harm to use String.split, as long as it has been like this for a long time in our code base, so I'm OK with leaving it as is or adding a SuppressWarnings.
Out of interest, what is the problem when using Splitter? It is just a Splitter.on().splitToList().
Thanks.


Thunk reducer

Hello I created the thunk and reducer for the all view products and a single view product. Also I fetched all the products into the AllProducts component.

Looks great!


Persistent Caches

Store caches in files to keep cache data and update times between program resets.

Closed in #2


How to change spinner data on runtime?

Hello guys this library is awesome please help to how to change spinner data on runtime??

How to add notifyDatasetChanged() to it

add a listener like this:
Spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
                @Override
                public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
                    Log.d("Spinner",list.get(position));
                }

                @Override
                public void onNothingSelected(AdapterView<?> parent) {
                    Log.d("Spinner","Nothing Selected!");
                }
            });

This issue still has no solution?


[Issue] Smoothcaret breaks multi-cursor rendering

When smoothcaret is enabled, only one caret appears when trying to use multi-cursor functionality.
This is how it looks:

Normally it looks like this:

System: i7-1165G7, Mesa Intel® Xe Graphics (TGL GT2) (Mesa version: 21.3.7)
OS: Fedora Linux 35 (Gnome 41.3 on Wayland)
Lite XL version: 2.0.5 (from the binary releases page)

Thank you for the report!
Could you please test if #46 fixes your problem?

Sure, I'll test it when I can (probably tomorrow).


404 Not found: Learn -> Data Model

http://infolis.gesis.org/infolink/work/data-model

The link in the header should be fixed. Though I'm not sure it is that helpful without any explanation. Maybe integrate it into the help for the Data Model Explorer?

Okay. IMO it is currently find under Play.


Docs for some new workbox-webpack-plugin options

https://github.com/GoogleChrome/workbox/pull/1403 added some new options for the workbox-webpack-plugin. These are the docs for them.
Technically, these docs should go live at around the same time as the next Workbox release goes live... but at the same time, it's a small change to existing docs, and it might be hard to coordinate that. I'm not as worried if we merge this ahead of time.
Target Live Date: 2018-04-XX

[ ] This has been reviewed and approved by (@gauntface)
[X] I have run gulp test locally and all tests pass.
[X] I have added the appropriate type-something label.
[X] I've staged the site and manually verified that my content displays correctly.

CC: @petele

:+1:

:tada: This has been pushed live to https://developers.google.com/web/


enable signature-help on java language server

update jdtls to latest version (for feature and speed improvements) as well as set flag to enable signature help functionality

Sorry for dropping the ball on the last one @appelgriebsch - will try to review this one better!

Looks like 0.39.0 got released today with what seems like a pretty important NPE fix - would you mind updating to that?

Looks like it hasn't been publicly released yet... https://github.com/eclipse/eclipse.jdt.ls/releases

@Aerijo maybe you can help here given your work with the IDE packages - I'm noticing that signature help isn't showing unless I manually call signature-help:show, even though I have it set to track on type (atom-ide-signature-help). Seems like there's something about trigger characters? Is that handled by ide-java or the language server?
Also, this PR adds a new consumed service for signature help, but doesn't define consumeSignatureHelp anywhere - do we need to? If we don't have that function, do we even need to declare that we're consuming it?

The server declares characters meant to automatically trigger a signature
/**
 * Signature help options.
 */
export interface SignatureHelpOptions {
	/**
	 * The characters that trigger signature help
	 * automatically.
	 */
	triggerCharacters?: string[];
}

I'm not familiar with signature handling, but atom-languageclient appears to recognise them. It also has a definition for consumeSignatureHelp, so that shouldn't be an issue (this package still needs to consume signature-help directly like it is in the PR). The signatures (sub)package opf atom-ide-ui is responsible for triggering based on characters, and far as I can tell it support trigger characters fine.
So you'll have to see if the server is actually sending trigger characters to see if there's a problem. I do this by adding console logs with the messages somewhere in the vscode-jsonrpc node module I think.

Looks like the java language server only delivers the opening brace as trigger character....

At least in my tests this is properly recognised...

On the other hand I would expect to have the comma as trigger character as well, so that it will update as soon as I jump through the list of parameters

Hmm...here's what I'm seeing:

Maybe that's an issue with the signature help package though, and not this one + the server?

This might be an issue with atom-ide-signature-help that happens sporadically if the file is opened when starting the editor. If you close the initial text window and open it via the project tree it will work as expected....

@50Wliu: is there still something missing? (little reminder to merge the PR ;))

I think the 100% bug is something we can live with in exchange for all these changes since the last update, especially signature help :). I'll file a follow-up issue so we can track that bug.

Thanks @appelgriebsch!


Installation issue

I've just tried to install the package in my environment, both windows and Mac but failed,
I have this error in windows
(sorry for the long log but I hope it could help)
I am willing to contribute in code too.
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 000001A7C0DDC5C1]
1: StubFrame [pc: 000001A7C0DA08FF]

Security context: 0x011cd9d9e6e9
2: applyScanners(aka applyScanners) [0000019F9797ED81] [D:\WebApps\vaadin-router\node_modules\polymer-analyzer\lib\javascript\javascript-document.js:~40] [pc=000001A7C
1876310](this=0x027eeb0026f1 ,callbackName=0x0256263d8ed9 <String[25]: leaveAssignmentExpression>,node=0x02562638e4d9 <Node map = 000002...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 00007FF6CFF1D1BA v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+4506
2: 00007FF6CFEF7F96 node::MakeCallback+4534
3: 00007FF6CFEF8910 node_module_register+2032
4: 00007FF6D02126FE v8::internal::FatalProcessOutOfMemory+846
5: 00007FF6D021262F v8::internal::FatalProcessOutOfMemory+639
6: 00007FF6D03F8E24 v8::internal::Heap::MaxHeapGrowingFactor+9620
7: 00007FF6D03EFE06 v8::internal::ScavengeJob::operator=+24550
8: 00007FF6D03EE45C v8::internal::ScavengeJob::operator=+17980
9: 00007FF6D03F71A7 v8::internal::Heap::MaxHeapGrowingFactor+2327
10: 00007FF6D03F7226 v8::internal::Heap::MaxHeapGrowingFactor+2454
11: 00007FF6D052114B v8::internal::Factory::AllocateRawWithImmortalMap+59
12: 00007FF6D0523ABD v8::internal::Factory::NewRawOneByteString+77
13: 00007FF6D026EB94 v8::internal::Smi::SmiPrint+372
14: 00007FF6D0205D0B v8::internal::StringHasher::UpdateIndex+219
15: 00007FF6D0296B04 v8::internal::StringTable::LookupString+36
16: 00007FF6D020B70C v8::internal::LookupIterator::LookupIterator+124
17: 00007FF6D020BAFB v8::internal::LookupIterator::PropertyOrElement+299
18: 00007FF6D051657B v8::internal::wasm::WasmCodeManager::LookupCode+31659
19: 000001A7C0DDC5C1
npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR<EMAIL_ADDRESS>build:typescript-declarations: gen-typescript-declarations --outDir . --verify
npm ERR! Exit status 134
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>build:typescript-declarations script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR!      C:\Users\Maher\AppData\Roaming\npm-cache_logs\2020-12-15T17_35_30_328Z-debug.log
ERROR: "build:typescript-declarations" exited with 134.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR<EMAIL_ADDRESS>build: rollup -c && npm-run-all --parallel build:minify.* build:typescript-declarations
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:

Could you please provide a bit more context here? What would be the steps for me to reproduce the issue?
By looking at the log I see that the failure happens when executing the rollup -c && npm-run-all --parallel build:minify.* build:typescript-declarations command. It matches the build npm script. This script does not run (it's not needed) when you want to use router in your app and install it with npm install @vaadin/router. It's needed only if you want to build your own custom version of router on your machine. Is this what you were trying to do?
If you were indeed trying to build router from the source code on your machine, could you please post here the versions of node, npm and yarn you have installed? Have you checked the instructions for local builds in the README?

Sorry for my late answer, and thank you for your fast answer :)
In fact I wanted to install it to test demo before integrate it to the app.
But as you mentioned does the license allow us to create our own custom version?
it will not used as a public repository, it's just a question, we are discussing about a router library and yours is among them.
What we want to change is not display the current path, the same for this it will be used as option not a base behavior in the application.

In fact I wanted to install it to test demo before integrate it to the app.
But as you mentioned does the license allow us to create our own custom version?
it will not used as a public repository, it's just a question, we are discussing about a router library and yours is among them.
What we want to change is not display the current path, the same for this it will be used as option not a base behavior in the application.

The license this repo / library is Apache 2.0 so yes you can freely fork this library and make any changes you need.
The general instructions and specific steps to build the library locally and run tests / demos are in the README file. If they do not work for you and you keep getting the build error as you've mentioned above, please post the details of your environment (versions of the OS, Node, npm and Yarn) and the basic steps to reproduce the issue. I've just checked and did not get any issues when trying to make a clean clone / build of this repo.

I am closing this issues assuming that the comments above have indeed helped to clarify it.

I am closing this issues assuming that the comments above have indeed helped to clarify it.

Hello @vlukashov , sorry didn't back to you, but you answered all my question, thanks a lot.

Hello @vlukashov , sorry didn't back to you, but you answered all my question, thanks a lot.


Investigate how to cache static generated pages

See e.g. https://www.smashingmagazine.com/2021/04/incremental-static-regeneration-nextjs/#isr-not-just-caching

https://nascentdigital.com/thoughts/how-to-deploy-next-js-without-vercel <-- Features a paragraph on CDN near the bottom

I don't think I'm able to do so much more here :woman-shrugging: Have read through the Internet, didn't find that much of interest beyond ^ . Next (pun intended) step will probably be to test this out with a CDN on Azure/Radix.
It's the content of the .next/server/pages that would somehow be nice to persist between builds and for horizontal scaling at k8s. But how will this affect revaildate? It might be possible to map this folder to some storage in Azure somehow in k8s, but which consequences will it have...? If we somehow find a sweet spot between the number of prebuilt pages during build process, and ISR pages that would probably be 1. thing. Shouldn't do too much premature optimisation either, especially prefetch a lot of the pages in the background as well...


Immediate disconnect?

Hello,
Thank you for creating this, I couldn't find any other way to connect to an SSE service using c# on .Net Core 2.0!  My code looks like this:
var evt = new EventSourceReader(new Uri(url)).Start();
            evt.MessageReceived += (sender, response) => Console.WriteLine($"{response.Event} : {response.Message}");
            evt.Disconnected += async (sender, response) => {
                Console.WriteLine($"Retry: {response.ReconnectDelay} - Error: {response.Exception}");
                await Task.Delay(response.ReconnectDelay);
                evt.Start(); // Reconnect to the same URL
            };

The URL I'm connecting to is: https://horizon-testnet.stellar.org/accounts/GDPQINE6WPAHGZBG2R5KLH7DXGNCLBXTLIYMF53QH4QA36OOZY2TF2O6/payments
Which as you can see returns JSON data just fine.  I know that if I'm using curl I have to pass the Accept: text/event-stream header which I'm assuming your code is doing.
But I keep getting a message saying Retry: 3000 - Error: "it's blank, nothing is reported"
Any ideas?

Do you mean there's nothing after Error: or that it reads "it's blank, nothing is reported"?

There is nothing after error.
That url is public, feel free to try it and replicate the issue.
Thanks for looking into this.

Hey, wanted to let you know I fixed the issue today.  I pulled down your repository and modified it to work on .Net 4.5.2 (we aren't allowed to have dotnet core on our machines yet).
I manually added the header headers.Add("Accept", "text/event-stream"); to the HttpClient that you created and everything started working great.  Getting timeout errors every so often but it keeps chugging along anyway like it should.
Not sure if you or others need to add that header (or least provide the option to add it in the library perhaps to those that need it, but that's what worked for me.  Thanks for your help and hopefully this helps others!

FWIW, it should support .Net 4.6.1 and above out of the box in addition to .net core 1 and above.

Yes, it should, except my c# version was too low.  Your line, within the WebRequest has an out parameter that doesn't work without the newer version of c# and that's what the issues was. =)  Thanks again and great job!


Any way to get some free credits to use the service?

Hi, I'm a student, can I get some free credits to use the service?

Hi @Iven2132
You can create a ticket on the page https://2captcha.com/support/tickets/new , and clarify this directly in the service.


Feature Request: Set/Get Object with 'Dot Notation'

var setProp = function (obj, path, val) {
    path = path.split('.');

    for (var i = 0, max = path.length - 1; i < max; i += 1) {
        obj = obj[path[i]] = obj[path[i]] || {};
    }

    obj[path[i]] = val;
};

var getProp = function (obj, path) {
    path = path.split('.');

    for (var i = 0, max = path.length; i < max; i += 1) {
        obj = obj[path[i]];
    }

    return obj;
};

Which (when extending Object) would let us do:
var obj = {};
Object.setProp(obj, 'location.address.street', 'test');
console.log(obj.location.address.street); // -> test

And retrieve it dynamically with this:
console.log(Object.getProp(obj, 'location.address.street')); // -> test

Hm... this existed (sort of) previously as String#namespace but was removed as it wasn't particularly useful, however it wasn't as well thought out.
I can see the usefulness of this, but I'll have to think on it a bit.
Another alternative might be something like:
Object.namespace(key); // Getter
Object.namespace(key, value); // Setter

Sorry last comment (which was ages ago) should of course include the object as well:
Object.namespace(obj, key);
Object.namespace(obj, key, value);

However thinking about it maybe your original naming was better, or even simpler:
Object.get(obj, key);
Object.set(obj, key, value);

However I'm still wondering if this would be useful enough to most people to be added. What do you think? Is this something you'd still like to see?

Well, it's a use case that pops up once in a while. not that often, but definitely happened

OK... will think about this one. I'm inclined to like it but does have some implications that need to be ironed out.

In lodash every "pick" style function such as "_.map(arr, 'key')" works with dot notation getters.

That is interesting. I'm inclined to think that this should work in Sugar as well. However it's a bit tangential to the topic, which is asking to expose this functionality in the public API.
Also there is a subtle nuance here:
_.map([{'foo': { 'bar': 3 }}], 'foo.bar');

vs
_.map([{'foo.bar': 4}], 'foo.bar');

These kind of nuances can be tricky.

They very much are... That's why lenses are such a big topic as well :P. not really relevant for Sugar, I guess, though.

What's lenses?

Functional "equivalent" to getter/setter (where everything is pure, i.e. you need to copy the structure "deeply"). you're supposed to be able to compose them and all. Far too complex and totally unrelated to Sugar, but they're the de-facto solution to deep getter/setter stuff in languages like Haskell, etc.

Interesting... will have a look just for reference... thanks!

Ok, so I'd like to update my thinking on this issue. Although I somewhat suggested it above, I feel that the naming get and set are too general considering the following problem:
var obj = {
  foo: {
    bar: 1
  },
  'foo.bar': 2
}
Object.get('foo.bar');  // Should this be 1 or 2??

I think that this method's naming should make it explicit about what it's doing. For the same reason I think it should also be a single method that does both get and set rather than two different methods, as that would be more clear. Right now in my mind the following might work:

namespace (the original name)
dot
deep

I'm open to new naming ideas as well.  Additionally, this method can be flagged as an instance method as well. This means that it will work in extended objects:
var obj = Object.extended(someVeryDeepObject);
obj.deep('location.address.street', '1600 Pennsylvania Avenue');

Or when extending Object.prototype (this needs to be explicitly opted into):
someVeryDeepObject.deep('location.address.street', '1600 Pennsylvania Avenue');

looking at it now, all the suggestions above look strange to me and don't seem very clear if you were to encounter them in code. Definitely open to better suggestions here.

I'm flip-flopping a lot on this. One the one hand get and set are much more expressive as to what they're doing. On the other hand, they are extremely generic for their potentially confusing behavior.
More thinking... maybe it really should do the same as lodash/underscore, which is choose a property with the dots inside if it exists, or go deep if it doesn't. Honestly, that behavior is straightforward enough I think it's unlikely it would be confusing....

Right. Also, who uses dot-separated properties? :P

+1 for lodash style. If you have both a nested and flat property on the same object you probably need to rethink things anyway.
@vendethiel the only time I can think of is when I flatten objects before submitting them with form data and then unflatten on the server. I certainly can't think of a case where you would want or need both a deep and flat key.

Tending to agree with you guys, but want to flesh out one more thing:
To be clear, lodash uses the flat property if it already exists and falls back to recursively entering the namespace. However I'm wondering if this is really very useful, or if completely ignoring the flat property is better. Keep an open mind here and imagine that you're working in some crappy code that happens to use both flat and nested properties and you can't do a damn thing about it :)
get(obj, 'a.b.c');

Let's say this is returning obj['a.b.c'] and shadowing what you really want to get at, which is obj.a.b.c (which is exactly what _.set in lodash would do). Your alternative here is to simply use the standard JS notation. However if you're not sure if the namespace exists, you'll have to do something like this: obj.a && obj.a.b && obj.a.b.c.
OK, not too bad, but what about setting a variable on the same namespace? set(obj, 'a.b.c', 'foo') would set the flat property, so that's no good. If you weren't sure the namespace exists, you would have to do something quite ugly:
 (obj.a || (obj.a = {})) && (obj.a.b || (obj.a.b = {})) && (obj.a.b.c = 'foo');

This nearly unintelligible piece of code is just about the most concise you can get without writing your own recursive function. So if this edge case were to happen, you would be kind of stuck. So what if the method always recursed into namespaces when it finds a .?
get(obj. 'a.b.c');

Let's say in this case you want to get at obj['a.b.c'], but it's returning the deep property instead. Well in this case you can simply use standard JS syntax obj['a.b.c'] with no fuss. Always going deep would make these methods more straightforward with less special cases to cover, so I'm leaning toward it... what do you guys think?

Last question, what happens if the namespace already exists?
var obj = { a: 'b' };
get(obj, 'a.b.c'); // What gets returned here?
set(obj, 'a.b.c', 'foo'); // What gets set here?

Lodash will return undefined for get and ignore set completely. Is that best? Is there a use case for recursively going in but stopping when the namespace is not undefined? In the example this would mean returning b for get ... for set I'm not sure what would happen... Also an error could be thrown...

OK more developments here. For reasons maybe a bit too complicated to go into here, get and set cannot be set on Object.prototype. Sugar does not modify Object.prototype by default, but there is a mode that allows type checking methods (isNumber), etc and hash methods (keys, etc) to be opted-in. It's a bit "at your own risk" but it does add value. There are essentially two ways to handle this:

Simply don't allow the method on on the prototype.

The static method would still work, as well as on extended objects:
Object.get(obj, 'prop');
var extended = Object.extended(obj);
extended.get('prop');

Rename the methods.

Either by adding to both:
Object.getProp(obj, 'prop');
Object.setProp(obj, 'prop', 'val');
obj.getProp('prop'); // Note this won't work normally
obj.setProp('prop', 'val'); // Note this won't work normally

Or making a single method that acts as both a getter and a setter as suggestion above:
Object.prop(obj, 'prop');
Object.prop(obj, 'prop', 'val');
obj.prop('prop'); // Note this won't work normally
obj.prop('prop', 'val'); // Note this won't work normally

Personally I'm leaning toward simply forbidding it on Object.prototype. This mode of usage isn't meant to be standard anyway and extended objects are still available, so this seems to be the cleanest way.

One more idea I'm poking about with:
set({}, 'foo.0', 'bar');

Should this be {foo:{0:'bar'}} or {foo:['bar']}? By default it would be the first, but I can see the utility in constructing arrays. Lodash it seems always constructs arrays when the keys are numeric, but I think that might be obtrusive if you have an object of models by ids:
set({}, 'users.993425.name', 'Harry');

If you were constructing this for the first time, the result would be a sparse array instead of an object. If you were to JSONify it, the result would be {"users":[null,null,...,null,null,{"name":"Harry"}]} (null 993425 times). I definitely think this is bad. One possible way to do it is construct an array instead of an object for the namespace only if the index is 0. This could be useful for iterating, as the first index should always be 0. After the array is created it will always remain an array, so any subsequent numbers would still remain array indexes.
Another possibility is to have some kind of escaping like "foo.'0'.bar", but I think this is convoluted.

OK, got started laying the groundwork for this. Going with Object.get and Object.set for now and not allowing mapping to Object.prototype. For now going with most of what I mentioned above:

No falling back to flat keys. If there's a dot, we go deep.
set will throw an error if an intermediate namespace is a primitive. This will happen anyway if strict mode is supported by the browser and you try to set a property on any primitive, so this is the best way I think (note that lodash will just bail).
Not doing any of the array creation trickiness for now.

Also this "dot syntax" will be enabled for array methods that implement mapping shortcuts:
arrayOfDeepObjects.map('location.address.street');

This turned out to also include the following methods:  Array#unique, Array#groupBy, Array#min, Array#max, Array#least, Array#most, Array#sortBy.
Some might not be super useful but I definitely think some are! Imagine sorting that same array:
arrayOfDeepObjects.sortBy('location.address.street');

Bordering on spam now... FYI I also added this deep matching ability for Function#memoize which is new to Sugar and takes a hash function that this string is a shortcut for. Think of this as similar to Array#unique:
arrayOfUsers.unique('path.to.deep.user.id');

With huge objects, this is a shortcut so that unique doesn't have to recurse through all properties (which is expensive) to determine uniqueness. You instead pass it a path that is guaranteed to be unique. It turns out this translates to memoize as well. Example:
var fn = fetchUserData.memoize('path.to.deep.user.id'); // some expensive operation
fn(user1);  // fetches
fn(user2);  // fetches
fn(user3);  // fetches
fn(user1);  // cached!

The argument is basically a way to determine what a "unique call" to the memoized function is. Anything that is not unique has it's return value cached and returns that on subsequent calls. Usually this argument to memoize is a function, but now deep matching can very cleanly make a shortcut to pulling properties out of the first argument to determine unique calls. This should have a lot of use (and very trivial to accomplish now).

@andrewplummer I actually like lodash's approach to the array problem, they use user.addresses[0].
Thanks for your work on this by the way; when used in the entire library it can create many conveniences.

That's interesting but I kind of don't like it. In addition to not looking as good (which is my subjective opinion, so it shouldn't count for much), it sort of shoehorns accessing properties with [] to mean "arrays" when semantically there's no difference between that and the dot operator (here it's only serving to create new arrays when the namespace doesn't exist). I can think back to a long time ago when I was confused about the difference and if I saw this I would probably have though "ok [] is an array thing" which would have added to my confusion. Sorry, I know this might seem like overthinking, but there's SO many different parts to Sugar... preventing confusion by adding new concepts or DSL (especially if it applies to only one method) is something that's really important to me.
In addition it would be significantly harder to implement, which would likely impact performance (right now it's a very simple split on .. Anyway if this really does become an issue for people, then I (grudgingly) agree that this syntax is probably the most straightforward. I think maybe we'll get this out in the wild first and if there's huge clamor for it, it can be added with minimal backward compatibility issues.

One other benefit of using the accessor syntax is that it would work well with parsing nested querystrings, or form data. May not be a use case for everyone but can be handy at times.
Another thing that I personally would love is the "push" notation that forms and querystrings have.
<!-- A Form -->
<input name="item[]" value="a"/>
<input name="item[]" value="b">
<input name="item[]" value="c"/>

// A querystring
?item[]=a&item[]=b&item[]=c

Will both often be parsed into
{ item: ["a", "b", "c" }

Sugar actually does this in Object.fromQueryString. However that's a bit different as we're sort of talking about string parsing now no?
However I do kind of see your use case I think:
set({}, 'foo[]`, 'bar');

The [] would be an instruction to append to the end of the array, or create one if it doesn't exist. Fortunately accessing object properties in this way is a syntax error, so this doesn't clash. However if we were to do this you'd have a bit of edge case silliness with crazy object properties like {'foo[]': 'bar'}.
You said "another thing" but that was all I got... did I miss anything?

@andrewplummer I think the edge case could be resolved similarly to the 'field.x': 1 where you would always first check to see if the key in question exists, and if so then just set it, otherwise perform the action, be it a deep nested set or a push.
Not sure what you mean by: You said "another thing" but that was all I got... did I miss anything?.
My "Another thing" was simply that it would be cool to handle the push notation on sets, and have it act as a "pop" on gets.
var obj = { item: [1] };
Object.set(obj, "item[]", 2)
// obj -> { item: [1, 2] }
Object.get(obj, "item[]") // -> 2

No I think I got it! I thought you were proposing 2 different ideas :)

I think the edge case could be resolved similarly to the 'field.x': 1 where you would always first check to see if the key in question exists

To be clear I have not gone with this behavior for the reasons outlined above (my 9th comment... god there's so many).

OK, I have also added deep property support for String#assign which is about to become String#format (Issue #476). This will now let you do stuff like this:
"You live on: {profile.address.street}".format(user);

Also @DylanPiercey I'm sitting on the fence about your proposal right now but if I do allow [] style syntax, I definitely don't want to avoid doing any pop operations, as get should never mutate the object. It could just return the last element, but I'm not sure how useful this would be.
More likely, the [] syntax will only be supported for setting. First I don't want to overcomplicate the get function which is different and now (as you can see) is going to be used all over the place. Additionally there is no semantic value whatsoever in using [] vs. . for get.

@andrewplummer Sorry, I didn't mean to say that "[]" should be pop in the "get" function. I was meaning that it should simply return the last element in the array. It makes the api a bit my symmetric:
var obj = { a: [1] };
var path = "a[]";

Object.set(obj, path, 2); // { a: [1, 2 ] }
Object.get(obj, path); // 2

Yeah... I suppose so. You could also make an argument that you might want to reuse the same key for setting a property and getting it again later (or the same property on another object).

Having a look at this right now and one thing is really irking me about this syntax:
set(user, 'profile.names[]', 'Harry');
set(user, 'profiles[].name', 'Harry');

The first example is clearly pushing "Harry" onto the names array, but what is the second example doing? Is it pushing { name: "Harry" } onto the profiles array, or is it setting the name property of the last existing element in the profiles array? If it's the latter, then I think this disconnect with the first example could be really confusing. I'm tempted to only allow [] at the very end of the last property and be done with it (implementation would be simpler too).

That'd be cool. I know perl uses a[-1] for the last elem

Errr, I meant -- I'm fine with "pushing" not working at all even, I'd say. It's cool if it only works as the last elem in the "format string"

+1 to forcing it at the end.
-1 to -1, since this would make it hard to set negative indexes.

I'm not sure there's a need for that, though?

since this would make it hard to set negative indexes.

Well, when I first wrote that I actually meant only [] and not allowing any index accessors like [123], but I think I'm still wrestling with it a bit... I think there are 2 main arguments for allowing array-style index accessors:

You would be able to access the property with the added hint that if the object does not exist then create an empty array. However, I think that argument is weakened somewhat by the fact that in that case if the index is anything other than 0 you would end up creating a sparse array, which I find very un-compelling as a use case.

If you know that user.addresses is an array then it just "feels" better to access it with user.addresses[1] instead of user.addresses.1 as that's how you would do it in normal JS.

Both kind of weak... arguments against it are:

Considerably more complex implementation. . is a very simple split operation, where [123] requires a regex. This is also probably not too major however.

While user.addresses[1] may "feel" better to look at, it's kind of annoying when building the string, for example while in a loop: 'user.addresses[' + i + ']' vs. 'user.addresses.' + i.

Also rather small.... If we end up allowing it, both implementation-wise and semantically I think it would make more sense to allow it anywhere in the string. It would be confusing to be able to access user.addresses[1] but not user.addresses[1].street. However if we do this the major question is what to do with the [] push operator in the middle of the string as I outlined above.
Also, while I'm not particularly interested in -1 syntax either, I have the same question... Is there any reason to ever set a negative index on an array?

@andrewplummer another positive of the array-style access would be that it is easy to set "application/json" encoded form fields on a javascript object.
http://www.w3.org/TR/html-json-forms/

Can you give me a more concrete example of how that would look? I think I know what you mean but want to be 100%

A really simple json form parser:
<form>
    <input name="contacts[]" value="Person 1"/>
    <input name="contacts[]" value="Person 2"/>
    <input name="name[first]" value="first"/>
    <input name="name[first]" value="last"/>
</form>

var form = document.querySelector("form");
var formData = {};

for (var input of form.elements) {
    Object.set(formData, input.name, input.value);
}

formData; //->
{
    contacts: ["Person 1", "Person 2"],
    name: {
        first: "first",
        last: "last"
   }
}

Ok, here's where we are. First of all I've consolidated get and set to use the same underlying code (this wasn't easy) so now the syntaxes should be parallel. Added bracket syntax like [1234].
I've also added push syntax. Was quite on the fence about this one as you can use Object.fromQueryString instead, but in the end it's a bit simpler (fromQueryString is assuming URL encoded strings with = and & so you would have to build that string and deal with encoding issues).
As a separate issue but related, I've added support for ranges in the bracket notation as well. This means you can do something like this:
Object.get('users.addresses[0..1]');

And it will return the first 2 in the array. You can go deeper as well to perform a map operation:
Object.get('users.addresses[0..1].street.name');

All of this syntax is both 1) complex and 2) potentially non-performant, so I sat down and took a lot of time to do this one right. There are a ton of unit tests now on all the various syntax styles. Additionally I've implemented the entire thing using only split and indexOf, so it's quite fast. Even the additional range syntax simply does a fast .. check on the string up front, so it takes up hardly any cycles at all.
OK, so to summarize:

Big Points

You can now get or set a deep property even if the namespace doesn't exist (yay!)
Dot syntax user.name.first or
Bracket syntax users[0]
Mix and match user.names[0].first
Push to the end of an array when setting Object.set('user.names[]', 'Frank')
Access a range of an array user.names[0..2]
Object.get, Object.set exist as class methods and on extended objects, but not on Object.prototype (as mentioned above)

Small Points

If the string contains . or [] it will always go deep for the reasons listed above.

If the namespace does not exist, get will return undefined, and set will construct it.

The criteria for what set constructs is based on the syntax. If the property is accessed with dot syntax it will use {}. If it uses bracket syntax it will use []. This way you can set IDs in an object without worrying about accidentally creating sparse arrays (as noted above).

If the namespace exists but is a primitive, set will explicitly throw an error for consistency (as browsers in strict mode would anyway). It will not do something strange like overwrite the namespace.

Negative array indexes will be treated as being from the end of the array when bracket syntax is used. That means that set with [-1].name will set the name property of the last elemenet in the array. However if for some bizarre reason you must have negative indexes on your array, then can still be set by using dot syntax foo.bar.-1.name.

Push syntax [] is only supported for set, as [] essentially means the last element of the array + 1, not the last element. For the last element use [-1] instead.

An interim [] in a key such as users[].name will construct the namespace just like normal dot syntax would. In effect it will push an object {name: '...' } onto the array. In the same way users[][0].name will create an array (instead of an object) that will be pushed onto the users array.

Methods that now support this new sytnax are: Array#unique, Array#groupBy, Array#min, Array#max, Array#least, Array#most, Array#sortBy, Function#memoize, String#assign.

That's it! This will land in 2.0.0 (hopefully soon, this was one of the last holdouts).

That looks pretty amazing. Looks like some other tools in other languages, like clojure's specter, say. Which makes me think this could be splitted out as a separate plugin/lib..

@andrewplummer this looks great. I like the slice/mal syntax as well. Curious though if you could do something like users[..] and copy an array?

@vendethiel 2.0.0 will have a much better system not only for plugins but also a build system for building easily making one-off packages/plugins... Can definitely have a look if there's a demand.
@DylanPiercey Yes! Leaving off the first digit assumes 0 and the last digit assumes the end of the array, so [..] effectively performs arr.slice(0, arr.length)

So many notifications :). Nice cleanup all 'round.


Update cats-core to 2.5.0

Updates org.typelevel:cats-core from 2.4.2 to 2.5.0.
GitHub Release Notes - Changelog - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.typelevel", artifactId = "cats-core" } ]

labels: library-update, semver-minor

Codecov Report

Merging #98 (6af5755) into master (a3c5cd3) will not change coverage.
The diff coverage is n/a.

:exclamation: Current head 6af5755 differs from pull request most recent head 6fc5b5c. Consider uploading reports for the commit 6fc5b5c to get more accurate results

@@            Coverage Diff            @@
##            master       #98   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            1         1
  Lines           57        57
  Branches         2         2
=========================================
  Hits            57        57

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 a3c5cd3...6fc5b5c. Read the comment docs.


[Memory Leak]cetcd_array_destroy does not destroy the ca->elem correctly.

elem is a pointer to pointer, so when do a destroy should also free(elem->[i]) before free(ca->elem).
typedef struct cetcd_array_t {
void **elem;
size_t count;
size_t cap;
} cetcd_array;
I perfer to change code like below.
int cetcd_array_destroy(cetcd_array ca) {
int i=0;
if (ca->elem != NULL && ca->cap != 0) {
++   for(;i< ca->count;i++){
++        if (ca-elem[i] != 0){
++            sdsfree(ca-elem[i]);   / with this change, the cetcd_add_watcher must be changed also */
++        }
++   }
free(ca->elem);
ca->elem = NULL;
}
ca->count = 0;
ca->cap   = 0;
return 0;
}

before cetcd_array_release(), cetcd_addresses_release() should be called to release the elem[i]


[Wrangler] Explicitly call out Route config warning

Which Cloudflare product does this pertain to?
Workers
Existing documentation URL(s)

https://developers.cloudflare.com/workers/wrangler/configuration/
https://developers.cloudflare.com/workers/wrangler/configuration/#source-of-truth

Section that requires update
Source of Truth
What needs to change?
I would like the following warning to be more explicit:

If you change your routes in the dashboard, Wrangler will override them in the next deploy with the routes you have set in your wrangler.toml. Currently, there is no way to disable this behaviour.

How should it change?
I'm not sure if we need a new section for this or if this should be added the the v1 migration guide. Either way, this has the potential to cause issues and should be more visible.
Additional information
No response

'Currently, there is no way to disable this behaviour.' is a little confusing since it's documented that you can in fact disable this behaviour.
https://developers.cloudflare.com/workers/wrangler/migration/deprecations/#other-deprecated-behaviour

To manage routes via the Cloudflare dashboard only, remove any route and routes keys from and add workers_dev = false to your wrangler.toml file.

https://github.com/cloudflare/wrangler2/issues/972#issuecomment-1125359729

@KianNH thanks so much for that link and the added context! It seems like the text needs to be updated here with a link back to the doc you shared.


prepare_locals: Use Object#send instead of calling directly.

Object#respond_to? will return true for protected methods. However
calling a protected method directly results in an exception. Using
Object#send allows a protected method (like current_user) to be
called.

Why are the views within app/views/public_activity/ using different current_user helper? Should they not use the one defined in your ApplicationController because they are within the same app?


IPA dictionary for German

I found that the German dictionary has some issues.
I therefore created a script to extract German IPA from Wiktionary, and would like to submit the generated data files.
Please see my repo for more information: https://github.com/devio-at/german-ipa-dict

@devio-at Thank you for taking the time to examine the German data and write up your findings!
It is not surprising that you were able to find errors in the dictionary -- this is of course the downside of automatically-generated data, and also the reason that the Readme lists all dictionaries generated this way as "experimental" until they have been checked manually by a human.
I went back to check on the original repository for the German IPA generation script, but as you noticed, it seems to no longer exist. If you are interested in knowing how the script came to generate inaccurate output (and I certainly am!), I forked the repository a few years ago, so you can still examine the code and the logic that it was using.
Thanks also for generating the CSV files from Wiktionary. These look much better as a replacement for the current de dictionary. I think the next step would be to merge and de-duplicate the two files (de_dewikt.csv and de_enwikt.csv) so they can be added to the repo. They will need some cleaning up though for some minor issues before including them.
Some things I noticed:

There are a large number of entries  in the German Wiktionary output with blank pronunciation sections (//). A lot of these seem to be proper nouns, though there are also some longer phrases (e.g., alles fit im Schritt) and obscure or technical words (e.g., troglophil). I assume the best approach would be to just filter these out or delete them with a regex.
The data from the English Wiktionary has quite a few usage notes that would need to be stripped somehow (e.g., Opportunität,/ˌɔpɔʁtuniˈtɛːt/,"qualifier:standard; used naturally in western Germany and Switzerland". Assuming these are all in the third column of the CSV file (I haven't checked to confirm this) it shouldn't be too difficult to do this.
There are many template inclusions that show up in the data (e.g., Urte,/ˈʊʁtəs/,"{{Pl.2}}"). Presumably most of these can be removed by searching text between curly braces.
Another thing to look out for is HTML entities that show up in the entries. These are a bit trickier because they don't seem to be restricted to the third column of the file (e.g., tosen,/ˈtoːzn̩/<!-- generated by [[Template:X2IPA]] -->)
Some oddly-formatted entries -- these might need to be checked individually. Example:

Zubrötchen,"[ˈtsuːˌbr̺øːtçən]<ref>In Natal German the pronunciation of the consonantal /r/ is realized [[w:Apical consonant,apically]] ([r̺]) (cf. Hildegard Irma Stielau: ''Nataler Deutsch: Eine Dokumentation unter besonderer Berücksichtigung des englischen und afrikaansen Einflusses auf die deutsche Sprache in Natal'', Franz Steiner Verlag, Wiesbaden 1980 (Deutsche Sprache in Europa und Übersee. Berichte und Forschungen ; volume 7),","ISBN:3-515-02635-5, page 9.)</ref>"

@dohliam  Thank you for your feedback, I'll have a look at the issues

@dohliam it took me a while, but I have now (hopefully!) succeeded in generating a "clean" de_dewikt.csv file.
Regarding your second issue, I created the 3rd column intentionally so as to include any remarks (regional, dialect, usage) given for a pronunciation (alternative). Do you consider a 3rd column problematic?

@devio-at That's great news, thanks for doing this! :+1:
The de_dewikt.csv file is significantly larger than de_enwikt.csv now. I assume that means all of the unique entries in de_enwikt.csv have now been merged into de_dewikt.csv? If not, I can compare the two files and merge any additional entries in.

Do you consider a 3rd column problematic?

Definitely not! The additional remarks sound useful, so it makes that you kept them. For the purposes of the ipa-dict project, though, the specific file format we are using is tab-separated with only two columns, and any additional pronunciations included in a comma-separated list in the second column. So only the first two columns will be extracted for use here.
(On the other hand, it would be really interesting to collect together any regional pronunciations into separate dictionaries for each region -- let me know if this sounds feasible!)
On a quick glance through the file, it looks like there are quite a few duplicate entries where graphemes with different pronunciations have been listed on different lines. In keeping with the format mentioned above, these will be merged so that each grapheme appears only once alongside all possible pronunciations.

Ok, I managed to extract the data from de_dewikt.csv, and have updated the repo (with a credit to you for the data). This looks to be a big improvement, so thank you again for your work on this!
I ended up writing a script to remove entries with comments, selectively re-import them, and then merge all the duplicate entries.
For now, I have temporarily labelled the resulting file de.txt, even though it should more properly be named de_DE.txt, since it currently reflects the standard in Germany only. What I would like to do eventually is to rename the file to de_DE.txt, and then create several new files -- at a minimum de_AT.txt (for Austria), and de_CH.txt (for Switzerland), containing only pronunciations for those locales.
Part of this work can be done using the commented lines from your CSV file (for example, it should be trivial to extract all the lines labelled Österreich or österreichisch and dump them to de_AT.txt), but it would definitely benefit from some expert assistance to ensure that the resulting files are correct, and also to make a decision about how much of the "main" vocabulary to merge into the localized variants. For example, I assume that where readings are labelled österreichisch auch, they should be merged with the main pronunciation -- but as a second option, not the first.
Another important task would be to create databases for the sub-national varieties, but that seems like it might be less straightforward and we might need a better (more thorough) data source.
Anyway, let me know what you think. I'll close this issue for now and we can open new issues to work on the other varieties. In the meantime the data should hopefully be more useful than the old experimental file!


[ru] Localize agile-software-development.md

Description
This PR adds RU localization of Agile Software Development
Checklist before opening this PR (put x in the checkboxes)

[x] This PR does not contain plagiarism

don’t copy other people’s work unless you are quoting and contributing it to them.

[x] I have signed off on all commits

signing off (ex: git commit -s) is to affirm that commits comply DCO. If you are working locally, you could add an alias to your gitconfig by running git config --global alias.ci "commit -s".

@tym83 this one is ready as well, please approve!


Rename fatman to job

Yes, the reason it's sitting here semi-stale is because I didn't figure out how to test them properly and promptly forgot about them. If you can test it on your end and it works, it's ready to merge.


Refactor MiqAeEvent#automate_user_ids

Rename method to tenant_identity.
Change the method to return the objects instead of object ids.

@gmcculloug @mkanoor Please review.

High level: I really like using User instead of [user_id, group_id, tenant_id]. I also like moving this logic into the models.
I think we are merging 2 concepts here:

Who is the owner of this resource.
What user's privileges are we using to run this command on this resource?

In some places we've said we are using the owner's privileges to run this command, and other times we are using the requester's privileges.
Moving the 'determine the owner' logic into the resources is great.
Lets just keep in mind that the determination of the privileges for the command is a gross oversimplification. Can we keep that in mind and not refactor / distribute this logic around?

@kbrock @gmcculloug Updated.

Thanks @lfu - lots of :scissors: :apple: : - very cool.
@gmcculloug What does it mean if a vm is owned by user, but the user is not in the owning group?
E.g.: when it is in a default tenant group (user will not be in that) - will the ownership of admin / tenant be close enough? Maybe all users in the tenant should be in that group. not sure.
ASIDE: cant wait until group ownership goes away and/or entitlements is separate from user groups.

@gmcculloug please review

@lfu @gmcculloug what is the status of this PR?


Support RegExp dotall (s) flag

https://github.com/tc39/proposal-regexp-dotall-flag
this is stage 3. since we don't really understand what the flags mean, this is a simple parser change to allow the flag, and to lib/core.js to add all the new combinations.
having to list all the combinations is pretty crappy, but the alternative is to add a special type like $RegExpFlags or $CharSet<"gimuys"> which is more work than just finding a combination generator to regenerate the union.

covered by test262 in built-ins/RegExp/dotall/with-dotall-unicode.js and built-ins/RegExp/dotall/with-dotall.js


Proxy with NTLM Authentication

Is your feature request related to a problem? Please describe.
Would like to add support for proxy with NTLM authentication
Describe the solution you'd like
I made some initial work to support this and would like to share it with mitmproxy project.
I decided to use a 3rd party ntlm-auth version 1.4.0 for the handshake.
We need to add two more flags:

authentication type (basic or ntlm)
domain

Please advise what shall be my next steps.

Awesome! Please integrate your work into https://github.com/mitmproxy/mitmproxy/blob/master/mitmproxy/addons/proxyauth.py and then submit a PR here on GitHub!

was this added or should i try to add it?

was this added or should i try to add it?

sadly no...


error in task_importance_weights function: afad-coral.py

Hi,
I think the following function will throw an error if the dataset does not have some age values represented:
def task_importance_weights(label_array):
    uniq = torch.unique(label_array)
    num_examples = label_array.size(0)

    m = torch.zeros(uniq.shape[0])

    for i, t in enumerate(torch.arange(torch.min(uniq), torch.max(uniq))):
        m_k = torch.max(torch.tensor([label_array[label_array > t].size(0),
                                      num_examples - label_array[label_array > t].size(0)]))
        m[i] = torch.sqrt(m_k.float())

    imp = m/torch.max(m)
    return imp

For the AFAD training set, the line m = torch.zeros(uniq.shape[0]) will generate a tensor of shape 23 since 3 age label groups are missing from the training set (age labels 15, 22, and 24). Enumerating through torch.arange(torch.min(uniq), torch.max(uniq)) might assume all age label groups are represented and will have a different shape than m.

Yeah most of the code here is the code used straight up what's used in the paper. So, given this code, it is expected that users label the dataset such that the labels start at 0 and that the labels are renumbered that they don't contain any gaps.
Maybe an automatic function that relabels the labels from 0 to n-1 (where n is the number of labels), together with a mapping dictionary that is shown to the user when using the network to make predictions, would be the best way to handle this.


TypeError: float() argument must be a string or a number, not 'NoneType'

Galaxyscore was running for some days without any problems and it suddenly quited. When I try to restart the same error pops up.
['BTC_CELR', 'BTC_MANA', 'BTC_FIDA', 'BTC_MOVR', 'BTC_SYS', 'BTC_KSM', 'BTC_DGB']
2021-11-11 22:45:02,722 - galaxyscore - INFO - Next update in 900 Seconds at 23:00:02
2021-11-11 23:00:02,729 - galaxyscore - INFO - Loaded configuration from 'galaxyscore.ini'
2021-11-11 23:00:03,337 - galaxyscore - INFO - Fetched 3Commas pairs blacklist OK (179 pairs)
2021-11-11 23:00:03,408 - galaxyscore - INFO - Fetched 3Commas BTC price in USDT 65164.28 OK
2021-11-11 23:00:04,271 - galaxyscore - INFO - Fetched LunarCrush Top X gs OK (50 coins)
2021-11-11 23:00:04,271 - galaxyscore - INFO - Finding the best pairs for Binance Main exchange
2021-11-11 23:00:04,326 - galaxyscore - INFO - Fetched 3Commas market data for binance OK (1312 pairs)
Traceback (most recent call last):
File "/bot/3commas-cyber-bots/galaxyscore.py", line 659, in
find_pairs(botdata)
File "/bot/3commas-cyber-bots/galaxyscore.py", line 427, in find_pairs
if float(lunacrush[coin]) < float(minvolume):
TypeError: float() argument must be a string or a number, not 'NoneType'

@Trigie thank you for reporting, so either the lunarcrush data was empty or the bots minimal 24hr volume. I will build in more checks..

@Trigie I created version 0.6.7 with extra check, and working 24 hr minimal check, found another but, thanks for reporting!

@Trigie I will close this issue, if you still have this issue (or another one) please open an new issue for it.


Least privileged role for group creation

According to my tests regular member user (without Groups Administrator role) can create groups.
The below article seems to confirm that too:
https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/users-default-permissions?context=%2Fazure%2Factive-directory%2Froles%2Fcontext%2Fugr-context
Thanks and have a good one.

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

ID: 0f9558c0-abb6-24f8-81c8-9000b80539e8
Version Independent ID: a4739135-863b-27bb-1f2e-cf297f21b4cc
Content: Least privileged roles by task - Azure Active Directory - Microsoft Entra
Content Source: articles/active-directory/roles/delegate-by-task.md
Service: active-directory
Sub-service: roles
GitHub Login: @rolyon
Microsoft Alias: rolyon

@dixonhill2020
Thanks for your feedback! We will investigate and update as appropriate.

@dixonhill2020
Thank you for your suggestion. It would be helpful to provide your ideas in the below link so our product team will work on it.
https://feedback.azure.com/d365community


Radiant Player Hangup on Yosemite

Whenever I am streaming music for an extended period of time, the player will hang and must force quit to exit. Here is the console print out of what happened.
Also, on restart from the force quit the GUI on the bottom bar (i.e. Play, FF, RW, VOL speakers) are non existent. Also attached is a screenshot of that on opening.

Can anyone can confirm if they're still seeing this issue?  Feel free to test using this build https://github.com/chrismou/radiant-player-mac/releases/tag/v1.5.0-cyan (up to date with master as of this morning)
@b3autykill3r @aaronortiz @smackjack3

Ping to everyone in this conversation, any issues still?


plugin does not respect "exclude from bom"

some parts are set as "exclude from bom" in eeschema but are included in the uploaded part list. This includes in my case:

manual placed footprints like Silkscreen graphics (set as exclude from BOM)
TC2050 connector (set as exclude from BOM)
a footprint defining the board outline (set as exclude from BOM)
...

We actually  make use of the Not in BOM flag, see https://github.com/AislerHQ/PushForKiCad/blob/main/src/push_thread.py#L113
However we we still import the parts but mark them as do not place during import.

Just doubled checked, if Not in BOM is used it will show up as "exccluded" on the BOM after import. Could you send a mail to<EMAIL_ADDRESS>with the file attache? Or if it is not confidential, just attach it right here.


switch e2e tests from go code to rust code (source, map, sink)

Since 1.5 release will be on Rust for Source, Sink, and Map, we need to switch the e2e tests.

Please make sure we have both the tests going on for a while before we cut over.


*: change some log level from info to debug

What problem does this PR solve?

Issue Number: close #462
Problem Summary:
There are too many logs, e.g. new connection, close connection, begin redirect connection, redirect succeeds.
What is changed and how it works:
Change some log level from info to debug
Check List
Tests

[ ] Unit test
[ ] Integration test
[x] Manual test (add detailed scripts or steps below)
[ ] No code

Connect to TiProxy and check logs.
Notable changes

[ ] Has configuration change
[ ] Has HTTP API interfaces change
[ ] Has tiproxyctl change
[ ] Other user behavior changes

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.
Change the log level of some logs from info to debug

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

:exclamation: No coverage uploaded for pull request base (main@837db0b). Click here to learn what that means.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #463   +/-   ##
=======================================
  Coverage        ?   63.89%
=======================================
  Files           ?       61
  Lines           ?     5711
  Branches        ?        0
=======================================
  Hits            ?     3649
  Misses          ?     1771
  Partials        ?      291

Flag
Coverage Δ

unit
63.89% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


vulkan: revisit smart pointer/object ownership in backend

Right now we have uses of raw pointers and shared_ptr.  We should think about just raw pointers and unique_ptrs to avoid the overhead of shared_ptr and the danger of unclear ownerhsip.

Also what I really don't like about shared_ptr, is that you don't know when/where the destructor will run. It could be at an inopportun time, or on the wrong thread, or within a critical section with a lock held, etc ...


Update AddTransientHttpErrorPolicy once Polly v7 is released

I'm not sure if you are already aware of this, but Polly v7 will distinguish between RetryPolicy and AsyncRetryPolicy. Since all methods on the HttpClient are async, it would make sense if AddTransientHttpErrorPolicy only accepted  AsyncPolicy (note: not IAsyncPolicy since the sync version of RetryPolicy also implements that interface for some weird reason).
https://github.com/App-vNext/Polly/wiki/Polly-v7-breaking-changes

No changes to AddTransientHttpErrorPolicy(...) will be necessary to take advantage of Polly v7 cleaning up the sync/async split in Polly.  HttpClientFactory already only accepts IAsyncPolicy<HttpResponseMessage> - see: PollyHttpClientBuilderExtensions.

it would make sense if AddTransientHttpErrorPolicy only accepted AsyncPolicy (note: not IAsyncPolicy since the sync version of RetryPolicy also implements that interface)

That does not hold for Polly v7. Polly v7 clears up the weak sync/async split in Polly (which I inherited from previous maintainers of the project). For clarity again: No changes to AddTransientHttpErrorPolicy(...) will be necessary to take advantage of the changed sync/async handling in Polly v7.

The only relevant change that could be made on the Microsoft side would be (if desired, at a future release) to change the minimum supported version of Polly, in HttpClientFactory, to Polly v7.0.0.  This would prevent users configuring eg .AddTransientHttpErrorPolicy(x => x.Retry(3)) (with v7 this will simply not compile) when .AddTransientHttpErrorPolicy(x => x.RetryAsync(3)) should be used.
The only other breaking change in Polly v7.0.0 is changes to cache provider interfaces. For cache providers which the Polly team maintains (Polly.Caching.Memory, Polly.Caching.Distributed and Polly.Caching.Serialization.Json), we will simultaneously release upgraded cache providers.  Thus, if Microsoft chooses to update HttpClientFactory in a future release to specify Polly v7.0.0 as the minimum-supported version, the only users forced to adjust their code for a breaking change would be any that had implemented their own custom cache providers for Polly CachePolicy.
Thanks @johnknoop for raising this :+1: ; a good prompt to document here how HttpClientFactory could be updated for Polly v7.

Thanks @reisenberger I appreciate all the context. I've fallen out of touch with your v7 work. Do you know when you plan to ship it?

Thanks for the clarification

@glennc We are planning to ship Polly v7 in the next fortnight: I will advise when it ships.  Polly v7 is both a maintenance update:

Clarify separation of sync and async policies - no impact on HttpClientFactory except improved usability for users - could update HttpClientFactory to Polly >= v7.0 as discussed above
Enable collection initialization syntax for PolicyRegistry - simplifies a few StartUp configuration scenarios for HttpClientFactory with PolicyRegistry
Enable cache policies to cache default(TResult)  - bug fix

And major new features:

Enable extensibility by custom policies - IE allow users to author their own Polly-compatible policies, turning Polly into user-extensible middleware for any outbound call - (the equivalent of what HttpClient has via custom DelegatingHandlers; but for any Polly-wrapped execution, not just HttpClient)
the launch of Simmy, a software-level fault-injection and chaos-injection tool based on custom Polly policies. Inject faults in a controllable manner into any calls you already guard with Polly. Including via HttpClient and HttpClientFactory. (May launch a few weeks behind Polly v7, but already build-able from the github repo)

Thanks!
/cc @joelhulen

@glennc  Polly v7 is shipped.  If you wish to upgrade HttpClientFactory for .NET Core 3.0 to reference Polly v7, we recommend that HttpClientFactory reference Polly v7.0.3 as the minimum version.
As described in more detail above:
Advantages: Improved async syntax enforcement.
Risk of breaking change: Only for a user who has implemented their own custom cache provider.
Let me know if you want to proceed.  HttpClientFactory also references to Polly.Extensions.Http, so if we go ahead, the sequence would be:

Polly team publish a Polly.Extensions.Http v3.0.0, which also references min Polly v7.0.3 (... to avoid any diamond dependency conflicts)
HttpClientFactory is (in a single PR) repointed to reference Polly v7.0.3 and Polly.Extensions.Http v3.0.0

Thanks
/cc @joelhulen

I'll catch up with @glennc and discuss with him. I can't think of a reason why we wouldn't do this. We want users to get the best version of things.

Pinging an update: Note that we are planning to publish a Polly v7.1.0 (intended by end of week) which would be the version to reference, if we go for this.
Will update, soon as that ships.

Great!

Any plans to upgrade HttpClientFactory v2.x to Polly 7?

Yes, we're currently planning that as part of 3.0

@rynowak apologies for the confusion. I understand that Microsoft.Extensions.Http.Polly 3.0.0 will have a dependency on Polly 7.1.0 (or higher). Will you be also releasing Microsoft.Extensions.Http.Polly 2.x.x (e.g. 2.3.0) with a dependency on Polly 7.1.0?

No, we don't change dependency versions in a patch release.

Got it. Thanks for the clarification.

@rynowak @glennc Polly v7.1.0 is now on nuget.
Here the procedure to update inter-related components all to reference Polly v7.1.0.  Please let me know when you want me to enact this?
Thanks!

@reisenberger we are ready to do this whenever. Ideally we could get it done in the next two weeks for the next preview release.

@rynowak Thanks! I am in a conference all week but should get to this at the weekend.

great!

Here's a draft PR. https://github.com/aspnet/Extensions/pull/1313
I don't expect it to pass now since we're waiting for the new package.

This is done!


Is wandb properly displaying input/training for 3D kernels?

I have a batch size of 16, and a 3D kernel. The prediction below makes sense to me, but the Train/Input data not so much, because it shows smaller images than each sub-panel in the predictions:

I am wondering if this is a feature of wandb visualization or if there is an issue with my config file (resampling, centercrop, etc.).

Hum, when using these options, the wandb visualisation makes more sense:
    "Modified3DUNet": {
        "applied": true,
        "length_3D": [32, 32, 32],
        "stride_3D": [32, 32, 4],
        "attention": false,
        "n_filters": 8
    },
        "CenterCrop": {
            "size": [32, 32, 32]},

But I'm not sure I fully understand why

Closing because poorly documented and kind of fixed (and config file is missing in https://github.com/ivadomed/ivadomed/issues/1226#issue-1501637899)


Update README.md

Add a Privacy section with the information sent to ChatGPT

Thanks for the pull request! This is a great addition 😃
Could you please make it shorter and take into consideration the suggestions I have left?

Do you think the following would be easier to read and understand?
This script sends your OS platform, CPU architecture, shell path, and input prompt to OpenAI, excluding other environment details like filenames or content.

Updated it with your suggestion - I'm a technical guy, so I prefer the technical proposition you made :)
I also added a warning about not sending sensitive information.

Thanks for your contribution.


SvelteKit build fails due to resource binding

When building the SvelteKit site, an error will occur even though the resource is correctly bound. This occurs for resources accessed outside of the load part of  +page.server.ts even when building using sst bind vite build. The resource can also still be accessed by placing it in a function.
Running in dev works fine, issue shows up when building during deploy.
What is odd is that this issue seems to affect different constructs. Config seems to be bound fine but, other constructs such as Api and RDS have this issue.
I'm fine with using functions or Config as a workaround, but is this behavior intentional?
I created a basic example: https://github.com/magicalpuffin/public-debug/tree/main/2024/sst-svelte-bind
// $lib/myLib.ts
import { Config } from 'sst/node/config';
import { Api } from 'sst/node/api';

// works
export const myConfigObj = { value: Config.MY_CONFIG };
// doesn't work
export const myApiObj = { value: Api.api.url };

// works
export function getMyConfig() {
	return Config.MY_CONFIG;
}
// works
export function getMyApi() {
	return Api.api.url;
}

// MyStack.ts
import { StackContext, Api, SvelteKitSite, Config } from "sst/constructs";

export function API({ stack }: StackContext) {
  const MY_CONFIG = new Config.Parameter(stack, "MY_CONFIG", {
    value: "myconfigvalue",
  });

  stack.setDefaultFunctionProps({ bind: [MY_CONFIG] });
  const api = new Api(stack, "api", {
    routes: {
      "GET /": "packages/functions/src/lambda.handler",
    },
  });

  const site = new SvelteKitSite(stack, "site", {
    bind: [MY_CONFIG, api],
    path: "packages/frontend/",
  });

  stack.addOutputs({
    ApiEndpoint: api.url,
    SiteURL: site.url,
  });
}

node:internal/event_target:1096
  process.nextTick(() => { throw err; });
                           ^
Error: Cannot use Api.api. Please make sure it is bound to this function.

I don't know this specific case but it sounds very similar to this: https://sst.dev/blog/moving-away-from-cdk.html#1-linking-resources
Can you try doing a double deploy? Once without the site, then with it? The workaround for this is to use an environment variable.
Should be fixed in Ion.

Thanks for the reply. I tried deploying twice, first deploying with just the Api, and then with the SvelteKit site. The build worked correctly this time.
This issue seems to match what you described the blog as well. Best of luck to you guys, Ion sounds promising.


Stratigility - $next type hint and project naming question

Hello there,
I have many questions regarding Stratigility
Why choosing a name that will confuse everyone knowing Apigility ?
Why getting rid of object implementation and only use Callable ? It will cause unused middlewares to be instantiated and serialization issues.
Finally, how to deal with middleware having more than one children (not just one "next" callable), why having not implemented real workflow around it ?
It is not just about complaining, I am ready to code what necessary. I just wanna know if this architecture have a purpose I cannot see and is already validated.

Why choosing a name that will confuse everyone knowing Apigility ?

Personal opinion, but I like the fact that it follows the pattern. The -gility suffix is actually applicable to different projects with different use-case.

It will cause unused middlewares to be instantiated and serialization issues.

You shouldn't serialize stuff that isn't data, tbh.

Finally, how to deal with middleware having more than one children (not just one "next" callable), why having not implemented real workflow around it ?

Each middleware may ship with others as well (kind-of like a chain of responsibility). Please refer to http://stackphp.com/ for an explanation of how this may be done.

So I can infer architecture is already validate and will not change ?

So I can infer architecture is already validated and will not change ?

Can you elaborate on this? I think there is some misunderstanding.

Just meaning that it seems Stratigility has already been designed and will not propose something different from stackphp (OOP ?). To me, middleware is much more than just dispatch request into sequenced handlers. Using request is to restrictive, middleware is "message" based, having to deal with the whole HTTP layer between middlewares seems too heavy to me. Microservices are not considered (yet ?) in Stratigility but may becomes the mainstream architecture very soon.
Data-sharing (cache, session) between middlewares is not (yet ?) supported, because of "functional" oriented programming design. Is there a workaround to deal with that ?
Workflows are also much more complexe, because of conditional forking / merging branch process that have to be considered. May be examples could be added to explain how to deal with these process.
So, My question could also has been "Is that all about middleware in ZF ? or do we have to expect something bigger or not ?"

@sophpie stratigility itself can be used as a middleware, afaik. Each middleware plugged into stratigility may as well be a micro-service. Cache/session are also trivial to implement with what we have here, IMO.

May be examples could be added to explain how to deal with these process.

Yeah, some small examples with simple functions wrapping either around stratigility or used as middlewares plugged into stratigility. Caching/session/auth are good/simple examples to be written: what is the problem here?

So, My question could also has been "Is that all about middleware in ZF ? or do we have to expect something bigger or not ?"

I have to drop the ball here, I'm not understanding what is being asked :-(

Why choosing a name that will confuse everyone knowing Apigility ?

It's actually to provide affinity with Apigility, and indicate they are (or will be) related products. In this particular case, Stratigility exists in large part because we validated a middleware-based approach for Apigility using node.js, and plan for the next major version of Apigility to use that approach. It will build on top of Stratigility (or, rather, be Stratigility-based middleware).

Why getting rid of object implementation and only use Callable ?

We're type-hinting on callable to allow any PSR-7-based middleware that's invokable (anonymous function, functor (object with __invoke() method), or PHP callback) to be consumable. It's very typical for middleware libraries to do this, even when an interface is present (e.g. Zend\Stratigility\MiddlewareInterface). We will recommend that developers implement the interface, but we do not require it, in order to allow easy bridging between middleware implementations.

It will cause unused middlewares to be instantiated and serialization issues.

I'm not sure I agree. One benefit to using callables is that you can lazy-load by wrapping in an anonymous function:
$app->pipe('/blog', function ($req, $res, $next) use ($services) {
    $blog = $services->get('My\Blog\Middleware');
    return $blog($req, $res, $next);
});

Alternately, many routing middleware implementations I've seen will handle the lazy-load aspect for you. As an example from many middleware implementations:
$app->get('/images/:id', 'ImagesMiddleware');

would lazy-load the ImagesMiddleware prior to executing it if the route and method are matched.
In terms of serialization issues, can you elaborate on where you see them occurring? You typically don't serialize your middleware…

Finally, how to deal with middleware having more than one children (not just one "next" callable), why having not implemented real workflow around it ?

You nest them just like in Rack, Stack, or WSGI:
// This assumes a routing middleware that provides dynamic routes
$blog = new RoutingMiddleware();
$blog->pipe('/:id.html', $blogPostMiddleware);
$blog->pipe('/', $listPostsMiddleware);

$app->pipe('/blog', $blog);

In the above example, $app composes a $blog, which is itself middleware, which in turn composes additional middleware for providing lists of posts and individual posts, each of which is middleware and could itself be MiddlewareInterface instances or MiddlewarePipe instances. Inside, they might look like this:
// Inside the blog post middleware
if (! $found) {
    // post not found!
    return $next($req, $res); // Calling next === delegating to list posts middleware
}
// Found it, so:
$res->getBody()->write($render($post));
return $res; // returning response bubbles out!

Middleware also lets you compose behaviors. For example, this is what we played with with Apigility:
$app->pipe($router);
$app->pipe($versioning);
$app->pipe($authentication);
$app->pipe($options);
$app->pipe($authorization);
$app->pipe($contentNegotiation);
$app->pipe($validation);
$app->pipe($dispatcher);
$app->pipe($problemDetails); // error handling!

These are all at the outer layer. The dispatcher then dispatches the middleware selected by routing, which itself can be a middleware pipe, delegating to other middleware; in the node.js version, we actually had it delegate to different middleware for each HTTP method (and, in the case of REST resources, different middleware for collections vs entities, and then segregated by HTTP method). This makes for nice, single-purpose classes that do exactly one thing and handle very specific requests. Additionally, having the pipeline means that you end up with easier error handling, and the ability to compose your own features (which means you can also replace any given middleware with your own implementation).

I just wanna know if this architecture have a purpose I cannot see and is already validated.

Hopefully the above answers many of your questions. We modeled Stratigility on Connect, on which Express is based; these have had years of usage, and have proven the pattern.

Not sure I am agree with all your answers, but they explain the choices you made and it close the issue to me.


Add validation in Feedback form

Is your feature request related to a problem? Please describe.
There is no validation in feedback form . it gets submitted directly without validating the inputs
Describe the solution you'd like
Add validation like Email id validation,first name validation and validation to all other input fields

@QAZIMAAZARSHAD please assign me this issue as part of hacktoberfest

https://github.com/QAZIMAAZARSHAD/Voters-Registration-Portal/issues/368
This issue is already open.
Before opening any issue make sure no other similar issues are open.

You can work on this issue.
Go ahead.


This repository is amazing!

Hi @rojasjo, this is not an issue and please feel free to close it. I tried to find your contact information somewhere, but couldn't so resorted to opening an issue. I wanted to say thank you for creating this example code. I think you're an amazing engineer and this repository is very helpful for a project I'm working on. Wishing you the best! ❤

@adamstirtan Thank you very much, I'm glad the code example helps. I'll add my contacts to my description.


Bad performance in Wasmtime when encountering multiple loops

Hi, I run the following case in Wasmtime and WasmEdge respectively and I find that the execution time of Wasmtime is almost 6x slower than which of WasmEdge(measured by time tool).

Wasmtime: 4.08s
WasmEdge: 0.66s

(module
  (type (;0;) (func (param i32)))
  (type (;1;) (func))
  (import "wasi_snapshot_preview1" "proc_exit" (func (;0;) (type 0)))
  (func (;1;) (type 1)
    call 2
    global.get 0
    i32.const 31
    i32.and
    call 0
    unreachable)
  (func (;2;) (type 1)
    (local i32 i32 i32 i32 i32 i32)
    ;; First Loop
    loop  ;; label = @6
      local.get 1
      local.get 2
      local.get 2
      i32.const 1
      i32.add
      local.set 2
      i32.const 0x3FFFFFFF
      i32.and
      i32.const 0x3FFFFFFF
      i32.ne
      i32.and
      br_if 0 (;@6;)
    end

    ;; Second Loop
    loop  ;; label = @6
      local.get 2
      i32.const 255
      i32.and
      global.get 1
      i32.store
      local.get 2
      local.get 0
      i32.and
      local.tee 5
      i32.const 255
      i32.and
      i32.load
      local.set 4
      local.get 3
      local.get 3
      i32.const 1
      i32.add
      local.set 3
      i32.const 0x3FFFFFFF
      i32.and
      i32.const 0x3FFFFFFF
      i32.ne
      br_if 0 (;@6;)
    end
  )
  (table (;0;) 6 6 funcref)
  (memory (;0;) 8192 8192)
  (global (;0;) (mut i32) (i32.const 5246560))
  (global (;1;) (mut i32) (i32.const 615098409))
  (export "memory" (memory 0))
  (export "_start" (func 1))
  (export "__indirect_function_table" (table 0)))

Try to debug
I dump the corresponding machine code generated by Wasmtime and WasmEdge, I find that there is something strange with the machine code generated by Wasmtime,

the first loop in the above wat will be compiled to 64-6f(I guess that), but actually the first time the jne instruction is executed, the loop will be jumped out of, but %ecx will be added 1.
In the second loop, mov  %r8d,(%rax,%rcx,1) is also strange. Because the variables used in these two loops don't have data dependence.

So I think Cranelift generates wrong machine code which will result in wrong behaviors and further causes poor performance.
  64:	31 c9                	xor    %ecx,%ecx
  66:	48 8b b7 80 00 00 00 	mov    0x80(%rdi),%rsi

  6d:	8b 87 a0 00 00 00    	mov    0xa0(%rdi),%eax
  73:	89 06                	mov    %eax,(%rsi)
  75:	48 89 c8             	mov    %rcx,%rax
  78:	81 e0 ff ff ff 3f    	and    $0x3fffffff,%eax
  7e:	83 c1 01             	add    $0x1,%ecx
  81:	81 f8 ff ff ff 3f    	cmp    $0x3fffffff,%eax
  87:	0f 85 e0 ff ff ff    	jne    6d <wasm[0]::function[2]+0x1d>

Versions and Environment

Wasmtime: https://github.com/bytecodealliance/wasmtime/commit/e0bfa7336de20f76048edbdc0157ee637a2c5fea (build release version)
WasmEdge: 7d4213b3abd5360c88e9120c3bc68ffd9b8a6870
kernel version: Linux 5.15.0-83-generic

case.zip

This is the output of VTune for me:

which seems to point the smoking gun at "Loads Blocked by Store Forwarding"
For instructions I got:

Cranelift/Wasmtime emit a load-store-load whereas LLVM/WasmEdge seem to emit a load-load-store which probably doesn't break load-store forwarding would be my guess.
I have not dug further yet at this time. I don't think Cranelift is generating wrong code here, and I have not dug into why removing the loop affects things.


hello,error in basic usage [cv_bridge]

hello,when I run code ,occur such error
ubuntu 1804, ros-melodic
Traceback (most recent call last):
File "/home/lzw/resplendent_code/voxblox_pp_ws/src/mask_rcnn_ros/scripts/mask_rcnn_node.py", line 9, in
from cv_bridge import CvBridge
ImportError: No module named cv_bridge

and if I execute this command[sudo -H pip3 install cv_bridge]
i get
Collecting cv_bridge
Exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 353, in run
wb.build(autobuilding=True)
File "/usr/lib/python3/dist-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 554, in _prepare_file
require_hashes
File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/usr/lib/python3/dist-packages/pip/index.py", line 465, in find_requirement
all_candidates = self.find_all_candidates(req.name)
File "/usr/lib/python3/dist-packages/pip/index.py", line 423, in find_all_candidates
for page in self._get_pages(url_locations, project_name):
File "/usr/lib/python3/dist-packages/pip/index.py", line 568, in _get_pages
page = self._get_page(location)
File "/usr/lib/python3/dist-packages/pip/index.py", line 683, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "/usr/lib/python3/dist-packages/pip/index.py", line 795, in get_page
resp.raise_for_status()
File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/models.py", line 935, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://pypi.org/simple/cv-bridge/

@resplendent-star
Indeed, it seems you are missing ROS OpenCV bridge. Did you try apt-get install ros-(ROS version name)-cv-bridge?
In general, this is a ROS + OpenCV/OpenCV bridge install question, independent from Voxblox++, so it would make sense to investigate on their respective repositories/issue trackers instead.


Add webhook for edgex and complete yurt-edgex-manager deployment by helm

What type of PR is this?
/kind feature
What this PR does / why we need it:
Complete the webhook for yurt-edgex-manager.
Improved Kubernetes deployments with Helm.
Which issue(s) this PR fixes:

Fixes #22
Special notes for your reviewer:

Since certificates are required to register webhooks, the current certificate distribution process has been updated to Helm. The Helm deployment requires pulling the openyurt/yurt-edgex-manager image. The current image is still version 0.2.0. Please use the current code to build the latest version of the image and push it into DockerHub. This allows Helm to deploy the latest version of yurt-edgex-manager with completed webhook.

Ok, I will finish it next PR.


Fix Windows unarchiving memory issues

The current version of the plugin for Windows uses an unzip technique that requires copying each entire file in the zip archive into memory, before writing the file to disk. This works fine on small files, but causes the application to crash with an Out of Memory exception on larger files.
Since all the Windows file reading and writing uses streams, the change in this pull request removes the unnecessary reading of the file stream into a memory buffer and instead directly pipes the zip entry file to the output stream using CopyToAsync letting Windows handle the copy.  This also has the benefit of being asynchronous, removes the memory loading step, and is simpler code overall.
I've successfully copied gigabyte files with almost no memory impact. I've tested this under Windows 10 only, however MSDN lists CopyToAsync as being available since Windows Phone 8.1 and Universal Windows Platform 8.

Sorry for some of the noise in the commit, my editor also removed some trailing whitespace.

@timkim @purplecabbage can you take a look at this PR?

I'm good to go for this merge as well. Merging in now.


docs/openbsd: update setup.md

Yup, doing it for the worker image: https://github.com/google/syzkaller/blob/24808096ca54f063977ca0611b9b150f7342a463/tools/create-openbsd-vmm-worker.sh#L53


Bug fix in cloud details grain in fetching instance metadata

Fixed bug in fetching cloud account id and instance id in different clouds (AWS, Azure, GCP). Now an error will be logged and empty value is filled for that particular cloud, if there is any error or redirection for metadata URL.
Changed order of calling metadata API for different clouds. Earlier, all cloud API's were called and only one of the present was expected to return the values. Now, the order of calls for clouds is as follows:
1.AWS
2.Azure
3.GCP
The calls will go to next cloud only when the current cloud is unable to provide instance metadata.

As this bug is impacting current releases as well as future releases, it needs to be back ported to 3.0 along with 4.0 branch.
Added logic to call a single API in GCP rather than calling multiple API.

Added changes for review comments along with the functionality in #860