Issue with machineImages when multiple autoscalinggroups in the same scope

I'm submitting a ...

[X] :beetle: bug report

I create 2 AutoScalingGroups in the same scope but there seems to be a conflict in the creation of the machine image id.
<path>\node_modules\@aws-cdk\core\lib\construct.js:420
            throw new Error(`There is already a Construct with name '${childName}' in ${typeName}${name.length > 0 ? ' [' + name + ']' : ''}`);
            ^

Error: There is already a Construct with name 'SsmParameterValue:/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter' in MyStack [MyStack]

Environment:

CDK CLI Version: 0.36.0
Module Version: 0.36.0
OS: Win10
Language: Typescript

Thanks for reporting.  I think the solution should be to reuse the same parameter, so it becomes a singleton essentially. Feels like we have many of those singletones... maybe we can find a way to make it easier to author them.

Thanks for reporting. I think the solution should be to reuse the same parameter, so it becomes a singleton essentially. Feels like we have many of those singletones... maybe we can find a way to make it easier to author them.

No problem - great to see cdk moving forward so quickly and happy to help in the little ways I can.
The issue is not actually the IMachineImage being created twice but it is this line: const imageConfig = props.machineImage.getImage(this);. Even if using a singleton for the IMachineImage instance, this line is executed each time an AutoScalingGroup is created so it does not help. This blocks you from using more than AutoScalingGroup in the same scope, unless you use different machine images (with different imageId).

Same here:
Error: There is already a Construct with name 'SsmParameterValue:/aws/service/ecs/optimized-ami/amazon-linux-2/recommended/image_id:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter' in EcsStack [FkEcsStack]

Can someone point me to the root cause of this issue? I cannot find any problematic code changes when looking at #3009.

@NGL321 any chance to get this fixed? Unfortunately it breaks our Stacks (huge ones) and currently there is no workaround to get this working with > 0.36

One word: Awesome!
Thank you very very much, guys. This helps me a lot!


fix: use increasing z-index for header grid cells

As for the top grid, the z-index is needed to make sure the column adjuster overlaps two cells.

:tada: This PR is included in version 2.5.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


switch_1_gang and switch_2_gang as class socket instead of light

When using the switch 1-gang or switch-2 gang behind a wall outlet to switch for instance a connected pump, it will show up as a light. It will also show up as a light in HomeKit. It would be very useful if these switches are class socket. You would be able to set the "What's plugged in?"-setting. So hereby a request to change the class in the driver.compose.json files to "socket".
PS. I already tested it by installing a modified version via CLI.

OK, changed in next release for all switches,


Include non-creatable pages in get_page_models

Second part of the cleanup for #1572 as discussed in https://github.com/torchbox/wagtail/pull/1572#issuecomment-158382266. This builds on #1950, the first part of the cleanup.
We update the PAGE_MODEL_CLASSES list (as returned by get_page_models) to include non-creatable page models such as Page itself. (Leaving these out made sense when these types were referred to as "abstract", but now our terminology has changed to "creatable" it's logical for these to be included.) This means that we can drop the special case in allowed_subpage_types that allowed all pages as children of Page; this special case was necessary because Page never appeared in the default parent_page_types list, meaning that we wouldn't be able to create children of root without jumping through hoops.
Note that this is a change of behaviour - pages with an explicit parent_page_types that does not include Page could previously be added, and now they cannot (i.e. this fixes #725). There was some debate on https://github.com/torchbox/wagtail/issues/725#issuecomment-60009672 about whether parent_page_types = [] should genuinely mean "cannot be added anywhere" or whether it should be special-cased as "can only be added at the top level" (so that we don't have to write the clunky-and-internals-exposing parent_page_types = [Page] for homepages). I've gone for the former, as it involves less "magic" (and if we decide otherwise, I reckon it's going to be cleaner to make that change on top of this one).
Besides the allowed_subpage_types logic, there are a couple of other places that use get_page_models. I've checked that these are not adversely affected by this change - in most cases, they become more logically correct by including Page (and other non-creatable types) in the list. However, this uncovered an obscure edge case (i.e. made it slightly less obscure...) in the replace_text management command, where the text replacement could end up happening multiple times on the same page. This is now fixed (and in the process, new methods exact_type and not_exact_type added on PageQuerySet).

Asside from the comment above, this looks good. A test should be added to ensure users can not create pages through the admin that would otherwise be valid, even if they are in the allowed_subpage_types setting.


Update serde and parity-multiaddr, to fix master CI

There was an incompatibility between serde and parity-multiaddr.
It appears that our CI on master somehow doesn't use our Cargo.lock, which triggers this.

bot merge

bot merge


Document generate_preset_pass_manager supports list for initial_layout

Summary
This commit updates the documentation for the
generate_preset_pass_manager() function to clearly indicate that the function will accept a integer list for the initial_layout field. This already was supported but it wasn't documented. As it's now a documented part of the API a unittest is added to ensure we don't regress this functionality in the future.
Details and comments
Fixes #11690

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
6 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.006%) to 89.282%

Files with Coverage Reduction
New Missed Lines
%

crates/qasm2/src/lex.rs
6
92.11%

Totals

Change from base Build<PHONE_NUMBER>:
-0.006%

Covered Lines:
60325

Relevant Lines:
67567

💛  - Coveralls


Refactor the legend into an ipywidgets subclass

Refactored legend into a ipywidgets subclass in map_widgets.py
Fixed incorrect argument names being passed into add_legend method in geemap.py
Changed exceptions and errors being printed into ValueErrors and TypeErrors
Added test for error cases

Note: Will be adding more tests for success cases in upcoming pull request

Co-authored-by: Qiusheng Wu<EMAIL_ADDRESS>

Resolved the conflict after merging #1717

@jgarcia525 Looks great! I have tested it and everything seems working properly. I made some minor changes to provide backward compatability.


Add  fisher's exact

Issue:
#345 (Add fisher's exact test for binary data)
What does this implement/fix ?
This adds fisher's exact test, its doc and necessary changes in the How to examples.

[x] test implementation
[x] unittests
[x] doc
[x]  examples

cc @mertbozkir

Hey @SangamSwadiK,
The test looks very good!
It is designed to work with binary data, and I have a corner case, which I believe worth supporting.
Here is the example. Imagine I have a binary feature and suddenly one of two values disappeared from the data? In this case it is still binary data, but test fails on such an input:
_fisher_test([1,0,1,0,1], [0,0,0,0,0], feature_type='cat', threshold=0.1)

ValueError                                Traceback (most recent call last)
Input In [40], in <cell line: 1>()
----> 1 _fisher_test([1,0,1,0,1], [0,0,0,0,0], feature_type='cat', threshold=0.1)

Input In [34], in _fisher_test(reference_data, current_data, feature_type, threshold)
      4 """Calculate the p-value of Fisher's exact test between two arrays
      5 Args:
      6     reference_data: reference data
   (...)
     12     test_result: whether the drift is detected
     13 """
     15 contingency_matrix = pd.crosstab(reference_data, current_data)
---> 17 _, p_value = fisher_exact(contingency_matrix)
     19 return p_value, p_value < threshold

File /opt/homebrew/Caskroom/miniconda/base/envs/evidently53/lib/python3.9/site-packages/scipy/stats/_stats_py.py:4278, in fisher_exact(table, alternative)
   4276 c = np.asarray(table, dtype=np.int64)
   4277 if not c.shape == (2, 2):
-> 4278     raise ValueError("The input `table` must be of shape (2, 2).")
   4280 if np.any(c < 0):
   4281     raise ValueError("All values in `table` must be nonnegative.")

ValueError: The input `table` must be of shape (2, 2).

Could you please take a look and support this scenario?
I also suggest to raise a ValueError that will appear if you have more than 2 unique values in the input data and explicitly tell the user that the test should be applied to the binary data only. I think it might be more straightforward comparing to ValueError: The input `table` must be of shape (2, 2). What do you think?

Hi @SangamSwadiK,
Thank you so much for changes you made!
I like a lot how you implemented exact test, and especially your approach for testing not only stattest function but utils as well.
I have a question about corner cases we discussed before.
Here is my example:
_fisher_exact_stattest(pd.Series(["a","a","a","a","a","a","a","a","a","a"]),
                       pd.Series(["b","b","b","b","b","b","b","b","b","b"]), feature_type='cat', threshold=0.1)
(1.0, False)

I see that there are no fails, which is great! But I'm a little surprised that we do not detect a drift here.
What do you think?

Hi @SangamSwadiK,
I have a suggestion how to act on it.
Indeed the test itself will not compute in case we have only 1 category in reference, and 1 (different) category in current.
However this might indeed happen in practice when you deal with binary features. From the user standpoint, when this happens, it is something you want to know about. If all values are different between reference and current, we can safely assume that the feature has drifted.
I would suggest to implement this case separately. Instead of returning the value error, we can return the “drift detected” outcome when all values are different (without actually computing the statistical test).

I am also labelling the issues as HF-accepted to acknowledge all the work done!

Hi @SangamSwadiK ,
I checked the latest version and I like it a lot!
"I didn't write them explicitly because the p-values vary a lot with different lengths of both reference and current even though they are flipped entirely" - I agree with your approach. I think it is better to return p-value here, it might be useful for something like drift size comparison, when users need to order features by drift size and act on top of this order.
Thank you a lot for your contribution! I'm happy to merge 🥳

@elenasamuylova this is a very nice example of how pytests should be implemented.


fully integrate nil/:null/:false

Currently cl-rethinkdb uses nil to denote a json null, and requires #() for an empty array.
It would make sense to change the behavior such that

cl :null -> js null
cl :false -> js false
cl nil or #() -> js []

I'd like to configure this under a boolean flag called *json-specific-keywords* (nil by default to preserve backwards compatibility).

Sounds great!! Thanks! :)


Add example code of 'options' to FormSelect

This PR will conflict with #174

Looks good, thanks @kuy


Having a "Error 505" when trying to install PHPVMS

Hey there,
I recently downloaded PHPVMS 7 (Beta, Alpha 1 &2 and Master) and every time I try to install it, I get an error 500. I tried switching web hosting providers like 000webhost, InfinityFree and x10hosting and I keep getting the same issues.
At first, when I tried installing via 000webhost I got a putenv error, so I switched hostings to Infinity, which is where the problem began. i deleted .htaccess from the root, no luck. Getting the same error again, so I switched to x10hosting, still. I decided to go back to 000webhost to see if it worked, yet I got a error 505.
To make things more simple, no install page is shown, it's just given me.

"(url)
is currently unable to handle this request.
HTTP ERROR 500"

Checking the logs, it was an internal server? As I said, I had to change hosts so many times.

Are these all free hosts?

