[BUG] lack of opensearch sink initialization error logs when data-prepper is spinning up

Describe the bug
A user reported lack of opensearch sink initialization error logs when data-prepper is spinning up.
2023-06-12T22:52:21,382 [entry-pipeline-sink-worker-2-thread-1] INFO  org.opensearch.dataprepper.pipeline.Pipeline - Pipeline [entry-pipeline] - sink is not ready for execution, retrying
2023-06-12T22:52:21,382 [service-map-pipeline-sink-worker-4-thread-1] INFO  org.opensearch.dataprepper.pipeline.Pipeline - Pipeline [service-map-pipeline] - sink is not ready for execution, retrying
2023-06-12T22:52:21,383 [entry-pipeline-sink-worker-2-thread-1] INFO  org.opensearch.dataprepper.pipeline.Pipeline - Pipeline [entry-pipeline] Waiting for Sink to be ready
2023-06-12T22:52:21,383 [service-map-pipeline-sink-worker-4-thread-1] INFO  org.opensearch.dataprepper.plugins.sink.opensearch.OpenSearchSink - Initializing OpenSearch sink
2023-06-12T22:52:21,383 [raw-pipeline-sink-worker-6-thread-1] INFO  org.opensearch.dataprepper.pipeline.Pipeline - Pipeline [raw-pipeline] - sink is not ready for execution, retrying
2023-06-12T22:52:21,383 [raw-pipeline-sink-worker-6-thread-1] INFO  org.opensearch.dataprepper.plugins.sink.opensearch.OpenSearchSink - Initializing OpenSearch sink
2023-06-12T22:52:21,407 [main] WARN  org.opensearch.dataprepper.pipeline.server.HttpServerProvider - Creating Data Prepper server without TLS. This is not secure.
2023-06-12T22:52:21,407 [main] WARN  org.opensearch.dataprepper.pipeline.server.HttpServerProvider - In order to set up TLS for the Data Prepper server, go here: https://github.com/opensearch-project/data-prepper/blob/main/docs/configuration.md#server-configuration
2023-06-12T22:52:21,409 [raw-pipeline-sink-worker-6-thread-1] INFO  org.opensearch.dataprepper.plugins.sink.opensearch.ConnectionConfiguration - aws_sigv4 is set, will sign requests using AWSRequestSigningApacheInterceptor
2023-06-12T22:52:21,409 [service-map-pipeline-sink-worker-4-thread-1] INFO  org.opensearch.dataprepper.plugins.sink.opensearch.ConnectionConfiguration - aws_sigv4 is set, will sign requests using AWSRequestSigningApacheInterceptor
2023-06-12T22:52:21,425 [main] INFO  org.opensearch.dataprepper.pipeline.server.DataPrepperServer - Data Prepper server running at :4900
2023-06-12T22:52:21,883 [service-map-pipeline-sink-worker-4-thread-1] INFO  org.opensearch.dataprepper.plugins.sink.opensearch.ConnectionConfiguration - Using the trust all strategy
2023-06-12T22:52:21,883 [raw-pipeline-sink-worker-6-thread-1] INFO  org.opensearch.dataprepper.plugins.sink.opensearch.ConnectionConfiguration - Using the trust all strategy
2023-06-12T22:52:22,383 [entry-pipeline-sink-worker-2-thread-1] INFO  org.opensearch.dataprepper.pipeline.Pipeline - Pipeline [entry-pipeline] - sink is not ready for execution, retrying
2023-06-12T22:52:23,383 [entry-pipeline-sink-worker-2-thread-1] INFO  org.opensearch.dataprepper.pipeline.Pipeline - Pipeline [entry-pipeline] - sink is not ready for execution, retrying
2023-06-12T22:52:24,384 [entry-pipeline-sink-worker-2-thread-1] INFO  org.opensearch.dataprepper.pipeline.Pipeline - Pipeline [entry-pipeline] - sink is not ready for execution, retrying
2023-06-12T22:52:25,384 [entry-pipeline-sink-worker-2-thread-1] INFO  org.opensearch.dataprepper.pipeline.Pipeline - Pipeline [entry-pipeline] - sink is not ready for execution, retrying

Still need to reproduce the issue
To Reproduce
Steps to reproduce the behavior:

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

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):

OS: [e.g. Ubuntu 20.04 LTS]
Version [e.g. 22]

Additional context
Add any other context about the problem here.

@chenqi0805 Can you provide the config you have used when you saw this issue?

Happened the same to me, while solving issues with permissions, as soon as I restarted data prepper the issue was gone


fix: unset KITTY_KITTEN_RUN_MODULE

:tada: This PR is included in version 2.4.6 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


FEAT: CLI conversion

Addresses #241
This PR adds in an entrypoint, skops convert, which allows users to automatically convert files from the command line.
I didn't end up adding inspect, as it felt odd to me to inspect a .pkl file which would require loading it into skops format based on how we currently have the safety checks implemented. Happy to implement an entrypoint to do it if other maintainers think it would be useful, it would essentially just need to not save the output skops in the current conversion method.
A few things I think having others input on would be:

Would it be worth setting up a generic skops entrypoint instead of skops-convert, such that users could enter skops {SOME METHOD} in the command line and have it dispatch to the relevant method? This feels like it would be more future-proof if we want to add more command line helpers.

I have implemented the above, so we can add more entrypoint methods easier now :)

I don't think we need to allow users to specify a new file name (I think just getting the name from the input file should be ok) but happy for others to challenge this.

I didn't go too heavy on testing the logger outputs, because it didn't feel it would add much value, but happy to add some this others want.

PS: sorry for not getting this out earlier, had a busy & stressful week.

No detailed review from me yet, just some more general questions to discuss:

It would be nice to give some examples how to actually use the CLI :)
I feel like using logging is overkill here, do we really need it? I have been burnt by the logging module in the past, so I would avoid it if possible :D. If print and print(..., file=sys.stderr) are not enough, we could consider using rich. If we want to support different "log levels", we could have action='count' for verbose to allow -v, -vv etc. (at least that's what I think it does)
Usage-wise, I think allowing to (optionally) specify an output file name makes more sense than an output folder. That's more in line with the majority of CLI tools and gives the user more control.
Regarding the testing, I think I'm fine with the general approach. Just throwing out there that we could also create real pickle files and shell out to call the CLI, which is a bit more end-to-end.

Ready for review @skops-dev/maintainers :)

Addressing @BenjaminBossan's comments:

I definitely will include some examples in documentation, but for example:
skops convert abc.pkl will convert the abc.pkl file to abc.skops at the moment.

I used logging as I felt it was the default, 'pythonic; way to allow varied verbosity of print statements to stdout. I thought it would be nice to allow for users to have slightly better visibility if something was not working, and it felt extensible to me. I haven't used rich much, but if that's something you and the other devs are happier with I'm happy to change to that.

I think it would make sense to add support for that too. The reason I initially wasn't too keen to go in that direction was it might make the usage pattern for multiple files clunkier.
skops convert a.pkl b.pkl c.pkl --output-dir my-skops-dir felt tidier than having to specify a file name/path for each file specifically, but we could also support different usage patterns for single vs batch file conversions.

Happy to add in some integration tests on actual files for the main entrypoint to have visibility of the whole workflow.

My impression is that some of the things we discuss depend on what the general expectations of a command line tool are.
I've never seen the use of logging for CLI, but maybe that's just me. Still, I'd argue we should at least evaluate how necessary it is and if we can reduce complexity overall by removing it, we should do that. For instance, we could just not print anything when there is no error (which is the standard) and if users want to see more, like unknown packages, they can do -v.
(To be clear, I don't think we need rich, it's just in case we want to make the output prettier.)
Regarding output dir, we could keep it (but I wonder if -t --target-directory would be more standard, but then we need something else for trusted types). But IMHO we could also do without it since it's easy to chain commands to achieve the same result:
$ skops convert *.pkl && mv *.skops my-target-dir/
On the other hand, having a way to indicate the output file name is something I'd expect from similar tools, that's why I would have added it (but we could do that later).
Regarding the --trusted argument, do we want to allow more fine grained control, i.e. letting users indicate the trusted types? If so, the warning should exactly indicate how to specify them.

Addressed your PR comments, feel free to have another look @adrinjalali  :)
As it stands, users can pass in
I still want to add in documentation to cover the additions, I could maybe use someone pointing me in the right direction to write up changes in the docs folder as I've not got much experience writing documentation :')

On holidays, so I'll either review next year or happy for this to be merged, but one think which I think is important is for us to have the cli module as private so that we can change things easy at least for now. I'd rename skops.cli to skops._cli.

I'll be on holiday too until next year, but will take a look from time to time when I have the opportunity.

A rather bigger question to me is, should we run our tests the same way we do in our test suite on the generated file here? It would be probably nice to tell users of potential issues if the persistence has gone wrong, but silently. WDYT? I've been thinking of making that part of the test suite public. But @BenjaminBossan would have a better idea of how stable that part is.

Sorry, I don't understand what you're referring to here. Could you please explain?

Something like this:
    loaded = loads(dumps(estimator), trusted=True)
    assert_params_equal(estimator.get_params(), loaded.get_params())

To have the above test included in the convert code so that we warn the users if something doesn't look right.

Gotcha, interesting idea. I'd say we can add this in a separate PR after merging this one, maybe put it behind an optional argument.
For this to be really useful, I think we would need to work a bit on assert_params_equal:

Since it would basically be exposed to the user, we might have to add tests for this test function.
Right now, it fails on the first attribute that differs, but it would be more useful if it could collect all failing attributes (similar to the auditing code). This is, however, not trivial, because it would require us to track the attributes through meta estimators etc.

Agree. Happy to have it in a separate PR then.

I have been playing with this a little bit more, and I need to do a refactor of the main_entrypoint to make use of subparsers instead of child parsers.
Because of the way it's currently written, it is very hard to allow both skops --help and skops convert --help to work as needed. The parent parser will see --help wherever it is, and parse it automatically. I think there are hacky ways around this, but it makes more sense to migrate to using the proper pythonic way to handle this.

Ok, I've done the following:

Reworked ArgParse to work as we want, help now works for both skops and skops convert  :)
Reworked to support single files only
Removed uneeded tests
Updated some of the CL text

Still to do:

Add documentation and examples
Update Change.rst
Consider changing from -v and --debug to -v and -vv for logging verbosity

Still to do:

Let us know if you already want a review of the current state or if we should wait for the remaining changes.

Let us know if you already want a review of the current state or if we should wait for the remaining changes.

