markdown_inline can't reparse old trees (web-tree-sitter)

I can reproduce this one in the tree-sitter playground on the latest master. From the root:
cd tree-sitter-markdown-inline
tree-sitter build-wasm . && tree-sitter playground

Wait for the playground to open. Type some text with markdown formatting. The tree will not reflect the content.
Select everything you've written, cut it, then paste it again. The tree should be correct.
Change anything — even add a space at the very end of the line — and the tree will start to incorrectly shed nodes.
I was able to reproduce this just by pasting and editing the following text:
Lorem ipsum _dolor_ sit amet, consecuetur _adipiscing_ elit. Lorem ipsum _dolor_ sit amet, consecuetur _adipiscing_ elit. Lorem ipsum _dolor_ sit amet, consecuetur _adipiscing_ elit.

After pasting that content, add a space character anywhere, and you'll notice that the first emphasis node disappears from the tree. The next change (even just deleting the new space) will cause the second emphasis node to disappear, and so on.
This is a symptom of what I observed on my own with the web-tree-sitter bindings: if you call parser.parse(someText, null), everything parses fine; if you call parser.parse(someText, existingTree), nodes get lost. I have no idea if this occurs under the rust or node bindings, but I've worked with at least a dozen tree-sitter parsers under web-tree-sitter and this is the first time I've observed any symptom like this.

Hm, I'll have to investigate, but on first glance this seems like a problem with tree-sitter itself and not this specific parser. For "proper" parsers it shouldn't be possible to get this behaviour, as the parser does not actually define the incremental parsing process. Instead incremental parsing is handled implicitly by the tree-sitter library.
The question is of course if this parser is "proper" since it does have a substantial amount of handwritten C code, but I'll have a look at that. Otherwise it might well be that this specific parser hits some edge-case bug in tree-sitter, since it is at least one of the most complex tree-sitter parsers out there and it uses a lot of "conflicts" which are probably the most problematic functionality of tree-sitter.

Isn't this exactly https://github.com/tree-sitter/tree-sitter/issues/2145?

Isn't this exactly tree-sitter/tree-sitter#2145?

No, not that I can tell. The symptom described in that issue is that the offsets don't change. (At any rate, I can't reproduce that symptom on the official tree-sitter playground when following the exact instructions described by the issue author.)
The symptom in this issue is that the tree does re-parse, and (as far as I can tell) offsets do change, but something about the change seems to cause the markdown_inline parser to drop, or fail to recognize, nodes — seemingly exactly one node with each re-parse.

More about this odd behavior: if you change all the _s in my example to *s, everything appears to work just fine. There is something about underscores in particular that seems to be triggering this.
Switch all the emphasized phrases to be double-emphasized with **s and they're stable. But change them to __s and they won't show up until you select-all, copy, and paste. The first incremental change thereafter switches the strong_emphasis to emphasis (and makes the parser fail to notice one pair of underscores); the next change removes emphasis altogether.

Hm I see. However underscores and stars do work slightly different according to the spec, so this might be entirely sensible. But it gives a hint to what the problem might be.
Specifically the parsing of emphasis delimiters depends on what comes after them (which is not a big problem) and what comes before them. The latter is handled in a quite hacky way, so thinking about it now I'm guessing that that's what breaks the incremental parsing, but I'll have to test this.

Faced with user reports of crashes on ikatyang/tree-sitter-markdown (which we've been using for Markdown support in Pulsar), I'm revisiting this issue, as it's the main blocker for us to adopt this parser for our Markdown needs.
nvim-treesitter#4716 was strangely reassuring that the root cause may have nothing to do with web-tree-sitter. I can still reproduce this issue in a Pulsar environment, but — frustratingly — can't reproduce it in the playground anymore.
If this issue doesn't manifest in a test corpus or when testing tree-sitter-markdown_inline in isolation, could it be related to the integration between the markdown and markdown_inline parsers? We've been treating the latter as a simple injection into the former's inline nodes the way Neovim seems to be doing it; that's what you've envisioned, right?
At some point I'm going to open up scanner.c and just try some stuff to see if it helps. @MDeiml, you referred to some hackiness regarding the parsing of underscores; if you could elaborate on that a bit, I'd be happy to attempt a different strategy to see if it fixes this bug.

If this issue doesn't manifest in a test corpus or when testing tree-sitter-markdown_inline in isolation, could it be related to the integration between the markdown and markdown_inline parsers? We've been treating the latter as a simple injection into the former's inline nodes the way Neovim seems to be doing it; that's what you've envisioned, right?

Exactly. For complete correctness the named children of the inline node have to be excluded from the injection (this is for things like quotes, where the inline content is more a "visual block" than a byte range in the file).

At some point I'm going to open up scanner.c and just try some stuff to see if it helps. @MDeiml, you referred to some hackiness regarding the parsing of underscores; if you could elaborate on that a bit, I'd be happy to attempt a different strategy to see if it fixes this bug.

I was referring to the use of the LAST_TOKEN_... tokens, that (in conjunction how they are used in grammar.js) tell scanner.c information about the last token or symbol that was consumed. These are both used for underscores https://github.com/MDeiml/tree-sitter-markdown/blob/28aa3baef73bd458d053b613b8bd10fd102b4405/tree-sitter-markdown-inline/src/scanner.c#L271
and stars https://github.com/MDeiml/tree-sitter-markdown/blob/28aa3baef73bd458d053b613b8bd10fd102b4405/tree-sitter-markdown-inline/src/scanner.c#L147
The spec https://spec.commonmark.org/0.30/#emphasis-and-strong-emphasis says that whether something can be a delimiter for emphasis depends also on the tokens that come before it. This is pretty unintuitive to implement with tree sitter (which does not let you look back at input that is already parsed). The rules for underscores are more complicated than stars. I guess on OK temporary fix would be to make both behave like stars. The problem with that is that inputs like lower_snake_case will lead to emphasis being parsed.

The problem with that is that inputs like lower_snake_case will lead to emphasis being parsed.

Gotcha. I'm not about to make a change that violates the CommonMark spec, because internal underscores definitely should not signify emphasis.
When I get time, I'm going to see if I can map printf calls (or something like them) to  console.log calls inside of Pulsar. I need to understand better exactly where the current logic is falling down — because I'm looking at parse_underscore and it seems like it would do the job fine. I'll let you know what I find.

OK, I dropped a bunch of logging into parse_underscore. Here's what's going on.
Sample text:
Lorem ipsum _foo_ dolor *sit* amet.

When the editor loads, I select the whole buffer, cut it, clear the log, and paste it just to have a consistent baseline. I can see it enter parse_underscore a total of three times: once for column 12, once for column 16, and once again for column 16. I notice that there are state differences between the two passes:

parse_underscore, column 12: consumes the underscore, identifies it as a one-underscore run.

Identifies the underscore as left-flanking; right_flanking is false.

next_symbol_whitespace is false
next_symbol_punctuation is false
valid_symbols[LAST_TOKEN_PUNCTUATION] is false
valid_symbols[LAST_TOKEN_WHITESPACE] is true

Hits the “this underscore opens a word” path

parse_underscore, column 16: consumes the underscore, identifies it as a one-underscore run.

Identifies the underscore as right-flanking.

next_symbol_whitespace is true
next_symbol_punctuation is false
valid_symbols[LAST_TOKEN_PUNCTUATION] is false
valid_symbols[LAST_TOKEN_WHITESPACE] is false

Hits the “this underscore ends a word” path

parse_underscore, column 16: consumes the underscore, identifies it as a one-underscore run.

Identifies the underscore as right-flanking.

next_symbol_whitespace is true
next_symbol_punctuation is false
valid_symbols[LAST_TOKEN_PUNCTUATION] is false
valid_symbols[LAST_TOKEN_WHITESPACE] is false

DOES NOT hit either the “opens” or “closes” code path because:

valid_symbols[EMPHASIS_OPEN_UNDERSCORE] is true
valid_symbols[EMPHASIS_CLOSE_UNDERSCORE] is false
right_flanking is true
left_flanking is false
valid_symbols[LAST_TOKEN_PUNCTUATION] is false
valid_symbols[LAST_TOKEN_WHITESPACE] is false
next_symbol_punctuation is false

At this point, I put the cursor in the middle of dolor — between the o and l — and insert a space. I lose formatting on the _foo_. The *sit* is unaffected. Here's what got logged:

parse_underscore, column 12: consumes the underscore, identifies it as a one-underscore run.

Identifies the underscore as left-flanking, but this time right_flanking is also true.

next_symbol_whitespace is false
next_symbol_punctuation is false
valid_symbols[LAST_TOKEN_PUNCTUATION] is false
valid_symbols[LAST_TOKEN_WHITESPACE] is false

DOES NOT hit either the “opens” or “closes” code path because:

valid_symbols[EMPHASIS_OPEN_UNDERSCORE] is true
valid_symbols[EMPHASIS_CLOSE_UNDERSCORE] is false
right_flanking is true
left_flanking is true
valid_symbols[LAST_TOKEN_PUNCTUATION] is false
valid_symbols[LAST_TOKEN_WHITESPACE] is false
next_symbol_punctuation is false
Hence the fact that right_flanking is also true prevented it from recognizing the underscore as an opening emphasis delimiter. But right_flanking is true on this pass because valid_symbols[LAST_TOKEN_WHITESPACE] is incorrectly false.

parse_underscore, column 16: consumes the underscore, identifies it as a one-underscore run.

Because there's no pending opening emphasis, the conclusion is foregone: valid_symbols[EMPHASIS_CLOSE_UNDERSCORE] is false, because the parser didn't identify the opening emphasis delimiter correctly.

So it seems like the LAST_TOKEN_WHITESPACE token is sometimes incorrectly false. I'll keep digging.
Just for further information:

Adding a space before the _foo_ didn't cause the bug.
Adding a space at the very end of the line didn't cause the bug.

I added logging for each entry into the scan function; it logs the current column along with whether valid_symbols[LAST_TOKEN_WHITESPACE] is true.

On initial parse, scan is called at these positions:

Column 0: LAST_TOKEN_WHITESPACE is true
Column 5: LAST_TOKEN_WHITESPACE is false
Column 6: LAST_TOKEN_WHITESPACE is true
Column 11: LAST_TOKEN_WHITESPACE is false
Column 12: LAST_TOKEN_WHITESPACE is true

Then we hit parse_underscore (the outcome of which is logged above)
Then scan again:

Column 13: LAST_TOKEN_WHITESPACE is false
Column 13: LAST_TOKEN_WHITESPACE is false (yes, twice in a row)
Column 16: LAST_TOKEN_WHITESPACE is false

We hit parse_underscore again (the outcome of which is logged above)
Then scan again:

Column 16: LAST_TOKEN_WHITESPACE is false (yes, twice in a row)

We hit parse_underscore the third time (the outcome of which is logged above)
Then scan again at columns 17, 18, 23, 24, 24 (again), 25, 28, 28 (again), 29, 30, 34. These don't seem relevant, but I'll go deeper on them later if needed.

I insert the space between do and lor as before. On the second pass:

scan called at these positions:

Column 6: LAST_TOKEN_WHITESPACE is false
Column 12: LAST_TOKEN_WHITESPACE is false

parse_underscore (the outcome of which is logged above)
scan at:

Column 13: LAST_TOKEN_WHITESPACE is false
Column 16: LAST_TOKEN_WHITESPACE is false

parse_underscore (the outcome of which is logged above)
scan again at all the previous columns, except where content has shifted. The first time LAST_TOKEN_WHITESPACE is registered as a valid symbol is at column 18, just after the second underscore.

I thought it might have something to do with the includedRanges argument on the re-parse, but it doesn't. We ask for a parse on the entire line initially — (1, 0) - (1, 35). And after the change, we ask for a parse on the entire line — (1, 0) — (1, 36).
So I think it's got to be the fact that the second call provides the previous tree to Tree-sitter so it can reuse the parts that didn't change. And when it does that, it can resume parsing at a point where the parser can't count on whatever trick it's using with the LAST_TOKEN_ symbols.

OK. So! I gather that the hacky part is that, wherever whitespace has just been, you include optional($._last_token_whitespace)) so that the parser flips valid_symbols[LAST_TOKEN_WHITESPACE] to true and you can act upon it in the scanner.
Starting with simple fixes and progressing to harder ones, I'll just brainstorm:

