app.config Transformation

Having build in transformations to app.config ala web.config would be really nice

Team triage: this is implementable via a NuGet package that extends the build process and hasn't seen high demand. Closing as won't-fix.


LDAP 504 failed to connect

following the guide to install chef-server standalone on ubuntu 14.04 https://docs.chef.io/install_server.html
When configuring the chef-server.rb
ldap['host'] = "ldap.foxpass.com"
ldap['port'] = 636
ldap['ssl_enabled'] = true
ldap['tls_enabled'] = false
ldap['base_dn'] = "DC=company,DC=com"
ldap['bind_dn'] = "CN=chefPOC,DC=company,DC=com"
ldap['bind_password'] = "***********"
ldap['login_attribute'] = "uid"
ldap['timeout'] = 60

If I execute ldap search from the same box as chef-server is running on everything works properly. however when I attempt to log in to chef the following appears in the logs.
==> /var/log/opscode/opscode-erchef/erchef.log <==
2016-04-19 21:10:20.844 [error] Failed to connect to ldap host or an error occurred during connection setup. Please check private-chef.rb for correct host, port, and encryption values: "connect failed"

==> /var/log/opscode/nginx/access.log <==
<IP_ADDRESS> - - [19/Apr/2016:21:10:20 -0700]  "POST /authenticate_user HTTP/1.1" 504 "0.023" 51 "-" "Chef Manage/11.16.2 (ruby-2.2.2-p95; ohai-7.4.1; x86_64-linux; +http://opscode.com)" "<IP_ADDRESS>:8000" "504" "0.018" "11.16.2" "algorithm=sha1;version=1.0;" "pivotal" "2016-04-20T04:10:20Z" "224ryeoFs87+GoyYKioKCn9f3qE=" 1120
<IP_ADDRESS> - - [19/Apr/2016:21:10:20 -0700]  "POST /login HTTP/1.1" 200 "0.058" 4298 "https://chef.daqri.com/login" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36" "<IP_ADDRESS>:9462" "200" "0.058" "-" "-" "-" "-" "-" 945

==> /var/log/opscode/opscode-erchef/crash.log <==
2016-04-19 21:10:20 =ERROR REPORT====
{<<"method=POST; path=/authenticate_user; status=504; ">>,"Gateway Timeout"}

==> /var/log/opscode/opscode-erchef/erchef.log <==
2016-04-19 21:10:20.844 [error] {<<"method=POST; path=/authenticate_user; status=504; ">>,"Gateway Timeout"}

==> /var/log/opscode/opscode-erchef/current <==
2016-04-20_04:10:20.90990 [error] Failed to connect to ldap host or an error occurred during connection setup. Please check private-chef.rb for correct host, port, and encryption values: "connect failed"
2016-04-20_04:10:20.94065 [error] {<<"method=POST; path=/authenticate_user; status=504; ">>,"Gateway Timeout"}

these errors show up in the chef logs milliseconds after clicking login through the management console so a 504 seems like an improper error code.
I have spoken with foxpath and there is no inbound connection to their ldap service, something in chef server is failing to connect to ldap and is throwing the error.

tailing the opscode-erchef* gives me more info:
==> /var/log/opscode/opscode-erchef/erchef.log <==
2016-04-21 12:23:12.560 [error] LDAP search failed unexpectedly: noSuchObject

which seems to come from https://github.com/chef/chef-server/blob/bb28b489960c8fae6ac061bf2dab5800142b22a3/src/oc_erchef/apps/oc_chef_wm/src/oc_chef_wm_authn_ldap.erl

Did more digging:
Chef server appears to ignore the ssl_enabled and tls_enabled flags in the chef-server.rb file.
With tls_enabled set to false and ssl_enabled set to true the chef server's client hello only offers TLS cipher suites.
This might be the real root of the cause, since foxpass claims to only support SSL
Important packet trace shows chef-server closes the connection with a TLSv1.2 Record Layer: Encrypted Alert
Timeout for connections is 600
tcpick: reading from synconnections.pcap
1      SYN-SENT       <IP_ADDRESS>:58885 > <IP_ADDRESS>:ldaps
1      SYN-RECEIVED   <IP_ADDRESS>:58885 > <IP_ADDRESS>:ldaps
1      ESTABLISHED    <IP_ADDRESS>:58885 > <IP_ADDRESS>:ldaps
<EMAIL_ADDRESS>...9.8.....5...........
.	...3.2...../...............	...{.........ldap.foxpass.com.
.............	.
...........................................
....Q...M..?.Vr..2....eWa&4.o...L..G...)Jo. .Jw/.Fx......[.z&..
.....0G1.0H..=....U....US1.0...U.\..-0..)0..........	L!0
..........0..0.1.0...U....ldap.foxpass.com0.."00..
......VO.N.......3..!w..P..y..]``>w.E.....r5.b....2.\..'.-.Y.~uM?..U+.........xr..0H.Fe....,.]"...~./@.~..._.T.....&.k.?.....CF:.a...1..'....E3:!...!)....#..E...;..9r..V.4.e!I...hW.K.d<y.p......$...c.h..].1._%.t.q.J.a..;TyMr........(.........55......w.<:d8k8...........H0..D0...U.#..0........F.4..F..|[....Y0W..+........K0I0...+.....0...http://gv.symcd.com0&..+.....0...http://gv.symcb.com/gv.crt0...U...........0...U.%..0...+.........+.......0...U....0...ldap.foxpass.com0+...,..-..N.*-.r.g...P.lr.M.=Ui..}n(y.'..-.E....e0z...@.&.S..$S.>.`5.{.M7.....p....I.K..-`|.....gCys://www.rapidssl.com/legal0
.....0B1.0H...=	..U....US1.0...U...8r.,T-....D..9hs.o....h.R.........fi..........Z8...;@>].L........za..\.V..}.....R.b.ZOlr..#..)0..%0..
220520213932Z0G1.0.U......U....US1.0...U.A0..
..........0..1 0...U....RapidSSL SHA256 CA - G30.."0
......T..X].,V.....}.....Z....T....].....
..e_...D|....J...C.....&.a..f1".44_??./D_.......K..........iR..d......p.....j,...i..
..cZhq.{0.......>H.Uz.................c.../..W.<H..h!./..?.......S..rO`.B.....W.....~.N.!.S.6.H....H.).d..THS...e..)3).)`H....WX.5..i.Y.........0...0...U.#..0....z.h.....d..}.}e...N0...U...........F.4..F..|[....Y0...U.......0.......0...U...........05..U....0,0*.(.&.$http://g.symcb.com/crls/gtglobal.crl0...+........"0 0...+.....0...http://g.symcd.com0L..U. .E0C0A.
0.._a,..........bLp&............~Nd...aU..:.]%....JtVO.U@pu%.3..K.]S.nE.....I......Y...,;..Z..{.5{..3.{.q"B...oO.....y..J.w	.......T..{
...........=..b.?.sxC.....p.........Kx'YkuKC..]...v.Z..g.M?3....%...',..B.x.V.K....O.p..K.K........[..$....C.\..YX...............9'..K...'"......9~..Sgk...xsP#z.X....N..1...&.c.|......#..T...	.Y.......6.4.`VL|...*r....C....p#i...$.y..Y..!.>...
..........Pl.C.$.h@vL!,.....z/B..h.....9./....Q.......4.:S..Y...yr.z..	..w.wyxm2^...VA.E...
..........P........},<..4,.z....".Y....2.{.Mt...h.....f..L.D..Zq...m.R..NY.z8.1.`.e.7Q..f.~
....p..c..F.ec.%....).. .$m.u-w...5n...!....g.1.M....o'.P.....(.LT..+S......
.$..........PH....~8a.
....|0vD..v.$cQ.,
....`.._..fm......[.2K...Tk....(..5.F(". mfJ.w.v..*...z.5m.e..*o..;R..;t !....
.$.
m%UJG...6......".*
.6.n ..x.(...z(....r...[GBz.C...d.`<G.,....J.a..4..U.U.x@....M.)2/M......xt$&..
....@*..%p.nP_.'.d.V....@..E..<6...5..b...Q....c.Q.{..)...s`.*.m....R
....@.J..............Ij.......].N..T..)X.J.o..F].c..j.. G{.(Lx.."g...
1      FIN-WAIT-1     <IP_ADDRESS>:58885 > <IP_ADDRESS>:ldaps
1      FIN-WAIT-2     <IP_ADDRESS>:58885 > <IP_ADDRESS>:ldaps
1      TIME-WAIT      <IP_ADDRESS>:58885 > <IP_ADDRESS>:ldaps
1      CLOSED         <IP_ADDRESS>:58885 > <IP_ADDRESS>:ldaps
tcpick: done reading from synconnections.pcap

25 packets captured
1 tcp sessions detected

Following is the client hello showing chef server only offers TLS despite disabling it in the settings
Secure Sockets Layer
    SSL Record Layer: Handshake Protocol: Client Hello
        Content Type: Handshake (22)
        Version: TLS 1.2 (0x0303)
        Length: 256
        Handshake Protocol: Client Hello
            Handshake Type: Client Hello (1)
            Length: 252
            Version: TLS 1.2 (0x0303)
            Random
                gmt_unix_time: Apr 21, 2016 16:33:45.000000000 PDT
                random_bytes: 3d499f73fcb2838ec45bbddf4e0fe01b79ec0d522e8294c4...
            VO.N.......3..!w..P..y..]``>w.E.....r5.b....2.\..'.-.Y.~uM?..U+.........xr..0H.Fe....,.]"...~./@.~..._.T.....&.k.?.....CF:.a...1..'....E3:!...!)....#..E...;..9r..V.4.e!I...hW.K.d<y.p......$...c.h..].1._%.t.q.J.a..;TyMr........(.........55......w.<:d8k8...........H0..D0...U.#..0........F.4..F..|[....Y0W..+........K0I0...+.....0...http://gv.symcd.com0&..+.....0...http://gv.symcb.com/gv.crt0...U...........0...U.%..0...+.........+.......0...U....0...ldap.foxpass.com0+...,..-..N.*-.r.g...P.lr.M.=Ui..}n(y.'..-.E....e0z...@.&.S..$S.>.`5.{.M7.....p....I.K..-`|.....gCys://www.rapidssl.com/legal0
