feat(dot-notation): add partial implementation

Hello Fabian,
Like promised, here an example of how to add dot notation for valibot.
Users would need to add a registration step to register some notations.
a vite plugin could add them automatically if needed.
This is using:

a type registry declared globally (interfaces are automatically overloaded by typescript).
a runtime registry to add mixins at runtime

if you don't import the registry, you don't pay the cost and you don't have the dot notation.
so this would be optin for users that want it
if you want to explore more, happy to help make it a reality and improve DX, since this is a quick demo hack.

Thank you! Can you describe in more detail with code examples how your solution works?

Thank you! Can you describe in more detail with code examples how your solution works?

yes,
this part put one and only one validation function type to a type registry that is global.
declare global {
  export interface StringRegistry {
    email: typeof email;
  }
}

allowing it to be injected in schema string type definition only if you import it.
this part put the function in a runtime registry so in can  injected to the pipe of validbot :
register('string', email);

The thing here is that every registration is independant of one another (they are isolated). So they can still be treshaked independently.
Registering the types and the runtime are opt-in. meaning if you don't want to use it, there is no impact in current valibot way of using pipes. You can use both if you want.
Now here is how types are injected in the type string schema :
// helper that take a type registry (that is only updated if you register a validator) and add the signature to the schema
type SchemaValidators<TRegistry, TThis> = {
  [K in keyof TRegistry]: (
    ...args: Parameters<Extract<TRegistry[K], (...args: any) => any>>
  ) => TThis; // this is a definition for a mixin method that returns this so they are chainable
};

// schema with augmented validators (like .email() ) only for registered ones
export interface StringSchema<TOutput = string>
  extends BaseSchema<string, TOutput>,
    SchemaValidators<StringRegistry, StringSchema<TOutput>> {
  schema: 'string';
}

