Keyboard Manager caps lock still activates sometimes

ℹ Computer information

PowerToys version: 0.24 Experimental
PowerToy Utility: Keyboard Manager
Running PowerToys as Admin: Yes
Windows build number: [20H2]

📝 Provide detailed reproduction steps (if any)

Remap caps lock to Ctrl + Alt + A (Todoist Quick add keyboard shortcut)
Caps lock will not activate Ctrl + Alt + A after a while and caps lock will activate instead

✔ Expected result
Caps lock should activate Ctrl + Alt + A every time, effectively, remapping it to Ctrl + Alt + A permanently
❌ Actual result
Caps lock will not activate Ctrl + Alt + A after a while and caps lock will activate instead
After being activated, the Ctrl + Alt + A shortcut will work again but my text will be in caps, have to go into powertoys to disable keyboard manager, turn off caps lock and enable keyboard manager again. This disrupts my workflow
📷 Screenshots

Yep this is happening quite often and breaks the point of remapping keys using PowerToys. Hope this can be triaged and fixed.

@samwzlim @kidoman
Can you update to the latest version? And if it still happens upload a bug report.
Right-click on the PowerToys icon in the tray menu and select Report Bug

Drag and drop report into a GitHub comment.

Yep still happening in latest version.
Will report the bug.
On Fri, 9 Jul 2021 at 7:01 PM, Mykhailo Pylyp @.***>
wrote:

@samwzlim https://github.com/samwzlim @kidoman
https://github.com/kidoman
Can you update to the latest version? And if it still happens upload a bug
report.
Right-click on the PowerToys icon in the tray menu and select Report Bug
[image: image]
https://user-images.githubusercontent.com/17161067/113557438-afe62d80-9606-11eb-9b81-6260417981f5.png
Drag and drop report into a GitHub comment.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/PowerToys/issues/9300#issuecomment-877189655,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AABSOVMZMCSDSWLR6V4AQWTTW3225ANCNFSM4WTMXBBQ
.

--
Regards,
Karan Misra

i HAVE THE SAME ISSUE. i HAVE MAPPED "cAPS lOCK" TO "cTRL (lEFT)" AND OCCASIONALLY cAPS lOCK TURNS ON AND LIGHTS UP ON MY KEYBOARD. i AM UNABLE TO RELIABLY REPRODUCE OR TO TURN OFF cAPS lOCK.
PowerToysReport_2021-07-26-15-56-24.zip

Probably keyboard hook can time out sometimes and that's why remapping is not applied

@AtnNn
Try to run PowerToys as administrator and let us know if the issue is gone.
Caps Lock probably gets activated when an elevated application is focused(e.g. Task Manager).

@mykhailopylyp Thanks for investigating. I have always had Adminstrator Mode enabled. This issue has occurred while using non-elevated applications such as Emacs which I bombard all day, every day, with Ctrl-based keyboard shortcuts using the Caps Lock key.

@AtnNn
Thank you for following up! Haven't noticed you already run PowerToys elevated.

I +1ed this.
I have Caps mapped to Control.
Occasionally the mapping is lost and CAPS GETS LOCKED.
Workaround is to disable and then re-enable the Keyboard Manager.
This occurs when running v0.36.0 as administrator.

I have a similar issue. I tried remapping some key combinations to get easier access to (curly) brackets on a german keyboard layout. At first, the keys remapped keys work, but at some point, it stops working, and instead everything is in caps-lock. Additionally, the scrolling on websites does not work anymore. Maybe somehow the shift key gets locked? Attached you can find a bug report.

PowerToysReport_2022-01-07-11-27-22.zip

I use Punto Switcher app to switch between keyboard layouts using Caps Lock. Sadly, once in a few days Caps Lock function activates. I wanted to try something new, but PowerToys can't key bind Caps Lock to Alt+Shift, and according to this thread has the same exzact issue :)

Have the same issue when just remapping capslock to ctrl

Have the same issue when just remapping capslock to ctrl

me too

I remap Caps Lock to F24 and use that for push to talk in Discord. What I've found is that if I'm holding the key while launching another program or switching between programs, it activates Caps Lock. In regular Windows settings, I made it so left Shift could disable Caps Lock, but pressing it does not. I have to toggle off the PowerToys keyboard manager, press left shift, then toggle back on keyboard manager, then click out of the PowerToys window for it to work again.

Hi @mrudden , Keyboard Manager conflicts with some games. It shouldn't be used while playing games as these might also use the same low level APIs we're using: https://docs.microsoft.com/en-us/windows/powertoys/keyboard-manager#known-issues

Is there any workaround for now to map the caps lock to ctrl?

