Line Chart, line loops back to start - odd UI bug?

Hi,
I have a Line Chart that shows 4 lines. This appears fine, but if left for a few seconds the UI updates and loops the end of the line with the start. Difficult to explain, see the images below...
Before the issue:

After (about 30 seconds later):

I hope the image gives enough detail of the issue, if there are sections of code that will assist identifying the cause please let me know - did not want to do a full code dump.
(fyi - I am not running any code to update the UI, this appears to change on its own)

Hi, I'm back.
How do you creates half-solid half-dotted line? Do you use for each line(orange,green) two line, one solid from 0 to 17 and one dotted from 17?
Is there possibility that you holds reference to chart's data and operates on it?

Hey Lecho,
Its just 4 lines in total, 2 solid lines and 2 dotted lines. To make the chart a little less complex I have removed all but one lines. The issue still appears, but does not happen as often with less data on the screen. Examples below...
Before:

1 min later:

As you can see the chart reloads its viewport to show the full chart and then links the start and end of the line together. The charts viewport is linked to the preview chart at the bottom.
Here is the code:
Chart setup:
iobcobPastChart.setZoomType(ZoomType.HORIZONTAL);
iobcobPastChart.setLineChartData(extendedGraphBuilder.iobcobPastLineData());
Viewport iobv   = new Viewport(iobcobPastChart.getMaximumViewport());
iobv.top        = Float.parseFloat(extendedGraphBuilder.yCOBMax.toString());
iobv.bottom     = Float.parseFloat(extendedGraphBuilder.yCOBMin.toString());
iobcobPastChart.setMaximumViewport(iobv);
iobv.left       = previewChart.getCurrentViewport().left;
iobv.right      = previewChart.getCurrentViewport().right;
iobcobPastChart.setCurrentViewport(iobv);
iobcobPastChart.setViewportCalculationEnabled(true);

Chart load...
iobcobPastChart.setLineChartData(extendedGraphBuilder.iobcobPastLineData());

ChartViewPortListener ...
private class ChartViewPortListener implements ViewportChangeListener {
        @Override
        public void onViewportChanged(Viewport newViewport) {
            if (!updatingPreviewViewport) {
                updatingChartViewport = true;
                previewChart.setZoomType(ZoomType.HORIZONTAL);
                previewChart.setCurrentViewport(newViewport);
                updatingChartViewport = false;

                if (iobcobFragmentObject.getView() != null) {                                       //Fragment is loaded
                    LineChartView iobcobPastChart = (LineChartView) findViewById(R.id.iobcobPast);
                    Viewport iobv = new Viewport(chart.getMaximumViewport());                       //Update the IOB COB Line Chart Viewport to stay inline with the preview
                    iobv.left = newViewport.left;
                    iobv.right = newViewport.right;
                    iobv.top = extendedGraphBuilder.yCOBMax.floatValue();
                    iobv.bottom = extendedGraphBuilder.yCOBMin.floatValue();
                    iobcobPastChart.setCurrentViewport(iobv);
                }
            }
        }
    }

ViewportListener
private class ViewportListener implements ViewportChangeListener {
        @Override
        public void onViewportChanged(Viewport newViewport) {
            if (!updatingChartViewport) {
                updatingPreviewViewport = true;
                chart.setZoomType(ZoomType.HORIZONTAL);
                chart.setCurrentViewport(newViewport);
                tempViewport = newViewport;
                updatingPreviewViewport = false;

                if (iobcobFragmentObject.getView() != null) {                                       //Fragment is loaded
                    LineChartView iobcobPastChart = (LineChartView) findViewById(R.id.iobcobPast);
                    iobcobPastChart.setZoomType(ZoomType.HORIZONTAL);
                    iobcobPastChart.setCurrentViewport(newViewport);
                    Viewport iobv = new Viewport(iobcobPastChart.getMaximumViewport());             //Update the IOB COB Line Chart Viewport to stay inline with the preview
                    iobv.left = newViewport.left;
                    iobv.right = newViewport.right;
                    iobcobPastChart.setCurrentViewport(iobv);
                }
            }
        }
    }

Building of Graph...
Best to link you direct to GitHub
You can see the full code on GitHub, the code I quoted above is in MainActivity, I believe all you need to see is here.
This chart, along with others that have this odd behavior are in Fragments, but the issues existed before I did this - if that assist at all!?

Resolved, this was due to the Arrays holding the values being reused every time and not being cleared, therefore duplicating data.

i have been same issue, and main reason been a duplicate variables


IOS: update consent one - move sticky components to bottom

placed warningview and "consentview" in inner most stackview.
changed backgroundcolor and removed shadows from view
changed warningview to hidden and updated viewcontroller method accordingly to reduce empty spacing when warning is not showed

Shouldn't it take the whole width of the screen? 🤔

Warningview is now edge to edge


--atomic upgrades fails due to timeout

After upgrade to 2.13.0, both client and server, I instantly jumped to do an --atomic upgrade, but it fails due to timeout.
Our build agents (Azure DevOps Server agents) ran two parallell upgrades to two different clusters (from the same machine), they both tried creating tunnels using different ports, both failed.
Tried only doing one deploy to one cluster, same issue.
Tried removing --atomic, then the upgrade works as usual.
Error log:
helm upgrade --namespace XXXX --install --force --values path/values.yaml --debug --atomic release-name /path/package.tgz
Error: timed out waiting for the condition
[debug] Created tunnel using local port: '34551'
[debug] SERVER: "<IP_ADDRESS>:34551"
UPGRADE FAILED
ROLLING BACK
Error: timed out waiting for the condition
Output of helm version:
Client: &version.Version{SemVer:"v2.13.0", GitCommit:"79d07943b03aea2b76c12644b4b54733bc5958d6", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.13.0", GitCommit:"79d07943b03aea2b76c12644b4b54733bc5958d6", GitTreeState:"clean"}
Output of kubectl version:
{
"clientVersion": {
"major": "1",
"minor": "10",
"gitVersion": "v1.10.3",
"gitCommit": "2bba0127d85d5a46ab4b778548be28623b32d0b0",
"gitTreeState": "clean",
"buildDate": "2018-05-21T09:17:39Z",
"goVersion": "go1.9.3",
"compiler": "gc",
"platform": "linux/amd64"
},
"serverVersion": {
"major": "1",
"minor": "12",
"gitVersion": "v1.12.4",
"gitCommit": "f49fa022dbe63faafd0da106ef7e05a29721d3f1",
"gitTreeState": "clean",
"buildDate": "2018-12-14T06:59:37Z",
"goVersion": "go1.10.4",
"compiler": "gc",
"platform": "linux/amd64"
}
}
Cloud Provider/Platform (AKS, GKE, Minikube etc.):
Deploy to both AKS and onprem fails

In what way is the tunnel opened, is it proxied via the kubectl client? Thinking about firewall policies which could be the case regarding the on-prem cluster. If that was the case, I would have assumed the AKS deploy to work though.

@tobylo do you have a publicly available chart which can be used to reproduce this issue?
It's possible that you're seeing a difference in behavior after adding --atomic because doing so also sets --wait to true. To test this, please see if you get the same behavior when removing the atomic flag and adding wait. If this errors in the same way, then setting --timeout to something higher than the default 300 should fix your issue.

I had a look at #5183 and have no idea why the wait flag had to be enabled in the first place. I'm going to PR a change to the atomic flag to remove that behaviour. Users can opt into the --wait flag with helm upgrade --atomic --wait if they so choose, but there's no reason why it's required for the --atomic flag to work.

@tobylo if you wouldn't mind testing #5395 and verify if that works for you, that'd be great. :)

@bacongobbler just compiled it, will try it out tomorrow and let you know!

I have only been able to test your version on my local dev machine, --atomic works, but so it is using the 2.13 version.
While trying to test ways of getting the test version running on the build agents, I upgraded kubectl to 1.13.4 and tried --atomic with a higher --timeout, and now atomic upgrades work with v2.13 as well. I would assume it's due to the kubectl upgrade and not the --timeout, because the helm deploy does work as fast as without.

I would assume it's due to the kubectl upgrade and not the --timeout,

I'm pretty sure it's more likely due to the increased timeout. Because helm upgrade --atomic also enables the --wait flag, Helm keeps the connection open until all of the replicas in your deployment have returned to a ready state or the specified timeout has been reached. By increasing the timeout, you're giving helm more time to wait for the pods to come alive. I don't believe there was any significant change made between 1.12.4 and 1.13.4 that would've changed the wait logic in a significant way, but I could be wrong.
Either way, glad you have a workaround.


ioctl(VIDIOC_G_FMT): Invalid argument

This is probably an issue on my side, but I'm seeing the following error when attempting to create a v4l2 loop device:
$ ./wf-recorder --muxer=v4l2 --codec=rawvideo --file=/dev/video2 -o DP-1
selected region 0 0 0 0
Choosing pixel format bgr0
Output #0, video4linux2,v4l2, to '/dev/video2':
    Stream #0:0: Unknown: none (rawvideo)
