Where to put MJ-ST datasets

Hello. I have downloaded datasets from MJSynth and SynthText. Also, I have my own dataset for training that consists of ~300 images. In order to train the model, I have to run this script as the article states:
CUDA_VISIBLE_DEVICES=0 python3 train.py \ --train_data my_dataset/training --valid_data my_dataset/validation \ --select_data MJ-ST --batch_ratio 0.5-0.5 \ --Transformation TPS --FeatureExtraction ResNet --SequenceModeling BiLSTM --Prediction Attn
But I have some problems with organizing directories. Could please someone explain where should I place MJ and ST datasets and my own lmdb dataset?

Facing Same issue

this two dataset have diffirent format, diffirent image name so diffirent way to anotation so it is very hard to combine. i want to see how you can setup folder and file too

Sorry I am late to the party but I think I have figured this out. The instructions are given in the repo README.md but were a little confusing. Hopefully this helps others.
For the sake of completeness I'll start from converting our data to the lmdb dataset format which is necessary.
Ensure that the data structure is like so,
LMDB_DATA
   |-------- training
   |-------- validation
MY_DATASETS
   |--------my_data1.txt
   |--------my_data2.txt
   |--------my_data1_val.txt
   |--------my_data2_val.txt
   |--------my_data1
   |            |--------img1.jpg
   |            |--------img2.jpg
   |            |--------img2.jpg
   |                :
   |                :
   |--------my_data1
   |            |--------img1.jpg
   |            |--------img2.jpg
   |            |--------img2.jpg
   |                :
   |                :
   |      :
   |      :
create_lmdb_dataset.py
train.py
 :
 :

Example my_data1.txt content,
my_data1/img1.jpg
my_data1/img2.jpg
:
:

For creating the lmdb dataset you need to run the following for each dataset,
$ python3 create_lmdb_dataset.py --inputPath MY_DATASETS/ --gtFile MY_DATASETS/my_data1.txt --outputPath LMDB_DATA/training/my_data1
$ python3 create_lmdb_dataset.py --inputPath MY_DATASETS/ --gtFile MY_DATASETS/my_data2.txt --outputPath LMDB_DATA/training/my_data2

Make sure you create validation set aswell, for this you'll need separate txt
$ python3 create_lmdb_dataset.py --inputPath MY_DATASETS/ --gtFile MY_DATASETS/my_data1_val.txt --outputPath LMDB_DATA/validation/my_data1
$ python3 create_lmdb_dataset.py --inputPath MY_DATASETS/ --gtFile MY_DATASETS/my_data2_val.txt --outputPath LMDB_DATA/validation/my_data2

Now you can start the training,
$ CUDA_VISIBLE_DEVICES=1,2,3,4,5,6,7 python3 train.py \
--workers 0 \
--exp_name retrain1 \
--batch_size 32 \
--train_data LMDB_DATA \
--valid_data LMDB/validation \
--select_data my_data1-my_data2-my_data3 \
--batch_ratio 0.25-0.25-0.5 \
--Transformation TPS \
--FeatureExtraction ResNet \
--SequenceModeling BiLSTM \
--Prediction Attn

Notice that in --train_data I didn't explicitly specify LMDB_DATA/training and only specified LMDB_DATA whereas I supplied LMDB/validation explicitly in --valid_data argument. This discrepency can be easily addressed in the code base for uniform usage.
Another issue that I observed was that sometimes training fails during data loading not because there was an issue with the training command or the data supplied but because of some unknown issue in how the code samples by --batch_ratio. That is, I simply change up the batch ratios and the training starts as intended. I did not have the time to make a fix in the code base right now.
I hope this helps.