.....0B1.0H...=	..U....US1.0...U...8r.,T-....D..9hs.o....h.R.........fi..........Z8...;@>].L........za..\.V..}.....R.b.ZOlr..#..)0..%0..
220520213932Z0G1.0.U......U....US1.0...U.A0..
..........0..1 0...U....RapidSSL SHA256 CA - G30.."0
......T..X].,V.....}.....Z....T....].....
..e_...D|....J...C.....&.a..f1".44_??./D_.......K..........iR..d......p.....j,...i..
..cZhq.{0.......>H.Uz.................c.../..W.<H..h!./..?.......S..rO`.B.....W.....~.N.!.S.6.H....H.).d..THS...e..)3).)`H....WX.5..i.Y.........0...0...U.#..0....z.h.....d..}.}e...N0...U...........F.4..F..|[....Y0...U.......0.......0...U...........05..U....0,0*.(.&.$http://g.symcb.com/crls/gtglobal.crl0...+........"0 0...+.....0...http://g.symcd.com0L..U. .E0C0A.
0.._a,..........bLp&............~Nd...aU..:.]%....JtVO.U@pu%.3..K.]S.nE.....I......Y...,;..Z..{.5{..3.{.q"B...oO.....y..J.w	.......T..{
...........^t.D.Q..3(.s].	..vn..R............R.mCn..x..Y.........N.j{.-4.h(..F............A,.E.U/.W.".U!F_....Z...TY...W.YR. ..	p.J".....4Q......g...C_X,Qw1..z.3.C:.=..g.:...k...._....B....8	.....3i....d....^\..^....|..u.........&..6b"...w......'Ws.n..pD.U..Y(....
.6
......
.........y..Y.ui.......'....Ji.....96_@.j)"...*...V{...m.g.......Z...~.y'.Z..w.9...u..|.9O..J~....Ck.T\..]q.....D..4..K.{...52..(Y..XI..M.I./..@.iec....QK."|r.v....Ek...`....1.q.......{.-FI.h....lp.;.j..I.W|#.h...xYASBz......(E..Dc..y.!.bpxl...;..R.c.... DSg...
..........@.g'...K..<...*.M...j].0..).&..Y....
.5
i..bn....GQZ...(.{.u...fr
..............6.>..X.;.h<...........6.2kx....D...|.B*........Ng.2.G'.h.....I=..&9MB{=NG.....N.j...;.8.LBU.a.D.....Tu...]..........2..
....P..@F.8....:QcS..Te7.t....lQ....;...a^$.=.?..4*. ).d..q0z...nh9...f...|.ao.}F...\
......C..:..........S..s_......,..w.k....?\....c.....\+.'o.U.b\...A"Xj.J....{.Lsp]|KfQ..f..	.t.....l.~	n.H..fC.b.A.vu...Q.E....l.BO.K6..w. 7.=......d.eFD1n...#.=..k...K......#.._..^...%..,4....r.y.
.......m.~.t........N....r.Ds...OmCN.X8.^.B.
v."'.Re.<k<.pF........s_./R$.lK.....JC .......\...(.r3.C....}........'	...Z......H.-h..E....H....{..?b....#[.TAc.......qg.Y..g..68F.o.1.8......S.
.....g.:t/....,9.ix..\....B.@........O.Q....R.>T.R#.\.......Q....u<EMAIL_ADDRESS>E...q.....b..Xp..H..$
|..o.>]...z]N......\.-.......+./.=9.
......Q.0(U.K...}...o:..'w.
U.S~.#.mosW..:......d7.6...+0.	....%...r.&...cj'....[........0.+i...,..&w.......U...V.eWa<.w....3."......
........>.=.9d5.CI=1.B.].......^..E..7..W.Fu.	...$.a..4..9.q.cm.H...s..I........r{...d....g..9.M.Sq...J..c...k.aDmY.d.....<IQ*.6!/'.2..........[}...K
1      FIN-WAIT-1     <IP_ADDRESS>:48189 > <IP_ADDRESS>:ldaps
1      FIN-WAIT-2     <IP_ADDRESS>:48189 > <IP_ADDRESS>:ldaps
1      TIME-WAIT      <IP_ADDRESS>:48189 > <IP_ADDRESS>:ldaps
1      CLOSED         <IP_ADDRESS>:48189 > <IP_ADDRESS>:ldaps
tcpick: done reading from synconnections.pcap

29 packets captured
1 tcp sessions detected

there are four more packets sent and obviously more encrypted LDAP packets are sent back and forth

Same here!
Getting a 504. The LDAP server is an OpenLDAP.

@gfoligna did you ever get a resolution?

I'm a bit surprised that this issue isn't being addressed at all...
I too am experiencing this.

Instead of ssl/tls_enabled, does it behave when you set:
ldap['enable_ssl'] = true
ldap['enable_tls'] = true

@cpoole @gfoligna did the suggestion above resolve this issue for you?

same issue here.. @marcparadise that did not work for me.

hey everyone, we gave up and just went with hosted chef and manually creating accounts. I have since torn down the proof of concept server.
I'm sure I can stand this up quickly again and make some more trial connections if need be. I can probably get log entries from foxpass as well... but the fact that this is a 504 makes me suspicious that the requests are not reaching foxpass's application servers

@cpoole Thanks for the offer but I wouldn't go out of your way, it is easy enough for us to set up a test locally.  Any users currently hitting problems with LDAP should also feel free to let us know what they are seeing.

sounds good. My specific use case was with the hosted LDAP provider foxpass (great service btw). Their founder might have some insight as well... paging @aren

Happy to help debug<EMAIL_ADDRESS>

I finally got my test instance back up to not impact production.  What information can I provide to help move this along? Our setup is LDAP secure (636) with self signed certs


Making button text color change based on background lightness

Added a setting for color threshhold (default is 50).
Added some checks for button color background to determine if the button should have the alternate color or not.
Simplified code somewhat using "&" (and fixed a bug where non-standard sized buttons were incorrectly inheriting the standard button text color)

Nice PR! This a cool thing we did with callouts and buttons in Foundation for Apps. We'll be testing this today for merge!

As this is a feature, we'd like to follow the standard programing releases where features are on a major point release. Are you able to target this to the 2.2 branch?

Sure, would you like me to make a pull request into that branch?
On Fri, May 13, 2016, 10:17 AM Rafi<EMAIL_ADDRESS>wrote:

Nice PR! This a cool thing we did with callouts and buttons in Foundation
for Apps. We'll be testing this today for merge!
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/zurb/foundation-emails/pull/438#issuecomment-219104700

--
Sean Rice
Senior UX Designer | Ethology
<EMAIL_ADDRESS>

I created a new pull request into the proper branch. Closing this one!


wfd-515

PR Details
This PR fixes several issues encountered during integration testing of the historical data processing service for rosbags.

Fixes call to InfluxDBClientError which was not being declared correctly.
rosbag processing service tries to connect to the mysql database just once and throws an error if the database is not available. This is an issue because when bringing up the local deployment, the mysql database might start after the processing service. A max number of retries was added.
rosbag processing service should try to re-establish connection to mysql if the connection fails during operation

Description

Related GitHub Issue

Related Jira Key

Motivation and Context

How Has This Been Tested?

Types of changes

[x] Defect fix (non-breaking change that fixes an issue)
[ ] New feature (non-breaking change that adds functionality)
[ ] Breaking change (fix or feature that cause existing functionality to change)

Checklist:

[ ] I have added any new packages to the sonar-scanner.properties file
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.

There are some merge conflicts.


localizePath is not able to localize urls with a dynamic path

Describe the bug
localizePath is not able to localize urls with a dynamic path
To Reproduce
Say you have:
src/pages/solutions/[slug].astro
You will have routes like:
localhost:3000/solutions/foo
localhost:3000/solutions/bar
localhost:3000/solutions/baz

Then imagine I want to translate solutions to spanish, AKA soluciones
I tried:
routes: {
  es: {
    solutions: {
      index: 'soluciones',
      '[slug]': '[slug]'
    }
}

On the one hand I had to put the index part or it won't work but I tried to add [slug] which generates the correct page. I can even go to:
localhost:3000/es/soluciones/foo
and that will work, but if I tried something like:
localizePath(`/solutions/${slug}`)
localizePath('/solutions/foo')

it will generate:
localhost:3000/es/solutions/foo

So far I am doing:
`${localizePath('solutions')}/${slug}`

That will generate:
localhost:3000/es/soluciones/foo

Which works but breaks the LanguageSelector since it is not doing this trick.
localizePath should be able to localize a path with a dynamic path in it.
Context (please complete the following information):

astro-i18next version: beta.21
astro version: 2.1.7
OS: Windows 11
Browser: Chrome

I found my solution..
use redirect experimental where release in astro 2.6.
redirects: {   "/es/solutions/[slug]": "/es/soluciones/[slug]", "/soluciones/[slug]": "/solutions/[slug]", }

You need to pass the full url to be localized, example:
mywebsite.com/[category]/[id] <- this is my url with dynamic paths.
const url = `items/${category}/${id}`
Localized link


helm template rendering wrong output

Output of helm version:
version.BuildInfo{Version:"v3.1.1", GitCommit:"afe70585407b420d0097d07b21c47dc511525ac8", GitTreeState:"clean", GoVersion:"go1.13.8"}

Output of kubectl version:
Client Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.7", GitCommit:"6f482974b76db3f1e0f5d24605a9d1d38fad9a2b", GitTreeState:"clean", BuildDate:"2019-03-25T02:41:57Z", GoVersion:"go1.10.8", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.3", GitCommit:"b3cbbae08ec52a7fc73d334838e18d17e8512749", GitTreeState:"clean", BuildDate:"2019-11-13T11:13:49Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}

Cloud Provider/Platform (AKS, GKE, Minikube etc.):  bare metal
How to reproduce

helm create test
open test/templates/ingress.yaml add a comment in front of the file

# comment
{{- if .Values.ingress.enabled -}}

helm template --set ingress.enabled=true test | less
search for the Ingress section

# Source: test/templates/ingress.yaml
# commentapiVersion: networking.k8s.io/v1beta1 <-- THIS LINE SHOULD NOT BE HERE
kind: Ingress

I test helm-v3.1.2 this bug still exist

The {{-  is removing the newline between your if statement and the # comment. Switch it to {{  (no -) and you will be fine.

closing as documented in https://golang.org/pkg/text/template/#hdr-Text_and_spaces


[SPARK-34187][SS][3.0] Use available offset range obtained during polling when checking offset validation

What changes were proposed in this pull request?

This patch uses the available offset range obtained during polling Kafka records to do offset validation check.
Why are the changes needed?

We support non-consecutive offsets for Kafka since 2.4.0. In fetchRecord, we do offset validation by checking if the offset is in available offset range. But currently we obtain latest available offset range to do the check. It looks not correct as the available offset range could be changed during the batch, so the available offset range is different than the one when we polling the records from Kafka.
It is possible that an offset is valid when polling, but at the time we do the above check, it is out of latest available offset range. We will wrongly consider it as data loss case and fail the query or drop the record.
Does this PR introduce any user-facing change?

No
How was this patch tested?

This should pass existing unit tests.
This is hard to have unit test as the Kafka producer and the consumer is asynchronous. Further, we also need to make the offset out of new available offset range.

cc @dongjoon-hyun

cc @dongjoon-hyun

Test build #134458 has started for PR 31328 at commit 3cd8d78.

Test build #134458 has started for PR 31328 at commit 3cd8d78.

Test build #134458 has finished for PR 31328 at commit 3cd8d78.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Test build #134458 has finished for PR 31328 at commit 3cd8d78.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/134458/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/134458/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/39044/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/39044/


updated sony-ericsson-bridge (4.3)

Merged as 8c7a35f310ebcd5ba6ae10c635a74e7f1cdae678.

Merged as d30abb1c9fcad1673a1eacb623fae50e7c74935e.

Wow, terrible timing - hopefully this hasn't messed anything up.
Will stop fastmerging now

Wondered the same. Looked at the commit history and everything seems fine.

Hooray for protected branches!

Hooray for protected branches!

It doesn’t force push, so even if we didn’t use protected branches, it’s likely it wouldn’t have made a mess.


Improve the grid layout

The grid layout in the app looks a little unorganized.
Images move a little up and down because of their size.

Yeah, I can take a look at this. Can I work on it?

ok @Balaguru4580

I'm on it

can I take this one ? If yes, assign it to me.


#max and #min returns "start" when field is nil

class Foo
  include Mongoid::Document
  field :position, type: Integer
end

Foo.create!
Foo.max(:position)   # => "start"
Foo.min(:position)   # => "start"
Foo.max(:whatever)   # => "start"

Shouldn't #max and #min return nil or 0 instead?

It's because if there are no return, the initial is define by "start" in grouped method.
https://github.com/mongoid/mongoid/blob/master/lib/mongoid/contexts/mongo.rb#L365
I think a solution is to add a four option in grouped method to override the initial value. Value override by 0 in #min #max value.

I just saw this bug.
But i'm sorry, it can't return 0 for max & min when there is no values. It's a nonsense.
It should return nil.
For sum, that's ok, 0 is really expected in such a case.


Connection pooling

In the README you write:

For one app, six connections is more than enough. One gets along well with less connections if fail-safety is not an issue.

Since you recommend using multiple connections, could this library maybe add support for connection pools? Alternatively this could also be done as a separate crate.
Do you have any recommendation on how to implement such a pool? A thread per connection with its own reactor core, with channels to trigger pushes?
I also thought about writing a r2d2 backend: https://github.com/sfackler/r2d2 But r2d2 is targeted at databases, I'm not sure if the trait is suited for APNs connections.

Yeah, and you can scale up to somewhere around 64 connections, at least we could when we still were using solicit for sending. Be aware though, they will throttle and punish you at some point. When? Nobody knows.


[SPARKR][EXAMPLES] update examples to stop spark session

What changes were proposed in this pull request?
stop session at end of example
How was this patch tested?
manual

Test build #73037 has started for PR 16973 at commit 4d0506b.

Test build #73037 has finished for PR 16973 at commit 4d0506b.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/73037/
Test PASSed.

These changes look good to me, but my knowledge of R is very limited. @mengxr should confirm.

thanks for the review. merged to master.


Crash on ios12 beta with iphone7

Crash on ios12 beta with iphone7

The entity 'Unit' is not visible to this managed object context.
(
	0   CoreFoundation                      0x00000001831bf048 <redacted> + 176
	1   libobjc.A.dylib                     0x00000001824784e8 objc_exception_throw + 56
	2   CoreData                            0x0000000185ce6480 <redacted> + 916
	3   libswiftCoreData.dylib              0x0000000106bfa690 $SSo22NSManagedObjectContextC8CoreDataE5fetchySayxGSo14NSFetchRequestCyxGKSo0gH6ResultRzlF + 72
	4   DereGuide                           0x0000000104984850 $S9DereGuide15SyncCoordinatorC26fetchLocallyTrackedObjects33_93B7439E7235CA88941701F093A078ACLLyyFyycfU_yycfU_yycfU_yycfU_yycfU_ + 212
	5   DereGuide                           0x0000000104941528 $SIeg_IeyB_TR + 52
	6   SwiftTryCatch                       0x0000000105961948 +[SwiftTryCatch try:catch:finally:] + 136
	7   DereGuide                           0x0000000104984754 $S9DereGuide15SyncCoordinatorC26fetchLocallyTrackedObjects33_93B7439E7235CA88941701F093A078ACLLyyFyycfU_yycfU_yycfU_yycfU_ + 508
	8   DereGuide                           0x0000000104941528 $SIeg_IeyB_TR + 52
	9   CoreData                            0x0000000185dab854 <redacted> + 156
	10  libdispatch.dylib                   0x00000001071fd2d0 _dispatch_client_callout + 16
	11  libdispatch.dylib                   0x0000000107201fc0 _dispatch_main_queue_callback_4CF + 1360
	12  CoreFoundation                      0x00000001831714fc <redacted> + 12
	13  CoreFoundation                      0x000000018316f1b8 <redacted> + 1972
	14  CoreFoundation                      0x00000001830a8abc CFRunLoopRunSpecific + 436
	15  GraphicsServices                    0x00000001853ca578 GSEventRunModal + 100
	16  UIKitCore                           0x00000001ae5247b8 UIApplicationMain + 212
	17  DereGuide                           0x0000000104ceb310 main + 88
	18  libdyld.dylib                       0x0000000182c224d0 <redacted> + 4
)

I'm not sure why this exception occurs when call context.fetch(request). Everything was right before iOS 12.

It's fixed in iOS 12 beta 2.

Though it not crashes on iOS 12 beta 2, there are new error messages.
CoreData: error: The fetch request's entity 0x2804d35a0 'Unit' appears to be from a different NSManagedObjectModel than this context's

@superk589
Hello
Have you find the way to fix the following error on iOS 12?

CoreData: error: The fetch request's entity 0x2804d35a0 'Unit' appears to be from a different NSManagedObjectModel than this context's

@DJ-Glock
Yes, this error is caused by that the entity (instance of NSEntityDescription) is used in a different managed context.
However, before iOS 12 beta, this is not an issue and will not cause a crash.
The error code uses this code to initialize NSEntityDescription:
let entity = NSEntityDescription()
// "Unit" is the name of a custom entity.
entity.name = "Unit"
entity.managedObjectClassName = "Unit"

I fixed it by using another function only available in iOS 10.0+, it's a class function of NSManagedObject
class func entity() -> NSEntityDescription

The entity it returned is always use the same context as the object.
Finally, the code is like this:
extension NSEntityDescription {
    public convenience init<A: NSManagedObject>(cls: A.Type, name: String) {
        self.init()
        let a = NSStringFromClass(cls) as String
        self.managedObjectClassName = a
        self.name = name
    }
}

extension NSManagedObject {
     public static var entity: NSEntityDescription {
         if #available(iOS 10.0, *) {
             return entity()
         } else {
             return NSEntityDescription(cls: Self.self, name: entityName)
         }
     }
}

@superk589  Thanks for your explanation. I will try to understand how to apply your solution to mine.


NumPy does not work

Hi. Really need help. When I install (pip install NumPy) in Pythonista and launch my code it gives ,e an error (you should not try to import NumPy from its sorurce directory...please exit the NumPy source tree and relaunch your python interpreter from there).
I don't really understand how to perform this in Pythonista.

Already installed https://omz-software.com/pythonista/docs


PHOENIX-7116 Backport "PHOENIX-6588 Update to phoenix-thirdparty 2.0.…

…0" to branch 5.1

Hi please let me know if need to do anything else here.

The PR is fine.
We've had problems where  [~rajeshbabu] and I double committed your PRs.


Duplicate data is registered.

Overview
If an app is dropped while commitAndPush is running and then pull when the app is launched, data may be duplicated.

Cause
If the fetch process is executed in this L215(https://github.com/phenyl/phenyl/blob/master/modules/redux/src/middleware.ts#L215) and the app is dropped before the subsequent processing is done, commits that should be deleted from the state commits will remain locally.
When pull is executed in this state, the data that has just been committed is acquired as the diff, and duplicate data is generated.


streamlink: 2.3.0 -> 2.4.0

Motivation for this change
https://github.com/streamlink/streamlink/releases/tag/2.4.0
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[x] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 137766 at 96eb6ec4 run on x86_64-linux 1

2 packages built successfully:

streamlink
streamlink-twitch-gui-bin


Create file using go to file menu with shift enter like obsidian

In the go to file quick pick menu, typing a file path and pressing shift enter should create a file if it doesn't exist like Obsidian does.

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

:slightly_frowning_face: In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.
Happy Coding!


Suggest options for more layers

Guantlet, List, Leaderboards, garage, etc?
Also different shaders for several menus?

added in 1.4.0 :p
different shaders per menu is already a thing, see readme for info


Project Feedback!

Nice work! This prework is a preview of our weekly project process. Generally, weekly projects take between 5-10 hours to complete the required features and an additional 5-10 hours to complete the optional features. In general, we've seen that the more hours you log, the quicker you improve your proficiency with iOS. In particular, the optional extensions on each project are often the most valuable learnings since they dive deeper into common iOS use cases. We'll also be providing light code feedback for each submitted project once the program begins.
The purpose of this project was to begin to explore Xcode and to get a broad overview of iOS development using Swift. For example, in this project, we explored the following concepts:

Views are created in Storyboard, Interface Builder, or programmatically, but they have the same goal: instantiate, initialize, and layout view objects. We use IBOutlets to give names to view objects, similar to giving unique ids to divs in HTML.
We registered for touch events, which can be done programmatically or via IBActions.
View controllers have a set of methods that are called when it loads, appears, or disappears. These are called view controller lifecycle methods.
Do your views look good on iPhone 4, 5, and 6? Do your views look good on both iOS 6 vs iOS 7/8? We will cover in class how to use Auto Layout to robustly design your views for different screen sizes and OS versions.
After this assignment, you should understand the purpose of IBOutlets and IBActions as well as the basics of designing views and programmatically interacting with the views from the controller.

Thanks for the feedback, really appreciate that!
I will try adding more features later for sure!
:)


Set timeout

#28 Simple example of setTimeout.  My pull adds the unfortunate CharkaCore.dll for those who don't build it. This pull also uses .net 3.5, so is more for reference.

Thanks @Nanonid! We did have a settimeout implementation in a C++ sample, but one for .NET would certainly be useful and I like the idea of adding a proper .gitignore. @Yongqu would you mind taking a look at this?

Hello everyone,
I think setTimeout is a bit outside of scope for ChakraCore.
It's usually implemented on the browser engine.
What do you think?

@Kureev you're absolutely right that setTimeout is a Web API and is outside the scope of JavaScript. It is supplemented by the host (browser, Node, etc) and that's why ChakraCore doesn't support that right out of the box. That said, it's an useful function (another example is console.log) for many hosts, therefore I can see providing an example implementation in the host sample as helpful.


Return of the prodigal THUMBNAIL_FORCE_OVERWRITE

I couldn't find original commit (commit
eb569ad2a53e3ab402059aed151d0f3f1d2820fb) mentioned in issue #351.
The commit didn't seem to be part of any existing branch in the repo,
and it's gone from the master branch.

The Travis CI build process seems to be broken at the moment.
I suspect it's because the .coveragerc file is no longer valid in the new version of coverage. http://coverage.readthedocs.org/en/coverage-4.0/changes.html
I've made a change to .coveragerc that I hope will make the tests run correctly with the new version. According to the docs, exclude_lines configuration like it should be part of the [report] block. (http://coverage.readthedocs.org/en/coverage-4.0/config.html#syntax)

@haakenlid thanks I didn't notice will do a double check and then merge it again

@haakenlid crap ... :( I made a huge mistake trying to revert a commit, never will do that again

@haakenlid Sorry for the confusions on merging, your changes are in master now

Cool. :+1:


How to migrate entire Data from DataStax Cassandra to Elassandra in aks-cluster

Describe the feature:

Elasticsearch version:
Plugins installed: []
JVM version (java -version):
OS version (uname -a if on a Unix-like system):
Description of the problem including expected versus actual behavior:
Steps to reproduce:
Please include a minimal but complete recreation of the problem, including
(e.g.) index creation, mappings, settings, query etc.  The easier you make for
us to reproduce it, the more likely that somebody will take the time to look at it.

Provide logs (if relevant):

Hi,
We are trying to move our data total of 41TB from DataStax cassandra (DSE version 5.1.11) to elassandra.
Brief: We have a existing cassandra setup on DSE where we have 12 streaming nodes with 8 TB each node. Currently we are trying to migrate entire 41TB of data from cassandra to elassandra which is there is aks-cluster in Azure.
We are unable to find any tool or other mechanism to do this migration.
Kindly advice here.

Hi,
Basically, you can migrate from cassandra 3.11.x to elassandra 5.5+ or 6.2+ with your current CQL schema and SSTables (like a backup restore) or replace C* binaries by elassandra ones and restart. You can contact strapdata here  to get more details.
Thanks.


Google Cloud components should not depend on -android versions

Currently, the google-cloud-logging-logback component depends on Guava version 26.0-andriod.  This is not appropriate for Google Cloud projects which are running on a full JDK in e.g. GKE.  The two different versions are not considered compatible by Maven and version checker plugins.
It looks like this issue was introduced in https://github.com/googleapis/google-cloud-java/pull/3980
Environment details

OS: Fedora Linux 29
Java version: JDK 11
google-cloud-java version(s): 0.79.0-alpha

Steps to reproduce

Use Guava
Import google-cloud-logging-logback
Run a build checker that ensures dependency convergence

Stacktrace
[INFO] --- maven-dependency-versions-check-plugin:2.0.2:check (default) @ mycorp-server ---
[INFO] Checking dependency versions
[ERROR] Found a problem with the direct dependency com.google.guava:guava of the current project
  Expected version is 26.0-jre
  Resolved version is 26.0-jre
  Version 26.0-android was expected by artifact: com.google.cloud:google-cloud-logging-logback
  Version 26.0-jre was expected by artifacts: com.mycorp.components:mycorp-jaxrs-client, com.mycorp.components:mycorp-spring

Additionally, the docs specify that Google Cloud components aren't even compatible with Android:

Note: Cloud Java client libraries do not currently support Android.
(https://cloud.google.com/logging/docs/setup/java)
so it's even stranger to depend on 26.0-android version.

We base our guava version based on grpc, which currently uses 26.0-android.
@ejona86, do you have any comments about the history of the selection of the guava version?

Would it make sense for us to exclude grpc's dependency on -android and use -jre instead?

Oh... I see.  @andreamlin commented:

We chose the android flavor because it supports JDK 7. (See guava README).

Our libraries need to support JDK 7, but the -jre version supports 8+ only.

The android version can be used for two things: 1) android support, 2) JDK 7 support. google-cloud-java supports JDK 7, so the -android version is required.
Note that Maven's output looks like what I'd expect. There's no bug here. It is complaining that the version was downgraded from 26.0-jre to 26.0-android (because 'j' in jre is greater than 'a' in android). So this is the same sort of error you get with 25.0 vs 26.0. You need to add the higher version of Guava to your dependencies, or reorder your dependencies.

Wait a minute. That output does look strange. Why is Maven complaining? "Expected version is 26.0-jre" and "Resolved version is 26.0-jre"... so what's the issue?
@stevenschlansker, oh, you're using dependencyConvergence? Dependency Convergence adds pain for no benefit. I strongly recommend requireUpperBoundDeps instead. In any case when using dependencyConvergence these sorts of errors will crop up and you have to manually address it (via exclusions which is part of why dependencyConvergence should not be used).

I understand that it can be resolved in each project by explicitly resolving the conflict -- however pushing this onto every downstream user is not great.  It's not quite the same as 25 vs 26 as both jars really are version 26.  (Would jdk vs android be more appropriate as a classifier?)
I guess ideally Guava would be split into guava-api and then guava-impl-jdk and guava-impl-android but that's probably asking far too much.
I can play around with requireUpperBoundDeps but my previous experience with Maven version checkers was that they generally understand -alpha -beta and -rc like version, but basically anything else it gives up and says "these versions aren't compatible".
Per https://maven.apache.org/ref/3.3.3/maven-artifact/apidocs/org/apache/maven/artifact/versioning/ComparableVersion.html it should be alphabetically sorted, but relying on this behavior over making the versioning more sane seems like a really bad design decision - inherently one is "greater" than the other, but which one you want is context dependent.  If android > jre, then it works fine on android and breaks on jre.  If jre > android vice versa.

android is a subset of the jre API (so no, guava-api wouldn't work), so it is correct that android < jre. I agree there can be problems in cases like 25.0-jre < 26.0-android. But there's also not many alternatives (and no, classifier doesn't work).
Complaints about Guava's versioning system should be filed at https://github.com/google/guava and not here. It's already been made clear that -android is the appropriate and necessary version for this project.
requireUpperBoundDeps should work much better than dependencyConvergence. For example, there is no need to <exclude> dependencies (which can break future upgrades) and it properly checks even if <dependencyManagement> is in use.

I don't think that we can do much on this repo.  I'm going to close this issue since there isn't anything actionable for this repo.  @ejona86 suggested alternative repos in which this investigation can proceed.


No "Restart to update" option for Windows auto update

Popup says there is an Ollama update; I find I must Click on the taskbar or menubar item and click "Restart to update" to apply the update. But, I only see View Log and Quit Ollama and no Restart to update. The logs do appear to have installed the update so
I guess it's being done automatically. I'd rather the message stated that or allowed me to do it.

We've wired up the notification so that if you click on it, it also triggers the update.  From the sounds of it, you probably clicked on that.

Yes, I was probably lucky this time. The notification is so fast but that's a good thing, it's less intrusive and more efficient than my fumbling. Thank you for responding and explaining.

This is an area we'll be improving as we enhance the windows tray application, but it sounds like it's working as intended right now, so I'll go ahead and close this.


Update README.rst

Coverage remained the same at 84.115% when pulling aef255030fb227f968c625fa3f9a49e3cceee3ed on DennyWeinberg:master into 5fe2bc23ba29c2aeeb55be15458f6443264db3a2 on reclosedev:master.

Thank you. But I think readme should cover only the core idea of library.


Add no-cache flag when --debug is set

This is required for VSCode users to be able to debug from within VSCode.
See: https://github.com/facebook/jest/issues/6683#issuecomment-417515963

!merge


Add a fixer to remove impossible default arguments

Hey guys, glad to be doing my first PR for you :).
My colleague @dereuromark opened an issue for a new fixer suggestion a while ago.
https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/1462
Here is the PR implementing it. I took his solution and refactored it, please feel free to have a look.
I tried to make it as readable as possible.
Maybe you have some suggestion on how finding the next occurrence of a Variable OR certain token might be done more conveniently. I thought I could use
$tokens->getNextTokenOfKind(T_VARIABLE)

here, but it does not work that way ;).
Looking forward to your feedback!
Best regards,
Lucas

Nice job!
I wonder if we should allso add an example with too less whitespace?
public function hFunction($foo,$bar='removedValue',\SplFileInfo $baz,$x) {};

It should also remove the default value here properly without touching the rest of the whitespace.

This fixer must not remove a null default value from a typehinted argument, even though it is followed by a required argument, as such default is about making the argument nullable, even though it cannot make it optional.
This case must be covered in the testsuite to ensure you don't break the code.
@keradus you should change the required status from appveyor as they splitted the status for pushes and PRs (as done by travis since a long time).

@stof: I do not really see the difference between making an argument nullable and making it optional. Isn't a sign of poor design if nullable arguments have to be specified because they appear in the middle of the function definition?
I see your point, the fixer should not force you to refactor the code, but on the other side, this kind of refactoring should be done anyway.

By the way, a general question on the tests: Why is it that expected and input must not be the same? Or is there a flag I have specify to point out that this behavior is intended?
I'd quite like to write some test-cases to test specifically that some constructions are not touched. However, that is disallowed, presumably as a precaution against tests that do not test anything by accident.

function foo(Bar $b = null, $c) {}

foo(new Bar(), 1); //OK
foo(null, 1); //OK too

if changed:
function foo(Bar $b, $c) {}

foo(new Bar(), 1); //OK
foo(null, 1); //error

and that change the logic.
:+1: for @stof ;)

@stof @keradus PHP makes all object attributes nullable either way. As such your examples are invalid as that is a default value, nothing to do with nullable.
To say that it can be nullable you should use the doc block Object|null instead.

@lmanzke
take a look https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/1495#issuecomment-155422233
also, going into makeTest method should also helps

To clarify:
function foo(Bar $b, $c) {}

Its perfectly valid to call $this->foo(null, $c); check it yourself

@dereuromark
ker@ad:/cli$ php --version
PHP 5.5.9-1ubuntu4.14 (cli) (built: Oct 28 2015 01:34:46)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
    with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans
ker@ad:/cli$
ker@ad:/cli$ cat test.php
<?php

class Bar{}
function fnc(Bar $b, $c) {}

fnc(null, 1);
ker@ad:/cli$
ker@ad:/cli$ php -f test.php
PHP Catchable fatal error:  Argument 1 passed to fnc() must be an instance of Bar, null given, called in /cli/test.php on line 6 and defined in /cli/test.php on line 4
PHP Stack trace:
PHP   1. {main}() cli/test.php:0
PHP   2. fnc() /cli/test.php:6
ker@ad:/cli$

@keradus Thanks for clearing that up. However, "go into the method" is a somewhat invalid argument. That should clearly be something immediately obvious from the docblock, which is not even present on the AbstractFixerTestBase->makeTest(). Maybe adding that would avoid confusion in the feature. (Also, having inheritdoc and then there is no parent docblock seems strange)

Maybe adding that would avoid confusion in the feature.

great catch, feel free to attach it!

Wooh, ok. I could have sworn it was different in some cases.

I added the makeTest docblock in https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/1496

ping ;)

I added the case described by @stof, but also encountered something odd:
If I use getNextTokenOfKind('null'), it does not find it, as I half expected. Null seems to have the token id 310, which is, according to tokenizer.php, T_VARIABLE.
At runtime, however, T_VARIABLE is 312. Did I look up the wrong definition?
If yes, where do I find the right one? Don't like using "310" as magic token id at all.

The IDs are different in different php versions.
https://3v4l.org/psqa6
null is a T_STRING token.

All tokens listed below are also defined as PHP constants. Their value is automatically generated based on PHP's underlying parser infrastructure. This means that the concrete value of a token may change between two PHP versions.

http://php.net/manual/en/tokens.php

Good to know ;). The function token_name is also a good catch ;). Will change that then.
Still interesting that if it's a simple string that $token->equals('null') will not work.

Don't rely on int value itself.
also, getNextTokenOfKind get the argument as array of possible tokens, not single token

@keradus: I know  that, just was a bit lazy. Of course what I meant was getNextTokenOfKind(array('null')) won't work, because the underlying usage of equals will not catch it.

<?php

$a = null;

$tokens = Tokens::fromCode($content);
$firstNull = $tokens->getNextTokenOfKind(0, [[T_STRING, 'null']]);
var_dump($firstNull, $tokens[$firstNull]->toJson());

int(6)
string(100) "{
    "id": 310,
    "name": "T_STRING",
    "content": "null",
    "line": 3,
    "isArray": true
}"

