text:
Question About Using This

Could you give me an example of how to start using this? Something like an example script for adding a new client? Preferably one that would work by copy and paste or with little modification.
It would be really helpful and would give me a starting point for using this. It would also get me to the point where I could send pull requests if I add something that isn't already available with this.

No problem!
For a start, here's a gist.
The available calls and parameters are documented on godoc.
There's still a lot to be implemented so I'd be excited if you'd add something that you need. The basics of handling and sending responses are implemented, albeit before I didn't thoroughly understand Go interfaces at the time, so it could be done a bit cleaner in retrospect.
That being said, It is being used in production and has been pretty solid for more than a year now, and has handled a fair amount of usage in that time.

@bradberger it seems you don't have a validate login function? Shall that be my first PR then once I figure it out? :P

Sorry I missed this question until now. As mentioned on #3 unfortunately that's not implemented, but it would be a most welcome addition!

authors: TekkitCommando bradberger

repo: bradberger/gowhmcs


text:
jvanelian.dev

Initial load total size: 6.88KB

Added!

source: gharchive/issue

authors: JulienVanelian bradleytaunt

license: MIT

license_type: permissive

license_source: github-api


text:
Create oh.mg.mg

Hello,
I hope I'm doing this right to add my site oh.mg :)
Many thanks !

Looks good - but you need to remove the https:// and the trailing / from the pageurl parameter

Closing off this PR for "Create oh.mg.md #744" (I think)

source: gharchive/pull-request

authors: bradleytaunt mrmannet


text:
[Bug] Server crash when user leaves

Describe the bug
When a user leaves, the whole server crashes and needs to be started again
To Reproduce
Steps to reproduce the behavior:

Leave the server

Expected behavior
Send a leave message to some channel
Screenshots
If applicable, add screenshots to help explain your problem.

This bug is due to the fact that the code looks for a channel called "introduction", but the channel in my test server is "introductions" to mirror my personal server.

repo: bradtaniguchi/discord-bot-test


text:
Upgrade OpenIddict

Project is currently using alpha version of OpenIddict and a beta version has been released.

Hi  @bradyholt , so it is not possible to run the project right now? I'm really new to asp.net and trying to set up a template but getting this error Models/ApplicationUser.cs(6,36): error CS0246: The type or namespace name 'OpenIddictUser' could not be found (are you missing a using directive or an assembly reference?)
Running OS

Done here: 4857c9c7559063b203b512741cb0678befd56190

@kikemx78 If you pull down the latest, things should work.

@bradyholt , Thanx a lot man. I will give it a try this week.
:)

repo: bradyholt/aspnet-core-react-template

license: mit

license_source: bigquery


text:
cellfinder v1.3.0 blog post

The next version of cellfinder is likely to be a (relatively) large one, and we should write a blog post to outline the differences. This will include:

