Create method to return a masked array

This is mainly for plotting in MPL, which does not like NaNs.

Will take a look at this tomorrow. Have been working on plotting lately: https://github.com/xray/xray/tree/feature-plotting

Is this still something that would be useful?  If so, do we want a method on the DataArray object to get this sort of behavior:
In [1]: import xray
In [2]: import numpy as np
In [3]: da = xray.DataArray(np.random.random_sample(size=(5, 4)))

In [4]: da.where(da < 0.5)
Out[4]:
<xray.DataArray (dim_0: 5, dim_1: 4)>
array([[ 0.127,    nan,  0.26 ,    nan],
       [ 0.377,  0.336,  0.451,    nan],
       [ 0.123,    nan,  0.373,  0.448],
       [ 0.129,    nan,    nan,  0.352],
       [ 0.229,    nan,    nan,  0.138]])
Coordinates:
  * dim_0    (dim_0) int64 0 1 2 3 4
  * dim_1    (dim_1) int64 0 1 2 3

In [5]: da.where(da < 0.5).to_masked_array()
Out[5]:
masked_array(data =
 [[0.12696983303810094 -- 0.26047600586578334 --]
 [0.37674971618967135 0.33622174433445307 0.45137647047539964 --]
 [0.12310214428849964 -- 0.37301222522143085 0.4479968246859435]
 [0.12944067971751294 -- -- 0.35205353914802473]
 [0.2288873043216132 -- -- 0.1375535565632705]],
             mask =
 [[False  True False  True]
 [False False False  True]
 [False  True False False]
 [False  True  True False]
 [False  True  True False]],
       fill_value = 1e+20)

Alternatively, we could add a @property to the DataArray but I don't think that is necessary.


Breaks with a TSConfig that "extends" from an external config file

I tried running this tool on a package of mine that has a tsconfig.json that extends from a shared, external config file
// Config file at `/Users/me/Code/project/tsconfig.json`
{
  "extends"<EMAIL_ADDRESS>}

The way that the extends field is handled assumes that you're extending from a local file that can be resolved relative to the one being parsed
https://github.com/antongolub/tsc-esm-fix/blob/a46afa4c1a32484dd1daf71e34a163c338fc2c9a/src/main/ts/util.ts#L31
This is resulting in an exception being raised when trying to run the tool, as it tries and fails to append the external config file's identifier to the directory of the project's config file; with the example config given above at the specified path, the resulting exception would look like
Error: ENOENT: no such file or directory, open<EMAIL_ADDRESS>

@alexlafroscia
Oh, I forgot to land @topoconfig/extends here. It's ironic. Thanks for highlighting the issue.

hello @antongolub
this fix in 3.1.1  now produces this fatal error for me
SyntaxError: Expected double-quoted property name in JSON at position 111
    at JSON.parse (<anonymous>)
    at parse (node_modules/@topoconfig/extends/target/esm/index.mjs:52:36)
    at node_modules/@topoconfig/extends/target/esm/index.mjs:96:40
    at pipe (node_modules/@topoconfig/extends/target/esm/index.mjs:23:68)
    at processResource (file:node_modules/@topoconfig/extends/target/esm/index.mjs:91:34)
    at loadResource (node_modules/@topoconfig/extends/target/esm/index.mjs:82:19)
    at populateSync (node_modules/@topoconfig/extends/target/esm/index.mjs:224:19)
    at resolveTsConfig (node_modules/tsc-esm-fix/target/esm/util.mjs:12:42)
    at node_modules/tsc-esm-fix/target/esm/finder.mjs:15:26
    at Array.reduce (<anonymous>)

previous 3.1.0 is without any fatal error

Mea culpa. Missing json5 parser.


Cannot send coins to contract address

Describe the bug
Wallet does not allow to send coin to a contract address
To Reproduce
Steps to reproduce the behavior:

Go to massa station wallet
Click on send
Enter a contract address ex: AS12J5GFW1QTjGQyZ4HRYUZxFT6PjNDUE94rdW5PGnntib4pYZs9A
See error : Recipient address is not a valid Massa address

Expected behavior
We should be able to send coins to a smart contract
Screenshots

MassaStation version
Latest

@gregLibert @peterjah need your inputs on this need.

@Ben-Rey what is the use case ? i'm not sure we should allow this.

That's a misunderstanding on my side sorry, we can close it


"Copy to clipboard" button next to dbKey

Make it easy to "remember" dbKey by copying it into clipboard. For this add "copy ti clipboard" button next to "Assembly Version ID":

@frano-m, can you add a copy to the clipboard functionality for "Assembly Version ID" on the detail pages. Thanks!


DocsArchive-<IP_ADDRESS>Auto archive content

Please don't merge this PR until target archive repo PR https://github.com/OPS-E2E-PPE/docs-archive-test-target_716fe47f-eb46-48c5-a225-1101c37dd2d4/pull/1 is merged into live branch.
Auto archive content to https://github.com/OPS-E2E-PPE/docs-archive-test-target_716fe47f-eb46-48c5-a225-1101c37dd2d4.git

Docs Build status updates of commit 7d3c41c:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error]

Cannot sync git repo to specified commit because branch Archive_master_2019-09-26-09-17-13 has been deleted or has been force pushed: fatal: Couldn't find remote ref Archive_master_2019-09-26-09-17-13

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Cargo rand compilation errors

Hi,
This is a general cargo question as a beginner.
I have a rust code which uses rand so i add rand="0.4.3" as a dependency. Idk why when the registry updates randv0.5.5(latest) is automatically downloaded and it also runs into "break loop" error which was stabilized a while ago. I am not sure how to suppress this error or make it not install the latest version.
Cargo.toml
[package]
name = "hello-world"
version = "0.0.0"
authors = [""]
[dependencies]
time = ">=0.1.0"
rand = "0.4.3"
rustc-serialize = "0.3"
histogram = "*"
I get this error. The repository is not cloned locally so i cannot apply the patch https://github.com/rust-lang/rust/issues/37339.

