PowerShell Core Azure Function cant authenticate using Connect-PowerBIServiceAccount

Issue description
Upon trying to authenticate using MicrosoftPowerBIMgmt module it fails  (Could not load type 'System.Security.Cryptography.SHA256Cng' from assembly 'System.Core, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089'.)
Steps to reproduce the issue

Create Azure Function App Running Powershell Core 7
Change requirements.psd1 to add     'MicrosoftPowerBIMgmt' = '1.*'
Try to authenticate with Secret or Certificate using
Connect-PowerBIServiceAccount -ServicePrincipal -CertificateThumbprint "****" -ApplicationId $appid -Tenant $tenant

What's the expected result?
Connect to Powerbi Api
What's the actual result?
[Error]   ERROR: One or more errors occurred. (Could not load type 'System.Security.Cryptography.SHA256Cng' from assembly 'System.Core, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089'.)
Additional details / screenshot

Can you confirm which version of MicrosoftPowerBIMgmt you are using?

Hi Cattie. Latest

Looks like it's a common problem with PowerShell Core according to this thread https://github.com/PowerShell/PowerShell/issues/10473
However I don't think it's 100% the issue because MicrosoftPowerBIMgmt works well on desktop PowerShell 7.1.0 using service principal and auth by cert.

We don't have enough resource to dig into this issue with Azure function right now but will get back to you when we have an update.

Hi Cattie, i can confirm it works on my Windows 10 with PWSH 7 as well.
Can this be done on the module?
https://github.com/dotnet/runtime/issues/25044#issuecomment-520203003
Thanks

+1, works locally but not as Powershell 7 function.

Hi Cattie,  not sure if you saw my last comment,  would it be doable to do what is suggested on that comment?
"So what's the recommended path-forward here? Everyone that used this library rewrites their module to use SHA256.Create()?"
Thanks

I think so but we'll need to investigate. Some user has done workaround by spinning up the Windows PowerShell 5.1 executable to run Power BI Cmdlets

Thanks for that @CattieCat.
Do you have any references of people doing that on Azure Functions?? Couldn't find much about people invoking Powershell 5.1 via Core from inside of an Azure Function, its not ideal but it could be a temp fix untill the module gets updated.

Hello @CattieCat -- I am from the Functions team and I am looking into this issue. May I have your help to continue to investigate this further?
This is the location where the exception is being thrown https://github.com/microsoft/powerbi-powershell/blob/dev/src/Common/Common.Authentication/WindowsAuthenticationFactory.cs#L49

This issue does not repro locally (on PS 5.1 or PSCore 7); it only repros in the Azure Functions service. In the Functions service we run PowerShell 7.0.6. Please let me know if you have a time today or tomorrow to sync on this. Thank you.

cc: @AnatoliB @anirudhgarg

@schenardie : this is a relevant snippet for the workaround
$modulePath = $Env:APPSETTING_POWERBI_PROFILE_MODULE_PATH
Import-Module $modulePath -usewindowspowershell -warningaction silentlycontinue

...
Connect-PowerBIServiceAccount -Credential $credential
$token = Get-PowerBIAccessToken
....
$headers = @{ "Authorization" = $token["Authorization"] }

# Power BI API call
$apihost = $Env:APPSETTING_POWERBI_API_HOST
$uri = $apihost + "groups/$workspaceID/datasets/$datasetID/refreshes"

Invoke-RestMethod -Uri $uri -Headers $headers -Method Post -erroraction stop

it's a "horrible" workaround because Connect-PowerBIServiceAccount only works in PS5, hence the usewindowspowershell in the import.
But, any other call that effectively tries to reach the api errors out (probably because serialization of some rich object fails between PS7 and PS5).
One good thing about the whole ordeal is that you can at least pass around the token (which is a simple string) and then craft an invoke-restmethod "manually".
Kudos to @GabrielePagani for having the patience to ironing things out while finding all of those things by trial and error.
That being said, it'd be best that Connect-* works oob with PS7 even in Azure Functions so we can all benefit from the entire module ;-)

Following up with @Francisco-Gamino  offline.
Guys, notice ahead, there will probably not be fast fix for this because we are seriously lack of resource on this.

I do hope Microsoft can resolve the root cause so crazy workarounds aren't necessary. The workaround we used in Azure Functions is spinning up the Powershell 5.1 powershell.exe like this:

$ErrorActionPreference = "Stop";