Switch to torch backend (https://github.com/brainglobe/cellfinder/pull/396)
Support turning off classification or detection in GUI (https://github.com/brainglobe/cellfinder/pull/402)
Support for single z-stack tif file for input (https://github.com/brainglobe/cellfinder/pull/397)
Cell detection optimisation (#398) by (https://github.com/brainglobe/cellfinder/pull/407)
Pretrained models moving to ~.brainglobe/cellfinder, how the old models can be deleted, and how to re-install them in the new location (#176) (https://github.com/brainglobe/cellfinder/pull/414)
Maybe cell detection in torch.

cc @alessandrofelder

Here are the graphs and correlation/coefficients comparing tensorflow to torch on both Brain 1 and Brain 2 from the paper:

The timing information is below:

Brain 1 - paper
Brain 1 - torch
Brain 2 - paper
Brain 2 - torch
Brain 2 - torch + new detection

Candidate detection
50
46.5
48
64.5
48

Classification
33
35.5
43
39
39.5

Total
83
82
91
103.5
87.5

To clarify some points @IgorTatarnikov:

Based on the plots, torch is (technically, very slightly) better than TF?
The detection timings, is the main section of the plot the timings from the latest release, and "new detection" is from main (after @matham's PR)?

Correct, seems torch is a tiny bit better than TF.
For detection timings, all were run on the original machine from the paper. The "paper" columns are numbers taken from the cellfinder paper, the "torch" columns are the means of two runs using the detection code that is in the current release but with a torch backend. The last column is combining the new detection from https://github.com/brainglobe/cellfinder/pull/407 with a torch backend.

So to summarise, the next release will be pretty much the same accuracy and speed (but easier to maintain for us)?

Yup! It might be interesting to include some comparisons using a c-fos brain. I'm curious how the new release will compare to the old release with millions of cell candidates.

@alessandrofelder do you happen to have any data like this to hand?
I think we should include it if we have it, otherwise we can post something later on. This blog post could end up being longer than the original paper otherwise!

Due to various updates to other packages, have decided to create a blog post for the new version of the metapackage. This blogpost can be solely about the move to torch.

@alessandrofelder do you happen to have any data like this to hand?

Yes, I'll DM @IgorTatarnikov the details to it on our internal storage


text:
Conda install information missing on brainiak home

On the brainiak homepage http://brainiak.org, instructions for conda install have not been added under "Getting Started".

@manojneuro?

@manojneuro filed here
https://github.com/brainiak/brainiak.github.io/issues/22
I requested the instructions they had given to students (battle-tested and
all) in the Yale course.
On Mon, Apr 30, 2018 at 1:38 PM, Mihai Capotă notifications@github.com
wrote:

@manojneuro https://github.com/manojneuro?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/brainiak/brainiak/issues/362#issuecomment-385472635,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACkV1oAWywbmla0c3_gLceX3zaC6a7RQks5tt0wIgaJpZM4TlUzn
.

Thanks, @danielsuo. Closing this issue.

authors: danielsuo manojneuro mihaic

repo: brainiak/brainiak


text:
Talk about features that would help Single Page Apps

braintree-web's design comes from a time when checkout flows generally used a <form> POST. This is no longer the case in 2015, where SPAs and JS-heavy checkout flows are common.
There are a couple things that keep braintree-web from working well in SPAs, the biggest of which is that braintree.setup can only be called once per page load.
I'm starting this thread to discuss what kinds of features would be useful for making braintree-web work better in JS-heavy checkout flows.
Related Issues:

setup() with different user #18
Ability to disable dropin form event handlers #4
paymentMethodNonceReceived callback doesn't get a new nonce after submitting and re-entering number #20
paypal support? https://github.com/jeffcarp/braintree-angular/issues/8

I have actually had a lot of success using Angular and braintree-web.  I didn't know that braintree-angular exists so I will need to take a look at that.  A couple things I would recommend are:

paymentMethodNonceReceived: function (event, nonce).  It would be nice if this function returned a creditcard object containing like last 4 of card etc so that we do not need to vault the customer/method to display it on a confirmation route.  Obviously no full informaiton for PCI.  Similar to how the paypal button returns shipping and email info

Obviously the event handlers on forms have been a problem.  I have my braintree.setup calls in a service and it seems like I can use JQuery to empty() the drop in container and call it again.  Would be nice to see this reworked so that we can call setup multiple times without any work arounds.

Need a bower install for braintree-data.  Also need a callback function on in the BraintreeData.setup call so that it returns the data instead of creating a DOM element in the form.

There are more that I ran into so I will update as I run into them.

@trainerbill regarding paymentMethodNonceReceived, as of v2.5.0 we added a new root level callback called onPaymentMethodReceived which returns more details for Credit Card transactions. Unfortunately, we have yet to release the official documentation, but you can read more about the callback here and I am happy to answer more any further questions you may have.

Awesome!  Thanks for the heads up on that.

:+1: for a quick resolution of this. These issues make it really difficult to integrate braintree in a SPA.

We appreciate a quick fix to ease integration.

:+1:

:+1:

We were experiencing an issue where loading the braintree widget (with braintree.setup()) for a second time on the same single page app (after removing the previous one, but without reloading the page), would make the widget use the client token with which braintree.setup() was called for the first time, effectively giving access to the vault of the first user.
This is a serious issue, since it could allow a user A access to the vault of a user B after user A logged out, if the page was not refreshed meanwhile.
After investigating the problem more thoroughly, we were able to work around the issue, but we had to resort to some nasty hacks and fragile solutions that might break with future releases of braintree-web.
We found that all the following steps are required for a proper cleanup and new setup of the widget:

remove the DOM element where the widget is attached;
remove the "braintree-dropin-modal-frame” iframe added to the body;
delete window.Braintree object;
delete various window.callback_json_xxxx functions (2 per setup());
remove various “on message” event listeners attached to the window object (5 per setup());
remove the script from the page (since we use require.js, we’re resorting to requirejs.undef('braintree’) to do this).

After all these steps are done, we can then require the braintree.js script again and invoke braintree.setup() with different parameters and user vaults and payments work as expected.
To remove the event listeners left hanging in the window object we resorted to monkey-patching the window.addEventListener method, which feels wrong and may lead to other issues.
A destroy() method implemented by braintree-web has the benefits that it doesn’t need to resort to nasty hacks and monkey-patches to keep track of callbacks and event handlers that are registered globally, since the module can keep track of its own references for easier removal.
If you could provide a braintree.destroy() (or similar) method that would do the steps described, integration in single page applications would be much easier and we wouldn’t have to fear that future upgrades of braintree-web could break our workaround solution.
Reloading of braintree.js should be left to consumers, since the method to do that depends on how the script is included, but all the other steps could be provided by your own cleanup mechanism.

wow @tnunes i was trying the same kind of workaround a couple of days ago, but missed the callbacks and event listeners on the window.  thanks for the info.  do you think the hosted fields would have the same issues?

Hi @imgntn,
I haven't used hosted fields, so I can't help you that. I know, however, that braintree-data also presents the same kind of issues, since to integrate it I also had to find out and clean what it leaves attached to the page.

Since github doesn't support voting for issues, I'm adding a comment: Please add braintree.destroy().

+1

We NEED braintree.destroy()!

Really need this. Stripe has it, but we don't want to give up on Braintree just because of this issue.

+1
@tnunes, Do you know if it's possible to target the braintree 'on message' events listener without deleting all others ? Any Ideas of their name ?

What I do is monkey-patch the window.addEventListener function right before I setup braintree.
In my implementation I accumulate all event listeners in an array before proxying to the real window.addEventListener.
Then, in my braintree.destroy, I use window.removeEventListener to remove all listeners I previously saved references to, right before I restore the original window.addEventListener function.
This is hackish and fragile, but as long as nothing aside from braintree adds listeners to the page from the moment you call setup until you destroy the widget, you should good.

We have the same problem @tnunes described, thank you for the hack. Still, I think we are going to do an full page reload until braintree.destroy (or something similar) is implemented by default.

Glad I stumbled upon this issue, was tearing my hair out trying to figure out why I was getting errors in my Ember app when I tried to add and remove paypal accounts. A teardown method would really help out for single page apps.

+1

+1 come on braintree, we're all waiting!

+1
Would be really helpful. Reloading the whole page seriously detracts from our whole checkout experience.

+1
Come on braintree, get your act together. Come live in the future with us. Everyone is designing single-page applications and it is extremely frustrating when we have to integrate with libraries designed by companies who think they use the latest tech, but actually have no clue.
This is CS 101 fundamentals; make your code self-contained; make it leave no trace on the system its running on. We thought we should use braintree because it would be easier to integrate, but it's taking the same amount to time, and same amount of nasty hacks as it takes to integrate with your parent company.
You sitting on this issue for 3 months shows that you either don't care about your users experience, or you have no clue what single-page applications are about, hence don't see how badly you're crippling the experience of our users and developers. Either way, it reflects poorly on your company.
Forgive my strong language; but this is exactly how I feel. If this were an open-source library, I would have fixed this by now. But now we're all trapped to writing shitty code, because either you guys don't care, or you guys just don't get it.
Wake up!!

Pretty much what he said. I've wasted hours and hours trying to make
something reasonable out of this technology. It doesn't seem like either
the default web integration or hosted fields will work for anything but a
multiple page click through experience. After earlier experiences where
braintree's support had been impeccably good, I am now finding that it is
not so responsive and technically they are not keeping up with the times.
Perhaps all the PayPal and eBay split noise is affecting the focus of the
team or confusing the priorities. I am seriously considering switching to a
competitor after my experience dealing with this mess, particularly sense
the communication from Braintree has mostly been either radio silence or
"uh sorry." they don't even seem to be aware of the reason this is such an
inconvenience.
On Jun 29, 2015 3:01 PM, "tastyeggs" notifications@github.com wrote:

+1
Come on braintree, get your act together. Come live in the future with us.
Everyone is designing single-page applications and it is extremely
frustrating when we have to integrate with libraries designed by companies
who think they use the latest tech, but actually have no clue.
This is CS 101 fundamentals; make your code self-contained; make it leave
no trace on the system its running on. We thought we should use braintree
because it would be easier to integrate, but it's taking the same amount to
time, and same amount of nasty hacks as it takes to integrate with your
parent company.
You sitting on this issue for 3 months shows that you either don't care
about your users experience, or you have no clue what single-page
applications are about, hence don't see how badly you're crippling the
experience of our users and developers. Either way, it reflects poorly on
your company.
Forgive my strong language; but this is exactly how I feel. If this
were an open-source library, I would have fixed this by now. But now we're
all trapped to writing shitty code, because either you guys don't care, or
you guys just don't get it.
Wake up!!
—
Reply to this email directly or view it on GitHub
https://github.com/braintree/braintree-web/issues/29#issuecomment-116859911
.

Hey folks - I'm a Product Manager with the Braintree SDK and Developer Experience team.
We understand your frustration and the importance of providing an experience that works in a myriad of integration scenarios, including Single Page Applications.
We also recognize that this is an area in which we can improve our SDK. We're currently actively exploring the features we need to add and making considerations to preserve compatibility for all braintree.js users.
This is our best path forward for us to provide a more ideal and complete experience for all of our merchants. I'll keep you posted on the progress of this as I know that it is currently resulting in a less than ideal integration experience.
In the meantime, take a look at the docs for our advanced integration or feel free to contact me (rohit@getbraintree.com) if you have further questions or concerns.

@rturumella There's no information in your documentation on how we can do custom integration with PayPal, other than this one line here:
https://developers.braintreepayments.com/javascript+dotnet/guides/paypal/overview
"Braintree offers a few options when accepting PayPal payments. First, you'll need to choose whether you would like to use our Drop-in UI or a custom integration. Learn more about differences between these integrations".

@rturumella Any chance you guys can publish the un-minified source of the JS client? Might just make it easier for us to workaround this issue.

@tastyeggs For each release of braintree.js we also have an accompanying unminified file. The pattern is as follows: https://js.braintreepgateway.com/js/braintree-<VERSION>.js.
That file is built from CommonJS modules and as such is not well suited for an open source release. I would recommend taking a look through the latest JS file and perhaps posting your specific issue here or emailing us to see if we can narrow down the exact problem you are facing with your integration.
I would also take a look at the following link:
https://developers.braintreepayments.com/javascript/guides/paypal/client-side

+1
Since the drop-ui doesn't work for single page apps, I'm trying to integrate using the advanced integration to tokenize the cards, but finding the documentation somewhat lacking in detail. Do you have some full docs for your JS API anywhere?
Right now it's the tokenizeCard() method that I'd like some more details on:

Can you provide more than just the postal code for address verification? If so how? Is it the same format as the server side deprecated CreditCard.create() function?
What validation is token by the tokenizeCard() method? Is it verifying the card number when it is called, or is that delayed until a payment is made?
Can you provide some documentation on the expected error formats returned from that API? None of the minimal examples for this show any error handling at all.

For your first question, the link
https://developers.braintreepayments.com/javascript+node/guides/credit-cards#tokenize-cardRohit
gave seems to have what you want, it shows several parameters to
tokenizeCard such as cvv, etc. As for when/if the validation happens, it
depends on a number of things. There is an option called verify_card that I
believe you can pass in there. It also depends on whether you have
configured the global verification settings for your account.
Braintree do document the error objects in their online docs, but you're
right that they don't show much in the way of error handling best
practices. :(
Now the bigger problem -- what Rohit hasn't mentioned here is that it's
unclear how much a custom integration actually helps us. With a custom
integration, customers are no longer able to qualify for SAQ-A PCI
compliance, which is why they are working on their "Hosted Fields" product.
The problem is that Hosted Fields has all the same problems with Single
Page Applications that the dropin integration has (and then some). Now way
to clear or reset it, or to accept a second payment entry after the first
one has been completed.
On Thu, Jul 2, 2015 at 2:16 PM, davidbryant notifications@github.com
wrote:

+1
Since the drop-ui doesn't work for single page apps, I'm trying to
integrate using the advanced integration to tokenize the cards, but finding
the documentation somewhat lacking in detail. Do you have some full docs
for your JS API anywhere?
Right now it's the tokenizeCard() method that I'd like some more details
on:

Can you provide more than just the postal code for address
verification? If so how? Is it the same format as the server side
deprecated CreditCard.create() function?
What validation is token by the tokenizeCard() method? Is it
verifying the card number when it is called, or is that delayed until a
payment is made?
Can you provide some documentation on the expected error formats
returned from that API? None of the minimal examples for this show any
error handling at all.

—
Reply to this email directly or view it on GitHub
https://github.com/braintree/braintree-web/issues/29#issuecomment-118170886
.

+1 for this, I went down the route of manually trying to teardown braintree with limited success, seemed top fragile to risk it, so now using an angular directive I detect if braintree as already being initialised if so I add a target='_self' to any add card adding link thus reloading the page.  there's also a check in my card service  so if someone hits the back button it will reload the page.

@tnunes I am trying to set up braintree hosted fields more then once in a Drupal commerce type. So when user changes payment method hosted fields will be loaded via Ajax. The first time load always works, but not the second time. I am trying to reset Braintree by following your instruction above. But there is no avail. I cannot removeEventListener at all and I found this may be related to framebus. Could you show me the code to monkey patch window.addEventListener please? Much appreciated:D

+1
currently simply recreating the vault and manually filtering out already used nonces (but that doesn't circumvent a 2nd user having access to the 1st users vault)

@cityreader I'm not using hosted fields, so I do not know if they need any additional house keeping.
To monkey patch window.addEventListener you can use something like:
var realWindowAddEventListener = window.addEventListener,
    braintreeEventListeners = [];

window.addEventListener = function () {
    braintreeEventListeners.push(Array.prototype.slice.apply(arguments));
    realWindowAddEventListener.apply(window, arguments);
};

// setup braintree

// then to cleanup:
// - do the other described tasks;
// - remove listeners and restore `window.addEventListener`:
var listenerArgs;

while (var listenerArgs = braintreeEventListeners.pop()) {
    window.removeEventListener.apply(window, listenerArgs);
}

window.addEventListener = realWindowAddEventListener;

I gave up on hosted fields, fwiw. I've resigned myself to have to do the
more elaborate SAQ for a custom integration (which will require scanning).
On Thu, Jul 23, 2015 at 12:53 PM, Tiago Nunes notifications@github.com
wrote:

@cityreader https://github.com/cityreader I'm not using hosted fields,
so I do not know if they need any additional house keeping.
To monkey patch window.addEventListener you can use something like:
var realWindowAddEventListener = window.addEventListener,
braintreeEventListeners = [];
window.addEventListener = function () {
braintreeEventListeners.push(Array.prototype.slice.apply(arguments));
realWindowAddEventListener.apply(window, arguments);
};
// setup braintree
// then to cleanup:// - do the other described tasks;// - remove listeners and restore window.addEventListener:var listenerArgs;
while (var listenerArgs = braintreeEventListeners.pop()) {
window.removeEventListener.apply(window, listenerArgs);
}
window.addEventListener = realWindowAddEventListener;
—
Reply to this email directly or view it on GitHub
https://github.com/braintree/braintree-web/issues/29#issuecomment-124223081
.

Thanks @tnunes. This approved that I did right before according to your instructions. Sadly, that does not work for Hosted Fields.
It seems Hosted Fields script binds events in other places including form and submit buttons other than window. I cannot make multiple setup work unless hacking the braintree hosted fields script, but even in that way event still cannot be unbinded.
So in the last, we decided to reload page when user change a different payment method by clicking radio options. In order to achieve that, we still have to unbind form submit handler binded by Braintree.
This is no way to remove anonymous callback function, so we have capture all listener as well. Instead of monkey patching window.addEventListener, we make try to monkey patching Element.prototype.addEventListener:
var braintreeListener = function() {
  this.originalAddEventListener = Element.prototype.addEventListener;
  this.listeners = [];
  var self = this;

  Element.prototype.addEventListener = function (event, listener) {
    arguments = Array.prototype.slice.apply(arguments);
    // Apply original attach listener function
    self.originalAddEventListener.apply(this, arguments);
    // Include element data
    arguments.unshift(this)
    self.listeners.push(arguments);
  };

  return this;
}();

braintreeListener.undelegate = function (html) {
  arguments = Array.prototype.slice.apply(arguments);

  if (typeof html == 'string') {
    html = document.querySelector(html);
  }

  for (var key in this.listeners) {
    if (html == this.listeners[key][0]) {
      // Remove handler
      html.removeEventListener(this.listeners[key][1], this.listeners[key][2]);
    }
  }
}

So run this script right before Braintree Hosted Fields.js, when we want to unbind form submit handler we run
$form = $('#form-id');
braintreeListener.undelegate($form[0]);

I ended up "solving" this by using an iframe. It might not seem clean but it works perfectly fine and there are no left-overs.
I'm creating a new iframe, injecting html that includes the form and script setup for braintree with the Client Token using javascript:window["content"] .
Then every callback of braintree's drop-in (onPaymentReceived, onReady, onError) is handled by using Window.postMessage() on the main application window.
Every time you need to create a new drop-in with a different Client Token, you just remove the iframe, and re-create it. This is untested as far as older browsers go but it works perfectly fine on Firefox and Chrome.
Let me know what you think.

Same problem here missing a braintree.destroy method to remove it cleanly and reuse it later without page reload

This is extremely frustrating. Please, Braintree, give us a destroy() method. I have already wasted more than 10 hours on this and can't find a clean solution for hybrid mobile apps...

This is interesting, I ran this idea past Braintree's technical support a
while back and they said to me 'others have tried similar work-arounds to
little success', so I was put off the idea.  I wish you luck and hope to
hear you prove them wrong because it sounds like the most reliable method
I've heard so far.
On 29 Jul 2015 09:29, "Ioannis Karavas" notifications@github.com wrote:

I ended up "solving" this by using an iframe. It might not seem clean but
it works perfectly fine and there are no left-overs.
I'm creating a new iframe, injecting html that includes the form and
script setup for braintree with the Client Token using
javascript:window["content"] .
Then every callback of braintree's drop-in (onPaymentReceived, onReady,
onError) is handled by using Window.postMessage() on the main application
window.
Every time you need to create a new drop-in with a different Client Token,
you just remove the iframe, and re-create it. This is untested as far as
older browsers go but it works perfectly fine on Firefox and Chrome.
Let me know what you think.
—
Reply to this email directly or view it on GitHub
https://github.com/braintree/braintree-web/issues/29#issuecomment-125879973
.

+1 for destroy(), IMHO the most important feature to be implemented so far.

+1 for braintree.destroy()!

Hey @rturumella,
6 weeks or so ago you said you'd keep us posted. Do you have anything you
can share about plans to address our concerns? Like a specific date? It
strikes me that it is likely 6 days of work on your part to make
improvements, but there is no sign of any changes... Is it important?
On Aug 5, 2015 9:21 AM, "Mike" notifications@github.com wrote:

+1 for braintree.destroy()!
—
Reply to this email directly or view it on GitHub
https://github.com/braintree/braintree-web/issues/29#issuecomment-128057014
.

+1 .destroy() is necessary.

@rturumella @jeffcarp  is there any plan to include destroy or an official workaround?

@tnunes  Funny, I was searching for a destroy() method and I couldn't find it.
I have the exact same issue. We need destroy().
This is a huge security flaw.

Hey folks,
I'm a Product Manager with the Braintree SDK and Developer Experience Team.
We're currently still actively working on this. There are a number of things to keep in mind in order to ensure a first class experience for all braintree.js users.
We understand the frustration around this and we know this is an area of improvement for our SDK. Please stay tuned for more updates.

Do you have a schedule?
On Tue, Aug 11, 2015 at 10:34 AM, rturumella notifications@github.com
wrote:

Hey folks,
I'm a Product Manager with the Braintree SDK and Developer Experience
Team.
We're currently still actively working on this. There are a number of
things to keep in mind in order to ensure a first class experience for all
braintree.js users.
We understand the frustration around this and we know this is an area of
improvement for our SDK. Please stay tuned for more updates.
—
Reply to this email directly or view it on GitHub
https://github.com/braintree/braintree-web/issues/29#issuecomment-129981347
.

@rturumella that looks like the same response as a while ago, is there a schedule for this?

@rturumella I'm a frontend developer for Splice and we have a single page Angular app. Should we be switching away from Braintree now?

It seems so... Braintree seem unable to implement this functionality in any
reasonable timeframe, and equally incapable of even providing an estimate.
It's pretty sad.
On Aug 27, 2015 11:28 AM, "Zach Briggs" notifications@github.com wrote:

@rturumella https://github.com/rturumella I'm a frontend developer for
Splice and we have a single page Angular app. Should we be switching away
from Braintree now?
—
Reply to this email directly or view it on GitHub
https://github.com/braintree/braintree-web/issues/29#issuecomment-135514800
.

Have put live their Hosted Fields integration - while still in beta. Sure there are issues, but for what it's worth the company was just bought by PayPal. They're probably doing something right.
Their support team is both enthusiastic and helpful, both on the phone and via email. They've acknowledged the need for the above requested functionality, and apologies but 'reasonable timeframe' is utterly subjective and apparently ignorant of the realities of software development lifecycles. Not trying to have a dig, but patience is a virtue.

Thomas, thanks for the "not a dig". You're apparently unfamiliar with "
planning." It's completely sane and within the norms of professional
software development to ask for a timeframe other than "soon." Especially
when we've been told "soon" several times. Any developer who has ever
gotten paid for what they do would understand why getting information on
schedules is important.
You're right, their email support in general is very helpful. For things
that they have an answer to. Their support has been completely unhelpful,
both via web and via email on this topic. How patient do you think we
should be? If you look, you'll see that this discussion is many months old
already.
BTW, Paypal bought Braintree very nearly 2 years ago, and in any case
getting acquired is neither an excuse for not responding to your customers
nor an endorsement of "doing something right."
If you read the posters here, I think you'd get the sense that we all
like Braintree, which is why it's so frustrating that their stuff doesn't
work well, and they aren't responsive about it. You don't need to apologize
for them or question the merits of our complaints. Unless perhaps you work
there - I hope not.
On Aug 27, 2015 1:09 PM, "Thomas Clark" notifications@github.com wrote:

Have put live their Hosted Fields integration - while still in beta. Sure
there are issues, but for what it's worth the company was just bought by
PayPal. They're probably doing something right.
Their support team is both enthusiastic and helpful, both on the phone and
via email. They've acknowledged the need for the above requested
functionality, and apologies but 'reasonable timeframe' is utterly
subjective and apparently ignorant of the realities of software development
lifecycles. Not trying to have a dig, but patience is a virtue.
—
Reply to this email directly or view it on GitHub
https://github.com/braintree/braintree-web/issues/29#issuecomment-135538610
.

Apologies, I should have been more detailed in my question. Is there a
means of using Braintree in a single page app that doesn't require any of
the following:

a full page refresh
an iFrame
monkey patching

Because we're currently evaluating Braintree and if the only means of using
their software is one of the three above approaches, then they literally do
not support single page apps.
On Thu, Aug 27, 2015 at 3:42 PM, Paul R. Nash notifications@github.com
wrote:

Thomas, thanks for the "not a dig". You're apparently unfamiliar with "
planning." It's completely sane and within the norms of professional
software development to ask for a timeframe other than "soon." Especially
when we've been told "soon" several times. Any developer who has ever
gotten paid for what they do would understand why getting information on
schedules is important.
You're right, their email support in general is very helpful. For things
that they have an answer to. Their support has been completely unhelpful,
both via web and via email on this topic. How patient do you think we
should be? If you look, you'll see that this discussion is many months old
already.
BTW, Paypal bought Braintree very nearly 2 years ago, and in any case
getting acquired is neither an excuse for not responding to your customers
nor an endorsement of "doing something right."
If you read the posters here, I think you'd get the sense that we all
like Braintree, which is why it's so frustrating that their stuff doesn't
work well, and they aren't responsive about it. You don't need to apologize
for them or question the merits of our complaints. Unless perhaps you work
there - I hope not.
On Aug 27, 2015 1:09 PM, "Thomas Clark" notifications@github.com wrote:

Have put live their Hosted Fields integration - while still in beta. Sure
there are issues, but for what it's worth the company was just bought by
PayPal. They're probably doing something right.
Their support team is both enthusiastic and helpful, both on the phone
and
via email. They've acknowledged the need for the above requested
functionality, and apologies but 'reasonable timeframe' is utterly
subjective and apparently ignorant of the realities of software
development
lifecycles. Not trying to have a dig, but patience is a virtue.
—
Reply to this email directly or view it on GitHub
<
https://github.com/braintree/braintree-web/issues/29#issuecomment-135538610

.

—
Reply to this email directly or view it on GitHub
https://github.com/braintree/braintree-web/issues/29#issuecomment-135550135
.

Hi Theotherzach, thanks for your insight. I don't work for Braintree, and wouldn't have posted something so proselytising if I did. I take your points and admit that I was unaware that the takeover was quite so long ago.
Let's not and say we did, eh?

There isn't a way which I'm aware of which meets your requirements, and I've settled - for now - with refreshing. It isn't perfect, but our business requirements are met.

Fair enough - we can all agree it's a shame we're even having this
conversation, I'm sure.
FWIW, I eventually gave up on this approach after talking with Braintree's
PCI compliance company, who by the way were very responsive and helpful
too. Apparently the difference between the two levels of SAQ is not
actually that huge of a deal, so I just stuck with my custom integration
and decided I'll have to get my website scanned (by them, for free).
On Thu, Aug 27, 2015 at 1:51 PM, Thomas Clark notifications@github.com
wrote:

Hi Theotherzach, thanks for your insight. I don't work for Braintree, and
wouldn't have posted something so proselytising if I did. I take your
points and admit that I was unaware that the takeover was quite so long ago.
Let's not and say we did, eh?
—
Reply to this email directly or view it on GitHub
https://github.com/braintree/braintree-web/issues/29#issuecomment-135552024
.

This is the worst

This is kind of ridiculous.  @tnunes pretty much laid out what needs to be done.  If they published the unobfuscated code, I am sure the community could knock this out in a day.

I entirely understand their desire to not open source code as a payment provider. However, it would be nice if they would put a warning in their docs that the hosted solutions are not designed to work in single page apps. Because the way I found out about it was when our QA team was reporting double purchases, thank goodness our QA team rocks and that didn't get out into production. I've got a bunch of guards in place now to prevent disaster, but I was expecting to come out here and read about how I was doing it wrong.
I was really hoping to come out here and read about how I was doing it wrong...

won't it be possible to create a custom integration in JS together which is designed for single page apps, hooks in just like drop-in?

Hi folks - I'm a Product Manager at Braintree.
The .destroy() (or similarly named API) functionality is coming next week. We’ll be pushing it as an edge branch so you all can at least kick the tires and see progress. Thanks for your patience.

Braintree seem unable to implement this functionality in any reasonable timeframe, and equally incapable of even providing an estimate. It's pretty sad.

Yes. We should have precisely communicated our expected timing, and we should have been transparent about what was going on here internally while you all have been waiting.
This change has been more challenging than we anticipated. Since this library supports a variety of integrations across many merchants, the change must not break currently-integrated merchants. Maintaining backward compatibility involved some major internal refactoring, particularly around messaging and iframe orchestration.
That's the explanation for the delay, but it's not an excuse. We did a poor job communicating about the work and the delays, and as a result we let you all down. For that, we apologize.
We're taking this thread and your feedback seriously. Once we've pushed .destroy(), we will hold an internal post-mortem on this issue so we can (a) understand what went wrong in both the delay and our communication about the change, and (b) improve our processes and transparency going forward.
Thank you for your honesty and directness on this issue, and for working with us as we improve the JS library to support the growing number of ways people want to accept payments.

@rturumella Rad, thanks!
For me, the biggest issue was not knowing there was a single page app issue when adding the drop-in to our page. I was lucky enough to see a nonce can only be used once message which tipped me off to the problem, but QA still caught other instances where our users could make double purchases.
I would really like to see .create throw AT LEAST a console.warn if it's called more than once, and ideally throw an error. I would also like to see your drop-in docs reflect the actual state of single page apps so users like me don't stumble onto the issue.

@theotherzach those are both great suggestions. Thanks for this feedback.

@rturumella We're dead in the water until .destroy() is released. Any news to share at this time?

They told us Friday I think that it'd be coming this week... not sure if you saw that already.
-P

On Aug 31, 2015, at 4:44 PM, Sherman Dickman notifications@github.com wrote:
@rturumella We're dead in the water until .destroy() is released. Any news to share at this time?
—
Reply to this email directly or view it on GitHub.

@shermandickman The .destroy() (or similarly named API) functionality is coming next week. We’ll be pushing it as an edge branch so you all can at least kick the tires and see progress. Thanks for your patience.

@rturumella thanks very much for the explanation.
FWIW the worst part of this for us - the scariest part - was when we
realized that because that nonce was still present even after the user had
logged out, any other person could have used our app to make purchases with
the previous user's payment method if they got ahold of the device.
On 1 September 2015 at 01:56, rturumella notifications@github.com wrote:

@shermandickman https://github.com/shermandickman The .destroy() (or
similarly named API) functionality is coming next week. We’ll be pushing it
as an edge branch so you all can at least kick the tires and see progress.
Thanks for your patience.
—
Reply to this email directly or view it on GitHub
https://github.com/braintree/braintree-web/issues/29#issuecomment-136530674
.

As @rturumella mentioned last week, we are delivering a beta build of braintree.js that exposes the ability to tear down an integration and re-create a new one during a lifecycle of a single page view.
Right now this new version is deployed as a beta build and can be downloaded from here:

https://js.braintreegateway.com/js/braintree-2.13.0-beta.js
https://js.braintreegateway.com/js/braintree-2.13.0-beta.min.js

We will be adding full documentation in an accompanying production release in the coming weeks. In the meantime, we would love to take in some feedback on this new functionality. We know how important this is and we want to make sure when it goes out in production that the experience is rock solid.
Since version 2.7.0, the configuration object passed during braintree.setup has provided an onReady callback. As of this latest build the onReady callback will provide an integration object on which you can perform actions such as teardown. A basic example of this looks like:
var myIntegration;

braintree.setup(TOKEN, 'dropin', {
  onReady: function (integration) {
    myIntegration = integration;
  }
});

// When you're ready to destroy your integration
myIntegration.teardown(function () {
  // braintree.setup can safely be run again!
});

This teardown method will go ahead and do the work necessary to destroy anything that braintree has created on your page including iframes and hidden input elements. It will also close any popups or modals that have been opened by our integration (PayPal). teardown will execute a callback when these operations have completed and you can safely proceed with your next steps.

@kyledetella @rturumella just tested this and it seems to be working fine. I added a $scope.$on('$destroy' bit in the code to call the teardown() and it seems to have nicely cleaned up the dropin. Thanks for the resolution in the end!

@rturumella Does this update also apply to hosted fields js?

@cityreader this update will apply to hosted-fields but that has not been released yet. We are aggressively working to provide teardown for hosted-fields integrations as well. That work lives in a separate beta build and there are a few things we need to reconcile first. I will keep you posted with updates on that.

@kyledetella How are we doing on the hosted fields integration?

@theotherzach the teardown functionality in hosted-fields will be available within 2 weeks. Again, we will make sure to drop the news here as soon as its ready.
Have you had a chance to try out teardown in your Drop-in integration? Is it working as expected for you?

@kyledetella sounds good - looking forward to the new beta.
Just to clarify: I'm currently testing out hosted fields on a React JS powered check out flow. I'm currently having a hard time getting my braintree.setup to fetch my form correct. I do get the onReady-callback (but with no arguments passed - guessing it's because the integration-argument isn't included in the newest hosted-fields beta build?). But for instance my placeholders and other options aren't applied to the input fields in question. Also the onFieldEvent isn't firing when changing value in input fields. When i try to submit a transaction, my onError-event fires with this msg:
message: "User did not enter a payment method"
type: "VALIDATION"

Also my onFieldEvent fires for all inputs on submit - but just after the error msg. They all appear to be empty according to the onFieldEvent, and the container is ".braintree-hosted-fields-invalid" - which obvously tells me something is wrong with my braintree init.
I'm guessing the above is caused by the way react is rendering js and markup. Will i be able to control this better, when the teardown-function is added to braintree?
And is it correct understood, that with the current build of hosted fields, it is not possible to load the hosted fields dynamically on a onpage javascript application?
Thanks for keeping us all updated through development!

@rbsmidt  the onReady callback will not pass any arguments until teardown is introduced into Hosted Fields, so that is expected.
As for the other issues you mentioned (placeholders and options not being applied), these sound unrelated to teardown. It will be easier for us to debug and help you out if we could get some more context on your integration. Would you be willing to post snippets of your setup? If you would rather not post them here, send us an email to hosted-fields@getbraintree.com and we can take this conversation there.
Regarding your last question, let me make sure I understand, are you asking if it is possible to setup hosted fields dynamically after page load? If so, yes you are able to do that. If I am misunderstanding the question, let me know.

Thanks for your reply @kyledetella
Yes i've been debugging a bit more, and it seems that you are right, my issue lies elsewhere. I'm happy to provide an example:
var Checkout = React.createClass({
  componentDidMount: function(){
    console.log('checkout mounted..');
    this.initPayment();
  },
  initPayment: function(){
    console.log('init payment', this);
    var options = {
      id: "payment-form",
      hostedFields: {
        onFieldEvent: function(event){
          console.log('field event triggerede', event);
        },
        number: {
          selector: '#card-number',
          placeholder: 'Kortnummer'
        },
        cvv: {
          selector: '#cvv',
          placeholder: 'CVV'
        },
        expirationDate: {
          selector: '#expiration-date',
          placeholder: 'Kortnummer'
        }
      },
      onReady: function(){
        console.log('braintree ready');
      },
      onError: function(error){
        console.log('an error occurred', error);
      },
      onPaymentMethodReceived: function(event, data){
        console.log('event', event, 'data', data);
      }
    }
    braintree.setup(this.props.state.token, "custom", options);
  },
  render: function(){
    console.log('render checkout', this);
    return(
        <div className="grid-checkout">
          <h3>Check ud</h3>
          <form id="payment-form">
              <input type="text" name="firstname" id="fistname" placeholder="Fornavn" />
              <input type="text" name="lastname" id="lastname" placeholder="Efternavn" />
              <input type="text" name="email" id="email" placeholder="Email" />
              <input type="text" name="tlf" id="tlf" placeholder="Telefon" />
              <p><img src="/images/icon_security.svg" height="15" width="auto" /> Sikker betaling <img src="/images/cc@2x.png" width="auto" height="25"/></p>
              <input type="text" name="card-number" id="card-number"  />
              <input type="text" name="cvv" id="cvv" />
              <input type="text" name="expiration-date" id="expiration-date" />
              <button>Betal</button>
          </form>
        </div>
    );
  }
});

As stated in my last comment, i the onReady-event fires successfully after componentDidMount and the initPayment, but my placeholders doesn't show up, and the onFieldEvent doesn't fire either. When i press the submit-button, my three hosted fields gets the class braintree-hosted-fields-invalid. But before i press submit, the input-fields doesn't have a class. So it seems to me, that my braintree setup never "catches" the three input fields - until i try submitting, and somehow they are registered as empty fields by braintree.js.
The error message is still as stated in my last comment.
Any idea what could cause this setup issue?
Best regards,
Rasmus

@rbsmidt It looks like if you replace the 	input elements for card-number, cvv, and expiration-date with divs, everything works. Hosted Fields actually uses these div elements as containers in which we inject iframes which contain the "hosted fields". Take a look at the documentation and/or this blog post for more detailed information on setting up Hosted Fields.
Here is an example of the updated code for you to try out:
...
  render: function(){
    console.log('render checkout', this);
    return(
        <div className="grid-checkout">
          <h3>Check ud</h3>
          <form id="payment-form">
              <input type="text" name="firstname" id="fistname" placeholder="Fornavn" />
              <input type="text" name="lastname" id="lastname" placeholder="Efternavn" />
              <input type="text" name="email" id="email" placeholder="Email" />
              <input type="text" name="tlf" id="tlf" placeholder="Telefon" />
              <p><img src="/images/icon_security.svg" height="15" width="auto" /> Sikker betaling <img src="/images/cc@2x.png" width="auto" height="25"/></p>

              <div id="card-number"></div>
              <div id="cvv"></div>
              <div id="expiration-date"></div>

              <button>Betal</button>
          </form>
        </div>
    );
  }
});
...

I hope this helps you out. Let us know if you have any more questions.

@lilaconlee Ahh you are totally right. I tested with divs instead of inputs, and it worked like a charm! Thanks a bunch.

@kyledetella we needed to change our drop-in solution out for hosted fields because of styling concerns.

Hi,
I've just been playing with the beta version and found that the onReady callback is not called in some cases, meaning that you aren't provided with the teardown function to clean it up. Specifically if the form is hidden at the time that setup() is called, onReady is not called until you that form becomes visible. If it never becomes visible then you never get the callback so cannot unregister the event handlers.
I've run into this because I have a multi-step check out process with the dropin UI on the second page, so I was loading it in the background since it can take a while to load.
Is this intentional? If so why?
Cheers,
Dave

@davidbryant thanks for bringing this up. You are correct that onReady will not fire in the case of Drop-in until the UI has fully rendered (including the completion of css transitions). When the container/form for Drop-in is hidden, that action will be delayed until the surrounding DOM is made visible.
This is by design since the integration is technically not "ready" until it has fully rendered and is capable of tokenizing payment methods.
The concept of wanting to "preload" the Drop-in is interesting and I am glad you brought it up. The semantics of onReady suit the original intention of the Drop-in UI, but hearing about interesting use cases like yours really help as we make considerations for our products and features. I will bring this issue up with the team and let you know where we end up.
To be honest though, it is unlikely we will change this pattern anytime soon, so in the case of your UI, I would recommend initializing Drop-in only after you have rendered the containing view and tearing it down prior to un-rendering that view.

So this would also imply that I need to prevent all navigation within a SPA from the time that I call braintree setup() until it fires its onReady event? Otherwise there's a chance that a navigation event in that timeframe will prevent onReady from being fired and so not provide me with the teardown callback?

@davidbryant that is correct.
It's not a convenient restriction, but in integrations such as dropin or hosted-fields there is a lot of cross-domain machinery being asynchronously set in motion; cutting it off halfway through with a navigation event could lead to dangling DOM nodes, event handlers, or an unusable integration.

This afternoon version 2.14.0 was released. As you will see in the CHANGELOG, this release takes Hosted Fields out of beta and introduces the teardown API into those integrations as well.
This thread was originally opened to engage a dialogue on this matter and it certainly served that purpose. Should you experience any specific issues with teardown or Hosted Fields, please open a separate issue so that we can address them accordingly.

@kyledetella how should we handle BraintreeData.setup() when using teardown()?
Right now I'm calling
braintree.setup(this.props.paymentToken, "custom", {
  onReady: function(integration) {
    Checkout.braintreeIntegration = integration;
  },
  id: "payment-method-form",
  hostedFields: {...});
BraintreeData.setup(this.props.merchantId, 'payment-method-form', 'production');

And then later using Checkout.braintreeIntegration.teardown() as needed.  It's working well, but will there be complications if I'm repeatedly calling BraintreeData.setup()?

@cheyner it doesn't sound as though you are experiencing issues when repeatedly calling BraintreeData.setup() so it should be fine. However, should you encounter any hiccups, feel free to open a new issue about this and we'll take a look.

@kyledetella Thank you, the teardown APi is working great for us.
Just one bug I encountered: the .bt-overlay doesn't seem to be removed after teardown, and an new one is created whenever the PayPal login screen is displayed. This results to the transluscent black overlay to get darker and darker every teardown/initialization cycle. I remedied it by removing .bt-overlay within the teardown callback. Not sure if this is happening to others, too.

@bezhermoso glad to hear teardown is working out!
Would you mind opening a separate issue regarding .bt-overlay not being removed? It will be easier to track and handle specific issues in more focused threads. In the meantime, we will take a look.

The primary concern for most participants in this thread has been addressed in last week's 2.14.0 release. In the interest of keeping the discussion as specific as possible, we're going to close this issue.
Please open new issues for any further Single Page App concerns or questions. Thanks!

Thanks for the functionality.  When will it be documented?  Can you now call .setup() then braintree.teardown() and .setup again?

@trainerbill we will provide full documentation once this release is hotlinked. That should happen sometime this week.
For now, the explanation and code provided above remains accurate.

Can you now call .setup() then braintree.teardown() and .setup again?

Yes, that is a core allowance with this new feature!

Some months ago we badly needed this teardown() feature. We were changing billing just now and it's great that it's now available! Thank you!

@parreirat glad to hear it helped out!
Also, good call on posting the documentation in this thread, that slipped my mind!

authors: HiroAgustin Streemo ThoamsClark baillyje berendberendsen bezhermoso burnto carsy cheyner cityreader davidbryant duizendnegen fadomire fanfreeman filipediasferreira gambry imgntn iokaravas jeffcarp joanamelo karpitsky kyledetella lilaconlee marcucio mbrochh mrak ms7s niklr parreirat paulrnash poscar ppcano rbsmidt rturumella schmitzdenis shermandickman stubar tastyeggs theotherzach tnunes trainerbill tyleriguchi wmadden

repo: braintree/braintree-web


text:
Unhiding grouped hidden entities on restart

Sometimes, probably on restart but not sure, PowerCalc unhides hidden sensors.
As discussed on home assitant forum, it's probably unhiding entities that are a part of PowerCalc group.
Other PowerCalc sensors that are not a part of a group aren't affected and remain hidden.

Did have a look and was an easy fix. See #1269
Will be fixed in next release.

authors: Dods bramstroker

repo: bramstroker/homeassistant-powercalc


text:
[measure] When the wifi connections dies there's a stacktrace

I'm using the Shell Plug (E?) and this is what happens when I loose the connection to wifi (or my notebook goes into standby - not sure):
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 169, in _new_conn
    conn = connection.create_connection(
  File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 96, in create_connection
    raise err
  File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 86, in create_connection
    sock.connect(sa)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 394, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 234, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/usr/local/lib/python3.8/http/client.py", line 1256, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.8/http/client.py", line 1302, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.8/http/client.py", line 1251, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.8/http/client.py", line 1011, in _send_output
    self.send(msg)
  File "/usr/local/lib/python3.8/http/client.py", line 951, in send
    self.connect()
  File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 200, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 174, in _new_conn
    raise ConnectTimeoutError(
urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPConnection object at 0x7f19d031f700>, 'Connection to 192.168.8.19 timed out. (connect timeout=60)')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 574, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.8.19', port=80): Max retries exceeded with url: /meter/0 (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f19d031f700>, 'Connection to 192.168.8.19 timed out. (connect timeout=60)'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "measure.py", line 666, in <module>
    main()
  File "measure.py", line 663, in main
    measure.start()
  File "measure.py", line 231, in start
    power = self.take_power_measurement(variation_start_time)
  File "measure.py", line 287, in take_power_measurement
    measurement = self.power_meter.get_power()
  File "/app/powermeter/shelly.py", line 47, in get_power
    r = requests.get("http://{}{}".format(self.ip_address, self.api.meter_endpoint), timeout=self.timeout)
  File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 504, in send
    raise ConnectTimeout(e, request=request)
requests.exceptions.ConnectTimeout: HTTPConnectionPool(host='192.168.8.19', port=80): Max retries exceeded with url: /meter/0 (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f19d031f700>, 'Connection to 192.168.8.19 timed out. (connect timeout=60)'))

192.168.8.19 is the IP of the shelly plug

I agree this can be improved upon, will have a look.

I have improved the exception handling of Shelly connection. It will now show clean error messages and abort session after a certain amount of retries.

available in master so you should pull from dockerhub to get these changes.

Thanks for the fast fix! :)

authors: RubenKelevra bramstroker


text:
[Fix] Allow relative urls with redirectTo

Currently, the route's redirectTo handles URLs as absolute.
Relative paths should also be allowed.

Should be solved by https://github.com/brandonroberts/angular-routing/pull/14

Fixed via #14

authors: brandonroberts meeroslav

repo: brandonroberts/angular-routing


text:
Update .gitignore

I don't see anywhere where csv_debug is created

It's created when you run the script in debug mode. Is that not occurring on your end?

ah ok cool

authors: brandonshin hutchic

repo: brandonshin/slackbot-workout


text:
Fixing an error in markdown parsing

In reference to this bug story: https://github.com/brandonweiss/charge/issues/808
My process
git clone https://github.com/brandonweiss/charge.git
cd charge
yarn install
node cli.js [build|serve] docs/ tmp/

Receive this error for either build or serve:
Error: Unknown language: `text` is not registered

I want to mention that I'm really interested in Charge and hope it becomes bigger. I may be forking to see what I can get into it (generalize for myself and others Charge included) so I'd like to be able to play around with it more.

Fixed it and added  newline so that it it doesn't get lost in the console. I would suggest adding colors so that it's red and then you can't miss it if you tried. Maybe even
[builder] › ⚙  starting  Building static files from docs

File: docs/index.html.mdx
Error: Unknown language: `txt` is not registered

error Command failed with exit code 1.

repo: brandonweiss/charge


text:
ts and publish tasks

Quick update to TS and adds publish task.

This is great! I can't believe we did not do this before...

authors: marhalpert mynameisrufus

repo: brandsExclusive/lib-voucher-code


text:
graphviz: Update to version 7.0.1

What type of Apps related PR is this? (check all applicable)

[ ] ✨ Add Manifest
[x] ♻ Refactor
[x] 🐛 Bug Fix
[ ] 👷 Optimization
[ ] 🚩 Other

Description
Change the autoupdate url
Related Tickets & Documents
None - only wasn't autoupdating within the workflow
[optional] What gif/emoji best describes this PR or how it makes you feel?
:alien: :truck: :bug: :recycle:
Did you verify the followings
Add/Modify a description in the manifest?

[ ] 👍 yes
[ ] 🙋 yes, but I need help
[x] 🙅 no, because they aren't needed

Check URLs?

[x] 👍 yes
[ ] 🙋 yes, but I need help
[ ] 🙅 no, because they aren't needed

Update to the latest version?

[x] 👍 yes
[ ] 🙋 yes, but I need help
[ ] 🙅 no, because they aren't needed

Update Hashes?

[x] 👍 yes
[ ] 🙋 yes, but I need help
[ ] 🙅 no, because they aren't needed

Format the json manifest?

[x] 👍 yes
[ ] 🙋 yes, but I need help
[ ] 🙅 no, because they aren't needed

Did you identify extra steps
Notes in the manifest?

[ ] 👍 yes
[ ] 🙋 yes, but I need help
[x] 🙅 no, because they aren't needed

Application Dependencies?

[ ] 👍 yes
[ ] 🙋 yes, but I need help
[x] 🙅 no, because they aren't needed

Application Suggestions?

[ ] 👍 yes
[ ] 🙋 yes, but I need help
[x] 🙅 no, because they aren't needed

Pre-installation steps to perform?

[ ] 👍 yes
[ ] 🙋 yes, but I need help
[x] 🙅 no, because they aren't needed

Post-installation steps to perform?

[ ] 👍 yes
[ ] 🙋 yes, but I need help
[x] 🙅 no, because they aren't needed

File persistence to perform?

[ ] 👍 yes
[ ] 🙋 yes, but I need help
[x] 🙅 no, because they aren't needed

All changes look good.
Wait for review from human collaborators.
graphviz

[x] Description
[x] License
[x] Hashes
[x] Checkver
[x] Autoupdate
[x] Autoupdate Hash Extraction

authors: BotServiceAutomation alexchapar

repo: brave-simpletons/scoop-the-business

license: Unlicense


text:
Check solution for Windows 8 RT & Windows 10 platforms

The library should be available and should work properly for:

Windows 8 (WinRT)
WIndows 10

Library supports now UWP (Windows 10)

repo: brave-warrior/CacheImage


text:
Firacode updates

Update to FiraCode 1.200, and add FiraCode Light

Thanks!

authors: blaqbern braver

repo: braver/fonts


text:
Weird Permission error while accessing a profile

Hi,
I get the following traceback when a user tries to edit its profile.
Here are the versions I use :
Django==1.3
django-guardian==1.0.3
django-userena==1.0.2
I've tried to run check_permissions also, but that doesn't fix it.
If you have any idea about this traceback, i'll be glad to test them to try to fix it.
Thanks,
Guillaume
Traceback (most recent call last):
File "/home/www/virtualenvs/imaginationforpeople.org/lib/python2.6/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/home/www/virtualenvs/imaginationforpeople.org/lib/python2.6/site-packages/userena/decorators.py", line 28, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/home/www/virtualenvs/imaginationforpeople.org/lib/python2.6/site-packages/guardian/decorators.py", line 95, in _wrapped_view
if not request.user.has_perm(perm, obj):
File "/home/www/virtualenvs/imaginationforpeople.org/lib/python2.6/site-packages/django/contrib/auth/models.py", line 324, in has_perm
return _user_has_perm(self, perm, obj)
File "/home/www/virtualenvs/imaginationforpeople.org/lib/python2.6/site-packages/django/contrib/auth/models.py", line 181, in _user_has_perm
backend.has_perm(user, perm, obj)):
File "/home/www/virtualenvs/imaginationforpeople.org/lib/python2.6/site-packages/guardian/backends.py", line 59, in has_perm
return check.has_perm(perm, obj)
File "/home/www/virtualenvs/imaginationforpeople.org/lib/python2.6/site-packages/guardian/core.py", line 49, in has_perm
return perm in self.get_perms(obj)
File "/home/www/virtualenvs/imaginationforpeople.org/lib/python2.6/site-packages/guardian/core.py", line 77, in get_perms
.values_list("codename"))))
File "/home/www/virtualenvs/imaginationforpeople.org/lib/python2.6/site-packages/django/db/models/query.py", line 514, in values_list
_fields=fields)
File "/home/www/virtualenvs/imaginationforpeople.org/lib/python2.6/site-packages/django/db/models/query.py", line 754, in _clone
query = self.query.clone()
File "/home/www/virtualenvs/imaginationforpeople.org/lib/python2.6/site-packages/django/db/models/sql/query.py", line 247, in clone
obj.where = deepcopy(self.where, memo=memo)
File "/usr/lib/python2.6/copy.py", line 173, in deepcopy
y = copier(memo)
File "/home/www/virtualenvs/imaginationforpeople.org/lib/python2.6/site-packages/django/utils/tree.py", line 61, in deepcopy
obj.children = deepcopy(self.children, memodict)
File "/usr/lib/python2.6/copy.py", line 162, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.6/copy.py", line 228, in _deepcopy_list
y.append(deepcopy(a, memo))
File "/usr/lib/python2.6/copy.py", line 173, in deepcopy
y = copier(memo)
File "/home/www/virtualenvs/imaginationforpeople.org/lib/python2.6/site-packages/django/utils/tree.py", line 61, in deepcopy
obj.children = deepcopy(self.children, memodict)
File "/usr/lib/python2.6/copy.py", line 162, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.6/copy.py", line 228, in _deepcopy_list
y.append(deepcopy(a, memo))
File "/usr/lib/python2.6/copy.py", line 173, in deepcopy
y = copier(memo)
File "/home/www/virtualenvs/imaginationforpeople.org/lib/python2.6/site-packages/django/utils/tree.py", line 61, in deepcopy
obj.children = deepcopy(self.children, memodict)
File "/usr/lib/python2.6/copy.py", line 162, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.6/copy.py", line 228, in _deepcopy_list
y.append(deepcopy(a, memo))
File "/usr/lib/python2.6/copy.py", line 173, in deepcopy
y = copier(memo)
File "/home/www/virtualenvs/imaginationforpeople.org/lib/python2.6/site-packages/django/utils/tree.py", line 61, in deepcopy
obj.children = deepcopy(self.children, memodict)
File "/usr/lib/python2.6/copy.py", line 162, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.6/copy.py", line 228, in _deepcopy_list
y.append(deepcopy(a, memo))
File "/usr/lib/python2.6/copy.py", line 162, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.6/copy.py", line 235, in _deepcopy_tuple
y.append(deepcopy(a, memo))
File "/usr/lib/python2.6/copy.py", line 189, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.6/copy.py", line 338, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python2.6/copy.py", line 162, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.6/copy.py", line 255, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py", line 189, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.6/copy.py", line 338, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python2.6/copy.py", line 162, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.6/copy.py", line 255, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py", line 162, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.6/copy.py", line 255, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py", line 162, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.6/copy.py", line 235, in _deepcopy_tuple
y.append(deepcopy(a, memo))
File "/usr/lib/python2.6/copy.py", line 189, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.6/copy.py", line 338, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python2.6/copy.py", line 162, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.6/copy.py", line 255, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py", line 189, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.6/copy.py", line 338, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python2.6/copy.py", line 162, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.6/copy.py", line 255, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py", line 162, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.6/copy.py", line 255, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py", line 162, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.6/copy.py", line 235, in _deepcopy_tuple
y.append(deepcopy(a, memo))
File "/usr/lib/python2.6/copy.py", line 189, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.6/copy.py", line 338, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python2.6/copy.py", line 162, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.6/copy.py", line 255, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py", line 162, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.6/copy.py", line 255, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py", line 162, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.6/copy.py", line 235, in _deepcopy_tuple
y.append(deepcopy(a, memo))
File "/usr/lib/python2.6/copy.py", line 189, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.6/copy.py", line 338, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python2.6/copy.py", line 162, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.6/copy.py", line 255, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py", line 189, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.6/copy.py", line 338, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python2.6/copy.py", line 162, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.6/copy.py", line 255, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py", line 162, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.6/copy.py", line 255, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py", line 162, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.6/copy.py", line 235, in _deepcopy_tuple
y.append(deepcopy(a, memo))
File "/usr/lib/python2.6/copy.py", line 189, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.6/copy.py", line 338, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python2.6/copy.py", line 162, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.6/copy.py", line 255, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py", line 189, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.6/copy.py", line 338, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python2.6/copy.py", line 162, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.6/copy.py", line 255, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py", line 162, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.6/copy.py", line 255, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py", line 162, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.6/copy.py", line 235, in _deepcopy_tuple
y.append(deepcopy(a, memo))
File "/usr/lib/python2.6/copy.py", line 189, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.6/copy.py", line 338, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python2.6/copy.py", line 162, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.6/copy.py", line 255, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py", line 162, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.6/copy.py", line 255, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py", line 162, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.6/copy.py", line 235, in _deepcopy_tuple
y.append(deepcopy(a, memo))
File "/usr/lib/python2.6/copy.py", line 189, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.6/copy.py", line 338, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python2.6/copy.py", line 162, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.6/copy.py", line 255, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.6/copy.py", line 189, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.6/copy.py", line 323, in _reconstruct
y = callable(*args)
File "/usr/lib/python2.6/copy_reg.py", line 93, in newobj
return cls.new(cls, *args)
TypeError: instancemethod expected at least 2 arguments, got 0

Don't think this is an issue of userena. -> Closed.

authors: glibersat wunki

repo: bread-and-pepper/django-userena


text:
Mixed tuples and dictionaries

Is it possible to do mixed tuples and dictionaries???
There are times when I need to use special characters for the key, and tuples can't handle that.

I think what you're after is possible with some exceptions:
https://stackoverflow.com/questions/30503539/namedtuple-and-unicode-string

I want to use a forward slash in a tuple

This brings up a good point that's missing from the docs. We are currently limited to python valid identifiers.
>>> import namedtupled as nt
>>> nt.map({'/x':3})

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/../lib/python3.6/site-packages/namedtupled/namedtupled.py", line 11, in mapper
    return namedtuple_wrapper(_nt_name, **mapping)
  File "/../lib/python3.6/site-packages/namedtupled/namedtupled.py", line 18, in namedtuple_wrapper
    wrap = namedtuple(_nt_name, kwargs)
  File "/../lib/python3.6/collections/__init__.py", line 400, in namedtuple
    'identifiers: %r' % name)
ValueError: Type names and field names must be valid identifiers: '/x'

Another use case that would cause issues:
>>> nt.map({2: 'a'})

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/../lib/python3.6/site-packages/namedtupled/namedtupled.py", line 11, in mapper
    return namedtuple_wrapper(_nt_name, **mapping)
TypeError: namedtuple_wrapper() keywords must be strings

It might be helpful if we added a pre-flight check for valid python identifiers:
>>> '/x'.isidentifier()
False
>>> '2'.isidentifier()
False
>>> 'meow.jpg'.isidentifier()
False

But in the end, using invalid python identifiers would not be possible without some sort of character substitution schema. As an example:
{'example.com/visitors': {'today': 675}}

Might be mapped to something like:
example_dot_com_slash_visitors.today

Yeah, it should at least be mentioned in the docs. Adding some sort of mapping capabilities might not be a bad solution.

authors: brennv jamrizzi

repo: brennv/namedtupled


text:
Use ASWebAuthenticationSession to obtain OAuth grant for Feedly production and sandbox.

This PR:

Allows NNW to request an OAuth grant using ASWebAuthenticationSession. These changes are added to the NNW, Mac App Store and iOS targets.
Substitutes the production ("feedly cloud") OAuth client identifier and secret in a Run Script build phase. In my own testing, I added these values to SharedXcodeSettings/DeveloperSettings.xcconfig.
Shifts the responsibility on NNW to provide the OAuthAuthorizationClient value since NNW just is the client and should own its own information.
Release builds by default build for connecting to Feedly's production API. Debug builds by default build for the the sandbox API.
Search the workspace for FEEDLY_ENVIRONMENT to find the locations to change the debug environment. It is the developers responsibility to ensure the OAuthAuthorizationClient ultimately matches the API environment.
Token refresh will only occur if NNW provides the client to the account delegate sometime after the creation of the account and its delegate. I have covered the first account creation use cases but...

I need guidance (please!). When a Feedly account is restored from disk, where in the codebase should NNW give the restored Account the appropriate OAuthAuthorizationClient value?
Implements #1029.

If I understand correctly — the OAuthAuthorizationClient object needs to be stored with the Account, saved to disk, then reloaded on startup.
(If I don’t understand correctly, let me know!)
Here’s the scoop:
Every Account has a Settings.plist file on disk. It’s a serialized version of an AccountMetadata object, and it contains things like name, username, conditional GET info, and so on.
On startup, the Account sets, on its delegate, the accountMetadata property, so the delegate has access to the AccountMetadata object.
It sounds like AccountMetadata needs to be expanded to include an optional OAAuthorizationClient property — which should be Codable so it can be serialized/de-serialized to disk (to Settings.plist).
Make sense?
If I totally misunderstand the question, let me know. :)