I know zero-width tokens are a bit tricky, but I've used one before to enforce lack of whitespace. Can the parser actually generate some sort of $._whitespace_boundary token that the _emphasis_underscore rule(s) can enforce at the beginning of a sequence?
Can the presence or absence of whitespace boundaries instead be serialized to scanner state?
Can a word_like_this (or a _word_like_this or word_like_this_ be intentionally detected by an anonymous rule so that it can be designated as ordinary text, preventing it from being considered as an emphasis range? In other words, can we weed out the false positives in the grammar DSL so that the scanner doesn't have to consider them?

Thanks for your hard work, this already tells us that the LAST_TOKEN_ symbols are definitely the problem, but not quite why they don't work.

I know zero-width tokens are a bit tricky, but I've used one before to enforce lack of whitespace. Can the parser actually generate some sort of $._whitespace_boundary token that the _emphasis_underscore rule(s) can enforce at the beginning of a sequence?

This could work, but then the emphasis would need to also consume the whitespace (which is not a problem, as long as the whitespace cannot be part of something else, which I think is true)

Can the presence or absence of whitespace boundaries instead be serialized to scanner state?

Maybe, but this would probably be unstable. The scanner could save the column of the last whitespace it encountered, but I think the way columns are defined that could interfere with the block structure of the markdown document. Even worse if the markdown is embedded in some other document. So I would rather avoid it.

Can a word_like_this (or a _word_like_this or word_like_this_ be intentionally detected by an anonymous rule so that it can be designated as ordinary text, preventing it from being considered as an emphasis range? In other words, can we weed out the false positives in the grammar DSL so that the scanner doesn't have to consider them?

This one is very hard to reason about. It would probably mean to change the rule for words to be something like [a-zA-Z]+(_+[a-zA-Z]+)* (a bit hard to explain why that might work). Also make underscores behave like stars otherwise. Very easy to implement, but might work correctly or might not.
I'll try to implement 3) and check if it destroys any tests. If no perfect. If yes there could be some quite complicated fix with 1). 2) as I said I would rather avoid if possible.

Can you checkout the branch https://github.com/MDeiml/tree-sitter-markdown/tree/stable-underscores
I implemented the changes and it only broke one (unimportant) test, which already doesn't work for stars. That would be ok for me if it means the parser is more stable.

It would help if I understood how Tree-sitter reuses an existing tree. For instance, the point at which it begins re-parsing after a change is odd to me. I'd understand if it re-parsed starting at the beginning of the buffer line, or at the point of the change, but it seems to re-parse at the exact point that causes problems for your technique.
I'd imagine that it was reparsing earlier, and that column 6 was the first place it needed to consult the external scanner; but then we know that's not true from the results we got on the first pass.

I would guess it also has to do with "conflicts" which I use for emphasis. There's also the tree-sitter command line tool, which sometimes helps with debugging. But it's not great for this "interactive" part of the parsers.

I implemented the changes and it only broke one (unimportant) test, which already doesn't work for stars. That would be ok for me if it means the parser is more stable.

It seems to work fine. Amazingly, it passes the _lorem ipsum dolor_sit amet_ test I described above. I'll use it for a few days and let you know if I run into anything else.

@savetheclocktower I guess this means everything works fine?

@savetheclocktower I guess this means everything works fine?

It's been great so far. I've been using this in Pulsar as a hastily-thrown-together alternative Markdown package and I've noticed only two things:

One time I noticed that italics weren't being marked as italics. If I recall correctly, it was a multi-word span flanked with underscores. Making small buffer edits didn't seem to fix it. I cut and re-pasted the entire line and the italics appeared. I immediately tried to reproduce the problem and could not. It hasn't happened since.
About a week ago I was writing a long Markdown document and my editor crashed. I'm kicking myself for instinctively closing the window before going to the console so I could see what the error message was.

I've put the alternative Markdown package up on our package repository and invited people to use it who were having problems with the built-in Markdown package. The common theme among all those folks seemed to be that they were all using non-US and non-UK keyboards, and the other Markdown parser crashed in certain special input scenarios. The author of that comment mentioned just this morning that they're giving the alternative package a try.
Anyway, your change is a positive one, as far as I'm concerned. Even if I could reproduce issue 1, it's still an improvement over the status quo; and even if issue 2 was caused by the parser, I doubt it's related to this specific problem with italics. So I'm happy for you to close this issue. Thanks!


Stuck in build

Hello,
I'm trying to use this, and I have used before in another repository and worked fine. But now in the build part keep stuck in this part:

And keeps running.
Can you solve this ?
Thank you.

https://askubuntu.com/questions/909277/avoiding-user-interaction-with-tzdata-when-installing-certbot-in-a-docker-contai

https://askubuntu.com/questions/909277/avoiding-user-interaction-with-tzdata-when-installing-certbot-in-a-docker-contai

It seems the bug is fixed on master branch. Not released yet: https://github.com/MGenteluci/cloudformation-deploy-action/blob/master/Dockerfile#L14

It seems the bug is fixed on master branch. Not released yet: https://github.com/MGenteluci/cloudformation-deploy-action/blob/master/Dockerfile#L14

https://github.com/MGenteluci/cloudformation-deploy-action/compare/v1.4.0...v1.4.0-beta.0

https://github.com/MGenteluci/cloudformation-deploy-action/compare/v1.4.0...v1.4.0-beta.0

Understood.
Thank you Carlos.

Understood.
Thank you Carlos.


Cannot resize image again

I have an image and can resize it once after it's first uploaded, but I am unable to resize the image again after this. I am currently using V 1.0.0 because I wasn't able to run on V3.0.0, I am also using ReactQuill.
UPDATE:
The error that is logged out is:

same here

me too

stay use v3.0.0 and remove the curly bracket when import.
import ImageResize from 'quill-image-resize-module';


chorecorrect some doc errors

Proposed changes
Issue Number: close #xxx
Editlog roll at a threshold of 5w instead of 10w.
refer to Config.java
Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall

run buildall

run buildall

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 46.8 seconds
stream load tsv:          535 seconds loaded<PHONE_NUMBER>9 Bytes, about 133 MB/s
stream load json:         20 seconds loaded<PHONE_NUMBER> Bytes, about 112 MB/s
stream load orc:          64 seconds loaded<PHONE_NUMBER> Bytes, about 16 MB/s
stream load parquet:          30 seconds loaded 861443392 Bytes, about 27 MB/s
insert into select:          28.7 seconds inserted 10000000 Rows, about 348K ops/s
storage size:<PHONE_NUMBER>3 Bytes


Consider replacing hatch with pixi

Overview of package managers:
https://dublog.net/blog/so-many-python-package-managers/
pixi:
https://github.com/prefix-dev/pixi
It is not yet GA, so we might want to wait until it is.

While considering it, also remember hatch is used by kagglehub and possibly others. It's probably best to maintain consistency, so this may be a bigger job than we thought.


deploy collect problem

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grpcAgentReceiver' defined in class path resource [applicationContext
-collector-grpc.xml]: Invocation of init method failed; nested exception is java.io.IOException: Failed to bind

Hello @catlovefish
What version are you using?
Show more error stacks below.
Add a profile if you haven't added it when starting the collector.

java.io.IOException: Failed to bind <- Check if the 9991 port is in use.


Create v1alpha3 API version

What this PR does / why we need it:
Copies across the existing acme and certmanager v1alpha2 versions to v1alpha3.
This PR does not switch anything to utilise this group, nor will it be exposed to users. This is just the bare minimum required so we can begin internally working on v1alpha3.
Omitting release note as this PR does not add a new apiVersion from an end-user perspective.
Release note:
NONE

/area api

/retest

/retest


[ERROR] [clp] Unable to connect to the database with the provided credentials

When I run ./sbin/start-clp --uncompressed-logs-dir <directory containing your uncompressed logs>, it prompts an error such as the title. The detailed execution process is as follows
$ ./sbin/start-clp --uncompressed-logs-dir ./myTestData/input/
2021-10-24 21:25:28,315 [INFO] [clp] Using default config file at etc/clp-config.yaml
2021-10-24 21:25:28,320 [INFO] [clp] Provision docker network bridge
2021-10-24 21:25:28,634 [INFO] [clp] Starting CLP scheduler
2021-10-24 21:25:28,634 [INFO] [clp] Starting scheduler mariadb database
2021-10-24 21:25:34,037 [INFO] [clp] Starting scheduler queue
2021-10-24 21:25:39,313 [INFO] [clp] Initializing scheduler queue
2021-10-24 21:25:40,831 [INFO] [clp] Initializing scheduler database tables
2021-10-24 21:26:05,825 [ERROR] [clp] Unable to connect to the database with the provided credentials
2021-10-24 21:26:05,826 [ERROR] [clp]
2021-10-24 21:26:05,826 [ERROR] [clp] Failed to provision "clp-mini-cluster"

Thank you very much for your help, I can already compile and run successfully. Finally, I wonder if I can get the compressed log file.

@charleswu52 The compressed data is stored under <clp_home>/var/data/<clp cluster name>/. The default <clp cluster name> should be "clp-mini-cluster". The compressed data is inside <clp_home>/var/data/<clp cluster name>/archives and there is also a corresponding MariaDB/MySQL database directory in <clp_home>/var/data/<clp cluster name>/archives/db.

Okay, I have found the file. Thanks again for your help. @jackluo923 @kirkrodrigues


feat: L1 Policy for checking duplicates

Signed-off-by: pxp928<EMAIL_ADDRESS>TODO: Missing unit test and doc comments

Closing for more research


Fixed type and image references

Description of changes:

Markdown bolding (removed space between ** and text
Fixed missing/invalid image references illustrating AWS Managed and Inline policies

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Thanks for taking the time to submit a PR.


feat(paperless): add pagination support for processing documents

Added pagination support to process all documents by fetching subsequent pages from the paperless system. Refactored process_documents into smaller functions for better maintainability, and introduced a new get_next_data_from_paperless function.

:tada: This issue has been resolved in version 1.3.0-rc.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

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


[Latest sage] Missing hash

@Log1x: I updated the theme underlying sage to latest sage from master. Indeed, a lot has changed.
However, @icon still doesn't add the hash to filename after yarn run build:production.
How can this be further debugged? I tried a lot and it is very frustrating that it still doesn't work. 😿

Are the files in your manifest.json? If not, you need to address your webpack configuration. I'm not sure what you would need to do for Sage's default implementation as I haven't used it for some time and use Laravel. Otherwise, \App\sage('assets')->get($asset) should be getting the file from your manifest.json assuming it exists.

Thank you for your answer!
parse_asset_path(...) is called for the directories, but not for individual files: 'images/svg/icons'
This is how I include a svg in blade template:
@icon('glasses', 'glasses-fx-svg')

Error in markup:
/srv/www/web/app/themes/the-site/dist/images/svg/icons not found.

In 'SvgFactory.php', getSvg(...) is called with 'glasses' as argument.
It returns a path: '/srv/www/web/app/themes/the-site/dist/images/svg/icons/glasses.svg'
However, this path would only work for non-production build (without the hash).
So getSvg(...) gets a $name without hash resolved in the first place.
How can I further debug / help finding the issue?

I will look into this more for you.
Can you verify that your manifest.json is in fact storing your *.svg's along with their hashes just to rule that out? You may be right though, parse_asset_path may need some minor tweaking. It could be as simple as a misplaced / making it not parse the json properly.

Assuming the SVG hashes are in composer.json, want to try the latest dev-master I just pushed? Let me know if it works.
Thanks

Otherwise, this guy did a lot better implementation of this for Sage than I did.
https://github.com/josh-taylor/sage-svg
I overthought it to be honest, and just wanted to mess with getting a couple neat looking Blade service providers to load into Sage.
His method is a lot more sane, and I simply just didn't think of it.

Alright, I went ahead and did the rewrite. Hopefully it works as expected now. I tested it a little bit but I only use SVG's as inline thus client-side hashing is redundant.
The package should be a theme dependency now instead of a mu-plugin, so make sure when you composer update log1x/blade-svg-sage that it removes it from mu-plugins.

Thanks! The issue resolved after redeploying and activating the theme again (https://discourse.roots.io/t/dev-vs-production-resources-dist-instead-dist/10277/3).
I will update blade-svg-sage and hope this issue won't creep up again.


Migrate write_zarr to here.

This code (from a currently private repository) would be useful to have in faim-hcs:
def write_zarr(client, zarr_path, stitched_da, worm_acquisition):
    """
    Write dask-array to ome-zarr multiscale.

    Parameters
    ----------
    client :
        Dask client used for the computation.
    zarr_path :
        Path to the output zarr file.
    stitched_da :
        Dask array containing the stitched data.
    worm_acquisition :
        Acquisition object.
    """
    store = parse_url(zarr_path, mode="w").store
    group = zarr.group(store)
    wait(
        client.persist(
            da.to_zarr(
                arr=stitched_da,
                url=group.store,
                compute=False,
                component=str(Path(group.path, "0")),
                storage_options=dict(
                    dimension_separator="/",
                    chunks=(
                        1,
                        1,
                    )
                    + stitched_da.shape[2:],
                    write_empty_chunks=False,
                ),
                compressor=Blosc(cname="zstd", clevel=3, shuffle=Blosc.SHUFFLE),
                dimension_separator=group._store._dimension_separator,
            )
        )
    )
    shapes = [stitched_da.shape]
    datasets = [{"path": "0"}]
    coordinate_transformations = get_coordinate_transformations(
        acquisition=worm_acquisition,
        max_layer=0,
        mip=stitched_da.ndim == 4,
    )
    fmt = CurrentFormat()
    dims = len(shapes[0])
    fmt.validate_coordinate_transformations(
        dims, len(datasets), coordinate_transformations
    )
    for dataset, transform in zip(datasets, coordinate_transformations):
        dataset["coordinateTransformations"] = transform

    if stitched_da.ndim == 4:
        axes = ["t", "c", "y", "x"]
    else:
        axes = ["t", "c", "z", "y", "x"]

    axes = _get_valid_axes(dims, axes, fmt)
    write_multiscales_metadata(
        group,
        datasets,
        fmt,
        axes,
    )

... with the necessary adaptations (e.g. WellAcquisition for worm_acquisition) and tests.

Individual projects should ideally be able to directly use implementations of the ome-zarr-related libraries (e.g. ngio etc.).


Enforcing relation between the different curves and fields via traits

There's two things I want to point out in this issue:

I think we need to make the relationship between Fp and Fq, and Vesta and Pallas, clearer.
The same for ArithmeticSpongeParams

The reason is that we often have to play with these back and forth. It could be nice to simply have a trait that allows us, for example, to get Fq from Fp, and Pallas from Vesta, etc.
For example:
impl OtherCurve for Vesta {
   type Other = Pallas;
}

impl OtherField for Fq {
  type Other = Fp
}

impl SpongeParams for Fp {
  fn params() -> ArithmeticSpongeParams<Self> {
    // ...
  }

moved to https://github.com/o1-labs/ocaml-gen/issues


Fix remove service instance step

Description
Changes proposed in this pull request:

add additional condition to check whether service instance is present im the cluster

Related issue(s)
See also #1521

/hold

/unhold


Refactor routes

Why do the routes need to use render and pass match as props? If this is absolutely necessary, document as such. Otherwise, determine more optimal solution.

:tada: This issue has been resolved in version 3.2.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Fix/277/check why the applicants form isn't showing

What does this PR do?
Fix the error that if you exit without answering the applicationForm, then it lets you enter "IntershipProjects" with the interface as if you had filled the applicationForm.
https://github.com/wizeline/remix-project-lab/assets/58340818/9e18d92d-6078-4ef4-8afa-c3c7789e3883

Where should the reviewer start?
app/core/layouts/Header.tsx
app/routes/internshipProjects/$projectId/index.tsx
app/routes/internshipProjects/index.tsx

How should this be manually tested?

Login via linkdin
Exit the applicationForm without answering
Enter to View Projects
Verify that the home button appears in the header instead of your linkdin email address.
Verify that when you enter a project the button to answer the form appears instead of the apply button.

https://github.com/wizeline/remix-project-lab/assets/58340818/af146a90-de05-43d6-a8f3-8a64ce84e2ca

Any background context you want to provide?

What are the relevant tickets?
#277

Screenshots

Questions

Checklist

[ ] I added the necessary documentation, if appropriate.
[ ] I added tests to prove that my fix is effective or my feature works.
[ ] I reviewed existing Pull Requests before submitting mine.

Thanks for providing the screen recordings @AxelUZ, makes it much easier to understand.
I am wondering if filling the form from a specific project might make an intern think that he or she has already applied, which could be problematic. He or she might not know that the application didn't go through and think it did because he filled the application form.
For the intern's application flow, I think there are two possible scenarios:
Scenario 1:
We do not allow applicant users to navigate to the projects until they have filled the form. Like we do when they register, this means redirecting users to the application form whenever they try to go to the projects view or a specific project. Effectively forcing them to fill the application before interacting with projects.
Scenario 2:
We want to allow users to explore projects before filling the application.
In this case I think that:

We shouldn't force new users to fill the application as soon as they register, because they have not seen if there is a project they are interested in. Newly registered users should instead be redirected to the projects view<.
Users could hit the "Apply" button on a project and if they haven't filled in the form, they are simply redirected to it. In this case, I would suggest that once they fill the form, they do not need to hit the "Apply" button again, we should know they wanted to apply to that particular project.

I believe Scenario 2 makes more sense which is similar to what you propose. If you agree, do you think you could add this behaviour? What are your thoughts?

In this new commit please verify that when pressing the "Home" buttons located in "/IntershipProjects" make a Logout. Verify that the "View Projects" button when there is no active user, sends you to "/IntershipProjects" so you can see the projects before applying.

"Home" buttons located in "/IntershipProjects" make a Logout.
https://github.com/wizeline/remix-project-lab/assets/58340818/0693d959-3d6f-447b-8d71-fe01e543ad61
Verify that the "View Projects" button when there is no active user, sends you to "/IntershipProjects" so you can see the projects before applying.
https://github.com/wizeline/remix-project-lab/assets/58340818/7f582159-726d-4497-be9f-9b3a0b2e6156


Dark mode follow up improvements

Style touch-ups for dark mode. Should address all issues listed in this doc.
Again, the current goal is not to have all components be perfect, as we will likely tweak things here and there if/when Josh develops a dark mode palette, but to just ensure things are presentable/visible in dark mode.
To review, I recommend going through the above doc ^ and follow along on Storybook.
Closes https://github.com/covid-projections/act-now-packages/issues/452

Looks good! The only thing I would improve (for now) is fixing the hover color on the Chip's delete button

Approving (we can fix that in this PR on on a separated one)


Implement checkAlignment protocol

From @LasseBlaauwbroek:
Starting with v10, there is a new command Check Neural Alignment in Coq, that reports how many tactics and definitions cannot be algined to the trained dataset. For this, a simple protocol needs to be implemented in g2t-server:
https://github.com/coq-tactician/coq-tactician-reinforce/blob/68ca1b479daae971079cda666fa47aa82906a7e6/graph_api.capnp#L440-L446
https://github.com/coq-tactician/coq-tactician-reinforce/blob/68ca1b479daae971079cda666fa47aa82906a7e6/graph_api.capnp#L467-L470

Vasily says this has been done.

Done


add Zouna

SteamDB app page links to a few games using this

A Plague Tale: Innocence
A Plague Tale: Requiem
CT Special Forces: Fire for Effect
Fuel
Microsoft Flight Simulator (2020)
Monopoly Plus
Rush: A Disney Pixar Adventure
WALL-E

Brief explanation of the change
some more leftovers from my old repo

After running changed rules in this pull request (this bot only tests rules.ini changes):
Changed technologies: Engine.Zouna
These apps now match: (10) 12800 12850<PHONE_NUMBER>50<PHONE_NUMBER>90<PHONE_NUMBER>660 1182900 1250410
Please confirm that all these changed apps are correct.


Generate more bindings relevant to building PAM modules

Hmm. Seems like I misunderstood something when I headed to the docs, and that is because I was not taken to the alpha version. The alpha version does have what I wanted. Closing it as just some little confusion.


support enabling TLSv1.2 on Android 4.1-4.4.

Our lawyers and security consultants claim that for PCI compliance*, we must disable TLS 1.0 and 1.1 on our servers. For some confusing reason, Android has supported TLS 1.2 since API 16 (android 4.1) but enabled it by default only since API 20 (android "4.4W").
With okhttp 2.6, we were able to force use of TLS 1.2 with:
OkHttpClient cli = new OkHttpClient();
SSLContext sc = SSLContext.getInstance("TLSv1.2");
sc.init(null, null, null);
cli.setSslSocketFactory(new Tls12SocketFactory(sc.getSocketFactory()));
ConnectionSpec cs = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
        .tlsVersions(TlsVersion.TLS_1_2)
        .build();
cli.setConnectionSpecs(ImmutableList.of(cs));

where Tls12SocketFactory is this.
However, okhttp 3.1 uses some kind of reflection on internal implementation details of the SSLSocketFactory, so the above implementation no longer works. And, indeed, it's a bit silly to make callers write so much code anyway. Specifying TLS_1_2 in the ConnectionSpec should be enough to get TLSv1.2 whenever it is supported.
As far as I can tell, the only reason why the custom socket factory is needed in the first place is that ConnectionSpec.supportedSpec() calls SSLSocket.getEnabledProtocols() to learn the list of protocols supported by the system, so on Android 4.x where TLS 1.2 is supported but not enabled by default, OkHttp thinks 1.2 is not supported at all.
Sorry for this long bug report: I think the fix is as simple as changing getEnabledProtocols() above to getSupportedProtocols() but wanted to submit this bug for discussion before making a PR with such a change, in case there is some affirmative reason why it's the other way now.
* Originally I understood the PCI compliance deadline to be June 2016; however, it seems like it has since been changed to be June 2018. Regardless, OkHttp should support this change for users that want it.

As a quick fix, try renaming the SSLSocketFactory field in Tls12SocketFactory to delegate. It’s a gross hack, and it’s sad, and it’s how we cope with the absence of the APIs we need doing fancy TLS in Java.

No action for us to take here.

Had the same issue on Android < 5.0 (16 <= API < 21). Thanks to your posts, I was able to make this work, so for anyone who gets here, this is the out-of-the-box solution. At the time of this writing, I'm using OkHttp 3.4.1.
Add Tls12SocketFactory.java with the following content:
import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;

import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;

/**
 * Enables TLS v1.2 when creating SSLSockets.
 * <p/>
 * For some reason, android supports TLS v1.2 from API 16, but enables it by
 * default only from API 20.
 * @link https://developer.android.com/reference/javax/net/ssl/SSLSocket.html
 * @see SSLSocketFactory
 */
public class Tls12SocketFactory extends SSLSocketFactory {
    private static final String[] TLS_V12_ONLY = {"TLSv1.2"};

    final SSLSocketFactory delegate;

    public Tls12SocketFactory(SSLSocketFactory base) {
        this.delegate = base;
    }

    @Override
    public String[] getDefaultCipherSuites() {
        return delegate.getDefaultCipherSuites();
    }

    @Override
    public String[] getSupportedCipherSuites() {
        return delegate.getSupportedCipherSuites();
    }

    @Override
    public Socket createSocket(Socket s, String host, int port, boolean autoClose) throws IOException {
        return patch(delegate.createSocket(s, host, port, autoClose));
    }

    @Override
    public Socket createSocket(String host, int port) throws IOException, UnknownHostException {
        return patch(delegate.createSocket(host, port));
    }

    @Override
    public Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException, UnknownHostException {
        return patch(delegate.createSocket(host, port, localHost, localPort));
    }

    @Override
    public Socket createSocket(InetAddress host, int port) throws IOException {
        return patch(delegate.createSocket(host, port));
    }

    @Override
    public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException {
        return patch(delegate.createSocket(address, port, localAddress, localPort));
    }

    private Socket patch(Socket s) {
        if (s instanceof SSLSocket) {
            ((SSLSocket) s).setEnabledProtocols(TLS_V12_ONLY);
        }
        return s;
    }
}

Then, add this method somewhere in your code:
public static OkHttpClient.Builder enableTls12OnPreLollipop(OkHttpClient.Builder client) {
    if (Build.VERSION.SDK_INT < 21) {
        try {
            SSLContext sc = SSLContext.getInstance("TLSv1.2");
            sc.init(null, null, null);
            client.sslSocketFactory(new Tls12SocketFactory(sc.getSocketFactory()));

            ConnectionSpec cs = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
                    .tlsVersions(TlsVersion.TLS_1_2)
                    .build();

            List<ConnectionSpec> specs = new ArrayList<>();
            specs.add(cs);
            specs.add(ConnectionSpec.COMPATIBLE_TLS);
            specs.add(ConnectionSpec.CLEARTEXT);

            client.connectionSpecs(specs);
        } catch (Exception exc) {
            Log.e("OkHttpTLSCompat", "Error while setting TLS 1.2", exc);
        }
    }

    return client;
}

And when you create your OkHttp instance, use it for example like this:
private static OkHttpClient getHttpClient() {
    OkHttpClient.Builder client = new OkHttpClient.Builder()
            .followRedirects(true)
            .followSslRedirects(true)
            .retryOnConnectionFailure(true)
            .cache(null)
            .connectTimeout(5, TimeUnit.SECONDS)
            .writeTimeout(5, TimeUnit.SECONDS)
            .readTimeout(5, TimeUnit.SECONDS);

    return enableTls12OnPreLollipop(client).build();
}

@gotev thanks for sharing, any particular reason you've added the COMPATIBLE_TLS and CLEARTEXT in your connection specs? aren't these necessary only if you want to allow fallbacks to older TLS versions / cleartext http?

Seems like client.sslSocketFactory(sslSocketFactory) is deprecated and the documentation recommends using client.sslSocketFactory(sslSocketFactory, X509TrustManager trustManager). How do i get an X509TrustManager object? just create new ?

https://square.github.io/okhttp/3.x/okhttp/okhttp3/OkHttpClient.Builder.html#sslSocketFactory-javax.net.ssl.SSLSocketFactory-javax.net.ssl.X509TrustManager-

SSLContext sslContext = SSLContext.getInstance("TLSv1.2");
TrustManager[] trustManagers = new TrustManager[] { new TrustManagerManipulator() };
sslContext.init(null, trustManagers, new SecureRandom());
SSLSocketFactory noSSLv3Factory = new TLSSocketFactory(sslContext.getSocketFactory());
urlConnection.setSSLSocketFactory(noSSLv3Factory);
https://github.com/IKANOW/Infinit.e/blob/master/core/infinit.e.data_model/src/com/ikanow/infinit/e/data_model/utils/TrustManagerManipulator.java

Slightly unrelated. But once I make the changes, how do I actually confirm that app and server are indeed using TLS 1.2 (on my server TLS 1.0, 1.1 and 1.2 all are enabled). Is there a hint in the HTTP packet ?

Check the Handshake object on the Response.

Has anyone actually come up with a working solution for KitKat?

Struggling with same issue with TLS1.2 support on API 19? Does anyone have working solution yet?

Same problem here...

@techiebrij any luck with the error? I am experiencing something similiar.
W: javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x5cb59b30: Failure in SSL library, usually a protocol error
W: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure (external/openssl/ssl/s23_clnt.c:744 0x5cbd77e8:0x00000000)
W: javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x65211a70: Failure in SSL library, usually a protocol error
W: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure (external/openssl/ssl/s23_clnt.c:744 0x5cbd77e8:0x00000000)
W:     at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:449)

@gotev why Build.VERSION.SDK_INT < 22 and not Build.VERSION.SDK_INT < 20?

Tried @gotev solution and also get SSL23_GET_SERVER_HELLO:sslv3 , why does it fallback to sslv3?

@StuStirling, sorry for responding late. @gotev code will work only when web server supports right cipher. You can get the list of supported ciphers here https://developer.android.com/reference/javax/net/ssl/SSLEngine.html
API-19 out of code can't do anything to make it work as it has dependency on network call (web server with different SSL spec).

Thanks @techiebrij.
For anyone else that may be struggling with this, the thing that fixed mine was to install the latest security fixes that are bundled with Google Play Services.
ProviderInstaller.installIfNeeded(context);
After doing this, the solution for enabling TLS1.2 worked.

API < 22 was used because of some samsung devices which needed those settings, too. Bear in mind the certificate problem is not only a client side thing. Ensure you have good certificates from well known CAs if you plan to support API < 19.

@gotev i used your code you gave above but almost %1 of my pre-lolliop user's gets exception while setting TLS1.2. is it normal? do you suggest any workaround to handle this problem?

 Solved by using a well known CA for my server side certificates, no changes in actual code.

Is there another fix available for on the sslv3 fallback occurring without having to install the Google Play Services?

I give up. After doing everything listed in this thread (Using TLS12SocketFactory, updating google play services, forcing security fixes, adding safe ciphers to the server side), several devices (mainly old Samsung and old rooted devices) are still getting this problem.
Now I'm using Fabric to log devices having issues connecting to our server, as well as their cipher suites. Worst case scenario, I'll just block these devices from being able to download the app from the store. Shitty solution, but it is what it is.

The problem is that those devices don't have what's needed for TLS 1.2. What I ended up doing, and I'm not the only one, is to add older ciphers to the certificate and display a big warning on those devices when I detected they did not support TLS 1.2, informing users that in N months from that message, new TLS 1.2 will be the only standard allowed. After that period, I still allowed users to download the app, but once started it does all the necessary checks and informs the users about the security issue. Maybe it's not the best possible solution, but all depends on how much audience are you impacting.

Any updates on this?

Hi @perrosnk. I solved it by using the bounty castle jar file. Give it a chance :)

Works on my side using @StuStirling solution. API 17, HTC X One.

@mniami This is not a solution. What happens if someone cannot access google play services for a reason? :-)

Do you have @kounalem working solution without forcing user to update GPS?

@StuStirling  Where do you pull the context from ?
Can you share an example of how to use this code?
@kounalem Thank you for your help. Your solution seems nice, but I have no idea how to use it. Actually I am developing in react-native.

https://github.com/guardianproject/NetCipher

Could this be solution? Using bouncy castle to enable TLS1.2? https://stackoverflow.com/questions/33517476/tls-1-2-java-1-6-bouncycastle

Any effective fix on this? I tried multiple approaches, concretely every one described in this thread plus many of the ones described in the issues that link to this one. And still no luck.
My use case is that I would like to restrict TLS to 1.2 only and I would prefer to do this without having to include Google Play Services (currently not using and the less dependencies the better)
It's crazy that the newer TLS versions were introduced without a proper non-hacky way of enabling them being added as well.

You could figure out how to repackage Conscrypt and ship that.

i am also facing
javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xb4068200: Failure in SSL library, usually a protocol error
error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure (external/openssl/ssl/s23_clnt.c:770 0xabeeddd4:0x00000000)
any one have solution ???

@rizwan321 Please ask usage questions like this on stackoverflow.
IF you think you have found a bug, please include a test case or code to reproduce it, e.g. connecting against a test server we can access.

The patch in https://github.com/square/okhttp/issues/2372#issuecomment-331623598 actually worked for us.

Hello. I tried solution provided by @gotev and @lucaskuan
I tested TLS on
https://api.fastly.com/public-ip-list
https://tlstest.paypal.com/
However on my website I still receive error
javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xb950bc70: Failure in SSL library, usually a protocol error
error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure (external/openssl/ssl/s23_clnt.c:744 0x9c8367f1:0x00000000)

My urls works fine on android 5. I found clipper on my api use the same clipper as tested ones TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256S So it should work but it's not.
Does anyone know what can be the reason?

@lucaskuan
But I can't understand how these work:
https://api.fastly.com/public-ip-list
https://tlstest.paypal.com/
They use TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 too

I was facing that very same issue while using Glide. I tried to combine solutions from this discussions and some others, but was unsuccessfull.
However i found a working solution for enabling TSL v1.2 for okhttp 3 with glide, here it is: (as i see also based on thought from this thread)
https://developer.android.com/reference/javax/net/ssl/SSLSocket
I am not sure whether my comment appropriate since it is an okhttp rep, but despite glide references one can still extract working okhttp-only solution.

@gotev Thank you for your example

SSLContext sslContext = SSLContext.getInstance("TLSv1.2");
TrustManager[] trustManagers = new TrustManager[] { new TrustManagerManipulator() };
sslContext.init(null, trustManagers, new SecureRandom());
SSLSocketFactory noSSLv3Factory = new TLSSocketFactory(sslContext.getSocketFactory());
urlConnection.setSSLSocketFactory(noSSLv3Factory);
https://github.com/IKANOW/Infinit.e/blob/master/core/infinit.e.data_model/src/com/ikanow/infinit/e/data_model/utils/TrustManagerManipulator.java

"urlConnection.setSSLSocketFactory(noSSLv3Factory);" Hi, where do you initialize urlConnection before using to setSSLSocketFactory???

@malikhzr
I do it this way
                SSLContext sc = SSLContext.getInstance("TLSv1.2");
                sc.init(null, null, null);
                client.sslSocketFactory(new Tls12SocketFactory(sc.getSocketFactory()));

                ConnectionSpec cs = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
                        .tlsVersions(TlsVersion.TLS_1_2)
                        .build();

                List<ConnectionSpec> specs = new ArrayList<>();
                specs.add(cs);
                specs.add(ConnectionSpec.COMPATIBLE_TLS);
                specs.add(ConnectionSpec.CLEARTEXT);

                client.connectionSpecs( Collections.unmodifiableList( specs));

@skauss  Thank you for reply. But isn't client.sslSocketFactory deprecated? I am gonna try your code anyway.

React Native version 0.55.4
I implemented everything inside MainActivity.java. I used your code but still it didn't enable TLS version 1.2. Still it is not working on Android Lollipop 5.0.1
package com.dialogNow;
import com.facebook.react.ReactActivity;
import org.devio.rn.splashscreen.SplashScreen;
import android.os.Bundle;
import java.util.*;
import android.util.Log;
import com.facebook.react.modules.network.OkHttpClientProvider;
import com.facebook.react.modules.network.ReactCookieJarContainer;
import okhttp3.ConnectionSpec;
import okhttp3.OkHttpClient;
import okhttp3.TlsVersion;
import javax.net.ssl.*;
import java.util.Arrays;
import java.util.concurrent.TimeUnit;
import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
public class MainActivity extends ReactActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
SplashScreen.show(this, R.style.SplashTheme);  // here
super.onCreate(savedInstanceState);
getNewHttpClient();
}
/**
 * Returns the name of the main component registered from JavaScript.
 * This is used to schedule rendering of the component.
 */
