Question. OpenAI completion api returns 400

Hi,
I tried several loaders (GitHub
, selenium, cheerio,etc) and they retrieve correctly certain data.
I then use splitters to split the text in multiple documents, and pass it to the open ai api with high max token.
I consistently get 400, which I believe is due to the document size. Is a legit guess? Is there some other steps I need to do in order to avoid a 400 request?

Are you trying to use two different languages on your prompt? I already have that problem when I try to mix Portuguese and English on the same prompt.
If it is a problem, try instructing your prompt about the other language. Use most English on your prompt, and when you have to use or receive other languages as input, warn the prompt.


Tests to display workflow with typescript

How i supposed to import serialize.d.ts inside my /typings/tsd.d.ts to be able to use it inside my Typescript project?
import {Serialize, serialize} from 'cerialize';

I'm trying it currently as:
/// <reference path="../node_modules/cerialize/dist/serialize.d.ts" />

And i get an error:

Error:(1, 35) TS2307: Cannot find module 'cerialize'.

Since serialize.d.ts does not export module name:
export module "cerialize" {  }

Looks like i need to import it like a typescript file, relative to npm module:
import {Serialize,serialize} from 'cerialize/src/serialize';

Hi garkin, so far the project has expected es6 imports with a relative path.
import { serialize } from '../node_modules/cerialize/src/serialize'
that should get you started for now but I'll take a look at getting it to work with tsd definitions

I havent had much luck exposing typescript packages to npm, have you seen any good examples I can borrow from?

With the new typings package you can import the cerialize typings by running typings install npm:cerialize --save and it will use the typings provided with the cerialize npm package

very cool, I'll check this out thanks for passing it along


Update Go to 1.20.1

go1.20.1 (released 2023-02-14) includes security fixes to the
crypto/tls, mime/multipart, net/http, and path/filepath packages, as
well as bug fixes to the compiler, the go command, the linker, the
runtime, and the time package.

Release notes: https://go.dev/doc/devel/release#go1.20.1

/test

/test

Runtime tests failed because the test suite there is still built using the Go toolchain provided in the runtime VM image 😭 I'll take care of updating the VM images to Go 1.20.1.

/test

/ci-verifier


How to display one photo at a time as needed

First of all thank you very much for your time and effort in creating this nice library. I have a question on maybe to enhance the browsing usability as a photo gets downloaded through an http request.
In the demo, you are loading 4 photos all at once. This works for a small list of photos with relatively small sized images. But, I was wondering how you would go about implementing loading one photo at a time based on a list of let's say 2,000 images that one would like to browse through. So, I'm looking at a way to download this list of URL strings and then download the next photo as the user swipes to the left for the next one to be displayed.
Not sure if this makes sense; but, any pointers on where to implement this in the demo would be great. Thanks again for your help.

Hi Thomas. You'll be glad to hear that that is exactly how MWPhotoBrowser works. As you swipe through photos, MWPhotoBrowser loads/downloads only the image you are currently viewing. When that image has finished loading, it will then start loading the adjacent images, so when you swipe you hopefully get to see the images immediately. All downloaded images are also temporarily cached to a file which allows a better experience for the user. And obviously, throughout browsing and when any memory conditions require it, MWPhotoBrowser automatically releases what it needs to. Hope this helps!


Updated press files

Added eight additional Uptane/TUF article titles from late December 2019 to April 2020.

I'm not sure who has the authority to merge, but this has been waiting about a week. Iit's just an update of press coverage.

Sorry, I missed this in all the other requests...

No worries.
Lois

On May 11, 2020 at 10:00 AM Justin Cappos<EMAIL_ADDRESS>wrote:
Sorry, I missed this in all the other requests...

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_theupdateframework_theupdateframework.io_pull_5-23issuecomment-2D626719441&d=DwMCaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=hgBKIqNYIOwzXeBjPUaKRw&m=DE-koarPJndsrXR1wi_j7WJd7ilFVEyGajAnSRxz_zw&s=VGSfokYZXKkAdAZkm8xF21BErXFOqKi9Tg7_-C80CR4&e= , or unsubscribe https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ADPGUXZ7R42ELANAYSDT2VTRRAAHRANCNFSM4MZDPLHQ&d=DwMCaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=hgBKIqNYIOwzXeBjPUaKRw&m=DE-koarPJndsrXR1wi_j7WJd7ilFVEyGajAnSRxz_zw&s=jciARYSBAjdBGY6xmo5JLV51igcczE5x-VD8OTC-rC4&e= .


GCP lego for removing a role from a user

Description
Created a GCP lego for removing a role from a user.
Testing
Tested lego on Unskript sandbox

Hello @shloka-bhalgat-unskript! I've submitted a PR. Please review it.


Fixed Default Value Zero

Summary
Closes #2151
Fixes the issue where select was not accepting the default value of zero.
Additional Details
If you have anything else that you think may be relevant to this issue, list it here. Additional information can help us better understand your changes and speed up the review process.
Please add your name to the CONTRIBUTORS.md file. Adding your name to the CONTRIBUTORS.md file signifies agreement to all rights and reservations provided by the License.
Thanks for contributing to Terra.
@cerner/terra

@anjaliroy19 once you fix the lint issues and the merge conflict, I can get this merged for you. If you can get it out today, we would be able to release it tomorrow for your team's consumption.


Article image

Support showing the image configured in an article in both the header of the article itself as on the index page, below the summary of the article.
An example can be found on my weblog.

Is this addition something you would consider including? It only shows the image when the Image: header is included in the article file.
I would prefer not to have to override both templates with a complete copy of my own through THEME_TEMPLATES_OVERRIDES :)

I like the idea overall but I didn't have the time yet to review the implementation and to think about possible edge cases. Most likely this will get merged eventually :)
I'll try to return to this in the following week.

No worries, take your time!

I'm sorry, life happened and this PR fell of my radar.
Why did you add the last commit (43b5acb)? Why is it beneficial for you to duplicate article image manually at the top of the article body like you do here?
Do you think that may be there should be max-height or min-width set on article image? Now it looks weird if image was not specifically cropped/resized to fit in blogroll:

Hey, no worries :)
I changed the way those article images are 'included' as they would not show up in the rss/atom feed for example. The way those feeds are generated, is pretty direct from the content, so I missed those in the previous situation. It is not ideal to have them duplicated, so I might change it anyway, but that will mean creating a template for feeds, I think?
Adding a max-height and/or min-width sounds like a good idea, so tall images do not take over the page :)
Do you have an idea how to easily include the article image in the feeds? That would solve the issue of the duplication.

Do you have an idea how to easily include the article image in the feeds? That would solve the issue of the duplication.

I've just looked it up and it appears that Pelican feeds are not templated but instead are generated as XML trees.
It means we can't easily modify feed output. Simplest solution I see would be to override elements in Writer.write_feed here, but that still requires creating a Pelican plugin which is far out of scope for our simple theme.

Another note
It seems that there is no consensus among theme authors about which attribute to use for article image. You suggest article.image, but there are also article.cover, article.featured_image and even article.picture in use :)

I agree that article.image is a good name for your use case, and it's sensible to expect it to appear in RSS/ATOM feed. With article.cover for example we would not have that problem because that image would be only a styling feature and not part of content - no one would need it in their RSS reader.
I see the following options:

Show article.image only in index.html. Do not consider the image to be part of content. Rename it to article.cover maybe?
Show article.image both in index.html and in article.html. Accept that the image will not appear in feeds.

What do you think?

Yeah, those XML trees were what I was talking about, so I quickly gave up on the thought of changing those :)
Article images are indeed far from standardised; today I discovered https://github.com/peterdesmet/pelican-cover-image which does something pretty similar. I like 'our' short 'image:' header.
Those two options are exactly what I was contemplating; currently, I chose the first option, so the article.image shows up in overviews, but not in the article itself. I prefer that over not having the image show up in feeds, as sometimes it is a big part of the content of that post.
I do not mind calling it article.image or article.cover as I think both are pretty much the same kind of thing: "featured image for this article". The result is the same. What do you prefer?

I think I prefer 'Image' by the way, it is a clear, concise title. 'Cover' is slightly more ambiguous. Also, I have a big-ish list of articles with 'Image:' already ;)


Q: Does vstest change the MXCSR register?

