fn: swagger update for tmpfs size

same question as in #1030 -- long term viability / desire of this as a feature was left murky

Let's hold off on this one... Until config/operational config decision is finalized.

@shaunsmith was asking about documentation.

We're going to remove user configuration this  and CPU configuration from the APIs in the trigger change -  as discussed previously it's unlikely that honoring these by guarantee (without adding substantial complexity to scheduling) will work in a scaled up system .  For both we'll set these by configuration in the server as a function of memory initially .

wrote that up (at last) https://github.com/fnproject/fn/issues/1106 i'm not sure it was well circulated that it was planned in triggers changes, feel free to add [0.2] to title or 'waiting' tag depending on scope

Sounds good. This PR was a consistency change to keep route configuration: cpu/mem/tmpfssize together. Since tmpfssize was merged in already, it should be in swagger. When we remove it, we can remove it along with cpu, etc.


man page: lists not formatted properly

Some lists in the man page are not shown as lists but as one long paragraph, e.g.
"You can also use special names to select particular edge case formats: - best: Select the best quality format represented by  a  single  file  with video and audio.  - worst: Select the"
I'll propose a PR.

@dstftw have you looked at the man page?  man -l youtube-dl.1 Search for the string I mentioned and you'll see that instead of being a list, it's all in one paragraph.

In fact, you can also look at the README.txt that is auto-generated with pandoc:
You can also use special names to select particular edge case formats: -
best: Select the best quality format represented by a single file with
video and audio. - worst: Select the worst quality format represented by
...

This is with pandoc 2.2.1 btw.

Test case:
cat t

foo:
 - bar
 - baz

foo:

 - bar
 - baz

pandoc -f markdown < t -t plain
foo: - bar - baz

foo:

-   bar
-   baz

Do you get a different result with pandoc?


[notebooks] Add a notebook tutorial on artefact detection

The artefact detection feature is a really nice one, and we should help users to leverage it in the most efficient way. I believe that a notebook tutorial would be a good way to do so, what do you think @SiddhantBahuguna?

I completely agree with you. I am on it!
Thanks :)

Now that https://github.com/mindee/notebooks/pull/5 has been merged, would you mind opening a PR here to add a new row in this table https://github.com/mindee/doctr/blob/main/notebooks/README.md ? :)
That will automatically deploy it in the documentation (https://mindee.github.io/doctr/latest/notebooks.html)

Now that mindee/notebooks#5 has been merged, would you mind opening a PR here to add a new row in this table https://github.com/mindee/doctr/blob/main/notebooks/README.md ? :)
That will automatically deploy it in the documentation (https://mindee.github.io/doctr/latest/notebooks.html)

Thanks for the further guidance!
A PR has been opened:)

The issue shouldn't be closed before the PR is merged!

The issue shouldn't be closed before the PR is merged!

Oh my bad :) Thanks


Run controller although doesn't has permission

Hi all,
I have a problem when use ngRoute.
I have defined a permission to view this page A and it work.
When user who has no permission to access try to open page A, it will automatic redirect to page B.
But, in page B, I click to link page A, page A's controller run.
I think it's a bug. Anyone has same issue?
Sorry for my English.
Thank you.

@masterspambot Here is example:
http://plnkr.co/edit/lsL1kVEmhuddyXZiDvWY?p=preview
When click on page A, it will redirect to page B automatically. But in page B, if click link page A, it will run a's controller before redirect to B again.


Respect Promises in resource first.

Before:

After:

Btw, I'm not sure createResource handles () => {} and () => Promise in same manner.
upd: Seems it could harm someone by passing hidden lookup, {           value: s(),           refetching         } as params to function with optional args.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

