.Net Core 2.2 Auth AzureAD Startup Generated Code is Complete?

From @DanJ210 on Wednesday, 20 February 2019 16:08:02
Generated startup code is very light and when I try it in other .Net Core 2.2 MVC Web Applications it doesn't work. I'm trying to find documentation on this small snippet of code but the .Net Core documentation is on 2.0 and doesn't talk about what's going on in 2.2, .Net Core Documentation
General
The code below is all that's in the .Net Core Startup.cs file to enable AzureAD auth. In previous .Net Core versions I had an AccountController.cs along with a couple of other files. In this, 2.2 version, there is none of those files which would be great if they are no longer needed in 2.2. But I'm trying to figure out how this is working because I'm updating .Net Core Web Apps that I have to 2.2 and I'm using the same code as shown below but am being told that No AuthenticationScheme was specified, and there was no DefaultChallengeScheme found. Which makes sense because it's not declared in Startup.cs but then how does this work for the app that .Net Core generates and not other apps?
So this is what I'm trying to understand, how does the code below work for the generated 2.2 .Net Core app and not when added to other 2.2 .Net Core apps?
services.AddAuthentication(AzureADDefaults.AuthenticationScheme)
                .AddAzureAD(options => Configuration.Bind("AzureAd", options));

            services.AddMvc(options =>
            {
                var policy = new AuthorizationPolicyBuilder()
                    .RequireAuthenticatedUser()
                    .Build();
                options.Filters.Add(new AuthorizeFilter(policy));
            })
            .SetCompatibilityVersion(CompatibilityVersion.Version_2_2);

Copied from original issue: dotnet/core#2331

All of that controller code was moved into the Microsoft.AspNetCore.Authentication.AzureAD.UI package. If AddAzureAD compiles then you have that dependency already. That doesn't explain your AuthenticationScheme error though.
When you copied that code to a new project did you also copy the appsettings.*.json files to go with it?

The only settings in appsettings.json are the same settings I've seen every version produce. So the other app which was 2.1 already has the "AzureAd" section.
Yup the code compiles. But no default authentication or challenge scheme is specified. I don't see where it's specified in the 2.2 app either. Both apps have the same Microsoft.AspNetCore.Authentication.AzureAD.Ui package.

This is the line that sets default schemes: services.AddAuthentication(AzureADDefaults.AuthenticationScheme)

@tratcher yes but it doesn't work in other apps. What I'm trying to understand is how the above code works by itself in a generated 2.2 app but it doesn't work in other 2.2 apps. Other 2.2 apps require more.

For the complete diff between the app types I suggest looking here:
https://github.com/aspnet/AspNetCore/tree/master/src/ProjectTemplates/Web.ProjectTemplates, See the OrganizationalAuth pivot in in places like this:
https://github.com/aspnet/AspNetCore/blob/master/src/ProjectTemplates/Web.ProjectTemplates/StarterWeb-CSharp.csproj.in#L21
https://github.com/aspnet/AspNetCore/blob/d24ec01224726fa85dc7683d0f70a94d9172bc94/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/appsettings.json#L12-L23
https://github.com/aspnet/AspNetCore/blob/master/src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/Startup.cs


Fix problem with context manager exit

I use your module in my project. I have met a problem with closing of aiohttp client session:
2024-10-22 15:59:26 [scrapy.core.engine] INFO: Closing spider (finished)
2024-10-22 15:59:26 [scrapy.core.engine] INFO: Spider closed (finished)
2024-10-22 15:59:27 [asyncio] ERROR: Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x000001DE3795D580>
2024-10-22 15:59:27 [asyncio] ERROR: Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x000001DE37AC0410>
2024-10-22 15:59:27 [asyncio] ERROR: Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x000001DE37ADDD90>, 1111928.671)]']
connector: <aiohttp.connector.TCPConnector object at 0x000001DE37AC1D60>

I fixed this error using ScrapyPlaywrightDownloadHandler class as an example.

Thanks!


Problem using plugin in Brave Browser

Maybe it's me or maybe its the app. I added several sites to the whitelist using the schema https://subdmonain.domain.tld and each on one line. But when I visit the sites the plugin icon seems to be disabled and states on hover "this URL is not on your whitelist".
Is it the config or is there an issue with the plugin?
If it helps: I use the recent stable version of the Brave Browser.

I can confirm the same issue. The blacklist isn't working in Brave either.

I can confirm I also had this issue, however after looking through my settings I had my cookies set to "only block cross-site" and once I changed it to "Allow all cookies" it seemed to start reporting back to wakatime.
It still said I was "signed in as [blank]" though...
I've previously had issues when accessing firebase apps because of the auth cookies being considered cross-site so as a stab in the dark I thought I would give it a try.
In regards to the white/black list not working, I had the extension running in developer mode with the console output and seemed to work. It was printing out messages like the following:
chrome://newtab/ is not on a whitelist.
events.js:413 recording a heartbeat - tab updated
events.js:301 {"entity":"https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events","type":"url","time":"1592218390","project":"<<LAST_PROJECT>>","is_debugging":false,"plugin":"chrome-wakatime/1.0.2"}
events.js:413 recording a heartbeat - tab updated

I have "https://developer.mozilla.org" on the whitelist and they were appearing correctly in my dashboard.
I hope this is of any help in solving this issue :)

same here, have whitelisted many domains that used to work on chrome but not on brave
*.atlassian.net *.aws.amazon.com *.datadoghq.com localhost

I see the same type of failure with Vivaldi, for localhost alone.

The following worked for me:

Enable cookies for wakatime.
Open brave://settings/cookies, go to Sites that can always use cookies and add [*.]wakatime.com.
Whitelist the sites

https://subdmonain.domain.tld   # Works
https://*.domain.tld            # Does not work
*.domain.tld                    # Does not work

If you find that it does not report the activity of a "whitelisted" site, open brave://extensions/ and in the wakatime extension card click on  background page. In the devtools console,  you will see https://other.domain.tld is not on a whitelist, add this url to your whitelist.
Note: As far as I've seen, there is no need to enable the cookies for the whitelisted sites, you can set them to "Cookies Blocked" in the Brave shield.

Hello @karladler There is a new version of the extension v3, the issues reported above should be addressed now
Can you please confirm


Add interactive prompt mode

If a user passes the --prompt CLI flag, this allows them to manually inspect the stdio and exit status of each test run before deciding whether to mark it as a regression or not. They can also retry the test.
depends on #5
closes #9

Thanks!


Software freezes while setting up an extra secure password