I am having some issues with reproducibility of tests in the face of a native dll that changes the MXCSR register FTZ (flush-to-zero) and DAZ (denormals-are-zero) bits in DllMain when process is attached.
Running this first time inside Visual Studio causes vstest.executionengine.x86.exe to start and then load the native dll and the test is run. This gives the expected result.
However, upon subsequent test runs inside Visual Studio the test fails, seemingly since the MXCSR register has been reset. Since vstest.executionengine.x86.exe keeps running and keeps the native dll loaded, this means DllMain is not called again.
Forcibly killing vstest.executionengine.x86.exe and running tests again results in the test succeeding again the first time it is run.
My question then is, does vstest´ change/reset the MXCSR` register?
Note, that we only run a single test method. Which only touches well known code in the native dll. The function itself does not set the MXCSR register.

@nietras , vstest.executionengine.exe does not explicitly tires to reset MxCsr register, but like you mentioned if you native dll is loaded once in the process, it's DllMain won't be called again. To resolve this issue all you have to do is uncheck Test->TestSettings->Keep exe running option, which would kill vstest.execution engine after every run.
However since VS2017 update 5 we have introduced a new test platform, which will always kill the testhost (new vstest.executionengine) process, where tests are run.

AFAIK, vstest does not change/reset the MXCSR register.
That said, your problem seems to that of DLLmain not being called again, right ?
With Visual Studio 2017 Update 5, where new TestPlatform is default, I am guessing you would not hit this issue anyway as there is a new test host process that comes up for the run

Hi, I am closing this, it appears that for some reason even when using DLL_THREAD_ATTACH that the native dll did not change the MXCSR register for anything but the first thread that actually caused the native dll to be loaded. On subsequent tests different threads are used which do not get the proper bits set in MXCSR and we see differences in floating point results. Not a vstest issue, but an issue with the native dll.


Some links containing useful information

(Maybe this should be put into the Wiki, but it can be moved later.)

https://blogs.msdn.microsoft.com/vcblog/2012/08/29/ccx-part-0-of-n-an-introduction/ - Explanations about C++/CX, but also about WRL (5 parts)
http://www.codeproject.com/Articles/14183/COM-in-plain-C-Part - How to interface with COM in plain C (8 parts, many things are probably only relevant for classic COM, not for WinRT)
http://www.interact-sw.co.uk/iangblog/2011/09/25/native-winrt-inheritance - How inheritance works in WinRT

Thanks.  About inheritance, my understanding is that it was only used by XAML so I'd kind of planned to put it off until after non-XAML features worked well.
I am FINALLY taking some time to work on this project this week ... sorry for being MIA for so long.

Some more related projects:

https://github.com/GabrielMajeri/com-impl-rs
https://github.com/Arnavion/winapi-tlb-bindgen


Remove unused code for setPassword() action

cc @roryabraham since you reviewed https://github.com/Expensify/App/pull/6587 and I'm trying to reference that PR to make sure this one is correct.
Details
The code running inside this catch() block seems like it will never run. This particular (maybe all) API command methods will only catch if:

There are unhandled throws in the .then()
They "run out of retries" and get rejected

Since the only logic performed is a call to createTemporaryLogin() and the throw inside that method is handled by it's own catch() the logic here won't ever run.
Code was added in this PR and I didn't catch it (no pun intended)
Fixed Issues
$ https://github.com/Expensify/App/issues/8678
Tests

Sign up for new account
Get validate email
Visit link and break validate code in url
Enter valid password and submit
Verify the message appears above the submit button about the validate code being expired

[ ] Verify that no errors appear in the JS console

PR Review Checklist

PR Reviewer Checklist

[ ] I verified the correct issue is linked in the ### Fixed Issues section above
[ ] I verified testing steps are clear and they cover the changes made in this PR

[ ] I verified the steps for local testing are in the Tests section
[ ] I verified the steps for Staging and/or Production testing are in the QA steps section
[ ] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[ ] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[ ] I checked that screenshots or videos are included for tests on all platforms
[ ] I verified tests pass on all platforms & I tested again on:

[ ] iOS / native
[ ] Android / native
[ ] iOS / Safari
[ ] Android / Chrome
[ ] MacOS / Chrome
[ ] MacOS / Desktop

[ ] I verified there are no console errors (if there’s a console error not related to the PR, report it or open an issue for it to be fixed)
[ ] I verified proper code patterns were followed (see Reviewing the code)

[ ] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
[ ] I verified that comments were added to code that is not self explanatory
[ ] I verified that any new or modified comments were clear, correct English, and explained “why” the code was doing something instead of only explaining “what” the code was doing.
[ ] I verified any copy / text shown in the product was added in all src/languages/* files
[ ] I verified any copy / text that was added to the app is correct English and approved by marketing by tagging the marketing team on the original GH to get the correct copy.
[ ] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named “index.js”. All platform-specific files are named for the platform the code supports as outlined in the README.
[ ] I verified the JSDocs style guidelines (in STYLE.md) were followed

[ ] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[ ] I verified that this PR follows the guidelines as stated in the Review Guidelines
[ ] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[ ] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[ ] If a new component is created I verified that:

[ ] A similar component doesn't exist in the codebase
[ ] All props are defined accurately and each prop has a /** comment above it */
[ ] Any functional components have the displayName property
[ ] The file is named correctly
[ ] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[ ] The only data being stored in the state is data necessary for rendering and nothing else
[ ] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[ ] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[ ] All JSX used for rendering exists in the render method
[ ] The component has the minimum amount of code necessary for its purpose and it is broken down into smaller components in order to separate concerns and functions

[ ] If a new CSS style is added I verified that:

[ ] A similar style doesn’t already exist
[ ] The style can’t be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)

[ ] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[ ] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.

QA Steps
This is not really easy to QA on native since you need to manually break the validate code. But we can repeat the steps above for:

Web

mobile web

[ ] Verify that no errors appear in the JS console

Screenshots

Web

Mobile Web

Desktop

iOS

Android

cc @chiragsalian on this too just to check me. I read some older comments of yours in this thread https://github.com/Expensify/App/pull/5150#issuecomment-915677035 and wanted to be sure that there isn't another way that catch() block can handle a response that I'm not seeing.

and wanted to be sure that there isn't another way that catch() block can handle a response that I'm not seeing.

Umm are you asking if there is some incoming response flow that would require a catch block? If so i feel like in the past an "incorrect validate code" or "email not found" would trigger the catch block. But i just tested this and it doesn't seem to be the case as its going to .then just fine. There is one case catch block would still be used and that would be offline connection, its steps,

Go to http://localhost:8080/setpassword/12/FGVGEKKUB
Turn off ngrok
Enter a password in newdot, click "set password"

Since the request is a failure it should go to the catch block. Not sure if this is something we would want to account for though.

@chiragsalian Oh wow, thanks for testing 🙇  That is consistent with my expectations then. Yes, I think if you are offline it's possible for the request to eventually fail and throw (but we are not really handling this case anywhere yet AFAIK).

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Deployed to staging by @marcaaron in version: 1.1.57-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by @chiragsalian in version: 1.1.57-17 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


[OFFAPPS-1038] Update ZAT to support zat new --scaffold command option

:v:
/cc @zendesk/vegemite
@zendesk/apps-migration
Tasks

[x] Add new command option zat new --scaffold to create app using latest scaffold from App Scaffold
[x] Make sure zat migrate is working after OFFAPPS-1020

References

JIRA: https://zendesk.atlassian.net/browse/OFFAPPS-1038

Risks

[medium] zat new --scaffold shouldn't affect existing command options zat new, zat new --v1, zat new --iframe-only
[low] zat migrate should work as normal, it directly invoke the app_migrator executable, doesn't aware of the internal change of it.

👍

@danielbreves @ocke
This is updated as discussed yesterday, updated to bypass iFrame URI prompt if it's zat new --scaffold
And leave exclude_pattern as it is, because it's not natively implemented in Thor::Actions#directory.

Follow-up on the PR walkthrough: I agree with Dan. If it's not feasible to implement include_pattern, I'd be happy to see a comment above the confusing line.


[devtools] fix console tutorial demos

What's changed, or what was fixed?

fix borked demos in the console tutorial

Fixes: N/A
Target Live Date: 2018-03-22

[x] This has been reviewed and approved by @kaycebasques
[x] I have run gulp test locally and all tests pass.
[x] I have added the appropriate type-something label.
[x] I've staged the site and manually verified that my content displays correctly.

CC: @petele

Whoops!
There were 11 warnings that will prevent this PR from being merged. Please take a look, and either fix, or provide a justification for why they can't be fixed.
WARNINGS
src/content/en/tools/chrome-devtools/console/get-started.md#L64 - '

Whoops!
There were 11 warnings that will prevent this PR from being merged. Please take a look, and either fix, or provide a justification for why they can't be fixed.
WARNINGS
src/content/en/tools/chrome-devtools/console/get-started.md#L64 - '

Whoops!
There were 11 warnings that will prevent this PR from being merged. Please take a look, and either fix, or provide a justification for why they can't be fixed.
WARNINGS
src/content/en/tools/chrome-devtools/console/get-started.md#L64 - '

:tada: This has been pushed live to https://developers.google.com/web/


Stop double renders when moving from legacy content to new UI

Checklist

[x] the contributor license agreement is signed
[x] commit message follows commit guidelines

Description of change
Here's a fun one to start the year. A bit of refactor around LegacyContent so as to address #2262.
Firstly, I want to highlight I did try and go for a minimal amount of change staying focused on the issue at hand. There are more things that seem obvious to change, however: 1. This is a critical area of complexity which we don't want to risk - and ideally we look forward to the day when it's removed; 2. With just this focused change, the delta is already big and complex enough.
Secondly, being a few months out from release, I hope that'll enable us to shake out any issues which a change like this could trigger.
Alright, now on to what I actually did - and some of the why.
The biggest fundamental change was to how the component tree now looks. Before we always had the LegacyContent component in play - probably what would now days be done as a Context. There are now two primary trees (key components only):

New UI: App -> IndexPage -> BrowserRouter -> Template -> New UI Page component (e.g. SearchPage)
Legacy UI: App -> IndexPage -> BrowserRouter -> Template -> LegacyContent -> [LegacyForm] -> LegacyContentRenderer

The significance here is the root, which used to always be (New and Legacy):

App -> IndexPage -> LegacyContent -> Template -> ...

As you can see, LegacyContent was always sitting there in the background. And then if you were viewing actual legacy UI then a LegacyPage would be instantiated to display the content. On removal it had an effect clean-up function that would reach all the way back to a state setter function for LegacyContent and could trigger full (seemingly unnecessary) re-renders.
With this change, LegacyContent is only instantiated if the route is determined to be for a legacy page. Further, it now is directly concerned with the display of the legacy content it retrieves - where as it used to rely on a render prop which accepted a function (declared up in IndexPage) to do the rendering. Which content it needs to retrieved is simply based on the path which is then passed in as a prop. Increasing alignment with the React practice of passing data down.
Doing so removed the need for LegacyPage which was really just a complicated mash of side effects to try and handle all this tangle of state of the content and clean-up when not in play. Instead the substance of displaying content could simply be moved into the return of LegacyContent.
One other thing I noted is an excessive use of React.memo in this area. I removed at least one, but arguably there's a couple more which could go.
Unfortunately there are no tests in this area - there never have been. But I have undertaken manual testing and things seem to still work - and maybe a bit faster smoother.
(I'll add some notes against interesting bits of the code.)

And there ends my annotations. :wink:

And there ends my annotations. :wink:

Okay, so a few things to fix here. In some cases (like ApiDocsTest) simple things like showing the error in native New UI now rather than simply wrapping legacy error pages.
Will switch to draft.

Okay, so a few things to fix here. In some cases (like ApiDocsTest) simple things like showing the error in native New UI now rather than simply wrapping legacy error pages.
Will switch to draft.

Okay, so I've further refactored LegacyContent to encapsulate the rendering and execution of legacy javascript into LegacyContentRender. Also other minor tweaks around how some errors are now displayed (and checked in tests) due to being in the New UI - rather than just wrapped legacy errors.
Still some issues remain, need an updated list of failures - as all but one test failed locally, but I think there may be others lurking.

Okay, so I've further refactored LegacyContent to encapsulate the rendering and execution of legacy javascript into LegacyContentRender. Also other minor tweaks around how some errors are now displayed (and checked in tests) due to being in the New UI - rather than just wrapped legacy errors.
Still some issues remain, need an updated list of failures - as all but one test failed locally, but I think there may be others lurking.

Alright, getting closer:
[error] Failed: Total 614, Failed 4, Errors 0, Passed 609, Skipped 1
[error] Failed tests:
[error] 	com.tle.webtests.test.viewing.ItemSummaryTest
[error] 	com.tle.webtests.test.webservices.rest.NotificationsApiTest
[error] 	com.tle.webtests.test.admin.CustomLinksTest
[error] (OldTests / Test / test) sbt.TestsFailedException: Tests unsuccessful

Alright, getting closer:
[error] Failed: Total 614, Failed 4, Errors 0, Passed 609, Skipped 1
[error] Failed tests:
[error] 	com.tle.webtests.test.viewing.ItemSummaryTest
[error] 	com.tle.webtests.test.webservices.rest.NotificationsApiTest
[error] 	com.tle.webtests.test.admin.CustomLinksTest
[error] (OldTests / Test / test) sbt.TestsFailedException: Tests unsuccessful

Alright, running through the build again overnight. In theory - unless my recent fixes have unintended effects - this should leave just one test to fix: com.tle.webtests.test.admin.CustomLinksTest#testUploadIcon
Unfortunately with that one I'm seeing some odd behaviour under Selenium vs. Manual.

Alright, running through the build again overnight. In theory - unless my recent fixes have unintended effects - this should leave just one test to fix: com.tle.webtests.test.admin.CustomLinksTest#testUploadIcon
Unfortunately with that one I'm seeing some odd behaviour under Selenium vs. Manual.

Aww man, it broke an additional one (RunReportTest):
[error] Failed: Total 614, Failed 4, Errors 0, Passed 609, Skipped 1
[error] Failed tests:
[error] 	com.tle.webtests.test.reporting.RunReportTest
[error] 	com.tle.webtests.test.admin.CustomLinksTest
[error] (OldTests / Test / test) sbt.TestsFailedException: Tests unsuccessful

Aww man, it broke an additional one (RunReportTest):
[error] Failed: Total 614, Failed 4, Errors 0, Passed 609, Skipped 1
[error] Failed tests:
[error] 	com.tle.webtests.test.reporting.RunReportTest
[error] 	com.tle.webtests.test.admin.CustomLinksTest
[error] (OldTests / Test / test) sbt.TestsFailedException: Tests unsuccessful

Okay, the failing of CustomLinksTest highlighted another fundamental issue and I believe that has now been solved - as well as further refinements/simplification of execution of scripts. So I'm now keen to see what the whole suite things of this.
But the RunReportTest is looking a little bit interesting. It seem (maybe) that the first time you go to a report historically something would trigger that report to be built - but that now is not happening. But if you go there more than once, or manually it does get built - so eventually (possibly just for a given day) - the tests then pass.
So, while awaiting this latest build I'll be trying to figure that out. :thinking:

Okay, the failing of CustomLinksTest highlighted another fundamental issue and I believe that has now been solved - as well as further refinements/simplification of execution of scripts. So I'm now keen to see what the whole suite things of this.
But the RunReportTest is looking a little bit interesting. It seem (maybe) that the first time you go to a report historically something would trigger that report to be built - but that now is not happening. But if you go there more than once, or manually it does get built - so eventually (possibly just for a given day) - the tests then pass.
So, while awaiting this latest build I'll be trying to figure that out. :thinking:

Gah, it's a total rats nest this LegacyContent stuf. Okay, so those changes have broken two different tests:
[error] Failed: Total 615, Failed 9, Errors 0, Passed 606
[error] Failed tests:
[error] 	com.tle.webtests.test.dashboard.PortalsTest
[error] 	com.tle.webtests.test.reporting.RunReportTest
[error] 	com.tle.webtests.test.myresources.favourites.ResourceSelectorFavouritesTest
[error] (OldTests / Test / test) sbt.TestsFailedException: Tests unsuccessful

And the RunReportTest is still problematic - and the solution is definitely not immediately obvious.
Work continues.

Gah, it's a total rats nest this LegacyContent stuf. Okay, so those changes have broken two different tests:
[error] Failed: Total 615, Failed 9, Errors 0, Passed 606
[error] Failed tests:
[error] 	com.tle.webtests.test.dashboard.PortalsTest
[error] 	com.tle.webtests.test.reporting.RunReportTest
[error] 	com.tle.webtests.test.myresources.favourites.ResourceSelectorFavouritesTest
[error] (OldTests / Test / test) sbt.TestsFailedException: Tests unsuccessful

And the RunReportTest is still problematic - and the solution is definitely not immediately obvious.
Work continues.

Thankfully the two new failing test suites seemed to have just been issues with the tests. So now just to try and figure out the RunReportTest.

Thankfully the two new failing test suites seemed to have just been issues with the tests. So now just to try and figure out the RunReportTest.

Okay, starting to look promising:
[error] Failed: Total 615, Failed 4, Errors 0, Passed 610, Skipped 1
[error] Failed tests:
[error] 	com.tle.webtests.test.contribute.EquellaConnectorTest
[error] 	com.tle.webtests.test.reporting.RunReportTest
[error] (OldTests / Test / test) sbt.TestsFailedException: Tests unsuccessful

(EquellaConnectorTest is a known flakey.)

Okay, starting to look promising:
[error] Failed: Total 615, Failed 4, Errors 0, Passed 610, Skipped 1
[error] Failed tests:
[error] 	com.tle.webtests.test.contribute.EquellaConnectorTest
[error] 	com.tle.webtests.test.reporting.RunReportTest
[error] (OldTests / Test / test) sbt.TestsFailedException: Tests unsuccessful

(EquellaConnectorTest is a known flakey.)

Okay, so issues with com.tle.webtests.test.reporting.RunReportTest highlighted there was still a significant architecture flaw. So I've now hit that and all this is now passing locally - as are some previously problematic ones.
So I'm expecting a green build... Let's see what reality things though.
:crossed_fingers:
(If that happens, then it looks like I have some package.json conflicts etc to resolve.)

Okay, so issues with com.tle.webtests.test.reporting.RunReportTest highlighted there was still a significant architecture flaw. So I've now hit that and all this is now passing locally - as are some previously problematic ones.
So I'm expecting a green build... Let's see what reality things though.
:crossed_fingers:
(If that happens, then it looks like I have some package.json conflicts etc to resolve.)

Hmm, for some reason the GHA build is not being triggered... Maybe due to the conflict. :disappointed:

Hmm, for some reason the GHA build is not being triggered... Maybe due to the conflict. :disappointed:

Oooh, CodeBuild tells me all is well - just one known flakey:
com.tle.webtests.test.contribute.EquellaConnectorTest

But I really want to see a GHA result.

Oooh, CodeBuild tells me all is well - just one known flakey:
com.tle.webtests.test.contribute.EquellaConnectorTest

But I really want to see a GHA result.

Gah! So GHA also says:
[error] Failed: Total 615, Failed 1, Errors 0, Passed 613, Skipped 1
[error] Failed tests:
[error] 	com.tle.webtests.test.contribute.EquellaConnectorTest
[error] (OldTests / Test / test) sbt.TestsFailedException: Tests unsuccessful

Gah! So GHA also says:
[error] Failed: Total 615, Failed 1, Errors 0, Passed 613, Skipped 1
[error] Failed tests:
[error] 	com.tle.webtests.test.contribute.EquellaConnectorTest
[error] (OldTests / Test / test) sbt.TestsFailedException: Tests unsuccessful

Ah okay, and now I see why the EquellaConnectorTest used to be flaky. I think the changes have speed things up enough though to make it always fail, so the test needed a fix similar to what I had done elsewhere in this PR.
So fingers crossed (:crossed_fingers:) that this then is the last.

Ah okay, and now I see why the EquellaConnectorTest used to be flaky. I think the changes have speed things up enough though to make it always fail, so the test needed a fix similar to what I had done elsewhere in this PR.
So fingers crossed (:crossed_fingers:) that this then is the last.

Alrighty, finally ready for review. Sorry it's ended up rather large, but needs must in this case.

Alrighty, finally ready for review. Sorry it's ended up rather large, but needs must in this case.

@PenghaiZhang wrote:

I guess you must have better understanding of things like stdSubmit and effect for window["EQ"]. Would you like to add some comments to briefly explain what they do ?

Sure thing! I definitely have been focused on these a bit.
The point of the whole window["EQ"] is to register a whole lot of callback (kinda) functions which are then used by the various legacy side JS files and server side generated JS for event handlers in the rendered HTML. So you will often see (in the callstacks) that the functions within window["EQ"] have been triggered by event handlers and/or anonymous functions in the stack with some reference to one of the legacy JS files.
One of the key things that needs to be done is to submit the hidden form within the legacy pages (which contain the current state) when triggering an oEQ AJAX 'event'. So this is exposed by the window["EQ"].event and window["EQ"].eventnv - 'nv' meaning no validate. Ultimately the return a callback that will then do an AJAX call which has the event__ param and a command signifying the event to trigger (server side) and will also have all the state info pulled from the hidden form.
Hope that helps, if not, let me know and I'll further clarify.

@PenghaiZhang wrote:

I guess you must have better understanding of things like stdSubmit and effect for window["EQ"]. Would you like to add some comments to briefly explain what they do ?

Sure thing! I definitely have been focused on these a bit.
The point of the whole window["EQ"] is to register a whole lot of callback (kinda) functions which are then used by the various legacy side JS files and server side generated JS for event handlers in the rendered HTML. So you will often see (in the callstacks) that the functions within window["EQ"] have been triggered by event handlers and/or anonymous functions in the stack with some reference to one of the legacy JS files.
One of the key things that needs to be done is to submit the hidden form within the legacy pages (which contain the current state) when triggering an oEQ AJAX 'event'. So this is exposed by the window["EQ"].event and window["EQ"].eventnv - 'nv' meaning no validate. Ultimately the return a callback that will then do an AJAX call which has the event__ param and a command signifying the event to trigger (server side) and will also have all the state info pulled from the hidden form.
Hope that helps, if not, let me know and I'll further clarify.

Phew, finally all done and another green build to boot.
Thank you all for taking the time to review, I know it was a bit of a beasty (sorry about that). I'll merge it in now so that we can start doing some hands on (manual) testing.
Thanks. :bow:

Phew, finally all done and another green build to boot.
Thank you all for taking the time to review, I know it was a bit of a beasty (sorry about that). I'll merge it in now so that we can start doing some hands on (manual) testing.
Thanks. :bow:


I may be stupid but where can I find the best_cd_t_network.pth

After reading your paper about VRCNet, I found this net is based on a prior pth. But I cannot find best_cd_t_network.pth in this repo. I found pretrained_vrcnet_2048.pth in VRCNet repo, but it seemed not working... help me...

Hi, I am sure you are not stupid, and I am sorry to make this repo misleading.
This net is not based on a prior pth.
If you are training the model (from scratch), you can set the pth to be null.
After training, you can set the pth to your pretrained model and then test the model.
You can find my pretrained model in another repo "VRCNet".
Good luck~

Thank you for your reply! Finally, I am successfully running your demo. I installed your env for about a week. I am crying... I hope I can know your network well and get a good result in your online challenge!

You finally resolve all issues. Congrats!
Wish you good luck~

The last question is how to convert to a CAD file?


Update location of Mbed OS cmake config file

Mbed OS tools now generates Mbed OS cmake config file in build folder instead of root folder (https://github.com/ARMmbed/mbed-tools/pull/189). Update CMakeLists.txt to use build folder to locate Mbed OS cmake
config file.

CI failure is expected, this will be tested in tools/Mbed OS as it affects all examples. I'll merge now to unblock tools release.


Also point to metrics-scala module.

Coverage remained the same at 82.28% when pulling d33609a1026c7e1dda23fbdbd82a5d331f26e237 on erikvanoosten:patch-1 into a0c5e2ab97a91200e09c91397fab0a0c359b8483 on dropwizard:master.

Thanks!

@erikvanoosten Wouldn't this be better fitting in the https://github.com/dropwizard/metrics project?

Yes, that is the better place. In fact the project is listed there.
But why allow only one place?
This PR was created after some confusion from a user. The other referred project, 'dropwizard-scala' apparently also has metrics integration. By including this reference we can at least indicate a choice.
BTW, I tried to get more information from the dropwizard-scala maintainers about their plans and goals so that it would be easier to recommend which project combination to use. Unfortunately I did not get a response yet.


Update 00settingsMenuServices.sh

Fixes a conflict between LightningTipBot and LNDg install on the SERVICES menu. Both LNDg and LightningTipBot were using "g" as the character to identify selection, resulting in the installation of both services when one is selected. Changes the identifier for LNDg to a ü.

Fixes Issue #3537

Thanks for catching this. As we are running out of characters I think it would be better to use double ASCII characters for the menu identification rather than starting to introduce non-ASCII letters. It can make thing complicated that ü is not on the most widely used English keyboards.
Would need to double all letters like adding a to the end of all of them to start with, then b as necessary like here it could be ga for LightningTipBot and gb for LNDg.

Thanks for catching this. As we are running out of characters I think it would be better to use double ASCII characters for the menu identification rather than starting to introduce non-ASCII letters. It can make thing complicated that ü is not on the most widely used English keyboards.
Would need to double all letters like adding a to the end of all of them to start with, then b as necessary like here it could be ga for LightningTipBot and gb for LNDg.

Incoming!

Changed as suggested. Tests good on the nuc.


Pigtificate Generation in 1.12.2

Hello,
This is one of my favorite mods but I am having problems locating pigtificate villages. I have better nether and primal core as other mods which generate things on the floor of the nether. I was wondering if these mods are causing the issue or there is something I can do related to the config.
I have spent multiple hours looking for the pigtificate villages yet I have not located one of them. Please let me know if this issue has been fixed or if there is an easy fix to this issue.

The pigtificate villages need a large open area of netherrack to generate on. So, the other mods are interfering with the generation because they are generating things on top of the Netherrack. There's not much you can do besides removing the other mods or reducing their generation if the have config options for it.


Soft Delete not working when Using Accessor to Hash the Column ID

Laravel Version: 5.4
PHP Version: 5.6.23
Database Driver & Version:

Description:
The soft delete is taking the hashid value instead the real column id, causing this error:
QueryException in Connection.php line 647:

SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "37KgBnyp"

(SQL: update "test" set "deleted_at" = 2017-03-21 14:59:45 where "id" = 37KgBnyp)

Steps To Reproduce:
I have a requirement to hash the id.  I should not expose the real integer id. For example the hashed value for the id=2 will be 37KgBnyp.
I am using a model accessor to format the integer id to a string hashid (using php hashids library):

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use App\Lib\HashId;

class Test extends Model
{
    use SoftDeletes;

    protected $table = "test";
    protected $dates = ['deleted_at'];

    public function getIdAttribute($value)
    {
        return HashId::encode($value);
    }
}

To update a record I am passing the encoded id using a route then decoded it in the controller and then update any value (It is working great):
public function update(Request $request, $id)
    {
        $decoded_id = HashId::decode($id);

        $test= Test::find($decoded_id);
        $test->name = $request->input('name');
        $test->description = $request->input('description');
        $test->save();

        return $test;

    }

The problem is when I try to soft delete the record:
    public function delete($id)
    {
        $decoded_id = HashId::decode($id);

        $test = Test::find($decoded_id);
        $test->delete();
    }

Also, I tried to use destroy:
    public function delete($id)
    {
        $decoded_id = HashId::decode($id);
        Test::destroy($decoded_id);
    }

Either by using delete() or destroy(id), I get the following ERROR:
QueryException in Connection.php line 647:

SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "37KgBnyp"

(SQL: update "test" set "deleted_at" = 2017-03-21 14:59:45 where "id" = 37KgBnyp)

NOTE:
I am sure that the decode() is working properly, because I am using the same method to update the record and to do hard delete:
Test::destroy(HashId::decode($id));

Looks like the soft delete is doing 2 queries:
-- query #1 to grab the row by passing the decoded id
SELECT name FROM test WHERE id=2

-- query #2 to update the row updated_at = date time.
UPDATE test SET deleted_at='2017-03-21 14:59:45' WHERE id=37KgBnyp

In some way the Laravel SoftDelete is grabbing the ID returned by the accessor instead to use the ID passed through the find() or destroy()  method.
When I am updating a record it is taking the ID passed by find(). If normal hard delete is used instead soft delete, everything works great.
Is this a bug in soft delete? Or why it is not using the id that I am passing using find(id) or destroy(id).

How will it know how to get your id from a hashed ID?

I am decoding the the hashid to get the real id
$decoded_id = HashId::decode($id);
Test::destroy($decoded_id);

As I said, everything works if I am not using the soft delete. I can update, delete (hard delete) but the only problem is with the soft delete.

This isn't a bug. Laravel won't be aware of how to go back from your hashed Id to your normal ID stored in the database.
Just curious: Why you didn't use the hashed IDs as your primary key directly?
If you want to solve this problem try asking in laravel forums or Larachat slack channel

@osroflo I don't recommend mutating the id like this, you're hiding your actual ID forever from Eloquent, instead try using the hashed id as the primary key or use another property name hashed_id to access the hashed version.


ISSUE: USPS double count from notification emails

Describe the bug
USPS sent two notification regarding the same tracking number. I cannot confirm the consistency of these notifications. Previous behavior the 8:16 email would come before the expected date shown in the email.
7:47 AM - USPS® Expected Delivery on Wednesday, April 15, 2020 arriving by 6:00pm
Body: Your item is out for delivery on April 15, 2020 at 7:10 am
8:16 AM - USPS® Expected Delivery on Wednesday, April 15, 2020 arriving by 6:00pm
Body: USPS expects to deliver your package on Wednesday, April 15, 2020 arriving by 6:00pm.

Seeing the same thing with duplicate packages.
I’ve come up with a work around.
When I receive a duplicate email, it’s because I receive both an expected delivery email and an out for delivery email. I adjusted my mail filters to only place the out for delivery emails in my folder that’s being monitored.
The rules are:
Subject: USPS® Expected Delivery
Must contain: Out for Delivery
Perhaps a fix could be, if we’re not de-duplicating by tracking number, we could at least filter on the out for delivery message.

I'll be testing some code this afternoon that may resolve this.

@ronaldheft 0.2.0-b5 should resolve this as it will now check for 'out for delivery' in the emails.

I'm still getting dupes for USPS packages.  Unfortunately the subject line is the same, it's just that the text in the email is slightly different.  Also, the first email comes before ~6am and the second is later.
Early email:

Later email:

Sorry, but I need to reopen ...
I point the integration to my Gmail/All Mail mailbox, and for some reason, USPS decided to send me 3 emails this morning all for the same package (package number redacted):

The integration reports:

And today's Informed delivery shows:

So duplication is still there. I hope this helps.

Do the emails contain "out for delivery" ?
Emails that shouldn't get counted contain text similar to the following:
Hello ,

USPS expects to deliver your package by Monday, June 8, 2020 arriving by 8:00pm.

Tracking Number:

For me they seem to be counted still.  For example I had 3 packages delivered yesterday, but my count was 6 (then dropped to 3 when packages were delivered).

No, the email sdo not say "out for delivery". This is the full text of the email:

So I got 3 of these today.

Very strange, I have 2 emails from USPS saying 1 for today and one for the 12th, but neither are showing up as in transit.
Either of you running the latest beta?

I'm on the 2.0 release, I didn't see anything in either beta that affected USPS.  Can update and see next time I get a USPS package if that helps.

Sure np
Ben Woo
(212) 724-1188
<EMAIL_ADDRESS>http://gmail.com/*
On Mon, Jun 8, 2020 at 10:27 AM Fuzzy<EMAIL_ADDRESS>wrote:

I'm on the 2.0 release, I didn't see anything in either beta that affected
USPS. Can update and see next time I get a USPS package if that helps.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/moralmunky/Home-Assistant-Mail-And-Packages/issues/92#issuecomment-640766424,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AK6CPPJR3T5MTXUU7ZVL6IDRVUNPLANCNFSM4MIXQFPA
.

Only wonder since there could have been an unintended regression.

I set the testing date in the sensor.py back to the date when I first noticed it I get the following logs.
Attempting to find mail from<EMAIL_ADDRESS>with subject 1 Item Delivered
Found from<EMAIL_ADDRESS>with subject 1 Item Delivered, b'94'

Attempting to find mail from<EMAIL_ADDRESS>with subject 1 Expected Delivery on
Searching for out for delivery in emails
Found out for delivery in email
Found out for delivery in email
Found from<EMAIL_ADDRESS>with subject 1 Expected Delivery on, b'88 89'

I search the raw source of the incorrectly matched message to see if 'out for delivery' appeared somewhere else causing the false positive. It didn't find a thing.
It's defiantly in the find_text function that it's accepting all emails found as having 'out for delivery' in it.

If you guys want to give an alpha a try (i haven't tested it locally yet) here's 2 files to try:
https://raw.githubusercontent.com/firstof9/Home-Assistant-Mail-And-Packages/0.2.x/custom_components/mail_and_packages/sensor.py
https://raw.githubusercontent.com/firstof9/Home-Assistant-Mail-And-Packages/0.2.x/custom_components/mail_and_packages/const.py
I'll be testing them later this afternoon.

I wasn't just typing this when I got this last message.
Looking at the .find() method. It returns the position of the first match or returns a -1. So the turn of -1 needs to be excluded or it
Searching for out for delivery in emails
Found -1 in email
Found for delivery in email
Found 3451 in email
Found for delivery in email
```l

