Users never receiving their emails

The emails of our Your Priorities instance are not send to their users.
Here is the Systemd file for the workers service (/etc/systemd/system/your-priorities-workers.service):
[Install]
WantedBy=multi-user.target

[Service]
Environment=DATABASE_URL=postgres://yrpri:secret@localhost/yrpri
Environment=DEBUG=your-priorities-workers
Environment=DEFAULT_HOSTNAME=consultation
Environment="EMAIL_FROM=Parlement ouvert<EMAIL_ADDRESS>Environment=ENV=production
Environment=NODE_ENV=production
Environment=REDIS_URL=redis://localhost:6379
Environment=SMTP_SERVER=localhost
Environment=SMTP_PORT=25
Environment=SMTP_ACCEPT_INVALID_CERT=1
ExecStart=/usr/bin/node /home/forteza2017/your-priorities-app/server_api/active-citizen/workers/main.js
Group=forteza2017
Restart=always
StandardOutput=syslog
StandardError=syslog
Type=simple
User=forteza2017
WorkingDirectory=/home/forteza2017/your-priorities-app/server_api

[Unit]
Description=Your-Priorities workers
After=syslog.target network.target

The logs after a restart:
journalctl -u your-priorities-workers.service

Apr 11 06:37:41 fuchsia systemd[1]: Stopping Your-Priorities workers...
Apr 11 06:37:41 fuchsia systemd[1]: Stopped Your-Priorities workers.
Apr 11 06:37:45 fuchsia systemd[1]: Started Your-Priorities workers.
Apr 11 06:37:48 fuchsia node[7663]: {"name":"your-priorities","hostname":"fuchsia","pid":7663,"level":30,"msg":"Starting app access to Kue Queue { redis_url: 'redis://localhost:6379' }","time":"2018-04-11T06:37:
Apr 11 06:37:50 fuchsia node[7663]: SMTP Configured
Apr 11 06:37:50 fuchsia node[7663]: {"name":"your-priorities","hostname":"fuchsia","pid":7663,"level":30,"msg":"Dirname { dirname: '/home/forteza2017/your-priorities-app/server_api/active-citizen/workers' }","ti
Apr 11 06:37:51 fuchsia node[7663]: {"name":"your-priorities","hostname":"fuchsia","pid":7663,"level":30,"msg":"Have Loaded i18n { err: undefined }","time":"2018-04-11T06:37:51.251Z","v":0}
Apr 11 06:37:51 fuchsia node[7663]: (node:7663) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 job ttl exceeded listeners added. Use emitter.setMaxListeners() to increase limit
Apr 11 06:37:51 fuchsia node[7663]: Server is ready to take our messages
Apr 11 06:37:51 fuchsia node[7663]: {"name":"your-priorities","hostname":"fuchsia","pid":7663,"level":30,"msg":"Processing activity Started","time":"2018-04-11T06:37:51.398Z","v":0}
Apr 11 06:37:51 fuchsia node[7663]: {"name":"your-priorities","hostname":"fuchsia","pid":7663,"level":30,"msg":"Processing activity Started","time":"2018-04-11T06:37:51.415Z","v":0}
Apr 11 06:37:51 fuchsia node[7663]: {"name":"your-priorities","hostname":"fuchsia","pid":7663,"level":30,"msg":"Processing activity Started","time":"2018-04-11T06:37:51.419Z","v":0}
Apr 11 06:37:51 fuchsia node[7663]: {"name":"your-priorities","hostname":"fuchsia","pid":7663,"level":30,"msg":"Processing activity Started","time":"2018-04-11T06:37:51.422Z","v":0}
Apr 11 06:37:51 fuchsia node[7663]: {"name":"your-priorities","hostname":"fuchsia","pid":7663,"level":30,"msg":"Processing activity Started","time":"2018-04-11T06:37:51.425Z","v":0}
Apr 11 06:37:51 fuchsia node[7663]: (node:7663) DeprecationWarning: Using the automatically created return value from client.query as an event emitter is deprecated and will be removed in<EMAIL_ADDRESS>Please see the
Apr 11 06:37:51 fuchsia node[7663]: {"name":"your-priorities","hostname":"fuchsia","pid":7663,"level":50,"msg":"Processing Activity Error { err: 'Activity not found' }","time":"2018-04-11T06:37:51.963Z","v":0}
Apr 11 06:37:52 fuchsia node[7663]: {"name":"your-priorities","hostname":"fuchsia","pid":7663,"level":50,"msg":"Processing Activity Error { err: 'Activity not found' }","time":"2018-04-11T06:37:52.011Z","v":0}
Apr 11 06:37:52 fuchsia node[7663]: {"name":"your-priorities","hostname":"fuchsia","pid":7663,"level":50,"msg":"Processing Activity Error { err: 'Activity not found' }","time":"2018-04-11T06:37:52.012Z","v":0}
Apr 11 06:37:52 fuchsia node[7663]: {"name":"your-priorities","hostname":"fuchsia","pid":7663,"level":50,"msg":"Processing Activity Error { err: 'Activity not found' }","time":"2018-04-11T06:37:52.013Z","v":0}
Apr 11 06:37:52 fuchsia node[7663]: {"name":"your-priorities","hostname":"fuchsia","pid":7663,"level":50,"msg":"NotificationNewsFeedWorker Error { err: 'Notification not found' }","time":"2018-04-11T06:37:52.029
Apr 11 06:37:52 fuchsia node[7663]: {"name":"your-priorities","hostname":"fuchsia","pid":7663,"level":50,"msg":"NotificationNewsFeedWorker Error { err: 'Notification not found' }","time":"2018-04-11T06:37:52.055
Apr 11 06:37:52 fuchsia node[7663]: {"name":"your-priorities","hostname":"fuchsia","pid":7663,"level":50,"msg":"NotificationNewsFeedWorker Error { err: 'Notification not found' }","time":"2018-04-11T06:37:52.055
Apr 11 06:37:52 fuchsia node[7663]: {"name":"your-priorities","hostname":"fuchsia","pid":7663,"level":50,"msg":"NotificationNewsFeedWorker Error { err: 'Notification not found' }","time":"2018-04-11T06:37:52.110
Apr 11 06:37:52 fuchsia node[7663]: {"name":"your-priorities","hostname":"fuchsia","pid":7663,"level":30,"msg":"Processing NotificationNewsFeedWorker Started { type: 'notification.point.newsStory',\n  user: \n

The state of the jobs queue:
var kue = require('kue');
var queue = kue.createQueue();

queue.activeCount(console.log);
> null 70
queue.inactiveCount(console.log);
> null 9519
queue.failedCount(console.log);
> null 0
queue.delayedCount(console.log);
> null 0
queue.completeCount(console.log);
> null 0

Active jobs with job.type === 'process-activity' && job.data.type === 'activity.password.recovery': 0
Inactive jobs with job.type === 'process-activity' && job.data.type === 'activity.password.recovery': 51
Active jobs with job.type === 'send-one-email': 0
Inactive jobs with job.type === 'send-one-email': 0

@eraviart Can you try to send a reset password email while the worker is running and see what comes in the log? The "Activity not found" & "Notification not found" point to the Redis queue being out of sync with the database. Can it be that the Redis queue was not cleared between clearing the database after testing during setup?

@eraviart Does the worker continue through all those Activity not found & Notification not found errors to iterate over all the 9519 that are still inactive in the queue? Are there errors later to do with the email sending.

Nothing happens in the log when I try a reset password.
What is the best way to synchronize or erase the Redis queue and the events database?

Does the worker continue through all those Activity not found & Notification not found errors to iterate over all the 9519 that are still inactive in the queue? Are there errors later to do with the email sending?

No it doesn't iterate over the remaining inactive events.

@eraviart I guess you could write something for Kue to get everything in sync but the nuclear option is to clear the Redis queue. This would delete any outstanding password reset queries but the links would have expired anyway so probably better not to send them out anyway. Just be careful if you are using the same Redis for the sessions then all sessions will be delete when you reset the queue. https://stackoverflow.com/questions/6851909/how-do-i-delete-everything-in-redis

@eraviart After you finish this then I'd keep an eye on the service especially when it comes to failures from connecting to the active citizen predictionio recommendation engine that you are not running but the notification & newsfeed generation systems use this feature. The recommendation code should just return a user error but if you have a problem I will look into it.

@eraviart More info - I went through the code testing and found a problem if you are not using AirBrake for collecting errors, this has now been fixed here: https://github.com/CitizensFoundation/active-citizen/commit/f46069a2010f8543ae7863050896cd3dfccb287a
We're are doing final testing on version 7.2 that includes many minor UI fixes, it removes the autotranslation button if its not on the server and another big performance upgrade especially on Edge and IE11. This version will include this AirBrake fix but you can download use it right away if you want it does not conflict with version 7.1

Thanks @rbjarnason.
I tested the nuclear option (ie purging Redis queue) several times, but each time the queue stopped after a few minutes (or hours).
Thanks for you AirBrake fix, I will test it ASAP.

@eraviart If you did not have AirBrake then it could be hanging as its not completing callbacks. Is there anything in the log after it stops? I want to get this working 100% even if you don't use AirBrake so I'm here to help.

I confirm that I don't use AirBrake.
I have deployed the latest version of active-citizen. It seems to work (without having to purge Redis queue). But it is too early to be sure. Fingers crossed :-)


"Pretty" URLs restricted to PATH_INFO.

If UrlManager is configured with $enablePrettyUrl = true, UrlManager and UrlRule each call Request::getPathInfo() to determine the requested path/URI. However there are other ways an application may wish to allow the route to be defined, which should also be candidates for having "pretty" URLs:

A query string parameter (e.g. index.php?path=the/requested/path)
A console argument, in the event that the application is meant to act like a web application in a console environment

There should be a clean way for applications to specify what the requested path is. Currently the only way to do it is to override Request::getPathInfo(), but then the function loses its meaning, and you have to add something like a "getRealPathInfo()" in case any code does need to know the actual path info.

Can you show a real use case where you need this?

I described our use case here: https://github.com/yiisoft/yii2/pull/6947
That specific enhancement got shut down by @qiangxue but I stil feel that the issue is valid.

Some servers aren't actually configured to support PATH_INFO and will 404 if you try to route to index.php/some/path, which is why the .htaccess rule that we ship Craft with a rewrite rule that just adds the path to a p query string param, which is always safe.

Provided use cases are too uncommon, while implementation will produce a confusing code.


[BUGFIX] Fix non-working short-options for "config" and "working-dir"

This adresses:

OutputInterface namespace import is unused
realpath() may fail, needs gating to satisfy phpstan even though it's unlikely that is_file() returns true, but realpath() doesn't.
Currently only --config and not -c is parsed, same with --working-dir (-w)
Note: A phpstan error remains due to getcwd() maybe returning false and I didn't want to obfuscate this statement with if-condititions; if you have suggestions to improve the type juggling here, tell me.

Thanks a lot @garvinhicking!


Support for creating custom tokens without service account credentials

Currently the SDK must be initialized with service account credentials in order to be able to call FirebaseAuth.createCustomToken(). With this PR, the SDK will attempt to sign custom tokens by calling the IAM service in the cloud when the service account credentials are not provided.
// Following will work in GCP managed runtimes where the Metadata service is present
FirebaseApp.initializeApp();
String token = FirebaseAuth.getInstance().createCustomToken(uid);

// Following will work anywhere
FirebaseOptions options = new FirebaseOptions.Builder()
    // need to only specify the service account email here...
<EMAIL_ADDRESS>    .build();
FirebaseApp.initializeApp(options);
String token = FirebaseAuth.getInstance().createCustomToken(uid);

go/firebase-admin-sign
go/firebase-admin-iam-sign

Resolves #59

Thanks for the review. Made the suggested changes. Over to @schmidt-sebastian for another look.

@schmidt-sebastian PTAL at my last commit. This renames serviceAccount to serviceAccountId due to an amendment made to the API proposal.


update to use eslint-plugin-vue

Cleaned up index.js a bit
Used eslint-plugin-vue as the only plugin (fixes #3)
Removed babel-eslint from README usage instructions, since the current config does not actually use the babel-eslint parser
Added minor version bump

Should eslint-plugin-vue be a peer dep?


Doc Feedback: The Title should not use underscore naming

Location : https://apim.docs.wso2.com/en/latest/Administer/ProductAdministration/WorkingWithTransports/admin-introduction-to-transports/

It is there in multiple location. Please do a complete review.

These have been fixed,


Add a script to measure build performance

Description of changes:
In order to avoid redundancy and make it more maintainable, I refactored the performance script.

I moved the logic into a common script file (kani-perf-setup.sh)
I also changed the performance to run in a temporary file

To simplify deletion

I changed benchcomp to work with the new location

Resolved issues:
Related to #2442
Related RFC:

Optional #ISSUE-NUMBER.
Call-outs:

I haven't actually created the CI job or the benchcomp configuration / parser.
@karkhaz does a benchcomp parser have access to the script output? I guess I could write things the output into a file... Ideally, I would like to get the path from the script output.

Testing:

How is this change tested? Manually ran the regression and the parser.

Is this a refactor change? Kinda

Checklist

[ ] Each commit message has a non-empty body, explaining why the change was made
[ ] Methods or procedures are documented
[ ] Regression or unit tests are included, or existing tests cover the modified code
[ ] My PR is restricted to a single feature or bugfix

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

@karkhaz can you help me out please? It seems that I cannot rename the output folder because it will stop working for previous versions of Kani. Which kani-perf.sh is benchcomp running?? Does this mean that I won't be able to add a new benchmark job that runs on older versions of Kani since the script won't exist there?

Tbh, this solution became too hacky due to benchcomp configuration. I'll create a simple PR without any change to perf.


fixed groovy not found errors

It's been open for a while, but why is this org.codehaus.groovy:groovy-all:2.4.12 needed - it seems like a dependency for a specific development environment, since everything is working here.

Latest master (tagged 8.9.5) should fix this. Closing. Thanks for the PR!


Add ONTOWallet adapter

@jordansexton Hi man, We have made modifications according to the requirements, please check and feedback, thanks.

@jordansexton Hi,man. I have solved the problem, please check again.

@jordansexton Hi,man. I have solved the problem, please check again.

Published:

<EMAIL_ADDRESS><EMAIL_ADDRESS>


Picovoice Console Issue:

Hi,
I use Rhino SDK in my React Native project.

I create a new Rhino Speech-to-Intent context in French in Picovoice Console
I train it for Android
I download and import it in my React Native project
I got this error message  RhinoInvalidArgumentError: Initialization failed

When I test my context on the web in the Picovoice Console everything seems to work fine.
I have the same exact issue with the German language (I haven't try in Spanish).
I am pretty sure that the issue doesn't come from my React Native project because everything works super nicely with an English context 🙏

did you change the model file (.PV) to your language?

Hi @kenarsa ,
Thanks for the quick answer.
Indeed, I completely missed this part from de docs 😅 Everything works fine now!
Sorry for the inconvenience, have a great day 👋

@simonbrtrnd you can close the issue if it worked out.


Improvement in spo listitem add

Encountered while building #3013. When passing empty values in spo listitem add (null values or empty strings) the response when adding an item is Error: Item does not exist. It may have been deleted by another user.
I suggest we add logic to exclude empty values before adding an item to prevent this (for a me a weird error); that way writing scripts becomes easier (sometimes you want to create a bunch of new items when migrating something ;-)). We should implement this in private mapRequestBody(options: Options).
@pnp/cli-for-microsoft-365-maintainers do you feel the same?

Could you share some more information how to reproduce this? Is the matching field in the list required or not? I wonder if there are cases where you might want us to pass empty values through and if this changes wouldn't lead to a breaking behavior.


Allow custom reservoir for Timer

Currently I don't see any way to customized the reservoir of the timer created by a Timed annotation.
In my use case I need to customize both the default reservoir and the reservoir used for specific methods.
The fact that most of the classes have package visibility makes difficult also to extend/reuse them, for example to create a custom annotation for a Timer with customized Reservoir.

Tracking in #150


Improved compile function logic, adding a check for acme compiler ret…

Since ATOM editor was failing to detect that the build has failed for compiler errors, this patch adds a little more intelligence to dust compile command. In case ACME compiler returns an error message, the script will exit(1) instead of always exit(0) as before.

this looks good.


more builtins !!!

[x] (primitive) one_of, none_of, delimited, or_none (none_if_fail alternatively), end (end of input)
[x] (text; bytes) newline, unix, dos and osx styled (named newline, crlf, cr respectively)
[x] (text) just_ignore_case (matches like just, but ignoring the case. yipeeeeeee)

finished by 87ac65f c8cd4c5 67a7c02 f9bd080


Increase Go version to 1.6. for Travis CI.

Experimenting only to see how Travis CI behaves with Go 1.6.
Closing.


Add Role Sponsor to role card

Add subtitle with the name of the card owner which we take as the "Sponsor" of the role -
"Sponsored by "  in gray with smaller font so it generally fits onto 1 line.

@sceenius is the sponsor the same as the creator/owner/proposer?  I assume so, and this is recorded on the object as "owner".

That is what I am proposing, no need to introduce another field imho.


[BOT PR] to update dependencies of istio

This PR will be merged automatically once checks are successful.
none

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: istio-testing
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: costinm
If they are not already assigned, you can assign the PR to them by writing /assign @costinm in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

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

@istio-testing: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/istio-integ-k8s-tests.sh
901a5066c69bbc04c9b02df74ed70e9f3216a84d
link
/test istio-integ-k8s-tests

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

@istio-testing: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/istio-integ-k8s-tests.sh
901a5066c69bbc04c9b02df74ed70e9f3216a84d
link
/test istio-integ-k8s-tests

prow/istio-pilot-multicluster-e2e.sh
901a5066c69bbc04c9b02df74ed70e9f3216a84d
link
/test istio-pilot-multicluster-e2e

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


Use self destructing contracts to store trees for each epoch

We can't wipe mapping storage data without wiping the entire contract. One pattern we can use is having the unirep contract create a storage contract every epoch that contains the GST and epoch tree. Then at the end of the epoch we store the roots and selfdestruct the contract and create a new one.
This should help prevent us from taking too much space on the network.

@vimwitch do we still need this issue?


Fix ctx.match being absent

As reported by @EdJoPaTo and discussed in https://t.me/grammyjs/65534

Codecov Report

Merging #255 (2a15dbe) into main (c7223f0) will not change coverage.
The diff coverage is 100.00%.

:exclamation: Current head 2a15dbe differs from pull request most recent head c3902fa. Consider uploading reports for the commit c3902fa to get more accurate results

@@           Coverage Diff           @@
##             main     #255   +/-   ##
=======================================
  Coverage   37.24%   37.24%
=======================================
  Files          17       17
  Lines        4331     4331
  Branches      157      157
=======================================
  Hits         1613     1613
  Misses       2716     2716
  Partials        2        2

Impacted Files
Coverage Δ

src/context.ts
23.09% <100.00%> (ø)

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 c7223f0...c3902fa. Read the comment docs.


[Pg-kit] Fix malformed array literal error on indexes

Fix #2715, fix #2744
The issue is the expression text to array conversion happening in (('{' || pg_get_expr(i.indexprs, i.indrelid)|| '}')::text[])[k.i]. Commas in an expression become delimiters and split the expression up prematurely. Some special characters like double quotes can cause the malformed array literal errors.
The postgres function pg_get_indexdef does what the snippet above is trying to do, but safely.
I tried adding a test to introspect/pg.test.ts, but some of the indexes get added to list of "alteredIndexes" as the indexes get transformed a little bit and don't pass the json diff snapshots check (e.g. lower(first_name) becomes lower(\"first_name\") and gets flagged as altered).
Which is why the test below has a expect(statements.length).toBe(10);. I decided to leave the test out of my PR for now. This test fails in the main branch but passes with this fix at the very least.
test('basic index test', async () => {
	const client = new PGlite();

	const schema = {
		users: pgTable('users', {
			firstName: text('first_name'),
			lastName: text('last_name'),
			data: jsonb('data'),
		}, (table) => ({
			singleColumn: index('single_column').on(table.firstName),
			multiColumn: index('multi_column').on(table.firstName, table.lastName),
			singleExpression: index('single_expression').on(sql`lower(${table.firstName})`),
			multiExpression: index('multi_expression').on(sql`lower(${table.firstName})`, sql`lower(${table.lastName})`),
			expressionWithComma: index('expression_with_comma').on(sql`(lower(${table.firstName}) || ', '::text || lower(${table.lastName}))`),
			expressionWithDoubleQuote: index('expression_with_double_quote').on(sql`('"'::text || ${table.firstName})`),
			expressionWithJsonbOperator: index('expression_with_jsonb_operator').on(sql`(${table.data} #>> '{a,b,1}'::text[])`),
		})),
	};

	const { statements, sqlStatements } = await introspectPgToFile(
		client,
		schema,
		'basic-index-introspect',
	);

	expect(statements.length).toBe(10);
	expect(sqlStatements.length).toBe(10);
});

@AndriiSherman could you please review this when you have spare time?

Hi @AndriiSherman and @dankochetov ! Could you please let me know if there’s any chance this PR might get some attention within the next month?

I'll merge this PR, but let's add this test as well. If you're unsure how to fix the test, let's handle it this way: you add the test and push it, then I'll pull and try to resolve the issue with lower() on my end. After that, we can release this fix.

Alright, thanks! I'll leave the resolution to you 🙂


[gardening] Use American English: "analyse" → "analyze", "analysing" → "analyzing"

@troughton Please review :-)

@swift-ci please smoke test


Count orchard tds

Codecov Report
Patch coverage: 86.04% and project coverage change: +2.32 :tada:

Comparison is base (276aa99) 57.23% compared to head (de5cb6c) 59.56%.

:exclamation: Current head de5cb6c differs from pull request most recent head 41faecb. Consider uploading reports for the commit 41faecb to get more accurate results

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #395      +/-   ##
==========================================
+ Coverage   57.23%   59.56%   +2.32%
==========================================
  Files          35       34       -1
  Lines        5292     5230      -62
==========================================
+ Hits         3029     3115      +86
+ Misses       2263     2115     -148

Impacted Files
Coverage Δ

zingo-testutils/src/data.rs
66.66% <ø> (ø)

zingo-testutils/src/regtest.rs
79.03% <ø> (ø)

zingocli/tests/darkside/tests.rs
87.03% <ø> (ø)

zingocli/tests/darkside/utils.rs
91.66% <ø> (ø)

zingocli/tests/integration_tests.rs
79.54% <ø> (-1.34%)
:arrow_down:

zingolib/src/blaze/sync_status.rs
76.92% <ø> (-11.54%)
:arrow_down:

zingolib/src/lib.rs
36.36% <ø> (ø)

zingo-testutils/src/lib.rs
72.11% <82.14%> (ø)

zingolib/src/blaze/trial_decryptions.rs
72.58% <91.66%> (+2.04%)
:arrow_up:

zingolib/src/blaze/block_witness_data.rs
78.84% <100.00%> (-0.39%)
:arrow_down:

... and 1 more

... and 6 files with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


WithDefaultLoader(requesters: new[] { requester } giving a compiler error

I am trying to logon to Schwab.com so (hopefully) I can scrape data off a couple pages on their site.
Every time I logon with SubmitAsync, I get “invalid User name or Password.   I know what I am passing, is correct. As result, I thought it was due to a missing header.
When I use the following code to add the header, I get a compile error.   Can you tell me what I’m doing wrong?
var requester = new DefaultHttpRequester();
requester.Headers["User-Agent"] = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Firefox/68.0";

var context = BrowsingContext.New(Configuration.Default.WithDefaultLoader(requesters: new[] { requester }));

Error	CS1739	The best overload for 'WithDefaultLoader' does not have a parameter named 'requesters'

Which version of AngleSharp are you using?
Since v0.10 the requester is not given as a requester array, but just via inclusions in the configuration. So there is no parameter called requesters for WithDefaultLoader.
var requester = new DefaultHttpRequester();
requester.Headers["User-Agent"] = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Firefox/68.0";
var config = Configuration.Default.With(requester).WithDefaultLoader();
var context = BrowsingContext.New(config);

Hope that helps!

Remark regarding the "original" issue (cannot login):
Since logging in to a page requires quite often some kind of state I would also include cookies WithCookies in the configuration (normally this is already true for the login itself - there are mechanisms such as an anti-forgery token to prevent "plain form submission").
Of course, websites could be sensitive to the user-agent, but (if they are engineered well) usually they don't. That would also be disastrous for long-term compatibility. Hence my assumption would be that  this header is irrelevant (hopefully, I am wrong). The other possibility is that the login already depends on JavaScript. If this is the case scraping could be difficult. Yes, there is AngleSharp.Js, but so far its still experimental and it will not work for "complex" (i.e., real-world) JS apps. Maybe the required scripts are "simple enough" to work, but there is no guarantee.
In any case, if you still have problems logging in to the particular site - don't hesitate to follow up here or create an issue at StackOverflow. I'll look there periodically and other folks are quite active there, too.


Launch position negative X not working.

Windows Terminal version
1.17.11461.0
Windows build number
Microsoft Windows [Version 10.0.19044.3086]
Other Software
No response
Steps to reproduce
I have 3 x 1920x1080 monitors with landscape orientation.

Monitor 2 (main display): X starts in 0
Monitor 3: X starts in +1920
The problem
Monitor 1: X starts in -1920
When I try to put a negative number it doesn't let me, it puts the number 1.

Expected Behavior
The expected behavior is to be able to enter negative numbers -1920

Actual Behavior
The current behavior does NOT allow entering negative numbers

Duplicate of #15832
Was fixed in v1.18.2681.0 & v1.19.2682.0

Duplicate of #15832 Was fixed in v1.18.2681.0 & v1.19.2682.0

I'm sorry, I should have looked better at the bugs and I'm using the Microsoft Store version too.🤦🏻♂


Call for maintained up to date mapping binary

The recommended tool for generating maps from General Arcade has fallen out of date and is proving problematic for contributors as SDL’s API changes and features are added (eg. #478).
@Ryochan7 has hosted an open updated alternative on Gitlab:
https://gitlab.com/ryochan7/sdl2-gamepad-mapper
It would be helpful if someone was willing to maintain a fork to distribute binaries so we can delist the old app.

@gabomdq would you be OK with me adding a prominent note in the Readme addressing this as a request for help/CTA ?
It's become a problem evidently, see #478 via Moonlight devs as well as the following patch note: https://store.steampowered.com/news/app/312200/view/2988683441443402781

Sounds good to me, though I'm personally partial to the SDL "official" utility (possibly because I created it :P) https://github.com/libsdl-org/SDL/blob/main/test/controllermap.c

It's a good tool! I can't imagine you'd be thrilled to add a beginner-friendly frontend and manage distributing up to date binaries, but if so that would make the top of the list! =]

Sounds good to me, though I'm personally partial to the SDL "official" utility (possibly because I created it :P) https://github.com/libsdl-org/SDL/blob/main/test/controllermap.c

What's the recommended process to compile and run this? Since no make file exists in the directory

Hello guys,
I think you could use AntiMicroX for mapping gamepads. (at least on Windows and Linux).

AntimocroX was removed from the Readme tool list as it frequently produced bad GUIDs that have ended in unmerged/closed PRs.
I don’t know why that is — if you can provide a convincing argument that it is working well, correctly packages the latest SDL2, and distributes binaries for Windows, Mac and Linux, and ideally distributes source code, I am glad to put it back on the list.

@offalynne

it frequently produced bad GUIDs that have ended in unmerged/closed PRs.

I have found only one unmerged pr where antimicro is mentioned. Could you share any links to issues/PR-s mentioning it?

correctly packages the latest SDL2,

In case of Ubuntu 20.04 it uses SDL 2.0.10 (it depends on distro).
Windows build uses SDL2-2.0.18-2

and distributes binaries for Windows, Mac and Linux

It doesn't support Mac. Binaries are available in release site and in many package systems (rpm, appimage, deb, flatpak...).

ideally distributes source code

Just check link to repo https://github.com/AntiMicroX/antimicrox ;)

The highest scored contributor to the Antimicrox project source himself addressed this in the issue you linked. It’s long out of date and unsuitable.

We have a newer Windows/Linux app via Ryochan7 that’s been moved up in priority in the README. May warrant a couple more features, specifically re. CRC field (add mapping field, remove from GUID) and a warning to omit unnecessary mapping submissions (XINPUT, HIDAPI, etc.)

Since we keep getting submissions from Ryochan7's app that require manually editing the GUID to remove CRC, and I am no longer going to maintain a branch with duplicate/CRC mappings (#609) I'm elevating the General Arcade app and reopening the issue.


Save apikey more securely

WakaTime plugins and wakatime-cli share a common INI config file:

$WAKATIME_HOME/.wakatime.cfg

[settings]
debug         = false
hidefilenames = false
ignore        = """
    COMMIT_EDITMSG$
    PULLREQ_EDITMSG$
    MERGE_MSG$
    TAG_EDITMSG$"""
api_key       = XXXXXXXXXXXXXXXXXXXXXXXXX

[internal]
backoff_retries = 0
backoff_at      =

Describe the solution you'd like to see
Why not save API tokens securely using pass or keyring?
Describe alternatives you've considered
[settings]
debug         = false
hidefilenames = false
ignore        = """
    COMMIT_EDITMSG$
    PULLREQ_EDITMSG$
    MERGE_MSG$
    TAG_EDITMSG$"""
api_key_cmd     = pass ls wakatime/api_key

[internal]
backoff_retries = 0
backoff_at      =

@Freed-Wu we've implemented api_key_vault_cmd option in .wakatime.cfg file to get any api key from any vault in v1.56.0-alpha.1. Depending on the IDE you work it won't take immediate effect before we start changing them.

It has been released on the stable v1.57.0. For zsh, bash and vim should work out of the box after you update to latest cli.


Formatter doesn't work in .inc files

Basic informations

OS: [Windows]
VSCode version: Latest
Extension version: Latest

Further Information
It is not possible to Format .inc files. The option simply isn't there.
To Reproduce
Try to format any .inc file.
Expected behaviour
Be able to format a .inc file.
Error messages
None.

Hello,
This is actually "intended" because the formatter would often completely break .inc files, as clang-format does not understand methodmaps and structs.
https://github.com/Sarrus1/sourcepawn-vscode/blob/ce2ff29dee92dc49dc9901e2a076f37406e829af/src/spIndex.ts#L175
I would advise you to use https://github.com/Sarrus1/spformat instead, which I am planning to implement into the extension anyway.

Allowed the formatting of .inc files in v5.


Issue #16: Satellite cleanup

Description
Part of #16
Removes action and observation definitions from satellites.py. These should be defined only in sat_actions and sat_observations. Some convenience types are given in satellites.py to replace deleted code.
How should this pull request be reviewed?

[ ] By commit
[x] All changes at once

Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?
Refactor only.

[x] Unit tests (General Environment only) pytest --cov bsk_rl/envs/general_satellite_tasking --cov-report term-missing tests/unittest

Test Configuration

Python: [e.g. 3.10.1]
Basilisk: [e.g. 2.2.0]
Plaform: [e.g. Ubuntu 22.08]

Checklist:

[ ] My code follows the style guidelines of this project (passes Black, ruff, and isort)
[x] I have performed a self-review of my code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] Commit messages are atomic, are in the form Issue #XXX: Message and have a useful message
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes

Instead including in PR #48


Font not rendering correctly in Windows

VSCode Version: 1.48.2
OS Version: windows version 2004 (OS Build 19041.450)

Steps to Reproduce:

Use DankMono font with Night Owl Light theme in both Codesandbox and VSCode

Does this issue occur when all extensions are disabled?: Yes
Settings Used in both VScode and Codesandbox
{
  "editor.formatOnSave": true,
  "editor.fontSize": 20,
  "editor.fontFamily": "dm, Menlo, Monaco, 'Courier New', monospace",
  "editor.tabSize": 2,
  "editor.minimap.enabled": false,
  "workbench.editor.openSideBySideDirection": "down",
  "svelte.plugin.typescript.diagnostics.enable": false,
  "typescript.locale": "en",
  "javascript.autoClosingTags": false,
  "typescript.autoClosingTags": false,
  "html.autoClosingTags": false,
  "typescript.tsserver.useSeparateSyntaxServer": false,
  "workbench.colorTheme": "Night Owl Light",
}

Screenshots to compare
VSCode

Code Sandbox

The font is a lot smoother in Codesandbox.

@mahaveer0496 Does this also reproduce with our insiders build (the insiders build uses a newer Electron version) -- https://code.visualstudio.com/insiders/ ?

@alexdima Yes with insiders as well

Version: 1.49.0-insider (user setup)
Commit: f66741dc2b4944e153719bb48bcaa9c565cc40f7
Date: 2020-08-31T05:32:36.938Z
Electron: 9.2.1
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: <IP_ADDRESS>-electron.0
OS: Windows_NT x64 10.0.19041

@mahaveer0496 Could you please also try in Chrome to open https://vscode-web-test-playground.azurewebsites.net/ and configure it with the same font family? Please let us know what Chrome version you tried and how it rendered.


Using setItemRequestClass() on a GridFieldDetailForm has no effect, due to RecursivePublishable extension

Affected Version
silverstripe/admin          1.1.1  SilverStripe admin interface
silverstripe/asset-admin    1.1.1  Asset management for the SilverStripe CMS
silverstripe/assets         1.1.1  SilverStripe Assets component
silverstripe/campaign-admin 1.1.1  SilverStripe campaign admin interface
silverstripe/cms            4.1.1  The SilverStripe Content Management System
silverstripe/config         1.0.4  SilverStripe configuration based on YAML and class statics
silverstripe/errorpage      1.1.1  ErrorPage component for SilverStripe CMS
silverstripe/framework      4.1.1  The SilverStripe framework
silverstripe/graphql        1.1.1  GraphQL server for SilverStripe models and other data
silverstripe/reports        4.1.1  Reports module for SilverStripe CMS
silverstripe/siteconfig     4.1.1  Site wide settings administration.
silverstripe/versioned      1.1.1  SilverStripe Versioned component

Description
I have a ModelAdmin where I need to set a custom item request class using the following code:
public function getEditForm($id = null, $fields = null)
{
    // Obtain Form Object (from parent):
    $form = parent::getEditForm($id, $fields);

    // Obtain Grid Field Object:
    $gridField = $form->Fields()->fieldByName($this->sanitiseClassName($this->modelClass));

    // Obtain Detail Form Component:
    $detailForm = $gridField->getConfig()->getComponentByType(GridFieldDetailForm::class);

    // Update Item Request Class:
    $detailForm->setItemRequestClass(MyCustomised_ItemRequest::class);

    // ...
}

However, upon reloading the admin, nothing changes.  What gives?  I started digging through the code.  We can see here in GridFieldDetailForm where the item request class is obtained:
protected function getItemRequestHandler($gridField, $record, $requestHandler)
{
    $class = $this->getItemRequestClass();
    $this->extend('updateItemRequestClass', $class, $gridField, $record, $requestHandler);

    // ...
}

In the first line of the method, $class is indeed set to my custom class.  However, when it applies extensions in the following line, $class will always be changed to VersionedGridFieldItemRequest.  This is because the VersionedGridFieldDetailForm extension checks if the record has the extension RecursivePublishable.
But my data object doesn't use any versioning or publishing logic at all...?  Oh wait, let me check the config provided by silverstripe/versioned.  Ruh roh:
---
Name: versionedownership
---
SilverStripe\ORM\DataObject:
  extensions:
    RecursivePublishable: SilverStripe\Versioned\RecursivePublishable

So is a fix needed in framework or versioned?  As it stands right now, the setItemRequestClass() method just will not work.  I guess further extensions can be applied to GridFieldDetailForm as a workaround, but this is icky.
PRs:

[ ] https://github.com/silverstripe/silverstripe-framework/pull/8164
[ ] https://github.com/silverstripe/silverstripe-versioned/pull/159

Thanks for the great bug report, have assigned impact/high since I think that setItemRequestClass() is pretty commonly used, and on the critical path for content authoring via ModelAdmin for a lot of installations.

Fixed and manually tested. PRs linked in initial comment.

Fantastic, thanks @chillu and @tractorcow !


fix(website) builder kepler separately and unpin deck version

In website, yarn develop has some transpiration issue but yarn build works.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 26.383%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
255

Relevant Lines:
842

💛  - Coveralls


Handle markdown in workspace cards

Workspace descriptions can use markdown, but we don't process them when displaying the description on the card views. We should handle it somehow.
We could easily render the markdown for the short card, but the long card only has one line, which would result in titles getting chopped.

Keep the line breaks.
Do not render the markdown.
Ideal would be to strip the markdown.


.pptx to .md

It would be better for the docs to be in Markdown than in Powerpoint docs, more accessible.

Learning-Platform-Architecture_Draft.pptx is not possible in Markdown. Could be imported into Google Docs, though.


fibinacci.js

added

@Rajeshkannab77  - Can you read the readme instructions again. Make sure to follow the instructions exactly. I'm going to close this PR


node: do not report role on context cancel

There was non-zero chance to get <-waitRole if the context was cancelled,
but the role was unchanged. Because the behavior of "demote" and context cancel
is different(wait for a manager to stop vs. stop manager) it could lead to
forever hanged managers.
ping @tonistiigi @aaronlehmann

[Current coverage][cc-pull] is 53.69%

Merging [#1002][cc-pull] into [master][cc-base-branch] will decrease coverage by 0.05%

@@             master      #1002   diff @@
==========================================
  Files            75         75
  Lines         11570      11570
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
- Hits           6218       6212     -6
- Misses         4471       4478     +7
+ Partials        881        880     -1

[][cc-pull]

Powered by Codecov. Last updated by [be7bd8d...fb351ea][cc-compare]
[cc-base-branch]: https://codecov.io/gh/docker/swarmkit/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/docker/swarmkit/compare/be7bd8dec14b9876a6c7380f659a62ea6e86d406...fb351eaf3bd929e56a52218eb07cfee1fd254d74
[cc-pull]: https://codecov.io/gh/docker/swarmkit/pull/1002?src=pr

Maybe this is better on the reader side. We can check if the context is still active after waitRole. Also this looks slightly weird(and racy) now when the role change is picked up in 2 different ways. Maybe we should listen for demotion on the manager instance itself.

@tonistiigi Manager listens for demotions now and stops on em, do you think I should remove line <-wait.Role() and wait on <-done instead?

@LK4D4 Yes, I think this should work. @aaronlehmann should confirm.

@tonistiigi I'll change and test

@tonistiigi works perfectly! before I had 30% chance of hang on stop.

LGTM

LGTM


docker-compose is now docker compose in linux

Most scripts use docker-compose instead of docker compose. For example "setup-tables" uses
docker-compose up -d
I am on linux and the docker-compose cli was included in the docker cli.
You can now call
docker compose up -d
see in docker docs
The result is that all the scripts like "setup-tables" are failing

as workaround i did the following:
echo "docker compose $@" > /usr/bin/docker-compose
chmod +x /usr/bin/docker-compose

@j-albr16 Could you please share us your sys info.

@yahu1031
Pop!_OS 22.04 LTS
64-bit
CPU: AMD® Ryzen 5 3600 6-core processor × 12
Graphics: NVIDIA Corporation TU116 [GeForce GTX 1650]

@vlidholt This is not a bug, But this is going to be a deprecation. The old systems/Old versions of docker can still use docker-compose and new versions will slowly remove this command. Right now the current docker version will support both commands. Please add an enhancement label to this.


Incorrect Peer Dependency for v1 Sanity Libraries

Installing packages with Yarn raises the following errors:
warning " ><EMAIL_ADDRESS>has incorrect peer dependency "@sanity/base@^1".
warning " ><EMAIL_ADDRESS>has incorrect peer dependency "@sanity/components@^1".

My package.json contains:
    "dependencies": {
        "@babel/core": "7.12.10",
        "@sanity/base": "2.1.6",
        "@sanity/block-content-to-react": "2.0.7",
        "@sanity/cli": "2.1.4",
        "@sanity/client": "2.1.4",
        "@sanity/code-input": "2.1.4",
        "@sanity/components": "2.1.4",
        "@sanity/core": "2.1.4",
        "@sanity/dashboard": "2.1.4",
        "@sanity/default-layout": "2.1.6",
        "@sanity/default-login": "2.1.4",
        "@sanity/desk-tool": "2.1.6",
        "@sanity/form-builder": "2.1.6",
        "date-fns": "1.30.1",
        "prop-types": "15.7.2",
        "react": "16.14.0",
        "react-dom": "16.14.0",
        "react-icons": "4.1.0",
        "react-is": "17.0.1",
        "rxjs": "6.6.3",
        "sanity-plugin-dashboard-widget-document-list": "0.0.11",
        "sanity-plugin-dashboard-widget-netlify": "1.0.1",
        "sanity-plugin-media": "0.4.0",
        "webpack": "5.15.0"
    },

Thanks for reporting! Fixed in v0.0.13


bug: updater doesn't work

Cortex version
v81
Describe the Bug
❯ cortex-nightly -v
v0.5.0-81

A new release of cortex is available: v0.5.0-81 -> v0.5.0-115
To upgrade, run: sudo cortex-nightly update
❯ cortex-nightly update
Server is running. Stopping server before updating!
HTTP error: Failed to read connection
Validating download items, please wait..
Start downloading: cortex-nightly.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 8452k  100 8452k    0     0  23.1M      0 --:--:-- --:--:-- --:--:-- 23.1M
Error setting owner and group of executable file: /usr/local/bin/cortex-nightly
Restored binary file
❯ cortex-nightly update
Validating download items, please wait..
Start downloading: cortex-nightly.tar.gz
cortex-nightly.tar.gz is already downloaded!
Re-download? [Y/n]: Y
Re-downloading..
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 8452k  100 8452k    0     0  21.7M      0 --:--:-- --:--:-- --:--:-- 21.7M
Error setting owner and group of executable file: /usr/local/bin/cortex-nightly
Restored binary file

Steps to Reproduce
No response
Screenshots / Logs
No response
What is your OS?

[X] MacOS
[ ] Windows
[ ] Linux

What engine are you running?

[ ] cortex.llamacpp (default)
[ ] cortex.tensorrt-llm (Nvidia GPUs)
[ ] cortex.onnx (NPUs, DirectML)

fixed as of 114


Exclude cattle.io/cluster-agent from the ignored node labels

For https://github.com/rancher/rancher/pull/30304, we added cattle.io/cluster-agent=true as the node label that can be used to influence where to schedule the cattle-cluster-agent. But because of the ignored node labels (https://github.com/rancher/ui/blob/2.5-fixes/lib/shared/addon/utils/constants.js#L608-L621), this gets hidden in the UI and ignored when edited. Discussed with Vincent that we can add a one-off exclusion for this specifically (which is better than renaming it)
So the node label with key cattle.io/cluster-agent should not be ignored/hidden/greyed out/made uneditable.

Verified the fix on master-head, 495f7a1d

Added the cattle.io/cluster-agent label in one of the hosted cluster worker nodes
Deleted the cattle-cluster-agent,
Noticed that cattle-cluster-agent created on the worker node where the cattle.io/clsuter-agent label was added
Deleted the label and repeated the tests

The cattel.io/cluster is editable now and the functionalities are working with the fix.


KAFKA-17293: New consumer HeartbeatRequestManager should rediscover disconnected coordinator

JIRA: KAFKA-17293
Ensure that the new consumer will rediscover the coordinator on disconnect and send heartbeats to the correct coordinator.
Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

Hey @frankvicky , thanks for the nice patch! Looks good overall, just left some comments for consideration.

Hi @lianetm
I have addressed the comments, PTAL 😺

@lianetm @frankvicky I wonder if we should also do the same on timeouts. Did we in the old implementation?

I wonder if we should also do the same on timeouts. Did we in the old implementation?

Good point @dajac . It's not explicitly handled in the classic or new consumer, but we do get the behaviour in both, because timeouts as treated as disconnections at the network layer level (handledTimedoutRequests). So if the request times out, the network client disconnects from the node, ending up in the DisconnectExeption that both consumer handle to mark the coordinator unknown.

Hey @frankvicky , thanks for the updates. Left couple of minor comments, and could you please check the test failures on the CommitRequestManagerTest? Makes sense that it probably needs tuning after the refactoring for handleCoordinatorDisconnect . Thanks!

Hey @frankvicky , thanks for the updates. I left a couple of other minor comments. Thanks!


Occasional crash on android

Seeing occasional crash on android for some users:
java.lang.RuntimeException:
  at android.app.LoadedApk$ReceiverDispatcher$Args.run (LoadedApk.java:1003)
  at android.os.Handler.handleCallback (Handler.java:739)
  at android.os.Handler.dispatchMessage (Handler.java:95)
  at android.os.Looper.loop (Looper.java:158)
  at android.app.ActivityThread.main (ActivityThread.java:7229)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1230)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1120)

Caused by: java.lang.NullPointerException:
  at org.apache.cordova.backgroundDownload.BackgroundDownload.CleanUp (BackgroundDownload.java:237)
  at org.apache.cordova.backgroundDownload.BackgroundDownload.access$100 (BackgroundDownload.java:46)
  at org.apache.cordova.backgroundDownload.BackgroundDownload$2.onReceive (BackgroundDownload.java:386)
  at android.app.LoadedApk$ReceiverDispatcher$Args.run (LoadedApk.java:993)

From the trace it appears that the
            } finally {
                CleanUp(curDownload);
            }

can sometimes be called with a null curDownload which is presumably why the exception happens.
Perhaps:
            Download curDownload = activDownloads.get(uri);
            if( !curDownload ) return;

would be a good fix.

Further there is additional crash on some devices like
Caused by: android.database.CursorIndexOutOfBoundsException:
  at android.database.AbstractCursor.checkPosition (AbstractCursor.java:460)
  at android.database.AbstractWindowedCursor.checkPosition (AbstractWindowedCursor.java:136)
  at android.database.AbstractWindowedCursor.getString (AbstractWindowedCursor.java:50)
  at android.database.CursorWrapper.getString (CursorWrapper.java:137)
  at android.database.CursorWrapper.getString (CursorWrapper.java:137)
  at android.app.DownloadManager$CursorTranslator.getString (DownloadManager.java:1629)
  at org.apache.cordova.backgroundDownload.BackgroundDownload$2.onReceive (BackgroundDownload.java:361)
  at android.app.LoadedApk$ReceiverDispatcher$Args.run (LoadedApk.java:1196)

which is
            String uri = cursor.getString(idxURI);

implying the cursor has no entries. So should probably:
            if( cursor.getCount == 0 ) return;

before that which probably avoids the other issue too although perhaps not.

Hi @mzealey, the issue was fixed! I'll close it for now but feel free to reopen it if there are any questions.


[Hub Generated] Review request for Microsoft.Help to add version preview/2023-01-01-preview

This is a PR generated at OpenAPI Hub. You can view your work branch via this link.
ARM API Information (Control Plane)
Azure 1st Party Service can try out the Shift Left experience to initiate API design review from ADO code repo.  If you are interested, may request engineering support by filling in with the form https://aka.ms/ShiftLeftSupportForm.
Changelog
Add a changelog entry for this PR by answering the following questions:

What's the purpose of the update?

[ ] new service onboarding
[ ] new API version
[ ] update existing version for new feature
[ ] update existing version to fix swagger quality issue in s360
[ ] Other, please clarify

When are you targeting to deploy the new service/feature to public regions? Please provide the date or, if the date is not yet available, the month.
When do you expect to publish the swagger? Please provide date or, the the date is not yet available, the month.
By default, Azure SDKs of all languages (.NET/Python/Java/JavaScript for both management-plane SDK and data-plane SDK, Go for management-plane SDK only ) MUST be refreshed with/after swagger of new version is published. If you prefer NOT to refresh any specific SDK language upon swagger updates in the current PR, please leave details with justification here.

Contribution checklist (MS Employees Only):

[ ] I commit to follow the Breaking Change Policy of "no breaking changes"
[ ] I have reviewed the documentation for the workflow.
[ ] Validation tools were run on swagger spec(s) and errors have all been fixed in this PR. How to fix?

If any further question about AME onboarding or validation tools, please view the FAQ.
ARM API Review Checklist

Applicability: :warning:
If your changes encompass only the following scenarios, you should SKIP this section, as these scenarios do not require ARM review.

Change to data plane APIs
Adding new properties
All removals

Otherwise your PR may be subject to ARM review requirements. Complete the following:

[ ] Check this box if any of the following apply to the PR so that the label "ARMReview" and "WaitForARMFeedback" will be added by bot to kick off ARM API Review.  Missing to check this box in the following scenario may result in delays to the ARM manifest review and deployment.

Adding a new service
Adding new API(s)
Adding a new API version
-[ ] To review changes efficiently, ensure you copy the existing version into the new directory structure for first commit and then push new changes, including version updates, in separate commits. You can use OpenAPIHub to initialize the PR for adding a new version. For more details refer to the wiki.

[ ] Ensure you've reviewed following guidelines including ARM resource provider contract and REST guidelines. Estimated time (4 hours). This is required before you can request review from ARM API Review board.

[ ] If you are blocked on ARM review and want to get the PR merged with urgency, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.

Breaking Change Review Checklist
If you have any breaking changes as defined in the Breaking Change Policy, request approval from the Breaking Change Review Board.
Action: to initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Additional details on the process and office hours are on the Breaking Change Wiki.
NOTE: To update API(s) in public preview for over 1 year (refer to Retirement of Previews)
Please follow the link to find more details on PR review process.

@ArcturusZhang - Do you know why the Powershell SDK pr still uses the old namespace. It seems to be based on .Net sdk which has HelpRp namespace. Any pointers on how to update this SDK. Also, any pointers on how to generate Az cli commands based on this swagger?

@ArcturusZhang - Can you please let me know what is the next step in the process. Our SDK namespace review is done. I created this pr updating the namespace for the tier 1 SDK's


wrong cudart on jetpack 6

Hi all,
i am trying this package on Jetpack 6 and even thou it builds, this error pops up when I run the mono launcher:
[INFO] [launch]: All log files can be found below /home/grace/.ros/log/2024-01-03-13-52-12-969463-grace-desktop-8615
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [component_container_mt-1]: process started with pid [8640]
[component_container_mt-1] [INFO] [1704289933.703623279] [argus_mono_container]: Load Library: /home/grace/ros_ws/install/isaac_ros_argus_camera/lib/libmono_node.so
[component_container_mt-1] [ERROR] [1704289933.733278228] [argus_mono_container]: Failed to load library: Could not load library dlopen error: libcudart.so.11.0: cannot open shared object file: No such file or directory, at ./src/shared_library.c:99
[ERROR] [launch_ros.actions.load_composable_nodes]: Failed to load node 'argus_mono' of type 'nvidia::isaac_ros::argus::ArgusMonoNode' in container '/argus_mono_container': Failed to load library: Could not load library dlopen error: libcudart.so.11.0: cannot open shared object file: No such file or directory, at ./src/shared_library.c:99

why is clibcudart.so.11.0 linked even if jetpack 6 comes with cuda12.2 ?
Am I doing something wrong ?
Thanks

The latest Isaac ROS 2.1 release only supports JetPack 5.1.2. We don't currently support the JetPack 6, which is available in Developer Preview right now.
If possible, you should downgrade to the latest stable release of JetPack 5.1.2, and then all Isaac ROS software should work as expected.

Indeed by downgrading it works as expected.
Thanks


Fix issues updating triggers in non-atomic migrations

Fields of trigger conditions can now have their types updated in non-atomic migrations.
Type: bug
@kekekekule I wanted to quickly address the issue at #136 and fix some things in your PR at https://github.com/Opus10/django-pgtrigger/pull/136. I thought it would be easiest to get this in another PR and deploy since I'm going to be away for a bit. I made sure you are the author of the commit, so you will get credit in the release. I also added you to the README as a contributor. Thanks for your contributions!
I believe that this individual operation still needs to be atomic, even if it's in a non-atomic migration. It's dangerous to drop a trigger outside of a transaction as it could lead to data loss for django-pghistory users and other use cases where triggers are necessary to be installed for data integrity.
I updated the code to still wrap the individual schema change in a transaction, ensuring that the trigger is dropped and re-created in that transaction. So, if your migration looks like this:
class Migration(migrations.Migration):
    atomic = False

    operations = [
        migrations.AlterField(),
        migrations.AlterField(),
    ]

The separate alter statements won't be wrapped in a transaction. However, an individual alter statement may be temporarily wrapped in a transaction so that the trigger may be able to be safely dropped and re-created while the field is being altered.
I hope that makes sense. I made a failing test case first similar to the one you made, and I just used the normal transaction.atomic. I was incorrectly using a self.atomic utility in the schema editor.
If for any reason this doesn't address your use case, please let me know. I'm happy to revisit it. For now I plan to deploy this as the fix

Deployed in 4.10.0

Thank you! I missed the fact that DatabaseSchemaEditor is dealing with not with a whole migration, but with a specific operation.


Add methods to SessionUtils！

5197

 Quality gate: Failed
8 Issues

 6 Code issues
 2 Anti-patterns

Details

 Quality gate: Failed
8 Issues

 6 Code issues
 2 Anti-patterns

Details


New feature for tdt io: using sort code generated by offline sorting

The TDT format allows offline sorting and the sort code generated by offline sorting is stored as a separate file in their data folder (every data folder corresponding to a neo segment).
I the pull request, I implemented a feature to the tdtio.py: an option 'sortname' is offered so that the user could either use the original online sort code (by default) or the offline sort code if it matches the name in the folder.  This does not affect the behavior of this io of no sortname is given by the user
Best,
Shaobo

Coverage decreased (-2.9%) to 49.147% when pulling 4df46e30049c78c04a6df2582d78488c6287d4d3 on SummitKwan:master into e91d5bf34abcbed00fd676928807caa95fc202dd on NeuralEnsemble:master.

The 'sortname' feature looks fine.
There is a problem with the pull request, however, as it contains more than 50 or so files with no changes to their content, only a change in permissions. Please can you remove them from the PR, or create a new PR with only the relevant changes?

This look good. Thank you.
To avoid changes to all files I do git config core.fileMode false, so that chmod are not taken in account for git.

Manually merged in 376c97cc4231ca1a3b064951df2953568ea604ff to avoid the problems with the changes to file permissions.


Sort out why the build is broken

There may be a cleaner way to fix this, but it works.
(The issue: npm install wasn't being run on the server sub-project)


Looks like the icon fonts are down on the docs

Just an FYI.

Seems to be working for me.  Perhaps it was just a temporary glitch.  Could you test again?

Yeah, it's still happening. I tried in other browsers just in case, but the fonts still don't load.

hmm, I cleared cached and it was working fine.  Can anyone else report either success or failure?
And @chrbala: can you hit the font URL directly? http://ramdajs.com/fonts/glyphicons-halflings-regular.woff2

I'm now inclined to think there's something up with my computer. They still don't load when I tether my computer to my phone, but work fine on the phone itself.
Interestingly, when I try loading the page in Firefox (mac), I get a 'The connection was reset' error.

Ok, let us know if this persists.  If it's your local infrastructure, we'll call in the SWAT team.  With a fist full of monads, they can solve anything!  :smile:

thanks haha – I'm mostly curious at this point to know what the heck is going on. I can load the font directly on my mac, so it's a real mystery. It doesn't prevent me from reading the docs either, so ¯_(ツ)_/¯


The balance is displayed incorrectly if the wallet has a created asset

If you create an asset in CLI wallet and open this wallet in UI, the balance is displayed incorrectly

Asset names are not fully visible on the send screen

First issue fixed. Commit https://github.com/BeamMW/beam-ui/commit/85d348a7c0fa9d598bf22c3967c86c3c2632ea5c
Create a separate bug for the second issue please.

Remove the "-" under the amount

checked


OPeNDAP loading error for datasets with many zeros and NaNs

Hi, I have been struggling to read some opendap URLs using netcdf-python. I have tried with
versions '<IP_ADDRESS>' and '1.4.0', same issue. The same URLs work fine with many other opendap-enabled tools: ncview, plot with panoply and the ncdump and the ncotools work fine, but am having trouble reading into python using the netCDF4-python package.
I raised this issue at https://github.com/Unidata/netcdf4-python/issues/998  and @jswhit
kindly suggested I raise it here "since this is definitely happening in the C library".
Here is an example.
The OPeNDAP version of the data is:
http://esgf-data1.llnl.gov/thredds/dodsC/css03_data/CMIP6/CMIP/AS-RCEC/TaiESM1/historical/r1i1p1f1/SImon/siconc/gn/v20200218/siconc_SImon_TaiESM1_historical_r1i1p1f1_gn_185001-201412.nc
or it can downloaded directly from:
http://esgf-data1.llnl.gov/thredds/fileServer/css03_data/CMIP6/CMIP/AS-RCEC/TaiESM1/historical/r1i1p1f1/SImon/siconc/gn/v20200218/siconc_SImon_TaiESM1_historical_r1i1p1f1_gn_185001-201412.nc
The downloaded file ( <150M ) gives me no problems.
This particular OPeNDAP file is global seaice concentration, 'siconc' (time: 1980, latitude: 384, longitude: 320).  Although it throws an error when the whole dataset is requested,
it loads fine if the request is for a small enough chunk (in this case the first 1017 of 1980 time slices can be successfully loaded, but the first 1018 cannot). Note that the dataset consists of mostly NaNs (land values) and zeros (clear ocean values). The non-zeros are only at high latitude ocean grid points, so it is highly compressible.
Since the file opens in ncview and displays the whole dataset from beginning to end, I am assuming the trouble is not in the OPeNDAP server at "llnl.gov".  Is it possible that the netcdf-c package has a check on the expected cache size which cannot handle all of the zeros and NaNs? Any ideas, anyone?
python code:
'''
import netCDF4
OPENDAP_url =
'http://esgf-data1.llnl.gov/thredds/dodsC/css03_data/CMIP6/CMIP/AS-RCEC/TaiESM1/historical/r1i1p1f1/SImon/siconc/gn/v20200218/siconc_SImon_TaiESM1_historical_r1i1p1f1_gn_185001-201412.nc'
ncds = netCDF4.Dataset(OPENDAP_url)
ncds['siconc'][:]          # does not work
ncds['siconc'][:1000]  # works
'''
with the following error:
'''
RuntimeError
Traceback (most recent call last)
 in
5 i = nc_fid.variables['i'][:]
6 j = nc_fid.variables['j'][:]
----> 7 siconc = nc_fid.variables['siconc'][:,:,:]
netCDF4/_netCDF4.pyx in netCDF4._netCDF4.Variable.getitem()
netCDF4/_netCDF4.pyx in netCDF4._netCDF4.Variable._get()
netCDF4/_netCDF4.pyx in netCDF4._netCDF4._ensure_nc_success()
RuntimeError: NetCDF: Access failure
'''

Is it possible to get a C program that duplicates this issue? Otherwise, you may want to open this over at the python project, https://github.com/Unidata/netcdf4-python, and it will be linked back here if there is an issue related to the core C library.  As it stands, I can't determine if this is an issue in the C library or the upstream python package.

Unfortunately, the issue is due to size of the request although it does not seem to make sense when looking at the compressed file size. Although the data compress very well due to the repeated zero and 1.e+20f (_FillValue, missing_value) values , the data still have to be loaded into memory uncompressed before the TDS returns the DAP response. In this case, requesting the full variable is 1980 * 384 * 320 = 243,302,400 32-bit floating point values (roughly 930 MiB). Experimentally (through a frustrating and time consuming process, I'm sure), you found that 1017 * 384 * 320 = 124,968,960 32-bit floating point values (roughly 480 MiB) works. The default binary response from the DAP service shipped with the TDS is limited to 500 MB, so the first request is well over that limit, and the second request is just under it.
ncview and panoply most likely request only what is needed to generate a single image (so something like one time index, full spatial indices). ncdump does something interesting, in that it makes multiple requests like so:
Warning:fetch: https://esgf-data1.llnl.gov/thredds/dodsC/css03_data/CMIP6/CMIP/AS-RCEC/TaiESM1/historical/r1i1p1f1/SImon/siconc/gn/v20200218/siconc_SImon_TaiESM1_historical_r1i1p1f1_gn_185001-201412.nc.dods?siconc.siconc[0][0][0:319]
Warning:fetch complete: 0.057 secs
Warning:fetch: https://esgf-data1.llnl.gov/thredds/dodsC/css03_data/CMIP6/CMIP/AS-RCEC/TaiESM1/historical/r1i1p1f1/SImon/siconc/gn/v20200218/siconc_SImon_TaiESM1_historical_r1i1p1f1_gn_185001-201412.nc.dods?siconc.siconc[0][1][0:319]
Warning:fetch complete: 0.053 secs
Warning:fetch: https://esgf-data1.llnl.gov/thredds/dodsC/css03_data/CMIP6/CMIP/AS-RCEC/TaiESM1/historical/r1i1p1f1/SImon/siconc/gn/v20200218/siconc_SImon_TaiESM1_historical_r1i1p1f1_gn_185001-201412.nc.dods?siconc.siconc[0][2][0:319]
Warning:fetch complete: 0.056 secs
Warning:fetch: https://esgf-data1.llnl.gov/thredds/dodsC/css03_data/CMIP6/CMIP/AS-RCEC/TaiESM1/historical/r1i1p1f1/SImon/siconc/gn/v20200218/siconc_SImon_TaiESM1_historical_r1i1p1f1_gn_185001-201412.nc.dods?siconc.siconc[0][3][0:319]
...

So each request to the server is for a single time index, a single j index, and all i indicies. That means using ncdump to print out all of the values of the variable `siconc`` is going to require just over 760k requests to the server.
Other data access services offered by the TDS do not have the same size limits on requests. For example, I can use Siphon and the cdmremote service of the TDS to access the data without issue, but I'm not sure how using Siphon would fit within your specific end goals.

@lesserwhirls , thank you very much for your detailed response!  Good to know that Siphon + cdmremote might be a solution, but would require a large refactoring of our work flow.  We are part of the Pangeo effort to provide CMIP6 datasets in Google Cloud and have been using xarray to concatenate the datasets in time and convert to zarr format.   We were hoping to skip the step of downloading the data to our local drives and then uploading to the cloud, but found that all of the 'tracer' types of variables, in addition to seaice, have this same issue.
Anyway, thanks again for your very helpful comments!  I will now trace backwards through all of the folks I have involved in this and refer them to your comments

Thanks @lesserwhirls !

Very informative discussion! The key points appears to be this:

The default binary response from the DAP service shipped with the TDS is limited to 500 MB

It sounds like other software (e.g. ncview, panoply) is smart / lazy enough not to just grab all the data.
Fortunately, we can easily do this in the Pangeo stack as well, by using Dask to request the data in more manageable chunks.
import xarray as xr
OPENDAP_url = 'http://esgf-data1.llnl.gov/thredds/dodsC/css03_data/CMIP6/CMIP/AS-RCEC/TaiESM1/historical/r1i1p1f1/SImon/siconc/gn/v20200218/siconc_SImon_TaiESM1_historical_r1i1p1f1_gn_185001-201412.nc'
# the decode_times=False bit is required for the cftime time index
ds_opendap = xr.open_dataset(OPENDAP_url, chunks={'time': '100MB'}, decode_times=False)
display(ds_opendap)

This works fine and runs immediately. We can then load the data as
data = ds_opendap.siconc.compute()

This was quite slow for me (about 5 min to get < 1 GB of data), but it did complete successfully. Maybe a different size chunk would have better performance.

For example, I can use Siphon and the cdmremote service of the TDS to access the data without issue, but I'm not sure how using Siphon would fit within your specific end goals.

We should be looking in to how to integrate siphon into our CMIP6 pipeline. It has a lot of powerful capabilities that could help us out a lot. I raised an issue with some questions about this in https://github.com/Unidata/siphon/issues/258. That issue has a few code snippets that could be useful.

Another point that this issue raises is error messages. If the opendap server had said: Help! I can't handle requests larger than 500MB! Try making a smaller request. we probably would have been able to figure this out ourselves without lighting up three different issue trackers. Instead we got NetCDF: Access failure.
Is there a way we could propagate more informative errors through this stack?

Yes. If you  suffix your url with the string "#log"
e.g.:
'http://esgf-data1.llnl.gov/thredds/dodsC/css03_data/CMIP6/CMIP/AS-RCEC/TaiESM1/historical/r1i1p1f1/SImon/siconc/gn/v20200218/siconc_SImon_TaiESM1_historical_r1i1p1f1_gn_185001-201412.nc#log'
you should get some output that helps to figure out
what is happening. But it is still a bit opaque.
The problem is that the netcdf library cannot itself recognize that this happened
because it is a server problem.

There is a bug in 5.0 in which the response body isn't being returned in the server response (but still a 403 status). I will fix that. However, in 4.6 we do return a message. So are you saying this is as good as it gets when reading through netCDF-C?
from netCDF4 import Dataset
ds = Dataset("https://thredds.ucar.edu/thredds/dodsC/grib/NCEP/GEFS/Global_1p0deg_Ensemble/members/Best#log")
data = ds.variables['v-component_of_wind_isobaric_ens'][:]
Note:oc_open: server error retrieving url: code=403 message="Request too big=12216.71808 Mbytes, max=500.0"
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-55-addea7083b31> in <module>
----> 1 data = ds2.variables["v-component_of_wind_isobaric_ens"][:]

netCDF4\_netCDF4.pyx in netCDF4._netCDF4.Variable.__getitem__()

netCDF4\_netCDF4.pyx in netCDF4._netCDF4.Variable._get()

netCDF4\_netCDF4.pyx in netCDF4._netCDF4._ensure_nc_success()

RuntimeError: NetCDF: Access failure

There is no way to propagate the "Note:oc_open: server error ..." message upward, or capture that and give a more informative RuntimeError?

That looks like a good error message to me! Not sure if @naomi-henderson saw that in her stack trace...

Ah, that would have been very helpful! Never saw it. Here is what I see with your example:
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-17-72c7ec114606> in <module>
      1 from netCDF4 import Dataset
      2 ds = Dataset("https://thredds.ucar.edu/thredds/dodsC/grib/NCEP/GEFS/Global_1p0deg_Ensemble/members/Best#log")
----> 3 data = ds.variables['v-component_of_wind_isobaric_ens'][:]

netCDF4/_netCDF4.pyx in netCDF4._netCDF4.Variable.__getitem__()

netCDF4/_netCDF4.pyx in netCDF4._netCDF4.Variable._get()

netCDF4/_netCDF4.pyx in netCDF4._netCDF4._ensure_nc_success()

RuntimeError: NetCDF: Access failure

This is with netCDF4.version = '<IP_ADDRESS>'

So adding the #log suffix to the url makes it seem like you are asking the server to generate a debugging message. In reality, the server never even sees that because it's actually a client side switch. Adding a suffix to the access URL to get, essentially, client side debugging information is not at all intuitive. Using curl against the actual .dods request URL, we see:
curl -i "https://thredds.ucar.edu/thredds/dodsC/grib/NCEP/GEFS/Global_1p0deg_Ensemble/members/Best.dods?v-component_of_wind_isobaric_ens"
HTTP/1.1 403 403
Date: Wed, 11 Mar 2020 16:08:05 GMT
Server: Apache
X-Frame-Options: SAMEORIGIN
Strict-Transport-Security: max-age=63072000; includeSubdomains;
Access-Control-Allow-Origin: *
XDODS-Server: opendap/3.7
Content-Description: dods-error
Content-Security-Policy: frame-ancestors 'self'
Transfer-Encoding: chunked
Content-Type: text/plain

Error {
    code = 403;
    message = "Request too big=12216.721864 Mbytes, max=500.0";
};

That's the kind of info the C library should have access to, and that's how the "Note:oc_open: server error ..." message is generated. Adding the #log suffix just tells netCDF-C to show you that (or more specifically, lib oc, which looks to be part of the netCDF-C codebase).
@naomi-henderson, do you know what version of netCDF-C you are using? (netCDF4.__netcdf4libversion__)?

@lesserwhirls

netCDF4.netcdf4libversion = '4.6.2'

You need to review the RFC for URLs. The Fragment suffix is
explicitly client side. and is never sent to the server.

The 403 in the message is the standard HTTP access failure, which is
properly propagated. The problem is that the important info
is in English text in the message part. So to propagate the message
would require some kind of parsing of the message to try to figure out
what it means. We could do pattern matching for messages and hope
that the server returns a standard message text that we could recognize.
This would be, of course, server implementation dependent.

You need to review the RFC for URLs. The Fragment suffix is
explicitly client side. and is never sent to the server.

100% true, but I still say it isn't intuitive for a lot of users.

The 403 in the message is the standard HTTP access failure, which is
properly propagated. The problem is that the important info
is in English text in the message part. So to propagate the message
would require some kind of parsing of the message to try to figure out
what it means. We could do pattern matching for messages and hope
that the server returns a standard message text that we could recognize.
This would be, of course, server implementation dependent.

First, in the case of netCDF-C and the TDS, we control both sides of the problem, so the least we can do for our users is to tell them something useful, no matter how we make it happen. Second, do we need pattern matching? Can we pass on the plain text of the response message if the status is in the 400 range without using #log?

The problem being addressed is how to send information down the stack.
Using the fragment is one way. There is a different syntax that is
the same thing, namely prefix the URL with e.g. '[log]https://...'
Neither is particularly intuitive. The #... form is preferred because
it is consistent with the RFC url syntax. The other form causes some systems
(e.g. some python packages) to fail because it is a non-standard URL.

As usual, I am overthinking things.

Can we pass on the plain text of the response message if the status is in the 400 range without using #log?
This is the right solution. I will implement it.


why not set bn_training=False when  test net on x_qry in finetunning phase

in finetunning phase why you set bn_training=True when test net on x_qry ?
line 178 、188 and 204  in meta,py

I'm not the author, but https://github.com/cbfinn/maml/issues/9 might answer your question.

I have faced with the same problem. It sounds better if we screen off the running batch mean/var estimation when testing(a.k.a. fine-turning). I will try it.


OASIS_Infobyte_unemployment analysis in Python

To create a project that combines Python programming, artificial intelligence (AI), and a graphical user interface (GUI) to analyze the unemployment rate during the Covid-19 pandemic, we can utilize data visualization, machine learning, and Tkinter for the GUI. Here's an example of how you can approach this project:
Gather the data:
Collect historical unemployment rate data during the Covid-19 pandemic. You can obtain this data from reliable sources such as government websites or statistical databases.
Organize the data in a suitable format, such as a CSV file, where each row represents a specific time period (e.g., month or quarter) and includes the corresponding unemployment rate.
Install the necessary libraries:
Ensure that you have the required libraries installed, including Pandas for data manipulation, Matplotlib for data visualization, scikit-learn for machine learning, and Tkinter for the GUI.
Install missing libraries using the command pip install library_name.
Design the GUI using Tkinter:
Create a GUI window using Tkinter.
Add appropriate widgets such as labels, buttons, and a plot area to display the unemployment rate graph.
Define callback functions for button clicks and data processing.
Load and preprocess the data:
Use Pandas to load the unemployment rate data from the CSV file.
Preprocess the data as needed (e.g., convert date strings to datetime format, handle missing values, etc.).
Analyze the unemployment rate:
Utilize data visualization techniques to plot the unemployment rate graph over time.
Implement machine learning algorithms (e.g., time series forecasting) to predict future unemployment rates or identify trends and patterns in the data.
Integrate the data analysis with the GUI:
Connect the GUI widgets to the corresponding functions for data analysis.
Update the graph in the GUI to display the unemployment rate and any additional analysis results.
Enhance the GUI with interactive features such as zooming, panning, or selecting specific time periods for detailed analysis.
Here's a sample code to illustrate the structure of the project:
Make sure to replace 'unemployment_data.csv' with the actual path to your unemployment rate data file.
This code provides a basic structure for the project. You can extend it by adding more features, such as interactive elements to explore specific time periods, incorporating AI techniques for forecasting or anomaly detection, or including additional data sources to gain deeper insights into the unemployment rate during the Covid-19 pandemic.
import tkinter as tk
import pandas as pd
import matplotlib.pyplot as plt
Function to load and preprocess the data
def load_data(file_path):
data = pd.read_csv(file_path)  # Update with the actual path to your data file
data['Date'] = pd.to_datetime(data['Date'])
data.set_index('Date', inplace=True)
return data
Function to plot the unemployment rate graph
def plot_unemployment_rate(data):
plt.figure(figsize=(10, 6))
plt.plot(data.index, data['Unemployment Rate'], color='blue')
plt.title('Unemployment Rate during Covid-19')
plt.xlabel('Date')
plt.ylabel('Unemployment Rate')
plt.xticks(rotation=45)
plt.grid(True)
plt.show()
Function to handle button click event
def analyze_data():
data = load_data('unemployment_data.csv')  # Replace with the actual path to your data file
plot_unemployment_rate(data)
Create the main window
window = tk.Tk()
window.title("Unemployment Analysis")
Create a button to analyze the data
analyze_button = tk.Button(window, text="Analyze", command=analyze_data)
analyze_button.pack(pady=10)
Start the GUI event loop
window.mainloop()


Question: Encryption

Is there any way to support encryption?

in short yes. does it support it now? Obviously not. Would it be easy to add encryption? It would be quite involved..

A relatively easy way would be to use SQLCipher. I support a SQLCipher version of the Cordova plugin at: https://github.com/litehelpers/Cordova-sqlcipher-adapter

Hey Andpor,
I'm working on encryption implementation for android and ios in our internal repository.
I would be eager to contribute back to your project.
I have following questions for you:

which project would better suit for integration of android sqlitecipher? android or android-native. I'm not exactly sure what would be purpose of native proejct with the sqlitecypher.
Internally I've made it in android as it's way easier to do - just replace the import and it works.
I'm not sure if that make sense to do in android-native as sqlitecipher for android is absolutely different native implementation of sqltie with encryption enabled on the page level.

for iOS what would be the best way to integrate sqlite cyper? It looks like I would need to have an access to the library sources at least according to this tutorial:
https://www.zetetic.net/sqlcipher/ios-tutorial/
Would you be ok with git submodule?

Also we would need to have a different api as for migration purposes we would need to be able to open some databases in encrypted mode and some in unencrypted.

That would require some API changes.
Would you prefer to have an additional method to open db in encryped mode or
to have an additional password argument to the existing open method?

To be honest I would favor supporting sqlcipher in a separate project. SQLCipher adds some things that the rest of the community would not want for a couple major reasons:

relatively minor: sqlcipher has additional license terms though permissive
major: including encryption capability leads to additional export requirements ref: https://discuss.zetetic.net/t/export-requirements-for-applications-using-sqlcipher/47

This is what I did in the Cordova sqlite/sqlcipher plugins that I maintain. Yes it would probably be a pain to keep merging changes but this may be the best solution for now.

@andpor do you plan to create a sqlcipher version of this? Looking to use this library in a react app but need sqlcipher support - If you don't plan to create one, we might do it ourselves.
cc @itsrifat @ericsvmx

@maxpowa you may have to do it yourself. I don't think the owner @andpor will do this and @dryganets seems to have dropped off. I hope someone will share a version with sqlcipher with the user community.
To answer some questions raised by @dryganets:

which project would better suit for integration of android sqlitecipher? android or android-native. I'm not exactly sure what would be purpose of native proejct with the sqlitecypher.
Internally I've made it in android as it's way easier to do - just replace the import and it works.

I think that is the correct way, assuming you include the SQLCipher JAR and native libs. The android-native version uses my Android-sqlite-connector library which is currently not supported with SQLCipher. (I hope to do this someday ref: https://github.com/sqlcipher/sqlcipher/issues/125)

for iOS what would be the best way to integrate sqlite cyper? It looks like I would need to have an access to the library sources at least according to this tutorial:
https://www.zetetic.net/sqlcipher/ios-tutorial/
Would you be ok with git submodule?

I tried using a git submodule in the past and was not so happy with it. It adds an extra build step which is not so great for plugins and I find it a bit inflexible in certain ways. For example: if I would remove an external module from git then add it again (from a different location for example) there is still an extra artifact in the local .git tree in the way.
I think your best bet is to just include the sqlcipher code, libs, and dependencies in your git repo. You should be able to use git to merge in updates from this git project moving forward. I can think of the following extra alternatives:

In the original cordova-sqlite-storage project I fetch the sqlite dependencies by npm through a Cordova hook script but this causes problems with some build systems.
It may be possible to use a npm prepublish script to include external module dependencies, like I see in https://github.com/nolanlawson/cordova-plugin-sqlite-2.

I could prepare a pull request with SQLite cipher for both iOS and android If there are enough people interested in it.
We are using this internally for a few months.
It's worth to mention that SQLite cipher supports only exclusive transactions out of the box so you might experience some performance degradation as result of usage of the plugin.
I have a couple of fixes to share with the community as well.
In the long term, we are going to move to our internal implementation as:

Error handling is not production ready. We have some hard to explain crashes in production inside of the current plugin implementation. I was trying to inject the errors in different paths of the native code and I still can't repeat the same problem. It says that transaction has failed but in reality, hell know what happened inside.
Transactions implementation is weird. I don't understand why I need artificial Select 1;. Read transaction should be a non-exclusive transaction. Write transaction should be an exclusive transaction. Now read is select 1 and write is a read transaction. We have a transaction which needs to live during multiple bridge round trips and be exclusive. Now it's true only because of SQLite cipher transaction implementation.
Native threading model allows only single thread per DB. One thread for the DB is probably good enough for most of the cases but I want to experiment with it in order to improve application startup time.

If plans wouldn't change I will start on our internal implementation of the plugin in typescript. But it would take a time to release it's publically.

@brodybits,
As promised I send pull requests with our changes required for SQLiteCipher to work.
This is the first part not actually related to SQLiteCipher itself so it could be contributed to the main repository.
Android toLowerCase fix for Turkish locale. It's a root cause of insert and begin commands failures for Turkish locale. Probably specific to SQLiteCipher too, but the fix is safe anyway:
https://github.com/andpor/react-native-sqlite-storage/pull/128
Android correctly close statements and queries:
https://github.com/andpor/react-native-sqlite-storage/pull/129
I initially didn't plan to fix the attach logic in the android-native plugin, but turns out that android-native doesn't even compile.
iOS fix for crash on module dealloc:
https://github.com/andpor/react-native-sqlite-storage/pull/130

@dryganets - this is awesome. Thanks a lot for these. I will review and merge tonight.

https://github.com/dryganets/react-native-sqlite-storage/tree/sergeyd/sqlite-cipher
has our implementation.
I would make sure that iOS builds correctly tomorrow.
See android module for android integration.
ios integration is done through cocoapods
just pass the key parameter in addition and it would encrypt your database.

From https://github.com/andpor/react-native-sqlite-storage/pull/132#issuecomment-282272679:

@dryganets Sergey - if it is a small diff maybe it would make sense to incorporate it somehow to this module...I would have no objections actually..can you suggest something?

@andpor I would recommend keeping encryption separate. When publishing apps with encryption people would have to follow the guide at https://discuss.zetetic.net/t/export-requirements-for-applications-using-sqlcipher/47 and it may be even worse in places like France.

Yep, It's better to make a plugin system.
That would give you control over the library you use and wouldn't require an additional dependency if you don't need it.
In addition to that we get rid of an extra project with code duplication.

According to @brodybits arguments: can we leave this optional per #ifdef direction on objC-Side and something similar on android?
For those who need encryption they can activate it then easily and others don't have to ship one more MB with the app and aren't bothered by the export-requirements for apps using cipher

There is no #ifdef on android. I think I would take a time at some moment and refactor this to plugin model on android.
As for iOS - I updated the branch.
I don't know if there is a better way to integrate it honestly. Any ideas are welcome.
I'm not an iOS developer ;)
Basically, the problem is to have relative path to sqlite ciper customized.
As we have our module with sqlite cipher integrated to the react-native-sqlite-storage.
And we have react-native-sqlite-storage integrated through npm into the main project.
Npm paths are different for the main project and sqlite plugin and both need SQLiteCipher.
My intention was to keep plugin compile as a part of another project and separately.
On android, it's not a problem as we have a gradle and we could just consume it.
On iOS I choose cocoa pods integration and this way requires react native sources modification.
They are using <React/Header> and by some reason pods sees only "Header"
maybe it's my bad, though and there is a better way to do it.

@dryganets  This changed with RN 0.40 from "header" to <React/Header>. That means you should just concentrate on the ne format <React/Header>

Probably, I just didn't figure out how to make it compile with pods @itinance :(
I see that cocoa pods users and swift developers are not happy with this change:
https://github.com/facebook/react-native/commit/e1577df1fd70049ce7f288f91f6e2b18d512ff4d
For now, we have our own fork of react-native for Skype so we are free to revert this commit.

@dryganets  can you tell me a concrete issue? CocoaPods works well in my newest app (i am working on several ones using RN) and the thing with headers is that there was a huge change with RN 0.40 as you can see in the commit of you previous comment here
i'd like to help you on iOS-side

https://github.com/CocoaPods/CocoaPods/issues/4605
I think this is the root cause as result <React/ ... > can't be found.
as a structure is flattened.

i have run the latest with cocoapods setup and have not had any issues...i am not sure I understand what the problem is...

Hi, and thanks for the awesome work guys.
Could we get some instructions down the line on how to set up react-native-sqlite-storage with encryption?

@dryganets is the man behind the encryption...maybe he can share how to get this going.

@half-shell ,
Integration should be as easy as:

add my fork to your package.json.
npm install
link android (not android-native) to your application the same way it described in documentation for this package
Link iOS to your application using cocoapods.
Fix bugs on iOS if you have any. I had problems with imports though we are on 0.34.0 version of react-native still.

When I would have a time I'll add sample app to my fork and add the more accurate description.
All changes you need on js level - pass the key as a parameter to the open method.
Though now it doesn't re-encrypt the database if it wasn't initially encrypted, so if you have a database on the same path - it's going to fail you.
It should be easy to fix, as I remember there is a function to re-encrypt the database in sqlitecipher though we don't have such a use-case so it's not implemented.

Hi, with the latest release, we experienced this issue when compiling the iOS project:

implicit declaration of function sqlite3 key is invalid in c99

The library works fine until 3.2.2 so the cipher support is a breaking change. As @brodybits mentioned, would it be possible to keep the encryption separate?

@mikaelfs +1
same here like this

this is fixed in 3.3.1

@dryganets Your fork is awesome,
but I would like to know more on how Android can make use of SQLCipher? iOS side has no problem, yet not working on Android... But I'm quite sure I have linked it well. I have to manually import SQLCipher jars and native libs right?

See android module for android integration.
Can you tell me which files I have to go through (actually I am an iOS developer :P)
And I didn't see anywhere in Android to set the key for the database?

@henryphtang
https://github.com/dryganets/react-native-sqlite-storage/blob/sergeyd/sqlite-cipher/src/android/src/main/java/org/pgsqlite/SQLitePlugin.java
already uses SQLite cipher packages.
https://github.com/dryganets/react-native-sqlite-storage/blob/sergeyd/sqlite-cipher/src/android/build.gradle
has sqlitecipher as a dependency already, so it should work out of the box.
So if you are using https://github.com/dryganets/react-native-sqlite-storage/blob/sergeyd/sqlite-cipher/src/android everything should work.
https://github.com/dryganets/react-native-sqlite-storage/blob/sergeyd/sqlite-cipher/src/android-native doesn't have sqlitecipher integrated.
I'll try to take a time on this weekend and contribute the plugin system to this repository.
This way we could drop android-native support later on.
There is too much of duplicated code in there ...

https://github.com/dryganets/react-native-sqlite-storage/tree/sergeyd/plugin-system
It's work in progress already close to done, but I didn't finish few moments yet + needs to be tested.
Will see if I'll find time next weekend :)

It looks like it is pretty close:
https://github.com/andpor/react-native-sqlite-storage/pull/187

btw @dryganets - I have added a #ifdef for SQLCIPHER to iOS codebase for SQL Cipher key retrieval. If you define this at your main project level the library will pick up the code automatically else it will just work as plain database.

I have added a #ifdef for SQLCIPHER to iOS codebase for SQL Cipher key retrieval. If you define this at your main project level the library will pick up the code automatically else it will just work as plain database.

Quick question: SQLCipher would usually use CommonCrypto by default on iOS to do the actual encryption. Can you tell if this would already be linked by this plugin, the react-native framework, or something else?
In general a library should not link to such a framework, even dynamically, unless explicitly required for the application.

Could you update the component as cipher support?

Guys, does react-native-sqlite-storage supports encryption databases?


eot_utilities: change platforms to unix

Motivation for this change
This works on Darwin too.
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[ ] NixOS
[x] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[x] Fits CONTRIBUTING.md.

@grahamcofborg build eot_utilities

Success on x86_64-linux (full log)
Attempted: eot_utilities
Partial log (click to expand)
these paths will be fetched (0.01 MiB download, 0.04 MiB unpacked):
  /nix/store/hmna5wz72y1hdm63nc9hgy7107j6sw27-eot_utilities-1.1
copying path '/nix/store/hmna5wz72y1hdm63nc9hgy7107j6sw27-eot_utilities-1.1' from 'https://cache.nixos.org'...
/nix/store/hmna5wz72y1hdm63nc9hgy7107j6sw27-eot_utilities-1.1

Success on aarch64-linux (full log)
Attempted: eot_utilities
Partial log (click to expand)
these paths will be fetched (0.01 MiB download, 0.04 MiB unpacked):
  /nix/store/8pfppqr80lsgz4p3prvihngqi2is07n7-eot_utilities-1.1
copying path '/nix/store/8pfppqr80lsgz4p3prvihngqi2is07n7-eot_utilities-1.1' from 'https://cache.nixos.org'...
/nix/store/8pfppqr80lsgz4p3prvihngqi2is07n7-eot_utilities-1.1

I am waiting on OfBorg but it has been having some issues on darwin lately. If someone else can independently verify that it builds for them that should be enough to merge this.

Success on x86_64-darwin (full log)
Attempted: eot_utilities
Partial log (click to expand)
  /nix/store/qm5zn979n56z1vwhf3wh1r7zkw6z581j-coreutils-8.29/bin/install -c mkeot eotinfo '/nix/store/asi20xcj02q4gsi8p59fbv7nrg2qcky8-eot_utilities-1.1/bin'
test -z "/nix/store/asi20xcj02q4gsi8p59fbv7nrg2qcky8-eot_utilities-1.1/share/man/man1" || /nix/store/qm5zn979n56z1vwhf3wh1r7zkw6z581j-coreutils-8.29/bin/mkdir -p "/nix/store/asi20xcj02q4gsi8p59fbv7nrg2qcky8-eot_utilities-1.1/share/man/man1"
 /nix/store/qm5zn979n56z1vwhf3wh1r7zkw6z581j-coreutils-8.29/bin/install -c -m 644 mkeot.1 eotinfo.1 '/nix/store/asi20xcj02q4gsi8p59fbv7nrg2qcky8-eot_utilities-1.1/share/man/man1'
make[1]: Leaving directory '/private/tmp/nix-build-eot_utilities-1.1.drv-0/eot-utilities-1.1'
post-installation fixup
gzipping man pages under /nix/store/asi20xcj02q4gsi8p59fbv7nrg2qcky8-eot_utilities-1.1/share/man/
strip is /nix/store/sixx1lfy97125f6hxymbwn64cb8z62p3-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/asi20xcj02q4gsi8p59fbv7nrg2qcky8-eot_utilities-1.1/bin
patching script interpreter paths in /nix/store/asi20xcj02q4gsi8p59fbv7nrg2qcky8-eot_utilities-1.1
/nix/store/asi20xcj02q4gsi8p59fbv7nrg2qcky8-eot_utilities-1.1