How to send apn-topic on registration using APN

Hi! I am reading the documentation and I am wondering: How can I submit the apn-topic on registration event?
I see there is a field:
 var push = PushNotification.init({
            android: {
                senderID: "XXXX"
            },
            ios: {
                alert: "true",
                badge: "true",
                sound: "true",
                senderID: "XXXXX",
                gcmSandbox: "true",
                topics: ['bundle.id']
            },
        });

But this is only when we are using GCM service. I want to use APN but if I use this:
 var push = PushNotification.init({
            android: {
                senderID: "452017922647"
            },
            ios: {
                alert: "true",
                badge: "true",
                sound: "true"
            },
        });

I am always reciving {“reason”:”DeviceTokenNotForTopic”} when I try to send a push notification from my server

@vtellez you can't. APNS doesn't actually support topics. When Apple documentation refers to topics they mean the bundle ID of the app. So an App can only have one topic. If you want to have topics on iOS you'll either need to GCM or use a push service that handles topics for you like Amazon SNS. Does this answer your question?

@macdonst  thank you very much for your response.
I don't want to use topics, my problem is that I define my widegt id in the config.xml as the bundle id but When I try to send the push notification, it seems that the token is not register for this bundle id.
I also have this ticket with a better explain
#920

Closing this a basically a duplicate of #920. Let's handle it on that issue.


Fix two issues in the typescript/vfs module.

2fa00c539f94f8fb613acdd669486582ab136409 Fix the exception when file content is empty.
fix #2713
3458b37e7ff419c337bd92cb160aced73ca58058 Fix moduleDetection compiler option is not working.

@xiaoxiyao thank you so much for the PR! ❤ this commit 3458b37e7ff419c337bd92cb160aced73ca58058 help me a lot undestanding why the code wasn't being transpile as expected. I can confirm it works like a charm 😄


htlcswitch+gossip: recognize prior routing policies for a period of time after a new update

Related to this spec PR: https://github.com/lightning/bolts/pull/1001
This should be straight forward enough: keep around two copies of our policy, and check both when we need to make a forward/reject decision.
We might want to allow nodes to also opt out of this behavior?

Would never want this on my own nodes so an opt out would be appreciated to avoid needing to do htlc interception

Hi @alexbosworth , I've been looking for potential issues to start contributing, and would like to attempt this.
I was hoping to get some clarity from you regarding the below:

If a 10-minute window is required as per BOLT-7, and we say that lnd is fully compatible with BOLT-7, would allowing opting out conflict with this?
If we do allow opting out, would that best be achieved through a config flag in lnd.conf?
The pointers given by @Roasbeef seem quite comprehensive (thanks!). I am yet to dive deep into the code for this particular task, but would it be an acceptable strategy to start a 10-minute timer in a go routine (using time package) when a channel update is broadcasted, and discard the old policy when the timer is up?
What should be the expected behavior in case another update announcement takes place before the first 10-minute timer expires?

I think people can optionally change their node policies however it makes sense to them, another maybe better way to approach this is in the policy API call, allow it to set the flexibility there
In practice we've seen people have their entire channel liquidity drained in around 10 minutes, so practically it could cause problems if it's not configurable

I am yet to dive deep into the code for this particular task, but would it be an acceptable strategy to start a 10-minute timer in a go routine (using time package) when a channel update is broadcasted, and discard the old policy when the timer is up?

I think a simpler way (and a more restart-robust way) would be to add a timestamp associated with a policy so that you can just check the timestamp to know if you should still consider the prior policy

Thanks for the feedback @ellemouton , your suggestion makes sense. I will attempt to put together a rough outline of a plan in the next couple days and share that here :slightly_smiling_face:

In LND an invalid fee rate will be returned with an error showing the valid fee rate, so they can just retry the payment. Definitely though there is an issue in that buyers may see a low fee, be attracted and fail, however this may also be the case in the ten minute example because at a low fee the channel is more likely to deplete its local balance entirely and not be able to service the forward
n minutes is hard to figure out a magic number for, maybe that could be adjustable as well? A surge of payments can happen lightning-fast. Another way to approach things is to use burst rate limiting, so that you can update a price quickly if necessary but then your update fidelity will decrease. If burst is allowed a network broadcast could happen much more quickly than ten minutes
a way to lower the risk of these things going against the market dynamics is just to make them optional that way the operators can choose what is working best for them

I think the 10 minutes period should be configurable.


It seems that the bdd_daytime.zip compressed file you provided is damaged and cannot be decompressed.

Thanks for your interest in our work!
I will have a check as soon as possible. Maybe you can try other datasets, e.g., C2F, at first.  Thanks!

Thank you for your perfect work and prompt reply. I will try C2F.

Sorry for the inconvenience.
I found that the bdd100k images are not compressed successfully due to the large scale, while the labels are correct. The images can be downloaded via the official link, and I just updated the readme.
If you cannot download the image from the official link, you can reach me via e-mail, and I will seek other approaches to send you the data, such as the other cloud disk.

Thanks for the update! I have successfully downloaded the images and labels of the bdd dataset through your updated link.

I am so so so sorry for the big mistake I made when I cleaned my code,  which will lead to significantly different results with our paper.  I just noticed that due to an issue in terms of the reproducibility.  I have updated the code and the tell reason in ReadMe. I'm very sorry for wasting your energy because of my mistake.
@luoh226


Security alert from play store

Your app contains unsafe cryptographic encryption patterns. Please see this Google Help Center article ( https://support.google.com/faqs/answer/9450925 ) for details.
Vulnerable classes:Org.spongycastle.openpgp.operator.jcajce.JcePBEKeyEncryptionMethodGenerator.encryptSessionInfo

You'll need to ask them to  fix the analyzer. I think it's triggering because of the use of the zero IV. This is by definition though.


Undefined variables

I am getting the following two warnings when I upload chunked files
Notice: Undefined variable: completed in [...]/vendor/gargron/fileupload/src/FileUpload/FileUpload.php on line 360
Notice: Undefined property: FileUpload\File::$size in [...]/vendor/gargron/fileupload/src/FileUpload/FileUpload.php on line 579
Cheers,
Patrick.

What release are you making use of ? I want to believe this doesn't exists in the latest release  1.4.1

I use version v1.4.1
Variable $completed  is only set if $file->size == $file_size due to line 345. Which is not true in chunked uploads.
In line 359 a new File object is instantiated and member variable size is not assigned after that.
Maybe that helps.

@patrickschmidt sorry for the last response, I'd push a fix tomorrow

late

@patrickschmidt can you try out the hot-fix branch .. https://github.com/Gargron/fileupload/commit/b3126e08c56a131153e8c08353947aea4b0b694a

Small typo in the fix.
On line 310 $complteted = false; to $completed = false;
The mime type validation does not work if i use the chunked file upload. Without the the mime_type validation the fix work :)
Fixing the mime type validation is hard. finfo_file only works if the upload is completed.

Oops, thanks a lot.. I switched to sublime text, phpstorm would have alerted me of a typo.. Would fix that.
THanks for testing it, I would tag a new version.
As per the mime type validation, that would be pretty hardcore to tackle.

Just merged in #48 and i tagged 1.4.2 .
Thanks a lot


New package: Fastnet v0.1.0

Registering package: Fastnet
Repository: https://github.com/bridgewalker/Fastnet.jl
Created by: @bridgewalker
Version: v0.1.0
Commit: d5a608ecd3babfbbbc003de0e9ef9016abb48b03
Git reference: v0.1.0
Release notes:

Fastnet is a Julia package tht allows very fast (linear-time) simulation of discrete-state dynamical processes on networks, such as commonly studied models of epidemics

Hmm this module is already in use fairly widely, would be a shame to rename it ...

... so I explored a bit which alternatives seem permissible. The only things that worked so far are quite silly, such as adding multiple dashes

This code has actually been development in some shape or form since 2013, when I finished my previous network simulation toolkit. Published here:  https://academic.oup.com/bioinformatics/article/29/2/277/202011 .  I have fairly recently started switching all my projects to Julias, but Fastnet is used throughout my lab and has branched to several collaborators. I think it might already be pretty widely used for things like epidemic simulation and opinion dynamics. Changing the name would likely mess with many existing projects, so I would really appreciate if this could be manually merged.

I think the name similarity is OK— does not seem like it would get confused with FastJet to me. But the compat issues AutoMerge brought up do need to get addressed!

I think the name similarity is OK— does not seem like it would get confused with FastJet to me. But the compat issues AutoMerge brought up do need to get addressed!

Thanks alot for the quick help. Where do I see the compatibility issues? Everything seems to be ok to me?

I think the name similarity is OK— does not seem like it would get confused with FastJet to me. But the compat issues AutoMerge brought up do need to get addressed!

Thanks alot for the quick help. Where do I see the compatibility issues? Everything seems to be ok to me?

OK found it!

I think the name similarity is OK— does not seem like it would get confused with FastJet to me. But the compat issues AutoMerge brought up do need to get addressed!

OK done, I have fixed the toml on the repository and tested that it compiles correctly.