OK, I just downloaded the alpha, and restarted HA. It read my All Mail mailbox, and it concluded that I have no packages :-(
It should have listed that I have ONE package.

It's not matching anything. In either method to find the text the email need to be decoded. Outputting email_msg is still encoded so the phrase is being split.
<p style=3D"text-align: left;font-family: sans-serif;">Your item is out for=
 delivery on April 15, 2020 at 7:10 am

Alright, made a few tweaks should work better:
sensor.py
const.py

It's returning None.
Searching for out for delivery in emails
Find results: None
Find results: None
Found from<EMAIL_ADDRESS>with subject 1 Expected Delivery on, b'88 89'

I have find returning correct results using quopri.decodestring.
def find_textold(sdata, account, search):
    _LOGGER.debug("Searching for %s in emails", search)
    mail_list = sdata.split()
    count = 0

    for i in mail_list:
        typ, data = account.fetch(i, '(RFC822)')
        for response_part in data:
            if isinstance(response_part, tuple):
                msg = email.message_from_bytes(response_part[1])
                email_msg = quopri.decodestring(str(msg.get_payload(0)))
                email_msg = email_msg.decode('utf-8')
                #_LOGGER.debug("Found %s", email_msg)
                text_found = email_msg.find(search)
                _LOGGER.debug("Find results: %s", text_found)
                if text_found > 0:
                    _LOGGER.debug("Found %s in email", search)
                    count += 1

    return count

There is a secondary issue.
Looking back at the logs I've shared, this line below continues to appear meaning it is evaluating the find text then moving on to the else on line 586 which is replacing the sensor values back to 2.
Found from<EMAIL_ADDRESS>with subject 1 Expected Delivery on, b'88 89'

I had some debug messages confusing me.
Try this sensor.py from the dev branch.

Got a notification that the setup of mail_and_packages sensor failed

Try using the all the files from the DEV branch instead.
https://github.com/moralmunky/Home-Assistant-Mail-And-Packages/tree/dev

Just tried the dev branch, and it looks like it is correct.

So to confirm, USPS packages sensor now only shows 1 where it previously showed 3?

@moralmunky, YES

I've fixed the regex and used the quopri decode you're using as well @moralmunky
sensor.py

I got nothing today though I have two packages out for delivery.

Good morning all. Just waking up, but the first thing I noticed is that it's showing no USPS mail (which makes sense since I have not received my Informed Delivery notice yet). But Amazon shows 1 package, but I think that is referring to a packaged delivered last night.

Based on my manual tracking, I should not be receiving anything today from Amazon. (In fact, if my tracking is accurate, it is a package free day!)

@thisisbenwoo The Amazon part looks for email in the past 3 days, did the email say it was to be delivered today, but you got it early by chance?

Ah, you nailed it! :-) Email said it would arrive 6/9, but it arrived 6/8. Email was dated 6/7.
Chris, do you think it would help (and if I can help, I'd love to), to document the logic in the README.md or a supplemental doc? I think that would help people (like me) better understand what to look for if there is an anomaly, and not put it in an issue. Just a thought.

We're working on the wiki, feel free to lend a hand.

Absolutely, what can I do? I'm pretty new to github, so I'm going to need a little direction. Feel free to PM me directly, or to email me direclty.

If you're on the Home Assistant forum feel free to PM me, github doesn't have PMs anymore.

Latest beta seems to resolve issues.  3 packages out for delivery, 3 packages showing up in HASS.

Updated to the latest version last night. Automation fired this morning at 3am when I got the "package expected today" message as the sensor went to 1. Just now the package went out for delivery and now the sensor is at 3. Only one package is expected today.

@FuzzyMistborn just to confirm it was 1 email that said "out for delivery" or was it there the one that says "delivered today"?
I made a small change for UPS emails with multiple tracking numbers, but it should still work the same.
Also to confirm 'latest beta version'?

I had 1 email at 3:47 am (with sensor updating at 3:51) with "Expected Delivery on" and then the second email at 8:13 with "Out for Delivery".  No email with "delivered today"
And yes, latest beta.  0.2.2-b4

b5 should resolve this for you @FuzzyMistborn I tested it on myself since I had the same issue occur today.

Fixed for me.  3 packages back to the actual 1 package.  Thanks!

HA! This one popped up again. The integration is working right. USPS emailed notifications for the same tracking number. Everything is the same except for the delivery time range. This causes the 2 deliveries to show as 3 total packages from USPS and 1 left in transit for the day after the 2 deliveries occurred.
Unless the direction of this integration gets heavier into the tracking numbers, a disclaimer in the wiki for USPS might be sufficient.
7:35 AM Email

Part
Contents

Subject
USPS® Expected Delivery on Wednesday, August 5, 2020 Between 12:15pm and 4:15pm

Body
Hello ,Your item is out for delivery on August 5, 2020 at 7:28 am in CITY, STATE ZIP. USPS expects to deliver your package today between 12:15pm and 4:15pm.

11:45 AM Email

Part
Contents

Subject
USPS® Expected Delivery on Wednesday, August 5, 2020 Between 1:30pm and 5:30pm

Body
Hello ,Your item is out for delivery on August 5, 2020 at 7:28 am in CITY, STATE ZIP. USPS expects to deliver your package today between 1:30pm and 5:30pm.

HA! This one popped up again. The integration is working right. USPS emailed notifications for the same tracking number. Everything is the same except for the delivery time range. This causes the 2 deliveries to show as 3 total packages from USPS and 1 left in transit for the day after the 2 deliveries occurred.
Unless the direction of this integration gets heavier into the tracking numbers, a disclaimer in the wiki for USPS might be sufficient.
7:35 AM Email

Part
Contents

Subject
USPS® Expected Delivery on Wednesday, August 5, 2020 Between 12:15pm and 4:15pm

Body
Hello ,Your item is out for delivery on August 5, 2020 at 7:28 am in CITY, STATE ZIP. USPS expects to deliver your package today between 12:15pm and 4:15pm.

11:45 AM Email

Part
Contents

Subject
USPS® Expected Delivery on Wednesday, August 5, 2020 Between 1:30pm and 5:30pm

Body
Hello ,Your item is out for delivery on August 5, 2020 at 7:28 am in CITY, STATE ZIP. USPS expects to deliver your package today between 1:30pm and 5:30pm.

Might be able to just do a count of the tracking numbers really. I'll poke around.

Sorry I didn't get back sooner. Installed the b16 since I saw it was merged.
The error is showing from the new code.
sensor.py, line 654, in get_count
    if len(tracking) < len(count):
TypeError: object of type 'int' has no len()

Taking len() off count, I get
b16
sensor.mail_usps_delivering: 2
sensor.mail_usps_packages: 2
sensor.mail_usps_delivered: 0
b15
sensor.mail_usps_delivering: 1
sensor.mail_usps_packages: 3
sensor.mail_usps_delivered: 2
The duplication reduction is working but the delivery emails are not being counted

Yup my logic was wrong, should be:
    if tracking:
        # Try to guard against duplicate emails via tracking number
        if len(tracking) < len(count):
            count = len(tracking)
        result[ATTR_TRACKING] = tracking

Doing a fix now.

Replacing that here is the debug
2020-08-08 17:49:19 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for mail_and_packages which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-08-08 17:49:20 INFO (MainThread) [custom_components.mail_and_packages] Version 0.2.2-b16 is starting, if you have any issues please report them here: http://github.com/moralmunky/Home-Assistant-Mail-And-Packages
2020-08-08 17:49:21 WARNING (SyncWorker_9) [homeassistant.components.local_file.camera] Could not read camera mail_usps image from file: /home/homeassistant/.homeassistant/www/mail_and_packages/mail_today.mp4
2020-08-08 17:49:22 ERROR (SyncWorker_0) [homeassistant.components.dyson] Not connected to Dyson account. Unable to add devices
2020-08-08 17:49:22 ERROR (MainThread) [homeassistant.setup] Setup failed for dyson: Integration failed to initialize.
2020-08-08 17:49:24 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] Config scan interval: 0:05:00
2020-08-08 17:49:25 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] Searching for Amazon delivered email(s)...
2020-08-08 17:49:25 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] Amazon delivered email(s) found: 0
2020-08-08 17:49:25 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] Searching for Amazon image in emails...
2020-08-08 17:49:25 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] HTML Amazon emails found: 0
2020-08-08 17:49:25 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] Amazon delivered email(s) found: 0
2020-08-08 17:49:25 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] Searching for Amazon image in emails...
2020-08-08 17:49:25 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] HTML Amazon emails found: 0
2020-08-08 17:49:25 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] Amazon delivered email(s) found: 0
2020-08-08 17:49:25 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] Searching for Amazon image in emails...
2020-08-08 17:49:25 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] HTML Amazon emails found: 0
2020-08-08 17:49:25 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] Amazon delivered email(s) found: 0
2020-08-08 17:49:25 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] Searching for Amazon image in emails...
2020-08-08 17:49:25 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] HTML Amazon emails found: 0
2020-08-08 17:49:25 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] Attempting to find Amazon email with item list ...
2020-08-08 17:49:25 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] Amazon emails found: 0
2020-08-08 17:49:25 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] Amazon emails found: 0
2020-08-08 17:49:25 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] Amazon emails found: 0
2020-08-08 17:49:25 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] Amazon emails found: 0
2020-08-08 17:49:25 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] Amazon Count: 0
2020-08-08 17:49:25 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] Attempting to find Amazon email with item list ...
2020-08-08 17:49:25 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] Amazon emails found: 0
2020-08-08 17:49:25 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] Amazon emails found: 0
2020-08-08 17:49:25 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] Amazon emails found: 0
2020-08-08 17:49:26 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] Amazon emails found: 0
2020-08-08 17:49:26 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] Amazon order: []
2020-08-08 17:49:26 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] Attempting to find mail from<EMAIL_ADDRESS>with subject 1 (DHL On Demand Delivery)
2020-08-08 17:49:26 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] Searching for (scheduled for delivery TODAY) in (0) emails
2020-08-08 17:49:26 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] Search for (scheduled for delivery TODAY) count results: 0
2020-08-08 17:49:26 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] Search for<EMAIL_ADDRESS>with subject 1 (DHL On Demand Delivery) results: b'' count: 0
2020-08-08 17:49:26 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] Attempting to find mail from<EMAIL_ADDRESS>with subject 1 (DHL On Demand Delivery)
2020-08-08 17:49:26 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] Searching for (has been delivered) in (0) emails
2020-08-08 17:49:26 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] Search for (has been delivered) count results: 0
2020-08-08 17:49:26 DEBUG (MainThread) [custom_components.mail_and_packages.sensor] Search for<EMAIL_ADDRESS>with subject 1 (DHL On Demand Delivery) results: b'' count: 0
2020-08-08 17:49:26 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up mail_and_packages platform for sensor
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/home/homeassistant/.homeassistant/custom_components/mail_and_packages/sensor.py", line 71, in async_setup_entry
    sensors.append(PackagesSensor(data, variable))
  File "/home/homeassistant/.homeassistant/custom_components/mail_and_packages/sensor.py", line 198, in __init__
    self.update()
  File "/home/homeassistant/.homeassistant/custom_components/mail_and_packages/sensor.py", line 254, in update
    self.data.update()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/util/__init__.py", line 239, in wrapper
    result = method(*args, **kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/mail_and_packages/sensor.py", line 156, in update
    count[tracking] = info[ATTR_TRACKING]
KeyError: 'tracking'

    if tracking:
        # Try to guard against duplicate emails via tracking number
        if len(tracking) < len(count):
            count = len(tracking)

    result[ATTR_TRACKING] = tracking

Indents hate me lol

Yup, there it is!

HAHA, in b17 doesn't like the len() around count. Removing it removes the error. Count isn't supposed to be an array is it?
https://github.com/moralmunky/Home-Assistant-Mail-And-Packages/blob/3e7bee18d66f0bfb6e202600cc01b2466584fbf8/custom_components/mail_and_packages/sensor.py#L654
2020-08-08 18:11:43 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up mail_and_packages platform for sensor
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/home/homeassistant/.homeassistant/custom_components/mail_and_packages/sensor.py", line 71, in async_setup_entry
    sensors.append(PackagesSensor(data, variable))
  File "/home/homeassistant/.homeassistant/custom_components/mail_and_packages/sensor.py", line 198, in __init__
    self.update()
  File "/home/homeassistant/.homeassistant/custom_components/mail_and_packages/sensor.py", line 254, in update
    self.data.update()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/util/__init__.py", line 239, in wrapper
    result = method(*args, **kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/mail_and_packages/sensor.py", line 152, in update
    info = get_count(account, sensor, True)
  File "/home/homeassistant/.homeassistant/custom_components/mail_and_packages/sensor.py", line 657, in get_count
    if len(tracking) < len(count):
TypeError: object of type 'int' has no len()

Shoot! ya it's just an int

Now it should be good

Also seeing about getting proper tests setup for this too.

All Clear!


[AutoPR] automation/resource-manager

Created to accumulate context: automation/resource-manager

Codecov Report

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

@@            Coverage Diff            @@
##             master    #3125   +/-   ##
=========================================
  Coverage          ?   54.29%
=========================================
  Files             ?     9520
  Lines             ?   202439
  Branches          ?        0
=========================================
  Hits              ?   109921
  Misses            ?    92518
  Partials          ?        0

Impacted Files
Coverage Δ

...azure/mgmt/automation/operations/job_operations.py
13.37% <ø> (ø)

...t/automation/operations/job_schedule_operations.py
15.73% <ø> (ø)

...gmt/automation/operations/job_stream_operations.py
17.24% <ø> (ø)

...ation/azure/mgmt/automation/operations/__init__.py
100% <100%> (ø)

.../mgmt/automation/models/automation_client_enums.py
100% <100%> (ø)

...utomation/azure/mgmt/automation/models/__init__.py
100% <100%> (ø)

...-mgmt-automation/azure/mgmt/automation/__init__.py
100% <100%> (ø)

...omation/operations/dsc_configuration_operations.py
13.57% <13.57%> (ø)

...mation/operations/automation_account_operations.py
13.63% <13.63%> (ø)

.../mgmt/automation/operations/dsc_node_operations.py
13.86% <13.86%> (ø)

... and 286 more

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 bd8c204...d401411. Read the comment docs.

(message created by the CI based on PR content)

@AutorestCI rebuild https://github.com/Azure/azure-rest-api-specs/blob/master/specification/automation/resource-manager/readme.md

Working on generating https://github.com/azure/azure-rest-api-specs/blob/master/specification/automation/resource-manager/readme.md for you!!!

Nothing to rebuild, this PR is up to date


Fix Playing null issue

Passing either null or undefined clears a playing game tho.
I guess you need to do some explaining as to what this change would do.

Cannot reproduce. Simple client test script, passing no status to set:

produces:

<Client>.user.setGame(null) clears any set status.
Also, I'm pretty against merging from this account on principle of not giving you two contributor slots. Kind of redundant.


Hot-swapper does not check types of new states vs. old states

On http://elm-lang.org/blog/Interactive-Programming.elm, it is said: "The hot-swapper can also check to see if the types of the old state matches the types of the new state, ruling out a whole class of hot-swapping-induced runtime errors."
However, that checking is not currently done by the hot-swapper.

Maybe it makes sense to add this to https://github.com/elm-lang/elm-reactor/milestones/Swapping?

Yeah, can we move this issue over to that repo?

Sure, will do.

Reopening this issue here, since it was closed over at https://github.com/elm-lang/elm-reactor/issues/107, because the reactor does not at the moment actually do any hot-swapping (it just swaps and replays).
On the other hand, http://elm-lang.org/try does use hot-swapping, and is affected by the difference of actual implementation from what the "Interactive Programming" post says.
The current code showing that only the structure, not the types, are compared on hot-swap is here: https://github.com/elm-lang/core/blob/2.1.0/src/Native/Runtime.js#L449-L460.


Devices supporting both WiFi and BLE

@PlusPlus-ua Thank you for your time and effort setting up ha_tuya_ble. I noticed you have no commits pushed to GitHub since July and stated you're working in Ukraine. I sincerely hope you and your family are safe.
I noticed that if a device has both WiFi and BLE integrated and it is connected to the Tuya Cloud, the WiFi mac address is used in the cloud.
ha_tuya_ble uses the BLE mac address to identify the device, but since this differs from the mac stored in the cloud it won't be able to identify it correctly.
I got two devices, here's the mac addresses:
10:5A:17:CF:99:DA (WiFi mac, stored in the cloud)
10:5A:17:CF:99:DB (BLE mac, used by ha_tuya_ble)
and
1C:90:FF:8B:D5:C0 (WiFi mac, stored in the cloud)
1C:90:FF:8B:D5:C1 (BLE mac, used by ha_tuya_ble)
So the BLE mac is offset by one from the WiFi mac. That could be a good starting point for supporting these devices.
If anyone needs any additional information, feel free to ask.

I created a "quick fix" to test this by adding
if credentials is None:
  credentials = item.credentials.get(address[:-2] + "{:2X}".format(int(address[-2:], 16) - 1))

to cloud.py after line 268.
The BLE devices have now been added to HA.


Probably missing info on spog readme.md ?

hi
Everything builds and installs etc :+1:
But when I try to access the page I got this chicken :chicken:

https://github.com/trustification/trustification/tree/main/spog/ui#setting-up
thanks

Yes, that's missing a pointer to the main "developing" file, setting up the rest of the system


Emergency fix needed reading MERGE.LOG from SNANA-sim job

MERGE.LOG from sim job has extra column for NSPEC, which breaks pippin. In Pippin's snana_sim.py,  need to change
state, iver, version, ngen, nwrite, cpu = row
to
state, iver, version, ngen, nwrite, nspec, cpu = row
so that cpu is defined.

Do you have an example of the new MERGE.LOG somewhere?

Do you have an example of the new MERGE.LOG somewhere?

This has been resolved via a645d4d

This has been resolved via a645d4d


Message field id

Hello devs,
Is id of field should be unique inside of a message? It's a restriction of SBE standard or restriction of the tool?
Thanks

The spec requires the field ids must be unique within a message. More than that, it normally requires these to be equivalent to FIX tags in that they must be the same between messages. The implementation does not check for that, though.

Thank you


Alberto, help please ? ecctools qeschion. asap. help wanted

I was change a N from order.SetBase16("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141") to 2^70
I divide 0xf56926f9ca9abc1065153d25383e80 / -1
Result: 20212ef8c52b3a842d0bc
but then I divide pubkey from
0xf56926f9ca9abc1065153d25383e80 - privkey;
pubkey  ./calculatefromkey f56926f9ca9abc1065153d25383e80
privatekey:<PHONE_NUMBER>000000000000000000000000f56926f9ca9abc1065153d25383e80
publickey compressed: 02470a635de37b909187e612e5aa853decbb9769416a2ecd055f990c1de501f66c
i gent NOT PUBKEY FROM  20212ef8c52b3a842d0bc
029304ae3d06058417730a717b15727f651188448742442c311a5af9a5b02aa73d
./calculatefromkey 20212ef8c52b3a842d0bc                               privatekey:<PHONE_NUMBER>00000000000000000000000000000000020212ef8c52b3a842d0bc
publickey compressed: 03193f6e2afc8e2a243239a25ec7c92807c07833bb66bcc63586ad1e1eadb79406
public address compressed 13HzVpWa3YDVW9sEUEoc9wvJeMCZoCeDYb
publickey uncompressed: 04193f6e2afc8e2a243239a25ec7c92807c07833bb66bcc63586ad1e1eadb794062bcf9a0987701 bd2d1068a024f17c0edfe5f3cf7f7c3df74c2b2989d693c4bd3
public address uncompressed 1Hja51B5T5a2zHCTswdANGPDxYcju1hRQF
./keymath 02470a635de37b909187e612e5aa853decbb9769416a2ecd055f990c1de501f66c / -1
Result: 029304ae3d06058417730a717b15727f651188448742442c311a5af9a5b02aa73d
bupkey are differents, but must be pub1  = pub2 !!!
how to resolve this ?
ASAP.
Thank You

03193f6e2afc8e2a243239a25ec7c92807c07833bb66bcc63586ad1e1eadb79406 not =  029304ae3d06058417730a717b15727f651188448742442c311a5af9a5b02aa73d
hot solve this bug ?

There is no division by a negative number in ECC,  that is the bug, I will add an restriction to avoid that.

There is no division by a negative number in ECC, that is the bug, I will add an restriction to avoid that.

Bro, how to make inverdion without -1 ? I try multiply, but not work:
./keymath 02470a635de37b909187e612e5aa853decbb9769416a2ecd055f990c1de501f66c x -1
Result: 02470a635de37b909187e612e5aa853decbb9769416a2ecd055f990c1de501f66c
?
Regsrds

./modmath 0xf56926f9ca9abc1065153d25383e80 /<PHONE_NUMBER>717411303423    Result: be49e416089b9ef31de38
./calculatefromkey f56926f9ca9abc1065153d25383e80                      privatekey:<PHONE_NUMBER>000000000000000000000000f56926f9ca9abc1065153d25383e80
publickey compressed: 02470a635de37b909187e612e5aa853decbb9769416a2ecd055f990c1de501f66c
./keymath  02470a635de37b909187e612e5aa853decbb9769416a2ecd055f990c1de501f66c /<PHONE_NUMBER>717411303423
Result: 02f4f51aa66496ab1d7e685cfe4474d92d8b5dbd7698c371f4237ddaa2122b0311
xman@localhost:~/7/ecctools$ ./calculatefromkey be49e416089b9ef31de38                               privatekey:<PHONE_NUMBER>000000000000000000000000000000000be49e416089b9ef31de38
publickey compressed: 035e86aae702006a1f1216ccc96001cffc26c5c594bc9be0158647e08bb91fdd16
pukey different again
how to resolve this ?
Tnak you !

How do you compile the program.
What is your environment.
I run on Ubuntu WSL on Windows 10 and i get different results from the modmath division and my Resulting publickeys are the SAME, look:

albertobsd:~/ecctools$ ./modmath 0xf56926f9ca9abc1065153d25383e80 /<PHONE_NUMBER>717411303423
Result: 259ca781781d06416496729e05e07418d5c68d69f794b3398768a7429ab581e7

albertobsd:~/ecctools$ ./calculatefromkey 259ca781781d06416496729e05e07418d5c68d69f794b3398768a7429ab581e7
privatekey: 259ca781781d06416496729e05e07418d5c68d69f794b3398768a7429ab581e7
publickey compressed: 0267d64ab89262eccc17b0671f0589786915c395aea89fb6ec3fca45f7b1bac69d
public address compressed 1KYwqFVpE4aPCjxswbYoKyZWVmTkxzqnMv
publickey uncompressed: 0467d64ab89262eccc17b0671f0589786915c395aea89fb6ec3fca45f7b1bac69de609b4928a768250ad655bccd087a47f9af56cc09bbc4c7ea7b3678ef6bb7ac0
public address uncompressed 1Jj1UbW53AXgA6CWCWNHcjuCaho3cdJsxn
albertobsd:~/ecctools$ ./calculatefromkey f56926f9ca9abc1065153d25383e80
privatekey:<PHONE_NUMBER>000000000000000000000000f56926f9ca9abc1065153d25383e80
publickey compressed: 02470a635de37b909187e612e5aa853decbb9769416a2ecd055f990c1de501f66c
public address compressed 1DCfjcfiXLDfJPcs5BueSTfaHcv6GH7ZWJ
publickey uncompressed: 04470a635de37b909187e612e5aa853decbb9769416a2ecd055f990c1de501f66c9974b94c6bc79b1d1a042d6891903c60aee337ceac5c1a60f1fa474677ba805e
public address uncompressed 19HN91w3x1M2bKC8A5r19RFUHhhcueCoRD
albertobsd:~/ecctools$ ./keymath 02470a635de37b909187e612e5aa853decbb9769416a2ecd055f990c1de501f66c /<PHONE_NUMBER>717411303423
Result: 0267d64ab89262eccc17b0671f0589786915c395aea89fb6ec3fca45f7b1bac69d

I think that you are using a buggy compiled version of my program. Please use Linux, not windows.
Regards!

How do you compile the program. What is your environment. I run on Ubuntu WSL on Windows 10 and i get different results from the modmath division and my Resulting publickeys are the SAME, look:

albertobsd:~/ecctools$ ./modmath 0xf56926f9ca9abc1065153d25383e80 /<PHONE_NUMBER>717411303423
Result: 259ca781781d06416496729e05e07418d5c68d69f794b3398768a7429ab581e7

albertobsd:~/ecctools$ ./calculatefromkey 259ca781781d06416496729e05e07418d5c68d69f794b3398768a7429ab581e7
privatekey: 259ca781781d06416496729e05e07418d5c68d69f794b3398768a7429ab581e7
publickey compressed: 0267d64ab89262eccc17b0671f0589786915c395aea89fb6ec3fca45f7b1bac69d
public address compressed 1KYwqFVpE4aPCjxswbYoKyZWVmTkxzqnMv
publickey uncompressed: 0467d64ab89262eccc17b0671f0589786915c395aea89fb6ec3fca45f7b1bac69de609b4928a768250ad655bccd087a47f9af56cc09bbc4c7ea7b3678ef6bb7ac0
public address uncompressed 1Jj1UbW53AXgA6CWCWNHcjuCaho3cdJsxn
albertobsd:~/ecctools$ ./calculatefromkey f56926f9ca9abc1065153d25383e80
privatekey:<PHONE_NUMBER>000000000000000000000000f56926f9ca9abc1065153d25383e80
publickey compressed: 02470a635de37b909187e612e5aa853decbb9769416a2ecd055f990c1de501f66c
public address compressed 1DCfjcfiXLDfJPcs5BueSTfaHcv6GH7ZWJ
publickey uncompressed: 04470a635de37b909187e612e5aa853decbb9769416a2ecd055f990c1de501f66c9974b94c6bc79b1d1a042d6891903c60aee337ceac5c1a60f1fa474677ba805e
public address uncompressed 19HN91w3x1M2bKC8A5r19RFUHhhcueCoRD
albertobsd:~/ecctools$ ./keymath 02470a635de37b909187e612e5aa853decbb9769416a2ecd055f990c1de501f66c /<PHONE_NUMBER>717411303423
Result: 0267d64ab89262eccc17b0671f0589786915c395aea89fb6ec3fca45f7b1bac69d

I think that you are using a buggy compiled version of my program. Please use Linux, not windows.
Regards!

Thank you your answer Bro.
I use N = 2^70, not N = 0xf.....141
./modmath 0xf56926f9ca9abc1065153d25383e80 /<PHONE_NUMBER>717411303423 Result: be49e416089b9ef31de38
try please on your machine this example wuth N = 2^70
?
please
Regaeds

try please on your machine this example wuth N = 2^70

NO

try please on your machine this example wuth N = 2^70

NO

unfortunatly 2^70 not work


Improve \iffalse...\fi detection

Close #97
Currently, \iffalse...\fi blocks are detected only if they start at the beginning of a line or are only preceded by spaces.
This PR skips any {...} block after a \iffalse to avoid wrong end detection. This should fix issues with code like
% array.sty v2.6d (2024/06/14), line 229-232
\protected\def\@arraycr {
  \tbl_count_missing_cells:n {@arraycr}
  \iffalse{\fi\ifnum 0=`}\fi
  \@ifstar \@xarraycr \@xarraycr}

Though not ideal and may still fail in more special cases (see the \FirstcapD below), yes this is an improvement.
For the \FirstcapD case, it seems it's because \iffalse{\fi and \iffalse}\fi are used at different bracing levels. I don't know how common such tricks are used in package sources, so Maybe we can skip it for now.
% James-Yu/LaTeX-Workshop#4231, skip if not at the beginning of a line
% \iffalse meta-comment
% Some comments and Copyright info
% \fi

% #97, skip brace tricks
% array.sty v2.6d (2024/06/14), line 229-232
\protected\def\@arraycr {
  \tbl_count_missing_cells:n {@arraycr}
  \iffalse{\fi\ifnum 0=`}\fi
  \@ifstar \@xarraycr \@xarraycr}

% https://tex.stackexchange.com/a/9900
\def\FirstcapD#1#2\delimiter{%%% Delimited
  \iffalse{\fi
  \uppercase{\edef\Fcap{\iffalse}\fi#1}#2}}%

text

Also extend test/colorize-fixtures/iffalse.tex?

I have been about the issue with
tex
% https://tex.stackexchange.com/a/9900
\def\FirstcapD#1#2\delimiter{%%% Delimited
  \iffalse{\fi
  \uppercase{\edef\Fcap{\iffalse}\fi#1}#2}}%

Is it just one more construction using \iffalse or would it make sense for the matching rule to specifically ignore this construction (that would be easy)?

You're right. Please ignore (do not highlight matches as comment) constructions with the pattern \\iffalse\s*[{}]\s*\\fi. Or, if the TextMate grammar is expressive enough, ignore \iffalse...\fi if what it wraps consists of unbalanced braces.
At first I was going to say that they may not appear in real codes. But
rg '\\iffalse\s*[{}]\s*\\fi' "$(kpsewhich --var-value TEXMFDIST)/tex"

gives quite some use cases, even in my incomplete TeX Live installation.
Snippets

% bigfoot.sty v2.1 (2015/08/30), line 192-202
\def\PopFootnoteMark#1{\expandafter
  \ifx\csname FN@stack@#1\endcsname\@empty
    \PackageError{bigfoot}{Empty footnote stack #1}%
    {The specified footnote type has no uncompleted range}%
  \else
  {\let\@elt\FN@firstpop
    \iffalse{\fi\csname FN@stack@#1\endcsname}}\fi}
\def\FN@firstpop#1#2#3{\protected@xdef\@thefnmark{#2}%
  \let\@elt\relax
  \expandafter\protected@xdef\csname FN@stack@#1\endcsname{%
    \iffalse}\fi}

% ltxcmd.sty v1.26 (2023-12-04), line 586-619
\ltx@IfUndefined{detokenize}{%
  \def\LTXcmds@temp#1{%
    \long\def\ltx@ifempty##1{%
      \romannumeral0%
      \iffalse{\fi
        \expandafter\ltx@gobble\expandafter{%
          \expandafter{\string##1}%
          \expandafter\ltx@gobble\string
        }%
        \expandafter\ltx@firstofthree\expandafter
        {\iffalse}\fi
        \expandafter#1\ltx@secondoftwo
      }%
      \expandafter#1\ltx@firstoftwo
    }%
    \long\def\ltx@ifblank##1{%
      \romannumeral0%
      \iffalse{\fi
        \expandafter\expandafter\expandafter\ltx@gobble
        \expandafter\expandafter\expandafter{%
          \expandafter\expandafter\expandafter{%
<EMAIL_ADDRESS>          }%
          \expandafter\ltx@gobble\string
        }%
        \expandafter\ltx@firstofthree\expandafter
        {\iffalse}\fi
        \expandafter#1\ltx@secondoftwo
      }%
      \expandafter#1\ltx@firstoftwo
    }%
  }%
  \LTXcmds@temp{ }%
}{%
  % ...
}

Screenshots below show two problems caused by ignoring \iffalse{\fi and \iffalse}\fi:

Unmatched braces. See the red {s in \def\PopFootnoteMark#1{ and \def\FN@firstpop#1#2#3{ in the first screenshot.
Till-to-end comment range. See the second screenshot.

In this sense, my initial example \iffalse{\fi\ifnum 0=`}\fi happened to have two opposite-directed  brace hacks used together, thus the current \iffalse...\fi detection worked for it.

Simplified examples
\def\bbgroup{{\iffalse}\fi}
\def\eegroup{\iffalse{\fi}text text}

\def\bbgroup{{%
  \iffalse}\fi}
\def\eegroup{%
  \iffalse{\fi}%
  text text}

More resources explaining brace hacks/tricks:

The TeXBook, Appendix D "Dirty Tricks", 5. Brace hacks. p. 385
Understanding Brace Hacks, TeX-SX Q&A.

I am far from understanding everything about brace hacks. Yet, the highlighting seems better when ignoring \iffalse}\fi and \iffalse{\fi. Is it good enough for merging this PR?

I am far from understanding everything about brace hacks.

Basically it's a way to cheat TeX's mouth to have unmatched brace(s) in balanced context.

Is it good enough for merging this PR?

Yes! Many thanks!


No fallback on index-url if dependency not found in local simple repository

I have setup a simple repository (https://packaging.python.org/en/latest/specifications/simple-repository-api/ | PEP503).
Installing a plugin from the repository by providing a extra-index-url works but when adding a dependency that is not contained in the repository uv errors instead of falling back to the index-url.
I know from https://github.com/astral-sh/uv/pull/2083 that it should not continue looking if the specified verison was not found, but since no reference can be found it should continue with the primary index imo.
❯ : uv pip install cryptography --extra-index-url file:\C:\temp\simple\ -vv
0.000085s DEBUG uv uv 0.2.15
uv_requirements::specification::from_source source=cryptography
0.005378s DEBUG uv_toolchain::discovery Searching for Python interpreter in system toolchains
0.006771s DEBUG uv_toolchain::discovery Found cpython 3.12.0 at C:\temp\test_install\.venv\Scripts\python.exe (active virtual environment)
0.007211s DEBUG uv::commands::pip::install Using Python 3.12.0 environment at .venv\Scripts\python.exe
0.007755s DEBUG uv_fs Acquired lock for .venv
0.008958s DEBUG uv::commands::pip::install At least one requirement is not satisfied: cryptography
uv_client::linehaul::linehaul
0.009374s DEBUG uv_client::base_client Using request timeout of 30s
uv_resolver::flat_index::from_entries
uv_resolver::resolver::solve
uv_resolver::resolver::solve_tracked
0.012813s   0ms DEBUG uv_resolver::resolver Solving with installed Python version: 3.12.0
uv_resolver::resolver::choose_version package=root
uv_resolver::resolver::get_dependencies_forking package=root, version=0a0.dev0
uv_resolver::resolver::get_dependencies package=root, version=0a0.dev0
0.013687s   0ms DEBUG uv_resolver::resolver Adding direct dependency: cryptography*
uv_resolver::resolver::process_request request=Versions cryptography
uv_resolver::resolver::choose_version package=cryptography
uv_client::registry_client::simple_api package=cryptography
uv_resolver::resolver::process_request request=Prefetch cryptography *
error: failed to read from file C:\temp\simple\cryptography\index.html
Caused by: The system cannot find the path specified. (os error 3)
A minimal setup can be found here, github doesnt allow .7z files (maturin init compiled as 0.1.0 and 0.2.0):
https://we.tl/t-WOJyEdOD1L

Yeah we should treat this as a 404 effectively.


RFC-0191: Async Streaming IO

Signed-off-by: Xuanwo<EMAIL_ADDRESS>I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/
Summary
This proposal will address #190

I'm working on a demo of this RFC now, we will merge this RFC along with the detailed implementations.


Define SDK

SDK Types should include:

[x] Dict
[x] List
[ ] LocalDate
[x] Maybe
[x] Result

For all of the above we need to add module mappings as seen here:
https://github.com/Morgan-Stanley/morphir-elm/blob/2dfd49aa61448374d4f9045e7aa54ffc660b88c9/src/Morphir/Elm/Frontend/Resolve.elm#L126-L130
Note: The SDK will always be included as a dependency to morphir packages. As seen here: https://github.com/Morgan-Stanley/morphir-elm/blob/2dfd49aa61448374d4f9045e7aa54ffc660b88c9/src/Morphir/Elm/Frontend.elm#L381-L384

This is generally to vague and most of what it referes have been completed. There is another issue for LocalDate specifically: #82


Synth & SynthDefs:

Update documentation
Fix set_contexts
Add repr
inPr: add docstrings

PR can be replaced by #9. Maybe there are some useful examples in the notebook file, but the current change & this change is too different to merge them.

I proceed as you suggest, looking at PR#9


Requests not editable

The requests page has an editable notes section, but the save button doesn't enable when I edit the notes.
The target date isn't editable at all. It should be.

No fields are editable at the moment. Make the Notes and Target Date fields editable.


python setup.py build_ext --inplace 报错

cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ gcc: fatal error: Killed signal terminated program cc1plus compilation terminated.请问这个有解决的办法吗

看起来是gcc被kill了？可能你的机器内存不够


Data for Indian States not found

This is in reference to issue no. #984
Still i couldn't see the updated data, can you please look into it and please find my latest comment on the original issue.

Thanks for the issues. Our small team is currently swamped with other
issues, but this is def on the list. Cheers!
El El dom, may. 10, 2020 a la(s) 10:06 a. m., deepak3081996 <
<EMAIL_ADDRESS>escribió:

This is in reference to issue no. #984
https://github.com/covidatlas/coronadatascraper/issues/984
Still i couldn't see the updated data, can you please look into it and
please find my latest comment on the original issue.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/covidatlas/coronadatascraper/issues/989, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAMPWDLTCAWHU4IFDX4H7WDRQ2YEXANCNFSM4M5IGXOQ
.

it's ok no problem i'll wait for the fix, even  i'm occupied with some work during the whole week so couldn't found time to work on it. Just update me once you find the fix for it, i'll start working on it than thank you.


Parsing of password with % gives malformed URI error

Line 196 in lib/index.js:
ret.auth.pass = parts[1] ? decodeURIComponent(parts[1]) : void 0;

If parts[1] is a password that contains a percent sign %, URIError: URI malformed is returned.

Why not encode the password so that % is encoded as %25?

Yeah this is expected behavior unfortunately. MongoDB says that username and password must be URI encoded, so if you have a '%' in your password you need to do encodeURIComponent() on your password.

This is all good to know, thanks for the insight!


Fix redeemer initalization

Discovered by @while0x1, the redeemer notation changed in 0.8.0. This updates the docs accordingly

Codecov Report

Merging #189 (6e0be85) into main (7193f1c) will not change coverage.
The diff coverage is n/a.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@           Coverage Diff           @@
##             main     #189   +/-   ##
=======================================
  Coverage   85.43%   85.43%
=======================================
  Files          26       26
  Lines        2850     2850
  Branches      681      681
=======================================
  Hits         2435     2435
  Misses        305      305
  Partials      110      110

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


halfquake: more ammo?

jazz: this segment in "repeat" (I think?) seems to have an autosave here (although I have no idea how they work here, but I had two autosaves leading here when I realized that I got stuck) and seems to be impossible without a couple of revolver bullets

repeat 2 + house


NamespacePrefix contains external sources that we don't capture

I'm not sure if this is intended, a bug, or just outdated so creating general question for this.
I recently updated my ddb (disease_norm_update --update_all --update_merged) and noticed that some members in the NamespacePrefix enum do not exist in my ddb. For example, NamespacePrefix.DECIPHER does not exist in my ddb data. Is this intended? Should we include members in this enum that do not appear in the data? Did these members exist in the data at some point?

We definitely imported DECIPHER xrefs at one point, but their scope can vary between equivalentTo and relatedTo and we don't really want to be capturing the latter if we can help it. I think there would be some work on an upstream library to support parsing of the trailing modifiers that designate that relationship in the OBO release.


Add unit test framework for operators' conversion

Fix #28

Really enjoying this PR... comments coming soon..

There's a lot of good things going on here. Before I proceed, have you considered adding check_node also in the opTest? https://github.com/onnx/onnx/blob/87ab3efad37614a96082fca54c543e9e19f8402e/onnx/checker.py

@varunarora of course.  Done adding check_node, you can continue to review. Thanks!

@varunarora I saw the comments you added and learn a lot from them. This is a good practice. Many thanks!


Setting Swipe Gestures to Nil Doesn't Disable Swipe Gesture

        conversationsViewController.conversationsViewControllerDelegate = self
        SideMenuManager.menuLeftNavigationController = conversationsViewController
        SideMenuManager.menuPresentMode = .ViewSlideInOut
        SideMenuManager.menuFadeStatusBar = false
        SideMenuManager.menuWidth = max(round(min(UIScreen.mainScreen().bounds.width, UIScreen.mainScreen().bounds.height) * 0.85), 240)
        SideMenuManager.menuShadowOpacity = 0
        SideMenuManager.menuRightSwipeToDismissGesture = nil
        SideMenuManager.menuLeftSwipeToDismissGesture = nil
        SideMenuManager.menuAnimationPresentDuration = 0.25
        SideMenuManager.menuAnimationDismissDuration = 0.25

As you can see I've set both swipe gestures to nil however, I'm still able to swipe and dismiss the controller. What am I doing wrong?

@mbalex99, dig a little deeper! Both menuRightSwipeToDismissGesture and menuRightSwipeToDismissGesture are weak references, so that should be a clue that setting to nil won't release them.
You need to either remove the gestures from the view or disable them. Read up on UIGestureRecognizers for more info.

Hmm it didn't seem to work.
I tried this:
SideMenuManager.menuRightSwipeToDismissGesture?.enabled = false
SideMenuManager.menuLeftSwipeToDismissGesture?.enabled = false

and even on this on both the side viewcontroller and the main viewcontroller
if let swipe1 = SideMenuManager.menuRightSwipeToDismissGesture, swipe2 = SideMenuManager.menuLeftSwipeToDismissGesture {
            view.removeGestureRecognizer(swipe1)
            view.removeGestureRecognizer(swipe2)
        }

The swiping still seems to occur.

You can't disable it if you set the reference to nil. Also I think the gesture is recreated every time the menu is exposed. Take a look at the code to understand more closely.

Thanks for the quick replies.

I removed the lines of code that set it to nil, so they're actually caught by the if let blocks
I've put these the disabling of code within viewDidAppear and they seem to be properly disabled.

I'm taking a look at the code right now and I can't seem to figure out why the gestures are still being fired.

Try removing them in viewDidAppear if disabling isn't working.

I created a test project here. I think either this is a bug or I'm obviously missing something.
https://github.com/mbalex99/swipesidemenuissue
The swipe still occurs.

There is still more to try before calling this a bug.
Your code has you disabling it in viewDidLoad. My guess is that inspecting the gestures at that point would reveal they are nil, so that won't work.
In menuPressed you have it disabling the gestures. Again inspection may reveal that the gestures at that point are still nil since the menu hasn't revealed yet.
Instead, in MenuViewController, try disabling or removing the gestures on viewWillAppear.

https://github.com/mbalex99/swipesidemenuissue
Okay I did what you said, doesn't seem to be working. I checked and the gestures are never nil at viewDidLoad or viewWillAppear or viewWillAppear

So yeah I've tried everything and it's still swiping. If it's this difficult or unintuitive wouldn't that be respectable to say it's a bug by now?
Again thanks for swift support! 👍

Disabling them in viewWillAppear of the menu is working for me.
However, it's important to note that it's disabling those gestures on the menu itself, but not on the main screen that's partially displayed. The main screen has a transparent view over it to take taps and swipes to hide the menu and prevent the partial screen from being interacted with. The gestures were separated this way so that they could be disabled on the menu in case of special menu gestures but still make it easy to dismiss the menu. As such, this is not a bug, but by design.
As a general note, my goal with this library was to hit the 90%+ use case, and I think it's accomplished that. If you would like to contribute to this library, I'm all for it! I haven't heard of a compelling use case for turning off the swiping gestures from anyone else yet.
If you want to contribute, I would suggest taking a look at line 310 of SideMenuTransition. These are the gestures you would like to disable, but they are not exposed. There would either need to be a boolean added to SideMenuManager to turn off swipe gestures at large, or a getter method to expose those gestures to be disabled.

Are you using the same code from my project? I have the code in the MenuViewController at viewWillAppear and you can still swipe to dismiss.
Ah I see what you did there with the transparent overlay, but since the SideMenuManager is managing a singleton instance shouldn't the disable/enable of the gesture recognizers still disable it for all instances?

I added two lines of code to disable gestures to the example project in the repo and it worked as expected.
A challenge with the design is that a storyboard will create a new instance of a SideMenu via segues, vs. setting up the right and left menus on first launch. Since a new menu instance can be created at any time, many of the commands related to menus are not singleton oriented, but hooked to the singular instance of that menu when its assigned to the manager. It could be re-architected to move the gesture from menu to menu or use a master boolean to control behavior, but again in light of the 90%+ use cases there was no need for that level of effort.

Okay! I created a fork and a pull request!

@mbalex99 I don't see any pull requests.

@mbalex99 disregard just appeared.

I would also like to see this feature implemented. Looking forward to the pull request merged.

its here 👍
sideMenuNavigationController.enableSwipeToDismissGesture = false