@azure/core-rest-pipeline broken for Node.js 14

Package Name: @azure/core-rest-pipeline
Package Version: 1.9.1
Operating system:
[ ] nodejs

version:  14.21.3

Describe the bug
Attempting to import SDK results in an exception caused by syntax that's not supported in node 14:
SyntaxError: Unexpected token '??='
To Reproduce
Steps to reproduce the behavior:
npm i @azure/core-rest-pipeline
To get the following error
`/[...]/node_modules/@azure/core-rest-pipeline/dist/commonjs/policies/multipartPolicy.js:99`
            `boundary ??= parsedBoundary;`
                     `^^^`

`SyntaxError: Unexpected token '??='`

Expected behavior
Since previous version of the package did support node 14, the new version should either stay backwards compatible or be published as a major release.
Additional context
I ended up here by debugging a problem with @azure/web-pubsub which used to work for me until yesterday and now it suddenly broke because of the reason explained above
A possible solution for this would be to publish a patch for @azure/core-rest-pipeline with the syntax reverted to a more compatible version.

hey @saravanan-sb thanks for reaching out - this looks to be the same issue currently tracked in #28918 - going to close this as dupe to keep conversation in a single thread. Please do review #28918 for suggestions 👍


Add build report for context of post export execution

Create branch: issue-24-add-build-report-for-context-of-post-export-execution from main.


Increase test coverage of zerver/decorator.py

As part of #732, I analyzed which code paths don't currently have test coverage in zerver/decorator.py, our common web framework decorators:

[ ] authenticated_rest_api_view ValueError/KeyError cases
[ ] Various validate_api_key error conditions (wrong length, nonexisting user email, etc.)
[ ] rate limiting for webhooks
[ ] authenticated_api_view with missing API key (can we eliminate legacy API key form?)
[ ] Webhook bots only being able to access webhooks
[x] to_non_negative_float
[ ] flexible_boolean (used only by GitHub webhook, so possibly could be eliminated)
[ ] Some rate_limit code paths
[ ] profiled decorator (relatively low priority).

See #1199, which partially addresses rate_limit code paths and fully addresses to_non_negative_float (which is just dead code on master now).

Cool, converted the issue description to use checkboxes and checked the to_non_negative_float one; can we also check one of the rate limiting ones?

I didn't completely cover the rate_limit() function itself, because I was timid about sanctioning the strange user-not-there logic with a test.  On the other hand I think "some rate_limit code paths" is broad enough to apply to the part that I didn't cover.


Speed up opening proof

It is also important to understand what are the drivers of complexity of the opening proof generation function.

The complexity driver of a KZG opening is the quotient polynomial computation. Amortized KZG opening (https://eprint.iacr.org/2023/033) was implemented to speed it up: https://github.com/summa-dev/summa-solvency/blob/fec83a747ead213261aecfaf4a01b43fff9731ee/prover/benches/kzg.rs#L167
Per-user opening performance with the amortized approach is on the order of milliseconds (although memory requirements increase significantly).


Create non-functional experiment from request logs

The user can now select some logs and create an experiment which assumes that all original logs were produced by GPT 3.5 and that the user wants to compare the original responses to those that GPT 4 produces. We currently have no safe-guards to ensure that all original requests were made to the same model, and no way to allow the user to select the model they wish to try out. Assuming that we get the original and new variant models correct, there is still no way to produce new output because our current architecture requires us to run the experiment once with empty scenario variable values, and that causes our type checking to fail. Still, this PR lays the groundwork for creating experiments from logged calls.

We'll actually do this through a dataset


Add CCC and crusaders of rust

I'm just deleting the svg, then merging and then adding another commit containing the built svg, as this is just faster for now...


Added enabledelayedexpansion to setlocal

parameters need be evaluated at run time, not parse time.

Minor text fixes/comments

@edagan can you please squash the commits?
1 commit, 2 lines of comments will do the trick.

Squashed


BUG: Flexslider loading fine but images are not displaying

Describe the bug
Just loaded up Flexslider on a Silverstripe site in a development environment. I've set up two slides to test. A default space has opened up on my page for the slider but the images are not displaying. When I look at the parsed code I can see paths to the correct images, but everything is greyed out (hence the blank space).
Think I might have missed something?
Scripts loaded on page are:
<% require javascript('//code.jquery.com/jquery-3.3.1.min.js') %>
<% require themedJavascript('clicky-menus') %> (navigation script)
Do I need anything else?
To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
Expected to see images
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: [e.g. iOS] Mac OSX 10.14.6
Browser [e.g. chrome, safari] Firefox
Version [e.g. 22] 102.8.0esr

Smartphone (please complete the following information):

Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]

Additional context
Add any other context about the problem here.

Now it's getting seriously weird -- can't see ANY scripts loading on this site where I can see scripts in the footer of other sites I've built ?? But fits is still functioning as expected (NoCaptcha, etc??)
First time I've set up a slider and -- no images ??!

Have just verified in console that jquery.flexslider-min.js? IS loading. So it shouldn't be that... ??

Hi @mhenden,
Thanks for the info. To be honest this module, while being a staple in our website builds, has not gotten as much attention as we would have liked. One thing to note from a script perspective is you can disable the module requiring various libraries based on the model the relation extension is applied to code here.
Related to the above link we've "disabled" the module's jquery requirement in favor of a project's jquery requirement through something similar as:
SilverStripe\CMS\Model\SiteTree:
  jquery_enabled: false
  extensions:
    - Dynamic\FlexSlider\ORM\ FlexSlider

I don't know that this will ultimately resolve your issue, but it does remove the CDN requirement from your project defined by the module.
As a heads up, Flexslider hasn't been updated for some time as a plugin in some time so we are actively working on an alternative "slider" module that will have similar features. A migration plan is in the works as well as we have multiple sites utilizing this module independently, or with the elemental module requiring this as a base module.