I think I should be able to make the above changes in the next day or so, so you can hold off on reviewing until then :) I'll ping you once it's ready for review

Ok, phew, should now be ready to review again @skops-dev/maintainers  :)
A couple of notes:

Current behaviour is to overwrite when writing a file if it already exists, is this the expected behaviour?
I reintroduced the empty__init__.py in cli because Pytest was failing to initilaise because there is now an _utils file in cli
I reintroduced the test_entrypoint test because of the new added complexity with parsers and subparsers
I didn't create a full integration test for converting a file from the command line, might be a good test to add for a new contributor, or something I can add at a later date
Let me know if I should add more/ reword the documentation at all, wasn't sure how much I should add there.

Thanks for the review @BenjaminBossan, I've made adjustments along the lines of most of your comments, let me know if there's anything I've missed.
WRT logging, I've moved to using a logger instance, but still set a basic config at the top level for our selected entrypoint, as I felt that the config should be set at the top level for whatever entrypoint we're using.
That way, if we do implement any different logging elsewhere in our codebase, it automatically keeps the config specified for whatever command we're calling.
Let me know if you think there's a better way to achieve this;
Also, the log format currently looks like:
INFO    : No unknown types found in abc.
How does this look to all? We can add things like time, function call, etc at a later date if we need it.
Also, when we implement logging somewhere else, might make sense to move this config out to a common module.

@BenjaminBossan do we still want one more review before merging this in?


MultiExp in batch affine (draft)

Hi, we implemented multiexp in affine coordinates using batch inversion and found it 10-20% faster for large N, e.g. N >= 2^22. See Section 5.3: ia.cr/2022/1396.
This PR is not meant to be merged, I just want to present the result and discuss what's the best way to contribute, if you find it interesting. To repro:
cd ecc/bls12-377
go test -bench=BenchmarkMultiExpG1ReferenceBatchAffine

Here is a bit more context.
Our work started on hardware/FPGA to accelerate large MSM on BLS12-377, but the technique that we developed can be applied to software to implement batch affine on any curve.
The core idea is to reorder point additions into buckets to maximize efficiency. In the paper we call it scheduling.
In rust/python the scheduler would be an iterator that returns points in a different order.
Here's an example of how we propose to impl it in go. This is equivalent to your loop written as an iterator, and this is the corresponding "naive" scheduler that returns points in order (this is all throw-away code, just to explain what we did).
The critical point is to impl a scheduler that "doesn't take too much time", yet maximizes the size of the batch used for inversions. In the paper we discuss some of the challenges we encountered, and it's important to note that this approach works well for uniformly random scalars, but performance degrade in edge cases, for example the worst case when the scalars are all the same. Hence the need to discuss, before making a real PR. :)
This is the actual loop that we propose and here's the corresponding scheduler. Internally the scheduler has a queue, for simplicity in this code the queue can grow indefinitely, but in a real PR we'd put a hard bound.
Based on our experiments, here's what we'd propose:

Implement batch affine only for c=16 and c=20.
For large enough N, msmInnerG1Jac can use batch affine instead of extended Jacobian. There's a case to be made to keep the code simpler and always use batch affine for c=16, 20, as this pretty much implies large enough N (maybe the improvement is not 10%, but it should still be a few % points).
For the batch size, we experimented a bit but at the end landed on 2 fixed values T=100 for c=20, T=40 for c=16. It's prob worth testing on the platforms that most interest you.

I know this is a lot :) If you think this is interesting I'm happy to spend some time working on it, and also happy if you prefer to take the lead and structure the code however you think it's best.

Hey -- looks great, thanks for the PR! @yelhousni and I will probably get back to you in the next week or so, we're unavailable the next few days 👍

@yelhousni all makes sense. I guess what I can do is to add 2 functions for c=16, 20 with batch affine to the template, so they become available to all curves, G1 and G2. Then you guys can decide if and where to apply them, taking into account all considerations (perf, audit, etc.) - sounds good? BTW, happy to hop on a call if you'd like, maybe faster to sync.
P.S: nice trick the butterfly, love it! You can prob also skip all reductions mod q since you have that multiplier that accepts inputs in [0,2q). Not sure if that has any meaningful impact though (fwiw we used it to save some wires on the FPGA :))

Yes that would be great if you can do so @0x0ece! Happy to hop on a call too, @gbotrel will be back tomorrow so maybe we can aim for Friday? we can organise this via<EMAIL_ADDRESS>or Telegram.

@0x0ece couple of updates on our side --

identified an issue in this PR where the scheduler could leave some items in the queue after processing the points
another one was missing edge case check (if a input point is infinity)
rewrote a similar (probably temporary version) scheduler which ensures things like buckets are allocated on the stack -- for x86/arm64, results are quite promising -- for G2 MSM the perf gain can be ~30% compared to gnark current version (214 -> 218).
one key observation is with the choice of c (ie the window size in the bucket method); if c doesn't divide the length of the scalar, the last chunk of the scalar will be "smaller" ; that is, we will have much less buckets, and processing this last chunk with the batch-affine version doesn't make sense (due to small batch needed / high number of collisions); what we did is when this is the case, we process the last chunk with buckets in extended jac coordinates.

All in all, we probably need some time to clean up / find good heuristic for choice of batch size, max batch size, queue strategy, memory accesses, ... for varying sizes of MSM in various settings.

Thank you for the updates @gbotrel. All looks good to me:

Very possible, thanks for spotting and fixing it
Yes
Awesome!
Oh yeah, I forgot to mentioned that during the call, I did the same in my tests but then didn't want to complicate the code. For example here c could be lastC. Also, for BLS12-377 you could actually use 253 instead of 256 (therefore tweaking also msmC16) and similarly for all curves.

Totally understand this needs some time. I'm glad it's working and you're finding improvements, very exciting!


polling rate

cljx is a great way to write portable code and I was wondering if there is a way to speed up compiling. I noticed that the polling rate is set to 1000ms. Worst case, it takes a whole second just to notice that a file was changed.
What do you think of making the polling rate configurable or dropping it to something much lower, like 50ms?

I dropped it to 250ms. I worry about going any further negatively impacting people with very large projects.
Available in [org.clojars.cemerick/cljx "0.6.0-SNAPSHOT"] until the final 0.6.0 release is cut.


Breaking with workspace TS version 3.7.2

VSCode Version: 1.40.2
OS Version: macOS Catalina

Steps to Reproduce:

Have the tslint extension installed.
use workspace version of typescript.

No linting. It's broken.
It works if I select 'use vscode version' even though it's the same TS version

Are you sure that this regressed between 1.40.1 and 1.40.2 and that nothing else about your setup has changed? No extension updates or new tslint versions?
Here are the VS Code changes: https://github.com/microsoft/vscode/compare/1.40.1...1.40.2

almost positive, I saw my developer upgrade right next to me and the issue broke immediately on update

I should add I already had this problem on 1.40.2, so watching him upgrade was to confirm my suspicion

And they were definitely on 1.40.1, and not 1.39?

Yes positive

1.40.2 + workspace TS works fine for me:

Does this happen in all projects? What about very simple ones?

Interesting: the issue only occurs in my angular project files. Disabling my angular vscode plugin did not help.
Typescript kicks in fine, but tslint doesn't seem to be kicking in.
But if I remove my @Component, and @Input decorators, it works fine. Imports weren't modifed, so even if it's importing other components that doesn't seem to be a problem.
Looks like this is specifically related to decorators interfering with tslint plugin. But the trigger was still the VSCode upgrade.

Tried to reproduce it with https://github.com/PatrickJS/angular-starter, couldn't do it. Seems specific to our project for now.
Found this error in the log:
Err 13023 [13:52:10.523] Exception on executing command delayed processing of request 377:

    Cannot read property 'length' of undefined

    TypeError: Cannot read property 'length' of undefined
        at checkNumericLiteralValueSize (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:65762:77)
        at checkGrammarNumericLiteral (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:65755:13)
        at checkExpressionWorker (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:58127:21)
        at checkExpression (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:58066:38)
        at checkVoidExpression (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:56904:13)
        at checkExpressionWorker (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:58178:28)
        at checkExpression (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:58066:38)
        at getTypeOfExpression (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:58042:58)
        at getRegularTypeOfExpression (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:63621:48)
        at getTypeOfNode (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:63532:24)
        at Object.getTypeAtLocation (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:33188:31)
        at getBuiltinTypeFromTs (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:29483:32)
        at TypeScriptSymbolQuery.getBuiltinType (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:28798:28)
        at AstType.get [as undefinedType] (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:28301:63)
        at AstType.visitInterpolation (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:28198:25)
        at Interpolation.visit (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:7174:28)
        at ASTWithSource.visit (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:7290:29)
        at AstType.getDiagnostics (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:28003:28)
        at getExpressionDiagnostics (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:28394:18)
        at ExpressionDiagnosticsVisitor.diagnoseExpression (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:28629:61)
        at ExpressionDiagnosticsVisitor.visitBoundText (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:28569:18)
        at BoundTextAst.visit (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:10816:28)
        at visit (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11127:41)
        at /Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11129:29
        at Array.forEach (<anonymous>)
        at templateVisitAll (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11128:14)
        at visit (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11112:34)
        at /Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11097:17
        at ExpressionDiagnosticsVisitor.RecursiveTemplateAstVisitor.visitChildren (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11114:13)
        at ExpressionDiagnosticsVisitor.RecursiveTemplateAstVisitor.visitElement (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11090:25)
        at ExpressionDiagnosticsVisitor.visitElement (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:28603:43)
        at ElementAst.visit (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:10948:28)
        at visit (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11127:41)
        at /Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11129:29
        at Array.forEach (<anonymous>)
        at templateVisitAll (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11128:14)
        at visit (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11112:34)
        at /Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11097:17
        at ExpressionDiagnosticsVisitor.RecursiveTemplateAstVisitor.visitChildren (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11114:13)
        at ExpressionDiagnosticsVisitor.RecursiveTemplateAstVisitor.visitElement (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11090:25)
        at ExpressionDiagnosticsVisitor.visitElement (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:28603:43)
        at ElementAst.visit (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:10948:28)
        at visit (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11127:41)
        at /Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11129:29
        at Array.forEach (<anonymous>)
        at templateVisitAll (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11128:14)
        at visit (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11112:34)
        at /Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11097:17
        at ExpressionDiagnosticsVisitor.RecursiveTemplateAstVisitor.visitChildren (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11114:13)
        at ExpressionDiagnosticsVisitor.RecursiveTemplateAstVisitor.visitElement (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11090:25)
        at ExpressionDiagnosticsVisitor.visitElement (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:28603:43)
        at ElementAst.visit (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:10948:28)
        at visit (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11127:41)
        at /Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11129:29
        at Array.forEach (<anonymous>)
        at templateVisitAll (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11128:14)
        at visit (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11112:34)
        at /Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11097:17
        at ExpressionDiagnosticsVisitor.RecursiveTemplateAstVisitor.visitChildren (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11114:13)
        at ExpressionDiagnosticsVisitor.RecursiveTemplateAstVisitor.visitElement (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11090:25)
        at ExpressionDiagnosticsVisitor.visitElement (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:28603:43)
        at ElementAst.visit (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:10948:28)
        at visit (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11127:41)
        at /Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11129:29
        at Array.forEach (<anonymous>)
        at templateVisitAll (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:11128:14)
        at getTemplateExpressionDiagnostics (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:28388:9)
        at getTemplateDiagnostics (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:50752:37)
        at LanguageServiceImpl.getDiagnostics (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:51009:62)
        at Object.getSemanticDiagnostics (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:71010:55)
        at TSLintPlugin.getSemanticDiagnostics (/Users/joshpike/Projects/aquipa/node_modules/typescript-tslint-plugin/out/plugin.js:93:29)
        at Proxy.intercept.getSemanticDiagnostics (/Users/joshpike/Projects/aquipa/node_modules/typescript-tslint-plugin/out/plugin.js:73:25)
        at IOSession.Session.semanticCheck (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:139717:52)
        at /Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:139758:31
        at MultistepOperation.executeAction (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:138911:25)
        at /Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:138892:100
        at IOSession.Session.executeWithRequestId (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:140861:28)
        at Object.executeWithRequestId (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:139526:87)
        at Immediate._onImmediate (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:138892:41)
        at processImmediate (internal/timers.js:439:21)