@Override
protected String getMainComponentName() {
    return "demo";
}

private OkHttpClient getNewHttpClient() {
OkHttpClient.Builder client = new OkHttpClient.Builder()
        .followRedirects(true)
        .followSslRedirects(true)
        .retryOnConnectionFailure(true)
        .cache(null)
        .connectTimeout(5, TimeUnit.SECONDS)
        .writeTimeout(5, TimeUnit.SECONDS)
        .readTimeout(5, TimeUnit.SECONDS);

return enableTls12OnPreLollipop(client).build();
}

public  OkHttpClient.Builder enableTls12OnPreLollipop(OkHttpClient.Builder client) {
    // if (Build.VERSION.SDK_INT >= 16 && Build.VERSION.SDK_INT < 22) {
        try {
            SSLContext sc = SSLContext.getInstance("TLSv1.2");
            sc.init(null, null, null);
            client.sslSocketFactory(new Tls12SocketFactory(sc.getSocketFactory()));

            ConnectionSpec cs = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
                    .tlsVersions(TlsVersion.TLS_1_2)
                    .build();

            List<ConnectionSpec> specs = new ArrayList<>();
            specs.add(cs);
            specs.add(ConnectionSpec.COMPATIBLE_TLS);
            specs.add(ConnectionSpec.CLEARTEXT);

            client.connectionSpecs( Collections.unmodifiableList( specs));
        } catch (Exception exc) {
            Log.e("OkHttpTLSCompat", "Error while setting TLS 1.2", exc);
        }
    // }

    return client;
}

