[iOS] Mapbox.framework/Mapbox does not contain bitcode

While archiving I am observing following error:
.../BuildProductsPath/Release-iphoneos/Mapbox.framework/Mapbox' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target.
I have already set Enable Bitcode to No for my app target
Architectures: Standard Architectures (arm64)

This problem is also affecting me

Sorry wron button...


[$500] deployBlocker.yml Workflow fails when an issue has a ' in the title

Problem
This line can fail when a GitHub issue has a ' in the title and it has the deploy blocker label applied to it: https://github.com/Expensify/App/blob/c00b84026a590cb2b118d7e5c3ae68a7ba2ce286/.github/workflows/deployBlocker.yml#L35
It creates the following error:
Failing workflow
Run 8398a7/action-slack@v3
  with:
    status: custom
    custom_payload: {
    channel: '#expensify-open-source',
    attachments: [{
      color: "#DB4545",
      text: '💥 We have found a New Expensify Deploy Blocker, if you have any idea which PR could be causing this, please comment in the issue: <https://github.com/Expensify/App/issues/3159[2](https://github.com/Expensify/App/actions/runs/6936763631/job/18869531998#step:4:2)|"Desktop - Reload - ''Hmm... it's not here'' when reloading the desktop app">',
    }]
  }

    author_name: 8[3](https://github.com/Expensify/App/actions/runs/6936763631/job/18869531998#step:4:3)98a[7](https://github.com/Expensify/App/actions/runs/6936763631/job/18869531998#step:4:7)@action-slack
    github_token: ***
  env:
    GITHUB_TOKEN: ***
    SLACK_WEBHOOK_URL: ***
Error: Unexpected string

Solution
Fix the bug so it does not error. Possibly we need to escape the ' or remove these characters from the title.
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~0110e529d76a12411d
Upwork Job ID:<PHONE_NUMBER>965649408
Last Price Increase: 2023-11-27

Dupe of https://github.com/Expensify/App/issues/31846, closing

OK, so I am forked the repository and trying to test this myself but now everything is locked up because of Lock staging deploys during QA job, anyways I think we just need to figure out how to properly escape the '
    init │ n> '"<>&\''.replace(/[&<>|"']/g, (m) => ({'&':'&','<':'<','>':'>','"':'"', '\'': 'apostrophe;'}[m]))
jellobot │ (okay) '"<>&apostrophe;'

Contributor details
Your Expensify account email<EMAIL_ADDRESS>Upwork Profile Link: https://www.upwork.com/freelancers/michaelssingh

Contributor details
Your Expensify account email<EMAIL_ADDRESS>Upwork Profile Link: https://www.upwork.com/freelancers/~01ee2f0e8b16689ccb
Proposal
This line can fail when a GitHub issue has a ' in the title and it has the deploy blocker label applied to it:
What is the root cause of that problem?
Wrong string format in YAML for the workflow
What changes do you think we should make in order to solve the problem?
replace single quotes (') with backticks (`) in GitHub Actions workflow deployBlocker.yml on line 35.
What alternative solutions did you explore? (Optional)
The issue can be from this project: 8398a7/action-slack

@ebauger please make sure you're familiar with the Contribution Guidelines

@ebauger
As I said on the PR, and like Paul already noticed, our process works differently. Thank you for your interest in Expensify! You can search for other issues open for proposals.


fix(core): BreakpointService replay value for new subscribers

PR Type
What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Refactoring
[ ] Build or CI related changes
[ ] Documentation content changes

What is the current behavior?
Closes #
What is the new behavior?
Does this PR introduce a breaking change?

[ ] Yes
[x] No

Hi, I am wondering what difference does share and shareReplay make here ?

share shares the subscriptions, shareReplay also shares the last emitted value.

Hi, I am wondering what difference does share and shareReplay make here ?


Should TimePoint and TimeQuantity objects be merged?

The TimePoint and TimeQuantity objects both serve to represent a time value, and only differ slightly in their property names and descriptions. Should we merge these into a single object?

From the call:

We want to keep this as is, as these are semantically distinct.


Velum: Add more log filters for user's secrets, pass, and tokens

Velum uses pass, password, and bind_pw symbols accordingly.
Diverse symbols in velum are exposed in Velum logs.
After symbols were added in log filters, logs in admin:/var/log/containers  will shows:
{"log":"Processing by SetupController#configure as HTML\n","stream":"stdout","time":"2018-10-18T00:37:42.923336515Z"}
{"log":"  Parameters: {"utf8"=\u003e"✓", "authenticity_token"=\u003e"[FILTERED]", "settings"=\u003e{"dashboard"=\u003e"<IP_ADDRESS>", "tiller"=\u003e"false", "cluster_cidr"=\u003e"<IP_ADDRESS>/13", "cluster_cidr_min"=\u003e"<IP_ADDRESS>", "cluster_cidr_max"=\u003e"<IP_ADDRESS>", "cluster_cidr_len"=\u003e"23", "services_cidr"=\u003e"<IP_ADDRESS>/16", "api_cluster_ip"=\u003e"<IP_ADDRESS>", "dns_cluster_ip"=\u003e"<IP_ADDRESS>", "enable_proxy"=\u003e"disable", "http_proxy"=\u003e"", "https_proxy"=\u003e"", "no_proxy"=\u003e"localhost, <IP_ADDRESS>", "proxy_systemwide"=\u003e"false", "suse_registry_mirror_enabled"=\u003e"disable", "suse_registry_mirror"=\u003e{"url"=\u003e"", "certificate"=\u003e"[FILTERED]"}, "suse_registry_mirror_certificate_enabled"=\u003e"[FILTERED]", "container_runtime"=\u003e"docker", "system_certificate"=\u003e"[FILTERED]"}, "commit"=\u003e"Next"}\n","stream":"stdout","time":"2018-10-18T00:37:42.923397952Z"}

@MaximilianMeister I added bsc#1111848 to the commit message.

@suseclee can you open a backport pull request to the release-3.0 branch please? as the bug is filed for CASP v3


meta-set command with stale item TTL issue

When I tried to do ms on an item with the wrong cas token value but the stale flag I, I noticed that the value of the item was updated, but the TTL of the item was not. Is this the intended behavior, or a bug? i.e.
# Create an item with 100 seconds TTL
ms foo 2 T100 F1
ab
HD
# Fetch the CAS token ID
mg foo c
HD c2
# Update item to new value and TTL 500 seconds, with -I flag and wrong CAS token
ms foo 3 T500 C1 I
abc
HD
# The item has the new value but old TTL
mg foo t v
VA 3 t90 Z X
abc

This is what the stale flag is for:
https://github.com/memcached/memcached/blob/master/doc/protocol.txt#L725C4-L725C4
- I: invalidate. set-to-invalid if supplied CAS is older than item's CAS
The TTL isn't updated unless you're doing that explicitly via invalidating from the delete command or updating the TTL with a touch-like command.
The access pattern is like.. if you're using I with set you're doing an optimistic update, ie: "we set something but our CAS might not be correct anymore, so update with any value but it's not a good value. But if it is a good value we want it to be set normally". So to indicate/help with that we keep the X flag (invalid) and keep the remaining TTL. This also lets the system honor a TTL you modified with md key I T30 for instance.
Another (probably more common) example: Client A issues md I T30 (which bumps CAS, sets TTL), client B issues mg and sees an X flag and a CAS. Client C comes along and blindly issues md I T30 again (bumping CAS again, and changing the TTL to an acceptable staleness value). Client B completes its update, but the content is considered to still be stale so the next mg that comes in will see and try again.
I don't think just doing pure sets with I without also doing md is very common.
Btw, what're you folks up to over there? at AWS? would you consider catching up a bit?

I had thought during the design phase about adding a "if stale use this TTL instead" for set, but then we can end up with three TTL's in a single set: ms T500 N50 [if-stale]30 which is absurd and too narrow of a use case.

OK got it. Thanks for confirming this behavior.
Recently talked to some advanced memcached users and they mentioned about the stampede herd problem - when the application starts up there can be a time period when every server tries to populate data in the cache. So multiple servers can see cache miss on the same key and then go to the database and fetch the value into the cache, and overwhelm the database in the process. I noticed that Meta command seems to have a good solution for that scenario with the vivify-on-miss (i.e. N flag in mg command). So been looking into some meta commands

I meant more in general. I've been seeing you folks poke at issues/PR's randomly but have no idea what goes on over there.
And that is definitely a use case for meta. More succinctly described here: https://github.com/memcached/memcached/wiki/MetaCommands#atomic-stampeding-herd-handling
The case you were originally asking about is specifically serve-stale, described here: https://github.com/memcached/memcached/wiki/MetaCommands#serve-stale
this second link documents the behavior a bit: The next metaget will continue to see the item as stale, with its previous TTL and previous CAS:

think I need to update a few lines that document still. ST -> HD but the rest is fine.

Not sure this documented behavior is exactly correct The next metaget will continue to see the item as stale, with its previous TTL and previous CAS:. The next metaget sees the item with its previous TTL, but the CAS token value has been bumped.
mg foo t c v
VA 3 t318 c4 <-------- CAS token value is at 4
new
md foo I T50  <-------- Item marked as stale and cas bumped to 5
HD
ms foo 4 T345 C4 I.   <------- Update made to item with previous cas token value and stale
1234
HD
mg foo t c v
VA 4 t29 c6 X W    <-------- Next read sees the item with previous TTL, but cas token value has been bumped to 6.
1234

I'll have to check when I have some time. the code did change a bit since I wrote the document so I might've missed a few things (other than the obvious ST response code).
Need to double check the unit tests and code history to be sure. Lets leave this issue open until I resolve it.

This might actually be broken...
The correct behavior would be to preserve the CAS (yes yes, please listen): the behavior preserves the TTL and if the win token was already sent. So unless the win token hadn't already been sent (as in your example here), the item would be marked stale but no other process could claim the win token until the TTL expires. Then if the original "winner" came and set its data, its CAS wouldn't match and the item would stay marked stale and already won.
If I change it to wipe the win bit on a stale set, the next fetcher will win. In a dogpile scenario this could create a doom-loop where nobody ever has a "final" success and a client is always being told to recache the item.
Or at least that's what my notes say, but it looks like I'll need to chart this out when I get a bit more time. I just tried to reason it through but I haven't had enough caffeine yet today.
So either 1) we need to preserve CAS. or 2) need to wipe the win bit.
and of course 3) figure out where I missed this in testing.
I wrote all the set stale stuff for completeness but I'm unaware of any users, so it's not super surprising there's a subtle bug. Most people just use the anti-dogpile functionality which should still work.

Just leaving another note: in reasoning through...
As of now:
- item gets marked stale
- fetch A, wins token
- item gets marked stale again, win token wiped (TODO: confirm this is tested)
- fetch B, wins token
- set A completes, CAS too old. CAS is bumped.
- set B completes, CAS too old, CAS is bumped.
- fetch C, still stale, can't win token.
- fetch D, etc, fetch and consider it stale. App may either decide to not use the value or treat it as hostile.
- Continues until TTL expire

If we wipe the win bit:
- item gets marked stale
- fetch A, wins token
- item gets marked stale again, win token wiped (TODO: confirm this is tested)
- fetch B, wins token
- set A completes, CAS too old. CAS is bumped.
- set B completes, CAS too old, CAS is bumped.
- fetch C, still stale, wins token.
- set C completes, CAS match, everything happy
- Technically this is an excessive stale fetch/set round trip.

On the application end of things, its "source data" is supposed to be up to date as of when it marks an item as stale (md key I), which means any source fetch that happens after that point should be canonical. So even though the cache item is updating from stale to stale in scenario 2 above, we need to consider that an already won fetch will still set valid data.
So the correct behavior is to keep the CAS value... I'm pretty sure.
but I will leave these notes here until I can do the logic chart again.
Thanks for being thorough; I've been really wanting to revisit anything other than the proxy and comb out any straggling issues but that project is a huge slog.

@dormando Sure I would be happy to catch up sometime. Let me know.

Need to solve this soon. I have another PR that's hacking up the metaget tests so I should do this right after that merges since it'll be fresh in mind.
Looking over the stale tests and I can kinda maybe see what happened... Or at least, it seems easy to just write out a bunch more cases here.


PDF Page numbers in wrong order

Attach (recommended) or Link to PDF file here:
1-Electrostatique.pdf
Configuration:

Web browser and its version: Firefox 118.0.2 (64-bit)
Operating system and its version:
PDF.js version: Firefox Builtin PDF viewer
Is a browser extension: no

(https://drive.google.com/file/d/1DDaa6x4MFxBwwDtxh_F3ZBtgmiDyxFYQ/view?usp=sharing)
Steps to reproduce the problem:

Open a PDF with Firefox built-in viewer that has some pages with numbers, and other pages that do not have a set page number.
Scroll between pages that have a number set and other that do not have it.

What is the expected behavior? (add screenshot)
Displayed page number in the top left corner should be in ascending order while scrolling: page 1, 2, 3, ... 43, 44, ...

What went wrong? (add screenshot)
The pages are not counted correctly. If a page has a set page number, that number is shown. If another page does not have a set number, the order of the pages is thrown off.
When a page number is set:

When a page number is not set(page after the one showed above):

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):

This is a bug in the /PageLabels dictionary of the PDF document itself, and the same behaviour can be observed in e.g. Adobe Reader (i.e. the PDF reference implementation) as well.

Ok, thank you for the response!


Feat/cambodia ews data

Closes: #351
Deploy: ~https://cambodia-ews-data.surge.sh~
TODO:

[x] Create ews/data endpoint in api-flask to process locations and datapoint APIs into PRISM ready data
[ ] Show  at least 7 days data in a diagram once clicked on sensor point_data

How-to Configure:

[ ] Run api-flask locally to expose localhost/ews/data endpoint
[x] Configure river level details into layer.json and prism.json - Already done

Features:
Handle the logic of processing sensor locations and get censors data points
Cache the endpoint to avoid internal server errors specified here

@ericboucher calling Cambodia ews endpoints multiple times crashes their servers and I have opted on caching our endpoint to avoid that. Take a look at it for your recommendations

closed in favor of pr #381


Default to "\n" for newlinestr instead of None

If newlinestr is None, os.linesep is used, bu it is the third millennium
and we don’t need or want different line endings per-platform.

I'm ok to change the default to be "\n" on all platforms, but why deprecate the parameter and discard the value passed in altogether? If one wants to continue using CRLF (or maybe even an empty string could be a valid value in some situations), why should we stop them from doing this? I don't think it costs us anything to continue supporting the option

but why deprecate the parameter and discard the value passed in altogether?

 If someone wants to use different line endings for whatever reasons, there are no shortage of tools that can convert between line breaks. By disabling this functionality we can later remove the API entirely if we get to break the API. Just like how XMLWriter no longer support any encoding other than UTF-8 (it will raise if any other encoding is used, but line spacing is more minor IMHO so I just warn and ignore).

Feel free to discard the last two commits, though, that is why I committed these changes separately.


What's the correct way to set "user-agent" header?

Hello GAX-Java maintainers,
This is Yang from OpenCensus team. Recently we've been working on adding the user-agent header to our Stackdriver Monitoring exporters for all languages. This allows Stackdriver Monitoring to group the uploaded metrics by different sources (e.g from OpenCensus vs. from other libraries), by looking at the value of the user-agent header.
However, I've noticed that in Java the way to set user-agent header is different from other languages. For example, in GAX-Go we have the ClientOption where we can directly set user-agent. Later this header will be merged with the Google user-agent headers: https://github.com/googleapis/google-api-go-client/blob/master/monitoring/v3/monitoring-gen.go#L96-L101.
In Java however, we don't have this kind of option in ClientSettings. If I understand correctly, we should provide a FixedHeaderProvider with the user-agent header to ClientSettings instead. In our case, the Stackdriver MetricServiceClient uses gRPC so we need to set HeaderProvider to the gRPC channel provider. Here's what I did in https://github.com/census-instrumentation/opencensus-java/pull/1518.
However, I also saw the comments below in GrpcHeaderInterceptor:
// User-Agent is overridden on gRPC level. The custom User-Agent is supposed to be provided
// differently and only merging with gRPC default value for User-Agent is permitted.
// Specifically the User-Agent will be provided via ManagedChannelBuilder#userAgent(String)
// during channel construction (calling #getUserAgentHeader() to get the value, initialized
// here).

I got a bit confused by that. Does it mean no matter what custom header value we set for user-agent, it will be discarded and override by gRPC? Or does it work in a similar way in Go that we merge the custom value with the Google default value?

Friendly ping.
I saw that in C++ we also have the WithUserAgent option: https://github.com/census-instrumentation/opencensus-cpp/pull/234. Looks like GAX-Java is the only library that doesn't have this option.

Currently working on porting the Cloud KMS Java samples from the Apiary client to the GAPIC clients, and this is a gap.  I'm looking for this to be exposed in ClientSettings as well, so that we don't lose this functionality-- we have Apiary clients that are setting it, and therefore helping us to get useful metrics (see e.g. Tink)

As the comment says ("only merging with gRPC default value for User-Agent is permitted"), the user-agent value is merged with the grpc one.
Assigning to @vam-google for any follow-up questions.

Thanks @garrettjonesgoogle for the explanation. I think my question is answered. Since @bdhess mentioned you want to add the WithUserAgent() option to ClientSettings, this issue can be left open to keep track of the progress of that. (Or you can open a new issue and close this one.)

@sduskis - did this get deprioritized?  This functionality is fairly important for gathering good metrics.  Can we get this scheduled?

@bdhess, @sduskis, @songy23 I'm really confused by this issue and do not understand what we are trying to achieve here.
Yes, there are differences between Go and Java clients, there are many of them. Actually all of the clients (in all 7 languages) have many differences. Trying to make Java clients to have same surface as Go clients for a particular feature (like WithUserAgent here) does not seem like a valid goal, because:

even if we make them same here it does not eliminate multiple other discrepancies (what is so special about this one?)
why are we trying to make Java look like Go, why not Go look like Java?
even if we agreed on making the changes there are technical issues with it:

there is no such thing as gapic-specific "CallOption" in java, we are not going to add it to support WithUserAgent field. Note ClientCoption in Go and <Client>Settings in Java gapics are fundamentally different things - the first one is a "static" file checked in in to repo and shared by multiple clients, the second one is generated for each individual client separately and is used only by that client.
Making java gapics look like Go clients will make them look less like java manual clients (which reside in same google-cloud-java repository, for example the storage client). HeaderProvider is needed to set user-agent for both types of clients (manual and generated). So we are potentially sacrificing  java clients "internal" consistency for a cross-language consistency.

I would strongly suggest closing this issue unless there are very-very strong objective reasons to keep it.

You can use a custom implementation of the HeaderProvider for maximum flexibility.


[FLINK-1458] Allow Interfaces and abstract types in TypeExtractor

Kryo already supports them, so it was just a question of the
TypeExtractor allowing them.
I also added tests for this.

Looks good to me so far, modulo two comments:

Since the type extractor code is changed a lot, it would be good to have a test validating that the TypeExtractor allows abstract types and interfaces.
I would change the log level of the messages (abstract types are less performant, type is no POJO) to INFO, since WARN implies to me that something is wrong (which is not)

But I extended the test with a SerializerTest for both Interfaces (traits) and abstract classes. The other thing I will change, yes.

The tests cover that the serializer supports this. One issue was that the type extractor rejected the types, even though they were supported.

You're right.

Hi @aljoscha
Still getting this warning on compiling for accessing a of type Map[String,Any]
Type Any has no fields that are visible from Scala Type analysis. Falling back to Java Type Analysis (TypeExtractor).
Flink version 1.1.1


Remove hard-coded versions from buildall [skip ci]

Use Maven profiles to extract the Spark version list to build Shims for.
Signed-off-by: Gera Shegalov<EMAIL_ADDRESS>

build


Incorrect solutions obtained when a single node has absolute free energy defined

I'm trying to debug an odd issue in the newest Folding@home Sprint 5 dashboard where absolute compound free energies are coming out too negative.
I've traced the issue back to a peculiar issue: If we feed arsenic 0.1.0 a star map where only the central node has an absolute free energy specified, it comes back with an estimated free energy that is exactly 1.5 times more negative!
Any idea why this might be?

I'm not quite sure why this is, but if I change this line from
            F[i, i] = df_ij[i, i]**(-2) - np.sum(F[i, :])

to
            F[i, i] = 2*df_ij[i, i]**(-2) - np.sum(F[i, :])

the discrepancy vanishes!
I'm not quite sure how this drops out of the mathematics, though. It's possible (though unlikely) the derivation contains an error, but perhaps we're incorrectly interpreting some symbols?

Hold up---I may be wrong about this. Let me put together a minimal example and see if this actually reproduces the issue first.


BENCH: Added 'trust-constr' to minimize benchmarks

What does this implement/fix?
'trust-constr' was missing from the lists of minimize methods benchmarked in /benchmarks/benchmarks/optimize.py; this adds it.
Additional information
Haven't tested locally yet; should do that before merging.

The benchmarks don't get run on any of the CI's, as far as I know.

I have run benchmarks on this branch and trust-constr results are reported in the table.

The benchmarks don't get run on any of the CI's

There is an asv check run in Travis, to check for basic problems.

Sorry for the late response. Anyway, thank you very much for fixing this @mdhaber.  Happy to see this merged.


Some GDScript behavior proposals

If you know me from Reddit, you might know that I'm in love with Ruby programming language XD
There are some things in Ruby (and some other languages too) that I miss in GDScript. Some of them might be controversial and they are all probably for Godot 4.0, but thought I'd write it for discussion purposes etc. So the list is:

Different precedence for and/or/not and &&/||/!

I noticed that GDScript supports both and and &&. I was disappointed when I discovered they have same precedence. In Ruby, symbolic operators have precedence over word ones (so e.g. && is evaluated before and) and it's sometimes useful in complex conditions to avoid using brackets. I mean, since both of them are supported, they might be more than aliases.

Treat 0 and [] as "true"

It works like this Ruby and LUA (and probably some other). I know GDScript takes heavily from Python, but that doesn't mean it should work exactly like that. There are people that take advantage of 0 being false, but there are also people that expect it to work otherwise. I for example like to make a null variable that has later number assigned and then I check if it exists and e.g. increment it. It was confusing to me few times when it didn't work. I know it's a matter of writing if variable != null, but still.
EDIT:
Apparently, zero vector is "false" too.  Normally you need to do
var found_one = find_in_array(something)
if found_one:
    found_one.do_something_etc()

This could be replaced by
if found_one = find_in_array(something):
    found_one.do_something_etc()

Maaybe in GDScript you'd need var after if, because otherwise it's less helpful, but right now you can't do something like this at all.

Allow for chained assignement

Sometimes you want two variables to have one value. You need to do
b = a
c = a

While with chained assignment you could just do this:
b = c = a
Also in Ruby, you can go further:
a, b = c, d

I know that what am I proposing here are probably some useless quirks (arguably except the first one) that just make you save one line or few extra character. I'm not saying of course this MUST be a thing, I'm just writing this, because at some point I actually wanted to use each of them at least once, which means that there are some use cases where this might be useful for some people. While first two might break some scripts, 3 and 4 don't really affect anything other than giving more options.
Any thoughts? >.>

You should try to search for existing issues first: #7222, #7584

Huh, #7222 would work both for 3 and 4. Seems like it was rejected though :/
Dunno, instead of preventing the construct at all, Godot could just should throw a warning, so you know that it's there, but you could leave it like this. Or maybe there could be a list of "ignorable" errors, that really advanced users could opt-out from showing. I know it's not beginner friendly to allow this etc. but maaybe making it optional somehow wouldn't really hurt.
btw, it isn't always easy to find what you are looking for, because it can be named otherwise than expected (e.g. I suspected Python has "list unpacking", but didn't now it's named like that; or that "assignment = expression" thing).

Why are empty arrays and 0s not counted as true?

Because Python. GDScript already differs from Python tho, so this could be changed too IMO.

maybe we could use a warning if someone does if a = b?

That's what I said in my previous comment. Also, advanced users should be able to disable these particular warnings. At first I assumed it won't introduce problems, but well, they can be taken into account and feature could be implemented properly, instead of outright rejecting the change, like in referenced issue.

That's what I said in my previous comment.

Oh my bad, I didn't notice.
Also, since you seem unsure if ignorable errors could be implemented, let me point you to the warning system proposal itself: #19993

Wow, that warning system seems perfectly suited for this case D:

More and more I feel that we should solve #18698 once and for all. It's not bad to submit proposals, but usually those come from familiarity with other languages, which not always fits the GDScript feel.

Treat 0 and [] as "true"

How many languages treat 0 as true? That sounds very alien to me. I don't think many people expect it to work this way (in fact, false is pretty much an alias to 0, considering the legacy from C). I can see about the empty array, but I still think it's normal to treat it as false.

Different precedence for and/or/not and &&/||/!

Again, I wouldn't expect them to have different precedence. For me they are just alias of one another, they shouldn't behave any different. I always use and/or/not because they look more idiomatic in GDScript (I'm not even sure why the other ones are supported, likely just to appeal to regular C++ users).

Allow for assignment inside condition statements

Allow for chained assignement

I already commented on the other issue. IMO being less error-prone is better than saving a few characters in the code.

How many languages treat 0 as true?

I tried to find some data, but hard to find a good list. Anyways, 0 being false is no more than a legacy. I just prefer the philosophy where "if it exists, it counts as true" and 0 and [] is actually something in this case. There are other people who will agree. But well, it's debatable.

Again, I wouldn't expect them to have different precedence.

As LikeLakers2 said, people rarely, if ever, use both of them in one condition (like, why would you mix and with ||?). These who would do otherwise likely expect these operators to have differences.

IMO being less error-prone is better than saving a few characters in the code.

With warning system you can have both - allow this for people who want it and make sure that other people will know that they made a mistake. Only people that don't read warnings will be negatively affected.

(like, why would you mix and with ||?)

I meant that people don't seem to mix and and &&, or and ||, not and !. They might mix between different operators for different functions (and, or and ! are what I typically use), but I've rarely seen people use both not and ! in the same statement.

if something is equivalent to if boolean(something) thus if bool(0) should be false (and true for all other numbers), a number is a raw value.
if bool([]) should be true because an empty array is a value, its length is another problem.

Technically in List work the empty array is false, or rather false is defined as the empty array, the empty array being nil (and things like an array of [1, 2, 3] being a list of 3 Cons Cells of (1, (2, (3, ()))), so the empty array being false makes perfect sense.  A reference may or may not be false depending on if it is null or not, but with the now Typed GDScript not everything is a nullable reference and the values there-of are important.  Similar with 0 for integers and so forth.

I don't have an opinion on 2 and 3, but I think 1 and 4 are good proposals. If there's two operators for "and" etc, it makes sense for them to have functional differences, plus it's unlikely to break existing projects since I doubt people would mix and match. I use chained assignment often in C#, it's quite useful.

How many languages treat 0 as true?

@vnen Bash comes to mind, since 0 means "true" and "no error", while 1, 2, etc, means "false" and "exited with error code X". But I don't know if this is useful for GDScript.

If there's two operators for "and" etc, it makes sense for them to have functional differences, plus it's unlikely to break existing projects since I doubt people would mix-and-match. It makes sense for the symbols to have higher precedence, since "a && b and c && d" just sounds right.

Mixing both in the same statement can also hurt readability, so I'm not sure if the precedence of symbolic operators should be changed in GDScript. I'm fine with the current way (consider wrapping long if statements over multiple lines using parentheses).

How many languages treat 0 as true?

In Erlang only the atom false is false, everything else, including 0 is true.
In Elixir only the values nil and false are false, everything else, including 0 is true.
I think 0 in Lua is also true if I recall right?
In OCaml and other similar languages 0 is not a boolean value and cannot be cast to one as such, thus it is not false.
Etc... etc... etc...

Mixing both in the same statement can also hurt readability, so I'm not sure if the precedence of symbolic operators should be changed in GDScript.

There's lots of things that hurt readability, like inline if statements, which are against style guides and sometimes cause a bug in debugger (ironic XD, but reported #20820). Should we really disallow practices that "hurt readability" to the point where they are not possible? Nope. Just let people write the code the way they want and if you think it's bad, just document it as "don't use it". Or don't document it at all :v
Also for the 0 = true thing, most scripting languages treat 0 as true.

Should we really disallow practices that "hurt readability" to the point where they are not possible?

I personally value consistency over being able to use my preferred style, so we can spend less time on arguing about style and more time programming :slightly_smiling_face:

Even if or and || have different precedence, it'll never be clear which has the higher precedence, so it will not be clear what's happening. If you want to change precedence just use parentheses, it's not that bad.

How many languages treat 0 as true?

Erlang [...] Elixir [...] Lua [...] OCaml [...]

Apart from Lua, those are functional and not widely-known languages, so it's not ideal for reference. GDScript is meant to be simple, it should follow the trends of more popular languages.
I still support 0 as false to be an "empty" value (same to [] and even Vector2()), and thus equate to false, especially since GDScript doesn't have nullable types. You can consider zero as "not set" for integers, the same way a null would be for objects. If you really want to check if something is null, simply use if something == null.

I'm of the opinion that 'false' is a boolean, a '0' is an integer, an integer != a boolean, thus 0 is not false nor true.  Though in the untyped side of gdscript 0 equating to false seems fine, but it shouldn't be allowed in typed code (or it fails typing) and an explicit !=0 test should be performed instead.

Just use brackets :P changing this behaviour makes it less logical and more confusing imo
A bool is kinda the same thing as 0 or 1 so having 0 as true makes no sence, 1 should be true and 0 false.
Yes! Would be useful and I don't see any downside with it

Yes! Would be useful and I don't see any downside with it

I don't think it's something that's done often enough to justify making the parser more complex.

Closing because it's a proposal on main repo, which is illegal (XD).
I still very much support 1, so I might create a separate proposal for it. I don't recall 3 and 4 being very useful recently (maybe I used to write bad code and I don't do it anymore). Also 2 turned out to would have been less convenient than current behavior.

@KoBeWi The && and || logical operators will be considered deprecated in 4.0. They will still work, but you'll get a warning when using them.

I know. That's why I wanted to propose repurposing them instead.

@KoBeWi The && and || logical operators will be deprecated in 4.0 (in the interest of consistency). They will still work, but you'll get a warning when using them.

Why? Its shorter and makes sence and is also how it works in many other languages. Removing it makes 0 sence.

@MCrafterzz Python doesn't have && and ||. This means that in GDScript, you just have another way to do the same thing. This makes style guides longer when they could have been shorter :slightly_smiling_face:

Eh, I was just writing a proposal and scrapped it halfway, because I realized that for the most common use case a and b or c and d the precedence doesn't matter .-.


window is not defined

I want to check if i can deploy my work.
https://github.com/nwicakson/informatics-reactql
The localhost:8080 looks okay. But when i run npm run build-run and then visit localhost:4000 at my computer, I got error message "window is not defined".
Can I check it like that? *first time to deploy
I have updated reactql from 2.8.5 to 2.10.0, but still got this error.
Am I doing something wrong in my code /src?

run npm run build-run and then visit localhost:4000
@nwicakson that is correct, works fine for me
ReactQL 4.10.0 (fresh install)
Mac OS 10.11.6
I was unable to run your project without starter data. If you would like to upload a minimal data set for testing, I will take it for a spin to see if I can spot anything.
Otherwise, I would suggest rolling back to earlier commits to see if you can spot where the problem started.

Reactql provides both browser side and server side rendering.
localhost:8080 is Browser rendered. That means all the files are loaded first and then rendered. By that time window variable is available, because you are in browser.
But when you build and run, the app is server rendered on the initial load and later the browser kick in.
So during the initial load, the window variable is not available and you see that error.
You can test on localhost:8081 for more info.

@gihrig Thank you, it turns out the explanation from @webexpert5 was right.
It's because:

I didn't check if this is SERVER or not
before const shareUrl = window.location.pathname;
after const shareUrl = !SERVER ? window.location.pathname : null;
and
I called window at react-helmet
before <meta property="og:url" content={window.location.pathname} />

Hello,
I have the same problem and have already looked at localhost: 8081. However, nowhere is an info about the error displayed here. So I do not know at all where this mistake is.
In my own code I do not use the window variable but only localStorage. Through the project search, I found only the files "lib/redux.js" and "ssr.js" where the variable window is used. Otherwise many times in the vendor.js file. I think it will probably have something to do with the vendor.js file. What can I do to solve this?


ENH: stats: Updates to variation.

Move variation to its own file.
Added the parameter keepdims to stats.variation.
Updated the examples in the docstring.
Added validation of the axis argument, so an invalid value
raises np.AxisError.
For nan_policy="omit", use np.nanstd and np.nanmean
instead of converting the input to a masked array.  This
prevents the surprising return of a masked array from the
function.
Ensure that no spurious numpy warnings are generated for cases
that we want to handle cleanly.
Handle the case a.size == 0 as a special case to avoid spurious
warnings.
Moved variation unit tests to their own class, in their own
file, replaced some expected values for existing tests with the
exact value, and added tests for the new features.
Add some utility functions to scipy/_lib/_util.py

Closes gh-592.

Is the test that scans the code for uses of warning filters still necessary?  We now require Python 3.6 or later.
Also, the message about using numpy.testing.suppress_warnings says it is for use in tests only:
E   AssertionError: warning ignore filter should not be used, instead, use
E   numpy.testing.suppress_warnings (in tests only);

That imples we shouldn't use numpy.testing.suppress_warnings outside of the unit tests.

Note: I included "Closes gh-592" in the commit message, but this PR doesn't implement the option for including the bias correction factor 1 + 4/n that is mentioned in that issue.   If this PR is merged, I'll create a new issue specifically for that enhancement request, to be implemented later.

It appears that, except for the standard floating point warnings, one cannot filter numpy warnings in a way that is thread-safe.  I pushed an update that instead of filtering warnings, jumps through the appropriate hoops to avoid generating the warnings in the first place.

Still WIP--I haven't touched the mstats version.

After a bit more work, I've marked this as ready for review.  I haven't updated mstats.variation; that can be done in a separate PR.
It probably looks like a lot of code to compute what is, in effect, np.std(x) / np.mean(x).  But we want to handle edge cases and also nan_policy='omit' with a "nice" API (i.e. no spurious warnings), and the naive implementation doesn't give us that.
I put some potentially useful helper functions in scipy/_lib/_util.py.  As we add nan_policy to more functions, I suspect we'll develop more utility functions functions like these.  For now, _lib._util seems as good a place as any to put them.
The Travis CI failures are the known linalg failures of test_heequb.

The test failure is https://github.com/scipy/scipy/issues/11281, which is not related to the PR.

@WarrenWeckesser @rlucas7 PR will be ready before we branch on Monday?
Not much activity here in quite some time, but comment from Lucas above seemed positive:

found 1 typo and 1 open question on a test case (whether we want to include or not), looks like this PR is in good shape.

@tylerjereddy, thanks for the ping.  I'll update this PR today.

I don't know why the Mypy step of the Linux Tests / Nightly CPython (3.10) fails with the following error.  We use normalize_axis_index in many places.
Run python -u runtests.py --mypy
  python -u runtests.py --mypy
  shell: /usr/bin/bash -e {0}
Building, see build.log...
    ... build in progress (0:01:00.076158 elapsed)
<snip>
    ... build in progress (0:21:01.517327 elapsed)
Build OK (0:21:49.575138 elapsed)
scipy/stats/_variation.py:3: error: Module "numpy.core.multiarray" has no attribute "normalize_axis_index"  [attr-defined]
Found 1 error in 1 file (checked 829 source files)
Error: Process completed with exit code 1.

I "fixed" the mypy issue by adding the new file to the mypy.ini file configured to ignore errors (like we do with most of the other files).
I updated the PR with a merge of the master branch, and addressed @rlucas7's comments from last year with a few more changes.

Thanks @tylerjereddy.  I pushed a change that addresses your comments.

it does modify some old tests it seems.

To help anyone reviewing, here are the details of the changes to the old tests.
There were just three old tests: test_variation(), test_variation_propagate_nan(), and test_variation_ddof().
For convenience, here is a copy of the old tests.
    def test_variation(self):
        # variation = samplestd / mean
        y = stats.variation(self.scalar_testcase)
        assert_approx_equal(y, 0.0)
        y = stats.variation(self.testcase)
        assert_approx_equal(y, 0.44721359549996, 10)

        x = np.arange(10.)
        x[9] = np.nan
        assert_equal(stats.variation(x), np.nan)
        assert_almost_equal(stats.variation(x, nan_policy='omit'),
                            0.6454972243679028)
        assert_raises(ValueError, stats.variation, x, nan_policy='raise')
        assert_raises(ValueError, stats.variation, x, nan_policy='foobar')

    def test_variation_propagate_nan(self):
        # Check that the shape of the result is the same for inputs
        # with and without nans, cf gh-5817
        a = np.arange(8).reshape(2, -1).astype(float)
        a[1, 0] = np.nan
        vv = stats.variation(a, axis=1, nan_policy="propagate")
        np.testing.assert_allclose(vv, [0.7453559924999299, np.nan], atol=1e-15)

    def test_variation_ddof(self):
        # test variation with delta degrees of freedom
        # regression test for gh-13341
        a = array([1, 2, 3, 4, 5])
        nan_a = array([1, 2, 3, np.nan, 4, 5, np.nan])
        y = stats.variation(a, ddof=1)
        nan_y = stats.variation(nan_a, nan_policy="omit", ddof=1)
        assert_approx_equal(y, 0.5270462766947299)
        np.testing.assert_equal(y, nan_y)

self.scalar_testcase is 4.0 and self.testcase is [1, 2, 3, 4].

All the conditions checked in the old tests are also checked in the new tests.
The old test test_variation() tests:

a scalar input, which is now covered by TestVariation.test_scalar()
a 1-d sequence, which is now covered by multiple tests, e.g. TestVariation.test_ddof() and TestVariation.test_sign().
a 1-d sequence containing nan, with different nan_policy arguments. The default case (i.e. nan_policy='propagate') and nan_policy='omit' are now covered by TestVariation.test_variation_nan().  The case nan_policy='raise' is now covered by TestVariation.test_nan_policy_raise(). The case nan_policy='foobar' is now covered by TestVariation.test_bad_nan_policy.

The old test test_variation_propagate_nan() tests nan_policy='propagate' with a 2-d array containing one nan.  This is now TestVariation.test_propagate_nan().
The old test test_variation_ddof() tests that two arrays, one with no nans and one with the same values along with a couple nans produce the same result when the second array is processed with nan_policy='omit' and both use ddof=1.  This test is now TestVariation.test_variation_ddof().

Whenever this gets merged (whether by Monday or later for 1.9), please squash the commits, and use this as the single commit message:
ENH: stats: Updates to variation.

* Move variation to its own file.
* Added the parameter `keepdims` to `stats.variation`.
* Updated the examples in the docstring.
* Added validation of the `axis` argument, so an invalid value
  raises `np.AxisError`.
* For `nan_policy="omit"`, use `np.nanstd` and `np.nanmean`
  instead of converting the input to a masked array.  This
  prevents the surprising return of a masked array from the
  function.
* Ensure that no spurious numpy warnings are generated for cases
  that we want to handle cleanly.
* Handle the case a.size == 0 as a special case to avoid spurious
  warnings.
* Moved `variation` unit tests to their own class, in their own
  file, replaced some expected values for existing tests with the
  exact value, and added tests for the new features.
* Add some utility functions to scipy/_lib/_util.py

Or ping me, and I'll squash and force-push before the PR is committed.

Thanks Warren et al.
I squash merged with the provided commit message on the following basis:

the uncovered line I was worried about is now covered
backward compatibility concern I had was fixed
looks like the comments from Lucas, who regularly reviews our stats PRs, have all been addressed, if only by doc adjustments in some cases; Lucas had also mentioned that the PR was basically in pretty good shape already
CI appears to be in pretty solid shape

PS. This closed the last remaining open three-digit issue 🥳


Replaced HTML5 video player with Plyr video player

Fixes #152

Correct me if I'm wrong but, Isn't ScreenCap is just a preview of what's being shared? If so, then it doesn't make sense to have any controls on it.


Please merge Removed unicode() in filter_level for py3k supprt into v3.5.0

Within using streaming API of tweepy in python3.6.2, This bug https://github.com/tweepy/tweepy/issues/782 happened. After checking the source code, I found the master got a correct implementation: https://github.com/tweepy/tweepy/blob/c8e473ed7b939e09a485d0eaa2390554f009a56b/tweepy/streaming.py#L447
but the v3.5.0 didn't :
https://github.com/tweepy/tweepy/blob/920f5c49c059c4ea7f16c7c4f070c484161525c3/tweepy/streaming.py#L442
So with using pip3 https://pypi.python.org/pypi/tweepy, it's a bug which I can not bypass.

I just ran full belt in to this one too, any chance this can be shipped to pypi?

The fix for this, https://github.com/tweepy/tweepy/commit/09818085c0f8d259fff26b09a71f103ef53dd862, was released with Tweepy v3.6.0.


Tooling

Fixes #23

Would like your commentary on this @lance and @matejvasek despite the fact I am closing this PR now to test and enable the automation.


[Qt Quick] When top-level Window has transparency, white line appears on top of window

When transparency is enabled on the top-level QML Window, a white line appears at the top of the window frame.

Window {
    id: window
    visible: true
    width: 800
    height: 600
    title: qsTr("Hello, World!")
    color: "transparent"
    flags: Qt.Window

    FramelessHelper {
        id: framelessHelper
    }

        Row {
            anchors.top: parent.top
            anchors.right: parent.right

            MinimizeButton {
                id: minimizeButton
                onClicked: window.showMinimized()
                Component.onCompleted: framelessHelper.addIgnoreObject(
                                           minimizeButton)
            }

            MaximizeButton {
                id: maximizeButton
                maximized: window.visibility === Window.Maximized
                onClicked: {
                    if (maximized) {
                        window.showNormal()
                    } else {
                        window.showMaximized()
                    }
                }
                Component.onCompleted: framelessHelper.addIgnoreObject(
                                           maximizeButton)
            }

            CloseButton {
                id: closeButton
                onClicked: window.close()
                Component.onCompleted: framelessHelper.addIgnoreObject(
                                           closeButton)
            }
        }

    Component.onCompleted: {
        framelessHelper.setWindowFrameVisible(false)
        framelessHelper.removeWindowFrame(true)
        framelessHelper.setBlurEffectEnabled(true);
    }
}

With blur effect turned off, the issue still occurs. Only fixes I've found are setting flags = Qt.FramelessWindowHint which removes the window shadows and breaks Aero snapping, or using a Window color with no transparency at all.

Only fixes I've found are setting flags = Qt.FramelessWindowHint

Don't use Qt::FramelessWindowHint on Windows. It will break everything.
https://github.com/wangwenx190/framelesshelper/blob/310b44b8c461ff5007ab5da9f1d30e78383734c6/winnativeeventfilter.cpp#L785
Can you check whether change this line to margins = {-1, -1, -1, -1}; can fix this issue or not?

Can you check whether change this line to margins = {-1, -1, -1, -1}; can fix this issue or not?

My bad, should have mentioned I tried that already with this result:

That white line is the original window frame provided by the system. If you use margins = {1, 1, 1, 1}; you'll get four white lines which may be better than just one line. If you use margins = {0, 0, 0, 0}; you can remove all white lines, but the frame shadow will get lost at the same time.

If you don't care about the frame shadow, you can try margins = {0, 0, 0, 0};, this will not break Aero snapping.

If you don't care about the frame shadow, you can try margins = {0, 0, 0, 0};, this will not break Aero snapping.

That works, thanks! Just to clarify for any future readers, I changed lines 784-786:
    if (!reset) {
        margins.cyTopHeight = 0;
    }

Is there a way to change the window frame color? I wouldn't mind having the margin shown if I could set them to a dark color. That would be a good solution.

Is there a way to change the window frame color?

The window frame is provided by the system, not me, so it can be changed by the user's own settings. I'm not sure how to change it in Windows 7/8/8.1, but for Windows 10, you can use "settings -> personalize -> color", and select show color on TitleBar/WindowFrame/TaskBar (don't remember the names correctly). If you really want to control the color from the application, the only way is to hide the whole window frame and draw one yourself.

Another update on this: You can actually hide the top border that get's drawn from within QML. If I add something like this:
    Rectangle
    {
        anchors.top: parent.top
        anchors.left: parent.left
        anchors.right: parent.right
        height: .5
        color: "#3d3636"
    }

I get this result, which looks much better than the white and still retains window shadows.

But only have one top border looks quite weird, I'd prefer have all four borders or get rid of all of them.

Sure, having all 4 borders works too, and looks acceptable.
    Rectangle
    {
        anchors.fill: parent
        color: "transparent"
        border.width: .5
        border.color: "#3b3642"
    }

Having the ability to set the margins from the frameless helper would be nice to leave it up to the developer on how to handle it.

Having the ability to set the margins from the frameless helper would be nice to leave it up to the developer on how to handle it.

Sounds reasonable, I'll try to implement something like that.

You can actually hide the top border that get's drawn from within QML

I remember I can't draw anything on top of the window frame, are you sure you are not using margins = {0, 0, 0, 0};?

Can you test the latest code? The blur effect has been updated to the Acrylic Effect, and you can set a custom window frame now, for both Qt Widgets and Qt Quick.

I'm closing this issue because I think it's not valid anymore. Feel free to re-open it or open a new issue if you find something wrong.

Yep, I'm okay with this story being closed out. I tested the latest code and the acrylic effect seems really messed up. It looks like it's a static blurry image of the desktop that is not updating live (tested using the Quick demo).

Yep, I'm okay with this issue being closed out. I tested the latest code and the acrylic effect seems really messed up. It looks like it's a static blurry image of the desktop that is not updating live (tested using the Quick demo).

Yes because I changed the way of how the window blur. Previously, I was using the undocumented API SetWindowCompositionAttribute to let the window become semi-transparent on Win10. If you see some kind of gradient color, it must be draw manually in Qt, not something achieved by that API. But actually I want to achieve something like the Acrylic blur introduced in Win10, not some kind of traditional DWM blur. That API can enable Acrylic blur for Win32 apps but it has critical issues so in fact it is totally not usable at all. So I have to emulate the Acrylic blur myself. In my point of view, the new blur effect has a better appearance, although we can't see what's behind the window indeed (the background won't update). If you want to use the original blur effect, just set the environment variable _FRAMELESSHELPER_FORCE_DWM_BLUR or _FRAMELESSHELPER_FORCE_DISABLE_WALLPAPER_BLUR to 1 or true and restart the application.

Feel free to write more comments or open a new issue if you have different opinions.

Electron is an entirely different beast than Qt

Doesn't matter. It's native Win32 techniques, have nothing to do with Qt.

Something else I'm missing in the latest implementation is the ability to have full control over the color blurred window. It seems that it adds a white overlay. I liked the ability in the past to leave the window completely transparent with the blur effect, then create my own tints within the app itself, or set the tint in the frameless helper.

Yes, it's a cool feature. Currently the only problem is a white overlay is added unconditionally, I'll add an option for the user to remove that overlay within these days. You can set the tint color as before.

Is the DWM blur method you were using similar/the same as the implementation for electron's vibrancy module? I did find another electron package that builds on vibrancy but adds the acrylic effect here

Thanks for sharing these repos! I've now finished reading their source code. Unfortunatally, they are using the undocumentated API SetWindowCompositionAttribute as well, it has a severe bug so I can't use it. That two repos that depend on that API are also affected. That's why I'm seeking for a solution of emulating the Acrylic blur myself. But doesn't matter, the Acrylic blur is only available on Win10, I'm thinking using xaml island to bring the real Acrylic brush to Qt applications.

Hi, the code just got updated. Now you can set the environment variable _FRAMELESSHELPER_DISABLE_EXTRA_PROCESS_FOR_BLUR to restore to previous behavior. Once you set that env variable, this repo won't do any extra processing but only makes the window semi-transparent. Setting this flag will also disable wallpaper blur because bluring the wallpaper is part of the "extra processing".

One small hint: the removeWindowFrame() function is removed because it only exists for testing purposes. Normal users should not depend on it to develop applications. You can draw the window frame yourself, as what you have done.


Added gyro and accelerometer

At first I tried using VC3S as the format and a Vector3 as a type for the gyro and accelerometer axes, but Unity seems to be marshaling them improperly (there needs to be an intermediate short -> float first, I think).
Awesome work on this, btw! Thank you!
Hope this helps!

Sweet! That works!


Add collaborators to this repo

Comment below to be added as a collaborator
We will all be using this repository today. Even though it's public right now, you will not be able to make changes until you're given the correct permissions. We've automated this process via the GitHub API. Once you comment, we will add you as a collaborator.
You'll start to receive a lot of emails. (❗) You can slow these down immediately by clicking the Unwatch button at the top of the page and selecting either the Participating and @mentions or Ignore option.

Hi

Hello team!

hello

Hi all

hi

hello

Hello

Hi

Hi


⚠ Samsung has degraded performance

In f6533cd, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2650 ms

Resolved: Samsung performance has improved in 87e0439.


ERC20: Wrong info (description and twitter link) displayed.

CNHC token is approved, but it displays wrong info in imtoken app.
Please update the link by follow PR: https://github.com/consenlabs/token-profile/pull/6798

what's wrong？

According to the PR: https://github.com/consenlabs/token-profile/pull/6798

"Project basic information" should be:
CNHC is a crypto currency that is CNH-pegged. Each CNHC is backed by 1 offshore RMB (CNH), in compliance with regulated U.S. trust and banks for fund custody. Audit reports will be published by an independent audit firm on a regular basis. CNHC is supported by top international investment institutions and Internet giants, and will be promoted globally, including but not limited to application scenarios such as international payment, global trade, and decentralized finance.
"Twitter link" should be:
Twitter: https://twitter.com/CNHC_TO
But in imtoken app, it's now:

you can resubmit a new pr to change it.


Diagnostic format improvements

Introduce a few improvements to make the "grouped" diagnostics more similar to the diagnostics provided by the existing Swift compiler, as a step toward enabling these diagnostics by default:

Emit the "primary diagnostic" on the first line, matching the style of the existing compiler diagnostics and making it easier for humans tools to find the primary issue.
When the "primary diagnostic" is in a generated buffer, such as a macro expansion buffer, also show the outermost source file that triggered the generation of that buffer, so it's easy to find that.
Only colorize the severity (error, warning, etc.) and not the whole diagnostic message, to match the Swift compiler's current style.
Add remark diagnostic severity, which is used by the Swift compiler and needs to be representable.

Example now:
t.swift:5:3: error: no exact matches in call to global function 'f'
1 │ func f(a: Int) { }
  │      ╰─ note: incorrect labels for candidate (have: '(_:)', expected: '(a:)')
2 │ func f(b: Int) { }
  │      ╰─ note: incorrect labels for candidate (have: '(_:)', expected: '(b:)')
3 │
4 │ func g() {
5 │   f(1)
  │   ╰─ error: no exact matches in call to global function 'f'
6 │   f(a: 2.5)
7 │ }

https://github.com/apple/swift/pull/68289
@swift-ci please test

https://github.com/apple/swift/pull/68289
https://github.com/apple/swift-format/pull/605
@swift-ci please test

https://github.com/apple/swift/pull/68289
https://github.com/apple/swift-format/pull/605
@swift-ci please test

https://github.com/apple/swift/pull/68289
https://github.com/apple/swift-format/pull/605
@swift-ci please test Windows

https://github.com/apple/swift/pull/68289
https://github.com/apple/swift-format/pull/605
@swift-ci please test


Create CW721 base repo copy with tuple key for tokens

Could you elaborate a little on the motivation for this? We can make the needed changes upstream if need be.


Non-Functional Repository

The provided repository in README.md is not usable.
<repository>
    <id>rapha149-repo</id>
<EMAIL_ADDRESS></repository>

The URL translates to<EMAIL_ADDRESS>which is not a valid repository. Using JitPack is still the only working option. Looks like a personal token - Probably should be fixed.

I have switched back to Jitpack for now, I will change to Maven Central in the following days.

I did manage to get it done today! I thought there would be longer waiting times for registration for Maven Central.
The new dependency is in the readme.


Bridge http endpoint to http4

I have no idea if this is possible, but I've seen a few questions now where folks are confused that they cannot do something like:
from("direct:start")
.to("http://foo/bar/cheese")

This results in No component found with scheme: http because WFC only supports the http4 component (to ensure compatibility with WildFly and it's Apache HttpComponents module).
Having to add 'http4' on endpoint URIs is not very intuitive IMO. I wonder if we could improve things by trapping the HTTP4Component component registration event and then have WFC register it under the 'http' scheme (so that http & http4 URIs basically mean the same thing).

Thinking about things some more, this can not really work in practice because the endpoint config between http and http4 is quite different. So only simple configurations could work reliably.


How much information is needed to submit a PR

I noticed that the read has been expanded, and there are submission guidelines. I was going to submit a few companies but some of the information I'm not able to locate, what is needed to submit a PR and how much can be added later?

The only requirements are the name and the website. I should add that to the README. However, if I notice other info missing, I'll ask for it in the PR. If you don't have it, just mention that in the PR description, and I'll merge it without bugging you :)

I added some additional information about this in the README here: https://github.com/jessicard/remote-jobs/commit/007d4b629b100004c36e538767fd5273e00bc371 Thanks!


apps.py ( configuration )

Hi,
Is it possible to set ckeditor configuration in apps.py file as reccomended on django website?

If it's exposed to the global django.conf.settings then it should work.

I don't think I'd put settings inside appconfigs, since django-ckeditor reads settings from django.conf.settings anyway. Putting settings in apps.py files just sounds like a way to hide settings instead of avoiding them altogether.
As long as Django doesn't move towards being settings-free I don't think there's a way to substantially improve things here.


PyPI Release?

Hi there,
I'm using this library in some of my own libraries, and it would be awesome if you could cut a new release to PyPI since you now support Python 3 =)

See #192 and https://groups.google.com/forum/#!topic/pythonforfacebook/Xxj1u22yNXU.

d'oh, thanks


comfyui-refiners is a nightmare to install

@deltheil Hi there! First, I want to commend you on creating an exceptional model that’s outperforming competitors. However, installing this node in ComfyUI has proven challenging for most Windows users. Despite following the installation steps, including requirements.txt, the process frequently fails, throwing import errors. Furthermore, installing refiners pulls in numpy==1.24.4, which breaks compatibility with several other custom nodes, leading to frustration among developers.
Several devs have voiced concerns about this, so it might be worth prioritizing a fix. Specifically, the imports in both box_segmenter.py and grounding_dino.py could use adjustments to bypass these issues and prevent the following recurring error messages in ComfyUI logs:
Error Traceback 1:
Traceback (most recent call last):
  File "C:\Users\Admin\comfyui\nodes.py", line 2012, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\custom_nodes\comfyui-refiners\__init__.py", line 3, in <module>
    from .box_segmenter import NODE_CLASS_MAPPINGS as box_segmenter_mappings
  File "C:\Users\Admin\custom_nodes\comfyui-refiners\box_segmenter.py", line 5, in <module>
    from refiners.fluxion.utils import image_to_tensor, no_grad, tensor_to_image
ModuleNotFoundError: No module named 'refiners'

Even when refiners is indeed installed...:
Error Traceback 2:
Traceback (most recent call last):
  File "C:\Users\comfyui\nodes.py", line 2012, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\custom_nodes\comfyui-refiners\__init__.py", line 3, in <module>
    from .box_segmenter import NODE_CLASS_MAPPINGS as box_segmenter_mappings
  File "C:\Users\custom_nodes\comfyui-refiners\box_segmenter.py", line 6, in <module>
    from refiners.solutions import BoxSegmenter as _BoxSegmenter
ModuleNotFoundError: No module named 'refiners.solutions'

Similar conversation and more debug details could be found in #472

Hi @martintomov, as discussed on discord:

we haven't tested the nodes on windows and we know the installation process has issues. We're unfortunately pretty busy on other unrelated things, though this has been bugging me for a while, so I'll try to somehow debug this in the following days.

Alright, I dusted off my old windows laptop and successfully got comfyui working with our custom nodes:

Now I simply need to check I can reproduce what I did (should be rather simple) and document the steps. Stay tuned.

hey laurent, appreciate you putting in the work! quick question — what numpy version are you using for this? i ran into conflicts with nodes like layerstyle and mixlab when numpy==1.24.4 got pulled in from the refiners.git install.
if you could keep these deps issues in mind when replicating the process, it’d be a great benchmark test for a real comfyui env. thanks!

Okay, I did everything a second time, here is the steps I did:

Install python (e.g. via winget: https://winget.run/pkg/Python/Python.3.11)

Install git (e.g. via winget: https://winget.run/pkg/Git/Git)

Create a directory where I'll install everything:

PS C:\Users\Laurent\Documents> mkdir comfy
PS C:\Users\Laurent\Documents> cd comfy

(Optional) Create a python virtual environment, to not install everything globally:

PS C:\Users\Laurent\Documents\comfy> python -m venv .venv
PS C:\Users\Laurent\Documents\comfy> .\.venv\Scripts\activate

Install comfy-cli:

(.venv) PS C:\Users\Laurent\Documents\comfy> pip install comfy-cli

Setup ComfyUI:

(.venv) PS C:\Users\Laurent\Documents\comfy> comfy --here install

Install the comfyui-refiners custom nodes:

(.venv) PS C:\Users\Laurent\Documents\comfy> comfy node registry-install comfyui-refiners

Ensure that comfyui-refiners's dependencies are installed (from what I observed in the source code of comfy-cli, this isn't handled correctly):

(.venv) PS C:\Users\Laurent\Documents\comfy> pip install -r .\ComfyUI\custom_nodes\comfyui-refiners\requirements.txt

Start ComfyUI:

(.venv) PS C:\Users\Laurent\Documents\comfy> comfy launch

@Laurent2916 Thank you for your work once again! It works like a charm.


Does not work properly with nvim-tree.lua

steps to reproduce:
$ cat test.vim
call plug#begin(stdpath('data').'/plugged')
Plug 'windwp/nvim-autopairs'
Plug 'kyazdani42/nvim-tree.lua'
call plug#end()

lua << EOF
require('nvim-autopairs').setup {}
EOF

$ nvim -u test.vim test.py

Now try multiline comments """ (https://github.com/windwp/nvim-autopairs/blob/master/lua/nvim-autopairs/rules/basic.lua#L29), it does not work.
Without nvim-tree.lua this rule works as expected.

I am experiencing the same behavior. Custom rules also do not work for me as long as nvim-tree is installed.


fix: bump minijinja version and add test for llama 3.1 tools

This PR adds tojson support into chat templates, tests for meta-llama/Meta-Llama-3.1-8B-Instruct's template and some logic to avoid an indexing issue with messages.
Resolves: https://github.com/huggingface/text-generation-inference/issues/2460

Thanks @drbh youre the man! Hoping to have this merged and testing soon ;)

merging as the failing test in CI is unrelated to these changes (test_flash_llama_exl2_load only calls generate and never uses a template or interacts with minijinja) additional this PR does not contain any logic changes and only bumps minijinja and adds a new test.

@arshabdi thank you for reporting the issue and the kind words 🙏
It appears that to support meta-llama/Meta-Llama-3.1-8B-Instruct we just needed to bump minijinja. minijinja's newer version adds support for tojson and set messages = messages[1:] that are used within the template. I've added a test for the specific template and tested generations locally. Please let me know if you still have any issues!


Question: function overriding doesn't seem to work in python

Hello,
I have a framework in python, now I want to rewrite it in rust using pyo3.
The framework has a Base class for users to inherent, in the child class, a user would provide implementation for a function "do_work". And my framework (the base class) will call that "do_work" function.
But the same paradigm doesn't seem to work with pyo3
I have the following in rust:
#[pyclass(subclass)]
struct MyClass {
    num: i32,
    debug: bool,
}

#[pymethods]
impl MyClass {
    #[new]
    fn new() -> Self {
        MyClass { num:32, debug: false }
    }

    #[classmethod]
    fn print_test(cls: &PyType) -> PyResult<i32> {
        println!("print from rust: {}", 23);
        let gil = Python::acquire_gil();
        let py = gil.python();
        cls.call_method("override_test", (), None);
        Ok(32)
    }

    #[classmethod]
    fn override_test(cls: &PyType) -> PyResult<i32> {
        println!("print within rust");
        Ok(600)
    }
}

and this in python
class Test(testbed.MyClass):
    def __init__(self):
        self.debug = 32
        testbed.MyClass.__init__(self)

    def override_test(self):
        print("print within python")
        self.debug = 43
        return 453

demo = Test()
demo.print_test()
print("test result: ", demo.debug )

If I don't provide override_test in the child class "Test", things would work as expected. I would see print within rust
But if I provide an overriden function in the child class, this overriden function won't be called by the rust parent class.

 The compiler is even warning you this:warning: unused `Result` that must be used 35/36: pyo3-scratch
--> src/lib.rs:19:9
   |
19 |         cls.call_method("override_test", (), None);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_must_use)]` on by default
   = note: this `Result` may be an `Err` variant, which should be handled

Your override in Python is not a classmethod.

If I add ? at the end of cls_call_method(...)?;, so that the error is correctly propagated, so the print_test function looks like this:
    #[classmethod]
    fn print_test(cls: &PyType) -> PyResult<i32> {
        println!("print from rust: {}", 23);
        cls.call_method("override_test", (), None)?;  // <--- note: trailing ?
        Ok(32)
    }

Then I get this output from the Python script:
$ ./test.py
print from rust: 23
Traceback (most recent call last):
  File "/home/david/dev/pyo3-scratch/./test.py", line 17, in <module>
    demo.print_test()
TypeError: override_test() missing 1 required positional argument: 'self'

... which is a crash caused by the second error.

Thank you! I now know the issue. but I still can't make it to work, because in the rust function print_test, I don't know how to get a reference to the Object itself to call the other function override_test , I can't find a single example showing that. directly calling self.override_test() doesn't work.
_self_.call_method("override_test", (), None)?;
or
py.call_method(_self_, "override_test")?;

Try this:
    fn print_test(slf: &PyCell<Self>) -> PyResult<i32> {
        println!("print from rust: {}", 23);
        //I'm not sure what I should do here?
        slf.call_method("override_test", (), None)?;
        Ok(32)
    }

that worked like a charm! thank you!


Lane name empty exception is not documented as JSDoc at audio.js

Description
Currently, packet_audio_encode() in audio.js argument lane_name checking is:

is not including ascii control character
is not including non ascii characters
is not be over or equal 4

if(!(/^[\x20-\x7F]*$/.test(lane_name))) {
    throw new RangeError("For lane_name, non ascii or control ascii characters are not allowed");
  }
  if(lane_name.length > 3) {
    throw new RangeError(`For lane_name, over 3 characters string is not allowed, but got ${lane_name.length} characters`);
  }

Add a check: is not empty string
LaneInfo in lanes_info.js has already empty string checking.

Actually, empty check and test is already implemented. But not documented as JSDoc.
So changed issue title.


Time of start = ?

Is there a way to read the exact time when the experiment was started from the HCS output data?

Hi Julien,
This is Vikrant Kobla at Clever Sys. I'm the person who designed the HomeCageScan system from the start and can help you with most questions.
OK, for this question, since a real-time video analysis is assumed for such recording, that Video-Start-Time information is only saved in the Experiment Database to which that trial/video/recording was logged into. As a standalone video file, we don't have the meta-data saved in the file.
Saving the time of recording needs to be assigned to the video itself. Because, the video can be analyzed any number of times subsequently, each analysis can yield a different set of results (if the companion inputs are different), we didn't find it appropriate to save this information in the result file.
What do you think about this reasoning?  Any suggestions or comments welcome.

Having the time of start in the video name is valuable. This works unfortunately only when people kept the video files, though.
You might think about a way to create a metadata file independent on the results file (or as a standalone sheet in the result file), in order to have this kind of information computer readable.


The dynamicRemove() rollup is not removing methods with default arguments or is using the spread operator

The dynamicRemove() rollup is not identifying methods that have default values for arguments or is using the spread operator as TypeScript adds additional code before the embedded comment.
Need to update the logic to identify these cases and continue to remove these examples.

Fixed and published in v0.5.2


Load Directory Service can't load new handlers

Kapacitor 1.5.2 will refuse to start unless all handlers from the handlers/ directory have already been previously defined with define-topic-handler
Jun 13 15:37:25 xxx kapacitord: run: open server: failed to reload tasks/templates/handlers: failed to load file /opt/tick/kapacitor/handlers/areca.yaml: unknown handler: "areca"

areca.yaml:
id: areca
topic: internal/areca
match: changed() == TRUE
kind: publish
options:
  topics:
    - allalerts


Issues establishing TLS connection to secure Kafka

Requirement - what kind of business use case are you trying to solve?
We have a secure Kafka cluster running 5.2.2 (we have also tested on 5.3.2)
and are using the tls settings in Jaeger to connect to the cluster. However, it doesn't appear to be working
Problem - what in Jaeger blocks you from solving the requirement?
If we set the kafka client authentication parameter to 'Required' from 'Requested', we get an SSL handshake error in Kafka and a 'client has run out of available brokers' error from the Jaeger log. We believe the certificates are configured correctly.
Any help/guidance would be greatly appreciated.
Proposal - what do you suggest to solve the problem or improve the existing situation?
Any open questions to address

@karatekidandy hi, what version of Jaeger are you using? Could you please share Jaeger collector/ingester configuration?
cc @rubenvp8510

Collector:
jaeger-collector --collector.zipkin.http-port=9411 --kafka.producer.authentication=tls --kafka.producer.tls.ca=/opt/jaeger/project.crt --kafka.producer.tls.cert=/opt/jaeger/jaeger.crt --kafka.producer.tls.key=/opt/jaeger/jaeger.key --kafka.producer.brokers='${kafka_brokers}' --kafka.producer.topic=jaeger --kafka.producer.encoding=json
Ingester:
jaeger-ingester --ingester.deadlockInterval=0 --ingester.parallelism=2000 --kafka.consumer.authentication=tls --kafka.consumer.tls.ca=/opt/jaeger/project.crt --kafka.consumer.tls.cert=/opt/jaeger/jaeger.crt --kafka.consumer.tls.key=/opt/jaeger/jaeger.key --kafka.consumer.brokers='${kafka_brokers}' --kafka.consumer.topic=jaeger --kafka.consumer.group-id=jaeger-ingester --kafka.consumer.encoding=json --es.server-urls=http://${elasticsearch_url}:80 --es.num-shards=6 --es.num-replicas=1 --es.max-span-age=168h0m0s --es.tags-as-fields.all=true

Hi there, did the config help?

Hi @karatekidandy yes, I was able to reproduce the issue, I'm investigating the root cause, will go back with my findings.

@rubenvp8510 great thank you!

@rubenvp8510 Hey ruben, any update on the root cause/potential fix? Thanks!

Hi @karatekidandy sorry for late reply
After look this more closely, I wasn't able to reproduce the issue on 1.16,
Those are the configurations, commands for generate certificates and for launch ingester/collector that I used on my tests:
https://gist.github.com/rubenvp8510/34f7316e1dca6d4e73d654407efb1760
Hope this will help you.
The reason I thought I was able to replicate was because I tested using master (also tested on 1.17).  If you are using the latest version you need to add a flag to enable TLS.

for the collector: --kafka.producer.tls.enabled=true
for the ingester --kafka.consumer.tls.enabled=true )

Something like this:
https://gist.github.com/rubenvp8510/30f3a7beb5d86dd3f5d06ced0d1753d9
This was tested on kafka 2.12 which I think is what confluence platform 5.2.2 uses.

Thanks @rubenvp8510 will give this a go :) i appreciate your time working on this.

@karatekidandy were you able to resolve this issue? Can we close this ticket?


chore(deps): upgrade dev dependencies

Upgrades project dependencies. See details in workflow run.

Automatically created by projen via the "upgrade-dev-dependencies-k8s-25-main" workflow

⚪ Backport skipped
The pull request was not backported as there were no branches to backport to. If this is a mistake, please apply the desired version labels or run the backport tool manually.
Manual backport
To create the backport manually run:
backport --pr 2588

Questions ?
Please refer to the Backport tool documentation


0.2.0 tag missing

Looks like sbt-compat 0.2.0 is out: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/net.ground5hark.sbt/sbt-concat/scala_2.12/sbt_1.0/0.2.0/
But there's no tag.
@jroper do you have that tag locally?  Otherwise we can try and reconstruct which commit it was built from.

Sorry, I think the release process failed halfway through, and I manually completed the release, but forgot to complete the git side of things. I've pushed the tag now.


Chart.js 2.0.2 issues

I noticed the recommended chart.js version is 1.1.1 but this library is not compatible with 2.0.2.
here is a reference of some of the errors i get when using 2.0.2:
stack overflow
http://stackoverflow.com/questions/36528660/react-chartjs-gives-back-a-type-error-intermediate-valuecharttype-is-not-a
my stack trace

my implementation of Line chart

Hi there @AustinMCrane have you been using the newer v2 branch?
    "react-chartjs": "git://github.com/venari/react-chartjs.git#chartjs-v2",

I'm still getting the same error with react-chartjs.git#chartjs-v2 and<EMAIL_ADDRESS>

Take a look at https://github.com/jhudson8/react-chartjs/pull/109. Using the branch that is proposed for merge there is working for me in the interim.

When will the v2 version be the official?

When will the v2 version be the official ?!

When will the v2 version be the official ?!!


Calling this.setState() in onSelect handler disables checkbox toggle

Hi, @AllenFang
The issue is the following. This code works:
class App extends React.Component {
    constructor(props) {
        super(props);
        this.state = {value: ''};
        this.onSelectionChanged = this.onSelectionChanged.bind(this)
    }

    onSelectionChanged (row, isSelect, rowIndex, e) {
        console.log(this.state.value);
    }

    render () {
        const selectRow = {mode: 'checkbox', onSelect: this.onSelectionChanged};
        return (
        <BootstrapTable selectRow={selectRow} keyField='id' data={products} columns={columns}/>
        )
    }
}

(products and columns can be taken from docs example for instance)
However if you change console.log to, let's say, this:
    onSelectionChanged (row, isSelect, rowIndex, e) {
        this.setState({value: ''});
    }

then selection is broken.
As per my investigation, it happens because react keeps incorrect state of checkbox (checked: false) and in restoreStateOfTarget is restoring its unchecked state.
Unfortunately my understanding of React isn't that good to find a root cause so I'll appreciate your help in this issue.

@Ignalion please check https://github.com/react-bootstrap-table/react-bootstrap-table2/issues/411
Right now the workaround is you have to manage the selection. I will enhance it in the future.
Close it due to duplicated.

Sorry for lately fixed.....
RELEASE NOTE
now you can call setState in selectRow.onSelect and we support a feature that you can reject the selection, please check this and here is example

@AllenFang the same with me. If i use setState inside onSelect function - it breaks custom style of selected row and checkboxes

@AllenFang It seems the problem with setState still persists in version 4.0.3. I had to use the workaround mentioned in #297 to make it work. Possible regression since<EMAIL_ADDRESS>?


changing the install order of IAF and CS

https://hyc-cip-jenkins.swg-devops.com/blue/organizations/jenkins/Automation%2Fglobal_catalog_automation/detail/global_catalog_automation/124/pipeline

No longer applicable


Workaround obsolete API versions

This is a workaround for changes in API versions like
extensions/v1beta1 => apps/v1
Ignore group and version.
Signed-off-by: Sebastian Poehn<EMAIL_ADDRESS>

#6850
#7575

Drawback of this solution is that it will not catch resource conflicts of pre-existing resources with the same Kind but different GroupVersion. This can only happen for CRDs. I would expect that this case is rather rare. Impact might be that applying the change could fail.

Can you explain the difference between this PR, #7575, and the one @jlegrone proposed in #7625? It's getting really unclear what is the goal with three PRs trying to tackle the same problem, and what the goals of each PR accomplishes. There's not a whole lot of information here to describe what's the intention behind these PRs.

Sorry for raising confusion. I wanted to provide different implementation options so we can decide for the best one.
#7627 Ignores groupVersion when comparing existing vs. planned resources. Thus a change of the API version will no longer block an upgrade. However Kind on it's own is not unique. Example:
kind: Deployment
apiVersion: apps/v1
metadata:
  name: new

kind: Deployment
apiVersion: naughty.inc/v1
metadata:
  name: existing

In the Kubernetes maintained resource types there is no such conflicts. But CRDs could do weird things. Thus this implementation would not detect a pre-existing resource that does not belong to the Helm Release, for the case of clashing Kind + Name + Namespace.
I would favour this solution as it is simple and the described corner-case sounds rather exotic to me.
#7575 Same as #7627 but it partially handles the described corner-case. It will detect the clash, if the pre-existing or the created resource is a CRD.

closed in favour of https://github.com/helm/helm/pull/7649.


Using phantomjs.run in rails controller, any way to debug or see console?

I'm having difficulty trying to debug the script I'm executing from rails:
Phantomjs.run('./public/javascripts/thirdScreenCapture.js', 'email', 'password')

This then runs my thirdScreenCapture.js:
var webPage = require('webpage');
var page = webPage.create();

var args = require('system').args;
var email = args[1];
var pass = args[2];
var url = args[3];

page.viewportSize = { width: 1920, height: 1080 };
page.open('http://localhost:3000', function start(status) {
  var email = args[1];
  var pass = args[2];
  page.evaluate(function (email, pass) {
    document.querySelector('input[id=user_email]').value = email;
    document.querySelector('input[id=user_password]').value = pass;
    document.querySelector('form[id=new_user]').submit();
  }, email, pass);
  page.onLoadFinished = function(status) {
    console.log('Status: ' + status);
    window.setTimeout(function () {
      page.render('./public/appPage.png');
      phantom.exit();
    }, 3000);
  };
});

This works correctly from command line:
phantomjs public/javascripts/thirdScreenCapture.js<EMAIL_ADDRESS>password http://localhost:3000/

But when from the controller the rails server hangs and nothing is produced. I just need to somehow access the console/logging for the phantomjs code being run. Any ideas?

I'm sorry, we can't help you with problems with the Rails controller.


Add Automated System Tests with the SAPUI5 Test Recorder to Your CI/CD Pipeline

Tutorials: https://developers.sap.com/de/tutorials/cp-cicd-systemtest-recorder.html
I was running the tutorial step by step, and it works perfect
When I get to step 5, begins to fail the previous step with this error:
INFO: Spec started: Should navigate to the product
INFO: No elements found using by.control locator. This is what control locator last logged: Found no view with ID 'container-cart---category' and viewName 'undefined' -  sap.ui.test.Opa5
No controls found so matcher pipeline processing was skipped -  sap.ui.test.pipelines.MatcherPipeline
INFO: Expectation FAILED: Failed: No element found using locator: by.control({"controlType":"sap.m.Text","viewId":"container-cart---category","properties":{"text":"Flat Watch HD32"},"interaction":{"idSuffix":"inner"}})
INFO: Spec finished: Should navigate to the product with status: FAILED
Is this "undefined" is due to a timing problem? How can it be solved?

Can you please check the screenshot report - what do you see at the moment of the error ?

Can you please check the screenshot report - what do you see at the moment of the error ?

PS C:\BACKUP\cNestor_All Techs\Mobile\GitLAB projects\UIVeri5\teched-uiveri5\uiveri5> uiveri5
INFO: @ui5/uiveri5 v1.46.3
INFO: Resolving specs
INFO: Check for latest version of: chromedriver.exe from: https://chromedriver.storage.googleapis.com/LATEST_RELEASE
INFO: Found latest version of chromedriver.exe: 91.0.4472.101
INFO: Found correct binary locally<EMAIL_ADDRESS>INFO: Executing 1 specs
[09:50:39] I/launcher - Running 1 instances of WebDriver
INFO: Opening webdriver connection with capabilities: {"browserName":"chrome","platform":"WINDOWS","chromeOptions":{"args":["--no-sandbox","--disable-dev-shm-usage","--disable-gpu","disable-infobars"]},"count":1,"loggingPrefs":{"browser":"SEVERE"}}
DevTools listening on ws://<IP_ADDRESS>:56536/devtools/browser/66101b9b-1127-49d3-a9e4-512456fd1c52
[24644:23940:0624/095044.681:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is swiftshader
[25692:29832:0624/095044.899:ERROR:device_event_log_impl.cc(214)] [09:50:44.900] USB: usb_device_handle_win.cc:1058 Failed to read descriptor from node connection: Uno de los dispositivos conectados al sistema no funciona. (0x1F)
[25692:29832:0624/095044.901:ERROR:device_event_log_impl.cc(214)] [09:50:44.901] USB: usb_device_handle_win.cc:1058 Failed to read descriptor from node connection: Uno de los dispositivos conectados al sistema no funciona. (0x1F)
INFO: Suite started: teched
INFO: Spec started: Should validate the home screen
INFO: Opening: https://sapui5.hana.ondemand.com/test-resources/sap/m/demokit/cart/webapp/index.html
INFO: UI5 Version: 1.90.0
INFO: UI5 Timestamp:<PHONE_NUMBER>26
INFO: Spec finished: Should validate the home screen with status: PASSED
INFO: Spec started: Should search for a product
INFO: Spec finished: Should search for a product with status: PASSED
INFO: Spec started: Should navigate to the product
INFO: No elements found using by.control locator. This is what control locator last logged: Found no view with ID 'container-cart---category' and viewName 'undefined' -  sap.ui.test.Opa5
No controls found so matcher pipeline processing was skipped -  sap.ui.test.pipelines.MatcherPipeline
INFO: Expectation FAILED: Failed: No element found using locator: by.control({"controlType":"sap.m.Text","viewId":"container-cart---category","properties":{"text":"Flat Watch HD32"},"interaction":{"idSuffix":"inner"}})
INFO: Spec finished: Should navigate to the product with status: FAILED
INFO: Spec started: should see the Home page
INFO: Spec finished: should see the Home page with status: PASSED
INFO: Spec started: should see the Product page
INFO: Spec finished: should see the Product page with status: PASSED
INFO: Suite finished: teched with status: FAILED for: 11.566s
INFO: Suite specs summary, total: 5, passed: 4, failed: 1, pending: 0, disabled: 0
INFO: Suite expectations summary, total: 3, passed: 2, failed total: 1, failed with error: 1, failed with image comparison: 0
INFO: Overall status: FAILED for: 11.589s
INFO: Overall suites summary, total: 1, passed: 0, failed: 1
INFO: Overall specs summary, total: 5, passed: 4, failed: 1, pending: 0, disabled: 0
INFO: Overall expectations summary, total: 3, passed: 2, failed total: 1, failed with error: 1, failed with image comparison: 0
[09:50:58] I/launcher - 0 instance(s) of WebDriver still running
[09:50:58] I/launcher - chrome #01 failed 1 test(s)
[09:50:58] I/launcher - overall: 1 failed spec(s)
[09:50:58] E/launcher - Process exited with error code 1
PS C:\BACKUP\cNestor_All Techs\Mobile\GitLAB projects\UIVeri5\teched-uiveri5\uiveri5>

This is the log, please check the screenshot report - target\report\screenshots\report.html

This is the log, please check the screenshot report - target\report\screenshots\report.html

Can you please copy the content of "Should navigate to the product" and also the PO methods that it uses ?

Can you please copy the content of "Should navigate to the product" step and also the PO methods that it uses ?

Should navigate to the product

    Expectations
    Total: 1
    Passed: 0
    Failed: 1
    Duration: 1.3 sec

1.

Expectation FAILED: Expected ''  ''

      Log: No elements found using by.control locator. This is what control locator last logged: Found no view with ID 'container-cart---category' and viewName 'undefined' -  sap.ui.test.Opa5

No controls found so matcher pipeline processing was skipped -  sap.ui.test.pipelines.MatcherPipeline
Error stack: NoSuchElementError: No element found using locator: by.control({"controlType":"sap.m.Text","viewId":"container-cart---category","properties":{"text":"Flat Watch HD32"},"interaction":{"idSuffix":"inner"}})
at C:\Users\ncastagno\AppData\Roaming\npm\node_modules@ui5\uiveri5\node_modules\protractor\built\element.js:814:27
at ManagedPromise.invokeCallback_ (C:\Users\ncastagno\AppData\Roaming\npm\node_modules@ui5\uiveri5\node_modules\selenium-webdriver\lib\promise.js:1376:14)
at TaskQueue.execute_ (C:\Users\ncastagno\AppData\Roaming\npm\node_modules@ui5\uiveri5\node_modules\selenium-webdriver\lib\promise.js:3084:14)
at TaskQueue.executeNext_ (C:\Users\ncastagno\AppData\Roaming\npm\node_modules@ui5\uiveri5\node_modules\selenium-webdriver\lib\promise.js:3067:27)
at C:\Users\ncastagno\AppData\Roaming\npm\node_modules@ui5\uiveri5\node_modules\selenium-webdriver\lib\promise.js:2927:27
at C:\Users\ncastagno\AppData\Roaming\npm\node_modules@ui5\uiveri5\node_modules\selenium-webdriver\lib\promise.js:668:7
at processTicksAndRejections (internal/process/task_queues.js:93:5)Error
at ElementArrayFinder.applyAction_ (C:\Users\ncastagno\AppData\Roaming\npm\node_modules@ui5\uiveri5\node_modules\protractor\built\element.js:459:27)
at ElementArrayFinder.protractorModule.parent.exports.ElementArrayFinder.applyAction_ (C:\Users\ncastagno\AppData\Roaming\npm\node_modules@ui5\uiveri5\src\reporter\actionInterceptor.js:24:25)
at ElementArrayFinder.<computed> [as click] (C:\Users\ncastagno\AppData\Roaming\npm\node_modules@ui5\uiveri5\node_modules\protractor\built\element.js:91:29)
at ElementFinder.<computed> [as click] (C:\Users\ncastagno\AppData\Roaming\npm\node_modules@ui5\uiveri5\node_modules\protractor\built\element.js:831:22)
at Object.iSelectTheFirstProduct (C:\BACKUP\cNestor_All Techs\Mobile\GitLAB projects\UIVeri5\teched-uiveri5\uiveri5\pages\home.js:24:11)
at UserContext.<anonymous> (C:\BACKUP\cNestor_All Techs\Mobile\GitLAB projects\UIVeri5\teched-uiveri5\uiveri5\teched.spec.js:18:24)
at C:\Users\ncastagno\AppData\Roaming\npm\node_modules@ui5\uiveri5\node_modules\jasminewd2\index.js:112:25
at new ManagedPromise (C:\Users\ncastagno\AppData\Roaming\npm\node_modules@ui5\uiveri5\node_modules\selenium-webdriver\lib\promise.js:1077:7)
at ControlFlow.promise (C:\Users\ncastagno\AppData\Roaming\npm\node_modules@ui5\uiveri5\node_modules\selenium-webdriver\lib\promise.js:2505:12)
at schedulerExecute (C:\Users\ncastagno\AppData\Roaming\npm\node_modules@ui5\uiveri5\node_modules\jasminewd2\index.js:95:18)
From: Task: Run it("Should navigate to the product") in control flow
at UserContext.<anonymous> (C:\Users\ncastagno\AppData\Roaming\npm\node_modules@ui5\uiveri5\node_modules\jasminewd2\index.js:94:19)
at attempt (C:\Users\ncastagno\AppData\Roaming\npm\node_modules@ui5\uiveri5\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:4297:26)
at QueueRunner.run (C:\Users\ncastagno\AppData\Roaming\npm\node_modules@ui5\uiveri5\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:4217:20)
at runNext (C:\Users\ncastagno\AppData\Roaming\npm\node_modules@ui5\uiveri5\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:4257:20)
at C:\Users\ncastagno\AppData\Roaming\npm\node_modules@ui5\uiveri5\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:4264:13
at C:\Users\ncastagno\AppData\Roaming\npm\node_modules@ui5\uiveri5\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:4172:9
at processTicksAndRejections (internal/process/task_queues.js:93:5)
From asynchronous test:
Error
at Suite.<anonymous> (C:\BACKUP\cNestor_All Techs\Mobile\GitLAB projects\UIVeri5\teched-uiveri5\uiveri5\teched.spec.js:17:3)
at addSpecsToSuite (C:\Users\ncastagno\AppData\Roaming\npm\node_modules@ui5\uiveri5\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1107:25)
at Env.describe (C:\Users\ncastagno\AppData\Roaming\npm\node_modules@ui5\uiveri5\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1074:7)
at describe (C:\Users\ncastagno\AppData\Roaming\npm\node_modules@ui5\uiveri5\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:4399:18)
at Object.<anonymous> (C:\BACKUP\cNestor_All Techs\Mobile\GitLAB projects\UIVeri5\teched-uiveri5\uiveri5\teched.spec.js:4:1)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)

it("Should navigate to the product", function () {
When.onTheHomePage.iSelectTheFirstProduct();
Then.onTheProductPage.theProductTitleIsShown();
Then.onTheProductPage.theProductCouldBeOrdered();
});
iSelectTheFirstProduct: function () {
  element(by.control({
      controlType: "sap.m.Text",
      viewId: "container-cart---category",
      properties: {
          text: "Flat Watch HD32"
      },
      interaction: {
          idSuffix: "inner"
      }
  })).click();
}

Product: {
actions: {
// add action functions here
},
assertions: {
  // add assertion functions here
  theProductTitleIsShown: function () {
    var header = element(by.control({
        controlType: "sap.m.ObjectHeader",
        viewId: "container-cart---product",
        bindingPath: {
            path: "/Products('HT-6130')",
            propertyPath: "Name"
        }
    }));
    expect(header.asControl().getProperty('title')).toBe('Flat Watch HD32');
},
theProductCouldBeOrdered: function () {
  var button = element(by.control({
      controlType: "sap.m.Button",
      viewId: "container-cart---product",
      i18NText: {
          propertyName: "text",
          key: "addToCartShort"
      },
      interaction: {
          idSuffix: "BDI-content"
      }
  }));
  expect(button.isDisplayed()).toBeTruthy;
}
}

}

Saludos
Mgr. Néstor Castagno
I+D Manager
TGV - Excelencia en Soluciones Informáticas
• +54 11 4341-7800 (6041)
6 +54 11 3422-3487
• www.tgv.com.arhttp://www.tgv.com.ar/
De: maximnaidenov @.>
Enviado el: jueves, 24 de junio de 2021 11:06
Para: SAPDocuments/Issues @.>
CC: Castagno, Nestor Oclides - tgv.com.ar @.>; Author @.>
Asunto: Re: [SAPDocuments/Issues] Add Automated System Tests with the SAPUI5 Test Recorder to Your CI/CD Pipeline (#437)
Can you please copy the content of "Should navigate to the product" and also the PO methods that it uses ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/SAPDocuments/Issues/issues/437#issuecomment-867665266, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AO3XJAMFHHJQVIQ4QRBNI7DTUM3WJANCNFSM464OGRCA.

I already found the problem: when doing "Press" on the text field, the Test Recorder generates "viewId: "container-cart---category"" instead of "viewName: "sap.ui.demo.cart.view.Home""