I see this error:
    Could not find source file: '/Users/joshpike/Projects/aquipa/client/src/components/app/plant-general-details/plant-general-details.component.ts'.

    Error: Could not find source file: '/Users/joshpike/Projects/aquipa/client/src/components/app/plant-general-details/plant-general-details.component.ts'.
        at getValidSourceFile (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:130492:29)
        at Proxy.getSyntacticDiagnostics (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:130706:52)
        at IOSession.Session.syntacticCheck (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:139721:87)
        at checkOne (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:139753:27)
        at MultistepOperation.executeAction (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:138911:25)
        at /Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:138901:100
        at IOSession.Session.executeWithRequestId (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:140861:28)
        at Object.executeWithRequestId (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:139526:87)
        at Timeout._onTimeout (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:138901:41)
        at listOnTimeout (internal/timers.js:531:17)
        at processTimers (internal/timers.js:475:7)

That makes no sense, as that path exists. I suspect something to do with how workspace paths are handled in the update?

That error is in the TS Server so it unlikely any VS Code changes around workspaces could have broken things. It's possible something with the electron update file watching could have changed something, although we would generally expect other extensions to be effected as well
Can you share the project or small repo project so I can try to investigate?

deleting and reinstalling vscode fixed the issue...

false alarm still a problem

its tied to the typescript version

TS 3.6.4 -> 3.7.2 is causing the issue

error in log:
Err 35    [11:21:8.644] Exception on executing command {"seq":9,"type":"request","command":"definitionAndBoundSpan","arguments":{"file":"/Users/joshpike/Projects/aquipa/client/src/components/app/plant-general-details/plant-general-details.component.ts","line":520,"offset":29}}:

    Could not find source file: '/Users/joshpike/Projects/aquipa/client/src/components/app/plant-general-details/plant-general-details.component.ts'.

    Error: Could not find source file: '/Users/joshpike/Projects/aquipa/client/src/components/app/plant-general-details/plant-general-details.component.ts'.
        at getValidSourceFile (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:130492:29)
        at Object.getDefinitionAndBoundSpan (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:130813:73)
        at Proxy.getDefinitionAndBoundSpan (/Users/joshpike/Projects/aquipa/node_modules/@angular/language-service/bundles/language-service.umd.js:71029:35)
        at IOSession.Session.getDefinitionAndBoundSpan (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:139891:83)
        at Session.handlers.ts.createMapFromTemplate._a.<computed> (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:139249:61)
        at /Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:140870:88
        at IOSession.Session.executeWithRequestId (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:140861:28)
        at IOSession.Session.executeCommand (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:140870:33)
        at IOSession.Session.onMessage (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:140893:35)
        at Interface.<anonymous> (/Users/joshpike/Projects/aquipa/node_modules/typescript/lib/tsserver.js:142208:27)
        at Interface.emit (events.js:200:13)
        at Interface._onLine (readline.js:314:10)
        at Interface._normalWrite (readline.js:459:12)
        at Socket.ondata (readline.js:170:10)
        at Socket.emit (events.js:200:13)
        at addChunk (_stream_readable.js:294:12)
        at readableAddChunk (_stream_readable.js:275:11)
        at Socket.Readable.push (_stream_readable.js:210:10)
        at Pipe.onStreamRead (internal/stream_base_commons.js:166:17)

Could not find source file is a weird error, that path DEFINITELY exists.


No handler found for the command: 'workbench.action.files.closeFile'

After installing Sublime Keybindings cmd-w no longer closes the currently open file.  This error is displayed across the top instead of closing the file:
No handler found for the command: 'workbench.action.files.closeFile'. Ensure there is an activation event defined, if you are an extension.

Screenshot:

Platform: OS-X 10.9.5
Screenshots of all installed plugins:

After uninstalling Sublime Keybindings cmd-w works fine.

Interesting.. I'll take a look. Likely a typo

Yep. Looks like I mixed up the order. Fixed with ea86aaf23b02bf0c6f79a656c6aa665e24e6aab3. Give me a few and I'll re-publish


[Bug]: Animation Flags missing?

What modules are you seeing the problem on?
ScriptHookVDotNet3.dll (v3 SDK/API)
SHVDN Version
3.6.0
Game Version
V1.68
Bug Description
There is Animation Flags in Dot Net 3 that I can’t use
Steps To Reproduce
I can literally a lot of Animation Flags that I can’t use  in DotNet 3 dictionary but when I set one and got into the game Script Hook says that GTA.AnimationFlags does not contain that definition, it only works with the DotNet 2 Flags, but that flags are just like 6 and there is no the flag that I want
Link To Code Example
No response
The Current Behavior
Si with this bug I can’t make my script
The Expected Behavior
I am I doing something wrong or this actually a missing flags?

I believe there's nothing wrong with the code base of SHVDN with this issue.
If you are creating a script with raw source code without complication, I would think you didn't specify the API version, which fallbacks to use the v2 API in 3.6.0. Fallbacks to v3 in any builds since af0b731933ad4790d0eede52d82eae2bf92b2210 (v3.7.0 will have the same change). You specify the API version for uncompiled scripts like Script.3.cs, which will be compiled against the v3 API with .3 before the extension .cs or .vb.


Responsive pages

i want to contribute on this issue
Please assign me

### If it is not solved I would like to work on it

It can solved by adjusting the responsiveness of anchor <a> tag


MIFARE Ultralight C authentication

First of all, great work @pokusew, is amazing and super usefull having resources like yours. Thank you!
I'm on firts step on authentication of MIFARE Ultraligh C tags. Related to the doc I need to use a command to have the default tag key in return.
https://www.nxp.com/docs/en/data-sheet/MF0ICU2.pdf (page 15)
I'm using a block like that:
reader.on('card', async card => {
	console.log(`${reader.reader.name}  card ${card.uid} inserted`, card);
	try {
		const buffer = Buffer.from([0x1a, 0x00]);
		return resolve(await reader.transmit(buffer, 26));
	} cache (err) {
                 console.log(err);
        };
});

The main issue here is that always return a byteArray like that: Uint8Array(2) [99, 0]
instead of the expected 8 bytes string.
Maybe I am missing something but the following code: 0x1a, 0x00 is neccessary as first authentication step.
PD: Reader device: ACR1222L
Thank you all ;)

EDIT
Sending the following buffered command
Buffer.from([0xff, 0x00, 0x00, 0x00, 0x16, 0xd4, 0x42, 0x1a, 0x00])

I'm receiving the following:
d543019000

I'm missing something, becasuse as I read, "01" byte represent the response status as Timeout but I can't understand why.
Any help will be appreciated, thank you all! ;)

Hi @Franx0,
I am very sorry for the late reply. Thank you for posting your issue here. 🙂
I faced the similar issues when I implemented MIFARE Ultralight EV1 password authentication (PWD_AUTH).
I think, the 5th byte (0x16, the number of bytes to send) should be 0x04 as you are trying to send these 4 bytes:  0xd4 0x42 0x1a 0x00.
The following should work:
Buffer.from([0xff, 0x00, 0x00, 0x00, 0x16, 0xd4, 0x42, 0x1a, 0x00])

Explanation (might be useful for others):
(also see the MIFARE Ultralight EV1 example in nfc-pcsc exmap)
As yo figured out correctly, that the only way to send the command, seems to be via the ACR reader's Direct Transmit command. It's structure is as follows:
const directTrasmit = Buffer.from([
    0xff,
    0x00,
    0x00,
    0x00,
    data.length, // number of bytes to send
    ...data, // data to send (assuming a Buffer or an array of bytes)
]);