Thanks for the help and chat on Slack, @brentsimmons.

To be clear, the first comment above is outdated. I've since received guidance, made changes and this PR is now ready for review and if acceptable, suitable for merging.
So since the initial comment and contrary to it, here's the final set of changes introduced in this PR:

Bumps the minimum deployment target from 10.14 to 10.15.
Account.framework provides an OAuthAccountAuthorizationOperation for NNW to create an Account of a certain AccountType that supports OAuthAuthorizationGranting. This operation uses ASWebAuthenticationSession.
The operation makes AccountsFeedlyWebWindowController redundant and is therefore removed.
Modifies the Build Phases of Account framework to substitute the production ("feedly cloud") OAuth client identifier and secret from build settings into OAuthAuthorizationClient+Feedly.swift. In my own testing, I added values for these build settings to SharedXcodeSettings/DeveloperSettings.xcconfig.
Release builds by default build for connecting to Feedly's production API. Debug builds by default build for the the sandbox API.
The default OAuthAuthorizationClient values used to connect to Feedly APIs are owned by the Account framework; the NNW module is no longer expected to inject the appropriate client value.
Now that the Account framework owns the authorization information, FeedlyAccountDelegate.environment.oauthAuthorizationClient guarantees the OAuth client information matches Feedly production or sandbox API.
Debug builds can connect to Feedly production/cloud API instead of sandbox by changing the value returned by FeedlyAccountDelegate.environment. The stuff about FEEDLY_ENVIRONMENT above is inapplicable and removed.
I've been given the guidance I need and token refresh is no longer broken.