Issue description
While setting up my wallet iI decided ti choose an very extra secure password of about 256 characters, managed by a Passwordmanager, the Software instantly freezes and don't respond anymore.
Wallet version
Firefly v. 1.1.0 - officiall download
System specification
Win10 64bit
Is it a repeatable issue?
Yes
Steps To reproduce the issue
Open a new wallet copy past a password with 256 characters like this:
qt\V;;W-hÄP".^bWeWjs}Uds"^.9eGUa;{lV|E?u3ü)l-7~cmzZ4SfggQsYzi.1^hWZVU!NsLICj0X*%>epd\ÜmcZPS!eB~LQ P>NKIDh71?Zvb_<Cbgs%yöyoyX4Q8taü${8|'Xf+HJ9{V0"3kREfSAOßÜ@_&1ku3Gßö8;9LPlPIo{BPB<5N 5|(9cHJx3?k.c}%*q7~Z2PKÄö(BAb/t%gv%bFfJ!6zü7e8ä9apqV'574v@''ü}{W_eCN%O7e
Expected behaviour
dont freeze ;D
Actual behaviour
freeze
Errors
no error log at all

This issue is still present with user's provided string in Firefly v1.3.3 on Windows 10. I have not tried to replicate on other platforms.

I've reproduced the error here and this is related to the password strength algorithm, we're using a lib called 'zxcvbn', and one of the performance issues of this lib is that when we have a large password, the function execution takes a lot longer than usual passwords, so according to the docs, is recommended that we only check a limited number of characters in the password, like the first 100 characters or less.
https://github.com/dropbox/zxcvbn#user-content-performance


Correct comment spacing in Trie [CPP]

By submitting this pull request I confirm I've read and complied with the below declarations.

[x] I have read the Contribution guidelines and I am confident that my PR reflects them.
[x] I have followed the coding guidelines for this project.
[x] My code follows the skeleton code structure.
[ ] This pull request has a descriptive title. For example, Added {Algorithm/DS name} [{Language}], not Update README.md or Added new code.
[x] This pull request will be closed if I fail to update it even once in a continuous time span of 7 days.

^Assigned by mistake.

@Anshuman-Verma It's better to untick

I have read the Contribution guidelines and I am confident that my PR reflects them.

as you didn't created an issue.

Done @aashutoshrathi


Weeder

Description
A periodic cleanup PR to do weeder on the cabal files and remove stale dependencies.
Linked issue

Type of change

[ ] 🐞 Bug fix (non-breaking change which fixes an issue)
[ ] 🛠 New feature (non-breaking change which adds functionality)
[ ] ⚠ Breaking change (fix or feature that would cause existing functionality to change)
[ ] 🏭 Refactoring that does not change existing functionality but does improve things like code readability, structure etc
[ ] 🔨 New or improved tests for existing code
[ ] ⛑ git-flow chore (backport, hotfix, etc)

Developer checklist

[ ] I have read the style guide document, and my code follows the code style of this project.
[ ] If my code deals with exceptions, it follows the guidelines.
[ ] I have updated any documentation accordingly, if needed. Documentation changes can be reflected in opening a PR on cardanodocs.com, amending the inline Haddock comments, any relevant README file or one of the document listed in the docs directory.
[ ] CHANGELOG entry has been added and is linked to the correct PR on GitHub.

Testing checklist

[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.

QA Steps

Screenshots (if available)

NOTE to self and @Anviking: Remember to include a weeder job in the CI for cardano-wallet :)


fixed logout and join buttons in nav bar

when logged in, the logout button was not visible and the join button was visible in the navigation bar. I moved some code around in navigation.html to address the issue

new commits up; removed join.html from templates/user folder to address duplicate issue and made changes to navigation.html to remove send email and join buttons


Qualification tool use expressions parsed in duration and speedup factors

Is your feature request related to a problem? Please describe.
Once we have expression parsing in place from https://github.com/NVIDIA/spark-rapids/issues/5617 we need to update the duration and speedup factors to take those into account.
We also want to output all that information into a csv file so end user can see it.

there may not be much here to do if we just change whether the exec is supported, but we may also want to dump out which exprs weren't supported.

We don't have to modify scores based on expressions. Rather, it's whether we support all expressions within that Exec.  If atleast one of the expressions is not supported then we fall back to CPU. In the comment , it's mentioned that we should print unsupported expressions. We are doing that in https://github.com/NVIDIA/spark-rapids/issues/6264. We can close this issue. (per @nartal1 )


LruCacheMap, simple LRU cache utility for ArcHost and others

ugh, i forgot to set upstream/master when I checked out


Fix multiple Task failure bug. [INFINITY-628]

@mohitsoni:  Tested on sdk-reference-framework with 1s sleep and plan behaves as expected, and framework continuously recovers.

This is looking much better now.


Layer support

Let people define layer(s) to load in for their apps, which might include things like headless chrome, keeping it out of your primary deployment zip

[ ] add support
[ ] add docs
[ ] add link in awesome-layers

Yes! We can also define layers for up's main proxy binary, as well as node_modules that does not change as often. This would not only speed up deployment speed, but also make it possible to edit a lot of apps inline using lambda's inline code editor.

@tonyxiao strange! I'll probably have time to give this a try today with Node

cool I was able to get it working with headless chrome pretty easily, basically just npm install some pkgs and:
$ zip -r function.zip .
$ aws lambda publish-layer-version \
  --layer-name nodejs-chrome \
  --description "Node.js Headless Chrome" \
  --license-info MIT \
  --zip-file file://function.zip \
  --compatible-runtimes nodejs6.10 nodejs8.10

the next Pro release (probably later today) will add lambda: { layers: [...} }

Did you mean to close this before releasing?
On Thu, 13 Dec 2018 at 17:21, TJ Holowaychuk<EMAIL_ADDRESS>wrote:

Closed #743 https://github.com/apex/up/issues/743.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/apex/up/issues/743#event-2024337496, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AE7LUX5u-JMx2WNRvHOSCI87IPbKmHmfks5u4mJNgaJpZM4ZBNJd
.

--
Thanks,
KomuW.
https://www.komu.engineer/about

@tj
On Thu, 13 Dec 2018 at 19:50, komu wairagu<EMAIL_ADDRESS>wrote:

Did you mean to close this before releasing?
On Thu, 13 Dec 2018 at 17:21, TJ Holowaychuk<EMAIL_ADDRESS>wrote:

Closed #743 https://github.com/apex/up/issues/743.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/apex/up/issues/743#event-2024337496, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AE7LUX5u-JMx2WNRvHOSCI87IPbKmHmfks5u4mJNgaJpZM4ZBNJd
.

--
Thanks,
KomuW.
https://www.komu.engineer/about

--
Thanks,
KomuW.
https://www.komu.engineer/about

Hi everyone, I'm having trouble finding the docs for leveraging layers in Up (pro). Any pointers?

NVM, found it!
https://apex.sh/docs/up/configuration/#lambda_settings


⚠ Bofrost.be has degraded performance

In 7301fc3, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 1112 ms

Resolved: Bofrost.be performance has improved in d50681f after 6 minutes.


Write to clipboard directly from javascript

Minimal example
// This is what I need
var cpb = new Clipboard("#id");
cpb.copy("some text");  // Text is copied to clipboard
Expected behaviour
I wonder if it was possible to copy to clipboard directly from javascript, is it possible?
//-- this is my experiment
I try to delete the value copied to clipboard after a while, so I receive an event throw a function ...
 var clipboard = new Clipboard("#myButton"); clipboard.on('success', function(e) {      notifyCopy(e.text); } )
inside this function I try to delete the content of the clipboard
The function is (this is a test to see how to do it)
function notifyCopy(text){     var buttonVoid = document.getElementById("myButtonVoid");     if( buttonVoid .value == text )         return;     setTimeout(function(){         buttonVoid .click();     }, 2000); }
myButtonVoid is a hidden button to force a copy event whith a empty value
This would delete the content of the clipboard overwriten the previos copied value
Actual behaviour
When the event copy is throw I get this error:
clipboard.min.js:7:6873
document.execCommand('cut'/'copy')It has been denied because it has not been called from within a
event handler user-generated short run.
So, I have two problems
1.- to write to the clipboad I need to create an extra element, add the clipboard copier to it and do some process, and finally it doesn't work
2.- I don't know if is there a direct copy method
Browsers affected
tested on Firefox 49.0.1

I too was wondering about this recently. This library seems massively over-complicated when all you want to do is programmatically copy some text to the clipboard.
I ended up adapting the approach taken by this library into a very small class that have a hard dependency on binding events to buttons: https://github.com/djmattyg007/pictorials/blob/1c99a013fb9fa9fcd90d30c7f779e7f0fa345322/assets/js/clipboard.js
I'm not sure about the execCommand call being denied though, sorry.

oh, thank you very much
I Think the problem about the copy is for some security reason in Firefox. I've try in IE and I get the some problem. Also, I've try a solution similar to your new example an d the problem is similar.
You can not save anything to clipboard if it is not in a thread started by the user
Thanks one more time

You can't programmatically copy text to clipboard due to security restrictions imposed by browser vendors, user interaction is required in order copy/cut to work. A simulated click event also does not work as this would enable clipboard poisoning.
P.S.: If clipboard.js isn't the right solution for you, feel free to use another library or roll your own implementation :)

I think the salient point is that someone may wish for more control over how text is copied to the clipboard upon a user action, rather than the single solution provided by this library of just binding event listeners to buttons directly.

I think the salient point is that someone may wish for more control over how text is copied to the clipboard upon a user action

If you want more control over how text is copied see the "Advanced options" in the docs.

rather than the single solution provided by this library of just binding event listeners to buttons directly.

As I said before, user interaction is required in order copy/cut to work. This is a browser requirement, not mine.

This is too bad, but I completely understand. It would make sense to stick this in the docs right?  I bet that's why many of us arrive at clipboard.js at first. noticing that it doesn't fit all user cases forces you go deep in how the clipboard mechanism work (the thing you were trying to avoid at first) and at the end, adapt, use other or roll your own implementation. In my use case, for a canvas-webgl game, I ended just adding a "copy" listener to the body, with a evt.clipboard.setData and   document.execCommand('copy'). for the triggering.  worked very well. as @adam-lynch  suggest, highlight the expected use case in the doc will be of help.


(bug) Error finding PHP versions

Describe the bug
On a fresh install on Ubuntu 22.04.4 via docker I got the message
Error finding PHP versions: Error: Command failed: whereis -abq php
/bin/sh: whereis: not found

To Reproduce
Steps to reproduce the behavior:

Launch the app via Docker
docker run -p 3000:3000 -v :/magento clickandmortar/mage-wizard
Set the path to magento on the welcome form , click "Save & Continue"
In terminal see the message :

Error finding PHP versions: Error: Command failed: whereis -abq php
/bin/sh: whereis: not found

In the app the dashboard entry is working fine, the other menu items display only empty grids

Screenshots

Thanks @maxicoffee002 for your feedback. What version of Magento are you using?
I'll add a fallback on which to find for PHP binaries, the error shouldn't be blocking (Mage Wizard does not use yet the PHP binary directly).

The split error should be fixed in v0.2.19


Datatype of Samples?

I am first trying to figure out exactly where and how the program is interpreting the datastream from the Android sources. I have been considering enabling the remote_submix Audio Source, but in any case, it would be helpful if you may be able to point me in the direction of where the program is taking in the data stream and basically the pipeline for which the data travels. The goal is to be able to load and analyze audio files. Thank you!

The data process loop is located in run() in SamplingLoop.java (after commit c9e430b2  (Feb 06, 2017)), as well as the trigger of graphics refresh.
In every loop of while (isRunning), it reads a chunk of audio samples
record.read(audioSamples, 0, readChunkSize);
, then "stream" it to STFT.java by
stft.feedData(audioSamples, numOfReadShort);
which calculates RMS and FFT whenever enough data is collected. The view is then informed by
activity.analyzerViews.update(spectrumDBcopy);
which ultimately calls invalidate() of the graphic view to request an update (automatically call the AnalyzerGraphic.onDraw(Canvas c)).
The code also contains a few custom audio sources, which is generated by readTestData() in SamplingLoop.java, and you can see usage in that while loop also. You might start from here to analyze an audio file, or write you own process loop, depending on you need.
The remote_submix Audio Source is not available to normal app, see https://developer.android.com/reference/android/media/MediaRecorder.AudioSource.html#REMOTE_SUBMIX.

@bewantbe Thank you for the response! I will look into the possibility of the custom process loop, as it does seem unusually convoluted to get remote_submix working.
@DSteve595 You and I can look here for potential collaboration on this project as well. :+1:

BTW, I saw a recent comment in the Play Store, is that you?

@bewantbe That indeed was me on another account I have. Thank you for the reply. I thought the app needed a review on the Store that reflected the current state of the app so far, and do completely appreciate your continued support in every way. You are doing a great service for the community, and I want to contribute as much as I can where possible to help support the app and that effort. Obviously, the timeline is not much of a concern, and I was also hoping raising the rating in the store which may rank the app a little higher on search, so more people can discover and use Audio Analyzer for Android.


Improve SPIRV bindings

Description
Hello,
The bindings for SPIRV are clunky, and a bit unsafe.
For example, a simple snippet to use reflections to list uniforms:
//Get metadata from shader
try (MemoryStack stack = MemoryStack.stackPush()) {
    System.err.println("Creating spvc context");
    PointerBuffer contextPointer = stack.mallocPointer(1);
    Spvc.spvc_context_create(contextPointer);
    Spvc.spvc_context_set_error_callback(contextPointer.get(0), (userdata, error) -> {
        String errorString = MemoryUtil.memUTF8(error);
        LOGGER.severe("SPIR-V Error: " + errorString);
    }, 0L);

    System.err.println("Parsing spirv");
    IntBuffer words = spvBuffer.asIntBuffer();
    PointerBuffer ir = stack.callocPointer(1);
    Spvc.spvc_context_parse_spirv(contextPointer.get(0), words, words.limit(), ir);

    System.err.println("Creating compiler");
    PointerBuffer compilerPointer = stack.mallocPointer(1);
    Spvc.spvc_context_create_compiler(contextPointer.get(0), Spvc.SPVC_BACKEND_GLSL, ir.get(0), Spvc.SPVC_CAPTURE_MODE_TAKE_OWNERSHIP, compilerPointer);

    System.err.println("Creating shader resource");
    PointerBuffer resourcesPointer = stack.mallocPointer(1);
    Spvc.spvc_compiler_create_shader_resources(compilerPointer.get(0), resourcesPointer);

    System.err.println("Getting shader resources");
    PointerBuffer listPointer = stack.mallocPointer(1);
    PointerBuffer sizePointer = stack.mallocPointer(1);
    Spvc.spvc_resources_get_resource_list_for_type(resourcesPointer.get(0), Spvc.SPVC_RESOURCE_TYPE_UNIFORM_BUFFER, listPointer, sizePointer);

    System.err.println("Wrapping resources");
    int size = (int) sizePointer.get(0);
    System.err.println("Size = " + size);
    SpvcReflectedResource.Buffer resources = SpvcReflectedResource.createSafe(listPointer.get(0), size);

    System.err.println("Shader uniforms:");
    for (int i = 0; i < size; i++) {
        SpvcReflectedResource resource = resources.get(i);
        int set = Spvc.spvc_compiler_get_decoration(compilerPointer.get(0), resource.id(), Spv.SpvDecorationDescriptorSet);
        int binding = Spvc.spvc_compiler_get_decoration(compilerPointer.get(0), resource.id(), Spv.SpvDecorationBinding);

        System.err.println("Uniform: " + resource.nameString());
        System.err.println("ID: " + resource.id());
        System.err.println("Set = " + set);
        System.err.println("Binding = " + binding);
    }

    System.err.println("Destroying spvc context");
    Spvc.spvc_context_destroy(contextPointer.get(0));
}

First, to get the error string on the callback, a memory map has to be made to a pointer that was passed to us:
 Spvc.spvc_context_set_error_callback(contextPointer.get(0), (userdata, error) -> {
        String errorString = MemoryUtil.memUTF8(error); <--- Manually getting the string from a pointer
        LOGGER.severe("SPIR-V Error: " + errorString);
    }, 0L);

Next, when getting the shader resources, the size is returned as a pointerbuffer, when in fact it should be an intbuffer as the value is directly the size:
 System.err.println("Getting shader resources");
    PointerBuffer listPointer = stack.mallocPointer(1);
    PointerBuffer sizePointer = stack.mallocPointer(1);  <--- This holds the actual number of returned resources, not the pointer to an int.
    Spvc.spvc_resources_get_resource_list_for_type(resourcesPointer.get(0), Spvc.SPVC_RESOURCE_TYPE_UNIFORM_BUFFER, listPointer, sizePointer);

Last as far as this example goes, the pointer to the list of resources has to manually be mapped to the SpvcReflectedResource.Buffer.
 System.err.println("Wrapping resources");
    int size = (int) sizePointer.get(0);
    System.err.println("Size = " + size);
    SpvcReflectedResource.Buffer resources = SpvcReflectedResource.createSafe(listPointer.get(0), size);

This is just a quick example snippet from an application of mine, but it clearly demonstrates some of the unsafe behaviors of the SPIRV binding.
Looking at other bindings such as the Shaderc binding, many of these things are handled internally in the binding providing the user a safer API.
Thoughts?
Thanks,
Trevor
EDIT: I would also like to add to this that the current javadocs are missing the SPV module.

Hey @tlf30,

First, to get the error string on the callback, a memory map has to be made to a pointer that was passed to us:

Upcalls in LWJGL are intentionally low-level/unsafe because that's the most lightweight option available. We have the luxury of method overloads with downcalls (unsafe method with the n prefix + normal method + other overloads for convenience), but upcalls always need to be directed to a single method. JNI callbacks are already seriously expensive and I didn't want to force even more performance overhead to every user of a given callback. For example, getting a String in the callback would mean always parsing for the null-terminating character and allocating a Java String instance. Some users may want to do something else with the string pointer or not care about it at all (I mean in general, not talking about spvc_context_set_error_callback specifically).

Next, when getting the shader resources, the size is returned as a pointerbuffer, when in fact it should be an intbuffer as the value is directly the size

The resource_size parameter has a type of size_t *, which is a pointer to an int on 32-bit processes and a long on 64-bit processes. Mapping it to a PointerBuffer is correct.

Last as far as this example goes, the pointer to the list of resources has to manually be mapped to the SpvcReflectedResource.Buffer.

Java doesn't have output parameters and the only other option would be making struct classes mutable (i.e. making it possible to change the address they point to). It would lead to a lot of confusing code imho.

it clearly demonstrates some of the unsafe behaviors of the SPIRV binding.
Looking at other bindings such as the Shaderc binding, many of these things are handled internally in the binding providing the user a safer API.

LWJGL bindings are as safe or unsafe as the underlying library being exposed to the Java land. This is what "Lightweight" means in LWJGL. Anything else would mean too much work for the maintainers (to implement, explain, support and so on). We are all Java developers, we know how to trivially wrap the unsafe-ness in clean, safe APIs.

EDIT: I would also like to add to this that the current javadocs are missing the SPV module.

The SPVC C header contains no documentation atm, there was nothing to create javadoc from.

Thank you for the detailed reply. I took the time to investigate how the SPIRV-Cross library was built. Unfortunately, it seems to be a little strange in places, such as returning a size_t just to return a count.

LWJGL bindings are as safe or unsafe as the underlying library being exposed to the Java land. This is what "Lightweight" means in LWJGL. Anything else would mean too much work for the maintainers (to implement, explain, support and so on). We are all Java developers, we know how to trivially wrap the unsafe-ness in clean, safe APIs.

I see exactly what you mean now. The SPIRV-Cross library itself is a bit cumbersome and exposes raw pointers. Perhaps this is a side effect of creating the C api as a wrapper around the C+ api. It definitely is a big difference after using other libraries that come over quite nice such as shaderc.
Thank you for all your hard work on this, I feel at the moment this is perhaps as good as it is going to get unless the underlying SPIRV-Cross API changes.

Thank you for the detailed reply. I took the time to investigate how the SPIRV-Cross library was built. Unfortunately, it seems to be a little strange in places, such as returning a size_t just to return a count.

LWJGL bindings are as safe or unsafe as the underlying library being exposed to the Java land. This is what "Lightweight" means in LWJGL. Anything else would mean too much work for the maintainers (to implement, explain, support and so on). We are all Java developers, we know how to trivially wrap the unsafe-ness in clean, safe APIs.

I see exactly what you mean now. The SPIRV-Cross library itself is a bit cumbersome and exposes raw pointers. Perhaps this is a side effect of creating the C api as a wrapper around the C+ api. It definitely is a big difference after using other libraries that come over quite nice such as shaderc.
Thank you for all your hard work on this, I feel at the moment this is perhaps as good as it is going to get unless the underlying SPIRV-Cross API changes.


Add use_column_width option

Had the same need as in https://github.com/blackary/streamlit-image-coordinates/issues/3, so I gave implementing it a shot.
Should be backwards-compatible, though the returned value now has extra width and height attributes so that if the column width is being used you can figure out where the click was on the resized image.
Happy to make changes if I've done something wrong!

Happy to help, thanks for the great library!


Unable to connect to device over terminal server on scrapli 2022.7.30.post1

Describe the bug
Device connection fails when using console connection over terminal server, identical configuration works on: 2022.1.30
To Reproduce
Steps to reproduce the behavior:

Your script:
`
#!/usr/bin/python3
from scrapli import Scrapli

username = 'automation'
password = 'automation'
device = {
'host': '<IP_ADDRESS>',
'port': 10012,
'transport': 'telnet',
'auth_strict_key': False,
'platform': 'cisco_iosxe',
'auth_username': username,
'auth_password': password,
}
with Scrapli(** device, comms_return_char='\r\n') as conn:
output = conn.send_command('show version')
print(output.textfsm_parse_output())
`
3. What you're connecting to (vendor, platform, version): Cisco C4331
5. Anything else relevant
Expected behavior
Working output:
[{'version': '17.6.3a', 'rommon': '16.12(2r)', 'hostname': 'DUT-ISR4331-K9', 'uptime': '53 minutes', 'uptime_years': '', 'uptime_weeks': '', 'uptime_days': '', 'uptime_hours': '', 'uptime_minutes': '53', 'reload_reason': 'Reload Command', 'running_image': 'isr4300-universalk<IP_ADDRESS>a.SPA.bin', 'hardware': ['ISR4331/K9'], 'serial': ['FDO2516M1B1'], 'config_register': '0x2102', 'mac': [], 'restarted': ''}]
Stack Trace
Traceback (most recent call last):
File "/opt/./scrapli_test.py", line 20, in
with Scrapli(** device, comms_return_char='\r\n') as conn:
File "/usr/local/lib/python3.10/dist-packages/scrapli/driver/base/sync_driver.py", line 42, in enter
self.open()
File "/usr/local/lib/python3.10/dist-packages/scrapli/driver/base/sync_driver.py", line 100, in open
self.channel.channel_authenticate_telnet(
File "/usr/local/lib/python3.10/dist-packages/scrapli/decorators.py", line 216, in decorate
return _multiprocessing_timeout(
File "/usr/local/lib/python3.10/dist-packages/scrapli/decorators.py", line 113, in _multiprocessing_timeout
return future.result()
File "/usr/lib/python3.10/concurrent/futures/_base.py", line 451, in result
return self.__get_result()
File "/usr/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
raise self._exception
File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.10/dist-packages/scrapli/channel/sync_channel.py", line 361, in channel_authenticate_telnet
buf = self.read()
File "/usr/local/lib/python3.10/dist-packages/scrapli/channel/sync_channel.py", line 69, in read
buf = self.transport.read()
File "/usr/local/lib/python3.10/dist-packages/scrapli/decorators.py", line 216, in decorate
return _multiprocessing_timeout(
File "/usr/local/lib/python3.10/dist-packages/scrapli/decorators.py", line 113, in _multiprocessing_timeout
return future.result()
File "/usr/lib/python3.10/concurrent/futures/_base.py", line 451, in result
return self.__get_result()
File "/usr/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
raise self._exception
File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.10/dist-packages/scrapli/transport/plugins/telnet/transport.py", line 235, in read
self._read()
File "/usr/local/lib/python3.10/dist-packages/scrapli/transport/plugins/telnet/transport.py", line 221, in _read
raise ScrapliConnectionError(
scrapli.exceptions.ScrapliConnectionError: encountered EOF reading from transport; typically means the device closed the connection
OS (please complete the following information):

OS: Ubuntu Server 22.04
scrapli version: scrapli 2022.7.30.post1

I’ll guess that you’re going to need to mostly figure this out on your own as there will almost certainly be no way to reproduce this easily.
To start we’ll need logs, but you will probably need to check this out as well… if there is nothing obvious in the logs/channel logs you’ll probably need to poke around in the files changed in that pr to see where things are going wrong.


PowerShell implementation?

Didn't see this anywhere, and rather than email/PM this felt like a useful question to document. Is there any desire from the maintainers to refactor this from the current batch file into PowerShell or another language?
If so I would be willing to help/take point on that.

A development version exists in another language, in a private repo.


Disable generic optimization to avoid serialization failures

refs https://github.com/EsotericSoftware/kryo/issues/798

I’ll make a PR with a test next week.


Facing some issues trying to get this to run on physical devices

Hey,
first of all, thanks for sharing this code, it seems to be just the right thing I need for a little project of mine.
Unfortunately, I'm having some issues getting this to work. I would be nice, if you could help me to solve these issues. I spent the last few days on this and it would be nice, if we could improve the code.

My setup
I'm on Windows 11 with Python 3.9.13 and getevent_sendevent installed via pip from pypi.
I'm executing a script, which looks like this:
from getevent_sendevent import GetEventSendEvent
import pandas as pd

getsend = GetEventSendEvent(
    adb_path="C:\\Users\\X\\AppData\\Local\\Android\\Sdk\\platform-tools\\adb.exe",
    deviceserial="DEVICEIP:5555",
    sdcard="/storage/emulated/0/",  # it is probably better to pass the path, not the symlink
    temfolder_on_sd_card="AUTOMAT", # if the folder doesn't exist, it will be created
    bluestacks_divider=32767,
    exit_keys="ctrl+x", # stop the recording session
)

getsend.connect_to_adb()

df = getsend.record_events_and_convert_to_df(playbackspeed=3)

getsend.execute_recorded_events(
    df,
    structfolder="struct",
    additional_end_command=True,
    remove_temp_files_from_device=False,
    )

Issues with record_events_and_convert_to_df()
Issue 1.1
S3
During the execution of this function, get_events_as_string() is called, which calls execute_adb_command(). For some reason, this device (or android version) is incompatible with the way this function executes the subcommands. Currently, the subcommand will be printed to stdout and then nothing else happens. No crash, just stuck in the adb shell, I assume.
This is the section I'm reffering to:
https://github.com/hansalemaos/getevent_sendevent/blob/7b2008e5315e79646e0257530ad0e6ee15e30db2/__init__.py#L1017-L1023
I tested replacing the subcommand in L1020 with ["input keyevent KEYCODE_POWER"], to test, whether the commands will be executed at all. They will not.
I also tested different variations to execute the subcommands by changing them to ["su -- getevent -tq"],, ["su","getevent -tq"], and ["getevent -tq"],. No change of behaviour.
This would be a situation, where printing stdout and stderr to the console at the same time would be nice.
Then, I found two variations that make this work:
def get_events_as_string(adb_path, deviceserial, exit_keys):
    results = execute_adb_command(
        f"{adb_path} -s {deviceserial} shell getevent -tq",
        # or if you have to use the su shell:
        # f"{adb_path} -s {deviceserial} shell \"su -c \'getevent -tq\'\"",
        [""], # empty subcommands list
        exit_keys=exit_keys,
    )
    return results

However, this seems to defeat the purpose of why you decided to pass, process and execute subcommands in the way you intended...(I don't know the purpose...don't know enough about python subprocesses)
An link to a explaination for why this happens is at the bottom of this issue.
S4
On the S4, this is an instant crash but the situation is different. It crashes because the results variable is empty. The command is executed but the changing to su shell and executing the command causes an error.
To solve this, either change L1019 and 1020 to this:
f"{adb_path} -s {deviceserial} shell su",
["getevent -tq"],

Or:
f"{adb_path} -s {deviceserial} shell",
["su -c \"getevent -tq\""],

Or:
f"{adb_path} -s {deviceserial} shell",
["su", "getevent -tq"],

The executing of subcommands by writing to stdin seems to work properly here.
Issue 1.2
S3
The same issue happens in get_event_to_dataframe(), here, where the subcommand gets printed to the console and the script gets stuck:
https://github.com/hansalemaos/getevent_sendevent/blob/7b2008e5315e79646e0257530ad0e6ee15e30db2/__init__.py#L1292-L1294
Same way of solving this:
    results_ = execute_adb_command(
        f"{adb_path} -s {deviceserial} shell getevent -S", [""]
        # or if you have to use the su shell:
        # f"{adb_path} -s {deviceserial} shell \"su -c \'getevent -S\'\"", [""]
    )

S4
Same situation as in 1.1.
Change L1293 to this or any of the other ways I showed in 1.1:
f"{adb_path} -s {deviceserial} shell", ["su", "getevent -S"]

Issue 2
This is the same for S3 and S4
Another issue happens in get_event_to_dataframe(), where get_screenwidth() gets called:
https://github.com/hansalemaos/getevent_sendevent/blob/7b2008e5315e79646e0257530ad0e6ee15e30db2/__init__.py#L1320
https://github.com/hansalemaos/getevent_sendevent/blob/7b2008e5315e79646e0257530ad0e6ee15e30db2/__init__.py#L956-L968
Here, on my system at least, there is an issue, where in L959 for some reason, the result of dumpsys window doesn't get piped to grep in the adb shell but in the Windows cmd (which i assume subprocess.run uses). Of course, there is no grep and cut in the cmd, so the script will crash here. To solve this, I had to change L959 to this:
f"{adb_path} -s {deviceserial} shell \"dumpsys window | grep cur= |tr -s ' ' | cut -d ' ' -f 4|cut -d '=' -f 2\"",

The functions work after applying these changes.
Issues in execute_recorded_events()
Issue 3
S3
The next errors come up when trying to replay the recording.
The column random_sleep of the dataframe contains values that are in scientific notation (e.g. 2.599999788799323e-05). The adb shell on the S3 doesn't understand this notation and therefore, each time a sleep is issued, an error is thrown.
The relevant section is in execute_event_actions() around L1175:
https://github.com/hansalemaos/getevent_sendevent/blob/7b2008e5315e79646e0257530ad0e6ee15e30db2/__init__.py#L1175-L1180
To solve this, I add this line one line above the execute_adb_command() call:
df["random_sleep"] = [np.format_float_positional(x) for x in df["random_sleep"]]

After doing that, there are no errors. However this changes the type to a string. This doesn't seem to be an issue when replaying it once. However, I suspect this will become an issue when trying to change replay speed in subsequent runs, where operations that require a number type are executed. I haven't tested this yet.
The columns aa_time_difference_start and aa_time_diff_actions also have values in scientific notation, which could cause a similar issue. I don't know if these should be converted also. Also don't know where in the code this should happen. If I understood correctly, these are converted to binary at some point. I don't know if this still matters then.
Rounding these values could be a solution. I don't know, how accurate the have to be.
Now the recording will actually be replayed...but again there are more issues.
S4
This seems to be no issue for the S4, the values have less decimal places here.
Issue 4
At least on the S3 (couldn't test S4 due to another issue further down), the the script will replay seperate swipes as one continuous motion. When I for example swipe left on my homescreen, lift my finger and then swipe right, the last coordinates of the first swipe connect with the first coordinates of the second swipe.
Issue 5.1
S3
The event will get replayed (at least partially), but there is something not working the right way. Unfortunately I can't tell what's going on. The binary data ist written to to the input device via dd but at some point the script will get stuck again.  This is inconsistent. Sometimes the error will be further up in the log with dd and sleep commands being printed after the error. Nonetheless, it will get stuck.
What I also noted here is that there a newlines after each command. Something that isn't the case on the S4.
S4
This is different on the S4. Here I only get one line printed to the console:
C:\Users\X\AppData\Local\Temp\tmpvxe946tu\: 38 files pushed, 0 skipped. 0.0 MB/s (8080 bytes in 0.254s)

And nothing happens. No replay of the event....at least not really.
After that, Issue 5.2 instantly plays out. No need to press crtl+x like on the S3.
If I touch the screen after the script crashed, I see two markers on the screen like I would be touching it with two fingers at once. The position of the marker created by the script is at the end coordinates of the recording and will stay and pop up each time I touch the screen. To make it disappear I either have to exceed the maximum number of multitouch points or have to send the correct code via adb to which I will come later.
Issue 5.2
S3 specific
After that I have to press crtl+x to stop the replay. Is this needed or should the script terminate by itself? Not that this would be an issue for me...just trying to know the expected behaviour.
S3 and S4
Anyway, when I do that, I'm greeted by a crash with this error:
Killing the process
Traceback (most recent call last):
  File "C:\Users\X\PycharmProjects\sgs3\venv\lib\site-packages\pandas\core\indexes\base.py", line 3652, in get_loc
    return self._engine.get_loc(casted_key)
  File "pandas\_libs\index.pyx", line 147, in pandas._libs.index.IndexEngine.get_loc
  File "pandas\_libs\index.pyx", line 176, in pandas._libs.index.IndexEngine.get_loc
  File "pandas\_libs\hashtable_class_helper.pxi", line 7080, in pandas._libs.hashtable.PyObjectHashTable.get_item
  File "pandas\_libs\hashtable_class_helper.pxi", line 7088, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'index'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\X\PycharmProjects\sgs3\main.py", line 77, in <module>
    execute()
  File "C:\Users\X\PycharmProjects\sgs3\main.py", line 31, in execute
    getsend.execute_recorded_events(
  File "C:\Users\X\PycharmProjects\sgs3\venv\lib\site-packages\getevent_sendevent\__init__.py", line 1557, in execute_recorded_events
    execute_event_actions(
  File "C:\Users\X\PycharmProjects\sgs3\venv\lib\site-packages\getevent_sendevent\__init__.py", line 1192, in execute_event_actions
    letgomouse = df["aa_device"].value_counts().reset_index()["index"].iloc[0]
  File "C:\Users\X\PycharmProjects\sgs3\venv\lib\site-packages\pandas\core\frame.py", line 3760, in __getitem__
    indexer = self.columns.get_loc(key)
  File "C:\Users\X\PycharmProjects\sgs3\venv\lib\site-packages\pandas\core\indexes\base.py", line 3654, in get_loc
    raise KeyError(key) from err
KeyError: 'index'

Process finished with exit code 1

The problem occurs when additional_end_command is True.
There is a problem when referencing the index column by name in this section, when the letgomouse variable is defined.
https://github.com/hansalemaos/getevent_sendevent/blob/7b2008e5315e79646e0257530ad0e6ee15e30db2/__init__.py#L1185-L1198
Replacing L1185 with
letgomouse = df["aa_device"].value_counts().reset_index().iloc[0].iloc[0]

resolves the crash. The index column cannot be selected by name using ["index"].
Additional S4 specific
Note that on physical devices, the recording will be spammed by other sensors, like the accelerometer. I observed, that the number of these is often higher than the touch events, meaning that the wrong device will be selected here. Haven't found a solution to this yet. In the meantime I just hardcoded this value here in case of the S4.
Issue 6 .1
S3
Another problem in this section arises, where the event for, what I assume "releasing the finger from the touchscreen" is, is not doing its job.
After some testing, I found out that this is caused by the same issue from above, where the adb commands were not executed properly with the commands appearing on the console and the script getting stuck...as well as the event codes not doing what is expected for these devices.
Changing it to this resolves both problems:
letgomouse = df["aa_device"].value_counts().reset_index().iloc[0].iloc[0]
# letgomouse = "/dev/input/event3" # or hardcoded cuz sensor spam
basd = f"""
sleep .01
sendevent {letgomouse} 0 0 0
sendevent {letgomouse} 3 57<PHONE_NUMBER>
sendevent {letgomouse} 3 57 -1
sleep .01
sendevent {letgomouse} 0 0 0

""".strip().splitlines()
sleep(sleep_before_additional_command)
for k in basd:
    execute_adb_command(
     f"{adb_path} -s {deviceserial} shell {k.strip()}", [""]
     )

S4
The execute_adb_command() call doesn't need to be changed. Only the event codes.
Issue 6.2
S3
The last problem is, that the 0 2 0 event in L1190 doesn't do what it should. I first tried to send 3 57<PHONE_NUMBER> instead, which is supposed to do the right thing according to some stackoverflow threads. However, this still didn't work and after more searching I found the additional code 3 57 -1. This seems to be somewhat device specific. On the S3, I need both of them.
S4
Surprisingly sending only the 3 57<PHONE_NUMBER> event is enough. The 3 57 -1 one is not needed.
Issue 7 (S4 specific)
In issue 5.1 I stated that nothing happens when the events should be replayed. The reason for this is that this device send an additional event that indicates that the screen is touched. This event is filtered out somewhere in the script.
A tap on the screen looks like this:
0003 0039 0000022a
0001 014a 00000001
0003 0035 00000294
0003 0036 00000447
0003 0032 00000002
0003 003c 00000000
0000 0000 00000000
0003 0039 ffffffff
0001 014a 00000000
0000 0000 00000000

EV_ABS       ABS_MT_TRACKING_ID   0000022d
EV_KEY       BTN_TOUCH            DOWN
EV_ABS       ABS_MT_POSITION_X    00000278
EV_ABS       ABS_MT_POSITION_Y    00000424
EV_ABS       ABS_MT_WIDTH_MAJOR   00000006
EV_SYN       SYN_REPORT           00000000
EV_ABS       ABS_MT_TRACKING_ID   ffffffff
EV_KEY       BTN_TOUCH            UP
EV_SYN       SYN_REPORT           00000000

I can't record with both raw values and the names applied. These are two seperate taps.
Anyway, this shows that after setting the tracking id, this additional event is sent:
0003 0039 00000xxx   # EV_ABS ABS_MT_TRACKING_ID 00000xxx
0001 014a 00000001 # EV_KEY BTN_TOUCH DOWN (1 330 1 in decimal for sending)
....                   # x,y coordinates, pressure, etc
0000 0000 00000000  # EV_SYN SYN_REPORT 00000000
0003 0039 ffffffff    # EV_ABS ABS_MT_TRACKING_ID ffffffff
0001 014a 00000000  # EV_KEY BTN_TOUCH UP (1 330 0 in decimal for sending)
0000 0000 00000000  # EV_SYN SYN_REPORT 00000000

Somewhere in the code, all rows with aa_type_int = 1 or all that are not 3 or 0 are dropped from the df, which this device needs to properly execute the events.
I have not attempted to fix this yet. I can't tell at this point if issue 4 also applies here after this is fixed.

This is how far I've come with testing so far. I have not extensivly tested the other features of this package yet.
Other minor improvements

add kthread to requirements.txt
pin versions of packages in requirements.txt to help reproducibility and compatibility
add printing of stderr to all functions that call adb.exe for improved debugging experience

for subprocess.run() functions I just added print(_.stdout) and print(_.stderr) below them
for execute_adb_command() I was not able to find a solution that doesn't break the script

I also tried to run this with Bluestacks 5. I couldn't get the replay to work howerver.  Reference to instructions on how to do this would be nice.
Add option to specify /dev/input/eventX or a list to replay events only to specific inputs. On the S4 for example, there is no need to replay the accelerometer events.

Additional stuff

Also, what does the bluestacks_divider variable do? Why is it needed?
For debugging I wanted to print the df like you did in the readme. There were some errors due to it containing binary data. I made it printable like so:

df = getsend.record_events_and_convert_to_df(playbackspeed=3)
df_printable = df.copy()
df_printable['aa_struct'] = df_printable['aa_struct'].apply(lambda x: base64.b64encode(x).decode('utf-8'))
df_printable['aa_struct_real'] = df_printable['aa_struct_real'].apply(lambda x: base64.b64encode(x).decode('utf-8'))
df_printable['aa_struct_together'] = df_printable['aa_struct_together'].apply(lambda x: base64.b64encode(x).decode('utf-8') if isinstance(x, bytes) else x)
df_printable['aa_struct_real_together'] = df_printable['aa_struct_real_together'].apply(lambda x: base64.b64encode(x).decode('utf-8') if isinstance(x, bytes) else x)
print(df_printable)

For this to work on Android 10 devices, not only do you have to have root access but also have a custom kernel installed that allows SELinux to be in "permissive" mode. See this,this and this.
The issue of the subcommands not working could be some incompatibility with the adb version on the device. Older versions had issues with stdin according to this. Can't tell if this applies here.

Awesome! Thank you very, very much for your feedback! I was waiting for somebody like you, because, like I said, I have never tested the code on a routed physical device.

The purpose behind the way subprocesses are executed is that you can see what is going on during the execution (and cancel it if needed), but still have the availability to use the stdout. I have made a new version https://github.com/hansalemaos/subprocesshidden , and I want to implement it. If you want to do it or have better ideas, go ahead! I am open for everything. (By the way: the new one captures stderr/stdout)

Have you tested this on BlueStacks, if it works there too, we update it as soon as possible:  f"{adb_path} -s {deviceserial} shell getevent -S", [""]   and maybe including escaping of windows paths: https://github.com/hansalemaos/escape_windows_filepath
executing adb in a subprocess is a bit tricky, the command for the subprocess should usually be passed as a list, but with adb, it is not that easy.

Yes, you need to press ctrl+x because the app doesn't know how long you want to record, it is like recording a video with OBS.
3.5) I think, you get the Exception, because the S4 doesn't return any lines, that means not data, which means a DataFrame without index. I would like to know what's happening there.

The replay works by copying the bin files to the device. Might there be a connection problem? Is the copying going on too fast? Maybe the subprocess doesn't close the connection correctly?

Any idea of how to implement the event codes? The problem is that they vary from device to device. :(

0 2 0 -> Finding this drove me crazy, because there was no other code that made it work on BlueStacks. Could you test your code on BlueStacks, and tell me if it works? Same problem there as in 5 - varies from device to device.

What I suggest (I hope you agree): implement all changes that you want, test it if it works also on BlueStacks (right now, most important for me), implement the new subprocess module (or another one that captures and prints (during execution) stderr/stdout, and can be killed)
I will test it on my Emulator, and then we merge the code. Soon I will need to use this package on my Google Pixel (but only the non-rooted stuff)

Thanks for the answers. I'm on it. Read the documentation for python subprocesses and have some ideas how to tackle these issues. Might take while, since I have some stuff coming up that I need to take care of.
In the meantime you could help me by answering some additional questions:

What does the bluestacks_divider variable do? Why is it used/needed?
Which version of Bluestacks 5 are you running? Which version of Android does your instance have? Do I need to root? If yes, how did you do it? With bstweaker or another way?

Thank you very much!

When I was coding, everything worked, but I was able to send clicks only to a tiny little square in the upper left corner. After some research, I found the answer: https://stackoverflow.com/a/73733261/15096247  on Stack Overflow.  I think this calculation doesn't have to be made on a physical device, but I am not sure.
Yes, you need root, but it is the easiest thing in the world. This script should do it: https://github.com/hansalemaos/rootstacks   Use Nougat with BlueStacks 5.10.xxx  (preferably 32 bit, but 64 is fine too)

Hey again,
I'm gonna be honest. I stopped working on this a few months and ended up using a different program (android-touch-record-replay). Sorry that I couldn't deliver on my promises. I did some "hacking" with the code and eventually got it to work with some quirks on my devices.
However, making it work for multiple devices and bluestacks requires more work.
 The different devices' touch codes and adb versions make it difficult to make one universal code with the way the code works right now.
In the end, I found another solution to make my use-case work and I am honestly not invested enough in this project anymore to make these changes. I hope you can understand.
You might want to take a look at the other project I linked above. The main reasons for me to use it rather than getevent_sendevent were that it replays the inputs VERY accurately and it works pretty much out of the box for my devices without the various issues I pointed out in my previous comments in this issue. From my understanding, it can also work with emulators. The only thing I had to do to make it work with my old S3 was to compile it myself for the appropriate Android API version with android_ndk.

Don't worry, :) I will check that out!! Thank you!


Two issues- scala classe name differ in casing and DBSCAN hard code value

Classes with names that only differ in casing-resolved
DBSCAN spatial partitioner tested with the different number of partitioners(2,16), worked well!

Coverage remained the same at 18.724% when pulling a1329af702120bc45f7a64d7266a3ebbf994892f on MLissueResolved into 5db86d307eae0e466c1802a1a9a9ba3aeaf29c33 on develop.

Coverage remained the same at 18.724% when pulling a1329af702120bc45f7a64d7266a3ebbf994892f on MLissueResolved into 5db86d307eae0e466c1802a1a9a9ba3aeaf29c33 on develop.


refactor: remove short imports of modules from tns-core-modules

The tests should be updated as well.
party resolves #1535

👍


webpack support

You said the objectid has no dependency, in the package.json I see a dependecy on "bson": "^0.1.9" webpack stumbles and crashes over this. Any ideas how to solve this?

The 1.x versions of this module do not depend on mongodb and are suitable
for, eg, generating objectid strings. We took mongodb as a dependency in
2.x due to a serialization error in mongo 2.4 that was causing nasty,
silent failures on write. by using mongodb's own objectid class for
serialization, we avoided that error. It might be possible to refactor to
depend directly on the seperate bson module.


Update-Database generates correct migration but applies wrong one (even when forced to do so)

Error presented:
Generated script seems to be using Initial migraiton instead of last one, even if forced to do so (see below)
Table 'Activities' already exists
Update-Database generates script not compatible with last migration. And Script-Migration --From LastMigrationName is empty
Migration expected to be run:
public partial class _20180815 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "GymSubscriptionPlan",
                columns: table => new
                {
                    GymSubscriptionPlanId = table.Column<int>(nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    Active = table.Column<bool>(nullable: false),
                    BillingPeriodization = table.Column<int>(nullable: false),
                    PagarMePlanCode = table.Column<string>(nullable: true),
                    PlanDetail = table.Column<string>(nullable: true),
                    PlanName = table.Column<string>(nullable: true),
                    Price = table.Column<double>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_GymSubscriptionPlan", x => x.GymSubscriptionPlanId);
                });

            migrationBuilder.CreateTable(
                name: "GymSubscription",
                columns: table => new
                {
                    GymSubscriptionId = table.Column<Guid>(nullable: false),
                    Active = table.Column<bool>(nullable: false),
                    CreateDate = table.Column<DateTime>(nullable: false),
                    GymId = table.Column<Guid>(nullable: false),
                    GymSubscriptionPlanId = table.Column<int>(nullable: false),
                    PagarMeSubscriptionId = table.Column<string>(nullable: true),
                    UpdateDate = table.Column<DateTime>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_GymSubscription", x => x.GymSubscriptionId);
                    table.ForeignKey(
                        name: "FK_GymSubscription_Gyms_GymId",
                        column: x => x.GymId,
                        principalTable: "Gyms",
                        principalColumn: "GymId",
                        onDelete: ReferentialAction.Cascade);
                    table.ForeignKey(
                        name: "FK_GymSubscription_GymSubscriptionPlan_GymSubscriptionPlanId",
                        column: x => x.GymSubscriptionPlanId,
                        principalTable: "GymSubscriptionPlan",
                        principalColumn: "GymSubscriptionPlanId",
                        onDelete: ReferentialAction.Cascade);
                });

            migrationBuilder.CreateIndex(
                name: "IX_GymSubscription_GymId",
                table: "GymSubscription",
                column: "GymId");

            migrationBuilder.CreateIndex(
                name: "IX_GymSubscription_GymSubscriptionPlanId",
                table: "GymSubscription",
                column: "GymSubscriptionPlanId");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "GymSubscription");

            migrationBuilder.DropTable(
                name: "GymSubscriptionPlan");
        }
    }

Steps to reproduce
Add the above migration to the Migrations folder of your project and run the following commands:
Update-Database -Migration "20180815"
Script-Migration -From 20180815
Neither should word
Further technical details
EF Core version: 2.0.1
Database Provider: Pomelo.EntityFrameworkCore.Mysql (2.0.1)
Operating system: Win10 x64
IDE: (e.g. Visual Studio 2017 15.4)

@vfilenga The first case should execute all migrations that have not been applied from the initial upto and including the one specified. The second case should do nothing, since migrating from the last migration to the last migration is a no-op. If you are seeing behaviors different from these, then can you please post a runnable project/solution that demonstrates the behavior you are seeing?

@ajcvickers What is weird about the first case is that the last applied migration (see below)
Select from database:

Migrations folder:

@vfilenga We have not been able to reproduce this. Can you post a runnable project/solution that demonstrates the behavior you are seeing?

EF Team Triage: Closing this issue as the requested additional details have not been provided and we have been unable to reproduce it.
BTW this is a canned response and may have info or details that do not directly apply to this particular issue. While we'd like to spend the time to uniquely address every incoming issue, we get a lot traffic on the EF projects and that is not practical. To ensure we maximize the time we have to work on fixing bugs, implementing new features, etc. we use canned responses for common triage decisions.


UIP-0105 Improvements

@matthew-levan @pkova is this consistent with the work done here? https://github.com/urbit/urbit/pull/6716
Is it ready to merge?

It needs updating; I will prioritize this week.
On Fri, Jul 28, 2023 at 11:11 AM Josh Lehman @.***>
wrote:

@matthew-levan https://github.com/matthew-levan @pkova
https://github.com/pkova is this consistent with the work done here?
urbit/urbit#6716 https://github.com/urbit/urbit/pull/6716
Is it ready to merge?
—
Reply to this email directly, view it on GitHub
https://github.com/urbit/UIPs/pull/14#issuecomment-1655863518, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AV2DQRAZODJF7PWG3LG63F3XSPJA3ANCNFSM6AAAAAAZ7F6E7E
.
You are receiving this because you were mentioned.Message ID:
@.***>


Question: did you test dash-addons like dash-uploader, and did you try to add an authentication mechanism?

Hi,
I have tried the django-plotly-dash integration before, but some elements where difficult to get working. For example, the dash-uploader, needed some specific endpoints. And it was not so straigthforward to let the dash app know about the current user regarding authorization. I wonder,  do you have experience with these things using fastapi-plotly-dash?

That would be amazing. I implemented something like that, using a Flask server for the auth, before, for a scientific application, but looks quite bumpy, and I found some security issues as well.

Hey! Any updates on this?


effectiveCardinality should account for IncludesTypeConstraints

The effective cardinality already took into account CardConstraints -- but did not take into account IncludesTypeConstraints.  Since these constraints have their own cardinalities, they can affect the cardinality of the element to which they are applied.
For example, if we have:
0..* Foo
  includes 1..1 Bar

then since Foo must contain at least one Bar, Foo's effective lower cardinality is actually 1.
This PR takes that into account when determining effectiveCardinality.
This is one part of the fix for standardhealth/shr-fhir-export#72.

I also just added a bug fix related to how effectiveCard` was implemented (oops).
@Abhijay -- this PR is ready for your review.


[BUG] Conditional Statement

Describe the bug
Lately, working with conditional statement in OB, i have noticed that the app does not support 3+ layers of conditions.
The minified example is like this:
we have an IF contains an IF/WHILE contains an IF
To Reproduce
When the contition = True in the first IF
Everything is running will

When the contition = False in the first IF
we have an error

i was thinking maybe the while is causing the problem
so i have changed it, to IF
but still  same problem

Version

Version [e.g. 1.1.2]

LoliScript does not support nested statements. It's a very simple single-instruction language (assembler-like).
If you read the LS documentation you will see that when IF is false it will jump to THE FIRST ELSE OR ENDIF statement, which might not be its own!
I guess I could implement a counter that checks if it finds any other IF statement inside it and skips over the first ELSE and ENDIF it finds and goes to the next one. This is a good suggestion.
Right now though, the only way to achieve what you want is through jumping to different parts of the code using the JUMP statement

when ever you will be improve this
can you add "AND" "OR" to IF, so we can use at least 2 conditions
thanks

There are currently no plans to implement nested loops in loliscript.
Please refer to this thread https://forum.openbullet.dev/topic/87/nested-ifs-and-operators to understand how to AND or OR conditions.


Users need to be able to initiate analysis on selected S3 corpora

Closing as this is a duplicate of #186


Usage tracking does not send end message

Describe the bug
The usage tracking code tries to send an end message, in addition to a start message. But only the start message is delivered.
Using tcpdump -i any -n port 50077 I see this single packet at the start of a run, but not one at the end.
14:05:22.540668 wlp0s20f3 Out IP <IP_ADDRESS>.50619 > <IP_ADDRESS>.50077: UDP, length 227

I think this is because the usage tracking code sends packets asynchronously, to avoid hangs, but also kills outstanding usage tracking processes immediately after spawning one to send a packet. (so maybe in some situations, an end packet will be non-deterministically sent).
To Reproduce
Turn on usage tracking; run tcpdump as above. Observe a packet at the start of a run (eg pytest) but not at the end
Expected behavior
Packets should be sent at both the start and the end
Environment
parsl master 5e8a0e62d7e840e6bdadd7fffc8ea4d09cba4533
my laptop

fixed by #3088


app settings

This action should include ability to configure app settings similar to this https://github.com/marketplace/actions/azure-app-service-settings.

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

ID: 967b3514-23c5-514d-186f-d901ac94069b
Version Independent ID: 7a8581b2-feb6-534e-c88d-a0d7c7de7b92
Content: Configure CI/CD with GitHub Actions - Azure App Service
Content Source: articles/app-service/deploy-github-actions.md
Service: app-service
GitHub Login: @cephalin
Microsoft Alias: jafreebe

@manalotoj  Thank you for your feedback. We will investigate and update the thread further.


MultiPagesTab

Feature request type
New component
Component name
MultiPagesTab
Is your feature request related to a problem?
like this
https://github.com/BlazorPlus/BlazorDemoMultiPagesTab
Describe the solution you'd like
https://github.com/BlazorPlus/BlazorDemoMultiPagesTab
Have you seen this feature anywhere else?
https://github.com/BlazorPlus/BlazorDemoMultiPagesTab
Describe alternatives you've considered
No response
Pull Request

[ ] I would like to do a Pull Request

Code of Conduct

[X] I agree to follow this project's Code of Conduct

Could you post a screenshot to show what you actually mean?
If this is about the ability to close tabs, DynamicTabs can already do this.

the route switching (like menu) opens a new page, the tab should be displayed, and other tabpanel  life cycle should be maintained

the route switching (like menu) opens a new page

Check the "Simple Dynamic Tabs example" on how to add/remove tabpages.

and other tabpanel life cycle should be maintained

I'm guessing the content of each tab should be preserved when switching between tabs?
Property KeepPanelsAlive will do that nicely.

I may not be able to describe it clearly because my English is not good. Can you check the demo above? Maybe it will be better

@Yomodo
I have the same request, refer to this gif and  repository

ant-design-blazor/demo-reuse-tabs

maybe need :  mudtab + route

https://github.com/BlazorPlus/BlazorDemoMultiPagesTab
https://github.com/ant-design-blazor/demo-reuse-tabs

After looking at the samples, it appears that this component is rather specialized and may not be within the scope of MudBlazor. It seems like a niche feature with very specific use cases.
I believe users can achieve similar functionality using MudDynamicTabs + routing. It also might be worth suggesting it as a feature request for inclusion in CodeBeam.MudBlazor.Extensions.


STATE_LOCKED was used from alarmo / STATE_UNLOCKED was used from alarmo

Checklist

[X] I am using the latest version of Alarmo (latest version can be found here)
[X] I checked for similar existing requests (both open and closed) before posting.

Alarmo Version
v1.10.4
HA Version
2024.10.0
Bug description
STATE_LOCKED was used from alarmo, this is a deprecated constant which will be removed in HA Core 2025.10. Use LockState.LOCKED instead, please report it to the author of the 'alarmo' custom integration
STATE_UNLOCKED was used from alarmo, this is a deprecated constant which will be removed in HA Core 2025.10. Use LockState.UNLOCKED instead, please report it to the author of the 'alarmo' custom integration
Steps to reproduce
Home Assistant Core  error
Relevant log output
No response

Thanks for reporting this issue. I made a fix for it (https://github.com/nielsfaber/alarmo/commit/eb9f73df6f26f51f2f4c1d227b2d6fbd65d4fa92) and will include it in the next release.


code data fields be removed

Initial checklist

[X] I read the support docs
[X] I read the contributing guide
[X] I agree to follow the code of conduct
[X] I searched issues and couldn’t find anything (or linked relevant results below)

Affected packages and versions
latest
Link to runnable example
https://node-rqtpry.stackblitz.io
Steps to reproduce

Expected behavior
Do not remove this field.
Actual behavior
data field be removed.
Runtime
Node v16
Package manager
npm v7
OS
macOS
Build and bundle tools
No response

It is intended that the tree is changed and unrelated data lost, per the readme.
You can handle data fields in a plugin beforehand. Please open a discussion if you have questions about that.


Host Reservation Tracking

Would it be possible to add host reservations into this tool?  The reason I ask is because they are related and if your pool is full of reservations it could be that no IP's are available to be handed out.
i.e. pool utilization could be 75% but it could be the remaining 25% of the pool is reserved and then there would be no free addresses to hand out.
Right now I'm looking for a way to square these (2) scenarios up and it would be awesome of this plugin could show if a reservation exists or not.
import requests

s = requests.Session()
s.verify = '/etc/ssl/certs'

headers = {
    'Content-Type': 'application/json',
}

json_data = {
    'command': 'reservation-get-all',
    "arguments": {
        'subnet-id': 5
    },
    'service': [
        'dhcp4',
    ],
}

response = s.post('https://kea.vip.com/', headers=headers, json=json_data, auth=('user', 'pass'))

for i in response.json()[0]['arguments']['hosts']:
    print(i['ip-address'], i['hw-address'])

I could probably write a script to do this audit, but I'm loving your tool so much that I figured it could not hurt to ask :)

I'm not even sure how all of this would work, so if it's too much work, I completely understand.

I just implemented the IP Ranges today in NetBox so that's what fueled this request.

The host reservations is the last piece I need before I can put this project to bed :)

I just saw the follwing:
Currently this library is only available to ISC customers with a paid support contract. :(

Even if possible, I think that this would be outside the scope of this plugin. It seems more of a job for some monitoring software or even NetBox's custom scripts.


Update docs for consistency

The front of the repo explicitly states under Goals:
"Constant-time by default. Variable-time functions are explicitly marked as such."
Some constant-time functions in the repo are documented that they run in constant-time, while other constant-time functions do not. This inconsistency may lead a newcomer to question if a function is constant-time despite being explicitly chosen as such. This simple PR updates the docs on the functions in question to avoid confusion and remain consistent with the stated goals of the repo.

I think there may be remaining places, but this is a start


Make "run" great again

This is a temporary fix until we get #156 done
Closes: #264

I don't get why this is necessary -
For a hot function the FDK should terminate the process when the input stream is closed  - Docker run with input should close stdin which should cause the FDK to exist.

That's the point, for instance, Docker doesn't close the stream, it continuously posts \n and Python thinks that stream is still open and hangs still hangs.

That's the point, for instance, Docker doesn't close the stream, it continuously posts \n and Python thinks that stream is still open and hangs still hangs.
that is not my understanding of what happens:
e.g. in my go hot function  below (with http at least)  I see an EOF when the function data is passed:
OCliffe@OCLIFFE-mac /p/t/gohot> cat func.yaml
name: gohot
version: 0.0.1
runtime: go
entrypoint: ./func
format: http
OCliffe@OCLIFFE-mac /p/t/gohot> cat func.go
package main

import (
        "os"
        "log"
)

func main() {

        buf := make([]byte, 100)
        log.Printf("Got format %s",os.Getenv("FN_FORMAT"))
        for {
                read, err := os.Stdin.Read(buf)
                if err != nil {
                        log.Printf("Got error %v", err)
                        os.Exit(0)
                }
                log.Printf("Read %d", read)

        }

}
OCliffe@OCLIFFE-mac /p/t/gohot> fn version
Client version:  0.4.84
Server version:  ?
OCliffe@OCLIFFE-mac /p/t/gohot> fn run
Building image gohot:0.0.1 ..
2018/05/04 12:07:18 Got format http
2018/05/04 12:07:18 Read 100
2018/05/04 12:07:18 Read 100
2018/05/04 12:07:18 Read 62
2018/05/04 12:07:18 Got error EOF
OCliffe@OCLIFFE-mac /p/t/gohot>


Release

:tada: This PR is included in version 0.115.0 :tada:
The release is available on:

v0.115.0
v0.115.0
GitHub release

Your semantic-release bot :package::rocket:


WISH: provide public getter for NgTestFixture::_applicationRef

I would like to ask for public getter for NgTestFixture::_applicationRef, now I need to wrap every component with class which captures ApplicationRef pointer in constructor. I need it to have an access to injector object for tested component.

Could you explain your use case? When do you find this useful? Do you have some examples?

Sure, maybe it's just my way of improperly using angular_test package.
In general: I use services to feed my components. Inside tests I use stubbed override of such service. During testing I need to setup initial state or manipulate the state and observe component if reacting properly.
Now let's have one real example. I have component which displays if there is any new message, it's simple envelope.  When regular, no new messages, when special css-class applied (filled, bold) there are new messages. I have service which has opened query to my firebase database and provides Stream to component, with number of unread messages. During testing, I derive the service and do not connect to firebase, but have special method to supply new # of messages explicitly.
Now the need of get to the instance of stubbed service is present.
I could provide sample code if necessary.

Sure, maybe it's just my way of improperly using angular_test package.

/shrug. angular_test is relatively new and we don't have a lot of publish examples so I don't blame your usage. I just want to understand it.

In general: I use services to feed my components. Inside tests I use stubbed override of such service. During testing I need to setup initial state or manipulate the state and observe component if reacting properly.

Sounds reasonable.

Now let's have one real example. I have component which displays if there is any new message, it's simple envelope.  When regular, no new messages, when special css-class applied (filled, bold) there are new messages. I have service which has opened query to my firebase database and provides Stream<int> to component, with number of unread messages. During testing, I derive the service and do not connect to firebase, but have special method to supply new # of messages explicitly.

Now the need of get to the instance of stubbed service is present.

I could provide sample code if necessary.

That would be very useful!

Ping @tomas-rokos could I have some example code?

ng_testing.zip
Sorry, took me a day, as playing with multiple balls :)
Here is a sample library I created for this purpose. You see that there is component num-updates feed by DataProvider. In library (web) version I have timer for two seconds which mimic query to database. In testing I have DataProviderStub, where I have explicit method to send a new data.

Doesn't useValue work?
NgTestBed<ComponentTest> testBed;
DataProviderStub stub;

setUp(() async {
  stub = new DataProviderStub();
  testBed = new NgTestBed<ComponentTest>().addProviders([
    new Provider(DataProvider, useValue: stub),
  ]);
});

test('...', () {
  // configure stub
});

Ping @tomas-rokos

This approach looks fine, I am validating it right now with all of the usage I made so far, so it takes a time, to be clearly sure. Let's close this ticket right now and we could reopen it when necessary.
Thank you for your help!
Tomáš


Pathfinding keeps displaying with window setting disabled

Here shows up when the quest is completed and pending reward.

When an objective is completed, not before.

Only in outpost, when getting outside it disappears.

Is that new addition? I can't see it there

New setting. But the first two checkboxes are what you're looking at, anyway.


Feature/Observation with non concession activity

Ability to note that producer is doing activities in FMU that it has no official concession (non_concession_activity). In this case, it would be possible to select non operator FMUs in the forms.
This feature is only available for DR Congo observations.
We will not show FMU name in the portal for those observations.
PT: https://www.pivotaltracker.com/story/show/187336758

Not sure what you mean @santostiago, which documents? This is only to be able to select FMU not belonging to the producer.


Buttons stay highlighted when user click on it.

Fixes https://github.com/meshery/meshery.io/issues/921
Changes
Whenever user will clicks on any options (i.e., Tables, Sphere, Helix, grid), a new class "highlight_button" is then added, and simultaneously it will remove that class from other options.
Screenshot
https://user-images.githubusercontent.com/82795074/205513715-4ac6adaa-32af-497c-ba5f-7925653da627.mp4
Signed commits

[ ] Yes, I signed my commits.

Oh, I see. This PR is missing a reference to https://github.com/meshery/meshery.io/issues/921 and so was I. Please add "Fixes #921" to this PRs description. The PR template is provided for this reason and for automatically closing the corresponding issue upon PR merge. Be sure too fill-in the PR template fields in the future.

Oh, I see. This PR is missing a reference to #921 and so was I. Please add "Fixes #921" to this PRs description. The PR template is provided for this reason and for automatically closing the corresponding issue upon PR merge. Be sure too fill-in the PR template fields in the future.

Sure, I have added

@leecalcote did you not suggest the saffron and blonde color pallete for this PR? 👀

#921

@leecalcote did you not suggest the saffron or blonde color pallete for this PR? 👀

Hey @leecalcote ,
Can you once confirm, what would be the best saffron or blonde or brand color itself ??
With Saffron and blonde, it will look something like this but with them if user hovers on some other options, then that option's color will becomes blue.

#921

@leecalcote did you not suggest the saffron or blonde color pallete for this PR? 👀

Hey @leecalcote , Can you once confirm, what would be the best saffron or blonde or brand color itself ??
With Saffron and blonde, it will look something like this but with them if user hovers on some other options, then that option's color will becomes blue.

Hey @leecalcote,
Any update on this??

Thanks for confirming. Perhaps, sticking with Keppel green is our safest bet. I think the core objective of the issue is to ensure that the currently selected view (button) remains colored, so that the active view is designated as active.

Thanks for confirming. Perhaps, sticking with Keppel green is our safest bet. I think the core objective of the issue is to ensure that the currently selected view (button) remains colored, so that the active view is designated as active.

Thanks @leecalcote for confirming this.
@eeshaanSA you can now take it up for review.

// @GaganpreetKaurKalsi

Oh, good eye, @GaganpreetKaurKalsi 👁👁

Add a default highlight to the table button when the page loads

@eeshaanSA @GaganpreetKaurKalsi That would be a good idea.
PR is now updated.

Whoo-hoo, @yashhhguptaaa! 🎈


2 tests fails on elderly python 3.6 (ubuntu 18.04)

Describe the bug
I was trying to build backports of debian package (only 4.3.3 ATM in Debian) for NeuroDebian and whenever it built/tested on newer systems just fine, I ran into two tests fails on ubuntu 18.04
======================================================================
ERROR: test_unicode_contents (pyfakefs.tests.fake_open_test.FakeFileOpenTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/python-pyfakefs-4.3.3/pyfakefs/tests/fake_open_test.py", line 97, in test_unicode_contents
    f.write(text_fractions)
  File "/build/python-pyfakefs-4.3.3/pyfakefs/fake_filesystem.py", line 4907, in write_wrapper
    ret_value = io_attr(*args, **kwargs)
UnicodeEncodeError: 'ascii' codec can't encode character '\xdc' in position 0: ordinal not in range(128)

======================================================================
ERROR: test_write_str_read_bytes (pyfakefs.tests.fake_open_test.FakeFileOpenTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/python-pyfakefs-4.3.3/pyfakefs/tests/fake_open_test.py", line 117, in test_write_str_read_bytes
    f.write(str_contents)
  File "/build/python-pyfakefs-4.3.3/pyfakefs/fake_filesystem.py", line 4907, in write_wrapper
    ret_value = io_attr(*args, **kwargs)
UnicodeEncodeError: 'ascii' codec can't encode character '\xc4' in position 0: ordinal not in range(128)

Just didn't want to stay silent ...
How To Reproduce
can try to provide a reproducer if needed. most likely in a docker container, .e.g docker run -it --rm neurodebian:nd18.04
Your environment
NeuroDebian base build images, this one for ubuntu 18.04 with python 3.6  (3.6.5-3; update to 3.6.9 from bionic-updates gave no remedy)
Please run the following and paste the output.
root@smaug:/tmp/buildd/python-pyfakefs-4.3.3# alias python=python3
root@smaug:/tmp/buildd/python-pyfakefs-4.3.3# python -c "import platform; print(platform.platform())"
Linux-5.10.0-0.bpo.3-amd64-x86_64-with-Ubuntu-18.04-bionic
root@smaug:/tmp/buildd/python-pyfakefs-4.3.3# python -c "import sys; print('Python', sys.version)"
Python 3.6.5 (default, Apr  1 2018, 05:46:30)
[GCC 7.3.0]
root@smaug:/tmp/buildd/python-pyfakefs-4.3.3# python -c "from pyfakefs.fake_filesystem import __version__; print('pyfakefs', __version__)"
pyfakefs 4.3.3

testing with current master
root@smaug:/tmp/buildd/pyfakefs# git describe
fatal: No annotated tags can describe '4ff65237e50661a1cd62e77ab529dfe0460c4f99'.
However, there were unannotated tags: try --tags.

(that is why I don't like github releases mechanism since they use non-annotated tags)
root@smaug:/tmp/buildd/pyfakefs# git describe --tags
v3.4.3-281-g4ff6523

(that is why I dislike off branch releases , well -- they could still be merged back in to at least get a sane describe)

I am also getting those two fails
======================================================================
ERROR: test_unicode_contents (pyfakefs.tests.fake_open_test.FakeFileOpenTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/pyfakefs/pyfakefs/tests/fake_open_test.py", line 97, in test_unicode_contents
    f.write(text_fractions)
  File "/build/pyfakefs/pyfakefs/fake_filesystem.py", line 5177, in write_wrapper
    ret_value = io_attr(*args, **kwargs)
UnicodeEncodeError: 'ascii' codec can't encode character '\xdc' in position 0: ordinal not in range(128)

======================================================================
ERROR: test_write_str_read_bytes (pyfakefs.tests.fake_open_test.FakeFileOpenTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/pyfakefs/pyfakefs/tests/fake_open_test.py", line 117, in test_write_str_read_bytes
    f.write(str_contents)
  File "/build/pyfakefs/pyfakefs/fake_filesystem.py", line 5177, in write_wrapper
    ret_value = io_attr(*args, **kwargs)
UnicodeEncodeError: 'ascii' codec can't encode character '\xc4' in position 0: ordinal not in range(128)

----------------------------------------------------------------------
Ran 2038 tests in 2.279s

FAILED (errors=2, skipped=848, expected failures=2)
Test failed: <unittest.runner.TextTestResult run=2038 errors=2 failures=0>
error: Test failed: <unittest.runner.TextTestResult run=2038 errors=2 failures=0>

/tmp/buildd/pyfakefs# python -c "from pyfakefs.fake_filesystem import __version__; print('pyfakefs', __version__)"
pyfakefs 4.6.dev0

Thanks for the report and PR! I dimly remember this kind of errors - I think they had to do with the encoding set in the Docker container. I will try to find the related issue before merging the PR that skips the tests.

Found it. From a private conersation with the maintainer:

The first 2 (errors) use the default local encoding, which is expected (in the tests) at least to be able to encode Latin1. For some reason, this seems to be ASCII on that machine

This has been fixed by adding an encoding to the docker container in PR #456.
This is probably not an option in your case, though I'll wait for your opinion on that. Note that this does not depend on the Python version, just on the installed locale, so skipping it for a specific Python version is probably not the corrrect way to handle this. I guess we could skip if we could check the encoding (not sure about this - is there even a Python encoding for pure ASCII?), or we could catch the exception in the test and skip the test if it occurs.

well -- for myself I "addressed" the issue by skipping just to get that package built.
Setting locales might indeed be trickier or not sufficient unless I also install locales etc. IMHO since 3.6 is soon (end of this year IIRC) to be gone anyways, I would not sweat too much about it (e.g. condition in addition on the locales etc) and just skip it one way (as in the #624) or with some extra care (locales).
on another thought: may be (since the idea is to parallel real file system) you could just sense first whether you can perform a similar write to a regular file using python itself... if it doesn't blow there with 3.6 but blows with pyfakefs -- there might be some magic missing in pyfakefs making it behave differently from regular python calls.

may be (since the idea is to parallel real file system) you could just sense first whether you can perform a similar write to a regular file using python itself...

Thanks for the suggestion. Actually, we run most of the tests both in pyfakefs and in the real fs (at least in the CI tests), so I know from that previous occurrence that these tests also fail in the real fs (I omitted that part of the conversation). I will probably go with just ignoring the exception in the test if it occurs (skip the test in this case).

@yarikoptic -  I added a PR that does just that (skip the test if the exception occurs), you may have a look to check if this would be ok.


Feature Request: Normalise waveform volume

Spotify has its own volume normalisation so that different songs don't have wildly different playback volumes. The visualisation API clearly gets the waveform from before this process, which means that some tracks which have been mixed with quieter dynamics have an extremely thin, and sometimes invisible in parts, playback bar. It would be a great feature for consistent visuals if the waveform visual was normalised so that it always has the same vertical peak height/depth, or maybe an option to control how much this 'compression ratio' applies?
Another option just to fix parts where the playback bar is actually invisible due to quiet dynamics/silence could be to always display a 1 pixel line on the horizontal axis.

Thanks for pointing this out. It will be fixed in the next release.


Test Coverage and Time Performance Improvement of Issue #5

In this commit we improved the time performance of the PR #5 by about 50%. Furthermore, we improved both statement and test coverage in the area that were affected by our change.

Solid code, not many changes so not really much that could have gone wrong.

Reviewed with Robert, looks good.


feat: port Algebra.Group.WithOne.Defs

mathlib3 commit hash e574b1a4e891376b0ef974b926da39e05da12a06

Things of note here:

Like WithBot, we add coe : α → WithOne α and tag it @[coe] for compatibility with Lean 4's coercion mechanism
Neither @[coe, to_additive] nor @[to_additive, coe] seems to tag the additivised definition with coe; same for @[norm_cast, to_additive] (which used to work in Lean 3). I've had to manually tag some to-additivised declarations as a consequence.
I had to comment out a CanLift instance, and also rewrite a proof, because there is still no lift tactic.
There are some shows which might not be needed; I asked at https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/_proof_1/near/313734606 because I don't know how to test this.
WithZero.zero_mul with WithZero.mul_zero used to be tagged @[simp] but a linter told me that simp only [zero_mul] proves it, so I removed the tags. This makes sense: WithZero alpha is an instance of MulZeroClass. I'm slightly surprised that the linter in mathlib3 doesn't flag this.

If you can remember it, could you add a porting note to the proof you had to rewrite for lack of simp? It would be good, even if only as a test, to restore this when lift arrives, hopefully soon.

bors d+
Please update the wiki page when you merge.

OK I just realised that every @[to_additive] followed by an #align needs to have a second #align added for the additivised definition. I've just added these but don't want to hit merge until the branch compiles and unfortunately it's time for bed.

Oh nice, it doesn't take hours to compile like mathlib3 :-)

bors r+

bors merge

bors merge


Feat AppVeyor Multi Architecture Support

Hi Anthony,
As discussed, please review and let me know if all good to go.
We will have to update some of the files to reflect Portainer Github & Docker Hub tokens.

@ssbkang huge amount commits for small change. Maybe you should squash them: http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html

@ssbkang @olljanat it's all right we can take care of squashing the commits during merge.

@olljanat Thanks, will do a squash next time 👍

Thanks @ssbkang :+1:


Spyder wont launch after spyer --reset

Context: windows Vista, python (x,y) 2.7.5.
I get the following error when running Spyder from the command line:

This is a problem with PythonXY, not with Spyder. Please talk to its developers about it.

I've heard from some users that you can solve this problem by doing
pip uninstall xy

Other than that we can't help you to solve this problem, sorry.


Some unit tests are failing under asan on master

Here is a list of them:

[x]  1 - test_libswoc (Failed)
[x]  10 - test_AIO (Failed)
[x]  11 - test_cache_Cache (Failed) - (Bryan) - looks like it is an issue with g_ssl_hooks
[x]  2 - test_cache_Populated_Cache (Failed)
[ ]  13 - test_cache_CacheDir (Failed)
[ ]  14 - test_cache_CacheVol (Failed)
[ ]  15 - test_cache_RWW (Failed)
[ ]  16 - test_cache_Alternate_L_to_S (Failed)
[ ]  17 - test_cache_Alternate_S_to_L (Failed)
[x]  18 - test_cache_Alternate_L_to_S_remove_L (Failed)
[x]  19 - test_cache_Alternate_L_to_S_remove_S (Failed)
[x]  20 - test_cache_Alternate_S_to_L_remove_L (Failed)
[x]  21 - test_cache_Alternate_S_to_L_remove_S (Failed)
[x]  22 - test_cache_Update_L_to_S (Failed)
[x]  23 - test_cache_Update_S_to_L (Failed)
[x]  24 - test_cache_Update_Header (Failed)
[ ]  37 - test_jsonrpcserver (Failed)
[ ]  42 - verify_background_fetch (Failed)
[ ]   62 - verify_remap_stats (Failed)
[ ]  65 - verify_slice (Failed)
[ ]  88 - verify_sslheaders (Failed)
[ ]  93 - verify_tls_bridge (Failed)
[ ]  94 - test_txn_box (Failed)
[ ]  95 - verify_magick (Failed)
[ ]  97 - verify_webp_transform (Failed)
[ ]  98 - uri_signing_test (Failed)

when I manually run test_jsonrpcserver it seems fine, though when running --target test it does fail.
./test_jsonrpcserver
...
All tests passed (44 assertions in 12 test cases)


ARROW-16060: [C++] subtract_checked support for timestamp("s") and date32

This is to resolve ARROW-16060.

CI issues seem unrelated.


ISR main structure

Define ISR web main structure

Branches

CCTV
1. Video analytics
1. Licence plate recognition
1. People counting
1. Face recognition
1.  Perimeter security
1.  23 years of experince
Software Development
1. Technologies
1. Projects
1. Car tracking system
1. RIS - Radiology information system
1. Radiology images viewer & analyzer
1. Bosch
1. BIIS
1. Service center
1. Mobile Banking
1. SMS Gateway
1. UPS Parcel tracking
SMB network outsourcing

Latvenergo
EvoPipe
Rigas Dome

Contacts


Feature/save imag

What does this PR?
Where should the reviewer start?
Steps to reproduce
Issue number
Screenshots/Video

@mistikk has conflit

@mistikk Please fix conflicts and we will merge this, other bugs will be fixed on separate PR.


perlPackages.DBDOracle: init at 1.76 (19.03 backport)

(cherry picked from commit 73d45ab1b0618c273e0d9212ad9568f42247ea14)

Motivation for this change
#58726
Things done

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

[ ] NixOS
[ ] macOS
[ ] other Linux distributions

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

ping @xeji as they merged the original PR

Thanks!


Removing password requirement from registry check

This change will allow locally-cached credentials (via docker login) to be used in place of hard-coded registry password within orchestration YAML when pulling service images from a given registry.

Why do you still require username? If people have individual accounts to a private registry, you wouldn't be able to enforce a username in the YAML.

Originally I took out both username and password, but found the underlying "login" call to docker-py required the username at the very least (password is optional, and is derived from cached credentials).  The username from the orchestration YAML is an interim step until I can find a way to derive the username from the environment (docker login) automatically for the given registry.  At that point, I would remove the dependency on username as well.  Hope this makes sense.

If the auth file already has information for a registry you don't need to docker login. If no username and password are provided, Maestro shouldn't try to login() at all and just go on with the pull(), which should work as long as the user has authed previously.