The data sent via Direct Transmit are passed directly to the internal NFC frontend chip (in case of ACR readers, that's NXP PN533 or similar). To communicate with the NFC card you have to use the InCommunicateThru as described in PN533 API docs. It's structure is as follows:
const inCommunicateThru = Buffer.from([
    0xd4, // Data Exchange Command:
    0x42, // InCommunicateThru
    ...apdu, // data which will be sent directly to the card
]);

So the final structure for sending any direct command to the card for ACR readers might look like this:
const cmd = Buffer.from([/* the bytes of your command */]);
Buffer.from([
    0xff, // Class
    0x00, // Direct Transmit (see ACR122U docs) (INS)
    0x00, // ... (P2)
    0x00, // ... (P1)
    0x02 + cmd.length, // Lc: Length of the Direct Transmit Payload
    // Payload (2 + cmd.length) bytes
    0xd4, // Data Exchange Command (see PN533 docs)
    0x42, // InCommunicateThru
    ...cmd,
]);

The response should like:
// d5 43 00 ... ... 90 00
// byte 0: d5 prefix for response of Data Exchange Command (see PN533 docs)
// byte 1: 43 prefix for response of Data Exchange Command (see PN533 docs)
// byte 2: Data Exchange Command Status – 0x00 is success (see PN533 docs, Table 15. Error code list)
// bytes 3-n: Data Exchange Command Response – response from the card
// last 2 bytes: ACR reader status code (should be always success – 90 00)

Please let me know if your able to make your command work.
Also I think, you might be interested in the MIFARE DESFire example, where the 3DES authentication is implemented. It might be similar to the 3DES authentication procedure on the Ultralight C.
Finally, I think that the MIFARE Ultralight C authentication would be great to have in nfc-pcsc examples. Once you finish it, feel free to open a PR to add it. Thanks. 😉
Hope it helps. 🙂

PS Don't forget to star ⭐my library, if you find it useful. 😃Thanks.

Hi @Franx0,
I am very sorry for the late reply. Thank you for posting your issue here.
I faced the similar issues when I implemented MIFARE Ultralight EV1 password authentication (PWD_AUTH).
I think, the 5th byte (0x16, the number of bytes to send) should be 0x04 as you are trying to send these 4 bytes:  0xd4 0x42 0x1a 0x00.
The following should work:
Buffer.from([0xff, 0x00, 0x00, 0x00, 0x16, 0xd4, 0x42, 0x1a, 0x00])

Explanation (might be useful for others):
(also see the MIFARE Ultralight EV1 example in nfc-pcsc exmap)
As yo figured out correctly, that the only way to send the command, seems to be via the ACR reader's Direct Transmit command. It's structure is as follows:
const directTrasmit = Buffer.from([
    0xff,
    0x00,
    0x00,
    0x00,
    data.length, // number of bytes to send
    ...data, // data to send (assuming a Buffer or an array of bytes)
]);

The data sent via Direct Transmit are passed directly to the internal NFC frontend chip (in case of ACR readers, that's NXP PN533 or similar). To communicate with the NFC card you have to use the InCommunicateThru as described in PN533 API docs. It's structure is as follows:
const inCommunicateThru = Buffer.from([
    0xd4, // Data Exchange Command:
    0x42, // InCommunicateThru
    ...apdu, // data which will be sent directly to the card
]);

So the final structure for sending any direct command to the card for ACR readers might look like this:
const cmd = Buffer.from([/* the bytes of your command */]);
Buffer.from([
    0xff, // Class
    0x00, // Direct Transmit (see ACR122U docs) (INS)
    0x00, // ... (P2)
    0x00, // ... (P1)
    0x02 + cmd.length, // Lc: Length of the Direct Transmit Payload
    // Payload (2 + cmd.length) bytes
    0xd4, // Data Exchange Command (see PN533 docs)
    0x42, // InCommunicateThru
    ...cmd,
]);

The response should like:
// d5 43 00 ... ... 90 00
// byte 0: d5 prefix for response of Data Exchange Command (see PN533 docs)
// byte 1: 43 prefix for response of Data Exchange Command (see PN533 docs)
// byte 2: Data Exchange Command Status – 0x00 is success (see PN533 docs, Table 15. Error code list)
// bytes 3-n: Data Exchange Command Response – response from the card
// last 2 bytes: ACR reader status code (should be always success – 90 00)

Please let me know if your able to make your command work.
Also I think, you might be interested in the MIFARE DESFire example, where the 3DES authentication is implemented. It might be similar to the 3DES authentication procedure on the Ultralight C.
Finally, I think that the MIFARE Ultralight C authentication would be great to have in nfc-pcsc examples. Once you finish it, feel free to open a PR to add it. Thanks.
Hope it helps.
PS Don't forget to star my library, if you find it useful. Thanks.

Hi @pokusew thanks for your reply. So many usefull doc in that comment ;), thank's a lot. Unfortunately I'm still not able to make the pcsc command works. Let me show you the two command responses:

Sending the following:

    let buffer = Buffer.from([0xff, 0x00, 0x00, 0x00, 0x04, 0xd4, 0x42, 0x1a, 0x00]);
    reader.transmit(buffer, buffer.byteLength);

In that case the response is the tag uid, not the 8byte token.

Sending this one:

    let buffer = Buffer.from([0xff, 0x00, 0x00, 0x00, 0x16, 0xd4, 0x42, 0x1a, 0x00]);
    reader.transmit(buffer, buffer.byteLength);

The response is "d543019000" as my previous comment. I can not figure out what I'm missing or what can be wrong. I debugged deep in order to see nothing weird in the response except this 01 byte that I assume it's an internal code from reader telling me that might exists a timeout issue.

EDIT:
After multiple tests and having in mind @pokusew advices, I'm able to tell all of you that @pokusew command were right, but I was having and error in the data length send in the transmit command, so in order to send the command you need something like this:
    let buffer = Buffer.from([0xff, 0x00, 0x00, 0x00, 0x04, 0xd4, 0x42, 0x1a, 0x00]);
    return reader.transmit(buffer, 16);

Thank's a lot @pokusew, I'll keep on working in the auth, let you know ;)

Hi @Franx0,
I've just noticed a very dangerous mistake in your previous code snippets. Therefore, I'd like to clarify the usage of reader.transmit() method. It might be useful for other people who come across this, as well. 🙂
The reader.transmit(data, responseMaxLength) method accepts two arguments:

data – a Buffer instance containing the data (bytes) to transmit
responseMaxLength – an integer specifying the maximum length (in bytes) of the expected response
In case you specify too small value and the response exceeds the given maximum length, the transmit fails and an error is thrown. If you specify much bigger value than needed, nothing happens – but don't do that for performance reasons.

So, this is the  ☠INCORRECT usage:
// DO NOT USE THIS CODE ☠
let buffer = Buffer.from([0xff, 0x00, 0x00, 0x00, 0x04, 0xd4, 0x42, 0x1a, 0x00]);
reader.transmit(buffer, buffer.byteLength); // <- this is INCORRECT usage ☠

And this is the ✅CORRECT usage:
let buffer = Buffer.from([0xff, 0x00, 0x00, 0x00, 0x04, 0xd4, 0x42, 0x1a, 0x00]);
reader.transmit(buffer, responseMaxLength); // <- fill appropriate expected length of the response

In your case (the first part of AUTHENTICATE command), the successful response should look like this:
d5 43 00 ... ... ... ... ... ... ... ... 90 00

byte 0: 0xd5 prefix for response of Data Exchange Command (see PN533 docs)
byte 1: 0x43 prefix for response of Data Exchange Command (see PN533 docs)
byte 2: 0x00 Data Exchange Command Status – 0x00 is success (see PN533 docs, Table 15. Error code list)
byte 3-n:. Data Exchange Command Response – response from the card – in your case, the 8bytes ek(RndB)
last 2 bytes: ACR reader status code (should be always success – 0x9000)
Total: 3 + 8 + 2 bytes = 13 bytes – that's the value you should use as the responseMaxLength in reader.transmit

In practice, when developing an implementation of some commands, I recommend trying the bigger value for responseMaxLength as first, then checking the layout and the length of the received response and finally if the real length matches the calculated value use it as  responseMaxLength.
Hope it helps. 🙂

PS Don't forget to star ⭐my library, if you find it useful. 😃Thanks.

Hi @Franx0,
I've just noticed a very dangerous mistake in your previous code snippets. Therefore, I'd like to clarify the usage of reader.transmit() method. It might be useful for other people who come across this, as well.
The reader.transmit(data, responseMaxLength) method accepts two arguments:

data – a Buffer instance containing the data (bytes) to transmit
responseMaxLength – an integer specifying the maximum length (in bytes) of the expected response
In case you specify too small value and the response exceeds the given maximum length, the transmit fails and an error is thrown. If you specify much bigger value than needed, nothing happens – but don't do that for performance reasons.

So, this is the  INCORRECT usage:
// DO NOT USE THIS CODE ☠
let buffer = Buffer.from([0xff, 0x00, 0x00, 0x00, 0x04, 0xd4, 0x42, 0x1a, 0x00]);
reader.transmit(buffer, buffer.byteLength); // <- this is INCORRECT usage ☠

And this is the CORRECT usage:
let buffer = Buffer.from([0xff, 0x00, 0x00, 0x00, 0x04, 0xd4, 0x42, 0x1a, 0x00]);
reader.transmit(buffer, responseMaxLength); // <- fill appropriate expected length of the response

In your case (the first part of AUTHENTICATE command), the successful response should look like this:
d5 43 00 ... ... ... ... ... ... ... ... 90 00

byte 0: 0xd5 prefix for response of Data Exchange Command (see PN533 docs)
byte 1: 0x43 prefix for response of Data Exchange Command (see PN533 docs)
byte 2: 0x00 Data Exchange Command Status – 0x00 is success (see PN533 docs, Table 15. Error code list)
byte 3-n:. Data Exchange Command Response – response from the card – in your case, the 8bytes ek(RndB)
last 2 bytes: ACR reader status code (should be always success – 0x9000)
Total: 3 + 8 + 2 bytes = 13 bytes – that's the value you should use as the responseMaxLength in reader.transmit

In practice, when developing an implementation of any commands, I recommend trying the bigger value for responseMaxLength as first, then checking the layout and the length of the received response and finally if the real length matches the calculated value, use the calculated and verified-is-correct length as the final responseMaxLength.
Hope it helps.
PS Don't forget to star my library, if you find it useful. Thanks.

Thank's a lot @pokusew, you're right. The code I posted was wrong. In my case was 16 bytes of response length but it was wrong too so I changed to 13 as you suggested. You're right, the better approach is to check that response length match with expected in order to control the correct transmit flow.
Thank you a lot ;)

Wow, thank you @pokusew, you saved me a lot of time on this :)