authors: brentsimmons kielgillard

repo: brentsimmons/NetNewsWire


text:
Sealed configuration makes it much harder to configure Hikari

HikariCP version: 2.7.7
The changes in #1053 in a patch release is quite surprising. Is that exception revealing a fundamentally broken behaviour or was it added to prevent a runtime change to the DataSource that was working (but somehow that feature had to be removed)?
Here is a use case: we are configuring Micrometer metrics in Spring Boot for each HikariDataSource found in the context. Metrics concerns are totally unrelated to DataSource configuration concern so, from a design perspective, they can't happen at the same location. I naively started to configure this and got caught by the fact the DataSource was sealed. The next step is to use a BeanPostProcessor to make sure that code is invoked before a getConnection call is invoked on the DataSource.
This is far from ideal and, again, that behaviour change in a patch release is very annoying.
Besides, there is no way to know if a DataSource is sealed, so the only thing we can do is catch the exception and I am really not keen to do that. If configuring the DataSource is going to fail, we should be able to know about that.

@snicoll The change was made to enforce what has always been our policy; that the only supported method of changing pool configuration at runtime (i.e. once the pool as started) is through the HikariConfigMXBean -- and only the properties supported by that class.
We were getting too many support issues where users altered pool parameters (unsupported at runtime) only to find they had no effect.
However, the change in v2.7.7 also broke special behavior for the metricRegistry and metricsTrackerFactory settings.  We allow those to be set one time, whether the pool has started or not.  v2.7.7, by sealing the configuration upon HikariDataSource construction, broke this use-case.
That is now fixed in a commit I have on deck.  The sealed behavior regarding the rest of the pool configuration (unsupported properties) remains.  Methods defined by the HikariConfigMXBean interface remain unsealed.
I have also introduced two new methods, HikariDataSource.isRunning() and HikariConfig.isSealed() (which is also present on HikariDataSource by inheritence).
As per semantic versioning, I will release these changes as v3.0.0.

