flatMap expectations

PromiseKit version: 6.0.0

I know we're in maintenance mode here, but I was wondering if you'd be open to a small discussion on the flatMap introductions in the most recent version, since Swift's long overloaded the term and made it more confusing than it needs to be (and again, recently, with compactMap), and I'm afraid the naming here may continue to bewilder folks both new to and familiar with functional programming.
The concepts of map and flatMap in programming at large have this shape:
// map
[A]  => ((A) ->   B ) ->  [B]
 A?  => ((A) ->   B ) ->   B?
F<A> => ((A) ->   B ) -> F<B>

// flatMap
[A]  => ((A) ->  [B]) ->  [B]
 A?  => ((A) ->   B?) ->   B?
M<A> => ((A) -> M<B>) -> M<B>

For PromiseKit to behave as one familiar these shapes expects, map and flatMap should look like this:
Promise<A> => ((A) ->         B ) -> Promise<B>
Promise<A> => ((A) -> Promise<B>) -> Promise<B>

These are the two behaviors of then! The Promises/A+ spec decided to combine map and flatMap behaviors for ergonomics. Overloads in JavaScript don't have the compiler error issues you've been trying to solve, but having predictable map and flatMap would help!
The flatMap additions to PromiseKit run counter to these intuitions. Maybe some qualifiers would help.
https://github.com/mxcl/PromiseKit/blob/0e150f87e895d849287e8fc5053e6dfe7919577d/Sources/Thenable.swift#L57
This looks like it's a compactMap of sorts, swallowing up optional return values.
https://github.com/mxcl/PromiseKit/blob/0e150f87e895d849287e8fc5053e6dfe7919577d/Sources/Thenable.swift#L176
This is performing a flatMap operation on the inner sequence, not the promise, so maybe flatMapInner would be a more appropriate name.
Lemme know if I've been unclear or need to make any clarifications!

I'm copying flatMap from Swift’s Optional, which behaves this way. Also the Array form behaves this way especially now one version was renamed compactMap.

I didn't have time right this second to read your post thoroughly, but I will. Just thought I'd throw the above in in case it helped.

Ah, so Optional's flatMap works this way because it's defined on Optional itself. flatMap generally expects that the container type (where flatMap lives, e.g. Optional) is the same as the return type of the transform function (again, Optional in that case).
Optional<A> -> ((A) -> Optional<B>) -> Optional<B>

So to define flatMap on Promise generically, the expectation is that the signature follows suit, where you can simply substitute every Optional for Promise.
Promise<A> -> ((A) -> Promise<B>) -> Promise<B>

Array works the same way. (Sequence must convert the container to an Array because Swift's type system isn't quite powerful enough to return the same sequence type.)
Compare with compactMap, where it's not as abstract:
[A?] => ((A?) -> B?) -> [B]

These overloads on Promise are definitely handy! They're just not quite what folks expect when they see flatMap.
Hopefully this all makes sense! We're in abstract land, so it can be tough to convey this stuff. I'm hoping seeing the function signatures helps!

OK, what do you suggest?

Just some renaming. Earlier I suggested the idea of sharing compactMap to mean failing on optional, and adopting flatMapInner to invoke flatMap on a sequence or optional that a promise contains.
What do you think?

For me, the way to think about promises is to imagine they didn't exist, to abstract away the asynchronicity. Thus it's like you called flatMap on the promise's value and not the promise, so the functional names should be named as though they act on the values rather than the promises.
Of course this falls flat since the value is not an optional mostly.
Anyway, I'm all for not confusing functional names more in any land, especially Swift land. So provided we can figure out good names, I'm down.
In this respect, is map also bad?

In this respect, is map also bad?

I don't think so! From what I gather map is being used as:
Promise<T> => ((T) -> U) -> Promise<U>

https://github.com/mxcl/PromiseKit/blob/0e150f87e895d849287e8fc5053e6dfe7919577d/Sources/Thenable.swift#L38
This is exactly what we want when we encounter map: it works with a transform function that has no knowledge of the container type, just the type contained within. Lemme know if there are other instances I missed, though, that have a different shape!

One other thought before I call it a night: there are some nice methods on observable/signal types in FRP libraries like ReactiveSwift and Rx that ignoreNil() or skipNil() to promote Signal<A?> to Signal<A>. If the goal is to easily transform a promise of A? to A and then act on that data, maybe some similar, concrete methods would be a nice alternative!

Just brainstorming:

mapIfSome
mapIfNotNil

Or should we stick clear of map here?

tl;dr I think the feeling of the way PMK uses these functions is spot on, which IMO is at least as important as using them accurately.
I don't feel qualified to comment on the technical underpinnings of @stephencelis's reasoning here, which I'm sure are sound. I don't have any experience with functional programming, and my understanding of these transforming functions has come to me more through feeling than concrete expectations. I imagine I'm not the only PMK user in this boat though. So I'm gonna throw in my two cents, which admittedly is mostly opinion.
I understood the purpose of these new functions almost immediately. I did need to read the documentation on them first. What did it mean to map a promise? What did it mean to flatMap a promise? But as soon as I read the docs, I got it. Oh, maping a promise means I'm returning something that's not a promise. It's like a transform. Got it. Oh, flatMaping a promise means I'm returning an Optional and I want to remove that optionality. Just like how I (most often) use flatMap in Swift. Got it.
These understandings were based on the feeling of my experience with the functions they're based on, not the technical expectations, which I've never had to think about. A lot of people do think about these things of course, and I can understand how our co-opting of the functions might be confusing due to that. So if some better names are found, then cool. But I do worry about adding qualifiers to the names (e.g. ifSome, ifNotNil), or changing the names entirely for the simple purpose of disassociating them from the pure counterparts. I worry it'll actually make the purpose less clear. I believe my quick understanding of their purpose came from the simple naming that (at least somewhat closely) mirrored behavior I was already familiar with.

