Comlink C#

Hi @amaitland,
I saw you starred my project thanks!
I hope you don't mind me asking for a bit of help here.
I have a few issues with trying to implement the sending / receiving of messages.
currently this is my implementation
using System;
using CefSharp;
using Comlink.Core;

namespace Comlink.CefSharp
{
    public class CefSharpWindow : IWindow
    {
        private readonly IWebBrowser _window;
        public CefSharpWindow(IWebBrowser window)
        {
            _window = window;
            _window.JavascriptMessageReceived += (s, a) =>
            {
                // TODO(Chris Kruining) Properly handle the message
                Message?.Invoke(a.ConvertMessageTo<String>());
            };
        }

        public void Start()
        {
            throw new NotImplementedException();
        }

        public event Action<String> Message;
        public void PostMessage(String message, params ITransferable[]? transferables)
        {
            // TODO(Chris Kruining) Send message to _window
        }
    }
}

As you can see, I have 2 TODO's in here, and for both I'm unsure on how to solve them. Because if I cast the message to a String, do I get the unparsed message sent by the page? And how would I go about sending a string to the page.
And can I support transferable object as the postMessage specs say in any way?
Thanks in advance :D

Because if I cast the message to a String, do I get the unparsed message sent by the page?

The ConvertMessageTo is used to create a POCO.
By string are you meaning getting the data as JSON? Calling JSON.stringify on the object that you pass to PostMessage is probably the simplest option if you are after JSON.

And how would I go about sending a string to the page.

Can you be more specific? Send it to where exactly? Call a javascript function? Fire a javascript event?

And can I support transferable object as the postMessage specs say in any way?

In the context of your project what exactly are you calling a transferable? How exactly are you picturing this to work?
I'm never actually used Comlink, only read about it so assume I know nothing 😄

The ConvertMessageTo is used to create a POCO.
comlink does indeed serialize the messages into JSON strings, I forgot for a sec this is not spec-based, just convention :P. Does this mean my ConvertMessageTo<String> is the right call here, because the listeners of the Message event do expect a JSON string.

Can you be more specific? Send it to where exactly? Call a javascript function? Fire a javascript event?
I suppose firing a JS event would be the most simple solution.

In the context of your project what exactly are you calling a transferable? How exactly are you picturing this to work?
MDN postMessage docs => I'm referring to the transfer argument.

Again, thanks in advance for your time and effort!!!

Simply casting the Message property to a string should be sufficient if the message is already JSON. http://cefsharp.github.io/api/85.3.x/html/P_CefSharp_JavascriptMessageReceivedEventArgs_Message.htm

I suppose firing a JS event would be the most simple solution.

Calling a function would likely be the simplest solution,  if you wish to setup an event then you'd need some JavaScript like https://developer.mozilla.org/en-US/docs/Web/API/EventTarget#Example
Fundamentally you'd use ExecuteScriptAsync or EvaluateScriptAsync to call your function or dispatch your event.
https://github.com/cefsharp/CefSharp/wiki/General-Usage#1-how-do-you-call-a-javascript-method-from-net

MDN postMessage docs => I'm referring to the transfer argument

I'm aware of what transferable means in the context of webworker PostMessage. If commlink c# had documentation what would it define a transferable as?

What types are supported?
What are some typical use cases?

Is a sequence of Transferable objects that are transferred with the message. The ownership of these objects is given to the destination side and they are no longer usable on the sending side.

Say you pass an arraybuffer to commlink, what type does that map to in .Net? Are you creating a custom type? You are crossing a process boundary, so the data will need to be sent between processes.

Simply casting the Message property to a string should be sufficient if the message is already JSON. http://cefsharp.github.io/api/85.3.x/html/P_CefSharp_JavascriptMessageReceivedEventArgs_Message.htm

Ok, thanks!

Calling a function would likely be the simplest solution, if you wish to setup an event then you'd need some JavaScript like https://developer.mozilla.org/en-US/docs/Web/API/EventTarget#Example
Fundamentally you'd use ExecuteScriptAsync or EvaluateScriptAsync to call your function or dispatch your event.
https://github.com/cefsharp/CefSharp/wiki/General-Usage#1-how-do-you-call-a-javascript-method-from-net

Ok, I'll look into this, I was hoping I could achieve this without having to inject JS, but no biggie at all. Do you racon overriding the window.parent would be a good idea? Because that would be the postMessage target in my case, but I don't know if that would do more harm than good.

I'm aware of what transferable means in the context of webworker PostMessage. If commlink c# had documentation what would it define a transferable as?

Exactly the same as the postMessage docs, Comlink doesn't do anything with or to them, just passes them through. Comlink is "just" a serialization/deserialization abstraction layer for the message parameter of postMessage.

Say you pass an arraybuffer to commlink, what type does that map to in .Net? Are you creating a custom type? You are crossing a process boundary, so the data will need to be sent between processes.

Honestly no clue, I'd say whatever type is defined in C#, as an arraybuffer (ar any transferable for that matter) is just a block of memory. so the whole point of them is to "only" transfer onwership and don't do any serialization. But I wonder if this would even be feasible for cefsharp to implement (would it even be possible for cefsharp, or would this need to be escalated to cef?).
A quick somewhat off-topic side-thought, Would you recon that implementing flatbuffers be possible assuming the above mentioned transferables work?

Exactly the same as the postMessage docs, Comlink doesn't do anything with or to them, just passes them through. Comlink is "just" a serialization/deserialization abstraction layer for the message parameter of postMessage.

Whilst the method might be called the same as that's the convention the CefSharp implementation sends an IPC message that crosses a process boundary, and two different runtimes (and three different programming languages). The JS implementation of postMessage is moving memory around within the V8 engine (may even just be moving pointers around at the end of the day).

Honestly no clue, I'd say whatever type is defined in C#, as an arraybuffer (ar any transferable for that matter) is just a block of memory. so the whole point of them is to "only" transfer onwership and don't do any serialization. But I wonder if this would even be feasible for cefsharp to implement (would it even be possible for cefsharp, or would this need to be escalated to cef?).

Perhaps you can use CefV8Value::CreateArrayBuffer in conjunction with a shared section of memory. Not something I've tried. You can ask on https://magpcss.org/ceforum/index.php and see if anyone else has attempted something similar in the context of CEF.
If we look at other types like MesagePort, how does that behave you if you were to transfer it?

A quick somewhat off-topic side-thought, Would you recon that implementing flatbuffers be possible assuming the above mentioned transferables work?

Not sure.

Whilst the method might be called the same as that's the convention the CefSharp implementation sends an IPC message that crosses a process boundary, and two different runtimes (and three different programming languages). The JS implementation of postMessage is moving memory around within the V8 engine (may even just be moving pointers around at the end of the day).

I had my suspicions this would be the case, but non the less the same question. Do you think it is feasible to add this to cef&cefsharp. Or would this add to many edgecases and/or security risks?

Perhaps you can use CefV8Value::CreateArrayBuffer in conjunction with a shared section of memory. Not something I've tried. You can ask on https://magpcss.org/ceforum/index.php and see if anyone else has attempted something similar in the context of CEF.

I'll look into this, thanks!

If we look at other types like MesagePort, how does that behave you if you were to transfer it?

in terms of JS between a page and a worker, it would be as if the MessagePort is created locally in the worker. But I must admit I never explicitly done this, so I'm afraid I can't give a proper answer. Maybe Surma from Google is willing to chime in here (assuming he knows the answer).
I hope I'm not bothering you with these strange use-cases, thanks for your input thus far :D

. Do you think it is feasible to add this to cef&cefsharp.

Maybe for ArrayBuffer, though that's really a big maybe at this point in time. CEF only supports ArrayBuffer at the moment (and that support is a little limited).
The other transferable object types it's not clear what the use case would actually be. It's not clear how the MessagePort, ImageBitmap and OffscreenCanvas would be useful if transferred into .Net (if such a thing was actually possible). I could see that perhaps you might wish to proxy calls to them from .Net.

I hope I'm not bothering you with these strange use-cases

It's an interesting idea 😄

The other transferable object types it's not clear what the use case would actually be. It's not clear how the MessagePort, ImageBitmap and OffscreenCanvas would be useful if transferred into .Net (if such a thing was actually possible). I could see that perhaps you might wish to proxy calls to them from .Net.

well, maybe we could take a less literal aproach here;
MessagePort -> set's up parallel postMessage channels.
ImageBitmap -> move an image from side A to B or vice versa
OffscreenCanvas -> basically a glorified image stream.
I mean, it wouldn't as fast as just moving around a pointer, but transferring binary data seems at the least possible to me. Or am I thinking way to naïve here?

Yes you can copy the data. Do you have a real world application for transferable at the moment? I think attempting to use it in real life would give you a better sense of how what the actually implementation should look/behave like.

Sorry for the late reaction.
I don't have an example, that's what makes this whole thing hard for me as well.
Or at least, Comlink internally sets up MessagePorts, but I have no clue if that would be something we need to cover on the C# side.

Moving conversation to new discussions section, maybe a little bit of noise.


Derive keys with the appropriate curves rather than secp256k1

This should possibly be marked wip; I haven't checked that this works in a real app yet.

I tried doing ECPublicKey generation using the Ed25519 curve. Everything works good on speculos and NanoS, but somehow the app crashes on S+.
I have figured out that the crash happens at cx_ecfp_generate_pair_no_throw API.
I have even tried adding cx_ecfp_init_private_key_no_throw API, though it did not resolve the crash.
As the crash happens only on S+, it seems that the issue is perhaps not in nano_sdk.