@snicoll I have published v3.0.0-SNAPSHOT to the sonatype snapshot repository.  Can you test it?
The repo maven settings are:
<repository>
   <id>oss-sonatype</id>
   <name>oss-sonatype</name>
   <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
   <snapshots>
      <enabled>true</enabled>
   </snapshots>
</repository>

@brettwooldridge I will. Please do note that we are releasing Spring Boot 2.0 GA next week. If 3.0.0 is not available at that time we won't be able to upgrade until Spring Boot 3 (which would be, well, quite a disaster).

Thanks, Brett. I've tried the 3.0.0 snapshots and it fixes the problem with the pool being sealed. In our case it was due to a call to getConnection() and such a call no longer prevents us from configuring the metrics tracker factory.
With regards to the need for a 3.0.0 for this change, I wonder if some other options could be considered? We have managed to work around the problems reported here and in #1096 with 2.7.7. If it's a choice between keeping those workarounds vs Hikari jumping to 3.0, I'd prefer to keep the workarounds. I also wondered if it would be possible to just fix the sealing problem that was introduced in 2.7.7 in a 2.7.8 release? That, too, would be preferable to a jump to 3.0 or even 2.8 just for this problem.

I am willing to put out the change as a 2.7.8 release — removing the two new APIs (isRunning() and isSealed())...