No more compat issues (I think), but still stuck on the namecheck.

Great! We will manually merge it once 3 days have passed from the initial registration. This is a waiting period all new packages have to allow for community comment. (If we forget feel free to ping me then)


Add containerfile tests for AMD and Intel

Currently, we only have any kind of container tests for CUDA: https://github.com/instructlab/instructlab/blob/main/.github/workflows/image-cuda.yml
These tests should be expanded to include AMD and Intel

@nathan-weinberg This needs to be an epic that encompasses the work needed for AMD and Intel tests. Let's sync when you're back so we can capture the requirements properly

question I have is, is the target hardware required for building these

I've turned this into an epic and linked to separate issues for AMD and Intel requirements. I'll need help from the team to hash out these requirements on those two issues.
cc. @cdoern @jaideepr97 @alinaryan


[HACKTOBERFEST 2024] - CSS Relative and Absolute Units Quiz

[!IMPORTANT]
This issue is part of our 2024 Hacktoberfest initiative. If you are interested in working on this issue, refer to our top-level tasks to see if this issue is claimed, or to claim it if it is not.

This issue is to create the CSS Relative and Absolute Units quiz.
The file you should be working on is found in /curriculum/challenges/english/25-front-end-development/quiz-css-relative-and-absolute-units.
All quiz questions need to relate to one of these topics:

Topics

[!CAUTION]
Questions which do not fall under these topics will be rejected.

You are welcome to include code blocks in your questions, but please keep them short (four lines or less).
Please do NOT open a pull request until you have completed all questions. Your quiz should have exactly 20 questions.

@freecodecamp/curriculum-admins

This issue is now open
If you would like to work on this issue, please leave a comment so we can assign it to you.
Be sure to read our contributing guidelines.

I would like to work on this one, please.

HI @spartanns
Rahul has been assigned. But there are still plenty of issues open 👍

This issue has been assigned a contributor. To prevent extraneous notifications, the issue is now locked. If you have any questions, please reach out to me in our Discord community.


Warn the hasty to read the documentation before raising num_instances

diff --git a/config.rb.sample b/config.rb.sample
index 791d6cc..e2cd751 100644
--- a/config.rb.sample
+++ b/config.rb.sample
@@ -5,6 +5,8 @@
 # after the equals sign..

 # Size of the CoreOS cluster created by Vagrant
+# For >1, you MUST set discovery in user-data for clustering to work
+# See "Cluster Setup" in README for details
 #$num_instances=1

 # Log the serial consoles of CoreOS VMs to log/

Moved to https://github.com/coreos/bugs/issues/1379


Swarm-1632: Rename MP packages, Part 1 (health&metrics)

@heiko-braun, could you rebase this PR on the current master as it appears to have changes from other PRs, such as copyright changes, so its hard to see what's specific to this PR.

@kenfinnigan done

@kenfinnigan I now see what you mean. The copyrights have been completely messed up.

I've restored to the original state as good as I can. Some minor differences remain, but I think it's bearable


Support right-to-left languages

This PR adds the dir global attribute to the layout, and uses the req.language property from express-request-langauge to determine direction, either ltr or rtl. This should improve the site layout for rtl languages like Arabic and Hebrew.
The stylesheet has also been updated to swap the logo and nav in the header, as well as the social links and nav in the footer.
Preview URLs

Hebrew: https://electron-website-pr-1254.herokuapp.com/languages/he-IL
Arabic: https://electron-website-pr-1254.herokuapp.com/languages/ar-SA

Resolves #1253
cc @talsafran

For the curious, here are the RTL languages supported by this change:
[
  'ae',   /* Avestan */
  'ar',   /* 'العربية', Arabic */
  'arc',  /* Aramaic */
  'bcc',  /* 'بلوچی مکرانی', Southern Balochi */
  'bqi',  /* 'بختياري', Bakthiari */
  'ckb',  /* 'Soranî / کوردی', Sorani */
  'dv',   /* Dhivehi */
  'fa',   /* 'فارسی', Persian */
  'glk',  /* 'گیلکی', Gilaki */
  'he',   /* 'עברית', Hebrew */
  'ku',   /* 'Kurdî / كوردی', Kurdish */
  'mzn',  /* 'مازِرونی', Mazanderani */
  'nqo',  /* N'Ko */
  'pnb',  /* 'پنجابی', Western Punjabi */
  'ps',   /* 'پښتو', Pashto, */
  'sd',   /* 'سنڌي', Sindhi */
  'ug',   /* 'Uyghurche / ئۇيغۇرچە', Uyghur */
  'ur',   /* 'اردو', Urdu */
  'yi'    /* 'ייִדיש', Yiddish */
]

This is better than nothing, so I shipped it.
Created https://github.com/electron/electronjs.org/issues/1258 as a followup.
@talsafran and @shlomi-noach if see any other oddities, please let us know!

In terms of top menu, looks good:

In terms of content (I'm using https://electronjs.org/languages/he-IL), Hebrew/Latin is messed up:

This text:

Should actually look like:

(I rendered the above in Google Drive with RTL)
To fix it in the website you should use direction: rtl in CSS. This immediately generates the desired output:

The text:

מהיום, אם אתה יכול לבנות אתר אתה יוכל לבנות גם יישומי מחשב. Electron הוא framework לפיתוח יישומים למערכות הפעלה שנות בטכנולוגיות פיתוח אתרים כמו JavaScript, HTML, ו-CSS. Electron דואג להתאמות השונות כך שאתם תוכלו להתמקד בעיקר היישום שלכם.

has spelling and grammar mistakes, and rendering is messed up Hebrew/Latin.
The Hebrew term for "Bug Report" isn't "דו"ח קריסה". Overall the translation is weird at times. It seems like this went through Google Translate.
In my honest opinion this isn't release quality at this time.
Please let me know how I can be more of service. I can help with translation and with reviewing. You should use:
h1, p {
  direction: rtl
}

Hey @shlomi-noach thanks for the quick feedback! 💛 Unfortunately the automatic deployment of this PR failed and what you were looking at was a previous version of the site without these RTL changes applied.
Can you take another look? The layout should now be RTL for Arabic and Hebrew.

Looks better with direction: rtl. However: note the spacing inconsistency on top navbar:

in particular between these two:

I would also reverse the order of words here. Or rather the entire line. It looked better previsouly and made more sense to have the Hebrew menu on the right rather than on the left. I'm thinking it was reversed twice.
apps looks funny. Since it's completely English it should get the standard layout.

Same for blog:

Bad spacing and typos in community page:

Bad spacing and typos in https://electronjs.org/docs. Also pointless. The docs are in English, it makes little sense to have Hebrew headers for English content, then have RTL-LTR messed up for both.
https://electronjs.org/releases should be LTR
Inconsistent spacing on bottom menubar:

specifically here:

apps looks funny

Opened https://github.com/electron/electronjs.org/issues/1259 to set /apps, /blog, and /releases to LTR on all languages.

The docs are in English, it makes little sense to have Hebrew headers for English content.

The docs are in English for now because they haven't been fully translated yet. But eventually all of the docs will be in Hebrew 🤞

The docs are in English for now because they haven't been fully translated yet. But eventually all of the docs will be in Hebrew

Wow. I'm impressed at the expected effort. However, I should also say, it is very conventional to have tech documentation in English. I can see the value in translation to Hebrew in the sense of inclusion ; but technical terms really don't translate well to Hebrew and even as we chat f2f we use English for the technical terms ("database", "index", "quorum", "deploy", "peer to peer", etc.)

I'm impressed at the expected effort

I should rephrase: we may not ever see all of Electron's documentation fully translated into Hebrew. New content will appear on the site as translations are made.

it is very conventional to have tech documentation in English

Indeed, but we have a policy of enabling all languages for which there are volunteer translators. Someone requested Hebrew, so we enabled it. Same with Arabic.

In looking into https://github.com/electron/electronjs.org/issues/1258 a.k.a. the parens fix (it does seem the dir="auto" is good enough to deal with that for now), I went down a localization/direction rabbit hole.
Once the localization for rtl languages (for instance Hebrew) is complete, would something like these examples be feasible?
Option 1

Option 2

The differences from the existing rtl are:

changing the navbar left padding to right padding

.site-header-nav-item + .site-header-nav-item {
    margin-left: 20px;
}

changing filter menu values from float right to float left (but should be using flex probably instead?)

.filter-item .count {
    float: left;
}

Also I'm unsure which column layout makes sense as far as rtl, but option 1 swaps the column order to match the language direction (I did it in flex but it's doable with float).

I was gonna suggest using a selector to conditionally apply directional behavior for rtl with html[dir="rtl"] i.e. to swap right and left in margins, floats, etc. but you're already doing that! Just not completely yet.
Let's take the navigation header for instance since @shlomi-noach mentioned it. So in styles/_basecoat-navigation.scss (lines 97-101) the seeds have been planted
// swap logo and nav for right-to-left languages
html[dir="rtl"] {
  .site-header-logo { @include breakpoint(lg) { float: right; } }
  .site-header-nav  { @include breakpoint(lg) { float: left; } }
}