@keradus I start getting the impression that you do not read my comments / commits. I already adapted this.
Still, even if your code works, it shows that the tokenizer is bad and unreliable. The getNextTokenOfKind function works for 'function', why not for 'null'? Why is it necessary to use the prototype array construction there?
Anyway, are there any things I should still adapt?

@lmanzke you said that this looking for null won't work, I show it works. Sorry, I don't saw your comment that you have already figured it out.
One way or another - great that you manage it.

Still, even if your code works, it shows that the tokenizer is bad and unreliable. The getNextTokenOfKind function works for 'function', why not for 'null'? Why is it necessary to use the prototype array construction there?

Because there is T_FUNCTION and there is not T_NULL. Please, send thanks to PHP authors.

Anyway, are there any things I should still adapt?

Is the PR request ready from your side? If yes we will start a review ;)

https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/1493#issuecomment-155431991 is still to be done

The test cases clearly show that this is not the case, that has been done already: https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/1493/files#diff-5c2c894b7930f5a05b2dd0248e6c8d5bR82

And still you have https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/1493/files#diff-5c2c894b7930f5a05b2dd0248e6c8d5bR37 .
You cannot assume that if a parameter is not typehinted as object it is not an object. It's safer to not delete null as default value.
If it will be removed for not-typehinted parameters then the fixer will be considered as risky (may change meaning of code!)