Thank you.

authors: brettwooldridge snicoll wilkinsona

repo: brettwooldridge/HikariCP


text:
Improve error message for bad property name

I'm sorry to be nitpicking here, but this is one of the first error messages you can encounter when starting with HikariCP:
ERROR c.z.hikari.util.PropertyBeanSetter - Property initializeFailFast is does not exist on target class class com.zaxxer.hikari.HikariConfig
The other error message in PropertyBeanSetter is also likely to print "class" twice.

HikariCP 2.3.2 has been released with a fix for this issue.

Fix verified in release :-)

authors: brettwooldridge fwi


text:
Russia MOEX

Hello friends! Very like your project! Please add Russian MOEX symbols to your tradingview.db database!
Blue chips of MOEX are:
MOEX
GAZP
VTBR
SBER
LKOH
ROSN
MTSS
RTKM
YNDX
NVTK
TCS
TCSG
PHOR
CHMF
NLMK
MAGN
PLZL
POLY
SNGS
SNGSP
TATN
MGNT
MVID
ALRS
AFLT
AFKS
AGRO
HYDR
FIVE
GMKN
RUAL
IRAO
Best regards!

Added Russia stock market.

I'll close this issue. If you have any questions, you can reply/comment on this issue.

authors: Gourieff brian-the-dev