Hi @pokusew,
Could you please help me with 3DES authentication on my UWP app?
I’m using direct transmit, as per your suggestion above, to perform the authentication. At step 1, everything seems fine—I successfully get the EK(RndB). However, when I send back the EK(RndA || RndB'), I always receive D5-43-02-90-00. I’m quite confident that the logic for 3DES encryption/decryption is correct.
Could you provide any advice on this? Do I need to call any specific command to wake up or activate the card before starting the authentication process?
Below is my function based on your guide above:
public byte[] BuildDirectTransmitApdu(byte[] cmd)
{
    // Validate the input command
    if (cmd == null || cmd.Length == 0)
    {
        throw new ArgumentException("Command (cmd) must not be null or empty.");
    }

    // Build the APDU command
    List<byte> apdu = new List<byte>
    {
        0xFF,       // Class byte (CLA)
        0x00,       // Direct Transmit instruction (INS)
        0x00,       // Parameter 1 (P1)
        0x00,       // Parameter 2 (P2)
        (byte)(2 + cmd.Length), // Lc: Length of the payload (2 + command length)
        0xD4,       // Data Exchange Command (from PN533 docs)
        0x42        // InCommunicateThru command
    };

    // Add the payload (raw command)
    apdu.AddRange(cmd);

    // Return the constructed APDU
    return apdu.ToArray();
}

Thank you so much for your help!
P.S. I’ve already starred your library.

Hi @dongmai,
Thank you for posting your issue here. I'm happy to help you with the 3DES authentication. 🙂
Your BuildDirectTransmitApdu() function looks good! 👍 Furthermore, since you say that you are successfully getting the ek(RndB), I don't think there is any problem with that function.
To find out where the problem might be, I implemented the whole MIFARE Ultralight C 3DES authentication myself over the weekend. 😅 I have some MIFARE Ultralight C tags (and an ARC122U NFC USB reader), so I was able to iterate and try different things until I got it working. 🚀
Here is the result: 👉 examples/mifare-ultralight-c.js. It is fully functional and works correctly!  ✅ Moreover, it is thoroughly documented and includes detailed explanations. Below, I'll go over some of the key parts you might find useful.

🧑💻 You can quickly run the mifare-ultralight-c.js example locally and with the following commands (click to expand) to see if it works for you (it works for me on macOS with ACR122U USB NFC reader):
git clone https://github.com/pokusew/nfc-pcsc.git
cd nfc-pcsc
npm install
npm run example-mifare-ultralight-c

Most importantly, based on my testing, I have a few ideas where you might have a bug in your code:

Make sure you pass the 3DES authentication key in the correct byte order to your encrypt/decrypt DES-EDE-CBC (Two key triple DES EDE in CBC mode) functions.

The Ultralight C authentication key is 16 bytes, where the first 8 bytes (0-7) correspond to Key 1 (K1), and the second 8 bytes (8-15) correspond to Key 2 (K2).
The problem is that the required byte order of the individual keys (K1, K2) differs based on the context where the key is used (“little-endian” when writing to them to the memory, “BIG-endian” when using them in Node.js crypto.createDecipheriv/crypto.createCipheriv).
For example, the default factory key of MIFARE Ultralight C Buffer.from('BREAKMEIFYOUCAN!', 'utf-8') has to be passed as Buffer.from('IEMKAERB!NACUOYF', 'utf-8') to the Node.js crypto functions.
See my MifareUltralightC.swapKeyEndianness() function, which includes detailed explanations.
While developing my implementation, I also received the D5-43-02-90-00[^1] as the response to the AUTHENTICATE part 2 command (sending ek(RndA || RndB')) consistently every time I used the incorrect key. At first, I was sure my key was correct, so I thought the error must be elsewhere, but then I discovered the tricky byte order thing.
Note that if you use a symmetric auth key (resp. an auth key with symmetric K1 and K2 keys) (e.g., all 00 or all FF), the byte order requirement might go unnoticed. That's actually what helped me to uncover the problem, as my implementation worked for all 00 or all FF keys, but not for the default BREAKMEIFYOUCAN! key.

Make sure you use a correct IV in your encrypt/decrypt DES-EDE-CBC (Two key triple DES EDE in CBC mode) functions.

The first encryption/decryptions uses the all zero IV.
For the subsequent encryptions/decryptions, the IV must be the last ciphertext block.
It means that during the whole 3DES authentication, your code uses 3 different IVs. See my implementation for reference:

iv1 on line 255
iv2 on line 265
iv3 on line 279

During my testing, incorrect IVs resulted in an incorrect RndA being received from the Ultralight C. Surprisingly, the AUTHENTICATE part 2 command succeeded even though I expected it to fail with the D5-43-02-90-00 error as if an incorrect key had been used. Nevertheless, you have to use the correct IVs in order to be able to tell that the authentication process was really successful (RndA values match).

To answer your question:

Do I need to call any specific command to wake up or activate the card before starting the authentication process?

No, you don't. At least, it works for me on macOS with the ACR122U USB NFC reader. Especially if you are getting responses to the AUTHENTICATE part 1 command in the expected format D5-43-00-AF-xx-xx-xx-xx-xx-xx-xx-xx-90-00 (14 bytes, where xx is the 8-byte ek(RndB)) (you said you are), then it means the authentication process successfully starts, and you should be able to send the AUTHENTICATE part 2 command (and get a successful response) without any problems as well.
The only other problems I can think of are (a) that there might be a too-long delay between the AUTHENTICATE part 1 command and the AUTHENTICATE part 2 command and/or (b) that some other process in the OS is communicating with the MIFARE Ultralight C at the same time, thereby interrupting/resetting the authentication process.
Regarding (a): I tested it, and anything under 1000 ms is fine. Normally, it takes ~60 ms from the point before the AUTHENTICATE part 1 command is sent to the point when the response to the AUTHENTICATE part 2 command is received (including everything, e.g., logging, crypto, communication overhead, etc.).
Regarding (b): Before diving into this, I recommend running the mifare-ultralight-c.js example locally if possible (see the quick snippet 🧑💻 above) to see if that actually works for you. This would help us narrow down the possible causes and avoid spending time in the wrong places. If the example works for you, it means that the (b) hypothesis is wrong. On the other hand, if my example (with your correct auth key filled in) ended up with the same error as your code (D5-43-02-90-00), then it would point to the (b) hypothesis. To avoid any possible interference from the OS, you could try changing the connect share mode from SCARD_SHARE_SHARED to SCARD_SHARE_EXCLUSIVE. Currently, the SCARD_SHARE_SHARED value is effectively hardcoded in the nfc-pcsc's Reader class, but you could easily change it locally (see this patch) to test it with the mifare-ultralight-c.js example.

To sum up the key parts of the mifare-ultralight-c.js example:

MifareUltralightC.authenticate3DES() which internally uses:

MifareUltralightC.swapKeyEndianness()
MifareUltralightC.decrypt()
MifareUltralightC.encrypt()
MifareUltralightC._authenticatePart1()

MifareUltralightC._authenticatePart2()

Changing the MIFARE Ultralight 3DES authentication key

See lines 705-720.
On tags with the default factory config (AUTH0 = 0x30, AUTH1 = 0x00, LOCK 0-4 = 0x00), you can reprogram (write) the 3DES authentication key without prior authentication. By reprogramming AUTH0 (writing data to the corresponding conf pages) to a value 0x2C or lower, you can require authentication to change the authentication key (or 0x02A or lower to prevent unauthorized AUTH bytes changes as well)

🏁 That's all! Sorry for such a long reply. I hope it will help you and anyone else who comes across this. Please let me know if you make it work or if you need further help. 🙂
Good luck with your app! 🚀
[^1]: The 0x02 byte is the InCommunicateThru status. The NXP PN533 docs, Table 15. Error code list defines that 0x02 means ”A CRC error has been detected by the CIU”. During my testing, I got this error code consistently every time I used the incorrect 3DES key. Even though the error code might seem misleading, I think it is explainable with the following logic: Incorrect 3DES key -> incorrectly computed ek(RndA || RndB') -> Ultralight C compares RndB(s) and finds out they differ -> verification fails, Ultralight C stops the authentication procedure and returns an error, resp., it does not return the normal success response with a CRC, therefore the error is reported as a CRC error (0x02) by the NXP PN533.

@pokusew Awesome work! Thank you.

Hi @pokusew, I really appreciate your effort.
I think I might now understand what was wrong with my logic—I was using the incorrect byte order for the key in my encrypt/decrypt logic.
Thank you again!


[UNRELEASED] Amber OS Build 1603

Project dosent load just stucks at 100%

http://scratch.mit.edu/projects/99503483/
http://phosphorus.github.io/#99503483
Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36

It does this with a few of my projects as well...

Fixed


Missing sanitization callback function

Theme check issue (include-kirki.php):
REQUIRED: Found a Customizer setting that did not have a sanitization callback function. Every call to the add_setting() method needs to have a sanitization callback function passed.

Fixed in https://github.com/aristath/kirki-helpers/commit/4c8ce6980df24d5b608427aee2bbde2e867be7f0


Kernel list truncates Python version number

Environment data

VS Code version: 1.90.0
Jupyter Extension version (available under the Extensions sidebar): v2024.5.0
Python Extension version (available under the Extensions sidebar): v2024.8.0
OS (Windows | Mac | Linux distro) and version: Fedora 40
Python and/or Anaconda version: Various
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
Jupyter server running: Remote

Expected behaviour
When selecting a kernel for use with the Jupyter extension, the proper Python version numbers should be displayed.
Actual behaviour
The version numbers are truncated. Instead of "Python 3.11" or "Python 3.12" (the only versions I have installed) it shows just "Python 3.1" and this results in a warning about supported versions when I try and use them.

I am encountering the same issue with a new install of VS Code with the Jupyter extension. Sometimes the version is reported as 3.1, 3.1.-1, or 3.1.undefined as well, seemingly as random. The version numbers change between each time I re-open VS Code.

Duplicate of https://github.com/microsoft/vscode-python/issues/23580


Have searchString accept arrays

I was hoping to use this in a project, but I need to search for a large set of data in an array rather than a single string or regex.

Interesting! So if you could define an array of strings/regexps for the searchString field, would that work for you?
        short_tags: {
            files: {
                src: ["**/*.php"]
            },
            options: {
                searchString: [
                  /(<\?[^p])|(<\?$)/,
                  "a string"
               ]
                logFormat: "console"
            }
        },

Yes, a string or regex  in an array would be perfect! I have a list of pngs that I want to check if they being used anywhere in an application.

Hey @itsjustluck - I just released 0.1.7 that allows you to include an array of strings/regexps. Mind giving it a go? If you have any problems with it, just raise a ticket. :)

I've been taking a look at it. It's really slow. :-/
It's a really big query. I'm look for ways to lighten the load. I'm thinking about using Cheerio to thin out my search to just src and style attributes.

Cool! And yeah, there are definitely improvements that could be made to this repo too - speed-wise, I mean.


Provide bulk updates for metadata

This is to cover https://github.com/kytos-ng/kytos/pull/279#discussion_r1015943926,
Before implementing, the functionality it'll need to be refined to confirm it's aligned. Metadata bulk updates seem clear, but not filters for metadata we'll need to weigh the benefits, depending on the UIs and other clients it might be worth it otherwise it can be filtered at the runtime in an initial iteration since we know this collection won't be that large in practice.

Should the request changed to POST? Now that it will have a body in the request.

GET can also have a body, but let's simplify more here and stick with query params, let's also use MongoDB to it's full potential. We could potentially have metadata_key and metadata_value as query params, and then if a nested object like what telemetry_int needs to filter for is needed then we can use the "dot" object notation that is also compatible with mongo, for instance "metadata_key=telemetry.enabled" would try to filter the nested "enabled" key of a "telemetry" object. Wdyt?

For all the request, in case of error, is it preferable to make sure that every circuit_id sent exists before making changes to the databases or just process one by one?

Let's prioritize IO performance and minimize DB round trips, but let's keep the returned req status code coherently, and leverage MongoDB bulk_write operations - you can also check some examples we've been using on flow_manager - we won't use a transaction to simplify and avoid having to deal with transaction conflicts and other additional application locks that would be needed, and all existing objects will be updated even if one or few others don't exist, but when objects don't exist, then you let them dictate the status code of the request 404. Good thing is that bulk_write returns a counter of how many were modified so you always will be able to derive this efficiently.
Also, @Alopalao on POST and DELETE endpoints, maybe instead of evc_ids: List[str] we can have circuits_ids: List[str], wdyt? Looking into the current API the terminology circuit_id is already more widely used, so let's keep that consistent too.

For the GET /v2/evc/ an instance for this call would be /v2/evc?metadata_key=metadata.extra&metadata_value=data. But would not be better with /v2/evc?metadata.extra=data, this way we are not limiting the request to one key metadata. I think it is possible with request.args.keys().

For the GET /v2/evc/ an instance for this call would be /v2/evc?metadata_key=metadata.extra&metadata_value=data. But would not be better with /v2/evc?metadata.extra=data, this way we are not limiting the request to one key metadata. I think it is possible with request.args.keys().

Great idea, @Alopalao Yes, taking repeated metadata_key and metadata_value seems great. Regarding /v2/evc?metadata.extra=data I liked it, it's very convenient and to group them and parse would be easy too, since everything that starts with "metadata."


expanded !esi status

Currently !esi status returns, for example
esibot [9:53 PM]
:fire_engine: 3 yellow :fire_engine:
can we get that to list the affected endpoints, unless it's like more than 10?
Arbitary limit of 10, so that if all the endpoints are down, you don't get massive chat spam.
ie
:fire_engine: 23 yellow - calendar attendees, contract bids, market orders, market history, and 19 others
:fire_engine:

thanks for the suggestion, implemented

Looks awesome. Thanks!


feat: 1.6-compatibility stubs and tests

Resolves #109
Description
Changes needed for dbt-core 1.6.

Setting can_clone to False, as FB does not have clone functionality
Stubbing materialized_view materialisation since that's also not supported
Test for dbt debug
Test for mat. view failing
Additional util tests

Checklist

[x] I have run this code in development and it appears to resolve the stated issue.
[x] This PR includes tests, or tests are not required/relevant for this PR.
[x] I have run changie new and committed everything in .changes folder
[x] I have removed any print or log calls that were added for debugging.
[x] I have verified that this PR contains only code changes relevant to this PR.
[x] If further integration tests are now passing I've edited tests/functional/adapter/* to account for this.
[x] I have pulled/merged from the main branch if there are merge conflicts.
[x] After pulling/merging main I have run pytest on the included or updated tests/functional/adapter/.

Tests succeeding https://github.com/firebolt-db/dbt-firebolt/actions/runs/7756719836


centerwindow dispatcher Y offset

Description
centerwindow dispatcher centers a floating window. Doesn't care for your bar.
It would be awesome if it could realize the bar height and center according to that, or had an offset argument so we could pass our bar's height manually

done 901236a5356a3f249af7d55e5db69889e50256b8

@vaxerski please close


Fix Audit Log to record settings/values when creating new user

Corrected syntax when building Audit Log message/entry.
Screen shots attached:

https://bugzilla.redhat.com/show_bug.cgi?id=1394593

@h-kataria @dclarizio Ready for review.

I'm not sure what the second screenshot means (and would it be more demonstrable with a before screenshot), but as the PR is straightforward, I'll merge.

@simaishi Need Darga BZ for https://bugzilla.redhat.com/show_bug.cgi?id=1394593

Darga BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1404428

Darga Backport details:
$ git log -1
commit a12682b32f8cf722e5c7c26145a606b6cf41c439
Author: Jason Frey<EMAIL_ADDRESS>Date:   Tue Nov 22 13:41:11 2016 -0500

    Merge pull request #12786 from GregP/new_user_audit_log_values

    Fix Audit Log to record settings/values when creating new user
    (cherry picked from commit 2b75ba5bfbc6c9281a583ab17ba2c3ff039251bf)

    https://bugzilla.redhat.com/show_bug.cgi?id=1404428

Euwe backport details:
$ git log -1
commit eb5a7172e043c7ebf23c9ff664f1ff8ee813772c
Author: Jason Frey<EMAIL_ADDRESS>Date:   Tue Nov 22 13:41:11 2016 -0500

    Merge pull request #12786 from GregP/new_user_audit_log_values

    Fix Audit Log to record settings/values when creating new user
    (cherry picked from commit 2b75ba5bfbc6c9281a583ab17ba2c3ff039251bf)

    https://bugzilla.redhat.com/show_bug.cgi?id=1404427


Added a method for displaying the contents of a List object

Addresses issue #41
Added a method display() inside list object for displaying all the contents of the List object.
For the following code snippet:
from intermine.webservice import Service
flymine = Service("www.flymine.org/query",token="SOMETOKEN")
l = flymine.get_list("List")
l.display()

The output will be
Row 1:
score = None
symbol = 'eve'
length = 1477
name = 'even skipped'
description = None
scoreType = None
secondaryIdentifier = 'CG2328'
primaryIdentifier = 'FBgn0000606'
briefDescription = None
cytoLocation = '46C10-46C10')

Row 2:
score = None
symbol = 'zen'
length = 1331
name = 'zerknullt'
description = None
scoreType = None
secondaryIdentifier = 'CG1046'
primaryIdentifier = 'FBgn0004053'
briefDescription = None
cytoLocation = '84A5-84A5')

Row 3:
score = None
symbol = 'bib'
length = 10894
name = 'big brain'
description = None
scoreType = None
secondaryIdentifier = 'CG4722'
primaryIdentifier = 'FBgn0000180'
briefDescription = None
cytoLocation = '30F5-30F5')

