Client::send_event() returns Ok even when event not sent

Describe the bug
Sending an event with client.send_event(ev).await while all relays are in RelayStatus::Connecting will result in Ok.
To Reproduce

Create a client, add relay(s), connect to relays
Loop over client.relays().await to get relay.status().await
If all relays are in state Connecting (or in any other way not connected), call client.send_event(ev).await
The event will appear to be sent successfully, even though querying any of the relays will not return it

Expected behavior
Sending when not one relay is connected should fail.
Alternatively, there could be a client.send_event(ev: Event, retry_duration: Duration) method, which would try for some time until its sent to at least one relay.
Build environment

Library: nostr
Tag/commit: 0.22
OS+version: linux
Rust/Cargo version: latest

Check if at least one relay is connected not ensure that the msg is effectively sent (ex. relay channel full and continuously connect/disconnect).
I tried another way. Check PR #114
To work, you must keep the wait_for_send option enabled (by default is enabled).
If the wait_for_send is not enabled, the send_event or send_msg should be intended as queue_msg.

Works, thank you!
Nice and elegant solution.


IE 11 and reserved words

Hi,
I'm having an issue with a JS schema object and uglify. The problem is that a schema object I'm using needs to contain an "enum" property
var x = {
  enum: ["a", "b","c"]
}