but the next step needs to happen in bower_components/basecoat/scss/_navigation.scss! Adding
html[dir="rtl"] .site-header-nav-item {
  + .site-header-nav-item {
    margin-left: 0;
    margin-right: 20px;
  }
}

yields

which I think is what you're wanting!

Also <bdi> tags fix some issues having to do with mixed-language text. For instance in views/community.html adding <bdi> tags like so

🐎 <bdi>{{{localized.community.channels.get_started}}}</bdi>

etc

produces

which is an improvement over how it looks now

if only an incremental improvement.
Similarly, adding dir="auto" to the
 element of the Language Communities list replaces

with

which, again, is an improvement over how it is now with the funky parentheses I've been trying to find an overarching solution for in https://github.com/electron/electronjs.org/issues/1258.


Overwriting an array re-patches array methods, eventually resulting in stack overflow

First let me say – thanks for an amazing library! It's been really useful for our project 🙌
I've tracked down an issue related to array usage within SyncedStore objects, which eventually results in stack overflow. Here's the shortest example I could create that demonstrates the issue:
import { syncedStore } from "@syncedstore/core";

type StoreRoot = {
  foo: Foo;
};

type Foo = {
  bar?: number[];
};

const store = syncedStore<StoreRoot>({ foo: {} });

const count = 100000;

for (let i = 0; i < count; ++i) {
  if (i % 1000 === 0) {
    console.log(`${i} of ${count}`);
  }

  // Results in patchGetter('length') being called on the array, even though it's already been patched
  store.foo.bar = [42];

  // Once the loop has executed enough times, reading the length will result in stack overflow
  store.foo.bar.length;
}

Output:
0 of 100000
1000 of 100000
2000 of 100000
3000 of 100000
4000 of 100000
5000 of 100000
6000 of 100000
@reactivedata/reactive:372
  get: function get(target, key, receiver) {
                   ^

RangeError: Maximum call stack size exceeded
    at Object.get (@reactivedata/reactive:372:20)
    at observable (@reactivedata/reactive:287:13)
    at Atom.reportObserved (@reactivedata/reactive:561:12)
    at reportSelfAtom (@syncedstore/yjs-reactive-bindings:111:14)
    at YArray.descriptor.get (@syncedstore/yjs-reactive-bindings:185:9)
    at YArray.descriptor.get (@syncedstore/yjs-reactive-bindings:188:25)
    at YArray.descriptor.get (@syncedstore/yjs-reactive-bindings:188:25)
    at YArray.descriptor.get (@syncedstore/yjs-reactive-bindings:188:25)
    at YArray.descriptor.get (@syncedstore/yjs-reactive-bindings:188:25)
    at YArray.descriptor.get (@syncedstore/yjs-reactive-bindings:188:25)

In our application we run into this quite regularly during any periods of extended usage. Please let me know if I can be of any further help!

Thanks! This definitely looks like a bug and I'll dive into this.
Glad to here SyncedStore has been useful to your project, curious to hear what you're building!

Great find, this has been fixed now!

Great, thank you!


Logistic Classifier: disable probability output type for multiclass predict

import turicreate as tc

data = tc.SFrame([-100,-100,-100, 0,0,0, 100,100,100])
data['label'] = data['X1']
m = tc.logistic_classifier.create(data, 'label')

m.predict({'X1': 0}, output_type='probability')

The call to predict produces a long stack trace with the error message:
TypeError: Cannot convert [0.0773239 0.869718 0.0529583] to float
We shouldn't be trying to do a probability predict if the number of classes is more than two, per the docstring:
    - 'probability': Prediction probability associated with the True
      class (not applicable for multi-class classification)

We should just print a message about it being disabled for multi-class.

This feels like a regression. I'm pretty sure in 4.x, we provided that as an error message.

It's a bug.  It should work fine.  Something is just assuming that the output of predict is a float, when in fact it can be an array (Like here).

@hoytak I think that would be probability_vector option which isn't the same as probability.

@srikris Ah, yes, still a bug.


能否支持跳过指定目录

这个插件对我帮助很大，先谢谢作者！我现在有个小建议，项目有些文件不需要翻译，比如node_modules,.config等等，能否新增一个参数可以跳过指定目录，不然其他同级的目录需要一个一个的执行，效率比较低

在config中找到了对应配置

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定，因为关闭后没有任何近期活动。如果有相关 bug，请重新创建一个新 issue。

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
此 issue 已被自动锁定，因为关闭后没有任何近期活动。如果有相关 bug，请重新创建一个新 issue。


[Question] I have a random set of items added to my data structure then looked up

@AnthonyLloyd Hello,
I am pretty new to the property-based and random testing, so sorry if the question is stupid.
I have my own data structure (immutable tree) with the method AddOrUpdate<K,V>(this MyTree<K,V> t, int hash, K key, V val).
I want generate a random set of int keys (for simplicity) add them to the tree, then afterwards verify the every key is present via lookup GetValueOrDefault method.
Ideally, if the problem found I want to get a smallest set possible, so that I can repeat the test manually and debug the issue.

First, it's helped show a bug in the total no tests run that I've checked in a fix for now.
Second, it's a good little example of this test using CsCheck (had to set size as it's quite rare):
[Fact]
public void AddOrUpdate_random_items_and_randomly_checking_CsCheck()
{
    const int upperBound = 100000;
    Gen.Int[0, upperBound].Array.Sample(ints =>
    {
        var m = ImHashMap234<int, int>.Empty;
        foreach (int n in ints)
        {
            m = m.AddOrUpdate(n, n);
            Assert.Equal(n, m.GetValueOrDefault(n));
        }
        Assert.Equal(0, m.GetValueOrDefault(upperBound + 1));
        Assert.Equal(0, m.GetValueOrDefault(-1));
    }, size: 100_000);
}

Once I saw it fail I then reduced the size of the array and upperBound to give the shrinking a hand (I've also added the most shrunk seed I've got so far):
[Fact]
public void AddOrUpdate_random_items_and_randomly_checking_CsCheck2()
{
    const int upperBound = 91250;
    Gen.Int[0, upperBound].Array[1, 12].Sample(ints =>
    {
        var m = ImHashMap234<int, int>.Empty;
        for (int i = 0; i < ints.Length; i++)
        {
            int n = ints[i];
            m = m.AddOrUpdate(n, n);
            var actual = m.GetValueOrDefault(n);
            if (n != actual)
            {
                if (i + 1 != ints.Length) writeLine($"Not at end i = {i}");
                writeLine($"Array = {string.Join(", ", ints)}");
            }
            Assert.Equal(n, actual);
        }
        Assert.Equal(0, m.GetValueOrDefault(upperBound + 1));
        Assert.Equal(0, m.GetValueOrDefault(-1));
    }, size: 100_000_000, seed: "0ZPySr9kwyWr");
}

Array = 85213, 8184, 14819, 38204, 1738, 6752, 38204, 22310, 86961, 33016, 72555, 25102
A very interesting bug that needs length 12 array with quite high values.
Third reason was that John Hughes covered testing a dictionary insert in the following very interesting talk. He has a good way of testing it that I'll have a go at writing too. Key points are what metamorphic testing is and oversizing ints, array size etc can catch bugs much quicker.
How to specify it!

@AnthonyLloyd Thanks for test and the explanation! I will try it out Today.
Interesting that I saw the talk mentioned, even couple of times but did not quite get it - I mean the applied knowledge. Likely I did not have a familiar pain-inducing example before my eyes at that moment.

@AnthonyLloyd Thanks to the CsCheck and your example I was able to find and fix issues. Thanks.
Maybe it would be helpful to include into the CsCheck exception output the guide on how to use the "seed",
and/or automate the shrunk array output (at least for the primitive types). Or also include the note on how to get the array out.

Cool. I've update the exception message for the seed a bit more. It also now prints the shrunk sample for simple types and have added a print optional parameter to be able to do this yourself more easily. Thanks I think this makes it easier to use.
I've also done written the metamorphic code (and added ArrayUnique for a unique array). It just inserts 2 key/values in opposite order but we know the end result should be the same:
static Gen<ImHashMap234<int, int>> GenMap(int upperBound) =>
    Gen.Int[0, upperBound].ArrayUnique.SelectMany(ks =>
        Gen.Int.Array[ks.Length].Select(vs =>
        {
            var m = ImHashMap234<int, int>.Empty;
            for (int i = 0; i < ks.Length; i++)
                m = m.AddOrUpdate(ks[i], vs[i]);
            return m;
        }));

[Fact]
public void AddOrUpdate_random_items_and_randomly_checking_metamorphic()
{
    const int upperBound = 100000;
    Gen.Select(GenMap(upperBound), Gen.Int[0, upperBound], Gen.Int, Gen.Int[0, upperBound], Gen.Int)
    .Sample(t =>
    {
        var (m, k1, v1, k2, v2) = t;
        var m1 = m.AddOrUpdate(k1, v1).AddOrUpdate(k2, v2);
        var m2 = k1 == k2 ? m.AddOrUpdate(k2, v2) : m.AddOrUpdate(k2, v2).AddOrUpdate(k1, v1);
        var s1 = m1.Enumerate().OrderBy(i => i.Key);
        var s2 = m2.Enumerate().OrderBy(i => i.Key);
        Assert.Equal(s1.Select(i => i.Key), s2.Select(i => i.Key));
        Assert.Equal(s1.Select(i => i.Value), s2.Select(i => i.Value));
    }, size: 1_000_000);
}