Hello @arun-y99! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

In the file intermine/lists/list.py:

Line 248:10: E225 missing whitespace around operator
Line 252:14: E225 missing whitespace around operator
Line 253:14: E225 missing whitespace around operator
Line 254:23: E225 missing whitespace around operator
Line 255:18: E225 missing whitespace around operator
Line 256:14: E225 missing whitespace around operator

Hello! I am getting this error in the Travis CI tests. Can anyone explain why this is happening and what can i do to solve it?
$ ./config/travis/init-solr.sh
--2019-08-09 17:46:38--  http://archive.apache.org/dist/lucene/solr/7.2.1/solr-7.2.1.tgz
Resolving archive.apache.org (archive.apache.org)... <IP_ADDRESS>
Connecting to archive.apache.org (archive.apache.org)|<IP_ADDRESS>|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 153189183 (146M) [application/x-gzip]
Saving to: ‘solr-7.2.1.tgz’

solr-7.2.1.tgz      100%[===================>] 146.09M  25.8MB/s    in 6.8s

2019-08-09 17:46:45 (21.6 MB/s) - ‘solr-7.2.1.tgz’ saved [153189183/153189183]

Your current version of Java is too old to run this version of Solr
We found version 11.0.2, using command '/usr/local/lib/jvm/openjdk11/bin/java -version', with response:
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)

Please install latest version of Java 1.8 or set JAVA_HOME properly.

Debug information:

JAVA_HOME: /usr/local/lib/jvm/openjdk11
Active Path:
/home/travis/virtualenv/python3.4.8/bin:/home/travis/bin:/home/travis/.local/bin:/usr/local/lib/jvm/openjdk11/bin:/opt/pyenv/shims:/home/travis/.phpenv/shims:/home/travis/perl5/perlbrew/bin:/home/travis/.nvm/versions/node/v8.12.0/bin:/home/travis/.rvm/gems/ruby-2.5.3/bin:/home/travis/.rvm/gems/ruby-2.5.3@global/bin:/home/travis/.rvm/rubies/ruby-2.5.3/bin:/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.11.1.linux.amd64/bin:/usr/local/maven-3.6.0/bin:/usr/local/cmake-3.12.4/bin:/usr/local/clang-7.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/home/travis/.rvm/bin:/home/travis/.phpenv/bin:/opt/pyenv/bin:/home/travis/.yarn/bin
Your current version of Java is too old to run this version of Solr
We found version 11.0.2, using command '/usr/local/lib/jvm/openjdk11/bin/java -version', with response:
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)

Please install latest version of Java 1.8 or set JAVA_HOME properly.

I am getting this error for all the versions of python.

Hi @arun-y99! Thanks for this great pull request.
That travis issue is us not you. It looks like it's using JDK11 instead of JDK8. (We use a java app to test the Python code). I am looking for a fix!

Addressing issue #21
Added a function get_random_token() inside the Service object for requesting anonymous session tokens.
Terribly sorry. I committed my code from my local repo to my forked repo. But the commits turned up here. I wanted to create a separate pull request for addressing issue #21.

Hi! @julie-sullivan, I did some digging on the internet, and found out that openjdk8 can be used in the Travis CI tests with the trusty distro. There seems to be a problem with jdk8 on xenial.  Can you please consider this?
https://travis-ci.community/t/install-of-oracle-jdk-8-failing/3038/6

@arun-y99 thanks for the second issue fix! - don't worry too much - generally what happens is if you make a pr on one branch (e.g. dev), until it's merged all other commits pushed to that branch on your repo also end up on the same PR. The best way to mitigate this would be something like this:
Working on issue A:
git checkout intermine/dev # get a fresh copy of the intermine dev branch
git checkout -b fix-for-issue-a # move the fresh copy of dev to a new branch dedicated to the issue you're working on
# now do your work, commit, etc.
git push origin fix-for-issue-a
# now make a PR

Now that's done, to work on issue B:
git checkout intermine/master # get another fresh copy of the intermine master branch - this definitely doesn't have the work from your previous PR in it, unless it's already been merged
git checkout -b fix-for-issue-b # move the fresh copy of dev to a new branch dedicated to the issue you're working on

when you push fix-for-issue-b it will be on a different branch to your first PR, so it won't magically combine :)