Compiling rand v0.5.5
error: break with a value is experimental (see issue #37339)
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.5.5/src/distributions/uniform.rs:674:25
|
674 |                         break d;
|                         ^^^^^^^
|
= help: add #![feature(loop_break_value)] to the crate attributes to enable
error: pub(restricted) syntax is experimental (see issue #32409)
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.5.5/src/distributions/float.rs:71:5
|
71 | pub(crate) trait IntoFloat {
|     ^^^^^
|
= help: add #![feature(pub_restricted)] to the crate attributes to enable
error: pub(restricted) syntax is experimental (see issue #32409)
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.5.5/src/rngs/mod.rs:174:27
|
174 | #[cfg(feature="std")] pub(crate) mod thread;
|                           ^^^^^
|
= help: add #![feature(pub_restricted)] to the crate attributes to enable
error: aborting due to 3 previous errors
error: Could not compile rand.

What am i doing wrong? What is the right way to go about it?

Hi @rida914-4.  I'm not able to reproduce getting rand 0.5 with the example you posted.  Can you post a copy of your Cargo.lock file?  Also, which version of cargo are you using?

cargo 0.19.0-nightly (c995e9eb5 2017-03-17)
I am supposed to use this old version. that is why i am trying to force cargo to not install the latest rand version.
I have attached the lock file. You will see mutiple versions of rand. 0.3.22 is the one i specified. and v0.5.5 and 0.4.3, it installs while updating the registry.

cargo.txt

It looks like the twox-hash crate has a range specifier for the rand crate (">= 0.3.10, < 0.6"), and Cargo always picks the newest version available.  It also looks like you might be able to use an earlier version.  If you specify twox-hash = "=1.1.0" in your dependencies, it will pick the older version that only uses rand 0.4.  Packages really shouldn't make breaking dependency changes like that for minor version bumps, but such is life.  It looks like all the uses of twox-hash in your lock file are under your control, so hopefully that should help?
An alternative if you check your Cargo.lock into source is to downgrade it manually with a command like cargo update -p rand:0.5.5 --precise=0.4.3.  However, that can be a pain when you need to update the lock file later.
Another option is to check out your own copy of twox-hash, modify its Cargo.toml to use the version of rand that you want, and then set up an override.  See https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html for documentation on how to do that.  However, that is a bit of a hassle.
Maybe someone else knows of a better way to override the dependency, but I'm not aware of any other methods.

Thanks for such a detailed answer. That was spot on. The issue is due to twox-hash.
I am trying to apply patch in the main Cargo.toml file. However, it is not working. is this how we override the dependencies and sub dependencies?

[patch.'rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)']
rand = { git = "https://github.com/rust-random/rand", rev = "7d09b3606811300741dc1a44ce6a27ea846e971c" }

is this how we patch?
or

[patch.crates-io]
rand = { git = "https://github.com/rust-random/rand", rev = "7d09b3606811300741dc1a44ce6a27ea846e971c" }

Both are not working.

I don't think patching will affect dependencies of dependencies.  If you want to use the patching approach, you'll need to clone the twox-hash crate and change its Cargo.toml to point to the version of rand that you want.  Unfortunately it looks like [patch] was introduced in rust 1.21, so it won't work with your version.  You can use the older [replace] method:
[dependencies]
twox-hash = "1.1.1"

[replace]
"twox-hash:1.1.1" = {path="twox-hash-1.1.1"}

Are you unable to change the dependency of twox-hash to 1.1.0?

I was able to change dependencies. However when there are sub dependencies , does this method work?

Ok great! Sounds like this was sorted out, so I'm gonna close this.


Prevent error if event.multiValueHeaders is null

Description of changes:
Since event.multiValueHeaders can be null in many cases, this fix prevents an error trying to call Object.entries on a null object.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Thanks for the PR. In what scenarios it's it null?

It seems to be null when testing using the API Gateway. Moreover, I think it was only added to API Gateway recently and isn't used by other event sources (ALB, for example) at all. The point is, it can definitely happen, and the same way the code checks whether headers is set, it should do the same for multiValueHeaders.

Interesting. If that's the case it sounds like an APIGW bug, but it should be fine to merge this. ALB does support it but you have to turn it on (see template in examples/alb in v4 branch)

Now that I think of it it might not be happening in the APIG. Still, I think it's safer to have this check merged in than rely on people to read docs and turn stuff on. :)

Hmm so I am getting it with the APIGW test...


Project Count Mis-match

Project count is different for Master Owner / Advance Role users.
Reason: Role is not Effective on EasyCloudBooks.User Project at time of Page Load.
so Project get / Project Status get is calling with Executive Privilege by default.
Project without as project manager are not coming in count.

Added new Token structure with role and master owner token like api token.
now everything is same as api token.


feat(ci): migrate minikube to kubeadm via kind

Resolves #314.
Signed-off-by: Ranadeep Polavarapu<EMAIL_ADDRESS>Removed minikube and added kubeadm with kind to create a single node cluster.

I got kind (kubernetes-in-docker) to bootstrap via kubeadm. Could someone help with why integration tests are failing?

If you see the Travis log,you can see that build failed. not the actual tests. Can you check whether gox is available on the VM?

@RanadeepPolavarapu  I tried setting up a single node cluster using kind. I was not able to detect the disk attach and detach that we do as part of integration testing. Can this be changed to just kubeadm based local cluster instead of using kind . This will make the travis VM itself the node in the cluster.

I tried to make it just kubeadm initially but it was having issues bootstrapping the cluster due to Travis itself being run in a container. I did some research there was a method to do kubeadm in docker for CI environments that people were using two years ago. Google recently added kind and deprecated that method of kubeadm in docker since it was a bit more hacky. Kind essentially does the same thing with kubeadm bootstrapping the cluster but optimized for inside a container.
I'll spend more time on this on the weekend.

On Oct 10, 2019, at 7:38 AM, Akhil Mohan<EMAIL_ADDRESS>wrote:

@RanadeepPolavarapu I tried setting up a single node cluster using kind. I was not able to detect the disk attach and detach that we do as part of integration testing. Can this be changed to just kubeadm based local cluster instead of using kind . This will make the travis VM itself the node in the cluster.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

@RanadeepPolavarapu  Are there any updates on the changes requested?

@RanadeepPolavarapu  did you make the requested changes?

Can this be done in a similar way how local-cluster is done in kubernetes?

This PR has been inactive for a long time. Please re-open if you have new changes to push into this PR.


Build, Integrate and Scale-up a Spring Interceptor for Requests and Responses in Java (Spring Boot)

Topic Suggestion
Build, Integrate and Scale-up a Spring Interceptor for Requests and Responses in Java (Spring Boot)
Writing sample(s):
Include any links or writing samples - to help our team better gauge your writing quality.
Proposal Submission
Proposed title of article
[Security] Build, Integrate and Scale-up a Spring Interceptor for Requests and Responses in Java (Spring Boot)
Proposed article introduction
In my personal project, I have had reasons to add an interceptor. As the name sounds, an Interceptor is a class that comes in between a request reaching the intended endpoint and a response returning to the requesting client - user or application.
An interceptor can check a request before sending it to its destination. At this point, we might want to perform some authentication of headers, validations of the request body or simply modify the request object by adding some more fields or data to the request body.
The same can be done for all responses coming from the endpoints. We can intercept them, modify them before passing to the client.  However, in this tutorial, we will only build a request/response interceptor while we will breeze through building an encryption/decryption gateway in the same interceptor.
Key takeaways
At the end of this tutorial, readers would:

understand what configuration classes
understand what the @Configuration annotation does
be able to implement interceptors for their projects
be able to manipulate and scale up the interceptors of the project

Article quality
Most articles out there mainly focus on building the interceptor. No emphasis on how it can be scaled and what more can be done with it beyond request and responses In this article, I go through not just building it but working with it to perfectly suit requirements for now and for the future

Sounds like a helpful topic - lets please be sure it adds value beyond what is in any official docs and/or what is covered in other blog sites. (the articles should go beyond a basic explanation - and it is always best to reference any EngEd article and build upon it).
Please be attentive to grammar/readability and make sure that you put your article through a thorough editing review prior to submitting for final approval. (There are some great free tools that we reference in EngEd resources.)
ANY ARTICLE SUBMITTED WITH GLARING ERRORS WILL BE IMMEDIATELY CLOSED.
Please be sure to double check that it does not overlap with any existing EngEd articles, articles on other blog sites, or any incoming EngEd topic suggestions (if you haven't already) to avoid any potential article closure, please reference any relevant EngEd articles in yours. - Approved


Loss of variable-objective synchrony/indexing when using parallelization

It seems like the multithreading process is losing the indexing synchrony between the design space values and the objective space values. As in values result.X[0] is not the solution to result.F[0], it is the solution to result.F[20] if even included in result.F at all. With parallelization off, everything works beautifully.
Here is the generalized-code
import numpy as np
from pymoo.algorithms.nsga2 import NSGA2
from pymoo.model.problem import Problem
from pymoo.optimize import minimize
from multiprocessing.pool import ThreadPool

class MyProblem(Problem):

def __init__(self, **kwargs):
    super().__init__(n_var=2,
                     n_obj=3,
                     n_constr=0,
                     xl=np.array([1, 10]),
                     xu=np.array([9, 31]),
                     elementwise_evaluation=True,
                    **kwargs)

def _evaluate(self, x, out, *args, **kwargs):

    MCO_function.n1 = int(x[0])
    MCO_function.n2 = int(x[1])
    MCO_stats = Calculate(MCO_function)
    MCO_stats = MCO_stats.run()

#MCO_stats.array will return integer values.
    f1 = MCO_stats.array[4]
    f2 = MCO_stats.array[9]
    f3 = MCO_stats.array[14]

    out["F"] = [f1, f2, f3]

n_threads = 16

pool = ThreadPool(n_threads)

problem = MyProblem(parallelization = ('starmap', pool.starmap))
algorithm = NSGA2(pop_size=120)
res = minimize(problem,
               algorithm,
               ("n_gen", 20),
               verbose=True,
               seed=1)

pool.close()

My guess is that it's related to MCO_stats.run(). This function HAS to be run to return the proper MCO_stats.array values. Maybe there is some degeneracy between the threads, saving of solutions and running that function. However, it is my understanding that elementwise evaluation is computing one solution at a time.

If MCO is not thread-safe, this will still become an issue. elementwise_evaluation  means that the _evaluate function retrieves a single solution. However, the built-in features for parallelization will cause this function to be called in parallel (that is the whole purpose of using it).
Does it work without any issues in the regular serialized version?
Also, please make sure the objective values are, in fact, floats and not integers.

Thanks for the quick reply. I can confirm that the values are floats. I cant confirm that the tools I am using are thread safe. My problem is similar to that of this user.
https://github.com/kernc/backtesting.py/issues/125
The "Calculate" function is really just the Backtest class here
https://kernc.github.io/backtesting.py/doc/backtesting/backtesting.html#gsc.tab=0
defining the MCO_function within _evaluate did not work either.
I was looking to run the example here multithreaded with pymoo.
https://kernc.github.io/backtesting.py/
I was able to get it to work with Jmetal but was interested in trying pymoo to compare speeds.

Does the issue only occur when using thread parallelization? Without any parallelization, it works as expected?
What happens when using processes instead of threads?
If you can post a small example here to reproduce the issue that would be great.
(and interestingly I've had just recently a look at backtesting.py)


demo agent lists config for unsupported auth protocol / inconsistent naming

http://snmplabs.com/snmpsim/public-snmp-agent-simulator.html lists
usr-sha384-aes256 | SHA2 (384/512bit) | authkey1 | AES (256bit) | privkey1
But sha384 is not a supported. snmpget.py help reports:
  -a AUTH-PROTOCOL  authentication protocol (MD5|NONE|SHA|SHA128|SHA192|SHA256|SHA512|SHA96)
and trying to use SHA384:
snmpget.py -r 0 -v 3 -u usr-sha384-aes256 -x AES256 -X privkey1 -a SHA384 -A authkey1 -l authPriv <IP_ADDRESS>:1161 sysContact.0
Error: Unknown authentication protocol "SHA384

I'm guessing that the config should be for usr-sha512-aes256.
Also, the previous line:
usr-sha256-3des | SHA2 (128/224bit)
doesn't make sense. 128/224 bits is usmHMAC128SHA224AuthProtocol so the name should be usr-sha224-3des.
It's all a bit confusing because in some cases you are using the key length and in others you are using the mac length.  It really should be "SHA224|SHA256|SHA384|SHA512" or "SHA128|SHA192|SHA256|SHA384". I'd suggest the former, as those are the SHA algorithms defined in RFC 6234 https://tools.ietf.org/html/rfc6234 (and the key lengths). Mixing them is confusing, especially for SHA256, which could be the key length (256/192) or the mac length (384/256).
Both Net-SNMP and SNMP Research use the "SHA224|SHA256|SHA384|SHA512" forms.

Hopefully straightened everywhere, including public SNMP simulator and pysnmp-apps. Feel free to re-open this issue if you encounter further mess.
Thank you! ;-)


Performance Page table layout is messed on mobile chrome.

fixed in:
https://github.com/SAP/chevrotain/commit/5dd69176f9d9d81bf8c5eb8f214c9370aeb58238


[TS migration] Migrate 'GooglePlacesUtilsTest.js' test to TypeScript

Details

Fixed Issues

$ https://github.com/Expensify/App/issues/25272
PROPOSAL: N/A
Tests

Check if tests passed in the pipeline or run them locally with npm run test tests/unit/GooglePlacesUtilsTest

[x] Verify that no errors appear in the JS console

Offline tests

N/A
QA Steps

N/A

[x] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label so the design team can review the changes.

[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native

Android: mWeb Chrome

iOS: Native

iOS: mWeb Safari

MacOS: Chrome / Safari

MacOS: Desktop

FYI @JKobrynski is OOO from Feb 12th to Feb 16th.

Not expected to review test files as per https://expensify.slack.com/archives/C02NK2DQWUX/p1707999906110839

🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.44-13 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


merge master into features/rules-proxy

This is a merge commit to get all the changes from master into the feature branch so we can iterate.

cc @bwplotka


how to get ngx-bootstrap drop down selected value

Hi,
I am using ngx-boostrap dropdown in my angular 4 application.
here i am not getting the selected value from drop down so that i can use it in my ts file.
help me...
Thanks in advance,
Rajasree

Please post this issue in the ngx-bootrstrap repo.


Device silent or vibrate mode

Hello, is there a way to detect if device is in silent mode?
I'm using this plugin to play sound when user click a button so I would like to not play if the device is silenced?
Thank you!

I think there is a respectSilence flag, which I assume does exactly that :)

Thank you @luanpotter , I didn't read documentation enough. I will try that thank you again!

Thank you @luanpotter that's working perfectly :)

I have the following:
import 'package:audioplayers/audioplayers.dart';

class AudioPlay {
  static final AudioPlayer _fixedPlayer = AudioPlayer(
    mode: PlayerMode.LOW_LATENCY,
    playerId: 'fixedPlayer',
  );
  static final AudioCache _player = AudioCache(
    prefix: 'lib/assets/sounds/',
    fixedPlayer: _fixedPlayer,
    duckAudio: true,
    respectSilence: true,
  );

  static Future<void> error() async {
    await _player.play('error.mp3', mode: PlayerMode.LOW_LATENCY);
  }

  static Future<void> success() async {
    await _player.play('success.mp3', mode: PlayerMode.LOW_LATENCY);
  }
}

As you can see I have the respectSilence: true, there, but on the REDMI device, it doesn't respect silence.
Any ideas?

After using respectSilence: true, volume controller is used of system sound(call volume controller). Is there any way in which there will be volume controller of media player and it also respects silent mode?

@vatsaltanna I have removed this library. Now playing sounds which I have added natively to Android and iOS.
Calling play via a method channel I have setup.

@vatsaltanna This is what I used to play sounds from Flutter natively:
iOS method channel and play sound (AppDelegate.swift):
import UIKit
import Flutter
import AVFoundation

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {

    var player: AVAudioPlayer?

    override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        let controller = (window?.rootViewController as! FlutterViewController)
        let methodChannel = FlutterMethodChannel(name: "MainApp", binaryMessenger: controller.binaryMessenger)
        methodChannel.setMethodCallHandler(self.handle)

        GeneratedPluginRegistrant.register(with: self)
        return super.application(application, didFinishLaunchingWithOptions: launchOptions)
    }

    public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) -> Void {
        switch call.method {
        case "getPlatformVersion":
            result("iOS " + UIDevice.current.systemVersion)
        case "playSoundSuccess":
            playSound(success: true)
            result(nil)
        case "playSoundError":
            playSound(success: false)
            result(nil)
        default:
            result(nil)
        }
    }

    private func playSound(success: Bool) -> Void {
        guard let url = Bundle.main.url(forResource: success ? "success" : "error", withExtension: "mp3") else { return }
        do {
            try AVAudioSession.sharedInstance().setCategory(.ambient, mode: .default)
            try AVAudioSession.sharedInstance().setActive(true)
            player = try AVAudioPlayer(contentsOf: url, fileTypeHint: AVFileType.mp3.rawValue)
            guard let player = player else { return }
            player.play()
        } catch let error {
            print(error.localizedDescription)
        }
    }
}

Android method channel and play sound (MainActivity.java):
import android.content.Context;
import android.content.Intent;
import android.media.AudioManager;
import android.media.MediaPlayer;
import android.os.Build;
import android.os.Bundle;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import io.flutter.embedding.android.FlutterActivity;
import io.flutter.embedding.engine.FlutterEngine;
import io.flutter.plugin.common.MethodCall;
import io.flutter.plugin.common.MethodChannel;

public class MainActivity extends FlutterActivity implements MethodChannel.MethodCallHandler {
    private MethodChannel channel;
    private AudioPlayer audioPlayer;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    protected void onResume() {
        super.onResume();

        initializeMethodChannel();
        initializeAudioPlayer();
    }

    private void initializeMethodChannel() {
        if (channel == null) {
            FlutterEngine engine = getFlutterEngine();
            if (engine != null) {
                channel = new MethodChannel(engine.getDartExecutor().getBinaryMessenger(), "MainApp");
                channel.setMethodCallHandler(this);
            }
        }
    }

    private void initializeAudioPlayer() {
        if (audioPlayer == null) {
            audioPlayer = new AudioPlayer();
        }
    }

    @Override
    public void onMethodCall(@NonNull MethodCall call, @NonNull MethodChannel.Result result) {
        switch (call.method) {
            case "getPlatformVersion":
                result.success("Android " + Build.VERSION.RELEASE);
                break;
            case "playSoundSuccess":
                if (audioPlayer != null) {
                    audioPlayer.play(this, true);
                }
                result.success(null);
                break;
            case "playSoundError":
                if (audioPlayer != null) {
                    audioPlayer.play(this, false);
                }
                result.success(null);
                break;
            default:
                result.notImplemented();
                break;
        }
    }

    @Override
    protected void onDestroy() {
        channel.setMethodCallHandler(null);
        channel = null;
        if (audioPlayer != null) {
            audioPlayer.destroy();
            audioPlayer = null;
        }
        super.onDestroy();
    }

    class AudioPlayer {
        private AudioManager audioManager;
        private MediaPlayer mediaPlayer;

        public void play(Context context, boolean success) {
            if (allowSounds()) {
                try {
                    destroyPlayer();
                    mediaPlayer = MediaPlayer.create(context, success ? R.raw.success : R.raw.error);
                    mediaPlayer.start();
                } catch (Exception ignored) {
                }
            }
        }

        public void destroy() {
            destroyPlayer();
            mediaPlayer = null;
            audioManager = null;
        }

        private boolean allowSounds() {
            AudioManager audioManager = getAudioManager();
            return audioManager.getRingerMode() == AudioManager.RINGER_MODE_NORMAL
                    && audioManager.getMode() == AudioManager.MODE_NORMAL;
        }

        private AudioManager getAudioManager() {
            if (audioManager == null) {
                audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
            }
            return audioManager;
        }

        private void destroyPlayer() {
            try {
                if (mediaPlayer != null) {
                    if (mediaPlayer.isPlaying()) {
                        mediaPlayer.stop();
                    }
                    mediaPlayer.release();
                }
            } catch (Exception ignored) {
            }
        }
    }
}

Flutter/Dart create a class (main_app.dart):
import 'package:flutter/services.dart';

class MainApp {
  static const MethodChannel _channel = MethodChannel('MainApp');

  static Future<String?> get platformVersion async {
    final String? version = await _channel.invokeMethod('getPlatformVersion');
    return version;
  }

  static Future<void> playSoundSuccess() async {
    await _channel.invokeMethod('playSoundSuccess');
  }

  static Future<void> playSoundError() async {
    await _channel.invokeMethod('playSoundError');
  }
}

So you setup a method channel, create the players natively and then play those sounds by using the method channel.


PowerMG EOS implemented and documented.

PR Summary
The Power Mie-Gruneisen EOS created at SNL by Robinson, adequate for high pressure modeling, is implemented and documented in relation to the linear Us-up Mie-Gruneisen implemented previously. This EOS is a full EOS with correct temperature. It is the least restrictive EOS of Mie-Gruneisen form and similar in spirit to the Extended Vinet EOS.
PR Checklist

[x] Adds a test for any bugs fixed. Adds tests for new features.
[x] Format your changes by using the make format command after configuring with cmake.
[x] Document any new features, update documentation for changes made.
[x] Make sure the copyright notice on any files you modified is up to date.
[x] After creating a pull request, note it in the CHANGELOG.md file.
[x] LANL employees: make sure tests pass both on the github CI and on the Darwin CI

OK. I have fixed a few small things (initiating _M, and adding const in front of Real eta = ....) and of course forgot to rerun the formatting.

Last comments for today:

I could go through and make this more efficient by using one routine for everything, as I did in Vinet (Vinet_F_DT_func) this would avoid calculating the same thing several times in FillEos (as Jonah pointed out). But this is not how Robinson has written it in the report, so it would take some work. But I actually think it is a god idea for eos implementation since it exposes everything that is not consistent. Maybe we can put it up as a future wish.
The temperature convergence: in _SN2Mp2 I have set maxind to 200 so that the while loop would never be able to go on forever. I am pretty sure that this is sufficient for everything, but I put in a PORTBLE_WARN in case it was not. Is this an OK solution or should we discuss it more?
Tension: Always a tricky question and the solution Robinson has in his report is as good as anything, in my view. But it does give negative bulk modulus and such things. Maybe we should discuss this more, but then maybe in general terms to compare different solutions different people have to this.
That's it for today.

1. I could go through and make this more efficient by using one routine for everything, as I did in Vinet (Vinet_F_DT_func) this would avoid calculating the same thing several times in FillEos (as Jonah pointed out). But this is not how Robinson has written it in the report, so it would take some work. But I actually think it is a god idea for eos implementation since it exposes everything that is not consistent. Maybe we can put it up as a future wish.

Wishlist item is good. Don't worry about it for now. :)

2. The temperature convergence: in _SN2Mp2 I have set maxind to 200 so that the while loop would never be able to go on forever. I am pretty sure that this is sufficient for everything, but I put in a PORTBLE_WARN in case it was not. Is this an OK solution or should we discuss it more?

This is an OK solution for now. We can revisit if we actually hit the limit. You could move the limit to a global const (e.g., static constexpr int MAXITER=200 in the class definition) if you like, that could serve as a useful reminder to look at it if we hit problems.

3. Tension: Always a tricky question and the solution Robinson has in his report is as good as anything, in my view. But it does give negative bulk modulus and such things. Maybe we should discuss this more, but then maybe in general terms to compare different solutions different people have to this.

This I'm not sure about and I'm curious what @jhp-lanl thinks. I worry a bit about the EOS returning things like negative bulk modulus, as a hydro code that receives something like that might go completely bonkers. I don't think this necessarily has to be solved now---it could be resolved, for example, with friendly testing from a host code, if we have people interested in using the EOS.

Tension: Note that the Pmin is only used at very large tension. The expansion first go through a part that follows the isentrope.

In fact if you set a large negative value for Pmin (as the default) it never really kicks in but follows the isentrope all the way to infinite volume ;).

That figure looks totally reasonable. And it's not like our tabulated EOS's don't also have crazy stuff in tension.

I'm running a pipeline on re-git to make sure things work there

I'm running a pipeline on re-git to make sure things work there

Pipeline passes on re-git... merging


Exposing onColorChangeStart and onColorChangeEnd for Sliders

I was wondering if it's possible to expose these two callbacks for the color sliders in a similar manner to the Slider Widget.
An example use case is when the application is keeping track of operations history (undo/redo). With a Slider widget, registering every change can be avoided by doing the following:
Slider(
  onChangeStart: (_) {
    controller.trackChanges = false;
  },
  onChange: (value) {
    controller.updateData(value);
  },
  onChangeEnd: (value) {
    controller.trackChanges = true;
    controller.updateData(value);
  },
)

So it'd be nice to have these two callbacks exposed.

By the way, since I'm using the dialog picker, my work around is to stop tracking changes before showing the dialog and resume tracking changes after the dialog is dismissed. So I'm not even tracking changes for anything until a select is pressed.
Though, if the colorPicker isn't shown as a dialog but as a part of the same screen,  it'd be difficult to stop tracking every changes for the slider specifically.

Thanks for the suggestion @osaxma.
Yes I was about to mention too that if you use it in the dialog you can do like the Web example already does, store the start color value, return it if user closed the dialog with cancel or barrier click and then only keep it if OK/SELECT was chosen, and then track the change, just like you said already in 2nd comment.
If using it outside a dialog, yes indeed a solution like you mention would be nice in order to not track hundreds of changes on the wheel control. The other pickers are just one click, so they don't really start and end, but then again, while there might be tens of them while users play around with color selections, it is not hundreds, like for the wheel (its wheel slider and surface thumb tracker) so for it it would be very useful.
Right now you would have to implement "a use selected color confirmation" button to avoid all that tracking from happening and that is not nice UX.
I will try to get this into the next release I'm working on now. It will be added to null-safe version. Depending on when null-safety goes main stream, I might or might not back port some of the new features I'm adding now to it as well, but leaning more and more towards not adding new features to the none null-safe version, unless they are really critical for someone that won't be able to move the null-safe version yet.
With Web and desktop becoming more mainstream, it is more plausible that the color picker would be used in a none dialog use case, so this would be a good feature to have. It is also useful in full screen dialogs on mobile, where you might just have back option and no cancel.

Off topic
Bunch of new features coming to the null-safe version. Taking the opportunity to add features since it is anyway a new major release. Trying to keep breaking change to a minimum though, other than what null safety entails. Still there will be some minor ones.
What's in the works

Major copy paste color value improvements, with keyboard short-cut, top toolbar copy/past buttons, long press copy/paste menu, all optional and configurable based on what is wanted.
Paste supports parsing multiple RGB color string formats. It automatically detects what is used and auto parses to correct Flutter/dart color value. You can eg paste #RRGGBB RRGGBB #AARRGGBB AARRGGBB #RGB RGB 0xAARRGGBB, partial color values also work.
For the copy format, the desired resulting RGB color string format can be configured to use #RRGGBB RRGGBB #AARRGGBB AARRGGBB and 0xAARRGGBB options.
Opacity slider & entry support for color values is coming as well.
Custom color support on the active picker type selection thumb.
OK/Cancel as buttons in a dialog top toolbar instead of bottom CANCEL / OK.

Adding your onChangeStart onChangeEnd event suggestions now as well to the above list.
Later I'm also planning to add

Different options for the control that selects used picker. The used CupertinoSlidingSegmentedControl offers no keyboard navigation support, probably never will. Going to add a custom version as one option and ToggleButtons option as well.
New advanced color picker, with just sliders, with different color formats HSV, HSL, RGB + maybe some more. The  onChangeStart onChangeEnd events will apply to these as well.
More copy color formats for other color standards
Maybe: A color pipette to pick a color from the screen.

Other

The tests and CI/CD for the package needs to get up to same level as FlexColorScheme. Going to work on that as well. 😃

Thank you @rydmike for the detailed response and the information about what's coming up.

Opacity slider & entry support for color values is coming as well.
I believe this feature is great to have.

OK/Cancel as buttons in a dialog top toolbar instead of bottom CANCEL / OK.
What's the motive for this change? (I actually don't have a preference here, just curious).

p.s. I appreciate your work and I'm enjoying using the package -- it's simple to use, easy to customize and has excellent documentation. I'll look forward for the coming updates.

Regarding ok / cancel icon buttons in a toolbar, it is just an another option, use it as an alternative or use the current version, can even use both, if so desired.
The onColorChangeStart and onColorChangeEnd are btw working well already in my dev version. I like the feature.
Some new gesture detection improvements in Flutter also enabled me to improve the color wheel gesture handlers so it reacts better than before on taps and drags.
Noticed the ways to improve them while adding the start and end callbacks, so got a double benefit from looking into it.

This feature is now available starting from the pre-release ^2.0.0-nullsafety.1
https://pub.dev/packages/flex_color_picker/versions/2.0.0-nullsafety.2/changelog
You can try and play with the features in the latest web demo as well: https://rydmike.com/flexcolorpicker
The web demo source code is available in the latest package release as well.
These features are still new and still in pre-release status. I expect to migrate 2.0.0 over to stable channel soon after the dust settles from Flutter Engage.
Let me know if you notice anything that needs further tweaking.
Closing this feature request as it is now implemented. 😃


don't include cleaning tasks in instance count

Tasks that are cleaning should not be part of the instance count when checking for over provisioned requests
@ssalinas

👍 lets get this into stable

Just verifying the merge conflicts got resolved correctly and will merge this one too 👍


updated copy for running the app locally

Detailed information:
The copy should reflect how to run the app locally. Some people may not be contributing to changes, rather just trying to learn from us or explore. Or could be front end people just trying to run the backend. The copy should help let these people know where to find the instructions for running the app locally.t

Also, see the guide about how to change the documentation. https://contribute.climatemind.org/v/rest-api/contribute-as-a-python-dev/how-to-update-docs/documentation
I know it's not obvious that we should not push any changes directly to the develop branch, but otherwise gitbook unable to keep up the up to date copy of the repo.
So, if you would like to continue to propose your changes you should use gitbook "submit for review" or create the same PR to merge to docs instead of develop branch.

@rodriguesk I've also created a guide for the documentation change through GitHub. This way is more convenient to use for such small changes like you suggested in this PR.
https://contribute.climatemind.org/v/documentation/

we should not push any changes directly to the develop branch, but otherwise gitbook unable to keep up the up to date copy

I'll try to fix it again later


Wrangle data

Fixes #1 - wrangle data

Thanks for great feedback, Dan!
Should we handle/remove outliers in this function?
I noticed one entry listing 12,000 as their monthly salary (probably a student), and we also have a few very high salaries, e.g. 1,000,000 per month. The latter might be correct, but it might also be someone who thought we were asking for annual salary. Regardless, should consider whether to remove such high salaries (and the low one too).

Thanks for great feedback, Dan!
Should we handle/remove outliers in this function?
I noticed one entry listing 12,000 as their monthly salary (probably a student), and we also have a few very high salaries, e.g. 1,000,000 per month. The latter might be correct, but it might also be someone who thought we were asking for annual salary. Regardless, should consider whether to remove such high salaries (and the low one too).

@KasperGroesLudvigsen I think handling outliers in this function is a good idea as well, yes. But again, I'd just add that separately, rather than cramming everything into one PR :)
For instance, I noticed that there is one who reported 0 kr. as salary, which can just be removed. I also noticed two people who reported 2-digit salaries (like 56), which is probably because they reported it in thousands. But, again, let's take that discussion in another PR.


Extended autoupdate API for plugins.

@ostcar What about this implementation?

All example code is to show how plugins can use this exended API. I will remove the example code before merge.

We need a new approach because of the changes made by autoupdate API refactoring and caching system.


clang_complete support for Emacs and Atom

I've removed CMake from the Emacs template, and will be switching PlatformIO-Mode over to direct interaction with platformio once this is merged.
Also added is the initial Atom project template, which is just the .gitignore and .clang_complete for now. We will have to discuss further the direction to go with it.
Like I said on Gitter, we could implement a "Task Runner" (see https://atombuild.github.io/), but I'm not sure there is a need for both it and the existing plugin.

Thanks!


Large numbers in manifest casted to int, overflow MAX_INT

Original issue 657 created by lvs.tourist on 2014-07-15T23:32:13.000Z:
What steps will reproduce the problem?

Disassemble a Corona SDK apk file
Rebuild it

What is the expected output? What do you see instead?
A correct APK should be built.
What version of the product are you using? On what operating system?
Apktool v1.5.2, Mac OS X 10.9.2
There are two problems inside AndroidManifest.xml

For some reason package name is wrong and set to "com.ansca.corona".
If Google Play Game Services are used, APP_ID is treated as number, but should be a string. The solution is to prepend the ID with an escaped space character.

<meta-data android:name="com.google.android.gms.games.APP_ID" android:value="\<PHONE_NUMBER>55"/>
After that everything is fine.

I'd like to take a crack at this - I think the place to start is brut.apktool/apktool-lib/.../AXmlResourceParser.java:m_attributes; is that correct?

After a little more investigation:
Meta-data does not support large numbers in Android.  It is not possible to read Long values from the metadata bundle - they are stored as integers with all the limitations that integers have.  Dumping the values via aapt l -a <apk> shows the same behavior - the value is already truncated.
Example:
Having a metadata in the manifest like this:
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@android:style/Theme.Holo.NoActionBar.Fullscreen">

        <meta-data android:name="com.google.android.gms.games.APP_ID" android:value="555555555555"/>

Leads to an aapt listing like this:
$ aapt l -a iap-sample-app-release.apk
.
.
.
      E: meta-data (line=31)
        A: android:name(0x01010003)="com.google.android.gms.games.APP_ID" (Raw: "com.google.android.gms.games.APP_ID")
        A: android:value(0x01010024)=(type 0x10)0x59b108e3

This leads me to believe that all (type 0x10) values have a hard limit of MAX_INT, and the values get truncated when the apk is build initially.  I don't believe there is anything that Apktool can do about them.
Another case to consider is if the user modifies the decoded manifest and adds the too-large values there.  I haven't yet checked what happens in this case, but it's probably a good idea to at least spit out a warning if not an error.  Thoughts?

Very interesting research. I was gonna say, "well lets check the apk and see how it works", but there is no apk.
If I create an INT  in <meta-data> that exceeds MAX_INT. AAPT, as shown above, truncates it. I need to do more testing involving running said application and seeing if the value is parsed correctly on device or malformed during compilation from source -> binary.

It is truncated in-application as well.  Using the following block, the value is truncated when read.  It is not possible to use bundle.getLong() due to a cast exception.
try {
    ApplicationInfo ai = getPackageManager().getApplicationInfo(activity.getPackageName(), PackageManager.GET_META_DATA);
    Bundle bundle = ai.metaData;
    int myApiKey = bundle.getInt("com.google.android.gms.games.APP_ID");
} catch (NameNotFoundException e) {
    Log.e(TAG, "Failed to load meta-data, NameNotFound: " + e.getMessage());
}

Thanks a ton for this research @simtel12
It appears this is a limitation in AOSP itself and nothing apktool can aim to fix. I might whip up a test apk just to log it into the system for records, but you've done the research and proof. Thanks!

Hi there,
I have an APK here similar to that one specified in the previous post.
AAPT reports
      E: meta-data (line=31)
        A: android:name(0x01010003)="com.google.android.gms.appstate.APP_ID" (Raw: "com.google.android.gms.appstate.APP_ID")
        A: android:value(0x01010024)="479116460380" (Raw: "479116460380")

So the value is really the String "479116460380" and not the number as integer.
APKTool should, instead of outputting
        <meta-data android:name="com.google.android.gms.games.APP_ID" android:value="479116460380" />
        <meta-data android:name="com.google.android.gms.appstate.APP_ID" android:value="479116460380" />

Should be escaped e.g. like this:
        <meta-data android:name="com.google.android.gms.games.APP_ID" android:value="\u003479116460380" />
        <meta-data android:name="com.google.android.gms.appstate.APP_ID" android:value="\u0034479116460380" />

according to https://developer.android.com/guide/topics/manifest/meta-data-element.html
Afterwards, aapt builds a manifest identical to the manifest of the source apk file.

More research: It is sufficient to escape the value by prepending "\ " (slash and space). If you do that, aapt will consider it a string value and write it out as a string value without the slash and space, thus solving the problem.
So what should apktool do?
If it sees a String value (TYPE_STRING, 0x03) AND the value of the string corresponds to an integer number (or float number also btw), it should prepend "\ " without the quotes to the attribute value, so that

Otherwise aapt treats it as an integer value and writes it as integer value (TYPE_INT_DEC), which is wrong.
So this is clearly an apktool issue; aapt cannot know that it is not meant to be an integer.

Thanks for the large amount of research on this. That looks simple enough to do.

ibotpeaches@tombstone:~/Downloads/Apktool/Bug767$ apktool d com.smgstudio.onemoreline.apk -f
I: Using Apktool 2.0.3-831765-SNAPSHOT on com.smgstudio.onemoreline.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/ibotpeaches/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
ibotpeaches@tombstone:~/Downloads/Apktool/Bug767$ cat com.smgstudio.onemoreline/AndroidManifest.xml | grep 'APP_ID'
        <meta-data android:name="com.google.android.gms.games.APP_ID" android:value="\<PHONE_NUMBER>79"/>
        <meta-data android:name="com.google.android.gms.appstate.APP_ID" android:value="\<PHONE_NUMBER>79"/>
ibotpeaches@tombstone:~/Downloads/Apktool/Bug767$

Works great. Thanks for the research. Doing some profiling to make sure my changes doesn't slow anything down too much (since the change is on the ResString)


Failed to compile http_server under ARM Cortex m0 architecture

branch：main
soc arch：arm cortex m0
Compiling samples\net\civetweb\http_server under an arm cortex m0 MCU shows the following error:
c:/gnu_arm_embedded/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: modules/civetweb/lib..__modules__lib__civetweb.a(civetweb.c.obj): in function `mg_atomic_inc':
D:/ZephyrProject/code/zephyrproject/modules/lib/civetweb/src/civetweb.c:1228: undefined reference to `__sync_add_and_fetch_4'
c:/gnu_arm_embedded/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: D:/ZephyrProject/code/zephyrproject/modules/lib/civetweb/src/civetweb.c:1228: undefined reference to `__sync_add_and_fetch_4'
collect2.exe: error: ld returned 1 exit status

@maweicoltsmart - can you please provide more reproducibility information; BOARD, etc

@maweicoltsmart - can you please provide more reproducibility information; BOARD, etc

I discovered this problem when using an MCU based on the ARM Cortex m0 architecture that was not in this project. Preliminary guess is whether MCUs based on ARM Cortex m0 have this problem, so I did an experiment with board nucleo_f030r8 and found that it also has this problem.
Because it is just to verify whether MCUs based on ARM Cortex m0 have this problem, I made the following changes to board nucleo_f030r8:
diff --git a/boards/arm/nucleo_f030r8/Kconfig.defconfig b/boards/arm/nucleo_f030r8/Kconfig.defconfig
index 7b5331693f..fe5cdcb10e 100644
--- a/boards/arm/nucleo_f030r8/Kconfig.defconfig
+++ b/boards/arm/nucleo_f030r8/Kconfig.defconfig
@@ -8,4 +8,18 @@ if BOARD_NUCLEO_F030R8
 config BOARD
        default "nucleo_f030r8"

+# ENC28J60 is L2 chip slave on SPI
+config SPI
+       default y
+
+config NET_L2_ETHERNET
+       default y
+
+# ENC28J60 Ethernet Device
+config ETH_ENC28J60
+       default y
+
+config ETH_ENC28J60_0
+       default y
+
 endif # BOARD_NUCLEO_F030R8

diff --git a/boards/arm/nucleo_f030r8/nucleo_f030r8.dts b/boards/arm/nucleo_f030r8/nucleo_f030r8.dts
index d6520ecd70..0f76a95079 100644
--- a/boards/arm/nucleo_f030r8/nucleo_f030r8.dts
+++ b/boards/arm/nucleo_f030r8/nucleo_f030r8.dts
@@ -106,3 +106,20 @@
 &iwdg {
        status = "okay";
 };
+
+mikrobus_spi: &spi1 {};
+
+
+&mikrobus_spi {
+       status = "okay";
+       /* LPCXpresso55xxx boards all use SSEL1. */
+       eth_click: eth_click@0 {
+               compatible = "microchip,enc28j60";
+               reg = <0x0>;
+               local-mac-address = [00 00 00 01 02 03];
+               /* Errata B7/1 specifies min 8Mhz, 20MHz max according to RM */
+               spi-max-frequency = <10000000>;
+               int-gpios = <&gpiob 7 GPIO_ACTIVE_LOW>; /* INT */
+               label = "ETH_CLICK";
+       };
+};

diff --git a/boards/arm/nucleo_f030r8/nucleo_f030r8_defconfig b/boards/arm/nucleo_f030r8/nucleo_f030r8_defconfig
index 8be75cf6ab..98138c0e43 100644
--- a/boards/arm/nucleo_f030r8/nucleo_f030r8_defconfig
+++ b/boards/arm/nucleo_f030r8/nucleo_f030r8_defconfig
@@ -28,3 +28,6 @@ CONFIG_GPIO=y

 # Enable Clocks
 CONFIG_CLOCK_CONTROL=y
+CONFIG_NETWORKING=y
+CONFIG_TEST_RANDOM_GENERATOR=y
+CONFIG_SPI_STM32_USE_HW_SS=n
\ No newline at end of file

Although the following modification is wrong, it still does not affect our discussion of this issue.
diff --git a/dts/arm/st/f0/stm32f030X8.dtsi b/dts/arm/st/f0/stm32f030X8.dtsi
index 5de6e2678e..67cc685e25 100644
--- a/dts/arm/st/f0/stm32f030X8.dtsi
+++ b/dts/arm/st/f0/stm32f030X8.dtsi
@@ -8,13 +8,13 @@

 / {
        sram0: memory@20000000 {
-               reg = <0x20000000 DT_SIZE_K(8)>;
+               reg = <0x20000000 DT_SIZE_K(800)>;
        };

        soc {
                flash-controller@40022000 {
                        flash0: flash@8000000 {
-                               reg = <0x08000000 DT_SIZE_K(64)>;
+                               reg = <0x08000000 DT_SIZE_K(640)>;
                        };
                };

Next we compile this program.
west build -b nucleo_f030r8 samples\net\civetweb\http_server
Then the following compilation error appears.
[143/150] Linking C executable zephyr\zephyr_prebuilt.elf
FAILED: zephyr/zephyr_prebuilt.elf zephyr/zephyr_prebuilt.map
cmd.exe /C "cd . && C:\gnu_arm_embedded\bin\arm-none-eabi-gcc.exe   zephyr/CMakeFiles/zephyr_prebuilt.dir/misc/empty_file.c.obj -o zephyr\zephyr_prebuilt.elf  -Wl,-T  zephyr/linker_zephyr_prebuilt.cmd  -Wl,-Map=D:/ZephyrProject/code/zephyrproject/zephyr/build/zephyr/zephyr_prebuilt.map  -Wl,--whole-archive  app/libapp.a  zephyr/libzephyr.a  zephyr/arch/common/libarch__common.a  zephyr/arch/arch/arm/core/aarch32/libarch__arm__core__aarch32.a  zephyr/arch/arch/arm/core/aarch32/cortex_m/libarch__arm__core__aarch32__cortex_m.a  zephyr/lib/libc/minimal/liblib__libc__minimal.a  zephyr/lib/posix/liblib__posix.a  zephyr/subsys/net/libsubsys__net.a  zephyr/subsys/net/l2/ethernet/libsubsys__net__l2__ethernet.a  zephyr/subsys/net/ip/libsubsys__net__ip.a  zephyr/subsys/net/lib/config/libsubsys__net__lib__config.a  zephyr/subsys/net/lib/dns/libsubsys__net__lib__dns.a  zephyr/subsys/random/libsubsys__random.a  zephyr/drivers/gpio/libdrivers__gpio.a  zephyr/drivers/spi/libdrivers__spi.a  zephyr/drivers/serial/libdrivers__serial.a  modules/civetweb/lib..__modules__lib__civetweb.a  modules/stm32/stm32cube/lib..__modules__hal__stm32__stm32cube.a  -Wl,--no-whole-archive  zephyr/kernel/libkernel.a  zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj  -L"c:/gnu_arm_embedded/bin/../lib/gcc/arm-none-eabi/10.2.1/thumb/v6-m/nofp"  -LD:/ZephyrProject/code/zephyrproject/zephyr/build/zephyr  -lgcc  zephyr/arch/common/libisr_tables.a  -mcpu=cortex-m0  -mthumb  -mabi=aapcs  -Wl,--gc-sections  -Wl,--build-id=none  -Wl,--sort-common=descending  -Wl,--sort-section=alignment  -Wl,-u,_OffsetAbsSyms  -Wl,-u,_ConfigAbsSyms  -nostdlib  -static  -no-pie  -Wl,-X  -Wl,-N  -Wl,--orphan-handling=warn && cmd.exe /C "cd /D D:\ZephyrProject\code\zephyrproject\zephyr\build\zephyr && "C:\Program Files\CMake\bin\cmake.exe" -E echo ""
c:/gnu_arm_embedded/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: modules/civetweb/lib..__modules__lib__civetweb.a(civetweb.c.obj): in function `mg_atomic_inc':
D:/ZephyrProject/code/zephyrproject/modules/lib/civetweb/src/civetweb.c:1228: undefined reference to `__sync_add_and_fetch_4'
c:/gnu_arm_embedded/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: D:/ZephyrProject/code/zephyrproject/modules/lib/civetweb/src/civetweb.c:1228: undefined reference to `__sync_add_and_fetch_4'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' --build 'D:\ZephyrProject\code\zephyrproject\zephyr\build'

@maweicoltsmart - what version of the gnu arm embedded toolchain are you using?
arm-none-eabi-gcc -v

Does this work for you?

@galak, is __sync_add_and_fetch_4() something that zephyr or the toolchain or sdk should provide?
According to SO, it is not.
https://stackoverflow.com/a/58394755
In that case, I feel like it might just be a bug in civetweb.

The undefined symbol error is no longer present with the fix provided in zephyrproject-rtos/civetweb#8
Users/cfriedt/zephyr-sdk-0.13.0-rc3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/zephyr_prebuilt.elf section `datas' will not fit in region `SRAM'
/Users/cfriedt/zephyr-sdk-0.13.0-rc3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.bfd: section .intList VMA [0000000020004000,0000000020004057] overlaps section datas VMA [0000000020000000,000000002000438b]
/Users/cfriedt/zephyr-sdk-0.13.0-rc3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.bfd: region `SRAM' overflowed by 60343 bytes
collect2: error: ld returned 1 exit status

tested again on main after tagging v2.7.0-rc2


RancherOS fails to boot when rancher.defaults.system_docker_logs is set to a path on a mounted volume

RancherOS Version: 1.5.5
Where are you running RancherOS? Raspberry Pi Model 3B+
According to https://rancher.com/docs/os/v1.x/en/installation/configuration/docker/ this is a valid configuration stanza:
#cloud-config
rancher:
  defaults:
    system_docker_logs: /usr/share/ros/oem/system-docker.log

... however, when /dev/mmcblk0p3 is mounted on a Raspberry Pi as per https://rancher.com/docs/os/v1.x/en/installation/running-rancheros/server/raspberry-pi/ (in this case as /mnt/storage) and system_docker_logs is set to /mnt/storage/log/system-docker.log (where the log directory pre-exists) then rebooting fails with multiple:
Error response from daemon: mount already exists with this name

... and no system containers state.
This occurs even when issuing sudo ros config set rancher.defaults.system_docker_logs /mnt/storage/log/system-docker.log succeeds, and has been the only command issued since a successful reboot.

Conversely, doing nothing other than removing the offend configuration lines as above from /var/lib/rancher/conf/cloud-config.yml is enough to fix the system.
Observations:

Setting an alternative logging location shouldn't prevent the entire system from booting;
If there are any known-issues or extended validation checks necessary, I've expect ros config set to perform these.

Is this simply an ordering issue, where the top-level mounts stanza is only being applied after system-docker has been started?  If so, should there be a mechanism to start system-docker with a fixed, minimal set of configuration options, prepare the system as necessary, and then reload system-docker with the full set of parameters?


No results found text is not shown when a user search a non existing currency

Details

Here we need one condition to check if the searched currency is available or not if available we displayed in list if not matched currency then we need to show a warning message "No results found"

In order to resolve the issue we are checking the current length of all currency objects and when it returns 0 then shows a message also if  all currency objects are 0 then we are also hiding the header "ALL CURRENCIES"

Fixed Issues

$ https://github.com/Expensify/App/issues/9981
Tests

Click the FAB icon > Send/Request money option
Press on the currency icon to navigate to the currency Selection page.
Search for any invalid currency, No value should be listed, and "No results found" is shown under the search bar.
Clear the search, and check that all options the visible again.

[x] Verify that no errors appear in the JS console

PR Review Checklist

Contributor (PR Author) Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] iOS / native
[x] Android / native
[x] iOS / Safari
[x] Android / Chrome
[x] MacOS / Chrome
[x] MacOS / Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product was added in all src/languages/* files
[x] I verified any copy / text that was added to the app is correct English and approved by marketing by tagging the marketing team on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] Any functional components have the displayName property
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)

[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

PR Reviewer Checklist
The Contributor+ will copy/paste it into a new comment and complete it after the author checklist is completed

[x] I have verified the author checklist is complete (all boxes are checked off).
[x] I verified the correct issue is linked in the ### Fixed Issues section above
[x] I verified testing steps are clear and they cover the changes made in this PR

[x] I verified the steps for local testing are in the Tests section
[x] I verified the steps for Staging and/or Production testing are in the QA steps section
[x] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[x] I checked that screenshots or videos are included for tests on all platforms
[x] I verified tests pass on all platforms & I tested again on:

[x] iOS / native
[x] Android / native
[x] iOS / Safari
[x] Android / Chrome
[x] MacOS / Chrome
[x] MacOS / Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I verified proper code patterns were followed (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product was added in all src/languages/* files
[x] I verified any copy / text that was added to the app is correct English and approved by marketing by tagging the marketing team on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I verified that this PR follows the guidelines as stated in the Review Guidelines
[x] I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] Any functional components have the displayName property
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)

[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

QA Steps

Click the FAB icon > Send/Request money option
Press on the currency icon to navigate to the currency Selection page.
Search for any invalid currency, No value should be listed, and "No results found" is shown under the search bar.
Clear the search, and check that all options the visible again.

[x] Verify that no errors appear in the JS console

Screenshots

Web

https://user-images.githubusercontent.com/47522946/179890487-db7a80dc-8763-4c44-8d7e-3fe7edf4cd52.mov
Mobile Web

https://user-images.githubusercontent.com/47522946/179892819-cb5f5472-1294-4ec2-938b-1cb1488a394e.mp4
Desktop

https://user-images.githubusercontent.com/47522946/179890500-3da9f1fa-46d8-4efc-b892-8461721f0155.mov
iOS

https://user-images.githubusercontent.com/47522946/179890534-5bdfd3d2-b052-43b3-a671-7772c084b001.mp4
Android

https://user-images.githubusercontent.com/47522946/179890709-d28e5e75-88d7-4137-b5df-e8cc1246373a.mp4
I have read the CLA Document and I hereby sign the CLA

I have read the CLA Document and I hereby sign the CLA

I have read the CLA Document and I hereby sign the CLA

Thank you! I havent look at the code yet, Rajat will help out with that, but there was one thing which I had to fix the the PR body, this is what you had:
$ https://github.com/Expensify/App/issues/<number-of-the-issue>

Do NOT only link the issue number like this: $ #<number-of-the-issue>
--->
$ [GH_LINK](https://github.com/Expensify/App/issues/9981)

This is a common problem we have and I am on the lookout for it haha. We need the issue to be linked as $ https://github.com/Expensify/App/issues/<number-of-the-issue> so we can then correctly run our webhooks logic on this. I have updated the body as required so no worries but I am noting this for your future PRs.
And I hope there s many of them to come :)

@dhairyasenjaliya also I have oticed you commits are not signed. I think you will need to sign them, refer to the 8th point in this guide please.
You might need to make a new branch and force push to this one as the signed commits can get quite annoying!

Thank you! I havent look at the code yet, Rajat will help out with that, but there was one thing which I had to fix the the PR body, this is what you had:
$ https://github.com/Expensify/App/issues/<number-of-the-issue>

Do NOT only link the issue number like this: $ #<number-of-the-issue>
--->
$ [GH_LINK](https://github.com/Expensify/App/issues/9981)

This is a common problem we have and I am on the lookout for it haha. We need the issue to be linked as $ https://github.com/Expensify/App/issues/<number-of-the-issue> so we can then correctly run our webhooks logic on this. I have updated the body as required so no worries but I am noting this for your future PRs.
And I hope there s many of them to come :)

thank you, sure noted for $ links PR

GPG sign your commits.
Add tests.
Fix QA steps.

1. Click the FAB icon > Send/Request money option
2. Press on the currency icon to navigate to the currency Selection page.
3. Search for any invalid currency, No value should be listed, and "No results found" is shown under the search bar.
4. Clear the search, and check that all options the visible again.

hello, @parasharrajat have added 1. GPG and also fixed 3.QA steps
but still figuring about 2. Add tests like what I need to add maybe any document regarding that?

 I think you might need to create these changes again in a new local branch and then force push to this remote branch just to make sure all is good!

yeah was thinking the same since its fails for very first commit

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

yeah, guidelines make sense sure noted all points :D

🚀 Deployed to staging by @mountiny in version: 1.1.86-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by @yuwenmemon in version: 1.1.86-5 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


[Impeller] Document core Impeller rendering techiques.

The lower levels of the Impeller stack don't necessarily mandate using a specific rendering technique. But the team has gravitated toward certain approaches based on what made sense for Flutter. These approaches aren't all that novel but their use is only apparent after perusing the source code. We should document them in //impeller/docs/. Some topics that come to mind are:

The dependence on MSAA.
The use of the stencil buffer for clips and overlapping strokes with alpha.
Keeping shader variants in check.

Not a comprehensive list. This is an umbrella issue. Add your own!

We have been added to these both externally in //flutter/impeller/docs and internally at go/impeller-shortlinks and will keep doing so.
Incidentally, the internal link points to ~26 design docs that we could perhaps open up but that will probably need to ask for permission from the authors.


Initialize mysql with *.sql script

I tried in several different ways to initialize the MySQL with *.sql script.
I tried to alter the Dockerfile or just alter the compose.yml, and, just not work...
What the correct way to initialize MySQL with a *.sql script in this project?
Thanks a lot.

@johnoliv
In stead of mysql I use mariadb: https://hub.docker.com/_/mariadb/#initializing-a-fresh-instance
  mysql:
    build: ./bin/mysql
    restart: 'always'
    ports:
      - "3306:3306"
    volumes:
      - ${MYSQL_DATA_DIR-./var/lib/mysql}:/var/lib/mysql
      - ${MYSQL_LOG_DIR-./var/log/mysql}:/var/log/mysql
      - ./config/mysql/initdb:/docker-entrypoint-initdb.d

You can use mysql dump for starting with existing project.
Basically, attaching dump in mysql container is all you need.
mariadb:
image: mariadb:10.3
volumes:
- ./dump.sql:/docker-entrypoint-initdb.d/dump.sql
restart: 'always'
ports:
- "3306:3306"
In my case is mariadb, you can use what ever you want

@wi1w @yapsr
It only worked after removing the variables (MYSQL_USER and MYSQL_PASSWORD), because it apparently conflicts with MYSQL_ROOT_PASSWORD.
Final:
  mysql:     build: ./bin/mysql     container_name: '5.7.22-mysql'     restart: 'always'     ports:       - "${HOST_MACHINE_MYSQL_PORT}:3306"     volumes:        - ./setup.sql:/docker-entrypoint-initdb.d/setup.sql       - ${MYSQL_LOG_DIR-./logs/mysql}:/var/log/mysql     environment:       MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}       MYSQL_DATABASE: ${MYSQL_DATABASE}

Please reopen if required.

The initial sql will not trigger if you have saved data before in your database and it is bind to a volume. Removing the data on host machine resolved the issue for me.


[DO NOT MERGE] Test Foundation XML CI.

We already have https://github.com/swiftlang/swift-docc/pull/1080 for checking if the CI remains blocked

(I checked 3 hours ago and the CI is still blocked and AFAIK there hasn't been a new toolchain build since then)


Implement a TIME command from Redis

Search before asking

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

Motivation
For more compatibility with original Redis spec and because a some other command like XADD etc. use internal time as identificatory of items.
Redis spec are here - https://redis.io/commands/time/
Solution
No response
Are you willing to submit a PR?

[ ] I'm willing to submit a PR!

redis used gettimeofday in the past, should we also use gettimeofday directly? (in Redis 7.2, TIME use a cached time)

Hi @enjoy-binbin
I think it's fine to use the time function in time_util.h.


Add license selector to popup

Summary of changes
This commit adds an auto-completion input field with a dropdown to the locator popup. The dropdown contains all licenses found in any external attribution and does not aggregate licenses. If a license is selected and the apply button is pressed the corresponding state is set. If the clear button is pressed the state will be reset. Fixes #1941.
Context and reason for change
We want to imlement a new feature to be able to locate signals based on criticality and certain licenses.
How can the changes be tested
Check out the commit, open an .opossum file and open the popup. Observe the license field and the dropdown when clicking into the field, the dropdown should contain all license names of all external attributions (see the screenshot below).
If you start to type anything the dropdown will filter for those licenses matching your text. Click apply to set the state for this selected license. If you close the popup and reopen it your selected license will be shown in the corresponding field.
If you click the clean button the field will be cleared and the state is reset.

After the rebase the popup now looks like this:


Dev 20 - implemented progressive uncovering the data of the Education page

Please make sure these boxes are checked before submitting your PR, thank you!

[ ] Make sure all the tests are still passing.
[ ] Make sure the test coverage is still 100%.
[x] Make sure your source branch is correct.
[x] Make sure your destination branch is devel.
[x] Make sure the name of the PR has a correct DEV-# identification prefix.
[ ] Make sure you reviewed all your changes and they look correct.
[x] Make sure all the commits have a correct format.
[ ] Make sure you refer related issues for you PR.
[ ] Make sure you add KovDimaY as a reviewer and assignee of your PR.

Take a look at the Issue #26

Coverage decreased (-0.1%) to 99.853% when pulling 13f1a35b76869ee8e05cb714a204b98f7e08e2c7 on DEV-20 into 739b239fcd8af974331a25223d3d7b0b53a2e67c on devel.


Fix task loading for multi-cursor transfer queue processor

What changed?

Add a retry policy for reading transfer tasks
Send a new task notification when the active processing queue changed for a certain queue collection.
Update the interface for AddTasks() method.

Basic idea is that since processing queue only gets filtered tasks, it doesn't know about the actual read level (since those tasks may get filtered). As a result, if the # of tasks get filtered equals to the batch size for task loading, the read level in the processing queue will never move forward and new tasks can't be loaded. This pr moves the responsibility of calculating read level out of processing queue. Every time, AddTasks() is called, the caller must specify a new read level for the processing queue. This also improve the performance when there's no more task, as the caller can explicitly use max level as the new read level to avoid any future read.

Why?

How did you test it?

Potential risks

Coverage decreased (-0.1%) to 67.975% when pulling 73f5a6f70f4218df76b23d505cc7984200b0c2fb on yycptt:fix-task-loading into f8c0e931f70f72552cd0313b72328f627dc35d5b on uber:master.


Add more unit tests to improve coverage

Improved coverage by 4%
Fixed docs in types.h (when a comment is broken in more than one line, only first line is shown on the documentation website - see e.g. here)
Fixed printing of polishing info in Python on Windows

Coverage increased (+3.9%) to 91.679% when pulling 0709c3119f1ff3ef9bb74325ee01aece12e13ff7 on gb/unittests into 13c02dc82c5064c137a8fc85055deda64ea585d5 on develop.


Knownmethods optimizations

Before
 |                  Method |       Mean |    StdDev |
 |------------------------ |----------- |---------- |
 |      GetKnownMethod_GET |  2.1957 ns | 0.0081 ns |
 |  GetKnownMethod_CONNECT | 10.5233 ns | 0.0800 ns |
 |   GetKnownMethod_DELETE |  3.4092 ns | 0.0148 ns |
 |     GetKnownMethod_HEAD |  2.5988 ns | 0.0079 ns |
 |    GetKnownMethod_PATCH |  2.5962 ns | 0.0120 ns |
 |     GetKnownMethod_POST |  2.6509 ns | 0.0857 ns |
 |      GetKnownMethod_PUT |  2.6619 ns | 0.0706 ns |
 |  GetKnownMethod_OPTIONS | 11.4744 ns | 0.0276 ns |
 |    GetKnownMethod_TRACE |  2.5957 ns | 0.0194 ns |
 | GetKnownVersion_HTTP1_1 |  2.7503 ns | 0.0160 ns |

After
 |                  Method |      Mean |    StdDev |
 |------------------------ |---------- |---------- |
 |      GetKnownMethod_GET | 2.1285 ns | 0.0037 ns |
 |  GetKnownMethod_CONNECT | 5.2002 ns | 0.0444 ns |
 |   GetKnownMethod_DELETE | 2.4482 ns | 0.0055 ns |
 |     GetKnownMethod_HEAD | 2.4525 ns | 0.0076 ns |
 |    GetKnownMethod_PATCH | 2.4550 ns | 0.0037 ns |
 |     GetKnownMethod_POST | 2.6373 ns | 0.1053 ns |
 |      GetKnownMethod_PUT | 2.4518 ns | 0.0155 ns |
 |  GetKnownMethod_OPTIONS | 5.2316 ns | 0.0109 ns |
 |    GetKnownMethod_TRACE | 2.4431 ns | 0.0035 ns |
 | GetKnownVersion_HTTP1_1 | 2.6444 ns | 0.0048 ns |

@arespr,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by .NET Foundation. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

@arespr can you write a tiny description of the optimization?

I have improved my search alghoritm and
found slightly better function:
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static int GetKnownMethodIndex(ulong value)
{
   var tmp = (int) value & 0x0600000C;

    return ((tmp >> 2) | (tmp >> 23)) & 0x0F;
}

Alghoritm is here:
https://github.com/arespr/ConsoleApp1/blob/24ace01d17d1015c43c60d658319f1ed2fc5a043/src/ConsoleApp1/Utils.cs

added unit tests, and repaired performance tests
Before
 |                  Method |       Mean |    StdErr |    StdDev |     Median |
 |------------------------ |----------- |---------- |---------- |----------- |
 |      GetKnownMethod_GET |  2.0383 ns | 0.0021 ns | 0.0077 ns |  2.0379 ns |
 |  GetKnownMethod_CONNECT | 10.0297 ns | 0.1076 ns | 0.5486 ns |  9.7720 ns |
 |   GetKnownMethod_DELETE |  8.5029 ns | 0.0040 ns | 0.0144 ns |  8.5020 ns |
 |     GetKnownMethod_HEAD |  5.8423 ns | 0.0036 ns | 0.0140 ns |  5.8398 ns |
 |    GetKnownMethod_PATCH |  7.8644 ns | 0.0203 ns | 0.0761 ns |  7.8557 ns |
 |     GetKnownMethod_POST |  4.9119 ns | 0.0023 ns | 0.0087 ns |  4.9110 ns |
 |      GetKnownMethod_PUT |  4.0161 ns | 0.0044 ns | 0.0158 ns |  4.0174 ns |
 |  GetKnownMethod_OPTIONS | 10.6244 ns | 0.0125 ns | 0.0468 ns | 10.6132 ns |
 |    GetKnownMethod_TRACE |  6.8743 ns | 0.0102 ns | 0.0395 ns |  6.8686 ns |
 | GetKnownVersion_HTTP1_1 |  2.6691 ns | 0.0263 ns | 0.1417 ns |  2.5801 ns |

After
 |                  Method |      Mean |    StdErr |    StdDev |
 |------------------------ |---------- |---------- |---------- |
 |      GetKnownMethod_GET | 2.0009 ns | 0.0017 ns | 0.0066 ns |
 |  GetKnownMethod_CONNECT | 4.7313 ns | 0.0015 ns | 0.0057 ns |
 |   GetKnownMethod_DELETE | 5.9907 ns | 0.0596 ns | 0.3154 ns |
 |     GetKnownMethod_HEAD | 5.9507 ns | 0.0014 ns | 0.0053 ns |
 |    GetKnownMethod_PATCH | 4.9168 ns | 0.0489 ns | 0.2017 ns |
 |     GetKnownMethod_POST | 4.7472 ns | 0.0024 ns | 0.0094 ns |
 |      GetKnownMethod_PUT | 6.1486 ns | 0.0731 ns | 0.3014 ns |
 |  GetKnownMethod_OPTIONS | 4.7275 ns | 0.0013 ns | 0.0046 ns |
 |    GetKnownMethod_TRACE | 4.7980 ns | 0.0271 ns | 0.1049 ns |
 | GetKnownVersion_HTTP1_1 | 2.5617 ns | 0.0008 ns | 0.0030 ns |

I would like to know we can regenerate this if we change the list of known methods. Can we move the algorithm for https://github.com/arespr/ConsoleApp1/blob/24ace01d17d1015c43c60d658319f1ed2fc5a043/src/ConsoleApp1/Utils.cs to our CodeGenerator project, and have it generate the relevant code in HttpUtilities.cs? You can use the same conventions we use in KnownHeaders and FrameFeatureCollection (e.g. .Generated.cs partial class).
It's important that adding or modifying known methods is drop-in. So that probably involves at least generating the _knownMethods declaration so the array is the correct size, and of course generating GetKnownMethodIndex.

@halter73 I have added HttpUtiliies to CodeGenerator project.

Dev
 |                  Method |       Mean |    StdDev |
 |------------------------ |----------- |---------- |
 |      GetKnownMethod_GET |  2.1001 ns | 0.0115 ns |
 |  GetKnownMethod_CONNECT | 10.2516 ns | 0.0269 ns |
 |   GetKnownMethod_DELETE |  9.0024 ns | 0.3372 ns |
 |     GetKnownMethod_HEAD |  6.0905 ns | 0.0165 ns |
 |    GetKnownMethod_PATCH |  8.2099 ns | 0.1538 ns |
 |     GetKnownMethod_POST |  5.1370 ns | 0.0133 ns |
 |      GetKnownMethod_PUT |  4.1250 ns | 0.0271 ns |
 |  GetKnownMethod_OPTIONS | 11.3046 ns | 0.5302 ns |
 |    GetKnownMethod_TRACE |  7.1423 ns | 0.0229 ns |
 | GetKnownVersion_HTTP1_1 |  2.9267 ns | 0.0448 ns |

Pr
 |                  Method |      Mean |    StdDev |
 |------------------------ |---------- |---------- |
 |      GetKnownMethod_GET | 2.0916 ns | 0.0065 ns |
 |  GetKnownMethod_CONNECT | 5.0860 ns | 0.0183 ns |
 |   GetKnownMethod_DELETE | 5.0462 ns | 0.0240 ns |
 |     GetKnownMethod_HEAD | 4.9901 ns | 0.0426 ns |
 |    GetKnownMethod_PATCH | 5.0271 ns | 0.0287 ns |
 |     GetKnownMethod_POST | 5.0453 ns | 0.0296 ns |
 |      GetKnownMethod_PUT | 5.0553 ns | 0.0180 ns |
 |  GetKnownMethod_OPTIONS | 5.0340 ns | 0.0458 ns |
 |    GetKnownMethod_TRACE | 5.0139 ns | 0.0228 ns |
 | GetKnownVersion_HTTP1_1 | 2.8913 ns | 0.0071 ns |

@Im5tu I can make it public and make shared code or remove id from unit tests.

@Im5tu or even leave as it is and it won't change test results.

@Im5tu  what do you propose ?

@arespr The only comments I see from @lm5tu are related to typo the "Numer" which should be changed "Number" instead in a couple places.
Thanks for making these changes. I'll review this more thoroughly Monday, and hopefully we can merge this.

Thanks for your PR and your patience @arespr!


feat: authentication api

@shivanshs9 The change is that he commented a lot of files, and merged a not ready commit. If you go to master and run npm run lint you will see we have an error and it should be fixed on the PR itself and I told to Robin to change that before he merge, and it didn't happen. Actually the PR about fastify was not following any of the rules you are talking about, he changed the way we connect to mongodb, in this PR actually I'm restoring the previous code that shoudn't be touched by Fastify PR. Our codebase on master is a mess, a lot of commented files. I just approved to be able to work on the authentication without many conflicts. I suggest you to navigate through the master code and see what you think about it. I'm looking forward to see a review to state a problem or bug present in my PR, I'm happy to discuss the problem you see.

@manualzuru Can we have a meeting talking about this? It seems this is going far beyond that should have gone.

Hi guys, let's definitely have a chat tomorrow. We are in this together💪🏽 All of you have been doing an amazing job and this type of discussion is not the first nor the last (like pandemics😆), just remember that if we are united we can do amazing things!!!

I've rebased this branch with master and fixed a few small issues and inconsistencies
Maybe we can review this again and merge? There will probably be some more work to finalize the whole auth flow.


can't seem to get elevation from google

Using the example straight out of the documentation.
$ geocode '45.15, -75.14' --provider google --method elevation
null

So there appears to be a new API for this.

https://console.cloud.google.com/apis/library/elevation-backend.googleapis.com
https://developers.google.com/maps/documentation/elevation/overview

curl "https://maps.googleapis.com/maps/api/elevation/json?locations=45.15,-75.14&key=$GOOGLE_API_KEY"
{
   "error_message" : "This API key is not authorized to use this service or API.",
   "results" : [],
   "status" : "REQUEST_DENIED"
}

And after enabling the Maps Elevation API and adding it to my key:
curl "https://maps.googleapis.com/maps/api/elevation/json?locations=45.15,-75.14&key=$GOOGLE_API_KEY"
{
   "results" :
   [
      {
         "elevation" : 70.44151306152344,
         "location" :
         {
            "lat" : 45.15,
            "lng" : -75.14
         },
         "resolution" : 38.17580795288086
      }
   ],
   "status" : "OK"
}

Further poking around reveals that method='elevation' isn't passing the API key onto the params dict.

Duplicate of #376. I guess this project is dead.


Release/v1.8.0 develop

Purpose

TODO:
merge release v1.8.0 into testnet first
How does the solution address the problem

Changes made

prnet cleaned-up successfully


PHP should have word completion

VSCode Version:

Version 1.3.1
Commit e6b4afa53e9c0f54edef1673de9001e9f0f547ae
Date 2016-07-12T13:28:46.761Z
Shell 0.37.6
Renderer 49.0.2623.75
Node 5.10.0

OS Version: ubuntu 14.04 3.13.0-32-generic x86_64
File Type: *.php

Preferences:
{
    "files.trimTrailingWhitespace": true,
    "files.autoSave": "onFocusChange"
}

Steps to Reproduce:

Open code.
Select Language Mode to PHP. (Or open a php file)
In the first line, I input Helloworld.
In the second line I input Hell.
Check word completion list has word Helloword.

In this version has save problem.

Version 1.4.0-insider
Commit 4656fe3ff2952e9538d81e7a7571674352e5d62f
Date 2016-07-29T05:12:17.453Z
Shell 0.37.6
Renderer 49.0.2623.75
Node 5.10.0

Duplicate of #21611


[Bug]Millenium on Opensuse does not open

Before Reporting

[X] I found no existing issues matching my bug
[X] My issue is not caused by a theme
[X] My issue is not caused by a plugin

Describe the Bug
When I setup millenium on opensuse linux, steam would not open with millennium set as the default launch options at all
Expected Behavior
when interacting with the desktop shortcut, Steam (and bu extension millennium) should open when millennium it set as the default launch option
Steps To Reproduce

set the desktop or any menu interactive item for steam to launch millennium.
try and open steam only to see it not open

Operating System
Linux
Anything else?

If you've made a desktop shortcut not managed by Millennium the issue falls in your hands, I don't know what your shortcut does nor does it have official support.
If you show me the shortcut I may have some idea, however its not garunteed.

I wont be able to do that for a bit but I did include the errors I got from trying to run the script in the original issue post

here is the setup of my desktop shortcut