[video4linux2,v4l2 @ 0x7f74b0000cc0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
[video4linux2,v4l2 @ 0x7f74b0000cc0] ioctl(VIDIOC_G_FMT): Invalid argument
Failed to write file header
Invalid argument

From what I was able to gather it sounds like there may be a driver issue or something missing on my system. Anyone have any ideas on what may be going on?
I'm running the commit ccbd0c7 which is latest as of today.

Do you have v4l2loopback kernel module loaded? Loading it will create a device node /dev/video# for you to use.

Yep, that was the issue. I picked it up from the AUR and its working now. Thanks @soreau for the quick response


Fix height and alignment issue within header in Chrome 76+

A change in Chrome 76 means that the header is currently being rendered 64px high (rather than the expected 60px), with mis-alignment between the crown and the GOV.UK logotype.
Adding display: inline-block to the __logotype element fixes it (h/t @trevorsaint).
(We are not sure what exactly changed in Chrome 76, nor why this fixes it.)
Fixes #1575
👉 Browser Screenshots
👉 Preview
Before

After

I've double checked and it renders exactly the same as the current header does in Chrome 75.


Update dependencies

 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.You have signed the CLA already but the status is still pending? Let us recheck it.

Coverage remained the same at 91.628% when pulling aba1022013b52114adf50102b2fd82f0123c8258 on rel_branch into bbd7bd2ccde6a359d78da826e7c86f5fe6b3565a on master.


[WIP] [FEATURE] PHPCR wrapper

The PHPCR wrapper ultimately aims to be able to wrap all of the PHPCR
objects as required.
Currently it wraps the Session, Node and Property classes, and enables us to use our own classes and effectively
extend the nodes returned from the PHPCR repository.
Tasks:

[x] test coverage
[ ] gather feedback for my changes

Next Steps
This PR could be split into two packages:

Wrapper package: The wrapping logic is completely generic
PHPCR-API Wrapper: Depending on Wrapper package and containing all the PHPCR wrapper objects and Traits.

Informations:

Q
A

Tests pass?
yes

Fixed tickets
#173

BC Breaks
NO

Doc
not yet

Closing, see https://github.com/sulu-cmf/sulu/issues/685


MOB-20950 BasicPushTemplate, AEPPushTemplate tests

Added Test Cases for BasicPushTemplate, AEPPushTemplate, added required data in MockDataProvider
Description
This PR includes the addition of test cases for the BasicPushTemplate class. The tests cover initialization with all keys present, initialization with invalid JSON, and initialization with malformed JSON.
Also, basic sanity and Illeagle argument cases in AEPPushTemplate class
Related Issue
https://jira.corp.adobe.com/browse/MOB-20950
Motivation and Context
Added test cases from scratch for these classes, which cases did not exist before
How Has This Been Tested?
Written Unit Test Cases
Screenshots (if appropriate):
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[X] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[X] I have signed the Adobe Open Source CLA.
[X] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[X] I have read the CONTRIBUTING document.
[X] I have added tests to cover my changes.
[X] All new and existing tests passed.

Done the suggested changes.


Fix TypeError: Cannot read property 'split' of undefined

For circular references sometimes stringify(value) returns undefined.

Coverage remained the same at 100.0% when pulling 1f6b8cd61acc139492e43c30a85af01b5408a26b on zalmoxisus:patch-1 into 795b55d1db90ab71fa4a12776384824d5fedab21 on blakeembrey:master.

Good catch, cheers!
Better handling of circular references would be pretty easy also, since the cache could track the path to a node and re-use it. Would supporting circular references be a useful addition to you?
An example of how circular references could be supported:
// Just return IIFE instead of the object.
(function () {
  var obj = {x:10};
  obj.circular = obj;
  return obj;
})()

Thanks for the details. This fix is intended to be used for redux-devtools-inspector, where we need only stringifying without getting the object back.
In redux-devtools-extension we're using jsan to stringify and parse jsons which could contain circular references. It still has some issues with them and can be too slow sometimes. Using javascript-stringify with the addition you mentioned could help, but eval-ing the result would be dangerous. So, not sure it could be used for parsing.


C++: Use GVN in RedundantNullCheckSimple

This PR extends RedundantNullCheckSimple.ql, our dummy IR query, to use GVN. This uncovered what I think is a bug in the GVN library, where the same value number was seemingly assigned to e and *e. I've added a test case that shows how this bug affects RedundantNullCheckSimple.ql and how it's fixed by making use of the new Operand.getDefinitionOverlap predicate.

Can you give an example where using GVN is preferable over the original version of the query?
Changes to the GVN libraries LGTM.

Can you give an example where using GVN is preferable over the original version of the query?

I expect that GVN will do better for anything that involves pointers stored in fields, although most of these improvements will come only with the next round of SSA-for-fields changes. That's why I made the new test cases slightly contrived, with all pointers set to addresses of local vars.


Use 'pre_get_avatar_data' filter for avatars

Issue
Avatar method in the comment class is ignoring filters set up previously (like 'pre_get_avatar_data).
Solution
Add filter to avatar method.
Impact
Very low, improving consistency with WordPress core.
Usage
Transparent for users.

Coverage increased (+0.003%) to 97.466% when pulling 03409e73c5b039833c9d9e068893193d8d446373 on xavivars:patch-2 into 3f90efb920011168bc296fc3ec7d8ac115b380ec on timber:master.

Thanks @xavivars — will take a look tonight!

Codecov Report

Merging #1310 into master will increase coverage by <.01%.

@@            Coverage Diff             @@
##           master    #1310      +/-   ##
==========================================
+ Coverage   97.67%   97.67%   +<.01%
==========================================
  Files          45       45
  Lines        3262     3265       +3
==========================================
+ Hits         3186     3189       +3
  Misses         76       76

Impacted Files
Coverage Δ

lib/Comment.php
100% <100%> (ø)
:white_check_mark:

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 3f90efb...fa0da12. Read the comment docs.

Coverage increased (+0.002%) to 97.465% when pulling fa0da123769f3aa1b3550ecd3e5d63a8e7abfc51 on xavivars:patch-2 into 3f90efb920011168bc296fc3ec7d8ac115b380ec on timber:master.

Coverage increased (+0.002%) to 97.465% when pulling fa0da123769f3aa1b3550ecd3e5d63a8e7abfc51 on xavivars:patch-2 into 3f90efb920011168bc296fc3ec7d8ac115b380ec on timber:master.

Coverage increased (+0.002%) to 97.465% when pulling fa0da123769f3aa1b3550ecd3e5d63a8e7abfc51 on xavivars:patch-2 into 3f90efb920011168bc296fc3ec7d8ac115b380ec on timber:master.

Coverage increased (+0.002%) to 97.465% when pulling fa0da123769f3aa1b3550ecd3e5d63a8e7abfc51 on xavivars:patch-2 into 3f90efb920011168bc296fc3ec7d8ac115b380ec on timber:master.

Thanks as always @xavivars !


Fix for #487 - Modified equals method to use compareTo in addition to comparing hashcode

Changed PlainIndexableObject equals implementation to compare the fields rather than use hashcode. This prevents different ids with conflicting hashcode from being considered equal.

Edited again to use compareTo in addition to hash (instead of completely replacing it). compareTo therefore will only be invoked for conflicting hashes.

I have to think a bit deeper about it. In fact, two PlainIndexableObjects should be considered equivalent if they have exactly same values, independent of _id or hashcode.

I would think they'd be considered different if there _id was different, independent of their values. If an _id field has been specified then it's been done for a reason IMO.

Closing as the fix has been committed.


reflect: PtrTo of struct with embedded field does not implement interfaces correctly

This one is hard to explain, luckily it is very simply reproduced.
Keep your attention on output regarding the anonymous struct F {} inside of struct Z {}

If you uncomment the /* */ area at the end.  The reflection answers before it change.
I would say they are only correct when that section is uncommented.
This program should never print "... == false".

http://play.golang.org/p/GDUfhs8g2H

Discovered originally using go1.3 linux amd64.

This is trivial, will fix for Go 1.5.


proposal: crypto/x509: add support for PBES2 private keys

What version of Go are you using (go version)?
1.14.3
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env)?
linux/amd64
What did you do?
I generated ECDSA private key with OpenSSL 1.1.1g using req -newkey. It asked for a password and encrypted the key. However, it didn't add headers like "Proc-Type" and "DEK-Info". If I decrypt the key using OpenSSL, it is usable for Go TLS, but Go itself cannot decrypt it.
https://play.golang.org/p/cU7jBbRIHt9
What did you expect to see?
IsEncryptedPEMBlock: true
key type: *ecdsa.PrivateKey
What did you see instead?
IsEncryptedPEMBlock: false
x509: no DEK-Info header in block

From OpenSSL manual:

Normally a private key is written using standard format: this is PKCS#8 form with the appropriate encryption algorithm (if any). If the -traditional option is specified then the older "traditional" format is used instead.

So my key is encrypted using PBES2. It seems to be default for openssl pkey, openssl req and maybe some other sub-commands.
I wrote quick and dirty function to decrypt PBES2: https://play.golang.org/p/NXTLt0HNt11 Feel free to use it if you decide to implement this feature.

Thank you for filing this issue @shibe2 and welcome to the Go project! I shall tag some experts @FiloSottile @katiehockman @retornam to also beware of this change.
@shibe2 if all goes great, perhaps this could be an addition to crypto/x509 or x/crypto/. Thank you.

PBES2 key blocks can be identified by PEM label (type) "ENCRYPTED PRIVATE KEY" and PKCS #5 object identifier in ASN.1 data. In an earlier comment I posted example code that handles both RFC 1423 and PBES2 encrypted keys.

As far as I am aware PBES2 is vulnerable to the same classes of attacks as PBES1 due to lack of support for authenticated ciphers, which led to our deprecation of DecryptPEMBlock  (see #41949 and #32777). If anything I think we probably want to add support for PKCS#8 encryption (see #8860).

Based on the discussion above, this proposal seems like a likely decline.
— rsc for the proposal review group


Increase the spacing between hexagons

Is there an easy way to increase the spacing between the hexagons?

Found it..
in .hexIn
set the width and padding bottom:
width:92%;
padding-bottom: 106.23%; /* =  width / sin(60) */


WIP: Add BDD tests

This project already provides ways to test its features via e2e* tasks, however I found it was a little bit unclear what was the expected behavior.
IMHO expressing tests with (almost) human readable format helps contributors understand the why and how of the project.
Here's the output from currently tested features using this strategy:

Seems there's little interest in this :) closing it then


Add  mat-error within a mat-checkbox

Hey,
I'm wondering if it is possible to add  validation error message  (mat-error)  for a checkbox.
kind regards

Duplicate of #8662.
As @jelbourn stated:

The Material Design spec does not prescribe an error display for toggle controls, so we leave that to the user to implement at the application level.

See the comment there for a working solution.

What @donroyco said


Enable idle rate counter on demand

This removes the need for compile time configuration of the idle-rate counters. Those will be enabled by default, but activated only when needed.

Are there any objections to merge this?

I would have liked to see a proper review here, as this was already changed in the opposite direction (about a year or two ago), and concerns about it were raised on IRC. I am not familiar with the implementation of counters nor with the rationale for disabling idle-rate (overheads?) to do that review, but the general code looks ok and the pattern seems to be already used for other counters (incidentally, access to those extern bools are theoretically races).
This is not an objection.

I would have liked to see a proper review here, as this was already changed in the opposite direction (about a year or two ago), and concerns about it were raised on IRC

No, it never was implemented this way, it was always a compile time switch. @pagrubel was doing some analysis a while back. She said that it had no noticeable effect on performance. But ok, let's do a full review here.

incidentally, access to those  extern bools  are theoretically races

Yah, it's what's called a benign data race.

I would have liked to see a proper review here, as this was already changed in the opposite direction (about a year or two ago), and concerns about it were raised on IRC
No, it never was implemented this way, it was always a compile time switch. @pagrubel was doing some analysis a while back. She said that it had no noticeable effect on performance. But ok, let's do a full review here.

I'm not asking for a full review. The code looks sane, and anyone interested had plenty enough time to be made aware of the proposed change. I would have just liked the PR to be signed off by those who have expressed concern.

incidentally, access to those extern bools are theoretically races

Yah, it's what's called a benign data race.

They actually look like undefined behavior, access to them is still potentially concurrent regardless of the architecture and whatever codegen they produce. I'm not asking for this to change either, I know it to work and be portable (for now) despite not being standard conformant.

I was hoping to see some comments from @pagrubel regarding the performance impact (if any) of those changes.

Yes, I’d like to run some tests. I haven’t had time as of yet. Now, I see hermione is having problems. Can you wait a bit?
Pat
On May 7, 2015, at 7:07 PM, Hartmut Kaiser <notifications<EMAIL_ADDRESS>wrote:
Are there any objections to merge this?
—
Reply to this email directly or view it on GitHubhttps://github.com/STEllAR-GROUP/hpx/pull/1489#issuecomment-100058386.
Patricia A. Grubel
Ph.D Candidate
Klipsch School of Electrical and Computer Engineering
New Mexico State University
575-434-2538 (home/work)
575-491-8206 (cell)

Note to self: make sure this counter interacts with the existence of RTDSC or similar.

@pagrubel do you still need to run your performance regression tests? Could you share your scripts so that someone could take over that duty if you lack the time at the moment?

I ran the data and will look at it by tomorrow
Pat
On May 31, 2015, at 2:29 PM, Thomas Heller <notifications<EMAIL_ADDRESS>wrote:
@pagrubelhttps://github.com/pagrubel do you still need to run your performance regression tests? Could you share your scripts so that someone could take over that duty if you lack the time at the moment?
—
Reply to this email directly or view it on GitHubhttps://github.com/STEllAR-GROUP/hpx/pull/1489#issuecomment-107241863.

Doesn't lgtm
I'm seeing some really bad idle_rate counts, bad variances between samples for some core counts.

Ok, thanks Pat! I'll close this without merging, then.


add file

Added pattern section and copy page... hopefully.

 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.Peter B 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.


Edit Add attraction under User Guide

And I also edited the architecture diagram a bit in developer guide to delete attraction instead of delete person

Codecov Report

Merging #150 into master will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #150   +/-   ##
=========================================
  Coverage     56.19%   56.19%
  Complexity      544      544
=========================================
  Files           106      106
  Lines          2226     2226
  Branches        313      313
=========================================
  Hits           1251     1251
  Misses          917      917
  Partials         58       58

Impacted Files
Coverage Δ
Complexity Δ

...n/java/seedu/address/model/attraction/Address.java
84.61% <ø> (ø)
7.00 <0.00> (ø)

.../java/seedu/address/model/attraction/Location.java
80.00% <ø> (ø)
6.00 <0.00> (ø)

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 adcd8c4...e3dd604. Read the comment docs.


fix: avoid sql gc

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 68.62%. Comparing base (45a1c2a) to head (9d25246).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #307   +/-   ##
=======================================
  Coverage   68.62%   68.62%
=======================================
  Files          85       85
  Lines        9707     9707
=======================================
  Hits         6661     6661
  Misses       2371     2371
  Partials      675      675

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Crunch suddenly doesn't work - Rpc error

I've been encountering this error lately:
INFO crunch::runtimes::kusama] Inspect and `crunch` unclaimed payout rewards
WARN crunch::runtimes::kusama] batch call indexes [0 : 2]
ERROR crunch::crunch] Subxt error: Rpc error: RPC error
INFOcrunch::crunch] Connected to Kusama network using ws://<IP_ADDRESS>:9944 * Substrate node Parity Polkadot v0.9.36-dc25abc712e
INFO crunch::matrix] The 'Crunch Bot' user @......t:matrix.org has been authenticated at matrix.org
INFO crunch::matrix] Messages will be sent to room #Y3J1bmNoL.............
INFOcrunch::runtimes::kusama] Inspect and `crunch` unclaimed payout rewards
WARN  crunch::runtimes::kusama] batch call indexes [0 : 2]
ERROR crunch::crunch] Subxt error: Rpc error: RPC error