From: ham<EMAIL_ADDRESS>Sent: Sunday, May 5, 2019 5:58:33 AM
To: nabeelio/phpvms
Cc: Subscribed
Subject: [nabeelio/phpvms] Having a "Error 505" when trying to install PHPVMS (#302)
Hey there,
I recently downloaded PHPVMS 7 (Beta, Alpha 1 &2 and Master) and every time I try to install it, I get an error 500. I tried switching web hosting providers like 000webhost, InfinityFree and x10hosting and I keep getting the same issues.
At first, when I tried installing via 000webhost I got a putenv error, so I switched hostings to Infinity, which is where the problem began. i deleted .htaccess from the root, no luck. Getting the same error again, so I switched to x10hosting, still. I decided to go back to 000webhost to see if it worked, yet I got a error 505.
To make things more simple, no install page is shown, it's just given me.
"(url)
is currently unable to handle this request.
HTTP ERROR 500"
Checking the logs, it was an internal server? As I said, I had to change hosts so many times.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com/nabeelio/phpvms/issues/302, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAAYLGEOK2QX32R5KFS3JMTPT24VTANCNFSM4HK27GYA.

Yeah, now I've tried 1&1 IONOS hosting which is a payware hosting and doing an FTP from v7, I thought it'd work after it'd shown the "phpVMS Not Installed", clicking on the green button to install, it's given me this:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

Any ideas?

Are these all free hosts?
…
________________________________ From: ham<EMAIL_ADDRESS>Sent: Sunday, May 5, 2019 5:58:33 AM To: nabeelio/phpvms Cc: Subscribed Subject: [nabeelio/phpvms] Having a "Error 505" when trying to install PHPVMS (#302) Hey there, I recently downloaded PHPVMS 7 (Beta, Alpha 1 &2 and Master) and every time I try to install it, I get an error 500. I tried switching web hosting providers like 000webhost, InfinityFree and x10hosting and I keep getting the same issues. At first, when I tried installing via 000webhost I got a putenv error, so I switched hostings to Infinity, which is where the problem began. i deleted .htaccess from the root, no luck. Getting the same error again, so I switched to x10hosting, still. I decided to go back to 000webhost to see if it worked, yet I got a error 505. To make things more simple, no install page is shown, it's just given me. "(url) is currently unable to handle this request. HTTP ERROR 500" Checking the logs, it was an internal server? As I said, I had to change hosts so many times. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub<#302>, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAAYLGEOK2QX32R5KFS3JMTPT24VTANCNFSM4HK27GYA.

Yeah, now I've tried 1&1 IONOS hosting which is a payware hosting and doing an FTP from v7, I thought it'd work after it'd shown the "phpVMS Not Installed", clicking on the green button to install, it's given me this:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

Any ideas?

Without seeing any kind of logs, it's impossible to tell. Are there error log files anywhere? Usually they get placed in the home directory.

Without seeing any kind of logs, it's impossible to tell. Are there error log files anywhere? Usually they get placed in the home directory.

It's fine now, after transferring to 1&1 IONOS, I had them contact me about the 500 error, apparently, it's their side. It's all fixed now, all I need to do is update PHPVMS 7!
Thanks for your time, I do apologise for the time wasted too.

No problem, it's good to know. With 7 not released yet, it's good to know if there are actual compatibility issues with different hosts. Can you ask them what exactly the problem was?

Using the dev version, my host said it was something to do with the
.htaccess files. Alpha 1 & 2 wasn't working at all, they couldn't figure
out why the entire website wasn't working.

No logs were presented, I've checked.
On Wed, May 8, 2019 at 12:36 PM Nabeel Shahzad<EMAIL_ADDRESS>wrote:

Ok, it would help to have some logs, etc around it. They should be able to
get those. I'm worried about it not working properly on some hosts.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/nabeelio/phpvms/issues/302#issuecomment-490451958,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIB2UV24C4XPOS6Z7W454SDPUK3LJANCNFSM4HK27GYA
.

Ok, damn. I'll close it out for now but keep the label on it so it'll show up in my list later on


Error on translating booleans

Hi,
First of all, I'm not sure if this is a bug on your part, so I apologize in advance if it isn't.
I was trying to translate a boolean field, but although the value is recorded correctly, when Symfony tries to retrieve the value, it throws me a TransformationFailedException when trying to do this:
BooleanToStringTransformer->transform ('1')
Boolean/checkbox fields work different in forms, so I think it is necessary to cast the value before passing it to the form.
Thanks in advance.

I am not sure if this is an issue on this bundle. I have translated many booleans with success without requiring this change. Since this is 4 years old and there are no more request on this PR, I will close it.
If you feel this PR is still needed, ping me to reopen.
Thank you


Copy of Encapsulate database tables in their own schema

Let's move the database tables out of the public schema and encapsulate them in their own schema. We can call the schema erc for now & change it if later we decide something else makes more sense before we go to prod.
Todo:

[ ] add an initial migration to create a schema for the database tables
[ ] apply that schema to all tables in the registration database

duplicate of #181


Unresolved reference when accessing struct fields

Is there any way to access struct fields ?
Rust
struct A{
data: String,
}

Kotlin
var a = A()
println(a.data) //unresolved reference: data

@imerkle
you need getter:
struct A{
  data: String,
}

foreigner_class!(class A {
  self_type A;
  fn getData(&self) -> &str {
    &this.data
  }
});

Hey, maybe there is already some option to generate getter/setter automatically? Or to expose public struct members?

Hey, maybe there is already some option to generate getter/setter automatically?

There are a lot of crates for this. So I leave it out of scope of this project.
I personally used:
https://github.com/Hoverbear/getset
https://github.com/yangby-cryptape/rust-property


Add test log support to runtime2/testing.

Adding stable test event log support to aid with writing event
based tests using a baseline model.
Also apply the model in some of the existing tests.

/lgtm

@ozevren: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/e2e-smoke.sh
b7ab95aabf78ba22d3a8573a076dac6d9371fd93
link
/test e2e-smoke

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/test e2e-smoke


⚠ Bofrost.fr has degraded performance

In 1c036ec, Bofrost.fr (https://www.bofrost.fr) experienced degraded performance:

HTTP code: 200
Response time: 1081 ms

Resolved: Bofrost.fr performance has improved in 97905e1 after 7 minutes.


Metadata don't work

I'm using this module and it works, it show player controls in https://github.com/azdyb/gnome-shell-extension-mpriscontrol and events are working but i can't send any metadata. I tried to update to node-dbus to 1.0.0 version following this https://github.com/Shouqun/node-dbus/blob/master/MIGRATING.md but it still failing.
How can i do for solve this?
This isn't problem of gnome shell because it works with other players. I tried in ubuntu 16.04 and ubuntu gnome 16.04 and linux mint without any successful result.

i can't send any metadata

What do you mean?
If possible, provide your source code and describe what happens and what is expected to happen.

For example when i use examples/player.js i see this in status bar

Events work great but i don't see any metadata info as title for example. But when i use other player i see metadata correctly so insn't problem of status bar

I think that is a problem of the way that dbus send metadata, but its only an suspicion but i didn't found any evidence of this.

You shouldn't rely on the example because the art URL used is not working anymore and there's an error on the artist metadata.
Try again the example, and replace:

'mpris:artUrl': https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/Adele_2016.jpg/800px-Adele_2016.jpg
'xesam:artist': ['Adele']

Notice that the 'xesam:artist' is an array an not a string. Try both of this and the example should work.

I'm pretty sure this should work now with the dbus-next update.

Yeah. I'm going to close this as the code has completely changed. Feel free to re-open if you can still reproduce.


Remove empty "Diagram(graphics)" annotations

Reported by dietmarw on 17 Feb 2010 12:47 UTC
The MSL currently contains empty "Diagram(graphics)" annotations. These have no function whatsoever and should be removed.

Migrated-From: https://trac.modelica.org/Modelica/ticket/292

Comment by dietmarw on 17 Feb 2010 13:04 UTC
All empty annotations removed in 761a7c121303a9bd86c2b3785f683bda41399ce0.

Comment by adrpo on 2 Nov 2010 15:30 UTC
This is still present in MSL 3.2, see for example StateGraph.mo, line 3266.
Diagram(coordinateSystem(preserveAspectRatio=true,
              extent={{-100,-100},{100,100}}),
                                    graphics)

Modified by dietmarw on 2 Nov 2010 15:33 UTC

Comment by dietmarw on 22 Feb 2011 15:14 UTC
Adrian, could you check once more if I hit all the empty graphics annotations in 84ab542fbecded0707eaec4846f6a22daec5864d : e2e461d269b025cc505c2479b9d5b6acb1f9af56?

Comment by ahaumer on 9 Jun 2011 06:09 UTC
84ab542fbecded0707eaec4846f6a22daec5864d : e2e461d269b025cc505c2479b9d5b6acb1f9af56 broke the documentation and icon layer of a lot of models, e.g. Modelica.Electrical.Machines.Sensors.VoltageQuasiRMSSensor, Modelica.Mechanics.Rotational.Sources.LinearSpeedDependentTorque.
Please fix that "fix".

Comment by ahaumer on 9 Jun 2011 06:49 UTC
The problem is that wrong annotations (caused by wrong placed parentheses due to wrong removing empty graphics annotations) are ignored by a tool. Unfortunately a lot of changes have been made since e2e461d269b025cc505c2479b9d5b6acb1f9af56 : e2e461d269b025cc505c2479b9d5b6acb1f9af56. Don't know which parts of the MSL are affected; regarding the parts for which I am library officer no changes have been made since 84ab542fbecded0707eaec4846f6a22daec5864d : e2e461d269b025cc505c2479b9d5b6acb1f9af56. I'd suggest to replace the trunk versions by the maintenance 3.2 versions for: Modelica.Electrical.(Machines, MultiPhase, QuasiStationary), Modelica.Magnetic.Fundamentalwave, Modelica.Mechanics.(Rotational, Translational), Modelica.Thermal.(FluidHeatFlow, HeatTransfer). Then either I'd ignore the empty graphics annotations (they are ugly but not harmful) or start a new try to remove them ...

Comment by dietmarw on 9 Jun 2011 08:38 UTC
Yes you are right. The matching parenthesis were incorrectly placed after cleaning up the empty graphics annotation. But there is no need for drastic measures as replacing trunk by the maintenance version. The error can be corrected easily (this is what we have version control for any way ;) ) and there is also good time to do so (we are not even near a beta release AFAIK). The trunk does not have to be "stable" at all times unless we are close to a release.

Comment by ahaumer on 15 Jun 2011 07:32 UTC
I would be grateful for a quick fix at least for Modelica.Electrical.Machines and Modelica.Magnetic.FundamentalWave since I should work on 2 tickets dealing with Machines.

Comment by dietmarw on 15 Jun 2011 16:06 UTC
Toni, it should be safe to work on those tickets since I don't think you are going to touch the icons of the models.

Comment by dietmarw on 25 Jun 2011 12:26 UTC
4445302d188d7dee9e322a178c4b6a000cfcc0bb fixed the errors which occurred due to misplaced parenthesis (introduced in 84ab542fbecded0707eaec4846f6a22daec5864d : e2e461d269b025cc505c2479b9d5b6acb1f9af56).

Comment by ahaumer on 27 Jun 2011 06:27 UTC
Mybe some of the misplaced parenthesis are corrected - by far not all, e.g.
Modelica.Electrical.Machines.Components.PartialAirGap
Modelica.Electrical.Machines.Components.AirGapS
Modelica.Electrical.Machines.Components.AirGapR
Modelica.Electrical.Machines.Components.SquirrelCage
Modelica.Electrical.Machines.Components.DamperCage
Modelica.Electrical.Machines.Components.ElectricalExcitation
Modelica.Electrical.Machines.Components.PermanentMagnet
and many more - I don't want to check every single model for missing icon and/or documentation;
I don't think this problem is only present in Electrical.Machines.
I really doubt it is safe to do further bug fixes on messed up models.
How shall we proceed?

Comment by dietmarw on 27 Jun 2011 07:20 UTC
Are you sure you updated to the latest revision of trunk. I just double checked and it looks perfectly fine to me. What are you missing?
BTW I think you mean the classes:
Modelica.Electrical.Machines.BasicMachines.Components right?

Comment by ahaumer on 27 Jun 2011 07:55 UTC
It seems that a svn - update didn't work properly before.
Now it looks ok.
Sorry for the inconvenience.
Toni

Comment by dietmarw on 27 Jun 2011 12:33 UTC
Some more found (thanks to Toni) and fixed in 8ae903717121f7689a300c0c9d66e2eee3820845

Comment by dietmarw on 29 Jun 2011 10:48 UTC
Actually when removing an empty graphics attribute from a "Diagram" or "Icon" annotation the annotation itself should be removed itself. The only other information left in  such annotarion is the coordinateSystem argument and that's pretty useless without graphical information present.
So to make this clean all "Icon" and "Diagram" annotations that don't contain a (valid) graphics= definition   should be removed entirely. Doing this by hand is actually to cumbersome but any Modelica tool with a graphical editor should have such a built-in clean up routine when writing out Modelica code.

Comment by hansolsson on 29 Jun 2011 12:25 UTC
Note that:

To ensure that no-one is does too much: such annotations are syntactically legal, thus automatically removing any annotations without contents could incorrectly modify models.
The coordinateSystem is not only used for graphical primitives but also for graphical components (e.g. connectors) in the same layer - that makes it more complex to check. And users would still be surprised if they did set the coordinateSystem and it was removed "since there was nothing drawn".

Comment by dietmarw on 29 Jun 2011 13:43 UTC
For your first point I simply don't understand what you want to say there. Could you elaborate?
For the second point, according to the Specifications in 17.5, "Diagram" and "Icon" are defined as:
Layer descriptions (start of syntactic description):
icon_layer :
"Icon" "(" [ coordsys_specification "," ] graphics ")"
diagram_layer :
"Diagram" "(" [ coordsys_specification "," ] graphics ")"

It further says:
The graphics is specified as an ordered sequence of graphical primitives, which are described below.
As I understand this having just an empty graphics component is actually illegal right? In the same way it is currently illegal to have a coordsys_specification only (which actually forbids to define a coordinate system only without actually placing any content on the diagram).
Changing the specification so that graphics is optional would solve this. However it is and should always stay forbidden to write out code like:
annotation(Diagram(graphics)); // empty graphics

or
annotation(Diagram(coordinateSystem(extent={{-100,-100}, {100,100}}),
                   graphics)); // empty graphics

or
annotation(Diagram(coordinateSystem, // empty coordinateSystem
                   graphics={Rectangle(extent={{-100,-100}, {100,100}})}));

Comment by hansolsson on 29 Jun 2011 15:21 UTC
For the first item I meant that
annotation(NameOfSomeAnnotation)
is legal (since some time ago) - and I just wanted to ensure that no-one by accident removed those.
As for the contents of 17.5: We have had many issues with those sub-grammars in the specification since it is hard to describe some things with grammars (e.g. only one graphics-entry).
E.g. that grammar also makes the following illegal:
annotation(Diagram(graphics={Rectangle(extent={{-68,56},{-26,16}})},             coordinateSystem(extent={{-100,-100}, {100,100}})));
since it requires the optional coordinateSystem to preceed the graphics.
That looks like an unintentional consequence of trying to describe the annotation-structure using a grammar.
Your question: "As I understand this having just an empty graphics component is actually illegal right?" does not have a clear answer as I see it and I believe the specification should be made clearer.
One could argue that "Diagram(graphics)" is a way of specifying an empty ordered sequence; alternatively a way of keeping the default graphics (which also happens to be empty) - similarly as a modifier.

Comment by dietmarw on 5 Jul 2011 11:18 UTC
Mind, not having(and generating) annotations that don't do anything should also be in the interest of the tool vendors since it will also improve the time it takes to parse the library upon load.

Comment by dietmarw on 10 May 2012 14:57 UTC
All Icon and Diagram annotations which contain empty or no graphics parts have been removed in ffbcd7378b619210bec7cb2e83e84a47e2ec8c3c and in addition some other obsolete annotation garbage left behind by Dymola has been removed in d865760801b3a44302ebe937c16b65f6ebc5a5aa.

Comment by dietmarw on 10 May 2012 15:44 UTC
Actually, leave this open and rerun the cleaning script just before the release to have clean tag and zip versions.

Comment by anonymous on 26 Sep 2012 12:41 UTC
ea3eedc5b6527e8cc012eaa71f0ae1b740347ac4 again contains lots of empty Diagram(graphics) and Icon(graphics) annotations.

Comment by dietmarw on 26 Sep 2012 13:34 UTC
As already mentioned in comment:21 this is gonna get cleaned up right before release since any changes until then will very likely add those silly annotations again.

Changelog removed by dietmarw on 26 Sep 2012 13:34 UTC

Comment by dietmarw on 27 May 2013 14:06 UTC
Also remove: grid={...} annotations.

Comment by dietmarw on 18 Jul 2013 13:21 UTC
Annotations were cleaned up in 6350b4b7c6f46e1000da31704ff973ac33993496 : cc74eb3d41b4dd73b752997de8e339ae4244805d.
We might need a new ticket for new dummy annotations that might find its way into the code-base. But that should then be scheduled for a future release.


Current setup for docker-compose does not function correctly with AzureAd turned on

Describe the bug
When enabling AzureAd and filling in the required configuration values, External Login goes to AAD login pages, completes authentication, then when returning to complete logging into the STS app, the page simply goes to the login page again. (https://sts.skoruba.local/Account/Login)  The AAD cookie is present so clicking on the OpenIdConnect button over and over causes the app to continuously return to the https://sts.skoruba.local/Account/Login page without requiring further AAD authentication steps.
Local logins work as expected.
To Reproduce

Get latest template - dotnet new -i Skoruba.IdentityServer4.Admin.Templates::2.0.1
Create solution using latest template - dotnet new skoruba.is4admin --name MyProject --title MyProject --adminemail<EMAIL_ADDRESS>--adminpassword "Pa$$word123" --adminrole MyRole --adminclientid MyClientId --adminclientsecret MyClientSecret --dockersupport true
Make certs as per https://github.com/skoruba/IdentityServer4.Admin#mkcert
Create DNS entries (hosts file or PiHole)
Configure AAD in appsettings.json as per https://github.com/skoruba/IdentityServer4.Admin#how-to-configure-an-external-provider-in-sts
Run docker-compose as per https://github.com/skoruba/IdentityServer4.Admin#run-docker-compose
Browse to https://sts.skoruba.local and login via OpenIdConnect option
Complete AAD login to return to STS page.

Relevant parts of the log file
Watching log file, there are no errors/warnings. Setting a break-point at ~ln 384 of AccountController.cs shows that var info = await _signInManager.GetExternalLoginInfoAsync(); returns null for an unknown reason.

Looking in Fiddler at a version of Skoruba that works (pre-v1 instance)

and the v2 instance

I don't understand why the cookies are different. Both are pointing at the same AAD instance.

I've made this work, but I suspect there is a better way.
I noticed that the fist call after Account/ExternalLogin? was different between the two sites. The current v2 of Skoruba called:

but the previous version called...

Switching off  "UseAzureAdProvider": false, and inserting
            var authenticationBuilder = services.AddAuthentication()
                .AddOpenIdConnect("OpenIdConnect", "Login with Azure AD (O365)", options =>
            {
                options.Authority = $"https://login.microsoftonline.com/common";
                options.TokenValidationParameters =
                    new TokenValidationParameters { ValidateIssuer = false };
                options.ClientId = "<snipped>";
                options.ClientSecret = "<snipped>";
                options.CallbackPath = "/signin-oidc";
                options.Scope.Add("user:email");
            });

Resolved the problem with being unable to log into the STS.

I solved by following the advice from Microsoft Identity Web library, with the latest version to make Identity with AzureAAD or any other Microsoft Identity protected auth system, you need to set cookieScheme parameter to null:
if (externalProviderConfiguration.UseAzureAdProvider)
            {
                authenticationBuilder.AddMicrosoftIdentityWebApp(options =>
                {
                    options.ClientSecret = externalProviderConfiguration.AzureAdSecret;
                    options.ClientId = externalProviderConfiguration.AzureAdClientId;
                    options.TenantId = externalProviderConfiguration.AzureAdTenantId;
                    options.Instance = externalProviderConfiguration.AzureInstance;
                    options.Domain = externalProviderConfiguration.AzureDomain;
                    options.CallbackPath = externalProviderConfiguration.AzureAdCallbackPath;
                },  cookieScheme: null);
            }

Thanks for reporting this and for PR as well. 👍


ecfg panics on certain contracts

I noticed that ecfg fails on most of the nontrivial contracts that I tried.
Here is an example, contact. AFAIR is just trivial "get uint from slot - put uint to slot" contract compiled with solidity  (opt enabled).
Bytecode
0x6080604052348015600f57600080fd5b506004361060325760003560e01c8063b2010978146037578063cfae3217146049575b600080fd5b60476042366004605e565b600055565b005b60005460405190815260200160405180910390f35b600060208284031215606e578081fd5b503591905056fea2646970667358221220158feba571c05db2dfbfcf6d4bfd06d8ff6d697ef52c8e1fbba805a33a17720764736f6c63430008040033

Result of ecfg run
$ RUST_BACKTRACE=1 ./target/release/ecfg -x code.txt
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `4`,
 right: `0`', etk-dasm/src/blocks/annotated.rs:172:13
stack backtrace:
   0: rust_begin_unwind
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:584:5
   1: core::panicking::panic_fmt
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/panicking.rs:143:14
   2: core::panicking::assert_failed_inner
   3: core::panicking::assert_failed
   4: etk_dasm::blocks::annotated::AnnotatedBlock::annotate
   5: etk_analyze::cfg::ControlFlowGraph::new
   6: ecfg::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Naive cfg picture
Maybe this could be useful for anyone debugging this. Here is a "naive cfg" of this contract. Each block is symbolically executed on its own: if jump location is static—nodes are connected on the graph, if jump location comes from the stack—I draw (borrowed n)  that means that this block ends with a jump to stack[-n] value at the beginning of the block, where stack[-1] is top.
I wonder if panics occurs precisely because of this kind of cfg nodes that jump to non-static locations—precisely nodes "6e" and "42".

It looks like this is caused by the bytes after the invalid instruction. I haven't looked into why yet, but if you remove that, ecfg generates a graph:

I'm actually working on some upgrades (extremely slowly) for ecfg that should get much better results.

Thanks for the response and a picture! I think I understand now.
It looks like ecfg's "cfg node splitting algorithm" differs from what I used. Basically, on the first linear scan of the bytecode I lump everything after invalid instruction but before valid jumpdest into one cfg node, while ecfg probably sees invalid instruction as a termination of one particular block and starts the next block from the next instruction.
example: // reminder: "fe" is invalid opcode
ecfg -c "0xfefe" will show 2 nodes (one with offset 0, another one with offset 1)
As a sidenote:
These nodes with non-static jumps make a graph really messed up! Even for such a small contract, they attach themselves to so many places, even when solver was able to prune some possible jumps.

ecfg probably sees invalid instruction as a termination of one particular block and starts the next block from the next instruction.

Yep, that's correct.

These nodes with non-static jumps make a graph really messed up! Even for such a small contract, they attach themselves to so many places, even when solver was able to prune some possible jumps.

This is the biggest problem with ecfg's current approach. If the jump destination comes from the stack before a block (or god forbid memory, calldata, or storage), it can't prune most of the edges.
My original plan was to do a second pass over the blocks, executing from the first block and figuring out what the possible inputs to each block are, but I've mostly scrapped that and have a symbolic evm branch instead.


Slick carousel in two rows left to right

I need to make a two lines carousel with left to right order (also responsive).

I have used below code but it is not working
$('.carousel').slick({
dots: true,
slidesPerRow: 3,
rows: 2,
responsive: [
{
breakpoint: 478,
settings: {
slidesPerRow: 1,
rows: 1,
}
}
]
});

the jquery library is https://github.com/kenwheeler/slick/
this repo is for react.

@akiran can probably close this

How can I fill the empty rows with the first images @blairanderson ?

Use google and stack-overflow

On Feb 10, 2019, at 5:50 PM, Tumbler Monkey Group<EMAIL_ADDRESS>wrote:
How can I fill the empty rows with the first images @blairanderson ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.


Why does scipy.stats.ncx2.cdf return nan if noncentrality parameter is zero?

 A non-centrality parameter of zero yields a perfectly well-defined (central) chi-squared distribution, so why not just return a value? I.e., implement internally the test that I currently have to perform:
c = ncx2.cdf(x, df, nonCent) if nonCent > 0 else chi2.cdf(x, df)

@rhstanton, thanks for reporting this.
I agree, ncx2 should handle nc=0.

Duplicate of https://github.com/scipy/scipy/issues/5441

Fixed by https://github.com/numpy/numpy/pull/6613 (also a duplicate)


GetOverallNetworkHealthResponseHealthDistirubution.healthDistirubution.goodPercentage needs to be float

When running the Client.Topology.GetOverallNetworkHealth function the following error is returned:
json: cannot unmarshal number 86.988846 into Go struct field GetOverallNetworkHealthResponseHealthDistirubution.healthDistirubution.goodPercentage of type int
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x60 pc=0x65dd5b]
The JSON returned by the API request contains floats in the percentage fields. I will submit a PR to modify the field. There is also a typo in Distirubution, but it is that way in the DNAC API, so probably not much use fixing it here.
Here is the json response of the /dna/intent/api/v1/network-health api call:
{
    "version": "1.0",
    "response": [
        {
            "time": "2021-11-01T15:10:00.000+0000",
            "healthScore": 89,
            "totalCount": 310,
            "goodCount": 276,
            "noHealthCount": 1,
            "fairCount": 33,
            "badCount": 0,
            "entity": null,
            "timeinMillis":<PHONE_NUMBER>000
        }
    ],
    "measuredBy": "global",
    "latestMeasuredByEntity": null,
    "latestHealthScore": 89,
    "monitoredDevices": 309,
    "monitoredHealthyDevices": 276,
    "monitoredUnHealthyDevices": 33,
    "noHealthDevices": 1,
    "healthDistirubution": [
        {
            "category": "Core",
            "totalCount": 1,
            "healthScore": 100,
            "goodPercentage": 100,
            "badPercentage": 0,
            "fairPercentage": 0,
            "noHealthPercentage": 0,
            "goodCount": 1,
            "badCount": 0,
            "fairCount": 0,
            "noHealthCount": 0
        },
        {
            "category": "Access",
            "totalCount": 30,
            "healthScore": 100,
            "goodPercentage": 100,
            "badPercentage": 0,
            "fairPercentage": 0,
            "noHealthPercentage": 0,
            "goodCount": 30,
            "badCount": 0,
            "fairCount": 0,
            "noHealthCount": 0
        },
        {
            "category": "Distribution",
            "totalCount": 5,
            "healthScore": 100,
            "goodPercentage": 100,
            "badPercentage": 0,
            "fairPercentage": 0,
            "noHealthPercentage": 0,
            "goodCount": 5,
            "badCount": 0,
            "fairCount": 0,
            "noHealthCount": 0
        },
        {
            "category": "Router",
            "totalCount": 4,
            "healthScore": 100,
            "goodPercentage": 100,
            "badPercentage": 0,
            "fairPercentage": 0,
            "noHealthPercentage": 0,
            "goodCount": 4,
            "badCount": 0,
            "fairCount": 0,
            "noHealthCount": 0
        },
        {
            "category": "WLC",
            "totalCount": 1,
            "healthScore": 100,
            "goodPercentage": 100,
            "badPercentage": 0,
            "fairPercentage": 0,
            "noHealthPercentage": 0,
            "goodCount": 1,
            "badCount": 0,
            "fairCount": 0,
            "noHealthCount": 0
        },
        {
            "category": "AP",
            "totalCount": 269,
            "healthScore": 87,
            "goodPercentage": 87.360596,
            "badPercentage": 0,
            "fairPercentage": 12.267658,
            "noHealthPercentage": 0.37174723,
            "goodCount": 235,
            "badCount": 0,
            "fairCount": 33,
            "noHealthCount": 1,
            "kpiMetrics": [
                {
                    "key": "INTERFERENCE",
                    "value": "FAIR"
                },
                {
                    "key": "UTILIZATION",
                    "value": "FAIR"
                },
                {
                    "key": "NOISE",
                    "value": "FAIR"
                }
            ]
        }
    ]
}

Thanks, @jeremypng, for reporting the issue and your contribution.


🐛 Update spacing in Popover

Resolves #2517

"A quick search for :last-child or :first-child shows this is repeated multiple places so every case should be checked and corrected according to design"

"A quick search for :last-child or :first-child shows this is repeated multiple places so every case should be checked and corrected according to design"

New issue for it #2525

That just looks like a duplicate of this parent issue but without any of the description

After testing this and old solution, I have to ask myself, was this css really wrong? When content/actions is last/first then it has the correct padding, which is maybe the intended behaviour.

After testing this and old solution, I have to ask myself, was this css really wrong? When content/actions is last/first then it has the correct padding, which is maybe the intended behaviour.

Actually you are correct 😂! I assumed first/last child was meant to refer to the children of the components, but it is actually meant to target the element itself when it is last/first.

@martalalik so essentially the only thing that needed to be fixed was overflow hidden, the last/first child stuff is there so padding only comes from the subcomponents in case people want to do their own thing inside popover, but I misunderstood what the selector was supposed to target. So you can either close this pr and make a new one to just fix overflow hidden,  or revert everything except overflow: hidden in this branch


High clustering of hash function

I've noticed that the dictionary has an unusually high rate of resizes even when the load factor is still in mid 50 - 55%.
Digging deeper, I found that the mixing algorithm used in the implementation is to blame:
        protected static int ReduceHashToIndex(int fullHash, int lenMask)
        {
            var h = (uint)fullHash;

            // xor-shift some upper bits down, in case if variations are mostly in high bits
            // and scatter the bits a little to break up clusters if hashes are periodic (like 42, 43, 44, ...)
            // long clusters can cause long reprobes. small clusters are ok though.
            h = h ^ h >> 15;
            h = h ^ h >> 8;
            h = h + (h >> 3) *<PHONE_NUMBER>u;

            return (int)h & lenMask;
        }

I've attached two screenshots of GLSL shaders using the hash functions. The first screenshot is the original Wang/Jenkins hash method used by Dr. Cliff Click.

The second screenshot is the hash used by the C# implementation:

As you can clearly see, there is a lot of clustering and, as a result, erroneous resizing even moderately empty tables.

@ENikS Are you planning to contribute the change to this? If not, I was thinking about looking into this too :)

@neon-sunset
I can add the code to my PR if the author has no objections. I personally like lowbias32 which performs consistently well according to this

Hmm, I was thinking along the lines of matching the hashing behavior to what standard libraryConcurrentDictionary<K, V> does first and then evaluating general and resizing perf. characteristics. Arguably, you're more qualified on this topic but it might be a good start?
References:

https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/Collections/HashHelpers.cs
https://github.com/dotnet/runtime/blob/main/src/libraries/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentDictionary.cs#L251
https://github.com/dotnet/runtime/blob/main/src/libraries/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentDictionary.cs#L2222

The method you are referencing uses prime-sized arrays and MOD to calc buckets. Normally it is less sensitive to inconsistent hashing but slower than the power of two tables.  With FastMod it might be different though.
I would be interested to see benchmarks

I've run a few benchmarks with lowbias32 and found that better hashing indeed improves performance. These are the results for single-threaded Add

BenchmarkDotNet=v0.13.5, OS=Windows 11 (10.0.22621.1635/22H2/2022Update/SunValley2)
12th Gen Intel Core i7-1260P, 1 CPU, 16 logical and 12 physical cores
.NET SDK=8.0.100-preview.2.23157.25
  [Host]     : .NET 7.0.5 (7.0.523.17405), X64 RyuJIT AVX2
  Job-LBSDVQ : .NET 7.0.5 (7.0.523.17405), X64 RyuJIT AVX2

InvocationCount=1  UnrollFactor=1

Method
N
Mean
Error
StdDev
Median

Add_Concurrent
1
1,104.0 ns
118.56 ns
349.6 ns
900.0 ns

Add_NonBlocking
1
493.0 ns
61.59 ns
181.6 ns
400.0 ns

Add_Experimental
1
592.0 ns
68.71 ns
202.6 ns
450.0 ns

Add_Concurrent
10
1,655.1 ns
117.56 ns
342.9 ns
1,500.0 ns

Add_NonBlocking
10
3,576.3 ns
222.32 ns
645.0 ns
3,400.0 ns

Add_Experimental
10
3,440.6 ns
201.95 ns
582.7 ns
3,300.0 ns

Add_Concurrent
100
9,233.7 ns
187.97 ns
348.4 ns
9,150.0 ns

Add_NonBlocking
100
22,891.7 ns
457.90 ns
903.9 ns
22,650.0 ns

Add_Experimental
100
16,071.9 ns
327.02 ns
757.9 ns
15,900.0 ns

Add_Concurrent
1000
74,595.0 ns
1,418.06 ns
1,633.0 ns
74,750.0 ns

Add_NonBlocking
1000
97,635.7 ns
1,854.58 ns
1,644.0 ns
97,800.0 ns

Add_Experimental
1000
92,435.7 ns
1,659.60 ns
1,471.2 ns
92,400.0 ns

Add_Concurrent
10000
820,619.4 ns
24,486.37 ns
71,427.9 ns
801,100.0 ns

Add_NonBlocking
10000
1,236,969.8 ns
24,408.56 ns
45,242.8 ns
1,228,100.0 ns

Add_Experimental
10000
1,213,119.2 ns
24,226.23 ns
33,161.1 ns
1,202,950.0 ns

some clustering is a bit of intentional trade off as hinted in

small clusters are ok though

Some background on this:
In theory a good hash function maps any given set of keys to a uniformly distributed set of buckets.
Also the hashtable is not really in the business of hashing the keys. Ideally it could assume that GetHashCode is already as good as it gets and the table only needs to reduce the full range of int32 hash to the actual smaller number of buckets.
Ideally masking N bits of the hash would be all that is needed... Ideally.
In practice GetHashCode is not always good. Degenerate cases of GetHashCode like always returning 1 can't be helped, but there are also cases of uneven distribution of hashes. These are common and can cause clustering, thus additional reshuffle of the hash before reducing is helpful.
A mod-prime bucket-chaining  ConcurrentDictionary cares much less about this, but we have power-2 open addressing dictionary, which has many advantages, but is also more sensitive to poor hashing, so we need to shuffle.
There is also one common scenario where keys are integers - 42, 43, 44, 45,...  Someone will certainly use the dictionary as a lock-free arraylist. It also could be phone numbers or postal codes, memory addresses, or some other numbers.
Such keys are not only presenting poor hash functions (mapping an int to itself is far from random), but they also often have locality of access - someone will access the hashtable in the key order - 1, 2, 3, 4...   Use it in for loops, use just a few keys that are close to each other, and the like.
In such case preserving some clustering is useful. The keys with "good" GetHashCode, like strings, will not lose much either way - as long as the shuffle is a reversible function, we will map random to random, but for keys that naturally have locality of access it is a tradeoff. Do we want to completely randomize 1, 2, 3, 4, ...  or we want to keep small runs together?
Right now the shuffle will preserve short runs of consecutive hashes, up to 8, if I recall correctly. After that it should scatter the hashes. The picture that the shader map shows is expected.

erroneous resizing even moderately empty tables.

I assume this happens only when dictionary is small and the keys are integers. Once the dictionary gets much bigger than 8, the fact that we preserve runs of 8 in the shuffle will no longer matter.
So far I think the tradeoffs are reasonable, but let me think more about the alternatives.

I started researching this implementation because I see it as a promising algorithm for `Unity Container's new storage method. I trust Dr. Click that it is faster than MOD-based hashes and scales better, unfortunately, all the benchmarks I am running are quite disappointing. In theory, it should be much faster, but as you can see from benchmarks, it is not the case.

I've removed the mixing method altogether and used the worst-case scenario for the hash values. I used consecutive hash codes from 0 to N. Considering this issue there is a hash conflict on every other insertion.
These are the benchmarks:

BenchmarkDotNet=v0.13.5, OS=Windows 11 (10.0.22621.1702/22H2/2022Update/SunValley2)
12th Gen Intel Core i7-1260P, 1 CPU, 16 logical and 12 physical cores
.NET SDK=7.0.300-preview.23179.2
  [Host]     : .NET 6.0.16 (6.0.1623.17311), X64 RyuJIT AVX2
  Job-XVWKVQ : .NET 6.0.16 (6.0.1623.17311), X64 RyuJIT AVX2

InvocationCount=1  UnrollFactor=1

Method
N
Mean
Error
StdDev
Median

Add_Concurrent
1
1,136.4 ns
95.26 ns
279.4 ns
1,100.0 ns

Add_NonBlocking
1
223.2 ns
52.20 ns
153.1 ns
200.0 ns

Add_Experimental
1
199.0 ns
53.69 ns
157.5 ns
200.0 ns

Add_Concurrent
10
1,527.6 ns
91.93 ns
268.2 ns
1,500.0 ns

Add_NonBlocking
10
2,738.4 ns
236.67 ns
694.1 ns
2,400.0 ns

Add_Experimental
10
2,470.2 ns
220.29 ns
628.5 ns
2,200.0 ns

Add_Concurrent
100
9,119.8 ns
186.31 ns
522.4 ns
9,000.0 ns

Add_NonBlocking
100
18,237.2 ns
367.65 ns
717.1 ns
18,050.0 ns

Add_Experimental
100
13,853.6 ns
282.75 ns
820.3 ns
13,700.0 ns

Add_Concurrent
1000
71,986.7 ns
1,384.40 ns
1,295.0 ns
71,900.0 ns

Add_NonBlocking
1000
75,135.5 ns
1,467.62 ns
2,241.2 ns
74,300.0 ns

Add_Experimental
1000
71,261.5 ns
1,130.33 ns
943.9 ns
71,300.0 ns

Add_Concurrent
10000
794,375.0 ns
11,790.12 ns
9,205.0 ns
796,700.0 ns

Add_NonBlocking
10000
1,029,300.0 ns
20,234.87 ns
24,850.2 ns
1,023,650.0 ns

Add_Experimental
10000
909,333.3 ns
8,171.22 ns
7,643.4 ns
907,200.0 ns

The point I am attempting to make is this: mixing should probably be either improved or removed as redundant. As it is right now, it creates overhead without improving performance. Personally, I'd vote for removing it and enjoy an instant bump in performance.

Sorry for not getting to this earlier. It has been pretty busy time.
My current thinking is that we still need the mixing. It is correct that mixing is redundant when keys are already random or otherwise well-behaving. However a general-purpose hashtable also must avoid perf traps if keys are not well-behaved.
For example keys that are multiples of big ^2 numbers - like {1 * 0x100000, 2 * 0x100000, 3 * 0x100000, 4 * 0x100000, ...} may hash poorly into a ^2 table without some mixing. A possibility that someone will use such keys is pretty real.
As a result we need to balance - we do some mixing to avoid degenerate behaviors, but not too much, so that we could benefit from some sequential locality. Since the typical CPU cache line is 64 to 128 bytes, preserving runs of 8, seems reasonable.
I understand the desire to be able to say "my keys are well-behaved, please do not mix" through some API or flag when the hashtable is created and enjoy the performance boost, but I can't think of an efficient way to support that.


RootCanvasVertex/RootTriangleIndexElement Deprecation

With issue #26 and supporting shaders and runtime - it might be worth deprecating the RootCanvasVertex and RootTriangleIndexElement because a canvas should effectively only be rebuilt, if you need to disable a portion of the UI and if you add something new entirely.
Instead when the canvas needs to be built, just map reduce the elements and build directly into the mesh on the main thread.

Closing this issue because it's still a requirement, but the structs have been renamed.


introduce CI

adds semantic commit as a pre-commit hook and semantic release to create releases out of these commit messages

@yoga-braavos , pls review 👍

@yoga-braavos ghanks for the fix! I think not having assets in the github and npm module is fine for now, ready for merge if you agree.


AUI-2116 Removes CSS_RESIZE_COL_DRAGGABLE_DRAGGING class afte mouse up event.

Just started reviewing :) :octocat: Sent from GH.

Just started reviewing :) :octocat: Sent from GH.

Pull request submitted to https://github.com/mairatma/alloy-ui/pull/333. :octocat: Sent from GH.


Change sublayer fill color

Is it possible to change the fill color of a sublayer of the SVG file?
For example, can I change the fill color only of the layer called "IS-4" in the SVG named "iceland"?
Thank you!

You'll have to do that manually by finding that path based on it's id attribute after parsing and setting it's fill attribute to a CGColorRef.

I'm really sorry to bother you, but I'm not able to do that successfully. In particular, I'm not able to properly place the resulting CAShapeLayer in a View.
This is my code:
`override func viewDidLoad() {
super.viewDidLoad()
    let url = Bundle.main.url(forResource: "iceland", withExtension: "svg")!

    let tP:SVGBezierPath = SVGBezierPath()
    for path in SVGBezierPath.pathsFromSVG(at: url) {

        let layer:CAShapeLayer = CAShapeLayer()
        layer.path = path.cgPath

        if path.svgAttributes["id"] as! String == "IS-4" {

            layer.fillColor = UIColor.red.cgColor
        }
        tP.append(path)

        self.icelandShape.addSublayer(layer)
    }
    self.boundingBox = tP.cgPath.boundingBox

    let boundingBoxAspectRatio = self.boundingBox!.width/self.boundingBox!.height
    let viewAspectRatio = self.rView.frame.width/self.rView.frame.height

    if (boundingBoxAspectRatio > viewAspectRatio) {
        // Width is limiting factor
        self.scaleFactor = self.rView.frame.width/boundingBox!.width
    } else {
        // Height is limiting factor
        self.scaleFactor = self.rView.frame.height/boundingBox!.height
    }

    let scaleTransform = CATransform3DMakeScale(scaleFactor!, scaleFactor!, 1.0)

    self.icelandShape.transform = scaleTransform

    self.view.layer.addSublayer(icelandShape)
}

override func viewDidLayoutSubviews() {
    super.viewDidLayoutSubviews()

    self.icelandShape.frame = self.rView.bounds
    self.icelandShape.position = self.rView.center
}`

But the result is odd.

What did I do wrong?
Is there a better way to display the SVG (like aspectFit) after you prepare it manually?
Thank you very much

Why don't you just use an SVGLayer?

Do you mean to add a sublayer to a view as a SVGLayer? or using SVGImageView?
If I use SVGImageView I can't access sublayers to colour a specific layer of  the SVG. If I parse it through SVGBezierPath.pathsFromSVG(at: url) how can I use SVGLayer? If I add CAShapeLayers to a SVGLayer it behaves like a CALayer, it doesn't seem  to change anything.
I also have problems with AspectFit using SVGImageView. If for example i set in the demo app the SVGName as "Circle" the result is this one (with AspectFit)..

Thank you

I just pushed changes to make this easier, now you can do:
let svgView = SVGImageView.init(contentsOf: url)
svgView.paths = svgView.paths.map { (path) in
	if path.svgAttributes["id"] as? String == "IS-4" {
		return path.settingSVGAttributes(["fill": UIColor.red.cgColor])
	} else {
		return path
	}
}

Everything works now.
Thank you very very much!


Listener should return line text

For example:
codeView.setCodeListener(new OnCodeLineClickListener() {
     @Override public void onCodeLineClicked(int n, String line) {
      // your logic here
   }
});

That's because if we only get the position, we should split lines in a different, and maybe we don't do equals than the library does

Very precise remark, thank you! I will add this in next version and let you know here.


Include

When compiling on Linux host to armv7a target following to the tutorial, got error of "errno undeclared". Include this header fixed this problem.

+1

Thanks for fixing this issue !


Fixes grammar issue

This pull request changes the message reported when the target isn't vulnerable from "targets does not seem to be vulnerable" to "targets do not seem to be vulnerable".

@NateNate60 Thank you!


Segments relative links with dots

Hello,
Thanks for your library!
But I have segment links that look like this:
#EXTINF:20.000,
./big_buck_bunny.mp4:hls:seg-1-v1-a1.ts
#EXTINF:20.000,
./big_buck_bunny.mp4:hls:seg-2-v1-a1.ts
#EXTINF:20.000,
./big_buck_bunny.mp4:hls:seg-3-v1-a1.ts

And it seems that the library can't handle these "./" at the start of each link, and as a result, p2p does not work.
(engine.loader.segments is empty while Playlist.segments is not)

Thanks. We know about the problem. The fix is going to be released soon.

Fixed in 94f637d7fe8b96ab8afb9075c2bb32fc182a62d9

Thank you!
Everything works great now


Create components

Milestone - Components
This pull request includes the following changes:

Setup React project
Setup linters
Add the following components

Header
Booklist
Booklist Form
Categories

Add Routes for Booklist and Categories

Thanks for the feedback @TuyishimireEric!
I'm doing the changes 😄


HLS don't work with AMD HW AV1

Which version are you using?
main
Which operating system are you using?
Linux amd64 standard
Describe how to replicate the issue
Publish a Stream in RTMP or WHEP with AMD HW AV1 failed to get a valid HLS Stream, e.g. switch to CPU based Codec SVT-AV1 or NVENC HLS will work fine by this Codecs / Encoder.
Server logs
ERR [HLS] [muxer dom1nic] muxer error: unable to parse AV1 sequence header: timing_info_present_flag is not supported yet
Network dump
No response

I tested it with a person who have NVENC (Nvidia), this works fine here !

As written inside instructions, please provide a network dump that contains the stream. It can be generated in this way:

Download wireshark (https://www.wireshark.org/)
Start capturing on the interface used for exchanging packets

If the server and the external hardware or software are both installed on your pc, the interface is probably "loopback", otherwise it's the one of your network card.

Start the server, publish the AV1 stream to the server with RTMP
Stop capturing, save the result in .pcap format
Attach

As written inside instructions, please provide a network dump that contains the stream. It can be generated in this way:

Download wireshark (https://www.wireshark.org/)

Start capturing on the interface used for exchanging packets

If the server and the external hardware or software are both installed on your pc, the interface is probably "loopback", otherwise it's the one of your network card.

Start the server, publish the AV1 stream to the server with RTMP

Stop capturing, save the result in .pcap format

Attach

No Problem :) und THX for your Support 💯
Mediamtx RTMP (AV1) Publish.zip

Thank you very much for providing the network dump that allowed to replicate the issue.
This should be fixed by https://github.com/bluenviron/mediacommon/pull/162
Please test this nightly release and let me know if it works (click on "artifacts", "Binaries"):
https://github.com/bluenviron/mediamtx/actions/runs/12447857225

Thank you very much for providing the network dump that allowed to replicate the issue. This should be fixed by bluenviron/mediacommon#162 Please test this nightly release and let me know if it works (click on "artifacts", "Binaries"): https://github.com/bluenviron/mediamtx/actions/runs/12447857225

THX YOU SOOOO MUCH 💯  seems to work fine so far !!!

I have to reopen after some Tests I notice the Audio Codec is missing on AV1 Stream, in the first I though my OBS Studio is misconfigured but after I switch to other Encoders the Audio was back without any changes on my Sources.

on WHIP with Opus the WebRTC based Stream have Audio but no Codec in HLS Stream and RTMP to WebRTC the Audio is missing too.


DT not using Snapshot URL

Describe the bug
IIRC, this worked on a previous Dahua camera, but it's been awhile, so unsure. I have the Amcrest AD140 (Dahua rebrand) doorbell camera and when using the Snapshot URL which works fine in my browser, DT never has used it with many tries, only the Frigate and MQTT ones which are all lower resolution. The snapshot URL doesn't have the timestamp either, so very easy to tell it is not being used at a glance.
Version of Double Take
1.13.1-8e2728d
Expected behavior
The higher res snapshot URL image to show up for better face detection.
Screenshots
If applicable, add screenshots to help explain your problem.
Hardware

OS: unRAID
Browser (if applicable) Chrome

Additional context
CompreFace is used.

Trying this again with Reolink camera. I used go2rtc for a snapshot stream. The following also provides an image in my browser when I test, no login required, but no matter whether I put in snapshot URL, under Frigate events, it never picks it up. I actually tried https://jakowenko.com/img/david.92f395c6.jpg and it worked, I think the only time it ever has. Why is nothing else working for me?
http://IP:1984/api/frame.jpeg?src=my_camera

I have the same situation as you. Both with the request and with the error. I use a link to display JPEG for my Reolink camera. This is described here: https://support.reolink.com/hc/en-us/articles/360007011233-How-to-Capture-Live-JPEG-Image-of-Reolink-Cameras-via-Web-Browsers
Example link: http://<IP_ADDRESS>/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=wuuPhkmUCeI9WG7C&user=admin&password=123456
This also does not work. I suspect it is because the HTTP link does not end in .jpg or .jpeg. So it is an "embedded" image and not the direct path to the image.
Maybe the developer here has an idea how to use double-face even with such a link.

I actually discovered that myself, forgot to post about it here. It does work for me, been in place for a few weeks. Not if only I could get the Dahua ones to work.

Hi, how do I set the delay on this to make it work?

I have the same issue.  No matter what, Double Take will use the low resolution stream from Frigate which produces poor face recognition results.  I don't understand why it is so hard to provide a high quality face image to Double Take.
This is the image being sent to Double Take.

This is what I want to send to my camera by using a snapshot url of the main stream.

I am using version 1.13.1 of the Home Assistant Add-On.  Here is my config.  I tried a static image but the live image is still used.
frigate:
  url: http://<IP_ADDRESS>
  update_sub_labels: true
  stop_on_match: false
  cameras:
    - Doorbell

  attempts:
    # number of times double take will request a frigate latest.jpg for facial recognition
    latest: 0
    # number of times double take will request a frigate snapshot.jpg for facial recognition
    snapshot: 10
    # process frigate images from frigate/+/person/snapshot topics
    mqtt: false
    delay: 2
  image:
    # height of frigate image passed for facial recognition
    height: 1920

cameras:
  Doorbell:
    snapshot:
      url: https://jakowenko.com/img/david.92f395c6.jpg

events:
  Doorbell:
    image:
       height: 1920
       snapshot: https://jakowenko.com/img/david.92f395c6.jpg
       latest: https://jakowenko.com/img/david.92f395c6.jpg


Location of ingested data files?

Dear Catalyst Maintainers,
Before I tell you about my issue, let me describe my environment:
Environment

Operating System: Windows 10
Python Version: 3.7
How did you install Catalyst: conda

Now that you know a little about me, let me tell you about the issue I am
having:
Not really an issue, but a question about the catalyst ingest-exchange function. What is the exact location of the files that are downloaded? I've checked the $CATALYST-root$/data directory but I couldn't find it there.

I have same issue.


No such file or directory for dependency

Issue description
I am trying to install nodejs (but I suspect it has nothing to do with the specific package, it worked a couple of days ago).
I had it installed earlier this week, then nix-env -e nodejs it.
It complains like so:
$ nix-env -i nodejs
installing ‘nodejs-7.1.0’
error: opening file ‘/nix/store/aycnxxa2x81y4wjvlq4q08jmk11szrj4-python2.7-gyp-2015-06-11.drv’: No such file or directory

Should it not fetch gyp if it is not available? Did something corrupt?
Steps to reproduce

nix-env -i nodejs

Technical details

System: 17.03pre95909.b69f568 (Gorilla)
Nix version: nix-env (Nix) 1.11..4
Nixpkgs version: "17.03pre95909.b69f568"

*.drv files aren't fetched; they should be created during evaluation.

I can't reproduce it, same nixpkgs and nix-env versions.

Yeah, I wonder if something got corrupted somewhere... How would I reset this? Or tell nix-env to start over? I don't really want to go into /nix/store and start removing things by hand :)

Maybe running garbage collection will fix it.

nix-collect-garbage -d did not help...

This has gotten a lot more interesting just now:
$ nix-env -i irssi
error: opening file ‘/nix/store/pb1fc39m1wkgcqric34hg048gnmzar5j-nix-prefetch-git.drv’: No such file or directory

Installing as root works...

Something wrong around nix daemon, most likely.

FYI: This seems to be the magic command
nix-store --verify --check-contents --repair

It is still running (a LOT of stuff seems to be corrupt for me oO) but it is finding issues, so I am letting it run... If this fixes the problem, I will close the issue.


intro created, inserted into Author component

Hi @lauraferrandof , just created this dummy component for the intro section. Could you please take a look at it? Thanks!

Title added to Intro.


Federal Case Citation Linking

We've been working with In re Black, which illustrates the problem pretty well. CAP has federal cases in its database, but only gives one "official" citation (3 F. Cas. 495 in this instance), while the case will be cited in a variety of reporters in the wild (2 Ben. 196 and 1 Bankr. Rep. 39 among others).
Unlike Kelly -> Ga. or Dick. -> N.J. Eq., federal cases were re-organized when published in an official reporter, so the volume and page numbers are entirely uncorrelated between nominate, specialized, and official reporters. The federal court system is one of the most important and likely influential jurisdictions in our period, but was also comparatively small (there were about 40 active federal judges issuing opinions only infrequently at any given point in the 19th century), so it's worth the effort to get the cases mapped out accurately, including having an RA do it by hand if needed.
But CAP does seem to have a library of parallel cites--see the API of In re Black above. CAP's own linking process doesn't seem to rely on this library--in CAP a cite to 2 Ben. 196 never links back to In re Black even though 2 Ben. 196 is in the API as a parallel cite.
Can we extract the list of parallel cites from CAP where given and then have an RA supplement any missing parallel cites?

I will have to think about this. But for this specific case, there is this oddity:

Normally (I think?) CAP breaks out the parallel citations, but in this one they are all jammed up into a single entry. That makes it harder to find the parallel cites.

Browsing through, it seems like this is what CAP does anytime there is more than one possible parallel cite. (You can see which cases have parallel cites just browsing down this list for instance). Building our own library of federal cites may just require breaking this out into a table using the semicolon as a delimiter (which seems to be how it's consistently used).

Yeah. Thankfully splitting on the semicolon will be trivial.
On Sat, Aug 27, 2022 at 11:37 AM Kellen Funk @.***>
wrote:

Browsing through, it seems like this is what CAP does anytime there is
more than one possible parallel cite. (You can see which cases have
parallel cites just browsing down this list
https://cite.case.law/f-cas/5/ for instance). Building our own library
of federal cites may just require breaking this out into a table using the
semicolon as a delimiter (which seems to be how it's consistently used).
—
Reply to this email directly, view it on GitHub
https://github.com/lmullen/legal-modernism/issues/79#issuecomment-1229214742,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AABM26GKURXUUN6JYHJERGDV3IY4LANCNFSM57ZNKK3Q
.
You are receiving this because you commented.Message ID:
@.***>

Revised whitelist now points to the correct nominate reporter in CAP's list of parallel cites. May still need to isolate the parallel cites for the linking process to work.

You split rows on the semicolon, but CAP had some entries mistyped. An RA has cleaned up those entries, splitting the rows by hand. This table can now replace the split table you made.
split-parallel-cites 8.2.23.csv


I want to add solution to Codeforces Problem

Aim
Want to add solution to a Codeforces Problem
https://codeforces.com/contest/977/problem/C
Details
Efficient And beginner Friendly Solution to this problem
You are given a sequence of integers of length n and integer number k. You should print any integer number x in the range of [1;109] (i.e. 1≤x≤109) such that exactly k elements of given sequence are less than or equal to x.
Note that the sequence can contain equal elements.
If there is no such x, print "-1" (without quotes).
Tag: Sorting , 1200
Programming language

[ ] C
[ ] C++
[ ] Java
[ ] Python

will you please assign this to me in c++

hi @girija0707 I have asked admin to assign this issue to me you are doing it in wrong way just try to create your own issue and then ask permission from admin to add

@Amit366 can I do this in Python ?


Products

Add a product list
Assign products to customers. (#108)

Todo:

Create many2many relationship.
Add store function for new products.

Store function added. closing this one and go further with #108


fix callingconvention callee_saved_registers

Added in https://github.com/Vector35/binaryninja-api/commit/bee0ff9e63dcbfa2825f1143aefe097c3844743e thanks!


CRAN submission minor fixes/updates

These are some minor fixes/updates I had to make during CRAN submission (devtools::release includes some additional checks).

LGTM


Added source us-mo-st_charles

Fixes #1996.

This probably won't work since it's going thru a proxy server.  You'll probably encounter the same with #1977.

Ok I was was worried that wouldn't work as well.


[BUG] Subcharts  with JupyterChart is wrong layout

Expected Behavior

Current Behaviour

Reproducible Example
import pandas as pd
from lightweight_charts import JupyterChart

if __name__ == '__main__':
    chart = JupyterChart(inner_width=0.5, inner_height=0.5)
    chart2 = chart.create_subchart(position='right', width=0.5, height=0.5)
    chart3 = chart.create_subchart(position='left', width=0.5, height=0.5)
    chart4 = chart.create_subchart(position='right', width=0.5, height=0.5)

    chart.watermark('1')
    chart2.watermark('2')
    chart3.watermark('3')
    chart4.watermark('4')

    df = pd.read_csv('ohlcv.csv')
    chart.set(df)
    chart2.set(df)
    chart3.set(df)
    chart4.set(df)

    chart.load()

Environment
- OS: macOS 13.2
- Library: lightweight-charts==2.0.1

Is there any progress?

In fact, any subchart is plotting in JupyterChart right now..

i failed to plot any subchart with jupyterchart as of today


Provide examples of typescript and corresponding formal scaffolding

feat: Provide examples of typescript
file location:  example/egg-ssr-with-ts/........
feat: Provide corresponding formal scaffolding
file location:  packages/ykcli/........

涵盖两个新feature，建议分为两次pr提交，否则信息量太大


Cadence returns error "Cannot achieve consistency level LOCAL_QUORUM" when querying for domain

Run this from our command line and get an error:
$cadence domain desc
Operation failed: InternalServiceError{Message: GetDomain operation failed. Error Cannot achieve consistency level LOCAL_QUORUM}.

Any ideas of cause?
We are only running one cadence server.  Our cassandra instance has 3 members.

Can you try running nodetool status on the cassandra cluster and paste the output here.

@samarabbas We figured out the issue was our cassandra cluster was having issues.  We will have to investigate good production settings for cassandra in kubernetes.  If you guys have any recommendations, feel free to point us in the right direction.


Detect API use errors earlier.

Previously we would accept invalid input, but crash when that invalid input
was used.

LGTM


Converting panels to usercontrols

Convert existing method of form loading to user control

Two Panels have been merged [Admin,Manager]


Reduce complexity on Create or Change a DNS Record page

The current form is overly complex and contains lots of data that isn't required for this first iteration of the form.
Value

Reduce complexity for users
Focus of gathering the data required to be able to test the form, the aim of which is the just bring the request process closer to our workflow.

Functional Requirements (What):

[x] Remove MoJ Service Owner (optional)
[x] Remove Service Area Name (optional)
[x] Remove DNS Record (optional)
[x] Remove TTL (Time to Live) (optional)
[x] REmove DNS Record Type (optional)
[x] Remove Select a Date for Your Change (optional)
[x] Change label Further information to Request detail
[x] Change text Please complete this form to the best of your ability. Use the "Further information" free text box at the bottom of the page to provide any additional details or if you are unsure which of the optional fields to use. We will contact you if necessary. to Use the "Request detail" free text box at the bottom of the page to provide details of the change(s) required.

Non-Functional Requirements (How):

[x] Update the form with change requested.

Acceptance Criteria:

[x] Form reviewed and signed off by PM.

Notes:

@AntonyBishop Can you sign off the changes made?
https://dns-form-dev.cloud-platform.service.justice.gov.uk/

Looks awesome. Thank you.


UVI Request

--- UVI JSON ---
{
  "vendor_name": "Linux",
  "product_name": "Kernel",
  "product_version": "versions from  to before v5.12.10",
  "vulnerability_type": "unspecified",
  "affected_component": "unspecified",
  "attack_vector": "unspecified",
  "impact": "unspecified",
  "credit": "",
  "references": [
    "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b37885cc013516f0412d7d2e99f043dd112c99a6"
  ],
  "extended_references": [
    {
      "type": "commit",
      "value": "b37885cc013516f0412d7d2e99f043dd112c99a6",
      "note": "fixed"
    }
  ],
  "reporter": "joshbressers",
  "reporter_id": 1692786,
  "notes": "",
  "description": "btrfs: fix fsync failure and transaction abort after writes to prealloc extents\n\nThis is an automated ID intended to aid in discovery of potential security vulnerabilities. The actual impact and attack plausibility have not yet been proven.\nThis ID is fixed in Linux Kernel version v5.12.10 by commit b37885cc013516f0412d7d2e99f043dd112c99a6, it was introduced in version  by commit . For more details please see the references link."
}
--- UVI JSON ---

This issue has been assigned UVI-2021-1000817


FR: Add support for Advanced BG for local image

Thanks for your quick response recently. Could you please help to add "local image relative path feature" to Advanced BG?

@AndyLiu9
Sorry, I am not sure what you mean by "Advanced BG". (Does BG mean background...?)
Could you please explain?

Yes, exactly advanced background. Here is the website: https://marpit.marp.app/image-syntax.

And I think the following feature will really make my slides more beautiful:

Oh! I knew about this feature, but I didn't know it was called that!
Okay, I'll see what I can do to implement it.


String Object Required for JSON

I have noticed that when sending JSON data from my server via this package to another Node server, everything works just fine:
fetch('http://test.com', { method: 'POST', body: JSON.stringify({ a: 'b' }));
However when sending to a Java backed server, it fails. What is printed out on the other end is:
'"{\"a\":\"b\"}"'
So somewhere (I think inside this package) single quotes are being appended which makes the Java parse fail. However if I turn the body into a string object:
fetch('http://test.com', { method: 'POST', body: String(JSON.stringify({ a: 'b' })));
It works like a charm. This is not documented and either should be or a fix to allow primitive strings.
Better JSON post documentation would be nice too.

you have an unexpected ' before body...

Sorry, that was freehand coding. Still a problem, I'll fix the code above.

Nope we don't append anything to your body, we have no knowledge of its content really, only the type of input (string, stream, etc.)
JSON.stringify returns an actual string, if you have problem with it, you should check the actual body string you are sending.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify


Fix bug with static cardinalities in PandasDataset

Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Please tag this pr with at least one of these labels to make our release process faster: BREAKING, new feature, bug fix, other change, dev setup

Thanks!
One thing I've seen is that .to_numpy() should be used in favour of .values.

Yes, we can do that all over the place separately


Make change lifespan deterministic and update docs

Objective

Make absurdly long-lived changes stay detectable for even longer (without leveling up to u64).
Give all changes a consistent maximum lifespan.
Improve code clarity.

Solution

Increase the frequency of check_tick scans to increase the oldest reliably-detectable change.
(Deferred until we can benchmark the cost of a scan.)
Ignore changes older than the maximum reliably-detectable age.
General refactoring—name the constants, use them everywhere, and update the docs.
Update test cases to check for the specified behavior.

Background
(Edit: link to original reliable change detection PR #1471)
Given the minimum interval between check_ticks scans, N, the oldest reliably-detectable change is u32::MAX - (2 * N - 1) (or MAX_CHANGE_AGE). Reducing N from ~530 million (current value) to something like ~2 million would extend the lifetime of changes by a billion.

minimum check_ticks interval
oldest reliably-detectable change
usable % of u32::MAX

u32::MAX / 8  (536,870,911)
(u32::MAX / 4) * 3
75.0%

2_000_000
u32::MAX - 3_999_999
99.9%

Similarly, changes are still allowed to be between MAX_CHANGE_AGE-old and u32::MAX-old in the interim between check_tick scans. While we prevent their age from overflowing, the test to detect changes still compares raw values. This makes failure ultimately unreliable, since when ancient changes stop being detected varies depending on when the next scan occurs.
Open Question
Currently, systems and system states are incorrectly initialized with their last_change_tick set to 0, which doesn't handle wraparound correctly.
For consistent behavior, they should either be initialized to the world's last_change_tick (and detect no changes) or to MAX_CHANGE_AGE behind the world's current change_tick (and detect everything as a change). I've currently gone with the latter since that was closer to the existing behavior.
Follow-up Work
(Edited: entire section)
We haven't actually profiled how long a check_ticks scan takes on a "large" World , so we don't know if it's safe to increase their frequency. However, we are currently relying on play sessions not lasting long enough to trigger a scan and apps not having enough entities/archetypes for it to be "expensive" (our assumption). That isn't a real solution. (Either scanning never costs enough to impact frame times or we provide an option to use u64 change ticks. Nobody will accept random hiccups.)
To further extend the lifetime of changes, we actually only need to increment the world tick if a system has Fetch: !ReadOnlySystemParamFetch. The behavior will be identical because all writes are sequenced, but I'm not sure how to implement that in a way that the compiler can optimize the branch out.
Also, since having no false positives depends on a check_ticks scan running at least every 2 * N - 1 ticks, a last_check_tick should also be stored in the World so that any lull in system execution (like a command flush) could trigger a scan if needed. To be completely robust, all the systems initialized on the world should be scanned, not just those in the current stage.

The value chosen in this PR does reduce the capacity of a stage from ~530 million systems to ~2 million

2 million systems should be enough for anyone ;) I think this is a good tradeoff.

Since "no false positives" depends on a check_ticks scan running at least every 2x the min. interval ticks, last_tick_check should be stored in World instead of SystemStage

Agreed. This should be done as part of Stageless.

The reason why we chose a large CHECK_TICK_THRESHOLD is that the scan involves iterating every component, and may result in a noticeable stutter. It´s better if it never happens.

This is good to know. I'm glad I tried to change the threshold then because I did not see that in the original issue (maybe I just missed it tho).
Between saving space and avoiding a potential stutter (we should try to test this), which is more important?  If we really never want to run a scan, we should bump to u64.
I do have a reason to prefer u32. Change tick values probably need to be replicated by networking, and moving to u64 would double the amount of bytes that need to be copied.

I suppose that increasing the range of detection is valuable to you, could you comment on what you are doing?

I mostly made this PR because I'm working on implementing stageless, which removes SystemStage, so I had to understand how this check_tick stuff works to know where to put it back in.
I remembered #3071, and u32::MAX / 8 seemed like a very sub-optimal value, so I changed it. I wasn't aware there was more thought behind it.

1000 ticks per frame at 144 frames per second will scan once every hour

So I just pushed a change to raising the check tick threshold to this value, but I'm immediately thinking I should reverse it. Choosing this huge number is a pre-emptive solution to a problem that AFAIK we aren't sure exists. If performing a scan causes frame stuttering, any frequency is probably unacceptable, even once per hour. Players won't ignore that.

OK, I think that's everything.

bors try

@joy can you please mark that this fixes #3082 in the PR description so we don't forget to close that out?

Can you please mark that this fixes #3082 in the PR description so we don't forget to close that out?

done

bors r+


Disable WebGL context vertex attrib arrays on re-init

Description
Disable WebGL context vertex attrib arrays on canvas re-init.
Fixes curves not working if the WebGL context was initially initialised for runes.
Type of change

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
[ ] Code quality improvements

How to test
Open playground, switch to runes, then switch to curves, and then try to render a curve. It should work.
Checklist

[x] I have tested this code
[ ] I have updated the documentation

Pull Request Test Coverage Report for Build 7534

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 33.181%

Totals

Change from base Build 7532:
0.0%

Covered Lines:
2293

Relevant Lines:
6406

💛  - Coveralls


coef names

addresses https://github.com/alan-turing-institute/MLJLinearModels.jl/issues/60
requires:

[x]  https://github.com/alan-turing-institute/MLJModelInterface.jl/pull/39 to be merged

/cc @tlienart @ablaom

So in order for CIs to pass without any failure, we have to wait those PRs to be merged and new versions to be tagged for each package:

https://github.com/alan-turing-institute/MLJBase.jl/pull/280
https://github.com/alan-turing-institute/MLJModelInterface.jl/pull/39

Then we can just bump up the compat section for MLJModelInterface.jl

I will bump the MLJModelInterface.jl compat once the new version of MLJBase is released.
Then the compats would be all good and we can check how CI goes. (maybe after that I will add a test on this)
/cc @ablaom

@aviatesk I think can update the [compat] now and retrigger CI

nice, thanks for notifying the new release.

okay, so now fittted_params returns:

binary class classification

julia> fitted_params(mach)
(classes = CategoricalString{UInt32}["B", "O"],
 coefs = [:FL => 2.6201486950992203, :RW => 0.39292726376244974, :CL => 0.42944513973557696, :CW => -2.364090952736262, :BD => 2.184956788698077],
 intercept = -3.805377536908276,)

multi class classification:

julia> fitted_params(mach)
(classes = CategoricalString{UInt32}["setosa", "versicolor", "virginica"],
 coefs = Pair{Symbol,SubArray{Float64,1,Array{Float64,2},Tuple{Int64,Base.Slice{Base.OneTo{Int64}}},true}}[:sepal_length => [0.2059480869774525, 0.15620597909667314, -0.3621540660741237], :sepal_width => [1.329471903695349, -0.5634731456659896, -0.765998758029362], :petal_length => [-2.4826936165327167, -0.1984673279849103, 2.6811609445176328], :petal_width => [-1.1274927833807755, -0.9013966540870679, 2.0288894374678437]],
 intercept = [0.22683530315174644, -0.2268353017119584, -15.374523249617724],)

regression:

julia> fitted_params(mach)
(coefs = [:Crim => -0.09703973833125352, :Zn => 0.09842256842389137, :Indus => 0.05193156265302136, :NOx => 0.08164973034302989, :Rm => 1.9136770861182466, :Age => 0.08012259423475827, :Dis => -0.1673060345082267, :Rad => 0.2033714467207396, :Tax => -0.012765891530541989, :PTRatio => 0.5304063436035396, :Black => 0.0199836811158726, :LStat => -0.7721969054676527],
 intercept = 0.17859876246704648,)

where coefs now returns vector of pairs of feature name and coef when given train data contains schema information, otherwise returns just coefs as before.
It now also returns classes field for classification models, which enables users to see which coef corresponds to which class.

Possible discussion would be that we may want to keep coefs fields as just vector of coefs and keep those feature names as a separate field (say, features), as classes are so.
That way, fitted_params(some_model) would be always Vector{Float64} whenever given train data contains schema information, and would be more consistent, but then users have to match feature name to each coef manually, e.g. for plotting.
I'm not sure which way we want to go, and so very open to hear your ideas.

Possible discussion would be that we may want to keep coefs fields as just vector of coefs and keep those feature names as a separate field (say, features), as classes are so.

what do you think on this, @tlienart ?

sorry this is fine but fails on nightly due to some weird unrelated issue; could I ask you to allow failure on nightly in the travis yml file? thanks!

okay then let's go with the current implementation.

could I ask you to allow failure on nightly in the travis yml file?
done 👍

Codecov Report

Merging #61 into dev will decrease coverage by 1.74%.
The diff coverage is 36.84%.

@@            Coverage Diff             @@
##              dev      #61      +/-   ##
==========================================
- Coverage   94.78%   93.03%   -1.75%
==========================================
  Files          22       22
  Lines         805      790      -15
==========================================
- Hits          763      735      -28
- Misses         42       55      +13

Impacted Files
Coverage Δ

src/glr/constructors.jl
100.00% <ø> (ø)

src/mlj/interface.jl
72.00% <36.84%> (-18.70%)
:arrow_down:

src/loss-penalty/utils.jl
71.42% <0.00%> (-14.29%)
:arrow_down:

src/loss-penalty/generic.jl
86.07% <0.00%> (-1.27%)
:arrow_down:

src/fit/proxgrad.jl
94.11% <0.00%> (-0.89%)
:arrow_down:

src/glr/d_robust.jl
91.05% <0.00%> (-0.22%)
:arrow_down:

src/utils.jl
97.33% <0.00%> (-0.04%)
:arrow_down:

src/glr/d_l2loss.jl
100.00% <0.00%> (ø)

src/glr/d_logistic.jl
100.00% <0.00%> (ø)

... and 2 more

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 100162a...1c05e13. Read the comment docs.

Thanks


pending on "flutter packages get"

in my yaml file, I add a dependence decimal: ^0.2.0
when I run a command flutter packages get always pending and no response.
$ flutter packages get
Running "flutter packages get" in caculator...                  -
here some new error:
OS Error: Operation timed out, errno = 60, address = pub.dartlang.org, port = 55037
I can't request pub.dartlang.org.
Is there any solutions to solve this time out error?
here is my yaml flie
name: caculator
description: A new Flutter application.

dependencies:
  flutter:
    sdk: flutter

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.2
  decimal: ^0.2.0

dev_dependencies:
  flutter_test:
    sdk: flutter

# For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec

# The following section is specific to Flutter.
flutter:

  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

  # To add assets to your application, add an assets section, like this:
  # assets:
  #  - images/a_dot_burr.jpeg
  #  - images/a_dot_ham.jpeg

  # An image asset can refer to one or more resolution-specific "variants", see
  # https://flutter.io/assets-and-images/#resolution-aware.

  # For details regarding adding assets from package dependencies, see
  # https://flutter.io/assets-and-images/#from-packages

  # To add custom fonts to your application, add a fonts section here,
  # in this "flutter" section. Each entry in this list should have a
  # "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  # fonts:
  #   - family: Schyler
  #     fonts:
  #       - asset: fonts/Schyler-Regular.ttf
  #       - asset: fonts/Schyler-Italic.ttf
  #         style: italic
  #   - family: Trajan Pro
  #     fonts:
  #       - asset: fonts/TrajanPro.ttf
  #       - asset: fonts/TrajanPro_Bold.ttf
  #         weight: 700
  #
  # For details regarding fonts from package dependencies,
  # see https://flutter.io/custom-fonts/#from-packages

$ flutter doctor -v
[✓] Flutter (Channel beta, v0.5.1, on Mac OS X 10.13.5 17F77, locale en-NZ)
    • Flutter version 0.5.1 at /Users/tzduan/development/flutter
    • Framework revision c7ea3ca377 (5 weeks ago), 2018-05-29 21:07:33 +0200
    • Engine revision 1ed25ca7b7
    • Dart version 2.0.0-dev.58.0.flutter-f981f09760

[✓] Android toolchain - develop for Android devices (Android SDK 26.0.2)
    • Android SDK at /Users/tzduan/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 26.0.2
    • ANDROID_HOME = /Users/tzduan/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 9.4.1, Build version 9F2000
    • ios-deploy 1.9.2
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 23.2.1
    • Dart plugin version 171.4424
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)

[!] IntelliJ IDEA Ultimate Edition (version 2017.1.1)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.io/intellij-setup/#installing-the-plugins

[!] VS Code (version 1.24.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected devices (1 available)
    • iPhone X • A741D306-C8B6-43F0-93D7-1503002FA9BE • ios • iOS 11.4 (simulator)

If you're in China, there are some extra things you may need to do, see:
https://github.com/flutter/flutter/wiki/Using-Flutter-in-China
Please follow that guide and post back with the results.

Thanks a lot!


Imported plans aren't auto-clearing

Not sure if it is a client side issue or server side, but they're still there a full day later and shouldn't be.

The index for createdAt was missing in production for some reason. Added.


create blueprint in_use? virtual attribute

Need a way to determine if a blueprint is "in use" and has been ordered. This adds a virtual attribute that returns false if it has not been published, and only returns true if the blueprint bundle has been ordered.
cc: @dtaylor113
@bzwei feedback appreciated 😄
@miq-bot add_label enhancement, euwe/no

Hi @jntullo ,
I just noticed in the if I try to delete a published blueprint I get an error back saying the blueprint is read-only.  Will the blueprint delete now take into account this 'in-use' flag?
{
  "action" : "delete",
  "resources" : [
    { "id" :<PHONE_NUMBER>0051 }
  ]
}

{
  "results": [
    {
      "success": false,
      "message": "Blueprint is marked as readonly",
      "href": "http://localhost:8001/api/blueprints/10000000000051"
    }
  ]
}

Thanks,

Dave

@dtaylor113 No. It has nothing to do with this PR. A published blueprint cannot be deleted. A new PR is required to make it deletable, either by introducing an unpublish method, or special logic to enable deletion under certain condition.