class Tls12SocketFactory extends SSLSocketFactory {
    private String[] TLS_V12_ONLY = {"TLSv1.2"};

    final SSLSocketFactory delegate;

    public Tls12SocketFactory(SSLSocketFactory base) {
        this.delegate = base;
    }

    @Override
    public String[] getDefaultCipherSuites() {
        return delegate.getDefaultCipherSuites();
    }

    @Override
    public String[] getSupportedCipherSuites() {
        return delegate.getSupportedCipherSuites();
    }

    @Override
    public Socket createSocket(Socket s, String host, int port, boolean autoClose) throws IOException {
        return patch(delegate.createSocket(s, host, port, autoClose));
    }

    @Override
    public Socket createSocket(String host, int port) throws IOException, UnknownHostException {
        return patch(delegate.createSocket(host, port));
    }

    @Override
    public Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException, UnknownHostException {
        return patch(delegate.createSocket(host, port, localHost, localPort));
    }

    @Override
    public Socket createSocket(InetAddress host, int port) throws IOException {
        return patch(delegate.createSocket(host, port));
    }

    @Override
    public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException {
        return patch(delegate.createSocket(address, port, localAddress, localPort));
    }

    private Socket patch(Socket s) {
        if (s instanceof SSLSocket) {
            ((SSLSocket) s).setEnabledProtocols(TLS_V12_ONLY);
        }
        return s;
    }
}

}