4534/stringified dict attribute support (#4808)

Pull request opened by the merge tool on behalf of #4808

Merged in 726b3788a72ea869581adbeb4ba70f45d523cbed


Can I get both username and id in a quick way?

Can I get both username and id in a quick way?
Hi! I am trying to scrap some follower's information of an account. But i only need username and id. I tried to customize it and save the results into csv. However the csv only store the username.
When I tried set the user_full as true, the csv did save both username and id. But the speed is too slow.Do I have a quicker way if I only want to scrap username and id? If not, Can i scarp only id instead of username?

It's not possible to get both username and id as fast as getting only the usernames, not yet at least
PS: I think that the title is wrong and misleading

So the only way to get username and id is to use 'user_full'? If yes, is it possible to get only id in a quicker way?

The only way to get more information than just an username, is to use user_full.
The reason is that the id resides in the user's page. So for every user you have to fetch the corresponding page, and then extract the id.
On the other side, when you fetch the followers/following, you get them in bunches of 20 handles.
A faster way might just be running different scripts. For example if you want the ID of 100 users, just run 20 scripts with 5 handles each. That would totally speed-up the process. You could do this in like 5 lines of bash

Thanks for your caring and quick response! But would these parallel processing get the same result?

@edwardqianofficial sure, you are basically running the same script/requests


InfrastrucutureSystems v0.15.5 breaks PowerSystems v0.28.1

julia> using PowerSystems
[ Info: Precompiling PowerSystems [bcd98974-b02a-5e2f-9ee0-a103f5c450dd]
ERROR: LoadError: LoadError: UndefVarError: convert_type not defined

https://github.com/NREL-SIIP/InfrastructureSystems.jl/compare/v0.15.4...v0.15.5
specifically

InfraSys v0.15.5 deletes convert_type: https://github.com/NREL-SIIP/InfrastructureSystems.jl/compare/v0.15.4...v0.15.5#diff-814b9e4969b1650fb0ca1da000c6fa05L161)
PowerSystems v0.28.1 allows InfraSys v0.5.5: https://github.com/NREL-SIIP/PowerSystems.jl/blob/0fb1f4b5e2c686b29ca828f57347899ef445e9b8/Project.toml#L27
...and uses convert_type e.g. https://github.com/NREL-SIIP/PowerSystems.jl/blob/0fb1f4b5e2c686b29ca828f57347899ef445e9b8/src/base.jl#L1169

If that's right, here's advice on what to do https://github.com/SciML/ColPrac/blob/master/README.md#accidental-breaking-releases

Aside: Perhaps CI on the InfraSys repo should have run PSys tests? Here's how ChainRules.jl runs Zygote.jl tests for PR :slightly_smiling_face:
https://github.com/JuliaDiff/ChainRules.jl/blob/9663f935cecbdf490525f58d9adf6616340f7510/.github/workflows/IntegrationTestZygote.yml

If IS.convert_type was private, then PowerSys should not have been using it.
Or if IS.convert_type was public API, ISv0.15.5 should have been v0.16.0?
FWIW, i think the best way forward it to release a v0.15.6 that's identical to v0.15.4, then re-relase what was v0.15.5 as v0.16.0

Sorry about the mix-up. We just made the release with the fix.


Add files via upload

Add new colleage info

@sunk-dev Thank you for your patience while waiting for a review and processing your request. Pull request merged. Please start applying for JetBrains educational subscription at https://www.jetbrains.com/shop/eform/students in an hour, to allow the changes to propagate through JetBrains systems.


Update mock-event-processor.adoc

An unmentioned restriction exists on the error types you are able to return in a mock. Disclaimer inserted.

The information provided in this PR has been inserted into the following PRs:

https://github.com/mulesoft/docs-munit/pull/197
https://github.com/mulesoft/docs-munit/pull/198
Please, do not make changes or comments on this PR.
Thanks!

Hi, @steftux!
Thanks for taking the time to collaborate with MUnit documentation!
Please, let us tell you that we have improved our articles by taking into account your contribution.
If you want, you can see the PRs that will be published soon:

https://github.com/mulesoft/docs-munit/pull/197
https://github.com/mulesoft/docs-munit/pull/198

As we have already included the requested information in the previous PRs, we will close this PR now.
Please, do not hesitate in contacting us again in case you need any further assistance.
BR,
Cristian Pose


Google chrome returns ERR_CONNECTION_REFUSED

Environment

OS: MacOS 12.6
mkcert version: 1.4.4
Server: localhost
Client: Chrome 105.0.5195.125

What you did
mkcert -install
mkcert {$domainName}
What went wrong
Works well on firefox & safari but not on chrome when accessing my react app on $domainName:3000 using command line:
HTTPS=true DISABLE_ESLINT_PLUGIN=true SSL_CRT_FILE=~/Documents/$domainName.pem SSL_KEY_FILE=~/Documents/$domainName-key.pem npm run start

I've been able to make my app work on chrome when disableing wifi on my laptop. It looks like chrome is trying to resolve from internet (and fails) before resolving from my localhost.

Check the DNS provider in Chrome.If it is set to something other than "Use your current service provider" then switch it to that and see if it works.


Conversions for v1beta3 API & Controller changes to use served API version

Issue #, if available:
Description of changes:
Conversions from v1beta1 <-> v1beta3 and v1beta2<-> v1beta3 versions. v1beta3 will be hub, storage and served version.
Change also has controller and other code changes to start using v1beta3 API.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/lgtm

/approve
/hold

/lgtm

/unhold


Add support for serializing SCT Lists

depends on #1075

I've just merged #1075, could you rebase this on top of master?
Also, if you could put any changes to address comments in a separate commit for now that'd be super helpful to me when reviewing - we can rebase and squash as a last step before merging, thanks!

In RFC6962 3.3.  Including the Signed Certificate Timestamp in the TLS Handshake
...
SignedCertificateTimestampList ::= OCTET STRING
...
I think it would be more useful to return the SCT List already encoded in asn1.
What do you think? I've got an "implementation" at dc6cec588a37723eedf02a1a83236c39a28badee

Hmm, that hand-rolled ASN.1 bit makes me feel a bit uncomfortable...
What's the performance win from that over using the encoding/asn1 package?

Reworked patch,
regarding exporting SCTListSerializedLength its currently the only way for callers to determine the length of buffer needed for the Here method unless they loop around themselves.
Also hand serializing ASN1 vs asn1.Marshal
ASN1byHand  300000  5085 ns/op  128 B/op  1 allocs/op
ASN1Marshal  30000 45368 ns/op 1072 B/op 11 allocs/op

benchmark run on a raspberry pi because I like to get a drink between builds

This looks great although I'm somewhat confused about the benefit of being able to pass in a here byte slice to fill. You allow slices that are larger than here but always begin writing to the start of the slice so you can't serialize multiple lists into a single slice.
Is this just to enable slice re-use between calls without having to initialize a new one? If so I think you should be checking that the provided slice is exactly the correct size or if not doesn't contain trailing garbage as you are essentially providing two ways to get the slice back, either the return arg, or from the slice you are passing in which allows people to very easily shoot themselves in the foot and re-use the here slice in a way that will create invalid serialization.
If it's the case that the ...Here methods are being used for performance when a reusing input slice I think the gains are outweighed by the complex API, especially when this code will probably live in a path that isn't super performance sensitive.

What's the latest on this? I agree with @rolandshoemaker's comment that we probably don't need a "Here" variant.

@AlCutter do you have any objections to the current revision? I think providing the SerializeSCTList method and the changes in SerializeSCTListHere are enough to keep people from shooting themselves in the feet (...probably).
We'd love to get this landed in the nearish future so we can start working on Boulder support.

@mehmooda: Regarding the above comments on benchmarking, it looks like you've put a bunch of effort into making this very efficient. But I don't anticipate this code being used in a highly performance-sensitive context. In Boulder, where we intend to use it for Let's Encrypt, the difference between the 45 microseconds / op version based on asn1.Marshal and the 5 microseconds / op version based on hand-rolled ASN.1 is negligible, and we'd prefer the one based on asn1.Marshal on the grounds that it's easier to reason about and more likely to be correct. Is there a reason you prefer the heavily-optimized version?

@mehmooda, I really appreciate the effort you've put in to optimising this, but @jsha sums it up well; the hand-rolled ASN.1 code comes with a cost in complexity that doesn't seem to be a good trade off currently, could you slim it down to call to the asn1 library?


Explicitely install OCaml 4.02.3 when using older ppas (where only 4.…

…02.1 is available)
@avsm do you plan to update these to OCaml 4.02.3 as well?

It's tricky to update older PPAs since the rebuild of the dependent older OPAM needs some work.  I'm working on a much more flexible APT builder using Docker+Checkinstall that should hopefully give us all possible permutations from a single script.  I've got it working now, just scripting it.


Bootstrapping parser.

Adding Rust code to the project doesn't seem like a good direction.  Any chance of not doing that? :smile:

These Rust code is not natively compiled; It targets WebAssembly and runs in Life in a "bootstrapping" way.

Ahhh.  So it's just temporary code, and the end goal is to have the same thing working, but written in Go?

The final form will be Life IR embedded in Go.


Unique Link Baby Book in Firebase to Admin View

The Task
Previous Sprint Callback: Let's remember our goal for the baby book: We want incarcerated mothers to keep in touch with their baby's journey. To do this, caretakers must capture images and upload associated captions to their assigned baby book through the app. The data for each baby book is stored in our Firebase Database.
Our Sprint Now: In order for the non-profit administrators to access all the pictures in each baby book, we must provide each baby book with a unique, encrypted link for them to access. This will be linked in the baby profiles table for each baby.  They will then be able to download any pictures from the photo gallery and send them to the mothers via emailed pictures or mailed postcards. Later, this link can also be shared once the mother is out of prison to view their baby's entire gallery.

Important Information

Privacy is our concern- the only people with this link should be the admin or the mother it will be shared to.
Each baby book has a private unique link
This link must be in the baby profile table

Never hesitate to reach out for help!

Completed!


Is ECC-384 (secp384r1) key supported for creating and signing manifest?

I am trying to create a manifest and want to use the ECC-384 (secp384r1) keypair.
I have generated the private key using:
$ openssl ecparam -genkey -name secp384r1 -outform PEM -out secp384r1.priv.key.pem
However, when I try to create  manifest
manifest-tool --debug create
--config my.config.yaml
--key secp384r1.priv.key.pem
--fw-version 1.2.3
--output my.manifest.bin
I am getting below error:
023-01-11 09:06:11,803 INFO Vendor-ID: fe1d22aa8d2f589db31a962349b16969
2023-01-11 09:06:11,803 INFO Class-ID: 692be9ae461c5018b855726b71a820f9
2023-01-11 09:06:11,826 ERROR int too big to convert
Traceback (most recent call last):
File "~/.local/lib/python3.6/site-packages/manifesttool/mtool/mtool.py", line 142, in entry_point
CreateAction.entry_point(args, ManifestAsnCodecV3)
File "~/.local/lib/python3.6/site-packages/manifesttool/mtool/actions/create.py", line 190, in entry_point
asn1_codec_class=asn1_codec
File "~/.local/lib/python3.6/site-packages/manifesttool/mtool/actions/create.py", line 152, in do_create
ecdsa_helper.signature_der_to_raw(signature)
File "~/.local/lib/python3.6/site-packages/manifesttool/mtool/ecdsa_helper.py", line 90, in signature_der_to_raw
return int_to_bytes(r, 32) + int_to_bytes(s, 32)
File "/usr/local/lib64/python3.6/site-packages/cryptography/utils.py", line 77, in int_to_bytes
length or (integer.bit_length() + 7) // 8 or 1, "big"
OverflowError: int too big to convert
Also., tried with Python 3.10.7 and got the same error:
2023-01-11 08:52:48,494 INFO Vendor-ID: fe1d22aa8d2f589db31a962349b16969
2023-01-11 08:52:48,494 INFO Class-ID: 692be9ae461c5018b855726b71a820f9
2023-01-11 08:52:48,532 ERROR int too big to convert
Traceback (most recent call last):
File "~\AppData\Local\Programs\Python\Python310\lib\site-packages\manifesttool\mtool\mtool.py", line 142, in entry_point
CreateAction.entry_point(args, ManifestAsnCodecV3)
File "~\AppData\Local\Programs\Python\Python310\lib\site-packages\manifesttool\mtool\actions\create.py", line 185, in entry_point
manifest_bin = cls.do_create(
File "~\AppData\Local\Programs\Python\Python310\lib\site-packages\manifesttool\mtool\actions\create.py", line 152, in do_create
ecdsa_helper.signature_der_to_raw(signature)
File "~\AppData\Local\Programs\Python\Python310\lib\site-packages\manifesttool\mtool\ecdsa_helper.py", line 90, in signature_der_to_raw
return int_to_bytes(r, 32) + int_to_bytes(s, 32)
File "~\AppData\Local\Programs\Python\Python310\lib\site-packages\cryptography\utils.py", line 63, in int_to_bytes
return integer.to_bytes(
OverflowError: int too big to convert

Hei,
we use SECP256R1. It is not supported as of now.


Change Corporate Console production link from member.lfx.linuxfoundation.org to organization.lfx.linuxfoundation.org

Change Corporate Console production link from member.lfx.linuxfoundation.org to organization.lfx.linuxfoundation.org

This is deployed to PROD.

verified on prod


Suggestion on the ultimate set of rules for a security investigation

Cool project. A couple of thoughts I have on how I could find this useful.
In the scenario of a compromised pod (e.g. bitcoin mining identified)

dump metadata of the container for useful security investigation. E.g. processes, logs
add new labels and alert that a security investigation as begun in slack
create a netowork policy to restrict egress traffic (prevent remote access control) to isolate the pod

Hello,
Thank you for your message.
Your ideas are really valuable, and of course, more actions will be added to talon. This is a POC, I'm not currently convicted about how I managed the code, I'll change a lot soon for allowing people to add action easily, like with a framework.
For Slack notification, this is something I already started to work on:

Hi @jonny-wg2,
I changed a lot of things in the code base and your points 2 et 3 are now fully completed. For the 1, it can only work if the pod embeds a shell, which is not supposed to be in production for security purpose.

Your 3 requests are now implemented.


Update store-fslogix-profile.md

Updated the article to the most recent one on Docs instead of Microsoft Tech Community.

Getting started with FSLogix profile containers on Azure Files in Windows Virtual Desktop

@christiaanbrinkhoff : Thanks for your contribution! The author(s) have been notified to review your proposed change.

#sign-off


phantomjs 2 fails to render pdf properly

i'm on osx 10.9.5 using a built version from a2912c216d06df4d8b51f12ad4082a48c5fc7ba6
i'm trying to render html to an A5 portrait pdf but i never get the required result. the pages do not respect css width and height.
here's my rasterize script, a simplified version of that one.
and here is an html test file (it's got two A5 portrait pages, first is blue, second is red)
so when is go ahead and phantomjs rasterize.js test.html test.pdf i get

whereas with phantomjs1 i get the correct
 (the white lines being osx preview artifacts probably due to rounding millimeters to pixels)
i've tried messing around with all the parameters (pageSize, clipRect, viewportSize, zoomFactor..) to no avail :(

:+1:

@athibaud Can you share a screenshot with a render of one of the colours set at half width? PhantomJS 2 renders PDF differently on Windows, previously it was broken, the 2.0.0 update is far more accurate. I tried your html on Windows with 2.0.0 and most likely due to rounding it is 1px short in width, and 1px over in height. This can be worked around by providing width/height in the css in px instead 560px wide, 793px tall. I got the initial px values by multiplying the physical inch sizes by the DPI, on windows that is 96, it might be 72 for OSX I think. From my experiments units are all converted to px where 96px in css is equivalent to 1 inch. Let me know if the values I gave you work, else try these if Phantom is scaling by 72 instead of 96. 419px wide, 595px tall(You might need to adjust slightly as either could be over/under A5 width). Also from what I've seen you might have a typo in your css width mm units, width appears to be 148mm for A5 not 158mm.
@TheCloudlessSky What version of PhantomJS are you using? A newer build of 2.0.0 was released since, try it here: https://bitbucket.org/ariya/phantomjs/downloads

@polarathene thank you for your comment

I tried your html on Windows with 2.0.0 and most likely due to rounding it is 1px short in width, and 1px over in height. This can be worked around by providing width/height in the css in px instead 560px wide, 793px tall. I got the initial px values by multiplying the physical inch sizes by the DPI, on windows that is 96, it might be 72 for OSX I think.

i went ahead and used pxs in my css.. its worked out well for now so i'll use that a quickfix.
i don't have much time to understand/investigate why using mms doesn't work though, i wish i could look into it more..

From my experiments units are all converted to px where 96px in css is equivalent to 1 inch.

precisely :)

Also from what I've seen you might have a typo in your css width mm units, width appears to be 148mm for A5 not 158mm.

indeed there was a type hehe thanks for pointing it out.
so there is a problem with css "absolute" unit rendering in phantomjs. hope someone can fix it...

@polarathene I just used the updated one and we're still experiencing the same problem. When we have PNG rendering, everything is nice and crisp as expected. When we do PDF rendering (same code), it is scaled in correctly.
For example, here is the PNG:

And here is the PDF (zoomed at 100%):

You can see that the PDF has extra whitespace and the text/blue shapes are scaled incorrectly.

@athibaud Can you please confirm which px settings worked for you? If I understand right it would have been 419px by 595px which is the px settings for 72 DPI. If that is the case the absolute unit thing isn't something that can be 'fixed' because it isn't broken. I believe other units like pt and mm are being converted to their px values, eg 1 inch will be converted to 96px, 1mm will get its equivalent too which is 3.779....px 148mm roughly rounds to 559px.
So how to come up with the 419px by 595px? I use this site as guide for inch values: http://www.a5papersize.org/ , and then multiply those by dpi(96 for Windows, 72 for OSX/Linux). Values seem to be getting scaled prior to rendering to PDF, all pt/mm/cm/etc are converted to px units, and all px units are scaled. % units don't seem to change though, I don't know what's going on behind scenes, perhaps PhantomJS is controlling this or QTWebkit plays role, I haven't looked into it.
Super technical if you want more understanding: The data is then scaled back to paperSize, which seems to be 96 DPI for me on windows. In 1.9.8 I noticed my A4 PDF is 794px wide at 100% which is A4 at 96 DPI. However if paperSize is given pixels instead of value A4 then it turns out I need to give 992px width, which still becomes 794px width at 100% on the PDF. 992px width is 120 DPI A4, browsers display at 96 DPI though I think, so my data was still being scaled down even if 992px element is given, it becomes 794px on PDF at 100%, user have to zoom in to see it same size as browser. 2.0 release all these problems on windows is gone, seems now OSX have them(But 72 DPI not 96)?

@TheCloudlessSky Are you sure that is using 2.0? How are you sending your data to Phantom? If it's using the PATH environment variable on your OS it might be using an older version of Phantom on your system somewhere. If you're using a nodeJS module, swap out the exe in the lib folder. The old one was about 7mb the new one is around 47mb.
If all that is good, what paperSize are you using? If you'd like me to test the example on my system provide a link and I'll make sure the error is still on 2.0. It looks very much like the scaling issue I was having on 1.9.8, same amount of whitespace on the right.

@polarathene

Can you please confirm which px settings worked for you? If I understand right it would have been 419px by 595px which is the px settings for 72 DPI.

yes, i used 420x595px

Values seem to be getting scaled prior to rendering to PDF, all pt/mm/cm/etc are converted to px units, and all px units are scaled. % units don't seem to change though, I don't know what's going on behind scenes, perhaps PhantomJS is controlling this or QTWebkit plays role, I haven't looked into it.

hum. it would be nice to know for sure. hope the maintainers can enlighten us on that.

Super technical if you want more understanding: The data is then scaled back to paperSize, which seems to be 96 DPI for me on windows. In 1.9.8 I noticed my A4 PDF is 794px wide at 100% which is A4 at 96 DPI. However if paperSize is given pixels instead of value A4 then it turns out I need to give 992px width, which still becomes 794px width at 100% on the PDF. 992px width is 120 DPI A4, browsers display at 96 DPI though I think, so my data was still being scaled down even if 992px element is given, it becomes 794px on PDF at 100%, user have to zoom in to see it same size as browser. 2.0 release all these problems on windows is gone, seems now OSX have them(But 72 DPI not 96)?

yes this sounds about right. you must have gone through a lot to figure all this out. i feel your pain :0
thank you very much for all the info though! its certainly very helpful and saves us a lot of time! so thank you again :)
now i'm trying all this out locally on osx but our servers run on linux so i have so see if there is the same issue there hehe, do you know??

No sorry I haven't gotten to testing on linux or osx yet, and yes haha spent 2-3 days looking into just this problem based on what I could find on the net and trial and error :) then when I have a solution for 1.9.8 finally, 30 mins later working windows 2.0.0 binary come out :P
@ariya Can you provide anymore information on this? It doesn't appear to be in the docs. It seems it was a problem for windows users with 1.9.8 with 120 dpi to 96 dpi and now it is 72 to 96 dpi for OSX/Linux users?

@polarathene The paperSize is the same as the viewportSize:
page.viewportSize = {
  width: dimensions.width,
  height: dimensions.height
};
// For PDF.
page.paperSize = {
width: dimensions.width + 'px',
  height: dimensions.height + 'px',
  margin: '0px'
};

@TheCloudlessSky On 1.9.8 you could sort of use a ratio of 1:1 and have accurate sizes at 125% PDF zoom. Honestly seemed like a bug and that has been fixed in 2.0.0. You just have to be aware of how paperSize changed, apply this to your paperSize calculation (dimensions.width * (72/96)) + 'px' add the same for height. If you want to understand why, the technical research I did below might help explain. Let us know if the solution works on your end please :)
I've just done some thorough testing of 2.0.0 PDF conversions and noticed the paperSize 'A4' definition that was 992px wide(120dpi) in 1.9.8 is now 595px wide(72dpi) in 2.0.0. Previously in 1.9.8 your unit values other than % had were scaled down, so that the PDF version required you to zoom to 125% to view units at their original size, also caused the whitespace issue on the right present in your picture due to that scaling. In 2.0.0 units don't appear to be scaled down, they are 100% matching to the browser. paperSize however is now scaling up from it's given px size by 1/3rd, this is matching it to 96dpi/96px per 1 inch which is a CSS inch. Thus 72DPI 595px A4 paperSize is resized to 794px 96DPI A4 when rendered. I've also learnt from OSX(and likely Linux) users that 1.9.8 provided 100% match for their PDF renders but with 2.0.0 they're having to downscale their units from 96dpi to 72dpi, eg 794px wide element needs to be changed to 595px for correct 100% zoom A4 PDF, for comparision on 1.9.8 with windows users that meant changing from 96dpi to 120dpi, 794px wide element needed to be 992px wide. Also worth noting is that between both versions % units would still remain precise, 90% element would always be 90% of the PDF at 100% zoom, for whatever reason they were not scaled like other units. Using zoomFactor in my experience is not recommended, I can't recall with 1.9.8 though I know it had similar problems, zoomFactor does not scale font or css sizes from what I can see, it was having an effect though as clientWidth/offsetWidth/innerWidth/etc were reporting to be scaled accordingly. I used Highcharts to create a svg chart in a 100% width div. Unlike elements being sized with % units like mentioned above, presumably jQuery got the width of the 100% wide div at that scale setting a px width(zoomFactor of 1.25 on 794px wide became 636px), in addition to that the alignment of text vertically was off in the svg rangeSelector component.

@polarathene That worked for 2.0.0 - hopefully that can be fixed! What's the best approach for fixing it in 1.9.8 (since I'm using the NPM module)?

@TheCloudlessSky For windows on 1.9.8 the solution that worked for me was to apply -webkit-transform: scale(2); -webkit-transform-origin: 0% 0%; width:50% to the body tag of the html document. That wouldn't work for all sites though, mine was rather basic. You also had to provide 120dpi viewPort (eg 992px wide instead of 96DPI 794px)and 120DPI paperSize(If A4, you can just use A4, or it's pixel values 992px wide, 1400px tall) I think. Might have to double the viewPort dimensions as well can't remember. It basically upscaled  your CSS so it'd look correct at 100% zoom instead of 125% on the PDF, if you had any % units the body 50% made sure to halve them due to the doubling. This was just a snippet taken from someones script I came across during my research, I think it was called pixelRatio.js but was designed for .png only and was breaking my scripts.