I'll run it on your new code.

@AnthonyLloyd Interesting, will try it out.

I'll release these changes in the next couple of days, I have one other to make also.

1.1.0 released now with better message and ArrayUnique used above.
I've update the Map code to latest and see failures in the metamorphic test. As the John's talk says this metamorphic tests give very good testing coverage.

Great, I will look and close the issue. I think, I got all my answers. Thank you.

Now added this as an example to the readme. Thanks I think it's a good class of test problem.

In this case there is a useful model-based approach. As per the talk this is the best but not always possible:
[Fact]
public void AddOrUpdate_ModelBased()
{
    const int upperBound = 100000;
    Gen.SelectMany(GenMap(upperBound), m =>
        Gen.Select(Gen.Const(m), Gen.Int[0, upperBound], Gen.Int))
    .Sample(t =>
    {
        var dic1 = new Dictionary<int, int>();
        foreach (var entry in t.V0.Enumerate()) dic1.Add(entry.Key, entry.Value);
        dic1[t.V1] = t.V2;
        var dic2 = new Dictionary<int, int>();
        foreach (var entry in t.V0.AddOrUpdate(t.V1, t.V2).Enumerate())
            dic2.Add(entry.Key, entry.Value);
        Assert.Equal(dic1, dic2);
    }
    , size: 1
    , print: t => t + "\n" + string.Join("\n", t.V0.Enumerate()));
}

@AnthonyLloyd Found and fix the problem with the help of the methamorphic test, model-based one is passing as well. Thanks and closing.


Vision: Fix major bug when tuning_data is not specified

Issue #, if available:
#1147
Description of changes:

Fixed bug causing train_data and tuning_data to both use all the training data if tuning_data is not specified in ImagePredictor.
Improved usage of data splitting. Now it is deterministic and splits the exact specified proportion of data (rather than applying that proportion as a probability independently to each sample of being included in train vs val).
Data splitting now performs stratification if applicable.

NOTE:

A major bug still exists in ImageDataset.to_mxnet() that causes severe issues downstream by ignoring upstream data splits. This PR does not fix this bug, but rather avoids it for the specific instance of ImagePredictor.fit().

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Job PR-1168-4 is done.
Docs are uploaded to http://autogluon-staging.s3-website-us-west-2.amazonaws.com/PR-1168/4/index.html


Question: Why default to register a instance and not the class?

I was wondering why you do this. Maybe there's a reason in how Rodakase originally used the container, but I'm not sure. I'm trying to understand the intention a little better to avoid suggesting something against what you wanted to achieve.
Besides the default instantiation in the Loader, I don't know why you used the load path instead of using  full paths on requires to avoid collisions. If I have many containers this is a real risk, but I don't know if you only intended for one component container per app instead of many inside the same body of code. Lotus-container uses a namespace for the container by using a module.
Could you briefly clarify what the intention was? Maybe it's just a small working library you extracted from Rodakase and hadn't considered that, however probably it's the other way around and you wanted it that way for a reason. By knowing this better I can probably contribute or provide better feedback :)

The intention was always to use objects, not classes, so we register instances. We could consider making that configurable but you can always just register something manually to override default behavior.

I don't know why you used the load path instead of using full paths on requires to avoid collisions

I organize my code like libraries, even in app's codebases. So I use namespaces and dir/file structure match namespace. So I would never have a situation where require "foo" would load a file that defines Bar::Foo class. That's how I avoid collisions.
I suppose requiring files using full paths would not hurt though. It's something to consider.

Oh and one more thing - from the very start rodakase (thus dry-component too), has been built with multi app/container setups. There are a couple of improvements to be done though - like making it possible to share deps from one container in with other containers, or automatically prepending root identifier so that you don't have to specify it in import modules and probably few more things :) Regardless, this type of multi app/container setup already works just fine.

I split a big app in multiple containers and it ended having a collision risk because I could have mappers/product in two separate places taking care of separate data processing steps and concerns and one require could end up in another directory depending on the load path order.
Maybe I should just nest everything into one directory under the lib dir of every container but it's cumbersome when already having multiple dirs per container. But sometimes this feels very big and Java looking, like beyond the point of any use and just impractical. So I think it would be worth having an optional namespace per container. I think it's nice to have a lib folder per container and knowing for instance that lib/aloha.rb would map to LibNamespace::Aloha instead of what it currently expects which is Aloha so that I can reuse the name aloha somewhere else. For instance something like OperationInit could be duplicated per container, because what "initializing an operation" entitles is different but the name applies any way.
I think I get the point of having instances but from what I have been doing the last weeks it quickly collides with other tools. Consider an Anima object, I need access to the class to pass the hash for initialization so the instance doesn't work very well in some cases. Maybe we could use extra config methods to specify the loading strategy?
Also, I was unable to find a situation where I would autoregister a lib and not need it available in the load path, so it probably makes sense to link this too better because when you try to autoregister a directory not explicitely in the path it cannot find the file. Maybe the load path method could be lower level?
Finally, I noticed that a container naturally ends up exposing a smaller interface to other container. For instance I created a JSON API with three containers, one for HTTP stuff, one for persistence, and one for data processing and business logic. I ended up exposing a single object from the DB to the business logic and another one from there to the HTTP handler. So in the end it felt like containers could be classes that I could jus instantiate and inject dependencies. This is somewhat different from how I did with dry-component which was registering in the container the dependency on boot, but it felt "too global
". So I don't know if you see a case where the container could be not only a singleton but an instance where initial config like dependencies can be injected? I'm entirely sure about this, just thinking about the possibilities and potential benefits of a more radical boundary given the instantiation vs. the singleton.
Many points in the conversation, just let me know what you think and thanks for the openness and responsiveness. I'm still learning a lot so please feel free if any idea sounds like a plain stupid architectural choice :)

I split a big app in multiple containers and it ended having a collision risk because I could have mappers/product in two separate places taking care of separate data processing steps and concerns and one require could end up in another directory depending on the load path order.

We can try adding support for including container namespace automatically so that you can have lib/products/mapper in two places and Loader would assume it's namespaced if this behavior is enabled in its container.

I think I get the point of having instances but from what I have been doing the last weeks it quickly collides with other tools. Consider an Anima object, I need access to the class to pass the hash for initialization so the instance doesn't work very well in some cases.

There are types of objects which should not be registered in container. Anima (thus struct-like data-objects) are one of these types. ie I do not use container for my dry-types, it's not needed.

Maybe we could use extra config methods to specify the loading strategy?

Yes it could be done but would definitely complicate the library and its usage. I'm not yet sure if I'd support this.

This is somewhat different from how I did with dry-component which was registering in the container the dependency on boot, but it felt "too global
". So I don't know if you see a case where the container could be not only a singleton but an instance where initial config like dependencies can be injected?

Not sure if I follow. A container which is an instance that gets its deps injected in...injected in by what? :)

What types of objects shouldn't be registered? I used it for everything! Basically I used the container as a tool to structure related files covering one big concern that have a single limited way to interact with other concerns. Everything related to persistence goes in the Storage container including helpers, mappers, methods that expose access to specific queries, initialization of the Sequel and plugins/extensions... What shouldn't be registered? Maybe I'm not using it in the most orthodox way.
I agree in keeping simple the config of the library. Maybe solving my question about what shouldn't be registered this will clear out. Also the next point expanding on your final question is also related to this:
Let's say I have an MyApp container which inherits from Dry::Component::Container, it has all the business logic and interacts with a Storage container that could be replaced for an in memory mock for testing (just for the sake of explaining the point).
Ideally I'd like to pass the storage in this way: y = LeStorage.new; x = MyApp.new(storage: y), and now I can do x['ops.create_session].call(input) and that would run my "operation" that will call methods on y that I passed as the storage: for this instance of the container.
Notice I have the resolution access on x instead of doing MyApp['ops.create_session']. By doing this I know that CreateSession will use whatever storage was given on initialization, there's no global definition of what storage is within MyApp. What I'm doing today is MyApp.register 'storage', LeStorage but that's what I see as "too" global. I would totally prefer to have a way to "inject" into the container something in one specific point as opposed to registering anywhere on the code.
Maybe I'm overvaluing it, but I think it could be nice to see something like this in my config.ru:
storage = SQLStorage.new **StorageConfigType[ENV]
handler = BizLogic.new storage: storage
router = HTTPAPI.new operations: handler['operations']

run router['rack']

Anywhere else on the code I can test with different storages, handlers or routers to confirm it'll work as expected. It's mostly a benefit of isolation that could be great for testing and avoid entirely the notion of a global resolution within the container. Is it clearer? Makes sense? I suppose this is heavily connected to the "there's no need to register that" point you made before :)