@skauss am I missing something ?

@malikhzr
Yes sslSocketFactory is deprecated.
Hm your code look similar to my one. My code work on 4.4.2.
Are you sure you use your  patched OkHttpClient ?

@malikhzr
Yes sslSocketFactory is deprecated.
Hm your code look similar to my one. My code work on 4.4.2.
Are you sure you use your patched OkHttpClient ?

@skauss How to ckeck if I am using patched OkHttpClient ? Or can you reference me some?

@malikhzr
Use the debugger to be sure your client is used or add Log to your code.

@skauss  How to patch the OkHttpClient.
I'm calling the getNewHttpClient() method in onCreate function.
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getNewHttpClient();

    }

OkHttpClient.Builder

Thanks for this solution (gotev on Sep 5th 2016), allowed me to make it work on Android 4.x up-to 5.0.
That said, it didn't work out of the box because this solution doesn't work with servers having self-signed certificates. I had to change the init into this:
sslContext.init(null, trustAllCerts, new java.security.SecureRandom());
Also, the connectionSpecs() call turned out to be useless.

@3c71 instead of self signed, use https://letsencrypt.org/

@gotev, thanks, however I don't use okhttp to connect to my own site, which I have a valid certificate for. I'm obviously referring to all those sites with self-signed certificates, like all those routers or NAS out there which can't actually be accessed with HTTPs unless certificate is either trusted automatically or manually confirmed. In both cases, it's mandatory to change the init() call.

No action for us to take here.

Ehrm.. I don't want to be that guy, but why did you decide to drop older android versions altogether? (rather than enabling this)
Is it just because of your policy of "only defaults"?
Or were those 200 lines of code becoming that much of a burden (despite even the possibility of the conscrypt embedding)?
And I mean, it's not even like the market for this wouldn't be there given the number of referenced issues above.

Square doesn't ship software on Android 4.4 and I don’t want to do the work to test & support a platform I don’t use. In addition to 200 lines of code, there’s also code to integrate Conscrypt. Conscrypt is native code and there’s cost to making that work reliably everywhere.
I expect that if anyone really cared enough, they’d maintain an unofficial backport!  @mirh is that you?

We have slammed into this problem as well because we are providing a free healthcare app to a poor part of the world where many suffering users can only afford a Samsung J1 Ace that is stuck on an non-upgradeable Android 4.4. So lack of support for older Androids turns out to be a rest-of-the-world-problem rather than a first-world-problem.

@c4augustus some options to consider:

Get TLSv1.2 via the Google Play Services TLS provider. This requires your users have Google Play devices. You may also need to put UI in your app to prompt users to update Play Services if necessary. And then you just configure it before making an HTTPS call.

Get TLSv1.2 via Conscrypt.

Change your HTTPS server to accept TLSv1.1. There are potential security consequences to this. But if your server supports both TLSv1.1 and TLSv1.2 it’s likely to not harm security for the TLSv1.2-capable devices.

