Facebook/Google login stuck on "cannot GET /callback screen" on second browser click.

After signing in and accepting. It sends me back to the callback say "cannot GET /callback". If I click the Done in the browser it brings an alert up saying "The sign in flow was canceled".

Did you register your Google application as a web app or mobile app?  It needs to be a web app.
The more information you can give me the better since what you provided is very vague.
Thanks,

It's a web app. I noticed when there's a second step of the login you get stuck at that screen. Example: when your logging in with Facebook and you accidentally enter the wrong password and it comes back as a error.
Then you try it again with the correct username & password and it accepts it. Then it redirects you to the cannot GET /callback & your stuck there. So you have to close that browser window and try again. So if you have to go anywhere in the browser window a second time it fails to initialize the event on the cannot GET /callback.
That doesn't work with google because you have to accept & agress after you login. I hope this is more info for you. I'm using the ionic platform & the ngCordova. I've also tried it with your repo file to instead of ngCordova.

I'll play around with what you described and report back.
Regards,

@nraboy Just wanting to check if you figured this out maybe. Thanks for your time.

I just tested it and here are the steps I followed:

Open application
Click login to initiate the cordovaOauth flow
Enter incorrect username / password to receive error via Google
Enter correct username / password on the same screen that is presenting the error

I received an access token without issue.
If my steps differ from yours let me know.  Otherwise I think you have an issue with your Google configuration, not with the mobile app.
Regards,

My steps
Facebook

Login with a failed password.
Try to login again with a successful password.
Successfully logs in.
Redirect back to a white screen then it just gets stuck there.

Google

Login with a successful password.
Goes to the accept the scopes screen.
Redirect back to a white screen then it just gets stuck there.

The white screen redirects you to the redirect uri that you told me to put on the Google api screen.

Just to confirm.  Your issue happens with both Facebook and Google?  I am confused because the ticket title says Google.
Regards,

Are you using the ngCordova or your repo file. Because I'm using.

ngCordova ~0.1.12-alpha
ionic #1.0.0-rc.0

I think the ionic 1.0 is using angularjs 1.3

I am using the latest version of ngCordovaOauth.
I support both versions (ngCordova and ngCordovaOauth), but because you've posted in my ngCordovaOauth repository rather than ngCordova I assumed you were using that version.
In either scenario, for Google and Facebook, I haven't made any recent changes.

And yes, I am using the latest version of Ionic, Cordova, and the InAppBrowser plugin.
My assumption is still that you have a configuration issue in your Google or Facebook dashboard.

Here's my config on both platforms
Facebook
Platform: website
Site URL: http://localhost/callback
Mobile Site URL: http://localhost/callback
Google
Platform: Client ID for web application
REDIRECT URIS: http://localhost/callback
JAVASCRIPT ORIGINS: http://localhost/
API: BigQuery API, Debuglet Controller API, Google Cloud SQL, Google Cloud Storage, Google Cloud Storage JSON API , Google+ API
That's all I changed in those new api credentials.

For Facebook you need to specifically set the Oauth callback URL.  Neither of the two you listed are correct.
For Google you need to not set the JavaScript Origins URL.  It is a field that can be left blank and must be left blank for proper usage.
Based on what you provided, my assumption is Facebook doesn't know where to redirect and Google is rejecting requests that don't come from http://localhost/.  Both reasons why it probably isn't working.
Regards,

So I'm guessing the README is not saying put http://localhost/callback in the website platform Redirect URI your saying put it in the Advanced > Valid OAuth redirect URIs for Facebook?
I took the JavaScript Origins URL and emptied that field.
Both platforms are redirecting me back to the callback. I see the callback white screen just on the second try to login with both of them it just stays there and doesn't give me the token.
Facebook
Platform: website
Advanced > Valid OAuth redirect URIs: http://localhost/callback
Google
Platform: Client ID for web application
REDIRECT URIS: http://localhost/callback
JAVASCRIPT ORIGINS: empty
API: BigQuery API, Debuglet Controller API, Google Cloud SQL, Google Cloud Storage, Google Cloud Storage JSON API , Google+ API
Thanks for your time.

Are your scopes correct?  My assumption is you're getting more errors in your logs than you think.
Please share your client keys and I'll test them with my code that I've confirmed working.
Regards,

Facebook
$scope.facebookLogin = function() {
    document.addEventListener("deviceready", function () {
        $cordovaOauth.facebook("536014456534960", ["email"]).then(function (result) {
            alert('result.access_toke
        }, function (error) {
            // error
        });
    }, false);
}

Google
$scope.googleLogin = function() {
    document.addEventListener("deviceready", function () {
        $cordovaOauth.google("25002918116-n4l4sjhuip2sp9goke32pnr40pijkbu0.apps.googleusercontent.com", ["https://www.googleapis.com/auth/plus.me", "https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/userinfo.profile"]).then(function (result) {
            alert(result.access_token);
        }, function (error) {
            alert("Error -> " + error);
        });
    }, false);
}

Both worked fine for me using your codes:
$scope.googleLogin = function() {
    $cordovaOauth.google("25002918116-n4l4sjhuip2sp9goke32pnr40pijkbu0.apps.googleusercontent.com", ["https://www.googleapis.com/auth/urlshortener", "https://www.googleapis.com/auth/userinfo.email"]).then(function(result) {
        console.log(JSON.stringify(result));
    }, function(error) {
        console.log(error);
    });
}

$scope.facebookLogin = function() {
    $cordovaOauth.facebook("536014456534960", ["email"]).then(function(result) {
        console.log(JSON.stringify(result));
    }, function(error) {
        console.log(error);
    });
}

Maybe your device or simulator is having issues?

I've used the Ionic View, Phonegap, Appgyver they both do the same things. I can never get the simulator to come up without failing. I might try it on my android though I'm trying it on my iPhone 6 plus right now. I guess it's something on my end. I'm starting a fresh ionic project right now to see if that one is corrupted maybe.

To my knowledge the InAppBrowser has issues with the Ionic View.  No idea what Appgyver is, but Phonegap should work if you've set everything up correctly.

I suggest you use Genymotion over the stock Android simulator.

The Phonegap app I have to kill the server to get it not to refresh the app when I open up the InAppBrowser. When I kill the server it seems like the $http doesn't work LOL. Ill try out the genymotion thanks. Seems like problem after problem today with this. Does the genymotion have a console log?

You need to use ADB with Genymotion:
https://blog.nraboy.com/2014/12/debugging-android-source-code-adb/
It is the closest to a real Android device you can get.

@nraboy I got it to work by creating a whole new project & I'm using the simulator now. The Phonegap app doesn't seem to work with your scripts but the sims do. Thanks so much for your help.

I'm happy we found a working solution!
I think all those other products have problems with the Apache Cordova InAppBrowser.  Beyond the InAppBrowser, the library source code is very simplistic.
Regards,

First, many many thanks for your work (and tutorials) on the library!
Just wanted to chime in and say that I've had a similar problem with Google Authentication  (or perhaps it is Ionic or InAppBrowser). Specifically, when running in iOS on a phone (within Ionic View) the app never gets past the screen where you touch "Accept" where Google asks if you approve of the different scopes for which the app has made a request.

running within iOS simulator on computer - works
running within Ionic View on Android - works
running within Ionic View on Android - hangs

I'm not sure how to debug the app when it is running on the phone within Ionic View. I realize Ionic is not your handiwork, but figured I'd post this issue nonetheless.
For measure, I have not attempted authentication with any other providers at this point.
I call a login view which loads a LoginController which runs the auth code and redirects to a /mail view upon success (at least, it does in all cases except for the one stated - running inside Ionic View on an iPhone). I've tried remote debugging via jsconsole, but I suspect the ionic upload does something to strip out console.log, or the Ionic View app suppresses them, because I get nothing.
In my app.js:
.state('login', {
    url: '/login',
    templateUrl: 'templates/login.html',
    controller: 'LoginController'
  })

In my controllers.js:
angular.module('starter.controllers', ['starter.services', 'ngCordovaOauth'])

.controller('LoginController', function($scope, $location, $cordovaOauth) {

  $scope.googleLogin = function() {
    console.log("Making OAuth call...");
    $cordovaOauth.google("385715641747-d90f9g1gnfb3lbhksaa4t28t91g6ekmk.apps.googleusercontent.com", ["https://www.googleapis.com/auth/contacts.readonly", "https://www.googleapis.com/auth/gmail.readonly"]).then(function(result) {
        console.log("Response Object -> " + JSON.stringify(result));
        window.localStorage.setItem("access_token", result.access_token);
        $location.path('/tab/mail');
    }, function(error) {
        console.log("Error -> " + error);
    });
  };

})

My Google callback URL is http://localhost/callback and the origin is empty.
I'm using Ionic 1.0RC1

I've heard the Ionic View has a lot of problems with the InAppBrowser.  I encourage you to build and install like you would a native application.
ionic build ios then open the Xcode project produced and install it to your device or simulator.
Regards,

@cmvee Ya ng cordova works fine in the simulator. You can also run ionic emulate ios/android.

I have been struggling with this for 2 or more days.
It just do not work. I get stuck on the "cannot GET /callback" screen, no matter what.
I am trying Facebook login.
My setup:

Site URL: http://localhost/callback

Mobile Site URL: http://localhost/callback

Ionic: 1.4.1

I ran:
      cordova plugin add org.apache.cordova.inappbrowser
      cordova plugin add cordova-plugin-whitelist

At my app.js:
      angular.module('starter', ['ionic', 'ngCordova','starter.controllers', 'starter.services','app-constants','ui.utils.masks.br.phone'])

At my login-service.js:
      angular.module('starter.services')
  	.service('LoginService', function($http, apiEndPoint, $location, $cordovaOauth)

....
      facebookLogin: function() {
          return $cordovaOauth.facebook(appID, ["email", "read_stream", "user_website", "user_location", "user_relationships"]).then(function(result) {

              accessToken = result.access_token;
              console.log(JSON.stringify(result));
              return accessToken
          }, function(error) {
              alert("There was a problem signing in!  See the console for logs");
              alert(error);
              console.log(error);
          });
      },

At config.xml:
<access origin="*"/>

Running both on iOS emulator and iOS real device. Emulation both via ionic emulate ios and via Xcode.

I have already reinstalled everything, even Nodejs.
I get this:

What does the console.log error message show?

Nothing relevant, I believe:
2015-05-15 11:20:25.015 CasaDoBicho[2416:416771] Apache Cordova native platform version 3.8.0 is starting.
2015-05-15 11:20:25.016 CasaDoBicho[2416:416771] Multi-tasking -> Device: YES, App: YES
2015-05-15 11:20:25.018 CasaDoBicho[2416:416771] Unlimited access to network resources
2015-05-15 11:20:25.701 CasaDoBicho[2416:416771] Resetting plugins due to page load.
2015-05-15 11:20:26.175 CasaDoBicho[2416:416771] Finished load of: file:///Users/rodrigo/Library/Developer/CoreSimulator/Devices/5CA96D3E-95B3-4D69-922C-597794D9E0EE/data/Containers/Bundle/Application/5922AD8E-FE80-4D20-9663-A32AAA10A5F3/CasaDoBicho.app/www/index.html#/login
2015-05-15 11:20:27.331 CasaDoBicho[2416:416771] Setting the WebView's frame to {{0, 0}, {375, 623}}
2015-05-15 11:20:27.342 CasaDoBicho[2416:416771] THREAD WARNING: ['InAppBrowser'] took '88.574951' ms. Plugin should use a background thread.

Being more precise.
The log I posted was the emulator's log.
For some reason, it does not show the error shown by the second alert(), which is "Problem authenticating".
Running at the device, the Xcode console shows more information. It shows:
webView:didFailLoadWithError - -1004: Could not connect to the server.

It makes no sense for me.

I solved!! The problem is not the ngCordovaOauth.
What was happening is that Facebook was returning an error code instead of the access_token.
May I suggest changing:
                deferred.reject("Problem authenticating");

for:
              if ((event.url).indexOf("error_code=100") != 0)
                deferred.reject("Facebook returned error_code=100: Invalid permissions");
              else
                deferred.reject("Problem authenticating");

at facebook: function (clientId, appScope)

I assume you tested this and it works.  Want to submit a pull request so you get credit?

Yes. It works. Thanks very much.
Sure, I will do it.
Tks

@nraboy hi, i am able to get the access token successfully but the issue is before it reaches the success function in the loginservice, it shows a white page with error called "Webpage cannot be displayed with url - http://localhost/callback?#access_token=sdfsdf" and then it is getting redirected to the page which i have given in the success function

What repository are you using (ng-cordova or ng-cordova-oauth)?  Also, can you confirm that you're testing on a device or simulator WITHOUT using ionic serve, ionic view, ionic live-reload, or phonegap build?  The four of those will not work correctly.
Usually the webpage cannot be displayed errors happen with the providers that do not offer implicit grants, but Facebook and Google does.  Are you using a different provider?
Regards,

@nraboy i am using ng-cordova and i am using ionic view to test the app. but i found a work around for this problem by creating a callback file in the www directory so that it cant display webpage not found but this is not a correct fix i guess plz help

Sorry, but I told you ionic view will not work correctly.  I also asked to know which provider you're using, but you have not given me that information.

i am using $cordovaOauth provider to connect with facebook

The only thing I can recommend to you is to stop using Ionic View.  I clearly put in the README that it is not compatible.
Regards,

Hello I am using Cordova app using Visual Studio 2015 community and simply login in the app using google authentication it's pretty fine login is done by open it in new window (in mobile it open's browser) but after login it gives me the three pop up messages and than don't do anything.
The messages are (which are coming after login process and gives allow permission):

gap_init:2
gap:[null,"CoreAndroid","messageChannel","CoreAndroid237153815"]
gap:[null,"CoreAndroid","show","CoreAndroid237153816"]

by pressing these messages as "OK" it's just showing me my first page from where I logged in using Google and returned url after login is:
http://localhost:4400/?code=4/chL63O9SMzMFZGOlqcB9TFMVUFxWj0E4GYEuVFDQ3gM#.
My configured url settings in console.developers.google.com are:
Authorized JavaScript origins = localhost://4400:index.html
Authorized redirect URIs = http://localhost:4400
and when I am calling the api in that in redirect_uri I pass localhost://4400
I am supposed to go on the second page i.e. index2.html but no such process takes place after window gets popped up.
Where am I doing wrong please suggest me anyone as soon as possible. Thank you

Why are you specifying a port?  This is leading me to believe you are trying to use some serving technology like ionic serve or ionic view.  I cannot stress this enough, those are not compatible.  I also do not know what localhost://4400 is.
You need to set http://localhost/callback as your redirect_uri / callback


sqlalchemy

Current dependencies on/for this PR:

main

PR #5   👈

This stack of pull requests is managed by Graphite.


Add Leetcode #5 solution

Pull Request Template
Description
This PR adds the solution for Leetcode #5. Written in Javascript.
Make sure all below guidelines are followed else PR will get Reject:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code so that it is easy to understand
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] Any dependent changes have been merged and published in downstream modules