and for the dot validators they are injected with a mixin that comes from the runtime registry, again only adding those that are registered :
return {
    schema: 'string',

    _pipe: pipe, // added to allow the mixins to update the pipe

    async: false,
    _parse(input, info) {
      // Check type of input
      if (typeof input !== 'string') {
        return getSchemaIssues(
          info,
          'type',
          'string',
          error || 'Invalid type',
          input
        );
      }
      return executePipe(input, this._pipe, info, 'string'); // using this._pipe to have access to the updated pipe from the mixins
    },
    ...(mixinsOf('string'), // inject the mixins, thats are the methods the user registered
  };

To sumarize, the solution is to use a registry to only register the functions you want to have with dot notation.
the registry then injects a function that adds the mixin to the pipe and allows to chain them
So the solution is not transparent for the user. they have to register the methods they want to have chainable methods.
To improve DX, we could register the all the types automatically since they don't contribute to bundle size.
And then have a vite plugin that automatically registers only the used methods, so that it would be transparent for users

Thank you for your explanation. I think that I have understood it. The idea is interesting. This could be the basis for a separate open source project that emulates Zod with a much smaller bundle size. For now, I don't plan to implement it for Valibot, because I like our API design and the disadvantage in tooling can also be compensated by AI tools or a VS code extension.

closing then.


DbSet<>.Include causes a NullReferenceException in DbContext.Dispose

I have an NUnit integration test class which creates a test DB, does what it needs and then deletes the database in the TearDown method:
[TearDown]
public virtual void Cleanup()
{
    Context.Database.EnsureDeleted();
    Context.Dispose();
}

If a test calls the Include method in any query, Cleanup method crashes with the following exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Npgsql.NpgsqlConnection.ReallyClose(Boolean wasBroken)
   at Npgsql.NpgsqlConnection.Dispose(Boolean disposing)
   at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Dispose()
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.Dispose()
   at Microsoft.EntityFrameworkCore.DbContext.Dispose()
   at ConsoleApp1.Program.Main(String[] args) in c:\ConsoleApp1\Program.cs:line 44

It can be easily reproduced in a simple .Net Core console application:
var builder = new DbContextOptionsBuilder();
builder.UseNpgsql("UserId=***;Password=****;Server=localhost;Port=5432;Database=TestDb;");

var context = new TestDbContext(builder.Options);
context.Database.EnsureCreated();

context.MainClasses.Add(new MainClass()
{
    Name = "123",
    Items = new List<DependentClass>()
    {
        new DependentClass()
        {
            Name = "item1"
        },
        new DependentClass()
        {
            Name = "item2"
        }
    }
});

context.SaveChanges();

var mainItem = context.MainClasses
    .Include(item => item.Items)
    .FirstOrDefault(item => item.Id == 1);

Console.WriteLine(mainItem.Items.Count);

context.Database.EnsureDeleted();
context.Dispose(); // NullReferenceException

Will try to take a look at this soon.

Sorry for taking so long to look at this.
Unfortunately I can't reproduce this... I have a very similar sample here that's dropping the database just fine and no exception is raised when the context is disposed. Can you please submit a full example (including the model, etc.) which triggers this?

@roji thanks for coming back to us, it might be that this was fixed in the latest versions of npgsql or .net core - will try to reproduce our example one more time

@pgrm, as no further info has been provided I'm going to close this issue. However, if you manage to reproduce this please post back here and we'll revisit.


PacBio Sequel II data

Hi,
I am trying to use  genomescope to estimate heterozygosity and genome size of a fairly large plant genome, ~ 3.65Gbp. I am using the histogram of canu-corrected reads.  Here is what I am getting:
GenomeScope version 1.0
k = 22
property                      min               max
Heterozygosity                0.775102%         0.795864%
Genome Haploid Length         NA bp             NA bp
Genome Repeat Length          NA bp             NA bp
Genome Unique Length          974,154,308 bp    977,407,537 bp
Model Fit                     86.4268%          93.3631%
Read Error Rate               NA%               NA%
I am not sure why it is not estimating the genome size? Also, given that pacbio reads are of variable lengths, what would be the ideal read length to give to genomescope?
Many thanks,

We have had mixed results using GenomeScope with error corrected long reads as the error correction can distort heterozygous kmers and other properties. But it is odd that it is estimating the genome size to be ~1GB but you expect ~3.6. Can you send the link to the profile? Maybe something was confused with the model fitting routine.
Cheers
Mike

Hi Mike,
Here is the link:
http://genomescope.org/analysis.php?code=example2
In your tests with corrected long reads, what read length did you use?
Thanks
Magdy

Hi Magdy,
That is one of the same projects. Can you double check and send a link with a code number, sort of like this one:
http://qb.cshl.edu/genomescope/analysis.php?code=fAGB1i4BmhEBAP9lDXaP
Alternatively, can you send the kmer histogram file?
And it turns out the read length isnt actually used in the final output. It very slightly helps initialize the model fitting, but any value will get to the same result. We are actually removing it as a parameter from the next version of genomescope.
Thanks
Mike

Sorry, here is it:
http://qb.cshl.edu/genomescope/analysis.php?code=wuSFuJbgWbECTETlCiXR
and the histogram file
run.ms22.histo.txt

Hi Magdy,
I ran the histogram through our new version of GenomeScope and the results
look a lot better:
http://qb.cshl.edu/genomescope/genomescope2.0/analysis.php?code=xuGAx8mhFBqxnRUV2z68
This shows the genome size to be about 3.4Gb and the het rate to be about
0.8%. This is probably slightly underestimated since error correcting long
reads can overcorrect what are real heterozygous bases, but should be
fairly accurate. In addition to using a better optimization function, the
new version considers all kmers so it is also able to pick up on high copy
repeats better. We actually posted a preprint about the updated model this
morning to the bioRxiv and will be available shortly that describes all the
improved methods. If you want to process any other datasets, the website is
available here: http://genomescope.org/genomescope2.0
Cheers
Mike
On Mon, Aug 26, 2019 at 9:54 AM Malabady<EMAIL_ADDRESS>wrote:

Sorry, here is it:
http://qb.cshl.edu/genomescope/analysis.php?code=wuSFuJbgWbECTETlCiXR
and the histogram file
run.ms22.histo.txt
https://github.com/schatzlab/genomescope/files/3541438/run.ms22.histo.txt
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/schatzlab/genomescope/issues/24?email_source=notifications&email_token=AABP346RAEMATEDU3NEA6GDQGPOANA5CNFSM4IPGUJ6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5EOBYY#issuecomment-524869859,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABP342RROKL5UE7OUE4JWTQGPOANANCNFSM4IPGUJ6A
.

The preprint is currently being screened, but should be available later
today or tomorrow. Yes, there are four plots now because we do a
mathematically transformation to the data that helps with highly
heterozygous samples. But the results will be identical on the transformed
and original data (we always fit to the transformed data, and just display
the results twice for visualization purposes)
Good luck!
Mike
On Mon, Aug 26, 2019 at 12:24 PM Malabady<EMAIL_ADDRESS>wrote:

Thanks a lot Mike! this is looking much better & is within the expectation
for sure. Do you have a link to the preprint? I need to read about the
interpretation of the new plots (coverageFrequency vs coverage). I see
that results are the same in both profiles (Frequency Vs Coverage &
FrequencyCoverage Vs Coverage). Is this to be expected?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/schatzlab/genomescope/issues/24?email_source=notifications&email_token=AABP345JHNGALX6B2MAJ2ZDQGP7TZA5CNFSM4IPGUJ6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5E4FFY#issuecomment-524927639,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABP347BWHLCCPFSGZ4DK5DQGP7TZANCNFSM4IPGUJ6A
.

FYI - The preprint is now available on the biorxiv:
https://www.biorxiv.org/content/10.1101/747568v1
Cheers
Mike
On Mon, Aug 26, 2019 at 12:34 PM Michael Schatz<EMAIL_ADDRESS>wrote:

The preprint is currently being screened, but should be available later
today or tomorrow. Yes, there are four plots now because we do a
mathematically transformation to the data that helps with highly
heterozygous samples. But the results will be identical on the transformed
and original data (we always fit to the transformed data, and just display
the results twice for visualization purposes)
Good luck!
Mike
On Mon, Aug 26, 2019 at 12:24 PM Malabady<EMAIL_ADDRESS>wrote:

Thanks a lot Mike! this is looking much better & is within the
expectation for sure. Do you have a link to the preprint? I need to read
about the interpretation of the new plots (coverageFrequency vs
coverage). I see that results are the same in both profiles (Frequency Vs
Coverage & FrequencyCoverage Vs Coverage). Is this to be expected?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/schatzlab/genomescope/issues/24?email_source=notifications&email_token=AABP345JHNGALX6B2MAJ2ZDQGP7TZA5CNFSM4IPGUJ6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5E4FFY#issuecomment-524927639,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABP347BWHLCCPFSGZ4DK5DQGP7TZANCNFSM4IPGUJ6A
.

Many thanks, Mike. And congrats on the paper. Best! Magdy
From: Michael Schatz<EMAIL_ADDRESS>Reply-To: schatzlab/genomescope<EMAIL_ADDRESS>Date: Monday, August 26, 2019 at 4:35 PM
To: schatzlab/genomescope<EMAIL_ADDRESS>Cc: Magdy Alabady<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [schatzlab/genomescope] PacBio Sequel II data (#24)
[External Sender]
FYI - The preprint is now available on the biorxiv:
https://www.biorxiv.org/content/10.1101/747568v1
Cheers
Mike
On Mon, Aug 26, 2019 at 12:34 PM Michael Schatz<EMAIL_ADDRESS>wrote:

The preprint is currently being screened, but should be available later
today or tomorrow. Yes, there are four plots now because we do a
mathematically transformation to the data that helps with highly
heterozygous samples. But the results will be identical on the transformed
and original data (we always fit to the transformed data, and just display
the results twice for visualization purposes)
Good luck!
Mike
On Mon, Aug 26, 2019 at 12:24 PM Malabady<EMAIL_ADDRESS>wrote:

Thanks a lot Mike! this is looking much better & is within the
expectation for sure. Do you have a link to the preprint? I need to read
about the interpretation of the new plots (coverageFrequency vs
coverage). I see that results are the same in both profiles (Frequency Vs
Coverage & FrequencyCoverage Vs Coverage). Is this to be expected?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/schatzlab/genomescope/issues/24?email_source=notifications&email_token=AABP345JHNGALX6B2MAJ2ZDQGP7TZA5CNFSM4IPGUJ6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5E4FFY#issuecomment-524927639,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABP347BWHLCCPFSGZ4DK5DQGP7TZANCNFSM4IPGUJ6A
.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/schatzlab/genomescope/issues/24?email_source=notifications&email_token=ACHNEMB64H545M6N3NY4EFLQGQ5B7A5CNFSM4IPGUJ6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5FTDCI#issuecomment-525021577, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACHNEMDVGLKRGEJSATTCBPTQGQ5B7ANCNFSM4IPGUJ6A.

Hi Michael,
In the model fir stats, what does it mean when there is big gap between the min (35%) and max (96%)? Does it mean that ~ 35% of the data fits the model as good as a 96%? Also, is the read error rate accurate?
Many thanks for your help.
Magdy
From: Michael Schatz<EMAIL_ADDRESS>Reply-To: schatzlab/genomescope<EMAIL_ADDRESS>Date: Monday, August 26, 2019 at 4:35 PM
To: schatzlab/genomescope<EMAIL_ADDRESS>Cc: Magdy Alabady<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [schatzlab/genomescope] PacBio Sequel II data (#24)
[External Sender]
FYI - The preprint is now available on the biorxiv:
https://www.biorxiv.org/content/10.1101/747568v1
Cheers
Mike
On Mon, Aug 26, 2019 at 12:34 PM Michael Schatz<EMAIL_ADDRESS>wrote:

The preprint is currently being screened, but should be available later
today or tomorrow. Yes, there are four plots now because we do a
mathematically transformation to the data that helps with highly
heterozygous samples. But the results will be identical on the transformed
and original data (we always fit to the transformed data, and just display
the results twice for visualization purposes)
Good luck!
Mike
On Mon, Aug 26, 2019 at 12:24 PM Malabady<EMAIL_ADDRESS>wrote:

Thanks a lot Mike! this is looking much better & is within the
expectation for sure. Do you have a link to the preprint? I need to read
about the interpretation of the new plots (coverageFrequency vs
coverage). I see that results are the same in both profiles (Frequency Vs
Coverage & FrequencyCoverage Vs Coverage). Is this to be expected?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/schatzlab/genomescope/issues/24?email_source=notifications&email_token=AABP345JHNGALX6B2MAJ2ZDQGP7TZA5CNFSM4IPGUJ6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5E4FFY#issuecomment-524927639,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABP347BWHLCCPFSGZ4DK5DQGP7TZANCNFSM4IPGUJ6A
.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/schatzlab/genomescope/issues/24?email_source=notifications&email_token=ACHNEMB64H545M6N3NY4EFLQGQ5B7A5CNFSM4IPGUJ6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5FTDCI#issuecomment-525021577, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACHNEMDVGLKRGEJSATTCBPTQGQ5B7ANCNFSM4IPGUJ6A.

Those are pretty typical results -- it is a weighted result and only
considers part of the distribution (it is really just for debugging). For
example see this nice fit in wheat:
http://qb.cshl.edu/genomescope/genomescope2.0/analysis.php?code=example11
The error correction looks generally successful. The error peak (kmers with
frequency near 1) is broader than you would get with high quality Illumina
data but is good for error corrected long reads.
Good luck
Mike
On Thu, Aug 29, 2019 at 9:04 AM Malabady<EMAIL_ADDRESS>wrote:

Hi Michael,
In the model fir stats, what does it mean when there is big gap between
the min (35%) and max (96%)? Does it mean that ~ 35% of the data fits the
model as good as a 96%? Also, is the read error rate accurate?
Many thanks for your help.
Magdy
From: Michael Schatz<EMAIL_ADDRESS>Reply-To: schatzlab/genomescope<EMAIL_ADDRESS>Date: Monday, August 26, 2019 at 4:35 PM
To: schatzlab/genomescope<EMAIL_ADDRESS>Cc: Magdy Alabady<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [schatzlab/genomescope] PacBio Sequel II data (#24)
[External Sender]
FYI - The preprint is now available on the biorxiv:
https://www.biorxiv.org/content/10.1101/747568v1
Cheers
Mike
On Mon, Aug 26, 2019 at 12:34 PM Michael Schatz<EMAIL_ADDRESS>wrote:

The preprint is currently being screened, but should be available later
today or tomorrow. Yes, there are four plots now because we do a
mathematically transformation to the data that helps with highly
heterozygous samples. But the results will be identical on the
transformed
and original data (we always fit to the transformed data, and just
display
the results twice for visualization purposes)
Good luck!
Mike
On Mon, Aug 26, 2019 at 12:24 PM Malabady<EMAIL_ADDRESS>wrote:

Thanks a lot Mike! this is looking much better & is within the
expectation for sure. Do you have a link to the preprint? I need to
read
about the interpretation of the new plots (coverageFrequency vs
coverage). I see that results are the same in both profiles (Frequency
Vs
Coverage & FrequencyCoverage Vs Coverage). Is this to be expected?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<
https://github.com/schatzlab/genomescope/issues/24?email_source=notifications&email_token=AABP345JHNGALX6B2MAJ2ZDQGP7TZA5CNFSM4IPGUJ6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5E4FFY#issuecomment-524927639>,

or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AABP347BWHLCCPFSGZ4DK5DQGP7TZANCNFSM4IPGUJ6A>

.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<
https://github.com/schatzlab/genomescope/issues/24?email_source=notifications&email_token=ACHNEMB64H545M6N3NY4EFLQGQ5B7A5CNFSM4IPGUJ6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5FTDCI#issuecomment-525021577>,
or mute the thread<
https://github.com/notifications/unsubscribe-auth/ACHNEMDVGLKRGEJSATTCBPTQGQ5B7ANCNFSM4IPGUJ6A>.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/schatzlab/genomescope/issues/24?email_source=notifications&email_token=AABP342VKTYVUAY3JBHWLW3QG7CPTA5CNFSM4IPGUJ6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5OM3RY#issuecomment-526175687,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABP342EHAD4B73APPYOJSTQG7CPTANCNFSM4IPGUJ6A
.


Should be using 2 fragments with an activity-scoped shared ViewModel instead of passing stuff around in onActivityResult

Using onActivityResult in https://codelabs.developers.google.com/codelabs/android-room-with-a-view-kotlin/index.html?index=..%2F..index#13 bypasses the original premise of ViewModel described in https://codelabs.developers.google.com/codelabs/android-lifecycles/#5 and is therefore not the best way to represent how to use AAC.
Especially considering that the Android Persistence Codelabs was deprecated in favor of this codelabs (https://github.com/googlecodelabs/android-persistence/issues/27) and should represent Best Practices.
Currently, this Codelabs does not actually represent the AAC best practices, and this should be fixed. With this flaw, I can't in good conscience link this to any beginners at the moment (without adding the footnote to "beware the 13-14th steps").

what should I do instead?

what should I do instead?

in this day and age where Jetpack Navigation 2.2.0+ exists, you'd want to have a shared <navigation tag to which you can use as a scope using the NavBackStackEntry, that way you can share state/data between the two screens via a NavGraph-scoped ViewModel

I'm confused.  Why do I need state data?  I'm saving to a Room database, correct?  The database is under observation in the MainActivity.  I get the feeling that I want to know what this Jetpack Navigation stuff is all about but right now I have a specific task to perform, add new information to my database, and I don't know if I want or need to learn a brand new paradigm.  My research has led me to exploring Fragments and abandoning the use of another Activity.  This seems to be the direction that Google went with things but I have no idea what that has to do with navigation tabs.  I'm sold on the idea that adding to the database doesn't necessarily merit it's own Activity.
What I really want is something like a Dialog to pop up and take the information and send it to the database.  I was hoping to find that Dialog inherits from Fragment or something but I learn nothing about it's relationship to Fragments and Activities because it inherits from Object lol!  I don't know why scope is a concern if I am only adding one thing at a time and the underlying calls have their own coroutine scope.

you can use a DialogFragment and return a view in onCreateView and it would show on top of your current window, yeah


feat(events): add participant count

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#91  👈
#90
#89
#88
#86
#85
#84
#83
#82
#81
#80
#79
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @xdjeremy and the rest of your teammates on  Graphite


Issue 1356: Patch for /guj/guj.training_text - Add Gujarati numerals

https://code.google.com/p/tesseract-ocr/issues/detail?id=1356
(http://web.archive.org/web/20150413012207/https://code.google.com/p/tesseract-ocr/issues/detail?id=1356)

@Shreeshrii this no longer applies. Can you check if the new training text added in 05ec588fc0b5beb85650f7603bf3bf238ee8903d is still missing the numerals?

https://github.com/tesseract-ocr/langdata/blob/master/guj/guj.training_text
contains gujarati numerals.
This issue can be closed. Thanks!
ShreeDevi

भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com
On Sun, Jul 12, 2015 at 3:18 PM, Jim Regan<EMAIL_ADDRESS>wrote:

@Shreeshrii https://github.com/Shreeshrii this no longer applies. Can
you check if the new training text added in 05ec588
https://github.com/tesseract-ocr/langdata/commit/05ec588fc0b5beb85650f7603bf3bf238ee8903d
is still missing the numerals?
—
Reply to this email directly or view it on GitHub
https://github.com/tesseract-ocr/langdata/pull/1#issuecomment-120704143.


[Microsoft.KubernetesConfiguration] Add 200 OK to PATCH apis

MSFT employees can try out our new experience at OpenAPI Hub  - one location for using our validation tools and finding your workflow.

Changelog
Add a changelog entry for this PR by answering the following questions:

What's the purpose of the update?

[ ] new service onboarding
[ ] new API version
[ ] update existing version for new feature
[x] update existing version to fix swagger quality issue in s360
[ ] Other, please clarify

When are you targeting to deploy the new service/feature to public regions? Please provide the date or, if the date is not yet available, the month.
When do you expect to publish the swagger? Please provide date or, the the date is not yet available, the month.
If updating an existing version, please select the specific language SDKs and CLIs that must be refreshed after the swagger is published.

[ ] SDK of .NET (need service team to ensure code readiness)
[ ] SDK of Python
[ ] SDK of Java
[ ] SDK of Js
[ ] SDK of Go
[ ] PowerShell
[ ] CLI
[ ] Terraform
[ ] No refresh required for updates in this PR

Contribution checklist:

[ ] I commit to follow the Breaking Change Policy of "no breaking changes"
[ ] I have reviewed the documentation for the workflow.
[ ] Validation tools were run on swagger spec(s) and errors have all been fixed in this PR. How to fix?

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

Applicability: :warning:
If your changes encompass only the following scenarios, you should SKIP this section, as these scenarios do not require ARM review.

Change to data plane APIs
Adding new properties
All removals

Otherwise your PR may be subject to ARM review requirements. Complete the following:

[ ] Check this box if any of the following apply to the PR so that label "WaitForARMFeedback" will be added automatically to begin ARM API Review. Failure to comply may result in delays to the manifest.

Adding a new service
Adding new API(s)
Adding a new API version
-[ ] To review changes efficiently, ensure you are using OpenAPIHub to initialize the PR for adding a new version. More details, refer to the wiki.

[ ] Ensure you've reviewed following guidelines including ARM resource provider contract and REST guidelines. Estimated time (4 hours). This is required before you can request review from ARM API Review board.

[ ] If you are blocked on ARM review and want to get the PR merged with urgency, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.

Breaking Change Review Checklist
If any of the following scenarios apply to the PR, request approval from the Breaking Change Review Board as defined in the Breaking Change Policy.

[ ] Removing API(s) in a stable version
[ ] Removing properties in a stable version
[ ] Removing API version(s) in a stable version
[ ] Updating API in a stable or public preview version with Breaking Change Validation errors
[ ] Updating API(s) in public preview over 1 year (refer to Retirement of Previews)

Action: to initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Addition details on the process and office hours are on the Breaking change Wiki.
Please follow the link to find more details on PR review process.

@jianyexi We are making the change to add 200 to our PATCH apis as this is already being returned in our service but is not documented correctly in our Swagger. This PR is to fix the documentation to be up-to-date with the service and to fix S360 Swagger Correctness errors.

@jonathan-innis  could you please follow the https://github.com/Azure/azure-rest-api-specs/pull/18977#issuecomment-1121379834 to get approval , this is required  duing PR review


Bosh cannot update CF quotas

When you define quotas in CF manfest, e.g.
    quota_definitions:
      default:
        memory_limit: 10240
        non_basic_services_allowed: true
        total_routes: 1000
        total_services: 100

BOSH will create them. But when you change any values, BOSH will apply your changes - which will finish successfully, but the quota in CF will not be updated. In cc logs, you can find quota collision logs:
{
    "data": {
        "name": "default",
        "values": {
            "memory_limit": 2048,
            "non_basic_services_allowed": false,
            "total_routes": 1000,
            "total_services": 10
        }
    },
    "fiber_id":<PHONE_NUMBER>2920,
    "file": "/var/vcap/data/packages/cloud_controller_ng/6d32e116fa47763d6885214954e0d737c28b29e5.1-aa02996eae5e64a4ff823957b8ec5baf64d0b2b5/cloud_controller_ng/lib/cloud_controller/seeds.rb",
    "lineno": 20,
    "log_level": "warn",
    "message": "seeds.quota-collision",
    "method": "block in create_seed_quota_definitions",
    "process_id": 10857,
    "source": "cc.seeds",
    "thread_id":<PHONE_NUMBER>4340,
    "timestamp":<PHONE_NUMBER>.1394439
}

and
{
    "data": {
        "existing_quota_name": "default"
    },
    "fiber_id":<PHONE_NUMBER>2920,
    "file": "/var/vcap/data/packages/cloud_controller_ng/6d32e116fa47763d6885214954e0d737c28b29e5.1-aa02996eae5e64a4ff823957b8ec5baf64d0b2b5/cloud_controller_ng/lib/cloud_controller/seeds.rb",
    "lineno": 46,
    "log_level": "warn",
    "message": "seeds.system-domain-organization.collision",
    "method": "create_seed_organizations",
    "process_id": 10857,
    "source": "cc.seeds",
    "thread_id":<PHONE_NUMBER>4340,
    "timestamp":<PHONE_NUMBER>.1927507
}

CF release 228, BOSH version 253
Updating quotas with cf update-quota works normally.

I'll close this issue here since you've opened one against capi-release. BOSH just passes properties to the releases and it's up to releases to define what happens then. Not sure if it ever was supported by cloud controller to update quotas via manifest.


New command names added

Fixes #16
Also Added a .gitignore

Added and thank you. Your username and name will be added to our Readme in contributers.


主线合并

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

2 of 2 (100.0%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.004%) to 56.305%

Totals

Change from base Build<PHONE_NUMBER>:
-0.004%

Covered Lines:
1417

Relevant Lines:
2471

💛  - Coveralls


Expose MQTTS port to container

By default MQTTS port is not exposed to container IP. It's difficult to add later on via Helm chart. So proposing to add it here.

LGTM, ok for you @dergraf ?

When adding a listener.ssl.default = IP:PORT by default VerneMQ will setup a SSL listener that isn't using TLS certificates. E.g. a connect will look like the following: ```
$ openssl s_client <IP_ADDRESS>:1234
CONNECTED(00000003)
write:errno=104
no peer certificate available
No client certificate CA names sent
SSL handshake has read 0 bytes and written 283 bytes
Verification: OK
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)
I think this isn't a behaviour we should allow by default.

Why is it difficult to add it via Helm?

With Helm I could <IP_ADDRESS>, but I can't add external POD IP address. Is there a way to add listen all interfaces IP address ('*' doesn't seem to work).

Sure, you can use the <IP_ADDRESS> address

thank you :)


CARDS-1306: Add support for sections that stick to the top (header section) or to the bottom (footer section) of the page when scrolling

To test, use the questionnaire wizard to specify a section as having the display mode header or footer.

The title of a header section should also stay in view

This is a bug only when running in Demo mode, seems that the header scrolling limit does not take into account the content offset.
However, now the wrong z-index is even more obvious:

Problem in view mode:
https://user-images.githubusercontent.com/23243244/128808880-5d6bcf50-0697-4338-b848-4f315be36986.mp4

I think the top of the Header should resemble the look of the sticky header. e.g. PATIENT:SAMPLE , Patient information and action buttons on the same line all the time ( view and edit mode)

Patient chart problem ( please see how at the beginning the Patient 1306 and action buttons only briefly appear)

This is an issue with the 1164 branch. It was fixed there, and this branch rebased, so it's ready for re-test.

I created the following 3 sections on the Patient info form. When I edit the form, I am stuck in the second section (Family section).

https://user-images.githubusercontent.com/23243244/128926045-9e0f25b7-f79b-4f19-9b4c-d5fdbbbb9fd4.mp4

With footer setting I am stuck in the section, however I can see the fields outside of the section appear in the background as I am scrolling down.
https://user-images.githubusercontent.com/23243244/128927267-a11f2a33-2812-4faf-b314-6940ab02ebbe.mp4

I created the following 3 sections on the Patient info form. When I edit the form, I am stuck in the second section (Family section).

With footer setting I am stuck in the section, however I can see the fields outside of the section appear in the background as I am scrolling down.

That is expected. The form appears to be stuck on one section because the header section is very tall and covers the whole screen, while remaining sticky to the top (or bottom). The header and footer display modes are meant to be used for short enough section that make sense to be displayed as sticky headers and footers.
I'm not sure what the best course of action is here: override the display mode if the section is too large? warn the user when they set the display mode that their section should not be too big or else they won't see the rest of the form?

Is the problem with footer actually related to 1164 PR (already merged)?

What is expected behaviour in this sample - Chemo form - first section (footer) has one field.
https://user-images.githubusercontent.com/23243244/128931187-e6e2df10-495d-4f23-9533-8e4eb1342e4b.mp4

Is the problem with footer actually related to 1164 PR (already merged)?

I'm not sure I fully understand the issue, but from the looks of it it's unlikely to be related to 1164.

What is expected behaviour in this sample - Chemo form - first section (footer) has one field?

Footer sections should stick to the bottom until you scroll to their place in the form, then they should go up and out of sight like sections with "default" display mode. I pushed a fix in 28f4807.

Sticky header goes under sticky form title when scrolling up.
Fixed in 28f4807 .

Sticky header goes under sticky form title when scrolling up.

Fixed in 7d9c646 .

Still broken for me.

Still broken for me.

Works for me. Can you share the screenshot?

It can be quite tricky with large sections when the form is not paginated. This is something to keep in mind when designing forms. On paginated forms everything seems to be working well.

I think this PR is really good.

Sticky header goes under sticky form title when scrolling up.

Fixed in 7d9c646 .

Still broken for me.

Steps to reproduce:

Go to Questionnaire wizard for Patient Information (or any other longer questionnaire)
Add a new section, set identifier 0 (or anything else starting with a digit, to trick Sling into pushing it to the top of the questionnaire)
Add an information box into the section
Create a form and note how this header section slides under the form header when scrolling.

Same thing happens if the section is empty (e.g. only title and/or description), but this scenario is less realistic.
As soon as a question is added to the header section, it behaves as expected.

I see. When I follow your steps it does happen. How come similar setup in Chemo form works fine?

Closing in favor of #739 . The support for header sections proposed here is buggy and will be implemented in a separate PR.


Django static files never finish loading

Environment data

VS Code version: 1.33.1
Extension version (available under the Extensions sidebar): 2019.4.11987
OS and version: Mac OS 10.14.5 Beta (18F118d)
Python version (& distribution if applicable, e.g. Anaconda): 3.6.3
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): virtualenv
Relevant/affected Python packages and their versions: django 2.2

Expected behaviour
When debugging a django application, if there is more than one static file being loaded in the page, all static files will load without any issue.
Actual behaviour
When debugging a django application, if there is more than one static file being loaded in the page, at least one of the files will stall and never load. The browser shows "pending" and finally cancels the load after several minutes. Impossible to use VS Code with Python for development and debugging with this behavior.
Steps to reproduce:

Create new django app, with one view, one url
Create a template for the view to render
In that template, load two css files, with two images being loaded into the template in style defined in css file.
Debug the django app, and the page will never completely load.

Logs
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
<output is empty. Nothing returns>

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)
<Don't see Enable source map support for extension debugging> Screenshot attached

Please could you provide a sample repo we can use to replicate this at our end?
What version of django are you using?
Please could you provide the contents of the Debug Configuration (from launch.json) that you are using.

In that template, load two css files, with two images being loaded into the template in style defined in css file.

Does removing the css files & the image result in the page being loaded?

A sample repo has been uploaded to https://github.com/holyoaks/djangotest
Django 2.2
the debug configuration is shown below
    "version": "0.2.0",     "configurations": [         {             "name": "Python: Django",             "type": "python",             "request": "launch",             "program": "${workspaceFolder}/manage.py",             "args": [                 "runserver",                 "--noreload",                 "--nothreading"             ],             "django": true         }     ]
If I have only ONE css or other static file, it seems to work. If I add additional, one or more works, but at least one does not.
I will also mention that I've tried my private repository, as well as the test repository I referenced above on a Windows 10 machine, and I do NOT get this behavior. I'm afraid it is something Mac specific, but can't say for certain. Thank you!

Please can you try running this without debugging and confirm the problem persists.

The problem does NOT exist if I:

activate the virtualenv in the Terminal; and,
run python manage.py runserver

Only when debugging in VS Code. I have verified with both my simple repository and my private repository.

Same problem here (only when debugging django using vscode), I'm trying to investigate on the origin but I'm unable to find it.
The project was previously working perfectly with its current existing virtualenv.
I disabled extension auto-update and vscode auto-update and after having downgraded vscode to 1.32.3 and Python extension to 2019.2.5558, the problem still occurs.
Take a look on following timestamps, 12 minutes to load the main page .
(django-logicapp)  C:\Users\Yann\Documents\Python\django-logicapp>cd c:\Users\Yann\Documents\Python\django-logicapp && cmd /C "set "PYTHONIOENCODING=UTF-8" && set "PYTHONUNBUFFERED=1" && c:\Users\Yann\Documents\Python\django-logicapp/.venv/Scripts/python.exe c:\Users\Yann\.vscode\extensions\ms-python.python-2019.2.5558\pythonFiles\ptvsd_launcher.py --default --client --host localhost --port 53647 C:\Users\Yann\Documents\Python\django-logicapp/manage.py runserver --noreload --nothreading "
Performing system checks...

System check identified no issues (0 silenced).
May 01, 2019 - 10:28:32
Django version 2.1.4, using settings 'logicapp.settings'
Starting development server at http://<IP_ADDRESS>:8000/
Quit the server with CTRL-BREAK.
INFO 2019-05-01 10:28:37,838 session 13220 20656 request index
INFO 2019-05-01 10:28:37,839 context 13220 20656 update_context_student
INFO 2019-05-01 10:28:37,840 context 13220 20656 AnonymousUser don't have student attribute
INFO 2019-05-01 10:28:37,840 context 13220 20656 {'version': 0, 'user': <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x00000240ADEF2EB8>>, 'student': None}
INFO 2019-05-01 10:28:37,841 context 13220 20656 update_context_highschool
INFO 2019-05-01 10:28:37,842 context 13220 20656 AnonymousUser don't have highschool attribute
INFO 2019-05-01 10:28:37,843 context 13220 20656 {'version': 0, 'user': <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x00000240ADEF2EB8>>, 'student': None, 'highschool': None}
INFO 2019-05-01 10:28:37,845 context 13220 20656 update_context_teacher
INFO 2019-05-01 10:28:37,846 context 13220 20656 {'version': 0, 'user': <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x00000240ADEF2EB8>>, 'student': None, 'highschool': None, 'teacher': None}
INFO 2019-05-01 10:28:37,847 session 13220 20656 {'version': 0, 'user': <SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x00000240ADEF2EB8>>, 'student': None, 'highschool': None, 'teacher': None, 'title': 'Titre'}
INFO 2019-05-01 10:28:37,863 basehttp 13220 20656 "GET / HTTP/1.1" 200 6586
INFO 2019-05-01 10:28:37,917 basehttp 13220 20656 "GET /static/css/bootstrap/bootstrap.css HTTP/1.1" 304 0
INFO 2019-05-01 10:28:37,920 basehttp 13220 20656 "GET /static/js/jquery-3.3.1.js HTTP/1.1" 304 0
INFO 2019-05-01 10:28:37,923 basehttp 13220 20656 "GET /static/js/jquery.formset.js HTTP/1.1" 304 0
INFO 2019-05-01 10:28:37,926 basehttp 13220 20656 "GET /static/js/bootstrap.bundle.js HTTP/1.1" 304 0
INFO 2019-05-01 10:28:37,930 basehttp 13220 20656 "GET /static/js/notification.js HTTP/1.1" 304 0
INFO 2019-05-01 10:28:37,933 basehttp 13220 20656 "GET /static/js/base.js HTTP/1.1" 304 0
INFO 2019-05-01 10:30:33,147 basehttp 13220 20656 "GET /static/css/bootstrap/toggle/component-custom-switch.css HTTP/1.1" 304 0
INFO 2019-05-01 10:32:28,165 basehttp 13220 20656 "GET /static/css/fonts/font-awesome.css HTTP/1.1" 304 0
INFO 2019-05-01 10:34:23,648 basehttp 13220 20656 "GET /static/css/bootstrap/bootstrap-override.css HTTP/1.1" 200 9156
INFO 2019-05-01 10:36:18,777 basehttp 13220 20656 "GET /static/js/format.js HTTP/1.1" 304 0
INFO 2019-05-01 10:38:13,819 basehttp 13220 20656 "GET /static/js/js.cookie-2.2.0.min.js HTTP/1.1" 200 1714
INFO 2019-05-01 10:38:13,892 basehttp 13220 20656 "GET /media/images/btn1.png HTTP/1.1" 200 29558
INFO 2019-05-01 10:40:09,458 basehttp 13220 20656 "GET /media/images/btn2.png HTTP/1.1" 200 27016

I tried VSCode-win32-x64-1.31.1 and VSCode-win32-x64-1.32.3 in portable mode with only the Python extension installed, it was still the same issue.
After some testing, the problem also exists in a standalone launch when I add --nothreading, and it also disappear from VSCode if I remove this argument from the launch.json.
So, if it's not VSCode neither the Python Extension, does a Windows 10 Update could be the culprit ?

I can confirm that removing --nothreading from my debug configuration resolves the issue as well, on Mac OS. This must be either a VSCode or Python Extension issue

Issue moved to Microsoft/ptvsd #1393 via ZenHub


integration test(ticdc): Fix Tar Wildcard Handling in download-integration-test-binaries.sh

What problem does this PR solve?

Issue Number: close #11512
What is changed and how it works?
Summary:
This PR fixes an issue related to wildcard handling in the scripts/download-integration-test-binaries.sh script, which is used to download and extract required binaries for integration tests in TiCDC. The problem affects systems with certain tar implementations where wildcard matching is not enabled by default, causing the extraction of PD binaries to fail and integration tests to break.
Issue Explanation:
In the current implementation, the following command is used to extract the pd-server.tar.gz package:
tar -xz -C third_bin 'bin/*' -f tmp/pd-server.tar.gz && mv third_bin/bin/* third_bin/

This command uses a wildcard pattern 'bin/*' to match and extract all files within the bin directory of the compressed pd-server.tar.gz archive.
However, not all versions of tar handle wildcard patterns by default. In particular:

Older or non-GNU versions of tar: These versions do not enable wildcard support unless the --wildcards option is explicitly specified.
GNU tar: Newer versions of GNU tar generally support wildcards by default, but it's not guaranteed across all environments.

When the script is executed on systems where tar does not natively support wildcard patterns, the command fails to extract the necessary PD executables. As a result:

The third_bin directory remains empty of PD-related binaries.
The subsequent integration tests fail due to missing dependencies.

Proposed Solution:
To resolve this issue, I have added the --wildcards option to the tar command in the script, ensuring that wildcard matching works correctly across all versions of tar. Here is the updated command:
tar -xz --wildcards -C third_bin 'bin/*' -f tmp/pd-server.tar.gz && mv third_bin/bin/* third_bin/

By explicitly adding the --wildcards option:

We ensure consistent behavior of the script across different systems and tar implementations.
The PD binaries are correctly extracted into the third_bin directory, allowing the integration tests to run successfully.

Steps Taken:

Updated the tar command in the scripts/download-integration-test-binaries.sh script to include the --wildcards option.
Verified that the script runs successfully on systems with both GNU tar and non-GNU tar versions.
Confirmed that the PD binaries are correctly extracted, and the integration tests complete without issues.

Impact:
This fix ensures that the integration test binaries are reliably downloaded and extracted across different environments, preventing failures caused by missing PD executables. This improves the stability and portability of the TiCDC integration tests.
No other parts of the system are affected by this change, and no additional dependencies are introduced.
Check List
Tests

Manual test (add detailed scripts or steps below)

make prepare_test_binaries

Questions
Will it cause performance regression or break compatibility?
No
Do you need to update user documentation, design documentation or monitoring documentation?
No
Release note
None

/retest

/check-issue-triage-complete

/test cdc-integration-kafka-test


Model does not converge (Loss does not decrease, accuracy does not change)

I am doing text classification and have made a dummy dataset to aid in debugging. The problem is that the model does not learn/converge. I am trying to predict one out of 20 labels and have tried most fixes on the net to no avail.
train_text = [['a'],['a'],['a']]
val_text = [['a'],['a'],['a']]
train_label = np.asarray([5,5,5])
val_label = np.asarray([5,5,5])

import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers

#Implementing a Transformer block as a layer

class TransformerBlock(layers.Layer):
    def __init__(self, embed_dim, num_heads, ff_dim, rate=0.1):
        super(TransformerBlock, self).__init__()
        self.att = layers.MultiHeadAttention(num_heads=num_heads, key_dim=embed_dim)
        self.ffn = keras.Sequential(
            [layers.Dense(ff_dim, activation="relu"), layers.Dense(embed_dim),]
        )
        self.layernorm1 = layers.LayerNormalization(epsilon=1e-6)
        self.layernorm2 = layers.LayerNormalization(epsilon=1e-6)
        self.dropout1 = layers.Dropout(rate)
        self.dropout2 = layers.Dropout(rate)

    def call(self, inputs, training):
        attn_output = self.att(inputs, inputs)
        attn_output = self.dropout1(attn_output, training=training)
        out1 = self.layernorm1(inputs + attn_output)
        ffn_output = self.ffn(out1)
        ffn_output = self.dropout2(ffn_output, training=training)
        return self.layernorm2(out1 + ffn_output)

class TokenAndPositionEmbedding(layers.Layer):
    def __init__(self, maxlen, vocab_size, embed_dim):
        super(TokenAndPositionEmbedding, self).__init__()
        self.token_emb = layers.Embedding(input_dim=vocab_size, output_dim=embed_dim)
        self.pos_emb = layers.Embedding(input_dim=maxlen, output_dim=embed_dim)

    def call(self, x):
        maxlen = tf.shape(x)[-1]
        positions = tf.range(start=0, limit=maxlen, delta=1)
        positions = self.pos_emb(positions)
        x = self.token_emb(x)
        return x + positions

vocab_size = 40000  # Only consider the top 20k words :)
maxlen = 10  # for my task, ideally 500

train_label = tf.keras.utils.to_categorical(train_label, 20)
val_label = tf.keras.utils.to_categorical(val_label, 20)

tokenizer = tf.keras.preprocessing.text.Tokenizer(num_words=20000, lower=True, oov_token='<OOV>')
tokenizer.fit_on_texts(train_text)
train_sequences = tokenizer.texts_to_sequences(train_text)

val_sequences = tokenizer.texts_to_sequences(val_text)

train_text = tf.keras.preprocessing.sequence.pad_sequences(train_sequences, maxlen=maxlen, dtype='int32',
                                           padding='post', truncating='post')

val_text = tf.keras.preprocessing.sequence.pad_sequences(val_sequences, maxlen=maxlen, dtype='int32',
                                           padding='post', truncating='post')

from sklearn.preprocessing import normalize

train_text_n = normalize(train_text)
val_text_n = normalize(val_text)

data_set = tf.data.Dataset.from_tensor_slices((train_text_n , train_label))
data_set

from tensorflow.keras.regularizers import l2

embed_dim = 128  # Embedding size for each token
num_heads = 8  # Number of attention heads
ff_dim = 256  # Hidden layer size in feed forward network inside transformer
batch_size = 32
factor = 0.0001

inputs = layers.Input(shape=(maxlen,))

embedding_layer = TokenAndPositionEmbedding(maxlen, vocab_size, embed_dim)
x = embedding_layer(inputs)
transformer_block = TransformerBlock(embed_dim, num_heads, ff_dim)

x = transformer_block(x)

x = layers.GlobalAveragePooling1D()(x)

x = layers.Dense(160, activation="relu", kernel_initializer='glorot_uniform')(x)
x = layers.Dropout(0.15)(x)
x = layers.BatchNormalization()(x)

x = layers.Dense(90, activation="relu", kernel_initializer='glorot_uniform')(x)
x = layers.Dropout(0.1)(x)
x = layers.BatchNormalization()(x)

x = layers.Dense(40, activation="relu", kernel_initializer='glorot_uniform')(x)
x = layers.Dropout(0.1)(x)

outputs = layers.Dense(20)(x)

model = keras.Model(inputs=inputs, outputs=outputs)

adamopt = tf.keras.optimizers.Adam(learning_rate=1e-4)

model.compile(optimizer='adamopt', loss="categorical_crossentropy", metrics=["acc"])

model.summary()

history = model.fit(
    train_text_n, train_label, batch_size=batch_size, epochs=20, validation_data=(val_text_n, val_label), verbose=1)

Any Idea on how to do I fix this network? I am totally stumped after trying to fix it for 4 days :(

@neel04 Is this still an issue?
I tried to replicate this issue on colab using TF v2.8.0 and faced different error, please find the gist here and confirm the same?
Thanks!


CosmosDB view Unique Key for container once it's created

In order to see the Unique Key for a container I've created, I can export the ARM template for the database or I can get it using the cosmosdb sdk as we can see in this stackoverflow post and in this closed issue:
https://github.com/MicrosoftDocs/azure-docs/issues/32204
https://stackoverflow.com/questions/53490454/how-to-show-unique-keys-on-cosmos-db-container/53491509#53491509
I was wondering if there is a way to obtain this information using the Azure interface because this information is not displayed on the Settings for the container

@strykerin -
Thanks for brining this to our attention. We will investigate it further and update you shortly.

@strykerin This information is not available on the portal today.
Please post your ask on the CosmosDB UserVoice so that other users can upvote if they have a similar requirement.
The product team prioritizes requests accordingly.

We will proceed to close this issue now.
If there are further questions regarding this matter, please comment and we will gladly continue the discussion.


Routing issue with server routes configured in defineRoutes

Reproduction
Here is the stackblitz: https://stackblitz.com/edit/remix-run-remix-ivw6gy?file=vite.config.ts
I have a server only route (/api). it is working with default vite.configs. But if I use the routes section to customize routing table and also use ignoredRouteFiles:["routes/*"] (to avoid conflicts), it raises error on yarn build while it is still working on production.
To test it in stackblitz, just call yarn build.
System Info
MacOs, chrom

Used Package Manager
yarn
Expected Behavior
customized routing should work with server routes too in both dev and production environment.
Actual Behavior
it works in dev but not production.

Routes cannot be "server only" because the client side router needs to know about them - even resource routes - so it can match them client side with forms/fetchers and such.  So you can't register the route itself as .server.ts.  Instead, you can have api.ts as the route and then it can import from a non-route server-only file, like api-functions.server.ts

Well, the main issue is different behaviours for one functionality(i.e. defining routes):

having api.ts inside routes folder (✅ both development and production)
defning it through routes: async (defineRoutes) => {...} in vite.config.ts file. (✅ in dev, 🚫 in production)


Ember Plugin swallows errors from Console

Do you want to request a feature or report a bug?
This is a bug.
What is the current behavior?
I've included Raven v3.15 both through the CDN and bower install raven-js and import it according to the steps listed at https://docs.sentry.io/clients/javascript/integrations/ember. When I manually throw an error throw new Error('This should be in the console') it never shows any signs of failure in the console, and it does not show up on the Sentry dashboard.
If I leave out the Ember plugin the errors shows up on Sentry's Dashboard but not in the console.
What is the expected behavior?
The error should always be visible in the console as opposed to being swallowed. In addition, the error should also be visible on the Sentry dashboard.
This shows errors in the console but not on the Dashboard:
app.import('bower_components/raven-js/dist/raven.js');
// app.import('bower_components/raven-js/dist/plugins/ember.js');

This shows errors on the Dashboard but not in the console:
app.import('bower_components/raven-js/dist/raven.js');
app.import('bower_components/raven-js/dist/plugins/ember.js');

Environment
This was tested on macOS in both Chrome and Firefox. The versions of Raven tested are 3.14 and 3.15, hosted Sentry.
I haven't seen this work with the Ember plugin – my only experience with Sentry has been the standalone version (no plugins).

Thanks for the report and details, @mirague.
Could you include a minimum complete example of where you do the importing, where you instantiate/configure Raven, and where you throw? I'd like to reproduce this locally to investigate and want to make sure I start from the same place.

@LewisJEllis Absolutely!
Installation
I've installed it through bower install raven-js
Import
In ember-cli-build.js I've added this snippet:
module.exports = function (defaults) {
  var app = new EmberApp(defaults, {
    // ...
  });

  app.import('bower_components/raven-js/dist/raven.js');
  app.import('bower_components/raven-js/dist/plugins/ember.js');

  return app.toTree();
};

index.html (configuration)
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  {{content-for "head"}}
  <link rel="stylesheet" href="{{rootURL}}assets/vendor.css">
  <link rel="stylesheet" href="{{rootURL}}assets/bazaar.css">
  <meta name="sentry:revision"></meta>
  {{content-for "head-footer"}}
</head>
<body>
  {{content-for "body"}}
  <script src="{{rootURL}}assets/vendor.js"></script>
  <script>
<EMAIL_ADDRESS>{
      release: $("meta[name='sentry:revision']").attr('content'),
      ignoreErrors: ['TransitionAborted']
    }).addPlugin(Raven.Plugins.Ember).install();
  </script>
  <script src="{{rootURL}}assets/bazaar.js"></script>
  {{content-for "body-footer"}}
</body>
</html>

Note: The release is populated based on a <meta> tag defined on runtime by Ember.
Throw an Error
For the test I've generated a Component (ember generate component my-component) and pasted a throw new Error('Foo') in the didInsertElement() hook:
// my-component.js

import Ember from 'ember';

const { Component } = Ember;

export default Component.extend({
  didInsertElement() {
    throw new Error('Foo');
    // or this.iDontExist();
  }
});

Then in any template (e.g. application.hbs) you render the component:
{{my-component}}

Extra info
By doing the above I managed to reproduce this. The bug may be contained to components only. I tried throwing an error already in a router like this:
// app/routes/index.js

import Ember from 'ember';

const { Route } = Ember;

export default Route.extend({
  beforeModel() {
    this.iDontExist();
  }
});

The above did show the error in the console and also fired an XHR request to Sentry, making the error show up on my Dashboard correctly.

Hi @benvinegar , I appreciate that you are personally looking into this issue for Ember.
Did you try the above code ? Were you able to reproduce the issue? Do let us know if there is anything else you need to fix this issue.

Same issue happening on new Sentry SDK. Should I open a new issue?

@iamareebjamal yes please, preferably following our issue template (event link, repro case etc.) Thanks!


Disco new (with existing project)

In Rails 4.2.1 project
in the actual root of the project
disco new

results in ...
No value provided for required arguments 'app_path'

as per docs

(Note: You can also add Rails Disco to an existing Rails application. Simply omit the application name and run the command inside your application.)

Maybe I missed something? Thanks.

This seems to be a bug. Thank you for reporting it.
I guess this feature was simply forgotten.
I will take a look into it as soon as I find time - what might take a while.


Build_connector documentation improvements

Hi guys ! 👋
I'm currently trying to build a Twilio SIP connector, but even when a take a look at the TwilioSMS connector code I am not able to reproduce it in a similar way for the SIP one.
I even tried to build WhatsApp, Telegram and LINE connectors without success. I don't know where to start, which methods are optionals or not, etc.
For example when I add the endpoint I want in the method createWebhookEndpoints, my endpoint can't be accessed, event if I load my module like the provided example.
As you can see, I'm struggling to build a connector on my own, hope you'll be able to help me.
Would it be possible to update the 'build_connector' documentation in a more understandable format ?
I find it very complex to understand.
Thanks in advance !

You should jump in our community slack if you have general questions about building a connector, or want a code review. This can be a complex discussion so it might be best to start over there to get the initial clarity, and we of course will take any suggestions on way to improve the documentation via a PR.


[JN-1164] surfacing withdrawn enrollee data

DESCRIPTION (include screenshots, and mobile screenshots for participant UX)
This adds a table of withdrawn enrollees, linked of the participant list

The idea is to show just enough to help troubleshoot, but not sending any unnecessary PII.  The email column is hidden by default.
This also does a driveby addition of a doc link to the enrollee withdrawal modal

TO TEST:  (simple manual steps for confirming core behavior -- used for pre-release checks)

redeploy ApiAdminApp
go to https://localhost:3000/demo/studies/heartdemo/env/sandbox/participants
click "withdrawn"
confirm table appears
confirm you can see emails if you unhide that column

Yeah, that selector bug is over a year old.  we have a ticket for it somewhere, it's a non-trivial fix


Bit depth being written wrong due to dectris firmware changes

Data files are being written with 32 bit depth even when data collected at 16 bit depth, this is causing zocalo issues with wrong max pixel values. The "correct" bit depth is now included in the meta file in _dectris/bit_depth_image
currently patched live on beamline in write_nexus.py line 176 where we do
    "bit_depth_readout": "_dectris/bit_depth_image",

instead of previously
    "bit_depth_readout": "_dectris/bit_depth_readout",

but this is confusing, and we should fix it properly (so that fields have the same name...), also see https://github.com/cctbx/dxtbx/pull/632

Ultimately blocked by https://github.com/nexusformat/definitions/issues/1258

This is now internal in nexgen, we still need a nicer longterm fix


feat: implemented onDrop callback function

Very similar to onPaste callback.

Isn't the usual pattern to return false to prevent from continuing?

@dwelle, I don't disagree with you, however, I took onPaste as the template. https://www.npmjs.com/package/@excalidraw/excalidraw#onPaste

Ok, so it seems you're more aware of some of our codebase than I am.
It seems I've approved the PR (https://github.com/excalidraw/excalidraw/pull/3420), but missed this.
@ad1992 thoughts? My opinion: => boolean | void, not require return values, and only consider false as "prevent default". It'd be a breaking change for onPaste, but I think it'll be fine.

I think you've mistakenly merged in the zoomToFit code into this PR

@zsviczian whats the status of this PR ?

I've implemented this in the Obsidian fork and have been using this since last year september... I still think this should be part of the official package.
https://github.com/zsviczian/excalidraw/blob/3384fb3b7d6034f17da0e8ade3a9b30126bb47b0/src/components/App.tsx#L5749-L5758

@zsviczian could you rebase the PR with latest master and. clean up the PR as it contains some unnecessary changes like upgrading deps, editing README_NEXT  ? Or best would be if you could create a fresh PR and close this one ?


OCD suggestion on merging PRs more neatly

I struggled myself with this one but managed to get it working :)

Great suggestion! (Not that I expect anything less from you) I was actually discussing this issue with a friend recently. I hate that the merge button on GitHub creates an extra merge commit even when it's a fast-forward merge! That's just absurd. I'll practice this in a test repo so I don't destroy anything here, but I definitely plan to incorporate this into my workflow. I'll keep this issue open until I pull it off in here for the first time. Thanks for the information!

Hey @dandv! I made an improvement on Meteor's suggested workflow for merging PRs! Wow. I literally have a tear of excitement in my eye right now. This is what a clean commit history does to me. :P I feel like I've achieved the ultimate level of commit history cleanliness.
All I did was make sure the PR was rebased onto the latest version of the branch I was merging it with, devel. Then I checked out the PR branch locally, and instead of cherry-picking the commit from the PR branch (as Meteor's workflow suggested), I just merged it into devel with
> git checkout pr/97
...test changes...
> git checkout devel
> git merge pr/97
> git push

That should always be a fast-forward merge, since the branch was rebased on devel.
Check this history out. It comes from PR #97, which you can see is marked as "Merged" on GitHub, as if I had clicked the evil Merge button! What you won't see, however, is any extra merge commit, or even that unnecessary modification of the commit by the repo owner! The large picture on GitHub next to the commit log shows the author of the commit, and the small inset picture is the committer (if they're different -- otherwise only the one pic is shown). So now, the original author and committer can be preserved, without any useless information polluting the commit history. Even better, because the original commit is preserved, GitHub will now be able to detect when that commit is merged upstream, and will automatically mark the PR as "Merged" and close it as soon as the commit is pushed. Yay for git OCD!
The one piece of useful information that is now missing (since there's no more merge commit) is a reference to the PR that a commit comes from. I'll have to add that to my contributing guidelines, so PR numbers are included in commit messages (maybe at the end of the subject line).  Thanks so much for this suggestion! Let me know what you think of my change to the workflow.

Such a nice application of this procedure as in #123 merits mention on StackOverflow :)


interval: FenwickTree tests

Codecov Report

Merging #57 into master will increase coverage by 2.4%.
The diff coverage is 100%.

@@            Coverage Diff            @@
##           master      #57     +/-   ##
=========================================
+ Coverage    73.9%   76.31%   +2.4%
=========================================
  Files          19       19
  Lines         778      781      +3
=========================================
+ Hits          575      596     +21
+ Misses        184      166     -18
  Partials       19       19

Impacted Files
Coverage Δ

interval/fenwick.go
100% <100%> (+100%)
:arrow_up:

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 6c4d10e...b12fcbd. Read the comment docs.


Install git-crypt

This was supposed to be quick and easy... I'll try again if I ever actually use git-crypt


webhook/mutator: filter out the witness node

Problem:
The matched-node returns the whole nodes even if we have one witness node.
The witness node did not run any workload, so we should filter out this.
Solution:
we do not allow any workload on the witness node, so we should filter out the witness node when creating the vlan config.
Related Issue:
https://github.com/harvester/harvester/issues/5325#issuecomment-2236668074
Test plan:
Make sure the annotation of vlanconfig response should looks like below (harvester-node-1 is the witness node)
annotations: {network.harvesterhci.io/matched-nodes: "["harvester-node-0","harvester-node-2"]"}

cc @a110605, backend PR is here.

Hi @Vicente-Cheng , I test with latest harvester-network-controller. The config via select all nodes filter out witness when first created, but wait for 3 ~ 5 mins the witness node is auto added in annotation.
Do we have any mechanism to update annotation in backend ?
Reproduce Steps:

create network config via select all nodes
check the config YAML, the witness node is not in matched-nodes annotation
Wait for 3 ~ 5 mins and refresh the page.
The witness node is added in annoation

@mergifyio backport v0.4.x

@mergifyio backport v0.4.x


46372 Remove access to attachment file path

What:
Remove access to attachment file path.
Why:
We intent to encrypt the entire content in a datastore, that includes databases and attachments. The encryption for databases is already in place but we are still working on the attachments. The first step to reach this goal is to remove the direct access to the attachments through their paths. We can not allow other parts of the library to read an attachment as if it were a normal file because, it the attachment is encrypted, the data will not make any sense (obviously).
How:

Remove/hide method 'TDBlobStore:pathForKey:'.
Define protocol to access the content in an attachment: CDTBlobReader.
Define protocol to save data in an attachment: CDTBlobWriter
Implement class that conforms to both protocol: CDTBlobData. This way all the code related to access an attachment is in the same place.
Modify library to use the new class instead of accessing the files using their paths.

Check case with BugzID 46372 for more details about the design and how it has evolved until the current point.
Tests:
Tests are for the new class CDTBlobData, the rest of the code is already under coverage:

A blob has to be created with a path (although the file does not have to exist on advance).
A blob is not open after initialisation.
To open a blob, a file must exist in the specified path.
Add data to a blob fails if it was not open before.
A blob has to be open to read its content.
A blob can not be read if the file does not exist.
A blob can not be created/overwritten if it is already open.

reviewer @mikerhodes
reviewer @rhyshort
NOTE: Wait to review this PR until PR #138  is closed. This branch will be rebased and there will be only commits related to this case.

NOTE: Hide property path in TDBlobStore.

Looks good to me, :+1:

Logic looks good, a few comments on naming and the use of a single reader/writer class.

@mikerhodes @rhyshort Based on this comment, I'm going to add a new commit to this PR. It is not directly related with these changes but I think I should merge ASAP into feature-encryption

I think this looks good now, +1.


Flatten nested model environment variables

Checks

[X] I added a descriptive title to this issue
[X] I have searched (google, github) for similar issues and couldn't find anything
[X] I have read and followed the docs and couldn't find an answer
[X] After submitting this, I commit to one of:

Look through open issues and helped at least one other person
Hit the "watch" button on this repo to receive notifications and I commit to help at least 2 people that ask questions in the future
Implement a Pull Request for a confirmed bug

Question
I would like to specify my nested models' configuration using simpler, flat environment variables rather than JSON. I'm not quite sure if some of the open issues are related to this, at least #717 is quite close, I think. :)
Output of python -c "import pydantic.utils; print(pydantic.utils.version_info())":
             pydantic version: 1.7.3
            pydantic compiled: True
                 install path: /home/vscode/.local/lib/python3.9/site-packages/pydantic
               python version: 3.9.1 (default, Dec 18 2020, 05:16:04)  [GCC 8.3.0]
                     platform: Linux-4.19.121-linuxkit-x86_64-with-glibc2.28
     optional deps. installed: ['typing-extensions']

import os
from pydantic import BaseModel, BaseSettings

class Nested(BaseModel):
    text: str = "hello"

class MyConfig(BaseSettings):
    nested: Nested = Nested()

    class Config:
        env_prefix = "MY_"

os.environ["MY_NESTED_TEXT"] = "world"

config = MyConfig()

print(config.nested.text)
assert config.nested.text == "world"

So os.environ["MY_NESTED_TEXT"] = "world" rather than os.environ["MY_NESTED"] = '{"text":"world"}'.
I guess I could specify the env field manually on each one, but that is a bit cumbersome. Is there a more automatic way to go about this?

Right now there is no nice way of doing it as far as I know (although if there is I'd be happy to know as well).
In fact we even built in pydantic support for our settings lib: https://github.com/daviskirk/climatecontrol#pydantic which does support this. The way that works is basically by interpreting some string (in our case "__" as the "nested" part), which you could also to yourself if you wanted.
Alternatively, you could specify the env_prefix on your nested model as well (which I think will work, and does at least on your example):
from pydantic import BaseModel, BaseSettings

class Nested(BaseSettings):
    text: str = "hello"
    class Config:
        env_prefix = "MY_NESTED_"

class MyConfig(BaseSettings):
    top_level: str = "foo"
    nested: Nested = Nested()

    class Config:
        env_prefix = "MY_"

os.environ["MY_TOP_LEVEL"] = "bar"
os.environ["MY_NESTED_TEXT"] = "world"

config = MyConfig()

assert config.top_level == "bar"
assert config.nested.text == "world"

Right now there is no nice way of doing it as far as I know (although if there is I'd be happy to know as well).
In fact we even built in pydantic support for our settings lib: https://github.com/daviskirk/climatecontrol#pydantic which does support this. The way that works is basically by interpreting some string (in our case "__" as the "nested" part), which you could also to yourself if you wanted.
Alternatively, you could specify the env_prefix on your nested model as well (which I think will work, and does at least on your example):
from pydantic import BaseModel, BaseSettings

class Nested(BaseSettings):
    text: str = "hello"
    class Config:
        env_prefix = "MY_NESTED_"

class MyConfig(BaseSettings):
    top_level: str = "foo"
    nested: Nested = Nested()

    class Config:
        env_prefix = "MY_"

os.environ["MY_TOP_LEVEL"] = "bar"
os.environ["MY_NESTED_TEXT"] = "world"

config = MyConfig()

assert config.top_level == "bar"
assert config.nested.text == "world"

@daviskirk Thanks! Good to know I'm not alone. :)
climatecontrol actually looks very useful and at a first glance has a lot of things I need. I'll take a closer look.
I'd rather not set the env_prefixes on submodels / settings since I want to keep configuration things in one place and not scatter them in all of the models.
I have two ideas:

Read all prefixed environment variables and put them into a dict delimited by _

This works, but if there's a variable with an underscore rather the value being in a nested model it fails

MY_TOP_LEVEL -> {"top": {"level": "bar"}} vs. {"top_level": "bar"}
This could be solved with something like the double underscores

Flatten the Pydantic nested schema keys into a dict with a delimiter and use those keys to read environment variables directly

This would solve the underscores in variable names

But I'm unsure how I can instantiate / get the whole schema without providing a full set of data in the first place (required values, or empty defaults)
If there's nested models as Optional[Nested] = None those Nested keys are not visible using .construct() for example

Any way, I guess I got my answer. :)

@daviskirk Thanks! Good to know I'm not alone. :)
climatecontrol actually looks very useful and at a first glance has a lot of things I need. I'll take a closer look.
I'd rather not set the env_prefixes on submodels / settings since I want to keep configuration things in one place and not scatter them in all of the models.
I have two ideas:

Read all prefixed environment variables and put them into a dict delimited by _

This works, but if there's a variable with an underscore rather the value being in a nested model it fails

MY_TOP_LEVEL -> {"top": {"level": "bar"}} vs. {"top_level": "bar"}
This could be solved with something like the double underscores

Flatten the Pydantic nested schema keys into a dict with a delimiter and use those keys to read environment variables directly

This would solve the underscores in variable names

But I'm unsure how I can instantiate / get the whole schema without providing a full set of data in the first place (required values, or empty defaults)
If there's nested models as Optional[Nested] = None those Nested keys are not visible using .construct() for example

Any way, I guess I got my answer. :)


[HUDI-8543] Fixing SI MDT record generation in MDT to not rely on RDD

Change Logs
Fixing SI MDT record generation in MDT to not rely on RDD
This is a stacked patch over https://github.com/apache/hudi/pull/12269
This is the 2nd patch among series of patch.
In this patch, we are making SI to not rely on RDD.
SI needs to know what record keys have been deleted or updated so that it can delete those entries from SI. We are only adjusting this to not depend on the writeStatus.
We had to make some changes to our RLI and SI records are generated.
We do not want to read from data files repeatedly(once for RLI and again for SI). And so, here is what we are doing.
Step1: For every HoodieWriteStat in the HoodieCommitMetadata, we are generating PerFileGroupRecordKeyInfos which contains

a boolean flag to denote whether the file group of interest contains pure inserts.
and List . RecordKeyInfo is a POJO containing below items

 private final String recordKey;
 private final RecordStatus recordStatus;
 private String partition;
 private String fileId;

where RecordStatus is an enum with INSERT or UPDATE or DELETE
Incase of parquet file:

if previous base file is present, we read both old and new and generate PerFileGroupRecordKeyInfos. If only RLI is enabled, we do some optimizations here as we don't really need to differentiate insert/updates in latest parquet file.
Incase of log files:
For regular data blocks, we populate values only if both RLI and SI are enabled. If only RLI is enabled, we don't need to process data blocks as RLI only cares about inserts and deletes.
Incase of delete blocks, we read them and and populate values for List  in PerFileGroupRecordKeyInfos.

Step2:
Persist the output from Step1. (PairRDD)
Step 3:

We use the output from Step2 and generate RLI records.

Step4:

We use the output from Step 2 and generate SI records. Here we only poll the PerFileGroupRecordKeyInfos to understand the record keys that have been deleted or updated.
We still have code snippets here to read directly from data files for SI purpose. This might be taking up in a separate patch (as it might increase the scope of the patch)

Essentially, at a high level, we do one processing of data files to populate PerFileGroupRecordKeyInfos for every HoodieWriteStat (i.e. every partition, fileId combination).
And then use the paired RDD to compute RLI and SI records.
Pending:
I need to write more tests. But most of existing tests for RLI and SI except 1 which I am investigating.
Impact
No non-determinism or undefined behavior for RLI and SI is fixed.
Risk level (write none, low medium or high below)
low
Documentation Update
Describe any necessary documentation update if there is any new feature, config, or user-facing change. If not, put "none".

The config description must be updated if new configs are added or the default value of the configs are changed
Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the
ticket number here and follow the instruction to make
changes to the website.

Contributor's checklist

[ ] Read through contributor's guide
[ ] Change Logs and Impact were stated clearly
[ ] Adequate tests were added if applicable
[ ] CI passed

Closing this in favor of https://github.com/apache/hudi/pull/12313


Add missing link

KeepAChangelog requires to have links in the header. This one adds it.

Furthermore, during development, there should be an [Unreleased] heading.

Coverage remained the same at 38.434% when pulling 2eb1f1e50c6fd1297ef224884c1d357eb232c11c on koppor:patch-1 into 1fc5d689d583a7d2a494beb58573ec9753516a86 on kermitt2:master.

Well noted. Thank you Oliver !


mdns_responder - Clarify what code in the sample is necessary for mdn…

…s support vs. what code is unrelated to mdns

Compliance is still not happy:

1: UC5 Commit title exceeds max length (95>75): "samples: net: mdns_responder: Clarify code in the sample for mDNS support vs. unrelated to mDNS"
1: UC6 Commit message body is empty, should at least have 1 line(s).

@rlubos that's a pretty short subject line requirement. I believe his latest push fixes those remaining issues.


Programmatically set the current active tab in TabLayoutAndroid?

I'm really diggin' the TabLayoutAndroid component. However, there doesn't seem to be a way to programmatically set the active tab in JS.
E.g., I would love to be able to do something along the lines of:
<TabLayoutAndroid selectedTab="kittensTab">
   <TabAndroid id="allPicturesTab" />
   <TabAndroid id="kittensTab" />
   <TabAndroid id="dogsTab" />
</TabLayoutAndroid>

Thanks again! :)

Hello,
Thank you for your feedback. Yes this approach is quite interesting.
For next release (after holidays), it will be implemented :)


[question] How do I know the redis connection established successfully?

I am new to redis, and when I see the document, I am really confused.
I cannot find an instruction about how to check the successful connection, I expected there is a callback or something in the constructor, but there is not any document about that. And I don't know what methods the redis instance has, maybe you cannot suggest everyone using this lib know redis extremely well.

you can use
redis.on("connect", function() {
    // code on connect go here
})

you can use
redis.on("connect", function() {
    // code on connect go here
})

Thank you, and I have one more question. Are the operations to redis server synchronized ?
Such as redis.sadd('a', '1'), redis.set('123', '123'), etc. So I shouldn't await them ?

it's a Promise, you will need to await if you want the result to proceed next.

it's a Promise, you will need to await if you want the result to proceed next.

Thanks, and again, I cannot see that in the doc, it's really confused. The @types/ioredis module doesn't imply it either. Is there any chance some of the maintainers could improve the documentation ?


Settings editor: Cannot tab to gear menu

Issue Type: Bug
Testing #57304
I couldn't find a way to navigate to the gear menu using the keyboard:

VS Code version: Code - Insiders 1.27.0-insider (43676d0cb7db94e2fa771f1d10bff10eaa01b453, 2018-08-28T05:12:24.162Z)
OS version: Darwin x64 17.7.0

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz (8 x 2200)

GPU Status
2d_canvas: enabledchecker_imaging: disabled_offflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onnative_gpu_memory_buffers: enabledrasterization: enabledvideo_decode: enabledvideo_encode: enabledwebgl: enabledwebgl2: enabled

Load (avg)
2, 2, 2

Memory (System)
16.00GB (0.04GB free)

Process Argv
/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron --user-data-dir /Users/chrmarti/Development/repos/tmp/user2 --extensions-dir /Users/chrmarti/Development/repos/tmp/ext2

Screen Reader
no

VM
33%

Extensions: none

There is a keyboard shortcut, but we thought that it's not natural to have all of them as tab targets.
The keyboard shortcut needs to be read in the aria-label, which I haven't done yet...

@roblourens
Are you thinking of having "Press alt-F9 for settings options" or something similar?
that's gonna be a lot of extra stuff, no?

Yeah exactly, I'm not sure how that will work, but if it's not a tab target I think it needs to be more discoverable to keyboard users.

but I think we agree there are already too many tab targets
I wonder if one time announcement when arriving on the settings page would do it
the last thing an accessibility user needs is repetition of a behavior indicator that doesn't change

the last thing an accessibility user needs is repetition of a behavior indicator that doesn't change

One existing precedent I thought of is in the extension viewlet, aria-label for every item includes "Press enter for extension details". It's annoying but I'm not sure what else to do.

do you want me to look at this?

Sure, if you have any ideas

I'm trying to understand exactly what you mean by your above statement 'element with describedby'
I'm rusty on the thread

You use describedby to point at the description, which is how the description is read, right?

correct
I'm not clear on the latest problem.  Do you need a multiple component reader label? Not ideally the title?

I think the screenreader should read the keyboard shortcut for the gear button after it reads the name and description of the setting, if that's possible.

Oh, you can set multiple ids in describedby and it will read all of them? Sounds perfect.

yup, so can aria-labeledby !
targets have to be static, what I did is to add a div to to the option template with no content
but the aria-label attribute


Not working at version 39(31504)

Same as title, not working at version 39(31504).

Yep it had fix for 3.9 beta, but 3.9 is not officially released version!

fixed!


where is the paper？

 Hello，where can see  your Master thesis of “Capsule Layer as a Discriminator in Generative Adversarial Networks“ ? I can't  find it on the web by baidu or google,can you send it to my Email of<EMAIL_ADDRESS>?thanks very much!

Hi @qiongxiao! Unfortunately I'm still working on it and due to a tight schedule it takes time to document it all. In the meantime, you can check the recent paper on the same topic: https://arxiv.org/abs/1802.06167

thanks very much！

Hi, @gusgad ,is https://arxiv.org/abs/1802.06167 your paper?

Sure alright


structured-haskell-mode doesn't compile with haskell-src-exts

Any chance of adding a workaround for that? See https://github.com/chrisdone/structured-haskell-mode/issues/90
The compile error is
src/Main.hs:172:21:
    Not in scope: data constructor ‘IHead’
    Perhaps you meant ‘DHead’ (imported from Language.Haskell.Exts.Annotated)

src/Main.hs:173:21:
    Not in scope: data constructor ‘IHead’
    Perhaps you meant ‘DHead’ (imported from Language.Haskell.Exts.Annotated)

Edit:
This seems to be a haskellngPackages only problem, I guess the stable one does still use haskell-src-exts 0.15

I'll commit a fix later today.


Add support for viewing resources on multiple pages (backwards compatible)

After wanting to have better support for multiple pages, I rewrote parts of the layout.erb and added a second example resource to better show the changes. There are a few known issues that I plan to work on, but for individuals that want the basis of having multiple pages, this works well enough. I elected not to edit the javascript this time around to preserve backwards compatibility. I have done some work on Rspec_Api_Documentation to support this branch. It can be found here. That branch is still wip, so read over the changes here and there to use RAD with slate paged.
Changes:

You can list your resources on all pages, as well as the requests for that resource
The new changes only go into affect if multiple_pages: true is included in the index.html.md yaml.
This makes all these additions completely backwards compatible.
updated the ruby and bundler (Only because bundler wasn't working when I forked it straight up)

Known Issues:

The toc does not include the "includes." it's weird as the search does sometimes.
The toc drop down does not work. This is because I did not edit any of the _toc.js
Search is a bit weird. I did not edit it yet.

looks like the ruby version change does not sit well with Travis CI. :(

After debating this, I am closing this PR in order to create a new one against the dev branch. I also had to make minor edits after some weirdness in the regex and string interpretation with ruby. The functionality will be the same, but a little more generalized to better support RAD use.


Question: Memory consumption in RC2

Hi,
This is a follow up from this https://github.com/aspnet/Hosting/issues/623#event-666241811
I have moved one website from RC1 to RC2 (net46). The website is using EF6, MySql.
I am running parallel both versions RC1 and RC2 so I could see memory consumption on my server.
The result:
RC1 - dnx.exe - 77MB
RC2 - JyotiYoga.exe - 106MB
Do you have the same results with your website?

Also, I am going to move other around 20 websites to RC2 and I am still worried with what I mentioned here https://github.com/aspnet/dnx/issues/3371
20 websites * 106MB = 2120MB of memory.
Isn't ASP.NET Core hosting in IIS memory hungry? Again, the concern is hosting on Microsoft Azure VM where you cannot simply expand only memory and I would need to move actually my hosting to a different server provider for a better deal.
By the way on that IIS Worker Process w3wp.exe I am running 15 small ASP.NET MVC 5 websites.
I don't know too much about hosting but I am a bit worried.
15 ASP.NET MVC websites with 173-300MB memory consumption vs. 1 ASP.NET Core website with 106MB memory consumption.
Community, what is your experience?

The raw numbers don't mean much without a memory profile breakdown.

@VaclavElias Are you comparing the same application?

@davidfowl Yes. It is the same application. I will have more applications to compare as I need to migrate around 20 RC1 to RC2 so will update this post :)

If you could provide us with both applications that would be great
/cc @SajayAntony

Sure, how can I send them privately?

@VaclavElias Is RC1/RC2 the only difference between the apps?  Or per your first post, did you added EF to the mix?

@muratg Yes, the only difference is RC1/RC2.
I have updated my original post and moved the EF6, MySq words. That was just to let you know what I am using but placed it incorrently.

@VaclavElias Would you be able to upload it somewhere and send the info to sajaya at microsoft.com.

Will do in next 24 hours!

By the way on that IIS Worker Process w3wp.exe I am running 15 small ASP.NET MVC 5 websites.
I don't know too much about hosting but I am a bit worried.
15 ASP.NET MVC websites with 173-300MB memory consumption
@VaclavElias  Was 173-300MB  the memory of 15 JyotiYoga MVC 5 sites ?

We've made some changes that should improve this in later versions https://github.com/aspnet/DependencyInjection/pull/429.

That sounds very good, can we expect it in 1.0.1 or later? Are the changes related only to the .net core or also some non recommended practices in the code I provided @mnltejaswini ? Thanks!

That sounds very good, can we expect it in 1.0.1 or later?

It's not coming in a 1.0.1, but later in 1.1 of the DependencyInjection component.

Are the changes related only to the .net core or also some non recommended practices in the code I provided @mnltejaswini ?

The change affects both .NET Core and .NET Framework but the memory reduction is mostly in .NET Framework.

Hello again,
Regarding this subject, how can I measure or find out (what tools to use) why one website after launch on the production server has got around 170MBs and later it goes to 340MBs. It is ASP.NET Core 1.0.0 running on net461.
Thanks :)

I am moving my 20 ASP.NET Core websites from 1.0.1 to 1.1.
At the moment it seems that the Memory Consumption is much better, or the best so far. I will update you with my findings, especially once I moved the initial project mentioned in the beginning.

It seems that upgrade to 1.1, and change from net461 to netcoreapp1.1 brought a welcome change
The result:
RC1 - dnx.exe - 77MB
RC2 - JyotiYoga.exe - 106MB
1.1.0 - dotnet.xe - 68MB

I am closing this issue.

@VaclavElias Just a quick follow-up on your latest observations on your environment, how are things going? I too was surprised to see that a stock project template (Asp.net Core 1.1 on .Net 4.6.1, Web App with Individual User Accounts) spikes to 200 ~ 300 MB of memory on startup and takes a good 15 seconds to serve up the first request. Since you were migrating your apps, are you satisfied with how things are going?

Hi @ArashMotamedi, I am half way through migration of all my websites to netcoreapp1.1. At the moment I would be only using ASP.NET Core 1.1 with netcoreapp1.1 and not with net461 as this seems to reduce the amount of memory. I don't mind a slow start up, I think you can improve this from version 1.1 by compiling your Views (you need to add extra bits to project.json..).
I am satisfied at the moment as some websites dropped from 200 ~ 300 MB to 80 ~ 100 MB and I hadn't have to adjust my Azure VMs.
Still, I will be moving away from Azure VM in couple of months as Azure VM doesn't allow you to increase only memory while the other providers allow this by increment 500MB.
https://feedback.azure.com/forums/216843-virtual-machines/suggestions/6012262-granular-cpu-and-memory-proivisioning

This seems going to continue, I have moved to Visual Studio 2017 Community and moved a few projects to new msbuild. All using <TargetFramework>netcoreapp1.1</TargetFramework>
A few changes I can see on my server:

I cannot generate anymore .exe, the website becomes as dll and so the application in TaskManager says dotnet.exe and I cannot recognise which website is which.

The memory consumption almost doubled - what you see as dotnet.exe used to be in between 80-120MB. JyotiYoga wasn't migrated yet to msbuild.

If I changed all to net461 I can generate exe but I haven't tested memory consumption yet.
Anyone else is observing the same?

I cannot generate anymore .exe, the website becomes as dll and so the application in TaskManager says dotnet.exe and I cannot recognise which website is which.

If you were running on .NET Core before instead of .NET Framework, the only way to get an exe was to go standalone. What did your project.json look like before and did you auto migrate your project in VS2017, or did you do it yourself manually. Showing the before and after would help identify the differences.

The memory consumption almost doubled - what you see as dotnet.exe used to be in between 80-120MB. JyotiYoga wasn't migrated yet to msbuild.

Migrating to msbuild won't change your runtime behavior unless the migration steps changed the runtime settings along the way. If you can, please re-run the migration step and save before and after so we can take a look.
You might want to take a look at turning off server GC  (which is on by default for web projects) if you're concerned about site density on a server. The default settings aren't tuned for that.

Thanks @davidfowl for a quick reply.
Before - project.json - This was generating .exe with a small memory footprint, I guess it was standalone.

After auto migrate - changed to dll with a bigger memory footprint, and I had to install on the server Windows Server Hosting runtime.
.
I am going to play with server GC as well.

After auto migrate - changed to dll with a bigger memory footprint, and I had to install on the server Windows Server Hosting runtime.

Looks like the runtime identifiers were preserved. When you publish, what outputs were you looking at? It also looks like you didn't have server GC on before, it's not on by default in the web SDK. You can turn it off by setting the <ServerGarbageCollection> property to false in your csproj.
You should also look at your previous deployment's {app}.runtimeconfig.json to see if server GC was indeed off.

The previous deployment had in {app}.runtimeconfig.json just this:
{
  "runtimeOptions": {}
}

I will try to use <ServerGarbageCollection> but for now I changed my target framework to net461 and was able to generate .exe. Also, by this change the memory consumption lowered by almost 100MB for both websites as you can see on the image now and before so the consumption is now as previously.

and this is with this settings in {app}.runtimeconfig.json
{
  "runtimeOptions": {
    "configProperties": {
      "System.GC.Server": true
    }
  }
}

..This memory consumption is quite important as it might double the cost of VM or Azure App Service if you are forced to upgrade your hardware as there is no option just to add 1-2GB extra memory.
For now now my problem was resolved by switching to net461. Thanks @davidfowl for your suggestions I will update my findings here.

I would think for better density you'd want to try the following:

Remove RuntimeIdentifiers, you don't want to deploy the Core CLR with every application. Install the shared framework on your server (assuming you don't already have it installed)
Turn server GC off (by default it uses as much memory as it can). The app performance might suffer as a result (it's all trade offs) /cc @Maoni0

Yes, I installed the shared framework previously. What do you mean by Remove RuntimeIdentifiers? This is my current csproj.

I turned server GC off and the memory lowered to 54MB and 72MB that is even less memory, I will keep an eye on the performance.

Why are you specifying win10-x64 in your project file?

Honestly, I don't know. I remember something wasn't working previously in VS 2015 so I put it there and it was working.. Anyway, I will remove it as it seems ok now.
..I checked the server today and my websites are well with the same low memory consumption 54MB and 72MB.


Change styling of a region to indicate that it is selected

List of ideas for implementation:

Create a symbol in spectrogram to denote region
temporarily change color of spectrogram (bad idea removes save colorization)
Create a button to go to the region's timestamp

added to #48

Some code for this to be tested on the branch styling-selected-segments


chore: fix up release pipelines

Tested and fixed the release pipelines on my fork. A release is triggered by pushing a vX.Y.Z tag, which I assume could at some point be done by semantic release. The first version should be > 0.0.4 because it took a few tries to get everything to work, but the first real version should probably be 0.1.0 anyway.
The release workflows depend on #16 for the version identifier file, so it should probably be merged first.
Repo admin stuff needed (@jacques-n):

Workflows need git write permissions in order to attach Python wheels to release page.
CARGO_REGISTRY_TOKEN repository secret set to a token for some crates.io account for Substrait.
PYPI_API_TOKEN repository secret set to a token for some PyPI account for Substrait.
I need to know what the above two accounts are/will be in order to hand over permissions from my personal accounts.

@jvanstraten , it seems like you've taken a different approach to what we used in the core repository. I think it would be better to use a consistent approach.
Want to share the tokens with me via Slack so I can register them as necessary?

I'm open to suggestions for consistency; I'd also like to keep things as similar as possible. The actual release pipelines are much more complicated than Substrait's though, requiring several platforms and (for Python) a docker container; I can't just do it from within a .sh file running in a single ubuntu-latest runner. So, I figured the semantic release script would just up the version, handle the release log, and create the release log part of the github release. It doing that should then trigger the pipelines that do the actual building and publishing.
As for the tokens: I can pass you the tokens for my accounts, but wouldn't it be better to have accounts specifically for Substrait?


Add support for embedded-hal-async

Allow the driver to be used both by async and sync code. The variant can be switched by using the async feature for async, while by default it will be sync.

Thanks! Published to crates in v0.3.0


dc tkc story

added links to simpeg docs
light grammar edits

That looks great to me!! Thank you very much for your modifications @lheagy  👍