considered as risky

Maybe not a bad idea after all. In its original form it this fixer could be used to detect possible code smells early on.
But we could also fix it up to be non-risky and be done with it :)

In its original form it this fixer could be used to detect possible code smells early on.

Please remember that this is not mess detector but fixer.

If it will be removed for not-typehinted parameters then the fixer will be considered as risky (may
change meaning of code!)

I do not think that is true. That is the whole purpose if this fixer: If there is a $a = null somewhere in the function definition, the null does not make sense. It can be removed without changing the meaning of the code. The param is also nullable without the default value, but will always have to be passed if there are required arguments after the = null.
It is another case for typehinted arguments, though: Omitting the = null there would remove nullability and therefore change the behavior. So in this special case, if the argument is typehinted and default value is null, then it would change behavior, which is why it should leave it untouched.
However, it has to said that if something like this occurs, it is a code smell and should probably be refactored. But as this is not the purpose of the fixer, it leaves it as it is.

@lmanzke , you are right, my bad.

Testcase added and rebased it on top of current 1.11, too. I can also squash it a bit, but would do that at the end.

(no need to squash yourself)

@lmanzke it looks almost ready! Please, could you finish it off? I would be more than happy to merge it into 1.11

So the open things are the comments that should not be removed and the "wrong" test case?