@c4augustus some options to consider:

Get TLSv1.2 via the Google Play Services TLS provider. This requires your users have Google Play devices. You may also need to put UI in your app to prompt users to update Play Services if necessary. And then you just configure it before making an HTTPS call.
Get TLSv1.2 via Conscrypt.
Change your HTTPS server to accept TLSv1.1. There are potential security consequences to this. But if your server supports both TLSv1.1 and TLSv1.2 it’s likely to not harm security for the TLSv1.2-capable devices.

Quick question: how do I configure Conscrypt?

Here is how I fixed this for our app. Sorry that these are screenshots, but our repo is private.

Here is how I fixed this for our app. Sorry that these are screenshots, but our repo is private.

@c4augustus the test for this was failing  with org.mockito.exceptions.verification.NoInteractionsWanted:  No interactions wanted here But found this interaction on mock 'sSLContext'
verifyNoMoreInteractions(
                SSLContext::class.java,
                Platform::class.java,
                sslSocketMock,
                sslContextMock,
                sslSocketFactoryMock,
                platformMock,
                inetAddressMock,
                localInetAddressMock
        )

@gotev for me to work (on a specific device without Google Play Services), I had to call sc.init(null, trustManager, null) instead of sc.init(null, null, null), where trustManager is your custom trust manager which extends X509TrustManager. The key point is to write it secure and make checkServerTrusted to accept your server.


Working on getting the dice roller for each stat

I'm working on getting the stats to be able to roll for your stat.
Changes / Comments
Roll20 Requests
Comments are very helpful for reviewing the code changes. Please answer the relevant questions below in your comment.

[ ] Does the pull request title have the sheet name(s)? Include each sheet name.
[ ] Is this a bug fix?
[ ] Does this add functional enhancements (new features or extending existing features) ?
[ ] Does this add or change functional aesthetics (such as layout or color scheme) ?
[ ] If changing or removing attributes, what steps have you taken, if any, to preserve player data ?
[ ] If this is a new sheet, did you follow Building Character Sheets standards ?

If you do not know English. Please leave a comment in your native language.

Character Sheet Info Roll20 Internal Use only.

Still new here, trying to see my changes


Add 'Buy me a coffee' button to README.md

So I can thank you for all the hard work, answering our questions and implementing features! ;-)

I was very happy to implement this one. :-)
Many thanks for all your appreciation.


[BUG] Invalid Notifications in the scheduler

Please check if the bug has already been reported in the Issues Tab and mention any related issues here.
Describe the bug
There are lot of logs of invalid notifications being scheduled in the scheduler (Quartz) that do not exist in the database. Ideally, this should not happen because if the notification is deleted from the database it should also be removed from the scheduler.
Logs-
2021-03-25 09:00:00,138 WARN  [quartzScheduler_Worker-2] org.radarbase.appserver.event.listener.QuartzMessageJobListener: The notification does not exist in database and yet was scheduled.
2021-03-25 09:00:00,232 INFO  [quartzScheduler_Worker-3] org.quartz.core.JobRunShell: Job DEFAULT.message-jobdetail-454838b3-2da2-4c39-b2e0-bc002d248c38-13486 threw a JobExecutionException:
org.quartz.JobExecutionException: org.radarbase.appserver.exception.InvalidNotificationDetailsException: The Notification with Id 13486 does not exist in project STAGING_PROJECT for user 454838b3-2da2-4c39-b2e0-bc002d248c38
	at org.radarbase.appserver.service.scheduler.quartz.MessageJob.execute(MessageJob.java:103)
	at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: org.radarbase.appserver.exception.InvalidNotificationDetailsException: The Notification with Id 13486 does not exist in project STAGING_PROJECT for user 454838b3-2da2-4c39-b2e0-bc002d248c38
	at org.radarbase.appserver.service.FcmNotificationService.getNotificationByProjectIdAndSubjectIdAndNotificationId(FcmNotificationService.java:431)
	at org.radarbase.appserver.service.FcmNotificationService$$FastClassBySpringCGLIB$$8d21085e.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:771)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:367)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:118)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691)
	at org.radarbase.appserver.service.FcmNotificationService$$EnhancerBySpringCGLIB$$8766759a.getNotificationByProjectIdAndSubjectIdAndNotificationId(<generated>)
	at org.radarbase.appserver.service.scheduler.quartz.MessageJob.execute(MessageJob.java:89)
	... 2 common frames omitted

Priority
3
Difficulty
4
To Reproduce
Steps to reproduce the behavior:

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

Expected behavior
This should not happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]

Smartphone (please complete the following information):

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

Mobile App
The Mobile app ,if any, used with this app server

Name [e.g. RADAR-Questionnaire] - aRMT
Version [e.g. 0.5.8] - 1.1.0-alpha
Github repo [If applicable]

Additional context
Add any other context about the problem here.

should be fixed by #239


[Feature]: Playing progress of video widget

Is there an existing issue for this?

[X] I have searched the existing issues

Summary

Get the playing progress of the video
Control the video to start from a certain progress.

Why should this be worked on?
User's use case :
We have a lot of machine producing videos. I want to add a function for qa. the reviewers count add comment for a certain frame of video. So I want to get the time of the video.

Stats

Stat
Values

Reach
30

Effort (months)
0.25

Action items:

Add a new binding - video.progress which contains the time in "hh:mm:ss" format
Add a new property - "Start at" which is an input field which will accept the format for the progress to start at in the above described way.


Feedback: Optional Boolean Argument for Widget Placement

This just a suggestion, not sure how hard it would be to implement. It would be cool if most/all widgets came with a boolean argument defaulted to false. If set to true it would create a rectangle canvas with  size and position of the widget with color(1,0,0,0.3), or some other transparent color, for placement purposes.
Example:
self.placement_label = Label(placement = True)
This would create a rectangle the size and position of self.placement_label so that it is easy to determine the size and position of the label. I find that I am constantly creating canvas objects to get placement just right. Not sure how many other people have this issue.

Have you tried using inspector?

Alternatively just add it to Widget during development, and you can use it for Label or whatever else. It doesn't make sense to add this to core imo.
Builder.load_string('''
<Widget>:
    placement: False
    canvas:
        Color:
            rgba: 1, 0, 0, self.placement and 0.3 or 0
        Rectangle:
            pos: self.pos
            size: self.size
''')

Thanks for the heads up on Inspector.
Bionold, this would probably be just easier. I figured adding it to every widget would be overkill/unnecessary but I wasn't sure if it was an all or nothing kind of addition.


clight: 4.8 -> 4.9

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/FedeDP/Clight/releases.
meta.description for clight is: "A C daemon that turns your webcam into a light sensor"
meta.homepage for clight is: "https://github.com/FedeDP/Clight"
meta.changelog for clight is: ""
Updates performed

Version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 4.9 with grep in /nix/store/7jssd0f1zy8qgr0vdfdihz6h3hqijyql-clight-4.9
found 4.9 in filename of file in /nix/store/7jssd0f1zy8qgr0vdfdihz6h3hqijyql-clight-4.9

Rebuild report (if merged into master) (click to expand)

1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
clight

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/7jssd0f1zy8qgr0vdfdihz6h3hqijyql-clight-4.9 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A clight https://github.com/r-ryantm/nixpkgs/archive/e95eaa9583b3ae8df48e6834aae2a018731a2baf.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/7jssd0f1zy8qgr0vdfdihz6h3hqijyql-clight-4.9
ls -la /nix/store/7jssd0f1zy8qgr0vdfdihz6h3hqijyql-clight-4.9/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

clight

Maintainer pings
cc @eadwu for testing.

I tested this with an overlay an it works. Merge together with #201691.


RuntimeError:cuda out of memory

now,I have 4 Tesla T4 GPU(every one is 16G),when I run video_inpaintint.py to object removal in my video(1440x720),but report cuda memory error,only one GPU is used.