Reproduced with <`> <->  remap - on several quick layout switch in a row with CapsLock layout switch became obsolete and disabling CapsLock is not working even with option to disable it on Shift pressed

map caps lock to ctrl has same issue, and key mappings from other app or device, such functional keys of mouse, triggers the issue.

I CANNOT TURN CAPS LOCK OFF

@andrewkittredge

I CANNOT TURN CAPS LOCK OFF

Perhaps helpful workaround: https://github.com/microsoft/PowerToys/issues/9300#issuecomment-918556161

this is still an issue in 0.69.1 today

This is very easy to reproduce in v0.73.0

Change Caps Key to another key

Caps Lock Key no longer toggles Caps Lock.
Ctrl-Altl-Del and select task manager (Elevated privileges)
Press Caps Lock Key - this toggles Caps Lock.
Return to any other application - Caps Lock is now enabled and cannot be disabled with the Caps Lock Key

It's not really clear how this could be fixed without changing the behavior in elevated mode.

I am trying to map Caps Lock to Esc and I am having this problem at least three times a day.

I too am experiencing this issue.

I tried to migrate from SharpKeys to PowerToys for my keyboard remapping needs, which include remapping capslock to function as an additional esc (leaving no capslock functionality, which is the desired outcome for such a useless key) and ran into this issue. It doesn't happen "sometimes" - it happens every time: after the mapping shown below, capslock is simultaneously both an additional esc and still the old capslock. Pressing it toggles whether or not all keys are emitted in UPPERCASE (and activates/deactivates the capslock light).
So a workaround for everyone here: use SharpKeys to remap capslock and use PowerToys for everything else. SharpKeys uses a different method that requires you restart (or log off and log back on) for your keyboard mapping changes to work, but it actually correctly handles capslock remapping.
SharpKeys (free and open source): https://github.com/randyrants/sharpkeys
(I'm not affiliated with SharpKeys besides having used it without problem for over a decade.)

I UPDATED TO THE LATEST VERSION AND NOW THE WORKAROUND OF TURNING KEYBOARD MANAGER ON AND OFF HAS STOPPED WORKING.


Module scrollback: Bot hearing itself

The bot does not record what it says or react to it in any way right now.
This is generally what is wanted, but there are exceptions. The scrollback module is the big one.
In general, all events should have a counterpart event that includes self messages.
For example, "botcommand" or "onboturl" and so on. You absolutely should have to opt in to hear the bot speak as it's kinda assumed anything another module says is complete and it will explicitly call your module if it wants it.
i'm of course open to discussion, but I think avoiding breaking backwards compatibility (as discussed above it doesn't) should be easy here.

a chansay event was added for all replies in b5a73739 (oddly, that commit predates this issue).
That works well enough for the purpose of scrollback this is working fine.
Closing.


make RegExpExecArray always include index 0

Fixes #50520

[ ] i don't know how the fourslash tests work or how to debug them. i'll take a closer look tomorrow
[ ] should RegExpMatchArray be deleted and RegExpExecArray be used for both match and exec as suggested by https://github.com/microsoft/TypeScript/issues/50520#issuecomment-1242878018?

I think it would be better not to introduce a new interface just to share properties.
Maybe there is a valid question as to whether RegExpMatchArray should be an alias for [string, ...string[]] | RegExpExecArray. I think I'd rather keep it as-is to be honest.

You don't need a fourslash test - fourslash is for testing editor-specific functionality. A test in tests/cases/compiler for using these types and trying to access the properties on them is good.
// @strict: true,false
// @noUncheckedIndexedAccess: true
// @exactOptionalPropertyTypes: true

export function foo(matchResult: RegExpExecArray, execResult: RegExpExecArray) {
    matchResult[0].length;
    matchResult[999].length;
    matchResult.index + 0;
    matchResult.input.length;
    matchResult.groups["someVariable"].length;
    matchResult.groups = undefined;

    execResult[0].length;
    execResult[999].length;
    execResult.index + 0;
    execResult.input.length;
    execResult.groups["someVariable"].length;
    execResult.groups = undefined;

    if (Math.random()) {
        matchResult = execResult;
    }
    else {
        execResult = matchResult
    }
}

Many of these will produce errors, and that's expected.

i don't know how the fourslash tests work or how to debug them.

Whenever you add anything globally, including an interface, in the lib files, you have to add an entry in src\harness\fourslashInterfaceImpl.ts. But as suggested by Mr. Rosenwasser, you are not encouraged to introduce a new interface just to share properties.

should RegExpMatchArray be deleted?

My suggestion would be removing the 0 property in RegExpMatchArray as well as making it deprecated instead of deleting the whole interface so as not to breaking existing code.
Overall, my suggested changes would be:
interface String {
    // ...
    match(regexp: string | RegExp): [string, ...string[]] | RegExpExecArray | null;
    // ...
}

// ...

/** @deprecated Use `[string, ...string[]] | RegExpExecArray` instead */
interface RegExpMatchArray extends Array<string> {
    /**
     * The index of the search at which the result was found.
     */
    index?: number;
    /**
     * A copy of the search string.
     */
    input?: string;
}

interface RegExpExecArray extends Array<string> {
    /**
     * The index of the search at which the result was found.
     */
    index: number;
    /**
     * A copy of the search string.
     */
    input: string;
    /**
     * The first match. This will always be present because `null` will be returned if there are no matches.
     */
    0: string;
}

And in es2018.regexp.d.ts:
interface RegExpMatchArray {
    /**
     * An object containing the values of named capturing groups with the keys being the corresponding group names,
     * or undefined if no named capturing groups are defined.
     */
    groups?: { [key: string]: string } | undefined;
}

interface RegExpExecArray {
    /**
     * An object containing the values of named capturing groups with the keys being the corresponding group names,
     * or undefined if no named capturing groups are defined.
     */
    groups: { [key: string]: string } | undefined;
}

// (Add a newline before EOF)

I think it would be better not to introduce a new interface just to share properties.

i'll remove that then. however would you mind elaborating on why that's a bad idea? i've noticed several instances of duplicated properties that would be better off extending a shared interface imo (eg. #46781) so i'm curious as to why duplicating code is the preferred approach?

You don't need a fourslash test - fourslash is for testing editor-specific functionality.

ah ok. the reason i brought it up is because my change caused some of the fourslash tests to fail, according to @graphemecluster it was because of that new interface i added

I don’t mean to remove the addition of 0 to RegExpExecArray (but only to RegExpMatchArray), I’ve edited the comment to clarify that. Sorry!
Anyway I seems to care to much about compatibility; let’s leave it to @DanielRosenwasser.

@typescript-bot test top100
@typescript-bot user test this
@typescript-bot run dt


[Plugin] Migrate Tech Radar

Hey, I just made a Pull Request!

During my hackdays, I am planning to migrate (and modernize) the Tech Radar to BOSS. There are a few parts of this: improving the React implementation (maybe move away from CSS modules potentially), migrating to TypeScript, adjusting the test suite, and adding clear separation for it to be used outside of Backstage too.
I also don't want this to be a huge PR so will focus on just getting it up and then will add a bunch of GitHub issues to ask the community to help improve and build on this.
Note: This is still a work in progress. The broken CSS in the diagram above is something I will work on within this PR.
:heavy_check_mark: Checklist

[ ] All tests are passing yarn test
[ ] Screenshots attached (for UI changes)
[ ] Relevant documentation updated
[ ] Prettier run on changed files
[ ] Tests added for new functionality
[ ] Regression tests added for bug fixes

Niiiiiice 🎉

@spotify/backstage-core This is ready for review btw


Import namespace packages?

Background:
I'm trying to use namespace packages, specifically opentelemetry-api — which uses native namespace packaging
Here's the issue as it's presented: https://github.com/open-telemetry/opentelemetry-python/issues/2591
A few years back, issue microsoft/python-language-server#288 had a lengthy discussion where some progress seems to have been made to support namespace packages, but it was closed.
Could you advice on how to best proceed? Is there a reason that you don't support namespace packages? (e.g. have they been relatively unused until now?) What are the pros and cons?

Pylance does support namespace packages.
Are you seeing a specific problem? If so, please describe the symptoms, expected behavior, and repro steps.

@erictraut https://github.com/open-telemetry/opentelemetry-python/issues/2591 -- yes, code completion doesn't work for opentelemetry and also in strict mypy mode you get errors for the package. Please click the link to see screenshots.

Thanks for the additional information.
Pylance is able to resolve imports from the library, but it is not picking up the type information. There are two reasons for this. The first is a bug in the opentelemetry library. It contains inlined type information, but it is not following PEP 561, which says:

For namespace packages (see PEP 420), the "py.typed" file should be in the submodules of the namespace, to avoid conflicts and for clarity.

The opentelemetry library is placing the "py.typed" file in the top-level namespace directory rather than within the individual submodules. Pyright is currently looking for it in the submodule directories, consistent with PEP 561.
Even if I fix this problem by adding "py.typed" files in the individual submodules, we hit a second issue due to a bug in pyright. In strict mode, it is incorrectly generates a "stub file not found" error for the namespace portion of the import within the statement from opentelemetry import baggage, trace.
I've fixed the bug in pyright. I've also modified the import logic in pyright to allow for a "py.typed" file at the top level of a namespace. Even though that doesn't completely conform to the PEP 561 standard, I think it's reasonable and unambiguous. Plus, it appears that mypy accepts this variant.
This change may or may not make it into this week's release of pylance. The timing is close.
Incidentally, I ran the command-line version of pyright with the "--verifytypes" option with the opentelemetry library. Here is the output:
Symbols exported by "opentelemetry": 973
  With known type: 743
  With ambiguous type: 25
  With unknown type: 205

Type completeness score: 76.4%

That means the type information for this library is incomplete, so you may still have trouble if you try to use it with strict mode. We've prepared this guidance to help library authors detect and address missing type information in their libraries.

This issue has been fixed in version 2022.4.1, which we've just released. You can find the changelog here: CHANGELOG.md


Ed anomalies

About the PR
Considering how much I've reworked the anomalies and made mechanics for them, I want to control what else will be done with them.

selfmerg


Zulip - Update from latest git main

When I try to run to update Zulip via git I run into following issue:
Using cached Python venv from /srv/zulip-venv-cache/4293996ea9b81a02690e78a21ea2f1f0bc2e6597/zulip-py3-venv
+ ln -nsf /srv/zulip-venv-cache/4293996ea9b81a02690e78a21ea2f1f0bc2e6597/zulip-py3-venv /home/zulip/deployments/2021-11-05-21-47-46/zulip-py3-venv
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1216k  100 1216k    0     0  8883k      0 --:--:-- --:--:-- --:--:-- 8883k
yarn-1.22.17.tgz: OK
Traceback (most recent call last):
  File "/home/zulip/deployments/2021-11-05-21-47-46/scripts/lib/upgrade-zulip-stage-2", line 169, in <module>
    subprocess.check_call([os.path.join(deploy_path, "scripts", "lib", "install-yarn")])
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/zulip/deployments/2021-11-05-21-47-46/scripts/lib/install-yarn']' returned non-zero exit status 1.

Zulip upgrade failed (exit code 1)!

The upgrade process is designed to be idempotent, so you can retry after resolving whatever issue caused the failure (there should be a traceback above). A log of this installation is available in /var/log/zulip/upgrade.log

A few days ago everything was working to update from git.
Additional Infos:
.) Ubuntu 20.04.3 LTS
.) Memory 16GB
.) CPU 4 Cores
I tried to reinstall it and update it again before trying to migrate.

This is a networking failure downloading yarn; try again with more reliable Internet and it should work.

I tried to install it via git again, latest version and still running into that issues with yarn:
libpq-dev is already the newest version (14.1-2.pgdg20.04+1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Using cached Python venv from /srv/zulip-venv-cache/35822fb2ce4176dd4baaa2aed71c8dc1ac1db4af/zulip-py3-venv
+ ln -nsf /srv/zulip-venv-cache/35822fb2ce4176dd4baaa2aed71c8dc1ac1db4af/zulip-py3-venv /home/zulip/deployments/2021-12-10-11-45-31/zulip-py3-venv
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1216k  100 1216k    0     0  14.1M      0 --:--:-- --:--:-- --:--:-- 14.1M
yarn-1.22.17.tgz: OK
Traceback (most recent call last):
  File "/home/zulip/deployments/2021-12-10-11-45-31/scripts/lib/upgrade-zulip-stage-2", line 169, in <module>
    subprocess.check_call([os.path.join(deploy_path, "scripts", "lib", "install-yarn")])
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/zulip/deployments/2021-12-10-11-45-31/scripts/lib/install-yarn']' returned non-zero exit status 1.

Zulip upgrade failed (exit code 1)!

The upgrade process is designed to be idempotent, so you can retry after resolving whatever issue caused the failure (there should be a traceback above). A log of this installation is available in /var/log/zulip/upgrade.log

I investigated the script for this:
#!/usr/bin/env bash
set -euo pipefail

version=1.22.17
sha256=267982c61119a055ba2b23d9cf90b02d3d16c202c03cb0c3a53b9633eae37249
tarball="yarn-$version.tgz"

check_version() {
    # Reading the version of Yarn from its package.json is much faster
    # than running yarn --version.
    link="$(command -v yarn)" \
        && bin="$(readlink -f "$link")" \
        && [ "$bin" = /srv/zulip-yarn/bin/yarn ] \
        && current_version="$(jq -r '.version' /srv/zulip-yarn/package.json)" \
        && [ "$current_version" = "$version" ]
}

if ! check_version; then
    tmpdir="$(mktemp -d)"
    trap 'rm -r "$tmpdir"' EXIT
    cd "$tmpdir"
    curl -fLO "https://registry.npmjs.org/yarn/-/$tarball"
    sha256sum -c <<<"$sha256 $tarball"
    rm -rf /srv/zulip-yarn
    mkdir /srv/zulip-yarn
    tar -xzf "$tarball" --no-same-owner --strip-components=1 -C /srv/zulip-yarn
    ln -nsf /srv/zulip-yarn/bin/yarn /usr/bin/yarn
    check_version
fi

The tarball is downloaded and deployed, anyway non-zero exit status 1 is throwing back as above in the log:
/srv/zulip-yarn# ls -lathr
total 32K
-rw-r--r--  1 root  root  2.3K Oct 16 17:07 preinstall.js
drwxr-xr-x  2 root  root  4.0K Oct 16 17:07 lib
drwxr-xr-x  2 root  root  4.0K Oct 16 17:07 bin
-rw-r--r--  1 root  root  3.3K Oct 16 17:07 README.md
-rw-r--r--  1 root  root  1.4K Oct 16 17:07 LICENSE
-rw-r--r--  1 root  root   598 Oct 16 17:07 package.json
drwxr-xr-x 11 zulip zulip 4.0K Dec 10 11:45 ..
drwxr-xr-x  4 root  root  4.0K Dec 10 11:45 .

So all is in, the error message is not really clear to me. The server is running in an cloud environment, I tested it with deactivating firewalls too. so I don't see any issues on that site. Something else needs to be not working properly but the error code is not really clear what exactly is the reason why the script is not working.


How to make the code wait for some time

What is your question?
I am making a note type that makes it to where if you hit it, a image pops up and then it waits a little bit then closes the game
i wrote some code but its not working please tell me why
i dont really know what i can use for the wait could someone tell me

may be runTimer()
and
os.exit()

https://github.com/ShadowMario/FNF-PsychEngine/wiki/Lua-Script-API:-Tweens-and-Timers#runtimertagstring-timefloat--1-loopsint--1

i tried to run a timer but it did not work

you need to make a new function called onTimerCompleted()

didnt work

You forgot the function variable

Yes it worked
but just one more question how could i make it to where if i hit enter then it would close?

if getPropertyFromClass('flixel.FlxG', 'keys.justPressed.ENTER) then
     os.exit()

end

like this?

No, it goes under function onUpdate()

and why are you putting this in a note script?

Theres no wait() command like in Roblox Studio...

maybe?
removeLuaSprite('fooled')


Add or update the Azure App Service build and deployment workflow config

Purpose

...

Does this introduce a breaking change?

[ ] Yes
[ ] No

Pull Request Type
What kind of change does this Pull Request introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

Get the code

git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install

Test the code

What to Check
Verify that the following are valid

...

Other Information

@microsoft-github-policy-service agree

Closing. Meant for user repo.


ValidateSet should be settable (and support .Disabled/.Name)

Summary of the new feature / enhancement
As a module author, I often want to make commands whose parameters can be dynamically restricted.
A good example of this would be scoping a -Repository parameter to a list of a user's repositories.
Because PowerShell Functions/ScriptBlock are not recreated with each invocation, it would be possible to do this by simply updating the contents of a ValidateSet attribute.
Proposed technical implementation details (optional)
To make this work seamlessly, a few small changes would be needed:

[ ] Allow the value of [ValidateSet] to be updated.
[ ] Add a .Disabled property to [ValidateSet], which will disable validation if set to true
[ ] Add a .Name property to [ValidateSet], which will make the attribute easier to discover and group.

Existing use of [ValidateSet] would not be impacted by this change.
If a module author wished to, they could locate all exported commands and all parameters with a [ValidateSet] of a given name, and simply update the list of valid values.
Proof of concept of updating validate set (using private reflection) below:
function RNG {
    param(
    [ValidateSet(0)]
    [int]
    $Last
    )

    begin {
        if (-not $script:RNGHistory) {
            $script:RNGHistory = @()
        }

    }

    process {
        if ($last) {
            $script:RNGHistory[-1..(-1 * $last)]
        } else {
            $script:RNGHistory += (Get-Random)
            $script:RNGHistory[-1]

            $validateSetAttr =
                foreach ($attr in $myInvocation.MyCommand.Parameters["Last"].Attributes) {
                    if ($attr -is [ValidateSet]) {
                        $attr
                    }
                }

            $attr = $validateSetAttr
            $newRange = 0..$($script:RNGHistory.Length)
            [ValidateSet].GetField("_validValues", 'Instance,NonPublic').SetValue($validateSetAttr,
                $newRange -as [string[]]
            )
        }
    }
}

RNG
RNG -Last 1
RNG
RNG -Last 2
RNG
RNG -Last 3

This can be done today with code like this
class PrinterName : ValidateArgumentsAttribute, IArgumentCompleter , IValidateSetValuesGenerator {
    [IEnumerable[CompletionResult]] CompleteArgument(
        [string]      $CommandName ,
        [string]      $ParameterName,
        [string]      $WordToComplete,
        [CommandAst]  $CommandAst,
        [IDictionary] $FakeBoundParameters
    )
    {
        $CompletionResults = [List[CompletionResult]]::new()
        $this.GetValidValues() | where-object {$_ -like (($wordToComplete -replace '"|''','' )+ "*") } |
            ForEach-Object {$CompletionResults.Add([CompletionResult]::new("'" + $_ + "'"))}
        return $CompletionResults
    }

    [void] Validate([object]$Argument, [EngineIntrinsics]$EngineIntrinsics) {
        if(-not ($Argument -in $This.CompleteArgument("","","",$null,$null).completionText.replace("'","") ) ) {Throw [ParameterBindingException]::new("'$Argument' is not a valid printer name.")}
    }

    [string[]] GetValidValues() { return ([PrinterSettings]::InstalledPrinters) }
}

function Send-StuffToPrinter  {
param (
    [ArgumentCompleter([PrinterName])]
    [PrinterName()]
$Printer )

$Printer # is used in function

}

This class supports [ValidateSet([PrinterName]) (and the complete and validate can be omitted) BUT although this is fine for something like printers which vary between machines, but don't typically change from one command to another, it doesn't suit the use case where things change during a session. It also

This can be done today with code like this
class PrinterName : ValidateArgumentsAttribute, IArgumentCompleter , IValidateSetValuesGenerator {
    [IEnumerable[CompletionResult]] CompleteArgument(
        [string]      $CommandName ,
        [string]      $ParameterName,
        [string]      $WordToComplete,
        [CommandAst]  $CommandAst,
        [IDictionary] $FakeBoundParameters
    )
    {
        $CompletionResults = [List[CompletionResult]]::new()
        $this.GetValidValues() | where-object {$_ -like (($wordToComplete -replace '"|''','' )+ "*") } |
            ForEach-Object {$CompletionResults.Add([CompletionResult]::new("'" + $_ + "'"))}
        return $CompletionResults
    }

    [void] Validate([object]$Argument, [EngineIntrinsics]$EngineIntrinsics) {
        if(-not ($Argument -in $This.CompleteArgument("","","",$null,$null).completionText.replace("'","") ) ) {Throw [ParameterBindingException]::new("'$Argument' is not a valid printer name.")}
    }

    [string[]] GetValidValues() { return ([PrinterSettings]::InstalledPrinters) }
}

function Send-StuffToPrinter  {
param (
    [ArgumentCompleter([PrinterName])]
    [PrinterName()]
$Printer )

$Printer # is used in function

}

This class supports [ValidateSet([PrinterName]) (and the complete and validate can be omitted) BUT although this is fine for something like printers which do vary between machines, but don't typically change from one command to another, it doesn't suit the use case where things change during a session. (For the original example, a repo being created)
Hence the example also set up to work as a completer and a validator Even then, where the completer can suggest different arguments depending on the command line this is harder for the validator... so complex validation often is better inside the function body.  (Or something horrible is required as a dynamic parameter)
This certainly could be cleaned up. What I don't like though is they idea that code somewhere changes the behaviour of the parameter, a completer class gives us a pointer for where to see what's happening, a validate set puts it right next to the parameter. But potentially changing the behaviour of one function from another seems like a way to make code very hard to follow.


Option to raise exception on error codes

Discussed in https://github.com/openapi-generators/openapi-python-client/discussions/254

Originally posted by theFong November 28, 2020
Is your feature request related to a problem? Please describe.
In some cases, if an unexpected error code is returned (or even an expected error code), I would rather raise an exception than return None. This is because depending on the linter and adoption of type annotation in a code base I may not handle a None variable. In this case an exception raising status code, message or other meta data would be more useful to debug especially when using exception logging software like Sentry.
Describe the solution you'd like
I see a couple of interface possibilities if this feature would make sense to implement.
Add new functions with a must prefix:

must_sync
must_sync_detailed
must_async
must_async_detailed
This is inspired by a Golang's pattern of prefixing "must" to functions which may panic. The main downside is the addition of 4 new methods.

Another solution would be to provide a raise_for_status method similar to python requests library on the Response object. This interface would allow the passing of args to specify raising in case of any error code or just unexpected ones. The side effect here is that like remembering to handle None you would have to remember to raise_for_status. This side effect exists when using the requests library so is not a big deal.
Describe alternatives you've considered
Currently in cases where I would like to fail hard, I have a wrapper function which takes a ..._detailed function and builds an exception with meta data if parsed is None. This works fine.
Interested in thoughts/discussion!

Something related to this that I think would be really nice is a way for the user of the generated code to more easily inspect the HTTP status code and body on error. Currently, when the API returns, if it is None, the user knows it fails but has no context as to why it failed, and thus can't display this to the end user or do much to act open it.
Instead of returning Optional[T], perhaps we could devise a return type like:
@dataclass
class TResponse:
    data: Optional[T]
    status_code: int
    raw_payload: Dict[str, Any]

The data member would be exactly what is returned today. status_code would allow the consumer of the API to check for different status codes (403 vs 500, etc) and the raw_payload would allow for, on error, displaying the payload returned by the server, e.g. "field": "field1 is a required field.". I'm most fuzzy on the raw_payload part. Perhaps just passing back up the full httpx.Response would be better? Not sure if that breaks some encapsulation though.
I came across this while working on writing a small consumer for my API. The requests were failing, but I couldn't tell why without breaking out Wireshark and looking at the raw server HTTP response messages.

That's what the *_detailed functions are for, they include additional info (like status code) and should be used when there's something you can do about the failure case (other than just "I didn't get the data").
I avoided returning the actual httpx response class just because I wasn't sure for a while whether I wanted to couple to it, but I don't see us switching to anything else so if adding that to _detailed functions would be useful we can do so.

They're mentioned in the generated READMEs but it's not super obvious. If there's a better way we could call those out so they're more discoverable, please let me know or make a PR with an improvement. Clear documentation is supposed to be a feature of this project 😅

Another alternative is creating the client with some extra configuration, in this case a raise_on_error_code flag
client = Client(
    base_url="https://api.example.com",
    raise_on_error_code=True,
)

This would be kind of similar to what OpenApi client generator does for other languages, for example Typescript:
export interface ConfigurationParameters {
    basePath?: string; // override base path
    fetchApi?: FetchAPI; // override for fetch implementation
    middleware?: Middleware[]; // middleware to apply before/after fetch requests
    queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings
    username?: string; // parameter for basic security
    password?: string; // parameter for basic security
    apiKey?: string | ((name: string) => string); // parameter for apiKey security
    accessToken?: string | ((name?: string, scopes?: string[]) => string); // parameter for oauth2 security
    headers?: HTTPHeaders; //header params we want to use on every request
    credentials?: RequestCredentials; //value for the credentials param we want to use on each request
}

This will allow also the creation of middlewares which can be useful too.
I know this solution is not ideal either as having a clean client object is pretty nice, but if you are ok with it I can contribute with a PR adding this feature.

After #775 raising exceptiosn for error codes can be done via event hooks—so I'm considering that as closing this.

@dbanty One downside of that approach is that error responses often don't have response types in an openapi schema, so any endpoint that enumerates its error codes ends up as Union[ActualResponseType, Any].

Closing this, will track built-in exceptions in #254


fix: only modify post conditions for tx sender

Try out this version of the Stacks Wallet - download extension builds.

what this does
This PR works to resolve these issues:

https://github.com/blockstack/stacks-wallet-web/issues/969
https://github.com/blockstack/stacks-wallet-web/issues/1093

Changes
As part of getting familiar with the code, I've done some work to refactor the hook use-setup-tx (before, after) into smaller, more manageable parts. From the original hook, I've now made a few new ones that each take care of their own responsibility:

useAccountSwitchCallback
useDecodeRequestCallback
useNetworkSwitchCallback
usePostConditionsCallback (the one we care about for this PR)

post-conditions-utils.ts
postConditionFromString

Other misc fixes

There was a bug where if a token_transfer had post conditions defined, it would not display them. This fixes that bug.
Very briefly refactored the base component that displays the post conditions, see component.

So I switched it to only compare the hash160

And then I realized we also need to compare type, because this logic would fail if the post condition was for a contract, where the address portion of the contract identifier matched the current user.
Also, can you add a Changeset?


Build wfreerdp issue on windows xp

need replace "inet_ntop" function since there is no such function on windows xp.
need put the position of "#include <windows.h>" to the top, or added it if necessary. otherwise got lots of syntax errors.

also note that if you project is copied to FAT32 drive, you need take care of FAT32 manfiest issue when building, there is one vs config there

@EricYin I'm on Windows 7, could you work on a fix and open a pull request for this?

sure,  I will try to open a pull request by the end of this week if possible.


signature parsing fail

class Main {
    static function f(a:Int, ?b:String->Void, ?c:Float) {}

    static function main() {
        Main.
    }
}

One more:
class Main {
    static function f(opts:{f:Int}) {}

    static function main() {
        Main.f();
    }
}

The first one is the same problem as #14, and I don't reproduce it on my side with the exact same signature (see picture):

I need to find what is the origin of the problem.
For the second one, it is a case that was not handled but I will fix it tomorrow.

The first one is the same problem as #14, and I don't reproduce it on my side with the exact same signature

hmm, maybe it's somehow related to haxe compiler version, although I don't think the completion output changed. could you post your completion query results?

<list>
<t>a : Int -> ?b : (String -> Void) -> ?c : Float -> Unknown<0></t><d></d>
<t>Void -> Unknown<1></t><d></d>
</list>

I'm getting optional vars wrapped in Null<T> (which is correct, I guess), so the problem is with parsing type parameters.
<list>
<t>a : Int -> ?b : Null<String -> Void> -> ?c : Null<Float> -> Unknown<0></t><d></d>
<t>Void -> Unknown<1></t><d></d>
</list>

Thanks for the output. I am fixing it now :)

#14 is fixed, now finishing handling typedefs

still not quite right:

Stripping Null<T> might (or might not) be a good idea for optional arguments (that are marked with ?, but removing nested Null<T> only causes confusion.

Right, thanks for the detailed report

Don't remove the Null from optional, it's important for users (esp. those that rely on completion heavily) to learn the language as it is, rather than have it masked and be different elsewhere.
Consistency is best.  It IS a Null, don't hide that :)

Perfectly ok with that, except that apparently, the compiler seems to wrap optional arguments in Null< > when there was none at the first place.

(That said, I didn't reproduce this on my side)

I will strip none of them, so we can see if there is something not right somewhere else at least.

fwiw I think we are both on 3.2.0 now, maybe double check the version running is not lingering from prior launches? Seems odd that the output would differ though..

Parsing issues should be solved by now. Didn't cleared up this wrapping of Null on optional params though. I am normally using haxe 3.2.0 for completion as well, but will double check it doesn't mess up with previous launches as you said.

sounds good, i'll test shortly!


Does ktrain supports training on multiple GPUs or TPU

I want to try out a classification problem with multiple GPUs or TPU, can someone guide me here.
Thanks !

Multi-GPU training in TensorFlow2 involves placing a model within the scope of a Strategy.     For training on two GPUs, for example, you can do this:
# use two GPUs to train
import os
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID";
os.environ["CUDA_VISIBLE_DEVICES"]="0,1";

# load text data
categories = ['alt.atheism', 'soc.religion.christian','comp.graphics', 'sci.med']
from sklearn.datasets import fetch_20newsgroups
train_b = fetch_20newsgroups(subset='train', categories=categories, shuffle=True)
test_b = fetch_20newsgroups(subset='test',categories=categories, shuffle=True)
(x_train, y_train) = (train_b.data, train_b.target)
(x_test, y_test) = (test_b.data, test_b.target)

# build, train, and validate model
import tensorflow as tf
mirrored_strategy = tf.distribute.MirroredStrategy()
import ktrain
from ktrain import text
MODEL_NAME = 'distilbert-base-uncased'
t = text.Transformer(MODEL_NAME, maxlen=500, class_names=train_b.target_names)
trn = t.preprocess_train(x_train, y_train)
val = t.preprocess_test(x_test, y_test)
with mirrored_strategy.scope():
    model = t.get_classifier()
learner = ktrain.get_learner(model, train_data=trn, batch_size=6)
learner.fit_onecycle(5e-5, 2)
learner.save_model('/tmp/my_model')
learner.load_model('/tmp/my_model', preproc=t)
learner.validate(val_data=val, class_names=t.get_classes())

However, as described in this thread, there were some TensorFlow 2 bugs that cause some issues (E.g., with validation, using more than 2 GPUs).  It may work better in the newest, unreleased version of TF.
I have not tried TPU training yet, but it involves converting a tf.Keras model to a TPU model and training normally.  I have not tested supplying a TPU model to Learner yet.  If you try and experience problems, you can open an issue and I will try to resolve.

Multi-GPU training in TensorFlow2 involves placing a model within the scope of a Strategy. For training on two GPUs, for example, you can do this:
# use two GPUs to train
import os
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID";
os.environ["CUDA_VISIBLE_DEVICES"]="0,1";

# load text data
categories = ['alt.atheism', 'soc.religion.christian','comp.graphics', 'sci.med']
from sklearn.datasets import fetch_20newsgroups
train_b = fetch_20newsgroups(subset='train', categories=categories, shuffle=True)
test_b = fetch_20newsgroups(subset='test',categories=categories, shuffle=True)
(x_train, y_train) = (train_b.data, train_b.target)
(x_test, y_test) = (test_b.data, test_b.target)

# build, train, and validate model
import tensorflow as tf
mirrored_strategy = tf.distribute.MirroredStrategy()
import ktrain
from ktrain import text
MODEL_NAME = 'distilbert-base-uncased'
t = text.Transformer(MODEL_NAME, maxlen=500, class_names=train_b.target_names)
trn = t.preprocess_train(x_train, y_train)
val = t.preprocess_test(x_test, y_test)
with mirrored_strategy.scope():
    model = t.get_classifier()
learner = ktrain.get_learner(model, train_data=trn, batch_size=6)
learner.fit_onecycle(5e-5, 2)
learner.save_model('/tmp/my_model')
learner.load_model('/tmp/my_model', preproc=t)
learner.validate(val_data=val, class_names=t.get_classes())

However, as described in this thread, there were some TensorFlow 2 bugs that cause some issues (E.g., with validation, using more than 2 GPUs). It may work better in the newest, unreleased version of TF.
I have not tried TPU training yet, but it involves converting a tf.Keras model to a TPU model and training normally. I have not tested supplying a TPU model to Learner yet. If you try and experience problems, you can open an issue and I will try to resolve.

Thanks for quick response. Will try it with latest version of TF.
Also, when i tried training a Transformer model with Transformer wrapper i am not able to use GPU, if i am not wrong i can use s.environ["CUDA_VISIBLE_DEVICES"]="0,1"; to force script to use GPU but still was not able to do so.
How can i force it to use GPU for training ?
Thanks !

@amaiya
Is the following section needed in google-colab? or only set GPU as runtime is enough?
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID";
os.environ["CUDA_VISIBLE_DEVICES"]="0,1";

@agn-7 Those lines are not needed on Google Colab, as demonstrated in the example Colab notebooks in the README.  Thanks.

@amaiya actually using a TPU as the scope of the strategy will throw an error, I tried the following code on Colab:
import ktrain
from ktrain import text
import tensorflow as tf
import os

tpu = tf.distribute.cluster_resolver.TPUClusterResolver()
tf.config.experimental_connect_to_cluster(tpu)
tf.tpu.experimental.initialize_tpu_system(tpu)

strategy = tf.distribute.experimental.TPUStrategy(tpu)
MODEL_NAME = 'distilbert-base-uncased'

with strategy.scope():
  t = text.Transformer(MODEL_NAME, maxlen=500, classes=["r","d"])

  trn = t.preprocess_train(x_train, y_train)

  val = t.preprocess_test(x_test, y_test)

  model = t.get_classifier()

  learner = ktrain.get_learner(model, train_data=trn, val_data=val, batch_size=6)

and the error will appear when fitting(I used fit_onecycle):
begin training using onecycle policy with max lr of 5e-05...
Epoch 1/4
UnavailableError                          Traceback (most recent call last)
 in ()
----> 1 learner.fit_onecycle(5e-5, 4)
15 frames
/usr/local/lib/python3.6/dist-packages/six.py in raise_from(value, from_value)
UnavailableError: 8 root error(s) found.
(0) Unavailable: {{function_node __inference_train_function_31110}} failed to connect to all addresses
Additional GRPC error information from remote target /job:localhost/replica:0/task:0/device:CPU:0:
:{"created":"@1613421778.853934807","description":"Failed to pick subchannel","file":"third_party/grpc/src/core/ext/filters/client_channel/client_channel.cc","file_line":4143,"referenced_errors":[{"created":"@1613421778.846075746","description":"failed to connect to all addresses","file":"third_party/grpc/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc","file_line":398,"grpc_status":14}]}
[[{{node MultiDeviceIteratorGetNextFromShard}}]]
[[RemoteCall]]
[[IteratorGetNext_1]]
[[IteratorGetNext_1/_10]]
(1) Unavailable: {{function_node __inference_train_function_31110}} failed to connect to all addresses
Additional GRPC error information from remote target /job:localhost/replica:0/task:0/device:CPU:0:
:{"created":"@1613421778.853934807","description":"Failed to pick subchannel","file":"third_party/grpc/src/core/ext/filters/client_channel/client_channel.cc","file_line":4143,"referenced_errors":[{"created":"@1613421778.846075746","description":"failed to connect to all addresses","file":"third_party/grpc/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc","file_line":398,"grpc_status":14}]}
[[{{node MultiDeviceIteratorGetNextFromShard}}]]
[[RemoteCall]]
[[IteratorGetNext_1]]
[[strided_slice_109/_150]]
(2) Unavailable: {{function_node __inference_train_function_31110}} failed to connect to all addresses
Additional GRPC error information from remote target /job:localhost/replica:0/task:0/device:CPU:0:
:{"created":"@1613421778.853934807","description":"Failed to pick subchannel","file":"third_party/grpc/src/core/ext/filters/client_channel/client_channel.cc","file_line":4143,"referenced_errors":[{"created":"@1613421778.846075746","description":"failed to connect to all addresses","file":"third_party/grpc/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc","file_line":398,"grpc_status":14}]}
[[{{node MultiDeviceIteratorGetNextFromShard}}]]
[[RemoteCall]]
[[IteratorGetNext_1]]
[[Pad_20/_164]]
(3) Unavailable: {{function_node __inference_train_function_31110}} failed to connect to all addresses
Additional GRPC error information from remote target /job:localhost/replica:0/task:0/device:CPU:0:
:{"created":"@1613421778.853934807","description":"Failed to pick subchannel","file":"third_party/grpc/src/core/ext/filters/client_channel/client_channel.cc","file_line":4143,"referenced_errors":[{"created":"@1613421778.846075746","description":"failed to connect to all addresses","file":"third_party/grpc/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc","file_line":398,"grpc_status":14}]}
[[{{node MultiDeviceIteratorGetNextFromShard}}]]
[[RemoteCall]]
[[IteratorGetNext_1]]
[[Pad_13/_102]]
(4) Unavailable: {{function_node __inference_train_function_31110}} failed to connect to all addresses
Additio ... [truncated]

@warlord798 It sounds like it may be related to this open TensorFlow issue, which may be an incompatibility with transformers.


Can't get Vuelidate working with Vuex and child components

Hi there,
I'm working on a project that uses Vuex to maintain state, with a parent and a couple of child components.
In each child component I define computed properties with getters and setters, whilst also providing the prop for $v, my validations are stored in the parent component and bound using the v-bind:$v="$v" directive e.g.
in my parent component I have a method which checks if the validations have passed, the values however and getters/setters live in the children components.
// Parent component
validations: {
      recipientsName: {
        required
      },
      recipientsSenderName: {
        required
      },
      emailFormEmail: {
        required,
        email
      }
    }

// Child component 1
props: [
    "$v"
],
computed: {
      recipientsName: {
        get () {
          return this.$store.state.basketDelivery.recipient.name;
        },
        set (value) {
          this.$store.commit('updateRecipientName', value);
          this.$v.recipientsName.$touch();
        }
      },

<b-form-group id="recipientsNameGroup"
                      label="Recipient's Name *"
                      label-for="recipientsName">
            <b-form-input id="recipientsName"
                          type="text"
                          v-model="recipientsName"
                          :state="$v.recipientsName.$error ? false : null"
                          required
                          placeholder="Enter the name of the recipient">
            </b-form-input>

            <b-form-invalid-feedback>Please enter your name</b-form-invalid-feedback>
        </b-form-group>

My issue is that, in doing this, it seems that the state of the validation never changes, I've tried moving the computed properties for vuex to the parent, and pass them down as props, but this causes a Vuex error, stating that mutations should not be done directly. Is there any recomendation how I can get this working?
to summarise, I have a parent component in which I want to validate the validation for forms defined across a couple of sub components, which store their state in Vuex.
Thank you for your time, let me know if you require any further information.

Any updates or findings on this we have the same issue

As i understand, because the getters are in children components, the "recipientsName" , "recipientsSenderName", "emailForEmail" elements are not available in parent component by "this.recipientsName" etc.
Try to add a general getter to obtain a state in parent like this:
state() {
    return this.$store.state;
}

and now modify your validations to be nested inside state key like this:
validations: {
	state: {
		recipientsName: {
			required
		  },
		  recipientsSenderName: {
			required
		  },
		  emailFormEmail: {
			required,
			email
		  }
	}
}

Pass the $v object through props normally and now in your child components you can check  errors using
v.state.recipientsName.$error

or touch something in an action by
this.v.state.recipientsName.$touch();

This tripped me up as well, and the answer above from @mu4ddi3 was the solution.
To state it another way, the parent (where the validations are defined) must have a computed/data element that matches the path of the field in the validations.


feat(map_loader): use dummy projector when using local coordinates

Description
Close https://github.com/autowarefoundation/autoware/issues/3427. Use dummy projector when using local coordinates. The dummy projector does no conversion calculations and always returns (0, 0, ele).
Related links
https://github.com/autowarefoundation/autoware/issues/3427.
Tests performed
Check if the vehicle can drive autonomously in the simple planning simulator using local coordinate map.
Note: Since the tutorial map also has local coordinates, you can test it by adding the following file.
# map_projector_info.yaml
projector_type: local

Notes for reviewers
None
Interface changes
None
Effects on system behavior
MRGS conversion is no longer performed when local projector type is selected.
Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.

[x] I've confirmed the contribution guidelines.
[x] The PR follows the pull request guidelines.

In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.

[ ] The PR follows the pull request guidelines.
[ ] The PR has been properly tested.
[ ] The PR has been reviewed by the code owners.

Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.

[ ] There are no open discussions or they are tracked via tickets.
[ ] The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

@Motsu-san Please approve this PR as a codeowner :pray:


Multi-label example breaks when adding lr_scheduler

🐛 Bug
I'm looking at the example here: https://lightning-flash.readthedocs.io/en/latest/reference/text_classification_multi_label.html#text-classification-multi-label
Specifically, the relevant code is up to and including training:
import torch

import flash
from flash.core.data.utils import download_data
from flash.text import TextClassificationData, TextClassifier

# 1. Create the DataModule
# Data from the Kaggle Toxic Comment Classification Challenge:
# https://www.kaggle.com/c/jigsaw-toxic-comment-classification-challenge
download_data("https://pl-flash-data.s3.amazonaws.com/jigsaw_toxic_comments.zip", "./data")

datamodule = TextClassificationData.from_csv(
    "comment_text",
    ["toxic", "severe_toxic", "obscene", "threat", "insult", "identity_hate"],
    train_file="data/jigsaw_toxic_comments/train.csv",
    val_split=0.1,
    batch_size=4,
)

# 2. Build the task
model = TextClassifier(
    backbone="unitary/toxic-bert",
    labels=datamodule.labels,
    multi_label=datamodule.multi_label,
)

# 3. Create the trainer and finetune the model
trainer = flash.Trainer(max_epochs=1, gpus=torch.cuda.device_count())
trainer.finetune(model, datamodule=datamodule, strategy="freeze")

To Reproduce
Add a single line to the TextClassifer as follows lr_scheduler='cosine_schedule_with_warmup':
import torch

import flash
from flash.core.data.utils import download_data
from flash.text import TextClassificationData, TextClassifier

# 1. Create the DataModule
# Data from the Kaggle Toxic Comment Classification Challenge:
# https://www.kaggle.com/c/jigsaw-toxic-comment-classification-challenge
download_data("https://pl-flash-data.s3.amazonaws.com/jigsaw_toxic_comments.zip", "./data")

datamodule = TextClassificationData.from_csv(
    "comment_text",
    ["toxic", "severe_toxic", "obscene", "threat", "insult", "identity_hate"],
    train_file="data/jigsaw_toxic_comments/train.csv",
    val_split=0.1,
    batch_size=4,
)

# 2. Build the task
model = TextClassifier(
    backbone="unitary/toxic-bert",
    labels=datamodule.labels,
    multi_label=datamodule.multi_label,
    lr_scheduler='cosine_schedule_with_warmup',
)

# 3. Create the trainer and finetune the model
trainer = flash.Trainer(max_epochs=1, gpus=torch.cuda.device_count())
trainer.finetune(model, datamodule=datamodule, strategy="freeze")

Error
Using custom data configuration default-6ca8d0c441bcef5d

Downloading and preparing dataset csv/default to /root/.cache/huggingface/datasets/csv/default-6ca8d0c441bcef5d/0.0.0/433e0ccc46f9880962cc2b12065189766fbb2bee57a221866138fb9203c83519...

Downloading data files: 100%
1/1 [00:00<00:00, 27.04it/s]
Extracting data files: 100%
1/1 [00:00<00:00, 28.71it/s]

Dataset csv downloaded and prepared to /root/.cache/huggingface/datasets/csv/default-6ca8d0c441bcef5d/0.0.0/433e0ccc46f9880962cc2b12065189766fbb2bee57a221866138fb9203c83519. Subsequent calls will reuse this data.

100%
1/1 [00:00<00:00, 20.85it/s]
100%
159571/159571 [00:21<00:00, 6852.75ex/s]

Using 'unitary/toxic-bert' provided by Hugging Face/transformers (https://github.com/huggingface/transformers).
GPU available: True, used: True
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
HPU available: False, using: 0 HPUs
LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0]

---------------------------------------------------------------------------

MisconfigurationException                 Traceback (most recent call last)

[<ipython-input-13-2c046747ae71>](https://localhost:8080/#) in <module>()
     28 # 3. Create the trainer and finetune the model
     29 trainer = flash.Trainer(max_epochs=1, gpus=torch.cuda.device_count())
---> 30 trainer.finetune(model, datamodule=datamodule, strategy="freeze")
     31

13 frames

[/usr/local/lib/python3.7/dist-packages/pytorch_lightning/core/hooks.py](https://localhost:8080/#) in train_dataloader(self)
    492                 return {'mnist': mnist_loader, 'cifar': cifar_loader}
    493         """
--> 494         raise MisconfigurationException("`train_dataloader` must be implemented to be used with the Lightning Trainer")
    495
    496     def test_dataloader(self) -> EVAL_DATALOADERS:

MisconfigurationException: `train_dataloader` must be implemented to be used with the Lightning Trainer

Environment
Google Collab Pro with a GPU instance

Hey @sergeyf Thanks for reporting this! I've done some digging and it looks like this is an incompatibility with recent versions of pytorch lightning. As a workaround while we implement a fix, it is working if I install:
pip install 'pytorch-lightning<1.5' 'torchmetrics<0.6'

Hope that helps :smiley:

Great, thanks for the quick response!


Split element index

Added option to split element index to keep size lower when you index a lot of data. This is based on the suggestions from Algolia found here: https://www.algolia.com/doc/guides/indexing/structuring-your-data/?language=php#indexing-long-documents

Thanks! Looks good, I'll test and merge this tomorrow!

Thanks for your work!


CST output should be enabled by Default

Using the automatic CST creation capabilities is the recommended way to use Chevrotain.
It is not the only way, embedded actions are still supported... However
the benefits in separating the AST construction and grammar writing in general outweigh
the disadvantages.
The main disadvantage is that the CST creation has a large performance cost (30%+).
However Chevrotain is more than fast enough that
that is not a concern for most use cases.

Breaking changes will be tracked in
http://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_4-0-0


FAQ faded out topic list

Where to find the issue
https://www.coronawarn.app/en/faq/
Describe the issue
https://www.coronawarn.app/en/faq/ in wide-screen mode shows sections and topics side-by-side. The list of topics fades out at the bottom without showing all topics.
This reduces the usefulness of this view when there is plenty of browser real-estate available and the user could scroll down if necessary.
Steps to reproduce
Open https://www.coronawarn.app/en/faq/ in a web browser on a desktop using the full width of the screen
Notice that the list of topics is truncated.
App Features stops at "Check-in" which is faded out
Troubleshooting stops at "iOS" which is faded out

Suggested change
On the wide-screen view of https://www.coronawarn.app/en/faq/ do not fade-out topics. Show all topics and allow the user to scroll down if necessary.

Good morning @MikeMcC399, this is working as intended and was agreed on with the stakeholders.

Corona-Warn-App Open Source Team

@MikeMcC399 a PR has been opened adressing the different amount of topics listed below the sections, as topics should only be faded out once 6 are listed. Your suggestion to highlight these selected topics in the full list has been forwarded.

@MikeMcC399 Yes, the lengths of the lists should have been the same. We will have a look later how to improve the design by vertically aligning the lists.

Good morning @MikeMcC399,

PR #2741 added a sixth topic to the "App Features" section so that the number of hidden topics does not differ between sections
PR #2808 fixed the vertical alignment of FAQ topics

Would you like to close this issue or are there any other issues left that were not adressed?

Corona-Warn-App Open Source Team

Good morning @larswmh
I will close this enhancement request and re-submit with an updated description.


Release notes for beta-20160623

Getting an early start because of my vacation. @mberhault and @jseldess, you'll need to finish this up tomorrow, and next week you're on your own. These notes are accurate as of cockroachdb/cockroach@6d60fb62881a, but feel free to incorporate anything else that gets merged between now and our usual wednesday morning cutoff. The mention of the new UI is a placeholder; I don't know how we want to message this to users.

This change is

Thank @bdarnell, I'll finish it up once I've picked a sha tomorrow morning, then carry on from there. I'll grab the the UI folks to figure out the wording for the next version.
FYI: I'm on vacation starting next Monday, so I won't be able to work on releases for a while. We should pick a replacement. @petermattis: suggestions? Most of the process (from picking a sha to release) is documented at https://github.com/cockroachdb/cockroach/wiki/Release-Process

@bdarnell: when you have a minute, can you add any tips/commands you use when building the release notes?

Mostly it's just a lot of poring through git log for everything since the last beta. I use the emacs magit interface for that. Two specific commands are git log --oneline --merges beta-2016####..beta-2016#### | wc -l to count PRs, and git log -- format=%aN --no-merges beta-2016####..beta-2016#### | sort -u to get the list of contributors.

Thanks. I'll see if I can put some of that in the release docs as well. Enjoy the vacation!

 As usual, I'll add links and doc updates in a separate pr once this is merged. Happy to work with ui guys to tweak the ui messaging as well.

Reviewed 3 of 3 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.

Comments from Reviewable

No beta for this week. I'll keep this around or a bit though.

To expand on @mberhault's terse message, we encountered a bug during testing of this week's beta which we haven't been able to track down yet. We're going to skip the beta release for this week.

Closing in favor of https://github.com/cockroachdb/docs/pull/429


How do I insert a picture as embedded in a cell ?

I want to embed picture in cell which automatically scale the picture by excel. How do I do that with QXlsx? thank you

同问


Displaying cluster data in client

I'm wanting to build a status/admin UI page to display information on the cluster (maybe even as a standalone service in the cluster). I'm firstly just wanting to list the endpoints grouped by service. I was hoping to get access to the documents via a find on Cluster.discovery._endpointsColl, but I see the client has a different API limited to discoverConnection. Have would you achieve this?

So, you want an UI for cluster on Kadira :)
Yeah! We've plans for that.
I don't have a ETA for that. But we'll have it.

haha, I should have prefaced this by saying "as an interim solution ahead of support for Cluster in Kadira…"
Thinking about this more I might just put this in the backlog anyway, as Kadira is the more logical place for it. Looking forward to seeing what Kadira with Cluster support will look like!


[ADP-3212] Prefer to import SlotNo and WithOrigin from primitive lib re-exports in the wallet code

Following up a suggestion in https://github.com/cardano-foundation/cardano-wallet/pull/4434 we try to import as much as possible from internal libraries in the wallet code

[x] Change imports of SlotNo and WithOrigin from Cardano.Slotting.SlotNo to Cardano.Wallet.Primitive.Slotting in the wallet code

ADP-3212

@paolino I see something like this
$ ag cardano-slotting
lib/primitive/cardano-wallet-primitive.cabal
67:    , cardano-slotting
241:    , cardano-slotting

lib/balance-tx/cardano-balance-tx.cabal
65:    , cardano-slotting
127:    , cardano-slotting

lib/network-layer/cardano-wallet-network-layer.cabal
43:    , cardano-slotting

lib/wallet/cardano-wallet.cabal
62:    , cardano-slotting
589:    , cardano-slotting

lib/address-derivation-discovery/address-derivation-discovery.cabal
64:    , cardano-slotting

cabal.project
205:  , cardano-slotting ^>= 0.1.2

Maybe we can only have cardano-slotting in primitive lib imported? And in the rest cabals removed? (except capal.project)

Not progressing


Cloud native failing with SB 3.1.0

Describe the Bug
Cloud native images not working with SB 3.1.0. Related to PR #155
Expected Behaviour
Images running smoothly.
Actual Behaviour
Error messages about Hibernate. PR related: https://github.com/spring-projects/spring-boot/issues/35659
** Steps To Reproduce**
Steps to reproduce the behaviour:

Build with ./mvnw -Pnative clean spring-boot:build-image -Dspring-boot.build-image.imageName="nr-spar-backend"
Run with docker run --name backend-native --env-file ./.env --rm nr-spar-backend

Screenshots
No screenshots.
Desktop (please complete the following information):

OS: Linux Ubuntu
Version 22.04

Additional context
No additional notes.

After talking to Om, we decided to wait for a official fix.

We were able to get SB 3.1.1 working instead, on PR #277
We can safely dismiss this issue.


Pod wont start, due health check failing

is there any more logs then whats below?
Pod Logs:
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 40-plex-first-run: executing...
Plex Media Server first run setup complete
[cont-init.d] 40-plex-first-run: exited 0.
[cont-init.d] 50-plex-update: executing...
[cont-init.d] 50-plex-update: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.

In a new version of the plex image I did get feedback and it was a permission problem...
doing a nasty chmod 777 -R /config solved the issue


How to use descriptor indexing for texture?

Now I'm implementing Path Tracer refer to your WebGPU-Path-Tracer. Your project is using array texture, but I want to use descriptor indexing to support unbound texture!
I know you have already implemet it in your dawn fork, can you give me a example to show how to use descriptor indexing with this project(webgpu node)?
Thanks very much!

I'm not sure what you're referring to, do you mean this?

I refer to the VK_EXT_descriptor_indexing extension, How to use it with webgpu node?

I don't remember if I actually enabled this extension, why do you need unbound textures?

in https://github.com/maierfelix/webgpu/issues/23#issuecomment-641824422 , you say:

the current alternative is descriptor indexing which is enabled in my fork

I want to sample textures with different sizes. I don't know what's your meaning:

If you want to sample textures with different sizes, then use a plain buffer and do the texture filtering (e.g. linear) inside the shader

storage all textures with different size into one plain buffer(uniform buffer?)? how to do the texture filtering?

I see, so you can use NonUniformEXT as a workaround as I did here for example. The problem is that this approach doesn't support textures of different sizes.

storage all textures with different size into one plain buffer(uniform buffer?)? how to do the texture filtering?

You can do the texture filtering yourself in the shader (though that probably looses hardware acceleration). Just search for e.g. bilinear or trilinear glsl texture filtering

OK, I know how to use NonUniformEXT. Can you give some references(or the example code) to show how to do the "storage all textures with different size into one plain buffer"?

There are different ways to implement it, here is an idea:

1 shader array containing texture information (width, height, offset)
1 shader array containing the texture data. Each texture is referenced through offset in the first shader array

Another way is to dynamically generate the shaders based on the used materials/textures which is not an uncommon practice.

I understand your solution, Thanks very much~


Refactored timestamp methods and optimized is_timestamp

The previous implementation of is_timestamp was a bit clunky and inefficient, so I refactored it to improve efficiency. I also changed Arrow.fromtimestamp and Arrow.utcfromtimestamp to use this revamped is_timestamp function.
This is in preparation from my next PR which will implement the "x" timestamp token.

Codecov Report

Merging #682 into master will not change coverage.
The diff coverage is 100%.

@@          Coverage Diff          @@
##           master   #682   +/-   ##
=====================================
  Coverage     100%   100%
=====================================
  Files           8      8
  Lines        1549   1547    -2
  Branches      247    250    +3
=====================================
- Hits         1549   1547    -2

Impacted Files
Coverage Δ

arrow/factory.py
100% <100%> (ø)
:arrow_up:

arrow/util.py
100% <100%> (ø)
:arrow_up:

arrow/arrow.py
100% <100%> (ø)
:arrow_up:

Continue to review full report at Codecov.

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


Fixed bug with SSL providers

After a recent couchpotato update, I noticed the following error cropping up in my logs:
5-07 10:26:30 ERROR [edia._base.providers.base] Failed to login to: SceneAccess
05-07 10:26:31 INFO [hpotato.core.plugins.base] Opening url: post https://www.sceneaccess.eu/login, data: ['username', 'password', 'submit']
05-07 10:26:31 ERROR [hpotato.core.plugins.base] Failed opening url in SceneAccess: https://www.sceneaccess.eu/login Traceback (most recent call last):
SSLError: [Errno 1] _ssl.c:510: error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error

05-07 10:26:31 ERROR [edia._base.providers.base] Failed to login SceneAccess: Traceback (most recent call last):
  File "/CouchPotatoServer/couchpotato/core/media/_base/providers/base.py", line 159, in login
--
    r = adapter.send(request, **kwargs)
  File "/CouchPotatoServer/libs/requests/adapters.py", line 431, in send
    raise SSLError(e, request=request)
SSLError: [Errno 1] _ssl.c:510: error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error

After spending some time reading through Sickrage's (yep) issue tracker, it seems they have had the same problem in recent days. More info and solution here: https://github.com/SiCKRAGETV/sickrage-issues/wiki/SSL-Errors
It seems CouchPotato has fallen prey to the same problem. This pull request should fix that problem.
Heads up, if you're happy with this approach, I'll send up a pull request for docker-sickrage too.

All looks good always happy with pull requests :)

Pull request added.

I've given you commit rights.
General rule is if the person sends a valid code pull request.
I'm also going to add you to docker-sickrage.
The images will auto rebuild on commit.
If you don't want shout and will remove you.


ARM64 support!

rt
Not support this version ISO. or the ISO file error
Version: 19041, Architecture: arm64

get the https://github.com/adavak/Win_ISO_Patching_Scripts/archive/refs/heads/master.zip to test for arm64 works.

this comment will be close after 24 hours if no reply.


Fix a substring issue for a corner case [databricks]

This fixes an issue that when pos + len < 0 && len >= 0, GPU substring returns different strings than CPU.
closes https://github.com/NVIDIA/spark-rapids/issues/7033
Signed-off-by: Firestarman<EMAIL_ADDRESS>

This depends on https://github.com/rapidsai/cudf/pull/12113

cudf PR has been merged, waiting for the new JNI jar to pass premerge.

build


Regression: No exception on ConnectAsync(null, password)  [MQTT-3.1.2-22]

Describe the bug
According to the standard <IP_ADDRESS> Password Flag MQTTnet 3.0.8 throw an MqttProtocolViolationException when a client tried to connect the server with null as username but a non-null password.
Since 3.0.9 this exception is no longer the result of a MQTTnet.Client.MqttClient.ConnectAsync.
Which project is your bug related to?

Client
Server
Generic

To Reproduce
To reproduce the regression I introduced unit tests.
Steps to reproduce the behavior:

Using this version of MQTTnet '3.0.8' -  https://github.com/milbrandt/MQTTnet/commit/57652c76cfb4aeb1af457eea65c93d816504831a - all unit tests are passing
Using current master of MQTTnet '3.0.14' (already in '3.0.9' )-
https://github.com/milbrandt/MQTTnet/commit/e342a51d5026e8a0ffa6c5783d6de0696f2b244f - the unit test 'Use_Username_Null_Password_Empty' is failing

Expected behavior
As in '3.0.8' an 'MqttCommunicationException' with inner 'MqttProtocolViolationException' would be expected. The exception message was If the User Name Flag is set to 0, the Password Flag MUST be set to 0 [MQTT-3.1.2-22]. and directing to the MQTT standard violation.
Screenshots
 Use_Username_Null_Password_Empty
   Source: Server_Tests.cs line 54
   Duration: 292 ms

  Message:
    Assert.ThrowsException failed. Threw exception TaskCanceledException, but exception MqttCommunicationException was expected.
    Exception Message: A task was canceled.
    Stack Trace:    at MQTTnet.PacketDispatcher.MqttPacketAwaiter`1.WaitOneAsync(TimeSpan timeout) in D:\_Repos\MQTTnet\Source\MQTTnet\PacketDispatcher\MqttPacketAwaiter.cs:line 32
       at MQTTnet.Client.MqttClient.SendAndReceiveAsync[TResponsePacket](MqttBasePacket requestPacket, CancellationToken cancellationToken) in D:\_Repos\MQTTnet\Source\MQTTnet\Client\MqttClient.cs:line 415
       at MQTTnet.Client.MqttClient.AuthenticateAsync(IMqttChannelAdapter channelAdapter, MqttApplicationMessage willApplicationMessage, CancellationToken cancellationToken) in D:\_Repos\MQTTnet\Source\MQTTnet\Client\MqttClient.cs:line 287
       at MQTTnet.Client.MqttClient.ConnectAsync(IMqttClientOptions options, CancellationToken cancellationToken) in D:\_Repos\MQTTnet\Source\MQTTnet\Client\MqttClient.cs:line 102
       at MQTTnet.Client.MqttClient.ConnectAsync(IMqttClientOptions options, CancellationToken cancellationToken) in D:\_Repos\MQTTnet\Source\MQTTnet\Client\MqttClient.cs:line 136
       at MQTTnet.Tests.Server_Tests.<>c__DisplayClass5_0.<<Use_Username_Null_Password_Empty>b__0>d.MoveNext() in D:\_Repos\MQTTnet\Tests\MQTTnet.Core.Tests\Server_Tests.cs:line 72
    --- End of stack trace from previous location where exception was thrown ---
       at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.ThrowsExceptionAsync[T](Func`1 action, String message, Object[] parameters)
  Stack Trace:
    Server_Tests.Use_Username_Null_Password_Empty() line 72

Addition
Some further investigation indicate that the commit 6b4b829cf6fd31bfac3b8c60ad6fdd827e8f94db (merge develop) caused the change.

I fixed this issue in master and aligned the exception a bit.

Closing because this is now fixed.


In windows 8.1: npm install asks the binding.gyp and .vcxproj file

Operating System: MS Windows 8.1
App Version: 2.8.0
-Code branch: master

while running the npm install command, it asks the binding.gyp/.vcxproj file. However I am unable to see this file these files in our codebase. Can someone tell me where this file is present in code base. Please share your thoughts

I think these files come with visual studio build tool. Also, we've had more luck using yarn over npm.
If it's still not working try following the install instructions for windows in the readme, and if that doesn't work, reopen this issue


Simple Intro

This obviously isn't complete, but I'm curious what other people think. I think it's really important to start right out of the gate with a full, simple, example to demonstrate how easy it is to setup.
Once a developer is familiar with the core concept (which this is), then you can start slowly introducing things like plugins, CSS bundling, etc.

@pksjce Can you pitch in as you are working the frontpage too?

@chrisdothtml awesome that you followed through with this :).
I think it's a good idea to start with a simple code sample to get the developer interested and then slowly introduce the concepts.

@chrisdothtml Can you see #222 ?

@SpaceK33z fixed the code sample.
Also updated the index a bit more and added a link to getting started.
@bebraw I definitely like that idea; don't think it would be good for the initial intro, or even getting-started though

Screenshot of current progress:

That is a good idea! 👍 Especially because CSS, HTML and asset bundling are only extras. The main purpose is still JS bundling.
Regarding the presentation: I think, it should be visually more clear what the steps are, like Step 1: Create an index.js with that content, Step 2. ... etc. But this doesn't need to be part of this PR. This can be improved incrementally.

@jhnns Definitely agree. My thoughts were this would be the simplest intro, and the getting started page would have step by step instructions

@pksjce Do you want to comment here? It would be useful to see how these ideas go together. We'll end up with some sort of progression, no doubt.

@chrisdothtml - I agree with the need for code samples on the first page. In #222 - my aim was to show natural progression of webpack config for increasing complexity ie babel and css.
So how would we make these work together? Or we choose one form of representation. I think in the previous docs, users got a bit annoyed when we portrayed webpack as simple. So better to show that it is complex, but get the simplest version of all the moving pieces in one place.

@pksjce I actually don't think the issue is that people think webpack is too simple; I think the docs are unapproachable. It's unclear exactly what webpack does, or what it's main purpose is.

Although webpack can be simple (only two arguments are actually required), "powerful" would probably be a better adjective.

Call me crazy, but I almost think that displaying the output of that bundle right there on the page (if we can somehow do it), may tie together the whole "you-can-use-modules-in-your-code-and-webpack-makes-it-browser-ready-for-you" which I think most people miss. Thoughts?

Yeah, showing output could be nice indeed. Maybe we could find a way to bridge this with #222 so you could get a quick overview and then start tweaking to see different possibilities. #222 does the technical bit for that, maybe we can get the layout from here.

@TheLarkInn Maybe we could do a "cleaner" version of the bundle just to illustrate that it's all the module code processed together

Could we get something simple merged this week? No need to be perfect. 👍
Any thoughts on this @skipjack?

Better or worse than last screenshot? This one uses something more familiar (hello world), shows the terminal command, and shows the code bundled

@bebraw yea I'm thinking I'll merge this into the splash-page PR I open later tonight. I can deal with the conflicts better over there.
@chrisdothtml I like it! I feel like is as barebones as it gets which I think is what we want. I guess the only thing that could be simplified even more is the Bundle them with webpack section, where we could just show webpack entry output. However, if we want to point people towards using the config maybe that change doesn't make sense.

@skipjack You're right. Simplest version can be without the config file entirely. Will push these changes and update the bundle section

I wonder if we could borrow the idea of interactivity from #222. We can show a simple example by default but also allow the user to explore more advanced scenarios through some UI control. Maybe it could work out in the same layout.

@bebraw yea I actually got a webpackbin through an iframe working pretty well on my splash-page branch. We can play around with it there, I've been trying to finish up one thing with the visualization before opening the PR but no matter what I'll open that tonight and share some screenshots.

@skipjack Ok. Yeah, I agree getting something simple done first is the way to go. I would experiment with limited interactive (template based -> fast to load, no dependency on third party) after that before going to a heavier direction (iframes).

@bebraw sounds good.
cc @pkjse

What about something like what Sequence.js has where it's sort of a scripted interactive demo (user can't actually edit, but is still interactive). I'm just weary of having a full blown embedded code editor on the homepage/intro

@chrisdothtml I really like this idea. Sequence example is very nice.

Merged this so I can pick up the changes on my branch. @chrisdothtml any other changes to index.md can go in a new PR.


Mountain Duck notes to be added

You might want to update your page below and state that Mountain Duck does not currently support the creating of folders.
https://github.com/minio/cookbook/blob/master/docs/how-to-use-mountainduck-with-minio.md
This is true as of 10/02/17 as I just purchased this beliving that it would fully work as a virtual drive and now find out that I was sold a lemon as if you try and create a folder, it just vanishes (no error) but never apears.  Checked via web portal and not pressent either.
I have just mailed the mountain duck people to adjust their website.  I am not sure if this same problem exists on S3 directly but I expect its the same, so readers beware.

I have spoken to their support and they have said the following as a work around.

You may try to create a directory on your desktop, create an empty file in it - e.g. ".miniokeep" - and upload this directory structure to your minio host.

They also pointed out #2423 which I was not aware of as ive been making what I thought was folders in teh root but they actully been buckets.  Doh.


SPARKC-302: Skipped

Build against Scala 2.10 finished with success

Build against Scala 2.11 finished with success

Build against Scala 2.11 finished with success


Great tool. Easy to fix problem? Xcode 8.1 & Swift 3

Before any conversion.

After letting it make the "recommended" changes/optimization.
I have no swift skills. Interested in trying the tool. Help please!
Thanks-

Hey! I'm going through a major rewrite of the code currently (and a renaming) so there are a few things likely not working in the current source code.
I'd recommend heading here: https://github.com/JAMFSupport/jHelper-GUI/releases  and downloading the latest compiled ".app" version of the program. Most everything should be working in that latest complied release.

New version now has support for Swift 3 and the latest Xcode


[PowerToys Run] Add favicons from website url

📝 Provide a description of the new feature
What is the expected behavior of the proposed feature?  What is the scenario this would be used?
When searching for a web url in PowerToys Run, it would be better to display the website icon than the browser icon. That way people can see if they make a typo and possibly save them from a dangerous website.

If you'd like to see this feature implemented, add a 👍 reaction to this post.

a favicon won't prevent the dangerous website scenario but not a bad idea to have this load async

But then we need a new way to show the used browser's icon/name. (We uae the default browser.)

An optin is to not display the borsers icon, but to have small text underneath the url, something like Browse with [default browser]

Those are different requests than what the root request is here.

Those are different requests than what the root request is here.

@crutkas
No.
The root request was to show the favicon in front of the result to prevent opening dangerous websites.
I hint that we use the result icon to show which browser will be used. (What browser is set as default browser.)
And @luximus-hunter suggest that we could use the subtitle to show the browser's name, so that we can use the result icon for the favicon.

Yes, apologies for my bad explaining

Showing a fav icon doesn't do what they are asking at the end of the day.  Doesn't prevent mistypes as those sites could also have the same favicon too
I think it is decent eye candy but will induce a latency for loading the icon / visual pop unless it is already cached somehow as PT Run would have fetch it
Then what about redirects like aka links? What is the behavior

I believe that latency would only be introduced on the first website visit through Powertoys Run. Simply cache it after the first request and forget about it. This could be run asynchronously and display a generic world wide web icon or the current default browser icon if a favicon could not be found. You could pre-cache common websites like www.google.com as well.
And redirect links could simply be followed till you reach the end destination, or you could just ignore links with that redirect elsewhere. Or you could have a common list of aka links, like youtu.be and display their favicons.