Hi, thanks for these modifications.
I undrestand the current status of bip32_fill does not cover all paths, but I think passing self.curve to the derivation will not work for curves other than Ed25519 or Secp256k1 and r1.
The SDK can be tested through speculos with a cargo test --features speculos and those fail with that modification (I know I should document this, apologies. It can't be run in the CI yet)
My second concern is that the temporary key buffer is not wiped on drop, which is something we'd like to do to meet our security guidance.

@yhql Maybe there is a way to make then at least support for what exactly works, not just for Secp256k1?

Hello @jonored, I reworked that part a bit to essentially apply your fix and more, and get rid of future potential mishaps in https://github.com/LedgerHQ/ledger-nanos-sdk/pull/62
Do you mind if I merge the above instead (if it indeed does what you expected) ?

@yhql Looks good to me, feel free to drop this one. I'm certainly not going to object to getting jobs done with straightforward traits, I just might not get to making a nice one for a bugfix.


Corrects wrong method name in warningtext LogDefaultDecimalTypeColumn

The warning produced by EFCore.SqlServer when not explicitly define precisions for decimals did suggest the usage of the wrong Fluent API method-name. This commit corrects the method name in the warning from ForHasColumnType() to HasColumnType().
Fixes #12041

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: riscie sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

@riscie - Thank you for contribution.


blame_file can't find file in tree even if it exists

operating system: ms windows 10
git2 version 0.10.0
When ever blame_file is ran for the repo on for any given file changed it always error
$> cargo r -- main.rs
thread 'main' panicked at 'Error { code: -3, klass: 14, message: "the path \'main.rs\' does not exist in the given tree" }',

$> cargo r -- ../README
thread 'main' panicked at 'Error { code: -3, klass: 14, message: "the path \'..\' does not exist in the given tree" }'

$> cd .. ; cargo r -- README
ran successfully

where as git blame shows blame correctly
the code is
let repo = Repository::discover(&filename).ok()?;
let mut blame_option = BlameOptions::new();
//blame_option.track_copies_any_commit_copies(true);
blame_option.track_copies_same_file(true);
//blame_option.track_copies_same_commit_moves(true);
let blame = match repo.blame_file(Path::new(filename), Some(&mut blame_option)){
   Ok(b) => {println!("ran sucessfully"); b},
   Err(e) => panic!("{:?}", e),
};

I think the path taken by blame_file is relative to the root of the repo (it should also only contain forward slashes).  That is, you would need to rewrite the path passed in on the command-line to be relative to the root of the repo (like src/main.rs instead of just main.rs).


Additional API Support, Consistency Rework, Standardization and Best Practices

Hi @adamdriscoll - as I mentioned on Twitter, I had been doing some work to add additional functionality to your awesome module.
Unfortunately, it may have got a bit out of hand as I pulled in a lot of the practices and standards we use over in the Microsoft DSC Resource kit. So feel free to reject this PR as it is well beyond what you'd normally expect in a PR. I have absolutely no problem with this and will completely understand :grin:. This is terrible GitHub etiquette from me.
Extended Cmdlet Features: My original intent was just to implement the VSTS Release functions, but this required some extensions to the Invoke-VstsEndpoint. This led to some refactoring to break the cmdlet up (it started to get larger and unit tests were going to start being a pain to create if I left it that way). This enabled me to expose filtering and other options/parameters in the other cmdlets. So I extended many Get cmdlets with various filters as well as controlling the order.
I also ensured all cmdlets used consistent parameter patterns (both the session object and connection parameters). Sorry, I'm a bit OCD about consistency as it improves discoverability I think :grin:.
Help: The help was also missing mostly, so I've started adding help to almost all of the cmdlets - but I'm not quite finished - some still need examples.
Split Module File: All of this rework, resulted in the module file size getting a bit hard to manage, so I used the standard practice of breaking it up into *.ps1 files in the libs folder. I broke these up with the same structure that the tests files were broken up. So that made a bit of sense.
Automated Testing: I also felt with all this rework/refactoring that I needed to improve the tests, so I've begun (but not completed) improving the story coverage for the integration tests. I'll be working on unit tests next.
The AppVeyor.yml was also installing Pester from Chocolatey, which is a very old version and didn't support the newer test structure I have used (nested contexts) - so I have updated to use Pester from PSGallery.
CodeCov.io: As part of this I added support for CodeCov.io (https://codecov.io/gh/PlagueHO/VSTSPosh) to evaluate the integration test coverage - but once there are some unit tests I can combine the unit test coverage in. I used the code and methodology we developed for the DSC Resource Kit to do the CodeCov stuff.
PSScriptAnalyzer in Tests: The PSSA part of CI was broken as well, so I copied over the methodology we use in the DSC Resource Kit (errors trigger failure, warnings are displayed). This highlighted a few PSSA errors which I've fixed. I've also fixed most of the flagged warnings (a few still exist but they don't cause the CI to fail).
Style: As there wasn't any style guidelines in the project and there was some inconsistency across it I went with the ones the Microsoft PowerShell DSC Team uses. There was also a mix of tabs and spaces for indent - so I've standardized on spaces. I also created a VS Code workspace settings file so that VS Code will automatically format code to these style guidelines (I'm sure VS has similar but I haven't been using VS for PS lately so am not sure).
CI: There were a number of improvements I made to this process to give a bit more flexibility and allow the process to actually work on my machine and in AppVeyor (e.g. Invoke-Tests now works correctly regardless of AppVeyor or local. I also moved all the CI related code to the CI folder as the root folder was getting bloated.
ChangeLog/Readme.md: There wasn't a change log so I've created one and logged all the changes I've been making (see that file for more detail on my changes). The readme.md was a bit out of date so I've updated that.
BREAKING CHANGES: Unfortunately there are a couple of breaking changes in my version. They are listed in the CHANGELOG.MD. I did this so that all the cmdlets were consistent and the names matched the API. However, most cmdlets do not have any breaking changes. So on the off chance that you do accept this PR, I'd definitely suggest kicking the version to 2.0 (as per semver).
Anyway, that about covers it. I'm going to continue to work on this module as I think it is really awesome (and I have a few teams using it - but our automation currently clones it directly from my repo - I'd much rather it come from PS Gallery).
If you're not up for accepting my changes, perhaps I could looking at releasing this as an alternate version (with all credit to you of course). At the end of the day, I just need the features :grin: and I really enjoy working on something that is not PowerShell DSC Resource Kit related! Cheers.

This change is

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@dffe34f). Click here to learn what that means.
The diff coverage is 1.69%.

@@           Coverage Diff            @@
##             master     #34   +/-   ##
========================================
  Coverage          ?   1.69%
========================================
  Files             ?       6
  Lines             ?     412
  Branches          ?       0
========================================
  Hits              ?       7
  Misses            ?     405
  Partials          ?       0

Impacted Files
Coverage Δ

lib/Releases.ps1
0% <0%> (ø)

lib/Builds.ps1
0% <0%> (ø)

lib/Code.ps1
0% <0%> (ø)

lib/Workitems.ps1
0% <0%> (ø)

lib/Projects.ps1
0% <0%> (ø)

VSTS.psm1
10.93% <10.93%> (ø)

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 dffe34f...6a4befa. Read the comment docs.

This is an amazing PR. I will pull this in and get it into the Gallery. Let's continue to work together on this. I haven't spent any time working on this module recently but would love to help continue improve it.


[Menu] "Copy Math As"

This should be easy to do and it would aid certain workflows immensely. Currently, if I want to get the LaTeX code for some given MathJax expression, I need to right click > Show Math As > TeX Commands, then go to the new window, select all, copy paste, and close the window.

As an enormous shortcut to that, there could be a Copy Math As entry below Show Math As in the context menu. This entry would have the same sub-entries as Show Math As, except that instead of opening a new window to display, it would simply output directly into the clipboard.

Thanks for the feature request.
It's already mentioned in #1117, actually, assuming you're thinking of the Clipboard API or clipboard.js which seems ready for production since Safari 10 was released.

If someone wants to contribute, this shouldn't be hard to implement as a third party extension and then turned into a PR down the road.

This functionality is available in v3.


Usability

Have you considered any simplifications or changes to the workflow? Currently, the minimum input is this:
scour -i /path/to/file.svg -o /path/to/newfile.svg

However, would it not be possible to imply the -i and -o by default? Like this:
scour /path/to/file.svg /path/to/newfile.svg

In addition and/or alternatively, why not make -o optional and automatically write the new file to the same directory, appended with a number, date and/or keyword to the file?
scour /path/to/file.svg

Ideally, I just want to type scour and drag and drop into the CLI. Moreover, I would actually like to see an option for scrubbing multiple files at once.
scour /path/to/file.svg /path/to/file2.svg /path/to/file3.svg

Any thoughts?

Without having looked at the code and therefore the feasibility of the implementation I'd vote in favor of using  "unnamed"  command line parameters as input/output file names to save the -i and -o which is default for most command line programs.
I'd not recommend to add a suffix to the input file name in case the user omits an output file name since an "arbitrary" suffix is likely not to match the users requirements.
What we could think about is overwriting the input file if no output file name is specified but this might result in really ugly scenarios of data loss, so maybe we should just stick to the current behavior and require the user to provide a valid output file name.

I'd not recommend to add a suffix to the input file name in case the user omits an output file name since an "arbitrary" suffix is likely not to match the users requirements.

But it would be better than overwriting the input file, which I cannot recommend, based on my own experience with this program and others. Using an, as you call it, arbitrary suffix would be acceptable when the user does not define an output file name themselves. There could even be a default option for this. I’m just more concerned with easy drag and drop. :)

This was fixed in 72c2ec8e1c788ce879155bc0defa9d2fe552cecf.
Scour still requires you to specify an output file name, otherwise output is written to stdout (so you could pipe or redirect it)

I use this bash command to workaround scour's hesitation to overwrite input file:
for file in *.svg; do scour -i "$file" -o "$file"opt; mv -- "$file"opt "$file"; done

It cleans all the SVG files in current folder (not recursive though) and renames scour's output files to overwrite the original ones. In case if anybody needs it, this is the full command with all the scour options I use:
for file in *.svg; do scour -i "$file" -o "$file"opt --set-precision=5 --renderer-workaround --enable-viewboxing --indent=space --nindent=2 --strip-xml-space --enable-id-stripping --protect-ids-noninkscape; mv -- "$file"opt "$file"; done

An option to replace the input file is currently tracked in #129.

@Ede123  That's good news! :smiley:
If implemented, would simplify my command into:
for file in *.svg; do scour "$file" --in-place; done


ci: Fixing actions and coverage

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

Please upload report for BASE (main@c5c0993). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #11   +/-   ##
=======================================
  Coverage        ?   96.01%
=======================================
  Files           ?        6
  Lines           ?      602
  Branches        ?        0
=======================================
  Hits            ?      578
  Misses          ?       24
  Partials        ?        0

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


Add manifest-generator plugin

manifest-generator plugin described here:
https://github.com/ArthurHlt/plugin-cf-manifest-generator

I did this project on my free time, so it's not affiliated to my company (Orange). Is that ok with the CLA ?

There is no problem with the CLA since this is not a direct contribution to the Cloud Foundry codebase.

Great, thank you


Error querying server: invalid character 'N' looking for beginning of value

Hi
I wanted to get the metrics using cli and tried this tool but getting error as below:
./prometheus_cli -server="http://<IP_ADDRESS>:9090" metrics
Error querying server: invalid character 'N' looking for beginning of value

Also it would be nice to see few of the memory or cpu query examples with time duration line 2 days back or ranges of time.
Thank you

This cli isn't supported anymore. The only supported cli is promtool: https://manpages.debian.org/testing/prometheus/promtool.1.en.html


Sketch is drawing a box for all Subjects (S) in a dataset

Sketch is drawing a box for all Subjects (S) in a dataset. I had issues with that.
<A> a <B>. was not drawing a box. That is not a huge issue. But I had this issue.
<A_Node> a <SomeClass> .
<A_PropertyShape> sh:targetClass <SomeClass> .

Sketch is drawing Box <A_Node> and <A_PropertyShape> but not <SomeClass>. In this cases you cannot see that there is a connection between <A_Node> and `<A_PropertyShape>.
I use sketch to visually verify CONSTRUCT Query output.

I tested the following implementations:

The boxes shown are all Subjects in the Dataset (current solution)
The boxes are all Subjects and Objects if the object is a B-Node or a NamedNode.
The boxes are all Subjects and Objects if the object is a B-Node or a NamedNode but not if the predicate is rdf:type

Solution 2 leads to unexpected many boxes and arrows. In my example i had 140% more arrows and boxes. To reduce this i tested it with 3. Boxes are shown for all subjects and objects if the object is not only rdf:type. This reduces the amount of boxes.
I changed the implementation to 3 to solve the issue above with the property shape. And it's a balance between readability of the sketch graph and to perfect triple representation.


Chrome fails to lauch on nodejs 14.15.4

Seems to be the same as what is described for nodejs 14.0
https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#chrome-is-downloaded-but-fails-to-launch-on-nodejs-14
But this is node 14.15.4   (Has there been regression or is there maybe some other problem?)
Thank you.
Steps to reproduce
install nodejs (14.15.4) on alpine image
(using asciidoctor/docker-asciidoctor)

Puppeteer version: 7.1.0
Platform / OS version:  Alpine linux edge
URLs (if applicable):
Node.js version: 14.15.4

What steps will reproduce the problem?
Please include code that reproduces the issue.
image: asciidoctor/docker-asciidoctor
variables:
  OUTPUT: book
  DOC: ${OUTPUT}
  DIR: "_build"
  OUTPUT_FOLDER: "--destination-dir=${DIR}"
  STYLE: "-a stylesheet=./_resources/css/${OUTPUT}.css"
  TEMPLATE: "--template-require=./_resources/js/${OUTPUT}.js"
  HTML: "--backend=html5 -a max-width=55em"
pdf:
  stage: build
  script:
    - apk add --update npm
    - npm i -i
    - node --version
      #- npm i -i @asciidoctor/core asciidoctor-pdf puppeteer
    - npx asciidoctor-web-pdf ${STYLE} ${TEMPLATE} ${OUTPUT_FOLDER} --out-file=${DOC}.pdf ${DOC}.adoc

What is the expected result?
Chromium runs
What happens instead?
$ npm i -i
><EMAIL_ADDRESS>install /builds/diarrayouss2/contes_africains/node_modules/asciidoctor-pdf/node_modules/puppeteer
> node install.js
Chromium (818858) downloaded to /builds/diarrayouss2/contes_africains/node_modules/asciidoctor-pdf/node_modules/puppeteer/.local-chromium/linux-818858
><EMAIL_ADDRESS>install /builds/diarrayouss2/contes_africains/node_modules/puppeteer
> node install.js
Chromium (848005) downloaded to /builds/diarrayouss2/contes_africains/node_modules/puppeteer/.local-chromium/linux-848005
...
...
$ npx asciidoctor-web-pdf ${STYLE} ${TEMPLATE} ${OUTPUT_FOLDER} --out-file=${DOC}.pdf ${DOC}.adoc
Unable to generate the PDF - Error: Error: Failed to launch the browser process! spawn /builds/diarrayouss2/contes_africains/node_modules/asciidoctor-pdf/node_modules/puppeteer/.local-chromium/linux-818858/chrome-linux/chrome ENOENT
TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

Also does not work on 14.16. Did you find a solution?

Let me get back to this....   But just in the mean time.  Yes I did get it to work.  I believe it was switching the base container image from Alpine to Fedora minimal.  Was there something else?   Not sure at this point.


This was made in a separate branch with slightly cleaner commmits. I don't know that this is necessarily the way you would have implemented it, so if you want any changes just let me know and I'll take care of them.

 You should try out the hot reloading with npm run start or try out the redux dev tools with ctrl-shift-i - these actions seem like they would work well with the "time-travel" debugging.
There are a couple of places we could look at removing duplication (CursorLineRenderer / CursorColumnRenderer are exactly the same - we could move that to a shared class or just reuse CursorLineRenderer for both). It seems like there are a few lint issues to clean up, but the overall change looks good. Thanks for making the change, this is great!

@extr0py:
Can I just pass in parameters in Root component, i.e
<... />
<CursorLine("line") />
<CursorLine("column") />
<... />

Typescript expects an identifier on those lines, do they need to be assigned to something first?

Yep, a few things you need to do:
First, update mapStateToProps to take an argument. So something like this:
interface ICursorLineProps {
   type: string; // An enum might be better here since we get type safety
}

const mapStateToProps = (state: State.IState, props: ICursorLineProps) => {
     return {
         x: type === "line" ? state.activeWindowDimensions.x : state.cursorPixelX
         y: type === "line" ? state.cursorPixelY : state.activeWindowDimensions.y
         ...
     }
 }

Note that there is actually already an ICursorLineProps so you might want to rename that ICursorLineRendererProps. We basically need two props - one for the rendered component (width, height, color, visible, etc), and the other for the connected component - which is just the type (line/column).  This article has some great information about the difference between these two components: Presentational and Container Components
Second, pass in your argument - it would look like this:
<... />
<CursorLine type={"line"} />
<CursorLine type={"column"} />
<... />

And for bonus points, we could use an enum, so we'd get:
<... />
<CursorLine type={CursorLineType.Line} />
<CursorLine type={CursorLineType.Column} />
<... />

Hope that helps!

Woohoo! Green build is nice to see :) Let me know if you're all set with this and I'll merge it in. The change looks good. Looking forward to switching my config over to this.

This is ready to go when you are, enjoy

Just tested it out - looks great, @bert88sta ! Nice work.


Fixed potential torn reads on 32-bit

I read anywhere that this code isn't threadsafe (which is OK), but the event counters are read from a different thread, so for correctness there shouldn't be torn reads (on 32-bit systems).

Thank you


Fix some very small, formatting issues

During reading, I spot those nitpicks, so I've decided to fix them (probably not all have been spotted by me).

Thanks for the blazing fast code review @weyert 🎉


[Solution] Ionic RC0, forms control and validation

Short description of the problem:
So I was following this great tutorial (http://blog.thoughtram.io/angular/2016/06/22/model-driven-forms-in-angular-2.html) from Pascal on how to build model driven forms using FormBuilder in latest RC0 as I was using it in Beta11, but soon I was stopped with this error
ORIGINAL EXCEPTION: No value accessor for form control with name: 'firstname'
```
I'm using (I think I'm) all by the book, and this is in short what I have in
app.module.ts