Hi, I'm having similar issues which I can't seem to remedy, is there a way to force pre-2.0 behaviour for the DPI?

@9point6 Operating System? I know it's alot to read but I'm pretty sure I gave solutions for both windows and linux/mac. If you were on windows, pre 2.0 was broken, can't see why you'd want to restore that so I'm assuming mac. You'll need someone who knows the codebase better such as @ariya . Otherwise you have to calculate the dpi conversion like described above.

@polarathene It's on a Linux VM (but I believe it's the same issues as mac). Weirdly I've tried the solutions above and they don't seem to work. Possibly this is due to us not working any of the measurements for this out in pixels in the first place. All the CSS specifies everything in millimetres.

@9point6 millimetres will still be converted to 96px per inch I think as per CSS spec, you won't actually get physical mm measurement. And then due to the update I think you'll have that value converted to 72 dpi as an inch is 72px then. If you can alter the internal dpi linux uses to 96, you'd probably have a workaround, else you need to recalculate. If you use any values in % those don't appear to be converted to px.

This seems to be a duplicate of #12685

Duplicate of #12685


:zap: react / redux state equality and props shallowEqual

Pull Request Test Coverage Report for Build 2829

4 of 6 (66.67%)  changed or added relevant lines in 1 file are covered.
25 unchanged lines in 3 files lost coverage.
Overall coverage decreased (-8.06%) to 88.469%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

packages/connectors/react/src/inject.jsx
4
6
66.67%

Files with Coverage Reduction
New Missed Lines
%

packages/connectors/react/src/provider.jsx
4
0.0%

packages/connectors/react/src/inject.jsx
8
60.34%

packages/connectors/react/src/listen.jsx
13
10.0%

Totals

Change from base Build 2784:
-8.06%

Covered Lines:
321

Relevant Lines:
351

💛  - Coveralls


Accept better tokenGetter on init

In my opinion, tokenGetter should have a FutureOr<Auth> Function()? type.
Here're 2 changes:

Change the actual acceptable type to Auth so that we can construct it manually with Auth(...) rather than convert return value from our function into a patterned json. For example, Aliyun's TypeScript STS SDK @alicloud/sts20150401 would return a camelCase json, while the patterned json use a PascalCase json. As a result, we have to make a conversion here.
Replace Future<T> with FutureOr<T>, since it would allow user to write simpler code here rather than wrap it with () async => or something alike while the token can be access synchronously.

感谢你的建议，在6.0.0中已实现


Updated README and example files

Fixed readme so it reflects application switches
Added example files if someone doesnt reads README

We have made so many changes that this has pretty much been already outdated


Fix pagination on /notifications/watching

The q parameter was not rendered in pagination links because context.Pagination:AddParam checks for existance of the parameter in ctx.Data where it was absent. Added the parameter there to fix it.

🎺 🤖


Dynamic vuex modules and the fetch() method

What I want to do is to dynamically register a vuex module and call its action from within the fetch method.
I tried to register my module in a separate file in the plugins directory and then add it to the config. It didn't work at all, the store ignored my module completely (I imported the store in that file manually, perhaps that was the problem).
I also tried to do it in the beforeCreate hook of my index component, using the this.$store reference. This time it was registered successfully, but too late, since it wasn't available during the fetch call.
Any ideas how to do it right?

Okay, I can do this inside the fetch method itself.


Sensible defaults for axis scaling

Axis should default to linear scaling. Currently they default to logarithmic scaling

Note that this applies only to performance profiles, for other types, logarithmic scaling might be more appropriate


App getting ANR 'ed in android upside down

Error:
Short FGS procstate demoted: ServiceRecord{33ca661 u0 com.package/com.asterinet.react.bgactions.RNBackgroundActionsTask}
Short FGS ANR'ed: ServiceRecord{33ca661 u0 com.package/com.asterinet.react.bgactions.RNBackgroundActionsTask}
ANR in com.package
Reason: A foreground service of FOREGROUND_SERVICE_TYPE_SHORT_SERVICE did not stop within a timeout: ComponentInfo{com.package/com.asterinet.react.bgactions.RNBackgroundActionsTask}

Changing service type fixed the issue

@shaquibimdad I am facing this issue, my service type is short shortService. Can you please tell to which type did you change?

@shaquibimdad I am facing this issue, my service type is short shortService. Can you please tell to which type did you change?

i am using mediaPlayback service


AAAA Alias PTR MX SRV TXT record support and their example use cases

Added support for
AAAA
Alias
PTR
MX
SRV and
TXT.
An example dir is created to add sample use cases, to help the users.

Can this be merged? I would like to extend the terraform provider with SVC records and this would help a lot :)


Multiple connection strings from config

In the text above it says that multiple connection strings can be added in the format:
Azure:SignalR:Connection:<name>:<role>
However other documentation suggests that the correct format is:
Azure:SignalR:ConnectionString:{Name}:{EndpointType}
... the important difference being ConnectionString.  Please clarify.  Please also add more detail about adding additional primary and secondary endpoints, including detail on how endpoints are chosen from a list of multiple possible endpoints (primary or secondary).

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

ID: b4787f63-3603-6fdb-e405-4651b502e2ca
Version Independent ID: 902cbc3b-314e-8d3d-7c76-88972dc5b548
Content: Resiliency and disaster recovery in Azure SignalR Service
Content Source: articles/azure-signalr/signalr-concept-disaster-recovery.md
Service: signalr
GitHub Login: @chenkennt
Microsoft Alias: kenchen