RuntimeError: CUDA out of memory. Tried to allocate 6.95 GiB (GPU 0; 14.76 GiB total capacity; 9.42 GiB already allocated; 2.78 GiB free; 10.66 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

so how to use my all 4 GPUs?，（I hope not change the image size）
Originally posted by @wangdi9 in https://github.com/hitachinsk/FGT/issues/23#issuecomment-1366292013

Currently, we don't implement the inference processing on multiple GPUs, maybe I will implement this function in the future. If you want to run the inference codes on the videos with large resolution. I provided some suggestions in #23. The keypoint is that you should reduce the frame number in the attention process. Such operation makes FGT feasible to process videos with larger resolution but the performance will degrade.
Btw, I recommend our another video inpainting project ISVI. This video inpainting algorithm could process videos with larger resolution (up to 4K).

Thank for your kind and quick help!
solved a big puzzle for me.I understand.
Thanks again!


remove poll transaction

Poll transaction method is returning confirmed event the tx fails if user have insufficient bonk and have a unused nft.

@samott This is a urgent fix. You can check the whole issue in this slack thread https://gator-labs.slack.com/archives/C06054PPNSY/p1734701225694339

It correctly verifies the txn confirmation status.


Discussion thread: New DestVI model that supports Visium HD (single-cell spatial transcriptomics) data - Timeline, releases and alternatives

Hey everyone!
In this thread https://github.com/scverse/scvi-tools/issues/2830 with @canergen it was mentioned a release of a new DestVI model that would be compatible with single-cell spatial data (such as Visium HD that has 2 micron bins/spots, resulting in well over 650k bins/observations). The current model seems to not be able to capture this sparse data and I don't think it has been optimized for this much data either (I tried training 15 epochs with GPU and it took 2 hours with the 8 micron resolution - 580k bins/"spots").
I've been testing my own implementations on "deconvolution" using annotated scRNA datasets and the new HD data (10X Visium datasets) doing:

Extracting top cell markers from the reference scRNA for each cell type, and identify these same markers on the sc-ST data, take the average of them and then associate the cell type for that given bin with the highest average of log norms. This does capture the patterns, but it doesn't seem to be the best optimal way to go about this. I've also tried adjusting the lognorms by the spatial connectivities so it captures some spatial information in the mix, and this increased the "intensity" of the bins (bins that are closer together, will have their adjusted log norms uplifted by the spatial connectivities which consider neighbor bins)
I've tried using LGBM models and using once again cell markers extraction methods as a method of dimensionality reduction. This way I go from 15k genes + to around 400 genes that were found to be markers for the cell types in the reference scRNA. However, I am not sure how well this translates into the spatial data either (see pictures below);

With this being said, I'm quite confident the new DestVI model could be a nice added feature to deconvolute/map sc-ST data from an annotated scRNA reference (or even unsupervised model, perhaps);
Is there any timeline for when this would be release? Quite excited to test it out as I'm also trying to come up with a feasible solution for cell deconvolution on such granular/high resolution data
Any ideas as well on this?
Thank you!
For reference, leaving some images here of my attempts:
Left: Predictions using LGBM model and cell markers as a dimensionality reduction method; Right: average of log norms of the top cell markers for that given cell type. The predictions seem to follow the patterns seen in the average of the log norms of cell markers for a given cel type, but not sure if this would be a good approach; Besides, cell types that are not well represented, no longer have those patterns captured (my training data has 1500 cells, and some only had 10-15 observations for a given cell type, so those naturally are not predicted well - this method is highly dependent on the training data, and I was hoping the new destVI would solve this)

Cell type assignment using the top/highest 10% averages from the cell markers for each cell type, with experssion matrix adjusted by their spatial connectivities:

Hi, DestVI also after enhancements is still an expensive algorithm (for each spot it has to decode to each cell-type leading to a high compute time). Increasing batch size also has it's limitations specifically in DestVI.
TACCO (https://www.nature.com/articles/s41587-023-01657-3) is the most scalable deconvolution algorithm to my knowledge and it might be a good starting point. I think identifyinf marker genes is a justified approach though. Also the Visium HD preprint uses publication and it might be a good starting point to do the analysis (https://www.biorxiv.org/content/10.1101/2<IP_ADDRESS>7233v1).
Timelines are somewhat hard to predict. We will post it on X/biorxiv.

Hi, DestVI also after enhancements is still an expensive algorithm (for each spot it has to decode to each cell-type leading to a high compute time). Increasing batch size also has it's limitations specifically in DestVI. TACCO (https://www.nature.com/articles/s41587-023-01657-3) is the most scalable deconvolution algorithm to my knowledge and it might be a good starting point. I think identifyinf marker genes is a justified approach though. Also the Visium HD preprint uses publication and it might be a good starting point to do the analysis (https://www.biorxiv.org/content/10.1101/2<IP_ADDRESS>7233v1). Timelines are somewhat hard to predict. We will post it on X/biorxiv.

Thank you for the reply! I've read their preprint paper, but they use very little amount of samples and they do a type of overclustering that is already done in scRNA; But this isn't scalable with lots of samples (I'd like something more automatic, thus the modelling approach). I will have a look at TACCO!


Add support to login using env variable SPARSIFY_API_KEY

Functionality Moved to SparsifyCredentials class as a part of PR #192


Issue in downloading tiles

I am getting the error like this
Traceback (most recent call last):   File "c:\users\lenovo\anaconda3\lib\runpy.py", line 193, in _run_module_as_main     "__main__", mod_spec)   File "c:\users\lenovo\anaconda3\lib\runpy.py", line 85, in _run_code     exec(code, run_globals)   File "C:\Users\Lenovo\anaconda3\Scripts\wms-downloader.exe\__main__.py", line 7, in <module>   File "c:\users\lenovo\anaconda3\lib\site-packages\wms_downloader\download.py", line 53, in main     create_vrt_file(config)   File "c:\users\lenovo\anaconda3\lib\site-packages\wms_downloader\download.py", line 104, in create_vrt_file     subprocess.check_call(args)   File "c:\users\lenovo\anaconda3\lib\subprocess.py", line 358, in check_call     retcode = call(*popenargs, **kwargs)   File "c:\users\lenovo\anaconda3\lib\subprocess.py", line 339, in call     with Popen(*popenargs, **kwargs) as p:   File "c:\users\lenovo\anaconda3\lib\subprocess.py", line 800, in __init__     restore_signals, start_new_session)   File "c:\users\lenovo\anaconda3\lib\subprocess.py", line 1207, in _execute_child     startupinfo) FileNotFoundError: [WinError 2] The system cannot find the file specified
My config.yml is
**service:
version: 1.0.0
url: https://tiles.maps.eox.at/wms?service=wms&request=getcapabilities
srs: EPSG:4326
format: jpeg
layer: s2cloudless-2018
bbox:
west: 97.0001388889999987
south: 29.0001388889999987
east: 94.9998611110000013
north: 26.9998611110000013
size: 0.70312500000000000000
resolution: 1024
timeout: 300
projection: EPSG:4326
directory: cloudless-images
vrtfile: tiles.vrt
tmpfile: /tmp/wms.xml**

You need GDAL
https://gdal.org/


Hooking works for Windows 10 users, but not for Windows 7

Code:
bool redirect(bool enable, void **function, void *redirection)
{
	if(DetourTransactionBegin() != NO_ERROR)
	{
		return false;
	}

	if(DetourUpdateThread(GetCurrentThread()) != NO_ERROR)
	{
		return false;
	}

	if((enable? DetourAttach:DetourDetach)(function, redirection) != NO_ERROR)
	{
		return false;
	}

	if(DetourTransactionCommit() == NO_ERROR)
	{
		return true;
	}

	DetourTransactionAbort();

	return false;
}

typedef int(__stdcall *IsCorrectItem_t)(int);
IsCorrectItem_t g_real_IsCorrectItem = reinterpret_cast<IsCorrectItem_t>(0x005D4A2B);

int __stdcall hooked_IsCorrectItem(int nItemID)
{
	return 0;
}

// inside my function
detours::redirect(true, reinterpret_cast<void **>(&g_real_IsCashItem), hooked_IsCorrectItem);

This seems to be perfectly fine on Windows 10, but on Windows 7 it simply doesn't work. I installed the static Detours library through vcpkg.

IsCorrectItem_t g_real_IsCorrectItem = reinterpret_cast<IsCorrectItem_t>(0x005D4A2B);

Are you sure it's an identical executable on both platforms? If not, 0x5D4A2B isn't likely to point anywhere useful; you'd want to either specify it for each expected version, or provide a way to seek the correct address.  Note this'll also be the case if the binaries you're detouring are updated at any point in future, if that might be something you want to keep track of.

@sharkitgood It definitely is; considering I am the one supplying the binary to the user running Windows 7.
My procedure is this:

Start the process with CreateProcessA (started suspended).
Call LoadLibraryA inside it by creating a remote thread. The library that is being loaded contains the code I have attached.
Resume the thread retrieved by CreateProcessA.

The address shouldn't ever change. It is an extremely old executable, 12 years old, that does not make use of ASLR.
I have asked a Windows 7 user to attach x32dbg to the process and what's going on. My library also changes memory at certain locations - it calls VirtualProtect to change page protection, then writes to the pointer. That also works on the Windows 7 system. However, the detours just don't work.

Have you checked the return value?

how about not using detour for game hacking, use other hooking bases.

@appleman1232 any suggestions?

@appleman1232 any suggestions?

try madcodehook,but it's not free

There has been no further commentary on this question.  Closing.


[WIP] Initial bump to .NET Core 2.1

AppVeyor is waiting for https://github.com/appveyor/ci/issues/2373


Action Server to execute trees

Thanks to the hard work of @MarqRazz , we have here a first draft of a "standard" action server to execute trees on demand.
Virtual methods add a number of customization points, that are hopefully general enough to cover 99% of the cases.

I added some basic docs and cleaned up a few things so the examples run, let me know what you think. I was traveling most of today but will try and look into the other changes you made later.

I have a fix for the pre-commit and minor changes to the docs if you are okay with me pushing it.

I was going to merge it... right now! Waiting for CI to turn green. Thanks!

I will wait for your changes to the docs to be pushed


[1.12.1] Furnance changes rotation if facing into a block

If you place a furnace down, and place some other solid block in front of if (i tried it with gravel & another furnance), it will rotate as soon as it is fired up. After it rotated, it is empty and the items you just placed in the furnace are gone. This happens in both, SpongeForge and SpongeVanilla. This does not happen with only Forge installed or in Vanilla Minecraft.
Tested Versions:
SpongeForge: 1.12.1-2444-7.0.0-BETA-2609
with Minecraft Forge: <IP_ADDRESS>4
and
SpongeVanilla: 1.12.1-7.0.0-BETA-326

still happens with https://github.com/SpongePowered/SpongeCommon/commit/caccfa4f325396c866bb803d51ee0c3763e8d073 (used SpongeForge), looks like the block rotates after being placed
https://phit.link/s/2017-11-07_18-33-59.mp4

@phit: I can't reproduce this on the latest SpongeForge. Can you see if it's still an issue for you?


User defined cursor color

Cursor color can't be changed. I used to work with a bright cursor color.

Thanks for your contribution 👍
I agree, the theme should give priority to the user configs.

🚢 Shipped in NPM package release version 🏷  0.4.0

Cool! seems great with the pink cursor.


added an include to fit-model-multi.cpp

Needed #include  for fit-model-multi.cpp.  Without it I got a runtime error under Visual Studio 2015.

Sorry for the slow reply- Thank you very much!


Remove pre-push hooks

Everyone gets frustrated using it and most folks just skip it anyways. We now have fast CI so it should be good to remove.

I still find it useful. I would rather disable it on a per-project basis.

Or rather opt-in than opt-out

I think the frustration comes from that it takes forever to run. For example, when working on js-multiaddr as the entire suite (node, browser and webworker) takes less than five seconds for me. But on ipfs/js-ipfs it takes 10 minutes to run through the entire thing, so usually I skip it.
Having it be opt-in rather than opt-out sounds like a acceptable compromise though.

Isn't it opt-in already? If you have a pre-push section in your package.json, then it is run. Else it's not.

I was wrong. Even without a pre-push section it's running something. I'm happy to look into how to make this opt-out before we remove it completely.

@vmx afaik, doing the following steps will make my pushes for a project run pre-push stuff before:
git clone $js-ipfs-git-url
cd js-ipfs
yarn
git commit --allow-empty --message "Hello"
git push origin master

Which is opt-out (I need to remove ./.git/hooks/pre-push) rather than opt-in.

I tried locally the first package that felt sensible. git-validate seems to do exactly what I'd expect. If there is no pre-push section, it does nothing. If there is one (compatible to what we have today), it runs those scripts.
So I propose switching to git-validate and removing pre-push from the projects that don't want to have it. They could even just remove the test and leave the lint in.

#244 introduced a small npm install bug, https://github.com/ipfs/js-ipfs/issues/1444#issuecomment-405345318


BootstrapCacheLoader replacement in Ehcache 3

Hello,
I'm trying to migrate from EhCache 2.x to 3.x. In my 2.x configuration file, I had something this:
<bootstrapCacheLoaderFactory             class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"/>
And in Java I was using the cache.bootstrap();. I'm trying a replacement to replicate the above configuration, I read all the documentation but I could find anything. Is functionality completely removed from Ehcache 3.x?
Thanks in advance.