repo: brian-the-dev/tradingview-list


text:
Scylla improvements

[scylla] enable token aware LB by default
[scylla] doc: add latency correction section
[scylla] doc: dump and merge histograms
[scylla] doc: don't configure connections manually

@tarzanek take a look at this fix

@tarzanek take a look at this fix

scylla.tokenaware

default driver setting is DCAware(TokenAware) - you don't need to specify local DC, if there is just one DC
so this is true if there is just single DC

scylla.tokenaware

default driver setting is DCAware(TokenAware) - you don't need to specify local DC, if there is just one DC
so this is true if there is just single DC

@busbey @tarzanek ping

@busbey @tarzanek ping

it makes sense to keep TOKEN_AWARE_LOCAL_DC (or use some other name, your choice)
since for multi DC testing cluster specifying this local DC sets proper distance and makes queries enforce to go for local DC
so under the if you'd have something ala
if TOKEN_AWARE_LOCAL_DC is set {
String localDc = getProperties().getProperty(TOKEN_AWARE_LOCAL_DC);
policy = new TokenAwarePolicy(DCAwareRoundRobinPolicy.builder().withLocalDc(localDc).build());
builder = builder.withLoadBalancingPolicy(policy);
}

if you specify local DC queries will go there, then based on retry policy they might try other DCs, but you can later enforce and specify the behaviour using CL
LOCAL_ONE or LOCAL_QUORUM only go to local DC