@davidpelaez on #6 I tried to implement the "namespaced" It still needs some work, but I faced similar issues since I wanted to work with a AppNamespace::SubNamespace::Constant scheme and having every file looking like ./components/sub_namespace/lib/app_namespace/sub_namespace/constant.rb felt like a real pain.

Gonna close this one as it seems like there's nothing to do here.


Fix Symfony 5.1 deprecation

Since symfony/http-foundation 5.1: The "Symfony\Component\HttpFoundation\Response::create()" method is deprecated, use "new Symfony\Component\HttpFoundation\Response()" instead.

See:
https://github.com/symfony/http-foundation/blob/5.1/Response.php#L223-L240
and
https://github.com/symfony/http-foundation/commit/bfe9753cf60ed93b11b6bbb8f680db17d1f72878

Thanks for your PR!


fix(client_core): :bug: Fix staging texture resolution

Fixes #2374

Can you explain more about this, what was happening before and whats the fix about ? Its effect on decoder latency  ? I think this will increase the latency even more

@ShootingKing-AM This has nothing to do with latency. it's simply a bug where the decoder output has a certain size but we render it to a texture with half the width. OpenGL itself doesn't care about these bugs.

Fixes #2374

@The-personified-devil it did

@zarik5 it did cause I edited your message to do it

gotcha


Add provisional support for v1.3

Adds v1.3 API endpoints and mDNS announcements, but won't handle downgrades properly yet as the schemas for v1.3 have not been tied down.

This service is very parameterised, so the new API endpoints get added just by changing this array. The meat of any changes would be in the pipeline manager or other users of the facade class for us, as these will need to update their schemas and indicate that Sources/Flows etc are v1.3 compatible.


how can i cross compile rust project from windows10 to linux

Cross.toml:
[build]
default-target = "x86_64-unknown-linux-gnu"
[target.x86_64-unknown-linux-gnu]
pre-build = [ "apt-get update && apt-get install -y libssl-dev" ]
execute in windows cmd:
cross run --target  x86_64-unknown-linux-gnu
==================
[cross] warning: using newer rustc 1.80.0 (051478957 2024-07-21) for the target. Current active rustc on the host is rustc 1.79.0 (129f3b996 2024-06-10).

Update with rustup update
Dockerfile.x86_64-unknown-linux-gnu-custom:5

3 |                     ARG CROSS_DEB_ARCH=
4 |                     ARG CROSS_CMD
5 | >>>                 RUN eval "${CROSS_CMD}"
ERROR: failed to solve: process "/bin/sh -c eval "${CROSS_CMD}"" did not complete successfully: exit code: 100
View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/2m9nekppq5j9aevvv3jww4c4k
Error:
0: could not run container
1: when building custom image
2: when pre-building
3: "C:\Program Files\Docker\Docker\resources\bin\docker.exe" build --label 'org.cross-rs.for-cross-target=x86_64-unknown-linux-gnu' --label 'org.cross-rs.workspace_root=d:\works\raymond\bc_works' --tag cross-custom-bc_works:x86_64-unknown-linux-gnu-76b69-pre-build --build-arg 'CROSS_CMD=apt-get update && apt-get install -y libssl-dev' --build-arg 'CROSS_DEB_ARCH=amd64' --file 'd:\works\raymond\bc_works\target\x86_64-unknown-linux-gnu\Dockerfile.x86_64-unknown-linux-gnu-custom' 'd:\works\raymond\bc_works' failed with exit code: 100
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1: BaseThreadInitThunk
at :
2: RtlUserThreadStart
at :
Note: CROSS_CMD=apt-get update && apt-get install -y libssl-dev.
Before that, i've tried use CROSS_CMD in Cross.toml:
[target.x86_64-unknown-linux-gnu]
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update && apt-get --assume-yes install libssl-dev:$CROSS_DEB_ARCH"
]
but the same problem.

ERROR: failed to solve: process "/bin/sh -c eval "${CROSS_CMD}"" did not complete successfully: exit code: 100

Suggests an error with your docker. What does docker-desktop://dashboard/build/desktop-linux/desktop-linux/2m9nekppq5j9aevvv3jww4c4k say? (Paste it into a webbrowser)

ERROR: failed to solve: process "/bin/sh -c eval "${CROSS_CMD}"" did not complete successfully: exit code: 100

Suggests an error with your docker. What does docker-desktop://dashboard/build/desktop-linux/desktop-linux/2m9nekppq5j9aevvv3jww4c4k say? (Paste it into a webbrowser)

oh, yes, thank you for reminding me


#144: Paging for OrderHistoryPage and update PageListBlock

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.1 out of 2 committers have signed the CLA.:white_check_mark: tanvu-epi:x: lunchinYou have signed the CLA already but the status is still pending? Let us recheck it.


Is there a reason Closed Connection Adapter should be hidden?

I have two libraries that straight away need the same functionality as
https://github.com/aspnet/KestrelHttpServer/blob/dev/src/Microsoft.AspNetCore.Server.Kestrel.Https/HttpsConnectionAdapter.cs#L151
Does it need to be a private nested class?

I hadn't considered that other adapters would want this, but it makes sense that they would.
I expected the first complaint to be about there being no basic AdaptedConnection class with a settable Stream property and a no-op PrepareRequest method.

And the closed stream... are you reading my whiteboard?

Out of curiosity, what are you building?

All bad bad things... :)
TLS libraries, windows auth without IIS or Http.sys... looking at kerb for linux next
Leto a better? Https Library
Windows Auth without HTTP.sys or IIS
Blog on writing the TLS13 Library

@shirhatti could you schedule a design meeting?

No reason for the close?

We're making this API pubternal for 2.0.0 and this can easily be replicated with the public surface that's there today

Cool. Good to have an answer for the close :)


[SPARK-8953] SPARK_EXECUTOR_CORES has no effect to dynamic executor allocation function

The configuration SPARK_EXECUTOR_CORES won't put into SparkConf, so it has no effect to the dynamic executor allocation.

Merged build triggered.

CC @vanzin @sryza seems reasonable?

Merged build started.

Test build #36928 has started for   PR 7322 at commit 2cafa89.

Test build #36928 has finished for   PR 7322 at commit 2cafa89.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

I looked at the branch-1.3 version of the code, to make sure I didn't break this with the launcher refactoring... and the only place where this env variable is read is in YarnClientSchedulerBackend.scala - exactly the same as in master.
Given that we don't really want to add support for more environment variables, I don't think adding this brings any value. The right way to do this is through the configuration file, or using either --conf or --executor-cores in the command line.

This change seems fine. It's not strictly necessary but it doesn't hurt to add it to be consistent with the other options here. I also agree it doesn't have much to do with dynamic allocation.

Merging into master


CSS not selective enough - conflicts with other views

Hi aljawaid,
i'am sorry for bothering again. But i've an other issue with ccs coming from the plugin-manager plugin and interfering with other views / pages in Kanboard.
This one overwrites css for my links (a elements) on the board.
a, details, summary, i, img, table, tr, .btn-uninstall, svg, #PluginSideBar > ul li, figure {
    transition: var(--transition-pm);
}

a:hover {
    color: var(--pp-red-alt-2) !important;        <--- important is very bad for a plugin...
}

Here in this picture you can see that settings belonging to the plugin are active on my board view:

I fear this is a general issue. Plugin CSS overwriting other, general settings, because it's not selective enough. The CSS should be dedicated to the plugin by using specific classes in the html and only mark out this classes or IDs.
Sorry, i'am not complaining! I appreciate your great contributions to Kanboard! But i think this can lead to seroius issues.
Cheers, Fx

the reason why you see a few global tags is because I copied the code from my KanboardCSS plugin.  I honestly didnt think any of my plugins would be popular or so interesting for others.
I will change it here and in my other plugins over the coming days.

honestly didnt think any of my plugins would be popular or so interesting for others.

😄 😄 👍


Add logging option

Would be beneficial with a log stored with the dump of what's been dumped and an additional error log of any issues during the dumping. Since many games has thousands upon thousands of files it's sometimes important to know what files it weren't able to dump.

would it be acceptable to log automatically or would it have to be a command line flag?

It would be better as a command line option though in its current state it would be fine to log all the time so that users can properly have a means diagnose cases where dumping fails.

I've dome some adjustments after merging your PR to clean up some of the file logging structure and to protect against some heap corruptions that were happening when interpreting std::wstrings in the shared IPC memory region.
This is the commit: https://github.com/Wunkolo/UWPDumper/commit/2883ab4e81d1a6035f4c3c047d78b544434bdd63
Log files will now use an ISO-8601 format time stamp
as well as the package name to resolve the file name.

ISO-8601 is selected as the files are monotonically increasing
so sorting by file-name will also sort by time. The package name
is also used in the file name rather than the .exe name in protect
against the case in which separate winapp packages use the same
executable name despite being different packages.

Dump log files will look like this now:

I think this issue can now be closed


[danger.yml] is python path still needed?

Is this still necessary for danger + proselint?
echo "/Users/runner/Library/Python/2.7/bin" >> $GITHUB_PATH