Some discord member sugested to replace the RPC with
CRUNCH_SUBSTRATE_WS_URL=wss://ksm-rpc.stakeworld.io:443 which I did, but the error is still there and it is quite the same.
I was hoping that reinstalling the node will solve the issue so I reinstalled on a fresh Ubuntu. For some reason I decided to use 20.0.4 LTS, not 22.0.4 like I did before which seems to be a not very inspired choice: now I have another issue: the OpenSSL version is OpenSSL 1.1.1f which looks like it doesn't support crunch.
In the meantime I tried to upgrade my Openssl to 3.1.0, some errors occurred and I just gave up for now as it's Christmas Eve, lol.
I'll be back with a new report after OpenSSL will be upgraded to 3.1.0.

Hi, latest crunch releases v0.8.1 were automatically built under Ubuntu 22.04.1 LTS. I would recommend using the same OS version as well to run crunch.
Also could you please provide the full command and flags you are using to run crunch?
Are you running like /crunch-bot/crunch --config-path /crunch-bot/.env rewards era --seed-path /crunch-bot/.private.seed or do you use different flags?

I always use the latest release, so I'm up to date with 0.8.1. This is my running line
ExecStart=/crunch-bot/crunch --config-path /crunch-bot/.env rewards   era --seed-path /crunch-bot/.private.seed   --disable-public-matrix-room
Anyway, after reinstalling the node with Ubuntu 22.04, everything looks back to normal, but the validator is not in the active set yet. I'll be back with new impressions after it will be nominated again.

Back into the active set, and the payment failed  again:
systemctl status crunch.service
● crunch.service - Kusama Crunch Bot
     Loaded: loaded (/etc/systemd/system/crunch.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2022-12-26 09:16:57 CET; 23h ago
   Main PID: 14582 (crunch)
      Tasks: 28 (limit: 38096)
     Memory: 16.1M
        CPU: 19.521s
     CGroup: /system.slice/crunch.service
             └─14582 /crunch-bot/crunch --config-path /crunch-bot/.env rewards era --seed-path /crunch-bot/.private.seed --disable-public-matrix-room
crunch[14582]: [2022-12-27T07:13:46Z WARN  crunch::runtimes::kusama] batch call indexes [0 : 1]
crunch[14582]: [2022-12-27T07:13:46Z ERROR crunch::crunch] Subxt error: Rpc error: RPC error
crunch[14582]: [2022-12-27T07:18:47Z INFO  crunch::crunch] Connected to Kusama network using ws://<IP_ADDRESS>:9944 * Substrate node Parity Polkadot v0.9.36-dc25abc712e
crunch[14582]: [2022-12-27T07:18:47Z INFO  crunch::matrix] The 'Crunch Bot' user @..............has been authenticated at matrix.org
crunch[14582]: [2022-12-27T07:18:47Z INFO  crunch::matrix] Messages will be sent to room #Y3...................=:matrix.org (Private)
crunch[14582]: [2022-12-27T07:18:48Z INFO  crunch::matrix] Crunch Bot (....................) * Matrix bot display name changed
crunch[14582]: [2022-12-27T07:18:48Z INFO  crunch::runtimes::kusama] Inspect and `crunch` unclaimed payout rewards
crunch[14582]: [2022-12-27T07:18:48Z WARN  crunch::runtimes::kusama] Crunch upgrade might be required soon. Local static metadata differs from current chain runtime version.
crunch[14582]: [2022-12-27T07:18:48Z WARN  crunch::runtimes::kusama] batch call indexes [0 : 1]
crunch[14582]: [2022-12-27T07:18:48Z ERROR crunch::crunch] Subxt error: Rpc error: RPC error

You can also try to connect to a public RPC node. Example, try to specify the following variables in your /crunch-bot/.env file and let me know if the same error occurs:
CRUNCH_STASHES=YOUR_VALIDATOR_STASH
CRUNCH_SUBSTRATE_WS_URL=wss://kusama-rpc.polkadot.io:443
CRUNCH_MAXIMUM_PAYOUTS=10
CRUNCH_MAXIMUM_HISTORY_ERAS=16
CRUNCH_EXISTENTIAL_DEPOSIT_FACTOR_WARNING=1000
CRUNCH_MAXIMUM_CALLS=4
CRUNCH_MAXIMUM_PAYOUTS=10

I did it but the result at the era change a few minutes ago is the same:
INFO  crunch::runtimes::kusama] Inspect and `crunch` unclaimed payout rewards
WARN  crunch::runtimes::kusama] Crunch upgrade might be required soon. Local static metadata differs from current chain runtime version.
WARN  crunch::runtimes::kusama] batch call indexes [0 : 1]
ERROR crunch::crunch] Subxt error: Rpc error: RPC error

We have the same problem now

Okay, it just "fixed itself". The only thing that's different to 10min ago is that I manually did the payouts.

Okay, it just "fixed itself". The only thing that's different to 10min ago is that I manually did the payouts.
Yeah, but wait until next era.
If I perform the payments manually, then the crunch logs and status looks fine, but when era changes, it won't perform the payment and the error comes back until I perform the payments manually again.

as  you can see, this evening at 20.59 I perform the payment manually. until then, crunch retried every 5 minutes to do it but it couldn't.  now everything looks fine but this will be until 2:27 AM when it will start throwing that error again

Could the reason be the signer account that doesn’t have enough funds to pay for the transaction? Try top-up that account with a small amount and see if it fixes the issue.

I can't believe it worked. I mean I can't believe because a few weeks ago, I had this issue, but back then it was clearly stated in the log error: "funds not enough " or something like this. This time this "funds error" was not stated so I got that out of the question. Doh... happy ending (I hope)!
Thank you Paulo for your assistance!

So yes, now that the era changed I can confirm: everything works properly. Thanks!

Ok thanks for the feedback. Glad it's working again, I’ll try to review that error log to be more explicit.

Works for me too now. the suggested fee was slightly higher than what I had on the account. the real fee was 10 times lower, though.

error readability fixed in v0.10.0


how to get any message when send by user

Hi,
first question
I want when user send message (without /commands) like:

test test1 test2

then handle this message.

I just find handle message when user send like

/name test

The command you need to override is GenericmessageCommand
In the execute method you can then get the text and do with it what you want 👍

Sry i change file https://github.com/akalongman/php-telegram-bot/blob/0.35/src/Commands/SystemCommands/GenericmessageCommand.php`
return Request::emptyResponse();
to return
 Request::sendMessage($data);
but can't get message without '/'

This example execute method in GenericmessageCommand will simply return the entered text (which you can get with $this->getMessage()->getText();):
public function execute()
{
    $message = $this->getMessage();

    return Request::sendMessage([
        'chat_id' => $message->getChat()->getId(),
        'text'    => $message->getText(),
    ]);
}

sry dude, but nothing change.
should change any file like hook.php or ...

my GenericmessageCommand file:
namespace Longman\TelegramBot\Commands\SystemCommands;

use Longman\TelegramBot\Conversation;
use Longman\TelegramBot\Request;
use Longman\TelegramBot\Commands\SystemCommand;

class GenericmessageCommand extends SystemCommand
{
    protected $name = 'Genericmessage';
    protected $description = 'Handle generic message';
    protected $version = '1.0.2';
    protected $need_mysql = true;