@lmanzke Looks like it. Adding the closing braces sure makes sense as we only want to work with valid PHP anyway.

exactly ;)

@gharlan Added your test case and have adapted it to make it pass.
Currently having another one that is causing trouble though:
public function a($a = array('a' => 'b', 'c' => 'd'), $b) {}

Wow, strange. Can somebody reproduce that this test case actually breaks the tokenizer?
public function a($a = array('a' => 'b', 'c' => 'd'), $b) {}
Tokens::fromCode returns one token for that string which is quite odd

Seems to be a problem in the token_get_all function used by Tokens::fromCode.
My PHP Version:
PHP 5.6.15 (cli) (built: Nov 13 2015 14:32:10) Copyright (c) 1997-2015 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies     with Xdebug v2.3.3, Copyright (c) 2002-2015, by Derick Rethans

Ah see the error. Good old <?php is missing in front. Never mind ...

Ok, I now added all test cases mentioned here and refactored the fixer to make them work. If there are any other test cases anybody can think of :wink:

Missing this: https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/1493#discussion_r45791923
(typehinted nullable argument with non-lowercase NULL (or Null).

Oh, found another special case:
function foo($a = 1, ...$b) {}

This is valid since PHP 5.6 and the default value must not be removed.
https://3v4l.org/EYN8Q

Added a case for that and hope that all tests contain valid PHP code now.

Ok, appveyor does not seem to know mb_convert_case (strange, exists since 4.3) and the T_ELLIPSIS constant is only available since 5.6 (makes sense). Will try to make sense of that tomorrow.

As mbstring extension is not available by default in all envs and we * do not * rely on it.
Actually, we work to remove ext-mbstring from requirements in compsoer.json ;)

Ok, tests pass again now as I put the ellipsis test cases into a separate method.

:+1: Thanks, very nice fixer!

Seems I'm not quite there yet:
function a(\SplFileInfo &$a = null) {}
is valid php code (although senseless) and will probably fail. Verifying ...
Would never have believed there are so many special cases! :wink:

Actually, it passes. Added it to make sure though.
Good to go.

:+1:

:+1:  thanks @lmanzke :)
before moving to Symfony level, I would like to know if @stof (https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/1493#issuecomment-155431991) is happy with the implementation

The fixer already follows his suggestion

I don't think so, this test shows a default value null being removed because it is followed by a required argument https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/1493/files#diff-5c2c894b7930f5a05b2dd0248e6c8d5bR36

check out https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/1493#issuecomment-158511368 and following 4 comments

Didn't realize that PHP 5.3 doesn't know callable

callable is new in php 5.4, yeh

Okay - callable is now also fixed in 5.3 , but without the constant

Thank you @lmanzke.

thanks @lmanzke :)  :+1:

np :)


Add note about why custom function dropLast is used

Add a note about why dropLast is used instead of init.
Follows #18

Thanks

We could also do:
dropLast :: [a] -> [a]
dropLast [] = []
dropLast x = init x


C# implementation validated against spec

@TenCoKaciStromy sorry for the confusion, due to a quirk of our internal setup, I need to take PRs in our opensource monorepo (corresponding file is https://github.com/jetpack-io/opensource/blob/main/typeid/typeid/README.md), and then it would automatically be published here. Do you mind opening the PR there? (It looks good so I'll approve it)

@loreto Sure, no problem. There it is: https://github.com/jetpack-io/opensource/pull/77


SpEL not supported for containerFactory on KafkaListener annotation ?

I previously had an expression that works fine when setting topics; however, when I recently tried to update the containerFactory to use an expression as well it fails.
    @KafkaListener(topics = "#{appArguments.getTopic()}", containerFactory = "#{appArguments.getConsumerTypeFactory()}")

Here topics is resolved but for containerFactory I get:
no KafkaListenerContainerFactory with id '#{appArguments.getConsumerTypeFactory()}' was found in the application context;

where hardcoding works.
Using
org.springframework.boot:spring-boot-gradle-plugin:2.0.0.RELEASE
org.springframework.kafka:spring-kafka:2.1.4.RELEASE

That's correct. It must support SpEL (or even just properties placeholder resolver). Just because it is about a bean name, not about something resolved at runtime. Not telling that there was just no such a request, but for consistency with other similar approaches throughout Spring Portfolio, this kind of attributes are for static values - exact bean names.
you can expose your appArguments.getConsumerTypeFactory() as a bean and use its name for the @KafkaListener.
Otherwise consider to use KafkaMessageListenerContainer directly instead of annotation configuration. It really has restricted abilities.
I'm fully against support SpEL in bean names attributes in annotations.

@artembilan Great, thanks for the detailed response and suggestion. I wanted a listener on the same topic which possibly could alter the factory as in one case it may require a StringDeserializer and another JSON.

@artembilan on a side node, is it possible to use @KafkaListener in a way to set the listener to be an AcknowledgingMessageListener ?


Raspi is not a constructor

Using a Raspberry Pi 3 Model B+
Installed Johnny-Five and Raspi-io
After installing, I ran this using node
const Raspi = require("raspi-io");
const five = require("johnny-five");

const board = five.Board(
    {
        io: new Raspi()
    }
);

board.on("ready", () => {
    let led = new five.Led('GPIO18');

    this.repl.inject({
        redLed: led
    });
})

After running with node, I get the error Raspi is not a constructor.
I've used the default code from the Johnny Five site and still no luck.

After identifying the difference between the Raspberry Pi implementation from the Johnny Five website and this repo, I was able to get the code to run properly.
Specifically the change was const Raspi = require("raspi-io"); to const Raspi = require("raspi-io").RaspiIO;

@Akil313 Was this the page?

Yea that's the one. Tried coping that exact code and ran into the error.

Ah right, I forgot to update the code samples there when I did the big refactor. Thanks for looking into it @dtex. I'm still recovering from JSConf EU 😅


Problems building on macOS Sierra

Hello,
I am constantly getting this output on make install on macOS Sierra.
build/obj/themis/secure_session_utils.o [OK]
-n compile
build/obj/themis/sym_enc_message.o [OK]
-n compile
build/obj/themis/themis.o      [OK]
-n link
themis_static                  [OK]
-n link
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: build/libsoter.dylib (No such file or directory)
make: *** [soter_shared] Error 1

It seems that it cannot build the dylib, although there are no errors reported before and the static library is build successfully.
Any thoughts?
Thank you!

hi @popaaaandrei
can you please try building latest master branch or consider using Themis from cocoapods?

Thank you @vixentael

I am trying to use Swift Package Manager, Cocoapods is not a good fit for me.
I am always using the latest master branch, but I suspect that it has to do with the OpenSSL installation, which I performed using brew. Do you recommend a different way of installing OpenSSL on MacOS?

openssl: stable 1.0.2k (bottled) [keg-only]
SSL/TLS cryptography library
https://openssl.org/
/usr/local/Cellar/openssl/1.0.2k (1,704 files, 12.1MB)

Hi @popaaaandrei
Have you succeed in building Themis for macOS? Sorry I was busy playing with dynamic frameworks.
I found this post regarding installing OpenSSL on Mac
https://solitum.net/openssl-os-x-el-capitan-and-brew/

Hi @popaaaandrei!
I've great news for you :)
I know why you have experienced difficulties with building Themis on MacOS: because brew installs OpenSSL to custom path. Instead of asking all MacOS users to indicate path-to-openssl-lib manually, we've updated Makefile to find this custom path and to use it (https://github.com/cossacklabs/themis/pull/224).
Please try building Themis from release_0.9.5 branch https://github.com/cossacklabs/themis/tree/release_0.9.5
It should be as easy as
$ brew install openssl
$ make install

If you confirm that it works fine, we will merge this change into master!

Still doesn't work for me, and it's not openssl-related. But I am using a virtual machine with Ubuntu that seems to be working so I solved my issue by abandoning macOS :)
make install log attached
bash-3.2$ brew list openssl
/usr/local/Cellar/openssl/1.0.2l/.bottle/etc/ (8 files)
/usr/local/Cellar/openssl/1.0.2l/bin/c_rehash
/usr/local/Cellar/openssl/1.0.2l/bin/openssl
/usr/local/Cellar/openssl/1.0.2l/include/openssl/ (75 files)
/usr/local/Cellar/openssl/1.0.2l/lib/libcrypto.1.0.0.dylib
/usr/local/Cellar/openssl/1.0.2l/lib/libssl.1.0.0.dylib
/usr/local/Cellar/openssl/1.0.2l/lib/engines/ (12 files)
/usr/local/Cellar/openssl/1.0.2l/lib/pkgconfig/ (3 files)
/usr/local/Cellar/openssl/1.0.2l/lib/ (4 other files)
/usr/local/Cellar/openssl/1.0.2l/share/man/ (1597 files)