try
{
	$UserName = (Get-AzKeyVaultSecret -vaultName $env:KeyVaultName -name $env:KeyVaultSecretNameAuditLogUsername).SecretValueText
	$PlainPassword = (Get-AzKeyVaultSecret -vaultName $env:KeyVaultName -name $env:KeyVaultSecretNameAuditLogPassword).SecretValueText
	$SecurePassword = $PlainPassword | ConvertTo-SecureString -AsPlainText -Force
	$UserCredential = New-Object System.Management.Automation.PSCredential -ArgumentList $UserName, $SecurePassword

	$env:UserName = $UserName;
	$env:PlainPassword = $PlainPassword;

    $script = {
        $ErrorActionPreference = "Stop";
        [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

        $UserName = $env:UserName;
        $PlainPassword = $env:PlainPassword;
        $SecurePassword = $PlainPassword | ConvertTo-SecureString -AsPlainText -Force
        $UserCredential = New-Object System.Management.Automation.PSCredential -ArgumentList $UserName, $SecurePassword

        Login-PowerBI -Credential $UserCredential -ServicePrincipal -Tenant $env:TenantId

        #do whatever like Get-PowerBIActivityEvent

    }

    #Login-PowerBI is failing with this error under PowerShell Core 7 so working around by running PowerShell 5: https://docs.microsoft.com/en-us/answers/questions/339901/34could-not-load-type-39systemsecuritycryptography.html
    $PowerShell64bitPath = Get-ChildItem -Path $Env:Windir\WinSxS | Where-Object {$_.FullName -match "amd64_microsoft-windows-powershell-exe"}
    $PowerShell64bitPath = Get-ChildItem -Path $PowerShell64bitPath.FullName -Filter PowerShell.exe | Select-Object -ExpandProperty FullName
    & $PowerShell64bitPath -NoLogo -NoProfile -WindowStyle Hidden -NonInteractive -Command $Script

}
catch {
    "Failed!"
    throw $_
}

We have verified that moving to MSAL with some additional changes solves the issue with Azure Functions. Plan to release the change ~1 month.

Thank you @CattieCat for your help to investigate this issue. I will share this information with our customers.

I do hope Microsoft can resolve the root cause so crazy workarounds aren't necessary. The workaround we used in Azure Functions is spinning up the Powershell 5.1 powershell.exe like this:

$ErrorActionPreference = "Stop";

try
{
    $UserName = (Get-AzKeyVaultSecret -vaultName $env:KeyVaultName -name $env:KeyVaultSecretNameAuditLogUsername).SecretValueText
    $PlainPassword = (Get-AzKeyVaultSecret -vaultName $env:KeyVaultName -name $env:KeyVaultSecretNameAuditLogPassword).SecretValueText
    $SecurePassword = $PlainPassword | ConvertTo-SecureString -AsPlainText -Force
    $UserCredential = New-Object System.Management.Automation.PSCredential -ArgumentList $UserName, $SecurePassword

    $env:UserName = $UserName;
    $env:PlainPassword = $PlainPassword;

    $script = {
        $ErrorActionPreference = "Stop";
        [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

        $UserName = $env:UserName;
        $PlainPassword = $env:PlainPassword;
        $SecurePassword = $PlainPassword | ConvertTo-SecureString -AsPlainText -Force
        $UserCredential = New-Object System.Management.Automation.PSCredential -ArgumentList $UserName, $SecurePassword

        Login-PowerBI -Credential $UserCredential -ServicePrincipal -Tenant $env:TenantId

        #do whatever like Get-PowerBIActivityEvent

        "Success" #don't do Write-Host "Success"

    }

    #Login-PowerBI is failing with this error under PowerShell Core 7 so working around by running PowerShell 5: https://docs.microsoft.com/en-us/answers/questions/339901/34could-not-load-type-39systemsecuritycryptography.html
    $PowerShell64bitPath = Get-ChildItem -Path $Env:Windir\WinSxS | Where-Object {$_.FullName -match "amd64_microsoft-windows-powershell-exe"}
    $PowerShell64bitPath = Get-ChildItem -Path $PowerShell64bitPath.FullName -Filter PowerShell.exe | Select-Object -ExpandProperty FullName
    & $PowerShell64bitPath -NoLogo -NoProfile -WindowStyle Hidden -NonInteractive -OutputFormat Text -Command $Script

}
catch {
    "Failed!"
    throw $_
}

I had a few Write-Host statements in there that seemed to cause problems locking stdout or something. See the Write-Host comment.

I am curious if Invoke-PowerBIRestMethod is a command that others have used in the $script portion of their code.  It has not run successfully for me with these workarounds.

Works for me @mattdavis20. I assume you did a Login-PowerBI in the script block?
Want to share your code so we can see if we spot a problem?

Below is the run.ps1 script.
using namespace System.Net
using namespace Microsoft.PowerShell.Utility

# Input bindings are passed in via param block.
param($Request, $TriggerMetadata)

# Write to the Azure Functions log stream.
Write-Host "PowerShell HTTP trigger function processed a request."

# $ErrorActionPreference = "Stop";

# Interact with query parameters or the body of the request.
$Azure_username = $Request.Body.Azure_username
$Azure_password = $Request.Body.Azure_password
$GatewayID = $Request.Body.GatewayID
$DatasourceID = $Request.Body.DatasourceID
$Modulus = $Request.Body.Modulus
$Exponent = $Request.Body.Exponent
$Update_user = $Request.Body.Update_user
$Update_password = $Request.Body.Update_password

$out = $null

try {
    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
    # $pbipath = 'D:\home\site\wwwroot\Modules\Microsoft.PowerBI.Api.3.18.1\lib\netstandard2.0\Microsoft.PowerBI.Api.dll'
    $pbipath = 'C:\Users\n1520720\OneDrive - Liberty Mutual\Codalak Project\Codalak Repositories\AzurePowerShellFunctions\CdlkSPIFunc\Modules\Microsoft.PowerBI.Api.3.18.1\lib\netstandard2.0\Microsoft.PowerBI.Api.dll'
    [System.Reflection.Assembly]::LoadFrom($pbipath)

    Import-Module MicrosoftPowerBIMgmt
    Import-Module MicrosoftPowerBIMgmt.Profile

    # Create a public key with the exponent and modulus from the gateway datasource information
    $gatewayPublicKey = @{
        exponent = $Exponent;
        modulus = $Modulus
    }

    # Encryption process which utilizes the PowerBI API
    $gatewayKeyObj = [Microsoft.PowerBI.Api.Models.GatewayPublicKey]::new($gatewayPublicKey.exponent, $gatewayPublicKey.modulus)
    $basicCreds = [Microsoft.PowerBI.Api.Models.Credentials.BasicCredentials]::new($Update_user, $Update_password)
    $credentialsEncryptor = [Microsoft.PowerBI.Api.Extensions.AsymmetricKeyEncryptor]::new($gatewayKeyObj)

    $credentialDetails = [Microsoft.PowerBI.Api.Models.CredentialDetails]::new(
            $basicCreds,
            [Microsoft.PowerBI.Api.Models.PrivacyLevel]::Private,
            [Microsoft.PowerBI.Api.Models.EncryptedConnection]::Encrypted,
            $credentialsEncryptor)

    # Construct the body for the request.
    $body = @{
        credentialDetails = @{
            credentialType      = "Basic";
            credentials         = $credentialDetails.Credentials;
            encryptedConnection = "Encrypted";
            encryptionAlgorithm = "RSA-OAEP";
            useEndUserOAuth2Credentials = "False"
            privacyLevel        = "Organizational";
            }
        }

    $relativeUrlPath = "gateways/" + $GatewayID + "/datasources/" + $DatasourceID

    $env:Azure_username = $Azure_username;
    $env:Azure_PlainPassword = $Azure_password;
    $env:PBIbody = $body;
    $env:InvokeURL = $relativeUrlPath;

    $Script = {

        $PbiBody = $env:PBIbody;
        $PBIInvokeURL = $env:InvokeURL;
        $azure_username = $env:Azure_username;
        $azure_PlainPassword = $env:Azure_PlainPassword;
        $azure_SecurePassword = $env:azure_plainPassword | ConvertTo-SecureString -AsPlainText -Force

        # Attempting to Connect to PowerBI
        $credential = New-Object System.Management.Automation.PSCredential -ArgumentList $azure_username, $azure_SecurePassword
        Login-PowerBI -Credential $credential

        # The error kicks back here:
        Invoke-PowerBIRestMethod -Url $PBIInvokeURL -Method PATCH -Verbose -Body ($PbiBody | ConvertTo-Json)

        Logout-PowerBI

    }

    #Login-PowerBI is failing with this error under PowerShell Core 7 so working around by running PowerShell 5: https://docs.microsoft.com/en-us/answers/questions/339901/34could-not-load-type-39systemsecuritycryptography.html
    $PowerShell64bitPath = Get-ChildItem -Path $Env:Windir\WinSxS | Where-Object {$_.FullName -match "amd64_microsoft-windows-powershell-exe"}
    $PowerShell64bitPath = Get-ChildItem -Path $PowerShell64bitPath.FullName -Filter PowerShell.exe | Select-Object -ExpandProperty FullName
    $out = & $PowerShell64bitPath -NoLogo -NoProfile -WindowStyle Hidden -NonInteractive -OutputFormat Text -Command $Script

    # Invoke-PowerBIRestMethod -Url $InvokeURL -Method PATCH -Verbose -Body ($PBIbody | ConvertTo-Json)

    Push-OutputBinding -Name Response -Value ([HttpResponseContext]@{
        StatusCode = [HttpStatusCode]::OK
        Body       = $out
    })

}
catch {
    Write-Verbose "Error Running Something"
    $ErrorMessage = $_.Exception.Message
    $body = ($ErrorMessage | ConvertTo-Json)
}

Is it the Invoke-PowerBIRestMethod inside or outside the script block which errors out? Are you sure?

I would try converting the body to JSON before you write it to the environment variable. And I would print it out inside the script block to ensure you for the whole contents of the body. Just a guess.

Good call on converting it to JSON prior to passing it into the script as that was the issue.  Thank you for the extra set of eyes!

So after testing out locally via VS Code, I can mock the function and hit the url (i.e. http://localhost:7071/api/CdlkSPIFunc) and it works as expected.  However, deploying to Azure and testing via the console, I get a 204 response.  My guess is that the response of the function is returning some null lines, which are immediately triggering the 204 response?  Any way I can silence null items in the response?

Hi @CattieCat
Is this issue on the line for fix anytime soon??
Thanks

It's an incompatibility issue between ADAL and powershell core. Not sure
why it doesn't repro on the local powershell core but on Azure Functions.
Previous messages in this thread should have reference to corresponding
discussions.
On Thu, Jun 10, 2021 at 12:50 PM khouloudbelhaj @.***>
wrote:

@CattieCat https://github.com/CattieCat Do you Have more details on the
subject please?
Currently I’m trying to migrate a power shell script that runs on sql
agent , retrieved the logs and displays them on power bi service.
I tried to run the PowerShell code with the runbooks, it had a runbook
issue when connecting to power BI. Then I have deciced to refer to the
function. I created a service principal that has access to APIs in power BI
SERVICE, the local connection run successfully but when I use the functions
it does not work.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/powerbi-powershell/issues/288#issuecomment-858986514,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABTKWKBVB7XJYMHYWB5AD33TSEJSDANCNFSM422PFT6Q
.

@CattieCat  : ok thank you Cattie, I will try using MSAL as an alternative.

@Francisco-Gamino  : Do you have any idea how much time it will take to be resolved ( the issue related to azure functions)

Hello @khouloudbelhaj -- @CattieCat is working on the fix, which is in the MicrosoftPowerBIMgmt module. The ETA is 6/18/21

@Francesco-Manni  Great News!

@Francisco-Gamino : How this update will be implement in azure functions and what will be the version used to call the module MicrosoftPowerBIMgmt
?

Thanks @CattieCat fixing this issue.
The fix is available at https://www.powershellgallery.com/packages/MicrosoftPowerBIMgmt/1.2.0. Please update your function app to use this module.
If you are uploading the MicrosoftPowerBIMgmt module with your function app content, download the latest version to your <functionAppRoot>\Modules\... folder and republish your function app. Alternatively, you can use Managed Dependencies to install the latest module. For more information, please see https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-powershell?tabs=portal#dependency-management.

That fix has put our Azure Function back on track. Thank you for addressing the issue!

we are experiencing similar issue with MSOL in azure functions. Works ok with PS Core 7, but due to a de-serialization issue there, we need to move this to run as per below. I keep getting
Program 'powershell.exe' failed to run: StandardOutputEncoding is only supported when standard output is redirected.
and cant figure out where the bug is.
script attached for reference. would appreciate is someone can provide some resolution.
`using namespace System.Net
Input bindings are passed in via param block.
param($Request, $TriggerMetadata)
Write to the Azure Functions log stream.
Write-Host "PowerShell HTTP trigger function processed a request."
Script to run with PowerShell.exe
$z=@([System.Web.HttpUtility]::UrlDecode($Request.Query.Delegatedadminid),[System.Web.HttpUtility]::UrlDecode($Request.Query.refreshToken),[System.Web.HttpUtility]::UrlDecode($Request.Query.TeantWithLicenses),[System.Web.HttpUtility]::UrlDecode($Request.Query.Tenants),[System.Web.HttpUtility]::UrlDecode($Request.Query.FilterDetails),[System.Web.HttpUtility]::UrlDecode($Request.Query.userid),[System.Web.HttpUtility]::UrlDecode($Request.Query.client_id),[System.Web.HttpUtility]::UrlDecode($Request.Query.client_secret),[System.Web.HttpUtility]::UrlDecode($Request.Query.switch_exclude))
$Script = {
param (
[string]$a,[string]$b,[string]$c,[string]$d,[string]$e,[string]$f,[string]$g,[string]$h,[string]$i
)
Import-Module MsOnline
Import-Module PartnerCenter
$_Delegatedadminid = $a
$_refreshToken = $b
$_TeantWithLicenses = $c
$_Tenants = $d
$_FilterDetails = $e
$_userid = $f
$_client_id = $g
$_client_secret = $h
$_switch_exclude = $i

#!/bin/sh
$Delegatedadminid = $_Delegatedadminid
$refreshToken = $_refreshToken
$TeantWithLicenses = $_TeantWithLicenses | ConvertFrom-Json
$Tenants = $_Tenants
$FilterDetails = $_FilterDetails | ConvertFrom-Json
$userid = $_userid
$client_id = $_client_id
$client_secret = $_client_secret
$switch_exclude = $_switch_exclude
$secpasswd = ConvertTo-SecureString $client_secret -AsPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential ($client_id, $secpasswd)

# $refreshToken = <refreshtoken>
#Get access tokens from refreshtoken
#$token = New-PartnerAccessToken -ApplicationId $client_Id -Credential $credential -RefreshToken $refreshToken -Scopes 'https://api.partnercenter.microsoft.com/user_impersonation' -ServicePrincipal -Tenant $Delegatedadminid
$aadGraphToken = New-PartnerAccessToken -ApplicationId $client_Id -Credential $credential -RefreshToken $refreshToken -Scopes 'https://graph.windows.net/.default' -ServicePrincipal -Tenant $Delegatedadminid
$graphToken = New-PartnerAccessToken -ApplicationId $client_Id -Credential $credential -RefreshToken $refreshToken -Scopes 'https://graph.microsoft.com/.default' -ServicePrincipal -Tenant $Delegatedadminid

Connect-MsolService -AdGraphAccessToken $aadGraphToken.AccessToken -MsGraphAccessToken $graphToken.AccessToken
$UserNameResults = @()

foreach($tenantID in $Tenants){
    $licenseNames = $TeantWithLicenses.$tenantID
    foreach($licenseName in $licenseNames){
        $getTenantID = $tenantID.split('_EXPLODE_',[System.StringSplitOptions]::RemoveEmptyEntries)
        $getUserTenantID = $getTenantID[0]
        $FilterID = $getTenantID[1]

        IF($FilterDetails.$tenantID){
            $office = $FilterDetails.$tenantID.office_filter
            $country = $FilterDetails.$tenantID.country_filter
            $state = $FilterDetails.$tenantID.state_filter
            $city = $FilterDetails.$tenantID.city_filter

            IF(-not ($FilterDetails.$tenantID.excludeLicense -contains $licenseName)){
                If ($office -and $country -and $city -and $state){
                    If($switch_exclude -eq 1){
                        $UserNames = Get-MsolUser -TenantId $getUserTenantID -All | Where-Object {($_.licenses).AccountSkuId -like "*$($licenseName)" -and $_.office -ne $office -and $_.country -ne $country -and $_.city -ne $city -and $_.state -ne $state} | Sort-Object DisplayName
                    }Else{
                            $UserNames = Get-MsolUser -TenantId $getUserTenantID -All | Where-Object {($_.licenses).AccountSkuId -like "*$($licenseName)" -and $_.office -eq $office -and $_.country -eq $country -and $_.city -eq $city -and $_.state -eq $state} | Sort-Object DisplayName
                    }

                }ElseIf ($office -and $country -and $city){
                    If($switch_exclude -eq 1){
                        $UserNames = Get-MsolUser -TenantId $getUserTenantID -All | Where-Object {($_.licenses).AccountSkuId -like "*$($licenseName)" -and $_.office -ne $office -and $_.country -ne $country -and $_.city -ne $city} | Sort-Object DisplayName
                    }Else{
                        $UserNames = Get-MsolUser -TenantId $getUserTenantID -All | Where-Object {($_.licenses).AccountSkuId -like "*$($licenseName)" -and $_.office -eq $office -and $_.country -eq $country -and $_.city -eq $city} | Sort-Object DisplayName
                    }

                }ElseIf ($office -and $country -and $state){
                    If($switch_exclude -eq 1){
                        $UserNames = Get-MsolUser -TenantId $getUserTenantID -All | Where-Object {($_.licenses).AccountSkuId -like "*$($licenseName)" -and $_.office -ne $office -and $_.country -ne $country -and $_.state -ne $state} | Sort-Object DisplayName
                    }Else{
                        $UserNames = Get-MsolUser -TenantId $getUserTenantID -All | Where-Object {($_.licenses).AccountSkuId -like "*$($licenseName)" -and $_.office -eq $office -and $_.country -eq $country -and $_.state -eq $state} | Sort-Object DisplayName
                    }

                }ElseIf ($office -and $city -and $state){
                    If($switch_exclude -eq 1){
                        $UserNames = Get-MsolUser -TenantId $getUserTenantID -All | Where-Object {($_.licenses).AccountSkuId -like "*$($licenseName)" -and $_.office -ne $office -and $_.city -ne $city -and $_.state -ne $state} | Sort-Object DisplayName
                    }Else{
                        $UserNames = Get-MsolUser -TenantId $getUserTenantID -All | Where-Object {($_.licenses).AccountSkuId -like "*$($licenseName)" -and $_.office -eq $office -and $_.city -eq $city -and $_.state -eq $state} | Sort-Object DisplayName
                    }

                }ElseIf ($country -and $city -and $state){
                    If($switch_exclude -eq 1){
                        $UserNames = Get-MsolUser -TenantId $getUserTenantID -All | Where-Object {($_.licenses).AccountSkuId -like "*$($licenseName)" -and $_.country -ne $country -and $_.city -ne $city -and $_.state -ne $state} | Sort-Object DisplayName
                    }Else{
                        $UserNames = Get-MsolUser -TenantId $getUserTenantID -All | Where-Object {($_.licenses).AccountSkuId -like "*$($licenseName)" -and $_.country -eq $country -and $_.city -eq $city -and $_.state -eq $state} | Sort-Object DisplayName
                    }

                }ElseIf ($office -and $country){
                    If($switch_exclude -eq 1){
                        $UserNames = Get-MsolUser -TenantId $getUserTenantID -All | Where-Object {($_.licenses).AccountSkuId -like "*$($licenseName)" -and $_.office -ne $office -and $_.country -ne $country} | Sort-Object DisplayName
                    }Else{
                        $UserNames = Get-MsolUser -TenantId $getUserTenantID -All | Where-Object {($_.licenses).AccountSkuId -like "*$($licenseName)" -and $_.office -eq $office -and $_.country -eq $country} | Sort-Object DisplayName
                    }

                }ElseIf ($office -and $city){
                    If($switch_exclude -eq 1){
                        $UserNames = Get-MsolUser -TenantId $getUserTenantID -All | Where-Object {($_.licenses).AccountSkuId -like "*$($licenseName)" -and $_.office -ne $office -and $_.city -ne $city} | Sort-Object DisplayName
                    }Else{
                        $UserNames = Get-MsolUser -TenantId $getUserTenantID -All | Where-Object {($_.licenses).AccountSkuId -like "*$($licenseName)" -and $_.office -eq $office -and $_.city -eq $city} | Sort-Object DisplayName
                    }

                }ElseIf ($office -and $state){
                    If($switch_exclude -eq 1){
                        $UserNames = Get-MsolUser -TenantId $getUserTenantID -All | Where-Object {($_.licenses).AccountSkuId -like "*$($licenseName)" -and $_.office -ne $office -and $_.state -ne $state} | Sort-Object DisplayName
                    }Else{
                        $UserNames = Get-MsolUser -TenantId $getUserTenantID -All | Where-Object {($_.licenses).AccountSkuId -like "*$($licenseName)" -and $_.office -eq $office -and $_.state -eq $state} | Sort-Object DisplayName
                    }

                }ElseIf ($city -and $state){
                    If($switch_exclude -eq 1){
                        $UserNames = Get-MsolUser -TenantId $getUserTenantID -All | Where-Object {($_.licenses).AccountSkuId -like "*$($licenseName)" -and $_.city -ne $city -and $_.state -ne $state} | Sort-Object DisplayName
                    }Else{
                        $UserNames = Get-MsolUser -TenantId $getUserTenantID -All | Where-Object {($_.licenses).AccountSkuId -like "*$($licenseName)" -and $_.city -eq $city -and $_.state -eq $state} | Sort-Object DisplayName
                    }

                }ElseIf ($country -and $state){
                    If($switch_exclude -eq 1){
                        $UserNames = Get-MsolUser -TenantId $getUserTenantID -All | Where-Object {($_.licenses).AccountSkuId -like "*$($licenseName)" -and $_.country -ne $country -and $_.state -ne $state} | Sort-Object DisplayName
                    }Else{
                        $UserNames = Get-MsolUser -TenantId $getUserTenantID -All | Where-Object {($_.licenses).AccountSkuId -like "*$($licenseName)" -and $_.country -eq $country -and $_.state -eq $state} | Sort-Object DisplayName
                    }

                }ElseIf ($country -and $city){
                    If($switch_exclude -eq 1){
                        $UserNames = Get-MsolUser -TenantId $getUserTenantID -All | Where-Object {($_.licenses).AccountSkuId -like "*$($licenseName)" -and $_.country -ne $country -and $_.city -ne $city} | Sort-Object DisplayName
                    }Else{
                        $UserNames = Get-MsolUser -TenantId $getUserTenantID -All | Where-Object {($_.licenses).AccountSkuId -like "*$($licenseName)" -and $_.country -eq $country -and $_.city -eq $city} | Sort-Object DisplayName
                    }

                }ElseIf ($office){
                    If($switch_exclude -eq 1){
                        $UserNames = Get-MsolUser -TenantId $getUserTenantID -All | Where-Object {($_.licenses).AccountSkuId -like "*$($licenseName)" -and $_.office -ne $office} | Sort-Object DisplayName
                    }Else{
                        $UserNames = Get-MsolUser -TenantId $getUserTenantID -All | Where-Object {($_.licenses).AccountSkuId -like "*$($licenseName)" -and $_.office -eq $office} | Sort-Object DisplayName
                    }

                }ElseIf ($country){
                    If($switch_exclude -eq 1){
                        $UserNames = Get-MsolUser -TenantId $getUserTenantID -All | Where-Object {($_.licenses).AccountSkuId -like "*$($licenseName)" -and $_.country -ne $country} | Sort-Object DisplayName
                    }Else{
                        $UserNames = Get-MsolUser -TenantId $getUserTenantID -All | Where-Object {($_.licenses).AccountSkuId -like "*$($licenseName)" -and $_.country -eq $country} | Sort-Object DisplayName
                    }
                }
                ElseIf ($city){
                    If($switch_exclude -eq 1){
                        $UserNames = Get-MsolUser -TenantId $getUserTenantID -All | Where-Object {($_.licenses).AccountSkuId -like "*$($licenseName)" -and $_.city -ne $city} | Sort-Object DisplayName
                    }Else{
                        $UserNames = Get-MsolUser -TenantId $getUserTenantID -All | Where-Object {($_.licenses).AccountSkuId -like "*$($licenseName)" -and $_.city -eq $city} | Sort-Object DisplayName
                    }
                }
                ElseIf ($state){
                    If($switch_exclude -eq 1){
                        $UserNames = Get-MsolUser -TenantId $getUserTenantID -All | Where-Object {($_.licenses).AccountSkuId -like "*$($licenseName)" -and $_.state -ne $state} | Sort-Object DisplayName
                    }Else{
                        $UserNames = Get-MsolUser -TenantId $getUserTenantID -All | Where-Object {($_.licenses).AccountSkuId -like "*$($licenseName)" -and $_.state -eq $state} | Sort-Object DisplayName
                    }
                }
                }
            }Else{
            $UserNames = Get-MsolUser -TenantId $getUserTenantID -ALL | Where-Object {($_.licenses).AccountSkuId -ilike "*$($licenseName)"} | Sort-Object DisplayName
        }
        # echo $UserNames
        foreach ($licenseUserName in $UserNames){
            $UserNameProperty = @{
                userID = $userid
                UserPrincipalName = $licenseUserName.UserPrincipalName
                DisplayName = $licenseUserName.DisplayName
                isLicensed = $licenseUserName.isLicensed
                LicenseName = $licenseName
                TenantID = $getUserTenantID
                FilterID = $FilterID
            }
            $UserNameResults += New-Object psobject -Property $UserNameProperty
        }
    }
}
$UserNameResults

}
Run using PowerShell.exe instead of using PowerShell 6
$64bitPowerShellPath = Get-ChildItem -Path $Env:Windir\WinSxS -Filter PowerShell.exe -Recurse -ErrorAction SilentlyContinue | Where-Object {$_.FullName -match "amd64"}
$env:64bitPowerShellPath=$64bitPowerShellPath.VersionInfo.FileName
$scriptResult = &$env:64bitPowerShellPath -WindowStyle Hidden -NonInteractive -OutputFormat Text -Command $Script -args $z
Associate values to output bindings by calling 'Push-OutputBinding'.
Push-OutputBinding -Name Response -Value ([HttpResponseContext]@{
headers = @{'content-type'='application\json'}
StatusCode = [HttpStatusCode]::OK
Body = $scriptResult | Select-Object userID,UserPrincipalName,DisplayName,isLicensed,LicenseName,TenantID,FilterID | ConvertTo-Json
})`

Hello @manipuraco -- could you please open an issue at https://github.com/Azure/azure-functions-powershell-worker ? Thanks.

@CattieCat We are still seeing this error on "Login-PowerBI -Credential $UserCredential" when the user is an on-prem AD user which has been synced to the cloud running in PowerShell Core 7. The error is below. So it appears that somewhere in some branch of the code is still trying to use SHA256Cng which isn't supported in .NET core. I'm not sure if it's the Power BI PowerShell cmdlets or in some library you don't own. This it tested with the latest Power BI PowerShell cmdlets v1.2.1077.0.
We are not seeing this error using a cloud-only user account.
One or more errors occurred. (Error Acquiring Token: Could not load type 'System.Security.Cryptography.SHA256Cng' from assembly 'System.Core, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089'.) Exception : Type : System.AggregateException InnerExceptions : Type : System.Security.Authentication.AuthenticationException TargetSite : Name : MoveNext DeclaringType : Microsoft.PowerBI.Common.Authentication.WindowsAuthenticationFactory+d__3, Microsoft.PowerBI.Common.Authentication, Version=1.2.1077.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 MemberType : Method Module : Microsoft.PowerBI.Common.Authentication.dll StackTrace : at Microsoft.PowerBI.Common.Authentication.WindowsAuthenticationFactory.HandleAuthentication(IPowerBIEnvironment environment, IPowerBILogger logger, IPowerBISettings settings, IDictionary2 queryParameters, String userName, SecureString password) at Microsoft.PowerBI.Common.Authentication.WindowsAuthenticationFactory.Authenticate(IPowerBIEnvironment environment, IPowerBILogger logger, IPowerBISettings settings, String userName, SecureString password) at Microsoft.PowerBI.Commands.Common.AuthenticationFactorySelector.Authenticate(IPowerBIEnvironment environment, IPowerBILogger logger, IPowerBISettings settings, String userName, SecureString password) Message : Error Acquiring Token: Could not load type 'System.Security.Cryptography.SHA256Cng' from assembly 'System.Core, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089'. Source : Microsoft.PowerBI.Common.Authentication HResult : -2146233087 Message : One or more errors occurred. (Error Acquiring Token: Could not load type 'System.Security.Cryptography.SHA256Cng' from assembly 'System.Core, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089'.) TargetSite : Name : ThrowIfExceptional DeclaringType : System.Threading.Tasks.Task MemberType : Method Module : System.Private.CoreLib.dll StackTrace : at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task1.get_Result() at Microsoft.PowerBI.Commands.Profile.ConnectPowerBIServiceAccount.ExecuteCmdlet() at Microsoft.PowerBI.Commands.Common.PowerBICmdlet.ProcessRecord() InnerException : Type : System.Security.Authentication.AuthenticationException TargetSite : Name : MoveNext DeclaringType : Microsoft.PowerBI.Common.Authentication.WindowsAuthenticationFactory+<HandleAuthentication>d__3, Microsoft.PowerBI.Common.Authentication, Version=1.2.1077.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 MemberType : Method Module : Microsoft.PowerBI.Common.Authentication.dll StackTrace : at Microsoft.PowerBI.Common.Authentication.WindowsAuthenticationFactory.HandleAuthentication(IPowerBIEnvironment environment, IPowerBILogger logger, IPowerBISettings settings, IDictionary2 queryParameters, String userName, SecureString password) at Microsoft.PowerBI.Common.Authentication.WindowsAuthenticationFactory.Authenticate(IPowerBIEnvironment environment, IPowerBILogger logger, IPowerBISettings settings, String userName, SecureString password) at Microsoft.PowerBI.Commands.Common.AuthenticationFactorySelector.Authenticate(IPowerBIEnvironment environment, IPowerBILogger logger, IPowerBISettings settings, String userName, SecureString password) Message : Error Acquiring Token: Could not load type 'System.Security.Cryptography.SHA256Cng' from assembly 'System.Core, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089'. Source : Microsoft.PowerBI.Common.Authentication HResult : -2146233087 Source : System.Private.CoreLib HResult : -2146233088 TargetObject : Microsoft.PowerBI.Commands.Profile.ConnectPowerBIServiceAccount CategoryInfo : WriteError: (Microsoft.PowerBI.C…werBIServiceAccount:ConnectPowerBIServiceAccount) [Connect-PowerBIServiceAccount], AggregateException FullyQualifiedErrorId : One or more errors occurred. (Error Acquiring Token: Could not load type 'System.Security.Cryptography.SHA256Cng' from assembly 'System.Core, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089'.),Microsoft.PowerBI.Commands.Profile.ConnectPowerBIServiceAccount InvocationInfo : MyCommand : Connect-PowerBIServiceAccount

Thanks for the detail @furmangg. I don't have a clue yet but follow up with other teams to see what could be the difference. Can you help to describe how you run login with on-prem user? Is it local or in Azure Automation?

@CattieCat logging on with an on prem user synced to the cloud looks the same in PowerShell. “ Login-PowerBI -Credential $UserCredential” The difference under the covers is that it authenticates with ADFS or other federation instead of just AAD. Reach out if you have other questions or can’t reproduce.
I did confirm that no MFA is enabled for that on prem user.
This isn’t blocking us since we switched to a cloud only user. But I wanted to report.

HI @CattieCat,
starting from few days ago, I'm still facing the issue on "Connect-PowerBIServiceAccount -Credential $credential" after it was fixed on Jun 18, 2021, as Francisco-Gamino commented, and it was working well.
The error message is still "One or more errors occurred. (Error Acquiring Token:Could not load type 'System.Security.Cryptography.SHA256Cng' from assembly 'System.Core, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089'.)"
Something changed?
Thanks in advance.

Hi @CattieCat +1 for getting below error.
PowerBi Module version: 1.2.1077.0
AZ function Runtime version: ~3
PowerShell Core Version: 7.0
Platform: 32 Bit
The error message is: One or more errors occurred. (Error Acquiring Token:Could not load type 'System.Security.Cryptography.SHA256Cng'


Not AppEngine/Java7-compatible when creating new threads

I found two places where Census creates its own thread, not sure if there is more:

io.opencensus.impl.internal.DisruptorEventQueue.java
io.opencensus.implcore.trace.export.SpanExporterImpl

When running in restricted AppEngine (Java 7), gRPC creates the thread through MoreExecutors.platformThreadFactory(). As Census is used in gRPC and expected to be used in AppEngine, it should probably do the same.
/cc @ejona86, @carl-mastrangelo

Note that in App engine 8, regular thread creation is fine, and probably should be preferred.


test running before classfiles flushed to disk

One of our tests https://github.com/ensime/ensime-server/blob/master/src/test/scala/org/ensime/indexer/SearchServiceSpec.scala
fails about 10% of the time when typing test in sbt whereas it always succeeds when doing a two phase test:compile, then test.
This test is relying on the .class files of the project being flushed to disk before running (it's indexing them to test the search functionality). I strongly suspect that classes are being written AFTER the tests start running.
Creating a minimal working example is quite tough because it is more likely for larger projects, but it would looks something like this:

have a big (single module) project with lots of sources and tests
in one of the tests, first thing, touch a file
sbt test from clean
do a find -newer FILE to show that .class files have been written out AFTER the tests started.

Does this sound possible?

this seems to have gone away. Weird.

Is this a mutli-project build and were some classes being read from other modules?

nope, one module.


updated infosheet to display the lablel value on the infosheet when a…

updated infosheet to display the label info if one exists.

Your review app has been deployed and is available at 'http://<IP_ADDRESS>:80'.Learn More about how to test and provide feedback for the app.

Your review app has been deployed and is available at 'http://<IP_ADDRESS>:80'.Learn More about how to test and provide feedback for the app.


Rule: use-if and use-contains

Recommend the use of if and contains when available as capabilities.
Some fixes to tests where we didn't live up to this standard ourselves. Great!
(Note that this is targeting the if-empty-object branch as that contained a few improvements that I wanted here, so that should be merged before this PR)
Fixes #468

@charlieegan3 import rego.v1 has some issues in current version of OPA and is not included in the capabilities. That'll be fixed in v0.59.0, and then we need to think about what to recommend and at what time. But for now these can be unconditionally recommended.


Number Formatter should use D3 time formatting

https://github.com/alexandersimoes/d3plus/blob/master/src/number/format.js

Doesn't need to happen anymore.


ItemInstantiator not working

A very simple example I cooked up to figure out how to use this plugin. The item instantiator is not working at all. The second screenshot shows the running project with nothing generated.
In my other project, I somehow got it to work, but when running it, I get a crash whenever I click on an item:

You don't seem to have a GrabbedItemStackView, it, as well as a tooltip, are needed to grab items and you can add it from addons/wyvernbox_prefabs. It's not clear, but I'll make it so it doesn't crash and gives a notification when none are on the scene.
Also, the instantiator does work but only populates if the inv is hidden and shown again. I'll fix that too

The crash should now be fixed f3111a73b320923b7cf1fc1738707043b9d0d705, but leaving this open if bugs arise, and as reminder to add the notification.

That was a super quick fix, awesome!
However, in my other project, I'm now facing a different error:
E 0:00:01:0706   tooltip.gd:63 @ display_empty(): Node not found: "%Title/.." (relative to "/root/testworld/Human/PlayerUI/InventoryMenu/PlayerInventory/Tooltip").
  <C++ Error>    Method/function failed. Returning: nullptr
  <C++ Source>   scene/main/node.cpp:1620 @ get_node()
  <Stack Trace>  tooltip.gd:63 @ display_empty()
                 tooltip.gd:84 @ display_item()
                 item_stack_view.gd:33 @ _on_mouse_entered()

This is the scene layout:

I have an inventory view (both equipmentInventory and Inventory), and a GrabbedItemStackView (GrabbedItemStack2), and a tooltip (Tooltip).
Not sure if there's some specific structure that I'm missing.

Yeah, there's a structure - but all the needed nodes are in the prefabs inside addons/wyvernbox_prefabs, just drag them to the scene.
But I'll make that more streamlined too.

I made it so you no longer need the prefabs, just add a node of the class and the prefabs are instantiated instead.
Enjoy!


Allow tslint to run with codelizer without node_modules in the root

Like most of the other TSLint plugins it would be great to be able to run tslint with codelizer without the required node_modules directory. Ideally using codelizer from the path.
This PR exports the rules, allowing to use the extends field in tslint.json. This is also similar to the way ESLint plugins work.
As an example you can check https://github.com/buzinas/tslint-eslint-rules/blob/master/index.js
This PR still allows for the previous way without breaking compatibility.

@mgechev I think I might have forgotten something. From what I saw seems like some files are removed. Is index.js going to be released to npm?

Yes, index.js is pointed by main. What did you forget?

I was not sure if you were excluding some files from the project at publish time. In the local codelyzer folder for older versions I only saw JS files in the root I was not sure if I needed to add this new file somewhere for it to be included at publish time.


remove "Start watching journald" to avoid plugin log spam

atm we see lots of this, would be nice to not have it 🤷
Start logs from plugin  ...
I1019 21:25:24.665373     571 log_watcher.go:80] Start watching journald","pattern":"plugin-logs"}
End logs from plugin ...

(if it's not there then the output is empty and the "logs from plugin" goes away)
I know this can be avoided by setting log-level to <=2 but it's pretty verbose even for info level "hey this plugin did nothing" 🤷

I know this can be avoided by setting log-level to <=2 but it's pretty verbose even for info level

Makes sense. Thank you for the PR

/remove-lifecycle stale
/ok-to-test
/lgtm

rebased to get tests passing, needs another lgtm

/lgtm


Create Reverse.php

Please pull it. thank you

Hi @alifgithub,
Please could you explain what functionality or change this provides? Or the intent of the inclusion?

Looks to be adding a reverse shell which would be a massive security risk. Would advise not accepting this pull request

Thanks @Cave-Johnson,
Don't worry, I was aware.  Based upon the original message of the PR I'm thinking this was malicious, just with the subtlety of king kong fighting godzilla. I'll just go ahead and close this off.


UofT-DSI | Python - Assignment 1

What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)
Created code to check if two words are anagrams of each other.
What did you learn from the changes you have made?
Learned how to created functions and methods.
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
NA
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
NA
How were these changes tested?
There were sample inputs/words provided and the expected outcomes. My tests results matched those expected outcomes.
A reference to a related issue in your repository (if applicable)
NA
Checklist

[x] I can confirm that my changes are working as intended

Noted, Emma. Will do that in next assignment.

Nope, please fix this error in this assignment so i can pass you.

Done. I have made the changes. I hade to do it in GutHub editor though (not through terminal) as I don't have my personal laptop with me right now.


Test Results Publish - python script updates, making junit optional

For Publishing test results, passing junit xml path as an argument through client.yml
Updates to client.yml to fix the OS name for publishing test results

@Azure/azure-sdk-eng

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Codecov Report

Merging #4392 into master will decrease coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #4392      +/-   ##
==========================================
- Coverage   53.38%   53.38%   -0.01%
==========================================
  Files       10464    10460       -4
  Lines      219471   219467       -4
==========================================
- Hits       117158   117154       -4
  Misses     102313   102313

Impacted Files
Coverage Δ

...zure-mgmt-cognitiveservices/azure/mgmt/__init__.py

...bsearch/azure/cognitiveservices/search/__init__.py

...on-face/azure/cognitiveservices/vision/__init__.py

azure-common/azure/__init__.py

...arch-websearch/azure/cognitiveservices/__init__.py

azure-keyvault/azure/__init__.py
100% <0%> (ø)

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 f68c120...1080aca. Read the comment docs.


INDEX .HTML not responding in VS code.

Type: Bug
PLEASE HELP ME ...my code is stuck i cant do anything ..nothing is working ,i cant write ,i cant delate nothing 0 ...is not responding ..totally not responding ..this happen on onother file to and i had to delate it and start all over ,and now happen again ..not responding at all ..
please help me ..

Does it reproduce with extension disabled?

Hello good people ..
I am not sure what I am doing wrong ..
I download vscode and then I download meny extensions ..
and i started to write simple code in html ..and got stuck ..
and then  was stuck for a day and i just pressed 20 times and started to
work ...
now i started to do css to that html and i link it and it connect and show
me on google chrome ...BUT ..i cant put any background or any images or
even do border around words ..i am not sure is it possible that extensions
blocking me somehow ?
I am totally new to it ..
i just took html on codecademy and now i bought a few courses html and css
on udemy and i am trying to learn ..
I am doing step by step as a guy in the udemy course ..and for him it is
working and for me it is not ..
i can't figure out what i am doing wrong ..every step i am doing as him
..and is stuck somehow  just let me write text nothing else now ...
what to do ? ...
So is possible that extensions are blocking me ? i dowload 36 extensions
for html css javascript and github and some other dracula colorise etc ...
Please help,thank you so much  ..what to do ?  So sorry and thank you so
much ..I am totally new to this ,but i love it so much and so much wish to
learn it ...
On Mon, Nov 14, 2022 at 5:20 AM Martin Aeschlimann @.***>
wrote:

Does it reproduce with extension disabled?
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/vscode/issues/166204#issuecomment-1313688151,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A3EACFE3B4CF37SCP3UQDF3WII4CXANCNFSM6AAAAAAR6PHPC4
.
You are receiving this because you authored the thread.Message ID:
@.***>

Hello good people ..
I am not sure what I am doing wrong ..
I download vscode and then I download meny extensions ..
and i started to write simple code in html ..and got stuck ..
and then  was stuck for a day and i just pressed 20 times and started to
work ...
now i started to do css to that html and i link it and it connect and show
me on google chrome ...BUT ..i cant put any background or any images or
even do border around words ..i am not sure is it possible that extensions
blocking me somehow ?
I am totally new to it ..
i just took html on codecademy and now i bought a few courses html and css
on udemy and i am trying to learn ..
I am doing step by step as a guy in the udemy course ..and for him it is
working and for me it is not ..
i can't figure out what i am doing wrong ..every step i am doing as him
..and is stuck somehow  just let me write text nothing else now ...
what to do ? ...
So is possible that extensions are blocking me ? i dowload 36 extensions
for html css javascript and github and some other dracula colorise etc ...
On Sat, Nov 12, 2022 at 8:34 PM gamersindo1223 @.***>
wrote:

When is this happening, is thsi happening after you do something major?,
have you tried uninstalling and reinstall vscode?
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/vscode/issues/166204#issuecomment-1312637337,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A3EACFGWUHY3YJPEEHI5HELWIBVUTANCNFSM6AAAAAAR6PHPC4
.
You are receiving this because you authored the thread.Message ID:
@.***>

Sorry ..html is stuck again ..
So should I disable all extensions ?
On Mon, Nov 14, 2022 at 9:18 PM margaret najder @.***>
wrote:

Hello good people ..
I am not sure what I am doing wrong ..
I download vscode and then I download meny extensions ..
and i started to write simple code in html ..and got stuck ..
and then  was stuck for a day and i just pressed 20 times and started to
work ...
now i started to do css to that html and i link it and it connect and show
me on google chrome ...BUT ..i cant put any background or any images or
even do border around words ..i am not sure is it possible that extensions
blocking me somehow ?
I am totally new to it ..
i just took html on codecademy and now i bought a few courses html and css
on udemy and i am trying to learn ..
I am doing step by step as a guy in the udemy course ..and for him it is
working and for me it is not ..
i can't figure out what i am doing wrong ..every step i am doing as him
..and is stuck somehow  just let me write text nothing else now ...
what to do ? ...
So is possible that extensions are blocking me ? i dowload 36 extensions
for html css javascript and github and some other dracula colorise etc ...
On Sat, Nov 12, 2022 at 8:34 PM gamersindo1223 @.***>
wrote:

When is this happening, is thsi happening after you do something major?,
have you tried uninstalling and reinstall vscode?
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/vscode/issues/166204#issuecomment-1312637337,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A3EACFGWUHY3YJPEEHI5HELWIBVUTANCNFSM6AAAAAAR6PHPC4
.
You are receiving this because you authored the thread.Message ID:
@.***>

Yes, highly likely related to an installed extension. Does it reproduce with extensions disabled?
Do you have specific steps that reproduce the problem?

Somehow now Html work and i even post image ..but css doesn't work at all ..
I copy and paste code fromW3school to be sure that i dont do any mistake
..and even dont link ..
i copy and past link, made file the same name and copy code from that
w3school exactly so everything is right ..and css even dont link to html
and is not making any changes ...before at least color and size was working
..now after i delete extension is even worst dont link at all .
So I am getting crazy ...I spent 4 days just trying to fix the problem and
now it is just a different  problem but still not working ..
html sims to work ..but now css dont work at all ..not even a link . i
totally dont know what to do ..i ' m completely lost ..
Please tell me what i am doing wrong ...i so much wish this could work and
i start to code ...i am totally stuck now ..
I bought all this different courses  to learn all full stack developer
languages .But I am stuck on the simplest one ...
On Wed, Nov 16, 2022 at 6:19 PM margaret najder @.***>
wrote:

Hello .
I deleted all the extensions and still did not work ..I put everything to
trash and then i downloaded again vs code and is still doing the same thing
..
Not show me any images or borders or backgrounds ..
i can only change the color of text in css and that's all ..nothing else
is working ..
When I was downloading it show me a message that this is the version from
22 october 2022. Maybe it has some bugs or something ..
i dont know what to do ..nothing working ..
it not even wanted to open in browser ..i had to download extension to see
in browser so now is even worst than it was ...
Not sure what to do ....not sure ..i am totally lost ..maybe i should
change editor for sublime or something ..but i really like vscode ..
Why is it not working ? .. PLEASE help ..what else i can do ?
On Wed, Nov 16, 2022 at 3:56 AM Martin Aeschlimann <
@.***> wrote:

Yes, highly likely related to an installed extension. Does it reproduce
with extensions disabled?
Do you have specific steps that reproduce the problem?
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/vscode/issues/166204#issuecomment-1316885969,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A3EACFFI6EEAKZCLOC5C2T3WITDXXANCNFSM6AAAAAAR6PHPC4
.
You are receiving this because you authored the thread.Message ID:
@.***>

You have to provide a small HTML sample and describe the steps of what you are doing and seeing. Describe what's wrong with VS Code. Add screenshots.

 IS WORKING NOW  !
I canceled all extensions and downloaded  vc code again and now it's all
working ,css too!!!!
Everything works ..I am so happy .. I stayed until 2.18 am  and just 10
minutes ago started to work properly .
So now I can finally learn ..
O thank you so much .So much ..
thank you ..so so good to know that someone cared and tried to help when i
was totally lost ..
Thanks again ..I very very very much appreciate
On Thu, Nov 17, 2022 at 12:32 AM Martin Aeschlimann <
@.***> wrote:

You have to provide a small HTML sample and describe the steps of what you
are doing and seeing. Describe what's wrong with VS Code. Add screenshots.
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/vscode/issues/166204#issuecomment-1318270040,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A3EACFE2E6VBWIDSCHVTGHDWIXUSTANCNFSM6AAAAAAR6PHPC4
.
You are receiving this because you authored the thread.Message ID:
@.***>

I'm glad you got it working. Closing the issue then.


Add all argument to ListImages

This is similar to ListContainers

@ehazlett I updated the commit with your recommended change.

LGTM
/cc @vieux @donhcd

LGTM


Disposal unit is no longer nuke-proof (probably)

About the PR

DisposableUnitBase's DamageTrigger values changed to closer match desired behaviour. Remember when dev team wasn't political?
Why / Balance

#24233
Technical details

DamageTrigger 100 for annihilation,
DamageTrigger 50 for normal destruction.
Media

[x] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Breaking changes

Changelog

:cl:

tweak: Disposal units are no longer nuke-proof

did you actually test it

If by this you want to say "did you test it for being as balanced as I want to", then I don't know how would you truly want it.
However, if by this you mean "did you test if game launches" then yes, it does.

did you test if a nuke destroys disposal units

Gladly would, if nukes wouldn't crash the client in master (lmao). However you can trust the code, since that's (relatively) very little damage required.

anyways, since you reminded me of that issue, I tried launching the client outside VS so I can relaunch it without obliterating the server, and yes, it does destroy them. I don't know why I even had to test it, you guys have weird standards.

I'll go post an issue of audio crash of client upon nuking now, since it was apparently not reported.

#24309

Sad this is gone, honestly. Seeing random crew members and parts of the nukie squad survive because they dove into disposals  was iconic for me.

You can still survive in the fridge!

disposal bins surviving nukes is "political"? what's next on the chopping block, fridges?

disposal bins surviving nukes is "political"? what's next on the chopping block, fridges?

disposal bins were an unintended bug, fridges were an intended design. Reasoning can be quite different.

#24309 is a direct indiana jones reference this is just bug

Hi Komunre,
Given the circumstances of you being removed in 2022 we've also applied a repo ban. If you'd like to appeal it you can do so on the forum.


[#72, #73, irods/irods#5220, irods/irods#5827] CMake consistency sweep and housekeeping (4-2-stable)

confirmed - please # em

#'d


FluentBit crashes on deployment

Describe the bug
A clear and concise description of what the bug is.

Steps to reproduce
If possible, provide a recipe for reproducing the error.
Updated the receivers and the exporters to offload metrics and logs to CloudWatch.
helm install \
[RELEASE_NAME] [REPO_NAME]/adot-exporter-for-eks-on-ec2 \
--set clusterName=[CLUSTER_NAME] --set awsRegion=[AWS_REGION]
What did you expect to see?
A clear and concise description of what you expected to see.
FluentBit and Collector pods are both running
What did you see instead?
A clear and concise description of what you saw instead.
FluentBit pods do not deploy.
Environment
Describe any aspect of your environment relevant to the problem.
Additional context
Add any other context about the problem here.

@ruthvik17 , We can close this now..

Closing the issue since fix has been added.


linregress should warn user in 2x2 array case

The heuristic for splitting an array into x and y inside linregress is ambiguous for 2x2 arrays.  I discovered this ambiguity when I called linregress with a 2x2 array where x and y were oriented as columns (a common case when working with pandas dataframes) and got an unexpected result.
Reproducing code example:

Sample code to reproduce the problem:
#A simple numpy array that is 2x2 where each row is the x, y values.
from scipy.stats import linregress
import numpy as np
arr = np.array([[30,31], [50,50]])
slope, intercept, r_value, p_value, std_err = linregress(arr)
#slope = 1.0
# intercept =20.0
# r_value = 1.0
# p_value = 0.0
#std_err = 0.0

#Visualize with plot
import matplotlib.pyplot as plt
x = arr[:,0]
y = arr[:,1]
plt.plot(x, y, 'o', label='original data')
plt.plot(x, intercept + slope*x, 'r', label='fitted line')
plt.legend()
plt.show()
print(r_value**2)

#Tranposing the array gives the expected result:
slope, intercept, r_value, p_value, std_err = linregress(arr.T)
#slope = 1.0
#intercept = 1.0
#r_value = 1.0
#p_value = 0.0
#std_err = 0.0

x = arr[:,0]
y = arr[:,1]
plt.plot(x, y, 'o', label='original data')
plt.plot(x, intercept + slope*x, 'r', label='fitted line')
plt.legend()
plt.show()
print(r_value**2)

Desired Resolution:
In this case, no error message is detected; however, the ambiguity of the 2x2 case invites some additional documentation and perhaps a RunTime warning message when this corner case is detected. At the least, a clear description of this heuristic in the documentation is desired explaining how x and y are created internally.
Scipy/Numpy/Python version information:

import sys, scipy, numpy; print(scipy.__version__, numpy.__version__, sys.version_info)
('1.0.0', '1.13.3', sys.version_info(major=2, minor=7, micro=14, releaselevel='final', serial=0))

I think it's best to add a note to the documentation, either in the Notes section, or under Examples. Pull request welcome, I'd say.

Hi, I would like to take this up to get some practice :grinning:
I noticed that there is already a Notes section which is not written directly in the docstring, but appended somewhere else. In order to keep things simple, do you think it would be enough to expand the Parameters description:
        Two sets of measurements.  Both arrays should have the same length.
        If only x is given (and y=None), then it must be a two-dimensional
        array where one dimension has length 2.  The two sets of measurements
        are then found by splitting the array along the length-2 dimension.

with
        In the case where y=None and x is a 2x2 array, the splitting will be
        done along the rows, resulting in the sets x[0] and x[1].

?

@ludcila Thanks for taking the time. The situation is a bit awkward indeed. The extra part comes from this part
https://github.com/scipy/scipy/blob/701b9ac6c451e68a0a5659a6186c1f4d847a0be1/scipy/stats/mstats_basic.py#L59-L65
Then further down the file there is the part
https://github.com/scipy/scipy/blob/701b9ac6c451e68a0a5659a6186c1f4d847a0be1/scipy/stats/mstats_basic.py#L840-L841
I think this was meant as a generic machinery however only lingress is using it hence I think we can take it back to its original docstring by cleaning these up.

Hi @ilayn, I can take care of putting the notes in the docstring and cleaning that up. Do you think what I wrote is enough to clarify the 2x2 case? If so, should it be added to the parameters section or to the notes? :smiley:

Fixed by gh-9423, so closing. Thanks all!

Do you think what I wrote is enough to clarify the 2x2 case?

yes, it was clear:)


Suggestion: The "Train in Azure" card title is horizontally aligned with the other two cards.

System Information (please complete the following information):

Windows OS: Windows-10-Enterprise-21H1
ML.Net Model Builder (Preview): <IP_ADDRESS>0201 (Main Branch)
Microsoft Visual Studio Enterprise 2019: 16.10.4
.Net: 5.0.302

Describe the bug

On which step of the process did you run into an issue: Next steps page
Clear description of the problem: Not sure if this is by design, but i still think the alignment of the cards is as pleasing to the eye as the scenario page.

To Reproduce
Steps to reproduce the behavior:

Select Create a new project from the Visual Studio 2019 start window;
Choose the C# Console App (.NET Core) project template with .Net 5.0;
Add model builder by right click on the project;
Select Image classification or Object detection scenario to complete training;
Navigate to Next steps page, see that the "Train in Azure" card title is not horizontally aligned with the other two.

Expected behavior
Please see the screenshot of Scenario page below, hope that the title of "Train in Azure" card is horizontally aligned with the other two cards.
Screenshots
If applicable, add screenshots to help explain your problem.

Scenario page:

Additional context
Add any other context about the problem here.

This is not part of the model building experience, and not a high priority. Closing for now.


feat: create ComponentSet of MetadataComponents from Org Connection

What does this PR do?
This adds the capability to create a componentSet of metadataComponents from an org connection. This can/will be used to extend the source:manifest:create command to create a manifest file based on an org configuration.
What issues does this PR fix or reference?
@W-0@
Functionality Before
<insert gif and/or summary>
Functionality After
<insert gif and/or summary>

@mshanemc as FlowDefinition should not be used anymore since apiVersion 44.0 what do you think about setting "isAddressable": false for flowdefinition?
"flowdefinition": {
      "id": "flowdefinition",
      "name": "FlowDefinition",
      "suffix": "flowDefinition",
      "directoryName": "flowDefinitions",
      "inFolder": false,
      "strictDirectoryName": false,
      "isAddressable": false
    }

@mshanemc @shetzel as FlowDefinition should not be used anymore since apiVersion 44.0 what do you think about setting "isAddressable": false for flowdefinition?
"flowdefinition": {
      "id": "flowdefinition",
      "name": "FlowDefinition",
      "suffix": "flowDefinition",
      "directoryName": "flowDefinitions",
      "inFolder": false,
      "strictDirectoryName": false,
      "isAddressable": false
    }

wouldn't that break anyone on a <44 project?

closed in favor of this nearly identical PR: https://github.com/forcedotcom/source-deploy-retrieve/pull/571, which is now merged with main.


Versioning ignores HTTP method, only matches on route name.

When defining the same routes under different versions, the version 2 routes are not matching on the http method - only by the route name.
class API < Grape::API

  version "v1", using: :accept_version_header

  get "/" do
    return "foo"
  end

  post "/" do
    return "bar"
  end

  version "v2", using: :accept_version_header

  get "/" do
    return "baz"
  end

  post "/" do
    return "qux"
  end

end

accidental duplicate.


Support true C++11 on master

Essentially, every word in the Portability Restrictions section of https://github.com/grpc/grpc/blob/b8916aa22fe1d2c1163986b834f5bd0543476573/doc/cpp-style-guide.md should cause consternation, but these were necessary to make sure that we can support critical gRPC C++ use cases. Among those, the most problematic (IMO) are:

All nullptr-related restrictions. Some very standard uses of nullptr fail at compile time on gcc4.4, but some fail insidiously: such as assigning static lifetime variables to nullptr. Additionally, it is not good coding practice to force people to implicitly typecast pointers to bool for comparisons rather than the more common route of explicitly comparing against nullptr.
Restrictions on the use of unique_ptr in collections. This often forces us to do manual new and delete (and delete []), which is error-prone.

Additionally, several features like the lack of lambdas, range-based for, and brace initializers lead to code that can be overly convoluted to achieve the same objectives.
Now that users restricted to outdated compilers can be supported using the v1.0.x branch, I suggest that in the very near future, we ease off the restrictions on development at master and eventually adopt a more standard coding style at master.
If we decide that this is a go, I'll send in a PR changing the style guide, removing our ersatz nullptr, and removing portability checks against the oldest of compilers at master. Other stuff will fall in place after that.
Cc: @ctiller @yang-g @markdroth @y-zeng @dgquintas @sreecha @hsaliak

Can we make a similar change to support true C99 for the C-core code?

Mark, except for variable-sized arrays, I think we do for the source anyway (though not the headers). As for variable-sized arrays, they wouldn't fly with the Google C++ style guide because of likelihood of trashing the stack nondeterministically: https://google.github.io/styleguide/cppguide.html#Variable-Length_Arrays_and_alloca__

Got it.  Thanks.


docs(history): re-order capture click to be after makeHashHistoryDriver

[ ] I added new tests for the issue I fixed/built
[ ] I ran yarn test for the package I'm modifying
[ ] I used yarn run commit instead of git commit

This PR is part of a series of small PRs for #583
Moving captureClicks below might seem trivial but it makes more sense for people to understand the history driver first before knowing that you can use captureClicks to wrap around it. Especially after we add code examples.

Thanks!


Make GenericManifestFile compatible with Kryo

This PR makes GenericManifestFile compatible with Kryo as we use instances of this class directly while migrating tables to Iceberg after #675.
This change resolves #772.

+1


update url of Google Code to GitHub

Looks like an update to https in most places in addition to simply changing URL from Googlecode -> Github.

Maybe that is isolated to me, but can't seem to load the maintained image now. Will investigate.

I'm not sure what's wrong, but I can't view this image too at right now . I will split off commit and test image URL later.

I found the reason, the site has config SSL cert incorrectly. It's only provide one cert without the chain.
I will try to contact with the site owner to fix it. But this PR should be acceptable for merge right now.

Thanks for investigation that! Merged in the other changes.


chore(package): release v3.0.2

coverage: 97.194%. remained the same
when pulling 0f6fee17a38f4670c3ce766f0297ff257dc3ce1c on release-3.0.2
into 36cd3a9c61d5f5e38dfb1dc8e1b2cd3d9c20f724 on master.


Post Text

Would it be possible to include the post text when scraping user posts?  I'm interested in grabbing the number of hashtags used over the last X (say 12) posts.  For example, say over the last 12 posts, on average there are 5 hashtags used per post.  If the Post object included the post text, I think I could get what I'm looking for.  This isn't really an issue, more of a request or suggestion for your consideration.

Thank You for your suggestion, You can get the caption of the post by
>>> user = InstagramUser('github', sessionid=id)
>>> sample_post = user.posts[0]
>>> sample_post.caption

I try to add the hashtags of the post in the next release.
Thank You

I try to add the hashtags of the post in the next release.

Amazing!  You rock @yogeshwaran01 👍 💯 🥇

@yeamusic21  You can get the hashtags and text of the post by the following script
>>> from Instagram import InstagramPost

>>> post = InstagramPost('CNQDEkxr8eM', sessionid=sessionid)
>>> data = post.post_data
>>> post_text = post['edge_media_to_caption']['edges']['node']['text']
# if raise key Error text of post is Empty
>>> post_text

@yogeshwaran01 Wow!  Awesome!  I will try this out and let you know how it goes.  👍 💯

@yogeshwaran01
>>> from instagramy import InstagramUser, InstagramPost
>>> import re
>>> import os
>>> import json
>>> import pickle
>>> from time import sleep
>>> postID = 'CM3a6y5B4ju'
>>> post2 = InstagramPost(postID, sessionid=os.environ.get("INSTAGRAM_SESSIONID"))
Traceback (most recent call last):
  File "C:\Users\Redacted\Desktop\Personal\Redacted\Redacted\Redacted\lib\site-packages\instagramy\InstagramPost.py", line 52, in __init__
    self.post_data = data["entry_data"]["PostPage"][0]["graphql"][
KeyError: 'graphql'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Redacted\Desktop\Personal\Redacted\Redacted\Redacted\lib\site-packages\instagramy\InstagramPost.py", line 56, in __init__
    raise RedirectionError
instagramy.core.exceptions.RedirectionError: Instagram Redirects you to login page, Try After Sometime or Reboot your PC Provide the sessionid to Login
>>>

@yeamusic21, Yes your right I forget to add [0], Now it is updated.
instagramy.core.exceptions.RedirectionError is due to incorrect session_id or Instagram changed the session_id

@yogeshwaran01 I'm using Python 3.7.1 and it seems like my code is different than your latest code.
My Instagramy code in instagramy/InstagramPost.py:
    def __init__(self, post_id: str, sessionid=None):
        self.post_id = post_id
        self.url = f"https://www.instagram.com/p/{post_id}/"
        self.sessionid = sessionid
        data = self.get_json()
        try:
            self.post_data = data["entry_data"]["PostPage"][0]["graphql"][
                "shortcode_media"
            ]
        except KeyError:
            raise RedirectionError

Latest Instagramy code in instagramy/InstagramPost.py:
    def __init__(self, post_id: str, sessionid=None, from_cache=False):
        self.post_id = post_id
        self.url = f"https://www.instagram.com/p/{post_id}/"
        self.sessionid = sessionid
        cache = Cache("post")
        if from_cache:
            if cache.is_exists(post_id):
                self.post_data = cache.read_cache(post_id)
            else:
                data = self.get_json()
                cache.make_cache(
                    post_id,
                    data["entry_data"]["PostPage"][0]["graphql"]["shortcode_media"],
                )
                self.post_data = data["entry_data"]["PostPage"][0]["graphql"]["shortcode_media"]
        else:
            data = self.get_json()
            cache.make_cache(
                post_id, data["entry_data"]["PostPage"][0]["graphql"]["shortcode_media"]
            )
            try:
                self.post_data = data["entry_data"]["PostPage"][0]["graphql"][
                    "shortcode_media"
                ]
            except KeyError:
                raise RedirectionError
        if sessionid:
            try:
                self.viewer = Viewer(data=data["config"]["viewer"])
            except UnboundLocalError:
                self.viewer = None
        else:
            self.viewer = None

@yeamusic21, Yes today instagramy got a new release 4.3. It got a new caching feature. Please check it out.
Update the package to the latest version
pip install instagramy --upgrade


scheduler(cdc): rename packages to v2 and v3

What problem does this PR solve?
Issue Number: close #6191
What is changed and how it works?
Rename packages to v2 and v3
Check List
Tests

Unit test

Questions
Will it cause performance regression or break compatibility?
No.
Do you need to update user documentation, design documentation or monitoring documentation?
No.
Release note
None

/merge


removing analysis mode (issue 379)

I think the package-lock conflict is from when Sophie and I tried to use Jest. We can leave it as it used to be.


[Request] Start loading the next & previous view

The contents of each view in the carousel is on our server - some of the carousel projects (including Xamarin's CarouselView) start loading the next few views even while it is hidden.
Is it already possible to do that? I couldn't find any properties for that. If not, could this be a request for a future release?

In both Android and iOS, the previous and next view are loaded by default, unless they are WebViews, where you will need to handle pre-loading by yourself.


Add commit-fee-rate option for specifying individual fee rates

Closes https://github.com/casey/ord/issues/1487.

This looks great! I pushed f04eb06 to make the help string shorter, hopefully it looks okay!


my atom key insert is Lock when i open a file!

When I open a file in atom , in my open file , then INSERT key is lock , my document status is Modify status , but not Insert , then i Press the KEY  INSERT , then document then by ok .  How can i set the new open File not to Modify status ?

VIM   Start In Insert Mode
This option  is never need to exist !!!


maint(transforms): replace type() calls with isinstance()

Small change to modernize some old type() calls to isinstance().
Tests still pass!

Found what looks like a bug https://github.com/apache/iceberg-python/blob/main/pyiceberg/table/init.py#L173 when changing to isinstance

https://github.com/apache/iceberg-python/blob/main/pyiceberg/expressions/visitors.py#L987 is probably fine to stay as adding isinstance would make it a little uglier to cast

@jayceslesar looks like black still wants to reformat some code. Can you run make lint? Thanks!


Update README.md installation instructions

@davidlange6 This PR fixes https://github.com/compiler-research/xeus-cpp/issues/23 if your still interested in installing xeus-cpp on your Mac. I have tested these installation instructions on my M1 Macbook Pro.
@vgvassilev This PR is ready for review

@alexander-penev can you review this PR?


Executing Code at OVS

Hello,
I want to execute some commands at a switch. And my question is how does mininet create a switch? I'm just wondering how I can add the capability of processing and executing commands at a switch.
Thanks,

Please don't abuse the github issue system with random questions.
Also,  your questions indicate that you haven't read the documentation or our papers.


Refactored SYM tool

@Meijuh What do you think? Can you merge this?
Some smaller functions are no longer inlined, but I doubt that affects performance much.
Fixes #112

Activating -lto on the compiler for Link-time optimization is supposed to inline this sort of things right back in anyway, with recent gcc.


cannot do matmul for high-dim tensors

Hi, @dcslin , we ccannot do matmul for high-dim tensors:
The error is:

F0324 05:47:19.174587 15611 tensor.cc:1413] Check failed: A.shape().size() == 2u (4 vs. 2)

please use this test case:
x1 = np.random.randn(1, 12, 256, 64).astype(np.float32)
x2 = np.random.randn(1, 12, 64, 256).astype(np.float32)
x1 = tensor.from_numpy(x1)
x1.to_device(gpu_dev)
x2 = tensor.from_numpy(x2)
x2.to_device(gpu_dev)

y = autograd.Matmul()(x1, x2)
print(tensor.to_numpy(y[0]))

Hi @joddiy , for tensor mul >2d, please use tensor.tensordot, it depends on which axis to perform the tensordot
    def test_4d_tensor_dot(self):
        for dev in [cpu_dev, gpu_dev]:
            x1 = np.random.randn(1, 12, 256, 64).astype(np.float32)
            x2 = np.random.randn(1, 12, 64, 256).astype(np.float32)
            x1 = tensor.from_numpy(x1)
            x1.to_device(dev)
            x2 = tensor.from_numpy(x2)
            x2.to_device(dev)

            y = tensor.tensordot(x1, x2, axes=([3],[2]))
            print(y.shape)

            y = tensor.tensordot(x1, x2, axes=([2,3],[3,2]))
            print(y.shape)

output:
(1, 12, 256, 1, 12, 256)
(1, 12, 1, 12)
(1, 12, 256, 1, 12, 256)
(1, 12, 1, 12)
...........................
----------------------------------------------------------------------
Ran 27 tests in 0.121s

OK

reference: https://docs.scipy.org/doc/numpy/reference/generated/numpy.tensordot.html

Hi, shicong, according to the np's definition, the matmul for high-dim matrix should be:
x1 = np.random.randn(1, 12, 256, 64).astype(np.float32)
x2 = np.random.randn(1, 12, 64, 256).astype(np.float32)
print(np.matmul(x1, x2).shape)

Output:

(1, 12, 256, 256)

Actually, it does the matmul for (256, 64) * (64, 256) for all cells of the first axes (1, 12).

fixed in https://github.com/apache/singa/pull/639

Hi, @dcslin , thanks for your help, this PR works fine for basic test cases. However, for some special cases in onnx, it has an incorrect result, I've extracted this test case for you, please use this:
for dev in [cpu_dev, gpu_dev]:

      X = np.random.random((1, 256, 12, 64)).astype(np.float32)
      x = tensor.from_numpy(X)
      x.to_device(dev)

      W = np.random.random((1, 256, 12, 64)).astype(np.float32)
      w = tensor.from_numpy(W)
      w.to_device(dev)

      X = np.transpose(X, (0, 2, 1, 3))
      W = np.transpose(W, (0, 2, 1, 3))
      W = np.transpose(W, (0, 1, 3, 2))
      Y = np.matmul(X, W)

      x = autograd.transpose(x, (0, 2, 1, 3))
      w = autograd.transpose(w, (0, 2, 1, 3))
      w = autograd.transpose(w, (0, 1, 3, 2))
      y = autograd.matmul(x, w)

      np.testing.assert_array_almost_equal(tensor.to_numpy(x), X)
      np.testing.assert_array_almost_equal(tensor.to_numpy(w), W)
      np.testing.assert_array_almost_equal(tensor.to_numpy(y), Y)

This test case reports:

Traceback (most recent call last):
File "../../test/python/test_tensor.py", line 389, in test_matmul
np.testing.assert_array_almost_equal(tensor.to_numpy(y), Y)
File "/usr/local/lib/python3.5/dist-packages/numpy/testing/_private/utils.py", line 1015, in assert_array_almost_equal
precision=decimal)
File "/usr/local/lib/python3.5/dist-packages/numpy/testing/_private/utils.py", line 827, in assert_array_compare
raise AssertionError(msg)
AssertionError:
Arrays are not almost equal to 6 decimals

Mismatch: 100%
Max absolute difference: 11.377065
Max relative difference: 1.148434
x: array([[[[14.145736, 13.506734, 13.252323, ..., 14.569139, 15.795746,
15.196916],
[18.76216 , 17.117498, 14.830437, ..., 17.131226, 17.974703,...
y: array([[[[16.710552, 17.515999, 15.49446 , ..., 15.438944, 18.269606,
15.611665],
[14.75556 , 14.552402, 14.04308 , ..., 14.70639 , 15.604133,...

And please check the subgraph for this test case:

Hi @joddiy , Thank you for pointing out the issue, kindly help to check the lastest code
PR:https://github.com/apache/singa/pull/639
your test is added: https://github.com/apache/singa/blob/fc1de1d699969e063c47491ded14ef034ec30a0d/test/python/test_tensor.py#L409

Hi @dcslin , it works now, thanks for your hlep.


Feature request: ability to provide all query observable (not only its properties)

In the current version of Angularfire2 we can provide a query with observable parameters. Database is requested every time one of these parameters have a new value. I think to provide all query object as observable would be a better approach.
In closed issue #603 I mentioned one of typical use cases: loading calendar events for given period (between two dates). Currently I have to code it as follows:
export class EventsCalendarComponent {
  private start$: Subject<string> = new Subject<string>();
  private end$: Subject<string> = new Subject<string>();

  constructor(private db: AngularFireDatabase) {
    db.list('/events', {
      query: {
        orderByChild: 'date',
        startAt: this.start$,
        endAt: this.end$
      }
    }).subscribe(events => {
      // update calendar component with events
    });
  }

  filterByPeriod(start: Moment, end: Moment) {
    this.start$.next(start.getTime());
    this.end$.next(end.getTime());
  }
}

Calling the method filterByPeriod causes two immediately consecutive requests are fired and the first of them is irrelevant and useless. For such case the ability to have all the query object observable would solve the problem and we code something this:
export class EventsCalendarComponent {
  private query$: Subject<Object> = new Subject<Object>();

  constructor(private db: AngularFireDatabase) {
    db.list('/events', {
      query: this.query$;
    }).subscribe(events => {
      // update fullcalendar component with events
    });
  }

  filterByPeriod(start: Moment, end: Moment) {
    this.query$.next({
      orderByChild: 'date',
      startAt: start.getTime(),
      endAt: end.getTime()
    });
  }
}

There could be a pretty simple workaround for this. If an auditTime(0) operator were to be composed after the combineLatest, only the last of the combined observables within a single turn through the event loop would be emitted.
With that in place, calls to subjects like this:
this.start$.next(start.getTime());
this.end$.next(end.getTime());

would result in a single query being emitted.
The query results in a network request, so I cannot see how performance would be an issue. And I cannot envisage a situation in which multiple queries within the same event loop turn would be the desired behaviour.
Anyone interested in a PR?

@cartant @tomasklima I would definitely be interested in a PR! This isn't the first time someone has requested this feature. As long as we keep backwards compatibility this would be a great feature.

This issue was closed by #776, no?


Migrate to use <script type="module">

This PR migrates the review app + webpack example to <script type="module"> for https://github.com/alphagov/govuk-frontend/issues/3508
<script type="module" src="/javascripts/all.min.js"></script>
<script type="module">window.GOVUKFrontend.initAll()</script>

Components styled with .js-enabled
Once this PR merges there will be a disconnect between browsers that apply .js-enabled styling and those that can actually initialise <script type="module"> functionality but we’ll address that in a future commit
JavaScript load order
We ideally want GOV.UK Frontend to load before 3rd party scripts so that component initialisation isn't delayed
Since module scripts have defer loading behaviour we've added DOMContentLoaded to 3rd party scripts:
<script src="/vendor/iframe-resizer/iframeResizer.min.js" defer></script>
<script>
  document.addEventListener('DOMContentLoaded', function () {
    window.iFrameResize({}, '.js-component-preview')
  })
</script>

Linking the follow up PR to this one:

https://github.com/alphagov/govuk-frontend/pull/3771


Should have confirmation box when deleting SAML/OIDC application

Currently there is no any confirmation while deleting SAML/OIDC applications in the service provider.

Duplicate of https://github.com/wso2/product-is/issues/1975


fix tests with Sphinx 4.1.0

Sphinx 4.1.0 dropped their deprecated aliases (https://github.com/sphinx-doc/sphinx/commit/b84357be49819e3a08d7ca16a96031afb27418be). This patch fixes the test build with new Sphinx.

Hi, thanks for the PR, but this change was already merged in https://github.com/readthedocs/sphinx_rtd_theme/pull/1105/

ok, thanks, I didn't notice :)


The java script link has no description

URL: http://clarity-ks.surge.sh/tooltips
Tools: Web Accessibility Toolbar (WAT2.0)
Reproduced Steps:

Login Clarity Kitchen Sink with web browser.
Go to Tooltips tab.
Click help-info button.
Check the java script link in Tooltips tab.

Actual Results:
The java script link “info-circle” has no description in Tooltips tab.
For more details, please refer to “Tooltips-JavascriptLinks-NoDescription.png”.
Expected Results:
The java script link should have unique and meaningful description.
Note:
This issue also occurs on Vertical Nav tab.

NOTE: we need to know if this is a Clarity issue or an implementation issue.

Done. Will commit with several related A11Y issues.


Missing Allocation Information in APP_ALLOC Event

Problem Description
When an application is allocated in YuniKorn, the APP_ALLOC event is rendered in the event stream. Based on our modifications in yunikorn-core, the event's state object should include allocation information. However, the allocation details are missing from the state object in the event stream.
Refer to the following screenshot:
The logs clearly show the APP_ALLOC event being logged, but the allocation information is absent in the state object.

Impact
Due to the missing allocation information, application allocation data is not being populated in the UHS database.
Proposed Solutions

Re-fetch the Specific Application: https://github.com/G-Research/unicorn-history-server/pull/381
Implement a mechanism to re-fetch the application details using yunikorn API when the APP_ALLOC event is received.
Investigate and Fix in YuniKorn-Core: https://github.com/G-Research/yunikorn-core/pull/12

Current Investigation: Allocation data has already been added to the application state in the code. However, it is unclear why this data is not present when the APP_ALLOC event is rendered.  See the reference code blocks.

References
State is properly added in the App Allocation event
https://github.com/G-Research/yunikorn-core/blob/2db2cc34a25862a52d1ff98f0addef80cf56788d/pkg/scheduler/objects/events/application_events.go#L43-L50
Allocation is added in the ApplicationDAOInfo
https://github.com/G-Research/yunikorn-core/blob/ba58310cd4313af2a453c48ea0cdd9163af13388/pkg/scheduler/objects/application_ext.go#L73
Helper function to process allocations object
https://github.com/G-Research/yunikorn-core/blob/ba58310cd4313af2a453c48ea0cdd9163af13388/pkg/scheduler/objects/application_ext.go#L109-L115

fixed by https://github.com/G-Research/yunikorn-core/pull/12


How can I return value from "execute_javascript"

Hi @dddomodossola,
I am trying to use confirm pop-up box via execute_javascript in my GUI. Something like this:
bt = gui.Button("pressMe")
bt.onclick.do(self.pressMe)

def pressMe(self, emitter):
       js = '''var txt; if (confirm("Press a button!")) {txt = "You pressed OK!"; console.log(txt)} else {txt = "You pressed Cancel!";}'''
       self.execute_javascript(js)

The code is working and when I press the button, the pop-up box appears. Now how can I get the return value and execute a function when the user press the OK button?
I am aware of dialog.confirm_dialog in remi, but since that appears in full screen rather than a pup-up box, I need to use the javascript way.
Thanks

Hello @m-kareem, it is simple to code a popup with remi ;-)
import remi.gui as gui
from remi import start, App

class Popup(gui.VBox):
    def __init__(self, title, message, *args, **kwargs):
        gui.VBox.__init__(self, *args, **kwargs)
        self.css_display = "none"
        self.style['margin'] = 'auto'
        self.css_outline = "3px solid gray"

        self.append(gui.Label(title, style={'font-weight':'bold'}))
        self.append(gui.Label(message, style={'font-size':'15px'}))

        self.bt_confirm = gui.Button("Confirm")
        self.bt_confirm.onclick.do(self.onconfirm)
        self.append(self.bt_confirm)

    @gui.decorate_event
    def onconfirm(self, emitter):
        self.css_display = "none"
        return ()

    def show(self):
        self.css_position = "absolute"
        self.css_display = "flex"

class MyApp(App):
    def main(self):
        # creating a container VBox type, vertical (you can use also HBox or Widget)
        self.main_container = gui.VBox(width=300, height=200, style={'margin': '0px auto'})

        self.bt_show_popup = gui.Button("Show popup")
        self.bt_show_popup.onclick.do(lambda emitter:self.popup.show())

        self.main_container.append(self.bt_show_popup)

        self.popup = Popup("title", "message")
        self.main_container.append(self.popup)

        # returning the root widget
        return self.main_container

if __name__ == "__main__":
    # starts the webserver
    start(MyApp, address='<IP_ADDRESS>', port=0, start_browser=True, username=None, password=None)

Thanks a lot @dddomodossola for your prompt reply and kind support. This is exactly what I needed.
However it would be very nice to see what solution you have for execute_javascript method and how you can return values from JS to remi.
Best,

@m-kareem in order to send data back to python server you have to use the remi.sendCallbackParam from javascript.
sendCallbackParams requires 3 arguments:

The identifier of the widget or app that will handle the callback
The callback name
The parameters dictionary that will be send back to the callback.

Here is a working example ;-)
import remi.gui as gui
from remi import start, App

class MyApp(App):
    def main(self):
        # creating a container VBox type, vertical (you can use also HBox or Widget)
        main_container = gui.VBox(width=300, height=200, style={'margin': '0px auto'})

        bt = gui.Button("pressMe")
        bt.onclick.do(self.pressMe)

        main_container.append(bt)

        # returning the root widget
        return main_container

    def pressMe(self, emitter):
       js = '''var txt; if (confirm("Press a button!")) {txt = "You pressed OK!"; console.log(txt)} else {txt = "You pressed Cancel!";} var params={}; params['text_value'] = txt; remi.sendCallbackParam('%(listener_id)s','%(listener_function)s',params);'''%{'listener_id':str(id(self)),'listener_function':'mylistener'}
       self.execute_javascript(js)

    def mylistener(self, text_value):
        print("received: " + text_value)

if __name__ == "__main__":
    # starts the webserver
    start(MyApp, address='<IP_ADDRESS>', port=0, start_browser=True)

Thanks a lot @dddomodossola , this is a genius idea. However for some reason I did not get anything back in the terminal from "mylistener" function. The code is running without error.
Best,

Maybe you are not using the latest remi version. Please try to update remi. Furthermore, please check for errors in the browser console.
Kind Regards


[9p] chown: changing ownership of 'xxx': Operation not permitted

Description
I read the issuse #231 , has it been solved now?
I use podman by lima-vm, container is mysql/mysql-server, it need chown mysql:mysql xxx, but when use -v mapping host's dir , propmpt chown: changing ownership of 'xxx': Operation not permitted
macos version: 12.6
lima version: 0.13.0
qemu version: 7.1.0
lima's yaml config:
mountType: 9p
mounts:
- location: "/Users/xxx/lima_workspace/podman"
  writable: true
  9p:
    cache: mmap

mysql docker hub:
docker hub : https://hub.docker.com/r/mysql/mysql-server
fetch cmd: docker pull mysql/mysql-server:8.0.21

I also try to use chown directly in lima-vm, neither.
[xxx@lima-test test]$ sudo groupadd test
[xxx@lima-test test]$ sudo useradd -g test test
[xxx@lima-test test]$ ll
drwxr-xr-x. 4 xxx games 128 Nov 16 08:55 mysql
drwxrwxr-x. 2 xxx games  64 Nov 16 08:48 test
[xxx@lima-test test]$ chown test:test test
chown: changing ownership of 'test': Operation not permitted

https://github.com/lima-vm/lima/blob/c3e82cc884eb6f4280c86f0ee4a25ee1756ff987/examples/default.yaml#L74-L78
securityModel: "mapped-xattr" enables chown, but incompatible with symlinks

https://github.com/lima-vm/lima/blob/c3e82cc884eb6f4280c86f0ee4a25ee1756ff987/examples/default.yaml#L74-L78
securityModel: "mapped-xattr" enables chown, but incompatible with symlinks

Thank you for your reply, but it still seems to be unresolved.
That is my lima.conf,  pass the limactl validate
mountType: 9p
mounts:
- location: "/Users/xxx/lima_workspace/test"
  writable: true
  9p:
    cache: "mmap"
    securityModel: "mapped-xattr"
- location: "/tmp/lima"
  writable: true

and i deleted the old folder and recreated ,  it's still...
[xxx@lima-test test]$ pwd
/Users/xxx/lima_workspace/test
[xxx@lima-test test]$ chown test:test test
chown: changing ownership of 'test': Operation not permitted


Point pcalc website to the actual mac app, not broad-scoped ios, etc.

Thank you for the contribution. It was merged directly as 512bad75bc354abc6868a08433d260d04f26e52f to keep commit history cleaner. Your contribution is still credited to you.


add unknown to EncryptionAlgorithm enum

Related: https://github.com/element-hq/element-web/issues/26610, which will be fixed by this once matrix-js-sdk is updated

fixes https://github.com/element-hq/element-web/issues/26774

no, it doesn't. Not until the js-sdk is updated to use this change.

I linked to the wrong issue in the PR description.  Fixed now.

I linked to the wrong issue in the PR description. Fixed now.

Ok, but please avoid the magic github words "will fix ", which means that GH will auto-close that issue when the PR is merged, irrespective of the fact we have many more steps to do before that happens. Now fixed.

I linked to the wrong issue in the PR description. Fixed now.

Ok, but please avoid the magic github words "will fix ", which means that GH will auto-close that issue when the PR is merged, irrespective of the fact we have many more steps to do before that happens. Now fixed.

Oh, I changed "fixes" to "will fix" because I thought that would be safe. :-/


font_atlas_debug example not displaying updated texture

Bevy version
master
Operating system & version
Windows 10
What you did
cargo run --example font_atlas_debug
What you expected to happen
It should show the font atlas with all of the glyphs in the top left.
What actually happened
Other than a handful, most of the glyphs are missing.

Additional information
I believe it is successfully displaying the first character ("a"), then the first character for the first font atlas, then the first character for the second font atlas (when the first gets filled up), and so on. For some reason, each individual atlas doesn't get updated on screen after the first character.

Seems to have been broken during 7699f8b6db0af6ca62fcd033e05df4f6c71ecb23

Seems to have been broken during 7699f8b6db0af6ca62fcd033e05df4f6c71ecb23

Related? #1161

Related? #1161

Related? #1161

That seems likely!

Related? #1161

That seems likely!


Billions - > Billion and Millions -> Million

We just noticed that on the country pages everywhere it says
X Billions. This shoud be X Billion, without the S
The same for Millions -> Million

@annafralberts (cc @michaeljokf) I fixed it for SubsidyStories; but visualizations are embedded from OS Viewer, so there all labels will be with -s endings (I can fix it too, but I cannot deploy OS applications, sorry)

Good for the launch. Thanks!
Op 6 mrt. 2017 21:07 schreef "Levko Kravets"<EMAIL_ADDRESS>
@annafralberts https://github.com/annafralberts (cc @michaeljokf
https://github.com/michaeljokf) I fixed it for SubsidyStories; but
visualizations are embedded from OS Viewer, so there all labels will be
with -s endings (I can fix it too, but I cannot deploy OS applications,
sorry)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/openspending/subsidystories.eu/issues/40#issuecomment-284516196,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMH71W-cldCtujGF1u9NbB0IHj2e3pOXks5rjGeGgaJpZM4MRH-l
.


Add filtering functionality to blog and portfolio

Added this to Milestone 3.4, due Aug 1, 2020.
Time needed: 120 minutes +/- 50%.
Already made a basic filter, shown below:

let filterPosts = ({ category }) => {
    Array.prototype.forEach.call(document.querySelectorAll('article[data-category]'), function(e) {
        e.style.display = (e.dataset.category == category ? '' : 'none');
    })
};

That will basically add style="display: none;" to each article[data-category] except the ones you'd like to see.
e.g. filterPosts({ category: "front-end-development"}); will show article[data-category="front-end-development"] and hide others.

This need to be turned into an interactive Vue component.

This feature has been implemented in dfdb12ef6e2b7b66f0003f5ac743ac189c796538. It needs refactoring, but a separate issue has been opened for that (#75).


in Session_database_driver.php field "id"=>"session_id"

The title here luckily shows the necessary detail, but please keep it short and post a description instead.
On the issue at hand - it's the documentation that's faulty in this case, rename the field to 'id'.


Crash with new version of ElecCore

I just updated ElecCore to version 1.6.323, and the game crash on the startup
Log:
http://pastebin.com/4dQBHTpD

Same error here https://www.dropbox.com/s/igmiwql9f74c6b6/fml-client-latest.log?dl=0

This is a known issue, @McJty will upload the fix tomorrow

New version is on curse now