Hi @muskie9
Have tried applying your fix in various ways, without success. In the first instance I put jquery_enabled: directly below the namespaced path that I'm using (App\MyProject\HomePage:). This resulted in an immediate 'white screen of death'.
I then placed your code in place of my Flexslider config code and this resulted, unsurprisingly, in an error, due to incorrect namespacing.
I then placed the first two lines of your code beneath my config code, which left me with the initial error (slider loads but images don't).
However looking at the link to the source code you sent me, I see that Flexslider is wanting jquery-3.6.1min.js, while I have the following jquery call at the bottom of my page:
<% require javascript('//code.jquery.com/jquery-3.3.1.min.js') %>
Could this be the root of the problem?
Would your 'alternative slider module' be the solution, ad if so, how far away is it?

YAY! Well, that was it. Simply changed my JS call to <% require javascript('//code.jquery.com/jquery-3.6.1.min.js') %> and BOOM! Slider appears!


Changelog

A changelog would be nice.
Thanks for the package.

+1, and thanks for nice package!

CHANGELOG.md added

:+1:


Bug with segments color rule

Describe the bug
When trying to set the Min and Max values using the msg.control.seg1/2, i've notice a bug with the color rule. It doesnt respect the limits imposed by the msg.control.seg1/2. After testing, looks like there's some problem related to odd/even numbers, cuz they respond different.
To Reproduce
Just enter some msg.control.seg like: 166~175 and 167~176 and move 1 before the lower limit (168) and 1 above the higher limit (177).
Expected behavior
For exemple, when setted to 166~175 it should be red from 0 to 165, green from 166 to 175, and red from 176 to 250.
Screenshots

Great work by the way!!
Environment and versions
OS: windows 10
Microsoft Edge
Node-RED version: 1.1.3
Dashboard version: 2.24.2
ui-level version: 0.1.40
Additional context
Add any other context about the problem here.

Would you please create a little test flow for me.

[{"id":"c951ec63.546ad","type":"ui_level","z":"e4085288.0f8a3","group":"b3261d37.ed8d1","order":0,"width":"3","height":"8","name":"1","label":"1","colorHi":"#e60000","colorWarn":"#00ff00","colorNormal":"#e60000","colorOff":"#595959","min":"50","max":"250","segWarn":"","segHigh":"","unit":"","layout":"sv","channelA":"","channelB":"","decimals":0,"animations":"soft","shape":2,"colorschema":"valuedriven","textoptions":"custom","colorText":"#eeeeee","fontLabel":"2","fontValue":"","fontSmall":"","colorFromTheme":true,"textAnimations":false,"hideValue":false,"tickmode":"segments","peakmode":false,"property":"payload","peaktime":3000,"x":290,"y":140,"wires":[]},{"id":"d7d12077.fa5a2","type":"inject","z":"e4085288.0f8a3","name":"seg1","props":[{"p":"control.seg1","v":"166","vt":"num"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":100,"y":80,"wires":[["c951ec63.546ad"]]},{"id":"bd2b9aa5.d94f68","type":"inject","z":"e4085288.0f8a3","name":"seg2","props":[{"p":"control.seg2","v":"175","vt":"num"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":100,"y":140,"wires":[["c951ec63.546ad"]]},{"id":"1bef74e3.10074b","type":"inject","z":"e4085288.0f8a3","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"176","payloadType":"num","x":100,"y":200,"wires":[["c951ec63.546ad"]]},{"id":"6a3065d6.3c603c","type":"ui_level","z":"e4085288.0f8a3","group":"b3261d37.ed8d1","order":0,"width":"3","height":"8","name":"2","label":"2","colorHi":"#e60000","colorWarn":"#00ff00","colorNormal":"#e60000","colorOff":"#595959","min":"50","max":"250","segWarn":"","segHigh":"","unit":"","layout":"sv","channelA":"","channelB":"","decimals":0,"animations":"soft","shape":2,"colorschema":"valuedriven","textoptions":"custom","colorText":"#eeeeee","fontLabel":"2","fontValue":"","fontSmall":"","colorFromTheme":true,"textAnimations":false,"hideValue":false,"tickmode":"segments","peakmode":false,"property":"payload","peaktime":3000,"x":290,"y":340,"wires":[]},{"id":"757789ab.2c9118","type":"inject","z":"e4085288.0f8a3","name":"seg1","props":[{"p":"control.seg1","v":"166","vt":"num"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":100,"y":280,"wires":[["6a3065d6.3c603c"]]},{"id":"5394ee9a.5285c","type":"inject","z":"e4085288.0f8a3","name":"seg2","props":[{"p":"control.seg2","v":"175","vt":"num"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":100,"y":340,"wires":[["6a3065d6.3c603c"]]},{"id":"a90c7520.34f618","type":"inject","z":"e4085288.0f8a3","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"166","payloadType":"num","x":100,"y":400,"wires":[["6a3065d6.3c603c"]]},{"id":"8e13dbcd.bed438","type":"ui_level","z":"e4085288.0f8a3","group":"b3261d37.ed8d1","order":0,"width":"3","height":"8","name":"3","label":"3","colorHi":"#e60000","colorWarn":"#00ff00","colorNormal":"#e60000","colorOff":"#595959","min":"50","max":"250","segWarn":"","segHigh":"","unit":"","layout":"sv","channelA":"","channelB":"","decimals":0,"animations":"soft","shape":2,"colorschema":"valuedriven","textoptions":"custom","colorText":"#eeeeee","fontLabel":"2","fontValue":"","fontSmall":"","colorFromTheme":true,"textAnimations":false,"hideValue":false,"tickmode":"segments","peakmode":false,"property":"payload","peaktime":3000,"x":770,"y":140,"wires":[]},{"id":"96e1b14c.b2ea5","type":"inject","z":"e4085288.0f8a3","name":"seg1","props":[{"p":"control.seg1","v":"167","vt":"num"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":580,"y":80,"wires":[["8e13dbcd.bed438"]]},{"id":"d4b67598.b37008","type":"inject","z":"e4085288.0f8a3","name":"seg2","props":[{"p":"control.seg2","v":"176","vt":"num"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":580,"y":140,"wires":[["8e13dbcd.bed438"]]},{"id":"1e1b2cb9.7b77b3","type":"inject","z":"e4085288.0f8a3","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"168","payloadType":"num","x":580,"y":200,"wires":[["8e13dbcd.bed438"]]},{"id":"891ba684.2d81f8","type":"ui_level","z":"e4085288.0f8a3","group":"b3261d37.ed8d1","order":0,"width":"3","height":"8","name":"4","label":"4","colorHi":"#e60000","colorWarn":"#00ff00","colorNormal":"#e60000","colorOff":"#595959","min":"50","max":"300","segWarn":"","segHigh":"","unit":"","layout":"sv","channelA":"","channelB":"","decimals":0,"animations":"soft","shape":2,"colorschema":"valuedriven","textoptions":"custom","colorText":"#eeeeee","fontLabel":"2","fontValue":"","fontSmall":"","colorFromTheme":true,"textAnimations":false,"hideValue":false,"tickmode":"segments","peakmode":false,"property":"payload","peaktime":3000,"x":770,"y":320,"wires":[]},{"id":"b1a3e70f.c24008","type":"inject","z":"e4085288.0f8a3","name":"seg1","props":[{"p":"control.seg1","v":"167","vt":"num"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":580,"y":260,"wires":[["891ba684.2d81f8"]]},{"id":"b38c6116.b4ed7","type":"inject","z":"e4085288.0f8a3","name":"seg2","props":[{"p":"control.seg2","v":"176","vt":"num"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":580,"y":320,"wires":[["891ba684.2d81f8"]]},{"id":"4d82cea0.0d10a","type":"inject","z":"e4085288.0f8a3","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"177","payloadType":"num","x":580,"y":380,"wires":[["891ba684.2d81f8"]]},{"id":"b3261d37.ed8d1","type":"ui_group","name":"Group 1","tab":"1465caac.846ec5","order":1,"disp":true,"width":"12","collapse":false},{"id":"1465caac.846ec5","type":"ui_tab","name":"Test","icon":"dashboard","order":4,"disabled":false,"hidden":false}]

Teste code bellow:
[{"id":"c951ec63.546ad","type":"ui_level","z":"e4085288.0f8a3","group":"b3261d37.ed8d1","order":0,"width":"3","height":"8","name":"1","label":"1","colorHi":"#e60000","colorWarn":"#00ff00","colorNormal":"#e60000","colorOff":"#595959","min":"50","max":"250","segWarn":"","segHigh":"","unit":"","layout":"sv","channelA":"","channelB":"","decimals":0,"animations":"soft","shape":2,"colorschema":"valuedriven","textoptions":"custom","colorText":"#eeeeee","fontLabel":"2","fontValue":"","fontSmall":"","colorFromTheme":true,"textAnimations":false,"hideValue":false,"tickmode":"segments","peakmode":false,"property":"payload","peaktime":3000,"x":290,"y":140,"wires":[]},{"id":"d7d12077.fa5a2","type":"inject","z":"e4085288.0f8a3","name":"seg1","props":[{"p":"control.seg1","v":"166","vt":"num"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":100,"y":80,"wires":[["c951ec63.546ad"]]},{"id":"bd2b9aa5.d94f68","type":"inject","z":"e4085288.0f8a3","name":"seg2","props":[{"p":"control.seg2","v":"175","vt":"num"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":100,"y":140,"wires":[["c951ec63.546ad"]]},{"id":"1bef74e3.10074b","type":"inject","z":"e4085288.0f8a3","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"176","payloadType":"num","x":100,"y":200,"wires":[["c951ec63.546ad"]]},{"id":"6a3065d6.3c603c","type":"ui_level","z":"e4085288.0f8a3","group":"b3261d37.ed8d1","order":0,"width":"3","height":"8","name":"2","label":"2","colorHi":"#e60000","colorWarn":"#00ff00","colorNormal":"#e60000","colorOff":"#595959","min":"50","max":"250","segWarn":"","segHigh":"","unit":"","layout":"sv","channelA":"","channelB":"","decimals":0,"animations":"soft","shape":2,"colorschema":"valuedriven","textoptions":"custom","colorText":"#eeeeee","fontLabel":"2","fontValue":"","fontSmall":"","colorFromTheme":true,"textAnimations":false,"hideValue":false,"tickmode":"segments","peakmode":false,"property":"payload","peaktime":3000,"x":290,"y":340,"wires":[]},{"id":"757789ab.2c9118","type":"inject","z":"e4085288.0f8a3","name":"seg1","props":[{"p":"control.seg1","v":"166","vt":"num"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":100,"y":280,"wires":[["6a3065d6.3c603c"]]},{"id":"5394ee9a.5285c","type":"inject","z":"e4085288.0f8a3","name":"seg2","props":[{"p":"control.seg2","v":"175","vt":"num"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":100,"y":340,"wires":[["6a3065d6.3c603c"]]},{"id":"a90c7520.34f618","type":"inject","z":"e4085288.0f8a3","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"166","payloadType":"num","x":100,"y":400,"wires":[["6a3065d6.3c603c"]]},{"id":"8e13dbcd.bed438","type":"ui_level","z":"e4085288.0f8a3","group":"b3261d37.ed8d1","order":0,"width":"3","height":"8","name":"3","label":"3","colorHi":"#e60000","colorWarn":"#00ff00","colorNormal":"#e60000","colorOff":"#595959","min":"50","max":"250","segWarn":"","segHigh":"","unit":"","layout":"sv","channelA":"","channelB":"","decimals":0,"animations":"soft","shape":2,"colorschema":"valuedriven","textoptions":"custom","colorText":"#eeeeee","fontLabel":"2","fontValue":"","fontSmall":"","colorFromTheme":true,"textAnimations":false,"hideValue":false,"tickmode":"segments","peakmode":false,"property":"payload","peaktime":3000,"x":770,"y":140,"wires":[]},{"id":"96e1b14c.b2ea5","type":"inject","z":"e4085288.0f8a3","name":"seg1","props":[{"p":"control.seg1","v":"167","vt":"num"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":580,"y":80,"wires":[["8e13dbcd.bed438"]]},{"id":"d4b67598.b37008","type":"inject","z":"e4085288.0f8a3","name":"seg2","props":[{"p":"control.seg2","v":"176","vt":"num"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":580,"y":140,"wires":[["8e13dbcd.bed438"]]},{"id":"1e1b2cb9.7b77b3","type":"inject","z":"e4085288.0f8a3","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"168","payloadType":"num","x":580,"y":200,"wires":[["8e13dbcd.bed438"]]},{"id":"891ba684.2d81f8","type":"ui_level","z":"e4085288.0f8a3","group":"b3261d37.ed8d1","order":0,"width":"3","height":"8","name":"4","label":"4","colorHi":"#e60000","colorWarn":"#00ff00","colorNormal":"#e60000","colorOff":"#595959","min":"50","max":"300","segWarn":"","segHigh":"","unit":"","layout":"sv","channelA":"","channelB":"","decimals":0,"animations":"soft","shape":2,"colorschema":"valuedriven","textoptions":"custom","colorText":"#eeeeee","fontLabel":"2","fontValue":"","fontSmall":"","colorFromTheme":true,"textAnimations":false,"hideValue":false,"tickmode":"segments","peakmode":false,"property":"payload","peaktime":3000,"x":770,"y":320,"wires":[]},{"id":"b1a3e70f.c24008","type":"inject","z":"e4085288.0f8a3","name":"seg1","props":[{"p":"control.seg1","v":"167","vt":"num"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":580,"y":260,"wires":[["891ba684.2d81f8"]]},{"id":"b38c6116.b4ed7","type":"inject","z":"e4085288.0f8a3","name":"seg2","props":[{"p":"control.seg2","v":"176","vt":"num"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","x":580,"y":320,"wires":[["891ba684.2d81f8"]]},{"id":"4d82cea0.0d10a","type":"inject","z":"e4085288.0f8a3","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"177","payloadType":"num","x":580,"y":380,"wires":[["891ba684.2d81f8"]]},{"id":"b3261d37.ed8d1","type":"ui_group","name":"Group 1","tab":"1465caac.846ec5","order":1,"disp":true,"width":"12","collapse":false},{"id":"1465caac.846ec5","type":"ui_tab","name":"Test","icon":"dashboard","order":4,"disabled":false,"hidden":false}]

Thank you.
Would you please let me know if it works correctly with released version 0.1.41.

Hey!
I'm going to stress it and get back to you with some feedbacks!
Thank you very much, amazing job!


Update docs for the VS Code extension 4.0.0 release

Description:
Need to update docs for the 4.0.0 release.
Suggested Labels:

Suggested Assignees:

Affected Product Version:
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:

Done in https://wso2.com/ballerina/vscode/docs/.


How to integrate v-text-field instead of input element?

I'm using vue3 and trying to replace the input element with a fancy v-text-field.
However, my try did not work.
		<template v-slot="{ subscribe, setEmail, error, success, loading }">
		<form @submit.prevent="subscribe">
			<v-text-field
			label="Your email address"
			:rules="rules"
			hide-details="auto"
			@input="setEmail($event.target.value)"
			></v-text-field> -->
			<button type="submit"><v-icon>mdi-email</v-icon></button>

{{ error }}

Sucessfully subscribed!

Loading…

		</form>
		</template>

Error:
"TypeError: Cannot read property 'value' of undefined"
I would be happy if you can provide advice.

<v-text-field style="min-width: 100px;" @change="setEmail($event)" outlined class="white" hide-details single-line type="email" required :placeholder="$t('Your email address')"></v-text-field>


Performance

Hi,
I'm getting reports about reduced performance. Here's the thread.
Quote:

I was experiencing slow bundle times as well. Running on OSX 10.10.5.
After playing around with it for a bit, I noticed that removing the NpmInstallPlugin decreased my bundle time from about 6 seconds to less than a second, when making changes to the app.

Relevant setup can be found here.
Let me know if you need more information.

@bebraw Thanks for reporting this!  This is most likely do to the "dry run" that takes place:

https://github.com/ericclemmons/npm-install-webpack-plugin/blob/master/src/plugin.js#L41-L42

What I'll do is experiment with sharing a cache object between builds (since the config doesn't change).
I wish there was a more reliable way to find missing modules, but only loaders work reliably. The problem I had before was I'd install a missing module, but Webpack still saw it as missing! 😠

Also, thanks for posting the setup.  That'll make it much easier to trouble-shoot.

Ok, so I'm working on this now.  I see performance problems with:

installer.checkBabel()
installer.preInstall()

Alright, 1 bug already located.  installer.install([]) was being called when no dependencies were missing, meaning npm install was being ran repeatedly.

This is the performance in example/webpack1 without the plugin:
Hash: 2687b7f4b844a904274f
Version: webpack 1.12.15
Time: 346ms
    Asset     Size  Chunks             Chunk Names
server.js  5.06 kB       0  [emitted]  server
    + 9 hidden modules
Listening on http://localhost:3000/
webpack built b22d2330fa2f8110ba9f in 1804ms
webpack building...
webpack built 4ccf5570e4d68739112e in 85ms
webpack building...
webpack built 187fadac3593c0d33f3c in 83ms
webpack building...
webpack built b9507dc557f21ae12830 in 56ms
webpack building...
webpack built 8f870c6cd72c95edffa1 in 73ms

Alright, with these last two commits this is what we're looking at:
Hash: 1f94dda0f9d9f5ed90e1
Version: webpack 1.12.15
Time: 509ms
    Asset     Size  Chunks             Chunk Names
server.js  5.04 kB       0  [emitted]  server
    + 9 hidden modules
Listening on http://localhost:3000/
webpack building...
webpack built b22d2330fa2f8110ba9f in 2977ms
webpack building...
webpack built b22d2330fa2f8110ba9f in 86ms
webpack building...
webpack built 4ccf5570e4d68739112e in 132ms
webpack building...
webpack built 187fadac3593c0d33f3c in 115ms
webpack building...
webpack built b9507dc557f21ae12830 in 158ms
webpack building...
webpack built 8f870c6cd72c95edffa1 in 148ms

Much better!
As you can tell, though, this plugin basically doubles the compilation (and the time between builds), because I can't reliably find a hook to pre-install a module without Webpack thinking it's still missing.
If this hook is found (check out the source code, there's not much going on!), then this plugin will have ~0 performance impact on builds.
I'll prepare v3.1.2 for release ASAP.
Thanks @bebraw as usual for your diligence and support!

Alright, I just need to have tests passing and this is good.

Coverage increased (+0.1%) to 94.512% when pulling a18909551c746863670aa9f37e95bc8381d2eadd on 45-performance into c3e68fa57d73334f79cf814e6acf76e0ae7a78fb on master.

v3.1.2 is out!

Was experiencing this issue working through the Survive.js tutorial.  After the update things seem to be working great.
Thanks for the fast response to this issue @ericclemmons, and thank you @bebraw for all you do!

Thanks @canaandavis for the update!


Add userid to file name in the Freecen2 Piece show

The current show of a piece provides a list of files associated with the piece.

As in this example there are 2 and could be as many as 4 (One each for transcriber, proofreader, validator and coordinator)
It would be useful to know the userid of the person who owns each of the files. Hence the suggestion to add the userid in () after the file name.
Every file belongs to just one userid

Pulled to master and deployed by KD


Add null checks for operations execution

Summary:
A fix for the related issue, that still occurs for some people.
https://github.com/facebook/react-native/pull/11428
Stacktrace

Changelog:
[ANDROID] [FIXED] - Added null checks for queued ui operations execution
Test Plan:
Unfortunately, I'm not able to reproduce the issue, therefore I don't have any particular steps for testing.

up

up

up

I don't believe the right fix, as we never add null elements to those arrays.
Please apply the reverse proguard renaming to that stacktrace to see where this actually crashed.

@javache I did Desymbolication of the stacktrace, but I'm still not sure where else I can look apart from UIViewOperationQueue.java
java.lang.NullPointerException: Attempt to invoke interface method 'void com.facebook.react.uimanager.UIViewOperationQueue$UIOperation.execute()' on a null object reference
  at com.facebook.react.uimanager.UIViewOperationQueue$1.run(UIViewOperationQueue.java:915)
  at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches(UIViewOperationQueue.java:1026)
  at com.facebook.react.uimanager.UIViewOperationQueue.-$$Nest$mflushPendingBatches(UIViewOperationQueue.java:1)
  at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:1086)
  at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:29)
  at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:175)
  at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:85)
  at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1299)
  at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1309)
  at android.view.Choreographer.doCallbacks(Choreographer.java:923)
  at android.view.Choreographer.doFrame(Choreographer.java:847)
  at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1283)
  at android.os.Handler.handleCallback(Handler.java:942)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loopOnce(Looper.java:226)
  at android.os.Looper.loop(Looper.java:313)
  at android.app.ActivityThread.main(ActivityThread.java:8762)
  at java.lang.reflect.Method.invoke(Method.java)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

@javache could you point me out what I am doing wrong?


KAFKA-4273 - Add TTL support for RocksDB

Since Streams DSL doesn't support fine grained configurations of state stores (it uses only RocksDB) - I have added  new StreamsConfig called rocksdb.ttl.sec - which allows you to set TTL for all state stores used by the topology. To make it short, if you set property to a value >=1, it will use TtlDB instead of RocksDB and this will lead to records getting expired after this defined period.
This should help users to bound their disk usage and provide a configuration for use cases where your data has natural TTL/retention. For example, when you process data only for one hour, and after that you don't need the data in state stores anymore.
I have added a test to check if TtlDB is expiring records, but I can't make TtlDB expire records within a reasonable window (1 minute). So I have @Ignored the test. Do you have any suggestions how to force TtlDB to expire records more quickly?
Since I'm using Kafka and Kafka Streams <IP_ADDRESS>, I have also added this code to the 0.10.1 branch, and if the review goes well I hope it can be added to the <IP_ADDRESS> release.
The patch is here: KAFKA_4273_Add_TTL_support_for_RocksDB_v1.patch.txt
Suggestion for future work
Since this config/feature applies to all state stores, it would be nice to provide an API for users to configure TTL for every state store individually, for example during toplogy building with KStreamBuilder.
Now: KStreamBuilder#table(String topic, final String storeName)
Suggestion: KStreamBuilder#table(String topic, final String storeName, StoreOptions storeOptions)
Where StoreOptions would be something like this: { ttlSeconds: int }
More details: KAFKA-4273
@guozhangwang @dguy @mjsax @norwood @enothereska @ijuma    - could you check this out?

Thanks for your PR. I was just reading the JIRA and was wondering if you know about this change in Kafka Streams <IP_ADDRESS>: https://cwiki.apache.org/confluence/display/KAFKA/KIP-71%3A+Enable+log+compaction+and+deletion+to+co-exist
Streams does exploit this new feature and changelog topics do have a retention time already on top of being compacted. I would assume, this does solve your inital problem?
Furthermore, it is possible (trunk only, will be part of 0.10.2) to plug a custom state store within DSL: https://issues.apache.org/jira/browse/KAFKA-3825
Nevertheless, you PR could still get merger. However, we might need to get a KIP first: https://cwiki.apache.org/confluence/display/KAFKA/Kafka+Improvement+Proposals
@guozhangwang @dguy @enothereska WDYT?

If using a window store, then the window retention plus KIP-71 mentioned above should suffice. However, if it is a KV store there is currently no way to expire the entries.
If we were to use the TtLDB we'd also need to know when an entry expires so that we can send key:null to the compacted topic.

Streams does exploit this new feature and changelog topics do have a retention time already on top of being compacted. I would assume, this does solve your inital problem?

@mjsax I'm aware of KIP-71, but as @dguy said, it's only for windowded joins, but I'm having several other toplogies (streams apps), that are using left join, which is backed by a regular KV RocksDB state store. In those cases also, I don't need state store data forever - usually depends on the use case, but right now I'm having use cases where I need retention of 5 hours and 58 hours respectively.

Furthermore, it is possible (trunk only, will be part of 0.10.2) to plug a custom state store within DSL: https://issues.apache.org/jira/browse/KAFKA-3825

That's great news, this will surely help Kafka Streams users to have more choices regarding their particular needs, for example, some use cases don't need so fast processing, and you could use a regular company database for "local state". One great thing about custom state stores, is that you could chain RocksDB for relatively new messages, and have a fallback to a company database - for late arriving messages. With this you could tune you processing latency and storage requirements depending on the use case.

If we were to use the TtLDB we'd also need to know when an entry expires so that we can send key:null to the compacted topic.

@dguy are you sure about that? That would mean that you would delete data from Kafka topic, based on some streams app use cases. Let's imagine that that you have two streams apps that have different use cases, but they use the same topic.
App1
App2
shared topic name: inventory
In App1 you do a left join to the topic inventory - a new KV state store is created which is backed by this same topic inventory. In this app you configure rocksdb.ttl.sec because you don't need all the data all the time in the state store.
In App2 you do use inventory as a stream, for every change, you apply some bussiness logic.
In this scenario, App1 specific use case and it's storage requirements would cause data to be deleted from a topic inventory that maybe you don't won't to be deleted.

Nevertheless, you PR could still get merger. However, we might need to get a KIP first: https://cwiki.apache.org/confluence/display/KAFKA/Kafka+Improvement+Proposals

Before writing the KIP I would like to get consensus, that this change is needed and that my current implementation is going in the right direction. Regardless, I'm currently using forked version of Kafka Streams which contains this change. But I would like to get rid of this fork, and use the official version.
What do you think about my suggestion in Suggestion for future work paragraph?

@dpoldrugo

@dguy are you sure about that? That would mean that you would delete data from Kafka topic, based on some streams app use cases. Let's imagine that that you have two streams apps that have different use cases, but they use the same topic.

I should have said: for streams internal change-log topics. You are correct, we wouldn't want to do it for external topics.

@mjsax I'm aware of KIP-71, but as @dguy said, it's only for windowded stores, but I'm having several other toplogies (streams apps), that are using left join, which is backed by a regular KV RocksDB state store. In those cases also, I don't need state store data forever - usually depends on the use case, but right now I'm having use cases where I need retention of 5 hours and 48 hours respectively.

I see. I am just wondering, if we might want to allow to add TTL for current RocksDB store (disabled by default). Not sure what the performance impact would be. Would assume that there is a good reason for using TtlTD.
@dguy

If we were to use the TtLDB we'd also need to know when an entry expires so that we can send key:null to the compacted topic.

If we know the TTL, we can sent tombstone "independently" of TtlDB, IMHO. I don't see a strong reason why we want to delete both at the exact some time? Deleting from changelog a little latter would also be ok, IMHO. A TTL is always a minimum duration a record is kept -- if we kept it a little longer in the changelog that should not be a problem. In recovery case, we only need to make sure to not reread old (ie, already expired) record that got not yet deleted back into TtlDB.
@dpoldrugo Getting some feedback before writing the KIP makes sense. I just want to point out the process to avoid a surprise later on :)

The reason that we intentionally did not enable TTL in RocksDB, as @dguy mentioned, is that it is tricky to synchronize the expiration inside RocksDB along with the corresponding changelog truncation.

This is a nice to have feature and some of my use case needs this rocksdb custom ttl feature. anyone know when this will be available in production?

As @guozhangwang has pointed out "it is tricky to synchronize the expiration inside RocksDB along with the corresponding changelog truncation".
If we do not do this, we have to do what @mjsax has suggested.
"In recovery case, we only need to make sure to not reread old (i.e, already expired) record that got not yet deleted back into TtlDB."
I was thinking we can have special key types which have the ttl in the key itself. For eg. we can have avro keys with special ttl field. Or string key which end with _ttl1000. This does look ugly but this way we avoid having to maintain a separate state to keep track of which records are expired, which IMO is a huge gain !

Closing this stale PR due to inactivity. We would need a KIP for this change to begin with.


Crash when right-clicking an Extinguished Torch

The crash happend when I right-click an extinguished torch after turn on an oxygen vent.
Forge: 1.10.2-<IP_ADDRESS>1
Advanced Rocketry: 1.10.2-1.0.1
Crash-Report: http://pastebin.com/epsdjuqF

Appears to occur if the player is not holding anything in the hand they are clicking with, looks like I missed a null check.


Magic DRC check reporting 0 errors in Openlane and MPW local precheck

Description
Our $PDK is set to Sky130B.
Our GDS layout in Magic had 1246 DRC errors which we hadn't noticed, due to not setting the DRC style to 'full'.
We included this same GDS into OpenLane to build user_project_wrapper.
[Step 30] Magic DRC showed 0 DRC violations in the flow.

However the drc.rpt and 30-drc.log had picked up on the errors, but had not reported them:

30-drc.log
The drc.tr was empty (0 bytes), no data at all when trying to open it.
We did not inspect the DRC reports so continued on to local pre-check. This also showed 0 Magic DRC errors:

However the log for this step shows that the Magic DRC check did not run correctly:
magic_drc_check.log
We only found out about the DRC errors because another user who is helping integrate the designs was using the Sky130A PDK, and all of the errors from our GDS showed up on his pre-check.

Expected Behavior
I would have expected both the Openlane Magic DRC check and the local pre-check to have reported the DRCs (or at least flag that the Magic DRC check was unable to run correctly).
It was our fault for not knowing about the two DRC decks in Magic and not checking the Full set, however if either of the Magic DRC checks had flagged up any errors, we would have known about the presence of these errors weeks ago!
Environment report
Kernel: Linux v5.8.1-050801-generic
Distribution: ubuntu 20.04
Python: v3.8.10 (OK)
Container Engine: docker v20.10.21 (OK)
OpenLane Git Version: d054702b2cce04761cc2bc598f6b95c9d8ca7c6c
pip: INSTALLED
python-venv: INSTALLED
---
PDK Version Verification Status: OK
---
Git Log (Last 3 Commits)

d054702 2023-07-19T16:09:15+03:00 remove `unset_propagated_clock` (#1908) - passant5 -  (grafted, HEAD, tag: 2023.07.19)
---
Git Remotes

origin	https://github.com/The-OpenROAD-Project/OpenLane (fetch)
origin	https://github.com/The-OpenROAD-Project/OpenLane (push)

Reproduction material
Upload is not supporting file type of .part, however we have changed the GDS to remedy the errors
Relevant log output
Magic 8.3 revision 420 - Compiled on Sat Nov  4 21:03:17 UTC 2023.
Starting magic under Tcl interpreter
Using the terminal as the console.
Using NULL graphics device.
Processing system .magicrc file
Sourcing design .magicrc for technology sky130A ...
2 Magic internal units = 1 Lambda
Could not find file '/root/eda/pdk/sky130B/libs.tech/magic/sky130A.tech' in any of these directories:
         . $CAD_ROOT/magic/sys $CAD_ROOT/magic/sys/current
Error parsing "/root/mpw_precheck/checks/tech-files/sky130A.magicrc": couldn't read file "/root/eda/pdk/sky130B/libs.tech/magic/sky130A.tcl": no such file or directory
Bad local startup file "/root/mpw_precheck/checks/tech-files/sky130A.magicrc", continuing without.
Scaled tech values by 2 / 1 to match internal grid scaling
Loading "/root/mpw_precheck/checks/drc_checks/magic/magic_drc_check.tcl" from command line.
Don't know how to read GDS-II:
Nothing in "cifinput" section of tech file.
[INFO]: Loading user_project_wrapper

Cell user_project_wrapper couldn't be read
No such file or directory
Creating new cell
"drc(full)" is not one of the DRC styles Magic knows.
The current style is "default".
The DRC styles are: default.
No errors found.
[INFO]: COUNT: 0
[INFO]: Should be divided by 3 or 4
[INFO]: DRC Checking DONE (/root/eda/caravel_user_project/precheck_results/08_NOV_2023___10_53_00/outputs/reports/magic_drc_check.drc.report)
[INFO]: Saving mag view with DRC errors(/root/eda/caravel_user_project/precheck_results/08_NOV_2023___10_53_00/outputs/user_project_wrapper.magic.drc.mag)
[INFO]: Saved

@ellen-wood Thanks for the detailed report. There has been a change made that should fix this problem. Do you still have the gds data with the errors? It would be great if you could test the change.
All you should need to do is check that your Makefile has OPENLANE_TAG?=2023.07.19-1, make sure it's not overwritten env | grep OPENLANE_TAG, run make openlane, and then remake the hierarchy that reads the gds with the error.

As @d-m-bailey said, this has been fixed as of 1d46ea5fb2303b571e530c56d7d91a89d9c59b16 and we've backported the changes to the MPW version of OpenLane under the tag 2023.07.19-1.
With regard to the inconvenience, I really can only say I'm sorry. It's a mistake on my part- I forgot to remove .read() and then the DRC conversion script was iterating over characters instead of lines. 🙃


Improve Cypress Dashboard Support

There are a few things happening when using with Cypress Dashboard:

Commit message is not showing, instead a somewhat unclear of merge info is included even though no merge is going on (see picture below)
The branch name doesn't show at all (usually above the commit message)
The environment shows up as "Unknown". For Gitlab it shows "Gitlab #123" the number being the build number. Maybe for this it could be a link to the action run? (see picture below)
Quitting a Github Action run while it is running test leaves the run in the dashboard in the "running" state (as if the dashboard was never notified about the cancel)

Not sure if this is the right code base for the changes, but wanted to get it reported

Let's wait until https://github.com/cypress-io/cypress/pull/5687 is released in 3.7.0 it should fix 2 and 3. For 1 - this is pull request event right, so I am not sure what a beter name would be ;)

#4 is still an issue here - should I open a new issue for that?

@prescottprue not sure what you mean - #4 is MacOS caching? Maybe open a new issue with details

Item 4 in the above list is what I was referencing, but it picked up that as an issue


add python version 3.11 to the CI workflows

Python version 3.11 should be out on GitHub now, so it would be nice to add that to our workflows. Apparently 3.11 might come with quite some speedup compared to the previous versions.

I've been testing almost exclusively on python3.11 for this reason, which has caused no (additional) issues.


Runtime exception: java.lang.NoClassDefFoundError: ballerina/test/0/$configurationMapper

Description:
I ported a smallish code base from Swan Lake Beta 4 to Swan Lake 2201.0.0. The code can be found from https://bitbucket.org/janihur/advent-of-code/src/master/ballerina/aoc21/
The code crashes run-time with exception:
java.lang.NoClassDefFoundError: ballerina/test/0/$configurationMapper

Steps to reproduce:
Clone repo: https://bitbucket.org/janihur/advent-of-code/src/master/
$ cd ballerina/aoc21
aoc21$ bal --version
Ballerina 2201.0.0 (Swan Lake)
Language specification 2022R1
Update Tool 1.3.9

$ bal clean
Successfully deleted '/media/sf_src/other/advent-of-code/ballerina/aoc21/target'.
$ bal build --offline
Compiling source
	jani/aoc21:0.1.0

Generating executable
	target/bin/aoc21.jar

Dumping build time information
	target/build-time.json
	timestamp : 0
	offline : true
	compile : false
	projectLoadDuration : 0
	packageResolutionDuration : 570
	packageCompilationDuration : 864
	codeGenDuration : 1049
	emitArtifactDuration : 812
	testingExecutionDuration : 0
	totalDuration :<PHONE_NUMBER>702

$ java --version
openjdk 11.0.13 2021-10-19
OpenJDK Runtime Environment (build 11.0.13+8-Ubuntu-0ubuntu1.20.04)
OpenJDK 64-Bit Server VM (build 11.0.13+8-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)

$ java -jar target/bin/aoc21.jar --day 1
ballerina: Oh no, something really went wrong. Bad. Sad.

We appreciate it if you can report the code that broke Ballerina in
https://github.com/ballerina-platform/ballerina-lang/issues with the
log you get below and your sample code.

We thank you for helping make us better.

[2022-02-04 14:27:21,090] SEVERE {b7a.log.crash} - ballerina/test/0/$configurationMapper
java.lang.NoClassDefFoundError: ballerina/test/0/$configurationMapper
	at jani.aoc21.0.$configurationMapper.$configureInit(Unknown Source)
	at jani.aoc21.0.$_init.main(aoc21)
Caused by: java.lang.ClassNotFoundException: ballerina.test.0.$configurationMapper
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	... 2 more

Affected Versions:
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.3 LTS
Release:	20.04
Codename:	focal

@janihur Theres a section of code in the main files that is using a ballerina/test import. Normally the test modulet is meant to be exclusively used in the tests folder. This is an oversight on our part as importing the tests in any other folder should return an appropriate error.
I commented out the part of code in the main.bal file that did the assertions and ran the following :
user@aquib:~/Documents/workspace/projects/advent-of-code/ballerina/aoc21$ bal run -- --day 2 --part 1
Compiling source
        user/aoc21:0.1.0

Running executable

(day 2)(part 1)(answer 1488669)

This is the part commented out
function puzzleRun(
     PuzzleId puzzleId
    ,int[] expected
    ,function(int[]) returns record { int? part1; int? part2; } runner
) {
    var answers = runner(puzzleId.parts);

    if answers.part1 is int {
        io:println(string`(day ${puzzleId.day})(part 1)(answer ${<int>answers.part1})`);
        // test:assertEquals(answers.part1, expected[0], string`Wrong answer to part 1`);
    }

    if answers.part2 is int {
        io:println(string`(day ${puzzleId.day})(part 2)(answer ${<int>answers.part2})`);
        // test:assertEquals(answers.part2, expected[1], string`Wrong answer to part 2`);
    }
}

What I suspect is happening is that the test related classes are not getting packed into the runnable jar which is why it throws this error.

@janihur Currently we are fixing this issue and it will be released as an update soon.
By the time as a workaround, you can remove dumpBuildTime from Ballerina.toml and build the project and then run it.

This was fixed in nBalleina, but now I am getting
java.lang.NoClassDefFoundError: ballerina/os/1/os is this the same, regression or a new issue?

Root cause:
Some dependencies are getting added with testOnly scope though they are in the default scope. This is due a bug in the package resolution.


test_algorithmid failure in master

The new algorithmid test is failing for me in master.
After a default build (./config -d --strict-warnings), I get this:
$ make TESTS=test_algorithmid test
make depend && make _tests
make[1]: Entering directory '/home/matt/dev/openssl-write'
make[1]: Leaving directory '/home/matt/dev/openssl-write'
make[1]: Entering directory '/home/matt/dev/openssl-write'
( SRCTOP=. \
  BLDTOP=. \
  PERL="/usr/bin/perl" \
  FIPSKEY="f4556650ac31d35461610bac4ed81b1a181b2d8a43ea2854cbae22ca74560813" \
  EXE_EXT= \
  /usr/bin/perl ./test/run_tests.pl test_algorithmid )
06-test_algorithmid.t ..
    # ERROR: (memory) 'algid_legacy == algid_prov' failed @ test/algorithmid_test.c:187
    # --- algid_legacy
    # +++ algid_prov
    # 0000:-300d06092a864886 f70d01010b0500
    # 0000:+300b06092a864886 f70d01010b
    #         ^^
    #
    # ERROR: (ptr) 'OSSL_PARAM_locate_const(gettable_params, ALGORITHMID_NAME) != NULL' failed @ test/algorithmid_test.c:79
    # 0x0
    # INFO:  @ test/algorithmid_test.c:80
    # The rsaEncryption provider keymgmt appears to lack support for algorithm-id.  Skipping...
    # ERROR: (ptr) 'OSSL_PARAM_locate_const(gettable_params, ALGORITHMID_NAME) != NULL' failed @ test/algorithmid_test.c:79
    # 0x0
    # INFO:  @ test/algorithmid_test.c:80
    # The rsaEncryption provider keymgmt appears to lack support for algorithm-id.  Skipping...
    not ok 1 - test_x509_files
# ------------------------------------------------------------------------------
../../util/wrap.pl ../../test/algorithmid_test -x509 ../../test/certs/ee-cert.pem ../../test/certs/ca-cert.pem => 1
not ok 1
06-test_algorithmid.t .. 1/? ---------------------------------------------------
    # ERROR: (memory) 'algid_legacy == algid_prov' failed @ test/algorithmid_test.c:187
    # --- algid_legacy
    # +++ algid_prov
    # 0000:-300d06092a864886 f70d01010b0500
    # 0000:+300b06092a864886 f70d01010b
    #         ^^
    #
    # ERROR: (ptr) 'OSSL_PARAM_locate_const(gettable_params, ALGORITHMID_NAME) != NULL' failed @ test/algorithmid_test.c:79
    # 0x0
    # INFO:  @ test/algorithmid_test.c:80
    # The rsaEncryption provider keymgmt appears to lack support for algorithm-id.  Skipping...
    # ERROR: (ptr) 'OSSL_PARAM_locate_const(gettable_params, ALGORITHMID_NAME) != NULL' failed @ test/algorithmid_test.c:79
    # 0x0
    # INFO:  @ test/algorithmid_test.c:80
    # The rsaEncryption provider keymgmt appears to lack support for algorithm-id.  Skipping...
    not ok 1 - test_x509_files
# ------------------------------------------------------------------------------
../../util/wrap.pl ../../test/algorithmid_test -x509 ../../test/certs/ee-cert2.pem ../../test/certs/ca-cert2.pem => 1
not ok 5
# ------------------------------------------------------------------------------
    # ERROR: (memory) 'algid_legacy == algid_prov' failed @ test/algorithmid_test.c:187
    # --- algid_legacy
    # +++ algid_prov
    # 0000:-300d06092a864886 f70d01010b0500
    # 0000:+300b06092a864886 f70d01010b
    #         ^^
    #
    # ERROR: (ptr) 'OSSL_PARAM_locate_const(gettable_params, ALGORITHMID_NAME) != NULL' failed @ test/algorithmid_test.c:79
    # 0x0
    # INFO:  @ test/algorithmid_test.c:80
    # The id-ecPublicKey provider keymgmt appears to lack support for algorithm-id.  Skipping...
    # ERROR: (ptr) 'OSSL_PARAM_locate_const(gettable_params, ALGORITHMID_NAME) != NULL' failed @ test/algorithmid_test.c:79
    # 0x0
    # INFO:  @ test/algorithmid_test.c:80
    # The rsaEncryption provider keymgmt appears to lack support for algorithm-id.  Skipping...
    not ok 1 - test_x509_files
# ------------------------------------------------------------------------------
../../util/wrap.pl ../../test/algorithmid_test -x509 ../../test/certs/server-ecdsa-brainpoolP256r1-cert.pem ../../test/certs/rootcert.pem => 1
not ok 6
# ------------------------------------------------------------------------------
06-test_algorithmid.t .. Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/11 subtests

Test Summary Report
-------------------
06-test_algorithmid.t (Wstat: 768 Tests: 11 Failed: 3)
  Failed tests:  1, 5-6
  Non-zero exit status: 3
Files=1, Tests=11,  1 wallclock secs ( 0.02 usr  0.01 sys +  0.38 cusr  0.06 csys =  0.47 CPU)
Result: FAIL
make[1]: *** [Makefile:3257: _tests] Error 1
make[1]: Leaving directory '/home/matt/dev/openssl-write'
make: *** [Makefile:3254: tests] Error 2

Yes, that will be fixed as soon as #14030 is in...  I'm merging it in now

There, #14030 is in.  Closing this, and please rebase your branches


Add 1276 Number of Burgers with No Waste of Ingredients fixes #124

IMPORTANT: Please do not create a Pull Request without an issue.
All Submissions:

[x] I have read the CONTRIBUTING document.
[x] My code is written in Python3 and is ending with .py
[x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
[x] I have checked that my submission does pass the test on LeetCode.com
[x] Does your filename follow the naming Conventions?
[x] Have you linked your PR to an Issue?

Closing issues
Put closes #XXXX in your comment to auto-close the issue that your PR fixes (if such).

closes #124


how to receive and send sms !

it ther a code for that , can you help me ?

here is the manual
https://github.com/Xinyuan-LilyGO/T-A7670X/blob/main/Manual/A76XX Series_AT_Command_Manual_V1.05.pdf
TinyGSM also has examples of sending text messages, they should be universal
https://github.com/vshymanskyy/TinyGSM/blob/8a911b218c1b2d03bb741855018fca062cefc479/examples/AllFunctions/AllFunctions.ino#L331

If there are still issues, please reopen it


Change documentation for vips7.

Hi @jcupitt I added vips7 as its own formula now that homebrew/science moved on to vips8 already. It might be good to change the documentation on the readme to use the new formula instead.

Hi @skunkworker, are you seeing compatibility problems? vips is supposed to support both the vips7 and vips8 APIs, it's a bug if it isn't.

It turns out it was a mismanagement error, and theres no problem using just vips8 now.

Ah, glad it's working. I'll close.


feat: add flakehub entry + nix flake

Title! This PR should add a Flakehub entry and a Nix flake for this project :>

Nice was hoping to one day add a mix configuration like my os config but this is awesome. Appreciate it

Does the den shell work and build / run bluebuild? @tulilirockz we should also add earthly to the shell since that is used for integration testing

Everything should be fine now!

Sorry for modifying stuff right when you approved everything, its just that this might be quite useful for discovery

Other than the couple of questions I have, I'm fine with this change. I'll rely on @bayou-brogrammer to make sure this is good since he's the local Nix user

Build is failing, waiting on #114 to be merged for the fix


[BUG:] Description...

Bug: [Bug Name]
Informations
BetterBan Version: [2.0.0]
Server-OS: [Linux Ubuntu 20.04]
PHP Version: [7.3.0]
PocketMine-MP Version: [3.19.0]
Error
[Console Error:]
readjustment instructions
[I've done...]
[1. ...]hello a player who has no pemr on the server arrives to ban someone with the interface
[2. ...]
[3. ...]
fix suggestions [optional]
[Your suggestion]

That's right. Thanks vor reporting, I'll fix it tomorrow.

Fixed in V3.0.2


Application draft: Google Season of Docs 2023

Ref: #1363
Signed-off-by: Daniel Holbach<EMAIL_ADDRESS>

Useful feedback from Flux Dev call:

figure out overlap/differences between cheatsheet entries, use-case and tasks
some docs like "bootstrap cheatsheet" are getting very long, some parts could be guides in their own right
how do other projects deal with this?

Project proposal will move into https://github.com/cncf/mentoring/tree/main/seasonofdocs#2023-project-proposals

Moved to https://github.com/cncf/mentoring/pull/875


fix README.md json-schema from in-memory

Codecov Report

Merging #3 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master       #3   +/-   ##
=======================================
  Coverage   92.32%   92.32%
=======================================
  Files           7        7
  Lines        1120     1120
=======================================
  Hits         1034     1034
  Misses         59       59
  Partials       27       27

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 3968f5a...7fa8baf. Read the comment docs.


[Release] Sync 2.6.2-SNAPSHOT to master branch

What is the purpose of the change
Sync 2.6.2-SNAPSHOT to master branch
Brief changelog
Keep master branch with SNAPSHOT version
Verifying this change
Maven install locally
Follow this checklist to help us incorporate your contribution quickly and easily:

[x] Make sure there is a GITHUB_issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a GITHUB issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
[ ] Format the pull request title like [Dubbo-XXX] Fix UnknownException when host config not exist #XXX. Each commit in the pull request should have a meaningful subject line and body.
[ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[ ] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
[ ] Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test  to make sure integration-test pass.
[ ] If this contribution is large, please follow the Software Donation Guide.

Codecov Report

Merging #1657 into master will increase coverage by 0.03%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #1657      +/-   ##
============================================
+ Coverage     35.38%   35.41%   +0.03%
- Complexity     3776     3778       +2
============================================
  Files           628      628
  Lines         30994    30994
  Branches       5456     5456
============================================
+ Hits          10966    10978      +12
+ Misses        18136    18127       -9
+ Partials       1892     1889       -3

Impacted Files
Coverage Δ
Complexity Δ

...java/com/alibaba/dubbo/config/ReferenceConfig.java
47.97% <0%> (+0.73%)
36% <0%> (ø)
:arrow_down:

.../com/alibaba/dubbo/monitor/dubbo/DubboMonitor.java
76.63% <0%> (+1.86%)
7% <0%> (ø)
:arrow_down:

...n/java/com/alibaba/dubbo/common/utils/JVMUtil.java
79.62% <0%> (+7.4%)
15% <0%> (+2%)
:arrow_up:

...ubbo/rpc/protocol/dubbo/ChannelWrappedInvoker.java
50% <0%> (+8.33%)
3% <0%> (ø)
:arrow_down:

Continue to review full report at Codecov.

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

Temporary close

Can you reopen this pull request? It is available to be merged now since 2.6.2 release branch has been created.

This pull request can be reopened because your master branch has been sync forcely, so please create a new pull request.

@ralf0131  I will re-do


Improvement

What about adding a new CLI option "sourceMapBaseUrl" that can be used in this way?
javascript-obfuscator library.js --output library.min.js --sourceMap true --sourceMapBaseUrl "http://localhost/private-folder/"
I've tested this functionality, wherewith you can upload on server only obfuscated code, and keep locally the map file. So, everybody will see only obfuscated code and those who have the map file locally, will be able to debug the code and see it clearly.

I mean the result will be something like:
var _0x2459= ...
//# sourceMappingURL=http://localhost/private-folder/library.min.js.map

Ok, when i will have time i will do it. Will be in 0.8.0.

I need in some clarification for Node API.
With CLI usage everything is very clear - name for output source map is based on input source file name or --output option value. CLI result consists of one or two files: obfuscated code and source map.
But for Node API things are slightly different. As output data we getting obfuscated code and source map as string. For obfuscated code we don't need to know the name of the output source map. Import of source map is inserted in the obfuscated code only as Base64 encoded string, not as url to this source map.
But this logic may cause a misunderstanding because sourceMapBaseUrl option will have sense only with CLI usage.
So i can make one more option: sourceMapName which will take care about output source map name.
Name can be as raw name output-source-map-name or as full source map name output-source-map-name.map.js. This value will override source map name which based on input source code name or on output obfuscated code file name.
With Node API usage with this option in obfuscated code wil be inserted source map import, but user should manually (with Node) create a file with source map content (.getSourceMap()). And that file should has a path same as source map import path in obfuscated code.
Finally if sourceMapBaseUrl is set it will combined with sourceMapName.
Your opinion?

For me, yours is a great solution.

WIP realisation in:
https://github.com/sanex3339/javascript-obfuscator/commit/2dd6f91b7ff03e9acfec67727ee0186b8b541f77
https://github.com/sanex3339/javascript-obfuscator/commit/bc1d4ef609ce0f35623f30716fd0352aba0347de
https://github.com/sanex3339/javascript-obfuscator/commit/42381552e16ace525af64d49409d46281eefff48
https://github.com/sanex3339/javascript-obfuscator/commit/1eeaf7df2b9daeac5e29fb5dcd8352bdf1e8cf72
https://github.com/sanex3339/javascript-obfuscator/commit/5069ec213be2992ef3d3c14b97e5848ba1fe5f9b

Will be in 0.8.0 ?

Yes. But if you want it, i can release 0.8.0-dev.1 in 4-5 days.

Don't worry, I prefer use a stable version for my production code.

ready in dev release
npm i javascript-obfuscator@beta

Right now in dev release here a bug which pass throug options validator base url value without protocol.
This bug is relative to https://github.com/pleerock/class-validator/issues/49

0.8.0 is ready

If domain will be incorrect - at first here will be an error (variable data undefined) If person, who looking at obfuscated code, will fix error - then infinity loop.


Minimal changes to allow an alternate deployment mechanism

The purpose of this change is to allow Helm to be used to deploy Pinniped
into the local KinD cluster for the local integration tests. That said,
the change allows any alternate deployment mechanism, I just happen
to be using it with Helm.
All default behavior is preserved. This won't change how anyone uses the
script today, it just allows me not to copy/paste the whole setup for the
integration tests.
Changes:

An option called --alternate-deploy <path-to-deploy-script> has been
added, that when enabled calls the specified script instead of using ytt
and kapp. The alternate deploy script is called with the app to deploy
and the tag of the docker image to use. We set the default value of
the alternate_deploy variable to undefined, and there is a check that
tests if the alternate deploy is defined. For the superivsor it looks
like this:

if [ "$alternate_deploy" != "undefined" ]; then
  log_note "The Pinniped Supervisor will be deployed with $alternate_deploy pinniped-supervisor $tag..."
  $alternate_deploy pinniped-supervisor $tag
else
  normal ytt/kapp deploy
fi

Additional log_note entries have been added to enumerate all values passed
into the ytt/kapp deploy. Used while I was trying to reach parity in the integration
tests, but I think they are useful for debugging.

The manifests produced by ytt and written to /tmp are now named individually.
This is so an easy comparison can be made between manifests produced by a ytt/kapp
run of integration tests and manifests produced by helm run of the integration tests.
If something is not working I have been comparing the manifests after these runs to
find differences.

Release note:

I did, all signed. Hopefully someone should be able to find me in your system now.


[BUG] Failure importing EC-HSM Keypair into a HSM Keyvault

Describe the bug
Some inconsistency in the SDK leads to the impossibility to import an existing SECP256K1 Keypair in a HSM-enabled Azure Keyvault, due to :

an EC-HSM JsonWebKey can not hold a private key (code proving it is next)
inconsistency when checking the validity of a JsonWebKey -- the isValid() method returns true but the call to the HSM results in a 400 error code, key must be valid.

Exception or Stack Trace
Add the exception log and stack trace if available
1
JSON WEB KEY:is valid? false

2
JSON WEB KEY:is valid? true
com.microsoft.azure.keyvault.models.KeyVaultErrorException: Status code 400, {"error":{"code":"BadParameter","message":"The property \"key\" must be a valid JsonWebKey object."}}`

To Reproduce
Use the following :
<dependency>
			<groupId>com.microsoft.azure</groupId>
			<artifactId>azure-keyvault</artifactId>
			<version>1.2.1</version>
		</dependency>
		<dependency>
			<groupId>com.microsoft.azure</groupId>
			<artifactId>azure-keyvault-cryptography</artifactId>
			<version>1.2.1</version>
		</dependency>
		<dependency>
			<groupId>com.microsoft.azure</groupId>
			<artifactId>azure-keyvault-extensions</artifactId>
			<version>1.2.1</version>
		</dependency>
		<dependency>
			<groupId>com.microsoft.azure</groupId>
			<artifactId>azure-keyvault-core</artifactId>
			<version>1.2.1</version>
		</dependency>
		<dependency>
			<groupId>com.microsoft.azure</groupId>
			<artifactId>azure-keyvault-webkey</artifactId>
			<version>1.2.1</version>
		</dependency>

Generate an Ethereum Keypair (secp256k1 curve) and try to add it to an HSM-enabled Keyvault as EC-HSM keys using this SDK.
Code Snippet
1.

Security.addProvider(new BouncyCastleProvider());
        ECNamedCurveParameterSpec spec = ECNamedCurveTable.getParameterSpec("secp256k1");
        ECDomainParameters domain = new ECDomainParameters(spec.getCurve(), spec.getG(), spec.getN());
        ECPublicKeyParameters publicKeyParams = new ECPublicKeyParameters(spec.getCurve().decodePoint(prefixedPubKey),
                domain);
        ECPrivateKeyParameters privateKeyParams = new ECPrivateKeyParameters(keypair.getPrivateKey(), domain);

JsonWebKey jwk = new JsonWebKey().withKty(JsonWebKeyType.EC_HSM).withCrv(new JsonWebKeyCurveName("SECP256K1"))
                .withX(publicKeyParams.getQ().getAffineXCoord().getEncoded())
                .withY(publicKeyParams.getQ().getAffineYCoord().getEncoded())
                .withD(privateKeyParams.getD().toByteArray()).withKeyOps(keyOps);

        LOG.debug("JSON WEB KEY:is valid? {}", jwk.isValid());

        if (!jwk.isValid()) {
            LOG.error("!! INVALID KEY !!");
            return null;
        }

I adapted the fromEC() method of the JsonWebKey class because I wanted to use EC-HSM as kty instead of EC.
result shows !! INVALID KEY !! which is strange, how to import a Key that could sign without the private key? (and no way to recover the private key from the public key of course)

        Security.addProvider(new BouncyCastleProvider());
        ECNamedCurveParameterSpec spec = ECNamedCurveTable.getParameterSpec("secp256k1");
        ECDomainParameters domain = new ECDomainParameters(spec.getCurve(), spec.getG(), spec.getN());
        ECPublicKeyParameters publicKeyParams = new ECPublicKeyParameters(spec.getCurve().decodePoint(prefixedPubKey),
                domain);
        ECPrivateKeyParameters privateKeyParams = new ECPrivateKeyParameters(keypair.getPrivateKey(), domain);

        JsonWebKey jwk = new JsonWebKey().withKty(JsonWebKeyType.EC_HSM).withCrv(new JsonWebKeyCurveName("SECP256K1"))
                .withX(publicKeyParams.getQ().getAffineXCoord().getEncoded())
                .withY(publicKeyParams.getQ().getAffineYCoord().getEncoded())
                // .withD(privateKeyParams.getD().toByteArray())
                .withKeyOps(keyOps);

        LOG.debug("JSON WEB KEY:is valid? {}", jwk.isValid());

        if (!jwk.isValid()) {
            LOG.error("!! INVALID KEY !!");
            return null;
        }

        Builder builder = new Builder(URL_BASE, keyName, jwk).withHsm(true)
                .withAttributes(new KeyAttributes().withEnabled(true));

        this.client.importKey(builder.build());

Only the privateKey addition that is commented out. Strange that after that, the validity check passes but not when calling the Keyvault...
JSON WEB KEY:is valid? true
com.microsoft.azure.keyvault.models.KeyVaultErrorException: Status code 400, {"error":{"code":"BadParameter","message":"The property \"key\" must be a valid JsonWebKey object."}}`

Expected behavior
I would have expected to be able to add the keypair (private + public) into the HSM.
Setup (please complete the following information):

OS: Ubuntu 16.04 LTS
IDE : Visual Studio Code
Version : 1.2.1

Additional context
None
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

[x] Bug Description Added
[x] Repro Steps Added
[x] Setup information Added

Thank you for opening this issue! We are routing it to the appropriate team for follow up.

Hello, any news guys ?

Hello, do you plan to handle this bug? If so, when?
Thx

Hello.
Any news on this bug ?
Thx

This issue is being investigated this week and next by @vcolin7
/cc @schaabs @AlexGhiondea as fyi

Hi @ArvsIndrarys, the Azure SDK team has released a new set of libraries (called Track 2) for KeyVault containing a number of improvements over the previous version. You can add the new Keys library to your project by adding this excerpt to its POM:
<dependency>
    <groupId>com.azure</groupId>
    <artifactId>azure-security-keyvault-keys</artifactId>
    <version>4.1.5</version>
</dependency>

Now, speaking of the issue at hand, there are a few things I'd like to clarify:

The key that is created using the aforementioned code is be software-backed (EC), not hardware-backed (EC-HSM), which is why you see an error message from the server telling you the JsonWebKey is badly formed.
The good news is that you can still import a key with all the same characteristics (including curve type) to your Key Vault. Just use JsonWebKeyType.EC instead of JsonWebKeyType.EC_HSM.
If you really want to create your own hardware-backed key and import it, you need to generate is using a Hardware Security Module (HSM) and follow this process. Unfortunately, this means you cannot just use the Azure SDK to import said key.
Another alternative is creating an EC-HSM key directly on Azure Key Vault and using it for all your desired operations. Here's some sample code using the latest version of the Track 2 library:

KeyClient keyClient = new KeyClientBuilder()
    .vaultUrl("https://vicolina-kv-premium.vault.azure.net/")
    .credential(new DefaultAzureCredentialBuilder().build())
    .buildClient();

Response<KeyVaultKey> createKeyResponse =
    keyClient.createEcKeyWithResponse(
        new CreateEcKeyOptions("MyEcHsmKey")
            .setExpiresOn(OffsetDateTime.now().plusYears(1)) // This is optional
            .setHardwareProtected(true) // This makes the created key EC-HSM instead of just EC
            .setCurveName(KeyCurveName.P_256K) // This is the same as "SECP256K1"
            .setKeyOperations(KeyOperation.SIGN, KeyOperation.VERIFY) // This is optional
            .setEnabled(true), new Context("key1", "value1"));

System.out.printf("Create Key operation succeeded with status code %s \n", createKeyResponse.getStatusCode());

I hope this clarifies most questions you might have. If there is anything that was not clear or if you have more questions feel free to reach out to @ me. I will be closing this issue for the time being :)
As a final note, I'll need to investigate a bit more about to why an HSM JsonWebKey is considered invalid when it contains a private key. If we determine there's a bug in the validity check I will open a new issue to address it.

Pinging @VinceBCD & @hhanquez since they were interested in this issue as well.


Compound keys for splitby

Wiggum app is not support for two or more variable as compounding splitby.

It is related to one of the MODIN issues.

For example, use ['gender', 'race'] as splitby

What are you recommending as a change here?

Modin doesn't support keys:
import modin.pandas as pd
groupby_name_by_type = {pd.groupby.DataFrameGroupBy:lambda df: df.keys,
                                pd.dataframe.DataFrame:lambda df: None}

new error:
Traceback (most recent call last):
  File "/opt/anaconda3/lib/python3.7/site-packages/flask/app.py", line 2463, in __call__
    return self.wsgi_app(environ, start_response)
  File "/opt/anaconda3/lib/python3.7/site-packages/flask/app.py", line 2449, in wsgi_app
    response = self.handle_exception(e)
  File "/opt/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1866, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/opt/anaconda3/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/opt/anaconda3/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/opt/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/opt/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/opt/anaconda3/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/opt/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/opt/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/chenguangxu/Documents/GitHub/detect_simpsons_paradox_dev/wiggum_app/controller.py", line 274, in main
    labeled_df_setup.get_subgroup_trends_1lev(trend_list)
  File "/Users/chenguangxu/Documents/GitHub/detect_simpsons_paradox_dev/wiggum/detectors.py", line 284, in get_subgroup_trends_1lev
    curgroup_trend_df = cur_trend.get_trends(cur_grouping,'subgroup_trend')
  File "/Users/chenguangxu/Documents/GitHub/detect_simpsons_paradox_dev/wiggum/trend_components/statistical.py", line 173, in get_trends
    groupby_name = groupby_name_by_type[type(data_df)](data_df)
  File "/Users/chenguangxu/Documents/GitHub/detect_simpsons_paradox_dev/wiggum/trend_components/statistical.py", line 6, in <lambda>
    groupby_name_by_type = {pd.groupby.DataFrameGroupBy:lambda df: df.keys,
  File "/opt/anaconda3/lib/python3.7/site-packages/modin/pandas/groupby.py", line 125, in __getattr__
    raise e
  File "/opt/anaconda3/lib/python3.7/site-packages/modin/pandas/groupby.py", line 121, in __getattr__
    return object.__getattribute__(self, key)
AttributeError: 'DataFrameGroupBy' object has no attribute 'keys'


Select based on month

I have this column in database
 TextColumn get createdAt => text().named('created_at').nullable()();
where the created_at is this format "2019-07-22T11:42:01.000+08:00".
I would like to  write a select query, to retrieve data where month is July and year is 2019.
Future<List<ABC>> getData() {
    return (select(abcs)..where(...)   // where the month of created_at is October and Year is 2019
          ..orderBy([
            (t) =>
                OrderingTerm(expression: t.createdAt, mode: OrderingMode.desc)
          ]))
        .get();
  }

How should I write?

You could use the builtin date function from sqlite. When using moor 2.1 or later, this would look like:
..where((row) {
  // call the date(createdAt) function in sqlite, which parses the time string
  final sqliteDate = FunctionCallExpression<DateTime, DateTimeType>('date', [row.createdAt]);
  return sqliteDate.year.equals(2019) & sqliteDate.month.equals(7);
})

You could use the builtin date function from sqlite

Mean create a DATETIME column?

That would also work, yeah. But you don't need to change the table definition. You can convert the text to a date in sqlite (see https://www.sqlite.org/lang_datefunc.html), so it shouldn't be necessary to change the column definition.

I read the link you sent, but I still have no idea. How can I use that date function inside moor?

Moor doesn't have anything builtin that matches the date function directly. However, you can call arbitrary sqlite functions by using a FunctionCallExpression. So, to call DATE(created_at), you can use the code from above. The <DateTime, DateTimeType> means that moor will expect the function to return a date time (which it does). Then, you just need to pass the function name and the parameters.

Does version 2.0.1 available right now?

Future<ABC> selectReadingBasedOnMonth(
     String month, String year) {
   return (select(abcs)
     ..where((t) {
       final sqliteDate = FunctionCallExpression<DateTime, DateTimeType>(
           'date', [t.createdAt]);
       return sqliteDate.year.equals(year) & sqliteDate.month.equals(month);
     }));
 }

Error

The method 'FunctionCallExpression' isn't defined for the class 'Dao'.\nTry correcting the name to the name of an existing method, or defining a method named 'FunctionCallExpression'.",
A value of type 'SimpleSelectStatement<$ABCTable, ABC> can't be returned from method 'selectReadingBasedOnMonth' because it has a return type of 'Future'.",

I used the above code, but no getting any data.
This is the query displayed in log

I/flutter (12004): Moor: Sent SELECT * FROM abc WHERE (CAST(strftime("%Y", date(created_at), "unixepoch") AS INTEGER)) = ? AND (CAST(strftime("%m", date(created_at), "unixepoch") AS INTEGER)) = ?; with args [2019, 10]

created_at is String format

Is it because of the unixepoch ?

You're right, it fails because of the "unixepoch". My solution doesn't work, sorry for causing confusion. I just tried this, which generates a correct query:
  final asDate = FunctionCallExpression('date', [row.createdAt]);
  final year = FunctionCallExpression<String, StringType>(
      'strftime', [const Constant<String, StringType>('%Y'), asDate]);
  final month = FunctionCallExpression<String, StringType>(
      'strftime', [const Constant<String, StringType>('%m'), asDate]);

  return year.equals('2019') & month.equals('07');

Note that strftime returns a string and that there's a leading 0 in the month.

Hey, thanks again, but I still can't get the data.
Is the below query correct?
I/flutter (21317): Moor: Sent SELECT * FROM organization_sensor_readings WHERE strftime('%Y', date(created_at)) = ? AND strftime('%m', date(created_at)) = ?; with args [Instance of 'FunctionCallExpression<String, StringType>', Instance of 'FunctionCallExpression<String, StringType>']

It works !!! Thanks again

hello I'm trying to get a stream of record which are in the same day of input (like all records with date of Feb 23, 2020).
my table attribute is DateTimeColumn and here is my method

    return (select(bloodSugarsEntity)
        ..where((row) {
          final asDate = FunctionCallExpression('date', [row.date]);
          final year = FunctionCallExpression<String, StringType>(
              'strftime', [const Constant<String, StringType>('%Y'), asDate]);
          final month = FunctionCallExpression<String, StringType>(
              'strftime', [const Constant<String, StringType>('%m'), asDate]);
          final day = FunctionCallExpression<String, StringType>(
            'strftime',  [const Constant<String, StringType>('%d'), asDate]);

          return year.equals(dateTime.year.toString()) & month.equals(dateTime.month.toString()) & day.equals(dateTime.day.toString());
        }))
        .map((bloodSugarsEntity) => convertEntityToModel(bloodSugarsEntity))
        .watch();
  }```

but it still doesn't work.

@NaarGes What column type did you use for BloodSugars.date? If it's a dateTime() column, you can just do
..where((row) {
  final date = row.date;
  return date.year.equals(dateTime.year) & date.month.equals(dateTime.month) & date.day.equals(dateTime.day);
});

Also, can you give more details on "it still doesn't work"? Do you not get the results you expect, is there any exception, etc.

I've tried that, but it's not working too. I mean it returns error.
my query:
Stream<List<BloodSugar>> watchBloodSugarsInDate2(DateTime dateTime) =>
      (select(bloodSugarsEntity)
            ..where((row) {
              final date = row.date;
              return date.year.equals(dateTime.year) &
                  date.month.equals(dateTime.month) &
                  date.day.equals(dateTime.day);
            }))
          .map((bs) => convertEntityToModel(bs))
          .watch();

and this is the error I see in debug mode:

I've also tried flutter clean

I just tried to reproduce your problem with this gist, but I don't get any sql errors, it works as intended. Do you have a different table structure?

No my date row is the same as yours.
Here is my table:
class BloodSugarsEntity extends Table {
  IntColumn get id => integer().autoIncrement()();
  IntColumn get value => integer()();
  DateTimeColumn get date => dateTime()();
  TextColumn get type => text()();
}

I also insert data fetched from api server in my table, maybe that makes problem. This is my insert method:
  insertBloodSugarList(List<BloodSugar> bsList) {
    for (BloodSugar bs in bsList) {
      insertBloodSugar(BloodSugarsEntityCompanion(
        id: Value(bs.id),
        value: Value(bs.bloodSugar),
        type: Value(bloodSugarApiMeasureState[bs.measureState]),
        date: Value(bs.measureTime),
      ));
    }
  }

bs.measureTime type is DateTime and decodes using this:
measureTime: DateTime.parse(json['measure_time']),
json['measure_time'] is in this format for example:  "2020-01-11T21:46:25Z"

Sorry, still no luck. I've updated my repro here - that should be very close to what you're using, right?

Yes, That's just like my code. I guess the error is where I'm trying to get date.year
I can use date.isBetweenValues and it works alright but when I try to get year out of date it throws 'no such column: %Y, SQL logic error`
Thank you anyway

You could try enabling logStatements on VmDatabase or FlutterQueryExecutor - it will print the full sql statement before running it. It will be easier to debug this for me when I have the full statement.
And just to be sure, are you on the latest moor version (2.4.0)?

Yes I'm using latest version on moor and moor_ffi
I've enabled logStatement and here's the log:
I/flutter ( 3815): Moor: Sent SELECT * FROM blood_sugars_entity WHERE (CAST(strftime("%Y", date, "unixepoch") AS INTEGER)) = ? AND (CAST(strftime("%m", date, "unixepoch") AS INTEGER)) = ? AND (CAST(strftime("%d", date, "unixepoch") AS INTEGER)) = ?; with args [2020, 2, 25]

Thanks, this helps a lot!
I just published moor version 2.4.1, which should fix this problem.

Thank you for your very good support :+1:
It's now working :)

how to implement something like this select * from hockey_stats  where game_date between '2012-03-11 00:00:00' and '2012-05-11 23:59:00'  order by game_date desc;

@richard457 If you're using a DateTime column, something like this should work:
select(hockeyStats)
  ..where((row) => row.gameDate.isBetweenValues(..., ...))
  ..orderBy([(row) => OrderingTerm.desc(row.gameDate)])

@richard457 If you're using a DateTime column, something like this should work:
select(hockeyStats)
  ..where((row) => row.gameDate.isBetweenValues(..., ...))
  ..orderBy([(row) => OrderingTerm.desc(row.gameDate)])

What if we have a TextColumn for date?

You could use a  FunctionCallExpression for this purpose. If the format you're storing your dates in is one of those time strings, the following should work:
extension MyDateTimeExtension on Expression<String, StringType> {
  Expression<DateTime, DateTimeType> asDateTime() {
    return FunctionCallExpression('strftime', ['%s', this]);
  }
}

You can then use stringColumn.asDateTime() just like dateTimeColumn.

You could use a FunctionCallExpression for this purpose. If the format you're storing your dates in is one of those time strings, the following should work:
extension MyDateTimeExtension on Expression<String, StringType> {
  Expression<DateTime, DateTimeType> asDateTime() {
    return FunctionCallExpression('strftime', [Constant<String, StringType>('%s'), this]);
  }
}

You can then use stringColumn.asDateTime() just like dateTimeColumn.

It works when:
Expression<String,StringType> date = Constant<String,StringType>("2020-02-01 00:00:00.000");
row.gameDate.isBiggerThan(date.asDateTime());
But not when I do :
date  = DateTime.parse("2020-02-01 00:00:00.000")
row.gameDate.isBiggerThan(date);
Thanks for the help.

row.gameDate.isBiggerThan(date);

You would have to use isBiggerThanValue(date) here since we can't overload methods in Dart.

How could i do if i want to get a column null, for example something like this:
select(hockeyStats)
  ..where((row) => row.gameDate.isBetweenValues(..., ...) | row.gameDate.equals(null))
  ..orderBy([(row) => OrderingTerm.desc(row.gameDate)])

i put equals null but it doesn't return me anything.

How could i do if i want to get a column null, for example something like this:
select(hockeyStats)
  ..where((row) => row.gameDate.isBetweenValues(..., ...) | row.gameDate.equals(null))
  ..orderBy([(row) => OrderingTerm.desc(row.gameDate)])

i put equals null but it doesn't return me anything.

Solution:
select(hockeyStats)
  ..where((row) => row.gameDate.isBetweenValues(..., ...) | isNull(row.gameDate))
  ..orderBy([(row) => OrderingTerm.desc(row.gameDate)])

https://github.com/simolus3/moor/issues/65

How could i do if i want to get a column null, for example something like this:
select(hockeyStats)
  ..where((row) => row.gameDate.isBetweenValues(..., ...) | row.gameDate.equals(null))
  ..orderBy([(row) => OrderingTerm.desc(row.gameDate)])

i put equals null but it doesn't return me anything.

Solution:
select(hockeyStats)
  ..where((row) => row.gameDate.isBetweenValues(..., ...) | isNull(row.gameDate))
  ..orderBy([(row) => OrderingTerm.desc(row.gameDate)])

https://github.com/simolus3/moor/issues/65

Are you pasting the correct link?

How could i do if i want to get a column null, for example something like this:
select(hockeyStats)
  ..where((row) => row.gameDate.isBetweenValues(..., ...) | row.gameDate.equals(null))
  ..orderBy([(row) => OrderingTerm.desc(row.gameDate)])

i put equals null but it doesn't return me anything.

Solution:
select(hockeyStats)
  ..where((row) => row.gameDate.isBetweenValues(..., ...) | isNull(row.gameDate))
  ..orderBy([(row) => OrderingTerm.desc(row.gameDate)])

https://github.com/simolus3/moor/issues/65

Are you pasting the correct link?

Sorry this is the correct link
https://github.com/simolus3/moor/issues/65#issuecomment-509175940

@simolus3  Not sure why it not working anymore.
I storing updatedAt as a String
2021-02-22T01:18:22.000+08:00
Here my select query
Future<List<OrganizationSensorReading>> selectReadingBasedOnMonth(
      String months, int years, int organId) {
    return (select(organizationSensorReadings)
          ..where((t) {
            final asDate = FunctionCallExpression('date', [t.updatedAt]);
            final year = FunctionCallExpression(
                'strftime', [const Constant('%Y'), asDate]);
            final month = FunctionCallExpression(
                'strftime', [const Constant('%m'), asDate]);
            return year.equals(years.toString()) &
                month.equals(months) &
                t.organizationSensorId.equals(organId);
          }))
        .get();
  }

Error
Bad state: Too many elements

fixed
https://github.com/simolus3/moor/issues/1063


how i filter by name?

hi, i try implement the example of the documentation, only works filter by id.
Query:
{
property(name: "daniel") {
name id
}
}
Results:
{
"errors": [
{
"message": "No argument 'name' found on field 'property'"
}
],
"data": {}
}
property contains:
public class Property
{
public uint Id { get; set; }
public string Name { get; set; }
public PropertyType Type { get; set; }
public Location Location { get; set; }
}

Hi, when you start your schema with SchemaBuilder.FromObject<T>() this only generates fields for properties in that object graph. The only "smart" thing it tries is to add an extra field for any root level property that is of type IEnumerable<T> where T has a property name Id. The extra field is a field that takes an id argument.
It does not generate arguments or fields for every property on type T. Partly because it doesn't know your data. You could have a unique key on Name and want it to return a single item. Or you might want it to search.
Hopefully that explains it. Here very briefly explains how to add other fields. I do need to expand that section.
Short answer, you need to change the property field. Assuming you have a context like this
public class MyContext
{
    public List<Property> Properties { get; set; }
}
public class Property
{
    public uint Id { get; set; }
    public string Name { get; set; }
    public PropertyType Type { get; set; }
    public Location Location { get; set; }
}

If you use SchemaBuilder.FromObject<MyContext>() it will generate 2 fields at the root.
{
    # field auto generated - return a list of properties
    properties { id name }
    # field auto generated - return a single property by ID
    property(id: 3232) { name id }
}

I assume you want to search by name so you want to replace the properties field, not the property field you use in your comment.
var schema = SchemaBuilder.FromObject<MyContext>();
// replace properties field with one that takes an optional name argument
schema.ReplaceField("properties", new { name = (string)null }, (ctx, args) => ctx.Properties.WhereWhen(p => p.Name.ToLower().Contains(args.name), !string.IsNullOrEmpty(args.name)), "Return a list of properties optional filtered by name");

You can change ctx.Properties.WhereWhen(p => p.Name.ToLower().Contains(args.name), !string.IsNullOrEmpty(args.name)) to whatever logic you need to filter/search.
Hope that helps.

I also updated the readme with the example above.


Not all sensors are filled correctly

I just updated to version 5.0.0 and noticed that all data is not scraped correctly.
For example. The sensor tomorrow is now empty. In my live setup with the older 4.x version I see it is set to Green.
Also the plastic date is incorrect. It has the same date as Paper now.

Mine shows the same for today and tomorrow, while only today is "rest"

Can you provide me a postal_code and street_number to verify? You're using the scraper, not the api I believe right?
I just checked it again in my env, and all is looking good. The only thing is that I currently don't have any wasttypes to be picked up for the coming days, so I couldn't verify today, tomorrow, and day after tomorrow properly.

Ik heb de volgende fout gevonden, dat moet self.tomorrow zijn, maar buiten dat zie ik geen andere issues.
https://github.com/xirixiz/homeassistant-afvalwijzer/blob/ccbe947bf705c6ec6be9b90ce28ed1c18ca67d64/custom_components/afvalwijzer/provider/mijnafvalwijzer.py#L196

Can I send a private message? Then I can send my postalcode and number.

Can you pb via the hass community? 👍🏻

The solution is indeed change line 196 of the Afvalwijzer from today to tomorrow.
Worked for me.

Can you pb via the hass community? 👍🏻

I send a message in telegram.

goe here because of a GitHub notification, but there is no release 5.x yet?

Yes, there was only the error in the code I mentioned earlier, checked and fixed in release 5.0.1


Update Parser helpers to be compatible with hooks

What kind of change does this PR introduce?
refactoring
Did you add tests for your changes?
n/a
If relevant, link to documentation update:
n/a
Summary
Tapable's hooks are not bound to the parser instance. Without this change, the following would throw a TypeError:
ParserHelpers.expressionIsUnsupported(parser, name + " is not supported.")

This PR modifies the Parser helpers to not rely on this.
Does this PR introduce a breaking change?
no
Other information
An alternative approach could have been used using .bind(parser):
ParserHelpers.expressionIsUnsupported(name + " is not supporte.").bind(parser)

Yep. This is important for migrating the .tap from .plugin

Thanks

Would you be interested in software that automatically finds TypeErrors like this? I am building Fuzz Stati0n to do that (free for OSS) - please take a look and consider signing up for our newsletter to keep in touch.

Thank you for this PR!


(WIP) Let one source use another source's classifier

For issue #537. So far this PR just implements the source state logic, without adding/revising classifier usage semantics yet (that is why this PR's still WIP).
The work so far includes changes to new/edit source forms, handling cases like classifier deletion and labelset editing, and unit tests thereof.
Also revised the source main page layout, mainly to try and group all the classifier related info together; might have more ideas for improvement later, but this should do for now.
Screenshots follow; first, the new/edit source form's option for the classifier mode:

One possible error when submitting this form; there are also errors for not having permission to the classifier's source, or for the classifier not existing:

Updated layout to the source main page:

Three possible classifier status displays; don't mind the "minimum of 3", that's just the setting I use for testing:

And two more. The first is when you had a classifier selected, but then it got deleted (say, because the classifier's source changed its labelset or feature extractor). The second is how it looks when you leave the classifier ID field blank; this would essentially turn off automatic classification, in case that's ever desired (and for technical reasons, I think it's also a useful default state to have).

And when you try to edit your labelset when using another source's classifier, it just doesn't let you. Maybe this can be made more lenient later (like allowing the labelset to be a superset, instead of saying it must be identical), but opting to keep it strict, safe and simple for a start.

Meanwhile, made a couple steps towards issue #306 (making date displays consistent); lib.utils date_display() and datetime_display() both go for the server's local time. But in the future we may want to detect the user's timezone or let them set it.

@StephenChan
Just lurking, but thoughts for the following:
"And when you try to edit your labelset when using another source's classifier, it just doesn't let you. Maybe this can be made more lenient later (like allowing the labelset to be a superset, instead of saying it must be identical), but opting to keep it strict, safe and simple for a start."
What about having an editable mapping between the labelset of the Classifier's Source and the users' Source labelset? So if my Source has "Acropora" in it, but the classifier I want to use has "Acropora Sp." (or something equally as trivial), instead of adopting the classifier's labelset, before submitting a request to classify I can choose how I would want to map each the classifier's output labels to the labels in my Source's labelset? This would be useful for these situations (where the naming convention is just slightly different), but also for more extreme cases as well, depending on the user's needs.
Just a thought. Looking forward to the new feature!

Hmm yeah, maybe. We try to discourage duplicate labels on CoralNet, but the reality is that some of them have stuck around in prominent sources. (Doesn't help that we never got around to issue #415, but still.) Also, an editable mapping could have a few possible uses, including letting you map two or more labels of the classifier's source to a single label of your source.

Hmm yeah, maybe. We try to discourage duplicate labels on CoralNet, but the reality is that some of them have stuck around in prominent sources. (Doesn't help that we never got around to issue #415, but still.) Also, an editable mapping could have a few possible uses, including letting you map two or more labels of the classifier's source to a single label of your source.

Agreed, the latter would also allow a user to use multiple classifiers (if the functionality is provided), and then map their each of their labels to a common label that they desire.

Updated the backend logic (feature extraction, training, classification) to support the new classifier options.

Changed the deployed_classifier field semantics so that it's always the classifier being used for classifying that source's images. So, now it's auto-populated whenever the trains_own_classifiers mode is True. I thought this scheme seemed a little simpler compared to only looking at deployed_classifier when the train mode is False. With this change, we can check deployed_classifier to see what is being used for classification, without caring about whether we're in train mode or not.

Revised the wording of help texts to better suggest that you can use the deployed_classifier field to choose a previously trained classifier in your own source. This capability didn't require any special code. And I didn't see a reason to delete the trained classifiers when toggling train mode off or on, so that's not an obstacle.

Updated the descriptive text of the currently deployed classifier, including saying the train date, and saying whether it's the latest classifier of its source (and if not, saying what the latest classifier is).

In this PR overall, I kept making revisions and adding tests here and there as I thought of them. So it's likely that the code can be better organized and that I overlooked some situations. But I don't know if I can improve it by staring at the code more right now, so I'll just keep an eye on things after updating the server. I'll also think about how the displayed info in various cases can be improved.
That's it for this PR; will have to think about the label mapping idea more, to see if it's the best way to meet the relevant needs, and to consider what the UI might look like.

Does this new feature currently allow for users to train on top of the existing classifier that they choose? Or does the source at this point serve as a place for users to upload images (and point locations), for which an existing classifier will label?

Just the second one.

What happens after a user adds additional labels to the source that would normally trigger a (re)training?

Nothing in particular. However, if you later decided to switch back to the 'Train' classifier mode, then a (re)training would happen.
And good to hear!


Build saying success but does not have classes

Hi, thanks for creating this toolkit as this is a useful one.
We tried to download and follow the instructions for install. All steps went without errors and after running the ant command, tried using the toolkit which kept complaining that it does not find the operator.
Upon further checking, noticed that the jar did not have any classes and had just the manifest which did not have much in it either.
We are using streams <IP_ADDRESS>, ant 1.7.1, maven 3.3.9 running on linux.
Have you seen such a behavior? are you considering having a release for the toolkit?

release 1.2.0 contains the pre-built toolkit