https://github.com/jessesquires/template-iOS-macOS/blob/main/.github/workflows/danger.yml#L35

i removed proselint recently.
not super useful in the context of iOS/macOS projects.
so, closing this.


This is one of the dumbest things I've seen.

Thankfully I've already updated GPO's and our deployment xml files to block it but it should have never been a option in the first place.

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

ID: 77fb57a0-9af1-8ade-5846-4a44c6e1a702
Version Independent ID: 24c49cab-e850-df1f-5050-bac2c37c96bd
Content: Microsoft Search in Bing and Office 365 ProPlus
Content Source: DeployOffice/microsoft-search-bing.md
Service: o365-proplus-itpro
GitHub Login: @DHB-MSFT
Microsoft Alias: danbrown

Based on customer feedback, we're making some changes to the plan to roll out the extension for Microsoft Search in Bing. For information about the changes, read this announcement. This article will be updated when more details are available.


Improve create issue form

Add heading "Issue location"
Add initial marker to map

remove organisation selection, #16


Does not support showConfirmButton={false}

Cannot hide the cancel button to show an alert with no buttons.
Should be able to pass prop:
showConfirmButton={false}

What is your use case for having no buttons? Just curious.

Cool as - to use during ajax request as user feedback/msg and then hide on successful response.

Like a spinner?

At that point, but then changing the the waiting state of the alert to one of user feedback eg: success/danger + messaging and show buttons once we have response. Could do with hidden class on confirm button - but swal does support showConfirmButton, so just wondered whether we could add here.

OK. I'll add it.

Great, thank you!

implemented as props.showConfirm.  Defaults to true.


Blockthespot or SpotX support

I love having my lyrics back on mobile but it would also be great to have them back on desktop, on one of the main mods for spotify

I love having my lyrics back on mobile but it would also be great to have them back on desktop, on one of the main mods for spotify

That would require the devs of those projects to implement them. Also, lyrics are free again, so mods shouldn't be required to use them afaik. Even if they aren't on those 2, you can always use Spicetify.

Lyrics are not free. That's why this repo exists actually. And yes spicetify does have some lyrics extensions but none as easy and "unmodified" as this API

Interesting, lyrics are still not avaliable for me, the button does appear but on all songs that I know 100% have lyrics (e.g. Taylor swift or other big name artists) the button is greyed out.


mujoco-py needed

Hi,
does any else the problem that mujoco-py is missing. The installation is due to regestritation and fees a little bit annoying. I'm working with python3 and ubuntu18.04.
Best regards,
ilja_stas

Mujoco is only needed for the examples. You can write your example for an environment/RL task that is not based on mujoco.


Rf/zenko 250 portmdsearchtest

Documentation: #1220

PR has been updated. Reviewers, please be cautious.

PR has been updated. Reviewers, please be cautious.

and the design !

I have split the documentation into another PR https://github.com/scality/S3/pull/1220

PR has been updated. Reviewers, please be cautious.

PR has been updated. Reviewers, please be cautious.

PR has been updated. Reviewers, please be cautious.

PR has been updated. Reviewers, please be cautious.

PR has been updated. Reviewers, please be cautious.

CONFLICT (add/add): Merge conflict in package.json
CONFLICT (add/add): Merge conflict in package-lock.json
CONFLICT (add/add): Merge conflict in lib/metadata/ModelVersion.md
CONFLICT (add/add): Merge conflict in lib/api/bucketPutLifecycle.js


25% regression in web_benchmarks_skwasm:bench_material3_scroll_semantics.skwasm.drawFrameDuration.average

Introduced in https://github.com/flutter/flutter/pull/144208
skia perf
cc @eyebrowsoffire

The PR that triggered this change was a engine roll with a number of changes. I ran benchmarks against a number of the intermediate commits in order to further isolate the issue, and it appears to have happened with this Dart SDK roll specifically: https://github.com/flutter/engine/pull/50979
There are a few dart2wasm-specific changes in that roll, but I haven't yet isolated it down to a specific dart commit.

The "root cause" of the regression is according to my analysis - https://github.com/dart-lang/sdk/commit/c625797f8a3ea9a346d5170ada18d1d6f57e36d6 - which implemented proper dart:developer.

After that CL landed, the APIs in dart:developer actually do something as supposed to before where they were stubbed out.
The fact that this shows as 25% regression means that what this benchmark is measuring is to a large extend measurement logic itself (e.g. timline events etc) itself.
This can be seen in the profiles of before/after quite clearly: Timeline.startSync / Timeline.finishSync are high on the profile (e.g. called by PipelineOwner.flushSemantics)
When running the benchmark manually in the browser window, it jitters around, gut doesn't actually sroll down and up
Given the above, I assume the flutter benchmarking system is benchmarking --profile mode and not --release mode?
Together this somewhat puts into question the usefulness of this benchmark.

In any case, I'll close this as working as intended.

The fact that this shows as 25% regression means that what this benchmark is measuring is to a large extend measurement logic itself (e.g. timline events etc) itself.
Given the above, I assume the flutter benchmarking system is benchmarking --profile mode and not --release mode?

I wouldn't dismiss a benchmark because it is measuring a large portion of profiling overhead.  That is the point of --profile mode, to be profiled =)  If that mode creates so much overhead that the profiles are no longer useful, that's a problem.  Would it be prudent to revisit the performance of dart:developer on the web?

It's not that the profiles are not useful, the baselines have just changed. I think that's perfectly reasonable. I think it's a good idea to just rebaseline this and triage the skia perf notification and close this bug. I just wanted to make sure we weren't actually regressing rendering performance before closing it.

I wouldn't dismiss a benchmark because it is measuring a large portion of profiling overhead.

If the program I want to measure behaves - when measuring it - 25% differently from real world, then that's a problem. The numbers just won't be representative of the real app (and we only care about the real app). When profiling & optimizing real world apps one needs to get metrics for the real app.

If that mode creates so much overhead that the profiles are no longer useful, that's a problem. Would it be prudent to revisit the performance of dart:developer on the web?

The problem may not be the dart:developer implementation per se, it just forwards calls to the browser APIs. It may be more due to the framework doing significantly more work in --profile mode than in --release mode. Could it be that we issue too many timeline events (given the work that happens in-between)?
Two more things

the actual benchmark in the web page doesn't seem to scroll properly (try running it) it just moves few pixels down & up, instead of scrolling new widgets in. Is this intentional?
the fact that the profile ran just fine before the CL, means that those timeline events aren't needed for the benchmark to run. Can those benchmark run in --release mode instead?

Could it be that we issue too many timeline events (given the work that happens in-between)?

Maybe that's something we could help with?  Elide timeline events that happen at too high of a frequency?  I imagine what is an acceptable frequency will depend on the target platform which will be difficult of users to get right in all cases.


⚠ Turnos 24x7 has degraded performance