@lokendra1704 done.

Readme is not correctly updated

@GouravRusiya30 possible to tag it with hacktoberfest-accepted?


Add new docs-table class to style tables more consistently

This is a test
Description of the change:
Reason for the change:
Link to original source:
@ksigler7

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Feature/back end greetings app

Description
This pull request is dedicated to setting up and developing the backend API using Ruby on Rails for our Hello World application. The API is designed to provide a random greeting message that can be consumed by the front-end built with React.
Features

[x] Initialize a new Rails API project named hello-rails-back-end.
[x] Set up a Postgres database for data persistence.
[x] Create a table to store greeting messages, including 5 different greetings.
[x] Implement an API endpoint that fetches a random greeting from the database.

Requirements

[x] No linter errors. (Note: Styling-related linter configurations have been removed from the linter.yml file).
[x] Followed correct Gitflow.
[x] Documentation is written in a professional manner.

Ruby Requirements

[x] Adherence to Ruby best practices.

Additional Notes

[x] A link to the front-end React app is included in the README file.
[x] This PR should be reviewed along with the corresponding front-end PR.

How to Test

Clone this repository.
Run bundle install to install dependencies.
Run rails db:migrate to set up the database.
Run rails db:seed to populate the greeting messages.
Run rails s to start the development server.
You can use tools like Postman to test the API endpoint that fetches a random greeting.

Please review and let me know if any changes are required.
Greetings,
@ClaudiaRojasSoto

Thank you @VICTOR-CHUKWU!


[ NodeTool ] - Add option to skip adding to tool cache

When using the Node Tool Installer (Hosted VS2017) it takes:
2 secs - download package
5 secs - extract package
36 secs - caching tool
On hosted agents - I'm assuming the caching is entirely pointless.
Could we add an option to skip adding the tool to the cache?
node-tool-installer-log.txt

There is not the tool along with a tool cache.  When it's downloaded, it is written to the tool cache.  That is the tool that is downloaded.

It looks like what Bryan is saying is that is the time it takes to download the tool and caching it is a small part of that, I assume? Is this still an issue for ya @dylan-smith ?

Closing this one as I believe it's behaving as expected, as a part of tool acquisition.

@elbatk @bryanmacfarlane this still appears to be a problem IMHO.  I just ran the task again and while the total times were faster than when I opened this issue, the vast majority of the time is still spent copying to cache folder, which is useless on hosted agents.
These were the timings I got:
Download: 0.56s
Extract: 3.8s
Copy to Cache: 16.2s
@bryanmacfarlane I'm not sure what you meant by your previous comment.  Looking at the source it looks like there is a 2-step process: 1. Download/extract 2. Copy to cache dir.  It's the latter that is taking a long time and is unnecessary on a hosted agent.  Specifically in this file: https://github.com/microsoft/azure-pipelines-tasks/blob/master/Tasks/NodeToolV0/nodetool.ts
The download happens on line 136, the extract on line 161, and the copy to cache on line 171.  My suggestion is make line 171 optional so that it can be skipped on a hosted agent.
Log attached.
nodetool_installer_log.txt

Thanks for the data.  Re-opening for consideration.

Perhaps we can extract right to the cache folder and not diverge the cases ...?  @damccorm ?

@bryanmacfarlane @damccorm it sounds like if we can fix the increase in time for copying to cache, then adding an option to not cache would be obsolete. Let me know what you guys think and then we can reassign/rename this GHI.

@jtpetty I think this one is worth having someone investigate even though its been sitting a while


Screens 2.4 to 2.5 - UI Updates 40590111

https://freedcamp.com/dashboard/home/panel/task/40590111
[Screenshots]

Some CSS formats are missing. Can you please double-check?

It works in my side well. Please check this again

Have you tried with MAC? I have seen this issue on MAC OS

@muhadovic Please skip my previous message. I think i have found the issue


Add docker-build make target for repeatable Docker-based builds.

Overview
This adds an alternative build process that cross-compiles Pilosa in a Docker container. This is helpful in the case that a Linux-based build environment is desired and will become the default build process for Linux release builds.
Pull request checklist

[ ] I have read the contributing guide.
[ ] I have agreed to the Contributor License Agreement.
[ ] I have updated the documentation.
[ ] I have resolved any merge conflicts.
[ ] I have included tests that cover my changes.
[ ] All new and existing tests pass.

Code review checklist
This is the checklist that the reviewer will follow while reviewing your pull request. You do not need to do anything with this checklist, but be aware of what the reviewer will be looking for.

[ ] Ensure that any changes to external docs have been included in this pull request.
[ ] If the changes require that minor/major versions need to be updated, tag the PR appropriately.
[ ] Ensure the new code is properly commented and follows Idiomatic Go.
[ ] Check that tests have been written and that they cover the new functionality.
[ ] Run tests and ensure they pass.
[ ] Build and run the code, performing any applicable integration testing.

Good point about the golang version: I parameterized the docker image version, and I'll add instructions to the release process notes to run docker pull golang:latest prior to building release binaries.
I also added the docker-test target as you requested, but the tests actually fail in Docker because they are run as root, and there are some tests in holder_test.go that expect permission errors that are not triggered when run as root. Note the same failures occur when pilosa tests are run as root on my Mac as well.

ah yea... I actually knew about those test failures - surely we can fix that pretty easily by creating a new user and su'ing before running them?

Created #940 to capture the root test failures.


Container enrichment: add container PID

Container enrichment: add container PID

[X] Image-based gadgets :+1:
[x] Builtin gadgets :+1:

How to use
Read the runtime.ContainerPid field.
Testing done
[Describe the testing you have done before submitting this PR. Please include both the commands you issued as well as the output you got.]
Tested with command:
$ docker run -ti --rm --name test ubuntu sh -c 'cat /dev/null'

Output for image-based gadgets:
$ sudo ig run ghcr.io/inspektor-gadget/gadget/trace_exec:latest --fields runtime.ContainerName,runtime.ContainerPid,pid,comm,args -c test
RUNTIME.CONTAINERNAME     RUNTIME.CONTAINER…        PID COMM         ARGS
test                                 2911217    2911217 sh           /usr/bin/sh -c cat /dev/null
test                                 2911217    2911269 cat          /usr/bin/cat /dev/null