This leads to problems with IE11, which treats "enum" (like "default" and others http://www.w3schools.com/js/js_reserved.asp) as "reserved words". The script execution breaks. One can work around by this notation:
var x = {
  "enum": ["a", "b","c"]
}

The problem: This "enum" is reverted to an enum (w/o quotes) after "uglification", which again breaks IE11 script execution. Any idea, how to achieve "enum" in uglified output?
Regards

Please open a ticket with UglifyJS which is the project that actually does the minification.

Thanks. Done

Got this hint:
You could use the beautify option keep_quoted_props=true.
$ echo 'var x = {foo: 3, "enum": ["a", "b"]}' | uglifyjs -b keep_quoted_props=true,beautify=false -m -c
var x={foo:3,"enum":["a","b"]};
This will keep all quoted props unfortunately.
Is there a way to specify this option in a gulp call like
.pipe(uglify())

?


Article serach API how to get URL for image for each article

How to get Url for image source of each article in Article search API
https://api.nytimes.com/svc/search/v2/articlesearch.json?api-key=&q=sometext&page=0
In this API hit it returns a "multimedia" [object]  which contain attribute -->
"url": "images/2016/12/14/us/14zinke/00zinke-thumbStandard.jpg"
I tried to append this url with base url and web_url as well, not able to get the image.
Just wondering how can I download image for each article here?

You can prefix the image path with static01.nyt.com or www.nytimes.com to get the full URL of the image.
http://static01.nyt.com/images/2016/12/14/us/14zinke/00zinke-thumbStandard.jpg
http://www.nytimes.com/images/2016/12/14/us/14zinke/00zinke-thumbStandard.jpg

Thanks, really helpful


OS Viewer should link to country filter PLUS recipient

When you click on "View Details" you see this: http://next.openspending.org/viewer/6018ab87076187018fc29c94a68a3cd2:at-eu-esif-funds-beneficiaries-2000-2020-full?measure="amount.sum"&groups[]="recipient_beneficiary_name.beneficiary_name"&filters[geo_source_beneficiary_country.beneficiary_country_code][]="AT"&order="amount.sum|desc"&visualizations[]="Treemap"&lang=en
But it should be filtered for recipients:
http://next.openspending.org/viewer/6018ab87076187018fc29c94a68a3cd2:at-eu-esif-funds-beneficiaries-2000-2020-full?measure="amount.sum"&groups[]="recipient_beneficiary_id.beneficiary_id"&filters[geo_source_beneficiary_country.beneficiary_country_code][]="AT"&order="amount.sum|desc"&visualizations[]="Treemap"&lang=en
Otherwise it does not display data. This is the example for Austria, but it goes for all view details.

yes so basically add the filter for recipients in the viewer, so that the data is directly displayed.


new feature: add scroll animations to the website

We can add scroll animations to the website especially on the home page to keep our users engaged with our content. Animations will be used to focus users attention on what's important and will also show the flow of our website.

@djm-1 I would like to work on this issue.

@djm-1 I would like to work on this issue.

I'm too interested to work on this in custom animated scroll bar.

Please assign me this issue @djm-1 .


docker: "pull" requires 1 argument. See 'docker pull --help'

Getting this error on many apps after rebooting a machine:
Sep 11 16:39:28 ip-10-21-2-85.ec2.internal systemd[1]: my-two-bits_v3.web.1.service holdoff time over, scheduling restart.
Sep 11 16:39:28 ip-10-21-2-85.ec2.internal systemd[1]: Starting my-two-bits_v3.web.1...
Sep 11 16:39:28 ip-10-21-2-85.ec2.internal sh[11017]: docker: "pull" requires 1 argument. See 'docker pull --help'.
Sep 11 16:39:28 ip-10-21-2-85.ec2.internal systemd[1]: my-two-bits_v3.web.1.service: control process exited, code=exited status=1
Sep 11 16:39:28 ip-10-21-2-85.ec2.internal systemd[1]: Failed to start my-two-bits_v3.web.1.
Sep 11 16:39:28 ip-10-21-2-85.ec2.internal systemd[1]: Unit my-two-bits_v3.web.1.service entered failed state.
Sep 11 16:39:28 ip-10-21-2-85.ec2.internal systemd[1]: my-two-bits_v3.web.1.service failed.

Fixed this by killing one of my nodes.. go figure.


change the use of incorrect word

Hello @ahmadaliyu, nice catch, thank you for the correction! 👍
Can you also update the unversioned doc page, which is a source for newest version, so the change is retained in newer docs?

https://github.com/facebook/react-native-website/blob/main/docs/native-modules-android.md

Yes it is now handled accordingly
On Sun, Feb 5, 2023, 10:51 AM Bartosz Kaszubowski @.***>
wrote:

Hello @ahmadaliyu https://github.com/ahmadaliyu, nice catch, thank you
for the correction! 👍
Can you also update the unversioned doc page, which is a source for
newest version, so the change is retained in newer docs?

https://github.com/facebook/react-native-website/blob/main/docs/native-modules-android.md
—
Reply to this email directly, view it on GitHub
https://github.com/facebook/react-native-website/pull/3552#issuecomment-1417268868,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHWTWUVERQBLRCXFFLNALBTWV5ZZRANCNFSM6AAAAAAURPDLYQ
.
You are receiving this because you were mentioned.Message ID:
@.***>


Surface resource offers in the UI

Surface the offers that marathon is receiving from Mesos, and why they do or do not match.

Looks related to #1090

Note: This issue has been migrated to https://jira.mesosphere.com/browse/MARATHON-2759. For more information see https://groups.google.com/forum/#!topic/marathon-framework/khtvf-ifnp8.

Note: This issue has been migrated to https://jira.mesosphere.com/browse/MARATHON-2759. For more information see https://groups.google.com/forum/#!topic/marathon-framework/khtvf-ifnp8.


Close Wizard Bug

when you select close from the wizard, we will not have immediately another popup.
@Nauna @zahnno

The remove code is responsible in updating the capability store when statuses change. FYI @jlhughes


Added the tool to generate 3D CAD models using Ollama

build123d is not mentioned here as llama3.1:70b is not demonstrating good results and I didn't have the hardware to test it with larger models


readme.md: add an empty line to fix a link

GitHub's Markdown parser seems to be confused by a <img> tag immediately followed by a paragraph, which stops it from rendering the link to evertype.com properly. Add an empty line after <img> to fix the link.

Before:

After:


out of memory

Webpack 2 terminates due to out of memory for our Project at work.
<--- Last few GCs --->

  117575 ms: Mark-sweep 1356.4 (1457.2) -> 1364.8 (1457.2) MB, 593.4 / 0 ms [allocation failure] [scavenge might not succeed].
  118168 ms: Mark-sweep 1364.8 (1457.2) -> 1364.8 (1457.2) MB, 592.5 / 0 ms [allocation failure] [scavenge might not succeed].
  118777 ms: Mark-sweep 1364.8 (1457.2) -> 1364.8 (1457.2) MB, 609.1 / 0 ms [last resort gc].
  119381 ms: Mark-sweep 1364.8 (1457.2) -> 1364.8 (1457.2) MB, 603.8 / 0 ms [last resort gc].

<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x2caa627e3ac1 <JS Object>
    1: /* anonymous */(aka /* anonymous */) [/Users/entwickler/programming/factroFrontend/node_modules/webpack/lib/optimize/RemoveParentModulesPlugin.js:43] [pc=0xe09107f767b] (this=0x2caa62704189 <undefined>,key=0x11a5e8dd09d9 <String[4]: 1084>)
    2: arguments adaptor frame: 3->1
    3: InnerArrayForEach(aka InnerArrayForEach) [native array.js:~942] [pc=0xe09109b31f0] (this=0x2caa62704189 <u...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory
fish: 'node_modules/.bin/webpack' terminated by signal SIGABRT (Abort)

Sadly I'm not allowed to just give you our Project for debugging.
I hope you can still do something about it.
Configuration:
eslint: {
    configFile: './.eslintrc',
    failOnWarning: false,
    failOnError: true,
  },
  context: __dirname,
  resolve: {
    modulesDirectories: ['node_modules/@marudor', 'dependency', 'node_modules'],
    alias: {
      theme: 'Theme/index.js',
      warning: 'fbjs/lib/warning.js',
      shallowequal: 'fbjs/lib/shallowEqual.js',
      vex: 'vex/js/vex.js',
      joyride: 'react-joyride/index.js',
      vexCSS: path.resolve('./dependency/vex/css'),
    },
  },
  entry,
  output: {
    path: outputPath,
    filename: name,
    chunkFilename: node_env === 'production' ? '[id]-[chunkhash].js' : '[id].js',
    publicPath: '/',
  },
  module: {
    loaders: [
      { test: /^((?!(CSS|css)\.js$).)*(\.jsx?)$/,
        exclude: /(node_modules|dependency|primusClient\.js|Unit\/Services)/,
        loader: jsLoader,
      },
      {
        test: /tinymce(\\|\/)(plugins|themes|skins|langs)/,
        loader: 'file?name=[path][name].[ext]&context=dependency/tinymce',
      },
      { test: /\.css$/, loader: ExtractTextPlugin.extract('style', 'css'), include: /Editor/, exclude: /tinymce(\\|\/)/ },
      { test: /\.css$/, loader: 'style!css', exclude: /(tinymce(\\|\/)|Editor)/ },
      { test: /\.(CSS|css)\.js$/, exclude: /(node_modules|dependency)/, loader: `inline-css!${jsLoader}` },
      { test: /\.(jpg|png|gif|jpeg|ico)$/, loader: 'url', exclude: /tinymce(\\|\/)/ },
      { test: /\.(eot|ttf|otf|svg|woff2?)(\?.*)?$/, loader: 'file', exclude: /tinymce(\\|\/)/ },
      { test: /\.pdf$/, loader: 'file', exclude: /tinymce(\\|\/)/ },
      { test: /\.json$/, loader: 'json' },
      {
        test: /-spec\.js/,
        exclude: /(node_modules|dependency)/,
        loader: 'mocha!babel!eslint',
      },
    ],
    noParse: [
      /primusClient\.js/,
      /.*primusClient.*/,
      /react\\dist\\react(-with-addons)?\.js/,
    ],
  },
  plugins: [
    new webpack.NoErrorsPlugin(),
    new webpack.DefinePlugin({
      'process.env': {
        NODE_ENV: JSON.stringify(node_env),
      },
      FACTRO_CONFIG: JSON.stringify(config),
      __DEV__: JSON.stringify(__DEV__),
      __PROD__: JSON.stringify(!__DEV__),
      __WEB__: JSON.stringify(true),
      __APP__: JSON.stringify(false),
    }),
    new ExtractTextPlugin('[name].css'),
    new HtmlWebpackPlugin({
      filename: 'index.html',
      template: 'html!src/Web/index.html',
      minify: {},
    }),
    new webpack.optimize.CommonsChunkPlugin({
      async: true,
      minChunks: 3,
      children: true,
    }),
  ]
  devServer: {
    proxy: {
      '/api/*': {
        target: 'http://localhost:65429',
        toProxy: true,
        changeOrigin: true,
        xfwd: true,
      },
      '/primus/*': {
        target: 'http://<IP_ADDRESS>:3000',
        ws: true,
      },
    },
  },

Is it a big project? If so, you can increase the memory available to the node.js process...

Well - I did it up to 10 GB.
Takes about 10 minutes - then crashes as well.
Did not try to boost it even further as I think if it wont run with 10GB it just wont run...
(iMac 21", 16GB Ram, 3,3ghz i7)

try to downgrade to 2.1.0-beta.3 until we can fix it...

Hi folks , same issue here.

<--- Last few GCs --->

24586627 ms: Scavenge 1393.6 (1452.5) -> 1393.6 (1452.5) MB, 0.9 / 0 ms (+ 2.1 ms in 1 steps since last GC) [allocation failure] [incremental marking delaying mark-sweep].
24587305 ms: Mark-sweep 1393.6 (1452.5) -> 1393.6 (1452.5) MB, 678.8 / 0 ms (+ 3.6 ms in 2 steps since start of marking, biggest step 2.1 ms) [last resort gc].
24587931 ms: Mark-sweep 1393.6 (1452.5) -> 1393.6 (1452.5) MB, 625.7 / 0 ms [last resort gc].

<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x3d5f94644a49 <JS Object>
    1: /* anonymous */(aka /* anonymous */) [/Users/tyler/Work/whatever/node_modules/webpack-core/node_modules/source-map/lib/source-map/source-node.js:~341] [pc=0x27a2aa7bbe95] (this=0x3d5f94604139 <undefined>,chunk=0x243a07470781 <String[55]\: \x09        var thisBinding = baseCreate(Ctor.prototype),\n>,original=0x33954213bcd9 <an Object with map 0x267a24b58fd9>)...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory
Abort trap: 6

"babel": "^6.5.2",
"babel-core": "^6.7.4",
"babel-eslint": "^5.0.0",
"babel-loader": "^6.2.4",
"babel-plugin-transform-object-assign": "^6.5.0",
"babel-plugin-transform-react-jsx": "^6.7.4",
"babel-plugin-transform-runtime": "^6.6.0",
"babel-preset-es2015": "^6.6.0",
"babel-preset-react": "^6.5.0",
"babel-runtime": "^6.6.1",
"console-stamp": "^0.2.0",
"css-loader": "^0.23.1",
"eslint": "^2.3.0",
"eslint-config-airbnb": "^6.1.0",
"eslint-loader": "^1.3.0",
"eslint-plugin-flow-vars": "^0.2.1",
"eslint-plugin-react": "^4.2.1",
"estraverse-fb": "^1.3.1",
"html-webpack-plugin": "^2.10.0",
"image-webpack-loader": "^1.6.3",
"json-loader": "^0.5.4",
"less": "^2.6.1",
"less-loader": "^2.2.3",
"style-loader": "^0.13.0",
"url-loader": "^0.5.7",
"webpack": "^1.12.14",
"webpack-dev-server": "^1.14.1"
My webpack version is **1.12.14**, devDependencies,

@marudor Did @sokra 's solution solve this problem?

@TylerYang nope,
Even with older Webpack2 versions it broke.
You're using webpack1 though. Works for me with that.

@marudor  Thx, do you mean it works(won't crash anymore) when you switch back to webpack1?
Actually I did meet this issue several months ago.(With webpack1, also) and I was thinking something is wrong with my environment. (Maybe 3rd party dependencies)
Seems for now I have to restart the devServer after a few hours.  Would really like to dig into that to see what could possibly go wrong.

In our project a V8 issue was causing node to run out of memory. I've sent a PR to workaround the issue in webpack: https://github.com/webpack/webpack/pull/2497

@TylerYang @marudor
Does the V8 memory issues that @achicu described look related to your issues. Please list the following if this is still an issue:

Node version

If possible, can you update your version of node, and does updating fix the problem

Webpack 2 version:

If possible, update to most recent webpack beta, does this fix your problem

@TheLarkInn Node 6.2.2, webpack just updated.
Still OOM.
With Node 6.0-6.1 I also get crashes with webpack 1.

Did you try to increase the node.js memory? --max_old_space_size=<size> in MB

@skora: I tried. Also, there is a problem.

Same issue for a very small project

Hi,
I'm using webpack 2.2.0. It started the build and took a while then fail with error process out of memory. Any updates on this issue?
Thanks,
Khoa

Can anyone reproduce this In a tiny example? I'd like to pull it down and investigate further.

Same issue here, happens often on 8GB RAM machine

The same as in tlenex's case

Not sure that this is the same issue that is discussed here, but maybe this is somehow related.
I tried to upgrade webpack from 2.2.0 to 2.2.1 recently and build started crashing with this:
<--- Last few GCs --->

  183621 ms: Mark-sweep 1137.3 (1447.2) -> 1135.8 (1447.2) MB, 170.5 / 0.0 ms [allocation failure] [GC in old space requested].
  183755 ms: Mark-sweep 1135.8 (1447.2) -> 1135.8 (1447.2) MB, 133.5 / 0.0 ms [allocation failure] [GC in old space requested].
  183893 ms: Mark-sweep 1135.8 (1447.2) -> 1143.6 (1428.2) MB, 138.6 / 0.0 ms [last resort gc].
  184033 ms: Mark-sweep 1143.6 (1428.2) -> 1152.5 (1427.2) MB, 139.9 / 0.0 ms [last resort gc].

<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x18f82becfb51 <JS Object>
    1: [Symbol.replace] [native regexp.js:~540] [pc=0x3d862722a3dc] (this=0x2c8e64784da1 <JS RegExp>,D=0x23bd22004201 <Very long string[370669]>,aw=0x3356ec2276c9 <String[1]: />)
    2: 0x18f82be8aaf1 <Symbol: 20329980 <String[14]: Symbol.replace>>(aka [Symbol.replace]) [native regexp.js:~659] [pc=0x3d8626dbda4b] (this=0x2c8e64784da1 <JS RegExp>,D=0x23bd22004201 <Very long string[370669]>,aw=0x...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [node]
 2: 0x109608c [node]
 3: v8::Utils::ReportApiFailure(char const*, char const*) [node]
 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]
 5: v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [node]
 6: 0xee705c [node]
 7: 0xeea651 [node]
 8: v8::internal::Runtime_StringReplaceGlobalRegExpWithString(int, v8::internal::Object**, v8::internal::Isolate*) [node]
 9: 0x3d86202092a7
Aborted (core dumped)

I was able to narrow down this problem to stylus-loader and then I found this issue in stylus-loader repo: https://github.com/shama/stylus-loader/issues/162#issuecomment-277722106
I'm not very familiar with how loaders internals work, so it is quite difficult to me to identify what causing this in stylus-loader after update to<EMAIL_ADDRESS>but I can totally see A LOT of paths added to some kind of paths cache somewhere in loader internals (there is a link to src in issue comment above), and this is not happening on 2.2.0.
@sokra @TheLarkInn sorry for pinging you guys like that, but maybe you (or someone else) could suggest what changes in 2.2.1 compared to 2.2.0 could cause that?

I am also seeing this issue. I noticed that if i were to use say the cheap-source-map instead or any other devtool it works fine but this problems seems specific to source-map devtool for my case.

I too am experiencing this issue.  Node 7.5.0, Windows 10 with 16GB RAM, Powershell.

Update: My issue ended up being in the extract-text plugin(ETP)....To start the sourcemap dev tool plugin is a memory hog but the real issue was that ETP was generating some huge css files due to https://github.com/webpack-contrib/extract-text-webpack-plugin/pull/452 which increased the memory usage of the sourcemap plugin. Applying that patch to ETP fixed my issue.

Also experiencing this issue. App is at 550mb memory on initial start. Would like to lower this significantly since we develop in a VM with other microservices. Can we combine a list of things we can do to lower the memory footprint while developing? My VM keeps sending out of memory sigkills to this node process because it's high memory usage.

You should not compile on the production webserver. Best compile on CI server or dev compiler and deploy compiled assets.

We aren't compiling on a CI server. We do our development in a minikube through virtual box. It allows us to mimick our production microservices architecture by running a handful of services.

The same situation in my project.

Same issue in my project.
it's happened only when devtool set to "source-map" (when devtool set to "cheap-source-map" it work fine).

Given reports which indicate that the issue might relate to source maps I had a quick look at SourceMapDevToolPlugin.js. In line 60 array entries are pushed onto chunk.files within a map()-callback used when iterating the same array. Its an uneducated guess but modifying an array while iterating over it is always prone to side effects. I could imagine chunk.files is stacking up over time, though can't verify it at the moment. But since we push cached files onto the array it might fit into reports telling that the problem occurs only after a few rebuilds.

Further the filter().map().forEach() chain over chunk.files maps to tasks which when iterated later will further add to chunk.files in line 158.
These are only results from a superficial review for code smells made with a worst-case assumption. I've not attempted to fully understand the code (would have taken hours or days, probably). So read this as a disclaimer, please.

Has anybody tried to run the dev tools memory profiler on an incremental build? That's how i found this problem with the source-map library a while ago: https://github.com/mozilla/source-map/issues/259
Don't want to seem too negative, but source mapping is a critical part of webpack and the source-map lib from mozilla has piss poor performance. It was written in an era of tiny javascript.
I think the ideal would be a native implementation. I remember seeing an incomplete rust one which was 100x faster...

For the record: ModuleConcatenationPlugin seems to have been another cause for out-of-memory issues but fixed https://github.com/webpack/webpack/issues/5992

I'm just leaving this error dump here. I'm using webpack-dev-server and after doing some work and emitting several changes with hot-module-reload the server crashes by using too much memory. I have been watching the memory usage and noticed it always grows after an emit and will never decrease (memory leak?)
Project is about 9MB of builds (without source maps)
<--- Last few GCs --->

[16:0x55a8aa6e0000] 18017361 ms: Mark-sweep 1358.1 (1415.2) -> 1358.0 (1415.2) MB, 160.8 / 0.1 ms  allocation failure GC in old space requested
[16:0x55a8aa6e0000] 18017524 ms: Mark-sweep 1358.0 (1415.2) -> 1357.9 (1378.7) MB, 162.6 / 0.1 ms  last resort GC in old space requested
[16:0x55a8aa6e0000] 18017699 ms: Mark-sweep 1357.9 (1378.7) -> 1357.9 (1378.7) MB, 175.6 / 0.1 ms  last resort GC in old space requested

<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x1ffc11a5749 <JSObject>
    1: fromString(aka fromString) [buffer.js:340] [bytecode=0xfd9f52437d1 offset=161](this=0x13970f1822d1 <undefined>,string=0x2b66c3dddb49 <Very long string[25606263]>,encoding=0x1ffc11b49c1 <String[4]: utf8>)
    2: from [buffer.js:193] [bytecode=0xfd9f52432b1 offset=14](this=0xa4009d3b819 <JSFunction Buffer (sfi = 0x1ffc11fdd19)>,value=0x2b66c3dddb49 <Very long string[25606263]>,encodingOrOffs...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

@hultberg The <Very long string[25606263]> message makes me feel it could result from the ModuleConcatenationPlugin bug in #5992 which has been reported to create very long module identifier strings leading to OOMs.

@about-code Thanks, but I don't have that plugin enabled in my project (is it a default?), but I'm suspecting webpack-manifest-plugin as I have it enabled during hot-reload to have an overview over assets created. When I disable it, the memory usage gets high, but it seems the GC is working as memory is cleaned, preventing crashes.

@hultberg can you start with node --inspect-brk and then run a memory alloction profile of your build? I remember seeing Compiler writeOut() function allocating a lot in my case when it converts strings to buffers for writing (which i find crazy). We fixed it for our build by modifying our in house indexed sourcemap plugin to generate raw sources containing buffers instead of strings.

I'm also having about the same error directly when running WDS. Here are the details:

Operating System: MacOS 10.12.6
Node Version: 4.4.3
NPM Version: 2.15.1
webpack Version: 3.8.1
webpack-dev-server Version: 2.9.2

Code
webpack.config.js
https://gist.github.com/Anthony59273/7329a0a43d972978d09b8f1cdc944173
Expected Behavior
Dev server runs correctly.
Actual Behavior
When launching WDS I have the following behavior:
> cross-env NODE_ENV=development webpack-dev-server --hot --progress

 10% building modules 3/3 modules 0 active
Project is running at http://localhost:8000/
webpack output is served from /intelligence/
 91% additional asset processing
<--- Last few GCs --->

  311753 ms: Scavenge 1376.0 (1453.5) -> 1376.0 (1453.5) MB, 0.8 / 0 ms (+ 3.2 ms in 1 steps since last GC) [allocation failure] [incremental marking delaying mark-sweep].
  312567 ms: Mark-sweep 1376.0 (1453.5) -> 1376.0 (1453.5) MB, 813.9 / 0 ms (+ 5.0 ms in 2 steps since start of marking, biggest step 3.2 ms) [last resort gc].
  313397 ms: Mark-sweep 1376.0 (1453.5) -> 1376.0 (1453.5) MB, 830.8 / 0 ms [last resort gc].

<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x1e5e919b4629 <JS Object>
    2: /* anonymous */(aka /* anonymous */) [0x1e5e919041b9 <undefined>:~1836] [pc=0x34a2da1308e7] (this=0x1e5e919041b9 <undefined>,quote_char=0x1e5e919bdaf9 <String[1]: ">)
    3: /* anonymous */(aka /* anonymous */) [0x1e5e919041b9 <undefined>:1974] [pc=0x34a2da16ca89] (this=0x1e5e919041b9 <undefined>,x=0x1e5e919bdaf9 <String[1]: ">)
    4: input(aka next_token) [0x1e5e919041b9 <undefined>:~1...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory

So here I'm having a memory issue but I actually don't know where this comes from. I tried to allow more memory to this process using node --max_old_space_size=4096 but it didn't help. This happens directly when I'm trying to launch the dev server, while before I used to experience this after a few hot reloads.
Any help would be greatly appreciated. Thanks !

@Anthony59273 Try a larger size might help? I'm using "webpack:dev": "NODE_ENV=development node --max_old_space_size=8096 ./node_modules/.bin/webpack --progress --colors",

@artivilla I've tried with node --max_old_space_size=4096 without success. My WDS process takes about 1.5GB of memory usage so this value (4096) should be enough but I had no result with it.

i am facing the same issue here.

Friendly advice: giving version numbers is usually not enough info to get help. You have to think about it from the perspective of the project maintainer. I know i was making this mistake before and wondering why no help was fothcoming 😁. Either provide a repro repository or if that's not possible, try to get some kind of performance log/dump such as an allocation snapshot. It's actually quite easy to do. Ex insructions here: https://www.toptal.com/nodejs/debugging-memory-leaks-node-js-applications

Yes second this!! We in fact won't even look into this without a snapshot, heapdump or memtracing profile!

Updated to Webpack 4, still have the stacktrace crashing problem.
I have also tried the node --max_old_space_size=4096 solution, but that does not fix the problem. My work computer has 32GB of RAM, so memory is not an issue. But on systems with not as much RAM it does crash more often.
I'm not using ModuleConcatenationPlugin either.
I'm at a complete loss and our entire team has this problem. Some days it crashes the dev server upwards of 50+ times. Frustrating to say the least.
Latest Error:
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x370ca3da5e91
2: fromString(aka fromString) [buffer.js:312] [bytecode=0x370c40c7ed79 offset=164](this=0x370cf7502311 ,string=0x370c4cfd48c9 <Very long string[4772628]>,encoding=0x370ca3db6569 <String[4]: utf8>)
4: from [buffer.js:177] [bytecode=0x370c40c7e879 offset=11](this=0x370c40c30749 <JSFunction Buffer (sfi = 0x370ca3df0781)>,value=0x370c4cfd48c9 <Very long string[4772628]>,encodingOr...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [/usr/local/bin/node]
2: node::FatalException(v8::Isolate*, v8::Localv8::Value, v8::Localv8::Message) [/usr/local/bin/node]
3: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/usr/local/bin/node]
4: v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [/usr/local/bin/node]
5: v8::internal::String::SlowFlatten(v8::internal::Handlev8::internal::ConsString, v8::internal::PretenureFlag) [/usr/local/bin/node]
6: v8::String::WriteUtf8(char*, int, int*, int) const [/usr/local/bin/node]
7: node::StringBytes::Write(v8::Isolate*, char*, unsigned long, v8::Localv8::Value, node::encoding, int*) [/usr/local/bin/node]
8: node::Buffer::New(v8::Isolate*, v8::Localv8::String, node::encoding) [/usr/local/bin/node]
9: node::Buffer::(anonymous namespace)::CreateFromString(v8::FunctionCallbackInfov8::Value const&) [/usr/local/bin/node]
10: v8::internal::FunctionCallbackArguments::Call(void ()(v8::FunctionCallbackInfov8::Value const&)) [/usr/local/bin/node]
11: v8::internal::MaybeHandlev8::internal::Object v8::internal::(anonymous namespace)::HandleApiCallHelper(v8::internal::Isolate, v8::internal::Handlev8::internal::HeapObject, v8::internal::Handlev8::internal::HeapObject, v8::internal::Handlev8::internal::FunctionTemplateInfo, v8::internal::Handlev8::internal::Object, v8::internal::BuiltinArguments) [/usr/local/bin/node]
12: v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/usr/local/bin/node]
13: 0x67b7658463d
========================================================
Here is my package dependencies for the versions:
"dependencies": {
"axios": "0.16.2",
"bootstrap": "3.3.7",
"circular-json": "0.3.1",
"eonasdan-bootstrap-datetimepicker": "4.17.47",
"fingerprintjs2": "1.5.1",
"fullcalendar": "3.4.0",
"jquery": "3.2.1",
"json-to-form-data": "1.0.0",
"lodash": "^4.17.5",
"moment": "2.18.1",
"moment-timezone": "^0.5.14",
"object-to-formdata": "1.0.12",
"pikaday": "1.6.1",
"superagent": "3.5.2",
"underscore": "1.8.3",
"underscore.string": "^3.3.4",
"v-tooltip": "2.0.0-beta.5",
"velocity-animate": "1.5.0",
"vue": "2.4.1",
"vue-cookie": "^1.1.4",
"vue-form-generator": "2.2.0",
"vue-form-wizard": "0.8.1",
"vue-image-lightbox": "5.5.3",
"vue-instant-pdf-viewer": "1.0.2",
"vue-js-toggle-button": "1.1.2",
"vue-lazyload": "1.0.6",
"vue-loader": "14.2.1",
"vue-multiselect": "^2.0.8",
"vue-strap": "github:wffranco/vue-strap",
"vue-tables-2": "1.0.0",
"vue-template-compiler": "2.4.1",
"vue-touch": "2.0.0-beta.4",
"vue-virtual-scroll-list": "1.0.7",
"vue2-animate": "1.0.4",
"vuebar": "0.0.16",
"vuejs-datepicker": "0.9.0",
"webpack": "4.1.1",
"webpack-bundle-tracker": "0.2.0",
"webpack-cli": "^2.0.12",
"xmlhttprequest": "1.8.0"
},
"devDependencies": {
"babel-core": "^6.26.0",
"babel-eslint": "^8.2.2",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-loader": "^7.1.4",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-vue-jsx": "^3.7.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"babel-preset-vue-app": "^2.0.0",
"cross-env": "^5.1.4",
"css-loader": "^0.28.11",
"eslint": "^4.19.0",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^2.0.0",
"eslint-plugin-html": "^4.0.2",
"eslint-plugin-import": "^2.9.0",
"eslint-plugin-vue": "^4.3.0",
"file-loader": "^1.1.11",
"less": "^3.0.1",
"less-plugin-clean-css": "^1.5.1",
"node-sass": "^4.7.2",
"sass-loader": "^6.0.7",
"script-loader": "^0.7.2",
"style-loader": "^0.20.3",
"uglifyjs-webpack-plugin": "^1.2.4",
"webpack-dev-server": "^3.1.1",
"webpack-parallel-uglify-plugin": "^1.1.0"
}
}

Thanks everyone, we have a lot of difference issues here, it is hard to track and resolve their. When you have very very very big project you really need to increase node memory (i.e. node --max_old_space_size=4096). Also some loaders/plugins can have memory leak.
If you faced with FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory:

Try to update all deps to latest version (problem can be solved).
Try to increase node memory - node --max_old_space_size=4096
Try to disable plugins/loaders step by step.

If nothing has helped feel free create new issue with minimum reproducible test repo. Thanks!

on node v8+
instead of
...
"scripts": {
"build": "node --max_old_space_size=8192 node_modules/.bin/webpack "
},
...
try to add this to your bash script (or .bash_profile or .bashrc):
...
export NODE_OPTIONS=--max_old_space_size=8192
...
it works for me on mac osx
more info on stackoverflow

same issue in ci.


Multiple do statements

Trying to run npm install and :UpdateRemotePlugins, ie, multiple do statements.
Plug 'nomasprime/neocursorline.nvim', { 'do': ['npm install', ':UpdateRemotePlugins'] }

Getting Invalid hook type.
What's the best way of achieving this?

Type:

[ ] Bug
[ ] Enhancement
[ ] Feature Request
[x] Question

OS:

[ ] All/Other
[ ] Linux
[x] OS X
[ ] Windows

Vim:

[ ] Terminal Vim
[ ] GVim
[x] Neovim

Thanks @junegunn, worked like a charm. My first NeoVim plug-in's almost ready 😁


Release 1.5.11

Checklist

[x] Used a personal fork of the feedstock to propose changes
[ ] Bumped the build number (if the version is unchanged)
[x] Reset the build number to 0 (if the version changed)
[ ] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[x] Ensured the license file is being packaged.

The patches have been removed thanks to https://github.com/mamba-org/mamba/pull/3466.

@conda-forge-admin, please rerender


Which files need to be hosted?

Hello @mikolalysenko ,
I am the member of cdnjs project.
We want to host this library.
But there is a question want to ask.
I think the main file is build/openseadragon/openseadragon.js on npm, and is necessary to add build/openseadragon/images/?
Please help me confirm that.
Thanks for your help!
https://github.com/cdnjs/cdnjs/issues/8811

Wonderful! We'd love to be on cdnjs but haven't gotten around to submitting.
The latest stable release is actually in a different repository... this is the folder:
https://github.com/openseadragon/site-build/tree/master/built-openseadragon/openseadragon
Everything in that folder is needed, and that's the whole package.
Let me know if you need any more info, and let me know when it's in so we can promote it on our site!

Thanks!
Because there are just v1.1.1~v2.2.1 here, how about the older version here?
Like v0.9.124~v1.1.0, which files need to be grab in these older version?
Please help me confirm that.
Thanks for your help!

You can get all the historic versions back to 0.9.124 here:
https://github.com/openseadragon/openseadragon/releases
The site-build location will be a reliable place to get all future versions.

Thanks!
What I mean is I am not certainly sure which files are necessary to grab between these old version v0.9.124~v1.1.0 on github.
I speculate that there are two parts I need to grab aresrc/openseadragon.js and images/, right?
Thanks for your help!

Hmm... does it need to be from github? For CDN hosting you would just want the built files, but for versions v0.9.124~v1.1.0 we didn't check the built files in anywhere... what you see is the source. The only place you can find the built files for those versions is in the zip archives in the releases.
Would it help if we pulled those archives out and hosted them in a repo somewhere? Or can you use them directly? Or should we punt on those early versions?

Thank you! We have built files for old versions and open a PR here: https://github.com/cdnjs/cdnjs/pull/11204
You can take a look and check if anything is missed. 😃

@maruilian11 Wow, that's very thorough! Looks like you've got everything as far as I can tell! Thank you for doing this :)

@iangilman It's my pleasure. I will notify you once it is done 👍

@maruilian11 Looks like the patch has landed! Congratulations :) Thank you again for all the hard work on this!
So is it available now, or is there still another deploy step or something? How do we access the script and images on the cdn? Is it possible to specify a specific version or a range of versions (such as 2.2.x)? Sorry if these questions are basic; I haven't used cdnjs very much.
Also, is there any ongoing maintenance necessary, or will it just automatically pick up the new releases as we release them?

@iangilman Please take a look on the following link.
https://cdnjs.com/libraries/openseadragon
Because our auto-update mechanism depend on git tags, just remember to update git tag for every future version, the new release will be on the site (It may take few hours to update the release on the site after it released on GitHub). Feel free to open an issue if you have any question. 😃
It would be appreciated if you could also mention CDNJS in http://openseadragon.github.io/#download 😄

@maruilian11 Beautiful, thank you! And yes, we'll continue to use tags on upcoming releases. 2.3.0 should be soon, so we can make sure everything works then.
I've updated http://openseadragon.github.io/#download ...please take a look and make sure I did it right :)
I've also tweeted it:
https://twitter.com/openseadragon/status/865620056025079808
Exciting to have this in place! :)


Import DLL into Python enviroment using Pythonnet

Hi, as I am biased to Python programming, I tried to use Pythonnet to import the DLLs, and namespaces, which were successful. However, I couldn't further to call out classes or functions from the DLLS, can anyone here kindly guide or provide some python support for this SDK. Thanks

Currently, we only have c++, c#, java interface in the schedule list. If you want to use it in python environment, boost-python library can help you. It's easy to use boost-python library coding some wrappers for the c++ classes in the SDK.

If you finish python support, you can give us a pr. Thanks


mpmath and python 3.7

In python 3.7, when StopIteration is raised in an iterator, it produces
RuntimeError: generator raised StopIteration
see https://www.python.org/dev/peps/pep-0479/
Running tests with python 3.7 produces
_______________________________________________ [doctest] mpmath.ctx_fp.FPContext.qfac _______________________________________________
EXAMPLE LOCATION UNKNOWN, not showing all tests of that example
??? >>> qfac(4,3)
UNEXPECTED EXCEPTION: RuntimeError('generator raised StopIteration')
Traceback (most recent call last):
File "/var/tmp/portage/dev-python/mpmath-1.0.0-r1/work/mpmath-1.0.0/mpmath/functions/qfunctions.py", line 126, in factors
raise StopIteration
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.7/doctest.py", line 1329, in __run
compileflags, 1), test.globs)
File "<doctest mpmath.ctx_fp.FPContext.qfac[3]>", line 1, in
File "/var/tmp/portage/dev-python/mpmath-1.0.0-r1/work/mpmath-1.0.0/mpmath/ctx_mp_python.py", line 1016, in f_wrapped
retval = f(ctx, *args, **kwargs)
File "/var/tmp/portage/dev-python/mpmath-1.0.0-r1/work/mpmath-1.0.0/mpmath/functions/qfunctions.py", line 201, in qfac
return ctx.qp(q, q, n, **kwargs) / (1-q)**n
File "/var/tmp/portage/dev-python/mpmath-1.0.0-r1/work/mpmath-1.0.0/mpmath/functions/qfunctions.py", line 129, in qp
return ctx.mul_accurately(factors)
File "/var/tmp/portage/dev-python/mpmath-1.0.0-r1/work/mpmath-1.0.0/mpmath/ctx_base.py", line 391, in mul_accurately
for factor in factors():
RuntimeError: generator raised StopIteration
/var/tmp/portage/dev-python/mpmath-1.0.0-r1/work/mpmath-1.0.0/mpmath/ctx_fp.py:None: UnexpectedException
__________________________________________________________ test_qfunctions ___________________________________________________________
def factors():
    k = 0
    r = ctx.one
    while 1:
        yield 1 - a*r
        r *= q
        k += 1
        if k >= n:

          raise StopIteration

E               StopIteration
mpmath/functions/qfunctions.py:126: StopIteration
The above exception was the direct cause of the following exception:
def test_qfunctions():
    mp.dps = 15

  assert qp(2,3,100).ae('2.7291482267247332183e2391')

mpmath/tests/test_functions2.py:1449:

mpmath/functions/qfunctions.py:129: in qp
return ctx.mul_accurately(factors)

ctx = <mpmath.ctx_mp.MPContext object at 0x7f61e91cbef0>, factors = <function qp..factors at 0x7f61e6a7b1e0>, check_step = 1
def mul_accurately(ctx, factors, check_step=1):
    prec = ctx.prec
    try:
        extraprec = 10
        while 1:
            ctx.prec = prec + extraprec + 5
            max_mag = ctx.ninf
            one = ctx.one
            s = one
            k = 0

          for factor in factors():

E               RuntimeError: generator raised StopIteration
mpmath/ctx_base.py:391: RuntimeError
========================================================== warnings summary ==========================================================
/usr/lib/python3.7/site-packages/_pytest/config/findpaths.py:42: RemovedInPytest4Warning: [pytest] section in setup.cfg files is deprecated, use [tool:pytest] instead.
config=config,
/var/tmp/portage/dev-python/mpmath-1.0.0-r1/work/mpmath-1.0.0/mpmath/libmp/libelefun.py:203: DeprecationWarning: invalid escape sequence \
"""
/var/tmp/portage/dev-python/mpmath-1.0.0-r1/work/mpmath-1.0.0/mpmath/libmp/gammazeta.py:389: DeprecationWarning: invalid escape sequence \
"""
/var/tmp/portage/dev-python/mpmath-1.0.0-r1/work/mpmath-1.0.0/mpmath/libmp/gammazeta.py:861: DeprecationWarning: invalid escape sequence \
"""
/var/tmp/portage/dev-python/mpmath-1.0.0-r1/work/mpmath-1.0.0/mpmath/libmp/gammazeta.py:1104: DeprecationWarning: invalid escape sequence \
"""
/var/tmp/portage/dev-python/mpmath-1.0.0-r1/work/mpmath-1.0.0/mpmath/calculus/extrapolation.py:815: DeprecationWarning: invalid escape sequence \s
"""
/var/tmp/portage/dev-python/mpmath-1.0.0-r1/work/mpmath-1.0.0/mpmath/calculus/quadrature.py:407: DeprecationWarning: invalid escape sequence \c
"""
/var/tmp/portage/dev-python/mpmath-1.0.0-r1/work/mpmath-1.0.0/mpmath/calculus/quadrature.py:413: DeprecationWarning: invalid escape sequence \c
"""
/var/tmp/portage/dev-python/mpmath-1.0.0-r1/work/mpmath-1.0.0/mpmath/identification.py:744: DeprecationWarning: invalid escape sequence \s
"""
/var/tmp/portage/dev-python/mpmath-1.0.0-r1/work/mpmath-1.0.0/mpmath/ctx_mp.py:524: DeprecationWarning: invalid escape sequence \s
"""
-- Docs: https://docs.pytest.org/en/latest/warnings.html
=================================== 2 failed, 459 passed, 1 skipped, 10 warnings in 110.31 seconds ===================================

@grozin, did you check the development version (just pip install from the mpmath's git repo)?
See #398 and more recent merged pull requests.  I believe, this issue was fixed recently and there are CI tests for CPython 3.7, which pass now for the master branch: see here.
@fredrik-johansson, maybe you can release a new version?  (BTW, I would like to see also solution for #401 with new release.)

@fredrik-johansson, maybe you can release a new version? (BTW, I would like to see also solution for #401 with new release.)

This is now done on my branch, pull request in

Yes there will certainly be a new release soon when the current round of PRs and major open issues have been dealt with!

Are there any issues left that people strongly want to see fixed before the new release?


Extract Version information for Camel (and quarkus)

It would be nice to somehow receive the version of the runtimes, so that (eventually) the controller could stash this information on the .status of each CR
kn-connector-source-kamelet-source-timer-deployment-68c48cp8dsr source INFO running in /home/jboss
kn-connector-source-kamelet-source-timer-deployment-68c48cp8dsr source __  ____  __  _____   ___  __ ____  ______
kn-connector-source-kamelet-source-timer-deployment-68c48cp8dsr source  --/ __ \/ / / / _ | / _ \/ //_/ / / / __/
kn-connector-source-kamelet-source-timer-deployment-68c48cp8dsr source  -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
kn-connector-source-kamelet-source-timer-deployment-68c48cp8dsr source --\___\_\____/_/ |_/_/|_/_/|_|\____/___/
kn-connector-source-kamelet-source-timer-deployment-68c48cp8dsr source 2024-10-14 13:42:30,507 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.camel.openapi.codegen.model-package" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
kn-connector-source-kamelet-source-timer-deployment-68c48cp8dsr source 2024-10-14 13:42:31,964 INFO  [org.apa.cam.qua.cor.CamelBootstrapRecorder] (main) Apache Camel Quarkus 3.15.0 is starting
kn-connector-source-kamelet-source-timer-deployment-68c48cp8dsr source 2024-10-14 13:42:31,965 INFO  [org.apa.cam.mai.MainSupport] (main) Apache Camel (Main) 4.8.0 is starting

I think it would be great if that meta information that is helpful for debugging could be already hardcoded into the controller, much like the image tag/hash for each runtime kamelet-based source image is hardcoded in the controller. This way, the controller can add it directly to the status without inspecting the running image during runtime. This would be much simpler and work, even when the runtime image does not come up for some reason.
Besides the version, I could imagine also adding information like the Maven coordinates of the underlying Camel component (or, if we want to go fancy, some URL pointing to the documentation of the schema/Kamelet)

One big issue is, that for running sources/sinks, you would have to update all of those.
Perhaps there is different way of exposing this information. Perhaps we have global annotation of the Camel runtime, eg on Eventing controller


Fix enum/union cases not having the correct container type

Fixes #2719

BTW, do you have an idea why "details" bottom pane does not show for F# symbols?

@dotnet-bot test this please

Any chance we could get this merged before the nightly now that the tests are green?
Also @vasily-kirichenko the details panel does work for me :o

Thanks for this.

Thanks @kevinransom. Do you also have any idea why there wasn't a nightly build yesterday?

@saul Hard to say.  It's an automatic process, so something likely didn't make it past validation.  @KevinRansom was saying that there were some issues with our CI that he was looking into.


Move postcss to dependencies

Moved postcss to dependencies and updated to the latest patch version.
Closes #11

Thanks I'll merge this and get a patch out tonight.

Published as 0.2.3. Thanks again!

No problem, thanks for the help! 👍


Fix build failure

Why did you lock it to 214a instead of using any subversion of 214?

I'm not sure how to include any subversions. I'm not particularly familiar with maven's syntax.
The way it was before it would not build as it couldn't find the correct sync-client version. This change will allow it to build, but need to be updated for each new sub version of sync-client which is not ideal. I submitted this quickly since the build was broken.
I assumed that either the tip had a typo or that our versioning wasn't done correctly, since maven didn't seem to recognize 214a as a sub version of 214. If you have the right fix I'm happy to merge that instead of what I did.

pom.xml wasn't updated to use 214, this would fix it [2.0 rev 214, 2.0 rev 215).

Ah ok, I see how it works now. I've updated this pull request with your suggestion


Add a flag to substitute environments

Adds -substitute which only substitutes an environment (specified in JSON) into a single rewrite template on the command line.
comby 'ignored' ':[1] :[2]' -substitute '[{"variable":"1","value":"hole_1"},{"variable":"2","value":"hole_2"}]'

The JSON environments output by-match-only flags can be used directly with the -substitute flag (the range fields are simply ignored).
Step 1: Get JSON matches
echo "a match1 c d a match2 c d" | \
./comby 'a :[1] c d' '' -stdin -matcher .generic -json-lines -match-only \
| jq -c '.matches | map(.environment) | .[]'

Outputs JSON environments:
[{"variable":"1","value":"match1","range":{"start":{"offset":2,"line":1,"column":3},"end":{"offset":8,"line":1,"column":9}}}]
[{"variable":"1","value":"match2","range":{"start":{"offset":15,"line":1,"column":16},"end":{"offset":21,"line":1,"column":22}}}]

Substitute rewrite_template with the env on the first line above:
./comby 'ignored_match_template' 'derp :[1] derp' -substitute-only '[{"variable":"1","value":"match1","range":{"start":{"offset":2,"line":1,"column":3},"end":{"offset":8,"line":1,"column":9}}}]'

Outputs:
derp match1 derp

Can it be nicer to use subcommands instead of imperative flags?
Would you like to omit any command parameter like “'ignored'”?


[KYUUBI #2850][FOLLOWUP] Replace log4j2.properties by log4j2.xml

Why are the changes needed?

Replace log4j2.properties by log4j2.xml
How was this patch tested?

[ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

[ ] Add screenshots for manual tests if appropriate

[x] Run test locally before make a pull request

Thanks, merging to master


Fix specifying gpu_id, add tests.

Address #3850 .
I don't have the multi-gpu machine for testing currently.

@trivialfis We may want to list this as a known issue. Do you have a short description of the issue?

@trivialfis Got it. I'll trust your judgment on this.

@hcho3 Tested with the R script provided by @joegaotao . Thanks.  I think it should now be fixed.
@RAMitchell But it's not clear to me, what's the point of having normalised_device_index.  Can we just use the device index obtained from CUDA?

@hcho3 Not really.  Just talked to @RAMitchell , the current fix will disable dividing training sessions across GPUs.   Although the script won't fail but it defeats the purpose of specifying gpu_id.

Let me keep trying.

@RAMitchell Ready for a review.  I haven't figure out how to make a unified way to allocate GPU, but the current fix won't add any burden to the code base, see if we can merge it.

@hcho3 I can't address these problems today.  I need some more time to completely remove the normalise/unnormalise stuffs.  So known issue it is.

@trivialfis Okay, I'll add it to the known issues. How should I summarize this issue (in a sentence)? How about "gpu_id cannot be set when one GPU is used"?

"Specifying gpu-id is not yet supported." is more realistic from my perspective.

Due to  #3794 , even if we try to support specifying gpu_id, users still need to have a copy their dataset for each GPU.

@RAMitchell Ready for another review now. :)

@trivialfis I just added a new multi-GPU worker, but somehow I broke the old one. Let me reboot it.

@hcho3 Thanks. :)

@trivialfis Both workers are now up and running.


getRedirection always returns english object

Hello,
I am not able to get raw translations to work using getRedirection. Is it the right way to load translation object per language and access throughout the App. Can you please help?.
Thanks for your help.
App.js
import {LanguageProvider} from 'react-native-translation';
const locale = 'fr-FR';//Localization.locale;
export default class App extends React.Component {
  render() {
    return (
      <LanguageProvider language={locale}>
        <AppNavigator/>
      </LanguageProvider>
    );
  }
}

en.js
export default {   hello: "Hello" };
fr.js
export default {   hello: "Bonjour" };
transRedirector.js
import en from "./locales/en";
import fr from "./locales/fr";

const transRedirector = {
  "en-US" : en,
  "fr-FR" : fr
}

export default transRedirector;`

Main.js
import {getTranslation, getRedirection} from 'react-native-translation';
import transRedirector from './helpers/transRedirector';
const transdata = getRedirection(transRedirector);

Output of transdata
{"hello":"Hello"}

Hello @letaptravek!
It seems like you are trying to access the context outside a component.
In your main.js, you have to use the getRedirection() function inside a component, so it can access the context where the language is stored.
For a full explanation:
The package uses the React Context API, that defines a 'context' to provide the language everywhere in the app.
You set this context with the LanguageProvider component, and this context is defined for every child component.
The getRedirection() function needs to access the context to access the current language. This is why it has to be called inside a child component of the provider.
Concretely, here is a simple snack.io showing how to solve your issue:
https://snack.expo.io/@exorth/quiet-popsicle
Don't hesitate if you're facing any other issue.

Hello @Exorth98!, It's works now. I used outside the component.   Thank you!

Hello @Exorth98 ,
Is it possible to use getRedirection in App.js as below. I am not able to get this work.
Thanks
import * as React from 'react';
import {LanguageProvider, getRedirection} from 'react-native-translation';
import transRedirector from './src/helpers/transRedirector';
const locale = 'fr-FR';//Localization.locale;

export default class App extends React.Component {
  render() {
  const transdata = getRedirection(transRedirector);
    return (
      <LanguageProvider language={locale} translations = {transdata}>
        <Main/>
      </LanguageProvider>
    );
  }
}

Hey @letaptravek,
No you can't, for the same reason explained before:
The getRedirection() has to access the language which is in the context. And the context is defined only for the children components of the <LanguageProvider>.
Geneally speaking, the package doesn't have a  1 language per file feature for the moment.
Which is what you're trying to do with the Redirection.
That's actually a interesting way to build it with the actual tools, but it is not compatible with the use of the translations prop of the <LanguageProvider>.
However, such a feature it will be soon implemented in the package.

No Problem, Thanks


Incorrect Focal-R mse loss?

Hi authors,
page 6 from your paper:
Precisely, Focal-R loss based on L1 distance can be written as 1/n∑n i=1 σ(|βei|)γ ei, where ei is the L1 error for i-th sample, σ(·)

QUESTION 1 : in the focal_mse loss:
https://github.com/YyzHarry/imbalanced-regression/blob/055a7b3804bbaf903ed25a55c11ab8acc6e142e1/agedb-dir/loss.py#L24
should be  torch.abs((inputs - targets)**2) and not only torch.abs(inputs - targets), am I correct?
QUESTION 2 : why is there 2*torch.abs(...)-1 ? you do not have and -1 or 2* in the function in your paper?

QUESTION 1 : in the focal_mse loss...

This is a good catch. Since there's already a hyper-parameter beta to control the "scaling" effect, we did not use the squared error -- but one could always try that (and tune the value of beta correspondingly).

QUESTION 2 : why is there 2*torch.abs(...)-1

This is because sigmoid(x) is in [0.5, 1] for all x>=0, so we simple scale it back to [0, 1]. If you choose activation as 'tanh', you do not need to rescale it. Since it's an engineering issue, for cleanness, we did not expand the detail in paper.

thank you! now it's clear to me :)


[BUG] Null Reference Exceptions when trying to set VoidBaseEventReferenceListener event in code

Describe the bug
I'm trying to automatize the process of adding event listeners via an editor button, but I can't set Void Base Event Reference Listener event via code. I get a Null Reference Exceptions: https://pastebin.com/bCfckLJy and https://pastebin.com/EGVbC1qH
To Reproduce
Add the following script and run it. I'm triggering a more complex version of this at edit time with Odin Inspector's [Button] attribute but for testing purposes I placed the logic in Start.
using UnityAtoms.BaseAtoms;
using UnityEngine;

public class Test : MonoBehaviour
{
    public VoidEvent voidEvent;

    private void Start()
    {
        AddEventToListener();
    }
    private void AddEventToListener()
    {
        if (voidEvent!=null)
        {
            var go = new GameObject("Void Event Reference Listener",typeof(VoidBaseEventReferenceListener));
            var listener = go.GetComponent<VoidBaseEventReferenceListener>();
            listener.Event = voidEvent;
        }
    }
}

Expected behavior
The expected behaviour would be to not get null reference exeptions since the code is valid.
Environment

OS: Windows 10 Pro Editor, Desktop target
Unity Version 2019.4.11f1
Version of Unity Atoms [4.3.0]

listener is null ... not voidEvent which is obviously the case, because GetComponent did not found a  VoidBaseEventReferenceListener.
I'll do a few tests. give me a moment

ok, I tried it myself and it is indeed the case.
it seems to be this line:
https://github.com/AdamRamberg/unity-atoms/blob/e2bc533807c3b47b0bae2123bed85c0e0900611f/Packages/Core/Runtime/Listeners/AtomEventReferenceListener.cs#L29
which makes the reference instantiate as default ( = null)

Fixed on canary.


can not output string with  color in debug console after update to 1.22.1

VSCode Version:1.22.1
OS Version:win10

Steps to Reproduce:
1.i use colors package to colorful my output
console.log(colors.green('hello')+" world")
this will output string "hello world" that "hello" with color green(debug console,terminal)
this work fine in v1.21.1
2.after upgrade to v.1.22.1,it still work fine in terminal,but not work in debug console,
all the text color is green,not only 'hello'
terminal:

debug console:

Does this issue occur when all extensions are disabled?: Yes/No
yes

I also noticed this after the update.

@danielfrankcom this seems to have broke with your pr https://github.com/Microsoft/vscode/pull/45946
Would you be interested in fixing this issue?

Yeah I definately can, but not for a little while. If someone else wants to take a crack at it in the mean time go right ahead!

@danielfrankcom great. Tackle it when you have time then, assigning this to May so we do not hurry.

Hey @isidorn, I'm working on this issue now.
While I was looking at the code again, I've noticed discrepencies in the way that various ANSI codes are being handled. This, in combination with the issue that prompted my changes originally, have led to a rewrite of the whole ANSI handling function. It should be much more robust when I'm done, but I have a question regarding your preference for currently unsupported ANSI codes.
This code for example is currently unsupported by us:

Would we like to print out [K, or hide the code on the debug console entirely? The actions taken currently vary substantially, so I'd like to define a specific way of handling situations like this. Certain codes such as Esc[123456m (which is completely invalid) are currently ignored, while the code mentioned above is printed to the console as [K.

@danielfrankcom first of all thanks for looking into this.
As for what to do in that specific scenario: my preference would be to not show it because that would be consistent with some other places where we strip out ansi escape code
However I could also be convinced to show it if you are leaning towards that.

@isidorn Sound good.
Unless you think it really matters, I'm going to match all numbers from 0-107 as valid codes despite certain ranges not really being included as real ANSI codes. (https://en.wikipedia.org/wiki/ANSI_escape_code)
While I'm at it, I'm adding background colours as they're not currently supported. I'd like to add high-intensity colours too, but the colours all seem a bit off. I wanted to check, are there any sort of guidelines for maximum colour intensity? Certainly on the dark theme, yellow looks more like mud...

@danielfrankcom great. Makes sense for ansi code ranges
If possible try to split it in two PRs, the second one that adds background colors.
As for the guidelines we do not really have them. If the color is exactly specified by ansi then there is not much we can do as we should not change it or make it lighter.
fyi our designer @misolori

I haven't changed the actual colours at the moment, though I can if it's worth looking into.
As stated in #49764, the first commit in the pull request should be ignored, as it just provides the context of the other review.

Am I doing something wrong?

Install colors
Run code:

const colors = require('colors')
console.log(colors.green('hello') + ' world');

No colored output:

@roblourens I believe you are doing everything right. Though we stil plan to support some missing colors, but green should probably be supported
@danielfrankcom can comment more

@isidorn this fails for me in Isiders but works fine when running out of source:
light theme:

dark theme:

@weinand I can try again once there is a new insiders

@isidorn Probably the code relies on some source workspace detail that differs in the built and packaged product. Does it work for you if you build the packaged product locally?

Works fine out of source.
Does not work in insiders and when built locally.
The issue is that the output recieved from the adapter when run out of source nicely contains the anssi sequences. When using insiders the ansi characters are stripped.
Assigning to also @roblourens and @weinand to investiagte on the adapter side
Looking at this file it seems like the same extension version is used in both cases https://github.com/Microsoft/vscode/blame/master/build/builtInExtensions.json#L9
It might be somewhere between the adapter and the UI the ansi sequences get stripped
Out of source:

Insiders:

When running out of source the adapters are identical to the ones in Insiders (because they are loaded from the Marketplace).
So it cannot be something in the adapter.

It is (again) the environment, stupid...
When running Insiders from the command line, the colors work fine.
And colors fail when running Insiders from the Finder.

@weinand great catch and good anlaysis. Thanks!
Should we close as duplicate then?

No, #50340 has  the background info but would not fix this.
Leave it open until I understand the problem (and a workaround/fix).

The npm module "colors" () relies on the environment to figure out whether colors are supported (https://github.com/Marak/colors.js/blob/a8ce90c51c929aa7759cca33bccb859027385709/lib/system/supports-colors.js#L40)
A workaround is to add a "FORCE_COLOR" variable to the environment:

			"env": {
				"FORCE_COLOR": "10"
			},


Link to external examples

Not sure you'll find this useful. But I think the additional examples might help people getting started with RTL.

@antsmartian, good point. I'm pretty confident that not a ton will change in these packages and I'm not too concerned about keeping things being kept up to date. If they fall out of date, people can contribute to update them. Having a link to a resource is better than not :)

Thanks!

:tada: This PR is included in version 5.3.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Pol 34 AWS delete unused ELB(CLB)

Description
This policy checks all  ELB (CLB) to determine if any are unused (have no healthy instances) and allows them to be deleted by the user after approval.
Issues Resolved
When an unused  ELB (CLB) is detected, an email action is triggered automatically to notify the specified users of the incident. Users then have the option to delete the  ELB (CLB) after manual approval if needed.
Contribution Check List

[ ] All tests pass.
[ ] New functionality includes testing.
[ ] New functionality has been documented in the README if applicable
[ ] New functionality has been documented in CHANGELOG.MD

Screen shot of incident details

Running policy Link.

https://governance.rightscale.com/org/1105/projects/60073/applied-policies/5c9ca28c1e88c80088e2ad4d

@srpomeroy-We have implemented POL-34 only for the default region i.e. us-east-1, we came to know that the policy needs to be considered all the regions (There was conversation in the Policy Template Chat yesterday about including regions), so we are working on this policy to include other regions as well. Thanks.

@srpomeroy-We have implemented POL-34 only for the default region i.e. us-east-1, we came to know that the policy needs to be considered all the regions (There was conversation in the Policy Template Chat yesterday about including regions), so we are working on this policy to include other regions as well. Thanks.

Excellent catch @cvurubindi ! I saw the endpoint and assumed it was global for some reason. Shame on me for not looking into it further. Found this note on the regions and endpoints docs page:

"If you just specify the general endpoint (elasticloadbalancing.amazonaws.com), Elastic Load Balancing directs your request to the us-east-1 endpoint."

@srpomeroy-We have implemented POL-34 only for the default region i.e. us-east-1, we came to know that the policy needs to be considered all the regions (There was conversation in the Policy Template Chat yesterday about including regions), so we are working on this policy to include other regions as well. Thanks.

Excellent catch @cvurubindi ! I saw the endpoint and assumed it was global for some reason. Shame on me for not looking into it further. Found this note on the regions and endpoints docs page:

"If you just specify the general endpoint (elasticloadbalancing.amazonaws.com), Elastic Load Balancing directs your request to the us-east-1 endpoint."

Thanks @srpomeroy for the comments, I have checked-in the policy with supporting all the regions except the below regions which we don’t have access/authorized to these regions
Asia Pacific (Osaka-Local)- Getting Error: The AWS Access Key Id needs a subscription for the service.
China (Beijing) and China (Ningxia)- Error: https://elasticloadbalancing.cn-north-1.amazonaws.com/?Action=DescribeLoadBalancers&Version=2012-06-01., I think we don’t support China endpoints.
Below is the link for running policy with all the resgions
https://governance.rightscale.com/org/1105/projects/60073/applied-policies/5cad9f2a7e1f1d00899a8e67

@srpomeroy -Is there anything else left out to be reviewed from your end or anything else to be taken care at my end before merge this into master branch?
As i mentioned comments above, I have included all the supported regions (Referred the policy(As you asked in Teams chat) for all regions support: https://github.com/rightscale/policy_templates/blob/master/operational/aws/vpc_name_sync/aws_vpc_name_sync.pt) except below mentioned in this policy.
Asia Pacific (Osaka-Local)- Getting Error: The AWS Access Key Id needs a subscription for the service.
China (Beijing) and China (Ningxia)- Error: https://elasticloadbalancing.cn-north-1.amazonaws.com/?Action=DescribeLoadBalancers&Version=2012-06-01

@ryanoleary What are your thoughts on excluding the regions Asia Pacific (Osaka-Local),
China (Beijing), and China (Ningxia)? See @cvurubindi comments for more info.

@ryanoleary What are your thoughts on excluding the regions Asia Pacific (Osaka-Local),
China (Beijing), and China (Ningxia)? See @cvurubindi comments for more info.

Per @ryanoleary email:

These regions can be skipped for now – our accounts don’t have access to them, and most customers won’t have access either.

@srpomeroy any more comments? can you resolve and approve?

@cdwilhelm @cvurubindi I updated the root readme and looked over the changed and approved.
Just waiting on @avinashbhashyam-rs to verify/resolve his requested changes.

LGTM


cleaner method to deploy to github pages

I modified the github action so it can deploy from the gh-pages branch in the original project repo, see here: https://github.com/KhronosGroup/glTF-Compressor/pull/21/files#diff-1429285a63936977b05806e8a5aba1ce8e47b48356432b69576b57cb6ef65663

Do you still need this release repository if hosting on Github pages?

Do you still need this release repository if hosting on Github pages?

no, but maybe khronos group has their reasons? I think it's better if it's all self contained though, can build the demo site on a separate branch such as gh-pages

No, if you do not need it for your purpose, we can delete. Would be good  to ensure we update any links to the release before doing so :)


Allow the html file running to be tabbed with other existing pages on Microsoft Edge

Is your feature request related to a problem? Please describe.

Describe the solution you'd like:

Describe alternatives you've considered:

Additional context:

Thanks for reaching out, unfortunately I don't understand your request. Could you please provide more information or rephrase it?


Updating and commenting secure vault configurations

This p/r is to update and comment out secure vault configurations.

Merged. Thanks!


Use dependsOn with background/watch task

With a task.json like the following, I'd like to be able to
I want to create a task in VS Code that starts webpack after tsc --watch has emitted the first time.
So far I have been unable to write a tasks.json that would achieve this, as the webpack command was executed either too early (development) (no files written yet), or never (development-v2) (as the tsc process was still running).
Should this be supported as of today? Otherwise I would change this into a feature request.
tasks.json:
{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "TSC watch",
      "command": "yarn",
      "args": ["ts-watch"],
      "problemMatcher": "$tsc-watch",
      "isBackground": true
    },
    {
      "label": "webpack development build and server",
      "command": "yarn",
      "args": ["development:webpack-and-server"]
    },
    {
      "label": "development",
      "dependsOn": ["TSC watch", "webpack development build and server"]
    },
    {
      "label": "development-v2",
      "command": "yarn",
      "args": ["development:webpack-and-server"],
      "dependsOn": ["TSC watch"],
      "group": "build",
      "problemMatcher": []
    }
  ]
}

VSCode Version: 1.23.1
OS Version: macOS 10.13.4

@timm-aym this is currently not possible. Major reason is to determine when tsc watch has emitted the first time. This is information the problem matcher has right now but the task system itself only knows when a task as started and when it has finished. But I agree that this is something useful for the system.

Same root request as #6209


Generalize LwIP build to support multiple environments

The process by which Weave builds its internal version of LwIP has been changed to provide support for building LwIP for different target environments.
Previously, when the --with-lwip=internal configure option was specified, the build system would build LwIP specifically for use in "standalone" (i.e. linux desktop) environments.  This change introduces a new configure option, --with-lwip-target=<target>, that developers can use to select other target
environments.  The new option is only meaningful when --with-lwip=internal has been specified.  Thus the behavior of building Weave with an external LwIP package is unchanged.
The --with-lwip-target=<target> option works by selecting among a set of target-specific configuration headers and sources located in the src/lwip directory (e.g. standalone/arch/cc.h, standalone/arch/sys_arch.h, standalone/sys_arch.c, etc.). Currently there are two choices for the --with-lwip-target option: standalone and none.
standalone builds LwIP as before, for the linux desktop environment. This is the default.  none instructs the system to build LwIP without any environment-specific files.  Developers can use this to incorporate their own files (e.g. via -I in CPPFLAGS) while still relying on Weave to do the work of building LwIP.

Yeah.  The problem is the way conditionals work in automake.  You can't use a conditional unless its been defined using AM_CONDITIONAL.  But the new conditional I added in nl_with_lwip.m4 only gets invoked when configure.ac calls the NL_WITH_LWIP function, which in turn only happens when WEAVE_SYSTEM_CONFIG_USE_LWIP is defined.  So non-LwIP builds fail with "conditional ... was never defined".
RS suggested that we pass the value of ${WEAVE_SYSTEM_CONFIG_USE_LWIP} to NL_WITH_LWIP as an argument and then move the "are we using LwIP" test into NL_WITH_LWIP itself.  That way NL_WITH_LWIP can declare all the AM_CONDITIONALs associated with LwIP, simplifying configure.ac in the process, and avoiding the undefined conditional problem.
I'm interested in your thoughts on this approach.

Codecov Report

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

@@           Coverage Diff           @@
##           master      #81   +/-   ##
=======================================
  Coverage   60.13%   60.13%
=======================================
  Files         306      306
  Lines       49367    49367
=======================================
  Hits        29686    29686
  Misses      19681    19681

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 257e94b...a0734e3. Read the comment docs.


Customizing the risk score Lists 4 and not 3

The Customizing the risk score mentions that the score is a calculation of 3 factors but lists 4 factors within the explanation.

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

ID: 2c81376b-bf8e-4e45-056e-515732d49e02
Version Independent ID: ed7148a0-d390-dc0c-68a0-b33724e87da0
Content: Working with the risk score
Content Source: CloudAppSecurityDocs/risk-score.md
Service: defender-for-cloud-apps
GitHub Login: @dcurwin
Microsoft Alias: dacurwin

@Donovand4 - Thanks for the comment. The page has been updated.


App crashes when using --single-instance & --tray (two windows open for a few seconds and 1 crash in seconds)

Bug description
Two windows are temporally shown when using -single-instance with -tray :

The currently reduced to tray window (expected behavior)
A black window, like if the app was trying to open a second time just before it notices that another window is already active, and therefore closes itself (in a second)

It's that second window that I would like to remove. It doesn't look very professional/aesthetic, and it was a bug that wasn't present last year.
Steps to reproduce
`nativefier --name "App Name" --icon ../../Logos/favicon.png --app-copyright "My Name" --app-version "1.0.0" --build-version "1.0.0" --ignore-certificate --insecure --tray --disable-dev-tools --disable-context-menu --single-instance --width "1600px" --height "900px" --platform "linux" --internal-urls ".*?\.app-website\.*?" --file-download-options '{"saveAs": true}' 'https://app-website.com'`

This command work fine. The issue is that when you close the app, it reduce to tray (it's normal with the --tray parameter), but when you open it again with the executable/desktop shortcut, two windows are temporally shown.

Expected behavior
Only the reduced to tray app should be shown
Actual behavior
A black window is temporally shown
Debug info
Here is what happens when you launch the application from the command line:
(website:164754): Gtk-WARNING **: 16:23:37.098: Theme parsing error: gtk.css:73:46: The style property GtkScrolledWindow:scrollbars-within-bevel is deprecated and shouldn't be used anymore. It will be removed in a future version
onReady ERROR Error: ERR_FAILED (-2) loading 'https://app-website.com'
    at rejectAndCleanup (node:electron/js2c/browser_init:161:7486)
    at Object.stopLoadingListener (node:electron/js2c/browser_init:161:7861)
    at Object.emit (node:events:394:28) {
  errno: -2,
  code: 'ERR_FAILED',
  url: 'https://app-website.com'
}

Context

Nativefier: 46.1.1
Node.js: v17.6.0
Npm: 8.5.1
OS: Manjaro
Is it a regression? yes, it works with electron in v9.x (--electron-version)

Any news on this?


Remove duplicate setState in TextFormFieldState.reset

Description
TextFormFieldState.reset was calling setState twice.  This removes one call.
Related Issues
Closes https://github.com/flutter/flutter/issues/68997
Tests
None.  It seems impractical to test the number of times setState is called.  If someone disagrees and knows a robust way to do so, let me know and I'll add a test.

@LongCatIsLooong @feinstein Any other ideas  on how to test something like this?  The test that I wrote here passes, but it doesn't catch the problem if I remove the fix.  I would expect that without this fix, there would be 3 builds, but there are still only 2.  Maybe we are batching setState calls under the hood or something like that?

AFAIK setState will mark the widget as dirty, so calling it multiple times wouldn't trigger more builds, just set a variable that's already set.
The minor performance impact that I mentioned is only about running the setState function code itself.

If you really want to test this, maybe you would have to subclass the TextFormField and override setState, adding a counter there? I just wonder if a test like this is useful to be kept in the framework for ever, maybe to avoid regressions? Don't know, just thinking out loud.

Oh sorry didn't see the comments. I think it would be a little weird to write a test to enforce it just here: it's a pretty common practice throughout the codebase. The performance impact would be almost negligible IMO, as the setState call shortcircuits when the element is already marked as dirty. Maybe try to get a test exemption?

agreed. Also the order of the super calling shouldn't make a difference, as setState will be called anyaway. but I think it's nice as it shows the intention.

Thanks for the advice on testing, I have removed my test.

@LongCatIsLooong Ready for re-review.

There's nothing wrong with calling setState multiple times (it doesn't trigger multiple builds).
What we should test is that the various codepaths that call reset() all end up triggering a build. I don't see where setState is being called in this file, maybe it's in the superclass? We should at the very minimum add a comment in the places where we're changing state but not calling setState to say where the setState gets invoked.

@Hixie yes, setState is being called on the superclass.
What I meant with this issue wasn't about triggering build multiple times, it was just a tiny improvement for not calling the function itself, running the asserts on debug and etc. Nothing major like avoiding builds.
I like the idea to document whenever setState is being called by a superclass or other non-visible mechanism.

I've added the comment, good idea.
It seems that reset is only called publicly, and that is already tested in a way that confirms that a rebuild happened.  If anyone thinks I should add any other specific test, let me know.  Otherwise ready for re-review again.


Feature: PayPal Support for CodeWars Red

Feature
Ability to pay for CodeWars Red subscription by PayPal

Is there anyone who would signup for Red only if it supported PayPal? I was looking into this but it turns out I would have to completely redo the payment system if I wanted to support both Stripe and PayPal.

I don't like to use my credit card online and I have not an Alipay account. I upvote the feature.

I would like paypal feature as well

Right now I'm not able to pay with any of my cards, all of them are valid and I use them every day. Not able to login to Alipay at all... Adding PayPal will be great, even if the price will be a bit bigger.

My cards won't work either.

If anyone else is still experiencing this issue, I finally found a card that works: https://www.netspend.com/
It's a pretty terrible card for everything else, but it's the only one I've tried that works for Codewars for some reason.

PayPal is still not supported, but you can now pay with Apple Pay and Google Pay.

Regular credit card is not working for me in Europe.

I'm assuming that was because of SCA:

Strong Customer Authentication (SCA), a rule in effect as of September 14, 2019, as part of PSD2 regulation in Europe, requires changes to how your European customers authenticate online payments. Card payments require a different user experience, namely 3D Secure, in order to meet SCA requirements. Transactions that don’t follow the new authentication guidelines may be declined by your customers’ banks.
https://stripe.com/docs/strong-customer-authentication

I just updated the Stripe integration and it's now compatible. Sorry it took this long to notice.

Is there anyone who would signup for Red only if it supported PayPal? I was looking into this but it turns out I would have to completely redo the payment system if I wanted to support both Stripe and PayPal.

Hi, don't need the options provided by Red, but was about to pay once for 6 month to support Codewars.
but don't use my credit card for automatic recurring payment and still don't pay nearly anything with my credit card outside France online.. so always use Paypal for this sort of things.
now you say that you would have to support two payment system if you add Paypal, but you could also keep just Paypal. so people could pay with Paypal, but also with their credit card on Paypal (without needing a Paypal account).
but of course I will not ask you to change all your system and go to Paypal just for me. the free Codewars is enough for me.
maybe I will find a way to support later..
thanks.

will try another way later, but just to let you know, I just tried to subscribe and was thinking to pay with Google Pay since you mention it, but I'm only proposed to enter a credit card number with no other option.
also tried from my phone to see if the Google Pay option could show only from an android platform, but nothing more..

now you say that you would have to support two payment system if you add Paypal, but you could also keep just Paypal. so people could pay with Paypal, but also with their credit card on Paypal

No, we use Stripe to process payments and manage subscriptions. It's not about supporting credit card payments. Of course, it's possible to abstract billing and support both, but it will require a significant effort and it's not a priority.
For Google Pay and Apple Pay, it'll show up automatically when your environment is supported. It can depend on your browser, OS, region, etc. We don't control that condition, so I can't help you, but we have users subscribed with both.

If I remember correctly, for Google Pay, you need Google Chrome and you need to be signed in to an account with payment information. For Apple Pay, you need to be using Safari.

No, we use Stripe to process payments and manage subscriptions. It's not about supporting credit card payments. Of course, it's possible to abstract billing and support both, but it will require a significant effort and it's not a priority.

I understand, no problem..

For Google Pay and Apple Pay, it'll show up automatically when your environment is supported. It can depend on your browser, OS, region, etc. We don't control that condition, so I can't help you, but we have users subscribed with both.

well, my recent Android Phone with Google Play installed and set should work then..
will try from another computer when back at work (holidays now..).
thanks.


Create codeql-analysis.yml

Hello Alexander @Exkaleburix
Thanks for taking the time to make a PR.
Could you please provide a rationale behind the added value of adding this. As in, what kind of issues can this tools find and do you hope it finds? Did you already run the tool yourself, and if so, did it give interesting feedback? What about false positives? / Is the tool clever enough to understand constexpr magic?
BTW, LGTM seems to migrate to GH. Will that yml be still the right one after Dec '22?
https://github.blog/2022-08-15-the-next-step-for-lgtm-com-github-code-scanning/


JScript and PDF Export

Are there any possible ways to export my dashboard to pdf.
I am trying to use jquery function, but till the time I use

/move to apache/incubator-superset


Create a Utility that has DPI aware mouse movement across screen borders

Description of the new feature / enhancement
Cursors moved across borders of monitors would be DPI aware and not jump to different parts of the screen in physical space while crossing across the border horizontally (or vertically) in digital space.
The user would be able to drag a mouse across multiple different DPI screens and the cursor would move as expected and not in proportion to the DPI.
Scenario when this would be used?
Currently, cursors moving across multiple monitors with different dots per inch (DPI) appear jagged and jumpy at best.
There are many scenarios that would cause users to have multiple different DPI monitors such as a laptop display and an external monitor.
DPI aware mouse movement across screen borders would align the users expected behavior of their mouse to it's actual behavior.
Supporting information
See little big mouse as an example of a project that tried to solve this problem. It appears to no longer be supported.

@ntindle are you on windows 11 22h2?  This should be built in
https://github.com/microsoft/PowerToys/issues/1226 Would be the tracked issue.
/needinfo

That is the best news I heard all day. I’ll update.

/dup #1226

Not going to @ you since you’re probably super busy but that was a great shout. Really appreciate it. Workflow improved 400%

Glad I could help


Nested Hashtable unexpected behaviour on Add

One of my scripts is using a hashtable for settings for different environments and does a discovery of additional services if the setting is "all" (tried other values for that, no change).
In case of "all" the newly added hashtable will contain the default-values that are stored in the "all"-hashtable of the proper level.
The hashtable could instead of "all" also contain specific names for the environments or services in those. It's not always "all"...
So, when my script adds a new nested hashtable, that's a copy of the nested "all"-hashtble of that level the newly added nested hashtable is added to all hashtables of that level. Which is a weird behaviour imho...
Or I'm doing it wrong...
Steps to reproduce
$hashtable = @{
    "all" = @{
        "all" = @{
            "all" = @{
                value = 4000
            }
        }
    }
}

$hashtable.Add("env1", $hashtable.all)
$hashtable

#    Name                           Value
#    ----                           -----
#    env1                           {all}
#    all                            {all}

$hashtable.env1.Add("subenv1", $hashtable.env1.all)
$hashtable

#    Name                           Value
#    ----                           -----
#    env1                           {subenv1, all}
#    all                            {subenv1, all}

Expected behavior
Only add the new hashtable to the one I run the add-method on

Actual behavior
The new hashtable is added to all hashtables

Environment data
Name                           Value
----                           -----
PSVersion                      7.0.3
PSEdition                      Core
GitCommitId                    7.0.3
OS                             Microsoft Windows 10.0.18363
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

Looks like I added my comments to the wrong part and it got removed....
One of my scripts is using a hashtable for settings for different environments and does a discovery of additional services if the setting is "all" (tried other values for that, no change).
In case of "all" the newly added hashtable will contain the default-values that are stored in the "all"-hashtable of the proper level.
The hashtable could instead of "all" also contain specific names for the environments or services in those. It's not always "all"...
So, when my script add a new nested hashtable, that's a copy of the nested "all"-hashtble of that level the newly added nested hashtable is added o all hashtables of that level. Which is a weird behaviour imho...
Or I'm doing it wrong...

Looks like I have problems with Reference-Types.... The add copies the reference and not the values, so when I change the new env1 I change both as both are pointing to the same memory address...

You can use .Clone() to copy the hashtable you're wanting to copy, but it only copies one level deep.
For nested hashtables you want to copy, you'll need to create a recursive cloning function, I think.

I actually tried the clone and it copies all nested hashtables and not only one level.... So that looks it that'll solve my problem!
Thanks @vexx32


Need to migrate the Dispute Resolver Front-End for v2 ?

Migration of resolve.kleros.io to be compatible with the v2 DisputeResolver.sol contract.

yes, done -> https://github.com/kleros/dispute-resolver/issues/125

https://kleros-v2-resolver.netlify.app/


Revert "chore: add semgrep"

Reverts finisterra-io/terraform-aws-autoscaling-group#4

This PR is included in version 1.0.3 :tada:


feat: chainsync API support

This creates a /chainsync/sync API websocket endpoint that will provide block and rollback events from the specified point on the chain
Fixes #26

$ curl -s -N -i -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Sec-WebSocket-Key: hNTJPWxbBam9qMO5hNad7w==" -H "Sec-WebSocket-Version: 13" 'http://tc2:8080/api/chainsync/sync?slot=121654885&hash=716f35dd9a50d1c0fbfd58e29c8b2b8eba9df75e3c69fd40d62a3b0f5830d8be' --output -
HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: yk8Ywa/7fXXtuN1lnXV/7B5kHUI=

�~�{"type":"chainsync.rollback","timestamp":"2024-04-15T17:50:51.175515492-05:00","payload":{"blockHash":"716f35dd9a50d1c0fbfd58e29c8b2b8eba9df75e3c69fd40d62a3b0f5830d8be","slotNumber":121654885}}
�~�{"type":"chainsync.block","timestamp":"2024-04-15T17:50:51.182298331-05:00","payload":{"blockBodySize":4343,"issuerVkey":"53215c471b7ac752e3ddf8f2c4c1e6ed111857bfaa675d5e31ce8bce","blockHash":"37ebbe6fcf90ccdfc9830c41434d2f9a28f966085c409741e1da63d79f71dd94","transactionCount":4}}
...


Everyone is gray

Ideally players can choose a color that isn't being used by another player. But it's supposed to randomly assign a color to each player, and it's currently not seeming to do that!
I think I recently changed the syncing of player data which might've moved the index number?

Potentially related- everyone is a scientific prodigy!


Expose json serialization of schemas

Description of changes
As far as I can tell, the json format for schemas is stable. So, this PR exposes methods to print and pretty-print json strings from schemas. I ran into this while writing my first cedar code in rust.
Checklist for requesting a review
The change in this PR is (choose one, and delete the other options):

[ ] A breaking change requiring a major version bump to cedar-policy (e.g., changes to the signature of an existing API).
[x] A backwards-compatible change requiring a minor version bump to cedar-policy (e.g., addition of a new API).
[ ] A bug fix or other functionality change requiring a patch to cedar-policy.
[ ] A change "invisible" to users (e.g., documentation, changes to "internal" crates like cedar-policy-core, cedar-validator, etc.)
[ ] A change (breaking or otherwise) that only impacts unreleased or experimental code.

I confirm that this PR (choose one, and delete the other options):

[x] Updates the "Unreleased" section of the CHANGELOG with a description of my change (required for major/minor version bumps).
[ ] Does not update the CHANGELOG because my change does not significantly impact released code.

I confirm that cedar-spec (choose one, and delete the other options):

[x] Does not require updates because my change does not impact the Cedar formal model or DRT infrastructure.
[ ] Requires updates, and I have made / will make these updates myself. (Please include in your description a timeline or link to the relevant PR in cedar-spec, and how you have tested that your updates are correct.)
[ ] Requires updates, but I do not plan to make them in the near future. (Make sure that your changes are hidden behind a feature flag to mark them as experimental.)
[ ] I'm not sure how my change impacts cedar-spec. (Post your PR anyways, and we'll discuss in the comments.)

This fixes existing issue #500.  I think we should consider some of the questions mentioned in #500 before merging this (because changing the behavior later might be difficult or painful for folks relying on it).  Specifically, it would be great to leave default-valued fields implicit, rather than explicitly writing the value of every default-valued field, which I think this implementation will do (although I could be wrong).

Given the scope of changes needed to make this work, closing this PR for now. Updated #500


bump SU to version 2

Tests pass and this package is not yet widely used, I think it's worth merging now without further compatibility verification. Happy to release a new version of SymbolicLimits, too, if you would like.

oh just bumped it


faux stream

I get the feeling readdirp is more like an event emitting buffer than a stream, and this masquerade is the underlying issue behind all current issues, some of which are significant.
The basic idea of a readable stream is to generate & provide data from an underlying source as it's required by a consumer.
The core principle of readdirp is to walk the fs and buffer the objects, emitting events as each is identified. Notably the readdirp stream implementation:

sets highWaterMark to infinity which is the antithesis of a stream.
noops _read which is usually used to notify the stream that it needs to harvest data from the underlying source. There's no use for it in this implementation because readdirp just keeps reading until paused.

That might be fine because it still kind of quacks like a stream, but because the core code wasn't designed to behave as a stream, enhancements to better emulate stream-like behavior will cause problems.
Case in point, in order to emulate backpressure without using _read (because that would be very difficult with this code base) PR  #32 implements a setImmediate loop when the stream is paused (not being consumed). That may be satisfactory if your consumer is cpu intensive. If your consumer is not cpu intensive (like working with a http api, uploading files.. whatever) then this setImmediate loop is going to consume 100% cpu time while it's doing nothing waiting to unpause. This particular issue is causing #48.
The other open issues #35 (parallelism) and #31 (backpressure) are clearly related to these problems.

@leviwheatcroft what is your main idea? What should we do exactly?

WIP in gh-54


Video-Source buffer-out videoconverter must support - dsl_component_gpuid_get/set services.

Merged into v0.27.alpha branch


feat: added new contribution

Please resolve the merge conflicts and update the PR.  @Gaurav-Verma07

Congrats 🎉, your PR got merged. To be eligible for the swags from iNeuron X ClueLess. Follow this steps.

SignIn / SignUp in ClueLess Website.

Go to profile section from the top right hand corner.

Comment your profile URL under this comment tagging the person who merged your PR.

That’s it. Follow the leaderboard !
And don’t forget to share your achievement with your friends.
@Gaurav-Verma07


Up arrow edit

This adds up arrow editing to the input box. Only works if there's nothing in the input box

[ ] I need someone to send me a ton of messages so i can test the scroll-into-view behavior

other than that this is ready to look at @keybase/react-hackers


Release 1.2!

We've had quite a few features/bug fixes go in since v1.10. Let's cut a v1.2.0 this week.
What do people think about tomorrow the 14th? Any last minute things to get in?

+1

+1

release v1.2.0 is out we can close this issue


Improve best type matching for elementwise elaborations

fixes https://github.com/microsoft/TypeScript/issues/57541
This PR improves error locations for elementwise error elaborations in a couple of situations. It often finds a better property candidate for the printed error - so the highlighted error is way closer to the actual problem, and it's easier to focus on it. At times, when finding a candidate property when previously it couldn't find any, it also reduces the error span - which is also less distracting.

@typescript-bot perf test this


⚠ AGEG website (redirect) has degraded performance

In eabd882, AGEG website (redirect) (https://ageg.ca/) experienced degraded performance:

HTTP code: 200
Response time: 4227 ms

Resolved: AGEG website (redirect) performance has improved in bbab596.


Set eregs_core to be an optional app

eregs_core not being optional was preventing the local server from running if one's DEPLOY_ENVIRONMENT var was set to build (which mine was, having used it for testing the new Ask CFPB a couple months ago) and one didn't have eregs_core installed.
Changes

Adds eregs_core to OPTIONAL_APPS instead of INSTALLED_APPS

Testing

On master, set your DEPLOY_ENVIRONMENT env var to build and try to run the server.
Observe it failing to find eregs_core.
Pull fork
Run server

Checklist

[x] PR has an informative and human-readable title
[x] Changes are limited to a single goal (no scope creep)
[x] Code can be automatically merged (no conflicts)
[x] Code follows the standards laid out in the development playbook
[x] Passes all existing automated tests
[x] New functions include new tests
[x] New functions are documented (with a description, list of inputs, and expected output)
[x] Placeholder code is flagged
[x] Visually tested in supported browsers and devices
[x] Project documentation has been updated
[x] Reviewers requested with the Assignee tool :arrow_right:

I'm merging this since I believe @Scotchester is OOO today.