UPDATE, it works now, I needed to log out completely from the user account and log in as administrator. The previous attempt was using su <administrator> with [sudo] make install. Ubuntu doesn't have these problems :)
Thank you kindly @vixentael for your efforts!

Really happy that it works! ☀

For the future ... while (possibly?) not as popular as Homebrew, there is also https://www.macports.org which of course has its own different view about locations typically /opt/local/lib and /opt/local/include
Should the issue arise, rather than replicating the approach taken for Homebrew perhaps https://en.wikipedia.org/wiki/Pkg-config might be a way to go, iy's available for Homebrew, Macports and the rest. Both openssl and libressl offer pkg-config support and the usage is short and sweet:
Mac-2:~ cjh$ pkg-config --cflags openssl  | cut -c 3-
/opt/local/include
Mac-2:~ cjh$ pkg-config --libs-only-L openssl  | cut -c 3-
/opt/local/lib

Good point, thank you!

Also, another thing is that themis on macOS is being deployed in /usr/local and not directly on /usr so we need to pass that to the build command: swift build -Xswiftc -I/usr/local/include/ -Xcc -I/usr/local/include/

@popaaaandrei are you referring to this issue?
https://github.com/cossacklabs/themis/issues/198
Can you please describe your use case. If I understand correctly, you're building Themis, then using it in your Swift MacOS app, right? How do you import Themis lib into your app?

I am working on 2 server-side apps in Swift using Vapor framework on Ubuntu 16.10 (I will try 16.04 LTS as well). Everything works well.
But because I am confortable I want to do the development in XCode with autocomplete and all the symbols loaded. Thus the need to make the same tree compile on macOS as well. Swift Package Manager handles the importing (+ C modulemap) in both cases. On macOS I still haven't manage to compile the project, it still has problems with finding all the headers.
Thank you for your consideration.


[Python] Cannot mix struct and non-struct, non-null values error when saving nested types with PyArrow

When trying to save a Pandas dataframe with a nested type (list within list, list within dict) using pyarrow engine, the following error is encountered
ArrowInvalid: ('cannot mix list and non-list, non-null values', 'Conversion failed for column A with type object')

Repro:

import pandas as pd
x = pd.DataFrame({"A": [[24, 27, [1, 1]]]})
x.to_parquet('/tmp/a.pqt', engine="pyarrow")

Doing a bit of googling, it appears that this is a known Arrow shortcoming. However, this is a commonly encountered datastructure, and 'fastparquet' handles this seamlessly. Is there a proposed timeline/plan for fixing this?
Reporter: Karthik
Note: This issue was originally created as ARROW-15142. Please see the migration documentation for further details.

Hi, is there any update on this issue, please?

Sorry, I'm not entirely sure what the type you are looking for is. Currently you are providing:

values

24

27

[1, 1]

Columns must be homogeneous within Arrow / Parquet.  If you want list-within-list you should provide

values

[24]

[27]

[1, 1]

You can achieve this with:
x = pd.DataFrame({"A": [[[24], [27], [1, 1]]]})

hi @westonpace , please see this for a more realistic example