Hi @yochannah thanks for the review
Yes we can rename it to get_anonymous_token()
Also, token = get_random_token("http://www.flymine.org/flymine") will throw an error.
get_random_token() is a function which belongs to the Service class.
Functions which belong to classes cannot be accessed without the object of the class which it belongs to.
So, token = get_random_token("http://www.flymine.org/flymine") is essentially calling a function inside a class

Tested list fetching with a random token and tested getting a token directly - all good. Thanks @arun-y99!!


Scrolling in overflow block

It not work when animated items in  overflow block

Hi, thanks for calling an issue. Could you please provide me with an example on codepen? so I can verify it straight away and then put it on a roadmap.

something like this http://codepen.io/webcredo/pen/PzNmWe

Hi @webcredo,
AOS currently doesn't work inside other block than window. It checks position of elements based on window viewport.
It seems like I already explained it here #9


Thank you & Requests for Improvements

Hey All,
First, I want to thank you for the work so far! Great job!
I had a couple of requests for things I would love to see added, edited or improved. Let me know if you would like separate issues for these.

Change the value for splitting panes vertically to |

I have done this in my .tmux.conf myself, but I believe it is a simple edit from _ and makes more sense

Add the day to the right status line (i.e. Fri 17 April)

Made an edit in ./tmux.conf.local to support this with %a

Hello @mdigga39 👋
To customize bindings to your preferences, redefine them at the end of your ~/.tmux.conf.local copy.
Please do not change ~/.tmux.conf otherwise you'll have to resolve merge conflict when updating this configuration to latest master.

Understood and will convert back to original. Thanks!


CI/CD Build fails, but Pull Request Build Succeeds

During Pull Request all Checks pass and Build build succesfully, but then trying to run the CI/CD Build fails.
Initialization,
CheckForUpdates and
PostProcess runs but Builds aren't trigerred.
Assuming it has to do with the following Warning:

Please Advise

logs_22809441121.zip
Attaching Log Files for reference.

Here is the Pull Request Build, just before CI/CD on the Merge.

If you include logs instead of screenshots, we have much more info.

It looks like you have a secret, which contains a value used by environments or like.
Maybe run the troubleshooting workflow to see whether that tells you anything.

Figured out the reason.
The AZURE_CRENTIALS secret specified was a prettyfied json.
{
 clientId: <clientid>
 ...
}

but the curly braces on seperate lines caused the GitHub Actions to mark all curly braces as part of secret, so any output with json in was masked as 3 asterixes where curly braces are found:
example in image below as Markdown treats the Asterisks as bold  when trying to use as is:

Hi JacoBothaDyn,
We're running into the same issue. You found the issue, but what is the fix? Move the curly braces in AZURE_CREDENTIALS so that they are not on separate lines by themselves?
Thanks in advance for your assistance, Tom

The fix is to remove all spaces and newline characters from the json - make it a compressed json.


Mutli-select does not pass the id props to the input

Issue and Steps to Reproduce
Mutli-select does not pass the id props to the input
Versions
Latest
Screenshots

Expected
<input id="responsible_sa_id">
Actual
<input id="react-select-3-input">
Additional Details

Installed packages

The id can be passed via a props called inputId, marking the issue as resolved


Node_Animation Model Group

Implements the Node_Animation model group.
Changed some of the runtime animation objects from structs to classes because the structs were causing issues with how we've been passing references.
Addresses several parts of #414
Fixes #404
TODO:

[x] I'm not sure I've correctly implemented a model for animating a curve that doesn't start at 0.
[x] A proper texture still needs to be created to show which part of the model is supposed to be facing which way.
[ ] The validator shows an error in the bufferView for "Animation Sampler Output" for all of the models that are doing rotations. I'm not sure of the exact cause. "Accessor element at index # is not of unit length: 2."
[ ] I'm sure we can pick better values for the animations that what is currently plugged in.
[ ] Maybe we should add a notes column to describe the expected animation for each model?

Looking into #428 tomorrow. The model also appears to change scale when rotating, but I'm not sure if that is an issue or not.


Add .postfix-round to

It looks like buttons have been omitted from the .postfix-round selector in _forms.css:
.postfix-round.row.collapse {
  input,
  textarea,
  select { @include radius(0); @include side-radius($default-float, $button-round); }
  .postfix { @include radius(0); @include side-radius($opposite-direction, $button-round); }
}

Is this intentional, or could we also add button in addition to input, textarea, select?

Thanks for pointing this out. Fixed!
https://github.com/zurb/foundation/commit/2bc99aa95371a9127dde28b790306760e8cbbb04


Fix lowering of BrOnNotEmpty

When we finish iterating the ForInCache in JIT'ed code and if the cache is completed, we can exit the loop.
We always generate BrOnEmpty in the byte code and it doesn't get inverted to BrOnNotEmpty usually.
But for BrOnNotEmpty, the target of the branch is the loop body instead of loop end.  We need to use the label after the instruction when the branch inversion happens.

@pleath  pls review.

Going to check into release/1.4


fix: invalid regular exp on windows

fixes #11
for now we don't need to replace all the backslash to slash

fixed in 0.2.2


make sure to unlink tmpfile when a FilesystemException is thrown

Fixes an issue with tmpfiles not being deleted in the cases where either the tmpfile could not be written to, or when writing the processed image.

Any feedback on this PR?

Hey @deckchairlabs! So sorry for the total lack of response on this PR.
I believe this has been fixed in #238.
Thanks either way! 👍


Transcluded directive is not rerendered on parent model update

While working on an project, my colleagues and I faced an issue with transcluded directives.
A parentDirective contains a directive  with transclusion enabled (transcludeDirective). The latter has another directive, innerDirective, which contains reference to parent model item.color. When the parent model item is updated, innerDirective still has the old value of item.color.
We came up with two possible solutions. Either removing transcludeDirective, which is not a solution in our case, or manually set model with empty object on parentDirective initialization, which seems to be unnecessary.
Please see following jsbin:
https://jsbin.com/siwoje/2/edit?html,js,output
Thank you.

This is just a more elaborated version of the following (warning, there might be typos):
1/ Create a parent scope and a child non-isolated scope.
2/ In the child scope execute childScope.$eval("foo.bar = 1")
3/ In the parent scope execute parentScope.$eval("foo = {}")
In this case, parentScope.foo.bar !== 1.
Swapping (2) and (3) will cause that parentScope.foo.bar === 1
This is the intended behavior.
I recommend that you read https://github.com/angular/angular.js/wiki/Understanding-Scopes it is somehow outdated but still relevant.


chore: remove .prettierrc.json

Remove .prettierrc.json file. It's  a duplicate of  .prettierrc

 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.李瑞丰🤡 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

 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.李瑞丰🤡 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Create Posts “20230109-my-hat-off-to-you-sir”

Automatically generated by Netlify CMS

👷 Deploy Preview for thehashtable processing.

Name
Link

🔨 Latest commit
eb146962f562e1ec688631fecb2af86bb29acaa8

🔍 Latest deploy log
https://app.netlify.com/sites/thehashtable/deploys/63bc561f795b790008318a74


RuleSet into (ActiveRuleSet, RuleSet) based on their responsibility

This change is

@Chibikuri don't forget to merge the latest master

@Chibikuri don't forget to merge the latest master

Thanks, I did.

@Chibikuri don't forget to merge the latest master


[SR-13899] [Sema] Adjustments on coerce to checked cast diagnostics

Based on https://forums.swift.org/t/missing-conditional-cast-fix-it/42282
This proposes to adjust coerce to checked cast diagnostic to be broken into the diagnostic and fix-it note.
Also, cases were the coercion result has a value to optional restriction e.g. conditional binding
let any: Any = 1
if let int = any as Int { // an `as!` here would lead to another malformed code because conditional binding expects an optional type

}

we suggest conditional downcast  as? instead of force downcast.
The break into a note is more like a proposal not really the SR, so let me know what you think :)
cc @dan-zheng

Resolves SR-13899.

@swift-ci Please smoke test

Thanks 👊

@xedin Let me know what you think of this approach :)

@swift-ci Please smoke test

Thanks @xedin!


Functional Architecture Update

Changes:

Registration: Removed deduplication and added Registration Methods
Administration: Changed System Configuration to Program Configuration
Program Management: Removed Notification and added Entitlement Voucher
Payment Management: Removed Voucher and aligned Payment Connectors
Payment Management: Added Accounting as an encapsulation for Accounting, Reconciliation, and Reports
Removed Payment Manager and Administrator, and added Super Administrator and Program Administrator
Notification: Removed Mail and SMS
Added background color and general alignment

Closing the PR from this repository.


expose flutter:upgrade

Expose flutter upgrade; fix https://github.com/flutter/flutter/issues/1475. Companion PR here: https://github.com/flutter/atom-flutter/pull/41.
@danrubel

LGTM


EBUSY ERROR

Environment
Knex version: ^0.16.5
Database + version: mysql version ^2.17.1
OS: centos
Bug

Explain what kind of behaviour you are getting and how you think it should do

I have cronjob run 30s per time. I connect to mysql with knexjs for get data and update it.
Every things seem ok until cronjob run 200 times then knexjs throw error: getaddrinfo EBUSY

Error message
Error: getaddrinfo EBUSY database_host_name database_host_name:3306
When I restart server it is ok.

Doesn't seem to be related to Knex specifically at all: https://github.com/npm/npm/issues/13461

Doesn't seem to be related to Knex specifically at all: npm/npm#13461

I don't run npm install. I run my code and my server throw error of knexjs package.

cannot reproduce, also 99.9% sure that this is nothing specific to knex.


Text to PDF button is not functioning

I would like to work on this issue

@shivshankar9 if no one is working on this issue can I start working on it❓

@shivshankar9 if no one is working on this issue can I start working on it❓

Yes @devikavarshney

@shivshankar9 hey can you explain the difference between this issue assigned to me and the #11 issue.

Try to resolve this asap,
We will merge first approved PR only,

Working on it
On Mon, Jan 3, 2022, 10:00 Shiv @.***> wrote:

Try to resolve this asap,
We will merge first approved PR only,
—
Reply to this email directly, view it on GitHub
https://github.com/shivshankar9/Student-portal/issues/74#issuecomment-1003866554,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMWX37HW2BHTSRO4MRM2GMTUUEQ7RANCNFSM5KIE6W3Q
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were assigned.Message ID:
@.***>

@ARUNBALACHOCKALINGAM @shivshankar9 Can we collaborate mine is almost completed have to do some changes.

@shivshankar9, this issue was resolved #11