There is no RMI replication support in Ehcache 3.x. It should be pretty simple to implement using an appropriately configured cache listener however.


Make accessible function signature properties

Overview
Today I was trying to retrieve and update a function signature through the API and it is kind of non-trivial compared to IDA's API.
For example, using the API I could not find a way to get the fully qualified function signature string as shown at the top of each function (or if you press Y):

The closest thing is str(current_function.function_type) but it does not include the function name:
>>> str(current_function.function_type)
'int64_t (int64_t arg1, int64_t arg2, char* arg3)'

Suggestion
I think that the fully-qualified function signature string should be made available as a property off the Function object. Please consider something like the following:
>>> current_function.type_string
'int64_t sub_232c0(int64_t arg1, int64_t arg2, char* arg3) __noreturn`

>>> current_function.type_string = 'int64_t sub_232c0(int64_t arg1, int64_t arg2, char* arg3)`

This is what I have to do currently:

# lol probably not portable for all sigs?!?
type_string = (' %s(' % current_function.name).join(str(current_function.function_type))
new_type_string = type_string.replace("__noreturn", "")
new_type = bv.parse_type_string(new_type_string)
current_function.function_type = new_type

PS: I had a hard time finding the parse_type_string function. It might also be helpful to update the Type module docs to reference it, or have an alias for it.

I've added parse_type_string along with a few others to the class Type  docstring
made the function_type setter also take a string
changed the repr on the function itself to return the full prototype with name.


Feature: Train approval & Code review

Code review with related train approval currently not nice handled.
Describe the solution you'd like

Within UI file (code) displaying
Comment on specific lines
Code diff highlighting by multiple trains with minimal changes --> requires git for changes

should not be a priority at the moment, according to O. Kohlbacher
Meeting: 24.11.2022


404 page displayed after delete resource in Salesforce

SURE-8657
Description
Original Report: SUSE Slack
Environment: Rancher 2.7.9
The steps to reproduce the issue are as follows

Delete the sparkoperator.k8s.io.sparkapplication resource.
Log out.
Log in.
The error message in the attachment is displayed.
The default/sc-ice-only4 resource (shown in the error message) has already been deleted (confirmed by kubectl).
As a workaround, by pushing the "Home" button, customer can use Rancher UI.

This should reference the JIRA, and vice versa, when it's created

Linking SURE-8657. That has been resolved given the workaround to change the user preference of where to return on log in. Expect that the user deleted the resource whilst on the resource detail page and immediately logged out

Sorry but this is an issue that has to be covered as well.
If the page is in the preferences but does not exists, it should not trigger error.

Linking SURE-8657. That has been resolved given the workaround to change the user preference of where to return on log in. Expect that the user deleted the resource whilst on the resource detail page and immediately logged out

Thanks for adding the issue, I asked him to create it.


No success

Thanks for your work, but no show up.
gem 'quill-rails5', github: 'paul-at/quill-rails5'
<%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
<%= form_for(article) do |f| %>

    <%= f.label :beschreibung %>
    <%= quill_field f, :beschreibung %>

<% end %>

quill_field doesn't embed editor, it only links existing quill editor to a form
to display the editor you have to call the <%= quill %> as well

ok. thanks so far.
I have now:
<%= form_for(article) do |f| %>
<%= quill({}, style: 'height:35em') do %>
<% end %>

    <%= quill_field f, :beschreibung %>

<%end%>
I can save the formatet content, but it is not showing the content again in edit mode..

Output saved content between
<%= quill({}, style: 'height:35em') do %>

and
<% end %>

ok. Thanks

    <%= quill({}, style: 'height:35em') do %>
        <%= sanitize @article.beschreibung %>
    <% end %>
    <%= quill_field f, :beschreibung %>

Two things:

it needs => <%= link_to 'Edit', edit_article_path(article), data: { turbolinks: 'false' } %> to show up
For assigning a link, I def. need a checkbox =>  target="_blank" for my customers.

Please feel free to make a PR with improvements


Module request for private cache proxy

Issue description
A NixOS module which would setup https://nixos.wiki/wiki/FAQ/Private_Cache_Proxy in a way that it doesn't block other services would be great (i.e. a module which composes).

You could use the nginx module  and set up a virtualHost with that config inside.
Due to the merging behaviour of nixos modules, this will work, even if you already defined
nginx somewhere else. (Unless a virtualHost called cache.arianvp.me) already exists
systemd.tmpfiles.rules = [ "d /data/nginx/nar/temp" "d /data/nginx/nar/store" ];
services.nginx = {
  enable = true;
  virtualHosts."cache.acme.corp" = {
    locations = {
      "~ ^/nix-cache-info".extraConfig = ''
      proxy_store        on;
      proxy_store_access user:rw group:rw all:r;
      proxy_temp_path    /data/nginx/nix-cache-info/temp;
      root               /data/nginx/nix-cache-info/store;

      proxy_set_header Host "cache.nixos.org";
      proxy_pass https://cache.nixos.org;
      '';

      };
      "~ ^/nar/.+$".extraConfig = ''
      proxy_store        on;
      proxy_store_access user:rw group:rw all:r;
      proxy_temp_path    /data/nginx/nar/temp;
      root               /data/nginx/nar/store;

      proxy_set_header Host "cache.nixos.org";
      proxy_pass https://cache.nixos.org;
      '';
    };
  };
};


Automatic Closing Level MANUAL: keep open after terminating the test

Is your feature request related to a problem? Please describe.
Currently auto_closing_level=MANUAL keeps the browser open during the test execution.
It might be useful however to keep the window even after finishing the test.
Describe the solution you'd like
- If automatic closing level is MANUAL, nothing is closed automatically during the test execution is ongoing.
+ If automatic closing level is MANUAL, nothing is closed automatically and the browser is kept open even after the test execution is finished.

Describe alternatives you've considered
Using seleniumLibrary
Additional context
This might come in handy in RPA settings where RPA tasks no only require human intervention but where RPA prepares a session for the user.
RPA use case:
I would like to open a browser which opens a website and logs me in so that I can use it for what ever my job is.

I think this needs to be decided.
I would not do it this way. At least introduce either a new AutoClosingLevel KEEP or so or add an argument to New Browser

Let’s add new Enum which doesn’t close anything


this.camera.capture(true) error on android 4.1

When I try to do this.camera.capture(true) something goes wrong, and this comes out "Failed to save image to Media Store", this doesn't happen on higher versions, I tried on android 6.0 and had no problems.

+1

I got this issue on Android 6.0.1 . Its a Mi3

I have the same issue on Android 4.4 (API 19) emulator.

Check your permissions, I believe you need write external storage even if it saves to media store. Also remember that you have to both add the permissions to the android app manifest and check them at runtime.

I have all those permissions. And already checked them also
On Fri, Jun 15, 2018 at 11:03 AM Arild Jacobsen<EMAIL_ADDRESS>wrote:

Check your permissions, I believe you need write external storage even if
it saves to media store. Also remember that you have to both add the
permissions to the android app manifest and check them at runtime.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/wix/react-native-camera-kit/issues/94#issuecomment-397650161,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ARYPh2RLto6c6uEGGGwBhgK61zds9gzuks5t88ylgaJpZM4QfU8Q
.

I have this problem too


Add support for auth token

Enable passing an auth token to the server on CONNECT by setting it as part of the URI from a server.
options = {
  'servers': [
      'nats://token@<IP_ADDRESS>:4223'
   ]
}
yield from nc.connect(**options)

Fixes #37

Hi, is there a timeline on when a new version of this library will be released with this fix?

Hi @delfick sorry for the delay. I will do another major release next week but in the meantime I have just pushed earlier this minor version which includes this fix: https://github.com/nats-io/asyncio-nats/releases/tag/v0.5.2

excellent! much appreciated!


TaskGroups waitForAll changed behaviour in recent 5.8 toolchains

Description
With recent 5.8 toolchains waitForAll does not re throw the first observed error anymore it rather just silently returns.
Steps to reproduce
The following code behaves different in 5.7 and recent 5.8 snapshots
@main
struct Foo {
    static func main() async throws {
        do {
            try await withThrowingTaskGroup(of: Void.self) { group in
                group.addTask {
                    throw CancellationError()
                }

                group.addTask {}

                do {
                    try await group.waitForAll()
                } catch {
                    print("Got error", error)
                    throw error
                }
            }
        } catch {
            print(error)
        }
    }
}

// 5.7 prints
Got error CancellationError()
CancellationError()
Program ended with exit code: 0

// 5.8 Dev snapshot 2023-01-19 prints
Program ended with exit code: 0

Expected behavior
The behaviour shouldn't have changed.
Environment

Swift compiler version: Dev snapshot 2023-01-19

rdar://104507347

Hmmm thanks for the report -- we have a double bug here actually!
This was implemented wrong before:
   /// Wait for all of the group's remaining tasks to complete.
  @_alwaysEmitIntoClient
  public mutating func waitForAll() async throws {
    while let _ = try await next() { }
  }

so I 'fixed' it, by delegating to same impl as discarding task group, but with a flag... that didn't quite do the right thing -- the bug you observed.
BUT. We actually should instead fix the impl to keep the promise about wait until all have finished AND throw the first error, as a discarding task group does (and the "throw first" is also the existing semantics -- but it was missing the wait all here).
I'll submit a fix to have it corrected from both wrong versions of this.


Use g++'s -static option instead of specific libs

MinGW g++ recognizes -static as option to avoid the need to specify
individual libraries to be statically linked into the executable.
It also solves the warning of -static-libstdc++ not being recorgnized by
GCC 4.5.2 (TDM build)

Thanks!


Incorrect code generation for inner objects

it looks like code generator made some incorrect code for  inner objects
here is an example:
https://github.com/dart-lang/json_serializable/blob/6d5948508b65d8bec873b3fc213c17c884546156/example/lib/example.g.dart#L39
as we see list puts to json directly without convertion to json array
the same for single item
https://github.com/dart-lang/json_serializable/blob/6d5948508b65d8bec873b3fc213c17c884546156/example/lib/example.g.dart#L68
it should be something  like this  for single
  writeNotNull(
      'documentImageSizeLimit', instance.documentImageSizeLimit?.toJson());

and this for list
  writeNotNull('polygon', instance.polygon?.map((f) => f.toJson())?.toList());

explicitToJson: true fixes this, but i think that its quite incorrect and should be by default

i have version
json_annotation: ^3.0.1
and nested object have wrong 'toJson' generation

This bug is still happening 3.3.0.


Miscellaneous updates

Refer individual commits for more details

@jvano - most of the changes that you have already reviewed in the Tomcat repo