@paulpce Thanks for the feedback! We are currently investigating and will update you shortly.

@paulpce Thanks for the feedback! I have assigned the issue to the content author to review further and update the document as appropriate.

@paulce this is a typo, the correct format should be: Azure:SignalR:ConnectionString:{Name}:{EndpointType}. I'll submit a PR to fix it. Thanks for reporting this!

This is fixed

@paulpce ,We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.


Move the data processing subroutine into a coroutine

https://github.com/MrGrim48/gmod_unstuck/blob/d02dae13c027951dd3cfa9e9170a0280a2bbf6a5/lua/unstuck/sv_unstuck_func.lua#L61-L68
As suggested by code_gs

You could do the the actual position testing inside of a coroutine so that the server doesn't have to halt to find the player a clear position.

Coroutines should now be implemented with the latest update.


Tray has weird click behaviour

Describe the bug
Double clicking on tray icons does not close the tray popup again.
Triple clicking does but only if enough time passed.
Quadrupple clicking seems to always close it again x), or I'm too slow.
The other modules don't show this behavior and their popups go away on the second click as expected. (e.g. sound, time/calendar, notifications)
To Reproduce
Steps to reproduce the behavior:

Have tray module
Have something in the tray
Click fast twice on tray icon
Menu didn't close again

Expected behavior
Menu closes on second click.
System information:

Distro: arch
Compositor: sway 1.9
Ironbar version: ironbar 0.16.0-pre

Configuration
Config
anchor_to_edges = true
height = 42
position = "top"
icon_theme = "Papirus-Dark"

[[start]]
type = "workspaces"
all_monitors = false
on_scroll_up = "swaymsg workspace prev_on_output"
on_scroll_down = "swaymsg workspace next_on_output"

[[end]]
type = "music"
player_type = "mpd"
music_dir = "/home/merlijn/Music"

#[end.truncate]
#mode = "end"
#max_length = 100

[[end]]
type = "music"
player_type = "mpd"
truncate = "end"

[[end]]
type = "sys_info"
format = [
    "  {cpu_percent}% | {temp_c:k10temp-Tccd1}°C",
    "  {memory_used} / {memory_total} GB ({memory_percent}%)",
    "󰋊 {disk_used:/} / {disk_total:/} GB ({disk_percent:/}%)",
    "󰓢 {net_down:enp5s0} / {net_up:enp5s0} Mbps",
]

[end.interval]
memory = 30
cpu = 1
temps = 5
disks = 300
networks = 3

[[end]]
type = "volume"
format = "{icon} {percentage}%"
max_volume = 100

[end.icons]
volume_high = "󰕾"
volume_medium = "󰖀"
volume_low = "󰕿"
muted = "󰝟"

[end.truncate]
mode = "end"
length = 50

[[end]]
type = "clock"

[[end]]
type = "tray"
direction = "left_to_right"

[[end]]
type = "notifications"
show_count = true

[end.icons]
closed_none = "󰍥"
closed_some = "󱥂"
closed_dnd = "󱅯"
open_none = "󰍡"
open_some = "󱥁"
open_dnd = "󱅮"

