Support virtual sites in GROMACS export

Commit history should clean up if/when #244 is merged
TODO:

[ ] Implement "charge increment" behavior
[ ] Virtual sites need to know what residues they're in

Probably obtainable just by querying the residue of the anchor atom - but what happens if a virtual site is added at the boundary between two residues?

[ ] MonovalentLonePair
[ ] DivalentLonePair
[ ] TrivalentLonePair
[ ] TIP4P example
[ ] TIP5P example

Here's a notebook that adds a sigma hole virtual site to a chloromethane and runs it with GROMACS: sigma_hole.ipynb.txt
It probably won't work for anything more complicated than this, and it also does not apply the "charge increments" from the anchor atoms to the virtual sites.

Need to manually add extra exclusions for all atoms that are some number of atoms away from a virtual site or fewer: https://manual.gromacs.org/documentation/current/reference-manual/topologies/molecule-definition.html#exclusions
Also probably need to change ptype to D?

And here's a similarly partially-functional TIP4P implementation: tip4p_broken.zip

This is getting unwieldy, I'm going to accept the pain of merging an incomplete feature branch instead of suffering through a monstrous merge if/when this is fully implemented.


Configuration for Typescript

I'm new to Aurelia JS,
I downloaded the TS kit, I followed the instructions, but  gulp watch , it complains about missing gulpfile.js, I don't knwo what I'm supposed to put in that file..
I end up creating a file in the src folder :

"compilerOptions":{
"target": "ES5",
"module": "system",
"emitDecoratorMetadata": true,
"experimentalDecorators": true
}

And I modified the package.json that way:

...
"name": "AureliaPlay",
"version": "1.0.0",
"description": "A TEST",
"main": "src/main.js",
"scripts": {
"tsc": "tsc -p src -w",
"start": "live-server --open=src",
"devDependencies": {
"aurelia-bundler": "^0.1.8",
"aurelia-tools": "^0.1.3",
"jspm": "^0.16.11"
},
"jspm": {

.....
<.br>

I launch TypeScript compiler this way  npm run tsc  everything sames to work as expected!
I'm doing something (the whole thing ) wrong ?
Thank you.

I downloaded the wrong kit (the official kit doesn't  include required file anyway )

Sorry for the confusion! We are going to try to make the docs a little clearer. We basically have two versions. One we call the "beginner kit" which is designed to help those new to Aurelia get up and running quickly without worrying about builds, package managers, etc. The other is our "skeleton" which is designed more for someone who is ready to build an app.

Thank you for your feedback @EisenbergEffect


Broke composer commands when used with wp-cli/package-command

Problem/Motivation
When used with wp-cli/package-command, composer fails to execute post-install commands.
note that this issue has been cross-posted to https://github.com/wp-cli/package-command/issues/99
Steps to reproduce

Create a minimal composer.json file:

{
  "require": {
    "php": ">=7.0.0"
  },
	"require-dev": {
		"wp-cli/package-command": "*@stable",
		"dealerdirect/phpcodesniffer-composer-installer": "*"
	},
  "scripts": {
    "post-install-message": [
      "echo 'OK'"
    ],
    "post-install-cmd": [
      "composer run post-install-message"
    ],
    "post-update-cmd": [
      "composer run post-install-message"
    ]
  }
}

Run composer install

Expected behaviour
Displays OK
Actual behaviour
Throws the following error
> post-update-cmd: composer run post-install-message
Executing command (CWD): composer run post-install-message

Fatal error: Uncaught Error: Class 'Symfony\Component\Process\ProcessBuilder' not found in /src/test/vendor/dealerdirect/phpcodesniffer-composer-installer/src/Plugin.php:118
Stack trace:
#0 /src/test/vendor/dealerdirect/phpcodesniffer-composer-installer/src/Plugin.php(103): Dealerdirect\Composer\Plugin\Installers\PHPCodeSniffer\Plugin->init()
#1 /src/test/vendor/composer/composer/src/Composer/Plugin/PluginManager.php(236): Dealerdirect\Composer\Plugin\Installers\PHPCodeSniffer\Plugin->activate(Object(Composer\Composer), Object(Composer\IO\ConsoleIO))
#2 /src/test/vendor/composer/composer/src/Composer/Plugin/PluginManager.php(205): Composer\Plugin\PluginManager->addPlugin(Object(Dealerdirect\Composer\Plugin\Installers\PHPCodeSniffer\Plugin))
#3 /src/test/vendor/composer/composer/src/Composer/Plugin/PluginManager.php(261): Composer\Plugin\PluginManager->registerPackage(Object(Composer\Package\CompletePackage))
#4 /src/test/vendor/composer/composer/src/Composer/Plugin/PluginManager.php(76): Composer\Plugin\PluginManager->loa in /src/test/vendor/dealerdirect/phpcodesniffer-composer-installer/src/Plugin.php on line 118
Script composer run post-install-message handling the post-update-cmd event returned with error code 255

I get the same error just requiring composer/composer (v1.7.2). Since wp-cli/package-command requires that, too, it seems like the likely problem.

These are triggered by the post-install-cmd and post-update-cmd, without those, it just works fine.
Looking for a reason though.

Not yet sure why, but this example works:
{
  "scripts": {
    "post-install-message": [
      "echo 'OK'"
    ],
    "post-install-cmd": [
      "@post-install-message"
    ],
    "post-update-cmd": [
      "@post-install-message"
    ]
  }
}

composer update nothing                                                                                255 ↵ ──(Fri,Oct26)─┘
    1/1:	http://repo.packagist.org/p/provider-latest$561b6908c662cbfac3a452b5f1e49c717a2ddddef2268db65c962aa3de0efd77.json
    Finished: success: 1, skipped: 0, failure: 0, total: 1
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
PHP CodeSniffer Config installed_paths delete
> echo 'OK'
OK

So this problem is isolated to when Composer invokes itself? Investigating a little more.

When running the full command from within the post-install-*, a different composer is used: The one shipped/installed in the vendor.
So this would actually trigger the same error:
$ ./vendor/bin/composer run post-install-message

Fatal error: Uncaught Error: Class 'Symfony\Component\Process\ProcessBuilder' not found in /Volumes/CODE/dealerdirect/phpcodesniffer-composer-installer/src/Plugin.php:130
Stack trace:
#0 /Volumes/CODE/dealerdirect/phpcodesniffer-composer-installer/src/Plugin.php(110): Dealerdirect\Composer\Plugin\Installers\PHPCodeSniffer\Plugin->init()
#1 /Volumes/CODE/dealerdirect/codesniffer-test2/vendor/composer/composer/src/Composer/Plugin/PluginManager.php(236): Dealerdirect\Composer\Plugin\Installers\PHPCodeSniffer\Plugin->activate(Object(Composer\Composer), Object(Composer\IO\ConsoleIO))
#2 /Volumes/CODE/dealerdirect/codesniffer-test2/vendor/composer/composer/src/Composer/Plugin/PluginManager.php(205): Composer\Plugin\PluginManager->addPlugin(Object(Dealerdirect\Composer\Plugin\Installers\PHPCodeSniffer\Plugin))
#3 /Volumes/CODE/dealerdirect/codesniffer-test2/vendor/composer/composer/src/Composer/Plugin/PluginManager.php(261): Composer\Plugin\PluginManager->registerPackage(Object(Composer\Package\CompletePackage))
#4 /Volumes/CODE in /Volumes/CODE/dealerdirect/phpcodesniffer-composer-installer/src/Plugin.php on line 130

OK, so the ProcessBuilder no longer exists in the Symfony/Process package >=4.0, which is causing this issue. Looking into rewriting the Plugin the use the Composer\Util\ProcessExecutor.

This has been fixed in the current master branch and will be part of the next release.


[just for feedback] Flycheck individual function

This is an attempt to display rustc errors while editing code. We can't run cargo check on whole project because it will burn the cpu and take some seconds to finish (is this the problem?), But we can check the under edit function by including it and header of what it uses.
For example, we want to check foo function in this code:
//- minicore: option, clone, derive
enum Gav {
    Var1(Option<Baz>),
    Var2,
}
struct Baz(i32);
#[derive(Clone)]
struct Bar;
#[derive(Clone)]
struct Foo(i32, Bar, Bar);

fn bar(x: Gav) -> i32 {
    match x {
        Var1 => Baz(34).0,
        Var2 => 43,
    }
}

fn foo_to_gav(x: Foo) -> Gav {
    todo!()
}

fn fo$0o(x: core::option::Option<Foo>) -> i32 {
    if let Some(x) = x {
        bar(foo_to_gav(x.clone()))
    } else {
        5
    }
}

This PR contains a code that generate this code:
struct _ra_S1;struct _ra_S2(i32,_ra_S1,_ra_S1,);pub enum _ra_E0<T>{None,Some(T,),}struct _ra_S0(i32,);enum _ra_E1{Var1(_ra_E0<_ra_S0>,),Var2,}fn _ra_f0(x: _ra_E1) -> i32{loop{}}fn _ra_f1(x: _ra_S2) -> _ra_E1{loop{}}pub trait _ra_T1
where
    Self: Sized,{pub fn clone(&self) -> Self{loop{}}}impl _ra_T1 for _ra_S2 {}
pub(crate) use _ra_S2 as Foo;pub(crate) use _ra_f1 as foo_to_gav;pub(crate) use _ra_E0::Some as Some;pub(crate) use _ra_f0 as bar;pub mod core {pub mod option {pub(crate) use super::super::_ra_E0 as Option;}}
fn main() { let _ = foo; }
fn foo(x: core::option::Option<Foo>) -> i32 {
    if let Some(x) = x {
        bar(foo_to_gav(x.clone()))
    } else {
        5
    }
}

The code is no where near complete, Its only a proof-of-concept and I just wanted to make sure it works. We can send this code to rustc (or clippy or ...), get the result, shift the span to match original input and show them (this is not implemented in this PR, and I don't exactly know how to do it)
Problems

Macros inside of target function: If we expand them, finding original spans will become hard (currently target function is included as is, so finding original span is trivial). If we keep them, it is against the point and slows the compile process (specially with proc macro). We can ignore function with macros in start.
Detecting under edit function: Can we find the last function that invalidated the cache? This part is not clear to me but I believe it should be possible.
Names: Diagnostics will contain something like "binary operation == cannot be applied to type _ra_E0<_ra_E0<_ra_S2>>" and we should restore original names.
Privacy: It brings everything in the visibility of the target function. We can emit native diagnostics for privacy errors easily, but it still can lead to inapplicable suggestions and such. If it becomes too bad in practice, we should preserve the structure of modules and crates.
False positive due wrong analysis: Mistakes in resolving functions and traits will lead to super wrong errors. We may want to disable in functions that analysis is not certain.
Something that I missed and will render it completely unusable in real world.

Any comments? Is it in the right direction? It is somehow hacky and we may want to do it in a more reasonable way, for example by calling special rustc apis designed for this propose.

I think while it's a nice idea, there are several problems with this approach.

Most importantly, we do not want to build so much on top of flycheck. Flycheck is a stopgap while we don't have enough diagnostics implemented natively. We want to move towards having more native diagnostics and sharing more code with rustc, and this would be a lot of complicated code to make this work that does not contribute towards that end goal.
IMO the idea of trying to determine the "last edited" function isn't quite right. I think what we really want is to only compute diagnostics for the text ranges that the user is actually looking at, maybe expanding to the whole files. Ideally that'd work by the client requesting diagnostics explicitly, though alternatively maybe it could tell us the ranges it's currently focusing on separately.
"We can't run cargo check on whole project because it will burn the cpu and take some seconds to finish (is this the problem?)" -- I'm not sure what you mean by "the problem". We do run cargo check on the whole project. We can't run it without saving because we don't have a way to provide rustc with the non-saved file contents and we don't want to use nightly-only APIs.

Most importantly, we do not want to build so much on top of flycheck. Flycheck is a stopgap while we don't have enough diagnostics implemented natively. We want to move towards having more native diagnostics and sharing more code with rustc, and this would be a lot of complicated code to make this work that does not contribute towards that end goal.

So we want to drop flycheck at some point? There are dozens of lint in rustc and hundereds in clippy, implementing all of them natively is duplicate effort and not a good idea IMO. I can see a shared lint library as a final solution, but a very very far one?

IMO the idea of trying to determine the "last edited" function isn't quite right. I think what we really want is to only compute diagnostics for the text ranges that the user is actually looking at, maybe expanding to the whole files. Ideally that'd work by the client requesting diagnostics explicitly, though alternatively maybe it could tell us the ranges it's currently focusing on separately.

Nothing prevent us from running it on all functions of a file. Running rustc on the example above takes 100ms, but running it on 10 copies of it still takes 100ms and 100 copies of it takes 300ms. So we can run it on all functions of a file on open in ~500ms, and all changed functions in ~100ms, showing diagnostics in every visible function.

We do run cargo check on the whole project

I mean, we don't do it on each keystroke. That sentence is just saying that there is a problem with current flycheck and this one is better.

So we want to drop flycheck at some point? There are dozens of lint in rustc and hundereds in clippy, implementing all of them natively is duplicate effort and not a good idea IMO. I can see a shared lint library as a final solution, but a very very far one?

I think the idea is that eventually librarification of rustc will allow sharing most code, including lints, between rustc and rust-analyzer, with only the glue code being different to allow for eager batch compilation (rustc) vs incremental on-demand analysis (rust-analyzer).

See also #3107 for some more context. Performance is not the main reason that we don't run check on type, the lack of a VFS that can be shared with rustc is.

I think the idea is that eventually librarification of rustc will allow sharing most code, including lints, between rustc and rust-analyzer, with only the glue code being different to allow for eager batch compilation (rustc) vs incremental on-demand analysis (rust-analyzer).

I know the plan, but progress on librarification is somehow slow. And a shared lint library is probably in the last steps. It depends on shared ast, shared types, shared hir, ... so I think it takes years.

See also #3107 for some more context. Performance is not the main reason that we don't run check on type, the lack of a VFS that can be shared with rustc is.

hmm, I tried auto save as suggested in that thread, it turned on laptop fans and some errors take ~5s to appear, but it wasn't as bad as I expected. I thought running it on save is some kind of throttling for saving system resources. Flycheck + autosave is not perfect, but it works, and this one is not flawless either, so we can close it.


Question: reason kerberos host not supported?

Hi,
Just wondering if there is/was a reason the krb_host config property is not supported.
I am having issues because the host I am connecting to is different from my kerberos host, and there doesn't seem to be a way to specify that in the config.
It seems like a simple fix - this line seems to just pass the provided config into the impala module, which already supports a krb_host parameter (see here).
So just wondering if it is possible to support the krb_host property on this adapter. Happy to help with that if so...
Thanks!

@Mac-lp3 thanks for surfacing it, please feel free to open the PR and add the appropriate tests. We will review and merge the changes.


Unable to Authenticate

Describe The Bug:
When attempting to authenticate, the page does not load as expected. I have tried Safari and Chrome
To Reproduce:
Click "LAUNCH SIMPLISAFE LOGIN" from the Homebridge UI.
Expected behavior:
The page should load the proper URL to authenticate
Environment:

Plugin version:  v1.9.11
Node.js Version: v16.13.2
NPM Version: v8.1.2
Homebridge Version: v1.4.0
Operating System: macOS 12.3 beta

Homebridge Config:
{
"name": "Home Alarm",
"cameras": false,
"sensorRefresh": 15,
"persistAccessories": true,
"resetSimpliSafeId": false,
"cameraOptions": {
"enableHwaccelRpi": false
},
"platform": "homebridge-simplisafe3.SimpliSafe 3",
"_bridge": {
"username": "username",
"port": 38265
}
Screenshots:

Logs:
[3/13/2022, 10:10:33 PM] [Homebridge UI] [homebridge-simplisafe3] Incoming Request: /getAuthCodeFromUrl
[3/13/2022, 10:17:45 PM] [Homebridge UI] [homebridge-simplisafe3] Terminating child process...
[3/13/2022, 10:17:45 PM] [Homebridge UI] [homebridge-simplisafe3] Child process ended
[3/13/2022, 10:21:53 PM] [Homebridge UI] [homebridge-simplisafe3] Incoming Request: /credentialsExist
[3/13/2022, 10:21:53 PM] [Homebridge UI] [homebridge-simplisafe3] Incoming Request: /getCodeVerifier
[3/13/2022, 10:21:53 PM] [Homebridge UI] [homebridge-simplisafe3] Incoming Request: /getSSAuthURL
[3/13/2022, 10:22:02 PM] [Homebridge UI] [homebridge-simplisafe3] Terminating child process...
[3/13/2022, 10:22:02 PM] [Homebridge UI] [homebridge-simplisafe3] Child process ended

Sorry I cannot confirm this, it works fine. I have to guess something is off in how you are doing it, though of course may be a bug I cant reproduce.
Does it ever work? What does browser error console show?  Can you copy + paste your full URL here please.

Here is the URL I get:
https://auth.simplisafe.com/continue?state=hKFo2SBWYXpqTnV2ZFFES1BCNUM2Y0liWTZaQ3RES0doWVl5MqFuqHJlZGlyZWN0o3RpZNkgZXJCeXhkMC10R3l4N1FBb28tc1NBcmpPYjh1YUc1b0SjY2lk2SA0MmFCWjVsWXJWVzEyamZPdXUzQ1FST2l0d3hnOXNONQ

That is not the first URL you get from the plugin. Can you login to SS at all right now?

Yes I can login to my account on the site just fine. The initial URL that it goes to once I click the button in homebridge is:
https://tsv.prd.platform.simplisafe.com/v1/tsv/check?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImNhdWRpbGxAcHJvdG9ubWFpbC5jb20iLCJvb2JfY29kZSI6IjM0YWM0NWFkYThjYjQ5ZGE4YTU4NTkzM2I3ZjU4N2U2IiwiaWF0IjoxNjQ3MjI1OTE2LCJleHAiOjE2NDcyMjY4MTYsImF1ZCI6Imh0dHBzOi8vdHN2LnBsYXRmb3JtLnNpbXBsaXNhZmUuY29tLyIsImlzcyI6Imh0dHBzOi8vYXV0aC5zaW1wbGlzYWZlLmNvbS8iLCJzdWIiOiJhdXRoMHxzcy11c2Vyc3wyMjQ5NzU4IiwianRpIjoiMjcwYTlmZmViZjA3NDYzMTkwMTFmMzViNTA5MjUyZGEifQ.eisttYPlcnsQ-wf4oKmRHuJkatMjuWPry-TO_vZfUyk&state=hKFo2SB6d19GbWh0WVVhMk5Cb3NINGNWY2ZPaGNPZEp2TkdtTaFuqHJlZGlyZWN0o3RpZNkgVmNLREU3S193SkZWUlpFWUFrWjNDWm55SmxUS2oxZW2jY2lk2SA0MmFCWjVsWXJWVzEyamZPdXUzQ1FST2l0d3hnOXNONQ

Sorry, when you click the "Launch" link from the settings, right-click and copy that address =)

https://auth.simplisafe.com/u/login?state=hKFo2SAtM3g4eTJkOTVPb2loeU8xR3NNajBFd3FfUjA4clZheqFur3VuaXZlcnNhbC1sb2dpbqN0aWTZIFhFbDhOR25YamN1Z0FaVXFfRmhMSV91U0FDRlo3R0U4o2NpZNkgNDJhQlo1bFlyVlcxMmpmT3V1M0NRUk9pdHd4ZzlzTjU

The URL from the settings should look like:
https://auth.simplisafe.com/authorize?client_id=42aBZ5lYrVW12jfOuu3CQROitwxg9sN5&scope=offline_access email openid https://api.simplisafe.com/scopes/user:platform&response_type=code&redirect_uri=com.simplisafe.mobile%3A%2F%2Fauth.simplisafe.com%2Fios%2Fcom.simplisafe.mobile%2Fcallback&code_challenge_method=S256&code_challenge=***&audience=https://api.simplisafe.com/&auth0Client=eyJuYW1lIjoiQXV0aDAuc3dpZnQiLCJlbnYiOnsiaU9TIjoiMTUuMCIsInN3aWZ0IjoiNS54In0sInZlcnNpb24iOiIxLjMzLjAifQ

All of my Frame TVs stopped working. Simply nothing works with this plugin anymore, bummed.

Just tried this again on my Mac mini with Safari, Chrome, and Firefox. Also on my iPad without the Simplisafe app installed and on a fresh Windows 11 VM with Microsoft Edge. I get the same URL each time and the plugin does not accept it. Not sure what to do at this point.

When you right click the login button in the plugin and copy that link, what does it give you? It should look like my comment above

Right clicking on the button and copying the link gives me this just like yours. At this point, I am thinking it's something with my Eero network and Secure that's messing with the redirect and since it's not an issue with the plugin I am gonna close this. Thanks for your help.
https://auth.simplisafe.com/authorize?client_id=42aBZ5lYrVW12jfOuu3CQROitwxg9sN5&scope=offline_access email openid https://api.simplisafe.com/scopes/user:platform&response_type=code&redirect_uri=com.simplisafe.mobile%3A%2F%2Fauth.simplisafe.com%2Fios%2Fcom.simplisafe.mobile%2Fcallback&code_challenge_method=S256&code_challenge=r-YkK-ho872_zmyKLCNdeARVdkZAcVpYCPT-qaqlySw&audience=https://api.simplisafe.com/&auth0Client=eyJuYW1lIjoiQXV0aDAuc3dpZnQiLCJlbnYiOnsiaU9TIjoiMTUuMCIsInN3aWZ0IjoiNS54In0sInZlcnNpb24iOiIxLjMzLjAifQ


Older projects need a different base docker image : microsoft/dotnet-framework

Hi,
I added a note regarding an error which arises when building projects based on an older version of the Framework if you don't use a dotnet-framework base image (instead of windowservercore image) :
“C:\sources\Mysolution.sln” (default target) (1) ->
“C:\sources\Project.Web\Project.Web.csproj” (default target) (2) ->
“C:\sources\Project.DataAccess\Project.DataAccess.csproj” (default target) (3:2) ->
(CoreCompile target) ->
C:\BuildTools\MSBuild\15.0\bin\Roslyn\Microsoft.CSharp.Core.targets(84,5): error MSB6003: The specified task executab
le “csc.exe” could not be run. Could not load file or assembly ‘System.IO.FileSystem, Version=<IP_ADDRESS>, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified. [C:\sources\Project.DataAccess\Project.DataAccess.csproj]

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/install/build-tools-container.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

@heaths Would you take a look at this PR, please?

Hi @heaths
Thanks for your answer.
I am not sure I understand your point though. In my case I used this article in order to do what you just said: install the build Tools into a container. And as a result of it I ended up with a useless Docker Image  because it simply couldn't compile anything referencing .NET Framework 4 (or 4.5). I spent almost a week trying to find a solution and rebuilding numerous versions of this image until I found found out that referencing a microsoft/dotnet-framework image instead could solve the problem.
My point here is not to explain how to use the build tools or how to build .NET solutions / projects, but to avoid others the hassle of running into the same problem when a simple line of code could save their day. I posted comments about this on your blog two weeks ago, but they are not visible yet (awaiting moderation?)
The modifications I'm suggesting here are not related in any way with the .NET Code SDK you are talking about.
Regards,
Simon

The purpose of the article is to inform how to install Build Tools on Windows. Using the microsoft/dotnet-framework images as a base does mean the .NET Framework is pre-installed, but looking at the tags appears less obvious what :latest is relative to the base microsoft/windowsservercore tag.
Build Tools will install the .NET Framework but, as I noted, does have a problem we are all investigating right now when trying to install on a container. I.e. this is a current bug that will be fixed. Your statement reads like it implies this is necessary. Instead, perhaps noting that as of Visual Studio 2017 version 15.6 this requires starting from such a base image (i.e. the note survives and applies to older images well past when this bug is fixed) it would make more sense.

That's much clearer now, I altered the file following your recommendation. Don't hesitate to rephrase it if necessary.
Thanks for the explanation.

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/install/build-tools-container.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/install/build-tools-container.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

Since this will be fixed at some point, we'll have to remember to update the docs. I will discuss with the .NET Framework team and make an appropriate change.

Yes, it's temporary. Thanks.

@TerryGLee, if you want to close this one out I'll have a change coming very soon with recommendations from the .NET Framework team that might include more changes than requested here.

@bugoutfr Thanks for your great feedback, suggestions, and dialog. We are going to close this PR now, as @heaths will be updating the content soon (per his earlier comment).

@heaths Was this issue ever fixed, and if so, in what releases?


get voice_support:  [pass]
get firmware_version:  [pass]
get network_type:  [pass]
get resolution:  [pass]
get token_auth_support:  [pass]
get wifi_mac:  [pass]
get device_id:  [skip]
get panel_technology:  [pass]
get panel_type:  [pass]
get panel_size:  [pass]
get model:  [pass]
get year:  [pass]
get region:  [pass]
get tuner_count:  [pass]
get dtv_support:  [pass]
get pvr_support:  [pass]
get current_time:  [skip]
get network_information:  [skip]
get service_capabilities:  [skip]
get stopped_reason:  [skip]
get banner_information:  [skip]
get schedule_list_url:  [pass]
get acr_current_channel_name:  [skip]
get acr_current_program_name:  [skip]
get acr_message:  [skip]
get ap_information:  [skip]
get available_actions:  [pass]
get hts_speaker_layout:  [skip]
get mbr_device_list:  [pass]
get mbr_dongle_status:  [skip]
get tv_location:  [pass]
get antenna_modes:  [pass]
get bluetooth_support:  [pass]
get stream_support:  [pass]
list_presets:  [pass]
get watching_information:  [skip]
get device_capabilities:  [pass]
get protocol_info:  [pass]
get byte_position_info:  [skip]
get position_info:  [pass]
get media_info:  [pass]
get caption_state:  [skip]
get transport_info:  [pass]
get transport_settings:  [pass]
get current_transport_actions:  [skip]
get video_selection:  [pass]
get program_information_url:  [skip]
get current_connection_ids:  [pass]
current_connection_info:  [pass]
get tv_slide_show:  [skip]
get aspect_ratio:  [skip]
set aspect_ratio:  [skip]
get play_mode:  [pass]
SPEAKER TESTS
get hts_all_speaker_distance:  [skip]
set hts_all_speaker_distance:  [skip]
get hts_all_speaker_level:  [skip]
set hts_all_speaker_level:  [skip]
get hts_sound_effect:  [skip]
set hts_sound_effect:  [skip]
get hts_speaker_config:  [skip]
set hts_speaker_config:  [skip]
IMAGE TESTS
get brightness:  [skip]
set brightness:  [skip]
get color_temperature:  [skip]
set color_temperature:  [skip]
get contrast:  [skip]
set contrast:  [skip]
get sharpness:  [skip]
set sharpness:  [skip]
VOLUME TESTS
get mute:  [pass]
set mute:  [pass]
get volume:  [pass]
set volume:  [pass]
KEY_VOLUP: [fail]
KEY_VOLDOWN: [fail]
ICON TESTS
get icon:  [pass]
Icon name: icon_LRG_jpg
Access point: RemoteEncrypted.ConnectionManager.icon_LRG_jpg
Mime Type: None
Width: 120
Height: 120
Color Depth: 24
URL: http://<IP_ADDRESS>:9197//icon_LRG.jpg

BROWSER TESTS
run_browser:  [pass]
get browser_mode:  [skip]
get browser_url:  [skip]
stop_browser:  [pass]
SOURCE TESTS
get source:  [skip]
get sources:  [pass]
CHANNEL TESTS
get channels:  [pass]
get channel:  [skip]
get channel_list_url:  [pass]
name = Samsung TV Connector [raspberrypi]
description = raspberrypi
host = <IP_ADDRESS>
port = 8080
id = 21bc2b6-5295-422d-a147-b7d8a1d47f2
method = encrypted
timeout = 0
token = 616D02C578EC1764ED968D445A61AA5C:1
upnp_locations = http://<IP_ADDRESS>:7677/MainTVServer2/, http://<IP_ADDRESS>:7678/nservice/, http://<IP_ADDRESS>:7676/rcr/, http://<IP_ADDRESS>:9197/dmr,
paired = True
mac = f8:77:b8:82:7d:97
model = UE48JU7000
app_id = 12345
uuid = 13e5176b-7553-456d-889b-ed88632c1325
display_name = None
power_off_key = None
// ****** CEC MUST REMAIN AT THE END OF THE FILE ******
cec:
//  name = SamsungTVCEC
//  port = RPI
//  types = 4,
//  power_off = 0
//  power_standby = 0
//  wake_avr = 0
//  keypress_combo = 113
//  keypress_combo_timeout = 50
//  keypress_repeat = 200
//  keypress_release_delay = 0
//  keypress_double_tap = 100
//  hdmi_port = 1
//  avr_audio = False
POWER TESTS
This process may take a while to complete.
If there is an issue the program will automatically
exit after 3 minutes.
12 seconds have passed
24 seconds have passed
power off test: [fail]
power on test: [skip]
CLOSING CONNECTION TO TV UE48JU7000
CLOSING LOGS FOR TV UE48JU7000
DISCOVERING TV's
..........
tests ran on the following TV's: UE48JU7000
tests skipped on the following TV's:
STOPPING DISCOVER
CLOSING LOG FILES
FINISHED
tests.zip

OK let me get this out there.. This is for every single person here. I am not trying to point you out in this @WimBre  so sorry if it comes across that way. that is not my intention. I only want to use this as an example.

I apologize for my stupidity but I have little knowledge of programming etc.

don't ever make a comment like that. It's not good to do. The only thing that makes anyone "stupuid" or less intelligent then someone else is if they sit there not understanding something and does not ask a question. That has to be the dumbest thing to do.
Ask me all the questions you want. if I have the answer I will provide it. I have been known to type books in response to a question. I fill fully explain every single step taken to do something if needed. so long as the end result is the person asking has a full understanding in the end.
Everyone has to start the learning process somewhere.   I will explain the same thing more then a single time if needed just in a different way in order to further your  knowledge. I am a 100% self taught programmer I never went to school for it. I am 43 years old and started programming 3 years ago. I only had programmed my remote or VCR (really dating myself there) before then. I have seen a lot of posts from programmers that have the "god" complex I am not one of these types of people. If you see me getting upset it is only that. I am getting frustrated/aggravated. It is not from you. It is from the project it's self. You just happen to be there at the right/wrong time, so please do not take it personal and I am apologizing now if it happens. most times getting rid of that frustration leads to success in the end.
The other thing is this is a program that is going to be running on your computer/device you NEED to know exactly how it functions and what it does/is capable of doing.
There are all sorts of things to overcome in this world/life and probably the hardest thing is language barriers. I do not know where you are from or how well your understanding of English is (if it is not your native tongue). so if you do not understand. tell me that you do not. and tell me what language you speak. Google Translate does work. It if far from producing the correct translations but it will be able to get the basic idea across to you.
Just remember this one a simple truth. There are only 2 things in life you can never replace. 2 things that no value can ever be given to... A loved one. and Time. if you ask a question and the answer you get you do not fully understand and you either walk away or move onto the next thing.
If you are going to use my time to explain something you had better fully understand it. otherwise you took from me something that can never be replaced.
I am making this library for one simple reason. Because it makes me happy when others get joy from using it. (donations help also :smile:) I have complete the code I needed for my TV a long time ago and there really is no need for me to continue to go any further. (I own a legacy TV). But I am because I am trying to help you folks out.
But please do not ever put yourself down at all. and do not ever use these 2 phrases either
"I can't"
"I don't know how"
All that means to me is that you are to damned lazy to try. If you ever say either of those then close your eyes and imagine me reaching through the computer screen and knocking ya upside the head. Worlds largest single source of your fingertips and someone says "I don't know how" Oh man... that pisses me off. 40 year old just started learning to program. 3 years later (self taught), Python, C, C++, C#, Java, javascript, HTML just to name a few..
I was once just starting to learn too.. Actually I still am.. If there is something I can help with I will do my best to help. If i do not have the answer then sure as hell I will help you locate it. I will not just walk away.

Ran the test again on 2018. Tv turned off at 50% calibration but did not turn back on.
2018 tests.zip

@WimBre
You do not need to add the output to the post. all of that information is saved in the files you attached.
At this point all i need to know is if the TV actually powered off and on. I need to know this to see if there is a difference between what the program is telling me and what actually took place.

@msvinth
Samsung may have changed their API again (surprise surprise.. NOT). the KEY_POWERON may not work to stop the shutdown process on the newest TV's I will poke about your logs after I am done assessing @WimBre 's log files.

@kdschlosser sorry for my delay in running this weekend. I want to compliment you on your hard work. Here is my latest run of the tests. TV Powered off and on again.
tests.zip

@WimBre
Download the develop branch again. I have updated it. see if that solves the issue.

@tmonck
No worries m8. I am going to take a look at your logs after I am done checking out @msvinth 's

@msvinth
delete the contents of /tests and rerun the tests please. I updated the timeout values in the RUN_ME.py file. i forgot to do that when i increased the timings in the main library

@tmonck
run the tests again DO NOT delete the config.file in the /tests. the powering off and on of the TV should be faster now that it has the power key learned. Lets make sure it still works properly.
otherwise all looks good with your log files.

Everything seems to be working well, tv turned off and turned on again.
Logs of RUN_ME being run twice
tests.zip

Worked great!!! The visual process of powering off was faster than the log states but allowing for OS shutdown it's probably fairly close. Also powering on visual was much faster than log states but again allowing for the full boot up I'm assuming the time in the logs is probably more accurate as to when it can receive commands.
tests.zip

what you are seeing in the logs is when the TV responds to the UPNP SSDP broadcasts. the UPNP is the last thing to get fired up. it means that the TV is fully powered on. and in reverse the websocket is the last thing to get closed. and that is when the library is going to report that the TV is powered off is when the TV closes the connection. This is so we can turn the TV back on while it is in the shutdown process.
i bunch of posts back I went into detail the order (or what i think is the order) of then different services on the TV get started and stopped.
a TV is a computer in every sense. so if you power off your computer and then manually turn off the power to your monitor right away how long does it take before the power light on the computer goes out.. quite a while after you turned off the monitor. the only difference is the TV automatically turns of the power to the screen. With TV's it's first and foremost priority when turning the TV on is getting an image back on the screen. if you try to access say the application list right after you turn the TV on it is going to take a considerable amount of time to load. this is because the TV is now forcing you to wait until it has finished loading them. after the TV has loaded them accessing the list is pretty quick. It's a blinder they use. even tho the TV appears to have turned on fully. it really has not. smoke and mirrors.

I am about to do the jig.. finally got this blasted power problem figured out. lost some hair in the process. LOL. Samsung's API is on the same level as DenonMarantz in my most hated API list. pretty much at the top.

I'm glad you powered through. I was reading through the code you had written but I don't have access to Samsung's API. May I ask where you found it or did you just sniff the packets to figure out the calls things were making?

I updated the develop branch to time how long it takes the TV to turn on and off. so if you want to run the tests and let me know how long it takes that would be nice :smile:

Hi Kevin,
I like your directness. I am Dutch and we are used to it. The language is not a problem for me although there are sometimes ICT terms that I just have to google.
During running the test the TV didn't turned off.
tests.zip

There is no public release of Samsung's API. To be honest because the smart view app does not work with the latest firmware they have I highly doubt it is even documented.
this is all guesswork.. I do not own a new TV. so I am not able to use a sniffer. pure intuition I guess. There is also an old version of the Tinzen source available you have to google it. A lot has changed since then but a basic idea of naming conventions and data formatting can be gotten from it. other places if reading what other people have stumbled upon with the TV's. most people do not even know what they have posted about.. I am able to make a connection between what I am trying to do and what they have found.

@WimBre
I updated the develop branch. on the encrypted TV's samsung may have a different shutdown order of the services running. so the TV is being reported as off when in fact it is not really off yet. so what is happening is the program continues to run and the command to turn the TV back on gets sent over the websocket before it has really shut off the screen. It is working like it should but you are not seeing the screen turn off. so for the sake of the tests i have made this change. I will change it back to the way it was because i believe it is working properly. this is just to confirm that it is.

Awesome thank you @kdschlosser I go look at the documentation and pair it up with the code. Thanks I'm very interested in trying to learn more about the apis to my tv because I was trying to write figure out if I could push notifications to my tv but from what i've read it's not possible with the latest models.
Btw I re-ran the tests.
Power off 10 seconds.
Power on 20 seconds. Visual power on was at the 10 second mark.
test.zip

scratch that last test run. it is going to fail again. I found the issue. it was with how long had had the test program waiting. i had it set to 90 seconds when i should have set it to 180

@tmonck
Yes you can. I have not yet added that to the library. I know it works on the legacy. not sure about the encrypted or websocket TV's.
this is a cool tip for ya.
the code below is going to spit out every single UPNP function available for your TV. the notifications are doing from a UPNP function. I do not remember the name of it off hand. But i am sure you will be able to figure out which function it is. make sure you point the load path to the config file saved in the /tests directory.
from __future__ import print_function
import samsungctl

remote = samsungctl.Config.load(r'/tests/CONFIG_FILE_NAME')
remote.open()
print(remote)

remote.close()

@tmonck
from the time the library told your TV to turn off to the time it was actually powered off took 10001.7831325531ms (10 seconds)
and from the time it was told to turn on until the time it was fully powered on took 20005.670309066772ms (20 seconds)

i updated the develop branch again. i removed using UPNP for the power off detection. It now only uses the websocket connection.

@kdschlosser I deleted everything and tried again and it worked this time. Let me know if there is anything specific you want me to test.
tests.zip

wrong tests folder @arsaboo I need the one in the root of the drive not the one from the downloaded github repo folder.

Sorry....here you go.
tests.zip

@arsaboo
run the tests again. DO NOT delete anything in the /tests folder. I want to see the power off and on times after it has learned the power key.


Update snapshots

here you go!!

Pull Request Test Coverage Report for Build 1126

7 of 13 (53.85%)  changed or added relevant lines in 2 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage increased (+0.09%) to 26.18%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/components/workspace/ControlBar.tsx
0
1
0.0%

src/components/assessment/AssessmentWorkspace.tsx
7
12
58.33%

Files with Coverage Reduction
New Missed Lines
%

src/components/workspace/ControlBar.tsx
1
22.35%

Totals

Change from base Build 1125:
0.09%

Covered Lines:
927

Relevant Lines:
3005

💛  - Coveralls


New Device - Smart Life Led Controller Single Color/RGB/RGBW/RGBWW/RGBCCT LED Wifi

Can you ADD this Smart Life Led Controller Single ?
{
"result": {
"category": "dd",
"functions": [
{
"code": "switch_led",
"dp_id": 20,
"type": "Boolean",
"values": "{}"
},
{
"code": "work_mode",
"dp_id": 21,
"type": "Enum",
"values": "{"range":["white","colour","scene","music"]}"
},
{
"code": "bright_value",
"dp_id": 22,
"type": "Integer",
"values": "{"min":10,"max":1000,"scale":0,"step":1}"
},
{
"code": "scene_data",
"dp_id": 25,
"type": "Json",
"values": "{"scene_num":{"min":1,"scale":0,"max":8,"step":1},"scene_units": {"unit_change_mode":{"range":["static","jump","gradient"]},"unit_switch_duration":{"min":0,"scale":0,"max":100,"step":1},"unit_gradient_duration":{"min":0,"scale":0,"max":100,"step":1},"bright":{"min":0,"scale":0,"max":1000,"step":1},"temperature":{"min":0,"scale":0,"max":1000,"step":1},"h":{"min":0,"scale":0,"unit":"","max":360,"step":1},"s":{"min":0,"scale":0,"unit":"","max":1000,"step":1},"v":{"min":0,"scale":0,"unit":"","max":1000,"step":1}}}"
},
{
"code": "countdown",
"dp_id": 26,
"type": "Integer",
"values": "{"min":0,"max":86400,"scale":0,"step":1}"
},
{
"code": "control_data",
"dp_id": 28,
"type": "Json",
"values": "{"change_mode":{"range":["direct","gradient"]}, "bright":{"min":0,"scale":0,"unit":"","max":1000,"step":1}, "temperature":{"min":0,"scale":0,"unit":"","max":1000,"step":1}, "h":{"min":0,"scale":0,"unit":"","max":360,"step":1},"s":{"min":0,"scale":0,"unit":"","max":255,"step":1},"v":{"min":0,"scale":0,"unit":"","max":255,"step":1}}"
}
],
"status": [
{
"code": "switch_led",
"dp_id": 20,
"type": "Boolean",
"values": "{}"
},
{
"code": "work_mode",
"dp_id": 21,
"type": "Enum",
"values": "{"range":["white","colour","scene","music"]}"
},
{
"code": "bright_value",
"dp_id": 22,
"type": "Integer",
"values": "{"min":10,"max":1000,"scale":0,"step":1}"
},
{
"code": "scene_data",
"dp_id": 25,
"type": "Json",
"values": "{"scene_num":{"min":1,"scale":0,"max":8,"step":1},"scene_units": {"unit_change_mode":{"range":["static","jump","gradient"]},"unit_switch_duration":{"min":0,"scale":0,"max":100,"step":1},"unit_gradient_duration":{"min":0,"scale":0,"max":100,"step":1},"bright":{"min":0,"scale":0,"max":1000,"step":1},"temperature":{"min":0,"scale":0,"max":1000,"step":1},"h":{"min":0,"scale":0,"unit":"","max":360,"step":1},"s":{"min":0,"scale":0,"unit":"","max":1000,"step":1},"v":{"min":0,"scale":0,"unit":"","max":1000,"step":1}}}"
},
{
"code": "countdown",
"dp_id": 26,
"type": "Integer",
"values": "{"min":0,"max":86400,"scale":0,"step":1}"
}
]
},
"success": true,
"t":<PHONE_NUMBER>201,
"tid": "39edd342b66b11ec86c84e8aeb4f13b1"
}

I need the logs for the device so I can see the actual format used for the fields documented as Json (they are seldom Json, more often hex or base64)

switch_led	Boolean
"{true,false}"
work_mode	Enum
{
"range": [
"white",
"colour",
"scene",
"music"
]
}
bright_value	Integer
{
"min": 10,
"max": 1000,
"scale": 0,
"step": 1
}
scene_data	Json
{
"scene_num": {
"min": 1,
"scale": 0,
"max": 8,
"step": 1
},
"scene_units": {
"unit_change_mode": {
"range": [
"static",
"jump",
"gradient"
]
},
"unit_switch_duration": {
"min": 0,
"scale": 0,
"max": 100,
"step": 1
},
"unit_gradient_duration": {
"min": 0,
"scale": 0,
"max": 100,
"step": 1
},
"bright": {
"min": 0,
"scale": 0,
"max": 1000,
"step": 1
},
"temperature": {
"min": 0,
"scale": 0,
"max": 1000,
"step": 1
},
"h": {
"min": 0,
"scale": 0,
"unit": "",
"max": 360,
"step": 1
},
"s": {
"min": 0,
"scale": 0,
"unit": "",
"max": 1000,
"step": 1
},
"v": {
"min": 0,
"scale": 0,
"unit": "",
"max": 1000,
"step": 1
}
}
}
countdown	Integer
{
"min": 0,
"max": 86400,
"scale": 0,
"step": 1
}
control_data	Json
{
"change_mode": {
"range": [
"direct",
"gradient"
]
},
"bright": {
"min": 0,
"scale": 0,
"unit": "",
"max": 1000,
"step": 1
},
"temperature": {
"min": 0,
"scale": 0,
"unit": "",
"max": 1000,
"step": 1
},
"h": {
"min": 0,
"scale": 0,
"unit": "",
"max": 360,
"step": 1
},
"s": {
"min": 0,
"scale": 0,
"unit": "",
"max": 255,
"step": 1
},
"v": {
"min": 0,
"scale": 0,
"unit": "",
"max": 255,
"step": 1
}
This one?

That is just more cloud API documentation.  I need to see how the local messages are formatted, in particular the ones that are Json in the cloud API, as they are usually a more compact encoded binary format in the local API.
So either the log messages from Home Asisstant when you try to add the device as a tuya-local integration, or the results of a tuya-api get -a command (with additional arguments for device id, key etc)

I think these bulbs are fairly standardised, probably only 4 or 5 configs will cover the full range on the market.  I just bought some RGBCW bulbs this week and made a config, so you could try with main now, or wait for 0.17.0 to be released to try again.
Currently the color temp, brightness and off/on are working reliably. RGB setting is also working but acts a bit strange, sometimes the bulb goes off when you first switch from white to color mode, and comes back on in roughly the selected color if you adjust the brightness.

I notice that your config documentation so far is missing the color_temp and color_data dps (23 and 24) and seems to overload their functions onto the scene_data (25) dp.  This seems a bit too complex to handle - until now, I have not tried to decode scene data, and just treat it as a binary blob (along with music data and any other more complex functions).

Given the time that has passed and the missing logs, together with the complexity of parsing color temp and color data out of the scene data instead of having separate attributes, I will close this now as "wont fix".


Fix typos

Fix typos

Fixed README in https://github.com/KlimaDAO/klimadao/commit/49cd7a6dc2e595bb02934f8b5121243ef1dc846a
Other typo was fixed in our translation platform and should arrive in the next release.
Thanks for catching these!


.slice(begin, [end]) => Wrapper

.slice(begin[, end]) => Wrapper
Returns a new wrapper with a subset of the nodes of the original wrapper, according to the rules of Array.prototype.slice.
Use Case
Currently:
wrapper.find(Component).forEach((item, index) => {
  if (index < 2) return;
  // Assertions
});

This would be a nice addition:
wrapper.find(Component).slice(2).forEach((item, index) => {
  // Assertions
});

I like it. This seems straightforward, as long as it conforms to Array#slice.

I'd be happy to submit a PR for this when I get some time this weekend.


QFT little endian

The QFT circuit currently computes the Fourier transform assuming the computational basis are ordered as
|000>, |100>, |010>, ..., |011>, |111>.
This commit reverses this so the computational basis correspond to the little-endian binary representation of integers |0>, |1>, |2>, ... etc.
In [2]: from qiskit.circuit.library import QFT

In [3]: QFT(3).draw()
Out[3]:
                                    ┌───┐
q_0: ─────────────■───────────■─────┤ H ├─X─
                  │     ┌───┐ │pi/2 └───┘ │
q_1: ──────■──────┼─────┤ H ├─■───────────┼─
     ┌───┐ │pi/2  │pi/4 └───┘             │
q_2: ┤ H ├─■──────■───────────────────────X─
     └───┘

Showing the MSB on the top:
In [4]: QFT(3).draw(reverse_bits=True)
Out[4]:
     ┌───┐
q_2: ┤ H ├─■──────■───────────────────────X─
     └───┘ │pi/2  │     ┌───┐             │
q_1: ──────■──────┼─────┤ H ├─■───────────┼─
                  │pi/4 └───┘ │pi/2 ┌───┐ │
q_0: ─────────────■───────────■─────┤ H ├─X─
                                    └───┘

We have two options now to revert the bit order: either using swap gates or using reverse_bits.
Meaning that this (which is the form used throughout all algorithms):
     ┌───┐
q_0: ┤ H ├─■──────■──────────────────────
     └───┘ │pi/2  │     ┌───┐
q_1: ──────■──────┼─────┤ H ├─■──────────
                  │pi/4 └───┘ │pi/2 ┌───┐
q_2: ─────────────■───────────■─────┤ H ├
                                    └───┘

is the same as this
                                    ┌───┐
q_0: ─────────────■───────────■─────┤ H ├─X─
                  │     ┌───┐ │pi/2 └───┘ │
q_1: ──────■──────┼─────┤ H ├─■───────────┼─
     ┌───┐ │pi/2  │pi/4 └───┘             │
q_2: ┤ H ├─■──────■───────────────────────X─
     └───┘

The default QFT will add swap gates, but this is expensive to simulate, so we could speed things up by default if we would return the top QFT version instead of the one with swaps. On the other hand, replacing the swaps by reverting the qubit order might be confusing to new users.
Maybe this is something we could put inside a transpiler pass: if the circuit contains a QFT with swaps it is replaced by a QFT with reverted bit order.

I don't know if the above circuits are equivalent.

Also, I simulated using the above circuits for the input state |110> to show that they don't produce the same state vector.

# for input |110>, therefore, q0=0, q1=1, q2=1

sim = Aer.get_backend('statevector_simulator')

qc1 = QuantumCircuit(3)
qc1.x(range(1,3))
qc1.barrier()
qc1.h(0)
qc1.cu1(np.pi/2, 1, 0)
qc1.cu1(np.pi/4, 2, 0)
qc1.h(1)
qc1.cu1(np.pi/2, 2, 1)
qc1.h(2)
print(qc1.draw())

qc2 = QuantumCircuit(3)
qc2.x(range(1,3))
qc2.barrier()
qc2.h(2)
qc2.cu1(np.pi/2, 1, 2)
qc2.cu1(np.pi/4, 0, 2)
qc2.h(1)
qc2.cu1(np.pi/2, 0, 1)
qc2.h(0)
qc2.swap(0,2)
print(qc2.draw())

           ░ ┌───┐
q_0: ──────░─┤ H ├─■──────■──────────────────────
     ┌───┐ ░ └───┘ │pi/2  │     ┌───┐
q_1: ┤ X ├─░───────■──────┼─────┤ H ├─■──────────
     ├───┤ ░              │pi/4 └───┘ │pi/2 ┌───┐
q_2: ┤ X ├─░──────────────■───────────■─────┤ H ├
     └───┘ ░                                └───┘
           ░                                ┌───┐
q_0: ──────░──────────────■───────────■─────┤ H ├─X─
     ┌───┐ ░              │     ┌───┐ │pi/2 └───┘ │
q_1: ┤ X ├─░───────■──────┼─────┤ H ├─■───────────┼─
     ├───┤ ░ ┌───┐ │pi/2  │pi/4 └───┘             │
q_2: ┤ X ├─░─┤ H ├─■──────■───────────────────────X─
     └───┘ ░ └───┘

results = execute([qc1, qc2], sim).result()

qc1_outstate = results.get_statevector(0)
qc2_outstate = results.get_statevector(1)

qc1_outstate.dot(qc2_outstate.conj())

(1.387778780781445e-17-2.775557561562891e-17j)

As you can see from the inner product between the two states, they are not same.

@HwajungKang you're of course right, I should've reversed the order of qubits on the left to be:
Meaning that this (which is the form used throughout all algorithms):
     ┌───┐
q_2: ┤ H ├─■──────■──────────────────────
     └───┘ │pi/2  │     ┌───┐
q_1: ──────■──────┼─────┤ H ├─■──────────
                  │pi/4 └───┘ │pi/2 ┌───┐
q_0: ─────────────■───────────■─────┤ H ├
                                    └───┘

is the same as this
                                    ┌───┐
q_0: ─────────────■───────────■─────┤ H ├─X─
                  │     ┌───┐ │pi/2 └───┘ │
q_1: ──────■──────┼─────┤ H ├─■───────────┼─
     ┌───┐ │pi/2  │pi/4 └───┘             │
q_2: ┤ H ├─■──────■───────────────────────X─
     └───┘

Then, to use your way for QFT (just getting rid of SWAP from the current QFT circuit) instead of this PR's QFT (which is consistent with IBM qubit ordering), the input also has to be encoded in opposite to IBM qubit ordering.  Qiskit users who know IBM bit ordering would put the least significant one on the top (q_0) and most significant one at the bottom(q_(n-1)) but, then the current QFT without SWAP will produce the wrong result. wouldn't it? Shouldn't this PR's QFT be used to be consistent? Otherwise, Qiskit users have to encode inputs in reverse to IBM bit ordering only in the case to use the library QFT circuit to get the right output while gotta use IBM bit ordering in all other cases? So, for example, in my code above, to get the right answer in your way, I have to encode the input opposite to how I did in the code, which is opposite to IBM bit ordering.

Yes, this PR makes the QFT consistent with the little endian ordering of Qiskit. I agree with making this change (maybe that wasn't clear).
I only wanted to point out that the algos currently use the big-endian QFT w/o swaps but that's not a problem to accomodate.

So once this is merged, the algorithms that are using QFT in qiskit-aqua will need to be updated it seems, in a manner analogous to the change done here when used when the bits were expected in the order as they were.

Thanks for taking this over the finish line @Cryoris . LGTM.


Disable better buttons on Elemental

As this interferes with versioning, note it also removes the prev/next and add record buttons.

Implemented a better solution on https://github.com/unclecheese/silverstripe-gridfield-betterbuttons/pull/144


allow React 16 as a peerDependency

This will allow consumers to use react-popper with React 16.
I didn't update the devDependency version of React 16 in this PR, although I did in my fork and everything appeared to work correctly.

This would be nice to have. I use material-ui which uses react-popper, and everything works fine under react 16. I just get this unmet peer dependency warning when running yarn in the terminal.

Sorry for the wait on this, I've been extremely busy as of late. I really appreciate the PR! Thank you ❤

Thank you for this, a similar PR was previously submitted that has been merged.


Different auth for sentinel and redis

Hi. I saw in the example how to connect through sentinel. However, the example seems to rely on the same auth used for both sentinel and redis itself. My company sets it up such that the auth (i.e. username/password) between the two are different, for security purpose. Is there a way I can specific different auths for the two? Thanks!

Hi @tsukit,
At the moment there isn't an easy way to do that, but I'll add a new feature to support that.

Thank you so much @aembke . Look forward to the enhancement.

@tsukit this should go out today in 4.3.0 (https://github.com/aembke/fred.rs/pull/19)

This is now on crates.io in 4.3.0

this is so awesome! Will give it a try soon.

@aembke I just gave it a try. The code compiled but it doesn't seem to pick up the password given in the sentinel configuration. Here's how my code looks like.
    let config = RedisConfig {
        server: ServerConfig::Sentinel {
            service_name: "shard_8".into(),
            hosts: vec![
                ("<IP_ADDRESS>".into(), 27379),
                ("<IP_ADDRESS>".into(), 27380),
                ("<IP_ADDRESS>".into(), 27381),
            ],
            username: None,
            password: Some("<sentinel-password>".into())
        },
        username: None,
        password: Some("<redis-password>".into()),
        ..Default::default()
    };
    let client = RedisClient::new(config);
    client.
    let policy = ReconnectPolicy::default();
    let _ = client.connect(Some(policy));
    match client.wait_for_connect().await {
        Ok(_) => (),
        Err(e) => eprintln!("redis error: {}", e),
    }

    match client.set("my_key", 42,None, None, false).await {
        Ok(()) => (),
        Err(e) => eprintln!("set error: {}", e),
    }
    match client.get::<i32, _>("my_key").await {
        Ok(v) => println!("value = {}", v),
        Err(e) => eprintln!("get error: {}", e),
    }

With the code above, I got this error message.
redis error: Sentinel Error: Invalid auth response Error("ERR invalid password").

I'm pretty sure the passwords are correct as I manually validated it with redis-client and auth command - to both sentinel and redis nodes. I tried putting the sentinel password in the redis password config (i.e. making both the same) but still get the same error message. I presume that it might actually succeeded at sentinel level but failed when it's connecting to redis itself.
Would you be able to double check that, when connecting to sentinel, it actually uses the password in the sentinel config? Thank you so much!

Ah ok yeah I just looked and it looks like I made some incorrect assumptions about how the test coverage here worked with respect to the sentinel auth, so it's not covering the new code as I had intended. My apologies that's a bad mistake. I'll take a look at this over the weekend and get a patch out for you next week.

No problem and thank you!

@aembke do you think this change will be available this week or the next? Thank you so much for your support.

@tsukit This should be fixed in 4.3.1. Apologize on the delay but the switch to CircleCI took longer than expected.

@tsukit This should be fixed in 4.3.1. Apologize on the delay but the switch to CircleCI took longer than expected.

Thank you so much! Appreciate it.


Fixing 790461 - Libman Install Dialog Install button crashes VS

Based on Bug 790461 it seems like            bool isLibraryInstallationStateValid = await IsLibraryInstallationStateValidAsync().ConfigureAwait(false); on line 218 is switching to a background thread after it returns. In the else clause below we are accessing ViewModel which is a dependency property that requires us to be on the UI thread to access, which crashes VS.

The 2nd commit ought to be in a separate PR, as it addresses a separate issue, no?

The 2nd commit ought to be in a separate PR, as it addresses a separate issue, no?

The 2nd commit addresses a bug that appeared from the 1st commit, so keeping 1 PR should be fine.


Support for A2R v3 as a flux source and sink

The A2R 3.x format makes several improvements that are desirable for non-Applesauce flux data. These include the following:
Support for solved fluxmaps (see #383);
Support for per-RWCP-chunk arbitrary resolution, removing the need for resampling, even when combining flux data from multiple sources;
Improved metadata handling
The 3.x format was defined with community input via the Applesauce Discord, and use by other tools was taken into consideration. The specification can be found here: https://applesaucefdc.com/a2r/

Belatedly --- having had a quick look, this looks like it'll be really hard to support (at least for writing). The format's making the same mistake that SCP does and is using a fixed number of revolutions; either 1.25 or 2.25 or more. Given that FluxEngine's default is 1.2, that means that I cannot write legal A2R files. Another issue is that it dictates that reads start at an index marker. What about drives which don't have one?
Other than that the format looks reasonably straightforward and should be easy to read, at least for RWCP chunks.

It might be worth asking at the Applesauce discord — the spec probably can be adjusted to allow for 1.2 reads instead of 1.25. However, it would be good if the default were increased as due to the nature of flux dumping 1 revolution is often not enough. Anyway I passed the question along.
For use of drives without index sensors an add-on index sensor is provided and recommended. Otherwise the images aren’t index aligned, for formats that don’t have an index sensor, this is usually okay but can lead to much more difficulty when dealing with damaged disks.

@davidgiven Applesauce does a 1.25 for a first pass by default, but 1.2 is totally fine. There is no real requirement as to the number of rotations. As there can be multiple reads for a single track, it would want to see those starting at the same rotational position, whether that be a true index or a false one. It doesn't really care. If there is no index signal at all, then just putting a single flux capture (as many rotations as you want) per track is perfectly fine.

It's not so much as wanting specifically 1.2, as for not wanting a requirement for any specific value as the number of rotations can vary arbitrarily, and they can start anywhere --- e.g. for a format which doesn't use the index marker, I don't bother waiting for one but just start reading as soon as the drive reports it's ready. If I can just put arbitrary data in an xtiming chunk, that would be great, but that's not what the spec says.
Looking at the definition of the index signals array: it says that soft-sectored disks 'are not required to have more than one index signal'. What if there aren't any? And, further down it says that if the read is aligned with an index signal then it doesn't get included in the table; is this what the Synchronized field in the INFO chunk conveys? The text is unclear.
There's also a minor issue with the drive types --- I keep track of the drive TPI, but nothing more. This means that I can't distinguish between drive types 3 and 8, or types 2 and 5, so I can't set this accurately (does type 2 include changing the drive speed for each CLV zone?). And there isn't an entry in the table for 3.5" 40 track!

Anything recent (since roughly December 2022) should be A2R3. If you come across an A2R2 that needs to be converted, post here and I can do so — this just needs resaving the image in the Applesauce software on macOS.
A2R2 files should no longer be getting produced.

It's not so much as wanting specifically 1.2, as for not wanting a requirement for any specific value as the number of rotations can vary arbitrarily, and they can start anywhere --- e.g. for a format which doesn't use the index marker, I don't bother waiting for one but just start reading as soon as the drive reports it's ready. If I can just put arbitrary data in an xtiming chunk, that would be great, but that's not what the spec says.

Drive Type stores the type of drive that was connected to the imaging device and used to image the disk. Not the drive used to originally write the disk. This means type 2 would include Apple drives that are capable of varying their speeds, so for a Mac 400K/800K image then the speed would be varied per zone while for a PC 720K or any 1.44MB image it would be constant.
Having this detail on the type of drive used to image the disk is useful metadata (as otherwise there's no way to tell apart 8" vs 5.25" vs 3.5" vs 3" vs whatever else), though it may require some user input as it's not necessarily obvious to tell electronically.

I've added support for reading A2R v2 files (because that was what the sample image I got from Internet Archive was!) and it was straightforward. I don't forsee any problems with v3. Do you know where I can get a sample image? IA doesn't tell me whether they're v2 or v3.

@davidgiven All the Victor 9K disks I upload with both .flux and .a2r images. These recent ones are definitely a2r v3.  Here's a few examples for you:
SS DOS: https://archive.org/details/supercalc-master
DS DOS: https://archive.org/details/40-meg-sys-dos-2-93-7-16-89-v2-11-microsoft-inc
SS CP/M-86: https://archive.org/details/victor-cp-m-86-tm-ver-1-1-2-4-v1-1-2-4-victor-technologies-inc
DS CP/M-86: https://archive.org/details/cpm-86-voc-editor-voced5-submit-voc


Find assets endpoints (/api/assets) forces substring/partial match in attributes

Hi,
I just realize that if you search for an attribute via /api/assets collins wraps the search term with ** forcing partial matches. Even anchoring with ^term$ doesn't work. It looks like collins is converting a search for "attribute=attrib;foo" into ATTRIB:*foo*:.
This is unexpected and hard to work around if you need explicit matches. No anchoring is working, so you need to search the results on the client side again.
Instead, collins should simply not wrap the term in **. This way people can use the wildcards where necessary while defaulting to full string match.

Actually anchoring is working. Had an unrelated issue. Still, matching on substring by default seems an odd choice. Any chances this will be changed?

Yeah, I agree that matching on substrings by default is a strange choice.  I have no idea why it was made, and it's actually caused a few bugs for us over the years that I've been using collins.
We have discussed changing it, but have been perhaps overly worried that automation is relying upon this functionality, and changing it would have unexpected consequences.
It is worth having a discussion about, and perhaps changing when we do the next major, non-backwards compatible release.


[Improvement] More helpful messages when map code includes unsupported JS APIs

Expected Behavior
When I use console.log() in a comlink map I'd like to know that I am using unsupported JS API.
Current Behavior
When I have a map with a JS API that is not supported e.g (console.log("message")) I get a very generic error:
ERROR: {
 "name": "JsInterpreterError"
}

Possible Solution
Ideally I'd like to know that the JS API function I've used is not supported. At least let me know that something is wrong with the comlink map (and which).
Steps to Reproduce
Add console.log("message") to any map and execute OneSDK perform.
Your Environment

macOS
OneSDK Beta.0
node 18.13

Can you please share how you are invoking the SDK, and especially how you are handling the error? There should be a stacktrace attached to the error. For example, when I let the error bubble up without catching it I get:
...

UnexpectedError [JsInterpreterError]: Code evaluation failed: Uncaught ReferenceError: 'console' is not defined
    at Example (map.js:13)
    at _start (map_std.js:373)
    at <eval> (map.js:52)

...

Per our slack discussion if I add error message explicitly to the error handling then I can see it:
catch (e) {
    console.log("ERROR:", JSON.stringify(e, null, 2));
    console.log("message:", e.message);
  }
}

Would it be possible to have the message serialized with JSON.stringify(e, null, 2) ? Or we need to fix it on the side of error handling?

I think this is mostly a documentation issue, as there are two main classes of errors (UnexpectedError and PerformError) and they should be handled differently.
Nevertheless, I've create a PR which improves this specific error a little bit, although that has nothing to do with the JSON serialization.
I will also add logging of unexpected errors into the user log for visibility.


resource string/google_key not found

Hello,
Android Stuido throws this error while building:
\path\to\rosettadrone\app\src\main\AndroidManifest.xml:116:9-118:50: AAPT: error: resource string/google_key (aka sq.rogue.rosettadrone:string/google_key) not found.
I'm new to Android Development. Is there anything missing?
I already tried the fix mentioned in issue 67 , but nothing changed.

You have not added your google map key.
Go to google map development and get your key and add it to the key file.

On 29 Jun 2021, at 11:35, poett1 @.***> wrote:
Hello,
Android Stuido throws this error while building:
\path\to\rosettadrone\app\src\main\AndroidManifest.xml:116:9-118:50: AAPT: error: resource string/google_key (aka sq.rogue.rosettadrone:string/google_key) not found.
I'm new to Android Development. Is there anything missing?
I already tried the fix mentioned in issue 67 https://github.com/The1only/rosettadrone/issues/67 , but nothing changed.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/The1only/rosettadrone/issues/84, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABS7SLGIHVNGZOGGKJQLUHTTVGHUXANCNFSM47PWYSPQ.

https://github.com/The1only/rosettadrone/issues/55#issuecomment-804831763


Make \ a valid bareword character

The backslash () is the preferred path separator on Windows [1].
I intend to make it Elvish a truly cross-platform shell, so being able to write paths without quoting is an important part of that goal.
Elvish now only uses backslashes for line continuations; everywhere else it triggers a parse error.  Elvish can use backticks (`) for line continuation instead.
[1] The forward slash (/) actually works as a path separator on the Windows API level, but not all external programs support it.

Hmm, PowerShell's choice of using ` for line continuation is actually hated by some PowerShell users (power users? :), and some people even go to great length to avoid them. The main argument is that it is really hard to see, especially at the end of the lines.
Elvish also reserves ^ now, and that seems to be a better choice. It is also used by DOS batch scripts as line continuation, a happy coincidence.

Would it be a viable option to make the bare backslash work as a line continuation character only if preceded by white space? Personally, I think it's bad style not to put white space before a trailing backslash anyhow. And I think people do it only rarely, if at all.

ISTM that space backslash, i. e. ⌴\, could work as line continuation string from a user perspective. +1

Would it be a viable option to make the bare backslash work as a line continuation character only if preceded by white space?

The corner case is when the final argument of a command is the root directory; i.e., a bare \. For example, dir \. That case has three workarounds: '\', "\\" and \.\. But is likely to be a source of surprise even though it will be somewhat rare. I can't see any way to allow backslash as both a path separator and a line continuation marker without creating a source of friction that will cause pain. Which makes me a sad puppy since anyone used to the C language or the POSIX shell standard (notwithstanding all its flaws) expects backslash to "escape" the meaning of the next character. Which, in the case of a newline means ignore the newline.

Elvish also reserves ^ now, and that seems to be a better choice.

Yes, but it's not obvious that means some of the other punctuation characters that currently have some special meaning could not be used. Couldn't any punctuation character that is otherwise illegal at the end of a line be used to signal line continuation? For example, couldn't a bare $ (i.e., unquoted) as the final char on a line could also serve as a line continuation signal. That has its own problems, of course. But it seems unambiguous with regard to the Elvish parser.

That goes to show how little I know about Windows: I thought every path needed a drive letter, as in C:\. A trailing $ seems like a perfectly fine choice to me.

Couldn't any punctuation character that is otherwise illegal at the end of a line be used to signal line continuation? For example, couldn't a bare $ (i.e., unquoted) as the final char on a line could also serve as a line continuation signal.

By this logic, why not continue using the backslash? A lone backslash at the end of the line could be a special case that signals a continuation.
WRT the backtick, wasn't this the initial Elvish continuation character, and then it got changed to the backslash?

Replying to @zzamboni:

By this logic, why not continue using the backslash? A lone backslash at the end of the line could be a special case that signals a continuation.

As pointed out by @krader1961, a bare \ is a valid path in Windows and can appear at the end of a command. It refers to the root of the current drive.

WRT the backtick, wasn't this the initial Elvish continuation character, and then it got changed to the backslash?

Yes, I changed my mind again :) but I'm not in favor of going back to backtick this time.

@krader1961 Using $ for line continuation is a clever idea. It works, in fact it seems to be the only metacharacter that works (everything else may be followed by a newline).
That said, ^ still feels better to my personal taste, and I reserve the right to use that as a factor in design decisions :)

Below I justify my personal taste, which I admit is more subjective than objective:
Elvish only has two metacharacter with two different meanings:

&, marking both key-value pairs (from HTTP query parameters) and background pipeline (from sh)
{, starting both braced list ({foo bar}, from sh) and closure ({ echo }, from C's block)

Both meanings of both characters have a source elsewhere that used it in the same or analogous.
$ is used in regular expressions for end of lines, which is almost opposite to line continuation. Whereas ^ (1) is used for line continuation in batch files, and (2) has an original meaning of "insert more things here" in handwriting. It is also used in regex for line beginning, which I feel eludes to the next line, but that could be far-fetched for some.

AFAICT, only $, ^ and backtick currently have no meaning when used as the last token of a line. Of those three I prefer the first two because they're more legible. A weak argument to prefer $ is it leaves ^ for a future use.
I also considered using a punctuation char that is currently legal as a bare word token. Some of those chars are unlikely to appear as the final token of a line. For example, %. That could be used as the final token of a line to indicate continuation if we're willing to require any such use to quote the char; e.g. echo % would have to be written echo '%'. However, even suggesting such a thing makes me queasy as it introduces an ad-hoc rule.

I would argue against ^, I often run git diff HEAD^ or something like that, which would break. Requiring a space character before the line continuation character seems a good idea to me, e. g. ^ would probably work for me as well (as would , still -- ISTM the dir \ case is quite rare)

@Xjs you already have to quote HEAD^ in Elvish today; I reserved ^ and made it an invalid character outside quotes. I feel use of ^ is rare enough (except in HEAD^) and having to quote it is not a terrible inconvinience.

@xiaq I know I have to. But an argument that was made against my suggestion of <space>\ by @krader1961 was that it would break dir \, which is just as well not working without quotes as of now. Personally, I run git commands a lot more often than I list the root directory of a volume without being cd'd to it, so that's that.
You seem to be wanting to stick to a single character for line continuation. I wonder why that is. But of course, you have the final say about anything. I'm just giving feedback from my usage experience. :)

...was that it would break dir \

Note that was simply an easily understood example. The problem is, obviously, more general in as much as any command that might take a path as its final argument is subject to the problem. For example, whatever the Windows equivalent of UNIX's du / is. I too execute many git commands every day. Yet, for whatever reason, I seldom use HEAD^ (or similar constructs) so I haven't felt much pain from a bare ^ being illegal.
Having said all that I'm still inclined to predicate it's special meaning of eliding the following newline on the preceding character being a space or tab. That would make it possible to use ^ elsewhere without quoting it. Again, that introduces an ad-hoc rule but one that seems unlikely to cause problems and the benefits likely justify it.

My current plan is to use ^ as the line continuation character, and make \ a bareword character everywhere. Use of ^ outside line continuation is still reserved for future use.
My main design concern is mainly simplicity of rules rather than frequency of use cases: requiring a space to disambiguate line continuation is too subtle a rule. As I said, this does not mean the design choice is objectively better, but rather, it suits my taste better.

Since making \ a bareword character elsewhere breaks existing use of it for line continuation, this change will be introduced after the 0.14 release.
In 0.14 Elvish should produce deprecation warnings when \ is used for line continuation.

Moving this to 0.14 so that I don't forget to introduce the deprecation in 0.14; after that's done I'll move this back to 0.15.


useQuery is not reactive to its queryClient parameter

Describe the bug
When calling useQuery(opts, queryClient), the hook will (correctly) use the provided queryClient argument as the query client.
However, when calling the hook again with a different QueryClient instance, the hook will keep using the initial query client instance.
Your minimal, reproducible example
https://codesandbox.io/p/sandbox/boring-ellis-rk8smt?workspaceId=1f057848-e245-4f2a-94be-0866c95684db
Steps to reproduce
See the codesanbox for a reproducing example.
In a nutshell, it boils down to
const [queryClient, setQueryClient] = useState(initialQueryClient);

// ...

/* when `queryClient` gets updated to `newQueryClient`,
 * the hook keeps using `initialQueryClient` internally */
useQuery(opts, queryClient);

// ...

const handleQueryClientChange(newQueryClient) {
  setQueryClient(newQueryClient);
}

Expected behavior
I expected useQuery to be reactive to changes in its queryClient parameter.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform

MacOS
Edge

Tanstack Query adapter
None
TanStack Query version
v5.55.0
TypeScript version
v5.1.6
Additional context
As a workaround, we are setting a key prop to the React component that calls useQuery. The key is updated whenever the queryClient parameter changes. This makes useQuery reset and use the new query client.
This workaround is not ideal for us, because it forces us to "lift the state up", breaking the abstraction of the component.

yeah I don’t think we really support swapping out the queryClient on the fly. What would be a use-case for that?

I understand how swapping out the queryClient can look odd. This is certainly an advanced use case.
The short answer is that our queryClient is tied to an external "store" instance, like so:
function createQueryClient(store) {
  const queryCache = new QueryCache({
    onSuccess(data) {
      // logic that puts data in `store`
    },
  });
  return new QueryClient({ queryCache });
}

You might be wondering what the purpose of this store instance is, considering that TanStack Query has its own cache already. I can elaborate on that, if you find the topic relevant.

Also, our store instance can get re-created in a subsequent React render. We must therefore call createQueryClient(store) again whenever that happens, in other to get a queryClient that now refers to the new store.
However, since useQuery ignores queryClient updates, we are in a situation where our new store instance remains empty, because the initial queryClient instance is linked to the initial store instance, which is now obsolete.
Tricks like storeRef.current inside onSuccess will not cut it, because we also need to purge the queryCache entirely when the store changes. The store and the queryClient really are tied together.
Again, I am aware this must appear as an unusual use case. Let me know if you need any more information.

@TkDodo would it be OK if I created a PR for this?
The PR would fix usages of ref and state that assume queryClient will never change. Here is an example to illustrate.
Before
const [observer] = React.useState(
  () => new Observer(client, defaultedOptions),
)

After
Following React recommendation to re-set the state during render:
function useObserver(client, options) {
  const [previousClient, setPreviousClient] = React.useState(client)
  const [observer, setObserver] = React.useState(
    () => new Observer(client, options)
  );

  if (client !== previousClient) {
    setPreviousClient(client)
    const newObserver = new Observer(client, options)
    setObserver(newObserver)
    return newObserver
  }

  return observer
}

We cannot use useMemo in this example because we do not want observer to re-set when defaultedOptions changes

I don’t think it’s that easy because this doesn’t unsubscribe the previous observer, so it will still stick around with a reference to the old queryClient. I don’t think this is something I’d want to support. Setting a key on the QueryClientProvider for when you swap out the client seems like the best workaround imo.


Update shellsploit.py

Revert #10
https://github.com/b3mb4m/shellsploit-framework/commit/91167e063f3e14f932187d8f5cd94b77f5df6f00


.save() doesn't return created_at when updating a model

I am not explicitly specifying the method to update in the .save(). When the model doesn't exist in the database, it will return both created_at and updated_at (hasTimestamps). When the model exists in the database, it will only return updated_at. I assume this is implemented to be this way, so, how can I have .save() return also created_at when on an update?
It is for API Endpoint consistency. I can paste code if relevant to the issue. Thanks!

I don't think it's possible to return specific attributes that were not part of the original data to save. You can either save a model that already has a createdAt attribute (from a previous fetch for example), or use refresh to update the model from the database. Something like:
myModel.save().then(function(model) {
  return model.refresh({columns: ['createdAt']})
}).then(function(model) {
  // model now has "createdAt"
})

Makes sense! Thanks @ricardograca :)


Add support for rioxarray rasterio and update tests

Fixes https://github.com/holoviz/geoviews/issues/590

I think the use of data.rio.crs is preferred as it checks a number of possible locations in the xarray for the CRS. It does however return an instance of rasterio.crs.CRS which we cannot pass to cartopy directly, so here I am converting to WKT first. This may not be ideal as it might give us various warnings, let's see what CI gives us.
An alternative to the to_wkt() is to add specific support in our CRS to cartopy for a rasterio.crs.CRS.

Great! Thanks a lot @Hoxbro !


std_mult -> std_mult_pipe

This will not quite work because the interface for a pipelined mult requires it to be provided a go signal to start executing and waiting on the done signal to get the value from the output. I'm curious, why do you need to make this change? IIRC, this file is not actually used and the mac unit is generated here: https://github.com/cucapra/calyx/blob/master/frontends/systolic-lang/gen-systolic.py#L15

I don't need to make it -- I actually thought it was just plain wrong! When
I tried to compile the file with fud e --to synth-verilog I got an error
saying std_mult was not recognized, so I assumed it was supposed to be
std_mult_pipe. I am currently just running all futil files in Calyx through
compilation to synthesizable verilog, so maybe it's unsurprising that I'm
going to hit files that shouldn't actually be compiler in this way!
On Wed, Jun 29, 2022, 4:45 PM Rachit Nigam @.***> wrote:

This will not quite work because the interface for a pipelined mult
requires it to be provided a go signal to start executing and waiting on
the done signal to get the value from the output. I'm curious, why do you
need to make this change? IIRC, this file is not actually used and the mac
unit is generated here:
https://github.com/cucapra/calyx/blob/master/frontends/systolic-lang/gen-systolic.py#L15
—
Reply to this email directly, view it on GitHub
https://github.com/cucapra/calyx/pull/1064#issuecomment-1170599548, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAJFZANZZJYXQWFY474RW3TVRTNZDANCNFSM52HORZ6Q
.
You are receiving this because you authored the thread.Message ID:
@.***>

Got it, the tests under tests/correctness are the ones we run with simulation so running them first would make more sense

@gussmith23 I'm going to close this for now. Let me know if you run into any other problems!


Add example for automatic sign-in redirect

This issue is for a: (mark with an x)
- [ ] bug report -> please search issues before submitting
- [x] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

The current implementation of the flask app redirects users to a 401.html page if they are not redirected. I would like to see an example where you are just redirected to the sign in process and then back to the page you intended to visit.
Next to a better experience in general, the reason I want this is that this would enable excel PowerQuery Web.Contents() queries to use Organizational authentication. This would be really helpful for me.
I sort of got it to work by changing the error handler:
    app.register_error_handler(
        NotAuthenticatedError,
        lambda err: (redirect(url_for("auth.sign_in")), 302),
    )

However this doesn't pass a redirect url to my original request, so after sign in I am sent to /sign_in_status even though I ogirinally requested /call_ms_graph.

Great suggestion! Maybe it is a property or param we can integrate into the state param on the oauth /authorize call?

Hi @tdamsma ,
I've updated our common code libraries to handle a post-sign-in redirect. I've also updated the sample to have your requested feature in a commented-out section. Please let me know if it works for you!

download latest version
comment line 39, and uncomment line 41
run the app

    # tell flask to render the 401 template on not-authenticated error. it is not strictly required:
    app.register_error_handler(NotAuthenticatedError, lambda err: (render_template('auth/401.html'), err.code))
    # comment out the previous line and uncomment the following line in order to use (experimental) <redirect to page after login>
    # app.register_error_handler(NotAuthenticatedError, lambda err: (redirect(url_for('auth.sign_in', post_sign_in_url=request.url_rule))))
    # other exceptions - uncomment to get details printed to screen:
    # app.register_error_handler(Exception, lambda err: (f"Error {err.code}: {err.description}"))


fix(auth0): Skip parse access token

Description
Thank you for the convenient module!
I am currently trying to integrate Auth0 into Nuxt.js (SSR) using this module.
After creating an Auth0 application and setting up the nuxt.config.ts and .env files, I ran the Nuxt.js app and encountered an Invalid JWT token error.
To investigate further, I added console.log statements within the nuxt-oidc-auth code and discovered that the access token returned from Auth0's token endpoint (/oauth/token) is encrypted, resulting in an empty payload part.

From my attempts, I found that specifying skipAccessTokenParsing: true and validateAccessToken: false was necessary to bypass this issue, which is why I created this PR.
I apologize for the inconvenience, but I would appreciate it if you could review it.
Setps to reproduce
Minimal reproduction code is https://github.com/tri-star/nuxt-oidc-auth-test .

Auth0 application settings

Application type: Regular application
Advanced settings / Grant types: Authorization code, Refresh token
Connections: GitHub, google-oauth2

Sorry, this was a misunderstanding on my part.
To issue an access token with Auth0, I need to add an API and an audience after creating the application.
After performing this task, I confirmed that a parsable JWT is issued.
I will close this PR.


Whether offline messages are supported

Describe the feature request
Whether offline messages are supported
Which project is your feature request related to?

Server

Describe the solution you'd like
WithCleanSession = false
After subscribing to a message, the client is offline for a period of time. When it goes online again, it can receive messages during the offline period

Are you talking about retained messages?

If you refer to persisted sessions (across server restarts): They are not yet supported. Support is planned but not for version 4.0.


add logicmonitor vendor

@magsther Please review the PR.
I have added logicmonitor as vendor, as listed https://opentelemetry.io/vendors/


Add xADServicePrincipalName resource

By adding a new resource xADServicePrincipalName, we can add and remove SPNs from user and computer accounts. independently from the existing SPNs. Comparing to xADUser and xADComputer, it will not replace all SPNs of the account object, just add and remove SPNs.

This change is

Codecov Report

Merging #163 into dev will decrease coverage by <1%.
The diff coverage is 72%.

@@        Coverage Diff         @@
##           dev   #163   +/-   ##
==================================
- Coverage   79%    79%   -1%
==================================
  Files       11     12    +1
  Lines      990   1030   +40
  Branches     2      6    +4
==================================
+ Hits       786    815   +29
- Misses     202    209    +7
- Partials     2      6    +4

I Claudio, are you planning to add Kerberos delegation capabilities on xADUser / XADComputer ? I would nicely complete this long avaited SPN capability.
Cheers

Not planned at the moment. I just needed the feature to add SPNs to an existing AD user or computer. Can be part of a future PR of course.

Does anyone have time to review this PR?

I did a initial review on this one.

Reviewed 1 of 4 files at r1, 3 of 3 files at r2.
Review status: all files reviewed at latest revision, 26 unresolved discussions.

README.md, line 231 at r2 (raw file):

* **Credential**: User account credentials used to perform the operation (optional).

### **xADServicePrincipalName**

Please align these parameter descriptions with the descriptions in the schema.mof.

README.md, line 235 at r2 (raw file):

The xADServicePrincipalName DSC resource will manage service principal names.

* **Ensure**: Define if the SPN should be added or removed (optional).

Please add the allowed values here, and also what the default value is.

README.md, line 237 at r2 (raw file):

* **Ensure**: Define if the SPN should be added or removed (optional).
* **ServicePrincipalName**: The full SPN to add or remove, e.g. HOST/LON-DC1.
* **Account**: The user or computer account to add or remove the SPN, e.b. User1 or LON-DC1$ (optional).

Please add the default value here. Please also describe what happens when this is left as the default value.

DSCResources/MSFT_xADServicePrincipalName/MSFT_xADServicePrincipalName.psm1, line 4 at r2 (raw file):

<#
    .SYNOPSIS
    Returns the current state of the specified service principal name.

Please indent these descriptions one more tab (style guideline). Throughout.

DSCResources/MSFT_xADServicePrincipalName/MSFT_xADServicePrincipalName.psm1, line 6 at r2 (raw file):

    Returns the current state of the specified service principal name.

    .PARAMETER Ensure

Could we use the same description here as in the README.md? Those descriptions in the README.md seems more descriptive. If so, throughout.

DSCResources/MSFT_xADServicePrincipalName/MSFT_xADServicePrincipalName.psm1, line 21 at r2 (raw file):

    param
    (
        [Parameter()]

This non-mandatory parameter should be removed from the Get-TargetResource.
See best practices; https://github.com/PowerShell/DscResources/blob/master/BestPractices.md#get-targetresource-should-not-contain-unused-non-mandatory-parameters

DSCResources/MSFT_xADServicePrincipalName/MSFT_xADServicePrincipalName.psm1, line 31 at r2 (raw file):

        $ServicePrincipalName,

        [Parameter()]

This non-mandatory parameter should be removed from the Get-TargetResource
See best practices; https://github.com/PowerShell/DscResources/blob/master/BestPractices.md#get-targetresource-should-not-contain-unused-non-mandatory-parameters

DSCResources/MSFT_xADServicePrincipalName/MSFT_xADServicePrincipalName.psm1, line 49 at r2 (raw file):

        }
    }
    elseif ($spnAccounts.Count -eq 1)

Could we skip this if block and only have the block in the else-block? If there are only one account in $spnAccounts, then -join will not do anything.
PS > 'a' -join ';'
a
PS > 'a','b' -join ';'
a;b

DSCResources/MSFT_xADServicePrincipalName/MSFT_xADServicePrincipalName.psm1, line 126 at r2 (raw file):

        if ($spnAccounts -notcontains $Account)
        {
            Get-ADObject -Filter { SamAccountName -eq $Account } |

What happens here when $Account is set to ''?

DSCResources/MSFT_xADServicePrincipalName/MSFT_xADServicePrincipalName.psm1, line 176 at r2 (raw file):

    )

    [System.Boolean] $desiredConfigurationMatch = $true

Minor: Shouldn't this start out as false? And the evaluations below make it true, if so? Non-blocking.

DSCResources/MSFT_xADServicePrincipalName/MSFT_xADServicePrincipalName.psm1, line 178 at r2 (raw file):

    [System.Boolean] $desiredConfigurationMatch = $true

    $currentConfig = Get-TargetResource @PSBoundParameters

This need to be changed when the non-mandatory parameters are removed from the Get-TargetResource.

DSCResources/MSFT_xADServicePrincipalName/MSFT_xADServicePrincipalName.psm1, line 178 at r2 (raw file):

$currentConfig

Can we try to avoid abbreviations, and write out the varable names; $currentConfiguration

DSCResources/MSFT_xADServicePrincipalName/MSFT_xADServicePrincipalName.psm1, line 180 at r2 (raw file):

$desiredConfigurationMatch

Should this be here? Seems unnecessary.

DSCResources/MSFT_xADServicePrincipalName/MSFT_xADServicePrincipalName.schema.mof, line 3 at r2 (raw file):

[ClassVersion("<IP_ADDRESS>"), FriendlyName("xADServicePrincipalName")]
class MSFT_xADServicePrincipalName : OMI_BaseResource
{

Please align these parameter descriptions with the README.md.

Tests/Unit/MSFT_xADServicePrincipalName.Tests.ps1, line 32 at r2 (raw file):

testDefaultParams

Can we wirte out this to $testDefaultParamaters? Throughout.

Tests/Unit/MSFT_xADServicePrincipalName.Tests.ps1, line 39 at r2 (raw file):

            Context 'No SPN set' {

                Mock Get-ADObject

Please use named arguments Mock -CommandName Get-ADObject. Throughout all mocks.

Tests/Unit/MSFT_xADServicePrincipalName.Tests.ps1, line 41 at r2 (raw file):

should

'Should...' - Upper 'S'. Throughout all It-blocks.

Tests/Unit/MSFT_xADServicePrincipalName.Tests.ps1, line 53 at r2 (raw file):

Mock Get-ADObject { [PSCustomObject] @{ SamAccountName = 'User' } }

Please use named arguments Mock -CommandName Get-ADObject -MockWith { [PSCustomObject] @{ SamAccountName = 'User' } }. Throughout all mocks.

Tests/Unit/MSFT_xADServicePrincipalName.Tests.ps1, line 53 at r2 (raw file):

            Context 'One SPN set' {

                Mock Get-ADObject { [PSCustomObject] @{ SamAccountName = 'User' } }

Non-blocking. Shorting the rows like below would be easier to read when reviewing. It would help the reviewers, but non-blocking since it does not say this in the style guideline :)
Mock -CommandName Get-ADObject -MockWith {
    [PSCustomObject] @{ SamAccountName = 'User' }
}

Tests/Unit/MSFT_xADServicePrincipalName.Tests.ps1, line 178 at r2 (raw file):

'should throw an exception'

'Should throw the correct exception'

Tests/Unit/MSFT_xADServicePrincipalName.Tests.ps1, line 180 at r2 (raw file):

                It 'should throw an exception' {

                    { Set-TargetResource @testPresentParams } | Should Throw

Please add so it evaluate that the correct error message is thrown, not just any error message.

Tests/Unit/MSFT_xADServicePrincipalName.Tests.ps1, line 186 at r2 (raw file):

{ }

You should not need the braces at the end here?

Tests/Unit/MSFT_xADServicePrincipalName.Tests.ps1, line 194 at r2 (raw file):

-Scope Context

I think this is better as `-Scope It'.

Tests/Unit/MSFT_xADServicePrincipalName.Tests.ps1, line 208 at r2 (raw file):

-Scope Context

I think this is better as `-Scope It'.

Tests/Unit/MSFT_xADServicePrincipalName.Tests.ps1, line 208 at r2 (raw file):

                    $result = Set-TargetResource @testPresentParams

                    Assert-MockCalled Set-ADObject -Scope Context -Times 2 -Exactly

Would it be possible to add a ParameterFilter on this so assert that it is called once for -Remove and once for add -Add?

Tests/Unit/MSFT_xADServicePrincipalName.Tests.ps1, line 222 at r2 (raw file):

-Scope Context

I think this is better as `-Scope It'.

Comments from Reviewable