import { ReactiveFormsModule } from '@angular/forms';
...
@NgModule({
imports: [
ReactiveFormsModule
]
...

login.ts

import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
export class LoginPage implements OnInit{
registerForm:FormGroup;
constructor(private formBuilder: FormBuilder) {}
ngOnInit() {
this.registerForm = this.formBuilder.group({
firstname: ['', Validators.required],
lastname: ['', Validators.required]
});
}
}
login.html

Firstname:

    Lastname:
    <input type="text" formControlName="lastname" style="border:solid 1px #000;">
   <button type="submit">Submit</button>
</form>

{{registerForm.valid}}

**SOLUTION**

<ion-input [(ngModel)]="test" type="text" formControlName="firstname" ngDefaultControl>
#### What behavior are you expecting?
Use FormBuilder validations with custom form elements from Ionic

**Steps to reproduce:**
1. Use example markup posted above

**Other information:** (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
http://stackoverflow.com/questions/38958347/angular2-rc-5-custom-input-no-value-accessor-for-form-control-with-unspecified
https://github.com/angular/angular/issues/9230

**Which Ionic Version?** 1.x or 2.x
Ionic 2.x

**Run `ionic info` from terminal/cmd prompt:** (paste output below)
Cordova CLI: 6.3.1
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic Framework Version: 2.0.0-rc.0
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
ios-deploy version: 1.8.6
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v5.11.1
Xcode version: Xcode 7.3.1 Build version 7D1014

Hello, thanks for opening an issue with us! After reviewing I am going to close this issue as it seems to be an Angular bug and not an Ionic bug.

It works on browser testing, but it doesn't work when build or emulate

Hey @babyjazz, I removed test variable from my example, it was giving you that error Property 'test' does not exist on type 'ContactPage'. please remove {{test}} from my example and it should build for device/emulator.
d


Ability to upload non-image files

Hi,
The ability to upload non-image files was missing, which rendered the "embed flash" button completely broken.
I've fixed views.py so that it wouldn't assume that the file is an image and also changed the galleriffic filebrowser to display nice file icons for non-image files.
Other minor issues I fixed along the way:

Added i18n support
Fixed filename localisation issues
Fixed the gallery js to consider the image and viewport height when resizing images. (displaying very tall images was broken)

Just tested a PDF upload - looks good! Would be really nice to have this pulled in!

Would be really nice to have this pulled in!!

IMHO: might be nice to add a regex checking the file to see if it really is an image - otherwise this could allow users to upload corrupted images :(

On Sat, Feb 04, 2012 at 07:13:36AM -0800, eamonnfaherty wrote:

IMHO: might be nice to add a regex checking the file to see if it really is an image - otherwise this could allow users to upload corrupted images :(

Not sure a regex would cut it. But of course the file magic
could be checked. In any case, anything allowing arbitrary
uploads is IMO a good deal :)
--
mjt

PIL's Image class has a verify() function that checks if a given file is indeed a valid image.


Tooltips UI

Description
Currently it can be hard to distinguish between tooltips and the background content, since there is not much contrast behind the tooltip. This PR:

Adds a deeper shadow to light mode
Adds a colorful radial gradient to dark mode.
Adds a bottom and top triangle towards the tooltip trigger
Adds a small upwards / downwards animation

Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Dependency changes
[ ] Code refactor / cleanup
[ ] Documentation or wording changes
[x] Other: UI improvement

How should this be tested?
View as many tooltips as possible to ensure none of them have broken and that the padding looks good.
Visual context

Checklist:

[ ] I have performed a self-review of my own code
[ ] I have requested at least 2 reviews (If the PR is significant enough, use best judgement here)
[ ] I have commented my code where relevant, particularly in hard-to-understand areas
[ ] If package-lock.json has changes, it was intentional.
[ ] The base of this PR is master if hotfix, develop if not

Looks great! Just slightly concerned with all the custom CSS, if we can use tailwind as much as possible throughout that, that would be great.

I've removed all custom CSS that can be replaced by Tailwind v2 classes


Questions about script classes - uses / purpose

Hello
Firstly, thanks for putting this library together. I have been following your tutorials and have successfully minted a token!
I have a few beginner questions that I'm hoping you can help with, or point me in the right direction.
Can you tell me, what are the following classes for? What would be a reason to use these?

RequireTimeAfter
RequireTimeBefore
ScriptAll
ScriptAny
ScriptAtLeast

Thanks

@magick93 These classes are used to control the minting policy. Like  who can mint / burn a native asset and when.
ScriptAll, ScriptAny, ScriptAtLeast can be used to create multi-sig policy script. The policy id for the native  asset is generated from the script hash.
Similarly, RequireTimeAfter/Before can be used to create TimeLock script. That means you can only mint a native asset only before/after a certain slot number.
You can check this link for more details https://github.com/input-output-hk/cardano-node/blob/master/doc/reference/simple-scripts.md#multi-signature-scripts

Closing this. Feel free to reopen it if required.


Mb/qmt playground

I played around in a branch with some qMT stuff over the summer, wondering if any of the changes might be useful to the more stable mb/qmt-ismrm branch, so am just making a PR to see the differences for noww.

Ah hmm, seems like this branch used the ihMT branch and not master as the main branch. I don't recall why I did that.

I had these scripts that were fun tests that I could build off of, maybe I wont need to merge this PR and instead just refer to these scripts when building my own in the other branch.


Pattern glob expression excludes root file when applied on .ort.yml

Using Ort master
Applying the following pattern on the below tree results in excluding all but root build.gradle, forcing to add two patterns, one explicitly for root file.
 **/build.gradle inside

testcode
├── app
│   └── build.gradle
└── build.gradle

Maybe this could be solved by using another glob matcher as outlined in my old plexus-globs branch.

One more example for the issue: With the pattern "/examples/" I would like to match all files below any folder called "examples", but this does not match an examples folder at the root. For this another pattern "examples/**" is required.
The problem for this is that there is no leading "/" for the examples folder at the root. A workaround for this would be to match all paths twice, once as they are, and again prefixed with "./". But using another matcher library where this works out of the box would be the better option. @sschuberth Do you have any plans to revive your branch?

I would like to match all files below any folder called "examples", but this does not match an examples folder at the root. For this another pattern examples/** is required.

I'm actually surprised about this. I though supporting this was exactly the reason to switch to Spring's AntPathMatcher in 9632e0e8cc4d15dd142e7bee3bc59a42c8a37475.

Ok, I just created #5156 when I realized that the path exclude logic is not using the FileMatcher class at all, but its own matcher in PathExclude. I'll look into unifying that.

I would like to match all files below any folder called "examples", but this does not match an examples folder at the root.

BTW, if **/examples/** would match an "examples" folder at the root, which pattern would you then use if you only want to match "examples" directories within a sub-directory, but not at the root level?

Ok, I just created https://github.com/oss-review-toolkit/ort/pull/5156 when I realized that the path exclude logic is not using the FileMatcher class at all, but its own matcher in PathExclude. I'll look into unifying that.

FindingCurationMatcher also does not use the FileMatcher for LicenseFindingCurations.

BTW, if /examples/ would match an "examples" folder at the root, which pattern would you then use if you only want to match "examples" directories within a sub-directory, but not at the root level?

In general I think matching all folders should be the more frequent use case, but something like */**/examples/** should work.

In general I think matching all folders should be the more frequent use case, but something like */**/examples/** should work.

I've added #5157 to prove that this indeed works, as it's IMO a requirement, even if it's maybe a less frequent use-case.
So, do we then all agree that with #5157 the FileMatcherTest documents the desired behavior?


Geonames Import

I can't automatically create:
https://www.geonames.org/2653265/chelsea.html
probably because that is not in the geonames-dump. But can that be?

when using the relation forms you can just paste the link to the rdf even if it is not in the dump: https://sws.geonames.org/2653265/about.rdf
Already did this for chelsea: https://pmb.acdh.oeaw.ac.at/apis/entities/entity/place/46895/edit
However, that should be enabled for the simple create form as well. I will addd another issue.


Return Empty data[]

Hi, @Webklex
Thanks for your great work
I am just trying to use this project on my web application
When I try to get the messages in the 'Inbox' folder, it returns empty data[] btw.
Could you explain me what I was wrong?
Here is a code snippet I tried.
$oClient = new Client([
    'host'          => 'imap-mail.outlook.com',
    'port'          => 993,
    'encryption'    => 'ssl',
    'validate_cert' => true,
    'username'      =><EMAIL_ADDRESS>    'password'      => 'secret',
]);
$oClient->connect();
$oFolder = $oClient->getFolder('Inbox');
$aMessage = $oFolder->query()->since('15.03.2018')->get();
var_dump($aMessage);

For now, $aMessage returns empty value: data[]
Thanks in advance for your help.

Hi @Flow999Cloud ,
please take a look at #100 and perhaps the other Outlook related issues.
Outlook seems to be "special" sometimes...
Best regards

Hi, @Webklex
For update, I tried to use "Inbox" instead of "INBOX", but it doesn't work. Actually I have 335 emails in my email account. :)
For update2, I found all folder names using the above code snippet. I can see those are including Inbox, Archive, Trash etc. But when I try to use one of them, those are not working. :(
I'd like to try to use another php imap libraries for time being of the project.
I really appreciate for your help though.
Thanks.


Fixes width transition for ink bar

When tab width is greater than possible amount of tabs - inkbar doing a transition when adjusting width. Left should be only animated property.

Thanks @gabdallah222


Request for APK

Hi, Thanks for the amazing project.
Need your help with two things.

How do i control led strip from the sandUI or cncUI?
Could you provide the apk file for the app?
Thanks.

Hi,
you can download the latest APK file here
Maybe, if you are a good programmer you could help me with the app. I have some issues, see here

Hi,
you can download the latest APK file here
Maybe, if you are a good programmer you could help me with the app. I have some issues, see here

Hi, Thanks for the quick response.
I am afraid I cannot help you with Android app development.
One question I have though, no matter whatever I do whichever files I play, the status on app homepage is always idle.
Is this a bug or did I do something wrong?
Thanks

I don't have any issues with playing a file.
however, you could try a previous version:
Version 1
Version 2
Version 3

Will check with the same.
Thanks.

hi friend, hope you are doing great. friends i am facing a problem that when i gave ip in the app and come back to home page and if my esp32 is connected to the network then my app continuously keep closing. if i turn off the esp32 then app will open perfect but shows disconnected, if i again turn on esp32 then after few sec the app will close automatically, it look like if esp32 and app are connected then app closes. i have not connected any circuit or sd card module to the esp32. esp32 is not yet connected or wired to anything. is that the issue?. i have tried all version of this app like v1, v2, v3, v4...

Hi,
you can download the latest APK file here
Maybe, if you are a good programmer you could help me with the app. I have some issues, see here

hi friend, hope you are doing great. friends i am facing a problem that when i gave ip in the app and come back to home page and if my esp32 is connected to the network then my app continuously keep closing. if i turn off the esp32 then app will open perfect but shows disconnected, if i again turn on esp32 then after few sec the app will close automatically, it look like if esp32 and app are connected then app closes. i have not connected any circuit or sd card module to the esp32. esp32 is not yet connected or wired to anything. is that the issue?. i have tried all version of this app like v1, v2, v3, v4...


Download the lists as txt?

Currently the only thing that can be downloaded directly is the main raw. The lists are so long trying to copypaste them literally makes my browser stop working.  I´ve tried waiting until the page stops loading, but then it is literally frozen in place, if i try to go down the list. I see no other alternative to get these hosts files.

You should have the option of downloading the raw file via the download button:

Another option would be to use my BlackHosts command line tool (instructions on how to use are found at the repository) as is suggested in the Interesting Applications Section in Steven's README.
And yet another option would be to copy the raw link and use either curl in Linux or Invoke-WebRequest in Windows Powershell to download via the command line:
Powershell
Invoke-WebRequest -Uri $("<RAW FILE URL>").Content | Out-File -FilePath .\hosts

Curl in Linux (and possibly Windows if you have the Windows version)
curl -o hosts "<RAW FILE URL>"

and possibly Windows if you have the Windows version

That command works in Windows with no modification:

Thanks

Qood question @Excidiar!  Thank you Ian @Lateralus138 for the assist, and thank you @iam-py-test for the clarification.
Closing!


[Bug]: Remix esbuild fails with "could not resolve" errors for rvf packages

Which packages are impacted?

[ ] @rvf/react
[X] @rvf/remix
[X] @rvf/zod
[ ] @rvf/yup
[ ] zod-form-data

What version of these packages are you using?

@rvf/remix": "^6.0.0"
@rvf/zod": "^6.0.0"

Please provide a link to a minimal reproduction of the issue.
https://private.repo.com
Steps to Reproduce the Bug or Issue
Replaced remix-validated-form with rvf.
Expected behavior
As a user I expected npm run dev to start without errors.
Screenshots or Videos

Platform

OS: Windows
Node v20.16.0
Remix 2.10.3

Browser: N/A

Additional context
Console output after running npm run dev
✘ [ERROR] Build failed with 3 errors:
node_modules/@rvf/react/dist/index.esm.js:5:7: ERROR: Could not resolve "@rvf/core"
node_modules/@rvf/react/dist/index.esm.js:28:7: ERROR: Could not resolve "@rvf/set-get"
node_modules/@rvf/zod/dist/index.esm.js:2:32: ERROR: Could not resolve "@rvf/core" [plugin css-bundle-plugin]

    app/routes/admin+/_layout.tsx:20:30:
      20 │ import { cssBundleHref } from "@remix-run/css-bundle";
         ╵                               ~~~~~~~~~~~~~~~~~~~~~~~

  This error came from the "onLoad" callback registered here:

    node_modules/@remix-run/dev/dist/compiler/plugins/cssBundlePlugin.js:35:12:
      35 │       build.onLoad({
         ╵             ~~~~~~

    at setup (D:\repo\node_modules\@remix-run\dev\dist\compiler\plugins\cssBundlePlugin.js:35:13)
    at handlePlugins (D:\repo\node_modules\esbuild\lib\main.js:1279:21)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

✘ [ERROR] Could not resolve "@rvf/core"

    node_modules/@rvf/react/dist/index.esm.js:5:7:
      5 │ } from "@rvf/core";
        ╵        ~~~~~~~~~~~

  You can mark the path "@rvf/core" as external to exclude it from the bundle, which will remove this error.

✘ [ERROR] Could not resolve "@rvf/set-get"

    node_modules/@rvf/react/dist/index.esm.js:28:7:
      28 │ } from "@rvf/set-get";
         ╵        ~~~~~~~~~~~~~~

  You can mark the path "@rvf/set-get" as external to exclude it from the bundle, which will remove this error.

✘ [ERROR] Could not resolve "@rvf/core"

    node_modules/@rvf/zod/dist/index.esm.js:2:32:
      2 │ import { createValidator } from "@rvf/core";
        ╵                                 ~~~~~~~~~~~

  You can mark the path "@rvf/core" as external to exclude it from the bundle, which will remove this error.

Hi! Thank you for reporting the issue.
Unfortunately, I won't be able to help much without a reproduction as I'm not able to reproduce it myself.
Some references on minimal reproductions:

Why reproductions are required
wtf-is-a-minimal-reproduction

In the meantime, some things worth trying on your end:

Try installing those packages directly
Try deleting node_modules and your lockfile and re-installing
Mark those packages as external in the remix config

Yes I understand. Option 2 does not resolve the issue. Options 1 and 2 should work but that's basically why I created the ticket, not the unexpected behavior. I will see if I can create a reproduction.

Closing as I cannot reproduce. Much appreciated, v6 is ❤


inline style property [help wanted]

Why style property is not allowed in the property dialog ? Inline styles are necessary if you plan to build newsletter on outlook (outlook dont apply class styles). This editor is amazing but i can't use it because of that lack. Or maybe there's another way ? (thanks for your good job)

Hi @francis-barban this should be something you can configure like so:
ContentTools.RESTRICTED_ATTRIBUTES['*'] = []


Setup codebase

added a .gitignore
added node_modules and test.md to gitignore file
Set up a linter for HTML and CSS
added index.html style.css  and test.md

I've fixed all the requested changes, can you review again??? Thank you
On Tue, Jan 10, 2023 at 7:38 PM Osama Ashraf @.***>
wrote:

@.**** requested changes on this pull request.
Hi @Derick1530 https://github.com/Derick1530 ☺,
Great work on making the changes requested by a previous reviewer 👏
You've done well implementing some of the requested changes, but there are
still some which aren't been addressed yet.
[image: ItsJustATinyChangeSheaWhitneyGIF]
https://user-images.githubusercontent.com/83360636/211609489-1d465ea3-27b7-4ed0-b533-40a7657eb825.gif
Highlights ✔

Good commit messages.
No linter errors. 💯
Good usage in correcting GitHub flow

Required Changes ♻
Check the comments under the review.
Optional suggestions

N/A

Every comment with the [OPTIONAL] prefix won't stop the approval of this
PR. However, I strongly recommend you take them into account as they can
make your code better. Some of them were simply missed by the previous
reviewer and addressing them will really improve your application.
Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something
is not 100% clear.
Please, remember to tag me in your question so I can receive the
notification.
Please, do not open a new Pull Request for re-reviews. You should use the
same Pull Request submitted for the first review, either valid or invalid
unless it is requested otherwise.
As described in the Code reviews limits policy
https://microverse.zendesk.com/hc/en-us/articles/1500004088561 you have a
limited number of reviews per project (check the exact number in your
Dashboard). If you think that the code review was not fair, you can request
a second opinion using this form https://airtable.com/shrQAqnBwek5a0O0s.
In README.md
https://github.com/Derick1530/Hello-Microverse/pull/1#discussion_r1065987474
:

+<!--
+HOW TO USE:
+This is an example of how you may give instructions on setting up your project locally.

+Modify this file to match your project and remove sections that don't apply.

+REQUIRED SECTIONS:
+- Table of Contents
+- About the Project

Built With

Live Demo

+- Getting Started
+- Authors
+- Future Features
+- Contributing
+- Show your support
+- Acknowledgements
+- License

+OPTIONAL SECTIONS:
+- FAQ

+After you're finished please remove all the comments and instructions!
+-->

Great job 😃 at adding the changes ♻and updating some sections from
the README file, but As stated by the previous reviewer☺, kindly
update the README file here it is not necessary to leave these comments in
the file💯, so please it will be better if you remove the comments.

In README.md
https://github.com/Derick1530/Hello-Microverse/pull/1#discussion_r1065996990
:

+### Install

+You don't need to install this application

You did a great 👌job at updating the README file😊, but you said
there was no installation😃, but I think there is an installation of
the project like the node modules because you put the node modules at the
gitignore💯, so kindly edit this part by saying to install 🪄 the
project you need to install the npm i to install the node modules for
the linter and any other modules.⤵

In README.md
https://github.com/Derick1530/Hello-Microverse/pull/1#discussion_r1066003046
:

+

+## 📝 License

+This project is MIT licensed.

You updated the README well😃 as stated by the previous reviewer,
but I think you forgot here to add the LICENCE file👌 I think it is
broken, so please try to put the correct MIT💯 file because when I try
to open it redirects me to the page not found🐛, but don't worry you
are almost there.

—
Reply to this email directly, view it on GitHub
https://github.com/Derick1530/Hello-Microverse/pull/1#pullrequestreview-1242578668,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOYCTR5UCMWHH3YYKCKW7H3WRWGA3ANCNFSM6AAAAAATWUMWKU
.
You are receiving this because you were mentioned.Message ID:
@.***>


How to continue train the model?

I have my own porn dataset. How can I resume the training process with the the current model?
thanks
Best.

Hi! Thanks for the message.
The model object is a normal Keras model. You can follow this section on how to do the data preprocessing and instantiate the model. Then you can just use the standard way of training a TensorFlow/Keras model with your dataset.
If you are new to using TensorFlow/Keras, you can take a look at this guide.


Stylistic changes to compact theme and optional gulp file

Added significant changes to the font-sizing and print css for the compact css.
I added a gulp file which installs python dependencies. It is ran using npm run all.
Fixed my config file to work with the new make setup

Travis build
Added significant changes to the font-sizing and print css for the compact css.
I added a gulp file which installs python dependencies. It is ran using npm run all.
Fixed my config file to work with the new make setup


Adds timeouts to metadata

It is helpful to have the timeout data on the metadata. For example, we can the timeouts in middleware.

thanks @antstorm . I updated so that only the relevant timeouts are added. It looks like Decision doesn't actually have any relevant timeouts?

@jordanwnolan yes, you're right, there are no timeouts on a decision task as PollForDecisionTaskResponse suggests. You can still get it via history -> WorkflowExecutionStartedEventAttributes -> taskStartToCloseTimeoutSeconds, but I doubt it's actually useful


proposal for a libs plugin system

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

If contributing rules or changes to rules, please make sure to also uncomment one of the following line:

/kind rule-update

/kind rule-create

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area build

/area engine

/area rules

/area tests

/area proposals

What this PR does / why we need it:
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:

NONE

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.
:memo: Please follow instructions in the contributing guide to update your commits with the DCO
Full details of the Developer Certificate of Origin can be found at developercertificate.org.
The list of commits missing DCO signoff:

60079ed proposal for a libs plugin system

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To complete the pull request process, please assign mstemm after the PR has been reviewed.
You can assign the PR to them by writing /assign @mstemm in a comment when ready.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Thank you @leodido!
I tired to address you questions in the document, and I incorporated your suggestions.

LOVE this, giving all my support for this from AWS side.

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: ldegio
To complete the pull request process, please assign mstemm after the PR has been reviewed.
You can assign the PR to them by writing /assign @mstemm in a comment when ready.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.
:memo: Please follow instructions in the contributing guide to update your commits with the DCO
Full details of the Developer Certificate of Origin can be found at developercertificate.org.
The list of commits missing DCO signoff:

d483635 Add notes on plugin versioning

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.
:memo: Please follow instructions in the contributing guide to update your commits with the DCO
Full details of the Developer Certificate of Origin can be found at developercertificate.org.
The list of commits missing DCO signoff:

d483635 Add notes on plugin versioning
af3a894 Squash me

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.
:memo: Please follow instructions in the contributing guide to update your commits with the DCO
Full details of the Developer Certificate of Origin can be found at developercertificate.org.
The list of commits missing DCO signoff:

eca0498 Add notes on plugin versioning

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.
:memo: Please follow instructions in the contributing guide to update your commits with the DCO
Full details of the Developer Certificate of Origin can be found at developercertificate.org.
The list of commits missing DCO signoff:

a746be6 Add notes on plugin versioning

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.
:memo: Please follow instructions in the contributing guide to update your commits with the DCO
Full details of the Developer Certificate of Origin can be found at developercertificate.org.
The list of commits missing DCO signoff:

a746be6 Add notes on plugin versioning
45bca08 Update API C structs, fix typos.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.
:memo: Please follow instructions in the contributing guide to update your commits with the DCO
Full details of the Developer Certificate of Origin can be found at developercertificate.org.
The list of commits missing DCO signoff:

a746be6 Add notes on plugin versioning
45bca08 Update API C structs, fix typos.
ac026e5 Update links to reference code.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.
:memo: Please follow instructions in the contributing guide to update your commits with the DCO
Full details of the Developer Certificate of Origin can be found at developercertificate.org.
The list of commits missing DCO signoff:

a746be6 Add notes on plugin versioning
45bca08 Update API C structs, fix typos.
ac026e5 Update links to reference code.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.
:memo: Please follow instructions in the contributing guide to update your commits with the DCO
Full details of the Developer Certificate of Origin can be found at developercertificate.org.
The list of commits missing DCO signoff:

a746be6 Add notes on plugin versioning
45bca08 Update API C structs, fix typos.
ac026e5 Update links to reference code.
e85cfbf Fix typos, capitalize Falco.
a3b603e Use right org

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.
:memo: Please follow instructions in the contributing guide to update your commits with the DCO
Full details of the Developer Certificate of Origin can be found at developercertificate.org.
The list of commits missing DCO signoff:

a746be6 Add notes on plugin versioning
45bca08 Update API C structs, fix typos.
ac026e5 Update links to reference code.
e85cfbf Fix typos, capitalize Falco.
a3b603e Use right org
83fa493 Fix typos

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

LGTM label has been added.  Git tree hash: 4f1ed82f2879563d3e039389fd61b90194748b1f

I have a branch around to use something similar to create plugins for configuring Falco (and do things like passing rules and configs from any programs that can produce an .so such as Go or rust). I'll deinitely look more into how to integrate it with this.
Thanks for the proposal, LGTM
https://github.com/falcosecurity/falco/tree/libhawk-rules

/approve

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: ldegio, leogr
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [leogr]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


plain grey screen

everytime i start the "Client.v1.0.0-beta.3.exe" i get this plane grey window... and krunker doesnt start
https://prnt.sc/44HsWWwdD0jv

The window handle's background is set to that color and is visible before WebView2 is loaded. Here are some reasons why WebView2 wouldn't load:

Internet connection
Bad/outdated install of WebView2
JavaScript failure

I updated and not its stuck on the krunker loading screen. How do I open console?

I updated and not its stuck on the krunker loading screen. How do I open console?

You're looking for Devtools. It's CTRL + SHIFT + I.


schutzbot/ci_details: print the username

We are storing some data in the user's home directory, so let's print
the username so we know what that is.
In particular, this would tell us which user has been authorized to log
in via ssh.
Signed-off-by: Tom Gundersen<EMAIL_ADDRESS>

Test failure for F31 image tests must be unrelated:
[2020-09-03T13:51:37.407Z] ------------------------------------------------------------------------------

[2020-09-03T13:51:37.407Z] 🏃🏻 Running test: fedora_31-x86_64-qcow2-customize.json

[2020-09-03T13:51:37.407Z] ------------------------------------------------------------------------------

[2020-09-03T13:51:37.407Z] === RUN   TestImages

[2020-09-03T13:51:37.407Z] === RUN   TestImages/fedora_31-x86_64-qcow2-customize.json

[2020-09-03T13:55:16.339Z] Sending interrupt signal to process

[2020-09-03T13:55:24.059Z] Sending interrupt signal to process

[2020-09-03T13:55:28.989Z] === RUN   TestImages/fedora_31-x86_64-qcow2-customize.json/image_info

[2020-09-03T13:55:28.989Z] Terminated

[2020-09-03T13:55:28.998Z] script returned exit code 143


docs(tree): A11Y improvement for Nested Tree example.

Fixes #22517

Removed UL & disabled button, but the padding is required for the alignment of nodes. The padding is added using styles. The padding depends on the Mat Icon button size since it will be used for expanding/collapsing nodes.


SIGNATURE VERIFICATION FAILED!

i too have the same problem

Found a solution here: #491 (comment)

I have the same error code

I fixed this by forcing the thing to import the EB774491D9FF06E2 key.
gpg --homedir ~/.local/share/torbrowser/gnupg_homedir --import EB774491D9FF06E2.asc
That fixed the "Verification failed!" but now it says that I could be underattack because the tor browser version is older than it should ¯_(ツ)_/¯
I guess you can still use the torbrowser you installed via this by untaring the ~/.cache/torbrowser/download/tor-browser-linux64-10.0_en-US.tar.xz
Apparently torbrowser-launcher deletes that file when closed, so rename it and untar it, then cd to the folder and ./start-tor-browser.desktop
Or, more easily, download Tor Browser from https://torproject.org
@micahflee Please fix this. I don't expect my grandmother do to all of this.

Found a solution here: #491 (comment)

This didn't work for me

I have the same issue. It is very frustrating that I can't even launch my working version without it getting stuck in this broken update loop

Same for me. this is not working for me.

I made this as a temp solution. Only works in Linux

I am running Fedora 31 and I would like to see micahflee fix the
torbrowser-launcher as it is part of the distribution.
Thank you
On Wed, Sep 23, 2020 at 1:15 PM qorg11<EMAIL_ADDRESS>wrote:

I made this https://github.com/qorg11/ebin-tor as a temp solution. Only
works in Linux
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/micahflee/torbrowser-launcher/issues/497#issuecomment-697948318,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALXBPPRDEM4ROSYPSVU6IADSHJJOXANCNFSM4RTSTYJQ
.

I'm seeing this on up-to-date Void Linux also

I can see this issue too on Linux Mint 19.3 Cinnamon. The above solutions have not resolved the issue.

Alternative suggestion:
 curl -s https://openpgpkey.torproject.org/.well-known/openpgpkey/torproject.org/hu/kounek7zrdx745qydx6p59t9mqjpuhdf | gpg --import --homedir .local/share/torbrowser/gnupg_homedir/ -
(as per https://support.torproject.org/tbb/how-to-verify-signature/)


Audio stops when changing tabs

When changing from Vizor tab to another, the audio stops playing.
This in itself is fine (i think?) but when you go back to the tab, it remains stopped. You can turn it back on by going to the audio source player and sending Play, but in that case the audio starts from the beginning.
Opinions about this? Should we force audio to play when changing tabs (like soundcloud does) or should audio stop and then resume when the user switches back to Vizor tab?

duplicate of #294


⚠ Bofrost.fr has degraded performance

In b1ad33a, Bofrost.fr (https://www.bofrost.fr) experienced degraded performance:

HTTP code: 200
Response time: 1882 ms

Resolved: Bofrost.fr performance has improved in 5985335 after 8 minutes.


Traction database instances being heavily throttled in Traction (bc0192) environments

The Traction database instances are being throttled at >60% on average.  Review and adjust the CPU resource allocations, primarily the CPU limit to reduce or eliminate the throttling.  The goal should be to reduce throttling to <25% on average.  For production an even lower average may be desirable.
These metrics can be easily reviewed using the Namespace Monitoring dashboard available through Grafana in our new monitoring stack.

bc0192-dev

CPU limit for exporter container in traction-database-ha-* stateful sets should be increased from 50m to 250m
CPU limit for pgbackrest container in traction-database-ha-* stateful sets should be increased from 250m to 500m

bc0192-test

CPU limit for exporter container in traction-database-ha-* stateful sets should be increased from 50m to 250m
CPU limit for pgbackrest container in traction-database-ha-* stateful sets should be increased from 250m to 500m

bc0192-prod

CPU limit for exporter container in traction-database-ha-* stateful sets should be increased from 50m to 250m
CPU limit for pgbackrest container in traction-database-ha-* stateful sets should be increased from 250m to 500m

@i5okie, Where should these changes (values file) be made?

These get applied directly to postgrescluster CR.
these live in trust-over-ip-configurations. Applied with kubectl apply -k bc0192/dev
From the kustomize directory.
Though, a couple have been applied with ArgoCD. In ministry-ditp-devops repo.

postgres-cluster base resource has been updated to reflect these changes, and pushed to the ministry-gitops-ditp repo.
Changes have been applied to bc0192- dev, test, and prod via ArgoCD

Changes successfully resolved the throttling issue.


Makyen: Watch (1[\W_]*)?844[\W_]*443[\W_]3244[A-Za-z_]

Makyen requests the watch of the watch_keyword (1[\W_]*)?844[\W_]*443[\W_]*3244[A-Za-z_]*. See the Metasmoke search here and the Stack Exchange search here.

(1[[^A-Za-z0-9]_]*)?844[[^A-Za-z0-9]_]*443[[^A-Za-z0-9]_]*3244[A-Za-z_]* has been seen in 0 true positives, 0 false positives, and 0 NAAs.

Coverage remained the same at 65.091% when pulling e76730645331cab1e3c538e2742660e326e71cfd on auto-blacklist-1524588804.4970863 into 5fbb8bcacddf37ff6fb3c252f6d766bb0a7cf909 on master.


endless ping sent if  pipe breaks

Hi
The library keeps sending pings despite the connections has been closed
Here is the relevant backtrace, repeated again and again many times per second
  *** PHP Notice(8): fwrite(): send of 2 bytes failed with errno=32 Broken pipe
  Backtrace :
  :
  .../lib/mqtt/mqtt/SocketClient.php:166 fwrite()
  .../lib/mqtt/mqtt/MQTT.php:1230       sskaje\mqtt\SocketClient->write()
  .../lib/mqtt/mqtt/MQTT.php:1214       sskaje\mqtt\MQTT->message_write()
  .../lib/mqtt/mqtt/MQTT.php:1191       sskaje\mqtt\MQTT->simpleCommand()
  .../lib/mqtt/mqtt/MQTT.php:1175       sskaje\mqtt\MQTT->ping()
  .../lib/mqtt/mqtt/MQTT.php:1132       sskaje\mqtt\MQTT->keepalive()
  .../inc/mqttclient.class.php:97       sskaje\mqtt\MQTT->loop()

In sskaje\mqtt\MQTT->ping() there is no test on the actually written bytes, making the library unable to detect the broken pipe.
I guess the library will enter in an endless loop because no MesageHandler callback can run to unsubscribe all topics or close the connection.
Maybe sskaje\mqtt\MQTT->ping() should throw an exception here.

Hi @dethegeek , please try the latest commit.

Hi
Thank you, this is exactly what I expected, especially the PINGRESP handler. I was thinking about this to self monitor my service.
I updated the library a few days ago and I noticed a better behavior of my service. No more hich CPU usage, but I may still observe some memory leaks. I'll think I'll definitely adopt your library for my project.


RawJsonConsumeContext always returns NoMessageHeaders

I'm using the RawJsonMessageDeserializer on top of RabbitMQ in an integration scenario.
Unfortunately, the message headers (context.Headers) are always empty:
https://github.com/MassTransit/MassTransit/blob/2cb9968c618bad5b09905785a48c465feb116714/src/MassTransit/Serialization/RawJsonConsumeContext.cs#L55
I see that the data that I'm looking for can be found in the context.ReceiveContext.TransportHeaders, though I would prefer the consumers not to know about the "transport", and just access the headers from the context.
The Headers docs say:

Additional application-specific headers that are added to the message by the
application or by features within MassTransit, such as when a message is moved
to an error queue.

Would this headers be considered "application-specific"?
Is the current behavior the intended behavior?

I think it makes sense to delegate the Headers collection to pull directly from the transport.


nrf52840 Bluetooth support?

Hi, is ble supported yet? I can't find any examples or code pointing me where I can find out.
Thanks

Found it!
https://github.com/embassy-rs/nrf-softdevice


Handle invalid column values when making a new endpoint

Add code that protects against bad values in the system.local and
system.peers table columns when construct new endpoints.

Fixes https://github.com/datastax/cql-proxy/issues/43


[memory leakage] when use filter

Hi,
Follow up https://github.com/bblfsh/client-python/issues/92 that had to be fixed by https://github.com/bblfsh/client-python/pull/94.
I checked again - there is a memory leakage. And quite huge.
script to reproduce

import bblfsh
from bblfsh import filter as filter_uast

def filter_bblfsh(n_times=100, file="/home/egor/workspace/code-annotation/java_code.java"):
    for i in range(n_times):
        extract_functions_from_uast(file=file)

client = bblfsh.BblfshClient("<IP_ADDRESS>:9432")
filter_uast = filter_uast
FUNC_XPATH = "//*[@roleFunction and @roleDeclaration]"
FUNC_NAME_XPATH = "/*[@roleFunction and @roleIdentifier and @roleName] " \
                  "| /*/*[@roleFunction and @roleIdentifier and @roleName]"

def extract_functions_from_uast(file="/home/egor/workspace/code-annotation/java_code.java"):
    uast = client.parse(file).uast
    allfuncs = list(filter_uast(uast, FUNC_XPATH))
    internal = set()
    for func in allfuncs:
        if id(func) in internal:
            continue
        for sub in filter_uast(func, FUNC_XPATH):
            if sub != func:
                internal.add(id(sub))
    for f in allfuncs:
        if id(f) not in internal:
            name = "+".join(n.token for n in filter_uast(f, FUNC_NAME_XPATH))

if __name__ == "__main__":
    import sys
    import resource

    before = resource.getrusage(resource.RUSAGE_SELF)
    file = "/home/egor/workspace/code-annotation/java_code.java"
    if len(sys.argv) == 3:
        file = sys.argv[2]
    filter_bblfsh(n_times=int(sys.argv[1]))
    after = resource.getrusage(resource.RUSAGE_SELF)
    print('Memory increased by: %d%%' % int(100 * ((after[2] / before[2]) - 1)))

and the results of measurements:
egor@egor-sourced:~/workspace/ml$ python3 test_filter_libuast.py 100
Memory increased by: 2061%
egor@egor-sourced:~/workspace/ml$ python3 test_filter_libuast.py 200
Memory increased by: 4109%
egor@egor-sourced:~/workspace/ml$ python3 test_filter_libuast.py 400
Memory increased by: 8158%

java code that I used:

/*
 * ScreenSlicer (TM)
 * Copyright (C) 2013-2015 Machine Publishers, LLC
 *<EMAIL_ADDRESS>| screenslicer.com | machinepublishers.com
 * Cincinnati, Ohio, USA
 *
 * You can redistribute this program and/or modify it under the terms of the GNU Affero General Public
 * License version 3 as published by the Free Software Foundation.
 *
 * ScreenSlicer is made available under the terms of the GNU Affero General Public License version 3
 * with the following clarification and special exception:
 *
 *   Linking ScreenSlicer statically or dynamically with other modules is making a combined work
 *   based on ScreenSlicer. Thus, the terms and conditions of the GNU Affero General Public License
 *   version 3 cover the whole combination.
 *
 *   As a special exception, Machine Publishers, LLC gives you permission to link unmodified versions
 *   of ScreenSlicer with independent modules to produce an executable, regardless of the license
 *   terms of these independent modules, and to copy, distribute, and make available the resulting
 *   executable under terms of your choice, provided that you also meet, for each linked independent
 *   module, the terms and conditions of the license of that module. An independent module is a module
 *   which is not derived from or based on ScreenSlicer. If you modify ScreenSlicer, you may not
 *   extend this exception to your modified version of ScreenSlicer.
 *
 * "ScreenSlicer", "jBrowserDriver", "Machine Publishers", and "automatic, zero-config web scraping"
 * are trademarks of Machine Publishers, LLC.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
 * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Affero General Public License version 3 for more details.
 *
 * You should have received a copy of the GNU Affero General Public License version 3 along with this
 * program. If not, see <http://www.gnu.org/licenses/>.
 *
 * For general details about how to investigate and report license violations, please see:
 * <https://www.gnu.org/licenses/gpl-violation.html> and email the author<EMAIL_ADDRESS> */
package com.screenslicer.core.scrape;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import org.jsoup.nodes.Element;
import org.jsoup.nodes.Node;
import org.jsoup.select.NodeVisitor;

import com.screenslicer.api.datatype.HtmlNode;
import com.screenslicer.core.scrape.neural.NeuralNetManager;
import com.screenslicer.core.scrape.type.ComparableNode;
import com.screenslicer.core.util.NodeUtil;

public class Extract {
  private static final int SCORE_PENALTY = 10000;
  private static final int TWICE = 2;
  private static HashMap<Element, ComparableNode[]> nodesCache = new HashMap<Element, ComparableNode[]>();

  private static class TrainingData {
    private final ComparableNode target;
    private int finalMisses = 0;
    private boolean winner = false;
    private int winnerDistance = 0;
    private ComparableNode best = null;

    public TrainingData(ComparableNode target) {
      this.target = target;
    }
  }

  private static ComparableNode best(ComparableNode[] nodes, Integer[][] comparisonCache, Collection<Node> ignore, TrainingData trainingData) {
    int ignoreSize = ignore == null ? 0 : ignore.size();
    if (nodes.length - ignoreSize == 1) {
      if (ignore == null || ignore.isEmpty()) {
        return nodes[0];
      }
      for (int i = 0; i < nodes.length; i++) {
        if (!ignore.contains(nodes[i])) {
          return nodes[i];
        }
      }
    }
    if (comparisonCache == null) {
      comparisonCache = new Integer[nodes.length][nodes.length];
    }
    int adjustedLen = nodes.length - ignore.size();
    for (int failMax = 0; failMax < adjustedLen; failMax++) {
      Map<ComparableNode, Integer> winners = new HashMap<ComparableNode, Integer>();
      for (int i = 0; i < nodes.length; i++) {
        if (ignore != null && ignore.contains(nodes[i].node())) {
          continue;
        }
        boolean found = true;
        int fail = 0;
        for (int j = 0; j < nodes.length; j++) {
          if (ignore != null && ignore.contains(nodes[j].node())) {
            continue;
          }
          if (nodes[j] != null) {
            if (comparisonCache[i][j] == null) {
              int result = nodes[i].compare(nodes[j]);
              if (result != -1) {
                ++fail;
              }
              comparisonCache[i][j] = new Integer(result);
              comparisonCache[j][i] = new Integer(result * (-1));
            } else if (comparisonCache[i][j].intValue() != -1) {
              ++fail;
            }
            if (fail > failMax) {
              found = false;
              break;
            }
          }
        }
        if (found) {
          if (failMax == 0) {
            if (trainingData != null) {
              trainingData.winner = trainingData.target.equals(nodes[i]);
              trainingData.finalMisses = trainingData.winner ? 0 : 1;
              trainingData.winnerDistance = 0;
              trainingData.best = nodes[i];
            }
            return nodes[i];
          }
          winners.put(nodes[i], i);
        }
      }
      if (winners.size() == 1) {
        ComparableNode ret = winners.keySet().toArray(new ComparableNode[1])[0];
        if (trainingData != null) {
          trainingData.winner = trainingData.target.equals(ret);
          trainingData.finalMisses = trainingData.winner ? 0 : 1;
          trainingData.winnerDistance = failMax;
          trainingData.best = ret;
        }
        return ret;
      }
      if (!winners.isEmpty()) {
        int targetIndex = -1;
        ComparableNode[] winnersArray = winners.keySet().toArray(new ComparableNode[0]);
        if (trainingData != null) {
          trainingData.winnerDistance = failMax;
          if (winners.containsKey(trainingData.target)) {
            for (int i = 0; i < winnersArray.length; i++) {
              if (trainingData.target.equals(winnersArray[i])) {
                targetIndex = i;
                break;
              }
            }
          }
          if (targetIndex == -1) {
            trainingData.finalMisses = winners.size();
            trainingData.winner = false;
          }
        }
        for (int i = 0; i < winnersArray.length; i++) {
          boolean found = true;
          for (int j = 0; j < winnersArray.length; j++) {
            if (i != j) {
              int iCache = winners.get(winnersArray[i]);
              int jCache = winners.get(winnersArray[j]);
              if (comparisonCache[iCache][jCache] == null) {
                int result = winnersArray[i].compare(winnersArray[j]);
                comparisonCache[iCache][jCache] = new Integer(result);
                comparisonCache[jCache][iCache] = new Integer(result * (-1));
              }
              if (comparisonCache[iCache][jCache].intValue() != -1) {
                found = false;
                if (i != targetIndex) {
                  break;
                } else if (trainingData != null) {
                  ++trainingData.finalMisses;
                }
              }
            }
          }
          if (found) {
            if (trainingData != null) {
              trainingData.best = winnersArray[i];
            }
            if (targetIndex == i && trainingData != null) {
              trainingData.finalMisses = 0;
              trainingData.winner = true;
              return trainingData.target;
            } else if (targetIndex == -1 || targetIndex < i) {
              if (trainingData != null) {
                trainingData.winner = false;
              }
              return winnersArray[i];
            }
          } else if (targetIndex == i
              && trainingData != null
              && trainingData.best != null) {
            trainingData.winner = false;
            return trainingData.best;
          }
        }
        return null;
      }
    }
    return null;
  }

  public static ComparableNode[] trainInit(Element body, int page, int thread) {
    ComparableNode[] nodesArray = performInternal(body, page, null, null, null, thread);
    nodesCache.put(body, nodesArray);
    return nodesArray;
  }

  public static int train(Element body, int page, ComparableNode target, int targetIndex, int thread) {
    ComparableNode[] nodesArray = null;
    nodesArray = nodesCache.get(body);
    int score = 0;
    if (NeuralNetManager.instance(thread).isMulti()) {
      int votes = 0;
      final int majority = (NeuralNetManager.instance(thread).multiSize() / TWICE) + 1;
      boolean won = false;
      ComparableNode fallback = null;
      int[] distances = new int[NeuralNetManager.instance(thread).multiSize()];
      int curDistance = 0;
      Map<ComparableNode, Integer> votesMap = new HashMap<ComparableNode, Integer>();
      if (targetIndex < 0) {
        for (int i = 0; i < nodesArray.length; i++) {
          if (nodesArray[i].equals(target)) {
            targetIndex = i;
            break;
          }
        }
      }
      while (NeuralNetManager.instance(thread).hasNext()) {
        Integer[][] comparisonCache = new Integer[nodesArray.length][nodesArray.length];
        int distance = 0;
        for (int i = 0; i < nodesArray.length; i++) {
          if (!target.equals(nodesArray[i])) {
            int result = target.compare(nodesArray[i]);
            if (result != -1) {
              ++distance;
            }
            comparisonCache[targetIndex][i] = new Integer(result);
            comparisonCache[i][targetIndex] = new Integer(result * (-1));
          }
        }
        TrainingData trainingData = new TrainingData(target);
        ComparableNode tmp = best(nodesArray, comparisonCache, null, trainingData);
        if (tmp != null) {
          fallback = tmp;
        }
        if (trainingData.best != null) {
          if (!votesMap.containsKey(trainingData.best)) {
            votesMap.put(trainingData.best, new Integer(1));
          } else {
            votesMap.put(trainingData.best,
                new Integer(votesMap.get(trainingData.best).intValue() + 1));
          }
        }
        distance = (distance - trainingData.winnerDistance) + trainingData.finalMisses;
        NeuralNetManager.instance(thread).next();
        if (trainingData.winner) {
          ++votes;
        }
        if (votes == majority) {
          won = true;
          break;
        }
        distances[curDistance++] = distance;
      }
      NeuralNetManager.instance(thread).resetNext();
      if (!won) {
        int maxVotes = 0;
        ComparableNode maxComparableNode = null;
        for (Map.Entry<ComparableNode, Integer> entry : votesMap.entrySet()) {
          if (entry.getValue().intValue() == maxVotes) {
            maxComparableNode = null;
          } else if (entry.getValue().intValue() > maxVotes) {
            maxVotes = entry.getValue().intValue();
            maxComparableNode = entry.getKey();
          }
        }
        if (maxComparableNode == null) {
          maxComparableNode = fallback;
        }
        if (!target.equals(maxComparableNode)) {
          int totalDistance = 0;
          Arrays.sort(distances);
          for (int i = 0; i < majority; i++) {
            totalDistance += distances[i];
          }
          score += totalDistance + SCORE_PENALTY;
        }
      }
    } else {
      int distance = 0;
      Integer[][] comparisonCache = new Integer[nodesArray.length][nodesArray.length];
      if (targetIndex < 0) {
        for (int i = 0; i < nodesArray.length; i++) {
          if (nodesArray[i].equals(target)) {
            targetIndex = i;
            break;
          }
        }
      }
      for (int i = 0; i < nodesArray.length; i++) {
        if (!target.equals(nodesArray[i])) {
          int result = target.compare(nodesArray[i]);
          if (result != -1) {
            ++distance;
          }
          comparisonCache[targetIndex][i] = new Integer(result);
          comparisonCache[i][targetIndex] = new Integer(result * (-1));
        }
      }
      TrainingData trainingData = new TrainingData(target);
      best(nodesArray, comparisonCache, null, trainingData);
      score += (distance - trainingData.winnerDistance) + trainingData.finalMisses;
      score += trainingData.winner ? 0 : SCORE_PENALTY;
    }
    return score;
  }

  private static ComparableNode[] performInternal(final Element body, final int page,
      final HtmlNode matchResult, final HtmlNode matchParent, final Collection<Node> ignore, int thread) {
    final Map<Node, ComparableNode> nodes = new HashMap<Node, ComparableNode>();
    if (body != null) {
      body.traverse(new NodeVisitor() {
        @Override
        public void head(Node node, int depth) {
          int nonEmptyChildren = 0;
          for (Node child : node.childNodes()) {
            if (!NodeUtil.isEmpty(child)) {
              nonEmptyChildren++;
            }
          }
          if (!NodeUtil.isEmpty(node)
              && NodeUtil.isContent(node, matchResult, matchParent) && nonEmptyChildren > 0) {
            nodes.put(node, new ComparableNode(node, matchResult, matchParent, thread));
          }
        }

        @Override
        public void tail(Node node, int depth) {}
      });
    }
    return nodes.values().toArray(new ComparableNode[0]);
  }

  public static class Cache {
    public ComparableNode[] nodesCache = null;
    public Integer[][][] comparisonCache = null;
  }

  public static List<Node> perform(Element body, int page, Collection<Node> ignore,
      HtmlNode matchResult, HtmlNode matchParent, Cache cache, int thread) {
    Map<ComparableNode, Integer> votes = new LinkedHashMap<ComparableNode, Integer>();
    if (cache == null) {
      cache = new Cache();
    }
    if (cache.nodesCache == null) {
      cache.nodesCache = performInternal(body, page, matchResult, matchParent, ignore, thread);
      cache.comparisonCache = new Integer[NeuralNetManager.instance(thread).multiSize()]
          [cache.nodesCache.length][cache.nodesCache.length];
    }
    final int majority = (NeuralNetManager.instance(thread).multiSize() / TWICE) + 1;
    Node best = null;
    int cur = 0;
    NeuralNetManager.instance(thread).resetNext();
    while (NeuralNetManager.instance(thread).hasNext()) {
      ComparableNode winner = best(cache.nodesCache, cache.comparisonCache[cur++],
          new HashSet<Node>(ignore), null);
      NeuralNetManager.instance(thread).next();
      if (winner != null) {
        if (!votes.containsKey(winner)) {
          votes.put(winner, new Integer(1));
        } else {
          votes.put(winner, new Integer(votes.get(winner).intValue() + 1));
        }
        if (votes.get(winner).intValue() == majority) {
          best = winner.node();
          break;
        }
      }
    }
    if (best == null) {
      int bestVotes = 0;
      List<Node> bestNodes = new ArrayList<Node>();
      for (Map.Entry<ComparableNode, Integer> entry : votes.entrySet()) {
        int val = entry.getValue().intValue();
        if (val >= bestVotes) {
          if (val > bestVotes) {
            bestVotes = val;
            bestNodes.clear();
          }
          bestNodes.add(entry.getKey().node());
        }
      }
      return bestNodes;
    }
    return Arrays.asList(new Node[] { best });
  }
}

There was a certain memory increase on the first filter because of the initialization of libxml and a successive increase because of internal libxml2 catching until certain number of iterations at which point it wouldn't increase no matter the number of Iterations (I tested until 200.000, don't remember the point at which it was stable). Could you test with a greater number of iterations? I also tested only with python parsing, in theory it shouldn't be related to the language but who knows...

even with 400 iterations it consumed more than 10% of laptop RAM (16 GB) - I will check with bigger number of iterations and python file too. I will report numbers here.

I've been doing many tests and while I still haven't found where the leak exactly is I can say for sure that it isn't in filter() but in parse(); moving parse() to the called outside the loop (instead of calling it on each iteration) removes the leak.
So the problem is probably on libuast, but let's keep the issue here until I can confirm the specific place of the leak.

Of course, it couldn't be so simple:

Parse outside the loop, filter inside the loop: no leak.
Parse inside the loop (without filter): no leak.
Parse and filter inside the loop: leak.

WTF...

@EgorBu should be fixed by #102 when merged and tagged.
That was hard to find and easy to see once I found it, dammit.


Add Chinese translation for 'PowerRename'

Microsoft PowerToys version
0.69.1
Utility with translation issue
PowerRename
🌐 Language affected
Chinese
❌ Actual phrase(s)
PowerRename
✔ Expected phrase(s)
高级重命名
ℹ Why is the current translation wrong
Not translated from English to Chinese

This was intentional choice on our part


Add version-sample.json as discussed in issue #185

Following instructions in README.md, it references a file /dist/download/version-sample.json, which has been deleted from the repository at some point.
I've guessed the values of version and date based on the current website. The editor_version I've left at 0.6.2, which is the last version of the deprecated desktop editor. I assume that this will be removed at some point as all the code that references it seems to be commented out currently.
The site will build without this file but the version information will not be included in the download box. There is also an earlier issue (#64) in which not having it seemed to cause problems internationalisation, but I didn't reproduce this.

Looking good!
It seems like the file was there before, but was accidentally (?) removed in #109.
@DexterShepherd and @montoyamoraga is it correct to re-add this file?

For me on both the en and es version of the site, the download page has the version number listed.

If it was me who deleted this it was certainly an accident :)

@limzykenneth, I guess that's because you have a copy of version.json, which is where the version info gets populated from. But version.json is ignored by git, so version-sample.json was included to provide an example that could be copied.

thanks!


No indentation after if statement

Typing the following code with newlines only produces the indentation seen:
function foo()
   if true then
   a
else
   b
end
end

Indent after function open is working, indent after else is working, de-indent upon end is working, but indent after if/then is not working. Side-effect is that taking file with proper indentation like:
function foo()
   c
   if true then
      a
      b
   else
      d
   end
end

and then using alt+downarrow to move line C into else produces this result:
function foo()
   if true then
   a
   b
else
   c
      d
   end
end

Seems a regression based on what #19 describes.
Extension Info:
Name: vscode-lua
Id: trixnz.vscode-lua
Description: Intellisense and Linting for Lua
Version: 0.12.4
Publisher: trixnz
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=trixnz.vscode-lua

Extension is using 5.3 mode, in case that matters.
VS Code:
Version 1.31.1 (1.31.1)
1b8e8302e405050205e69b59abb3559592bb9e60
2019-02-12T02:10:22.500Z

This is a bug in the official vs code repo I believe
On Wed, Mar 6, 2019, 2:09 PM Gavin Kistner<EMAIL_ADDRESS>wrote:

Typing the following code with newlines only produces the indentation seen:
function foo()
if true then
a
b
cendend
Indent after function open is working, de-indent upon end is working, but
indent after if/then is not working. Side-effect is that taking file with
proper indentation like:
function foo()
c
if true then
a
b
else
d
endend
and then using alt+downarrow to move line C into else produces this
result:
function foo()
if true then
a
belse
c
d
endend
Seems a regression based on what #19
https://github.com/trixnz/vscode-lua/issues/19 describes.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/trixnz/vscode-lua/issues/64, or mute the thread
https://github.com/notifications/unsubscribe-auth/ANUy4OlqDu193-DJk-qRJU3gtMpWlGY4ks5vUBJbgaJpZM4bhm1S
.

I agree. It is fixed in Version 1.32.0-insider (1.32.0-insider). Sorry for the noise.