2 of 2 (100.0%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 89.48%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
1217

Relevant Lines:
1296

💛  - Coveralls

I don't believe this is the direction we will be taking with the resource types. Thank you for the PR.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

For more information on this, see Tracking coverage changes with pull request builds.
To avoid this issue with future PRs, see these Recommended CI Configurations.
For a quick fix, rebase this PR at GitHub. Your next report should be accurate.

Details

2 of 2 (100.0%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 89.48%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
1217

Relevant Lines:
1296

💛  - Coveralls

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

For more information on this, see Tracking coverage changes with pull request builds.
To avoid this issue with future PRs, see these Recommended CI Configurations.
For a quick fix, rebase this PR at GitHub. Your next report should be accurate.

Details

2 of 2 (100.0%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 89.48%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
1217

Relevant Lines:
1296

💛  - Coveralls


Providing an integer to animateScroll throws an error

Since #272, if we provide an integer to animateScroll, the script fails: Uncaught TypeError: id.charAt is not a function in escapeCharacters.

Good catch! Should be fixed with https://github.com/cferdinandi/smooth-scroll/pull/278

I can confirm that it's now fixed, thank you!

Awesome, and thank you so much for letting me known about this!


Scikit-Learn Wrapper Cleanup

Fixed bugs, added tests, and added docs for scikit-learn wrapper.

pylint finally passing!


Compression Error

Hi,
I tried to run compress_async for 1000 files of about 100-200KB and I received this error ERROR: In nvcompBatchedLZ4CompressAsync(): Encountered Cuda Error: 700: 'an illegal memory access was encountered'. Anyone who encountered this problem?
Thanks,

@advanced373 Can you share more about this case here (e.g., the inputs you gave to all of the functions calls)? As well as information about your GPU, CUDA, and compiler versions. Thanks!

NVIDIA GeForce GTX 1050, Cuda 11.3, Compiler 11.0.
Here is my code.
file.txt

@nv-dlasalle can you help me with an opinion.? I'm working on a project that depends on GPU Compression and I want to know if the problem is my GPU. Thank you very much.

@advanced373 Sorry I haven't gotten back to you yet. In general, I think you're using the API correctly in that code snippet, though I haven't had the time to look at it rigorously. Your GPU I believe should work with nvcomp.
At this point, I would try simplifying the example to a single thread, as well as checking the return values of cudaMemcpy and cudaMallocManaged to ensure no errors are occurring there. It looks like you are also calling cudaFree() on your stream instead of cudaStreamDestroy(): https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__STREAM.html#group__CUDART__STREAM_1gfda584f1788ca983cb21c5f4d2033a62

For some images, when compression size is higher than the uncompressed one, I received this error.  I found interesting that this problem is not always encountered. Here is the complete output received. Code is the following:
#include "cascaded.hpp"
#include "lz4.hpp"
#include
using namespace std;
int getFileSize(FILE *in)
{
fseek(in, 0, SEEK_END);
int size = ftell(in);
rewind(in);
return size;
}
int main(int argc, char **argv)
{
FILE in = fopen(argv[1], "rb");
if (in == NULL)
{
cout << "Error in reading file!" << endl;
return 0;
}
unsigned char uncompressed_value;
int uncompressed_count = getFileSize(in);
unsigned char help = (unsigned char )malloc(uncompressed_count);
fread(help, uncompressed_count, 1, in);
cudaError_t cudaErr;
cudaMalloc((void)&uncompressed_value, uncompressed_count);
cudaMemcpy(uncompressed_value, help, uncompressed_count, cudaMemcpyHostToDevice);
nvcomp::LZ4Compressor compressor(
uncompressed_value, uncompressed_count, 65356);
const size_t temp_size = compressor.get_temp_size();
void *temp_space;
cudaErr = cudaMalloc(&temp_space, temp_size);
if(cudaErr != cudaSuccess)
{
printf("Error!\n");
return 0;
}
size_t output_size = compressor.get_max_output_size(
temp_space, temp_size);
void *output_space;
cudaErr =  cudaMalloc(&output_space, output_size);
if(cudaErr != cudaSuccess)
{
printf("Eroare in alocare outputSize!\n");
return 0;
}
cudaStream_t stream;
cudaErr = cudaStreamCreate(&stream);
if(cudaErr != cudaSuccess)
{
printf("Eroare in creare Stream!\n");
return 0;
}
nvcompError_t status;
printf("%d %d\n",output_size, temp_size);
compressor.compress_async(temp_space,
temp_size, output_space, &output_size, stream);
printf("%d\n",output_size);
}
ERROR: In nvcompCascadedCompressAsync(): Encountered Cuda Error: 700: 'an illegal memory access was encountered': CudaUtils::copy_async(dst, src, count, kind, stream).
terminate called after throwing an instance of 'nvcomp::NVCompException'
what():  nvcompCascadedCompressAsync() failed : code=10.
Aborted
Thank you very much for your help.

I have also another question. This library can be used in Windows?

Hi,
I got this error.
LZ4CompressionKernels.cu:730: block: [0,0,0], thread: [31,0,0] Assertion match_location < pos failed.
ERROR: In nvcompBatchedLZ4CompressAsync(): Encountered Cuda Error: 710: 'device-side assert triggered': CudaUtils::copy_async(dst, src, count, kind, stream).
CHECK FAILED: C:\Users\mihai\source\repos\Nvcomp\Nvcomp\nvcomp\src\LZ4.cpp:187
Thanks,

@advanced373 Thanks for providing more details. This looks like a bug in our code. Are you able to share the file/data which you were compressing that resulted in this error? Thanks!

Sure. This is my code.
#include <cascaded.hpp>
#include <lz4.hpp>
#include
#include <driver_types.h>
#include <cuda_runtime.h>
using namespace std;
int getFileSize(FILE* in)
{
fseek(in, 0, SEEK_END);
int size = ftell(in);
rewind(in);
return size;
}
int main(int argc, char** argv)
{
FILE* in = fopen(argv[1], "rb");
if (in == NULL)
{
cout << "Error in reading file!" << endl;
return 0;
}
unsigned char* uncompressed_value;
int uncompressed_count = getFileSize(in);
unsigned char* help = (unsigned char*)malloc(uncompressed_count);
fread(help, uncompressed_count, 1, in);
cudaError_t cudaErr;
printf("%d", uncompressed_count);
cudaErr = cudaMalloc((void**)&uncompressed_value, uncompressed_count);
if (cudaErr != cudaSuccess)
{
printf("Error!\n");
return 0;
}
cudaErr = cudaMemcpy(uncompressed_value, help, uncompressed_count, cudaMemcpyHostToDevice);
if (cudaErr != cudaSuccess)
{
printf("Error!\n");
return 0;
}
nvcomp::LZ4Compressor compressor(
uncompressed_value, uncompressed_count, 65536);
const size_t temp_size = compressor.get_temp_size();
void* temp_space;
cudaErr = cudaMalloc(&temp_space, temp_size);
if (cudaErr != cudaSuccess)
{
printf("Error!\n");
return 0;
}
size_t output_size = compressor.get_max_output_size(
temp_space, temp_size);
void* output_space;
cudaErr = cudaMalloc(&output_space, output_size);
if (cudaErr != cudaSuccess)
{
printf("Eroare in alocare outputSize!\n");
return 0;
}
cudaStream_t stream;
cudaErr = cudaStreamCreate(&stream);
if (cudaErr != cudaSuccess)
{
printf("Eroare in creare Stream!\n");
return 0;
}
nvcompError_t status;
printf("%d %d\n", output_size, temp_size);
compressor.compress_async(temp_space,
temp_size, output_space, &output_size, stream);
printf("%d\n", output_size);
}
And image that i tested.

@advanced373 I managed to track down the bug to our workaround for emulating __match_any_sync() on Pascal. It looks like I introduced this bug a few months ago, and unfortunately our testing has been focused on architectures after Pascal and missed this.
Here is a patch for you to test out until we get a new version out with this fix. Thanks for finding this issue!
diff --git a/src/LZ4CompressionKernels.cu b/src/LZ4CompressionKernels.cu
index eae235c..4d88002 100644
--- a/src/LZ4CompressionKernels.cu
+++ b/src/LZ4CompressionKernels.cu
@@ -121,10 +121,20 @@ inline __device__ int warpMatchAny(const int participants, T val)
   int mask = 0;

   // full search
+  __shared__ T values[32];
   assert(blockDim.x == 32);
-  for (int d = 1; d < 32; ++d) {
-    const int nbr_id = (threadIdx.x + d) & 31;
-    mask |= (val == __shfl_sync(participants, val, nbr_id)) << nbr_id;
+  assert(blockDim.y == 1);
+  if ((1 << threadIdx.x) & participants) {
+    values[threadIdx.x] = val;
+    __syncwarp(participants);
+    for (int d = 0; d < 32; ++d) {
+      const int nbr_id = (threadIdx.x + d) & 31;
+      if ((1 << nbr_id) & participants) {
+        const T nbr_val = values[nbr_id];
+        mask |= (val == nbr_val) << nbr_id;
+      }
+    }
+    __syncwarp(participants);
   }

   return mask;

@advanced373 This should be fixed in the latest version now (https://github.com/NVIDIA/nvcomp/releases/tag/v1.2.3). Please let me know if see any more issues. Thanks!


将@reference解析对象放到Spring容器中

将@Reference注解解析时关联对象放到Spring容器中管理

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.dingzc seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

@surpass1990  service与transactional同用遇到服务无法export的问题，你的用的spring是什么版本，我用4.3.10不存在这个问题


[New game]: haunting game

🎮 Game Request
I want to add haunting game
Point down the features
Game points
Select program in which you are contributing
GSSoC23
Code of Conduct

[X] I follow CONTRIBUTING GUIDELINE of this project.

/assign

Hey @Kalivarapubindusree !
Thank you for raising an issue 💗
You can self assign the issue by commenting /assign in comment 😀
Make sure you follow CODE OF CONDUCT and CONTRIBUTING GUIDELINES 🚀
Don’t Forget to ⭐ our GameZone🎮
Make sure you join our Discord🕹

Can you please assign this task @kunjgit

Can you please review this pr @kunjgit @gurjeetsinghvirdee

Can you please review this pr @kunjgit @gurjeetsinghvirdee

Hey @Kalivarapubindusree ! Thank you so much for your raising the issue💗
It’s all yours, you can come anytime again and make some contributions! 🚀
Alone, we can do little, but together we can do so much! 😇


Stringable not sharing base Str macros

Laravel Version: 8.10.0
PHP Version: 7.4.3

Description:
When using Str macros one might expect that then using Str::of and using Str fluently, that macros would be available for use on that as well. This is not the case and attempting to use a Str macro on a Stringable instance results in an error. This while makes sense that it doesn't work is very unexpected as (correct me if I'm wrong) all other Str methods work as expected on the Stringable object, so it wouldn't be a huge leap for macros defined on the Str class would also apply to the Stringable without further work from the developer side.
Steps To Reproduce:

Add a macro to Str.
Attempt to use the macro on a Stringable instance.

Stringeable and Str are two different things so yeah this won't automatically be applied to both if you add a macro to one of them. I also don't know if it makes sense to do so.

@driesvints I understand they are separate classes, but having to add 2 identical macros when everything else just automatically works and how closely they are related seems like bad DX.
Specifically in pseudo-code, wouldn't it be nice to have the macro lookup on the Stringable class incorporate checks on the Str class like:
Stringable:
if (Str::hasMacro('supercool'))
return new static(Str::supercool($value));

In this way any macros defined on the Str helper, would be readily available on Stringable without anything like:
Str::macro('supercool', function () {
    // Does something super cool and returns a string
});

AND
Stringable::macro('supercool', function () {
   new static(Str::supercool($value));
});

I'm not super opposed to it but it would be a breaking change I believe.


如何不使用php artisan serve开启 localhost:8000 直接使用虚拟域名访问扩展包里面的路由

如何实现  域名/包设置的路由  进行访问

Courtesy of Google Translate:

How do not use php artisan serve open localhost: 8000 direct access to the use of virtual domain expansion package inside the routing.
How to achieve the domain name / package set the route to access

I'm sorry, but even with translation, I'm not sure I understand the question.
I would also add that I don't really maintain this package anymore.  There are probably many other Laravel 5 package templates out there that are better maintained than mine.


Please make this work with Rust Stable if possible or let me know how to switch to it

Please make this work with Rust Stable if possible or let me know how to switch to it   if possible !!
Rust nightly is giving me all kinds of issues -- incremental compiler breaking and such

The nightly version is pinned in the rust toolchain file to prevent just that. Did you remove or overwrite it?
If nightly reall doesn't work for you, just change the entry in the toolchain file to say stable and try to compile it. There shouldn't be too many nightly-only features that need fixing.
Also mind that if you use the config described in .cargo/fast_builds_config.toml by renaming it to config.toml, it assumes nightly, but has instructions for how it to switch to stable.
Let me know if you run into any issues :)


Wavelength check updates

Soften the wavelength constraints introduced in #476 in order to address #486.

@unbohn , this is ready for review.  Once integrated, the wl_shift optimization should work again (tested successfully last night together with #490 ).

Thanks, @pgbrodrick! I had overseen this issue in my previous PR. Merging.


Intel RealSense Installation file for Win11?

Required Info

Camera Model
D400 }

Firmware Version
(Open RealSense Viewer --> Click info)

Operating System & Version
{Win (11)

SDK Version
2.. }

Language
{C/C#/labview/nodejs/opencv/pcl/python/unity }

Segment
{Robot/Smartphone/VR/AR/others }

Issue Description
Why there is no installation file for Intel RealSense SDK available for Windows 11?

Hi @bineethk  Intel do not currently provide specific support for Windows 11 at the time of writing this, though they have tested the Windows 10 version of the SDK on Windows 11 with a range of example programs such as rs-capture, rs-hello-realsense and rs-callback and did not experience problems.
A Windows 11 user did experience a memory leak in the RealSense Viewer tool but disabling the Viewer's GLSL options resolved the leak, as described at https://github.com/IntelRealSense/librealsense/issues/10102

Hi @bineethk  Do you require further assistance with this case, please?  Thanks!

Case closed due to no further comments received.


update name list

@NimeshaWeerasinghe   thanks for making your first contribution, I will be merging your Pull Request, also look at the issues so that you can get a chance to win a limited community Swag from me.
If you like the project and Repo please give it a star and Follow me on Github (would be appreciated)


How to debbug the app?

VS code Conf:
https://github.com/nodetello/nodetello/blob/master/.vscode/launch.json


ownCloudSQL sharing driver auto accepts shares

Describe the bug
The ownCloudSQL sharing driver auto accepts shares.
Steps to reproduce
Use the parallel deployment. Share from oCIS to oC10 and the other way round. Also share from oC10 to oC10 and oCIS to oCIS.
Expected behavior
The sharing is consistent across the backends (and configurable like in oC10).
Actual behavior
Depending on the backend, shares are auto accepted or not.
Additional context
auto acceptance of shares is configurable in oC10. We could adapt the settings there to match the behavior of oCIS. Though this may not always be possible at a customers deployment.

Note: for automated testing we need to make sure to run all parallel-deployment tests with auto-accept off on oC10 (to match the way oCIS is started). I know there are various test scenarios that have enable auto-accept on-the-fly (which can be done on oC10 without completely restarting the whole system-under-test). But having that mismatch between the behavior on oC10 and on oCIS will be very confusing for test scenarios - and also confusing for production deployments!
When deploying an oC10+oCIS parallel system, it seems "a good thing" (tm) to make sure that all the settings in oC10 are set to match what has been configured (or is hard-coded) behavior in oCIS.

according to PM this is ok for GA


Fix getting dateClass

Fixes #864

[ ] Added or updated tests
[ ] Documented user facing changes
[ ] Updated CHANGELOG.md

@canvural Could you come up with a test?

@szepeviktor Yeah I think so. I'll add it.

Ok, I can't come up with a test case. Anyway we now know we shouldn't access that property directly 😄


Typo in the connection info in the pom prevents publishing an RC

Reporter: Alex Levenson / @isnotinvain
Assignee: Alex Levenson / @isnotinvain
Note: This issue was originally created as PARQUET-202. Please see the migration documentation for further details.

Alex Levenson / @isnotinvain:
Issue resolved by pull request 134
https://github.com/apache/incubator-parquet-mr/pull/134


Missing check in check_level

Hi,
In the following code:
https://github.com/leanprover/lean/blob/master/src/kernel/type_checker.cpp#L144-L152
the level is only checked for undefined params if m_params happens to be nonempty. I think it would make sense to add an else clause that confirms l has no params in the case that m_params is empty.
Daniel

The type checker provides the method check_ignore_undefined_universes.
https://github.com/leanprover/lean/blob/master/src/kernel/type_checker.cpp#L357
It sets m_params to nullptr to indicate the universe level parameters do not need to be checked
We use the check_ignore_undefined_universes to implement the sanity check procedure check_term
https://github.com/leanprover/lean/blob/d8620ef4c90afb6bc44a404b0467ff25535d9b4d/src/library/util.cpp#L772
The check_term is used in several tactics to make sure they are not producing type incorrect terms
https://github.com/leanprover/lean/search?utf8=✓&q=check_term

Retracted. It seems this is intensional, since it provides a way to check while ignoring undefined universe errors. Sorry for the mixup.


chore: move configuration files into separate directory

Additional Information

[x] I read the contributing guide
[x] I added documentation related to the changes made.
[x] I added or updated tests related to the changes made.

Your ENS/address:

PR-Codex overview
This PR moves configuration files into a dedicated dev folder and updates various file paths accordingly. It also makes minor changes to some scripts and adds new utility functions.
Detailed summary

Moves configuration files to dev folder
Updates file paths in various files accordingly
Adds new utility functions caller, filePath, and shell to dev/utils/utils.ts
Updates tsconfig.json and tsconfig.node.json to reference new file paths
Updates vitest.config.ts to reference new test file paths
Updates prepublishOnly.ts to reference the correct package.json location
Updates updateVersion.ts to reference the correct package.json and version.ts locations
Updates on-push-to-main.yml to include cwd field
Makes minor changes to changeset, lint, and format scripts to reference new configuration files

The following files were skipped due to too many changes: dev/utils/getCurrentLine.ts

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Will close this too. Reasons can be found here


Implement minimal datatype registry for cross-batch deduplication

Once https://github.com/rerun-io/rerun/issues/1805 is fixed, schema metadata won't be duplicated across multiple cells of the same table anymore, i.e. all the cells in an incoming batch will share the same schema.
That's a great start but it's far from enough: schema metadata will still be duplicated across tables/batches.
We need a way of deduplicating schema information on the server side (and why not the clients too while we're at it), e.g. by hashing DataTypes and making them available through a global registry so the deserializer can make sure to deduplicate the data on entry.
Of course another solution is to have the clients directly access the central schema registry on the server so they can only send hashes to begin with; but that's future work for when we need it.

Between re_arrow2 doing heap deduplication and the upcoming work on dense chunks, this is now superfluous.


D2Co

Uncovering User Interest from Biased and Noised Watch Time in Video Recommendation. In Recsys23.

Work during Huawei Noah's internship,  needs to be merged into huawei-noah directory.


Update link to CI artifacts

Noticed that the readme page links to some TeamCity builds that don't seem to be used anymore.  It looks like you've transitioned to AppVeyor, so updated the link to point to that instead.

Merged manually.


fixfix case

Proposed changes
Issue Number: close #xxx

user in some case is repetitive
The order of backups may not be consistent

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall

run p0


Smart interpret branch base

I would like it to check if there is a parent work item and that parent has a branch, use that as the branch point versus the default branch.

This is now merged.


memry/memory

using the more formal pronunciation :)

Thank you for the catch!

Thanks for your work on the docs, they're looking great.
Also - happy array programming!


Test suite improvements

From the first commit up to Improve PHPDoc types (a6e9b0c) It's basically CS.
To be backported to 2.4 LTS:

Consolidation of Factory Exception expectations + namespe bug
[Factory] Fix unsafe call non InputInterface methods
Consolidation of InputInterface::merge and Fix unsafe merging

This PR could be partial merge at least up to the commit Assert objects are instances of the expected type and the three commits from above
PHP < 5.5 Incompatibilties:

Use of FQDN::class constant instead FQDN string
Use of yield keyword

I've open an issue on zend-validator for make 0 and 0.0 to be non empty https://github.com/zendframework/zend-validator/pull/35

I think "required: false" should not be an exclusion for not reject the input is "allow_empty:false"


'jaxlib.xla_extension.Buffer' object has no attribute '_value'

This bug seems to have crept in somewhere between 0.2.6 and 0.2.7.
On jax=0.2.6, jaxlib=0.1.57+cuda110, the following code works:
import jax
x = jax.device_put(np.ones((32, 32)))
print(x.device_buffer)

While on jax=0.2.7, I get the following error:
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-1-32006f6a371a> in <module>
      1 import jax
      2 x = jax.device_put(np.ones((32, 32)))
----> 3 print(x.device_buffer)

~/miniconda3/envs/jax/lib/python3.8/site-packages/jax/interpreters/xla.py in _forward_method(attrname, self, fun, *args)
    999
   1000 def _forward_method(attrname, self, fun, *args):
-> 1001   return fun(getattr(self, attrname), *args)
   1002 _forward_to_value = partial(_forward_method, "_value")
   1003

AttributeError: 'jaxlib.xla_extension.Buffer' object has no attribute '_value'

Happy to submit a PR, but I'm not sure where to start looking on this.

Thanks for raising this!
@jblespiau any guesses? I noticed this:
In [2]: type(y)
Out[2]: jax.interpreters.xla._DeviceArray

In [3]: type(y.device_buffer)
Out[3]: jaxlib.xla_extension.Buffer

It looks like calling print on a Buffer (i.e. calling its __str__) is now erroring this way.

For me it works at head from within google:
In [10]: jitted = jax.jit(lambda x: x+1)
In [11]: jitted(1)
Out[11]: DeviceArray(2, dtype=int32)
In [12]: jitted(1)
Out[12]: Buffer(2, dtype=int32)
In [13]: type(jitted(1))
Out[13]: google3.third_party.tensorflow.compiler.xla.python.xla_extension.Buffer
In [14]: str(jitted(1))
Out[14]: '2'
_value is defined in xla.cc:
https://github.com/tensorflow/tensorflow/blob/6b599c349909e69f6e24e202ffdbf448baf72b74/tensorflow/compiler/xla/python/xla.cc#L335
So this is because, str  on a Buffer requires jaxlib 0.1.58, as it will access _value. I guess before it was defaulting to some pybind11 default.
was print(x.device_buffer) only printing Buffer + some memory address?
It will be solved by the next release of xla.cc. I don't think losing the feature to print the device_buffer is key?

It isn’t a pressing issue on my end.
I ran into it while troubleshooting compatibility with an external code
base.  This obviously wasn’t my real problem.
On Wed, Dec 9, 2020 at 5:30 PM Jean-Baptiste Lespiau <
<EMAIL_ADDRESS>wrote:

For me it works at head from within google:
In [10]: jitted = jax.jit(lambda x: x+1)
In [11]: jitted(1)
Out[11]: DeviceArray(2, dtype=int32)
In [12]: jitted(1)
Out[12]: Buffer(2, dtype=int32)
In [13]: type(jitted(1))
Out[13]:
google3.third_party.tensorflow.compiler.xla.python.xla_extension.Buffer
In [14]: str(jitted(1))
Out[14]: '2'
_value is defined in xla.cc:
https://github.com/tensorflow/tensorflow/blob/6b599c349909e69f6e24e202ffdbf448baf72b74/tensorflow/compiler/xla/python/xla.cc#L335
So this is because, str on a Buffer requires jaxlib 0.1.58, as it will
access _value. I guess before it was defaulting to some pybind11 default.
was print(x.device_buffer) only printing Buffer + some memory address?
It will be solved by the next release of xla.cc. I don't think losing the
feature to print the device_buffer is key?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/google/jax/issues/5140#issuecomment-742151543, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAJHYQGT7W53GA23CQWR6FDSUAJDTANCNFSM4US2WL7A
.

@jblespiau thanks for looking into it, and for the detailed comment! If as you say this will be solved with the next jaxlib release, then that seems like a great plan to me.

Seems to have been fixed in a subsequent jaxlib release.


Update Calculate Salary in User Guide and Developer Guide

Update Readme to correct CI banners and add acknowledgement to AddressBook-Level3.
Update User Guide documentation on Calculate Salary function.
Update Developer Guide documentation on Calculate Salary use case.
Create portfolio document to record my contributions to the tP.

Codecov Report

Merging #34 (7e06ff5) into master (9c96917) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master      #34   +/-   ##
=========================================
  Coverage     72.15%   72.15%
  Complexity      399      399
=========================================
  Files            70       70
  Lines          1232     1232
  Branches        125      125
=========================================
  Hits            889      889
  Misses          311      311
  Partials         32       32

Continue to review full report at Codecov.

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

Resolves #23, resolves #26


[Event Hubs] Azure.Messaging.EventHubs.Processor Mocking Samples

This sample aims to demonstrate basic mocking concepts needed to test the EventHubProcessorClient.
Contributing to the Azure SDK
Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.
For specific information about pull request etiquette and best practices, see this section.

Partially resolves #7382

API change check
API changes are not detected in this pull request.


Make commands uninstall local package

We just noticed that some make commands (all those commands depending on setup_ci and install_tag) remove the local package (i.e. the one currently under development in the repo, installed with make install) from the environment.
This is quite annoying, especially in contexts where one is developing a namespace package instead of a simple package (like we do with cgnal namespace) but I don't think it should happen in general.
The quickest solution should be to invert the priority of dependence from make XXX: $(install_tag) setup_ci to make XXX:  setup_ci $(install_tag), but I am not completely sure about all the implications of this change.

yes, we can just swap the order, I guess


Problems validating cards

Description
The SDK is not fully validating cards leading our users to manually validate before sending data do the SDK.
For example there's no validation for an empty string being passed as card_holder_name to the card validator which should reject but instead it passes and than fails at the API level.
Expected Behavior
It should also invalidate empty strings.

I have the same issue. Some times I really need to validate manually this empty strings or strings with special character.

Forget about doing credit card validations with this library. Use it only for generating the cardHash. Add any other library layer before that better validates credit cards, such as https://github.com/braintree/card-validator


add(scan): Implement scan gRPC method

Motivation
We want to provide a streaming method for registering keys, getting cached scan results, and listening for any new scan results.
Closes #8256.
PR Author Checklist
Check before marking the PR as ready for review:

[ ] Will the PR name make sense to users?
[ ] Does the PR have a priority label?
[ ] Have you added or updated tests?
[ ] Is the documentation up to date?

For significant changes:

[ ] Is there a summary in the CHANGELOG?
[ ] Can these changes be split into multiple PRs?

If a checkbox isn't relevant to the PR, mark it as done.
Solution

Calls ScanService with RegisterKeys, Results and SubscribeResults requests
Creates a response channel
Creates a new ReceiverStream wrapper around the response receiver
Spawns a tokio task

Transposes the Results response and sends them to the response channel
Waits for results from the results_receiver returned by the call to SubscribeResults and sends them to the response channel

Returns the response stream

Review
Anyone can review.
Reviewer Checklist
Check before approving the PR:

[ ] Does the PR scope match the ticket?
[ ] Are there enough tests to make sure it works? Do the tests cover the PR motivation?
[ ] Are all the PR blockers dealt with?
PR blockers can be dealt with in new tickets or PRs.

And check the PR Author checklist is complete.

~/github/zebra$ $HOME/go/bin/grpcurl -plaintext -import-path ./zebra-grpc/proto -proto zebra-grpc/proto/scanner.proto -d '{"keys": [{ "encoded_key": "zxviews1q0duytgcqqqqpqre26wkl45gvwwwd706xw608hucmvfalr759ejwf7qshjf5r9aa7323zulvz6plhttp5mltqcgs9t039cx2d09mgq05ts63n8u35hyv6h9nc9ctqqtue2u7cer2mqegunuulq2luhq3ywjcz35yyljewa4mgkgjzyfwh6fr6jd0dzd44ghk0nxdv2hnv4j5nxfwv24rwdmgllhe0p8568sgqt9ckt02v2kxf5ahtql6s0ltjpkckw8gtymxtxuu9gcr0swvz", "start_height": 736000 }]}' '<IP_ADDRESS>:8231' scanner.Scanner/Scan
{
  "height": 780532,
  "results": {
    "zxviews1q0duytgcqqqqpqre26wkl45gvwwwd706xw608hucmvfalr759ejwf7qshjf5r9aa7323zulvz6plhttp5mltqcgs9t039cx2d09mgq05ts63n8u35hyv6h9nc9ctqqtue2u7cer2mqegunuulq2luhq3ywjcz35yyljewa4mgkgjzyfwh6fr6jd0dzd44ghk0nxdv2hnv4j5nxfwv24rwdmgllhe0p8568sgqt9ckt02v2kxf5ahtql6s0ltjpkckw8gtymxtxuu9gcr0swvz": {
      "txIds": [
        "HFGctyvCDQJPnAlUF4QD0W+sfOjbWUrGDbdiE+bIgms="
      ]
    }
  }
}
{
  "height": 780532,
  "results": {
    "zxviews1q0duytgcqqqqpqre26wkl45gvwwwd706xw608hucmvfalr759ejwf7qshjf5r9aa7323zulvz6plhttp5mltqcgs9t039cx2d09mgq05ts63n8u35hyv6h9nc9ctqqtue2u7cer2mqegunuulq2luhq3ywjcz35yyljewa4mgkgjzyfwh6fr6jd0dzd44ghk0nxdv2hnv4j5nxfwv24rwdmgllhe0p8568sgqt9ckt02v2kxf5ahtql6s0ltjpkckw8gtymxtxuu9gcr0swvz": {
      "txIds": [
        "HFGctyvCDQJPnAlUF4QD0W+sfOjbWUrGDbdiE+bIgms="
      ]
    }
  }
}
{
  "height": 780616,
  "results": {
    "zxviews1q0duytgcqqqqpqre26wkl45gvwwwd706xw608hucmvfalr759ejwf7qshjf5r9aa7323zulvz6plhttp5mltqcgs9t039cx2d09mgq05ts63n8u35hyv6h9nc9ctqqtue2u7cer2mqegunuulq2luhq3ywjcz35yyljewa4mgkgjzyfwh6fr6jd0dzd44ghk0nxdv2hnv4j5nxfwv24rwdmgllhe0p8568sgqt9ckt02v2kxf5ahtql6s0ltjpkckw8gtymxtxuu9gcr0swvz": {
      "txIds": [
        "nvIywWt5HlwTwGcRV3bc+hVEsYMEAa8cKCiGymOVZ54="
      ]
    }
  }
}
..
^C

For the manual test i think it will be nice if we can show that we are listening and that a new transaction gets in.

For the manual test i think it will be nice if we can show that we are listening and that a new transaction gets in.

I did, that's the second console output, I deleted the key, added it back, waited a bit, and hit ctrl-C after seeing a few results.

I am wondering if we should also have a subscribe method that just subscribe to the stream of an already registered key.

Do you have a use case or motivation in mind? I'm thinking clients probably want the results whether their key is registered or not, so it feels redundant.

Added: It feels the method covers too much so it kind of leave obsolete other methods that we need to maintain if we keep.

It's a push interface, it's useful for clients that are calling the RPC methods from a browser environment, or for usability if some clients find it simpler to use the pull interface. The RPC methods are only thin wrappers around the service requests, so there shouldn't be much of a maintenance burden to supporting both.

I did, that's the second console output, I deleted the key, added it back, waited a bit, and hit ctrl-C after seeing a few results.

Ok, thanks for the clarification.

Do you have a use case or motivation in mind? I'm thinking clients probably want the results whether their key is registered or not, so it feels redundant.

I was expecting that the users will register a key and start scanning with registerkey.
Then to get all the cached results with getresults.
Subscribe to future results with subscribe.

This makes all that in one step, which i think it can be fine but i don't remember it was planned this way.

This method is a push interface, the pull interface is useful for clients that are calling the RPC methods from a browser environment, or for usability if some clients find it simpler to use the pull interface.

I don't remember that we planned to have 2 different interfaces (with overlapping functionality).

The RPC methods are only thin wrappers around the service requests, so there shouldn't be much of a maintenance burden to supporting both.

It is more easy to add than to remove. Once you support an api call you make a commit to support it (otherwise applications will break). You can have deprecation policies, etc but in general you need to keep them.
I don't mind adding this call, i just think it do a lot more than needed.

Can you update the manual tests to show the new output format ? The other option is to add the snapshots, whatever is easier for you.

I'll try adding the snapshots, since we need to do that anyways.


Creating displacements with the quiet option does not write a phonopy_disp.yaml

Given any POSCAR (reproduced with the following):
Al1
1.0
2.473329 0.000000 1.427977
0.824443 2.331877 1.427977
0.000000 0.000000 2.855955
Al
1
direct
0.000000 0.000000 0.000000 Al

Running phonopy -q -d --dim='3 3 3' does not create a phonopy_disp.yaml (it still correctly creates the SPOSCAR and POSCAR-001 that I would expect). Running phonopy -d --dim='3 3 3' gives me the expected POSCARs and the expected phonopy_disp.yaml.
I am using phonopy==2.2.0 on Python 3.7

Thanks. I fixed it at https://github.com/atztogo/phonopy/commit/edce334c3b2550d1fd05dc7b7c12ed8535a8c57b, currently in develop branch.

Ah, okay! Thanks!


Detect proprietary AMD drivers too

Untested on an actual catalyst install but this is the right kernel module to detect.

LGTM, will merge once Travis is happy


test: add test cases for platform cost

Adding test cases to the cost package

This is wip  and will add more tests once i get feedback on the style.

Changed the implementation of Total so that you specify the number of requests and the length of invocation per request. I think that probably makes more sense.
I haven't added test cases to cover boundary conditions such as < 0 etc didn't think that was required

cool thanks! Yeah I wouldn't worry about < 0 either. Looks like we're not even using Total :D hahah, we could just remove that for now

I just got my first Up-powered bill... $0.56. Not too bad, haha!!

Personally, I would leave it because you reckon we would eventually use it but happy for you to make the call.


bugfix: add the missing devices field when creating cri container

Ⅰ. Describe what this PR did
As stated in the title.
Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗？)
No
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews

Codecov Report

Merging #2209 into master will decrease coverage by 0.2%.
The diff coverage is 25%.

@@            Coverage Diff             @@
##           master    #2209      +/-   ##
==========================================
- Coverage   64.97%   64.76%   -0.21%
==========================================
  Files         208      208
  Lines       16711    16727      +16
==========================================
- Hits        10858    10834      -24
- Misses       4507     4540      +33
- Partials     1346     1353       +7

Flag
Coverage Δ

#criv1alpha1test
32.96% <12.5%> (-0.08%)
:arrow_down:

#criv1alpha2test
33.52% <12.5%> (-0.2%)
:arrow_down:

#integrationtest
39.64% <0%> (-0.39%)
:arrow_down:

#unittest
23.83% <0%> (-0.03%)
:arrow_down:

Impacted Files
Coverage Δ

cri/v1alpha2/cri.go
62.64% <25%> (-0.82%)
:arrow_down:

cri/v1alpha1/cri.go
62.22% <25%> (-0.86%)
:arrow_down:

daemon/containerio/hijack_conn.go
77.14% <0%> (-11.43%)
:arrow_down:

daemon/containerio/options.go
84.12% <0%> (-4.77%)
:arrow_down:

apis/server/utils.go
61.9% <0%> (-4.77%)
:arrow_down:

pkg/meta/store.go
60.15% <0%> (-3.91%)
:arrow_down:

daemon/mgr/container_utils.go
80.72% <0%> (-3.62%)
:arrow_down:

daemon/containerio/container_io.go
74.58% <0%> (-1.11%)
:arrow_down:

daemon/mgr/container.go
56.55% <0%> (-0.41%)
:arrow_down:

... and 2 more

There is no test case to cover device in kubernetes? @YaoZengzeng

I am afraid we could add device testing in cri-tools. @YaoZengzeng @Starnop

LGTM


Possible to grab the taskId generated by Firebase?

I'd like to leverage the unique id created by Firebase when pushing a task on the queue.  Is it possible to extract this from the data from the worker side or does it need to be explicitly added to the data payload?

The client that added it generates the ID, so you can always put that info in the task itself.


Readme mentions throwing RsFlash

The part Redirects from the Readme contains an example that throws an instance of RsFlash (line 537). RsFlash isn't a throwable, is the example wrong?

@yegor256 please pay attention to this issue (par.21)

@looperhacks fixed in 	ca2fa1e thanks!


2/9 Review Ticket

 Worked on API Helper
Expected

[x] .1 - Frontend UI demo.   UI takes inputs and passes them to an API and returns data from the backend to frontend.

[x] .1 - Postman API Demo.  JSON Raw/Body formatted API passes inputs to backend and updates persistent table.

[x] .1 - Java Demo - Object Creation.  Tester method that shows creation of Objects and outputs to Terminal, illustrate printing objects (hopefully using toString().

Extra for now, required at end of project

[x] .1 - Java Demo - Model Init.   Delete database and show the creation and population of tables.   Expected in this step is the use of CommandLineRunner and the use of a tool like SQLite Viewer

[x] .1 - Java Demo with Postman or UI - All CRUD methods.   Above was focused on Create and Read, this is focused on Update and Delete.

Completed all expected requirements as well as did java demo with model init, has database with all CRUD methods (including Create, Read, Update, Delete)
SCORE: 1/1
(0.4 complete, including 0.1 extra)


feat!: ADR-014: Permissions improvements

Description
This PR improves the permissions systems as described on ADR-014.
Closes: #855

Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...

[x] included the correct type prefix in the PR title
[x] added ! to the type prefix if API or client breaking change
[x] targeted the correct branch (see PR Targeting)
[x] provided a link to the relevant issue or specification
[ ] followed the guidelines for building modules
[x] included the necessary unit and integration tests
[x] added a changelog entry to CHANGELOG.md
[ ] included comments for documenting Go code
[ ] updated the relevant documentation or specification
[x] reviewed "Files changed" and left comments if necessary
[x] confirmed all CI checks have passed

Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...

[ ] confirmed the correct type prefix in the PR title
[ ] confirmed ! in the type prefix if API or client breaking change
[ ] confirmed all author checklist items have been addressed
[ ] reviewed state machine logic
[ ] reviewed API design and naming
[ ] reviewed documentation is accurate
[ ] reviewed tests and test coverage
[ ] manually tested (if applicable)

Can we have a query to show the all registered permissions? I think it would be useful to check existing permissions.

Unfortunately, as permissions are registered when the binary is executed, no. They are not stored inside the current context so that's not possible. We will however have all the details inside our docs


add authenticity token to form in students table

This resolves one of the suggestions from the security audit

This is interesting. Rails 5 introduced per-form CSRF tokens, and it would be nice to use those here.
The easiest way to get them is to use Rails helpers like form_with, which isn't possible in this context. However, you should be able to pass in the token as a React prop to the table, using per_form_csrf_token.


Integrating a ReactJs component in a wordpress with Divi project

Problem Description
I am developing a project using ReactJs and Wordpress with a Divi Theme. Everytime I create a divi extension using the instructions written in here (https://www.elegantthemes.com/documentation/developers/create-divi-extension/) I end up getting a problem when a execute yarn start
Failed to compile.

./node_modules/react-transition-group/esm/TransitionGroup.js
Module not found: Can't resolve '@babel/runtime/helpers/esm/assertThisInitialized' in 'DIRECTORY'

Steps To Reproduce

Followed the instructions in here (https://www.elegantthemes.com/documentation/developers/create-divi-extension/)

I have yarn version 1.22.4, NPM 6.14.4, and Node v12.13.0

installed the following libraries using yarn

yarn add axios bootstrap react-bootstrap react-element-spinner react-iframe react-recaptcha-v3 react-toastify
recharts

I copied the component (a stateless component) from my separate ReactJs project (installed using npx create-react app project-name) that I used to develop the components and pasted it on the newly created divi extension, under the modules  folder.
Ran the yarn start then the error shows up.

Screenshot and/or gif

Hello there,
The answer is in your error. The module is missing make sure that you have included it properly.
Thanks


.sort() doesn't work correctly

[2,11].sort()
# expected (python):
[2,11]
# result of JavaScript's [2,11].sort()  (used by Transcrypt.__runtime__.js in __sort__)
[11,2]

This is a classic JavaScript 'gotcha' since it will sort the elements as if they were strings, even if the elements are all numbers! It will sort correctly for most small numbers making it a tricky bug to catch as well.

I have the same issue. Is there a workaround?

You can fix by forcing a numerical sort
a = [1,11,2,2.1,1.9]

a.sort(key=float)
print(a)
# prints [1, 1.9, 2, 2.1, 11]

Sorting with strings vs numbers to match CPython has been somewhat fixed in the dev_3.9.3 branch to be released in v3.9.3
A limitation for now is that it will still allow comparisons between incompatible values like int and str where CPython would throw an error. Adding type validation to sorting to match CPython would add bloat to the runtime and likely be imperfect anyway. This can be revisited in the future if necessary.

Merged to master on PR #876


VS Extension API to work with User Profiles

I am having use case where I want to create Extension which check whether profile with particular name exists. If it does not exist we need to have a way to create User Profile via extension API. Now the only way seems to be via execute command for creating Profile. But command resolves with no value so there is no straight forward way to work with profiles via Extension API.
The feature I am requesting are as follows:

Get list of all existing profile name.
Get active profile name.
Creation of profile via Extension API for particular name or if we can pass arguments to profile creation commands that would also be fine.

Thanks.

/duplicate
https://github.com/microsoft/vscode/issues/188105

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.
Happy Coding!

There is no resolution in original issue https://github.com/microsoft/vscode/issues/188105.  Is there any plan in future to add API for profiles.

/duplicate
#188105

There is no workaround or resolution is the mentioned issue. Can I contribute to VS Code source by adding API for profiles?

Reason is mentioned in this comment - https://github.com/microsoft/vscode/issues/188105#issuecomment-1646577596
Since this is out of scope we do not accept any contributions. Sorry to say that.

Thank you for clarification.


Change flow for checks

vimrunner is the solution that we use today to run our checks when a new commit is pushed.
The issue is that it uses vim client-server feature.
And it seems that the characters pushed by vim clients can sometimes be delayed until vim has nothing to do anymore. Which is a big problem for the mappings since we use while loops waiting for characters that are blocking the client's chars from being consumed...
My question is this one: could we use something like expect instead ?
If so, who would be confortable enough to implement this new flow ?
TODO: reintroduce insert mapping test when that will be done

@eapache @balta2ar what do you guys think ?

I'm not sure what you're thinking of exactly. AFAIK there is no way for a script to "yield" to vim while waiting for a character.

#252 reintroduced the "sleep" command for mappings and special keys completion, masking this issue.
It is only triggered when CPU usage is 100%, which should never happen anyway.
Bottom line: no need to change the flow for checks.


raising Exceptions in inlined functions fails on compile

[x] I am using the latest released version of Numba (most recent is visible in
the change log (https://github.com/numba/numba/blob/master/CHANGE_LOG).

0.46.0

[x] I have included below a minimal working reproducer (if you are unsure how
to write one see http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports).

The below:

from numba import njit, generated_jit
from numba import types
import numpy as np

@njit(inline='always')
def inlining(array):
    if array.ndim != 1:
        raise ValueError("Invalid number of dimensions")

    return array

@njit
def fn(array):
    return inlining(array)

print(fn(np.zeros(10)))

fails with
Traceback (most recent call last):
  File "test_inlining_generated_jit.py", line 19, in <module>
    print(fn(np.zeros(10)))
  File "/home/sperkins/venv/afr3/lib/python3.6/site-packages/numba/dispatcher.py", line 404, in _compile_for_args
    error_rewrite(e, 'unsupported_error')
  File "/home/sperkins/venv/afr3/lib/python3.6/site-packages/numba/dispatcher.py", line 344, in error_rewrite
    reraise(type(e), e, None)
  File "/home/sperkins/venv/afr3/lib/python3.6/site-packages/numba/six.py", line 668, in reraise
    raise value.with_traceback(tb)
numba.errors.UnsupportedError: Failed in nopython mode pipeline (step: nopython frontend)
Unsupported constraint encountered: raise $10.3.7

File "test_inlining_generated_jit.py", line 9:
def inlining(array):
    <source elided>
    if array.ndim != 1:
        raise ValueError("Invalid number of dimensions")
        ^

Unsupported functionality was found in the code Numba was trying to compile.

If this functionality is important to you please file a feature request at:
https://github.com/numba/numba/issues/new

but succeeds when inline='never'

Thanks for the report, I can reproduce. It may not look like it, but it's the same root cause as this https://github.com/numba/numba/issues/4691.

Also, out of interest. What's the use case for this inlining?

@stuartarchibald I have a very flexible function that is composed out of many smaller functions.
https://github.com/ska-sa/codex-africanus/blob/c55c02e4c4699d9bb2326e3dcb4b035a0ef00cb6/africanus/averaging/time_and_channel_avg.py
In some of the small functions (that I wish to inline) there are some checks that raise exceptions. For e.g. here https://github.com/ska-sa/codex-africanus/blob/c55c02e4c4699d9bb2326e3dcb4b035a0ef00cb6/africanus/averaging/time_and_channel_mapping.py#L39-L52

I see, but why do you want to inline them? What is the purpose of the inlining?

Essentially i'm supporting an averaging function which supports the absence/presence of certain inputs. The following pseudo-code illustrates the intent by accumulation:
for r in range(rows):
   for f in range(chans):
       for c in range(corrs):
           if array is None:
               pass
           else:
               avg_array[r, f, c] += array[r, f, c]

The inline functions serve to replace the if-else statement with an implementation (if array is an ndarray) or a noop (if array is None).
I could of course place the if statement outside the loops, but I've multiple input arrays to average that may or may not be present.

Thanks, I'm wondering what the purpose is? Are you perhaps hoping for better performance? Is this a type-inference problem? Is this helping with code organisation?

Thanks, I'm wondering what the purpose is? Are you perhaps hoping for better performance? Is this a type-inference problem? Is this helping with code organisation?

I'd say its a combination of:

Performance (inline function calls in the inner loop)
Flexibility in handling inputs (provide different inlined implementations, depending on the presence/absence of inputs)

I'm less concerned about code organisation (although I'd welcome tips on how to improve it!)

Thanks, I'm wondering what the purpose is? Are you perhaps hoping for better performance? Is this a type-inference problem? Is this helping with code organisation?

I'd say its a combination of:
1. Performance (inline function calls in the inner loop)

I'd say that this is unlikely to have any impact on performance for two reasons.

There's an optimisation pass in Numba called "branch pruning" that looks for if <something that can be determined as True/False> and kills off branches that are dead. Doing if X is None where X is a kwarg which defaults to None will be subject to consideration by this pass.
This is inlining at the Numba intermediate representation level, it's essentially creating larger function bodies to pass to LLVM. LLVM is the thing that does the optimisation and it will inline function calls as it sees fit during it's opimisation phase, typically inlining things at the Numba IR level is entirely unnecessary and it's unlikely to make any difference.

2. Flexibility in handling inputs (provide different inlined implementations [noop or accumulate], depending on the presence/absence of inputs)

See previous remark about branch pruning. Here's an example:
from numba import njit
import numpy as np

@njit
def foo(arr0, arr1=None):

    rows, cols = arr0.shape

    # always accumulate arr0
    arr0_acc = np.zeros_like(arr0)

    # if arr1 is present then define an accumulator for it, else set to None
    if arr1 is None:
        arr1_acc = None
    else:
        arr1_acc = np.zeros_like(arr1)

    for i in range(rows):
        for j in range(cols):
            # arr0 is always present
            arr0_acc[i, j] += arr0[i, j]

            # arr1 is sometimes present
            if arr1 is not None:
                arr1_acc[i, j] += arr1[i, j]

    return arr0_acc, arr1_acc

r, c = 3, 5
in_arr0 = np.ones((r, c)) * 2
in_arr1 = np.ones((r, c)) * 3

print(foo(in_arr0, arr1=None))
print(foo(in_arr0, arr1=in_arr1))

Thanks, I'm wondering what the purpose is? Are you perhaps hoping for better performance? Is this a type-inference problem? Is this helping with code organisation?

I'd say its a combination of:
1. Performance (inline function calls in the inner loop)

I'd say that this is unlikely to have any impact on performance for two reasons.
1. There's an optimisation pass in Numba called "branch pruning" that looks for `if <something that can be determined as True/False>` and kills off branches that are dead. Doing `if X is None` where `X` is a kwarg which defaults to `None` will be subject to consideration by this pass.

2. This is inlining at the Numba intermediate representation level, it's essentially creating larger function bodies to pass to LLVM.  LLVM is the thing that does the optimisation and it will inline  function calls as it sees fit during it's opimisation phase, typically inlining things at the Numba IR level is entirely unnecessary and it's unlikely to make any difference.

My view on how inlining might be working is probably naively informed by the C/C++ inline keyword. Repeating back what I think you've told me: The LLVM IR for the inlined function will simply be placed at the site where the inlined function is  called in other IR code. But this might not result in any improvements because LLVM will decide where/when to inline (other?) function calls.
Perhaps referring to a concrete example might be helpful to my understanding. I have a function
called jones_mul which multiples matrices that are either of shape (1,), (2,) or (2, 2). The 2x2 case is highlighted.
I call jones_mul in an inner_loop and would hope to remove the cost of an inner loop function call here by jitting jones_mul with inline='always'. But it seems that this might not inline as I expect it to do so?
I've certainly seen speedups where numba functions like jones_mul have had their contents manually written within a larger numba function. Should I manually write out every permutation rather than compose functions out of smaller functions?

2. Flexibility in handling inputs (provide different inlined implementations [noop or accumulate], depending on the presence/absence of inputs)

See previous remark about branch pruning. Here's an example:
from numba import njit
import numpy as np

@njit
def foo(arr0, arr1=None):

    rows, cols = arr0.shape

    # always accumulate arr0
    arr0_acc = np.zeros_like(arr0)

    # if arr1 is present then define an accumulator for it, else set to None
    if arr1 is None:
        arr1_acc = None
    else:
        arr1_acc = np.zeros_like(arr1)

    for i in range(rows):
        for j in range(cols):
            # arr0 is always present
            arr0_acc[i, j] += arr0[i, j]

            # arr1 is sometimes present
            if arr1 is not None:
                arr1_acc[i, j] += arr1[i, j]

    return arr0_acc, arr1_acc

r, c = 3, 5
in_arr0 = np.ones((r, c)) * 2
in_arr1 = np.ones((r, c)) * 3

print(foo(in_arr0, arr1=None))
print(foo(in_arr0, arr1=in_arr1))

Thanks very much for the example. I think I might have developed the current (verbose!) strategy before branch pruning (on Nones) was implemented. I'll see if I can simplify the current code.

I've certainly seen speedups where numba functions like jones_mul have had their contents manually written within a larger numba function. Should I manually write out every permutation rather than compose functions out of smaller functions?

Function calls in inner loops do seem more expensive than manually inlining. I have run into this myself. However, I wrote the following super simple test this morning which seems to suggest that the inlining does help in this case.
import numpy as np
from numba import jit
import time

@jit(nopython=True, cache=True, nogil=True, inline='never')
def inner_func(x):
    return x + 1

@jit(nopython=True, cache=True, nogil=True, inline='always')
def inlined_inner_func(x):
    return x + 1

@jit(nopython=True, cache=True, nogil=True)
def loop_with_inner():

    a = 0

    for i in range(10000000):
        a = inner_func(a)

    return a

@jit(nopython=True, cache=True, nogil=True)
def loop_with_inlined_inner():

    a = 0

    for i in range(10000000):
        a = inlined_inner_func(a)

    return a

@jit(nopython=True, cache=True, nogil=True)
def loop_without_inner():

    a = 0

    for i in range(10000000):
        a = a + 1

    return a

if __name__ == "__main__":
    nruns = 100000

    t0 = time.time()
    r = [loop_with_inner() for i in range(nruns)]
    t1 = time.time()
    inner_average = (t1-t0)/nruns
    print("Average time with inner function: {}".format(inner_average))

    t0 = time.time()
    r = [loop_with_inlined_inner() for i in range(nruns)]
    t1 = time.time()
    inlined_inner_average = (t1-t0)/nruns
    print("Average time with inlined inner function: {}".format(
                                                        inlined_inner_average))

    t0 = time.time()
    r = [loop_without_inner() for i in range(nruns)]
    t1 = time.time()
    no_inner_average = (t1-t0)/nruns
    print("Average time without inner function: {}".format(no_inner_average))

This produces the following output on my system after a few runs:
Average time with inner function: 8.029127120971679e-07
Average time with inlined inner function: 2.399301528930664e-07
Average time without inner function: 2.1071910858154298e-07

Whilst this is obviously a trivial example, it does seem that the inlining can give superior performance. It will be interesting to see what happens for more complicated functions.

Thanks, I'm wondering what the purpose is? Are you perhaps hoping for better performance? Is this a type-inference problem? Is this helping with code organisation?

I'd say its a combination of:
1. Performance (inline function calls in the inner loop)

I'd say that this is unlikely to have any impact on performance for two reasons.
1. There's an optimisation pass in Numba called "branch pruning" that looks for `if <something that can be determined as True/False>` and kills off branches that are dead. Doing `if X is None` where `X` is a kwarg which defaults to `None` will be subject to consideration by this pass.

2. This is inlining at the Numba intermediate representation level, it's essentially creating larger function bodies to pass to LLVM.  LLVM is the thing that does the optimisation and it will inline  function calls as it sees fit during it's opimisation phase, typically inlining things at the Numba IR level is entirely unnecessary and it's unlikely to make any difference.

My view on how inlining might be working is probably naively informed by the C/C++ inline keyword. Repeating back what I think you've told me: The LLVM IR for the inlined function will simply be placed at the site where the inlined function is called in other IR code. But this might not result in any improvements because LLVM will decide where/when to inline (other?) function calls.

This isn't quite right so I'll try and clarify. Numba has it's own intermediate representation (IR) that it uses, this Numba-IR is converted to LLVM-IR for compilation by LLVM. The inline keyword is for inlining at the Numba-IR level, i.e. Numba IR of one function gets inlined into the call site of the Numba IR of another function. When LLVM does inlining it's doing so using it's own IR and makes its own choices about what to inline.

Perhaps referring to a concrete example might be helpful to my understanding. I have a function
called jones_mul which multiples matrices that are either of shape (1,), (2,) or (2, 2). The 2x2 case is highlighted.
I call jones_mul in an inner_loop and would hope to remove the cost of an inner loop function call here by jitting jones_mul with inline='always'. But it seems that this might not inline as I expect it to do so?
I've certainly seen speedups where numba functions like jones_mul have had their contents manually written within a larger numba function. Should I manually write out every permutation rather than compose functions out of smaller functions?

It's often a good strategy to use real data, measure performance and then analyse the performance in light of any changes against the burden of carrying such a change. Sometimes you might just be wasting effort manually inlining functions as LLVM is already doing it for you. Numba has 3 useful .inspect_* methods on the dispatcher to look at what's being generated:

.inspect_types() - the Numba-IR
.inspect_llvm() - the LLVM IR
.inspect_asm() - the dis-assembly of the compiled code

Docs: http://numba.pydata.org/numba-doc/latest/reference/jit-compilation.html#dispatcher-objects

I've certainly seen speedups where numba functions like jones_mul have had their contents manually written within a larger numba function. Should I manually write out every permutation rather than compose functions out of smaller functions?

Function calls in inner loops do seem more expensive than manually inlining. I have run into this myself. However, I wrote the following super simple test this morning which seems to suggest that the inlining does help in this case.
import numpy as np
from numba import jit
import time

@jit(nopython=True, cache=True, nogil=True, inline='never')
def inner_func(x):
    return x + 1

@jit(nopython=True, cache=True, nogil=True, inline='always')
def inlined_inner_func(x):
    return x + 1

@jit(nopython=True, cache=True, nogil=True)
def loop_with_inner():

    a = 0

    for i in range(10000000):
        a = inner_func(a)

    return a

@jit(nopython=True, cache=True, nogil=True)
def loop_with_inlined_inner():

    a = 0

    for i in range(10000000):
        a = inlined_inner_func(a)

    return a

@jit(nopython=True, cache=True, nogil=True)
def loop_without_inner():

    a = 0

    for i in range(10000000):
        a = a + 1

    return a

if __name__ == "__main__":
    nruns = 100000

    t0 = time.time()
    r = [loop_with_inner() for i in range(nruns)]
    t1 = time.time()
    inner_average = (t1-t0)/nruns
    print("Average time with inner function: {}".format(inner_average))

    t0 = time.time()
    r = [loop_with_inlined_inner() for i in range(nruns)]
    t1 = time.time()
    inlined_inner_average = (t1-t0)/nruns
    print("Average time with inlined inner function: {}".format(
                                                        inlined_inner_average))

    t0 = time.time()
    r = [loop_without_inner() for i in range(nruns)]
    t1 = time.time()
    no_inner_average = (t1-t0)/nruns
    print("Average time without inner function: {}".format(no_inner_average))

This produces the following output on my system after a few runs:
Average time with inner function: 8.029127120971679e-07
Average time with inlined inner function: 2.399301528930664e-07
Average time without inner function: 2.1071910858154298e-07

Whilst this is obviously a trivial example, it does seem that the inlining can give superior performance. It will be interesting to see what happens for more complicated functions.

What you are seeing in the above is the power of LLVM. If you do .inspect_asm() on the dispatcher objects in the above you'll note that they all have turned the jitted function into a piece of machine code like:
__main__<whatever the jit function is called>$241E:
        movq    $10000000, (%rdi)
        xorl    %eax, %eax
        retq

because LLVM inlined the function call in all cases, worked out that the loop over a has static bounds and is doing trivial arithmetic, so it just pre-computed the value of a at the end of the loop and is returning that (the assembly above is just putting the pre-computed value of a (10000000) into a register and returning). I think what the above is measuring is largely the performance of Numba initialising and dragging functions out of cache, if you repeat the first timing loop at the end it's the same speed as the others as there's no init cost.

Thanks for the clarification @stuartarchibald. In what circumstances is inlining expected to be useful then?

@JSKenyon numerous, but one common case is explained in the first section of the 0.46 release developers demo notebook, you can see it on binder here.


ITKSetPython3Vars.cmake ignores virtualenvs and other issues

Description
ITKSetPython3Vars  ignores virtualenvs with CMake > 3.15.0.  It also has suspicious use of CMAKE FindPython internal variables.  I think we should define the expected user interaction with ITK and specifying the Python version, as well as fix some bugs.  @thewtex @hjmjohnson

Steps to Reproduce
We currently have special cases for CMake <= 3.12.  There was a significant change to FindPython in CMake 3.15.  Due to our CMake Minimum version, CMP0094  (which allows virtualenvs to have precedence) is turned undefined (OFF).
Activate a virtualenv that is not the highest version of Python found on the system.  Try and build ITK.
Expected behavior
For CMake < 3.12, keep current logic.
For CMake 3.12 - 3.15 ??? (the API for FindPython 3.14 is different and doesn't mention virtualenvs)
For CMake > 3.15, enable CMP0094  and get rid of references to _specified_Python3_EXECUTABLE
Document how we expect users to define Python version.  Or expose the allowed hints through external cache variables.
Actual behavior
For CMake > 3.15, with CMP0094 undefined, FindPython 3.19 will only return the latest version of Python found on the system (whether it has the Development/debug build of Python or not).
else()
  if(PYTHON_DEVELOPMENT_REQUIRED)
    if(DEFINED Python3_EXECUTABLE)
      set(_specified_Python3_EXECUTABLE ${Python3_EXECUTABLE}) # <--- where is _specified_Python3_EXECUTABLE defined
    endif()
    find_package(Python3 COMPONENTS Interpreter Development)
    set(Python3_EXECUTABLE ${_specified_Python3_EXECUTABLE} CACHE INTERNAL
      "Path to the Python interpreter" FORCE) # <--- What are we doing here?  This is by default blank, so we force an overwrite of Python3_EXECUTABLE
  else()
    find_package(Python3 COMPONENTS Interpreter)
  endif()
  if(NOT Python3_EXECUTABLE AND _Python3_EXECUTABLE) # <--- This always executes because of the overwrite above
    set(Python3_EXECUTABLE ${_Python3_EXECUTABLE} CACHE INTERNAL
      "Path to the Python interpreter" FORCE) # <--- We are now referring to a private CMAKE variable?
  endif()
endif()

Reproducibility

Versions

Environment

Additional Information

The FindPython CMake module is broken in many ways. We should not spend effort trying to support older versions of it, because it has numerous other issues. If it helps to enable CMP0094 for the current version of CMake, then let's do that.

@thewtex OK, so for the oddball CMake 3.12 - 3.15.  Should I push the behavior back to using FindPythonInterp (i.e. increase the first if-statement from <= 3.12 to <= 3.15, or should I maintain the current behavior (using CMake FindPython but it won't have the option to set CMP0094).
Is there any user documentation that should be updated for this patch?

OK, so for the oddball CMake 3.12 - 3.15. Should I push the behavior back to using FindPythonInterp (i.e. increase the first if-statement from <= 3.12 to <= 3.15,

@brad-t-moore yes, please

Is there any user documentation that should be updated for this patch?

I do not think so.
Thank you so much for your work on this.

@thewtex For python-support should we just require cmake >= 3.16?  I know it is a very new version of cmake, but that could greatly minimize our maintenance efforts.

Closing this as we got the Windows CI working but created an issue for updating the version check #2082
Fixed by PR #2072


High rates of user reported deployment failure.

Over half of app engine standard deployment failures are reporting:
"Deployment failed due to an unexpected error while staging the project."
as the cause.   Staging should very rarely fail.
We're also seeing a consistently high rate of:
"Deployment failed with exit code: 1 Please make sure that you are using the latest version of the Google Cloud SDK. Run ''gcloud components update'' to update the SDK. (See: https://cloud.google.com/sdk/gcloud/reference/components/update.)"
This requires some digging since I would expect the rate of this error to go down over time.

@patflynn to check analytics again

Duplicate of #1509.

I'm receiving this error "Deployment failed with exit code: 1..." How do I identify the root of the issue?

Hi @AdamSHurwitz, could you file a new issue including the information mentioned in the template?
thx.


Domain activation is Failed - [BRIEF DESCRIPTION]

App Id: d38nk5ty603fap
Region: eu-central-1
Step: Domain activation
Status: Failed

Note: Do not include information that is sensitive in nature such as your domain name, company etc.

Issue/question
A clear and concise description of what the issue/question is.
Error message
If there is an error message, please include it here.
Note: Be sure to check the message for sensitive information.
Additional information
Please add any other relevant information. Please feel free to include screenshots.

Our records indicate that this app has been deleted.


Punctuation buttons lose cursor position

When using the punctuation buttons to insert ideographic punctuation marks, the marks are inserted correctly, but then the cursor is incorrectly warped back to the beginning of the typing box instead of being left in place.

Bug appears only on Chrome here.  Works on Firefox.  Type "abc" into box, then use buttons comma and stop.  You can see the error in Chrome, but the same thing works fine on Firefox.


Links in changelog

Description
For improving the raw changelog's reading, we would like to isolate each links to the bottom of the block.
If the link is used across multiple sections, we will place it in the bottom of the first block.
Here's an example:
### Added

- My first [feature] (issue [#first]).

[#first]: https://example.com
[feature]: https://example.com/feature

- My second [feature] (issue [#second]).

[#second]: https://example.com

Checklist

[ ] Update links in the introduction.
[ ] Update links in the Unreleased section.
[ ] Update links in the 4.1.0 section.
[ ] Update links in the 4.0.1 section.
[ ] Update links in the 4.0.0 section.

Because we are focusing on the changelog documentation in this issue, we will remove our compliance notice to Semantic Versioning in its introduction (see the motivations).

Done.


Revert conditional question

Description
Revert conditional cqc question
Type of change
Please delete options that are not relevant.

[ ] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?
Tested locally
Checklist:

[ ] I have performed a self-review of my own code

No patch exists for the vulnerability detected. All versions of the package are affected and we cannot remove the package. This should be fixed at the earliest opportunity


[Bug]: No Elgato devices found

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
Hi,
I installed an instance today but no devices are found. Great work and thanks a lot for all the effort building an adapter. Hopefully it will be integrated into the repository soon.
The devices (2x Keylight) are working, I already control them with iobroker through a JS script. So reason is more or less the MDNS discovery.
Running a tcpdump shows that the adapter is not sending a "discovery request" for devices but netstat show it is listening on port 5353.
In my case the Elgato devices are located in a different subnet and I use a homebridge, which itself is working fine (Elgato App on IOS and Windows are working fine).
Beside this mDNS issue I prefer to have a solution to manually add devices by IP/hostname.
Thanks a lot,
KoMa1978
What did you expect to happen?
No response
How to reproduce it (minimal and precise)
No response
Adapter version
0.0.3
Environment
No response
What browsers are you seeing the problem on?
No response
Screenshots & Log
No response

Short update ...
If I run a TCPDUMP on the iobroker host and open the Elgato App on my iPhone (different VLAN as well), I can see mDNS traffic arriving on the iobroker:
192.168.xxx.xxx.5353 > <IP_ADDRESS>.5353: [udp sum ok] 0*- [0q] 6/0/0 _elg._tcp.local. PTR Key Light 1._elg._tcp.local., key-light-1.local. (Cache flush) NSEC, Key Light 1._elg._tcp.local. (Cache flush) NSEC, key-light-1.local. (Cache flush) A 192.168.yyy.yyy, Key Light 1._elg._tcp.local. (Cache flush) TXT "mf=Elgato" "dt=200" "id=aa:aa:aa:aa:aa:aa" "md=Elgato Key Light Air bbbbbbbbbb" "pv=1.0", Key Light 1._elg._tcp.local. (Cache flush) SRV key-light-1.local.:9123 0 0 (243)
But they are still not shown in the WebUI.

the mDNS does not work so well on some systems for me on the dev system Windows it works even with different VLAN on Linux but not I will disable the mDNS and then make a new menu to add devices

@KoMa1978
please install from GitHub and give it a try.
I deleted the mDNS search and add devices manually, also added a delete function in the UI.

when entering the IP, a . is automatically added after every 3rd digit

Looks very good! Both Keylights are working and I have many datapoints ;-)
I'll now convert my JS to blockly and test the adapter. Thanks a lot!!


fix PHP7 compatibility

https://github.com/nikic/PHP-Parser/releases/tag/v1.2.0

@simpspector/owners all tests are passing https://travis-ci.org/simpspector/analyser/builds/56392943

:+1:


Incorrect agent result

Mozilla/5.0 (Linux; Android 6.0.1; LG-K100 Build/MXB48T; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/50.0.2661.86 Mobile Safari/537.36 YandexSearch/5.75

Are you sure, we seem to be correctly detecting this as a bot
https://crawlerdetect.io/?q=Mozilla/5.0 (Linux; Android 6.0.1; LG-K100 Build/MXB48T; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/50.0.2661.86 Mobile Safari/537.36 YandexSearch/5.75

Yes, this is the CPC click from mobile app Yandex Search. Bots from yandex are (which I know):
YandexBot
YandexImages
YandexMobileBot
YandexMetrika
YandexImageResizer
YandexPagechecker
YandexCatalog
YandexBlogs
YandexVideo
YandexMedia
YandexAccessibilityBot
YandexVideoParser
YandexFavicons
YandexDirect (not sure about this, but there is an referrer to http://yandex.com/bots)
Yandex (Old one. Last appears in analytics is about year ago)

Ah, so you are saying that YandexSearch/5.75 in not a bot?

Yes :)

Okay, thanks, we will look into it 👍

Thanks


Side menu options and buttons on the map do not work with Google Maps Native

Hi.!
I'm using Google Maps native Ionic. I can easily show the map in my application, I have a side menu (shown in the header of the screen) opens well, but the menu options do not work when you click, I also have other buttons on the map that do not work either.
Ionic plugins list
Cordova-plugin-googlemaps 1.4.0 "phonegap-googlemaps-plugin"
Ionic info
Cordova CLI: 6.5.0
Ionic Framework Version: 2.3.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.1.4
Ios-deploy version: 1.9.0
Ios-sim version: 5.0.13
OS: OS X The Captain
Node Version: v6.9.1
Xcode version: Xcode 7.2 Build version 7C68
Will I be doing something wrong? Or forgetting something?
Please help.!
Thank you

If you use the plugin v1 (I think so), you need to execute map.setClickable(false) when the sidemenu is open.
Then when close the sidemenu, you need to execute map.setClickable(true)

I try to upgrade to V2 and still install V1.
I carry out the following steps
Ionic plugin rm plugin.google.maps
Ionic plugin rm com.googlemaps.ios
Ionic plugin add cordova-plugin-googlemaps --variable
API_KEY_FOR_ANDROID = "YOUR_ANDROID_API_KEY_IS_HERE" --variable API_KEY_FOR_IOS = "YOUR_IOS_API_KEY_IS_HERE"
And no luck installing the V2, I have OS: OS X The Captain installed
Will I be doing something wrong? Or forgetting something?

Ionic plugin rm plugin.google.maps

Ionic plugin rm com.googlemaps.ios

cordova plugin add https://github.com/mapsplugin/cordova-plugin-googlemaps/tree/multiple_maps  --variable ...

Error: Failed to fetch plugin https://github.com/mapsplugin/cordova-plugin-googlemaps/tree/multiple_maps via git.
Either there is a connection problems, or plugin spec is incorrect:
Error: git: Command failed with exit code 128 Error output:
Cloning into '/tmp/git/1491423054861'...
remote: Not Found
fatal: repository 'https://github.com/mapsplugin/cordova-plugin-googlemaps/tree/multiple_maps/' not found

oh #multiple_maps instead of /tree/multiple_maps

Still not working
cordova plugin add https://github.com/mapsplugin/cordova-plugin-googlemaps#multiple_maps --variable API_KEY_FOR_ANDROID="api_key" --variable API_KEY_FOR_IOS="api_key"
Password:
Fetching plugin "https://github.com/mapsplugin/cordova-plugin-googlemaps" via git clone
Error: Failed to fetch plugin https://github.com/mapsplugin/cordova-plugin-googlemaps via git.
Either there is a connection problems, or plugin spec is incorrect:
Error: git: Command failed with exit code 128 Error output:
Cloning into '/tmp/git/1491426726801'...
error: RPC failed; curl 56 SSLRead() return error -36
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

It seems your git or cordova command has problem. It's not plugin problem.

@MariaC15 hi , have u find any solution for this issue ??

hi,
I am getting the same issue, Let me know if anyone have solution for the same.


OAuth dialog: Show which apps use that scope

https://community.remotestorage.io/t/making-remotestorage-scopes-more-descriptive-for-end-users/301

This has become harder with JWT-tokens, but we can still store the union of all permissions ever granted to an app.


Separate lifetime from content in wire protocol messages

I intentionally avoid embedding mqtt::any into message types and mqtt::burrer.
mqtt::any need to have non trivial destructor due to its type erasure mechanism. Even if move argument passing, the destructor is needed to be called.
Here is performance test:
#include <any>
#include <memory>
#include <iostream>
#include <string>
#include <cstring>
#include <chrono>

std::shared_ptr<char[]> g;

inline void spa1(std::shared_ptr<char[]> a) {
    g = std::move(a);
}

inline void spa2(std::shared_ptr<char[]> a) {
    spa1(std::move(a));
}

inline void any1(std::any a) {
    auto s = std::any_cast<std::shared_ptr<char[]>>(a);
    g = std::move(s);
}

inline void any2(std::any a) {
    any1(std::move(a));
}

int main(int argc, char* argv[]) {
    if (argc != 2) {
        std::cout << "Usage: " << argv[0] << " times" << std::endl;
        return -1;
    }
    auto max = std::stoi(argv[1]);

    // prepare data
    auto spa = std::make_shared<char[]>(3);
    std::strcpy(spa.get(), "ABC");

    {
        std::cout << "spa" << std::endl;
        auto start = std::chrono::system_clock::now();
        for (int i = 0; i != max; ++i) {
            spa2(spa);
        }
        auto finish = std::chrono::system_clock::now();
        std::cout
            << std::chrono::duration_cast<std::chrono::milliseconds>(finish - start).count()
            << " ms"
            << std::endl;
    }
    {
        std::cout << "any" << std::endl;
        auto start = std::chrono::system_clock::now();
        for (int i = 0; i != max; ++i) {
            any2(spa);
        }
        auto finish = std::chrono::system_clock::now();
        std::cout
            << std::chrono::duration_cast<std::chrono::milliseconds>(finish - start).count()
            << " ms"
            << std::endl;
    }
}

I got the following result:
clang++ -std=c++17 comp_spa_any.cpp -O3                                                                                ./a.out 100000000
spa
248 ms
any
1862 ms

So I want to keep mqtt::shared_ptr_array (std::shared_ptr<char[]> ) based implementation.

Then we should remove lifetime handling from the messages entirely, and keep the lifekeeper in the async_handler_t func.
Thoughts?

Then we should remove lifetime handling from the messages entirely, and keep the lifekeeper in the async_handler_t func.
Thoughts?

I think that we don't need to remove all of them. Because they don't have other better choices to replace. And if user uses mqtt::buffer, then they can avoid some of performance disadvantage. And I did it on my broker.

I think that we don't need to remove all of them. Because they don't have other better choices to replace. And if user uses mqtt::buffer, then they can avoid some of performance disadvantage. And I did it on my broker.

I mean only for the message objects. The end-user API would stay the same.

Message objects should be kept the current implementation.

I've updated the pull request to remove the lifetime tracking from the messages entirely.
The only thing that tracks lifetime inside the message objects now is the v5::properties.
The reason why I want to make this change is that I want to support a model where either an std::span, or a pair of iterators, can be passed in to any function that currently takes an std::vector.
The current model of requiring the lifetime tracking be bundled with the message object restricts the options that end users have for structuring their program.

I'm not convinced yet. I need a time to consider it. Unfortunately, I don't have much time so far. But I continue to consider the issue.

Sure, I'm not in a rush.

Codecov Report

Merging #524 into master will decrease coverage by <.01%.
The diff coverage is 96.82%.

@@            Coverage Diff             @@
##           master     #524      +/-   ##
==========================================
- Coverage   84.74%   84.73%   -0.01%
==========================================
  Files          41       41
  Lines        6326     6322       -4
==========================================
- Hits         5361     5357       -4
  Misses        965      965

The reason why I want to make this change is that I want to support a model where either an std::span, or a pair of iterators, can be passed in to any function that currently takes an std::vector.
The current model of requiring the lifetime tracking be bundled with the message object restricts the options that end users have for structuring their program.

I'm not 100% sure what you want to do yet. So I need to share the concept. I understand that std::vector is too concrete type. As you mentioned, std::span, a pair of iterators, or range v3 are more flexible types. I'm not sure range v3 standard proposal status but I think that it should be checked.

any function that currently takes an std::vector

Could you clarify this?

Are APIs that is called by user included?

For example,
    packet_id_t subscribe(
        std::vector<std::tuple<string_view, subscribe_options>> params,
        v5::properties props = {}
    );

Are handlers that are overridden by the user included?

For example,
    virtual bool on_subscribe(packet_id_t packet_id,
                              std::vector<std::tuple<MQTT_NS::buffer, subscribe_options>> entries) = 0;

I understand that std::vector is too concrete type. As you mentioned, std::span, a pair of iterators, or range v3 are more flexible types.

Correct. message.hpp and v5_message.hpp do not care about the data type that user code is storing the "collection" of things as. Only that the data is provided. Currently these messages take an std::vector (of topics, or subscribe options, etc), but this can be made more generic.

I'm not sure range v3 standard proposal status but I think that it should be checked.

Ranges is officially in C++20.

Are handlers that are overridden by the user included?

No. No change to handlers.

Are APIs that is called by user included?

Yes. This Pull Request is just preparation, but it also has the benefit of reducing the size of the basic_subscribe message, and the basic_publish message, because now these messages do not contain extra std::shared_ptr<char[]> objects.

An example of why I want to make this more generic.
(this example uses cpp17, for structured bindings, btw)
            auto pTopics = std::make_unique<std::vector<std::tuple<MQTT_NS::buffer, MQTT_NS::subscribe_options>>>();
            pTopics->reserve(this->m_topicMap.size());
            for([[maybe_unused]] const auto & [topicPattern, handler] : this->m_topicMap)
            {
                pTopics->emplace_back(topicPattern, MQTT_NS::qos::exactly_once);
            }
            std::span<std::tuple<MQTT_NS::buffer, MQTT_NS::subscribe_options>> span = *pTopics;
            pMqttClient->async_subscribe(span, [pTopics = std::move(pTopics)](std::error_code ec)
            {
                BOOST_LOG(Debug) << "Finished subscribing to initial resource method topics"
                          << std::endl << "- ErrorCode: " << ec
                          << std::endl << "- Topics:    " << *pTopics;
            });

Right now, client:async_subscribe() will copy the std::vector<tuple<...>>. So I can't use the typical boost::asio pattern of preserving the lifetime of the variable that's going to be be used for the async operation in the CompletionToken.
This Pull Request does not fix this problem, but it makes fixing the problem easier in the future.

Thank you adding comment.
I'm checking the performance difference between

Move operation of mqtt::buffer that has non null shared_ptr_array and empty mqtt::any

amd

Move operation of as::buffer that has non null shared_ptr_array and mqtt::any that has mqtt::buffer.

I guess that they have no big difference but I want to test it. So I need a time a little more.

I've checked the performance difference and no significant difference is observed as I expected.
Checking code:
#include <iostream>
#include <chrono>
#include <string>

#include <mqtt_client_cpp.hpp>

int g;

void spa_empty_any1(mqtt::buffer, mqtt::any) {
    ++g;
}

void spa_empty_any2(mqtt::buffer buf, mqtt::any any) {
    spa_empty_any1(std::move(buf), std::move(any));
}

void spa_empty_any3(mqtt::buffer buf) {
    spa_empty_any2(std::move(buf), mqtt::any());
}

void asb_any1(boost::asio::const_buffer, mqtt::any) {
    ++g;
}

void asb_any2(boost::asio::const_buffer buf, mqtt::any any) {
    asb_any1(buf, std::move(any));
}

void asb_any3(mqtt::buffer buf) {
    auto ab = boost::asio::buffer(buf.data(), buf.size());
    asb_any2(ab, std::move(buf));
}

int main(int argc, char* argv[]) {
    if (argc != 2) {
        std::cout << "Usage: " << argv[0] << " times" << std::endl;
        return -1;
    }
    auto times = std::stoul(argv[1]);

    auto buf = mqtt::allocate_buffer("01234567890123456789012345678901234567890123456789");
    {
        std::cout << "mqtt::buffer with empty mqtt::any" << std::endl;
        auto start = std::chrono::system_clock::now();
        for (unsigned long i = 0; i != times; ++i) {
            spa_empty_any3(buf);
        }
        auto end = std::chrono::system_clock::now();
        std::cout << std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count() << " ms" << std::endl;
    }
    {
        std::cout << "as::buffer with mqtt::any that holds mqtt::buffer" << std::endl;
        auto start = std::chrono::system_clock::now();
        for (unsigned long i = 0; i != times; ++i) {
            asb_any3(buf);
        }
        auto end = std::chrono::system_clock::now();
        std::cout << std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count() << " ms" << std::endl;
    }
}

Result:
mqtt::buffer with empty mqtt::any
2212 ms
as::buffer with mqtt::any that holds mqtt::buffer
2215 ms

So I merge it. Thank you for waiting.


rpc.lua:359: Cannot serialise function: type not supported

Error executing vim.schedule lua callback: /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:359: Cannot serialise function: type not supported
stack traceback:
        [C]: in function 'encode'
        /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:359: in function 'notify'
        /usr/local/share/nvim/runtime/lua/vim/lsp.lua:1121: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>
Press ENTER or type command to continue

Have no idea where does it come from. But is see that nvim-lspconfig servers fail to start. null-ls still works.

Error executing vim.schedule lua callback: ...ine-lsp-progress/lua/lualine/components/lsp_progress.lua:80: attempt to index a nil value
stack traceback:
        ...ine-lsp-progress/lua/lualine/components/lsp_progress.lua:80: in function 'progress_callback'
        ...ine-lsp-progress/lua/lualine/components/lsp_progress.lua:133: in function 'handler'
        /usr/local/share/nvim/runtime/lua/vim/lsp.lua:896: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

and
Error executing vim.schedule lua callback: /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:483: method "workspace/configuration": either a result
or an error must be sent to the server in response
stack traceback:
        [C]: in function 'error'
        /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:483: in function </usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:470>

Ok... the issue was in gopls.lua garbage.
root_dir = function(fname)
	return util.root_pattern("go.work")(fname) or util.root_pattern("go.mod", ".git")(fname)
end,

Ok. I see... have you tried to move root_dir utside of settings stanza? LOL 😄  How did that worked before???


Translates until it finds a dot

Hey there, awesome gem!!
I came across the following:
termit en es "Yeah really good. How are you?"
=> Sí realmente bueno.

Is this the desired behaviour?
To overcome the above I did
termit en es "Yeah really good, How are you?"
=> Sí realmente bueno, ¿Cómo estás?

Cheers

I will just replace dots with comas automatically and works fine. Released as 2.11.2. Enjoy :)