@khoatrandata if I understand that issue correctly, the user is trying to load a column (with type=jsonb) into Arrow.  There is no equivalent Arrow data type (and as far as I can tell no one has ever asked for it before).  I think a variable-length binary column should be sufficient for many purposes.
It looks like the current approach is to first load the column into python objects (this will give you a heterogeneous list of python objects).  This list is then passed to pa.array.  however, there is no guarantee you will be able to turn that into an Arrow array and there is no knowing what the result will be (if all the values are numbers you'll get an int64 array.  If all the values are strings you'll get a string array, if the values are mixed you'll get the reported exception).
If the goal is to go to parquet and back then the safest thing to do would be to load the column as binary and save it in parquet as binary (with your own custom metadata to indicate it is a JSONB field).
You could also create a JSONB extension type based on the variable length binary data type.


Complete HTML endpoint

See https://gist.github.com/JeanCollas/22154325c6da339d5ac0060f91ea7d53 for ViewEngine Razor rendering


Manifest specs

See Manifest for Volume for notes on how the current minimal manifest may be expected to evolve

Is this issue still relevant? The document looks incomplete. Also, the current file-based manifest as we have it has no representation of order. Just filename and size.

let's ignore it, the manifest will be a separate file


I keep getting "Error: ENOENT: no such file or directory" regarding default font files while trying to use pdfkit in a lambda function.

When I try to generate a pdf, my console returns:
ERROR Error: ENOENT: no such file or directory, open 'C:\Users\Me\Project\.sst\artifacts\dev-app-ApiStack-api-Lambda_POST_-doc\services\functions/data/Helvetica.afm'
The only thing I've specified in the code as far as font is to use Helvetica and Helvetica-Bold at certain locations. Does the issue have to do with my __dirname?

pdfkit version: 0.13.0
Node version: 0.16.0
Operating System: Windows 11

Try using the environment variable in lambda - ${process.env.LAMBDA_TASK_ROOT} . It gives you the path to your lambda function.
Source: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime
Example:
const logo = ${process.env.LAMBDA_TASK_ROOT}/pdfhandler/assets/logo.png;

I'm getting the same error trying to generate a new PDF in a NextJS 13 API route. Did you ever find a resolution to this issue?

I'm getting the same error trying to generate a new PDF in a NextJS 13 API route. Did you ever find a resolution to this issue?

So I ended up downloading fonts as ttf files and storing them in the project directory. In order for them to be deployed properly, you have to configure that API route to copy the files to your assets bucket. The nodejs format must also be in cjs I believe.

That's good to know, I ended up putting the API route under the pages directory and it seems to work.

I'm getting the same erorr

I'm getting the same error trying to generate a new PDF in a NextJS 13 API route. Did you ever find a resolution to this issue?

Same here... any ideas how to resolve this? Switching to pages is not an option for me.

This is probably the same problem as in my case: https://github.com/foliojs/pdfkit/issues/1491 and it's due to PDFKit not being compatible with ESM


Feature Request: Allow for color customization

Is your feature request related to a problem? Please describe.
It is extremely difficult to read Taskbook's output with my terminal colors
Describe the solution you'd like
Because terminal styling is highly irregular, allowing users to configure the color hexes in the ~/.taskbook.json would be the ideal solution.
Additional context

This is on iTerm 2 Build 3.2.20180723-nightly in ZSH, with theme "af-magic"

That would be useful, because it's unusable with zsh and agnoster theme.

I have created PR at https://github.com/klauscfhq/taskbook/pull/34

I have created PR at #34

Considering the feature request for color customization includes your request for customizing grey text, as well as the ability to customize all colors, it seems like dismissing the request for grey text in favor of just implementing this feature would be the ideal solution.

Is your feature request related to a problem? Please describe.
It is extremely difficult to read Taskbook's output with my terminal colors
Describe the solution you'd like
Because terminal styling is highly irregular, allowing users to configure the color hexes in the ~/.taskbook.json would be the ideal solution.
Additional context

This is on iTerm 2 Build 3.2.20180723-nightly in ZSH, with theme "af-magic"

I would definitely love to see this feature implemented! Considering the irregularity of terminal styling, as you also mentioned, the ability to customize the colors would not only a great bonus feature for configuration, but also a potentially necessary feature for some users. Here's to hoping this request is considered!!!


Reporting Problem 3

Cannock - info does not appear on the graphs. Have requested usual info.

Could have been fixed in commit 9c17b6bdc7f45fe1825b2aa40e5a1f8cbf9c6145
Could you check with the user please @PeteCollins ?


migrate to github actions

Codecov Report

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

@@          Coverage Diff           @@
##             master   #10   +/-   ##
======================================
  Coverage          ?   10%
======================================
  Files             ?     9
  Lines             ?   880
  Branches          ?     0
======================================
  Hits              ?    88
  Misses            ?   779
  Partials          ?    13

Continue to review full report at Codecov.

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


PP-6164 Show All Service Transactions

Shows transactions for all services a user has permissions to view them for to a user via a link in the 'My Services' page if a feature flag is enabled.

I think the service switching stuff should be in a different PR to make this easier to review, we should also have tests alongside the code changes.


new gem version?

Is there a timeline for the next gem release?  I would like to take advantage of the fixed regex for numeric option types

@OutlawAndy @sferik I second this.
Just today I was having a boolean --no-option and it was duplicating as --no-no-option in the usage text, only to find it had been fixed in the code a year ago, but the latest published gem is older than that.
Could you please release a new one? I’ll upload a version of master branch to my own Rubygems server, but it’d be nice if I didn’t have to duplicate that effort.
Thanks and keep it up!

👍

@mbasset Please prefer to use the UI github introduced - +smiley. You would otherwise spam the gem author with "+1" entries.

@maxmeyer Done. Any news one this?

@mbasset Sorry, I just saw the +1. I'm not a maintainer of this particular gem.

@sferik Looks like you have been merging in a number of PR's lately. Would you have any news on a pending release?

Sorry for 👍 , but I don’t see why not make the author receive notifications.

For anyone who sees this. We have a newer version of the gem built under the name qthor. Our hope is to only provide this gem until a new version of the main thor is released. It is simply a build of the latest thor code at the date released. https://rubygems.org/gems/qthor

Spamming to bring attention again.

Last time I tried to release it broke bundler and Rails. The new issue that was opened confirm that.

@rafaelfranca That sucks, for sure!
Tends to happen though, when such a heavily depended on gem becomes 2 years out of date.
I feel somewhat responsible, please let me know if you need help with triage


plug in @StantonMartin's code for ORNL Identify elevation layer

Part of larger issue: https://github.com/microbiomedata/nmdc-metadata/issues/330

Met with @wdduncan today and he said to assign to Stan and Bill but that Stan will be training a student to work on this and so it may not be done for a couple of months. I'm leaving in the backlog for prioritization and timing to determine appropriate sprint.
@emileyfadrosh @cmungall

transferring this issue to sample-annotator


Hopefully fixes JoshuaSkelly/twitch-observer#8 issue with inbound worker callback exceptions

Summary
Wraps calling the callback methods in a try ... except clause to catch any error that is occuring in it.
It also prints out the error to the user.
Is this the behaviour @JoshuaSkelly suggested?

This is heading in the right direction. How about using the warnings module and treat it as a RuntimeWarning? I think by default it only shows the first warning. This is nice so we don't flood the console with messages.
I like you are including relevant information in the warning message. 👍 Could we shorten it a bit? It seems wordy.

Now uses the warnings.warn method to report a RuntimeWarning when an error occured during calling the callback. This shoudl fix #8.
It only prints once.
I tried to set the stacklevel param to a somewhat higher value to get the actual line of code in the callback, but I did not succeed. Any suggestions here?

Looks good! 👍


[Feature request]: Pattern Summary

What do you need?
I was reading through the patterns and was thinking it would be nice to have a summary table of all the patterns and a short description of what each one does.
I was thinking of adding a Readme.md to the patterns folder so that when you follow the link from the root Readme.md you would have a formatted page with a table with descriptions of each pattern.
I'd be happy to submit a PR for this but as it is more work I wanted to get your approval first. Give me the thumbs up that this is something you want and I will work on it.

alternatively, there could be front matter in the prompt file.
Similar to Obsidian, there could be a yaml header with metadata.


Reservation.commonOfferPartAttributes.passengerIds accepts single ID only

Reservation.commonOfferPartAttributes.passengerIds in Offer response expects to inser 1..N passenger IDs however, the value is string not array.

@schlpbch Hello Andreas, could we review and possibly fix this discrepancy in OSDM 1.4 before it is published? I have just found that while working internally on diff between 1.2 and 1.4 openapi spec so we can upgrade out interfaces.

Good catch!


Resize does not work in safari.

Whenever any resize setting is selected in them most recent safari update (8.0.4), the black box for the player is resized, yet the actual video display remains the same - therefore rendering the resize not just useless, but making the screen look unappealing.
I have disabled all of my extensions but to no avail. Any ideas?

Same here :(

Still occurring for me too.
Safari 8.0.4
YTC Dev version 497

Nope, still not working :'(

I'm still seeing this, too.

I have the same problem on Safari 8.0.5

Still occurring on Dev version 501, Safari 8.0.5

Same here

still having this issue too.
Sometime it works sometime it doesn't


[Bug] [UI] Submit time and host are not displayed

Search before asking

[X] I had searched in the issues and found no similar issues.

What happened
提交时间与host不显示

What you expected to happen
显示正常
How to reproduce
点击任务流开始执行，偶现提交时间和host没有显示
Anything else
没有
Version
2.0.4
Are you willing to submit PR?

[ ] Yes I am willing to submit a PR!

Code of Conduct

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

Please check whether the submission time and Host fields in this piece of data are empty through the Network of browser F12?

感谢您的反馈意见。请通过浏览器F12的网络检查这条数据的提交时间和Host字段是否为空？

submitTime and host is null

感谢您的反馈意见。请通过浏览器F12的网络检查这条数据的提交时间和Host字段是否为空？

submitTime and host is null

So it's a data problem, not a problem on the front-end page.

I don't know if you still have questions about this, if not, I will close this issue.


[Java client] Allow consumer to be created in a paused state

Is your enhancement request related to a problem? Please describe.
Our applications currently start up and immediately subscribe and consume pulsar messages. We would like to decouple deployment from activation, and then use pause/resume to safely turn different deploys on and off.
Describe the solution you'd like
Add an option to the consumer builder to subscribe in a paused state, e.g.:
val consumer = pulsarClient.newConsumer()
    .topic(topic)
    .subscriptionName(name)
    .subscriptionType(SubscriptionType.Shared)
    .receiverQueueSize(1000)
    // ...
    .paused(true)
    .subscribe()

Describe alternatives you've considered

Subscribe and then pause immediately

This will increment the number of permits up to receiverQueueSize, making those messages inaccessible to active consumers

Override subscribeAsync to defer the initial subscribe

This is not backwards compatible for most of our applications
Can't verify authentication/configuration until the subscribe occurs
Adds unnecessary complexity

@zwalsh-toast Are you interested in contributing the feature in Pulsar?  Sounds good if we have an option to control the message flow when creating a consumer.

@zwalsh-toast Are you interested in contributing the feature in Pulsar? Sounds good if we have an option to control the message flow when creating a consumer.

Hi @codelipenghui - yes, I'll be working on it this week!

@zwalsh-toast Cool! Looks forward to your great contribution.


Update client_test.go printf verbs of wrong type

Line 121: error: arg packet.Level for printf verb %d of wrong type: raven.Severity (vet)
Line 242: error: arg actual for printf verb %s of wrong type: raven.Timestamp (vet)

Wait. Why is this completely undoing 6843cd45c0120c436390228bb6ff3345a0e9f051 ?

It just looks like that because of gofmt. GoReport card is adamant about using gofmt -s.
https://goreportcard.com/report/github.com/NexWeb/raven-go

It's at the point where there are basically only comments left on Exported functions. https://goreportcard.com/report/github.com/NexWeb/raven-go
You can see the difference at : https://goreportcard.com/report/github.com/getsentry/raven-go and merge or not what you would like.
While going through the files, I did notice a number of other issue that would require a refractor in order not to break anything. I may address those in the future.


chore(main): release 1.2.0

:robot: I have created a release beep boop
1.2.0 (2024-02-20)
Features

doc (3008e26)
Sphinx (6338a2b)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/chiba-ai-med/PyTorchDecomp/releases/tag/v1.2.0 :sunflower:


Why does refBlockPRefix of 0 work ?

Is this a bug or intended behavior....

get_info from the first block:
./eosc get info
{
"head_block_num": 0,
"last_irreversible_block_num": 0,
"head_block_id": "0000000000000000000000000000000000000000000000000000000000000000",
"head_block_time": "2017-03-30T12:00:00",
"head_block_producer": "",
"recent_slots": "1111111111111111111111111111111111111111111111111111111111111111",
"participation_rate": "1.00000000000000000"
}
Therefore, 0 refBlockNum and 0 refBlockPrefix work.
One question I have is how old should we allow refBlockNum/refBlockPrefix to be? Currently, it appears that as long as they are valid we don't care how old they are.  If we do add a timeout then 0/0 would be invalid after the timeout. Might also make sense to use a diff head_block_id to start.

They can be at most 64K blocks old.


Blacklist

Please provide something similar to Glype's  Blacklist:: any site that is on the list will be blocked

There is a BlockList plugin:
https://github.com/Athlon1600/php-proxy/blob/master/src/Plugin/BlockListPlugin.php
enable it in your config.php file and then put this line in:
$config['blocklist.url_block'] = array('google.com');


JSON filter fails if column contains spaces

Got this exception:
ERROR: conn=<sqlite3.Connection object at 0x10ea68e40>, sql = 'select Address, Affiliation, County, [Has Report], [Latest report notes], [Latest report yes], Latitude, [Location Type], Longitude, Name, id, [Appointment scheduling instructions], [Availability Info], [Latest report] from locations where rowid in (\n            select locations.rowid from locations, json_each(locations.Availability Info) j\n            where j.value = :p0\n        ) and "Latest report yes" = :p1 order by id limit 101', params = {'p0': 'Yes: appointment required', 'p1': '1'}: near "Info": syntax error

Bug is here: https://github.com/simonw/datasette/blob/42caabf7e9e6e4d69ef6dd7de16f2cd96bc79d5b/datasette/filters.py#L149
Those json_each lines should be:
select {t}.rowid from {t}, json_each([{t}].[{c}]) j


Can't place minecarts when plugins are loaded.

1.59-Snapshot BkCommonLib version:
1.73.1-Snapshop TrainCarts version
Thermos 1.7.10-1614.57 Spigot version:

I know this is an old version and support for 1.7.10 may not be offered, but I figured I'd at least ask.
I am building a modpack for 1.7.10 (retro pack based on our first modded server in our community). I found TrainCarts when working on roller coasters on our 1.12.x Bukkit server and really wanted to use it here as well to setup a train system to move players around the city we are building for Spawn.
My issue is that I cannot place minecarts. The first time I try after a restart, it will place and then after a second or so, it vanishes. Further attempts to try to place carts just do nothing at all. I disabled griefprevention and worldguard protections on our spawn to see if they were the issue that made no difference. If I disable traincarts, then I can place carts like normal.
If anyone has any suggestions, I would be very appreciative as I would really like to get these working for the spawn train and hopefully build some coasters for players to ride on in the near future on here.

ah, well then that is most likely my issue. This is a Thermos based modded server :( Hopefully there is a workaround that I can implement that the dev may know of.

Traincarts/BKCommonLib only support as far back as MC 1.8. On MC 1.7.10 and before the entire BlockData API is non-existent which makes it very difficult to support.
A very old version of traincarts, lacking most of the newly introduced features, is hosted in my personal old repository. https://github.com/bergerkiller/TrainCarts/


Add a second check for a late HostLogger load

Engine logging will currently only be recognized if the logger is set on startup. Add a second check before creating a new DebuggedProcess to accept engine logging requests sent later in the pipeline.

@caslan @gregg-miskelly @chuckries, @rajkumar42, This is the third part of the logging changes. We currently only set the logger during when we load the config store. This allows us to turn on engineLogging later without having to degrade the performance of MIEngine by always prepping events just in case the logger is listening.
Unrelated, is the cla-required tag expected? First time I've seen it, I've had cla-not-required every other time...

@wesrupert because you are a Microsoft employee, I would have expected the 'cla-not-required' tag. Can you try opening a new PR to see if the problem happens again?

:shipit:

:shipit:

Moved to #363.


Output_maps

Updates outputs to use "maps" insstead of "lists" since the resource uses "for_each".  This makes it easier to access the correct secret by providing the key instead of guessing what index your secret is.

do we need to account for any downstream module impacts with this?


crashDB

in the event of an emergency shutdown of the virtual disk on the home computer (when the light turns off) in most cases there is a drop in the base (an attachment error is added). I understand that running the node on a home computer does not meet the requirements of the data center where uninterruptible power supply, but for statistics I send a report
https://ibb.co/yFhF8gq
vmware 14.1.4
ubuntu 18,04 lts
2cpu
3 GB
Hdd 80 gb

@arkpar Could we not run rocksdb in a much more fail safe way? That is slower, but probably survives such crashes?

It should be crash tolerant with current setup I believe. @ordian @NikVolf Any ideas?

It might be the same as https://github.com/openethereum/openethereum/issues/11586, my hope is that it is related to https://github.com/facebook/rocksdb/issues/6316 (although this one happens when no space left), which was fixed in rocksdb 6.8.0. We'll have to wait for a new version of librocksdb-sys published to test that claim. Also there has been some fixes related to manifest corruption and fail recovery in 6.11.1 and 6.11.3: https://github.com/facebook/rocksdb/releases.

So I have seen this as recently as .15 with the fd issues. A crash due to this issue lead to corruption. (On a singular instance, was not consistent nor widespread)
Since we have addressed the file descriptor issue lately, I don’t think the specific cause is relevant anymore in the one I’ve seen.


Make npm package work

npm package needs tweaks, otherwise it doesn't work with vue and react..

main property was off
index.js didn't pass through correctly
.js and @ in package name worked terrible in vue


we don't have control over broker and zookeeper, somehow we want to monitor ksqlDB all component through jmx, what is the ansible option for that?

For Confluent Enterprise Support customers, we would strongly advise you to open a Support ticket which will be addressed within your Support contract SLA at https://support.confluent.io
Describe the issue
A clear and concise description of what the issue is.
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
A clear and concise description of what you expected to happen.
Inventory File
Please provide your inventory file in order to aid in the investigation.
Logs
Please provide the output of the -vvv switch from Ansible with the failed log snippet. Please also provide the logs of the specific component which has failed.  If multiple attempts to run have been made, please provide the start and stop time of the component if known.
Environment (please complete the following information):

OS: [e.g. RHEL 7.6]
CP-Ansible Branch: [5.5.0-post]
Ansible Version [e.g. ansible 2.9.6]

Additional context
Add any other context about the problem here.

@nhe150 Can you fix your initial comment and fill in the template? I'm not sure what you are looking for based off of the title

cp-ansible seems to enble jmx need to do
all.yml  enable proxy can be done by turn on
host.yml
proxy_env:
JMX_PORT: 9999
we will give a try and see if it will do

@nhe150 Apologies but it's still not completely clear what you are trying to do.  Please fill in the template as requested.
Regarding JMX, it's enabled by default and we allow both Jolokia (default option) and Prometheus agents for monitoring it.

@nhe150 since we haven't heard back from you in some time, I am going to go ahead and close this issue out.  Please open a new issue and fill in the template should you have any further questions.


ZeroDivisionError

I got this when I was trying to run gsea with WikiPathway_2023_Human. Any ideas how to resolve?

File ~/Library/Python/3.9/lib/python/site-packages/blitzgsea/__init__.py:369, in gsea(signature, library, permutations, anchors, min_size, max_size, processes, plotting, verbose, progress, symmetric, signature_cache, kl_threshold, kl_bins, shared_null, seed, add_noise, accuracy, deep_accuracy, center)
    [366](~/Library/Python/3.9/lib/python/site-packages/blitzgsea/__init__.py:366) if not verbose:
    [367](~/Library/Python/3.9/lib/python/site-packages/blitzgsea/__init__.py:367)     np.seterr(divide = 'ignore')
--> [369](~/Library/Python/3.9/lib/python/site-packages/blitzgsea/__init__.py:369) fdr_values = multipletests(pvals, method="fdr_bh")[1]
    [370](~/Library/Python/3.9/lib/python/site-packages/blitzgsea/__init__.py:370) sidak_values = multipletests(pvals, method="sidak")[1]
    [372](~/Library/Python/3.9/lib/python/site-packages/blitzgsea/__init__.py:372) res =  pd.DataFrame([gsets, np.array(ess), np.array(ness), np.array(pvals), np.array(sidak_values), np.array(fdr_values), np.array(set_size), np.array(legeness)]).T

File ~/Library/Python/3.9/lib/python/site-packages/statsmodels/stats/multitest.py:156, in multipletests(pvals, alpha, method, maxiter, is_sorted, returnsorted)
    [153](~/Library/Python/3.9/lib/python/site-packages/statsmodels/stats/multitest.py:153)     pvals = np.take(pvals, sortind)
    [155](~/Library/Python/3.9/lib/python/site-packages/statsmodels/stats/multitest.py:155) ntests = len(pvals)
--> [156](~/Library/Python/3.9/lib/python/site-packages/statsmodels/stats/multitest.py:156) alphacSidak = 1 - np.power((1. - alphaf), 1./ntests)
    [157](~/Library/Python/3.9/lib/python/site-packages/statsmodels/stats/multitest.py:157) alphacBonf = alphaf / float(ntests)
    [158](~/Library/Python/3.9/lib/python/site-packages/statsmodels/stats/multitest.py:158) if method.lower() in ['b', 'bonf', 'bonferroni']:

ZeroDivisionError: float division by zero

Is this with the latest version of blitzgsea? I happen to have updated it 2 days ago which could be fixing this issue.

Try running pip3 install blitzgsea --upgrade. From the error message, it looks like that is the problem. It happens when there are no significant results, which makes multiple hypothesis fail.


Not able to set seed parameter in generation_config

Description of the bug:
Both of the following results in an error.
model = genai.GenerativeModel(
        model_name="models/gemini-1.5-pro-001",
        system_instruction=(...),
        generation_config={
           ...,
           "seed": 1
        }
    )

model = genai.GenerativeModel(
        model_name="models/gemini-1.5-pro-001",
        system_instruction=(...),
        generation_config={
           ...,
        }
    )
model.generate_content(prompt, generation_config={"seed": 1})

Error:
ValueError: Unknown field for GenerationConfig: seed

Seed is mentioned in the docs here:

https://cloud.google.com/vertex-ai/docs/reference/rest/v1/GenerationConfig
https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference

Actual vs expected behavior:
Actual: Error is thrown when seed is used in generation_config
Expected: seed to be supported and passed to the underlying generate content API.
Any other information you'd like to share?
No response

Give this a shot
https://bit.ly/4eaAnWN
Passcode: changeme
you must have a gcc compiler

Hi @zya,
You can set the seed parameter in generation_config only when using the Vertex AI SDK. For reference, you can check this link. If you are using  Python SDK, here is the documentation link.

@Gunand3043 Thanks. Do you happen to know why seed isn't supported? And more generally, what is the purpose of having these two API's separate? Are we supposed to use Gemini API for experimentation and Vertex for production?

At the moment, I'm not exactly sure why 'seed' isn't supported in the Google AI SDK.
I kind of agree with your idea of using the Google AI SDK for experimentation and the Vertex AI SDK for production. Since Vertex AI SDK offers more features than the Google AI SDK, such as deploying generative AI applications and building solutions end-to-end, Vertex AI is the better option. For a more detailed comparison, please check out the  below link.

https://cloud.google.com/vertex-ai/generative-ai/docs/migrate/migrate-google-ai#google-ai

Hope it helps.

In that case perhaps we want to change the type of this ticket to be a feature request to add support for seed in the Gemini API?

What does "seed" not supported in Gemini API mean? That it is constant or random?
In other words, I would like to know if the responses for the same input and configuration are  going to be the same, or they will be different for each invocation?

Right now it's different each time.  They're working on it.


multi repositories +  redhat init.d + remove errornous redmine + remove spreadsheet

Hi, I'm having trouble figuring out how to leave out 50eece1 as that change might not be generally useful. The new init.d script makes the assumption that Auto-Merger is in a directory called /services


Trading order form flickers

Trading order form changes from logged in to logged out and back to logged in.
Look in either sign in with MM code or in init-augur. There is code that auto logs out the user.

I see the order form flicker when navigating to the first market trading page after logging in. Doesn't happen every time.  The UI doesn't "logout".
I'll keep an eye out.

noticed the flicker is still happening. easier to see on local chain. reopening

LGTM

Have Not seen it flicker in the last few days....closing


gh-355: consistent use of typing and collections.abc

Fixes #355, simplifying #308, xref #350. Change all import of typing/collections.abc to import <x> rather than from <x> import syntax. This is useful because it is straightforward to see at a glance where the import is coming from. Further, we have both numpy.random.Generator and collections.abc.Generator in use - so it separates them. I've also moved everything out of the TYPE_CHECKING block, except from where ruff says we should.

I really don't like this change, as it goes against established typing practice (e.g., https://typing.readthedocs.io).

It also clutters the namespace https://softwareengineering.stackexchange.com/a/187432/320391

It also clutters the namespace https://softwareengineering.stackexchange.com/a/187432/320391

Only if the imports are not guarded by the future import and if TYPE_CHECKING:. I usually don't have much, if any, of the static type present at runtime.

Have raised https://github.com/glass-dev/glass/issues/361


Pr/set tool mode mouse button mask

Please check if the PR fulfills these requirements

[x] The commit message follows our guidelines
[x] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Bug Fix

What is the current behavior? (You can also link to an open issue here)
Fixes a bug where the app can have poor performance or even crash when setToolModeForElement is called too many times. #898

What is the new behavior (if this is a feature change)?
Within setToolModeForElement the options.mouseButtonMask array is now de-duplicated.

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
NO

Other information:
I've used new Set() in here. This could cause a browser compatibility problem, depending on what csTools is supporting. I've left this as the solution as it's the cleanest option but if that is a no-go I can change it to something more es2015 safe.

This is the test output before the fix is applied:

@mikehazell, I'm going to merge this as-is. Thanks for taking the time to write some excellent tests and to fix this behavior. Please do take a look at my note though. I'm actively trying to improve my own testing abilities and would appreciate your thoughts.

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Unpin Tiles From Start Menu not working

Ran "Unpin Tiles From Start Menu" from GUI version,
On powershell window it says
Unpinning all tiles from the start menu
and _ flashing non stop.
Waited for an hour nothing happens

Did you run the powrshell script as an administrator in ISE or VSCode?
Sent from my iPhone

On Dec 7, 2019, at 7:33 AM, Spastic<EMAIL_ADDRESS>wrote:

Ran "Unpin Tiles From Start Menu" from GUI version,
On powershell window it says
Unpinning all tiles from the start menu
and _ flashing non stop.
Waited for an hour nothing happens
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

I have the same issue. This is fresh install of Win10 Home with all of the updates and Feature Packs installed. Have tried running via Powershell ISE as administrator and via right-click on "Start" button and click "Windows Powershell (Admin)
Win 10 Home.
Version 1909
OS Build 18363.476

Did you run the powrshell script as an administrator in ISE or VSCode?

Ran as admin from windows powershell

facing same issue
followed all the methods correctly many times

The link referenced to "superuser.com" shows a way to list the available actions one can trigger on start menu items.
https://superuser.com/questions/1068382/how-to-remove-all-the-tiles-in-the-windows-10-start-menu
When the following code snippet is run as the currently logged in non-admin user, it shows an action "Un&pin to Start Menu" (replace Keep with something that is currently pinned, e.g. Chrome).
Unfortunately using this action with the snippet to call it errors out as normal user.
(New-Object -Com Shell.Application).
     NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').
     Items() | ?{$_.Name() -match 'Keep.*'} |
     %{ $_.Verbs() }

When the same is run with admin privileges, the "Un&pin to Start Menu" is GONE. I think, therefore unpinning currently fails for the debloater script.

Can confirm. Unpin doesn't work on fresh Win 10 Pro install on several computers. From power shell with admin privileges.

I ran this on 1909 EDU

This works: https://github.com/farag2/Windows-10-Setup-Script/blob/master/Win 10.ps1#L1923


Fix for change and tiny fee calculations

With the change to tiny dust limits and 0.05 sat / byte tx fee rates some of the rounding needed re-visited as off by one bugs were noticed when calculating change.
This has been remedied by using floating point as much as possible and using an int conversion as late as possible to ensure accurate figures.
This has resulted in some tests that had questionable results now becoming more accurate also.

Codecov Report

Merging #112 (e1fbdc8) into master (0d68685) will decrease coverage by 0.05%.
The diff coverage is 77.77%.

@@            Coverage Diff             @@
##           master     #112      +/-   ##
==========================================
- Coverage   83.84%   83.78%   -0.06%
==========================================
  Files          34       34
  Lines        3676     3689      +13
==========================================
+ Hits         3082     3091       +9
- Misses        427      429       +2
- Partials      167      169       +2

Impacted Files
Coverage Δ

txchange.go
79.71% <72.72%> (-3.05%)
:arrow_down:

tx.go
78.68% <100.00%> (+0.17%)
:arrow_up:

Continue to review full report at Codecov.

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