so you should also change the default to LOCAL_QUORUM and claim the default supported is local DC
and for multi DC one would need to set TOKEN_AWARE_LOCAL_DC and proper consistency level based on what you want to test (QUORUM or LOCAL_QUORUM)

it makes sense to keep TOKEN_AWARE_LOCAL_DC (or use some other name, your choice)
since for multi DC testing cluster specifying this local DC sets proper distance and makes queries enforce to go for local DC
so under the if you'd have something ala
if TOKEN_AWARE_LOCAL_DC is set {
String localDc = getProperties().getProperty(TOKEN_AWARE_LOCAL_DC);
policy = new TokenAwarePolicy(DCAwareRoundRobinPolicy.builder().withLocalDc(localDc).build());
builder = builder.withLoadBalancingPolicy(policy);
}

if you specify local DC queries will go there, then based on retry policy they might try other DCs, but you can later enforce and specify the behaviour using CL
LOCAL_ONE or LOCAL_QUORUM only go to local DC

so you should also change the default to LOCAL_QUORUM and claim the default supported is local DC
and for multi DC one would need to set TOKEN_AWARE_LOCAL_DC and proper consistency level based on what you want to test (QUORUM or LOCAL_QUORUM)

@tarzanek ok, I returned configuration for scylla.local_dc back. Do you know if use of TokenAwarePolicy here is necessary?
policy = new TokenAwarePolicy(DCAwareRoundRobinPolicy.builder().withLocalDc(localDc).build());

Because as far as I saw Shard-Awareness is implemented in a different place / level.

@tarzanek ok, I returned configuration for scylla.local_dc back. Do you know if use of TokenAwarePolicy here is necessary?
policy = new TokenAwarePolicy(DCAwareRoundRobinPolicy.builder().withLocalDc(localDc).build());

Because as far as I saw Shard-Awareness is implemented in a different place / level.

I'd keep it, since above is default, we can ask @haaawk to be 100% sure
I'll review now

lgtm actually, so from my side feel free to merge!
and thank you for addressing my comments

@tarzanek ok, I returned configuration for scylla.local_dc back. Do you know if use of TokenAwarePolicy here is necessary?
policy = new TokenAwarePolicy(DCAwareRoundRobinPolicy.builder().withLocalDc(localDc).build());

Because as far as I saw Shard-Awareness is implemented in a different place / level.

I'd keep it, since above is default, we can ask @haaawk to be 100% sure
I'll review now

Shard awareness is implemented in different place - that's correct. It won't work without TokenAwarePolicy though.

thank you guys! @busbey would you be interested in taking a look at this one?

authors: haaawk sitano tarzanek

repo: brianfrankcooper/YCSB


text:
Alt + Backspace to delete complete words

Hey Brian,
Can't believe I'm the first person creating an issue here. This project is such a great idea! I missed this automation in other projects like ishell or promptui.
Bug / Feature Request
I just noticed that alt + backspace behaves strangely. It will insert question marks instead of deleting complete words as I would expect it in an interactive shell.
As it messes with the cli-ui it might be a bug to address but also a nice feature implementation that I'd love to see!
Edit: Also ctrl+right and ctrl+left would be a great idea in order to skip through longer commands as I just noticed :D
Thanks in advance!

Thanks for testing it out and submitting all these great issues!
It looks like go-prompt uses Emacs keybindings by default. So ctrl+w should accomplish the same thing as alt+backspace. It looks like a few shortcuts are missing from the go-prompt library, so it looks like we'll need to wait for https://github.com/c-bata/go-prompt/issues/249 before we can implement alt+backspace and others.
ctrl+left and ctrl+right might be doable to implement, though. It looks like you're using Windows (and I'm on Mac), so could you give this a try and let me know if it works for you?
opt := prompt.OptionAddKeyBind(
	prompt.KeyBind{Key: prompt.ControlLeft, Fn: prompt.GoLeftWord},
	prompt.KeyBind{Key: prompt.ControlRight, Fn: prompt.GoRightWord},
)
cmd.AddCommand(shell.New(cmd), opt)

Cool, this works! Just had to move opt into shell.New like this:
cmd.AddCommand(shell.New(cmd, opt))

Sadly there is no prompt.AltBackspace. :-1:
I think the correct PR was https://github.com/c-bata/go-prompt/pull/112
but there was also some talk about Mac keyboard issues.
Strange. I'll ask what happend and why it got closed :man_shrugging:
However this is an issue up to go-prompt so you got a great solution to my problem :+1: 1000 thanks!

Just a quick heads up. It's possible to create ASCIICodeBinds. So I modified your suggestion to include also Alt+Backspace:
func init() {
	keyBinds := prompt.OptionAddKeyBind(
		prompt.KeyBind{Key: prompt.ControlLeft, Fn: prompt.GoLeftWord},
		prompt.KeyBind{Key: prompt.ControlRight, Fn: prompt.GoRightWord},
	)
	codeBinds := prompt.OptionAddASCIICodeBind(
		prompt.ASCIICodeBind{ASCIICode: []byte{0x1b, 0x7f}, Fn: prompt.DeleteWord}, // Alt + Backspace
	)
	rootCmd.AddCommand(shell.New(rootCmd, keyBinds, codeBinds))
}

authors: brianstrauch cmprmsd

repo: brianstrauch/cobra-shell


text:
Master build failed (-:

Master failed on build
ERROR: Could not find a version that satisfies the requirement checkov==2.0.173 (from versions: 0.0.0, 0.0.749, 1.0.27, 1.0.28, 1.0.29, 1.0.30, 1.0.31, 1.0.32, 1.0.33, 1.0.37, 1.0.45, 1.0.46, 1.0.47, 1.0.48, 1.0.49, 1.0.50, 1.0.51, 1.0.54, 1.0.55, 1.0.56, 1.0.57, 1.0.58, 1.0.59, 1.0.60, 1.0.62, 1.0.63, 1.0.64, 1.0.66, 1.0.67, 1.0.70, 1.0.71, 1.0.74, 1.0.75, 1.0.76, 1.0.77, 1.0.78, 1.0.79, 1.0.80, 1.0.82, 1.0.83, 1.0.84, 1.0.85, 1.0.86, 1.0.87, 1.0.89, 1.0.90, 1.0.91, 1.0.92, 1.0.93, 1.0.94, 1.0.95, 1.0.96, 1.0.97, 1.0.98, 1.0.99, 1.0.100, 1.0.101, 1.0.102, 1.0.103, 1.0.104, 1.0.105, 1.0.106, 1.0.107, 1.0.109, 1.0.110, 1.0.111, 1.0.112, 1.0.113, 1.0.114, 1.0.115, 1.0.116, 1.0.117, 1.0.118, 1.0.119, 1.0.120, 1.0.121, 1.0.122, 1.0.123, 1.0.124, 1.0.125, 1.0.126, 1.0.127, 1.0.128, 1.0.129, 1.0.130, 1.0.131, 1.0.132, 1.0.133, 1.0.134, 1.0.135, 1.0.136, 1.0.137, 1.0.138, 1.0.139, 1.0.140, 1.0.141, 1.0.142, 1.0.143, 1.0.144, 1.0.145, 1.0.146, 1.0.147, 1.0.148, 1.0.149, 1.0.150, 1.0.151, 1.0.152, 1.0.153, 1.0.15...

fixing now.

Seems to be working again!

repo: bridgecrewio/checkov-action


text:
Incorrect hash code for numbers

Expected
HashCode should reuse integer number as hash code
Float number should be converted to exponential string and calcukate code for that string
http://forums.bridge.net/forum/bridge-net-pro/bugs/2633-little-bug-i-guess

Related to forum thread:
http://forums.bridge.net/forum/bridge-net-pro/bugs/2633-little-bug-i-guess

authors: geoffreymcgill vladsch

repo: bridgedotnet/Bridge


text:
Rename Pep8 and Pep257 Hooks

The pep8 and pep257 projects have been renamed to pycodestyle
and pydocstyle, respectively.
To reflect these changes:

The references to the former projects in README.md and default.yml
have been updated.

The ruby files under pre_commit for the former projects have been
kept for backwards compatibility with existing .overcommit.yml
files.

New ruby files have been created under pre-commit.

@trotzig – so that an existing .overcommit.yml with a Pep8 section would result in overcommit calling pycodestyle? I was assuming that the user might not have pycodestyle installed yet, but would likely still have pep8 installed.

I was thinking we could just inject the name of the binary to some shared code. But yeah, probably not worth the effort.
One thing we could do is to add a comment in the default config at the place for the old hooks to mention that they are deprecated.

The appveyor failure looks unrelated to your change. @sds, looks like it could be failing because of changes you made to LineEndings in afdebb. Do you have any ideas?

@trotzig – I've added comments to the default config as requested.

Thanks!

@trotzig I don't have access to a Windows machine to look into that failure, but given the test that's failing is for a pretty minor feature, I've changed it to not run on Windows environments for now (see  d44631403a3c06b08ffbe818eef58cb4cf7e91e6).

authors: proinsias sds trotzig

repo: brigade/overcommit


text:
Include "clean" files in report output

I'm writing an HTML reporter to go along with your linter, and I would love to be able to report the number of files that were linted and passed the lint inspection.
Thanks for making such a great tool!

This would require new options to the scss-lint script. Examples of current options like this include:

GNU diff has --brief to "only report when files differ" and --report-identical-files to "report when two files are the same."
GNU grep has --files-without-match and --files-with-matches.

Perhaps scss-lint could have options --files-without-lint and --files-with-lint?

Or actually... it's just a reporter. I've opened #527 which gives reporters access to the list of files that were linted.

Implemented in #527.

authors: edendramis sds srawlins

repo: brigade/scss-lint


text:
swift 2

any updates for swift 2 ?

What kind of updates do you require?
You may fork it and make changes and then issue a pull request. Thanks.

repo: brightec/CustomCollectionViewLayout


text:
Feature/ng 14

Changes proposed in this Pull Request:

Update deps to ng 14
Resolve any peer dep warnings
Add typed forms to dev docs

Thanks for applying the beta tags on these.