    public function executeNoDb()
    {
        //Do nothing
        return Request::emptyResponse();
    }

    public function execute()
    {
        $message = $this->getMessage();

        return Request::sendMessage([
            'chat_id' => $message->getChat()->getId(),
            'text'    => $message->getText(),
        ]);
    }
}

Probably not using DB...?

ty @jacklul
I not using Db.
ty very much

@pooya-az Is it working now? What did you change to make it work?

I add your code in executeNoDb() because $need_mysql is true value

Hmm, executeNoDb gets executed when there is no MySQL connection available.
If you don't use the MySQL database, just set $mysql to false.
Glad to see that it's working for you 👍

ty very much for answer my issue.
@noplanman


Rework the code to limit the probability to be blacklisted on central

Maven Central has some cleverness to blacklist crawlers. One of the detection part is the regular usage of directory listing. Since coursier uses it on a regular base it is quite easy to be blacklisted on central.
Goal of this issue is to align coursier usage on maven one (direct files + configurable caching with a default to "day") to ensure central is not that easily blacklisted due to coursier based builds.
See https://central.sonatype.org/articles/2018/Sep/06/403-forbidden-error-from-central/

Closing this. Directory listings are very seldomly relied upon now. Feel free to upon a PR or discuss further enhancements if you'd like.


Zoom factor

How can i get zoom factor?
ex. zoomed (2x), zoomed (1.63x)
Edit:
and also how can i get x and y coordinates of displayed part of ZoomageView after i zoom in?

zoom factor has been added in the latest snapshot


Enabled on Client is not respected

https://github.com/IdentityServer/IdentityServer4.EntityFramework/blob/dev/src/IdentityServer4.EntityFramework/Stores/ClientStore.cs#L26
Doesn't match InMemory
https://github.com/IdentityServer/IdentityServer4/blob/ccb9cfc407aea220f7d654bec100a1bde41a640b/src/IdentityServer4/Stores/InMemory/InMemoryClientStore.cs#L35
InMemory only returns Clients that are Enabled, where EF will return all clients if they match, enabled or not.

Okay, thanks for flagging that.
I'll look into this.

I've opened this up for discussion in the core repo: https://github.com/IdentityServer/IdentityServer4/issues/353

All consuming implementations have been updated to check for null and disabled being returned from the Client and Scope stores. Seems the InMemoryClientStore was the odd one out.


Add example get endpoint for path based user id /api/user/1

For some reason req.Param("id") doesn't work when using the testbed but works when running the server.
I was trying to figure out why but didn't get anywhere! Any help much appreciated.

See https://bunrouter.uptrace.dev/guide/golang-router.html#testing-routes
You can't call the handler directly since that skips bunrouter's magic. Use ServeHTTPError instead.

Thanks @vmihailenco that makes sense, I completely missed that. I've changed the code to use ServeHTTPError I appreciate that the original code was more of a unit test where as this is now testing more things. Let me know what you think.

This looks good - thank you!


upgrade terraform to v0.7.5

Upgrade terraform to v0.7.5 https://www.terraform.io/downloads.html
run terraform refresh in the terraform directory

👍


Changing SDV's licensing from MIT -> Business Source License

This PR changes the Synthetic Data Vault (SDV)'s licensing to Business Source License. Previously, it was described as MIT.
SDV repo: https://github.com/sdv-dev/SDV
SDV LICENSE: https://github.com/sdv-dev/SDV/blob/master/LICENSE
I assumed this change is straightforward, so I'm submitting a PR right away. That said, I'm also happy to open an issue if a discussion is needed. ✌

Nicely spotted @nsunami! I wonder if they changed it or if we overlooked it ;)

@DorienHuijser
It looks like they updated their license in December last year (2022).
https://github.com/sdv-dev/SDV/commit/5feec5e0016ecf027eb1454ec808361ee42b4192
🤔


Fix strdup optional check

This fixes the build of SwiftCLI on Xcode 13 RC.
strdup returns an implicitly unwrapped optional which is breaking the build. The change is quite straightforward and it'd be great if we can merge and make a release as soon as possible.

@jakeheis Any chance we can get this in? Quite a few tools rely on this for their workflows and as of now they are breaking.

Thanks for the contribution. Just so I understand correctly, has the signature of strdup changed from returning an implicitly unwrapped optional to an explicit optional, and this is a fix for that signature change?

@jakeheis Spot on!

Perfect then looks good. Thanks for the fix!

Tagged as 6.0.3

Perfect, thanks @jakeheis


[AIRFLOW-833] Add an airflow default_config sub-command

Dear Airflow Maintainers,
Please accept this PR that addresses the following issues:

https://issues.apache.org/jira/browse/AIRFLOW-833

I suggest that running airflow initdb creates the default config if it doesn't exist already. That way your enhancement allows a more advanced config behavior but the "basic" approach still works.

I suggest that running airflow initdb creates the default config if it doesn't exist already. That way your enhancement allows a more advanced config behavior but the "basic" approach still works.

I'm not sure I understand what you mean here, can you elaborate? Are you suggesting to bundle the proposed functionality into airflow initdb instead of adding a new subcommand?