@nathanhosselton map is being used in the expected way! If follows in the footsteps of Array.map and Optional.map in Swift, and it follows in the footsteps of map in a lot of other programming languages, and in math, and in other disciplines! This is great! It means we can go between these different worlds and share this knowledge without having to start from scratch each time. As soon as we write map in a different way, we start to lose this, and we lose the trust of people who have built up these intuitions and expectations.
This is exactly why flatMap should do the same: it also has a very specific, established meaning over a lot of different places. Even Swift has cleaned house here: Array.flatMap only works with a closure that returns an array, and Optional.flatMap only works with a closure that returns an optional. (If you're used to using Array.flatMap with optionals, you'll be renaming those to compactMap soon.)
The current implementations in PromiseKit unfortunately deviate from the long history of what flatMap is and muddies the waters for functional and non-functional programmers alike! We need to be careful not to overload something with an established meaning (even if it's abstract) with something that doesn't match that meaning. Even though it kinda looks like a duck and it quacks like a duck, it's just not a duck. If we mistake a horse for a dog because we've seen some dogs but have never seen a horse, we're not going to keep on calling horses "dogs" when we learn about horses. And we're not going to reuse + for multiplication when we first learn multiplication because + already has a clear meaning, and overloading it (instead of establishing another operator to host this shared meaning, *) confuses things.
I think the constructive way to continue the conversation here is to suggest new names that feel right and don't overload concepts that have well-established meaning.

Apologies, restating information here so I am sure I'm on the same page.
The issue with our flatMap that operates on Optionals is that it is called on a promise, and this is mismatched with the transform return type, which is an Optional. A true flatMap's transform return type matches the type on which the function is called.
The issue with our flatMap that operates on Sequences is essentially the same: it is called on a promise, but the promise is ignored in the transformation; it's the sequence type within the promise that is actually flatMaped.
Is this right?

@nathanhosselton I'm not exactly clear as to what you're asking, but none of the flatMap overloads on Promise fit the shape that flatMap expects:
(M<A>) => ((A) -> M<B>) -> M<B>

It operates on a single container type, M, and works to transform Ms that contain As into Ms that contain Bs with a specific transform function from M<A> to M<B>.
I think it's important to realize that flatMap is a completely generic concept and doesn't know anything about Array or Optional. It just turns out that you can satisfy the flatMap function signature for both types by swapping M out, and it also turns out that these two functions are useful. You can also swap M for Promise and get something useful (the thing that then does, where you can return a promise from the closure). You can swap M out for a lot of things.

I'm just trying to restate the specific issue(s) with our flatMaps as succinctly as possible. But I want to confirm with you that I have it right, since this is my first time considering such things.
As you said, the shape of a pure flatMap looks like:
(M<A>) => ((A) -> M<B>) -> M<B>

And the shape of our flatMaps actually look like:
//Optional Thenable.flatMap
(Promise<A>) => ((A) -> Optional<B>) -> Promise<B>
//or
(M<A>) => ((A) -> N<B>) -> M<B>

//Sequence Thenable.flatMap
(Promise<Sequence<A>>) => ((A) -> Sequence<B>) -> Promise<Sequence<B>>
//or
(M<A>) => ((A) -> B) -> M<B>

In the case of our flatMap on Sequences, the shape becomes correct if the promise containers are ignored, which is why you suggested the name flatMapInner.
In the case of our flatMap on Optionals, the shape is still incorrect even when the promise containers are ignored:
(A) => ((A) -> N<B>) -> B

…which is why @mxcl mentioned that the name ifLet would actually be more accurate.
Do I have this right?

I think you have this right!

In the case of our flatMap on Optionals, the shape is still incorrect even when the promise containers are ignored:
(A) => ((A) -> N<B>) -> B

In this case, no need to abstract with N! We have a concrete, failover operation that utilizes Optional. This is why I suggested compactMap over ifLet since it would provide a shape consistent with Array.compactMap:
Array<A>   => ((A) -> Optional<B>) -> Array<B>
Promise<A> => ((A) -> Optional<B>) -> Promise<B>

If we settled on this, we'd have to rename the existing overload from compactMap to compactMapInner, but we'd have a consistent set of methods if we adopted flatMapInner for the other two operations.

What about flatMapValue or flatMapResult? And compactMapValue/compactMapResult for our flatMap variant that removes Optionals from a Sequence?
Value/Result of course refer to the promise's internal value, so we're being explicit about what is actually being flatMapped while using PMK terminology.

Either sound good to me!

Yeah, so really then is flatMap, which I kinda already knew. K, well I don't want to muddy anything here, let’s rename both flatMaps, the non-sequence one can have a nice name we can invent, the latter should probably be flatMapInner though I think this just confuses things.
Mainly my concern is a sensible set of names that people understand without having to read the documentation. Then after that is that I don’t contribute to a wider misunderstanding of functional principles, and since PromiseKit is a popular library, I have that responsibility.
Thanks for the input, let's keep it going.

firstly {
    fetchImageData()
}.ifLet {
    UIImage(data: $0)
}

Clear, but ugly.

firstly {
    fetchImageData()
}.unwrap {
    UIImage(data: $0)
}

After reading your conversation I feel that compactMapValues, compactMap, flatMapValues and flatMap make most sense to me. And it will follow Swift’s naming convention (https://developer.apple.com/documentation/swift/dictionary/2894692-mapvalues).

So we have:

Promise<Sequence>.flatMap ~> Promise<Sequence>.flatMapValues
Promise<Sequence>.compactMap ~> Promise<Sequence>.compactMapValues
Promise<T>.flatMap ~> Promise<T>.unwrap

How are we feeling about these? Additionally, how about filter which we also provide? Finally, do we feel that if we go to this length the Swift stdlib team will also?

Could unwrap be compactMapValue and should it be? At this point I'm feeling a little hazy on understanding again.

Could unwrap be compactMapValue and should it be? At this point I'm feeling a little hazy on understanding again.

I think unwrap could just be plain old compactMap? It matches the overall shape of Array's compactMap but with Promise substituted in.
Array<A>   => ((A) -> Optional<B>) -> Array<B>
Promise<A> => ((A) -> Optional<B>) -> Promise<B>

Then compactMapValue would be for this case:
Promise<Array<A>> => ((A) -> Optional<B>) -> Promise<Array<B>>

Additionally, how about filter which we also provide?

Hm, interesting. So if I came across promise.filter, I'd maybe think that it was filtering a promise by the value it contains, not filtering the sequence a promise contains. Does such a thing live on promise under a different name? One nice thing is that a filter that works this way can be built with compactMap:
func filter<A>(_ predicate: (A) -> Bool) -> Promise<A> {
  return self.compactMap { predicate($0) ? $0 : nil }
}

Please review this preliminary PR: #782

Merged for release with 6.1.0 (today hopefully).


fix build.rs for different gasnet conduit

Need to check the mak file.

Done
Commit: 0a3e4869a23543074092ad8862041e0eb24eb925


Ext Host unresponsive warning when open file

use todays insiders
open marked.js from our workspace
you get an unresponsive info tho the extension host seems to be snappy

From debugging, this might happen if the last request takes a very long time. We saw a reproducible case where the TS server was busy and then the last request, for code actions was taking more than 10s to resolve.


Update economy.js

added givemoney and takemoney popup it also shows the user total amount

The changes are fine, but you need to indent your code correctly

indent?

Yknow, making the code neat and stuff by aligning it with the rest and adding proper spacing using tabs

huh? fine next time ill remember this

What is the use of Wisp.hashColor (user.id) when you do givebucks and takebucks? That seems really unimportant to the command in general.

to get the username color in popup it looks good tho

good

To be honest, it looks fine without Wisp.nameColor being defined. Plus this PR feels like as if it doesn't help out the server at all.

i just made it more attractive for the user who is getting money .  its just a style edit not any type of new code that can help server. and it upto wisp developers they want it or not @CharizardtheFireMage

I'll admit that all the extra colors and stuff aren't really needed, but I think it's kinda important to give other users popup notifs when they receive bucks or have bucks taken from them

hmm that what i added here..

ikik :P
@Kevin199 You can fix the indentation by updating your pull request using your git shell

lol xD

Merged in 611dfcae27140b58ff02274e06e762838d8822f3

xDDDDDDDDDDDDdd


How to apply to an AKS instead of VM?

Can this be done for an AKS instead of VM? We use a Traefik as ingress controller.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: d404ca02-47ed-d3c9-bf4e-52cd0b0d61ba
Version Independent ID: 5fadfbea-ddcb-8342-32b3-00a8595f3437
Content: Configure end-to-end SSL with Azure Application Gateway
Content Source: articles/application-gateway/application-gateway-end-to-end-ssl-powershell.md
Service: application-gateway
GitHub Login: @vhorne
Microsoft Alias: victorh

@sujithq it is possible to do SSL termination with an Application Gateway and AKS, but I am unsure if you can use SSL between an Application Gateway and AKS.
do you just need the SSL offload, or do you want the end to end SSL?

I managed the SSL Termination but I also need end to end SSL termination.
I tried 2 different ways using certificates at AKS side: manual via openssl and via traefik acme and dnsprovider using the cer file at at Application Gateway side (set to HTTPS at httpsettings level). My Backend Health reports this:

Https probe connection error. Check if backend server certificate is whitelisted with Application Gateway. Check for backend certificate validity.

There should be a match between the public keys used at Application Gateway and AKS but I am not sure about that. I guess my certificates should be whitelisted using the cer file?
KInd regards,
Sujith

@sujithq We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.

Sujith and Travis - This worked like a charm, where we dont have touch the APPGW, just defining the ingress rules in YAML file will do the magic behind the scenes.
https://azure.github.io/application-gateway-kubernetes-ingress/
Thanks
Gopinath T

Hi @TravisCragg-MSFT
Like @sujithq, I have a need to implement end to end SSL encryption between AppGw and AKS and have spent many hours trying, both with AppGW V1 and V2, ending up 502s (either failing probes or requests not coming through). I can get AppGW to work with SSL termination, and AKS to work with HTTPS/TLS at the load balancer using host headers. But I can't get the re-encryption between AppGW and AKS LB to work.
So I really need a "How To" on this specific subject.
The setup:
VNet with two subnets - one subnet for AppGW and one subnet for AKS.
AppGW multisite https listeners (SNI required) for sub1.domain.com, sub2.domain.com, and sub3.domain.com.
We currently have a wildcard certificate for *.domain.com which is used on all listeners. This might change to individual certs when we move to production.
All traffic from the listeners are routed to the same backend (AKS internal LB) and must be re-encrypted.
AKS provisioned with advanced networking, RBAC and AAD Authentication.
An internal load balancer is provisioned by AKS inside the AKS Subnet, Nginx ingress controller configured with TLS on sub1.domain.com, sub2.domain.com, and sub3.domain.com.
best regards
Jan
P.S.
Not in scope for the "How-to", but none the less important for the final setup: We do have other subnets (as well as other peered VNETs) with components that also need to talk to the AKS Int. LB via HTTPS - but that is beside the point here.

@janlunddk Have you worked with Azure Support yet to get encryption working between the App Gateway and AKS?
Also, are you using an Azure Load Balancer for your AKS?


ObjectTypeVisitor - cast to OpenApiSchemaAcceptor instead of IOpenApiSchemaAcceptor

Describe the issue
azure-functions-openapi-extension/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/Visitors
/ObjectTypeVisitor.cs
Line ~110 ish, there is a line that reads             var instance = acceptor as OpenApiSchemaAcceptor;.  When testing with a custom
IOpenApiSchemaAcceptor, this was not processing, its because we cast to the concrete implementation type instead of the interface type.  This stumped us recently, debugging attribute errors with duplicate keys.
Expected behavior
I think this should be var instance = acceptor as IOpenApiSchemaAcceptor
Screenshots
If applicable, add screenshots to help explain your issue.

Adding to this, seems like this is also an issue in TypeVisitor.cs, line ~126 ish


Determine framework to use

Possible options:

Plain ol' Node
Deno? (well-supported by slack, apparently)
Bun

After deliberating between Deno and Node.js (Bun seems a bit too immature at the moment) Deciding to proceed with Node.js, likely with Yarn as corepack is bundled with modern versions of Node and therefore makes using it easier.
Reasoning FOR Deno:

Has TypeScript support out of the box
Built-in formatter, linting, and testing (potentially removes need for #13 #15 ?)

Will need to determine how they are vs. more standard solutions for each (e.g. Jest for testing, ESlint for linting)

New and shiny, but mature enough to be stable (unlike Bun 1.0)
Does support npm packages (this wasn't the case until recently for both Deno and Bun, apparently)
Apparently Slack's next-generation platform is pushing developers to use Deno

Reasoning FOR Node.js:

Much larger community than Deno - good for troubleshooting and tutorials
Much more widely used in the industry - would be good to gain experience in something that could employ you
Lack of out-of-the-box utilities allows for more modularity

Mostly referencing Deno's built-in utilities, such as linting, testing, and formatting

Familiarity - We used NodeJS for Minerva and it hasn't been too much of a pain
Lots of package management gripes resolved if we use Yarn. As of Node v14, Corepack is included with Node which makes dealing with package managers other than npm a lot easier.


SCons: Fix parsing PATH when constructing base environment

We constructed the SCons environment without taking any (shell) environment
variables into account, and then appended a few, but too late. This would
cause variables like env["CXX"] not to be properly expanded to respect a
non-standard PATH.
With this fix, setting:
PATH=$GODOT_SDK/bin:$PATH

will now properly use $GODOT_SDK/bin/gcc if available over /usr/bin/gcc.

For now I went with a conservative fix (same intent as the previous code), but we could also consider pulling in the whole os.environ with:
env_base = Environment(ENV=os.environ, tools=custom_tools)

The SCons documentation mentions it but also specifies that it can be risky:

Or you may explicitly propagate the invoking user's complete external environment: [snip]
This comes at the expense of making your build dependent on the user's environment being set correctly, but it may be more convenient for many configurations. It should not cause problems if done in a build setup which tightly controls how the environment is set up before invoking scons, as in many continuous integration setups.

I want something safe to cherry-pick for 3.2.4 so not giving this a try now, but we can reconsider later.

Cherry-picked for 3.2.4.


Cline cannot see the output of failed commands in code-server

Which API Provider are you using?
OpenRouter
Which Model are you using?
Sonnet
What happened?
If a command line command fails (red dot in vscode terminal window vs blue) to complete in code-server cline can't see it and so keeps retrying similar commands or ignores the output and continues.  my workaround has been to manually copy the command and output back into cline.
Code-server is hosted in wsl in win11.
Steps to reproduce

Have cline run any command in code-server that fails.
You will see cline keeps trying similar commands or just continues/completes the task.

Relevant API REQUEST output
No response
Additional context
No response

I've had this quite a bit, Cline will think the command ran successfully and end the conversation - but the terminal can be full of errors.


Support arguments

It'd be nice to be able run something like payload-dumper-go info (or --dry-run) to get just the info about the partitions and their sizes, like
payload.bin: payload.bin
Payload Version: 2
Payload Manifest Length: 229331
Payload Manifest Signature Length: 267
Found partitions:
my_engineering (336 kB), my_preload (2.5 MB), vendor_boot (201 MB), engineering_cdt (1.0 MB), keymaster (410 kB), system (705 MB), bluetooth (1.2 MB), uefisecapp (180 kB), imagefv (74 kB), abl (221 kB), my_bigball (808 MB), cpucp (188 kB), tz (3.9 MB), devcfg (49 kB), aop (278 kB), uefi (3.2 MB), vbmeta_system (8.2 kB), xbl (1.2 MB), recovery (105 MB), xbl_ramdump (832 kB), qupfw (57 kB), system_dlkm (348 kB), splash (332 kB), my_stock (965 MB), my_manifest (369 kB), system_ext (1.1 GB), my_region (3.9 MB), modem (298 MB), oplusstanvbk (2.0 MB), init_boot (8.4 MB), vbmeta (12 kB), boot (201 MB), product (2.9 MB), odm (1.5 GB), hyp (1.6 MB), vendor (1.1 GB), aop_config (16 kB), dtbo (25 MB), my_carrier (336 kB), xbl_config (192 kB), oplus_sec (852 kB), my_heytap (917 MB), dsp (67 MB), featenabler (98 kB), vendor_dlkm (145 MB), shrm (66 kB), my_company (336 kB), vbmeta_vendor (4.1 kB), my_product (553 MB)

It would also be nice to add a way to extract images for just the specified partition(s), like payload-dumper-go --extract-partitions=init_boot,my_region should extract just 2 small files and that operation should be damn fast.

payload-dumper-go -p init_boot,my_region payload.bin

Disregard that ticket, the project just lacks the docs and I lacked curiosity at first.
The -l/--list and -p/--partitions args are already there, and I could learn that not only from reading the code, but also by running the util without any args...


Get the license information in the DataONE query and display it in the UI

We now have license information showing for Gleaner results, but not for DataONE - this is because DataONE does not yet expose license information in Solr.

Depends on Get the license into the DataONE Solr index
DONE IN Q4 (JANUARY - MARCH) 2023


release: x.exe executable mistakenly included in releases

Golang SDK 1.9.1 zip archives for Windows (both amd64 and i386) contain file  /go/src/cmd/go/x.exe I could not find similar file in Linux distributive and in Go SDK 1.9 for Windows,  the issue is that many antiviruses complain about the file
what is the file?

For the amd64 at least, I have the same file but it has a different size / SHA256 and a different outcome in the scan results
I've installed Go via the .msi installer. Looking at the archive it matches the file I have on my machine (both size/SHA256)

I've verified the file at https://storage.googleapis.com/golang/go1.9.1.windows-386.zip has the correct SHA256 and does contain the x.exe file at the path OP listed.

my plugin loads archives through web api from  https://storage.googleapis.com/golang/
also I have checked both manually loaded archives from standard page https://golang.org/dl/

@raydac can you try on a third party system? Maybe from a Linux based OS?

@dlsniper what do you mean? I have loaded manually zip golang sdk archives 1.9.1 for windows under Ubuntu and x.exe is presented in both zip archives, calculated sha256 are the same like described on the main download page
ea9c79c9e6214c9a78a107ef5a7bff775a281bffe8c2d50afa66d2d33998078a  ./go1.9.1.windows-386.zip
8dc72a3881388e4e560c2e45f6be59860b623ad418e7da94e80fee012221cc81  ./go1.9.1.windows-amd64.zip

Cool, so now upload the exe files from the Ubuntu machine to that website and see what results you have. The sums for the archives seem to be correct, see if anything changes for that file, x.exe

@dlsniper
report for x.exe from amd64
report for x.exe from 386

My amd64 x.exe in the MSI installed tree has a go.buildid of 07f043544a1febd4867dcccd5eb032f2249449db. Maybe a quick search for that in the official build logs will locate it?
All scans here says it's benign. Smells like an intermediate artifact that was packaged in error.

I checked go1.9.1.windows-amd64.zip downloaded from golang.org/dl on Ubuntu.

But x.exe not exists.

@mattn the path is a bit incorrect, you need to run ls -la go/src/cmd/go not ls -la go/bin.

Sorry, I found it on go/src/cmd/go. As far as I can see, it is built by go. And C:\workdir\go\src\cmd\go is cembeded in binary.

BTW, It seems that *_test.go in go/src/cmd/go have some string x.go.

CC @broady

Specified download URL redirected from golang.org.
https://www.virustotal.com/#/url/be8bdf89ebaff51c56824ab6074db008e91161bdd5973af110140c4221cfb0ac/detection
https://www.virustotal.com/#/url/de7cb91aeb171dedeb9a3f56e77c6a6eaff4cc70f8a4d7b98f3a733a5e2ea952/detection
This seems not bad. One of the antivirus software seems to detect always.

And I uploaded x.exe contained the zip, but not detected.
https://www.virustotal.com/#/file/d9c1b0aee3cc3f3a5cce0208438103e27664d18f53961e21f6c29f275ce01b94/detection
The result page which I posted was redirected to the page which is already reported  by another user.

So, currently, what I can say is that x.exe I uploaded is not same file as x.exe uploaded by raydac.

@mattn this seems to be limited to the 386 distribution only. The file is present both in amd64 and 386 distros but only flagged as malicious in the 386 archive.

@mattn  a lot of antiviruses are red for version of x.exe from 386 version of golang sdk 1.9.1 and user of plugin also detected such signal for 32 bit version

@raydac I checked 386 zip file.
https://storage.googleapis.com/golang/ go1.9.1.windows-386.zip
https://www.virustotal.com/#/url/8704d418b889c02947d23530317fb1f14f039fbd1e81d9e6067826f5fdccc41e/detection
https://storage.googleapis.com/golang/ go1.9.1.windows-386.msi
https://www.virustotal.com/#/url/53e0087623755b8eb2962fa46496805b318422da9e1e4730978d73142777ef74/detection
x.exe extracted from go1.9.1.windows-386.zip
https://www.virustotal.com/#/file/ffb4f32afbb23131a68a55a3b3692299489d75ad12e82af72bc938c66023fb8f/detection
I wonder why the URL is not detected.

But... what is x.exe?

I uploaded exe file that is compiled with GOOS=windows, GOARCH=386 on Ubuntu.
https://www.virustotal.com/#/file/96735a9738dab2e256067c5b1919220da6550203bef5f4391f59ffbb2d878969/detection
package main

import (
        "fmt"
        "log"
        "net/http"
)

func main() {
        http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
                fmt.Fprint(w, "Hello Gopher")
        })

        log.Fatalln(http.ListenAndServe(":12345", nil))
}

It seems some antivirus ware detect binary compiled with GOOS=windows GOARCH=386 on Linux as malicious.

The binary is left over from running TestImportMain in cmd/go. It's harmless. We should remove it, but it's harmless. Any virus scanner that thinks the binary is a virus is wrong.

http://nurmi-labs.blogspot.com/p/gcc-fullbuild.html
FWIW, the SUA Interix 6.0 (for MS Vista) download contained the compressed source to compile gcc-4.2 plus dependencies, and the gcc_fullbuild text file reproduced in the above blog Page.
IIRC, AVG on the extracted 'binutils 2.17' had reported false positives on two separate text files.
The original golang-nuts 14 Oct 2017 mail of @raydac having referred to AVG.

CL 71410 OK for Go 1.9.5.

go1.9.2 has been packaged and includes:

CL 71410

The release is posted at golang.org/dl.
— golang.org/x/build/cmd/releasebot, Oct 26 21:09:24 UTC


distinguish below & above

I usually need do distinguish if an element is below or above viewport.
For example:
I want to animate something when scrolling down to it.
But after I scrolled it out of viewport again (above it) or when I load page an element is above viewport I need to distinguish this state from the one when the element is below viewport.

I have the same issue.
One of my biggest UX frustrations is when I'm reading an article and the comments section is longer than the article. I want the scroll bar to serve as a virtual progress indicator, because IMO, that’s exactly what it is.
To accomplish this, I'm showing comments (in a single page toggle, similar to an accordion) only when the comments section is in view. If I scroll back up the page, the comments should be hidden again, returning to an accurate scroll bar. However, if I scroll past the comments (into a long footer for example) I don't want the comments section to collapse because that would present a jarring shift in page content.
In other words, I want to hide comments while they are "below view" and show comments when they are "in or above" view.

@Metis77 @joeyhoer Interesting use cases that I hadn't thought of. How do you imagine this would fit into the API? As events?
inView('.someSelector').on('above', someFunc);
inView('.someSelector').on('below', someFunc);

probably as events.
Not sure what would be the best approach.
maybe:
on(is_above
on(isnot_above
on(is_inview
on(isnot_inview
on(is_below
on(isnot_below
or simply:
on(above
on(inview_enter
on(inview_exit
on(below

I use a jQuery plugin for this functionality. I really love this library and I aim to include switch to this in the near-future. With what I have in place I needed to work with above/below and I custom build that part. What would make sense for me is to pass the direction to the event object as e.direction so in the doSomething function we can work with it. Example:
inView('.someSelector')
    .on('enter', doSomething)
    .on('exit', doSomethingElse);

function doSomething(e){
    switch (e.direction) {
        case 'top':
            handleTop();
        break;
        case 'bottom':
            handleBottom();
        break;
        case 'left':
            handleLeft();
        break;
        case 'right':
            handleRight();
        break;
    }
}

I hope this helps.

This would be a good addition to the library. Something I would find really useful.

@camwiegert this library is awesome but I really need this feature (above/below). Have you in plan to implement it soon? Thanks

I think this issue will be addressed in an upcoming release. The plan is to make the calculated intersection available to registered callbacks. For example...
inView('.someSelector')
  .on('enter', (el, intersection) => {
    console.log(intersection);
    // { top: -350, right: 40, bottom: 10, left: 80 }
  });

There are quite a few permutations of elements entering/exiting the viewport, so we just provide this raw info and let the user draw their own conclusions. From the above you might conclude that the element just entered the screen from the top, depending on the specific case.

Great functionality that can definitely help create better user interactions!
I wonder if there are any news on this feature  ? or maybe a snippet to work with ? Thanks


[BUG] tolerations and node selectors options are ignored for longhorn-csi and engine-image

Describe the bug
I've deployed Longhorn in a EKS cluster v1.30 using Helm on 3 dedicated nodes.
I've used the recommendations per the documents https://longhorn.io/docs/1.6.2/advanced-resources/deploy/taint-toleration/#setting-up-taints-and-tolerations-during-installing-longhorn
This is how my value helm file looks like:
defaultSettings:
  taintToleration: "dedicated=storage-node:NoSchedule"
  systemManagedComponentsNodeSelector: "role=storage"

longhornManager:
  nodeSelector:
    role: "storage"
  tolerations:
  - key: "dedicated"
    operator: "Equal"
    value: "storage-node"
    effect: "NoSchedule"
longhornDriver:
  nodeSelector:
    role: "storage"
  tolerations:
  - key: "dedicated"
    operator: "Equal"
    value: "storage-node"
    effect: "NoSchedule"
longhornUI:
  nodeSelector:
    role: "storage"
  tolerations:
  - key: "dedicated"
    operator: "Equal"
    value: "storage-node"
    effect: "NoSchedule"

Helm install command:
`helm upgrade --install longhorn longhorn/longhorn --namespace longhorn-system --create-namespace --version 1.6.2 -f values.yaml'
helm get values longhorn -n longhorn-system
USER-SUPPLIED VALUES:
defaultSettings:
  systemManagedComponentsNodeSelector: role=storage
  taintToleration: dedicated=storage-node:NoSchedule
longhornDriver:
  nodeSelector:
    role: storage
  tolerations:
  - effect: NoSchedule
    key: dedicated
    operator: Equal
    value: storage-node
longhornManager:
  nodeSelector:
    role: storage
  tolerations:
  - effect: NoSchedule
    key: dedicated
    operator: Equal
    value: storage-node
longhornUI:
  nodeSelector:
    role: storage
  tolerations:
  - effect: NoSchedule
    key: dedicated
    operator: Equal
    value: storage-node

To Reproduce

copy/paste the above settings for the value file
run the above mentioned command

Expected behavior
The csi-plugin/engine-image pods should be deployed on the nodes in respect to taints/selectors.
Support bundle for troubleshooting

Environment

Longhorn version:  1.6.2
Impacted volume (PV):
Installation method (e.g. Rancher Catalog App/Helm/Kubectl): Helm
Kubernetes distro (e.g. RKE/K3s/EKS/OpenShift) and version: EKS 1.30

Number of control plane nodes in the cluster:
Number of worker nodes in the cluster: 5

Node config

OS type and version: Amazon AL2023
Kernel version:
CPU per node: varies
Memory per node: varies
Disk type (e.g. SSD/NVMe/HDD): gp3
Network bandwidth between the nodes (Gbps):

Underlying Infrastructure (e.g. on AWS/GCE, EKS/GKE, VMWare/KVM, Baremetal): EKS
Number of Longhorn volumes in the cluster: 3

Additional context

ref: https://github.com/longhorn/longhorn/issues/4843

If I add only the tolerations, it works:
defaultSettings:
  taintToleration: "dedicated=storage-node:NoSchedule"

But if I add the node selector as well:
defaultSettings:
  taintToleration: "dedicated=storage-node:NoSchedule"
  systemManagedComponentsNodeSelector: "role=storage"

It fails adding the taints as well

I am facing the same issue with 1.6.2 (didn't deploy another version). Essentially, the csi-plugin pods don't get the toleration applied and hence cannot be scheduled on nodes with the given toleration set. This prohibits volumes being attached there.
My config is similar to the one of @b-milescu.

@chriscchien Can you help check if the issue is valid? Thanks.


Request new module: AWS VPC to VPC Peering Module

Related user story
Issue Number : 267
Type of module
terraform
If requesting a terraform module, what is the target cloud platform?
aws
What is the purpose of the module?
Create a generic AWS VPC to VPC Peering module.
What is the category of the module?
network and infrastructure

/name vpc-peering

/displayName AWS VPC Peering


move rustdoc_json::build into a struct fn BuildOptions::build

also deprecates rustdoc_json::build for this new method

I agree, the naming is a bit awkward
I'd say BuildOptions is well suited to be a builder. This is a common pattern found for example in hyper and other crates.
I think maybe BuildOptions could be renamed to Builder or maybe simply Build? and we could either return a Result<PathBuf, _> or a new struct Result<RustdocJson, _>
the rename can be done pretty easily with a alias, #[deprecated] on pub use Build as BuildOptions; should only deprecates the alias, see for example how clap did it.

Maybe even RustdocJsonBuilder?

I think you're onto something here.
What do you think about this? (I think I like it)
    let mut json_path = rustdoc_json::Builder::default()
        .toolchain(args.toolchain.clone())
        .manifest_path(&args.manifest_path)
        .build()

So like RustdocJsonBuilder, but we keep the crate name in the code so that the code reads nicely (similar to how I went with rustdoc_json::build() instead of rustdoc_json::rustdoc_json_build()).

I like the idea of using the full path, will fix

should we do an immediate bump also?

Do you mean of only rustdoc_json? Maybe wait a few days in case we discover we want to do some tweaks?
But if you want to releases right away, you have my full endorsement :)

Precisely, I think it's fine to wait then :)

@Emilgardis: Tomorrow's nightly changes the JSON format slightly, so we're gonna need to make a release: https://github.com/rust-lang/rust/pull/102321#event-7464506844
Are you interested in taking care of this release in full, or only the rustdoc_json crate?

Turns out we have no test that exercises the ItemEnum::PrimitiveType code path, so CI still passes.
Actually we might get away with not bumping min nightly, because only core can impl stuff for primities.

FYI, rustdoc-json v0.4.1 has now been published to crates.io.

my bad! I missed the earlier comment!

No worries :)
(I'm doing the v0.20.0 release now, mostly because I am not comfortable with accumulating unreleased stuff)


Create configuration management concept documentation

will be re-opened later and expectations will be added

will be re-opened later and expectations will be added


[AIRFLOW-3068] Remove deprecated imports

Remove the deprecated way of importing in preparation of Airflow 2.0
Make sure you have checked all steps below.
Jira

[ ] My PR addresses the following Airflow Jira issues and references them in the PR title. For example, "[AIRFLOW-3068] My Airflow PR"

https://issues.apache.org/jira/browse/AIRFLOW-3068
In case you are fixing a typo in the documentation you can prepend your commit with [AIRFLOW-3068], code changes always need a Jira issue.

Description

[ ] Here are some details about my PR, including screenshots of any UI changes:

Tests

[ ] My PR adds the following unit tests OR does not need testing for this extremely good reason:

Commits

[ ] My commits all reference Jira issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":

Subject is separated from body by a blank line
Subject is limited to 50 characters (not including Jira issue reference)
Subject does not end with a period
Subject uses the imperative mood ("add", not "adding")
Body wraps at 72 characters
Body explains "what" and "why", not "how"

Documentation

[ ] In case of new functionality, my PR adds documentation that describes how to use it.

When adding new operators/hooks/sensors, the autoclass documentation generation needs to be added.

Code Quality

[ ] Passes git diff upstream/master -u -- "*.py" | flake8 --diff

+1


Tizen toolchain - develop for Tizen devices (the doctor check crashed)

I am installing flutter-tizen and when I run flutter-tizen doctor -v I am getting this error

Tizen toolchain - develop for Tizen devices (the doctor check crashed)     X Due to an error, the doctor check did not complete. If the error message below is not helpful, please let us know       about this issue at https://github.com/flutter/flutter/issues.     X NoSuchMethodError: The getter 'length' was called on null.       Receiver: null       Tried calling: length     • #0      Object.noSuchMethod (dart:core-patch/object_patch.dart:54:5)       #1      double._parse (dart:core-patch/double_patch.dart:95:19)       #2      double.tryParse (dart:core-patch/double_patch.dart:118:45)       #3      TizenValidator.validate (package:flutter_tizen/tizen_doctor.dart:88:38)       #4      asyncGuard.<anonymous closure> (package:flutter_tools/src/base/async_guard.dart:111:32)       #5      asyncGuard.<anonymous closure> (package:flutter_tools/src/base/async_guard.dart:109:18)       #6      _rootRun (dart:async/zone.dart:1354:13)       #7      _CustomZone.run (dart:async/zone.dart:1258:19)       #8      _runZoned (dart:async/zone.dart:1788:10)       #9      runZonedGuarded (dart:async/zone.dart:1776:12)       #10     runZoned (dart:async/zone.dart:1707:12)       #11     asyncGuard (package:flutter_tools/src/base/async_guard.dart:109:3)       #12     Doctor.startValidatorTasks (package:flutter_tools/src/doctor.dart:203:9)       #13     Doctor.diagnose (package:flutter_tools/src/doctor.dart:307:47)       #14     DoctorCommand.runCommand (package:flutter_tools/src/commands/doctor.dart:48:47)       #15     FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:1157:18)       <asynchronous suspension>       #16     FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1009:27)       <asynchronous suspension>       #17     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)       <asynchronous suspension>       #18     AppContext.run (package:flutter_tools/src/base/context.dart:149:12)       <asynchronous suspension>       #19     CommandRunner.runCommand (package:args/command_runner.dart:197:13)       <asynchronous suspension>       #20     FlutterCommandRunner.runCommand.<anonymous closure>       (package:flutter_tools/src/runner/flutter_command_runner.dart:278:9)       <asynchronous suspension>       #21     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)       <asynchronous suspension>       #22     AppContext.run (package:flutter_tools/src/base/context.dart:149:12)       <asynchronous suspension>       #23     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:234:5)       <asynchronous suspension>       #24     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:64:9)       <asynchronous suspension>       #25     run.<anonymous closure> (package:flutter_tools/runner.dart:62:12)       <asynchronous suspension>       #26     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)       <asynchronous suspension>       #27     AppContext.run (package:flutter_tools/src/base/context.dart:149:12)       <asynchronous suspension>       #28     runInContext (package:flutter_tools/src/context_runner.dart:73:10)       <asynchronous suspension>       #29     main (package:flutter_tizen/executable.dart:79:3)       <asynchronous suspension>

Thank you for reporting!
I'll provide a fix for the error soon, but could you confirm that the file sdk.version exists in the C:\tizen-studio directory (or somewhere else if you installed Tizen Studio to a non-default location) and the file contains the TIZEN_SDK_VERSION key? If the file doesn't exist, could you try updating Tizen Studio by clicking the "Updates available" button in Package Manager and see if the file is generated after that?


Allows populate auth.getUserIdentity() by changing AuthHelper

IMPORTANT: Please do not create a Pull Request without creating an issue first.
If you have relations on your user-permissions or media files, you need to populate. Here is an example of query url:
https://localhost:1337/api/users/me?populate=*
I propose some changes to the AuthHelper function to allow this behaviour.
Self Check before Merge
Please check all items below before review.

[X] Corresponding issues are created/updated or not needed
[X] Docs are updated/provided or not needed
[x] Examples are updated/provided or not needed
[x] TypeScript definitions are updated/provided or not needed
[x] Tests are updated/provided or not needed
[x] Changesets are provided or not needed

Hey @albcunha ,
Thank you for your contribution! We will release it soon! 💥


Turning on multi-page mode should change zoom to fit two pages

changing back to single-page mode should again restore zoom to fit one page


fix: display account wallet partially while loading

Instead of fully hiding the Account page when loading the balances, this will only place the spinner in place of the balances, so the navigation and other information (even in ultra light mode) remains visible and functional.

🐝 PR preview in Swarm
Preview URL: https://bah5acgzavn5gs7tdaqipwyipfe3hk2boz5zgaiantslhxcd6wixsbtmcjpfq.bzz.link
Swarm Hash: ab7a697e630410fb610f293675682ecf7260200d9c967b887eb22f20cd824bcb
Commit Hash: 96fec509d46e949405a50aa1e362b187d50f609c
Commit Message: fix: display account wallet partially while loading


Feature/behat tests

This adds a new set of behat tests to the project. The old tests
are unstable and will be removed. We will start adding more and more
tests to the new directory to cover all phpdocumentor features from now.

Think we are all set now.


Capture multiple lemma options

Prior to this change, VS code would not recognize lemmata with multiple keywords, e.g., lemma Lemma[reuse,use_induction]:.
I deliberately went for a simpler regex that also might capture bad syntax, e.g., lemma Lemma[,], in favor of repitition.

For reference, this is how some of my lemmas currently get highlighted:

Thanks for the fix and sorry for the delayed reply, today I noticed I was not watching my own repo. Regarding the change, I just implemented it more properly on the main branch, as I had planned it for some time. Feel free to check it out


Some ideas on HttpRequest node

Adding options to inspector & suggesting some extra fields

Some abstract ideas

More Signals:
on_error
while_requesting

I have an abstracted version of httpRequest and httpClient if u need it lol

Not sure why this was closed, but CC @Faless @mhilbrunner in case there are useful ideas to implement.

@akien-mga closed it as there was no reaction for long except one dude trolling

@Timberland-7 will have a look. I'll reopen for now if you don't mind :)

This should likely be reopened as a detailed proposal on https://github.com/godotengine/godot-proposals so that it's more actionable and stays on the Networking team's radar.


S3ClientWrapper getObjects: Not all objects could be received

Describe the bug
https://github.com/corona-warn-app/cwa-server/blob/a953c054f8b4dc97d6a40525c5c3d5aa4d867394/services/distribution/src/main/java/app/coronawarn/server/services/distribution/objectstore/client/S3ClientWrapper.java#L83
It is possible that not all objects are received, because the listObjectsV2(ListObjectsV2Request listObjectsV2Request) method  limits them up to 1000.
Javadoc listObjectsV2

Returns some or all (up to 1,000) of the objects in a bucket.

Possible Fix

Checking the response for more data with the isTruncated method.
JavaDoc isTruncated

Set to false if all of the results were returned. Set to true if more keys are available to return. If the number of results exceeds that specified by MaxKeys, all of the results might not be returned.

When the response is truncated, calling the nextContinuationToken method for the next token.
JavaDoc nextContinuationToken

NextContinuationToken is sent when isTruncated is true, which means there are more keys in the bucket that can be listed. The next list requests to Amazon S3 can be continued with this NextContinuationToken.

Build a new ListObjectsV2Request with the continuationToken and call listObjectsV2 again
JavaDoc continuationToken

ContinuationToken indicates Amazon S3 that the list is being continued on this bucket with a token. ContinuationToken is obfuscated and is not a real key.

Repeat everything until isTruncate is false.

Here is a pretty good example from AWS. They use a different S3Client, but it is very similar to the one you use. (source)
import com.amazonaws.AmazonServiceException;
import com.amazonaws.SdkClientException;
import com.amazonaws.auth.profile.ProfileCredentialsProvider;
import com.amazonaws.regions.Regions;
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.AmazonS3ClientBuilder;
import com.amazonaws.services.s3.model.ListObjectsV2Request;
import com.amazonaws.services.s3.model.ListObjectsV2Result;
import com.amazonaws.services.s3.model.S3ObjectSummary;

import java.io.IOException;

public class ListKeys {

    public static void main(String[] args) throws IOException {
        Regions clientRegion = Regions.DEFAULT_REGION;
        String bucketName = "*** Bucket name ***";

        try {
            AmazonS3 s3Client = AmazonS3ClientBuilder.standard()
                    .withCredentials(new ProfileCredentialsProvider())
                    .withRegion(clientRegion)
                    .build();

            System.out.println("Listing objects");

            // maxKeys is set to 2 to demonstrate the use of
            // ListObjectsV2Result.getNextContinuationToken()
            ListObjectsV2Request req = new ListObjectsV2Request().withBucketName(bucketName).withMaxKeys(2);
            ListObjectsV2Result result;

            do {
                result = s3Client.listObjectsV2(req);

                for (S3ObjectSummary objectSummary : result.getObjectSummaries()) {
                    System.out.printf(" - %s (size: %d)\n", objectSummary.getKey(), objectSummary.getSize());
                }
                // If there are more than maxKeys keys in the bucket, get a continuation token
                // and list the next objects.
                String token = result.getNextContinuationToken();
                System.out.println("Next Continuation Token: " + token);
                req.setContinuationToken(token);
            } while (result.isTruncated());
        } catch (AmazonServiceException e) {
            // The call was transmitted successfully, but Amazon S3 couldn't process
            // it, so it returned an error response.
            e.printStackTrace();
        } catch (SdkClientException e) {
            // Amazon S3 couldn't be contacted for a response, or the client
            // couldn't parse the response from Amazon S3.
            e.printStackTrace();
        }
    }
}
``

Thanks for the good find @thwefl.
The good news is that considering the current design, we can confidently expect the number of returned elements to be way below 500.
But nontheless, you are right in that it would not hurt to make this a little more robust.
I suggest to use supply S3Request.Builder.maxKeys with a satisfyingly large value such as 5000 and log a warning/error if ListObjectsV2Response.isTruncated returns true.
Best,
Michael

Hej Michael,
thanks for the quick response. Your proposed changes sounds good.
I know it's  small issue, but when it occurs, it is hard to find.
Best,
thwefl


[WFRP4e Core] No Actors on Install

Not sure if this is 'as designed'.  I created a new world with just the system, then added the core content module.  I notices no actors where installed.From: Steven Evans#8842foundry: 9.269wfrp4e: 5.4.1wfrp4e-core: 2.4.4

The bestiary is not imported by default


Port 9093 error during startup

In the process of starting the mapd server, the error that the port 9093 cannot be opened is reported, but the SQL statement can be executed normally..it is confusing
[root@cdsw3 build]# ./bin/mapd_server
Thrift: Mon Oct  8 20:15:01 2018 TSocket::open() connect() <Host: localhost Port: 9093>Connection refused
Thrift: Mon Oct  8 20:15:01 2018 TSocket::open() connect() <Host: localhost Port: 9093>Connection refused
Thrift: Mon Oct  8 20:15:01 2018 TSocket::open() connect() <Host: localhost Port: 9093>Connection refused
Thrift: Mon Oct  8 20:15:01 2018 TSocket::open() connect() <Host: localhost Port: 9093>Connection refused

@Jiede1 thanks for noticing this. We're aware of it and we're working on a fix to error handling so that it's less confusing.

@Jiede1 thanks for noticing this. We're aware of it and we're working on a fix to error handling so that it's less confusing.

Hi, may i konw is this error fixed?

@AilsaGUAN
This isn't an error, but a warning at start up that can be ignored. However, because it is confusing, we will be working on a fix.


[deprecations] Create a DocumentManagerInterface to prevent deprecations on @interal

Bug Report

Q
A

BC Break
yes*

Version
2.0.2

but only for automated testing without deprecations, which breaks our CI.

Summary
Since updating to Symfony 4.4 I have this deprecation message in the automated tests:
The "Doctrine\ODM\MongoDB\DocumentManager::getClassMetadata()" method is considered internal Performance-sensitive method. It may change without further notice. You should not extend it from "Mockery_11_Doctrine_ODM_MongoDB_DocumentManager".
This is due to DocumentManager.php line 280:
"@internal Performance-sensitive method."
How to reproduce
basic Symfony 4.4 project with a controller and a test like this: (Note could have been any service, not necessarily a controller)
class SomeController {
  public function test(DocumentManager $dm) {
    $dm->flush();
  }
}

class SomeControllerTest {
  public function test() {
    $om = \Mockery::mock(DocumentManager::class);
    (new SomeController)->test($om);
  }
}

Expected behavior
No deprecations:
Suggested solution
Easily fixed by creating an DocumentManagerInterface, just like the EntityManagerInterface. This way we can write automated tests using the interface and have no problems with internal annotations like this. This solves other issues too.
I know there is a interface ObjectManager that could be used for this case, but in my specific use-case, I'm using both the ODM and the ORM in the same Symfony application, and due to the nature of Dependency Injection it's not logical to use the ObjectManager, which is ambiguous in this case.

I don't think a method should be marked as "internal" because it's performance sensitive, especially when it uses a cache. I suggest removing the @internal designation instead. @malarzm @jmikola would you agree?

Yes, TBH I'm surprised it's still there :D IIRC long time ago @internal some comment was meant for PHPDoc to exclude part of the comment from docs and I suppose it's just a remainder of that times.

#2123 removes the designations. We will still add an interface for the document manager, similar to EntityManagerInterface in ORM.


Omitting function return type and --noImplicitAny

Would it break lots of programs to have the following be an error when compiling with --noImplicitAny?
function f () {
   return "hello"
}

Well, yes. How is this implicit any?

Maybe this is something for a linter.
I think https://github.com/palantir/tslint typedef rule can do what you want.
Doesn't really give an answer to this question but it might be a alternative :)

@NoelAbrahams Maybe my intuition is wrong, but doesn't this only compile because it desugars to:
function f (): any {
   return "hello"
}

The return type of a function is implied by the values it returns. So in this case it's string. It's not clear what errors would be caught by forcing annotation of the return value.

@NoelAbrahams Ok, I see. Thanks. You can close this then.


added documentation for passing arguments to event handlers

hi, addressing issue #75 !

sorry bout that. package-lock never used to matter when i was just working on my little repos. removed and recommitted.

Pushed and awaiting your review. sorry for the original problematic line (i'm still not super comfortable when it comes to questions of context)

Tweaked in db1262d06f7ec5081886c8257afe0e6c239dd16c.
"Param" is not explained, and people might confuse it with some React term. "Parameter" is more explicit.
Also added reference links.
Finally, these two lines weren't equivalent, and people would likely ask how to get access to the event. So I made them consistent.
Thanks for working on this change!

Nice changes Dan. Thanks for adding to the section.


High producer latency

I've written a few test clients in my RdKafka-Test repo and have consistently found that the process of publishing messages seems to be quite slow. The following timer output was taken after running the ProducerTest console for a few minutes and shows an average of 122ms and blips up to 422ms.
***** Timers - 2016-02-08T05:02:48.9323Z *****
    [ProducerTest] Published
   Active Sessions = 0
             Count = 107600 Events
        Mean Value = 99.95 Events/s
     1 Minute Rate = 100.00 Events/s
     5 Minute Rate = 99.53 Events/s
    15 Minute Rate = 93.98 Events/s
             Count = 107600 Events
              Last = 136.00 ms
               Min = 3.00 ms
               Max = 422.00 ms
              Mean = 122.57 ms
            StdDev = 63.28 ms
            Median = 135.00 ms
              75% <= 137.00 ms
              95% <= 236.00 ms
              98% <= 305.00 ms
              99% <= 337.00 ms
            99.9% <= 422.00 ms

This is running on my ~1yo fully specced MacBook Pro 15 with Kafka in a Vagrant machine on the host from Windows in a VMWare machine. I tried running up boxes in AWS and had similar results. There is no memory or CPU utilisation pressure in both Windows and Linux.
Any ideas...?
EDIT - I had some dodgy code in there dealing with tasks... after removing it things got a little bit better.

Hey, those tests are fantastic, I love them!
With slow, you mean latency is high? I believe this is caused by the default config of librdkafka being very much geared towards throughput over latency. See https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md for the knobs you can turn.
Using this config:
var topicConfig = new TopicConfig();
topicConfig["request.required.acks"] = "0";
var config = new Config();
config.DefaultTopicConfig = topicConfig;
config["socket.blocking.max.ms"] = "1";
config["queue.buffering.max.ms"] = "1";
using (var publisher = new Producer(config, brokers))

and
log.flush.interval.messages=10
log.flush.interval.ms=1

on the broker i get these numbers:
***** Timers - 2016-02-08T04:49:21.7331Z *****

    [ProducerTest] Published
   Active Sessions = 0
             Count = 28400 Events
        Mean Value = 99.77 Events/s
     1 Minute Rate = 100.36 Events/s
     5 Minute Rate = 92.27 Events/s
    15 Minute Rate = 85.37 Events/s
             Count = 28400 Events
              Last = 12.00 ms
               Min = 0.00 ms
               Max = 16.00 ms
              Mean = 2.70 ms
            StdDev = 1.89 ms
            Median = 2.00 ms
              75% <= 3.00 ms
              95% <= 5.00 ms
              98% <= 10.00 ms
              99% <= 12.00 ms
            99.9% <= 16.00 ms

on a slightly older MBP, with Kafka running on osx and ProducerTest in a Windows VM on VMWare.

@ah- thanks for the response!
I changed the producer settings and that's definitely made a significant improvement...
***** Timers - 2016-02-08T05:30:19.1634Z *****

    [ProducerTest] Published
   Active Sessions = 0
             Count = 1900 Events
        Mean Value = 94.62 Events/s
     1 Minute Rate = 84.42 Events/s
     5 Minute Rate = 80.98 Events/s
    15 Minute Rate = 80.33 Events/s
             Count = 1900 Events
              Last = 35.00 ms
               Min = 2.00 ms
               Max = 53.00 ms
              Mean = 31.13 ms
            StdDev = 15.04 ms
            Median = 35.00 ms
              75% <= 36.00 ms
              95% <= 53.00 ms
              98% <= 53.00 ms
              99% <= 53.00 ms
            99.9% <= 53.00 ms

It came down a little after changing the server settings, but not to the same extent as yours -
***** Timers - 2016-02-08T05:35:19.4932Z *****

    [ProducerTest] Published
   Active Sessions = 0
             Count = 4400 Events
        Mean Value = 97.64 Events/s
     1 Minute Rate = 89.73 Events/s
     5 Minute Rate = 82.50 Events/s
    15 Minute Rate = 80.87 Events/s
             Count = 4400 Events
              Last = 34.00 ms
               Min = 2.00 ms
               Max = 110.00 ms
              Mean = 27.68 ms
            StdDev = 23.15 ms
            Median = 34.00 ms
              75% <= 36.00 ms
              95% <= 53.00 ms
              98% <= 109.00 ms
              99% <= 109.00 ms
            99.9% <= 110.00 ms

I'll give this a run on some servers over the next couple days and see how it goes. Thanks again!

Cool, let me know if you find anything interesting!


English support

Add support for time defined in english.
Need more examples of time definition cases in english.

Added in #20


Error when using union types array|null on public property

Bug report

PHP version: 8.0.3
PHP CS Fixer version: 3.0.0-rc.1

        [PhpCsFixer\Linter\LintingException]
        Parse error: syntax error, unexpected token "public" on line 19.

      Applied fixers: visibility_required

Code snippet that reproduces the problem
<?php

declare(strict_types=1);

namespace Laravolt\Camunda\Dto;

use Spatie\DataTransferObject\Attributes\Strict;
use Spatie\DataTransferObject\DataTransferObject;

#[Strict]
class ProcessInstance extends DataTransferObject
{
    public string $id;

    public string|null $tenantId;

    public string|null $businessKey;

    public array|null $links;

    public string $definitionId;

    public ?string $caseInstanceId;

    public bool $ended;

    public bool $suspended;
}

There is no issue if I wrote like this:
public ?array $links;

//or
public null|array $links;

Hi @uyab, thanks for the report.
I'ts actually not a problem in visibility_required, but in one of internal transformers, see the fix in: https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/5660 (it's adding test for visibility_required for regression)- would be great if you could drop a review there.

it also happens for other visibility. e.g.
private array|null $openingHours = null;
becomes
private array | public null $openingHours = null;


Crashing after injecting

I downloaded the source and built it, but it crashes when I inject

update offsets

I downloaded the source and built it, but it crashes when I inject

Update the offsets


Links to task scripts for IoT DevKit are invalid

On the manual installation page @ https://microsoft.github.io/azure-iot-developer-kit/docs/installation/ there are links to obtain task scripts for IoT DevKit.
These links are currently invalid:

https://aka.ms/devkit/prod/installpackage/tasks/latest
https://aka.ms/devkit/prod/installpackage/mac/latest

These tasks are required for certain MXChip labs, specifically the Air Traffic Control Simulator: https://microsoft.github.io/azure-iot-developer-kit/docs/projects/air-traffic-control-simulator/
FWIW,
I was able to workaround with an older link to the tasks @ https://azureboard2.azureedge.net/prod/windows/devkit_install_win_<IP_ADDRESS>.zip
https://azureboard2.azureedge.net/prod/mac/devkit_install_mac_<IP_ADDRESS>.zip
This required that I stub telemetry.trace in telemetry.js as it pointed to a 404'd server and fix task-device.js to use the proper az cli syntax for iot interactions.  Any ideas where these tasks are maintained?

Hi @toolboc, I have fixed the link and updated to the latest version. This page is deprecated and I suggest you can use Board Manager in Arduino extension to install it now.


Connect BigQuery with region location with datasphere

Issue description

Hello Guys,
I had a issue in a customer environment using big query for replication flow.
In a documentation , we assume that location is optional. (Image 1)

This customer had a big query in region location.
when we tried to connect in replication flow, the dataset is not loaded. (Image 2)

If I fill the location (in my case us-east1), the dataset from Big query load normally. (Image 3)

If its possible, we need to add this in the help documentation :
"When Google Bigquery dataset was create using region mode it’s necessary fill the location."
Cheers
Alebas
Feedback Type (Optional)
None
Page Title on SAP Help Portal (prefilled)
Prepare Connectivity to Google BigQuery
Page URL on SAP Help Portal (prefilled)
https://help.sap.com/docs/SAP_DATASPHERE/9f804b8efa8043539289f42f372c4862/529cef1eee6a45a69ae4e51951718900.html?version=cloud

Dear Alebas,
thanks a lot for your feedback. I'll follow up on updating the documentation to improve the misleading part and let you know once done.
Best Regards,
Cornelia from the SAP Datasphere User Assistance team

https://people.sap.com/ale.ribeiro
From: sap-doc-bot[bot] @.>
Date: Tuesday, 12 December 2023 at 04:38
To: SAP-docs/sap-datasphere @.>
Cc: Ribeiro, Alexandre @.>, Mention @.>
Subject: Re: [SAP-docs/sap-datasphere] Connect BigQuery with region location with datasphere (Issue #25)
You don't often get email from @.*** Learn why this is importanthttps://aka.ms/LearnAboutSenderIdentification
Thank you for your valuable feedback contribution, @Alebas-Ribeirohttps://github.com/Alebas-Ribeiro! So that we can recognize your contribution in SAP Communityhttps://github.com/SAP-docs/contribution-guidelines/blob/main/docs/recognition.md, please tell us your SAP Community profile URL in a reply to this comment; don't include any other text, just the URL on its own, like this:
https://people.sap.com/your-user-name
Thanks!
—
Reply to this email directly, view it on GitHubhttps://github.com/SAP-docs/sap-datasphere/issues/25#issuecomment-1851449725, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BETRAS33VORATOQXDPL3POLYJACVZAVCNFSM6AAAAABAQKHVCSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJRGQ2DSNZSGU.
You are receiving this because you were mentioned.Message ID: @.***>

Hi Alebas,
with 2024.02, the documentation for the Google BigQuery property "Location" will change to the following to make clear that datasets from any other than the default location are only available if the location is added in the connection configuration:
"[optional] Enter an additional location. By default, SAP Datasphere connects to BigQuery datasets only from Google's default location - US. Datasets from any other location will only be available in the Data Builder if you enter the additional location here.
A location can be a region, for example us-west1or asia-east1, or a multi-region, for example EU.
Note: If you provide an invalid location, the connection validation still passes, but failures will happen when you're using the connection in the Data Builder."
Thanks a lot for contributing to this documentation improvement.
Best Regards,
Cornelia from the SAP Datasphere User Assistance team

I'm closing this issue since the correction is available in the 2024.02 version of the documentation.


problem at line 185 of deb-get script

Hi,
the cited line is:
if ! "${ELEVATE}" wget -q --no-use-server-timestamps "${1}" -O "${CACHE_FILE}"; then

and I think that it should be:
if ! ${ELEVATE} wget -q --no-use-server-timestamps "${1}" -O "${CACHE_FILE}"; then

otherwise when ${ELEVATE} is empty the test be always true.

hmmm ... good spot
if ! "$ELEVATE" echo oops ; then echo fail;else echo not fail;fi
Command '' not found, but can be installed with:
sudo apt install mailutils-mh  # version 1:3.15-2, or
sudo apt install mmh           # version 0.4-4
sudo apt install nmh           # version 1.7.1-12
sudo apt install termtris      # version 1.3-1ubuntu1
fail # <--
$ if ! "$ELEVATE echo oops" ; then echo fail;else echo not fail;fi
 echo oops: command not found
fail # <--
 $ if ! $ELEVATE echo oops ; then echo fail;else echo not fail;fi
oops
not fail  # <--

subtle because it only gets set to "" if we call elevate_privs as root already and otherwise it is set to sudo or doas or we bail.


Graylog logs are not in order

probably nothing we can do about it, happens sometimes when they are within the same millisecond, see https://github.com/Graylog2/graylog2-server/issues/2741


CVaR optimization

I added a methodology to do conditional value at risk optimization from this paper. Feel free to use it, or to give some suggestions.

@nknudde Thanks for the contribution! CVaR has been bothering me a for a while, so it's great to see a cvxpy implementation.
Some thoughts:

As with the recent EfficientSemivariance PR, I'm thinking that it would make sense for EfficientCVar to inherit from EfficientFrontier. This saves on duplication and logically makes sense. A full explanation behind this architecture decision is here.
I'm not sure what's going on with the frequency parameter. It doesn't seem to be connected to anything?

Regarding the first point, you don't have to do anything – it'll be easier if I merge your changes into a dev branch, change the architecture, then PR into master.
Best,
Robert

@nknudde Thanks for the contribution! CVaR has been bothering me a for a while, so it's great to see a cvxpy implementation.
Some thoughts:

As with the recent EfficientSemivariance PR, I'm thinking that it would make sense for EfficientCVar to inherit from EfficientFrontier. This saves on duplication and logically makes sense. A full explanation behind this architecture decision is here.
I'm not sure what's going on with the frequency parameter. It doesn't seem to be connected to anything?

Regarding the first point, you don't have to do anything – it'll be easier if I merge your changes into a dev branch, change the architecture, then PR into master.
Best,
Robert

@nknudde Thanks for the quick turnaround re shorting!
I still need to think a bit more about whether this is processing return frequencies correctly.
For example, if a user passes in daily returns vs weekly returns vs monthly returns, does the current code still make sense?

Hi @robertmartin8, right now it does not take frequency into account. I did not have time to look yet at how to rescale it properly, but I'll try to asap.

Ok, great!
For consistency with EfficientSemivariance, we should probably move EfficientCVar into the efficient_frontier.py file, so that (if they so choose), users can from pypfopt.efficient_frontier import EfficientFrontier, EfficientCvar.
I realise this results in a large efficient_frontier.py file, which I guess is not ideal. The alternative is to create an efficient_frontier folder, then put efficient_x.py files in there, and do some clever  __init__.py stuff. But I don't want to over-engineer it, so for now let's just put everything in the same big file.

@nknudde
Just to let you know, I noticed a bug in the implementation:
        self._objective = self._alpha + 1.0 / len(self.tickers) / (
            1 - self._beta
        ) * cp.sum(self._u)

I believe the denominator is meant to contain len(self.historic_returns) instead of len(self.tickers). From the paper, we have:

q indexes over history, while each y_k is a vector of length N (where N is the number of assets).
I have merged your code into a dev branch, where I'm fixing this (and figuring out the frequency stuff).

Good news, however. frequency shenanigans aren't necessary. CVaR minimises (and calculates):  daily CVaR if daily returns are provided, weekly CVaR if weekly returns are provided, monthly CVaR if monthly returns are provided, etc.
For example, in the test cases (daily), a 95%-CVaR of 0.017 means that the average daily return of all returns below the 5th percentile is -1.7%.
I just need to touch up the code/tests and write docs, and we should be good to go!

Thanks! Sorry I did not really have time to look at it yet. About the frequency business, it is true the resulting value matches the frequency of the dataset, was just wondering if there would be any way to e.g. if daily returns are given to be able to calculate monthly CVaR. Maybe I'm taking it a bit too far though.
If there is anything I can help with, please let me know.

@nknudde I am quite content with the functionality as is.
One small thing I've noticed is that the historic_returns doesn't actually have to be historic returns. Users can generate their own sample returns (e.g using copulas) and provide it to EfficientCVaR to get a forward-looking estimate.
This applies to EfficientSemivariance too I believe (@phschiele). So I will probably refactor historic_returns -> returns (this would be consistent with e.g HRPOpt), though I will probably have to use a hack to make sure EfficientSemivariance is backwards-compatible.

Yup totally true, I was actually using this in combination with copulas!


client.publish() making the arduino unresponsive

Hi i got two client.publish lines that makes my arduino unresponsive and i need to restart it. i asked around on the arduino forum and no body seemed to know why they recomanded me to ask here. So anyway this two client.publish lines when i remove them the program works and it publish data and receives on my arduino but when i use them my arduino stops receiving data and sending for some reasone.
This is the two lines of client.publish().
client.publish("openhab/command","hi");
client.publish("openhab/command","bye");

And this is the rest of my code
#include <SPI.h>
#include <DHT.h>
#include <Ethernet.h>
#include <PubSubClient.h>
#include <RemoteReceiver.h>
#include <RemoteTransmitter.h>

// DHT11 temperature and humidty sensor
#define DHTPIN 3
#define DHTTYPE DHT11 //21 or 22 also an option
DHT dht(DHTPIN, DHTTYPE);
unsigned long readTime;
unsigned long time;

// Analog 0 is the input pin
int lightPinIn = 0;

// Receiver/Transmitter pin
ActionTransmitter actionTransmitter(9);

// relays
#define RELAY1  5
#define RELAY2  6
#define RELAY3  7
#define RELAY4  8

// Update these with values suitable for your network.
byte mac[]    = {  0xDE, 0xED, 0xBA, 0xFE, 0xFE, 0xED };
IPAddress ip(192, 168, 0, 200);
IPAddress server(192, 168, 0, 110);
//char message_buff[100]; // this buffers our incoming messages so we can do something on certain commands
char command_buff[100]; // this buffers our incoming messages so we can do something on certain commands

EthernetClient ethClient;
PubSubClient client(ethClient);

void callback(char* topic, byte* payload, unsigned int length) {
  Serial.print("Message arrived [");
  Serial.print(topic);
  Serial.print("] ");
  int i=0;
  for (i=0;i<length;i++) {
    Serial.print((char)payload[i]);
    command_buff[i] = payload[i];
  }

  if (strcmp(topic,"openhab/command") == 0) {
    if (payload[0] == 'A') {
      digitalWrite(RELAY1, LOW);
    }
    else if (payload[0] == 'B') {
      digitalWrite(RELAY1, HIGH);
    }
    else if (payload[0] == 'C') {
      digitalWrite(RELAY2, HIGH);
    }
    else if (payload[0] == 'D') {
      digitalWrite(RELAY2, LOW);
    }
    else if (payload[0] == 'E') {
      digitalWrite(RELAY3, HIGH);
    }
    else if (payload[0] == 'F') {
      digitalWrite(RELAY3, LOW);
    }
    else if (payload[0] == 'G') {
      digitalWrite(RELAY4, HIGH);
    }
    else if (payload[0] == 'H') {
      digitalWrite(RELAY4, LOW);
    }
    else if (payload[0] == 'I') {
      actionTransmitter.sendSignal(1, 'A', false);
    }
    else if (payload[0] == 'J') {
      actionTransmitter.sendSignal(1, 'A', true);
    }
    else if (payload[0] == 'K') {
      actionTransmitter.sendSignal(1, 'B', false);
    }
    else if (payload[0] == 'L') {
      actionTransmitter.sendSignal(1, 'B', true);
    }
    else if (payload[0] == 'M') {
      actionTransmitter.sendSignal(1, 'C', false);
    }
    else if (payload[0] == 'N') {
      actionTransmitter.sendSignal(1, 'C', true);
    }
    else if (payload[0] == 'O') {
       actionTransmitter.sendSignal(1, 'C', false);
       delay(20000);
       actionTransmitter.sendSignal(1, 'C', true);
  }
  }
  // Free the memory
  //free(command_buff);
}

void reconnect() {
  // Loop until we're reconnected
  while (!client.connected()) {
    Serial.print("Attempting MQTT connection...");
    // Attempt to connect
    if (client.connect("arduinoClient")) {
      Serial.println("connected");
      // Once connected, publish an announcement...
      client.publish("openhab","himitsu sensor, reporting in");
      // ... and resubscribe
      client.subscribe("openhab/command");
    } else {
      Serial.print("failed, rc=");
      Serial.print(client.state());
      Serial.println(" try again in 5 seconds");
      // Wait 5 seconds before retrying
      delay(5000);
    }
  }
}

void setup()
{
  Serial.begin(9600);

  client.setServer(server, 1883);
  client.setCallback(callback);

  Ethernet.begin(mac, ip);

  dht.begin();
  // Allow the hardware to sort itself out
  delay(1500);
  Serial.println(Ethernet.localIP());
  readTime = 0;

  // Relay board pins
  pinMode(RELAY1, OUTPUT);
  pinMode(RELAY2, OUTPUT);
  pinMode(RELAY3, OUTPUT);
  pinMode(RELAY4, OUTPUT);

  //Relay default off
  digitalWrite(5, HIGH);
  digitalWrite(6, HIGH);
  digitalWrite(7, HIGH);
  digitalWrite(8, HIGH);

  RemoteReceiver::init(0, 3, showCode);
}

void loop()
{

  if (!client.connected()) {
    reconnect();
  }

  client.loop();

  //check if 6 seconds has elapsed since the last time we read the sensors.
  if(millis() > readTime+6000){
    sensorRead();
  }

  // publish light reading every 5 seconds
  if(millis() > (time + 5000)) {
    sensorReadlight();
  }

}

void sensorReadlight()
{
  time = millis();

  // read from light sensor (photocell)
  //int lightRead = analogRead(lightPinIn);
  int lightRead = analogRead(lightPinIn);
  char message_buff[10];
  itoa(lightRead, message_buff, 10);
  //String pubString = String(lightRead);
  //pubString.toCharArray(message_buff, pubString.length()+1);
  //Serial.println(message_buff);
  client.publish("openhab/lightsensor", message_buff);
  }

void sensorRead(){
  readTime = millis();
 // Reading temperature or humidity takes about 250 milliseconds!
  // Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
  float h = dht.readHumidity();
  // Read temperature as Celsius (the default)
  float t = dht.readTemperature();
  // Read temperature as Fahrenheit (isFahrenheit = true)
  float f = dht.readTemperature(true);

  // Check if any reads failed and exit early (to try again).
  if (isnan(h) || isnan(t) || isnan(f)) {
    Serial.println("Failed to read from DHT sensor!");
    return;
  }

  // Compute heat index in Fahrenheit (the default)
  float hif = dht.computeHeatIndex(f, h);
  // Compute heat index in Celsius (isFahreheit = false)
  float hic = dht.computeHeatIndex(t, h, false);

  char buffer[10];
  //dtostrf(t,0, 0, buffer);
  itoa(t, buffer, 10);
  client.publish("openhab/temperature",buffer);
  //Serial.println(buffer);
  //dtostrf(h,0, 0, buffer);
  itoa(h, buffer, 10);
  client.publish("openhab/humidity",buffer);

}

void showCode(unsigned long receivedCode, unsigned int period) {
  // Note: interrupts are disabled. You can re-enable them if needed.

  // Print the received code.
  Serial.print("Code: ");
  Serial.print(receivedCode);
  Serial.print(", period duration: ");
  Serial.print(period);
  Serial.println("us.");

  // Switch 1 on
  if (receivedCode == 353805)
  {
    client.publish("openhab/command","hi");

  }
  // Switch 1 Off
  if (receivedCode == 353801)

  {
    client.publish("openhab/command","bye");

  }
}

The one thing I see in your code is:
In the last line of setup(), you call showCode().  Then, showCode() calls client.publish().  However, at this point, [client] was never connected.
The first time you call client.connect() is in the loop(), when you call reconnect().
My suggestion is to call client.connect() in the setup():
void setup()
{
  Serial.begin(9600);

  client.setServer(server, 1883);
  client.setCallback(callback);
  client.connect("arduinoClient");
  ...

try client.publish("openhab/command","hi", true);
or client.publish("openhab/command","hi", false);

Nice security issue: (array out of bounds)
char command_buff[100]; // this buffers our incoming messages so we can do something on certain commands

void callback(char* topic, byte* payload, unsigned int length) {
  int i=0;
  for (i=0;i<length;i++) {
    Serial.print((char)payload[i]);
    command_buff[i] = payload[i];
  }


[#151022906] Send generic JSON payloads from web endpoint to a queue owned by Data team

What's this PR do?

Implements web endpoint /api/v1/events/quasar-relay
Saves all JSON payloads received by the endpoint to quasar-customer-io-email-activity queue (a subject to change changed as described in #99)

How should this be manually tested?

yarn install
docker-compose up
yarn all-tests
yarn web
Send freeform JSON to /api/v1/events/quasar-relay
Make sure you can see the payload in http://localhost:15672/#/queues/blink/customer-io-update-customer -> Get Messages

Any background context you want to provide?
For now, quasar-customer-io-email-activity queue is used for a generic integration with Data consumer. It will be renamed to data-prime queue or quasar-data-prime soon, see #99.
What are the relevant tickets?
Pivotal #151022906
A part of #127

Looks like we're publishing 2 times at different places to the same queue:

POST /api/v1/webhooks/customerio-email-activity should publish message to customer-io queue
POST /api/v1/events/quasar-relay should save message as is to quasar queue

Because of this race condition tests fail from time to time.


[WIP]add task queue manager

:x: Build AElf <IP_ADDRESS>7 failed (commit https://github.com/AElfProject/AElf/commit/606a60ff16 by @zhxymh)

:x: Build AElf <IP_ADDRESS>1 failed (commit https://github.com/AElfProject/AElf/commit/98dd593e97 by @zhxymh)


templates and command line interface

From the README:
flaskswagger Command
This package now comes with a very simple command line interface: flaskswagger. This command can be used to build and update swagger specs for your flask apps from the command line or at build time.
flaskswagger -h
usage: flaskswagger [-h] [--template TEMPLATE] [--out-dir OUT_DIR] app

positional arguments:
  app                  the flask app to swaggerify

optional arguments:
  -h, --help           show this help message and exit
  --template TEMPLATE  template spec to start with
  --out-dir OUT_DIR    the directory to output to

For example, this can be used to build a swagger spec which can be served from your static directory. In the example below, we use the manually created swagger.json.manual as a template, and output to the static/ directory.
flaskswagger server:app --template static/swagger.json.manual --out-dir static/

Nice!! Going to try this out over the weekend and get back to you

Could you have forgotten to push a file?
(env)nitro:flask-swagger atli$ flaskswagger -h
Traceback (most recent call last):
  File "/Users/atli/work/external/flask-swagger/env/bin/flaskswagger", line 9, in <module>
    load_entry_point('flask-swagger==0.2.11', 'console_scripts', 'flaskswagger')()
  File "/Users/atli/work/external/flask-swagger/env/lib/python2.7/site-packages/pkg_resources/__init__.py", line 552, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/Users/atli/work/external/flask-swagger/env/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2672, in load_entry_point
    return ep.load()
  File "/Users/atli/work/external/flask-swagger/env/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2345, in load
    return self.resolve()
  File "/Users/atli/work/external/flask-swagger/env/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2351, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
ImportError: No module named build_swagger_spec

I did completely forget a file, thank you. :+1:
Your alternate template merging suggestion looks good. This is my first time working with defaultdict and I wasn't sure how best to cope.

@isysd how would you run this for the example app in /examples? I've been trying the following with no luck
flaskswagger example:app
Traceback (most recent call last):
  File "/Users/atli/work/flask-swagger/env/bin/flaskswagger", line 9, in <module>
    load_entry_point('flask-swagger==0.2.11', 'console_scripts', 'flaskswagger')()
  File "/Users/atli/work/flask-swagger/env/lib/python2.7/site-packages/pkg_resources/__init__.py", line 552, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/Users/atli/work/flask-swagger/env/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2672, in load_entry_point
    return ep.load()
  File "/Users/atli/work/flask-swagger/env/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2345, in load
    return self.resolve()
  File "/Users/atli/work/flask-swagger/env/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2351, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "build/bdist.macosx-10.10-x86_64/egg/build_swagger_spec.py", line 27, in <module>
  File "build/bdist.macosx-10.10-x86_64/egg/build_swagger_spec.py", line 14, in run
  File "/Users/atli/work/flask-swagger/env/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2345, in load
    return self.resolve()
  File "/Users/atli/work/flask-swagger/env/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2351, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
ImportError: No module named example

The script is using the Python namespace to resolve the 'app' argument. I would think that simply adding an __init__.py file to ./examples would do it, but it doesn't. I do know it works with installed packages. I.e. if you add ./examples to setup.py, then install, then run flaskswagger again, it should work.


Loading plugin failed

I get node is not running error when I try to load this plugin...I know the node is running..I started as a console as well as a service still get node is not running error when I try to load the plugin.I am on windows and using build 	emqttd-windows-0.12.2-beta-20151016 maybe I am missing something basic. any help would be appreciated. thanks

First, please attach the error logs. Second, check the emqttd_plugin_pgsql/etc/plugin.config:
  {epgsql, [
      {pools, [
          {pgauth, [
              {size, 2},
              {host, "localhost"},
              {port, 5432},
              {username, "feng"},
              {password, ""},
              {database, "mqtt"},
              {encoding,  utf8},
              {reconnect, 5}
          ]}
      ]}
  ]},

Please attach the error logs and check 'plugins/emqttd_plugin_pgsql/etc/plugin.config':
  {epgsql, [
      {pools, [
          {pgauth, [
              {size, 2},
              {host, "localhost"},
              {port, 5432},
              {username, "feng"},
              {password, ""},
              {database, "mqtt"},
              {encoding,  utf8},
              {reconnect, 5}
          ]}
      ]}
  ]},

thanks for the response I have already changed the config to my local db with the right username and password and db here is the error log
16:38:43.106 <0.307.0> [error] dashboard_1451396322754@<IP_ADDRESS>:51390: username 'dashboard' login failed for undefined
16:38:43.106 <0.192.0> [error] Cannot find clientId 'dashboard_1451396322754' with <0.307.0>
16:38:43.410 <0.309.0> [error] dashboard_1451396322754@<IP_ADDRESS>:51396: username 'dashboard' login failed for undefined
16:38:43.410 <0.192.0> [error] Cannot find clientId 'dashboard_1451396322754' with <0.309.0>
16:38:52.097 <0.313.0> [error] dashboard_1451396331782@<IP_ADDRESS>:51474: username 'dashboard' login failed for undefined
16:38:52.097 <0.191.0> [error] Cannot find clientId 'dashboard_1451396331782' with <0.313.0>
16:38:52.404 <0.315.0> [error] dashboard_1451396331782@<IP_ADDRESS>:51478: username 'dashboard' login failed for undefined
16:38:52.404 <0.191.0> [error] Cannot find clientId 'dashboard_1451396331782' with <0.315.0>
11:11:40.100 <0.215.0> [error] busy_port warning: suspid = <0.30.0>, port = #Port<0.704>
[{initial_call,{erlang,apply,2}},{current_function,{user,server_loop,2}},{registered_name,user},{status,waiting},{message_queue_len,0},{group_leader,<0.30.0>},{priority,normal},{trap_exit,true},{reductions,8224},{binary,[{35127472,40,1},{34867072,100,1},{35136944,256,1},{34867216,256,1}]},{last_calls,false},{catchlevel,2},{trace,0},{suspending,[]},{sequential_trace_token,[]},{error_handler,error_handler},{memory,21640},{total_heap_size,2585},{heap_size,1598},{stack_size,9},{min_heap_size,233}]
[{name,"0/1"},{links,[<0.30.0>]},{id,5632},{connected,<0.30.0>},{input,0},{output,762},{os_pid,undefined}]
thanks for the help

also got this on emqttd_sasl.log file
=PROGRESS REPORT==== 30-Dec-2015::15:24:26 ===
application: emqttd_plugin_pgsql
started_at: 'emqttd@YON-PC'
does this mean it has already started

This is the error message dashboard plug-ins, the error was repaired.
The dashboard with not verify the user name to subscribe  SYS topic


Links to download source code no longer valid

The link to download the source code, doesn't work. It just redirects to the code samples main page, but if you look for Contoso Ads Application there is no result. If you look for Cloud Service there is no result either.
So there is no way to follow the actual steps as there is no source code available.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 8cc8f1b2-fa7a-6772-e534-9f91b37106e7
Version Independent ID: e9309449-36ab-f570-8d04-121b1158a507
Content: Get started with Azure Cloud Services (classic) and ASP.NET
Content Source: articles/cloud-services/cloud-services-dotnet-get-started.md
Service: cloud-services
GitHub Login: @tanmaygore
Microsoft Alias: tagore

Thanks for the feedback! I have assigned the issue to the content author to investigate further and update the document as appropriate.

Adding for reference, link to source code that is redirecting to code sample homepage: https://code.msdn.microsoft.com/Simple-Azure-Cloud-Service-e01df2e4

For any waiting for this to fix, here is a copy of source code https://github.com/rpanday/contosoAdsCloudService

Thanks for your dedication to our documentation. Unfortunately, at this time we have been unable to review your issue in a timely manner and we sincerely apologize for the delayed response. The requested updates have not been made since the creation of this issue, and the timeline for resolution may vary based on resourcing. We are closing this issue for now, but feel free to comment here as necessary. #please-close


Use variable SRG SSR font?

Received from Daniel Fischer:

Dalton Maag (creator of the SRG font) has created a variable font for all our Sans Font Weights. In case you are not familiar with variable fonts, let me quickly highlight: The beauty of variable fonts is, that you only need one font file to display all existing font weights like light, regular, medium, bold, heavy and beyond that you can interpolate dynamically between all weights. This for example allows us, to adjust the font weight slightly in darkmode to increase readability. Above the visual treatment, the variable font is much smaller and therefore we can improve loading time/performance on websites.

So first of all I hope you guys can make use of the variable font just like we do! Secondly, the SRF app team is about to implement the font in our news and sport app. They told me that to really benefit from the font, the SRG Appearance Library should provide the same font. Otherwise both fonts are still in use. Are you easily able to implement the variable font in the library so the SRF app team can make use of it?

See https://www.wwdcnotes.com/notes/wwdc20/10175/ for some technical background.

Implemented as part of a major font API overhaul for better support on iOS and tvOS, see #4.