Styles
@define-color color_bg alpha(#2d2d2d, 0.7);
@define-color color_bg_dark alpha(#1c1c1c, 0.7);
@define-color color_border alpha(#424242, 0.7);
@define-color color_border_active alpha(#6699cc, 0.7);
@define-color color_text #ffffff;
@define-color color_urgent #8f0a0a;

/* -- base styles -- */

* {
    font-family: CaskaydiaCove Nerd Font, sans-serif;
    font-size: 16px;
    text-shadow: none;
    border: none;
    border-radius: 0;
    opacity: 1.0;
}

.background {
    background-color: rgba(0, 0, 0, 0);
}

button, label {
    box-shadow: none;
    background: none;
    background-color: rgba(0, 0, 0, 0);
    color: @color_text;
}

button:hover {
    background-color: @color_bg_dark;
}

scale trough {
    min-width: 1px;
    min-height: 2px;
}

#bar {
    border-top: 1px solid @color_border;
    background-color: @color_bg;
    background-image: none;
    box-shadow: none;
}

.popup {
    border: 1px solid @color_border;
    padding: 1em;
}

/* -- clipboard -- */

.clipboard {
    margin-left: 5px;
    font-size: 1.1em;
}

.popup-clipboard .item {
    padding-bottom: 0.3em;
    border-bottom: 1px solid @color_border;
}

.popup-clipboard {
    background-color: @color_bg;
}

/* -- clock -- */

.clock {
    font-weight: bold;
    margin-left: 5px;
}

.popup-clock .calendar-clock {
    color: @color_text;
    font-size: 2.5em;
    padding-bottom: 0.1em;
}

.popup-clock {
    background-color: @color_bg;
    color: @color_text;
}

.popup-clock .calendar .header {
    padding-top: 1em;
    border-top: 1px solid @color_border;
    font-size: 1.5em;
}

.popup-clock .calendar:selected {
    background-color: @color_border_active;
}

/* notifications */

.notifications .count {
    font-size: 0.6rem;
    background-color: @color_text;
    color: @color_bg;
    border-radius: 100%;
    margin-right: 3px;
    margin-top: 3px;
    padding-left: 4px;
    padding-right: 4px;
    opacity: 0.7;
}

/* -- script -- */

.script {
    padding-left: 10px;
}

/* -- sys_info -- */

.sysinfo {
    margin-left: 10px;
}

.sysinfo .item {
    margin-left: 5px;
}

/* -- tray -- */

.tray {
    background-color: rgba(0,0,0,0);
    margin-left: 10px;
}
.tray menu {
    background-color: rgba(0,0,0, 0.7);
    padding: 8px 0;
}
/* Overrides the label text just for the tray */
.tray label {
    /* color: black; */
}

/* -- volume -- */

.popup-volume .device-box {
    border-right: 1px solid @color_border;
}

.popup-volume {
    background-color: @color_bg;
}

/* -- power -- */

.popup-upower {
    background-color: @color_bg;
}

/* -- workspaces -- */

.workspaces .item.focused {
    box-shadow: inset 0 -3px;
    background-color: @color_bg_dark;
}

.workspaces .item:hover {
    box-shadow: inset 0 -3px;
}

This behaviour should be down to GTK, as the tray uses actual menu widgets instead of a separate window like the other popups. I'll see if I can work around the strange behaviour though

Finally getting round to clearing through the backlog. I'm not actually able to replicate this one, although I'm also not sure I can do anything about it from googling (I give GTK a sub-menu for the menu widget, it does the rest).
Are you able to demo the issue at all?

What I also notice that clicking on one of the tray menu options with two different mouse buttons won't do anyting
Example:
I have Brave on the tray
I right click the Brave icon and the menu opens
I left click on 'About Brave' and it won't do anything
What works is:
I right click the Brave icon and the menu opens
I right click on 'About Brave' and it opens the about page

Finally getting round to clearing through the backlog. I'm not actually able to replicate this one, although I'm also not sure I can do anything about it from googling (I give GTK a sub-menu for the menu widget, it does the rest).
Are you able to demo the issue at all?

I'd happily demo it if I was able to install again
cargo install ironbar
error[E0432]: unresolved import `nix::fcntl::OFlag`
 --> /home/merlijn/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ironbar-0.15.1/src/clients/wayland/wlr_data_control/offer.rs:3:5
  |
3 | use nix::fcntl::OFlag;
  |     ^^^^^^^^^^^^^^^^^ no `OFlag` in `fcntl`

error[E0432]: unresolved import `nix::unistd::pipe2`
    --> /home/merlijn/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ironbar-0.15.1/src/clients/wayland/wlr_data_control/offer.rs:4:26
     |
4    | use nix::unistd::{close, pipe2};
     |                          ^^^^^
     |                          |
     |                          no `pipe2` in `unistd`
     |                          help: a similar name exists in the module: `pipe`
     |
note: found an item that was configured out
    --> /home/merlijn/.cargo/registry/src/index.crates.io-6f17d22bba15001f/nix-0.27.1/src/unistd.rs:1233:8
     |
1233 | pub fn pipe2(flags: OFlag) -> Result<(RawFd, RawFd)> {
     |        ^^^^^
     = note: the item is gated behind the `fs` feature

error[E0432]: unresolved imports `nix::fcntl::fcntl`, `nix::fcntl::F_GETPIPE_SZ`, `nix::fcntl::F_SETPIPE_SZ`
   --> /home/merlijn/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ironbar-0.15.1/src/clients/wayland/wlr_data_control/mod.rs:13:18
    |
13  | use nix::fcntl::{fcntl, F_GETPIPE_SZ, F_SETPIPE_SZ};
    |                  ^^^^^  ^^^^^^^^^^^^  ^^^^^^^^^^^^ no `F_SETPIPE_SZ` in `fcntl`
    |                  |      |
    |                  |      no `F_GETPIPE_SZ` in `fcntl`
    |                  no `fcntl` in `fcntl`
    |
    = help: consider importing this module instead:
            nix::fcntl
note: found an item that was configured out
   --> /home/merlijn/.cargo/registry/src/index.crates.io-6f17d22bba15001f/nix-0.27.1/src/fcntl.rs:509:8
    |
509 | pub fn fcntl(fd: RawFd, arg: FcntlArg) -> Result<c_int> {
    |        ^^^^^
    = note: the item is gated behind the `fs` feature

error[E0308]: mismatched types
   --> /home/merlijn/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ironbar-0.15.1/src/clients/compositor/hyprland.rs:156:51
    |
156 |                     let name = get_workspace_name(workspace_type);
    |                                ------------------ ^^^^^^^^^^^^^^ expected `WorkspaceType`, found `WorkspaceDestroyedEventData`
    |                                |
    |                                arguments to this function are incorrect
    |
note: function defined here
   --> /home/merlijn/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ironbar-0.15.1/src/clients/compositor/hyprland.rs:247:4
    |
247 | fn get_workspace_name(name: WorkspaceType) -> String {
    |    ^^^^^^^^^^^^^^^^^^ -------------------

Some errors have detailed explanations: E0308, E0432.
For more information about an error, try `rustc --explain E0308`.
error: could not compile `ironbar` (bin "ironbar") due to 4 previous errors
error: failed to compile `ironbar v0.15.1`, intermediate artifacts can be found at `/tmp/cargo-installQywNGM`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
cargo install ironbar  523.98s user 37.21s system 994% cpu 56.444 total

After messing around with the my toolchain and doing cargo build on the latest commit it built so I'll try in a bit

Can't reproduce on hyprland

I'm clicking on both items as fast as I can, works perfectly on the sounds module
sway:
https://github.com/user-attachments/assets/8d3a93df-3ff0-4753-90be-4a46b0bdf29b

And hyprland as I previously mentioned has perfect tray clicking, but the bar becomes unfocused as I previously mentioned
https://github.com/user-attachments/assets/6b3f7236-b6d8-4d03-9767-c8e1e44f6dc2

I'd be interested to know with #779 implemented whether this still occurs

Still occurs yes

Got it.
Ended up pretty much translating Waybar but seems the intended GTK menu widgets cause this, whereas bodging it with a generic EventBox sorts it. Weird.


DNN9 Support

Would love to see DNN9 support - the other RSS modules out there are very lacking.

@heyepic Are you sure it doesn't work on DNN 9?  See #2 - according to testing done there it works on DNN 8.  So it stands to reason it should work on DNN 9.  It would be worth testing for sure!

I have tested the module on Dnn 8.0.4, 9.1.1 and 9.2 it looks like it is working fine, closing as not reproducible


SRW update: use ochubar/SRW as a main repo

Tested locally, builds fine.
attn @dhidas

Going to self-merge, needed for Friday's activity with Dean.


Fix null BuildContext

fixes #154.
This is a breaking change and will require a switch from this...
MaterialApp(
  title: 'My App',
  initialRoute: '/',
  onGenerateRoute: myRouter.generator,
);

...to this
MaterialApp(
  title: 'My App',
  initialRoute: '/',
  onGenerateRoute: (routeSettings) =>
      myRouter.generator(context, routeSettings),
);

There may be a better way to fix this.
@lukepighetti, thoughts?

This fixes the crash for me as well. @lukef  Any idea when will it be merged? Sorry to tag you, but looks like you are the most active closing tickets. Thank you!

That works but causes a bad state error for me
Bad state: No context with the running Dart application.
#0      RemoteDebuggerExecutionContext.id (package:dwds/src/debugging/execution_context.dart:46:7)
<asynchronous suspension>
#1      ChromeProxyService.callServiceExtension (package:dwds/src/services/chrome_proxy_service.dart:297:43)

Another fix is to change
if (Theme.of(buildContext).platform == TargetPlatform.iOS)

to
if (buildContext != null &&
            Theme.of(buildContext).platform == TargetPlatform.iOS)

And have it default to one without needing the context.

Closing because I am unable to reproduce this issue. Please comment in https://github.com/lukepighetti/fluro/issues/154 with details on how to reproduce and I'll be happy to look at it again.


Can't run FZF in multiple neovim windows

Category

[x] Neovim

For background, I'm a big fan of let g:fzf_layout = { 'window': 'enew' }.
Currently when I try to launch on a second split when it's already running on the first one, I get FZF is already running (in buffer x). I realize this isn't for most users but it's a very useful powertool and it appears to just work with the check disabled. Would you consider making the check user configurable (or even disabling it when enew)?

I think we can just remove the check now. It was needed because we used to give the terminal buffer to a fixed name ([FZF]) (#180), but we no longer do that (#264 -> #630).
Let me see if there's any other side effects.


Upload with Compressed Streams

Can we leverage this so we don't have to write a temp file to disk? https://developer.chrome.com/articles/fetch-streaming-requests/#using-with-writable-streams

After a deep dive into this, it seems like this would require chunked uploads. I dove into what SendPdbs was doing and after scratching my head a bit, I noticed that SendPdbs is sending a content-length header to s3. This means that somewhere under the hood C# is serializing the stream to a file because without that, there would be no way to determine the size of the compressed file. We are doing the same thing here and have no plans to move to chunked uploads at this time. Closing!


MWS 500 server error still crashes Node

Version 0.0.19. This is from a request to "GetMyFeesEstimate." The request was perfectly formed and this tends to happen randomly once in a few hundred operations. For this it is very hard to reproduce on demand.
Apparently MWS did not set a content-type header with the error response. (502 bad gateway)
<?xml version="1.0"?>
<ErrorResponse>
    <Error>
        <Type>Server</Type>
        500
        <Message>500 - Server Error</Message>
        <Detail />
    </Error>
</ErrorResponse>

/app/api/node_modules/amazon-mws/lib/AmazonMwsResource.js:211
2018-09-14T22:38:31.732701+00:00 app[worker.1]: if (headers['content-type'].indexOf('charset') > -1 && headers['content-type'].split(';')[0] && headers['content-type'].split(';')[1]) {
TypeError: Cannot read property 'indexOf' of undefined at ClientRequest.<anonymous> (/app/api/node_modules/amazon-mws/lib/AmazonMwsResource.js:211:41)

This wouldn't be a big deal, except for some reason it's bypassing my Promise catch handler and crashing the entire app.

@colinskow
Again I have normalized the condition checking exactly at the mentioned line. But still, I am not able to regenerate the same error.
It has been fixed in the development branch. It would be helpful if you can validate that.

I'm trying to think if there is a way to log the full details of the MWS response so you can feed those into a test. If you have access to UK MWS credentials I can give you the exact request parameters that consistently produce the 502 error. I think it's just some edge case that Amazon hasn't handled correctly.

@colinskow I am not able to regenerate this error.

@colinskow
I have made changes according to it. Can you check against development branch?

Here is code to reproduce the error. You'll need amazon.co.uk credentials. The error that appears now is Invalid JSON received from the AmazonMws API. I'm not sure what is causing the error, but it appears that certain ASINs crash the system. When I delete a couple items from the request sometimes it works.
Either way we should be able to handle MWS returning errors gracefully without crashing node.
require('dotenv').config();
AmazonMWS = require('amazon-mws');

const mwsMarkets = {
  GB: { code: 'A1F83G8C2ARO7P', url: 'mws-eu.amazonservices.com', currency: 'GBP' }
};

function getMwsInstance(market) {
  const mws = new AmazonMWS(process.env.AWS_ACCESS_KEY_ID, process.env.AWS_SECRET_KEY);
  const host = mwsMarkets[market].url;
  if (!host) {
    throw new Error('invalid market or region');
  }
  mws.setHost(host);
  return mws;
}

function estimateMyFees(feeRequests, market) {
  const amazon = getMwsInstance(market);
  const query = {
    'Version': '2011-10-01',
    'Action': 'GetMyFeesEstimate',
    'SellerId': process.env.AWS_SELLER_ID,
    'MWSAuthToken': process.env.AWS_MWS_AUTH_TOKEN,
    'MarketplaceId': mwsMarkets[market].code
  };
  const prefix = 'FeesEstimateRequestList.FeesEstimateRequest';
  const currency = mwsMarkets[market].currency;
  const queryItems = {};
  feeRequests.forEach((req, i) => {
    queryItems[`${prefix}.${i+1}.MarketplaceId`] = mwsMarkets[market].code;
    queryItems[`${prefix}.${i+1}.IdType`] = 'ASIN';
    queryItems[`${prefix}.${i+1}.IdValue`] = req.asin;
    queryItems[`${prefix}.${i+1}.Identifier`] = req.asin;
    queryItems[`${prefix}.${i+1}.IsAmazonFulfilled`] = req.fba;
    queryItems[`${prefix}.${i+1}.PriceToEstimateFees.ListingPrice.Amount`] = req.price;
    queryItems[`${prefix}.${i+1}.PriceToEstimateFees.ListingPrice.CurrencyCode`] = currency;
    if (req.shipping) {
      queryItems[`${prefix}.${i+1}.PriceToEstimateFees.Shipping.Amount`] = req.shipping;
      queryItems[`${prefix}.${i+1}.PriceToEstimateFees.Shipping.CurrencyCode`] = currency;
    }
  });
  console.log(JSON.stringify({ ...query, ...queryItems }, null, 2));
  return amazon.products.search({...query, ...queryItems});
}

const feeRequests = [
  { asin: 'B07622KXFK',
  price: '27.33',
  shipping: '',
  fba: true },
  { asin: 'B00JFGXBI8',
  price: '61.98',
  shipping: '',
  fba: true },
  { asin: 'B075DPL9GX',
  price: '63.83',
  shipping: '',
  fba: true },
  { asin: 'B01MQSESY4',
  price: '17.93',
  shipping: '1.50',
  fba: true },
  { asin: 'B01BPAU3QO',
  price: '34.88',
  shipping: '',
  fba: true },
  { asin: 'B01HDC57FU',
  price: '75.99',
  shipping: '8.99',
  // shipping: '',
  fba: true },
  { asin: 'B016INTK3U',
  price: '60.99',
  shipping: '8.99',
  // shipping: '',
  fba: true }
];

estimateMyFees(feeRequests, 'GB')
  .then(results => {
    console.log(JSON.stringify(results, null, 2));
  })
  .catch(err => console.error(err));

@colinskow
I was able to reproduce that while using GetMyFeesEstimate alone. I have added fixed for it.

Excellent... Thank you very much @bhushankumarl !
Any idea what may be causing it? It seems to me there are just random ASINs which cause MWS to break and return a 500 error.

@colinskow It would be helpful if you check again development branch.

@colinskow
It has been fixed and the version has been released.
https://github.com/bhushankumarl/amazon-mws/releases/tag/v0.0.21
Please feel free to reopen if you still found any bug.

Thank you so much for your quick response!


HDDS-1538. Update ozone protobuf message for ACLs. Contributed by Ajay Kumar.

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Comment

0
reexec
29
Docker mode activated.

_ Prechecks _

+1
dupname
1
No case conflicting files found.

+1
@author
0
The patch does not contain any @author tags.

+1
test4tests
0
The patch appears to include 6 new or modified test files.

_ trunk Compile Tests _

0
mvndep
62
Maven dependency ordering for branch

+1
mvninstall
417
trunk passed

+1
compile
206
trunk passed

+1
checkstyle
53
trunk passed

+1
mvnsite
0
trunk passed

+1
shadedclient
832
branch has no errors when building and testing our client artifacts.

+1
javadoc
128
trunk passed

0
spotbugs
237
Used deprecated FindBugs config; considering switching to SpotBugs.

+1
findbugs
418
trunk passed

_ Patch Compile Tests _

0
mvndep
26
Maven dependency ordering for patch

+1
mvninstall
408
the patch passed

+1
compile
212
the patch passed

+1
cc
212
the patch passed

+1
javac
212
the patch passed

-0
checkstyle
29
hadoop-ozone: The patch generated 7 new + 0 unchanged - 0 fixed = 7 total (was 0)

+1
mvnsite
0
the patch passed

+1
whitespace
0
The patch has no whitespace issues.

+1
xml
1
The patch has no ill-formed XML file.

+1
shadedclient
667
patch has no errors when building and testing our client artifacts.

+1
javadoc
128
the patch passed

+1
findbugs
431
the patch passed

_ Other Tests _

-1
unit
151
hadoop-hdds in the patch failed.

-1
unit
980
hadoop-ozone in the patch failed.

+1
asflicense
33
The patch does not generate ASF License warnings.

6866

Reason
Tests

Failed junit tests
hadoop.ozone.om.TestOzoneManager

hadoop.ozone.client.rpc.TestOzoneAtRestEncryption

Subsystem
Report/Notes

Docker
Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-828/1/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hadoop/pull/828

Optional Tests
dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle xml cc

uname
Linux 0a46e72851d1 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
personality/hadoop.sh

git revision
trunk / c183bd8

Default Java
1.8.0_212

checkstyle
https://builds.apache.org/job/hadoop-multibranch/job/PR-828/1/artifact/out/diff-checkstyle-hadoop-ozone.txt

unit
https://builds.apache.org/job/hadoop-multibranch/job/PR-828/1/artifact/out/patch-unit-hadoop-hdds.txt

unit
https://builds.apache.org/job/hadoop-multibranch/job/PR-828/1/artifact/out/patch-unit-hadoop-ozone.txt

Test Results
https://builds.apache.org/job/hadoop-multibranch/job/PR-828/1/testReport/

Max. process+thread count
5400 (vs. ulimit of 5500)

modules
C: hadoop-hdds/common hadoop-ozone/client hadoop-ozone/common hadoop-ozone/integration-test hadoop-ozone/objectstore-service hadoop-ozone/ozone-manager hadoop-ozone/tools U: .

Console output
https://builds.apache.org/job/hadoop-multibranch/job/PR-828/1/console

versions
git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1

Powered by
Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Comment

0
reexec
40
Docker mode activated.

_ Prechecks _

+1
dupname
1
No case conflicting files found.

+1
@author
0
The patch does not contain any @author tags.

+1
test4tests
0
The patch appears to include 6 new or modified test files.

_ trunk Compile Tests _

0
mvndep
84
Maven dependency ordering for branch

+1
mvninstall
477
trunk passed

+1
compile
231
trunk passed

+1
checkstyle
57
trunk passed

+1
mvnsite
0
trunk passed

+1
shadedclient
856
branch has no errors when building and testing our client artifacts.

+1
javadoc
144
trunk passed

0
spotbugs
259
Used deprecated FindBugs config; considering switching to SpotBugs.

+1
findbugs
481
trunk passed

_ Patch Compile Tests _

0
mvndep
32
Maven dependency ordering for patch

+1
mvninstall
448
the patch passed

+1
compile
220
the patch passed

+1
cc
220
the patch passed

+1
javac
220
the patch passed

+1
checkstyle
57
the patch passed

+1
mvnsite
0
the patch passed

+1
whitespace
0
The patch has no whitespace issues.

+1
xml
2
The patch has no ill-formed XML file.

+1
shadedclient
681
patch has no errors when building and testing our client artifacts.

+1
javadoc
135
the patch passed

+1
findbugs
553
the patch passed

_ Other Tests _

-1
unit
186
hadoop-hdds in the patch failed.

-1
unit
1386
hadoop-ozone in the patch failed.

+1
asflicense
39
The patch does not generate ASF License warnings.

6248

Reason
Tests

Failed junit tests
hadoop.ozone.TestOzoneConfigurationFields

hadoop.ozone.client.rpc.TestCommitWatcher

hadoop.ozone.om.TestOzoneManager

hadoop.ozone.client.rpc.TestWatchForCommit

hadoop.ozone.container.common.statemachine.commandhandler.TestBlockDeletion

Subsystem
Report/Notes

Docker
Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-828/2/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hadoop/pull/828

Optional Tests
dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle xml cc

uname
Linux d15937724ed6 3.13.0-153-generic #203-Ubuntu SMP Thu Jun 14 08:52:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
personality/hadoop.sh

git revision
trunk / 24c53e0

Default Java
1.8.0_212

unit
https://builds.apache.org/job/hadoop-multibranch/job/PR-828/2/artifact/out/patch-unit-hadoop-hdds.txt

unit
https://builds.apache.org/job/hadoop-multibranch/job/PR-828/2/artifact/out/patch-unit-hadoop-ozone.txt

Test Results
https://builds.apache.org/job/hadoop-multibranch/job/PR-828/2/testReport/

Max. process+thread count
5314 (vs. ulimit of 5500)

modules
C: hadoop-hdds/common hadoop-ozone/client hadoop-ozone/common hadoop-ozone/integration-test hadoop-ozone/objectstore-service hadoop-ozone/ozone-manager hadoop-ozone/tools U: .

Console output
https://builds.apache.org/job/hadoop-multibranch/job/PR-828/2/console

versions
git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1

Powered by
Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Comment

0
reexec
26
Docker mode activated.

_ Prechecks _

+1
dupname
0
No case conflicting files found.

+1
@author
0
The patch does not contain any @author tags.

+1
test4tests
0
The patch appears to include 6 new or modified test files.

_ trunk Compile Tests _

0
mvndep
73
Maven dependency ordering for branch

+1
mvninstall
413
trunk passed

+1
compile
196
trunk passed

+1
checkstyle
51
trunk passed

+1
mvnsite
0
trunk passed

+1
shadedclient
884
branch has no errors when building and testing our client artifacts.

+1
javadoc
120
trunk passed

0
spotbugs
239
Used deprecated FindBugs config; considering switching to SpotBugs.

+1
findbugs
422
trunk passed

_ Patch Compile Tests _

0
mvndep
25
Maven dependency ordering for patch

+1
mvninstall
403
the patch passed

+1
compile
202
the patch passed

+1
cc
202
the patch passed

+1
javac
202
the patch passed

+1
checkstyle
55
the patch passed

+1
mvnsite
0
the patch passed

+1
whitespace
0
The patch has no whitespace issues.

+1
xml
1
The patch has no ill-formed XML file.

+1
shadedclient
703
patch has no errors when building and testing our client artifacts.

+1
javadoc
120
the patch passed

+1
findbugs
436
the patch passed

_ Other Tests _

-1
unit
151
hadoop-hdds in the patch failed.

-1
unit
1299
hadoop-ozone in the patch failed.

+1
asflicense
32
The patch does not generate ASF License warnings.

5739

Reason
Tests

Failed junit tests
hadoop.ozone.web.client.TestKeysRatis

hadoop.ozone.client.rpc.TestBlockOutputStreamWithFailures

hadoop.ozone.scm.TestGetCommittedBlockLengthAndPutKey

hadoop.hdds.scm.pipeline.TestSCMPipelineManager

hadoop.ozone.TestOzoneConfigurationFields

Subsystem
Report/Notes

Docker
Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-828/3/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hadoop/pull/828

Optional Tests
dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle xml cc

uname
Linux e79a0952b6e1 4.4.0-139-generic #165~14.04.1-Ubuntu SMP Wed Oct 31 10:55:11 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
personality/hadoop.sh

git revision
trunk / 24c53e0

Default Java
1.8.0_212

unit
https://builds.apache.org/job/hadoop-multibranch/job/PR-828/3/artifact/out/patch-unit-hadoop-hdds.txt

unit
https://builds.apache.org/job/hadoop-multibranch/job/PR-828/3/artifact/out/patch-unit-hadoop-ozone.txt

Test Results
https://builds.apache.org/job/hadoop-multibranch/job/PR-828/3/testReport/

Max. process+thread count
5245 (vs. ulimit of 5500)

modules
C: hadoop-hdds/common hadoop-ozone/client hadoop-ozone/common hadoop-ozone/integration-test hadoop-ozone/objectstore-service hadoop-ozone/ozone-manager hadoop-ozone/tools U: .

Console output
https://builds.apache.org/job/hadoop-multibranch/job/PR-828/3/console

versions
git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1

Powered by
Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Comment

0
reexec
723
Docker mode activated.

_ Prechecks _

+1
dupname
1
No case conflicting files found.

+1
@author
0
The patch does not contain any @author tags.

+1
test4tests
0
The patch appears to include 6 new or modified test files.

_ trunk Compile Tests _

0
mvndep
112
Maven dependency ordering for branch

+1
mvninstall
754
trunk passed

+1
compile
328
trunk passed

+1
checkstyle
86
trunk passed

+1
mvnsite
0
trunk passed

+1
shadedclient
950
branch has no errors when building and testing our client artifacts.

+1
javadoc
130
trunk passed

0
spotbugs
289
Used deprecated FindBugs config; considering switching to SpotBugs.

+1
findbugs
473
trunk passed

_ Patch Compile Tests _

0
mvndep
64
Maven dependency ordering for patch

+1
mvninstall
455
the patch passed

+1
compile
287
the patch passed

+1
cc
287
the patch passed

+1
javac
287
the patch passed

+1
checkstyle
93
the patch passed

+1
mvnsite
0
the patch passed

+1
whitespace
0
The patch has no whitespace issues.

+1
xml
1
The patch has no ill-formed XML file.

+1
shadedclient
693
patch has no errors when building and testing our client artifacts.

+1
javadoc
148
the patch passed

+1
findbugs
520
the patch passed

_ Other Tests _

-1
unit
165
hadoop-hdds in the patch failed.

-1
unit
985
hadoop-ozone in the patch failed.

+1
asflicense
55
The patch does not generate ASF License warnings.

7193

Subsystem
Report/Notes

Docker
Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-828/4/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hadoop/pull/828

Optional Tests
dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle xml cc

uname
Linux<PHONE_NUMBER>8e 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
personality/hadoop.sh

git revision
trunk / 05db2a5

Default Java
1.8.0_212

unit
https://builds.apache.org/job/hadoop-multibranch/job/PR-828/4/artifact/out/patch-unit-hadoop-hdds.txt

unit
https://builds.apache.org/job/hadoop-multibranch/job/PR-828/4/artifact/out/patch-unit-hadoop-ozone.txt

Test Results
https://builds.apache.org/job/hadoop-multibranch/job/PR-828/4/testReport/

Max. process+thread count
4719 (vs. ulimit of 5500)

modules
C: hadoop-hdds/common hadoop-ozone/client hadoop-ozone/common hadoop-ozone/integration-test hadoop-ozone/objectstore-service hadoop-ozone/ozone-manager hadoop-ozone/tools U: .

Console output
https://builds.apache.org/job/hadoop-multibranch/job/PR-828/4/console

versions
git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1

Powered by
Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

Thanks @ajayydv for working on this. +1, please confirm unit test failure are not related.

test failures look unrelated. All failed tests passed locally.

@xiaoyuyao  thanks for review.


Compile without valgrind by default

Codecov Report

Merging #29 (af81f6f) into main (fb24adc) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #29   +/-   ##
=======================================
  Coverage   58.92%   58.92%
=======================================
  Files           4        4
  Lines         280      280
  Branches       67       67
=======================================
  Hits          165      165
  Misses         97       97
  Partials       18       18

Impacted Files
Coverage Δ

src/ssm-mem.c
50.51% <ø> (ø)

Continue to review full report at Codecov.

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


Path is always null (because location.js is missing)

Just like in phantomjs, in phantomjs2 there's following line of code:
exports.path = path.resolve(__dirname, require('./location').location)
The thing is that location.js is not present in phantomjs2 package.
Thus, phantomjs2.path is always null.

Sounds like you might be using the phantomjs2 NPM module. Please file an issue with them at zeevl/phantomjs2 as this has nothing to do with Phantom core.

My bad. I apologize for this.  Thanks!


Add upgrade-notes.md file

This file includes upgrade notes for changes to the library that require changes to application code. This file is used by the release manager to fill the "Upgrade notes" section in the v3.x.y.md changelog file.
Ping @ahocevar.

Not sure I understand what was decided, but shouldn't there be a heading that states which upgrade path the notes are relevant for? Something like
## v3.3.x

My plan was to accumulate upgrade notes in this file and have the release manager extract the notes that are relevant to his release.

Sounds good to me.

This will work for the release manager and anyone who can do a git blame, but will look cryptic for anyone else. But if others think that the way it is now is the way to go, I don't mind.

The release managers may prepend the release tag (and date?) each time a
release occur. This way changes will be separated by release.

The release managers may prepend the release tag (and date?) each time a release occur. This way changes will be separated by release.

Yep!

Sounds good to me. @elemoine, please merge and update the release procedure doc to add this step.

update the release procedure doc to add this step.

Done.


Update request: quarto 1.3.450 → 1.4.549

Package name: quarto
Latest released version: 1.4.549

Current version on the unstable channel: 1.3.450
Current version on the stable/release channel: 1.3.450

[x] Checked the nixpkgs pull requests

Notify maintainers
@minijackson @mrtarantoga

Note for maintainers: Please tag this issue in your PR.

Add a :+1: reaction to issues you find important.

This is handled by #263108

The pr was merged


C# Code Generation generates method with return default(void)

The C# generator generated client method with the following signature:
public async System.Threading.Tasks.Task AttachmentsPatchAsync(int attachmentId, AttachmentRename body, System.Threading.CancellationToken cancellationToken)
Problem is that the method tries to return default(void) which doesn't compile:
                try
                {
                    var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
                    if (response_.Content != null && response_.Content.Headers != null)
                    {
                        foreach (var item_ in response_.Content.Headers)
                            headers_[item_.Key] = item_.Value;
                    }

                    ProcessResponse(client_, response_);

                    var status_ = (int)response_.StatusCode;
                    return default(void);
                }

Instead of this I suppose plain return would work.
This is with OperationGenerationMode = OperationGenerationMode.MultipleClientsFromPathSegments.
The Open API spec is: https://dev.procountor.com/static/swagger.latest.json

Yea this looks like a bug with default responses, think another condition needs to check for HasResult here instead of just using UnwrappedResultDefaultValue:
https://github.com/RicoSuter/NSwag/blob/67cc25b63a92df49d185dfa15486ba9e60c0db39/src/NSwag.CodeGeneration.CSharp/Templates/Client.Class.liquid#L337-L342
Having said that, it's only falling back to that as you haven't specified any response types looking at your API spec, whereas they are specified on other patch endpoints.
"responses" : {
          "default" : {
            "description" : "default response",
            "content" : {
              "application/json" : { }
            }
          }
        }

@PedroJesusRomeroOrtega what does the API actually return for the request? You could manually edit the spec after downloading it to make it match for now, and possibly contact the provider to get it fixed.

+1 on this issue.
        "responses": {
          "200": {
            "description": "Ok",
            "content": {
              "application/vnd.mycompany.v1+json": { }
            }
          },

results in
                        var status_ = (int)response_.StatusCode;
                        if (status_ == 200)
                        {
                            return default(void);
                        }

@RicoSuter would you accept a PR for this issue?

any new on this? https://community.openproject.org/api/v3/spec.yml seems to have something similar, though I don't know if it's a problem of nswag or openproject.
Can anyone tell me if this is the same or similar cause as yours? At least I'm getting default(void) for returncode 200, though swagger seems to return something referenced by "$ref": "#/components/examples/Views"
        "/api/v3/views": {
            "get": {
                "parameters": [
                    {
                        "description": "JSON specifying filter conditions.\nCurrently supported filters are:\n\n+ project: filters views by the project their associated query is assigned to. If the project filter is passed with the `!*` (not any) operator, global views are returned.\n\n+ id: filters views based on their id\n\n+ type: filters views based on their type",
                        "example": "[{ \"project_id\": { \"operator\": \"!*\", \"values\": null }\" }]",
                        "in": "query",
                        "name": "filters",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/hal+json": {
                                "examples": {
                                    "Queries": {
                                        "$ref": "#/components/examples/Views"
                                    }
                                }
                            }
                        },
                        "description": "OK",
                        "headers": {}
                    }
                },
                "tags": [
                    "Views"
                ],
                "description": "Returns a collection of Views. The collection can be filtered via query parameters similar to how work packages are filtered.",
                "operationId": "List_views",
                "summary": "List views"
            }
        }

        /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
        ///
        /// List views
        ///
        /// <remarks>
        /// Returns a collection of Views. The collection can be filtered via query parameters similar to how work packages are filtered.
        /// </remarks>
        /// <param name="filters">JSON specifying filter conditions.
        ///
Currently supported filters are:
        ///

        ///
+ project: filters views by the project their associated query is assigned to. If the project filter is passed with the `!*` (not any) operator, global views are returned.
        ///

        ///
+ id: filters views based on their id
        ///

        ///
+ type: filters views based on their type</param>
        /// <returns>OK</returns>
        /// <exception cref="ApiException">A server side error occurred.</exception>
        public virtual async System.Threading.Tasks.Task ViewsAsync(string filters, System.Threading.CancellationToken cancellationToken)
        {
            var urlBuilder_ = new System.Text.StringBuilder();
            urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/v3/views?");
            if (filters != null)
            {
                urlBuilder_.Append(System.Uri.EscapeDataString("filters") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filters, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
            }
            urlBuilder_.Length--;

            var client_ = _httpClient;
            var disposeClient_ = false;
            try
            {
                using (var request_ = new System.Net.Http.HttpRequestMessage())
                {
                    request_.Method = new System.Net.Http.HttpMethod("GET");
                    request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/hal+json"));

                    PrepareRequest(client_, request_, urlBuilder_);

                    var url_ = urlBuilder_.ToString();
                    request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);

                    PrepareRequest(client_, request_, url_);

                    var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
                    var disposeResponse_ = true;
                    try
                    {
                        var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
                        if (response_.Content != null && response_.Content.Headers != null)
                        {
                            foreach (var item_ in response_.Content.Headers)
                                headers_[item_.Key] = item_.Value;
                        }

                        ProcessResponse(client_, response_);

                        var status_ = (int)response_.StatusCode;
                        if (status_ == 200)
                        {
                            return default(void);
                        }
                        else
                        {
                            var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
                            throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null);
                        }
                    }
                    finally
                    {
                        if (disposeResponse_)
                            response_.Dispose();
                    }
                }
            }
            finally
            {
                if (disposeClient_)
                    client_.Dispose();
            }
        }

I ended up with modifying resulting generated code - code.Replace("return default(void);", "return;");. Roughly but it works.

As said for me this wouldn't work, since I'm expecting a result here. Maybe this is a bug on its own.

For now I'm working around this with a custom liquid template that manually detects when the default return is default(void) but this solution is less than ideal

I just had the same issue with Results<Created<MyDto>, NotFound>. It generates 200. That is disturbing.
I will try to move to the built-in OpenAPI generation in ASP.NET Core. These bugs are not worth staying on NSwag for the OpenAPI generator. I will still use the NSwag client generator, of course.


[React Query] How to revalidateTables properly?

Is your feature request related to a problem? Please describe.
I'm trying to manually refetch some keys with "revalidateTables" and I'm not sure if I'm on the right track? Are there any examples for using "revalidateTables" properly?
Describe the solution you'd like
I need the modules table to refetch after the mutation.
const { mutateAsync: update } = useUpdateMutation(
    supabase.schema('lms').from('modules'),
    ['id'],
    null,
    {
      onSuccess: () => {
        setSuccess(true);
      },
      onError: (error) => {
        return error;
      },
      revalidateTables: [
        {
          schema: 'lms',
          table: 'modules',
        },
      ],
    }
  );

  const updateModuleData = async (moduleData: Database['lms']['Tables']['modules']['Insert']) => {
    await update(moduleData);
  };

  return updateModuleData;
}

I'm in a similar boat — trying out revalidateTables and revalidateRelations but can't seem to get related queries to update

your code looks fine. maybe there is a bug here, will take a look. thanks for reporting!

there are two issues here:

it was not working for swr due to a bug that is fixed in the linked pr
because of a design fault, you need to pass something as the query. otherwise upsertItem is never called. I may fix this in a future release. until then the workaround is to just pass anything but null:

const { mutateAsync: update } = useUpdateMutation(
    supabase.schema('lms').from('modules'),
    ['id'],
   'id', // <-- not null!
    {
      onSuccess: () => {
        setSuccess(true);
      },
      onError: (error) => {
        return error;
      },
      revalidateTables: [
        {
          schema: 'lms',
          table: 'modules',
        },
      ],
    }
  );

Hey, I'm on the latest version with React Query and my table does not get revalidated. There is a database trigger that creates a record in the persons table before a cloud_contributor is created. Maybe I have misunderstood the purpose of the revalidateTables feature and should find a way to do a complete refetch. If anyone has any suggestions on how to do that, please let me know!
`import useSupabase from '@/hooks/use-supabase';
import { useInsertMutation } from '@supabase-cache-helpers/postgrest-react-query';
function useInsertCloudContributorMutation() {
const client = useSupabase();
return useInsertMutation(
//@ts-ignore
client.from('cloud_contributors'),
['id'],
'id',
{
revalidateTables: [
{
table: 'persons',
},
],
}
);
}`

Hey @ayeshabasit, can you post all involved queries and mutations?

Thanks for responding @psteinroe!
To create:
import useSupabase from '@/hooks/use-supabase';
import { useInsertMutation } from '@supabase-cache-helpers/postgrest-react-query';

function useInsertCloudContributorMutation() {
  const client = useSupabase();
  return useInsertMutation(
    //@ts-ignore
    client.from('cloud_contributors'),
    ['id'],
    'id',
    {
      revalidateTables: [
        {
          table: 'Persons',
        },
      ],
    }
  );
}

export default useInsertCloudContributorMutation;

To fetch:
import type { SupabaseClient } from '@supabase/supabase-js';
import type { CloudContributors } from<EMAIL_ADDRESS>
export function getCloudContributorsAndPersons(
  client: SupabaseClient,
  cloudId: string
) {
  return client
    .from<any, CloudContributors>('cloud_contributors')
    .select(
      'id,created_at,email,cloud_id, person:persons(id, created_at, user_id, first_name, last_name, gender, dob, dod, full_name, stripe_customer_id, contact_email, is_active_user)'
    )
    .eq('cloud_id', cloudId)
    .order('created_at', { ascending: false });
}

Postgres Trigger:
-- create a trigger to insert a person record if person record does not exist into cloud contributors for that email FIRST
create function public.handle_cloud_contributor_person_record()
returns trigger
language plpgsql
security definer set search_path = public
as $$
begin
  insert into public.persons (contact_email, is_active_user)
  values (new.email, false)
  on conflict(contact_email)
  do nothing;
  return new;
end;
$$;

-- then insert cloud contributor record
create trigger on_cloud_contributor_created
  before insert on public.cloud_contributors
  for each row execute procedure public.handle_cloud_contributor_person_record();

@psteinroe I'm still stuck with this. Not sure where to go from here!

hey @ayeshabasit , sorry! It got lost because this issue is already closed.
your query looks good to me. it should automatically revalidation even without revalidate tables.
since this is a very basic use case and it's working in tests and in production for me, would you be so kind to create a full repro, oder open a pr with a failing test?


Location based ar with aframe requires different FOV values for chrome than it does for firefox

Do you want to request a feature or report a bug?
Bug
What is the current behavior?
The samsung tablet I'm using requires an FOV of 52.75 on firefox and an fov of 87 on chrome. This of course screws up the scale of everything but it's needed to ensure the "pins" stay on their given latitude and longitude when turning the tablet.
If the current behavior is a bug, please provide the steps to reproduce.
Set up a simple location based aframe example, place a location about a km away, correct the fov on chrome or firefox until it's staying on target while you turn the device, change to the other browser and observe that the fov is now screwed up.
Please mention other relevant information such as the browser version, Operating System and Device Name
Android samsung galaxy s8
What is the expected behavior?
That FOV doesn't need to be changed between browsers

It seems that the firefox camera is zoomed in which accounts for this discrepancy, I'm just unsure of why the firefox camera is zoomed.

I noticed from arjs-webcam-texture.js that if I look at the stream's settings firefox doesn't have the "zoom" parameter while chrome does. And changing the deviceId seems to break it or have no effect. However chrome allows for the zoom parameter. So rather than trying to zoom firefox out which seems to be impossible, I decided to just zoom chrome in to match it for now
So I added zoom to the constraints
video: {
          facingMode: "environment",
          zoom: 2
        },

Added zoom to the 3d environment via the camera
<a-camera
        fov-change
        id="camera"
        gps-new-camera="gpsMinDistance: 5; simulateLatitude: 1; simulateLongitude: 1; simulateAltitude: 400;"
        far="1000000"
        look-controls-enabled="true"
        look-controls="enabled: true; magicWindowTrackingEnabled: true; touchEnabled: true; mouseEnabled: true"
        zoom="2"
      >

And set the fov to be dependent on the browser
AFRAME.registerComponent("fov-change", {
        init: function () {
          // grab the camera
          const cam = document.querySelector("[camera]");
          // this.el should also work for this as long as your fov-change component is on the camera
          // grab the current FOV, this will be 80 as that's the default for aframe
          const fov = cam.getAttribute("camera").fov;
          console.log("Wow, fov is ", fov);
          // update the camera with the new FOV
          // if holding portrait use 61:
          // cam.setAttribute("camera", "fov", 61)

          // For whatever weird reason it seems that chrome and firefox use different fov values?
          if (navigator.userAgent.indexOf("Chrome") != -1) {
            cam.setAttribute("camera", "fov", 87);
          } else if (navigator.userAgent.indexOf("Firefox") != -1) {
            // For landscape, 45 on the ipad, 52.75 for the samsung
            cam.setAttribute("camera", "fov", 52.75);
          } else {
            // Don't really know what other browsers use, but most will be chromium I suppose?
            cam.setAttribute("camera", "fov", 87);
          }

          console.log("Wow, fov is now", document.querySelector("[camera]").getAttribute("camera").fov);
        },
      });

It's an ugly workaround but I don't think there's another option as I can't seem to get a better stream from firefox at all.


Completing Easy Issue for React.js, closes #1502

Pull Request Type
What kind of change does this PR introduce?
Solved an issue/task
Completed Easy Issue for React,js
Issue Number: #1502

Merged

This is an automated message from Fork, Commit, Merge [BOT].

Thank you for your contribution! Your pull request has been merged. The files have been reset for the next contributor.
What's next?
If you're looking for more ways to contribute, I invite you to check out my other projects. Just click here to find more. These projects contain real issues that you can help resolve. You can also check out the Influences section in the README to find more projects similar to this one.
Also please leave a star to this project if you feel it helped you, i would really appreciate it.
I look forward to seeing your contributions!


UE 5.3 Don't work

Just can't run it
The following modules are missing or built with a different engine version:
glTFRuntime
glTFRuntimeEditor
ReadyPlayerMe
ReadyPlayerMeEditor
RpmAvatarCreator

The project does not include the pre-built binaries. So you will need to build them yourself. If you install the appropriate version of Visual Studio and .Net you will be able to build this yourself. You can also right-click the .project file and switch engine versions that way if needed.


Middleware auth:sanctum not working in Module route

I installed 'Laravel/sanctum' through composer and published the vendor and migrated migrations and used Laravel\Sanctum\HasApiTokens on Entitites/User.
There is an api route file on user module and 'auth:sanctum' middleware is used on '/api/me' route. It should send Unauthenticated JSON response when there is no token, but when i hit this api without token, its showing login page even if i had used Accept: application/json as header.
Also im not able to hit this api even if i have sent the current token.
This is my api route file:
Route::post('/login', 'AuthController@login')->name('api.login'); Route::group(['middleware' => ['auth:sanctum']], function () {     Route::get('/me', 'AuthController@getLoggedUser')->name('api.me'); });

This is the response i'm getting when I hit on postman.

Is there something I need to do to be able to use the middleware in the module?

@Binay7587  I have the same issue, did you find a solution to the problem?

@p0werage2k  No, then I used tymon/jwt-auth package.

Faced with the same problem. After some investigation it seems the problem happens there: https://github.com/laravel/sanctum/commit/f5695aecc547138c76bc66aaede73ba549dabdc5
During the refactoring they forgot to include default guard definition.
Just add this at the end of config/sanctum.php for api guard:
'guard' =>  'api'

I'm having the same problem. I've correctly setup sanctum and fortify and managed to login. However, subsequent requests to routes protected with auth:sanctum middleware throws authorization error.

I have same error , not yet resolved ?

Ended up using Laravel passport. It's an overkill, for now

i face them Issue but i solved it by Add to headers Accept   with value application/json
that's the best solution i found maybe others have another solution.

It seems that this still doesn't work no matter what I do... When I hit a guarded endpoint with Insomnia or Postman (without valid token) I get 401 (which is expected), but my frontend Vue app (using axios) doesn't complain at all when hitting the same endpoint (it gets 200).
Any hope this will be fixed any time soon?

I was had the same problem, i have found the solution, it seems to me that is because you use a old version of laravel, you must to create a new laravel 8 version project and transfer all your files projects into.
After that, integrate and config laravel-sanctum

Am new to laravel and I had the same problem, but I solved it by changing the gurds in the file config/auth.php to `
'guards' => [
    'web' => [
        'driver' => 'session',
        'provider' => 'users',
    ],

    'api' => [
        'driver' => 'token',
        'provider' => 'users',
    ],
],`

And changed the routes/api.php groups to `
Route::group(['middleware' => 'auth:api'], function () {
Route::get('articles', [MyController::class, 'index']);
});`
GOOD LUCK

The issue still exists. I am using laravel 7 and wanted to add a few APIs, auth:sanctum middleware seems not working.
Anyone can suggest it??

In my case cpanel apache denied Authorization header even i configured on htaccess file. So i created XauthorizationMiddleware then my problem solved...

header('X-Authorization')) {
            $request->headers->set('Authorization', $auth);
        }

        return $next($request);
    }
}

`<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
class XAuthorizationHeader
{
/**
* Handle an incoming request.
*
* @param  \Illuminate\Http\Request  $request
* @param  \Closure  $next
* @return mixed
*/
public function handle($request, Closure $next) {
    // check if we have an X-Authorization header present
    if($auth = $request->header('X-Authorization')) {
        $request->headers->set('Authorization', $auth);
    }

    return $next($request);
}

}
`

   public function handle($request, Closure $next) {         // check if we have an X-Authorization header present         if($auth = $request->header('X-Authorization')) {             $request->headers->set('Authorization', $auth);         }         return $next($request);     }

public function handle($request, Closure $next) {

    // check if we have an X-Authorization header present
    if($auth = $request->header('X-Authorization')) {
        $request->headers->set('Authorization', $auth);
    }

    return $next($request);
}

then you must have include line below on Kernel.php
\App\Http\Middleware\XAuthorizationHeader::class,

In my case cpanel apache denied Authorization header even i configured on htaccess file. So i created XauthorizationHeader middleware then my problem solved...

@amaraa019 YES! thankyou, after hours of searching this was indeed the problem for me cpanel/apache strips certain header values by default for security reasons. Your solution worked for me.


Bug in sigmasqr function in power.py

The followling line in sigmasqr function in power.py,
y = romb(int_sigma, np.log10(kmin), np.log10(kmax), divmax=7)
Shouldn't the np.log10 function be np.log instead, since the integrand function int_sigma takes log of k, not log10 of k?
def int_sigma(logk):
    k = np.exp(logk)
    x = k * R
    w = 3.0 * (np.sin(x) - x * np.cos(x)) / (x * x * x)
    pk = transfer_fn(cosmo, k, **kwargs) ** 2 * primordial_matter_power(cosmo, k)
    return k * (k * w) ** 2 * pk

Hi @ethlau, no I don't think that causes any bugs np.log10(kmin) and np.log10(kmax) are just rough integration bounds, they shouldn't have an impact on the result of the computation. Up to a redefinition of this kmin and kmax values, it shouldn't affect the result.


Replace BrushFunction customization with State

Fixes: #1448

This is a bit different from the other changes, because the others were going from @Composable () -> T to State<T>, where this is going from () -> T to State<T>.
If the Brush impl itself depends on some State then when that state changes, a redraw (but not a recompose or relayout) is triggered. That works with both approaches and is about as efficient as you can be in Compose.
What's new in this change is you can also create a mutableStateOf a Brush and then change that (so you could change from a SolidColor brush to a RadialGradient brush, and (I think) trigger only a redraw because the state's value is fetched only in the rendering logic. In the old implementation, because it wasn't a @Composable function that returned the Brush, there was no way of changing just the brush type -- you had to make your own Brush subclass and make it do different things based on some State it always consults.
So I think this is a useful capability (sorry for being longwinded...), but I don't really like how the validation code came out. Would it be possible to use remember mutableStateOf there, rather than a custom State implementation?

This is a bit different from the other changes, because the others were going from @Composable () -> T to State<T>, where this is going from () -> T to State<T>.
If the Brush impl itself depends on some State then when that state changes, a redraw (but not a recompose or relayout) is triggered. That works with both approaches and is about as efficient as you can be in Compose.
What's new in this change is you can also create a mutableStateOf a Brush and then change that (so you could change from a SolidColor brush to a RadialGradient brush, and (I think) trigger only a redraw because the state's value is fetched only in the rendering logic. In the old implementation, because it wasn't a @Composable function that returned the Brush, there was no way of changing just the brush type -- you had to make your own Brush subclass and make it do different things based on some State it always consults.
So I think this is a useful capability (sorry for being longwinded...), but I don't really like how the validation code came out. Would it be possible to use remember mutableStateOf there, rather than a custom State implementation?

I added a few buttons that can switch to solid blue, a linear gradient, a radial gradient or a  shader.
But there is something I don't quite understand about using the mutableStateOf that why I have to create a new SizingShaderBrush to have it animate. While using the function or the State with overriding the getter, it can use the same SizingShaderBrush object.


Missing "Microsoft.Azure.Functions.ExtensionBundle.Workflows" bundle.

Describe the Bug with repro steps
Create a Logic App (Standard) in VSCode for Linux.
Get a "NOENT: no such file or directory, scandir '/home//.azure-functions-core-tools/Functions/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle.Workflows'" error.
There's no such bundle at that location.
What type of Logic App Is this happening in?
Standard (VSCode)
Are you using new designer or old designer
New Designer
Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg
Yes
Workflow JSON
Not applicable. Any workflow causes this.

Screenshots or Videos
No response
Browser
Not applicable
Additional context
No response

Hi @drobert-bfm thank you so much for raising this issue. Usually the extension bundle gets downloaded during the activation of the extension when opening vscode.

Which extension version are you using?
During which command are you getting this issue?