Output for builtin gadgets:
$ sudo ig trace exec -o columns=runtime.ContainerName,runtime.ContainerPid,pid,comm,args -c test
RUNTIME.CONTAINERNAME                                                                 RUNTIME.C… PID        COMM             ARGS
test                                                                                33748      33748      sh               /usr/bin/sh -c cat /dev/null
test                                                                                33748      33770      cat              /usr/bin/cat /dev/null

Fixes: https://github.com/inspektor-gadget/inspektor-gadget/issues/3467

@blanquicet Thanks for the review! I struggle to make the tests in pkg/container-utils/runtime-client/runtimeclient_test.go pass and I see you wrote those tests initially. Following Mauricio's request to remove the duplicate field, I tried to initialize the ContainerPid field in:

pkg/container-utils/containerd/containerd.go
pkg/container-utils/docker/docker.go
pkg/container-utils/podman/podman.go
pkg/container-utils/runtime-client/runtimeclient_test.go

But I am not sure if it should be done for GetContainer, GetContainerDetails and GetContainers, or only some of them, or none of them. Do you know?

But I am not sure if it should be done for GetContainer, GetContainerDetails and GetContainers, or only some of them, or none of them. Do you know?

Oh, I see. GetContainer and GetContainers return ContainerData which doesn't contain the container PID. It's because getting that PID, in some of the runtime implementations (e.g., CRI and Docker) requires an extra gRPC call that we didn't want to do because PID is not always required. For cases where PID is required, ContainerRuntimeClient's consumers use GetContainerDetails, which makes that extra gRPC call to retrieve the PID from the runtime.
Following that logic, ContainerPid should only be set on GetContainerDetails. However, now that you're moving the PID into BasicRuntimeMetadata, it implicitly goes into ContainerData, and it's not correct that consumers calling GetContainer and GetContainers will now have access to ContainerData.Runtime.ContainerPID but it'll be always empty.
Only one simple solution came to my mind is to prevent ContainerData from re-using BasicRuntimeMetadata. In this way, your change on BasicRuntimeMetadata will not affect ContainerData thus, GetContainer and GetContainers will continue not returning the PID. However, it also implies that:

Every time we add something to BasicRuntimeMetadata, we will need to manually add it into ContainerData... But that's fine, we should only add things to ContainerData once the ContainerRuntimeClient supports it.
We'll have to copy the fields one by one when enriching containers with ContainerData, but we are already doing that to ensure we don't set empty fields.

So, it seems fine to decouple BasicRuntimeMetadata from ContainerData. WDYT?

Thanks @blanquicet for the help!
The tests finally pass.
@mauriciovasquezbernal Do we need something for the FOSSA hooks, or could I merge this?

I resolved the conflict with #3600.

@mauriciovasquezbernal Do we need something for the FOSSA hooks, or could I merge this?

I see they're passing, probably it was a temporary false positive.


update default Control position to match leafdoc

It looks like after merging the :fallen_leaf:doc changes, the Zoom control is appearing on the topright.  I fixed this by adjusting the default position on L.Control to match what :fallen_leaf: doc says is the default.  However, I wonder if it might be best to also restore an explicit position: "topleft" in L.Control.Zoom.

Shouldn't we change the documentation instead? Just wondering.

I'm fine either way as long as we get the zoom control back to the top left (in master it's on the top right).  This PR is essentially a followup to 560e73bac54624df89d01be45cf0a77bc09f94fe - which had two relevant changes:

Removed position: "topleft" from Control.Zoom.js, making it fall back to the default in Control.js
Added :fallen_leaf:doc to Control.js indicating the default was topleft (but left the actual default as topright)

Taken together, I assumed that you had intended for topleft to become the new default, which makes sense to me.  For backwards compatibility, however, it might make sense to keep topright as the default in Control.js (changing the docs) and restore the topleft override in Control.Zoom.js.

I think we should keep the default behavior. The Leafdoc commit wasn't intended to change the code I think.