redirect trailing slash on JSON API (fixes #4016)

Fixes #4016
My thought with fixing this issue was creating a route for the URLs with trailing slashes that redirect back to the non-slash URL.
Obviously just creating a redirect would be ideal. However, as noted in #4012, if a package does not exist, a redirect loop would occur since @notfound_view_config(append_slash=HTTPMovedPermanently) appends slashes to URLs when packages do not exist.
Here is what the request-response cycle looks like now (it works the same for release versions):
User requests https://pypi.org/pypi/pip/json, receives 200.
User requests https://pypi.org/pypi/pip/json/, receives 301 https://pypi.org/pypi/pip/json.
User requests https://pypi.org/pypi/badpackage/json, receives 301 https://pypi.org/pypi/badpackage/json/.
User requests https://pypi.org/pypi/badpackage/json/, receives 404
Note that the last 404 comes directly from https://pypi.org/pypi/badpackage/json/, not https://pypi.org/project/badpackage/json as it used to. I could not find any reason that would cause an issue, but thought I'd mention it in case I'm not aware of something.

The redirects now rely on existing routes.
Thanks for the review and please let me know if there's anything else!

I'm a little concerned about the change in existing behavior here, namely that https://pypi.org/pypi/badpackage/json will return a 301 instead of a 404 as it does now.
@stloma Do you think we change the behavior to be:

https://pypi.org/pypi/pip/json -> 200
https://pypi.org/pypi/pip/json/ ->  301 https://pypi.org/pypi/pip/json
https://pypi.org/pypi/badpackage/json -> 404
https://pypi.org/pypi/badpackage/json/ -> 404

I think there's a slight misunderstanding in my original comment. https://pypi.org/pypi/badpackage/json has always returned a 301 due to this code:
https://github.com/pypa/warehouse/blob/da5ca10a8f56fd33685ef3c0b46aec89154412f2/warehouse/views.py#L58
The difference I noted from the original behavior is that https://pypi.org/pypi/badpackage/json/ returns a 404 now, instead of a 301 to https://pypi.org/project/badpackage/json/
Here's the current behavior on master:
https://pypi.org/pypi/badpackage/json -> 301 https://pypi.org/pypi/badpackage/json/
https://pypi.org/pypi/badpackage/json/ -> 301 https://pypi.org/project/badpackage/json/
https://pypi.org/project/badpackage/json/ -> 404
Here's what this PR does:
https://pypi.org/pypi/badpackage/json -> 301 https://pypi.org/pypi/badpackage/json/
https://pypi.org/pypi/badpackage/json/ -> 404
So the last 404 comes directly from https://pypi.org/pypi/badpackage/json/, not https://pypi.org/project/badpackage/json/.

Thanks @stloma!


Study new items

Description
Take this spike to study new items to be added. Add the items found in the comments below.

An item that spawns a companion. Leveling up this item will make it fire more often and deal more damage.
Another one could be spawning, from time to time, a cone in front of the player that deals damage to the nearby enemies. Leveling up this item increases the cone and the damage dealt.

This issue was closed because the project was archived


iptables: Extension MASQUERADE revision 0 not supported

I've been getting this error with the latest image (haven't tried previous ones)
Warning: Extension MASQUERADE revision 0 not supported, missing kernel module?
iptables v1.8.9 (nf_tables): Could not fetch rule set generation id: Invalid argument

Using legacy version of iptables by running
apk add iptables-legacy
rm /sbin/iptables
ln -s /sbin/iptables-legacy /sbin/iptables

Fixed the issue
Could you take a look to fix the image itself? Thanks!

What platform/OS do you run the OpenVPN container on so that I can replicate this?
Could you please restart your container and send me its full log please? Thanks.

I'm on a Synology NAS
DSM 7.1.1-42962 Update 6
Docker version 20.10.3, build 55f0773
I don't have much more logs than that
david:~$ docker run --volume openvpn-data:/etc/openvpn --rm -it --entrypoint sh --cap-add=NET_ADMIN lisenet/openvpn
/ # ovpn_run
Warning: Extension MASQUERADE revision 0 not supported, missing kernel module?
iptables v1.8.9 (nf_tables): Could not fetch rule set generation id: Invalid argument

Using this image works
FROM lisenet/openvpn

RUN apk add iptables-legacy && \
         rm /sbin/iptables && \
         ln -s /sbin/iptables-legacy /sbin/iptables

CMD ["ovpn_run"]

From https://gitlab.com/postmarketOS/pmaports/-/issues/2122#note_1418204524

Does Synology NAS use an old version of iptables (legacy) and not nftables? If so, that might explain the problem that you are having.
This is a tricky one to be honest with you because the world (Red Hat, Canonical) is moving to nftables. It's been the default backend for the firewall since RHEL 8 and Ubuntu 21.10.

I'm getting the same error. Would be great to support an environment variable allowing the usage of legacy iptables for use cases such as Synology NAS where the kernel version is not user-upgradable.

Where would you expect to have an environment variable defined? Inside a Dockerfile so that it builds an image with iptables-legacy if say "env legacy" is set to true? Or would you build the image with iptables-legacy installed by default, and then use some clever logic to invoke it based on some environment variable?

My preference would be to build the image with iptables-legacy and conditionally use the binary iptables or nftables based on the environment variable.


version "1.12.10983.0" will appear in winget upgrade but can`t be installed (Win10)

Windows Terminal version
1.12.10982.0
Windows build number
10.0.19044.0
Other Software
No response
Steps to reproduce
precondition: winget installed.

installed the latest version (1.12.10982.0) for win10.
run "winget upgrade" in WindowsTerminal, you will see the avaiable "1.12.10983.0" for Microsoft.WindowsTerminal. But you cant upgrade to this version, seems its the only for Win11.

Expected Behavior
Please dont display this upgrade on Win10 terminal, if it cant be installed. I always keep my "winget upgrade" clean. But this upgrade of unsupported is annoying.
Actual Behavior
The un-supported version "1.12.10983.0" displayed when running "winget upgrade" in Win10 terminal.

I'm sorry, we do not control how WinGet displays updates. You will have to take this up on their repository.


Enable Issues on https://github.com/catenax-ng/product-ontology for Planning to @igorsvetlov

Please enable Issues on https://github.com/catenax-ng/product-ontology
for planning to me.

HI @igorsvetlov,
usually, we do not activate issues on catenax-ng repositories, since this org is just a step in between moving to eclipse-tractusx.
In the long term, catenax-ng will most likely be removed/archived as a GitHub Org and therefore the whole planning effort lost.
So I would ask you to consider planning on the respective eclipse-tractusx repositories.
Right now I am not sure, but isn't ontology already migrated to repository in our Eclipse GitHub org? This here maybe? https://github.com/eclipse-tractusx/knowledge-agents

Hi @stephanbcbauer,
want to take you into the loop, because in the meantime, I got a hint, that this support issues has its roots in this issue from the open planning.
What are your thoughts on that. Is there already some kind of guidance on how teams can plan their "sub-stories" to the overarching issues?
My suggestion is still, to have the "sub-stories" as issues on the component repository. In this case I guess one of the "knowledge" repos. Then you can link the "sub-story" to the overarching issue. This is totally possible across repos
The Story text from the comments could just be used as issue description and linked. This would also have the benefit of seeing the status (open/closed) on the overarching issue.

@SebastianBezold , @igorsvetlov to be honest we didn't talk/think about linking issues from catenax-ng to tractus-x. Cause we always thought about open source and thats tractus-x. And i wouldn't like to mix it.
I agree and like @SebastianBezold suggestion. Is there a tractus-x repository which could be a fit for your created sub-stories?
Is there already a plan to move your repositories from catenax-ng to tractus-x?

Hi @igorsvetlov,
would it be ok for you to use the repositories on eclipse-tractusx for further planning?
In case you want to set labels and are not yet added as "Tractus-X project contributor", feel free to open an issue here using this template
If there are missing labels, that you need for your planning, just reach out to any committer, via mailing list or Matrix chat. Every committer can create labels on the eclipse-tractusx repositories

I'll close the issue for now. If there are any further questions @igorsvetlov, feel free to reopen it


How can I getValue and disable validation?

I want to allow incomplete form data to be stored while switching between components.

Hi,
How about using the onChange API? https://github.com/gcanti/tcomb-form/blob/master/GUIDE.md#adding-a-default-value-and-listening-to-changes


Method sync not remove row from deleted_at with SoftDeletes

Laravel Version: 8.12
PHP Version: 7.4.3
Database Driver & Version: MariaDB 10.4.14

Description:
I have 3 tables, 1 being a Many To Many relationship table

vehicles
accessories_vehicle (N-N)
accessories

When I am going to update a particular vehicle, I receive the IDs of the accessories that I want to link or undo the link as a parameter of my request.
Imagine that when I registered this vehicle, I had the accessory [1,2,3], after a while the user can go and remove accessory 3 or any other one he had, or can he add it correctly? He can send the 3,4,5, so the accessory 1,2 must be removed.
When I make $vehicle->accessories()->sync([3,4,5]); works perfectly, it removes the 1,2 accessories and adds the 4,5. Accessory 3 remains on the base as it has not yet been removed.
Soon after, the user wants to return accessory 2, when he sends the request he executes in this way.
$vehicle->accessories()->sync([2,3,4,5]);
However accessory 2 is not set to NULL in the deleted_at field, it remains "deleted", I cannot do this with sync.
Also, a new record is not created with accessory 2, I don't know why you don't make any of the options.
Steps To Reproduce:
`class Vehicle extends Model
{
use SoftDeletes;
protected $fillable = [
    'placa',
    'renavam',
    'cor_id',
    'revenda_id',
    'endereco_id'
];

public function accessories()
{
    return $this->belongsToMany(Accessory::class)
        ->using(AccessoriesVehicle::class)
        ->withTimestamps();
}

}`
`class Accessory extends Model
{
use SoftDeletes;
protected $fillable = [
    'nome'
];

}`
class AccessoriesVehicle extends Pivot {     use SoftDeletes; }

Hey there,
Can you first please try one of the support channels below? If you can actually identify this as a bug, feel free to report back and I'll gladly help you out and re-open this issue.

Laracasts Forums
Laravel.io Forums
StackOverflow
Discord
Larachat
IRC

Thanks!

See docs about:

Note: Pivot models may not use the SoftDeletes trait. If you need to soft delete pivot records consider converting your pivot model to an actual Eloquent model.

https://laravel.com/docs/8.x/eloquent-relationships#defining-custom-intermediate-table-models