Nope, I like the new command, I am just suggesting that the initdb function (https://github.com/apache/incubator-airflow/blob/master/airflow/utils/db.py#L102) should automatically run it.
That way the start becomes:
      pip install airflow # required
      airflow default_config # optional, only for advanced users who know they want to customize settings off the bat
      airflow initdb # required, and will generate the default if the previous command wasn't run

Ah ok, makes sense; will do!

Please also add unit tests that cover the new functions and updated functions.

Codecov Report

Merging #2052 into master will increase coverage by 0.01%.
The diff coverage is 89.79%.

@@            Coverage Diff             @@
##           master    #2052      +/-   ##
==========================================
+ Coverage    67.7%   67.71%   +0.01%
==========================================
  Files         139      139
  Lines       10579    10593      +14
==========================================
+ Hits         7162     7173      +11
- Misses       3417     3420       +3

Impacted Files
Coverage Δ

airflow/bin/cli.py
53.7% <100%> (+0.51%)
:white_check_mark:

airflow/utils/db.py
84.87% <100%> (+0.39%)
:white_check_mark:

airflow/www/views.py
69.63% <60%> (-0.08%)
:x:

airflow/configuration.py
87% <91.17%> (+2.57%)
:white_check_mark:

airflow/task_runner/bash_task_runner.py
93.33% <ø> (-6.67%)
:x:

airflow/utils/helpers.py
41.08% <ø> (-2.48%)
:x:

airflow/models.py
86.1% <ø> (-0.06%)
:x:

airflow/jobs.py
73.12% <ø> (+0.1%)
:white_check_mark:

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 eea5ff8...7de2eff. Read the comment docs.

All comments addressed in the new PR

for consistency with the rest of the commands can we name it like a verb (eg install_default_config) instead

I'm afraid I don't have the time and inclination to jump through any more hoops by an unspecified set of reviewers (presumably core contributors though I can't tell). The way this ticket and especially #2078 have been handled so far don't make me feel that "contributions are welcome and are greatly appreciated" as advertised.
Feel free to make any remaining changes you deem necessary for this PR and merge it, or not.

Bump

@gsakkis note that your code apply changes to the old UI which will be deprecated once https://github.com/apache/incubator-airflow/pull/4339 is merged. It's being replaced with RABC.


env bloblang function produces empty string instead of null for missing env vars

If an env var is not set, the env function always produces an empty string instead of a null/missing value.
This means you can't use the coalesce operator with env vars:
foo = env("FOO") | "bar"

will always yield:
{
  "foo": ""
}

A viable work-around is to use a match:
match env("FOO") { "" => "bar", _ => this }

But this is cumbersome, especially when you want to use an env var in more complex expressions:
foo = json(env("FOO_PATH") | bar.baz) | "bar"

vs.
foo = json(match env("FOO_PATH") { "" => "bar.baz", _ => this }) | "bar"

There's currently an inconsistency between standard JSON queries foo.bar.baz, metadata queries with meta, and env:

Query type
Value when missing

JSON
null

Metadata
Errors

Env var
Empty string

Changing the behaviour of JSON queries is out of the question as it's almost guaranteed that returning null is already relied on in a lot of mappings. Changing meta or var would also technically be a breaking change. However, it could be also be considered a bug to return an empty string on a non-existent env var so there's room for interpretation, and as long as we're considerate over how we might impact existing mappings we should be fine.
Options for env and meta are to return null, return an empty string and add a convenience method not_empty, or return errors in both cases. Changing env and meta to return null is the most breakingest change so I feel uneasy about that. Returning errors could work but is significantly different to JSON queries.
Adding not_empty would allow foo = env("bar").not_empty() | "waddup", which is a little long winded but would be fully backwards compatible.

Consistency across all these is now added to v4: https://github.com/Jeffail/benthos/commit/cec72e7c627997dd8db6fec3e8fffe2961fb3ed3


Postgres Container with default configuration doesnt work with mapped data binding

The default configuration for PostgreSQLContainer doesn't work if a non-empty data bind is configured.
For example:
final JdbcDatabaseContainer<?> container = new PostgreSQLContainerProvider().newInstance("13.4");
container.addFileSystemBind("./target/postgres-volume", "/var/lib/postgresql/data", BindMode.READ_WRITE);
container.start();

blocks for 60 seconds until it finally throws an exception because the default WaitStrategy didnt finish within 60 seconds.
This happens because the Log-Output of a Postgres-Container with an existing data-directory doesn't contain the configured log-message twice, but only once.
When configuring the same WaitStrategy expecting the output to be present only once, the startup works as expected:
        container.setWaitStrategy(new LogMessageWaitStrategy()
                .withRegEx(".*database system is ready to accept connections.*\\s")
                .withTimes(1)
                .withStartupTimeout(Duration.of(60, SECONDS)));

Proposed Solution:
The default WaitStrategy should first wait for either:
PostgreSQL Database directory appears to contain a database; Skipping initialization
-- or --
.*database system is ready to accept connections.*\s
and after that, wait for:
.*database system is ready to accept connections.*\s

Good pointer, thanks for investigating and reporting @fwollsch 👍
Sadly, we can't easily implement this conditional logic with our current LogMessageWaitStrategy implementation. Do you see another log line we can use as a more stable indicator of readiness?
As a sidenote, please be advised that usage of addFileSystemBind is generally discouraged, and if possible, we'd encourage you to use withCopyFileToContainer() instead, since it works more reliable across different Docker environments.

Thanks for coming back to me @kiview ! Also thanks for the note about addFileSystemBind. Unfortunately we don't only want to initialize the database with an existing database, but also want to keep the data being written during the lifetime of the container. If you know of any better options for that, let me know :)
Indeed, to fix this issue, there is currently no fitting existing component. However, with a new Consumer and a custom WaitStrategy for Postgres, I was able to solve this.
The code is only a "POC" you could say, but you get the idea:
    private static class PostgresWaitStrategy extends AbstractWaitStrategy {

        private static final String READY_REGEX = ".*database system is ready to accept connections.*\\s";
        private static final String SKIPPING_INITIALIZATION_REGEX = ".*PostgreSQL Database directory appears to contain a database; Skipping initialization:*\\s";

        @Override
        protected void waitUntilReady() {
            MultiWaitingConsumer multiWaitingConsumer = new MultiWaitingConsumer();

            LogContainerCmd cmd = DockerClientFactory.instance().client().logContainerCmd(waitStrategyTarget.getContainerId())
                    .withFollowStream(true)
                    .withSince(0)
                    .withStdOut(true)
                    .withStdErr(true);

            try (FrameConsumerResultCallback callback = new FrameConsumerResultCallback()) {
                callback.addConsumer(STDOUT, multiWaitingConsumer);
                callback.addConsumer(STDERR, multiWaitingConsumer);

                cmd.exec(callback);

                List<Predicate<OutputFrame>> predicates = List.of(
                        (outputFrame) -> {
                            final String value = outputFrame.getUtf8String();
                            return value.matches("(?s)" + READY_REGEX) || value.matches("(?s)" + SKIPPING_INITIALIZATION_REGEX);
                        },
                        (outputFrame) -> outputFrame.getUtf8String().matches("(?s)" + READY_REGEX)
                );

                try {
                    multiWaitingConsumer.waitUntil(predicates, startupTimeout.getSeconds(), TimeUnit.SECONDS);
                } catch (TimeoutException e) {
                    throw new ContainerLaunchException("Timed out waiting for postgres container to start");
                }
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
    }

    private static class MultiWaitingConsumer extends BaseConsumer<WaitingConsumer> {

        private static final Logger LOGGER = LoggerFactory.getLogger(WaitingConsumer.class);

        private LinkedBlockingDeque<OutputFrame> frames = new LinkedBlockingDeque<>();

        @Override
        public void accept(OutputFrame frame) {
            frames.add(frame);
        }

        public LinkedBlockingDeque<OutputFrame> getFrames() {
            return frames;
        }

        public void waitUntil(Collection<Predicate<OutputFrame>> predicates, long limit, TimeUnit limitUnit) throws TimeoutException {
            long expiry = limitUnit.toMillis(limit) + System.currentTimeMillis();

            waitUntil(predicates, expiry);
        }

        private void waitUntil(Collection<Predicate<OutputFrame>> predicates, long expiry) throws TimeoutException {
            Queue<Predicate<OutputFrame>> predicateQueue = new ArrayDeque<>(predicates);
            Predicate<OutputFrame> predicate;

            while ((predicate = predicateQueue.peek()) != null && System.currentTimeMillis() < expiry) {
                try {
                    OutputFrame frame = frames.pollLast(100, TimeUnit.MILLISECONDS);

                    if (frame != null) {
                        final String trimmedFrameText = frame.getUtf8String().replaceFirst("\n$", "");
                        LOGGER.debug("{}: {}", frame.getType(), trimmedFrameText);

                        if (predicate.test(frame)) {
                            predicateQueue.remove();
                        }
                    }

                    if (frames.isEmpty()) {
                        // sleep for a moment to avoid excessive CPU spinning
                        Thread.sleep(10L);
                    }
                } catch (InterruptedException e) {
                    // dont have SneakyThrows available at the moment
                    throw new RuntimeException(e);
                }
            }

            if (predicate != null) {
                // at least one predicate wasnt removed (did not match) until the loop exited
                throw new TimeoutException();
            }
        }
    }

I think it might make sense to extend LogMessageWaitStrategy to a certain sequence of log messages, but we should be careful to not introduce a breaking change. Seems to be the most straightforward approach from a UX perspective.

Unfortunately we don't only want to initialize the database with an existing database, but also want to keep the data being written during the lifetime of the container. If you know of any better options for that, let me know :)

The data will already persist during the container lifetime, even without the bind. If you need the data to survive after container lifetime, an alternative would be to use copyFileFromContainer at a certain point in time.


[Computer Vision v3.0] Update ComputerVision Error enum to list all p…

…ossible errors in client SDK
MSFT employees can try out our new experience at OpenAPI Hub  - one location for using our validation tools and finding your workflow.

Contribution checklist:

[x] I have reviewed the documentation for the workflow.
[x] Validation tools were run on swagger spec(s) and have all been fixed in this PR. How to fix?

If any further question about AME onboarding or validation tools, please view the FAQ.
ARM API Review Checklist

[ ] Service team MUST add the "WaitForARMFeedback" label if the management plane API changes fall into one of the below categories.

adding/removing APIs.
adding/removing properties.
adding/removing API-version.
adding a new service in Azure.

Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs.

[ ] If you are blocked on ARM review and want to get the PR merged urgently, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.
Please follow the link to find more details on API review process.

/azp run automation - sdk

Can one of the admins verify this patch?

This fails the Swagger Breaking Change check. Have you consulted the breaking change guidance?

Closing this PR as stale. Feel free to reopen if you plan to continue work on it.


Some refactors, add GitHub Actions CI

Codecov Report

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

@@           Coverage Diff           @@
##             main       #7   +/-   ##
=======================================
  Coverage        ?   67.44%
=======================================
  Files           ?        4
  Lines           ?      344
  Branches        ?        0
=======================================
  Hits            ?      232
  Misses          ?       71
  Partials        ?       41

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


The stepover icon is hard to see on debug menu

Is that a feature or a bug? If it is a feature, how can I change it?

hey there, thanks for the issue - that's definitely not intended. i'll fix it.

I changed the stepover icon color to mauve, and rolled a new release.

Thank you for the fast response! It looks great now.


Cannot create Image file to send as attachment.

Code example shown creates a svg tag within the div tag which is stored in the bar const.
I need to create a file such as .png, or .svg on the server to send via mail using Node.js.
Also the svg create lacks the css, and as I understand the svg can be created with the css.
Is there a way to create png combining the svg and css provided by this library.
co(function * () {
  const options = {
    width: 400,
    height: 200,
    axisX: { title: 'X Axis (units)' },
    axisY: { title: 'Y Axis (units)' }
  };

  const bar = yield generate('bar', options, {
    labels: ['a', 'b', 'c', 'd', 'e'],
    series: [
      {name: 'Series 1', value: [1, 2, 3, 4, 5]},
      {name: 'Series 2', value: [3, 4, 5, 6, 7]}
    ]
  });
})

Hi, Would like this feature too.
Related but not solved for me: https://github.com/panosoft/node-chartist/issues/11

This is the SVG I created, with reference to main.css (from dist folder). But CSS is not being loaded correctly as compared to when it is being sent with the <div>...</div> block that the bar const returns in the code above.
`

abcde01234567
`

Hi @parthjaggi
This is not something currently supported by this library.
That said, inlining the  styles in your svg file (via


Custom rnn layers for TFT

Custom TFT

Add the possibility to chose between LSTM and GRU layers
Add the possibility to stack multiple RNN layers
Chose to initialize all the RNN states with the same or different values computed from static covariates

 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.You have signed the CLA already but the status is still pending? Let us recheck it.


Color improvements

Fixes https://github.com/hecrj/coffee/issues/74.

Thank you! Feel free to add the assertions too!

That would require the check float >= 1.0, which is non trivial to do. Are you okay with adding a dependency on approx? Or do you know another solution

What's wrong with float <= 1.0?

Exact equality is not possible with floats, it won't even compile in rust since floats only implement PartialEq

Hmm... My compiler doesn't seem to complain about this:
assert!(0.0 >= r, r <= 1.0);
assert!(0.0 >= g, g <= 1.0);
assert!(0.0 >= b, b <= 1.0);
assert!(0.0 >= a, a <= 1.0);

I understand precision issues are a thing, but I am not sure if we should be worrying about that here. AFAIK, both 0.0 and 1.0 should be perfectly representable.

Oh that's weird? I have no idea why that is the case. Maybe 1.0 is special cased?

A type implementing only PartialEq still allows to check for equality. PartialEq is basically Eq but without reflexiveness (in the case of floats: NaN != NaN). Also, the relevant trait for <= is PartialOrd.

Should from_rgb_u32 check for values larger than 0xFFFFFF too? Or just ignore those?


Ender Chest = Invalid Inventory ? Should be good. (Suggestion)

The processor does not recognize MC Ender Chest as valid inventory. As soon as I put a normal chest in its place, it works. Would be cool. :)

That's because it's not possible.  The enderchest has another inventory depending on player and cannot be accessed with machines. A hopper does not work either

Ok. I remember I already heared this....
What about an ender chest interface (ECI) that would contact a normal chest at a given position in the world, say at 0, -1, 0? And sync that with the player's ender chests? And the interface would in real only go to the hidden chest of the player. --- Ok I'm starting to babble silly things now.
My "solution" has a real multiplayer problem.
If I was content with what I've got I would never have installed any mod.
Thanks for modding and taking care of your followers.
Greetings, Konitor
If your mod is dull, then nobody cares. If its already good, then people have ideas to make it even better.

That doesn't really make any sense. If you want to be able to use ender chests this way, you need a mod like Ender Storage 1.8+.

Thank you. Time to close this one.


config array description should allow logger key

... since logger() is private the only way to set a logger is via constructor, but the array description (enforced by PHPStan) does not allow it yet.

Hi @mbolli, just want to say thanks for contributing.
As a heads up in v2, I plan to remove logging as it doesn't provide much value.


Add mystrom sensor

Description:
Adding support for the MyStrom switch also as a power sensor. The plug provides power metering which can be usefull as a dedicated sensor.
related component: https://home-assistant.io/components/switch.mystrom/
Example entry for configuration.yaml:
sensor:
  - platform: mystrom
    host: IP_ADRRESS

Hi @rorist,
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!

The mystrom switch platform already is exposing the current_power_w as an attribute. Thus this sensor platform is only duplicating code.

Hello, ah indeed sorry, I didn't realise we can do a sensor template using this value, quite new to HA. Maybe an example on the mystrom documentation could be added?

I can add an example if it helps.
https://github.com/home-assistant/home-assistant.github.io/pull/4112

It does, it's perfect thank you very much.


Improve XRD plots

We should:

[ ] Put back the plotting for intensity, two_theta, and q_norm using old annotations
[ ] Make the labels prettier for the RSM plot (should be lower case q in italics with the parallel and perpendicular signs subscripted in my opinion)
[ ] Change the ticks of the log color bar to say 10 to the numbers (superscripted) and add a label to it
[ ] Add a name to the XRD result to make the workflow view look nicer

Is there a reason why the x-axis is locked and one cannot maximize?

@Pepe-Marquez I don't think there was any particular reason. I will add this to the upcoming improvements.

[ ] Fix: when the ELNXRayDiffraction is started without a file, its plotting function already expects results and throws errors.


Viruses and koalas missing

@lizimai may be on it :-)

virus is done, still missing koala

hahaha


manual activity lock screen callback for success?

Intent intent = new Intent(getActivity(), PinLockActivity.class);
intent.putExtra(AppLock.EXTRA_TYPE, AppLock.UNLOCK_PIN);
startActivity(intent);
how to do something ? on if successfully unlocked

That's not how the library is supposed to work sorry
Your activities have to extend PinActivity in order to show the PinLockActivity after a certain timeout.

@olivierg13 Is there a reason for this decision? The issue is, if you do it that way, technically (unless I'm incorrect) it is hard to be a gateway.
E.g. Use case: Pin code as an another set of gateway before login. I could technically put it in the place where login happens, however, login is still happening in the background even though UI is blocked. If someone connected their phone to the laptop the logs are still shown given that login is still happening.
I love this library so far, since it is one of the more advanced ones (other ones are mostly UI or just does PIN and not fingerprint). It's just that it will be awesome to know when it's coming back successful.


Not clear that this isnt built into windows

Please make it clear that this is not natively available in windows 10

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

ID: ae7015da-46b8-2579-690c-c83016d8be22
Version Independent ID: f27e9635-b4a3-3b7f-f7e7-bd0aca099014
Content: Windows Terminal Panes
Content Source: TerminalDocs/panes.md
Product: dev-environment
Technology: windows-terminal
GitHub Login: @cinnamon-msft
Microsoft Alias: cinnamon

Could you clarify? The Terminal doesn't come pre-installed on Windows 10, no, but it is available.
Or is there something specific about Panes that you're talking about?

Looks like OP isn't coming back.


installation issue

First of all thank you for this solution.
I tried to install ERPnext using it for testing purposes.
and it seems something didn't went well.
I used a  4 GB Memory / 80 GB Disk / LON1 - Ubuntu 22.04 (LTS) x64 Server by Digital Ocean.
I choose V15
I completed the process and seems the installer got some issues during the installation.
like one that says " no such directory /root"
But anyway at the end I'm getting this

did you create a standard user with sudo privileges or did you run the script as root?


How to setup a VTOL takeoff mission with mission_raw?

Hello everyone,
I am trying to achieve a VTOL takeoff mission with the navigation setpoint triplet uploaded beforehand. For my specific task it is important to know the next waypoint while performing the transition. The two options I found working on the QGCS are as following:
What I am trying to achieve:
Option 1: perform a standard MC takeoff followed by a transition to FW

Option 2: perform a Vtol takeoff command

Solution with mission and action commands:

If I try to achieve my goal with the currently implemented mission and action commands it looks like shown above. The problem there is, that the vtol will not turn towards the next waypoint before performing the transition. It will just accelerate in whatever heading it is after takeoff.
For now, lets stick with option 1 and try to achieve this with the mission_raw.
Setup Issues for mission_raw:
It seems like creating a MissionItem with 3 entries should be enough to solve this task, but I am getting stuck filling my upload_mission(). I tried both options (async and normal but both seem to be undefined reference. I build on top of the autopilot_tester in px4
That's the setup ()

That's the function:

And terminal output:

Since the setup for my mission_raw is the same as the normal mission, I don't realy understand the undefined reference problem.
Questions/ Further Goals

Is the way with mission_raw the "best" way to follow to achieve my goal?
One of the fail conditions would be an excessive deviation from the planned ground truth. How would you implement this?

Until we support VTOL in the mission plugin, the mission_raw approach makes sense.
The undefined reference problem is easy,  it just means it doesn't find the symbols because you forgot to link to them.
Just add MAVSDK::mission_raw here:
https://github.com/PX4/Firmware/blob/7354e3989335dfb38cc41216182f48fe84d165c7/test/mavsdk_tests/CMakeLists.txt#L23
Also, I see you are using/extending the PX4 AutopilotTester to work for VTOL. Would you mind contributing that back so that we have some VTOL tests upstream? That would be nice!

haha, such an easy fix
I will try to implement my mission and will report back to you if I hit some trouble.  If the mission ends up working fine I will upstream it :+1:

Cool thanks.

Filling the item with stuff and trying to upload it seems to crash somewhere, but I can not narrow down the cause...
That's what I am executing:

That's the function:

And here is the error:

I played around with the information I am giving to the item, commented the push_back, skipped the mission_upload but the seg fault still persists. Any clue why?
I am just playing around a bit to understand how to make it work. For a possible upstream it would be nice to have some kind of logic behind creating missionRaw items instead of filling each one separately and pushing them back.

You can run the test with --debugger gdb which should give you a stacktrace.

For a possible upstream it would be nice to have some kind of logic behind creating missionRaw items instead of filling each one separately and pushing them back.

That's why we have the mission plugin. So mission_raw will stay unsupported and "raw" while we're discussing on how to add VTOL capabilities to mission or creating a mission_vtol plugin. Also see the discussion in https://github.com/mavlink/MAVSDK-Proto/issues/168.

You can run the test with --debugger gdb which should give you a stacktrace.

When running with --debugger gdb, mavsdk seems to have trouble connecting with my system. At least the connect() function fails due to timeout reasons. Any clue why this is happening? I checked and gdb is installed (8.1-0ubuntu3).

For a possible upstream it would be nice to have some kind of logic behind creating missionRaw items instead of filling each one separately and pushing them back.

That's why we have the mission plugin. So mission_raw will stay unsupported and "raw" while we're discussing on how to add VTOL capabilities to mission or creating a mission_vtol plugin. Also see the discussion in mavlink/MAVSDK-Proto#168.

I will check it out, thanks for pointing it out to me :+1:

Any clue why this is happening?

Yer, I see gdb is actually started for px4 instead of the test, so that doesn't help.
You can run the mavsdk tests it with gdb like this:
diff --git a/test/mavsdk_tests/process_helper.py b/test/mavsdk_tests/process_helper.py
index 826bd6d9cb..602b862579 100644
--- a/test/mavsdk_tests/process_helper.py
+++ b/test/mavsdk_tests/process_helper.py
@@ -257,6 +257,5 @@ class TestRunner(Runner):
         self.name = "mavsdk_tests"
         self.cwd = workspace_dir
         self.env = {"PATH": os.environ['PATH']}
-        self.cmd = workspace_dir + \
-            "/build/px4_sitl_default/mavsdk_tests/mavsdk_tests"
-        self.args = ["--url", mavlink_connection, case]
+        self.cmd = "gdb"
+        self.args = ["-ex", "run", "--args", workspace_dir + "/build/px4_sitl_default/mavsdk_tests/mavsdk_tests", "--url", mavlink_connection, case]

Thanks, starting the debugger worked :) Now I am stuck with this error message which I don't really know how to read. Could you have a look at it?

Ok any chance you can type bt enter to get a backtrace?

Sorry, I didn't really work with the gdb before. But here it is :D Does this make any sense to you @julianoes ?

Nice!


Firestore sync error

##BUG
While we're using the public 1 to many chat where multiple people are using the chat to communicate, there is a moment where
for some users, the chat stop syncing. The user is unable to send or receive new messages. The user has to refresh the page to be able to sync to the chat again. This often happens where there are multiple people are using the public chat. And the occurrence of this issue is not timely and rather randomly.
In our Network section of the browser developer console, we found out that at some instance, one or more GET calls are failing randomly, thus returning an error code of 400 saying "Your client has issued a malformed or illegal request. Unknown SID"
Screenshots of the issue are attached below.
Steps to reproduce
To reproduce the error you can initiate the group conversation, while keeping your network tab open to see the GET and POST calls. After some time you'll observe some calls which failed due to the error stated above. This issue persists not only in our custom project but in the Demo Chat App provided by you.
Screenshots

Device
The issue has been observed in Chrome, Edge, Firefox, Opera in mobile as well as desktop.

I'm having a hard time to reproduce.
I'm in a chat room with two users, sent 100+ messages and didn't see the error.
Do you see any error in your debug console?

I'm having a hard time to reproduce.
I'm in a chat room with two users, sent 100+ messages and didn't see the error.
Do you see any error in your debug console?

After initiating conversation, I waited between 3- 7 minutes and started observing error in the Network Console. However, debug console showed no error. It is just one of the GET call kept failing.

Like here, I started the conversation at 12:15 by sending a message, and kept my Network Console opened. After 20 minutes, the error appeared randomly. And it isn't necessary that it should appear after 20 minutes. Sometimes it takes 5 - 10 minutes and sometimes it takes more than 10 minutes for the error to appear. Which is why the appearance of the error is not consistent rather unexpected1

@hassantahir448studio are you still experiencing this problem? I'm curious as I was interested in purchasing the premium version, but i'm not so sure at the moment if this remains an unresolved issue.

@jonmalave  Well, I haven't used it that much after that. Although I applied a fix at firestore but I am not sure whether it is working or not.

@hassantahir448studio Which fix did you apply?

@antoine92190   I added db.settings({ experimentalForceLongPolling: true }) in my firebase.js file. This enabled the long polling. I haven't received any complain after implementing this fix.

@hassantahir448studio Thanks, will check that.
I just update the demo to Firebase 9, maybe the issue was fixed with this migration.
Could you check if the issue is fixed? Otherwise I will implement your fix

@hassantahir448studio Thanks, will check that. I just update the demo to Firebase 9, maybe the issue was fixed with this migration. Could you check if the issue is fixed? Otherwise I will implement your fix

Sure i will update you if the error still exists

I’m closing this as it may be fixed with Firestore 9. Please reopen otherwise.


Autostart

Well, this can't be merged as is.

DLLs need to be generated
the on_start.py script should probably be modified to actually run some tracking code

yeah... also turns out i dont have any c++ compilers on my windows machine rn :/

Closing this because we moved and i'm archiving this repository.


[addon-knobs] Knob values are not loaded from URL on initial loading

@storybook/addon-knobs 3.4.6

Hi.
It's probably a duplicate of #3042
I'm trying to load stories with specific knob values loaded from the URL parameters but the knobs are always reset to the default values, except the first one.
It can't work actually because somehow, upon page loading, setKnobs is called for each new knob.
But it's intended to be called just once with all the knobs, so in Panel.js, when the loadedFromUrl flag is still false, the values can be loaded from the URL parameters.
Or am I misunderstanding?

I can't upgrade to V4 but from what I've seen in the code and after some tests on a V4 kitchen-sink it seems this issue is sorted out.
Thanks :)


api/types: add Consistency to protobuf Mount type

This adds a consistency field to swarm task mounts which can be used to transmit information about tolerance for less-than-consistent mounts. This exposes the feature introduced in moby/moby#31047 to swarm tasks so that moby/moby#33375 can solve docker/for-mac#148.

LGTM other than the errant init_value additions that seem to have been left off a previous PR.

I've removed the unrelated output from make generate and opened #2370 for that change.


chore: breadcrumb component refactor

Refactoring the BreadCrumb component, laid out the common directory for the same
Changed separator from / to >. Also highlighted the current view in Breadcrumb
Before

After

@whynowy While refactoring, I didn't consider the case 7 from removed BreadCrumbs.tsx- line 28. I believe we don't have pods-view pages just namespace and pipeline-view are needed


SPOI-8514: MapR Example App - MapR Streams to MapR DB

@bhupeshchawda @amberarrow could you please review this?

tutorials/README.md need an entry and maprapp/README.md is missing

Can you squash the commits

I am going to merge it as it has been around for a while. @pradeepdalvi or @bhupeshchawda can you please do the following as the next change.

Change app name to something like maprstreams
Some files are missing license, please add them
Fix the test and/or README to specify the external dependencies.


prime-factors: allow empty nil slices

For this exercise, a solution that simply creates a slice with its default value fails the tests:
func Factors(n int64) []int64 {
	var factors []int64
	for i := int64(2); i <= n; i++ {
		for n%i == 0 {
			factors = append(factors, i)
			n /= i
		}
	}
	return factors
}

$ go test
--- FAIL: TestPrimeFactors (0.00s)
    prime_factors_test.go:15: FAIL no factors
        Factors(1) = []int64(nil);
        expected []int64{}
FAIL
exit status 1
FAIL    prime   0.001s

In the previous solution, changing the declaration of factors to factors :=  make([]int64, 0) will make the tests pass.
This PR makes the slice comparison not care if an empty slice is created explicitly created with make, or has its nil default value.

I understand the difference, but I don't think the difference should matter for this exercise. Your argument for wanting a non-nil empty slice is valid, but there's also the idea that in Go you should take advantage of the default value of the types. As an example, the Uber Go Style Guide is explicitly in favor of returning a nil slice instead of a non-nil slice of length 0. I'm not saying this advice should always apply, which is exactly why I think the difference should not matter for this exercise and we should not enforce a particular style.
The "right answer" will always depend on the context, and for this exercise there's not much context outside the function the student has to write. Forcing the student to return a non-nil empty slice would make more sense on an exercise where that actually matters, like the example you gave where the student would have to produce json.

Since we are in disagreement here, I asked on Slack what others think. Maybe wait for a couple of days. If there was no additional objecting feedback then, you can merge.

Personally I'm in favour of never returning nil from a function, unless it returns a *T/interface or also returns an error/bool and nil would be the zerovalue of the primary return

I'm pretty sure the "rule" is to return nil over an empty slice. There is no downside to using nil, there are some downsides to using an empty slice:

it takes more memory as it has a len and cap set, maybe even some capacity reserved
it does not work with omitempty (json tags)
...

IIRC, one of the regrets of the Go team is to not have done the same with the map (to make it work even if nil). Then we'd also be able to pass around nil maps, the same as we do with nil slices.

The main difference is:
Ther is a list of prime numbers which has zero items vs. there is no list of prime numbers.
It only depends on business logic which solution is right and the test case should not assume any underlying business logic.
Therefor the test should check correctness of the result independently of its type: It should length-check the result for 0 entries.
—-
My opinion indeed is bound to years of knowledge in dynamically typed languages, so it feels natural to me handling empty slices and nil values the same way.

But the type says []T, so we should get a []T, and not something that behaves like it most of the time…
We use a statically typed language, and not a duck-typed ruby/python here.

Guess the "nil is evil" fraction is confusing things:
A nil slice is not a nil pointer. A nil slice is a nil slice.
Implementation detail nil slice:
[]int { pointsTo: nil, cap: 0, len 0}

Implementation detail empty slice:
[]int { pointsTo: &[0]int{}, cap: 0, len 0}

So it's kinda the same thing with some single improvement: Memory that has not been allocated, has not to be maintained by the garbage collector.
In addition Rob Pike says in his "Go Proverbs" talk: Make the zero value useful.
Since Rob is 1/3 of the people who initially designed the language, we (a.k.a. "the test") should "make the zero value useful".

If the question is Should we return nil over empty slice in production code, the answer is: Yes, it is convention to return nil rather than an empty slice. That is the consensus in the Go community.
If the question is Should we allow both cases to pass the tests, then I think the answer should also be Yes. The tests should not force any student to return an empty slice over a nil (absolutely not!) and we might also not want to force the student to return nil over an empty slice, as this is more of a convention than a strict rule.

@andrerfcsantos Judging by the discussion above, the solution you proposed seems the best way forward. Feel free to merge.

@junedev I'd like to keep this open for a few more days to let the chance for other people to participate in the discussion. I didn't imagine this as being such a polarizing issue, but the discussion so far has been productive in my opinion and I want to give the chance for more people to chime in. Even though the right decision does seem to allow both options, hearing more opinions can be beneficial to give us a better understanding of the issue and on how people feel about it.
I just want to add one more thing to the discussion: in allowing the students to write both options, there's also a great opportunity for a mentor to comment on that and to show an alternative way, explaining the differences. I see this as an advantage over a student just being forced into a particular solution just to make the tests pass without really understanding why.

As usual with issues like this, I think there's the answer that we would use in "real programs", and the answer that we want Exercism students to produce. For some people, those are often very different things.
It's a pretty well-established convention in Go to return zero in the error case. For functions that return (T, error), that is, when the error is non-nil, the function should return the zero value of T. For slice types, that's nil. There's no argument about that, I'm sure. And in any case it doesn't really matter, because when we're testing a function like that, we shouldn't even assert anything about the slice value if the error is non-nil. The error is signalling, if you like, that the other value is invalid and shouldn't be used.
There's a distinct, but related question of what should happen when the operation succeeds, but there are simply no elements in the answer. For example, listing the prime factors of 3. That's a valid question to ask, it's just that the answer contains no values.
If the function is supposed to return a slice, given valid input, then it must return a slice. nil is not a slice, any more than nil is a pointer, so nil wouldn't be appropriate here. An empty slice is what we're looking for.
Now, the issue of the difference between nil and an empty slice is a tricky one for Go beginners. They can get quite confused by it, especially since they print the same. So I think it's reasonable to say this might be an opportunity to help make the difference clear to Exercism learners.
On the other hand, I can see the argument that we shouldn't knock people's confidence by failing their solution for what is, in practice, a pretty minor mistake, and one that not even all Go programmers would agree is a mistake. (I'm sure there are some people out there happily returning nil slices in the non-error case, and their programs work just fine.)
So, while I think it's worth making sure we're all clear about whether nil is a slice (it's not), I'm happy to leave the decision about what to do in this exercise to the hard-working volunteers who are actually implementing it.

nil is not a slice, any more than nil is a pointer, so nil wouldn't be appropriate here. An empty slice is what we're looking for.

Wrong. Totally and completely wrong.
nil is a totally perfect valid slice.
I repeat myself:

Implementation detail nil slice:
[]int { pointsTo: nil, cap: 0, len 0}

Implementation detail empty slice:
[]int { pointsTo: &[0]int{}, cap: 0, len 0}

If you don't like to take my word for granted, than this is perfectly finde.
But what about Fracesc Campoy's word?
Or ask the corresponding official example.
Or head over to the official Golang blog entry.
Or at least ask the specification
But maybe you simply try it for yourself in this playground I hacked together…
Whatever you do: please stop making assumptions sound like facts if they are not!

@marcofeltmann Turn the strength of your language down a notch here please. Bitfield has laid out his opinions here as he's entirely entitled to (and in fact, we definitely want his opinions!). He's clearly laid out two different ways of reasoning about this stuff (real world vs beginners, which is useful) and concluded that he doesn't have a strong enough opinion to warrant an opinion as he's not the one implementing this. His strength of wording is exactly the same as your strength of wording (He says "nil is a slice (it's not)", you say "nil is a totally perfect valid slice") - there's clearly a difference of opinion but @bitfield is not presenting himself any more forcefully than anyone else here. Please calmly explain why you disagree with the opinion stated, but please don't attack his post or anyone else's post because they disagree with you.

(Sidenote, the top three links all point to the same youtube video, and the four says that an "The value of an uninitialized slice is nil" - it doesn't say that nil is a valid slice and more than nil is a valid pointer - it uses exactly the same wording as it does for pointers - "The value of an uninitialized pointer is nil". However, I've never written a line of Go in my life and don't know what a "Slice" is, so I have no value or opinion to add on the subject).

I think for a learning environment, allowing both solutions (nil and empty slice) is the way to go as it correctly implements the function definition. Returning a "list of primes with zero items" vs "no list of primes" is effectively the same to a student, and a mentor can provide guidance on Golang best practices as they see fit.
As a student I think it's too pedantic to differentiate between the two, at least for this exercise.

I was wondering if I should go deeper into the discussion if nil is a slice or not. It seems to me that both parties here agree that we shouldn't enforce either way on the student in the tests. I propose to move on with this MR, as that seems to be something we can agree on. 😄

As for the discussion:

nil is not a slice, any more than nil is a pointer

This is absolutely correct.
In Go however we cannot have nil without a type. var1 := nil does not compile. In the current case we have the type []int64. Returning nil will make that a nil slice of int64.  Any way the Go language provides (that I of) on how to check if this is a slice or not always says: Yes, it is.
For example:
fmt.Println(reflect.TypeOf(a).Kind())
// Output: slice

Note: Yes, we can create a variable of type interface{} that seems to be just nil. But that is not the concrete case we have here. Then the function declaration would have to be func Factors(n int64) interface{},  not func Factors(n int64) []int64. Won't go into more details on this as I don't think it makes sense to argue about the interface{} case.

I'm going to merge this as I feel we reached a satisfactory conclusion and we heard both sides of the argument. Thanks to everyone who took the time to contribute to share their opinion and provide valuable feedback. If anyone feels the need to add something relevant that we might have missed here, feel free to open a new issue referencing this PR.


Add integration tests for Consumer, Producer and Streams

This is adding integration tests for running the metrics reporter in consumers, producer and streams applications.

@mimaison I don't see the tests running in azure. Is that intended from some reason?

I can see the new tests (io.strimzi.kafka.metrics.integration) running in both pipelines:

Java 11: https://dev.azure.com/cncf/strimzi/_build/results?buildId=182087&view=logs&jobId=2de397de-21fc-5e8b-587d-4865bafb3e06&j=441a6687-78c7-548e-9324-bade41cb68f6&t=cce61017-8585-548c-ef2e-c6a3bc420f66
Java 17: https://dev.azure.com/cncf/strimzi/_build/results?buildId=182087&view=logs&jobId=2de397de-21fc-5e8b-587d-4865bafb3e06&j=2de397de-21fc-5e8b-587d-4865bafb3e06&t=d9c95e40-2ff1-577f-4ff1-10fe2890ceac

Am I missing something?

I can see the new tests (io.strimzi.kafka.metrics.integration) running in both pipelines:
* Java 11: https://dev.azure.com/cncf/strimzi/_build/results?buildId=182087&view=logs&jobId=2de397de-21fc-5e8b-587d-4865bafb3e06&j=441a6687-78c7-548e-9324-bade41cb68f6&t=cce61017-8585-548c-ef2e-c6a3bc420f66

* Java 17: https://dev.azure.com/cncf/strimzi/_build/results?buildId=182087&view=logs&jobId=2de397de-21fc-5e8b-587d-4865bafb3e06&j=2de397de-21fc-5e8b-587d-4865bafb3e06&t=d9c95e40-2ff1-577f-4ff1-10fe2890ceac

Am I missing something?

ah sorry, I forgot that ctrl + f doesn't work within azp log. 🤦


enhance Firefox compatibility through additional null check for lastE…

…rror
Should improve #11

hey thanks for this enhancement :+1: . Sorry it took me so long to notice this PR.


Parse Ruby-style time zone names in addition: Fix #833

@muga @sakama Can you have a look? It fixes #833.

Thanks!


NanoVer examples/fundamentals/servers.ipynb uses "Narupa" not "NanoVer" in diagrams

There are three images in this example that explain how the NanoVer server structure works, and all of them say Narupa where they should say NanoVer. Would someone be able to remake these images to correct for this?

I think @jbarnoud said that the source files for these images no longer exist, so we probably need to do them from scratch and keep the source in the repo (or docs repo?) this time. This document is also pretty badly out of date, we don't even have an IMD service any more (interactions happen via state) so it probably needs to be completely revised.

This issue affects the diagrams in:

[ ] frame.ipynb
[ ] servers.ipynb

In terms of the architectural information, these notebooks contain most of the information, but it may be worth checking over commands_and_state.ipynb to make sure the State Synchronisation section is correct too.


Dynamic function returned wrong signature. Expected [I32] but got [I64]

Describe the bug
When compiling a wasm module with TinyGo, depending on the packages that is Imported I can either successfully call the _start() function or I get the following error:
Dynamic function returned wrong signature. Expected [I32] but got [I64]

Steps to reproduce
I've made an example of the issue available at prep/wasmer-example.
Expected behavior
I expect to successfully call _start() regardless of my imports.
Actual behavior
When my wasm module imports fmt, I get the stated error returned.
Additional context
I'm not actually sure if this is a bug in wasmer or in Go/TinyGo.
As you can see I've made dummy imports to satisfy the syscall/js package. I don't expect these having an effect on the described bug, but nonetheless wanted to mention it.

Hello,
Thank you for the detailed bug report!
tinygo has 2 WebAssembly targets: wasm and wasi. If you use the wasi target, the _start function will be compiled correctly, and everything will work as expected :-).

Hey Ivan!
You are absolutely correct. It's something I found out as well while testing over the weekend and I should have updated this ticket accordingly. However, I still managed to break it quite easily as example3.go shows in my repo. This resulting error is the same.
There is probably a relationship with reflect and interface types, as changing the err field to a string type doesn't trigger the error. I see the same problem when calling function A, that calls function B with a struct that contains an interface field.
Having said all that, I'm not sure if this is really a wasmer problem and could be more of a TinyGo problem to be honest, although I wouldn't mind hearing your thoughts on this 😉

More testing confirmed that this is indeed a TinyGo problem.

If you open a bug report on TinyGo's repository, please link to this issue, so that I can keep track of it :-). Thanks!

I won't open a bug report, because I'm not sure it's helpful at the moment. The error pops up whenever the wasm module compiled by TinyGo panics for whatever reason.
For example, if I write to a map that is nil then that's a panic and wasmer returns the Expected [I32] but got [I64] error. This is of course my fault and not the fault of wasmer or TinyGo.
Then there is the fmt.Sprintf("%#v", MyStruct{}) example where MyStruct{} has an interface field. This panics because TinyGo's reflect package is still missing some stuff. So this is not so much a bug as it is a partial implementation which I can imagine they're more than aware of 😉


ContentDialog buttons not showing

Describe the bug
When I open a content dialog, the buttons don't show up. I can still use the keyboard to dismiss or confirm, though.
Screenshots
If applicable, add screenshots to help explain your problem.

Desktop/Platform (please complete the following information):

OS: Windows 11
FluentAvalonia Version 2.1.0-preview5
Avalonia Version 11.1.0-beta1

Additional context

I'm using MvvmDialogs

I believe you need set the Button content to something. A minimal sample would be useful. Can also be an issue in the other lib used.


Update Cloud Spanner sample to match documentation.

Do you know what these errors mean?
'Project<PHONE_NUMBER>03 cannot add 1 nodes in region us-central1.'

Okay, I fixed the spanner error by deleting some instances


issue-71

Hi I updated the register-fixture-cleanup. Also, I found that in packages/chai-dom-equals/test/bdd-setup.js, we still need to do the register-cleanup. So, I add try and catch to it as well to make it safe.

oups I forgot to actually "submit" the review 🙈


Couldn't get callback from Implementation of the Facebook.ShareKit.ISharingDelegate  on Xamarin.Facebook.Ios

Hi people,
I implemented Facebook.ShareKit.ISharingDelegate interface in order to get Callback from the user sharing, In other words, if the user opens the Sharing Webview the app should know the result(DidComplete, DidFail or DidCancel). That's something like IFacebookCallback interface from Xamarin.Facebook.Android. Below, it's my code. MyShareDelegate doesn't execute any of its methods.
Thanks.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Foundation;
using MRV.AppCliente.Shared.Util.Constants;
using UIKit;
using Xamarin.Auth;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
using Facebook.ShareKit;
using Facebook.CoreKit;
using Facebook.MessengerShareKit;
using Facebook.LoginKit;
using MRV.AppCliente.Mobile.Forms.Views;

[assembly: ExportRenderer(typeof(IndicacaoPremiadaDoisPage), typeof(MRV.AppCliente.Mobile.iOS.CustomRenderers.CompartilharNoFacebookRenderer))]

namespace MRV.AppCliente.Mobile.iOS.CustomRenderers
{
    public class CompartilharNoFacebookRenderer : PageRenderer
    {
        public override void ViewDidAppear(bool animated)
        {
            base.ViewDidAppear(animated);
            IEnumerable<Account> contas = null;
            contas = AccountStore.Create().FindAccountsForService("Facebook");

            var x = "https://g1.globo.com/rj/rio-de-janeiro/noticia/jungmann-diz-que-principal-linha-de-investigacao-da-morte-de-marielle-e-envolvimento-de-milicias.ghtml";

            MessagingCenter.Subscribe<Object>(this, AppConstants.MetodosMessagingCenter.CHAMAR_COMPARTILHAR_NO_FACEBOOK_IOS, (s) =>
            {

                foreach (var conta in contas)
                {
                    AccountStore.Create().Delete(conta, "Facebook");
                }

                var content = new ShareLinkContent();
                content.SetContentUrl(NSUrl.FromString(x));

                ShareDialog shareDialog = new ShareDialog();
                shareDialog.SetDelegate(new MyShareDelegate());
                shareDialog.SetShareContent(content);
                shareDialog.FromViewController = UIApplication.SharedApplication.KeyWindow.RootViewController;

                shareDialog.Mode = ShareDialogMode.FeedWeb;

                shareDialog.Show();
            });

        }

        public override void ViewDidDisappear(bool animated)
        {
            MessagingCenter.Unsubscribe<Object>(this, AppConstants.MetodosMessagingCenter.CHAMAR_COMPARTILHAR_NO_FACEBOOK_IOS);
        }

    }

    public class MyShareDelegate : Facebook.ShareKit.ISharingDelegate
    {
        public IntPtr Handle { get; }

        public void DidComplete(Facebook.ShareKit.ISharing sharer, NSDictionary results)
        {

        }

        public void DidFail(Facebook.ShareKit.ISharing sharer, NSError error)
        {

        }

        public void DidCancel(Facebook.ShareKit.ISharing sharer)
        {

        }

        public void Dispose()
        {

        }
    }
}

I am having the same problem with the Xamarin.Facebook.IOS.  Sharing a link to Facebook works, but the ISharingDelegate callback methods never get called.  I would expect after a successful post, that the DidComplete method would get called, but none of the events ever fire.
`var content = new ShareLinkContent();
ShareDialog shareDialog = new ShareDialog();
MyShareDelegate myShareDelegate = new MyShareDelegate();
shareDialog.SetDelegate(myShareDelegate);
content.SetContentUrl(NSUrl.FromString("http://www.google.com"));
shareDialog.SetShareContent(content);
shareDialog.FromViewController = this;
shareDialog.Mode = ShareDialogMode.Automatic;
shareDialog.Show();
public class MyShareDelegate : ISharingDelegate
{
public IntPtr Handle { get; }
public void DidComplete(ISharing sharer, NSDictionary results)
{

}

public void DidFail(ISharing sharer, NSError error)
{

}

public void DidCancel(ISharing sharer)
{

}

public void Dispose()
{

}

}`

@PauloJoseBR, @lyncstreamdevlf Please, make sure that MyShareDelegate inherits from NSObject and delete the Handle property and the Dispose method, NSObject will handle that. Here's how the class must look like:
public class MyShareDelegate : NSObject, ISharingDelegate {
	public void DidComplete (ISharing sharer, NSDictionary results)
	{

	}

	public void DidFail (ISharing sharer, NSError error)
	{

	}

	public void DidCancel (ISharing sharer)
	{

	}
}

Also, you must retain an instance of the MyShareDelegate class in your ViewController class so the delegate can be called:
namespace YourNamespace.iOS {
	public class YourPageRenderer : PageRenderer, ISharingDelegate {
		MyShareDelegate myShareDelegate;

                ...

		void ShareSomething ()
		{
			...

			myShareDelegate = new MyShareDelegate ();

			var shareDialog = new ShareDialog ();
			shareDialog.SetDelegate (myShareDelegate);

			...

			shareDialog.Show ();
		}
}

If something else happens related to this, please, feel free to reopen this issue.
Best,
Israel Soto.

I opened a ticket to Microsoft and they told me that is a Facebook bug.

Hi,
I am still facing this issue, ISharingDelegatee not calling any of the callback. Is there any updates on this from facebook.
Thank you.


Retraining cat/dog imagenet.py

I'm a newbie. Who can tell me where to download imagenet.py? Thanks!

OK, I get it. It means imagenet-console and imagenet-camera and they are in the system environment.