Just to clarify it (wasn't clear to me till I checked it out):

0.7, beta1, beta2 had zoom control on top left by default
master has zoom control on top right by default now

So task is to move master back to top left, is that right?

Yes, default for L.Control.Zoom should be topleft, and default for L.Control should be topright. Changing the defaults would likely cause trouble or at least annoyance when upgrading.

If we want to avoid any breaking change, my suggestion is to:

keep L.Control defaulting to topright, and update the doc accordingly
add back position: topleft for L.Control.Zoom

@sheppard are you around to make that change or should I go for it? We indeed need to fix that for rc-1 release.

@perliedman race condition :p


Update Add your name and technologies you are interested in.md

I am Interested on Affiliate Marketing
Accept my pull request

Thanks


fix: Metadata naming_convention registration in combination with regi…

…ster_sqlalchemy_events.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>0
Details

17 of 17 (100.0%)  changed or added relevant lines in 3 files are covered.
No unchanged relevant lines lost coverage.
Overall first build on dc/view-naming-convention at 90.111%

Totals

Change from base Build<PHONE_NUMBER>6:
90.1%

Covered Lines:
3494

Relevant Lines:
3808

💛  - Coveralls


I want to add my Webpage to the specific Website.

I have created a Cool Template about Gaming Website and also want to add up that to this project.
Vishwesh Deshpande,
I'm GSSoC'2022 Contributor.
Kindly assign me this work.

I have created a Cool Template about commercial website and also want to add up that to this project.
Dhananjay Sharma
Participant GSSOC'22

You wish! 😃 @VidhiBhatt01

??
you can attach whatever you find comfortable

I have created a Cool Template about commercial website and also want to add up that to this project. Dhananjay Sharma Participant GSSOC'22

make a new issue


Grundig GDSP5470DXSCH extractor hood supported?

I guess this extractor hood is not yet supported?
in my Android app, I can use the homewhiz app via wifi to control the extractor hood.
I have managed to add this via the cloud connection to home assistant, but as expected the buttons are greyed out as this device isn't supported.
I am using proxmox and have installed home assistant via the helperscript (I think it is called)
How do I go further?

home-assistant_homewhiz_2024-05-23T21-00-09.045Z.log

Thanks for bringing this up. While I am not sure whether extractor hoods are supported, this could also be related to #216 .

Can you try the latest beta version and see if anything has changed? Thanks!

Thank you very much.
I downloaded version 0.0.6
Deleted my old extraction fan, because I had forgotten the password.
In the app for the phone, i clicked forgot password.
On computer I clicked password link. And created new password.
Use app to connect with new password, works.
In home assistant in Homewhiz i connet, email+password. Device gets conneted and installed.
Hurra i can switch light on/off
I can switch fan on and change level, and switch off.
Thank you my little test succes

Works, close issue

Thanks!


docker-compose up windows 10 pro error

Current behavior
When following the Windows Installation guide Im getting the following error at the point when running docker-compose up
ERROR: Service 'es1' failed to build: Get https://docker.elastic.co/v2/: dial tcp: lookup docker.elastic.co on <IP_ADDRESS>:53: no such host
Expected behavior
docker-compose up should run successfully
Environment details

OS: Windows 10 Pro
Node: 10.13.0
Docker 18.09.0, build 4d60db4

Additional information
I've installed docker for windows and have access to the GUI. running docker --version givens me the current version. I'm very new to Docker so its a bit confusing.

This seems like an issue not rated to Vue Storefront itself but rather Docker (seems like it can not download some images)

Changing the docker Daemon registry to localhost:5000 seemed to have fixed the problem. This is not a good solution but it works.


Unknown package(s): ui.designer

Hi, when i use zebra in development mode in angular 2 everything is fine. But using it in production mode i get "Unknown package(s): ui.designer" error.
i use import statement as

eval(zebra.Import("ui", "layout", "ui.designer"));

i think if i give a reference "ui.designer" as "design" it also run in production mode.
at this moment, is there a way which i can  describe "ui.designer" as zebkit version does

zebkit.require("ui", "ui.design", function (ui: any, design: any) {}

i open subject a little more, we extend ui.designer package in zebra_designer.js file (as shaperpan2, borderpan2 with ui.designer) and use load both zebra.js and zebra_designer.js file. i call eval(zebra.Import("ui", "layout", "ui.designer")); and use zebra.ui.designer.ShaperPan2(...) no error in locale, but it gives error in prod mode in server.

Hi, after a little more search we detacted that the error is "Invalid constraints: null" which zebra.js line 2374.
it occur while defining shaperpan as shaperpan2 changing normal shape view as:

the sample code is belove:
function (t){
        this.outPanel = new zebra.ui.Panel();
        this.middlePanel = new zebra.ui.Panel();
        this.outPanel.setLayout(new zebra.layout.BorderLayout(0,3));
        this.middlePanel.setLayout(new zebra.layout.FlowLayout(zebra.layout.RIGHT, zebra.layout.TOP));

        this.middlePanel.add(this.editIcon);
        this.middlePanel.add(this.deleteIcon);
        this.editIcon.setVisible(false);
        this.deleteIcon.setVisible(false);

        this.outPanel.add(zebra.layout.TOP,this.middlePanel);
        this.outPanel.add(zebra.layout.CENTER,t);

        this.add(this.outPanel);
}

and
function focused(){
      this.$super();
      this.shaperBr.color = this.colors[this.hasFocus()? 1 : 0];
      this.deleteIcon.setVisible(this.hasFocus());
      this.editIcon.setVisible(this.hasFocus());
      this.deleteIcon.repaint();
      this.editIcon.repaint();
      this.middlePanel.repaint();
      this.repaint();
    }

is there an offer how can fix it, the code run in dev mode but not run in prod mode.

problem solved with adding zebra.layout.CENTER when adding an item to panel


tablesHeaderId or tableHeaderId?

In the documentation and readme.md it is written tablesHeaderId but in code it is checked for tableHeaderId (without plural suffix 's')

The bug is in the code, rather than in the documentation.

should be fixed now


Allow to configure chroot command

Allow the chroot command to be configured to something other than "chroot".

What do these changes do?
With this change the chroot command used by exec_helpers can be configured at runtime.
The intended use case is to make it possible to replace the default chroot command with an alternative that makes /proc available in the chrooted environment. Go binaries fail to execute properly otherwise.

Are there changes in behavior for the user?

Related issue number

Checklist

[x] I think the code is well written
[ ] Unit tests for the changes exist
[ ] Documentation reflects the changes

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

13 of 55 (23.64%)  changed or added relevant lines in 4 files are covered.
2 unchanged lines in 2 files lost coverage.
Overall coverage decreased (-0.7%) to 55.058%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

exec_helpers/_helpers.py
1
2
50.0%

exec_helpers/_ssh_base.py
1
3
33.33%

exec_helpers/api.py
11
25
44.0%

exec_helpers/async_api/api.py
0
25
0.0%

Files with Coverage Reduction
New Missed Lines
%

exec_helpers/api.py
1
55.07%

exec_helpers/async_api/api.py
1
0.0%

Totals

Change from base Build<PHONE_NUMBER>:
-0.7%

Covered Lines:
1075

Relevant Lines:
1961

💛  - Coveralls


Mixed content (such as GIFs) doesn't show

Log in console:
Mattermost:  Mixed Content: The page at 'https://mattermost.example.com/foo/channels/sandbox' was loaded over HTTPS, but requested an insecure image 'http://i3.kym-cdn.com/photos/images/newsfeed/000/288/648/776.gif'. This request has been blocked; the content must be served over HTTPS.

There were a lot of new features with Electron v0.36 rolled out that might allow us to implement a fix for this without disabling security.  I'm going to dig around a bit and see if I can get something working.

If you set the proxy settings via chrome-args, this might work now.

chrome has a --allow-running-insecure-content flag. sadly electron doesn't seem to support it https://github.com/atom/electron/blob/master/docs/api/chrome-command-line-switches.md

Actually it does. See https://github.com/HackerHappyHour/matterfront/pull/41
We have other ways to support the proxy in progress, aND we now also have support for the --no-proxy flag.

Progress?

Nope!  See comments here.


Uploading Large File on Slow Connection Trashes Network

Storage Explorer Version: 1.6.2
Platform/OS: Win 10
Architecture:  x64
Bug description
Trying to upload a 650M file to Blob storage over a DSL connection that is about 1Mbs upload and 6Mbps down. As soon as I start the operation my internet connection becomes worthless.  VNET connection to Azure drops out on just about every attempt to upload the file.  Task manager shows outgoing data running about 1Mbps and little to no incoming traffic.
I initially thought I was having internet connectivity issues due to the download link being so slow and VNET dropping. I reset my DSL modem and continued having issues. Explorer shows no progress so doesn't tell me anything. After stopping and retrying things a few times I finally discovered the issue was being caused by uploading the big file in Azure Explorer. I tried on smaller files and seemed to not be an issue, I only tetsed up to a 25Mg file size since it takes so long.
I then used FTP to upload the file to an Azure VM and worked as expected, took a long time and did not effect incoming data speed a bit, Azure VNET stayed connected.
Expected Experience
Would expect my network to work while uploading a large file.

I am working at the office today and brought down the whole office internet connection when uploading a big file to Azure storage. You guys seem to have some kind of serious issue here.

I had same results using AzCopy

Hm. Seems like the problem is more than just a Storage Explorer problem. The only possible fix I can think of, then, is to provide a setting that limits the bandwidth Storage Explorer uses, as we mentioned above. What upload/download speeds does your ISP supply?

Uploading a file should not trash the RECEIVE connection. At the office we have a 50MBPs receive connection. No one can work (browse) when I try to upload a 1Gb file. Network monitor shows my outgoing data running from 5-10Mbps and receive traffic negligible, yet no one else in the office can browse the internet.
I can see no one being able to upload stuff if ASE is maxing out the upload link but it should not trash the incoming/receive internet connection.

That is really weird. Strange that AzCopy does that also, which again suggests the problem is bigger than just Storage Explorer.
Can you get a Fiddler trace for us? That can tell us more about what's going on with receiving connection during the upload.

I am familiar with Fiddler but what do I do to 'get us a Fiddler trace' ?

I tried AzCopy again after learning about the /NC option. If I set this to 1 AzCopy does not trash internet connection.

For Fiddler, all you really need to do is install and watch the feed for requests/responses sent to Storage Explorer. It can get a little noisy, so you should be able to filter them.
What version of AzCopy did you use where the /NC option worked for you? We'll need to make sure it's the same version Storage Explorer is using so we can leverage that.

AzCopy 6.2.0

Ok ok. Did some research. Talked to some people. First, uploading too much can definitely saturate your network to the point that downloads get super slowed down. Second, @schellem , the version of AzCopy you are using is the current/soon to be old version. AzCopy is being rewritten to be more performant/better/etc. and that's the one Storage Explorer uses. You can find more info here: https://github.com/Azure/azure-storage-azcopy
Anywhos, let's try doing this for you:

Close Storage Explorer
Run your preferred text editor as admin
Open up "C:\Program Files (x86)\Microsoft Azure Storage Explorer\resources\app\node_modules\se-az-copy\dist\AzCopyClient.js" (if you installed to a different location, then beginning of the path will be different for you)
Add a new line after 27 with the following: envVars.AZCOPY_CONCURRENCY_VALUE = 1; It should look something like this:   You can modify the 1 to any integer, and keep changing it over time to try and find a value which is a good for your machine/network.
Save the file, and try doing your upload test.

Let me know is this works for you.

Thanks I will try that.  I am unfortunate to live out in the country and can only get a 6M down and 1M up DSL connection. When working at the office last week I trashed our small office network as well when using ASE, it has more like 50M down and 10M up. I will say I had a number of folks mad at me after trashing 2 online conferences while attempting to upload a SQL backup.
Is this something unique to my machine? What kind of network do you need for this to not happen? If it were common I would think you have a lot more complaints but maybe you don't have many users who upload big files.

Does not appear to help unless there is a .JS cache issue, I did stop and restart ASE. I set to 1 as I did with AzCopy but I still see network send spend around 1Mbs, when I used 1 with AzCopy network  send speed was running about half that. When I test that and tell ASE to cancel it really doesn't seem to do anything, I can even close the app and see send speed stay running at 1M for a minute or 2 and floats down. I can't add my image here as my upload is still maxed out, let my try image again

@schellem Just making sure, did you have AzCopy turned on for blob transfers?
We're not positive on what's happening. Your internet speeds are definitely on the low edge of the spectrum. Generally, we expect most users to have maybe 15-20 Mbps down. We're investigating with the AzCopy folks to see if there's a solution.

Ok, another idea. I haven't heard back from AzCopy folks yet, but @schellem mentioned this didn't happen for small files. Maybe it's possible we need to vary the block size as well. Here's how to do that:

Close Storage Explorer

Run your preferred text editor as admin

Open up "C:\Program Files (x86)\Microsoft Azure Storage Explorer\resources\app\node_modules\se-az-copy\dist\AzCopyClient.js" (if you installed to a different location, then beginning of the path will be different for you)

Add a new line after 73 with the following:

You can modify the 8 to any integer, and keep changing it over time to try and find a value which is a good for your machine/network.

Save the file, and try doing your upload test.

When I did a test, concurrency 1, default block size (aka not specifying it), I got a speed of about 130 Mbps. When I did a test, concurrency 1, block size of 8, I got a much slower speed (will update with an exact number once AzCopy reports one back....but the fact it hasn't I believe mean's it is going much slower.

Also, I'm not sure what unit the number we're giving to block-size is. I want to say it is bytes? So the value we want for your network might be more in the 100s or 1000s.

Sigh. Modifying block size will be tricky without knowing the unit for that flag. You can read more about blocks here: https://docs.microsoft.com/en-us/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs#about-block-blobs

@craxal I only used the /NC option for AzCopy, I didn't look for a blob transfer option.
Very bad idea to expect folks to have a certain speed network. That being said as I reported ASE trashed our office network as well which has speeds I measured of about 10M up and 50M down

@schellem , @craxal was trying to make sure you had AzCopy enabled in Storage Explorer. If you didn't, then the code change wouldn't work. You'll know it is if you see this in the Activity Log on startup:

Also, I talked more to the AzCopy team. They said that if setting the concurrency to 1 does not slow it down enough for you, then there's not currently a way to make it slower.
The final thing we can try is to slow down our JavaScript version of upload:

Close Storage Explorer
Run your preferred text editor as admin
Open up ""C:\Program Files (x86)\Microsoft Azure Storage Explorer\resources\app\out\app\renderer\JobHandlers\Blob\Services\UploadOperation.js"" (if you installed to a different location, then beginning of the path will be different for you)
Change line 54 to be return 1:

Save the file
Reopen Storage Explorer
Make sure AzCopy is disabled

Try your upload

I'll look at some of these settings after bit.
Still seems like somebody is missing something here on the "only us this many Mbps" thing. When uploading a large file and we have the incoming 50Mbps network getting trashed I am seeing very little network receive activity in Task Managers Performance tab on my machine. It makes no sense why others can't use the network or at least use a browser because I'm uploading a file even if it may be consuming a lot of uplink bandwidth.
What would this "only us this many Mbps" setting do? Set a max upload bandwidth? I wouldn't expect upload bandwidth to effect download bandwidth. When I upload large files with FTP it may slow down others wishing to do uploads but I've never had any complaints about network speed, it does not knock out online conferences.

@schellem , here are some more information on why uploading can affect your download speeds:
https://www.quora.com/When-I-upload-something-will-my-download-speed-be-affected-by-this-and-be-slower
https://forums.tomshardware.com/threads/internet-is-really-slow-when-i-am-uploading-something.934129/
https://www.quora.com/Does-upload-speed-ever-interfere-with-download-speed
If we had the ability to throttle AzCopy/Storage Explorer, we could prevent your upload pipe from getting so stuffed.

@MRayermannMSFT thanks that is what I was missing. Sounds like this should have a very high priority to resolve.
I can understand ASE taking down my out in the country slow DSL link but being that it takes down a network that has an uplink speed of 5-10Mbps seems very significant to me. I would call 5-10Mbps uplink speed very typical for a non enterprise type internet connection.
I will say as I am trying to introduce Azure here at my company, everybody is now scared of using Azure storage since we don't have a way to access it.

If you're looking for other ways to access Azure Storage, you can also use the Azure Portal, which recently introduced a web version of Storage Explorer:

The Azure CLI should also allow you to upload and download from Storage.
There are also 3rd party tools which allow you to access Azure Storage in a manner similar to how you connect to a service such as OneDrive, Dropbox, etc. I don't think I should be reccomending any though, so you'll need to look for those on your own. 😋
Finally, if what you're looking for is a better way of sharing files in an office, you might even want to consider a higher level solution, such as OneDrive or Sharepoint. Azure Storage is definitely meant more for applications to use, so for example, OneDrive (I believe) is built on top of Azure Storage. If you need help finding a solution to y'all's needs, let me know and I can try to find someone from Microsoft to email you who is more experienced in that sort of thing.

I'm seeing this issue as well, trying to upload a 1.7GB file to blob storage using storage explorer 1.6.2 with azcopy. azcopy maxes out CPU on one core and makes internet useless, I have a 1Gbps fiber connection, but using Wifi on top, so it is of course limited by that. Seems like a very serious problem with azcopy regardless of explanation; the use-case is very simple for the end-user; upload a file and it should't need a long explanation why you can't do that :) and why it will trash your internet for the duration of the upload

Possibly related to https://github.com/microsoft/AzureStorageExplorer/issues/13

I can confirm that this is an issue for our office with 60Mbps up/down.
Azure storage explorer upload or download will cause DNS resolution for other staff members to suffer, including taking our managed WiFi controllers offline. One might argue there needs to be QoS in place but only Azure storage explorer seems to cause this issue.
We have not tried the AzCopy feature yet - next on the list.

I had a similar issue today. Uploading a 420GB file to a blob using AzCopy saturated the upload thus download suffered. This is because its using 100% of the upload link, your TCP ACK's are unable to get through which triggers the remote webservers etc to resend packets etc and thus this repeats over and over. The biggest feature Storage Explorer needs is to set the bandwidth limits. using ~80% of each direction (i.e on a 100mbps link, set it to 80mbps when uploading) wont stop your return packets being lost and your normal browsing etc will be fine. Naturally in a situation like this if another user is also trying to upload at the same time, well you may well face the issue again.

This will be a part of the work of #1147 . Since we are adding throughput control, you can limit your transfer rate.

@JasonYeMSFT I'm making use of this setting, to prevent exactly the same problems that the OP found, so first off thanks for solving this.
I'm sure that in the documentation that first clued me into this I read that this field accepted decimals, e.g. I could specify "1.5" to use the majority of my 2Mbps uplink without saturating it.
But when I try to set that value, it isn't at all happy. I get an error with details: {"message": "UnexpectedQuit" }. Setting it to "1" works just fine.
Are decimal values for the transfer cap supposed to be supported?
If yes, then I'll raise a separate issue for "They don't work for me".
If no, then is it viable to add support for that? If not, then I think it's worth adding a note into the field docs in the settings screen - all the other Transfer Settings explicitly spell-out the range of valid inputs.

@Brondahl, the decimal numbers should be supported. I have tried with various decimal numbers and haven't seen any problem. Are you setting Maximum transfer rate to be 1.5? Could you please retry the failed transfer and share the log file with us? You can find the log file either via the Go to AzCopy log file or go to the az copy log file directory and get the latest log file.
The AzCopy directory is:

Windows: C:/users/your username/.azcopy
macOS: ~/.azcopy

By the way, please open another issue with the bug template and any additional information instead of replying here. That way, we can better track it and put it in a future milestone.

I have the same issue while using the latest version of AZCopy.  Can you tell me how I use the equivalent of /NC:1 with this newer version of AZCopy please?

@LawrieBoarer If you are using Storage Explorer, you configure those settings in Settings -> Transfers -> AzCopy. If you are using just AzCopy, you can type --help to see the options.

Dear Github,
I am using AZCopy.  It keeps giving pipeline error 157 too.
Is storage explorer a more user friendly way perhaps.  I find the AZcopy help to be nearly impossible to read whilst on remote access to the server?
Lawrie
From: JasonYeMSFT @.>
Sent: 07 July 2021 17:45
To: microsoft/AzureStorageExplorer @.>
Cc: Lawrie Boarer @.>; Mention @.>
Subject: Re: [microsoft/AzureStorageExplorer] Uploading Large File on Slow Connection Trashes Network (#1099)
@LawrieBoarerhttps://github.com/LawrieBoarer If you are using Storage Explorer, you configure those settings in Settings -> Transfers -> AzCopy. If you are using just AzCopy, you can type --help to see the options.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/AzureStorageExplorer/issues/1099#issuecomment-875760672, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKFJ2MMOYFY3TUXXFVL2ADTTWSACBANCNFSM4GTDQGWA.

Noticed  this same internet trashing with ASE 1.25.0 (snap on ubuntu 22.04) with the default settings when copying files/blobs within a storage account (so no uploading from local). Was thinking local bandwidth should not be important then. This is weird; if I monitor my network, bandwidth usage is way below the limit I set, and the limit is apparently used for the remote transfer (transfer speed displayed by ASE), but somehow without a limit my internet connection breaks down...

@matthiasdg If your network connection is getting thrashed, that would suggest a copy is not happening server-side. Can you examine your network traffic confirm whether that's actually true? Do you see lots of Get Blob and/or Put Blob requests?


Bazel Build failed

(D:\Anaconda3\envs\pythonREnv) D:\Anaconda3\share\jupyter\nbextensions\facets-master>bazel build facets:facets_jupyter
.....................
DEBUG: C:/users/ganes/appdata/local/temp/_bazel_ganes/teuucrii/external/bazel_tools/tools/cpp/lib_cc_configure.bzl:37:3:
Auto-Configuration Warning: 'BAZEL_VC' is not set, start looking for the latest Visual C++ installed.
DEBUG: C:/users/ganes/appdata/local/temp/_bazel_ganes/teuucrii/external/bazel_tools/tools/cpp/lib_cc_configure.bzl:37:3:
Auto-Configuration Warning: Looking for VS%VERSION%COMNTOOLS environment variables,eg. VS140COMNTOOLS
DEBUG: C:/users/ganes/appdata/local/temp/_bazel_ganes/teuucrii/external/bazel_tools/tools/cpp/lib_cc_configure.bzl:37:3:
Auto-Configuration Warning: Visual C++ build tools found at C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC
INFO: Analysed target //facets:facets_jupyter (163 packages loaded).
INFO: Found 1 target...
ERROR: D:/anaconda3/share/jupyter/nbextensions/facets-master/facets_dive/lib/BUILD:29:1: Compiling 4 TypeScript files //facets_dive/lib:data-example failed (Exit 1)
Traceback (most recent call last):
File "D:\Anaconda3\envs\pythonREnv\lib\site.py", line 547, in
main()
File "D:\Anaconda3\envs\pythonREnv\lib\site.py", line 542, in main
os.environ["PATH"])
File "D:\Anaconda3\envs\pythonREnv\lib\os.py", line 669, in getitem
raise KeyError(key) from None
KeyError: 'PATH'
Failed to import the site module
Target //facets:facets_jupyter failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 354.135s, Critical Path: 5.57s
FAILED: Build did NOT complete successfully

I had to set use_default_shell_env = True in ctx.action as documented here in another project using bazel to overcome this problem.

+1

@ganesh3 hi have you solved this problem?

Nope.
Regards
Ganesh Bhat
On Tue, Aug 27, 2019, 06:06 sun ao<EMAIL_ADDRESS>wrote:

@ganesh3 https://github.com/ganesh3 hi have you solved this problem?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/PAIR-code/facets/issues/96?email_source=notifications&email_token=AAHML5BOCVKJXHVK4PEEOBTQGRZHNA5CNFSM4EH3IKLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5GC4XY#issuecomment-525086303,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAHML5B2HNCPOR2DAFCCSJ3QGRZHNANCNFSM4EH3IKLA
.


Create master data tables

Create separate tables for all activity data and energy data to document all primary data sources in spreadsheet, including the relevant API, if available.
An example for activity data:

Activity
Units
Source
API
Notes

Single family homes
Number of occupied units
American Housing Survey (Census)
No AHS API? Need to verify. https://www.census.gov/programs-surveys/ahs/data.All.html
Spreadsheet references 'D:\Indicators - Residential - 2020[AHS_summary_results_022320.xlsx], which we don't have

Running list of data files missing from PNNL (need to get from Katie)
It looks like all missing spreadsheets were included in 7/2/2020 data dump from Katie.

@iisabeller I just got the complete set of spreadsheets from PNNL and uploaded the zip file (mtdownload7501_2020.07.02_16.22.zip). From what I can tell, we now have all of the missing spreadsheets.
Also, this is the EIA API wrapper I mentioned this morning: https://github.com/mra1385/EIA-python.


Is it possible to commit changes with probot?

Let's assume that I want to perform and commit some changes in repo after every commit. Is it possible with probot? If so, then how?
P.S: This might be useful for things like linters and formaters.

It is possible! You'll want to take a look at the GitData API, or the updateFile endpoint for repositories.
If you have any more questions, feel free to join our Slack channel!


Ensure correct handling of escaped semicolons in multi valued attributes

From @bradleybeddoes:

Per https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPAttributeAccess
Within each CGI variable or header (see below), multiple attribute values are separated
by a semicolon, and semicolons in values are escaped with a backslash. The data should
be interpreted as UTF-8, which is a superset of ASCII.

Thus somelong\;value;another long value would currently be incorrectly parsed. It should fall out as ['somelong;value', 'another long value'].

Solved by #12


Transpiled code warning

Detect transpiled code by using a median of function name length and provide warning to the user. Also checks file for a source map comment.

Also, this needs tests.


[ci] New programming environments for Kesch

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@52b083c). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #432   +/-   ##
=========================================
  Coverage          ?   91.21%
=========================================
  Files             ?       70
  Lines             ?     8585
  Branches          ?        0
=========================================
  Hits              ?     7831
  Misses            ?      754
  Partials          ?        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 52b083c...5860818. Read the comment docs.


Feature: adding Missing emulsify_twig module and Updating Components module

issue: #73
When you are generating / installing your new sous project the emulsify cli is throwing some errors, becaure there are modules missing from its required config , so I'm adding this missing modules here for the drupal distro.
The missing modules were:

components (it is marked as missing but it is present , but I'm upgrading it )
emulsify_twig

:tada: This PR is included in version 4.1.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


results on OTB

Hi, I'm wondering siammask's performance on OTB.  I evaluated on OTB100 using siammask-3B bbox branch output with siammask_vot.pth with tracking parameters same as DaSiamRPN but only got 0.629/0.844 with AUC/Prec. Is this intrinsic or because of sensitivity to the hyper-paramerters?
Thanks for your time.

Dear shallowtoil,
How I test on OTB by this codes, thanks~


Please remove 1.4.2 builds 0 and 1

Solution to issue cannot be found in the documentation.

[X] I checked the documentation.

Issue
It is currently possible to install incompatible pytz/python-dateutil dependencies, for example using: conda create -n test "pandas==1.4.2" "pytz<2020.1"
For how to do this, see: https://conda-forge.org/docs/maintainer/updating_pkgs.html#removing-broken-packages
Installed packages
bzip2              conda-forge/osx-64::bzip2-1.0.8-h0d85af4_4
  ca-certificates    conda-forge/osx-64::ca-certificates-2022.6.15-h033912b_0
  libblas            conda-forge/osx-64::libblas-3.9.0-15_osx64_openblas
  libcblas           conda-forge/osx-64::libcblas-3.9.0-15_osx64_openblas
  libcxx             conda-forge/osx-64::libcxx-14.0.6-hce7ea42_0
  libffi             conda-forge/osx-64::libffi-3.4.2-h0d85af4_5
  libgfortran        conda-forge/osx-64::libgfortran-5.0.0-9_3_0_h6c81a4c_23
  libgfortran5       conda-forge/osx-64::libgfortran5-9.3.0-h6c81a4c_23
  liblapack          conda-forge/osx-64::liblapack-3.9.0-15_osx64_openblas
  libopenblas        conda-forge/osx-64::libopenblas-0.3.20-openmp_hb3cd9ec_0
  libzlib            conda-forge/osx-64::libzlib-1.2.12-hfe4f2af_1
  llvm-openmp        conda-forge/osx-64::llvm-openmp-14.0.4-ha654fa7_0
  ncurses            conda-forge/osx-64::ncurses-6.3-h96cf925_1
  numpy              conda-forge/osx-64::numpy-1.23.0-py310ha3f357c_0
  openssl            conda-forge/osx-64::openssl-3.0.5-hfe4f2af_0
  pandas             conda-forge/osx-64::pandas-1.4.2-py310h514ec25_1
  pip                conda-forge/noarch::pip-22.1.2-pyhd8ed1ab_0
  python             conda-forge/osx-64::python-3.10.5-hdd68b96_0_cpython
  python-dateutil    conda-forge/noarch::python-dateutil-2.8.2-pyhd8ed1ab_0
  python_abi         conda-forge/osx-64::python_abi-3.10-2_cp310
  pytz               conda-forge/noarch::pytz-2019.3-py_0
  readline           conda-forge/osx-64::readline-8.1.2-h3899abd_0
  setuptools         conda-forge/osx-64::setuptools-63.1.0-py310h2ec42d9_0
  six                conda-forge/noarch::six-1.16.0-pyh6c4a22f_0
  sqlite             conda-forge/osx-64::sqlite-3.39.0-hd9f0692_0
  tk                 conda-forge/osx-64::tk-8.6.12-h5dbffcc_0
  tzdata             conda-forge/noarch::tzdata-2022a-h191b570_0
  wheel              conda-forge/noarch::wheel-0.37.1-pyhd8ed1ab_0
  xz                 conda-forge/osx-64::xz-5.2.5-haf1e3a3_1
  zlib               conda-forge/osx-64::zlib-1.2.12-hfe4f2af_1

Environment info
active environment : base
    active env location : /Users/chrisjsewell/opt/miniconda3
            shell level : 1
       user config file : /Users/chrisjsewell/.condarc
 populated config files : /Users/chrisjsewell/.condarc
          conda version : 4.13.0
    conda-build version : 3.21.9
         python version : 3.8.13.final.0
       virtual packages : __osx=10.15.7=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /Users/chrisjsewell/opt/miniconda3  (writable)
      conda av data dir : /Users/chrisjsewell/opt/miniconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/osx-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/osx-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/osx-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /Users/chrisjsewell/opt/miniconda3/pkgs
                          /Users/chrisjsewell/.conda/pkgs
       envs directories : /Users/chrisjsewell/opt/miniconda3/envs
                          /Users/chrisjsewell/.conda/envs
               platform : osx-64
             user-agent : conda/4.13.0 requests/2.28.1 CPython/3.8.13 Darwin/19.6.0 OSX/10.15.7
                UID:GID : 501:20
             netrc file : None
           offline mode : False

The same with 1.4.1 😬

Is the issue just with the dependency metadata? If so, that's covered by

If the only issue is in the package metadata, we can directly patch it using the repo data patches feedstock. Please make a PR there to add a patch. In order to ensure future versions have the required changes, you also need to change the recipe to reflect the metadata changes.

from https://conda-forge.org/docs/maintainer/updating_pkgs.html#removing-broken-packages.

Thanks for the quick reply!

Is the issue just with the dependency metadata?

I guess so. Just whatever stops the conda "dependency solver" from installing broken builds 😅

Created: https://github.com/conda-forge/conda-forge-repodata-patches-feedstock/pull/293


[APIM-3.2.0]-SP is not created in the carbon management console for non-admin users

Description:
When a non-admin user creates an application and generates the application keys via devportal or REST API calls the keys are generated successfully. The role is created and assigned to the correct user but the relevant SP for the application is not created in the carbon management console. This was tested in the latest wum pack of wso2am-3.2.0 and the deployment was an all-in-one pack.
Steps to reproduce:

Create a user named "demo" in the carbon management console and assign Internal/everyone and Internal/subscriber roles.
Create an application in the devportal via devportla UI or through the REST API call.
Generate application keys and access tokens for the application via devportal or REST API call.
Navigate to carbon management console --> Main --> Service Providers --> List
There won't be an SP created for the application with a non-admin user.

Affected Product Version:
wso2am-3.2.0

This is the expected behavior.


Cache housekeeper can panic (seen after 50M+ insertions)

I wrote a script to try and expose a different issue I thought might be caused by moka and encountered an unhandled panic. This happened somewhere between 54.8M and 54.9M insertions. I was asynchronously inserting items from a bunch of tasks to try and replicate the behaviour of our real-world system.
The panic I saw was:
thread 'moka-housekeeper-5' panicked at 'attempt to add with overflow', /opt/rust/registry/src/git.datcon.co.uk-91de7a0a7768d16b/moka-0.10.0/src/common/frequency_sketch.rs:183:9
stack backtrace:
   0: rust_begin_unwind
             at /rustc/a74ca7e36d5baf0684acd2159264adc64f81786d/library/std/src/panicking.rs:575:5
   1: core::panicking::panic_fmt
             at /rustc/a74ca7e36d5baf0684acd2159264adc64f81786d/library/core/src/panicking.rs:64:14
   2: core::panicking::panic
             at /rustc/a74ca7e36d5baf0684acd2159264adc64f81786d/library/core/src/panicking.rs:114:5
   3: moka::common::frequency_sketch::FrequencySketch::index_of
             at /opt/rust/registry/src/git.datcon.co.uk-91de7a0a7768d16b/moka-0.10.0/src/common/frequency_sketch.rs:183:9
   4: moka::common::frequency_sketch::FrequencySketch::increment
             at /opt/rust/registry/src/git.datcon.co.uk-91de7a0a7768d16b/moka-0.10.0/src/common/frequency_sketch.rs:142:25
   5: moka::sync_base::base_cache::Inner<K,V,S>::apply_reads
             at /opt/rust/registry/src/git.datcon.co.uk-91de7a0a7768d16b/moka-0.10.0/src/sync_base/base_cache.rs:1260:35
   6: <moka::sync_base::base_cache::Inner<K,V,S> as moka::common::concurrent::housekeeper::InnerSync>::sync
             at /opt/rust/registry/src/git.datcon.co.uk-91de7a0a7768d16b/moka-0.10.0/src/sync_base/base_cache.rs:1115:17
   7: moka::common::concurrent::housekeeper::ThreadPoolHousekeeper<T>::call_sync
             at /opt/rust/registry/src/git.datcon.co.uk-91de7a0a7768d16b/moka-0.10.0/src/common/concurrent/housekeeper.rs:352:29
   8: moka::common::concurrent::housekeeper::ThreadPoolHousekeeper<T>::try_schedule_sync::{{closure}}
             at /opt/rust/registry/src/git.datcon.co.uk-91de7a0a7768d16b/moka-0.10.0/src/common/concurrent/housekeeper.rs:328:21
   9: core::ops::function::FnOnce::call_once{{vtable.shim}}
             at /rustc/a74ca7e36d5baf0684acd2159264adc64f81786d/library/core/src/ops/function.rs:250:5
  10: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/a74ca7e36d5baf0684acd2159264adc64f81786d/library/alloc/src/boxed.rs:1988:9
  11: scheduled_thread_pool::Worker::run_job
             at /opt/rust/registry/src/git.datcon.co.uk-91de7a0a7768d16b/scheduled-thread-pool-0.2.7/src/lib.rs:426:33
  12: scheduled_thread_pool::Worker::run::{{closure}}
             at /opt/rust/registry/src/git.datcon.co.uk-91de7a0a7768d16b/scheduled-thread-pool-0.2.7/src/lib.rs:381:61
  13: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/a74ca7e36d5baf0684acd2159264adc64f81786d/library/core/src/panic/unwind_safe.rs:271:9
  14: std::panicking::try::do_call
             at /rustc/a74ca7e36d5baf0684acd2159264adc64f81786d/library/std/src/panicking.rs:483:40
  15: __rust_try
  16: std::panicking::try
             at /rustc/a74ca7e36d5baf0684acd2159264adc64f81786d/library/std/src/panicking.rs:447:19
  17: std::panic::catch_unwind
             at /rustc/a74ca7e36d5baf0684acd2159264adc64f81786d/library/std/src/panic.rs:140:14
  18: scheduled_thread_pool::Worker::run
             at /opt/rust/registry/src/git.datcon.co.uk-91de7a0a7768d16b/scheduled-thread-pool-0.2.7/src/lib.rs:381:21
  19: scheduled_thread_pool::Worker::start::{{closure}}
             at /opt/rust/registry/src/git.datcon.co.uk-91de7a0a7768d16b/scheduled-thread-pool-0.2.7/src/lib.rs:375:30
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'moka-housekeeper-7' panicked at 'attempt to add with overflow', /opt/rust/registry/src/git.datcon.co.uk-91de7a0a7768d16b/moka-0.10.0/src/common/frequency_sketch.rs:183:9
stack backtrace:
   0: rust_begin_unwind
             at /rustc/a74ca7e36d5baf0684acd2159264adc64f81786d/library/std/src/panicking.rs:575:5
   1: core::panicking::panic_fmt
             at /rustc/a74ca7e36d5baf0684acd2159264adc64f81786d/library/core/src/panicking.rs:64:14
   2: core::panicking::panic
             at /rustc/a74ca7e36d5baf0684acd2159264adc64f81786d/library/core/src/panicking.rs:114:5
   3: moka::common::frequency_sketch::FrequencySketch::index_of
             at /opt/rust/registry/src/git.datcon.co.uk-91de7a0a7768d16b/moka-0.10.0/src/common/frequency_sketch.rs:183:9
   4: moka::common::frequency_sketch::FrequencySketch::frequency
             at /opt/rust/registry/src/git.datcon.co.uk-91de7a0a7768d16b/moka-0.10.0/src/common/frequency_sketch.rs:122:25
   5: moka::sync_base::base_cache::EntrySizeAndFrequency::add_frequency
             at /opt/rust/registry/src/git.datcon.co.uk-91de7a0a7768d16b/moka-0.10.0/src/sync_base/base_cache.rs:728:22
   6: moka::sync_base::base_cache::Inner<K,V,S>::handle_upsert
             at /opt/rust/registry/src/git.datcon.co.uk-91de7a0a7768d16b/moka-0.10.0/src/sync_base/base_cache.rs:1358:9
   7: moka::sync_base::base_cache::Inner<K,V,S>::apply_writes
             at /opt/rust/registry/src/git.datcon.co.uk-91de7a0a7768d16b/moka-0.10.0/src/sync_base/base_cache.rs:1285:23
   8: <moka::sync_base::base_cache::Inner<K,V,S> as moka::common::concurrent::housekeeper::InnerSync>::sync
             at /opt/rust/registry/src/git.datcon.co.uk-91de7a0a7768d16b/moka-0.10.0/src/sync_base/base_cache.rs:1120:17
   9: moka::common::concurrent::housekeeper::ThreadPoolHousekeeper<T>::call_sync
             at /opt/rust/registry/src/git.datcon.co.uk-91de7a0a7768d16b/moka-0.10.0/src/common/concurrent/housekeeper.rs:352:29
  10: moka::common::concurrent::housekeeper::ThreadPoolHousekeeper<T>::start_periodical_sync_job::{{closure}}
             at /opt/rust/registry/src/git.datcon.co.uk-91de7a0a7768d16b/moka-0.10.0/src/common/concurrent/housekeeper.rs:281:45
  11: <alloc::boxed::Box<F,A> as core::ops::function::FnMut<Args>>::call_mut
             at /rustc/a74ca7e36d5baf0684acd2159264adc64f81786d/library/alloc/src/boxed.rs:1995:9
  12: scheduled_thread_pool::Worker::run_job
             at /opt/rust/registry/src/git.datcon.co.uk-91de7a0a7768d16b/scheduled-thread-pool-0.2.7/src/lib.rs:456:43
  13: scheduled_thread_pool::Worker::run::{{closure}}
             at /opt/rust/registry/src/git.datcon.co.uk-91de7a0a7768d16b/scheduled-thread-pool-0.2.7/src/lib.rs:381:61
  14: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/a74ca7e36d5baf0684acd2159264adc64f81786d/library/core/src/panic/unwind_safe.rs:271:9
  15: std::panicking::try::do_call
             at /rustc/a74ca7e36d5baf0684acd2159264adc64f81786d/library/std/src/panicking.rs:483:40
  16: __rust_try
  17: std::panicking::try
             at /rustc/a74ca7e36d5baf0684acd2159264adc64f81786d/library/std/src/panicking.rs:447:19
  18: std::panic::catch_unwind
             at /rustc/a74ca7e36d5baf0684acd2159264adc64f81786d/library/std/src/panic.rs:140:14
  19: scheduled_thread_pool::Worker::run
             at /opt/rust/registry/src/git.datcon.co.uk-91de7a0a7768d16b/scheduled-thread-pool-0.2.7/src/lib.rs:381:21
  20: scheduled_thread_pool::Worker::start::{{closure}}
             at /opt/rust/registry/src/git.datcon.co.uk-91de7a0a7768d16b/scheduled-thread-pool-0.2.7/src/lib.rs:375:30
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Script that caused the above panic:
#[tokio::main]
async fn main() {
    let evictions_counter = Arc::new(Mutex::new(0));
    let insertions_counter = Arc::new(Mutex::new(0));
    let cache = moka::future::Cache::builder()
        .eviction_listener_with_queued_delivery_mode({
            let evictions_counter = evictions_counter.clone();
            move |_k, _v, _c| {
                *evictions_counter.lock().unwrap() += 1;
            }
        })
        .max_capacity(750000000)
        .weigher(|_, _| 12000)
        .build();

    for j in 0..10 {
        tokio::spawn({
            println!("spawned load task");
            let cache = cache.clone();
            let insertions_counter = insertions_counter.clone();
            let j = j.to_owned();
            async move {
                for i in 1..10000000 {
                    cache
                        .get_with((i, j), async { String::with_capacity(10000) })
                        .await;
                    *insertions_counter.lock().unwrap() += 1;
                }
            }
        });
    }

    println!("inserted: \t, size now: \t, evicted: \t, size+evictions: \t, diff from inserted: \t",);
    loop {
        let insertions = insertions_counter.lock().unwrap().to_owned();
        if insertions % 100000 == 0 {
            let entries = cache.iter().count() as i32;
            let evictions = *evictions_counter.lock().unwrap();
            println!(
                "{},\t\t{},\t\t{},\t\t{},\t\t\t{}",
                insertions,
                entries,
                evictions,
                entries + evictions,
                insertions - entries - evictions
            );
        }
    }
}

I expect this is fairly rare. I've run the script again since and it got past 70M inserts before hitting the issue. I'm not invested in this being fixed so up to you what you want to do with it. Figured it was worth reporting though.
If you're interested I can share more context on the original cache issue I was investigating when I found this (cache capacity slowly reducing as more and more size evictions happen). We dropped our investigation and changed our approach to save time, so I don't think I have enough evidence to raise an issue and confidently point the finger at moka, although at the time we suspected this issue was with this library.

Thank you for reporting the issue!
... attempt to add with overflow',
... /moka-0.10.0/src/common/frequency_sketch.rs:183:9

moka/blob/v0.10.0/src/common/frequency_sketch.rs#L180-L183
180: fn index_of(&self, hash: u64, depth: u8) -> usize {
181:     let i = depth as usize;
182:     let mut hash = hash.wrapping_add(SEED[i]).wrapping_mul(SEED[i]);
183:     hash += hash >> 32;

I think the line 183 should be changed to:
183:     hash = hash.wrapping_add(hash >> 32);

so that a wrapping (modular) addition is allowed in debug build (where the overflow checks are enabled).
Let me double check and apply the change.
(Duplicate of #113)

I expect this is fairly rare. I've run the script again since and it got past 70M inserts before hitting the issue. I'm not invested in this being fixed so up to you what you want to do with it. Figured it was worth reporting though.

Thanks again for reporting it. I fixed it via #272. I will publish v0.11.1 to crates.io soon with the fix.
Here are some details about the bug:
Moka cache calculates the hash value (u64) of a cache key. The bug in FrequencySketch::index_of method caused panics on some hash values. The panic happens on arithmetic overflow in a + operation.
It is very rare to hit the bug, because:

The chance to get the hash value causing the panic is very low.

With my simple test that generates random hash values, I could only trigger the panic once in ~1 billion hash values.

The panic only happens when cache is compiled in debug mode.

In release mode, arithmetic overflow check is disabled (by default), so the panic ("attempt to add with overflow") never happens but the CPU silently does wrapping addition.
NOTE: Wrapping addition is the desired behavior for index_of. The fix is to use wrapping_add explicitly instead of +. In release mode, index_of was already working as expected because of the CPU behavior.

The reason that your script does not hit the bug in every runs is that the hash values for the same keys are different in every runs. The following code snippet shows the hash values for the same keys in different runs:
use std::hash::{BuildHasher, Hash, Hasher};

let key = (0, 0);

// Moka cache uses `RandomState` as the default `BuildHasher`. When a cache is
// created, a `RandomState` instance is created with a random seed.
//
// Here, let's create a `RandomState` instance directly, without creating a cache.
let hash_builder = std::collections::hash_map::RandomState::new();

// Calculate the hash value of the key, just like a cache does.
let mut hasher = hash_builder.build_hasher();
key.hash(&mut hasher);
let hash = hasher.finish();

// Print the hash value. Since `RandomState` is seeded by a random value, the
// hash value is different in each run.
println!("key: {key:?}, hash: {hash}");

$ cargo run
key: (0, 0), hash:<PHONE_NUMBER>857261670

$ cargo run
key: (0, 0), hash:<PHONE_NUMBER>626297664

$ cargo run
key: (0, 0), hash:<PHONE_NUMBER>877648902

Finally, here is the code of the simple test I used to trigger the bug:

hash-finder
// Cargo.toml
// ---------------------------------------------
// [dependencies]
// getrandom = "0.2.9"
// once_cell = "1.17.1"
// rand = { version = "0.8.5", features = ["small_rng"] }
//
// # Enable overflow checks in release builds.
// [profile.release]
// overflow-checks = true
// ---------------------------------------------

use std::num::NonZeroUsize;

use rand::rngs::SmallRng;
use rand::{Rng, SeedableRng};

// Please download this file having the bug:
// https://raw.githubusercontent.com/moka-rs/moka/v0.11.0/src/common/frequency_sketch.rs
//
// and place it into your `src` directory.
//
mod frequency_sketch;

fn main() {
    let num_cores = std::thread::available_parallelism().unwrap_or(NonZeroUsize::new(1).unwrap());
    let num_threads = num_cores.get() / 2;

    // Spawn threads to search for hashes that trigger a panic.
    let handles = (0..num_threads)
        .map(|thread_num| {
            std::thread::Builder::new()
                .name(format!("thread-{}", thread_num))
                .spawn(move || find_hashes(thread_num))
                .unwrap()
        })
        .collect::<Vec<_>>();

    // Wait for the threads to finish and collect their results.
    let results = handles
        .into_iter()
        .map(|handle| handle.join().unwrap())
        .collect::<Vec<_>>();

    let attempts = results.iter().map(|(attempts, _)| *attempts).sum::<u64>();
    let mut hashes = results
        .iter()
        .map(|(_, hashes)| hashes)
        .flatten()
        .collect::<Vec<_>>();
    hashes.sort_unstable();
    hashes.dedup();

    println!("-------------------------------------");
    println!(
        "number of threads: {}, total attempts: {}, hashes found: {}, chances: once in {:.2} attempts",
        num_threads,
        attempts,
        hashes.len(),
        attempts as f64 / hashes.len() as f64
    );

    for hash in hashes {
        println!("{hash}");
    }
}

fn find_hashes(thread_num: usize) -> (u64, Vec<u64>) {
    const NUM_ATTEMPTS: u64 = 2u64.pow(32);

    // The hashes triggering a panic.
    let mut hashes_found = vec![];
    let mut rng = SmallRng::from_entropy();

    let mut sketch = frequency_sketch::FrequencySketch::default();
    // The capacity does not matter for this bug.
    sketch.ensure_capacity(1024);

    for _ in 0..NUM_ATTEMPTS {
        // Generate a random hash and check if it triggers a panic.
        let hash = rng.gen();
        match std::panic::catch_unwind(|| sketch.frequency(hash)) {
            Ok(_) => (),
            Err(_) => {
                println!("{} - FOUND: hash: {}", thread_num, hash);
                hashes_found.push(hash);
            }
        }
    }

    (NUM_ATTEMPTS, hashes_found)
}

and the output:
## In this program, release mode will panic too because the overflow
## checks are enabled in Cargo.toml.

$ cargo run --release
...

thread 'thread-3' panicked at 'attempt to add with overflow', src/frequency_sketch.rs:185:9
3 - FOUND: hash:<PHONE_NUMBER>230191093
thread 'thread-3' panicked at 'attempt to add with overflow', src/frequency_sketch.rs:185:9
3 - FOUND: hash:<PHONE_NUMBER>3087607955
...

-------------------------------------
number of threads: 4, total attempts:<PHONE_NUMBER>4, hashes found: 16, chances: once in<PHONE_NUMBER>.00 attempts
175235467969503931
350323424204063419
2393337716848854001
2607510736887440732
3614626907659264335
4624000782985340440
4651654716317629850
6545676238230191093
8541891011146845666
8980550827530989485
9619494623239763742
11220422092290893381
13296693810304296595
15599614373087607955
15665336588250767017
15687268636519650785

If you're interested I can share more context on the original cache issue I was investigating when I found this (cache capacity slowly reducing as more and more size evictions happen). We dropped our investigation and changed our approach to save time, so I don't think I have enough evidence to raise an issue and confidently point the finger at moka, although at the time we suspected this issue was with this library.

I hope I can look into your original issue but it will be very difficult without access trace data. Cache has many moving parts and at least the followings have major impact to size-based evictions:

When an entry was last accessed. (affects to the position in the LRU queue)
How many times (and when) an entry was accessed. (affect to the historic popularity of the entry)
What is the weighted size of an entry.

moka employs "aggregated victims" strategy described in the following paper:

Lightweight Robust Size Aware Cache Management, by Gil Einziger, Ohad Eytan, Roy Friedman, Ben Manes.
Relevant code: https://github.com/moka-rs/moka/blob/v0.11.0/src/sync_base/base_cache.rs#L1690-L1706

Maybe the strategy does not match your workload, or there is a bug in the implementation. I'm not sure.
The access trace data will help us to understand what happened in your workload. No need to include the real key and value of the entry, just the hash value of the key, the access time, and the weighted size will be enough. If you can share it, I will be happy to look into it.
https://github.com/moka-rs/moka/issues/231#issuecomment-1488887789

tatsuya6502 commented:
With the current information, it will be hard to identify the root cause. It will be very helpful if we can get access trace data from the production system. Access trace data can be a CSV file, and each line should have the following information:

Duration (milliseconds) since start.
Key, or hash of the key.
Per-key TTL.
If you use weigher, the weighted size of the entry.

Once we have such trace, we can replay it to reproduce the issue and investigate the root cause.

https://github.com/moka-rs/moka/issues/247#issuecomment-1492799258

ben-manes commented:
you might also consider recording a trace (e.g. log a 64-bit hash of the key). Then you can run it against the different simulators that the projects provide and assert behavior, e.g. if any are not honoring the maximum size or misreporting the hit rate, and see what other policies report (like optimal). A trace of a few million events is typically pretty good; you want something many multiples of the cache size to ensure the run captures long-term the workfload characteristics.

Thanks - that's an interesting and satisfyingly simple explanation!
I'll see if I can get any time to look into the other issue, I never narrowed it down to moka, it could have also been a bug in our code or something interesting about the test scenario. If I find anything concrete enough to report I'll get back to you.
Thanks for your help


The reason I want to use an add-on like this is because I find most website too bright, which hurts my eyes, and causes eye strain and headaches.  Ideally, I'd prefer it if the add-on I use to do that doesn't add to the problem itself.
I gather it themes itself based on the theme being applied to a website, but only when it's enabled for that website.  I think it's a fair assumption that most people who want an add-on like this want it to stay dark, all of the time.
Perhaps it could have a theme applied when its turned off that has a dark background, instead of what it does now?
As an example, here it is used with google.co.uk, which is set to the Dark theme.  When I disable the add-on for that site, the user interface for it becomes uncomfortably bright:
On for site:

Off for site:

yes, it is by design.
this extension is not just dark mode - it has bright color schemes as well and users can create their own as well.
So there is no assumption that it should be dark by default. Also a lot of people use it only half of the day so they want the UI to be bright during the day when extension is disabled.

If someone is using this at night, they will have the add-on enabled, but will often have to disable it for certain sites - ones where it doesn't work well, especially if those sites have their own dark mode.
In those circumstances, they will find it unpleasant when this happens - they're working in dim lighting, and they have this in use because they want the screen to stay dark.  Suddenly flooding the screen with light, as they change a setting, is not likely to be a popular choice.


GitHub connection not working

When trying to connect my github account it doesn't work and I get a 400 error in the console with this message
{
  "message": "Must specify access token via Authorization header. https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param",
  "documentation_url": "https://docs.github.com/v3/#oauth2-token-sent-in-a-header"
}

I got this error too and I found this tick and it could fix this error, you can try it.

The above piece of code is a lifesaver. @benweet , We really need to get this or another appropriate fix added into StackEdit ASAP (or at least a link to this in the above Git Issue's work around).
~ Joe G.

Should I write just "+1" for bumping the bug?

Bump, still broken.

Same here, it seems that the authentication method is outdated?

It seems this project is no longer supported
пт, 11 лист. 2022 р. о 00:21 Joismar Braga @.***> пише:

Same here, it seems that the authentication method is outdated?
—
Reply to this email directly, view it on GitHub
https://github.com/benweet/stackedit/issues/1786#issuecomment-1310977681,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAF4YK6CZZMZBHXJV4ZHTF3WHVYNJANCNFSM5RN6XX2A
.
You are receiving this because you commented.Message ID:
@.***>

--
Надіслано з Gmail Mobile


Add version string

I am currently in the process of integrating this library as a Tkinter backend for VisPy.
It would be beneficial to know the version number so it can be used in tests and to check compatibility, hence this pull request to add the __version__ string.
(My pull request into VisPy for reference)

One thought - do need a release including this file and bumping it to 0.0.4 ?

One thought - do need a release including this file and bumping it to 0.0.4 ?

If you could do that to include this change in the PyPi version, that would be great.
On a side note, are you going to further develop and support this? (For example OSX/Darwin support (not that I need that, but in general)

OK - I will try to do a release soon. Pull requests are very welcome !
Right now I am not planning more changes unless bugs come up. Mostly I use it to run legacy code via X11 or remote desktop. I would be happy to have it running on OSX if someone buys me a mac or can send me a pull request.

Right now I am not planning more changes unless bugs come up. Mostly I use it to run legacy code via X11 or remote desktop. I would be happy to have it running on OSX if someone buys me a mac or can send me a pull request.

I don't need OSX support, but if someone does in the future, they'll have to test it themselves.
Your aggregation of different parts in pyopengltk is great though, it wouldn't have been possible to render OpenGL based visualisations with VisPy within a Tkinter frame otherwise.


Dropdown search partly hidden in lower viewports

Describe the Bug
When using the dropdown search in a mobile browser on a page or chapter the search bar and the first entry is hidden behind the mobile tab bar.
Additionally the dropdown element is partially hidden on the side when simulating desktop mode on a mobile browser or using only half the screen on a laptop with a desktop browser.
Steps to Reproduce

Go to a bookstack page with a mobile viewport of 360x800

Click on dropdown search

See no search bar and first element

Go to a bookstack page with a viewport of 900x1000

Click on dropdown search

See vertically cut off dropdown, more cut off on books dropdown

Expected Behaviour
The dropdown should start below the mobile tab bar and should be fully visible.
Screenshots or Additional Context

Browser Details
Firefox 122 on Android/Windows
Exact BookStack Version
v23.12

Thanks for raising @Bolthier.
This has been addressed in bbb41e8b5cc5c6e33cb27ef1b69092cf7a0f70ba, to be part of the next feature release.


Type all the things

Purpose
Make our app work with all checks that ember-cli-typescript enables by default
Summary of Changes

Turn on:

noImplicitReturns
noUnusedLocals
noUnusedParameters
strictPropertyInitialization
noImplicitAny

Update to latest versions of typedefs
Add stub type defs where needed
Fix all the errors

Side Effects / Testing Notes
Mostly just types, though there are few things that could affect functionality.
Ticket
n/a
Reviewer Checklist

[ ] meets requirements
[ ] easy to understand
[ ] DRY
[ ] testable and includes test(s)
[ ] changes described in CHANGELOG.md

Please do not merge this before 4:30 today. 😄

Coverage decreased (-0.4%) to 55.466% when pulling aaf68f403955f69a03bc2eaa36281587cb6e56c3 on jamescdavis:stricter_ts into 74694b0c5186b825cffc1def63ca1866410df70c on CenterForOpenScience:develop.

Will follow up with improved ember data decorators type defs.


Removed duplicate topics about thread using

Two duplicate "Multithreaded applications" topics, which this PR removes:
https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/threading/multithreaded-applications
https://docs.microsoft.com/en-us/dotnet/visual-basic/programming-guide/concepts/threading/multithreaded-applications
describe how to create and abort threads, Thread API, thread priorities.
This information is mostly covered in the .NET Guide:
https://docs.microsoft.com/en-us/dotnet/standard/threading/using-threads-and-threading
where the redirect is setup.
Contributes to #6180

@rpetrusha thank you for the insights about page view data; I find your argumentation convincing. So, I put this PR into WIP to populate the Using Threads and Threading topic with the overview that language topics provided.

@rpetrusha I've rewrote the Using Threads and Threading topic and also made some changes to its subtopics. Please review new changes.

@rpetrusha thank you for the review. I've addressed all the feedback


Character count

NHS design system guidance
NHS design system discussion
Examples on the NHS App

Examples

Journeys used on

Request repeat prescription
Messages

Related
GOV.UK Design System guidance
GOV.UK Design System discussion

Overview
Textarea components use inconsistent approaches to character counts in both GP appointment booking and sending a message to your GP. The Character Count component has recently been ported from govuk-frontend to the nhsuk-frontend github and so should be used in all instances.
Also, the use of textareas does not follow the design system guidance to "make the height of a textarea proportional to the amount of text you expect users to enter".
Objective
By making aligning character counts across all instances, we are providing a consistent experience to users. By extending the heights of textareas to match the content submitted, we can increase the ease of use of typing content in textareas.
Activities

Document all pages and instances of textarea component
Investigate typical length of written content for each instance
Update designs to extend heights of textareas to content length
Update designs with new character count


Added calendarTimeAgoSinceDate methods for feature requested in #100

Screenshots show two labels updating calendarTimeAgoSinceNow and shortCalendarTimeAgoSinceNow values as slider is changed (for demonstration only, not included in commit).

Hey, so I pulled in another request that did some really healthy restructuring of the timeAgo methods. Unfortunately, it caused some heavy conflicts with what you did!
That said, can you explain the nature of the problem you are having? I am trying to clean up the PRs and would like to merge or close this one.
Thanks,
-Matt

I wrote a pretty detailed response about the isTimeAgo methods under #100 before submitting this PR. I haven't had a chance to check out the code you be already merged, so it may have solved the issue already. Feel free to close this one for now, and I can refactor the changes after pulling down the new code if they're still needed.


Dev command composition

Me and Alex optimized paths, added the paths to code, and added more commands for auto.

felt those commit messages