In a25280a, Turnos 24x7 (https://reservas-dev.alternativasinteligentes.com/) experienced degraded performance:

HTTP code: 200
Response time: 834 ms

Resolved: Turnos 24x7 performance has improved in dcd8ce5.


Unable to resolve SSL / Connection timed out error

We are getting an error when Apache stats up, that we were unable to retrieve metadata from url since changing over to SSL in preparation for deploying to Staging and Production.  We have had it working without SSL previously.  I have adjusted the OIDCHTTPTimeoutShort, but that was not the issue.  I realize it is very likely a configuration issue on our side, but I was hoping you might be able to give us some feedback to get us in the right direction.
Environment

mod_auth_openidc version => 2.3.0
Apache version =>2.4
platform/distro => Ubuntu

Expected behaviour
On startup, the metadata should be able to successfully retrieve the metadata from the OP.
Actual behaviour
We are receiving the following error:
[Tue Mar 13 19:23:27.039793 2018] [auth_openidc:error] [pid 8:tid<PHONE_NUMBER>32896] [client xxx.xxx.xxx.xxx:55215] oidc_util_http_call: curl_easy_perform()  failed on: https://myapp.mydomain.com/openid-connect-server-webapp/.well-known/openid-configuration (Failed to connect to myapp.mydomain.com port 443: Connection timed out)
[Tue Mar 13 19:23:27.039839 2018] [auth_openidc:error] [pid 8:tid<PHONE_NUMBER>32896] [client xxx.xxx.xxx.xxx:55215] oidc_provider_static_config: could not retrieve metadata from url: https://myapp.mydomain.com/openid-connect-server-webapp/.well-known/openid-configuration
NOTE: We are able to hit the url:
https://myapp.mydomain.com/openid-connect-server-webapp/.well-known/openid-configuration
from the browser to get the correct information back from the OP.
Configuration and Log files
Basic pieces of configuration to support this:
OIDCProviderMetadataURL https://myapp.mydomain.com/openid-connect-server-webapp/.well-known/openid-configuration

OIDCClientID xxxxxxxxxxx
OIDCClientSecret xxxxxxxxxxxxx
OIDCScope "openid email profile"
OIDCResponseType "code"

OIDCClientName My-Application
OIDCAuthRequestParams "xxx=xxxx"
OIDCCookieHTTPOnly On

OIDCSSLValidateServer On
OIDCOAuthSSLValidateServer On

OIDCCryptoPassphrase xxxxxxxxxxx

OIDCRedirectURI https://myapp.mydomain.com/openid_connect_login
OIDCInfoHook access_token

Resolved Security Group Issue


Changing the default operator

@klauer, @slacAWallace
I noticed that you have discussed the changing the default operator.
Is there any progress on this?
I don't think raw is not suitable for all users, but a customizable default operator is promising.
Changing it on the data source settings page is one candidate.
I'm considering implementing the select option on the data source settings page to change the default operator.
The settings page will look like the following image:

Does this implementation meet your requirement?
Any comments are welcome.

Hi @sasaki77, thanks for bringing this up!
I agree that 'raw' is probably not the best default for most.
I think that your proposed solution of having the default operator be configurable in the data source settings makes a lot of sense 👍
This change request by @slacawallace came out of an issue that we encountered with alerting when using non-raw operators with stale data. If I recall correctly it was something like (for example): data was last updated in the archiver yesterday, panel alert time frame set to last 5 minutes, which then resulted in a 'no data' condition and led to many alerts. However that's a different discussion that we should open a separate issue for (ping @tangkong - want to make a new issue in this repo?)

Hi @sasaki77 I like your proposed solution.
It is as @klauer says, the inciting incident(s) was a torrent of alert messages coming from no-data conditions.
It's not yet clear to us if it's because of a timeout stemming from an overloaded archiver or something in-between or an issue with the query that the plugin forms or with how the response is handled. I had mistakenly thought (prematurely) that it was due to the mean vs. raw or last operator being chosen. I no longer believe this is the issue.
In any case I think we would elect to have our default operator probably be raw, last or lastFill. Being able to elect what the default will be for us is great!


MTU issues on networks with special needs

Some people running on GCE have experienced the following problem:

In containers, I can ping, resolve DNS, make outbound SSH connections,
and curl small resources. But bigger transfers (e.g. apt-get update, or
installing packages) will randomly hang.

It has been traced to a MTU problem[1], which prevents the Path MTU Discovery algorithm[2] from working correctly. It typically happens when intermediary routers drop the packets used by PMTUD, either because they are ICMP, or because they have the DF (don't fragment) bit set.
To work around this, #3289 now allows to set the MTU of the containers' virtual interfaces. This works very well, but requires manual configuration.
We're looking for an automated way to set that MTU, to make people's experience better when they use GCE (and other places where the routers have problems). #3504 is an effort in that direction.
There are (at least) two ways to do that (and by the way, they can be used together).
(1) Detect the smallest suitable MTU, and propagate it to the container.
There are multiple variants here. You can go through all interfaces and pick the smallest MTU. This is probably suboptimal, because many machines will have tunneling or exotic interfaces with very small MTUs.  A better approach is to scan the routing table to find out the default route(s), and find the smallest MTU here. For pipework, I plan to use a variant of [3] to achieve this.
(2) Clamp the TCP MSS.
The problem is not new. It started to spread ~15 years ago, when DSL operators (which should have known better) started to encapsulate traffic (causing the MTU to be lower) without allowing PMTUD to work properly. The typical symptom was "my machine can access Internet alright, but I'm sharing the connection with other machines, and it randomly freezes on those other machines". The solution was to clamp (forcibly reduce) the MSS (maximum segment size) of TCP SYN packets[4][5]. This can be achieved by a simple iptables rule, and it should allow each path to perform to the best of its abilities (e.g. if part of your infrastructure is using jumbo frames, you might still be able to use them).
MSS clamping add very minimal load on the host. It adds one iptables rule which will just check if packets are TCP SYN, i.e. if they are the first packets of a TCP connection each way. When such a packet is found, the MSS option field is reduced to be the detected PMTU (which will be the MTU of the outgoing interface, minus 20 bytes). On the one hand, it's disruptive since it affects the end-to-end property of the TCP connection. On the other, when you're doing masquerading, you're already affecting that property (if only by changing IP addresses, and very often, TCP source ports), so it should be a minor concern.
[1] https://code.google.com/p/google-compute-engine/issues/detail?id=57#c17
[2] http://en.wikipedia.org/wiki/Path_MTU_Discovery
[3] https://gist.github.com/jpetazzo/8428406
[4] http://lartc.org/howto/lartc.cookbook.mtu-mss.html
[5] http://www.linuxtopia.org/Linux_Firewall_iptables/x4700.html

Can you please give more info on how it has been resolved? I am still experiencing the same issue on Docker 1.7.1, build 786b29d.
This issue also looks similar: https://github.com/docker/docker/issues/12565

@macrokernel You can specify the mtu on the daemon.

Unfortunately this is not a fix, but is rather a work-around, as a multi-homed host may have different MTU settings on different interfaces. Jérôme has written above a detailed explanation of why it is not the best way.

@macrokernel I would agree, having that per container would be good... I think at this point there should be a new issue, likely on github.com/docker/libnetwork

@cpuguy83 Having MTU setting per container would not help IMO, as it would still be manual. It would be great to have something automated like [2] or [3] above.

@cpuguy83 Ah, no, [3] will not work as MTU may be smaller somewhere between a docker host and a client (WAN VPN, DSL provider, etc), therefore only Path MTU discovery may help solve this issue in an automated way.


What is serviceWrapper in the static example?

I'm using static client with metadata, tried codes below but didn't work.
const HelloService = require('./static/Hello_grpc_pb');
const client = caller('localhost: 50051', HelloService.HelloServiceClient);
const result = await HelloService.queryList({ name: 'tom' }, { node_id: 1 });

const HelloService = require('./static/Hello_grpc_pb');
let client = caller('localhost: 50051', HelloService.HelloServiceClient);
client = caller.wrap(client, { node_id: 1 });
const result = await HelloService.queryList({ name: 'tom' });

{ node_id: 1 } is my metadata.

I can't understand what is serviceWrapper in the document, how to define it?
Thanks!

Hello the documentation here was misleading. It's been updated. Thanks for pointing this out.

Nice! 👍
But I'm still confused about adding metadata with caller in static example.
code without metadata works well:
const messages = require('./static/helloworld_pb');
const services = require('./static/helloworld_grpc_pb');
const request = new messages.HelloRequest();
const client = caller('localhost:50051', services.GreeterClient);
const result = await client.sayHello(request);
console.log('result', result.getMessage());

code with metadata doesn't work:
eithor:
const services = require('./static/helloworld_grpc_pb');
const credentials = grpc.credentials.createInsecure();
const client = caller('localhost:50051', services.GreeterClient, credentials, {}, { node_id: 1 });

or:
const result = await client.sayHello(request, { node_id: 1 });

my metadata is { node_id: 1 }
Can u show where to put metadata in static example?
Thanks!

Hello, you can use caller.wrap() to wrap an existing client instance:
const messages = require('./static/helloworld_pb')
const services = require('./static/helloworld_grpc_pb')

const interceptor = (options, nextCall) =>
  new grpc.InterceptingCall(nextCall(options), {
    sendMessage: (message, next) => {
      const name = message.getName()
      message.setName(name + 2)
      next(message)
    }
  })

const options = grpc.credentials.createInsecure()
options.interceptors = [interceptor]

// create grpc client with insecure option and client side interceptor
const serviceClient = new services.GreeterClient(TEST_HOST, options)

// wrap the grpc client and add default metadata to all calls
const client = caller.wrap(serviceClient, { foo: 'bar' }, options)

const request = new messages.HelloRequest()
request.setName('Bob')

// make the call, also adding request metadata
const response = await client.sayHello(request, { ping: 'meta' })
console.log(response.getMessage())

Hope this helps.

Thanks a lot! This do help me! It works! 👍👍👍

Hi, I need your help again. 😄😂
I'm trying to get metadata and status from the response but can't get them, the codes are the same as above.
I find that there's Request API in the document, it says "The API can only be used for Unary and request streaming calls". So does it support static example?

Hi, Does Request API support static example?
I'm trying to get metadata and status from the response but can't get them.
I find Document says "The API can only be used for Unary and request streaming calls".
const options = grpc.credentials.createInsecure();
const messages = require(`./static/helloworld_pb`);
const services = require(`./static/helloworld_grpc_pb`);
const request = new messages.HelloRequest();
const client = caller('localhost:50051', services.GreeterClient);
const clientMetadata = { a: 1 };

const req = new client
  .Request('sayHello', request)
//  .Request('sayHello')
//  .withGrpcOptions(request)
  .withMetadata(clientMetadata)
  .withResponseMetadata(true)
  .withResponseStatus(true)
  .withRetry(5)
const res = await req.exec();

console.log(res.response);
console.log(res.metadata);
console.log(res.status);

const res = await client.sayHello({ name: 'Bob' }, {}, { retry: 3, responseStatus: true, responseMetadata: true })
console.log(res)

I tried the static with Request API and normal but doesn't work. 😂
Thanks!

//  const client = caller.wrap(serviceClient, requestMetadata, { retry: 3, ... }); // wrong if add options
  const client = caller.wrap(serviceClient, requestMetadata); // right without options
  const req = new client
  .Request('sayHello', request)
   .withMetadata(requestMetadata)
   .withResponseMetadata(true)
   .withResponseStatus(true)
   .withRetry(5)
  const res = await req.exec();
  console.log('res', res);

Finally work out with Request API. 😂😂
After a lot of tries, I find that the wrap call options should be deleted. 😂😂😂


hasClassName throws Error if component has property className which is not a string

Hi,
We use a utility like JedWatsons classnames(https://github.com/JedWatson/classnames) for setting classnames on our components. Syntax is like this:
<MyComponent className={ { classA : true, classB : false } } />

This makes the internal hasClassName and all functions in the api blow up with the exception TypeError: classes.replace is not a function since the property className is a object.
In my view the hasClassName function should not throw a exception if it encounters a custom component with a className attribute that is not a string. From my usage of enzyme I have the assumption that you are generally looking for native components when the hasClassName function is used. If that assumption is considered true I am tempted to suggest the following patch:

If node.type is a non-native component(function) and className is not a string return false.
If node.type is a non-native component and className is a string, run the check as today (for backwards compatibility)

It could probably also be possible to take the defined proptype into consideration.
/Joakim

This is documented in https://github.com/airbnb/enzyme/issues/375, you can watch that issue for updates! Thanks!

Also, classnames doesn't return an object. It takes an object and returns a string based on the key's value.
import classNames from 'classnames'

const className = classNames({
  foo: true,
  bar: true,
  baz: false
});
// returns "foo bar"

Hi,
Thanks for your input. Might be that I misunderstand the proposed fix in the referenced issue, but after I looked through the PR that is connected with the ticket you referenced, it seems to me that it will not solve the issue.
They are discussing a SVG specific solution(using baseVal) which does not solve the general naming collision where a custom created component has a className attribute. You are right that the classnames utility returns a string, and how we use it, is something like this:
import classNames from 'classnames';
class MyComponent extends React.Component{
  render() {
    <div className={ classNames( this.props.className ) }> { this.props.children} </div>
  }
}

ReactDOM.render(
  React.createElement(
    MyComponent,
    { className : { classA : true, classB : shouldIAppendClassB(), classC : false }}
  )
);

Wouldn't it be more appropriate in the hasClassName method to assume the check is not applicable if the component has no className attribute that should be a string(defined by propTypes on custom components)? The problem comes in the find methods, because they iterate all components, also non-native.
Also, in the issue you linked, it seems to me that the proposed fix only affects the full rendering functionality, not the shallow part.
Best regards
Joakim

Thanks for expanding, we can re-open this as I agree that shallow shouldn't fail if a className prop is not a string.

Thinking about this more, I'm not sure if supported arbitrary types in className is a good idea. It's meant to be the API for controlling the class attribute which requires a string. If we allow className to be an object, then there's no reason we shouldn't allow it to be a function or array.
I would recommend using a different prop name to pass down class data like this, and then use className on the DOM elements you render at the leaves of your component tree.
@ljharb what do you think?

Is this still an issue in v3?


Build failing when parsing MDX

Getting errors when attempting to build the application.
Specifically:
 ERROR #95313

Building static HTML failed for path "/modules/pl7505/1-discussion"

See our docs page for more info on this error: https://gatsby.dev/debug-html

   9 | /* eslint-disable react/display-name */
  10 | export default {
> 11 |   h1: props => <Heading id={props.children.replace(/\s+/g, '').toLowerCase()} {...props} is="h1" fontSize={[5, 6]} />,
     |                                            ^
  12 |   h2: props => <Heading id={props.children.replace(/\s+/g, '').toLowerCase()} {...props} is="h2" fontSize={[4]} />,
  13 |   h3: props => <Heading id={props.children.replace(/\s+/g, '').toLowerCase()} {...props} is="h3" fontSize={3} />,
  14 |   h4: props => <Heading id={props.children.replace(/\s+/g, '').toLowerCase()} {...props} is="h4" fontSize={2} />,

  WebpackError: TypeError: Cannot read property 'replace' of undefined
  - index.js:11 h1
    src/components/mdxComponents/index.js:11:44

⠸ Building static HTML for pages

The repo I'm trying to build is at: https://github.com/readywater/sec.andrewlb.com
And I'm trying to deploy it to gh-pages as well, though this is pre-deployment, as the failure is happening on the build phase.

@readywater
The reason this isn't building properly is because there's an empty markdown h1, and I assume the build process is looking for some string at this point?
Look in your code here:
https://github.com/readywater/sec.andrewlb.com/blame/master/content/modules/pl7505/1-discussion.md#L7

@readywater - This usually happens when the heading tags (h1, h2 .., h6) are empty or if they have special characters like `, quoting the string in between.

I'm closing this for now. Feel free to reopen if it breaks for you in normal usage.


Invalid closing tags should raise error

Saw this one on here:
http://discuss.codeschool.com.s3.amazonaws.com/824c71d9d5867b65fee2dd5c596192164b2e97962d5.PNG
Looks like someone had this, and it wasn't marked as an error:

something<h/4>

This also seemed to happen here: http://i.imgur.com/00HeZ8x.jpg

Tour Dates</3>

The new parser output for these:
h3 is not a valid self closing tag
h4 is not a valid self closing tag


If exception occurs in AuthorizationHandler then ExceptionFilter doesn't catch it

Is this a Bug or Feature request?:
Bug or by design?
Steps to reproduce (preferably a link to a GitHub repo with a repro project):
public override void ConfigureServices(IServiceCollection services)
{
    services.AddMvc(options =>
        options.Filters.Add<ResponseStatusCodeFilter>())
            .SetCompatibilityVersion(CompatibilityVersion.Version_2_1);

    services.AddAuthorization(options =>
        options.AddPolicy("Usage", policy => policy.Requirements.Add(new UsageAuthorizationRequirement())));

    services.AddSingleton<IAuthorizationHandler, UsageAuthorizationHandler>();
}

class UsageAuthorizationRequirement : IAuthorizationRequirement { }

[Authorize(Policy = "Usage")]
[ApiController]
class UsageController : ControllerBase { }

class UsageAuthorizationHandler : AuthorizationHandler<UsageAuthorizationRequirement>
{
    protected override async Task HandleRequirementAsync(AuthorizationHandlerContext context, UsageAuthorizationRequirement requirement)
    {
       throw new UsageNotFoundException();
    }
}

class ResponseStatusCodeFilter : ExceptionFilterAttribute
{
    public override void OnException(ExceptionContext context)
    {
        switch (context.Exception)
        {
            case UsageNotFoundException usageNotFoundException:
            {
                context.HttpContext.Response.StatusCode = (int)HttpStatusCode.NotFound;
                break;
            }
        }
    }
}

Description of the problem:
I have an authorization handler that might throw an exception.  Is is an incorrect assumption? If it is, what should be then the apporach for global exception handling? I'm using API controllers, no views, if that matters.
Version of Microsoft.AspNetCore.Mvc or Microsoft.AspNetCore.App or Microsoft.AspNetCore.All:
<PackageReference Include="Microsoft.AspNetCore" Version="2.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.1.1" />

what should be then the apporach for global exception handling?

IMO, that should always be middleware outside MVC. See https://codeopinion.com/http-api-problem-details-in-asp-net-core/

Thanks for contacting us, @abatishchev.
The behavior you observe is by design. The image in the following docs article shows the order in which different types of filters are executed: https://docs.microsoft.com/en-us/aspnet/core/mvc/controllers/filters?view=aspnetcore-2.1
As you can see, the Authorization filters are executed well in advance from Exception filters, hence the Exception filters have no chance to catch those exceptions.
As @khellang has pointed out, the proven way to catch any exception would be to register a custom middleware in the beginning of the stack.

Actually, we had a similar issue, although not in middleware but in our ViewComponents.
We registered a global exception filter, and as excepted, exceptions thrown within the controller were caught, but those thrown in the ViewComponent where not caught and bubbled up. Is that also by design? Are ViewComponents not executed within MVC? Or is this a genuine issue that is known/needs to be raised with the relevant code/stack trace?

Here's the filter execution pipeline - https://docs.microsoft.com/en-us/aspnet/core/mvc/controllers/filters?view=aspnetcore-2.1#filter-types. Exception filters attempt to capture errors before a result starts executing - the intent is that once you write to the response, MVC won't be able to recover from it and produce a different action. The recommendation is to use the exception handler middleware to handle these.

@pranavkm Please, could you reply to the above? Just so I know if its a genuine problem or not. Thanks

So it is logical to assume that any exception thrown within ViewComponents should be caught by the exception filter.

That wouldn't be the case. Exception filters rely on the stage of execution i.e. has the action finished executing and the result is being executed, and not on whether a response has been written. Like you said, that would be a very inconsistent experience.


chore: adds script to run generic npm  command per package

Coverage remained the same at 100.0% when pulling 8f8623559324b552d70cb5c9a4dd701ddb58ad7f on monorepo-tooling into 9b5c824229ba77721bb4e8f5115903ea8b54ef8a on master.