ClientSettingsPolicy does not work on HTTPRoutes with matching conditions

Describe the bug
If you apply a policy to a route that has http matches with a method, params, or headers defined, the policy has no affect.
To Reproduce
Steps to reproduce the behavior:

Deploy edge (118488e9b624f78c58add4f064909d7adb8ad571) version of NGF
Apply the files from the advanced routing example.
Create the following policy:

apiVersion: gateway.nginx.org/v1alpha1
kind: ClientSettingsPolicy
metadata:
  name: tea
  namespace: default
spec:
  targetRef:
    group: gateway.networking.k8s.io
    kind: HTTPRoute
    name: tea
  body:
    maxSize: "50"

Send the following request to the tea application:

curl --resolve cafe.example.com:$GW_PORT:$GW_IP http://cafe.example.com:$GW_PORT/tea -X POST --data "this payload is greater than fifty bytes but less than seventy five"

Expected behavior
You should receive a 413 entity too large since the request body exceeds the limit
Your environment

Version of the NGINX Gateway Fabric - edge 118488e9b624f78c58add4f064909d7adb8ad571

Additional context
The policy is correctly included in the named location block for the tea routes, but the directives are ignored by nginx. This seems to be a limitation of named locations in nginx.
For example, this config with named locations does not enforce the client max body size:
 server {
        listen 80;

        location / {
          try_files /dev/null @named;
        }

        location @named {
          client_max_body_size 50;
          return 200 "ok two";
        }
    }

however, if you change the named location to an internal location:
   server {
        listen 80;

        location / {
          try_files /dev/null /not-named;
        }

        location /not-named {
          internal;
          client_max_body_size 50;
          return 200 "ok two";
        }
    }

it does work.

I'll add that I discovered this using the ObservabilityPolicy. Traces were not being sampled on requests going through the named locations.

This problem is not limited to named locations, it is an issue with internal redirects.
To reproduce without named locations:

Apply files from advanced routing example
Create the following policies:

apiVersion: gateway.nginx.org/v1alpha1
kind: ClientSettingsPolicy
metadata:
  name: gateway-client-settings
spec:
  targetRef:
    group: gateway.networking.k8s.io
    kind: Gateway
    name: cafe
  body:
    maxSize: "25" # sizes without a unit are bytes.
---
apiVersion: gateway.nginx.org/v1alpha1
kind: ClientSettingsPolicy
metadata:
  name: tea-client-settings
spec:
  targetRef:
    group: gateway.networking.k8s.io
    kind: HTTPRoute
    name: tea
  body:
    maxSize: "50" # sizes without a unit are bytes.

Then send the following requests:
curl --resolve cafe.example.com:$GW_PORT:$GW_IP http://cafe.example.com:$GW_PORT/coffee -X POST --data "this payload is small"

Expect: 200
Got: 200
curl --resolve cafe.example.com:$GW_PORT:$GW_IP http://cafe.example.com:$GW_PORT/coffee -X POST --data "this payload is over twenty five bytes"

Expect: 413
Got: 413
 curl --resolve cafe.example.com:$GW_PORT:$GW_IP http://cafe.example.com:$GW_PORT/tea -X POST --data "this payload is over twenty five bytes"

Expect: 200
Got: 413 // This is the issue
curl --resolve cafe.example.com:$GW_PORT:$GW_IP http://cafe.example.com:$GW_PORT/tea -X POST --data "this payload is greater than fifty bytes and less than seventy five"

Expect: 413
Got: 413

Update:
The proposed solution to this bug was to set the directives (client_max_body_size, keepalive_requests, etc) in the external location block to the max value of all the internal location blocks.
This solution works for client_max_body_size, but does not work for keepalive_requests.
Some alternatives discussed:
(1) Change ClientSettingsPolicy from an Inherited Policy Attachment to a Direct Policy Attachment. ClientSettingsPolicy could only be attached to a Gateway. Possible to allow attaching to a Gateway.Listener which would allow the user to more selectively apply client settings to individual server blocks.
Pros:

doesn't violate gateway API spec rules
easy to reason about and explain to user
simpler (no inheritance)
settings apply to client -> nginx, not nginx -> backend so it makes sense to restrict to server context
minimal code changes

Cons:

breaking change for our ClientSettingsPolicy API (not terrible b/c it's v1alpha1)
will have to deprecate v1alpha1 version
less flexibility. User can't apply client settings to an HTTPRoute.
doesn't help us with future policies that we want to apply to HTTPRoutes.

(2) Add a restriction that a URI (like /coffee) can only be defined in one HTTPRoute. This will allow us to define the client settings in the external location blocks instead of the internal location blocks. Since the bug only applies to internal location blocks, this will eliminate the issue.
Pros:

no changes to ClientSettingsPolicy API
more flexibility - user can apply client settings to HTTPRoutes or Gateways
helps us with future policies that we want to apply to HTTPRoutes

Cons:

violates gateway API spec rules
could create issues down the line with conformance tests
probably requires a long-term solution to the initial problem so we can eventually remove this restriction.

I do like option 2 because it reduces complexity, but I do worry about the Gateway API expectations around it.

Closing in favor of: https://github.com/nginxinc/nginx-gateway-fabric/issues/2308


Add docstrings for labeling module

Add docstrings for most of snorkel/labeling. Per today's discussion, using NumPy style with PEP 484. Uncovered paths are snorkel/labeling/model and snorkel/labeling/analysis.py.
Test plan
pydocstyle snorkel/labeling

Changes planned: going to add some color on what an LF actually is

@bhancock8 @paroma changes made


Animations for playable character bugging out.

Describe your problem here.
I was trying to create a playable character for the engine, but the regular animations sort of fused with the miss animations. making regular/miss hybrid animations for the regular animations, but the miss animations worked as intended. Everything i have tried since ended up with the same result. please help :(
Are you modding a build from source or with Lua?
Source
What is your build target?
Windows
Did you edit anything in this build? If so, mention or summarize your changes.
I added an json file for the character, as well as the xml file and the spritesheet. that is all i changed.

This happened to me before but I can't remember what I did to make it like that. I will be going through my XML folder and see if I find the one that bugged. (IIRC, You have your miss and normal animation both start with "sing" and because of that, psych engine uses anything that starts with "sing". to fix this, you have to name your miss poses "misssing" or something else other than "singmiss")

This happened to me before but I can't remember what I did to make it like that. I will be going through my XML folder and see if I find the one that bugged. (IIRC, You have your miss and normal animation both start with "sing" and because of that, psych engine uses anything that starts with "sing". to fix this, you have to name your miss poses "misssing" or something else other than "singmiss")

YUP, THAT SOLVED THE ISSUE!!!! Thank you so much!!


Post packaging merge fixes

The inevitable PR :)
Addresses:

[X] Update CI strategies: more OS and Python versions
[X] MacOS tests run
[x] Windows tests run
[x] Sync docs / README
[x] Little typo in URL at README + detect this on CI
[x] T007: kfold reinitialization

That 404 on CI / Docs will be gone once we merge to master ;)


camel-zookeeper-master - Avoid osgi lookup

When upgrading to Camel 3.9 then we can register in the registry DefaultManagedGroupFactory as then it avoids the strategy that attempts to lookup in OSGi and use OSGi factory.
https://issues.apache.org/jira/browse/CAMEL-16155

Hello @davsclaus is this for porting the extension in native, or do we need to do something also for the existing JVM extension ?

Ah this is no longer needed as we created a special camel-zookeeper-master-osgi in the camel-karaf project.
So we can close this

@davsclaus thanks :)


modify queue name for messenger request function

"request" mechanism
in request function, both requester and responder use a queue to receive messages from their counterpart. In current code, the queue is exclusive, which means that it can only be acquired by one channel. Their names are in the same format "exchange:method.id:randomId"
problem
It is found that in scale environment (power on 350 nodes for discovery in an interval of 10s, host of rackhd 8G&4core), at a rate about 1/3, on-http (requester) tries to use a queue for taskExist message that is already owned by on-taskgraph (responder). the third-party shortId module for randomId generation is the most suspicious.
when this error occurs,
rabbitmq server repeats the following error
=INFO REPORT==== 11-Feb-2016::19:11:03 ===
accepting AMQP connection <0.17948.23> (<IP_ADDRESS>:48758 -> <IP_ADDRESS>:5672)

=ERROR REPORT==== 11-Feb-2016::19:11:03 ===
Channel error on connection <0.17948.23> (<IP_ADDRESS>:48758 -> <IP_ADDRESS>:5672, vhost: '/', user: 'guest'), channel 12933:
{amqp_error,resource_locked,
            "cannot obtain exclusive access to locked queue 'on.task:methods.activeTaskExists.56bcd84a9004a63d06941528:Byv' in vhost '/'",
            'queue.declare'}

=WARNING REPORT==== 11-Feb-2016::19:11:03 ===
closing AMQP connection <0.17948.23> (<IP_ADDRESS>:48758 -> <IP_ADDRESS>:5672):
connection_closed_abruptly

and on-http continuesly tries to create a new connections and declare this queue. As a result, rabbitmq server consumes increasing amount of memory, and is killed by OS finally.
solution
To avoid this problem, adding ".request" to the queue name of requester, which differentiate queue names of these two parts. and this problem disappears.

Great work, @iceiilin! Behind those several lines of code change, I know how difficult it is to debug/root cause this issue and how much efforts you have put into it.


Refactored datashader operations and add new aggregators

Some refactoring of datashader operations to make it easier to implement new operations. Additionally adds an operation to aggregate Spikes:
Handles simple spikes:

Handles datetimes:

Handles Spikes with vdims:

[x] Add tests
[x] Add Spikes aggregator with and with values and positive and negative heights
[ ] Add Area aggregator
[ ] Add Spread aggregator
[ ] Add docs

Cc: @jlstevens @jbednar

so I'm not sure if it's worth implementing this more generally here already in anticipation?

I haven't changed anything about this and don't intend to.

Mostly wanted to do this so I can more easily implement the Segments aggregator in #3532.

Do need to know whether this addresses @jlstevens' needs though. I think to do what he was doing you need to create an NdOverlay of rasterized spikes with each with a fixed y_range and a RangeX stream.

Would also like to compare performance to Jean-Luc's implementation, here's 10x1M spikes:

I haven't changed anything about this and don't intend to.

Ok. It showed up in the new stuff, but was probably just reformatted.  Your description of of Jean-Luc's needs sounds accurate to me, but I'll let him weigh in on that.

Updated the gif, dask appears slower than pure pandas here.

Once we have segments it'll probably might be more (computationally but not memory) efficient to precompute a Segments element to represent Jean-Luc's plot type, because it can represent the upper and lower end of each event.

It showed up in the new stuff, but was probably just reformatted.

Yeah, lots of refactoring happening in this PR.

Am I right that this should make datashading the Area and Spread elements easier?  When I looked at it briefly a few months ago it looked like handling a variable number of kdims didn't fit well into the old structure.

Am I right that this should make datashading the Area and Spread elements easier?

In some ways yes, but I'll probably have to do some more refactoring to get those done. That said I might tackle those in this PR as well.

This is fantastic, thanks!
From the title of the PR, I was still expecting to implement spikes support on top of the refactored code so it is a pleasant surprise to see that Spikes support is what is being added here!

I think to do what he was doing you need to create an NdOverlay of rasterized spikes with each with a fixed y_range and a RangeX stream.

That is exactly the approach I am currently using. As for performance, I'll check out this branch to compare but I doubt there will be much difference. If what I am currently using is significantly faster for some reason, I'll report back.

Area and Spread aggregation now also done, will add some tests and then document those in the Large Data guide.

Ready to review and merge.

Cool, thanks!

Will add some more tests in the morning.

@philippjfr Thanks for all this! I see you have now added some unit tests and the travis tests are green. Merging.


whether to support multiple versions in different repos

As a package manager cli tool, maybe it's better to provide options like--single-version to enable/disable version check.

conflict checking before deploy will be sufficient.


Problems with PHP 7.4

Hello,
there are several problems with PHP 7.4.
I give you some Screenshots for create and edit areas.
The domain selector doesn´t work anymore.
E.g. on Aliases page  i get on footer: "ml.twig') }}".

Hi,
a little late but I have to chime in to this issue. After a necessary update to php 7.4 the dropdowns for the alias management have disappeared. See the screenshot below.
I already reinstalled Symfony project dependencies and recomposed the files. Had to change the following file for that:
vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php
In lines 2636 and 2666 I had to replace continue with break. Yet, no success regaining the dropdown functionality.
I also tried the dependabot branch - to no avail.

Hey,
did you tried „composer update“?

Am 23.12.2020 um 12:56 schrieb digodigo<EMAIL_ADDRESS>
Hi,
a little late but I have to chime in to this issue. After a necessary update to php 7.4 the dropdowns for the alias management have disappeared. See the screenshot below.
I already reinstalled Symfony project dependencies and recomposed the files. Had to change the following file for that:
vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php
In lines 2636 and 2666 I had to replace continue with break. Yet, no success regaining the dropdown functionality.
I also tried the dependabot branch - to no avail.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Hi Andreas,
yes, I ran composer update during upgrade process. I finally had to fall back to PHP 7.3 from backports in order to get vmailManage going again.
One question though: did you try vmailManage on PHP 7.4 yet? I'm asking because I'm considering a fresh setup someday as I don't like to run deprecated software.
Kind regards
digo

I can confirm this problem, but after executing "composer update" the dropdown worked for me again


Can't check if an enum implements a class

Dart SDK version: 2.19.0 (stable)
analyzer 5.4.0
class Bar {
  bool get bar => false;
}

enum Foo with Bar {
  foo(true);

  Foo(this.bar);

  @override
  final bool bar;
}

the builder:
void checkType(DartType type) {
  final fooCheck = TypeChecker.fromRuntime(Foo);

  print(fooCheck.isAssignableFromType(type); // false but should be true
  print(type); // Foo
  print(type.element);  // enum Foo with Bar
}

Oh, maybe this is more specific to TypeChecker from the source_gen package?

cc @kevmoo

@matanlurey did the work on TypeChecker – but maybe?

If we never touched it to explicitly support enhanced enums, I wouldn't be surprised if it doesn't support them :)


Spellcheck

Should spellcheck be working in markdown files?  I have 17.9.0 Preview 2.0 and spellcheck hints appear in C# code, but nor *.md files.  Neither with the native editor or the "Markdown Editor v2" editor.  Is there something special to enable spellchecking in markdown files?

I wouldn't mind helping to add this feature if it's not already supposed to be working.

I can look into how to tag up the markdown file for spell checking. I'm afraid we would need to take a dependency on VS2022 v17.6 or higher to do that

So in the latest VS that includes a spell checker, if the extension is disabled/not installed, the spell checker works on MD files. When the extension is enabled, it stops working, I'm guessing because the extension is completely replacing the default editor. I tried looking through the extension API help for how to integrate but found nothing, but I easily could have missed it. Sounds like MS did a really poor job on integrating the checker since it only works for c and c# anyways right now. I'm guessing they didn't make it public yet. I might investigate how to integrate another checker. Otherwise I'm stuck using another application. Everything else works great though 👍

There are public APIs for it, but they are only in the VSSDK 17.6 or newer AFAIK. There may be another way though. I'll try to find out


Add endpoints for getting and setting workspace user roles

Prerequisite functionality for https://github.com/multinet-app/multinet-client/pull/107
This would be a pair of endpoints that would look something like:

GET /api/workspaces/{workspace}/permissions
PUT /api/workspaces/{workspace}/permissions

The data model for each of these would contain a list of users, and their permission on the workspace. Something like:
[
  {
    user: <sub>
    role: <'reader' | 'writer' | 'maintainer' | 'owner'>
  },
  ...
]

The workflow for modifying the permissions of a workspace would be as follows:

Retrieve list of users with their respective roles
Modify list
Call PUT to set the new permissions

This would obviously be gated behind the owner role on a workspace.

Instead of a list of individual users, would it be better or worse to have something like:
{
  owner: <sub>,
  maintainers: [<sub1>, <sub2>, ...],
  writers: [...],
  readers: [...]
}

and you would modify the permissions structure just by adding/deleting users from the appropriate lists.
What are the pros/cons of doing it each way?

Instead of a list of individual users, would it be better or worse to have something like:
{
  owner: <sub>,
  maintainers: [<sub1>, <sub2>, ...],
  writers: [...],
  readers: [...]
}

and you would modify the permissions structure just by adding/deleting users from the appropriate lists.
What are the pros/cons of doing it each way?

The approached you laid out is preferred, as we already model the permissions in this way anyway. I'll follow this approach.


Extend/Change login session timeout

I believe the session timeout is too short.
I would like to extend it, but not sure where.  This could possibly be a setting, where the admin could set it from 5mins to unlimited (for example).
Thanks.
(Again, thanks and i love Lychee - it just works!)

https://github.com/electerious/Lychee/issues/402


Custom tasks not working properly

Hi,
there is still an issue with the custom tasks feature. Example Gruntfile.js:
module.exports = function(grunt) {
    grunt.initConfig({
        release: {
            options: {
                afterBump: ['hello', 'hello2']
            }
        }
    });
    grunt.loadNpmTasks('grunt-release');
    grunt.registerTask('hello', 'Says hello', function() {grunt.log.writeln('hello');});
    grunt.registerTask('hello2', 'Says hello2', function() {grunt.log.writeln('hello2');});
};

Output:
$ grunt release
Running "release" task
>> Release dry run.
>> running afterBump
>> bumped version of package.json to 1.0.1
>> staged package.json
>> Committed all files
>> created new git tag: 1.0.1
>> pushed to remote
>> pushed new tag 1.0.1 to remote
>> published version 1.0.1 to npm

Running "hello" task
hello

Running "hello2" task
hello2

afterBump tasks run after other stuff finishes.

very important for, I vote for this
+1

Thank you for the heads up. #118 is the same as this bug, I think. I've just merged #122 now. Should be fixed. New version coming.


Need to be able to support multiple OpenAPI specs

Motivation
I have a server project that needs to interface with multiple services with OpenAPI specs. Currently I can't see a way to use more than one spec.
Proposed solution
It would be great if the spec(s) could be either grouped or specified instead of detected.  A specific folder or a place to create a list of file names would be ideal.
Alternatives considered
The alternative is to pick the more complex spec and use the generator, then code all other API interfaces by hand.  Or, use the OpenAPI CLI generator to just generate the code and skip using this project all together.
Additional information
No response

If you need to use more than one OpenAPI doc (either because your service implements the interface of multiple APIs, or because your service needs to talk to multiple upstream services), generate each into a separate Swift module.
For example:
- MyUpstreamService1
  - openapi.yaml
  - openapi-generator-config.yaml (generates a client)
- MyUpstreamService2
  - openapi.yaml
  - openapi-generator-config.yaml (generates a client)
- MyServiceA
  - openapi.yaml
  - openapi-generator-config.yaml (generates a server)
- MyServer
  - depends on and imports MyUpstreamService1, MyUpstreamService2, MyServiceA
  - implements the handler (conforming to `APIProtocol`) and uses the generated `MyUpstreamService1.Client` and `MyUpstreamService2.Client` to make upstream calls

Note that if you use this strategy, make sure to specify accessModifier: package or accessModifier: public, so that the generated code is accessible from other modules (the default is internal).
More details:

Explanation of why the recommendation is to use separate modules: https://swiftpackageindex.com/apple/swift-openapi-generator/1.2.1/documentation/swift-openapi-generator/project-scope-and-goals#Principle-Reduce-complexity-of-the-generator-implementation
Configuring the accessModifier: https://swiftpackageindex.com/apple/swift-openapi-generator/1.2.1/documentation/swift-openapi-generator/configuring-the-generator

Interesting, thanks for the great response!


Improving Mobile Feel

I added 'touchstart' as an event listener for the ui-sref element.
As a result, the state changes happens as soon as the element is touched instead of released.
Basically this removes the 300ms delay from mobile devices to determine a click event, which usually is done with ngTouch or fastclick. As far as I see, ngTouch only overwrites the ngClick directive and therefore ui-sref still has 300ms delay.
If needed I could move the behavior into an additional directive.
I hope this features is needed, but it was something I needed for my current project and I thought maybe you guys could need it as well.
Cheers

Can you rebase on top of master & fix the commit message to the format listed here

Yeah, if you could do the whitespace changes as a separate patch, that'd make the history easier to follow. Also, here's a more succinct reference on the PR submission guidelines: http://prjs.radify.io/#/angular-ui/ui-router/pulls/2045

@nateabele Triggering a state change via touchstart will break scrolling and other behaviour that does not involve "tapping" the display,

That is a good catch @nathanmarks - touchstart probably needs to be combined with touchend handling.


⚠ Cioos National CKAN has degraded performance

In 75cf31a, Cioos National CKAN (https://catalogue.cioos.ca/) experienced degraded performance:

HTTP code: 200
Response time: 17213 ms

Resolved: Cioos National CKAN performance has improved in 6829ac4 after 1 hour, 58 minutes.


When can the relevant code be made public?

When can the relevant code be made public?

The work is being prepared for optimization and expansion to be submitted to a journal, and the stable version of the code will be released soon. (I am busy with a DDL. 😊)


Right to left Support

Is your project support Right to left support ?
direction: rtl;

It does not, sorry.

materialize-rtl make materialize framework compatible with right to left languages. @mhf-ir


Using a Perl version shipped with the .app

I would like to adapt an application bundle created with Platypus (MyApp) to use a Perl installation contained in the .app itself. The reason: I need a different Perl than the macOS system one + custom installed modules.
I can set the Perl interpreter the .app should use modifying the AppSettings.plist (available in Resources of the .app). However, it seems I can only use full paths. I have the following values:
Key: InterpreterPath
Type: String
Value:   /Users/kb/Desktop/MyApp.app/Contents/Resources/perl5/perlbrew/perls/perl-5.26.1/bin/perl
Of course, the MyApp.app will not work if I move it around or if I use it on another computer. Is it possible to make the path relative to the MyApp.app location?
I tried to change value as follows:
Value: ./MyApp.app/Contents/Resources/perl5/perlbrew/perls/perl-5.26.1/bin/perl
I posted this issue in https://superuser.com/questions/1427329/use-relative-path-in-plist-made-with-platypus and I was suggested to ask here

Bundling an interpreter with the app and invoking it directly is on the feature list for Platypus 5.3. Meanwhile, you can get around this by using a shell script.

I would like to adapt an application bundle created with Platypus (MyApp) to use a Perl installation contained in the .app itself. The reason: I need a different Perl than the macOS system one + custom installed modules.

https://github.com/sveinbjornt/Platypus/issues/146#issuecomment-539394666

Fixed in master. Interpreter path can now be relative (to the Resources directory of the application bundle), so a bundled interpreter can be referenced.


add lepomis dataset

From Steve's latest email. It has some errors, so I might need to integrate it into a few unit tests, but we may as well stick it in the repo first.

Also adds flow? I'll approve.

Wait what are all these commits doing here

I need to remove all of those commits except for the first one. The rest are test suite things I was playing with.


List of PRs of upstream that could/should be merged here

This is a TODO list of PRs of https://github.com/ClosedXML/ClosedXML/pulls that could/should be merged here:

https://github.com/ClosedXML/ClosedXML/pull/1658
https://github.com/ClosedXML/ClosedXML/pull/1619
https://github.com/ClosedXML/ClosedXML/pull/1529
https://github.com/ClosedXML/ClosedXML/pull/1303
https://github.com/ClosedXML/ClosedXML/pull/1301
https://github.com/ClosedXML/ClosedXML/pull/1231
https://github.com/ClosedXML/ClosedXML/pull/892
https://github.com/ClosedXML/ClosedXML/pull/1672
https://github.com/ClosedXML/ClosedXML/pull/1539
https://github.com/ClosedXML/ClosedXML/pull/1429
https://github.com/ClosedXML/ClosedXML/pull/1404
https://github.com/ClosedXML/ClosedXML/pull/1394

https://github.com/ClosedXML/ClosedXML/pull/1394
And
https://github.com/ClosedXML/ClosedXML/pull/1672
Are obsolete now afaik

I will add mine: https://github.com/ClosedXML/ClosedXML/pull/1704


When I change the physical of Pageview in the Listener of Pageview, it will cause PageView to die.

When I change the physical of Pageview in the Listener of Pageview, it will cause PageView to die.
Codes
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: PageViewTestPage(),
    );
  }
}

class PageViewTestPage extends StatefulWidget {
  @override
  _PageViewTestPageState createState() => _PageViewTestPageState();
}

class _PageViewTestPageState extends State<PageViewTestPage> {
  PageController _controller;
  bool _locked;
  List itemLists = [
    Colors.red[100],
    Colors.red[200],
    Colors.red[300],
    Colors.red[400],
    Colors.red[500],
  ];

  void onPageChanged(int index) {}

  void scrollListener() {
    print(_controller.offset);
    double _currentOffset = _controller.offset;
    double _width = MediaQuery.of(context).size.width;
    if (_currentOffset > _controller.page * _width) {
      setState(() {
        _locked = true;
      });
    }
  }

  Widget _itemBuilder(context, int index) {
    return Container(
      color: itemLists[index],
    );
  }

  @override
  void initState() {
    _controller = PageController()..addListener(scrollListener);
    _locked = false;
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    print('---------locked:$_locked');
    return PageView.builder(
      controller: _controller,
      onPageChanged: onPageChanged,
      itemCount: 5,
      physics: _locked ? const NeverScrollableScrollPhysics() : null,
      itemBuilder: _itemBuilder,
    );
  }
}

[✓] Flutter (Channel master, v1.2.1-pre.196, on Mac OS X 10.14.2 18C54, locale
    zh-Hans-CN)
    • Flutter version 1.2.1-pre.196 at /Users/h3d-nna/Documents/flutter
    • Framework revision da5c97c3ef (4 days ago), 2019-02-14 02:47:29 -0500
    • Engine revision 3757390fa4
    • Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)

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

[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    • ios-deploy 1.9.4
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 31.3.3
    • Dart plugin version 182.5124
    • Java version OpenJDK Runtime Environment (build
      1.8.0_152-release-1248-b01)

[✓] VS Code (version 1.31.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 2.23.0

Can you please make the code a complete runnable reproduction (incl main() {...})?

@zoechi I have completed the code update

It stops rather randomly at different times when scrolling through the pages.
Once it stopped at the transition from the 1st to the 2nd page, then I could scroll to the 4th page before it stuck.
[✓] Flutter (Channel master, v1.2.2-pre.21, on Mac OS X 10.14.3 18D42, locale en-AT)

What I want to know is, what caused the page to get stuck, how should I solve it? @ @zoechi

I have made a PR about this issue.Would you please check it out? #34039 @zoechi

Is the question why _currentOffset > _controller.page * _width ever be true before reaching to the end?
it will evaluate to true due to floating point precision error. This depends on devices and different scroll offset.
Once the _locked set to true, the physics will be set to NeverScrollableScrollPhysics and that will prevent user or system to scroll the page. May I know what is the use case of this app?

Hi @LebenNNA
testing the code below with the latest master
code
import 'package:flutter/material.dart';

void main() => runApp(
      const MyApp(
        key: Key('app'),
      ),
    );

class MyApp extends StatelessWidget {
  const MyApp({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) => MaterialApp(
        home: const MyHomePage(
          key: Key('home'),
        ),
      );
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key key}) : super(key: key);

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  bool _never = false;

  @override
  Widget build(BuildContext context) => Scaffold(
        body: Center(
            child: //_never ?
                PageView.builder(
          itemBuilder: (BuildContext context, int index) => FlutterLogo(),
          physics: _never ? ScrollPhysics() : NeverScrollableScrollPhysics(),
        )),
        floatingActionButton: FloatingActionButton(
          onPressed: () => setState(() => _never = !_never),
        ),
      );
}

doctor
[✓] Flutter (Channel master, 1.21.0-6.0.pre.90, on Mac OS X 10.15.5 19F101, locale en-GB)
    • Flutter version 1.21.0-6.0.pre.90 at /Users/nevercode/development/flutter_master
    • Framework revision 531ee9452a (4 hours ago), 2020-07-29 02:26:03 -0400
    • Engine revision 1ba310017c
    • Dart version 2.10.0 (build 2.10.0-1.0.dev 24c7666def)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/nevercode/Library/Android/sdk
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.5, Build version 11E608c
    • CocoaPods version 1.9.0

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 46.0.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] VS Code
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.12.2

[✓] Connected device (4 available)
    • Pixel 3a (mobile) • 965AY0WP5C • android-arm64  • Android 10 (API 29)
    • macOS (desktop)   • macos      • darwin-x64     • Mac OS X 10.15.5 19F101
    • Web Server (web)  • web-server • web-javascript • Flutter Tools
    • Chrome (web)      • chrome     • web-javascript • Google Chrome 84.0.4147.105

• No issues found!

the issue seems to be solved, I feel safe to close this issue,
if you disagree please write in the comments and I will reopen it.
Thank you


Question: Is this also for debian linux?

I am using VScodium (same as VScode without Microsoft mark).
Is this extension valid for use with Debian Linux?
Is this installation valid? >> ext install Umoxfo.vscode-w3cvalidation
I would like to make sure before I try and break something.
Thanks.

This extension will work if Java 8 or later (the latest LTS version is recommended) is installed.

It's not found in the extensions marketplace. However all other typical extensions are found. Like Prettier, etc.

I am using Visual Studio Codium which is the sama as VSCode without telemetry.
https://github.com/VSCodium/vscodium
My system is Debian 10
I have just installed OpenJDK 11
The main issue is that it is not found in the marketplace.

Ref #33


pull request for e2e test at 11/12/2016 06:15:10

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

optest/docs/updated_at.md
:white_check_mark:Succeeded

Details

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


More tiles + removing corners from previous ones + fixes

Starting to add more tiles, will keep updated on the progress.
v0

v0.1

(removed the ultra bright white checkered floor, added 2 floors and fixed colors on the purple one)
v0.3 (removed corners from previous textures, fixed some textures and added a bunch of new ones)

(yellow-black and yellow-white squared floors are now the same layout, just like in the first pic, other 2 pics are older)
v0.4

v0.5 (added common checkered floors + renamed the "kitchen one" to a more generic name like the others)

Happy mapper approved 👍
However I will note the glass tiles probably should be kept on TODO until actual transparency, and the ability to show subfloors through them, exists.

Happy mapper approved 👍
However I will note the glass tiles probably should be kept on TODO until actual transparency, and the ability to show subfloors through them, exists.

Yeah right, probably would be better if they were 2 divided, gonna remove it temporarely. Thanks for feedback!

Happy mapper approved 👍
However I will note the glass tiles probably should be kept on TODO until actual transparency, and the ability to show subfloors through them, exists.

Yeah right, probably would be better if they were 2 divided, gonna remove it temporarely. Thanks for feedback!

Could probably implement them the same way catwalks are, temporarily. Not sure if there's a way to make them prevent venting tho, so that may not work.

Happy mapper approved 👍
However I will note the glass tiles probably should be kept on TODO until actual transparency, and the ability to show subfloors through them, exists.

Yeah right, probably would be better if they were 2 divided, gonna remove it temporarely. Thanks for feedback!

Could probably implement them the same way catwalks are, temporarily. Not sure if there's a way to make them prevent venting tho, so that may not work.

yeah better waiting for new tech, since they would be useless.

Moving this to another pull request since gitkraken messed this one badly and i am reorganizing it without ui.


Adding and compiling new contract

Thank you for the awesome template!  I was able to get it all working and copied the multiply contract to create a new contract. fixing ui was easy.  is there an option to compile contract on the site or do I have to use something like truffle?

Similarly if I modify multiplyContract.js to include a compile:
eth.compile.solidity(source).test nothing seems to happen.
Why is this?


Changing homepage to article list and changing fonts

👷 Deploy Preview for rangitoto-reporter processing.
🔨 Explore the source changes: d7e14d18d7d8889e8d6a5cd7c49b8b107ddb5b94
🔍 Inspect the deploy log: https://app.netlify.com/sites/rangitoto-reporter/deploys/62240a13447eaa00074a7bd1


Terraform Azure how to use -auto-approve -input=false using terratest

Hello, Thank you for the great work at terratest.
I am using terratest to test Azure deployments.
This is the command I have to apply the terraform and I am trying to achieve the same thing from terratest
terraform apply -no-color -auto-approve -input=false -var-file "../environments/env/shared.tfvars" -var-file "../environments/env/cont_reg.tfvars"

And here is my code from sample_test.go:
	terraformOptions := &terraform.Options{
		TerraformDir: "../scripts",
		NoColor: true,
		BackendConfig: map[string]interface{}{
			"storage_account_name": storageactname,
			"key": fname,
		},

How can I achieve the -auto-approve and -input=false part from the terratest apply?
Note: I am able to use -no-color with NoColor: true but not sure how to use -auto-approve and -input=false

@brikis98, I think this question is related to the core Terratest functionality of passing the -auto-approve and -input=false arguments to the apply.
@ravigaddammto it looks like the -auto-approve and -input=false always get applied when you run any of the Apply functions. See code here: https://github.com/gruntwork-io/terratest/blob/2b91e96ce579ab52a6d120ad958928253c91de69/modules/terraform/apply.go#L53

@tsalright Yes, didn’t get a chance updating the issue here. These options are passed even without giving them exclusively.
Up to terratest team if they want to track this for any more options related to this. For my initial issue I think this can be closed.


Faker::Date.birthday has some issues

Hi,
thanks for this gem!
I have noticed something wrong in the birthday faker.
1. from and to should be inverted
      def birthday(min_age = 18, max_age = 65)
        t = ::Date.today
        top_bound, bottom_bound = prepare_bounds(t, min_age, max_age)
        years = handled_leap_years(top_bound, bottom_bound)

        from =  ::Date.new(years[0], t.month, t.day)
        to   =  ::Date.new(years[1], t.month, t.day)
        debugger

        between(from, to).to_date
      end

$ rake test
(byebug) min_age
18
(byebug) max_age
65
(byebug) from
#<Date: 1996-04-06 ((2450180j,0s,0n),+0s,2299161j)>
(byebug) to
#<Date: 1952-04-06 ((2434109j,0s,0n),+0s,2299161j)>

2. Tests are a little bit confusing
      t = Date.today
      date_min = Date.new(t.year - min, t.month, t.day)
      date_max = Date.new(t.year - max, t.month, t.day)
      birthday = @tester.birthday(min, max)
      assert birthday >= date_max, "Expect > \"#{date_max}\", but got #{birthday}"
      assert birthday <= date_min, "Expect > \"#{date_max}\", but got #{birthday}"

Given that the failure message is wrong (> #{date_max} in both cases), variables are confusing
date_min represent the birthdate of the younger man, so the maximum birthdate.
date_max represent the birthdate of the older man, so the minimum birthdate.
Have birthday <= date_min is the right test, but it is confusing. I would rename those variables to something like
      birthdate_min = Date.new(t.year - max, t.month, t.day)
      birthdate_max = Date.new(t.year - min, t.month, t.day)
      birthday = @tester.birthday(min, max)
      assert birthday >= birthdate_min, "Expect >= \"#{birthdate_min}\", but got #{birthday}"
      assert birthday <= birthdate_max, "Expect <= \"#{birthdate_max}\", but got #{birthday}"

3. The method is broken for newborns (and generally when max_age - min_age < 5)
$ rails c
Running via Spring preloader in process 96897
Loading development environment (Rails 5.1.0.rc1)
[1] pry(main)> Faker::Date.birthday(0, 3)
=> Wed, 06 Apr 2016
[2] pry(main)> Faker::Date.birthday(0, 3)
=> Wed, 06 Apr 2016
[3] pry(main)> Faker::Date.birthday(0, 3)
=> Wed, 06 Apr 2016
[4] pry(main)> Faker::Date.birthday(0, 3)
=> Wed, 06 Apr 2016
[11] pry(main)> Faker::Date.birthday(3, 5)
=> Fri, 06 Apr 2012
[12] pry(main)> Faker::Date.birthday(3, 5)
=> Fri, 06 Apr 2012
[13] pry(main)> Faker::Date.birthday(3, 5)
=> Fri, 06 Apr 2012

The problem is not only due to the inversion of form and to. The call to handled_leap_years(top_bound, bottom_bound) returns [2016, 2016] when min_age = 0 and max_age = 1
I will attach a PR to fix issues 1 and 2, I need help for the 3rd issue
Sorry for my poor English

I'm looking into the 3rd issue now. Will submit a PR soon

I believe I've solved it.
2.3.2 :001 > require 'faker'
 => true
2.3.2 :002 > Faker::Date.birthday(0,3)
 => #<Date: 2016-05-11 ((2457520j,0s,0n),+0s,2299161j)>
2.3.2 :003 > Faker::Date.birthday(0,3)
 => #<Date: 2016-12-07 ((2457730j,0s,0n),+0s,2299161j)>
2.3.2 :004 > Faker::Date.birthday(0,3)
 => #<Date: 2015-01-29 ((2457052j,0s,0n),+0s,2299161j)>
2.3.2 :005 > Faker::Date.birthday(0,3)
 => #<Date: 2014-07-21 ((2456860j,0s,0n),+0s,2299161j)>
2.3.2 :006 > Faker::Date.birthday(3,5)
 => #<Date: 2012-06-25 ((2456104j,0s,0n),+0s,2299161j)>
2.3.2 :007 > Faker::Date.birthday(3,5)
 => #<Date: 2012-12-03 ((2456265j,0s,0n),+0s,2299161j)>
2.3.2 :008 > Faker::Date.birthday(3,5)
 => #<Date: 2012-06-03 ((2456082j,0s,0n),+0s,2299161j)>
2.3.2 :009 > Faker::Date.birthday(3,5)
 => #<Date: 2013-08-14 ((2456519j,0s,0n),+0s,2299161j)>
2.3.2 :010 > Faker::Date.birthday(0,0)
 => #<Date: 2017-05-16 ((2457890j,0s,0n),+0s,2299161j)>
2.3.2 :011 > Faker::Date.birthday(0,0)
 => #<Date: 2017-05-16 ((2457890j,0s,0n),+0s,2299161j)>
2.3.2 :012 >

The issue with the previous implementation was in the handled_leap_years function. Because the current year is 2017, anytime max_age - min_age < 5 meant that the min year would be at least 2013. So in all of those cases, we can use this function call:
def handled_leap_years(2017, 2013)
        if (top_bound % 4) != 0 || (bottom_bound % 4) != 0
          [
            customized_bound(top_bound),
            customized_bound(bottom_bound, true)
          ]
        else
          [top_bound, bottom_bound]
        end
  end

Because 2017 and 2013 are not evenly divisible by 4, a call to customized_bound is made.
def customized_bound(bound, increase = false)
        if (bound % 4) != 0
          bound += 1 if increase
          bound -= 1 unless increase
          customized_bound(bound, increase)
        else
          bound
        end
end

The result of this will be that 2013 is increased until it gets to 2016. 2017 is decreased by one to get to 2016. (2016 % 4 = 0 so that's when the loop stops). So then when the "random" date is generated, it's range is from (today's date in year 2016) to (today's date in year 2016). Which can only give us today's date in 2016.
This same logic holds true for any leap year when  max_age - min_age < 5
I've implemented the solution in my pull request

Hi 👋
I've updated my PR #874 and now it contains a full fix for all three issues
I've used @andrewmbyrd's approach and added a couple of tests to make sure this doesn't happen again

Still buggy (version 1.8.7)
irb(main):001:0> require 'faker'
=> true
irb(main):002:0> Gem.loaded_specs["faker"].version
=> #<Gem::Version "1.8.7">
**irb(main):003:0> Faker::Date.birthday(3, 5)
=> Sat, 03 Oct 2015**
irb(main):004:0> Faker::Date.birthday(3, 5)
=> Wed, 12 Nov 2014
irb(main):005:0> Faker::Date.birthday(3, 5)
=> Fri, 09 May 2014

This is wrong :
irb(main):003:0> Faker::Date.birthday(3, 5)
=> Sat, 03 Oct 2015

The age is 2.
http://www.calculator.net/age-calculator.html?today=10%2F03%2F2015&ageat=02%2F12%2F2018&x=37&y=24

Thi has not been released yet


Add all protocols listed /etc/protocols for rules editing

Some protocols require specific validation, it's not that simple like just adding all of them to a list.
Also, Pull Requests must be filled against branch 'master' instead 'RELENG_2_3_2'

If you give me more details i'll try to implement needed validations (or exclude those protocols) and resubmit to 'master'


Heroicons 2.0.0

Update with icons from https://github.com/tailwindlabs/heroicons/releases/tag/v2.0.0
Add :mini variant
Breaking change: heroicon "user", variant: :outline, path_options: {stroke_width: 1} becomes heroicon "user", variant: :outline, options: {stroke_width: 1}

Fixes #18

Massive thank for @n-studio for this PR! I use ref this PR in my gemfile (for now), really helpful as I need the version 2.
But, I figured out there are some missing icons, i.e: bars-arrow-down, bars-arrow-up

@wrystr Ah, yes, I used 2.0.0 and it has missing icons in it. Let me update to 2.0.10


Dumping 16750 LM2 code into main

[x] This Pull-Request includes global changes that may affect other users
[x] These feature changes have been tested on real robot and do not negatively affect existing functionality

Those are some fine commit comments, @1toldyou 🤣


Fix cache name

I noticed the cache name was changed to swr-cache but only on getItem so I reverted to app-cache.

📝 Changed routes:

…s/advanced/cache.en-US

(view full size)

Commit 3b4ce24dfeccb04b780056a45e2453e2c0dfc9bf (https://swr-site-1g04gtieg.vercel.sh).

Maybe swr-cache is a better name?


Add checks for latest Google Fonts file naming and PR layout

Observed behaviour
https://github.com/google/fonts/commit/9253a5145f754df1d2eb110c3cf17d3161093e1d fixed a few things that we should have checks for in the GF profile:

[ ] /$license/$family/static/ should exist if a family is a VF
[ ] /$license/$family/*/ subdirectories should not exist
[ ] VFs should follow the naming pattern defined in https://github.com/google/fonts/issues/1817

Having statics on the google/fonts repo do not seem to be a need from @rsheeter perspective: https://github.com/googlefonts/fontbakery/issues/2654#issuecomment-575756300
We have some exemplos of users who seem to rely on the statics being on the repo such as this case: https://github.com/google/fonts/issues/2314
And @m4rc1e also brought you the opinion that he'd prefer to have the google/fonts repo as simply an intermediate stage in the pipeline of onboarding the Google Fonts API and that users should not rely on the repo for grabbing font binaries.
@davelab6 seems to more strongly support the need to maintain statics alongside VFs on the repo to aid in the gradual transition from traditional statics to variable fonts. Specially due to the still early stage in support for VFs in desktop software.
Making a check for statics on a VF project emit a FAIL means that designers and QA people will spend time on addressing the FAIL. I'm not sure there's a lot of value in requiring that. Maybe a WARN would be better as it would make statics optional.
But I think we need to have a project decision on this matter. Is Google Fonts going to require a static/ directory or just recommend it?

Users do rely on the repo for grabbing binaries.


Stop building ppc64le for 3.11

As per the document
https://access.redhat.com/support/policy/updates/openshift_noncurrent,
POWER for 3.X is EOL after June 2021. This commit removes the ppc64le
architecture from the build targets of 3.11.
See also: https://github.com/openshift/ocp-build-data/pull/961

/hold
Wait for go ahead on ocp-build-data PR

/hold cancel


Temporary fix for startup failure (#1569)

https://github.com/azkaban/azkaban/issues/1569
Issue #1569: "Startup fails: missing tables that need to be installed: quartz-tables-all"
This fix allows AzkabanSingleServer to start, and I was also able to run jobs after that.

@kunkun-tang could you review? I can see that you added the problematic file: https://github.com/azkaban/azkaban/blob/master/azkaban-db/src/main/sql/create.quartz-tables-all.sql
Of course it would be best to fix this properly, but a quick fix like this would be useful in the meanwhile.

Thanks for the finding and fix. I am just about to address this issue. Taking a look

@kunkun-tang, I added the @Deprecate tag.


UnpBootCalendar - Does not appear to work in Unplugged App

Using the UnpBootCalendar control it works in web browsers but only shows a blank page in the Unplugged app.
If on the same device (tablet or phone), I open a Chrome browser and open the Calendar it opens but only after I hit the "reload" button in the browser.

Figured out that when loading the UnpBootCalendar control via the Navigator that the ajaxloadid and ajaxtargetid should not be set.


Enable interactivity bypass for "project delete" subcommand

#609 added the project delete subcommand.
One issue encountered when building this out is that env delete workflow requires the user to specify a profile to be used when deleting the resources. We enabled the interactivity to prompt the user for a profile when deleting an environment to enable the feature to work for now, but ideally users should be able to bypass the interactivity.
Some challenges:

if we take in profile names via flags there's no straightforward way to associate a profile with an environment
storing profile names is not reliable since that profile name is completely arbitrary and could differ from machine to machine

We should discuss different mechanisms we can potentially use to relate profiles to environments to enable cleaner experiences not only in project delete, but also other workflows that rely on the "default" profile.
Refer to this comment to understand the existing experience.

Fixed in https://github.com/aws/amazon-ecs-cli-v2/pull/658


Initialise .env before attempting to access it

When following the instructions at Initial Project Setup On Local Machine, it instructs the user to run npm install before running npm run setup-local.
Unfortunately, running npm install immediately after cloning the project results in the following error:
> babel-node ./scripts/build-schema.js

babel-relay-plugin-loader: using schema at [/Users/tom/projects/urbp/graphql/schema.json]
{ Error: ENOENT: no such file or directory, open '.env'
    at Error (native)
    at Object.fs.openSync (fs.js:634:18)
    at Object.fs.readFileSync (fs.js:502:33)
    at Object.module.exports.config (/Users/tom/projects/urbp/node_modules/dotenv/lib/main.js:30:37)
    at Object.<anonymous> (CassandraOptions.js:6:21)
    at Module._compile (module.js:541:32)
    at loader (/Users/tom/projects/urbp/node_modules/babel-register/lib/node.js:158:5)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/tom/projects/urbp/node_modules/babel-register/lib/node.js:168:7)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12) errno: -2, code: 'ENOENT', syscall: 'open', path: '.env' }
{ Error: ENOENT: no such file or directory, open '.env'
    at Error (native)
    at Object.fs.openSync (fs.js:634:18)
    at Object.fs.readFileSync (fs.js:502:33)
    at Object.module.exports.config (/Users/tom/projects/urbp/node_modules/dotenv/lib/main.js:30:37)
    at Object.<anonymous> (log.js:7:21)
    at Module._compile (module.js:541:32)
    at loader (/Users/tom/projects/urbp/node_modules/babel-register/lib/node.js:158:5)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/tom/projects/urbp/node_modules/babel-register/lib/node.js:168:7)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12) errno: -2, code: 'ENOENT', syscall: 'open', path: '.env' }
{ Error: ENOENT: no such file or directory, open '.env'
    at Error (native)
    at Object.fs.openSync (fs.js:634:18)
    at Object.fs.readFileSync (fs.js:502:33)
    at Object.module.exports.config (/Users/tom/projects/urbp/node_modules/dotenv/lib/main.js:30:37)
    at Object.<anonymous> (ObjectManagerBase.js:13:21)
    at Module._compile (module.js:541:32)
    at loader (/Users/tom/projects/urbp/node_modules/babel-register/lib/node.js:158:5)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/tom/projects/urbp/node_modules/babel-register/lib/node.js:168:7)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12) errno: -2, code: 'ENOENT', syscall: 'open', path: '.env' }

This is because the file .env has not been initialised later in the instruction npm run setup-local.

These errors can be ignored. I will update the documentation.
I know there is no elegance to it, but the process is tailored towards facilitating the Heroku deployment and I could not find any better way. If you come up with something more elegant please feel free to PR.


Add API count of an API category

Codecov Report
Patch coverage has no change and project coverage change: +22.75 :tada:

Comparison is base (2dfda53) 34.20% compared to head (13704e6) 56.95%.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1165       +/-   ##
===========================================
+ Coverage   34.20%   56.95%   +22.75%
===========================================
  Files         350       13      -337
  Lines       40398     1315    -39083
  Branches    12754      773    -11981
===========================================
- Hits        13818      749    -13069
+ Misses      26336      566    -25770
+ Partials      244        0      -244

Flag
Coverage Δ

adapter
?

admin-domain-service
56.95% <ø> (+0.57%)
:arrow_up:

backoffice-domain-service
?

devportal-domain-service
?

idp-domain-service
?

runtime-domain-service
?

Flags with carried forward coverage won't be shown. Click here to find out more.
see 341 files with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


feature/with url

fixes #3199
@Ndiritu and @silasKenneth to check the PHP changes
@samwelkanda to check the python changes. Also I noticed an issue with the indent that seems to predate my changes. Can you look at it?
This will greatly simplify the delta link pattern so maybe we shuold review the code samples @andrueastman @rkodev

Thanks for the fix @samwelkanda!


Also sort the exports

Is your feature request related to a problem?
Sort also export not just imports.
Describe the solution you'd like
When I have code like that:
export { c, a, b, A } from 'foo';
export { x } from 'bar';

To be sorted like that:
export { x } from 'bar';
export { A, a, b, c } from 'foo';

Describe alternatives you've considered
None
Additional context
Not needed

Hi ! That feature has already been implemented but is disabled by default.
Try setting importOrderSortSpecifiers to true in your config.

@d-fuji I switched to https://eslint.org/docs/latest/rules/sort-imports and https://www.npmjs.com/package/eslint-plugin-import

@k3nsei
These libraries can sort export? I couldn't find the document...

@d-fuji I switched to https://eslint.org/docs/latest/rules/sort-imports and https://www.npmjs.com/package/eslint-plugin-import

how?


feat: support run in stream subsystem

It looks like this repository doesn't have CI, do we need to add CI to this repository first? @spacewander

Yes. Let's submit another PR to convert travis CI to github Action.
For security concern, we can't enable travis CI.

Then let this PR wait for a while

PTAL @spacewander

Is the CI failure expected?

checked, yes

It's strange. Why kong keeps test cases which are expected to fail?

It's strange. Why kong keeps test cases which are expected to fail?

The test case that failed in our github action ran successfully in their travis-ci. ref: https://app.travis-ci.com/github/Kong/lua-resty-dns-client/jobs/572291660
The difference between ours and theirs is the version number of OpenResty.
When I have time, I investigate why CIs fail.

@spacewander It is really not possible to reproduce errors in CI locally.
It is related to these factors.
for failed cases in spec/client_cache_spec.lua, the following factors contributed to the failed

using <IP_ADDRESS> as the DNS server in the test case
the versions of OpenResty running in Travis-ci are <IP_ADDRESS> and <IP_ADDRESS>
the network environment affects the running of TTL-related test cases

for failed cases in spec/client_spec.lua, the following factors contributed to the failed

the host srvtest.thijsschreijer.nl has been down, can't be resolver

for other failed, unstable appears.

@spacewander annotated with some test cases ......


fix: only instantiate the confirmation promise when required (useBlocker)

Open this PR as @schiller-manuel encouraged based on my bug comment in  https://github.com/TanStack/router/pull/1649#discussion_r1614737330.
Since this is my first contribution to this repo, I only strive to make this dead simple.
I manually tested this code in my own project to see it is now working as expected. I checked the PR #1649 to see if I can amend a test suite. But I found it is tricky to add one because the promise is now only a transient instance.
c.c. @Balastrong

can the examples be enhanced to show the original problem?
and then I can test your fix with the example


feat/insertion of transition effects in some components.

I inserted some transition effects on the Landing Page in order to make the page more attractive.

Hello @Guboehm, removing comments in the randomMovingImage file code and inserting a link in the logo to return to the top of the page.


Modify DB query code for fetching queues  to use recursive self-join SQL query

Modify the database query to fetch a queue and its descendants to follow the idiom as described in https://learnsql.com/blog/query-parent-child-tree/ - something like:
WITH RECURSIVE generation AS (
    SELECT id,
         queue_name,
         /* other fields from queues table here.... */
         parent_id,
         0 AS generation_number
    FROM queues
    WHERE parent_id IS NULL

UNION ALL

    SELECT child.id,
         child.queue_name,
         /* other fields from queues table here.... */
         child.parent_id,
         generation_number+1 AS generation_number
    FROM queues child
    JOIN generation g
      ON g.id = child.parent_id

)

SELECT  g.queue_name AS child_queue_name,
        /* other fields from queues table here.... */
        g.generation_number,
        parent.queue_name AS parent_queue_name,
FROM generation g
LEFT JOIN queues parent
ON g.parent_id = parent.id
ORDER BY generation_number;

to generate a result of the specified queue as parent and all its descendant queues.

This has been implemented in commit b4fddd2b by @sudiptob2 - closing as completed.


http utility: remove exception handling from parseAuthority

Commit Message: http utility - remove exception handling from parseAuthority
Additional Description: before this PR parseAuthority had to handle exceptions thrown from parseInternetAddress. This occurs on the hot path for all Envoy deployments using http. Given the fact that nullptr can indicate failure to parse an internet address from a authority string, this PR removes exceptions in favor of nullptr return values via a new parseInternetAddressNoThrow (inspired from https://github.com/envoyproxy/envoy/pull/14015#discussion_r532769623) utility function.
Risk Level: low - although larger discussion about removing the exception throwing variants is open.
Testing: existing test suite
Signed-off-by: Jose Nino<EMAIL_ADDRESS>

@yanavlasov @mattklein123 @rulex123 I started going down the path of removing the exception throwing utility functions (parseInternetAddress, and parseInternetAddressAndPort). However, I got into many places where exceptions are the acceptable expectation downstream. For example, during config parsing. (Although I know there is debate there cc @alyssawilk @htuch).
I know many of you have made strides on making the codecs exception free, and there is desire to make the data plane exception free. But given I was getting down to callers out of the data plane I wasn't sure if I should go the full mile and rip out the exception all the way at the root.
This PR is a more pointed and (I think) less polarizing change given that we are very often throwing and catching an exception with parsing authority.
Let me know if you'd like to see a bigger PR removing exceptions from parsing internet addresses. I can also open an issue.

I think tackling removing exceptions from main thread / config parsing is not resourced right now. The goal is to remove them from workers. I think we may end up with variants of utility functions that throw and don't throw. My advice is just to stick to simple and incremental cleanups towards that goal.

Could you add a test for parseInternetAddressNoThrow() that verifies it returns a nullptr on malformed ip?

Yeah, I think starting incremental and focusing on the data plane is for sure the way to go.  AFIK there's plans for the data plane and debate about if it's easier to try to regression-proof against exceptions being added back to the data plane, or just tackle the control plane and compile-enforce no exceptions at all, and we'll see how that goes.  either way thanks for kicking this off! :-)

+1 on not having to tackle config yet. I'm interested in anything that reduces the amount of exception cognitive tax, but data plane is where the most acute issues exist (performance, security, reliability).

Ok great. Thanks for all the feedback.
Just to clarify the larger change I was working on was just the removal of two exception throwing utility functions (parseInternetAddress, and parseInternetAddressAndPort). But even that is decently wide in scope w.r.t config handling.
In the spirit of incremental change then, this PR is ready for review.

CI failures are fixed at head.  mind doing a main merge?


[UI] Migrate to graphql-ws

Notes for Reviewers

Removed subscriptions-transport-ws, and migrate to graphql-ws.
Removed subscriptions-transport-ws patch file. Added a timer to check for Broker status.

I added a timer here to check for the Broker status.
Using mesheryctl system start will create and deploy the Kubernetes resources. However, after accessing the Dashboard, there is a graphql query that searches for the status of the Broker. I added a timer so that this can be checked if the status is up.
This can be improved so that there wouldn't be too many error messages showing the console, that may confuse any newcomers or anyone else that is trying out Meshery.
Signed commits

[ ] Yes, I signed my commits.

I don't see any of the subscriptions created (there is no initialisation of subscription taking place, not even once)

Thanks for bringing this up. I need more people to test to ensure that they can see what I can see.
As mentioned in my original PR description, you could only see this through the Docker build, and if you're using mesheryctl system start which will deploy the Kubernetes services.
Without this, you will just see the errors about unable to connect to the necessary endpoint, from what I've seen.
Once I get a working build, I can show a quick video of what happens and you can see the subscriptions been made and the queries happening.

Closing PR, will reopen a new once I have tested this a bit more.


[discuss] Changing how we determine the amdgpu targets to build for in the non-XLA path

Currently the ROCm TF build generates HSACOs for the following archs

gfx803
gfx900
gfx906
gfx908

This is achieved by creating the $ROCM_PATH/bin/target.lst in the Dockerfile.rocm as shown below
https://github.com/ROCmSoftwarePlatform/tensorflow-upstream/blob/develop-upstream/tensorflow/tools/ci_build/Dockerfile.rocm#L84-L85
When hipcc is invoked without any options that specify which amdgpu target(s) to generate code for, then it will invoke the $ROCM_PATH/bin/rocm_agent_enumerator to determine the list of amdgpu targets. The rocm_agent_enumerator essentially reads the $ROCM_PATH/bin/target.lst that we generated above, and returns that list (plus gfx000)
For the XLA path, the HSACO objects (for the XLA clusters) are generated at runtime. The amdgpu target is determined via the call to GpuDriver::GetGpuISAVersion, which in turn uses the hipDeviceProp_t::gcnArch field to determine the amdgpu target. The amdgpu target value (thus determined) is then explicitly passed into the XLA GPU backend, which generates the HSACO.  The key point to note here is that this method is different from the rocm_agent_enumerator method used in the non-XLA path.
TF is now starting to incorporate support for "MLIR generated kernels" in the non-XLA path. The implementation for this support uses the XLA GPU backend for generating the HSACOs. We need to ensure that in a given TF build (for the non-XLA path), we generate HSACOs for the same set of amdgpu target(s) for

"MLIR generated kernels", which will used the XLA GPU backend to generate the HSACOs
all other kernels, which will continue to use hipcc (i.e. the rocm_agent_enumerator route) to generate the HSACOs

We have a couple of options of how to do this

have the "MLIR generated kernels" implementation for ROCm also use the rocm_agent_enumerator to determine which amdgpu targets to build for and pass those values down to the XLA GPU backend
Abandon the use of rocm_agent_enumerator completely. Create something akin to cuda_gpu_architectures in the cuda_configure.bzl file, say rocm_amdgpu_targets.

rocm_amdgpu_targets will have a default value of "gfx803,gfx900,gfx906,gfx908" (essentially same as now)
hipcc compile options to specify these rocm_gpu_architectures targets will be added to rocm_default_copts and thus applied to all hipcc invocations.
a new bazel function rocm_gpu_architectures will be created to return the value of rocm_amdgpu_targets. This list will be used by the bazel build files in the implementation of "MLIR generated kernels" to determine the list of amdgpu targets to build the HSACOs

Hi Deven, it's been a while since you created this issue. Shall we create an internal mirror to this one? If there's one in existence, I will close this external one.


Preset Modals and Notifications

Description
Added modals for  both saving and loading presets,
Edited notification popups such that they display the message passed in the function as the text of the notif
Added fail/success notifications whereever necessary in the preset process
Fixes:
Issue #516
Issue #518
[I made the changes in the same branch because i forgot i made two separate issues for it, if you could adjust the level accordingly ill be extremely grateful, thankyou!]

Type of change

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

Checklist:

[x] My code follows the style guidelines of this project
[x I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings

ATTACH SCREEN-SHOTS / DEPLOYMENT LINK

@Jasleen1210 i dont know if i give both level 1 and level 2 in this it will be counted or not you can create a empty pr i will add the level 1 there


The logo at the top of the README looks cropped

In the README the logo image appears cropped on the right:

Upon inspection with Inkscape, I found that the background/page for your logo svg does not cover the full image, causing the preview to look cropped.

@Extraweich It looks fixed now.


Add steps for individual ad blockers

Links to specific steps to allow Read the Docs ads on specific ad blockers.
Fixes #4405.

A great use case for intersphinx 😉
This PR looks fine for now though.


Only noise as a result

I'm new to the TTS topic. I'm trying to replicate your work, and when using Encodec, I am getting just noise instead of voice. I didn't run it with SoundStream, as I don't know where I can find the checkpoint file available on the internet.
Please help me get started. Below there is the code that I'm testing on.
Also, if you have some working examples of scripts that use audiolm, that would be a great help for people new to the topic.
import numpy as np
import soundfile as sf
import torchaudio
from audiolm_pytorch import (
    AudioLM, HubertWithKmeans, SemanticTransformer, CoarseTransformer, FineTransformer,
    SemanticTransformerTrainer, CoarseTransformerTrainer, FineTransformerTrainer,
    SoundStream, SoundStreamTrainer, EncodecWrapper
)

# Step 1: Setup the neural codec (SoundStream or Encodec)
# Option 1: Using Encodec
encodec = EncodecWrapper()

# Option 2: Using SoundStream
#soundstream = SoundStream(
#    codebook_size = 4096,
#    rq_num_quantizers = 8,
#    rq_groups = 2,
#    use_lookup_free_quantizer = False,
#    use_finite_scalar_quantizer = True,
#    attn_window_size = 128,
#    attn_depth = 2
#)

# Assuming you have trained SoundStream, load it as follows:
#soundstream = SoundStream.init_and_load_from('./path/to/checkpoint.pt')

# Step 2: Setup and train the Hierarchical Transformers
# Semantic Transformer
wav2vec = HubertWithKmeans(
    checkpoint_path = './hubert/hubert_base_ls960.pt',
    kmeans_path = './hubert/hubert_base_ls960_L9_km500.bin'
)

semantic_transformer = SemanticTransformer(
    num_semantic_tokens = wav2vec.codebook_size,
    dim = 1024,
    depth = 6,
    flash_attn = True
).cuda()

# Coarse Transformer
coarse_transformer = CoarseTransformer(
    num_semantic_tokens = wav2vec.codebook_size,
    codebook_size = 1024,
    num_coarse_quantizers = 3,
    dim = 512,
    depth = 6,
    flash_attn = True
)

# Fine Transformer
fine_transformer = FineTransformer(
    num_coarse_quantizers = 3,
    num_fine_quantizers = 5,
    codebook_size = 1024,
    dim = 512,
    depth = 6,
    flash_attn = True
)

# Training steps for each transformer are omitted for brevity
# You need to train each transformer using their respective trainers as per your dataset and requirements

audiolm = AudioLM(
    wav2vec = wav2vec,
    codec = encodec,
    semantic_transformer = semantic_transformer,
    coarse_transformer = coarse_transformer,
    fine_transformer = fine_transformer
).cuda()

# Generate audio with text condition
text_to_generate = "My name is Bond, James Bond"
generated_wav_with_text_condition = audiolm(text = [text_to_generate]).cuda()

# Convert the tensor to numpy array and move it to CPU from GPU if necessary
audio_data = generated_wav_with_text_condition.cpu().numpy()

# Ensure the audio data is in the correct shape and range
# If the audio is mono, ensure it has two dimensions (n_frames, 1)
if len(audio_data.shape) == 1:
    audio_data = audio_data.reshape(-1, 1)

# Normalize audio to the range [-1.0, 1.0] if it's not already
audio_data = audio_data / np.max(np.abs(audio_data))

# Convert the numpy array back to a PyTorch tensor
tensor_audio_data = torch.from_numpy(audio_data)

# Save the audio data to a file using torchaudio
output_file_path = 'bond_audio.wav'
torchaudio.save(output_file_path, tensor_audio_data, 16000)```

Hi, I'm new to AudioLM. I am trying to run the code. May I ask how you put three transformers together? I tried to train three transformers separately to get the pt file. But I am not quite sure how to load it.

Similar issue:
I trained on the LibriTTS training dataset with a batch size of 64 and obtained the following models:
semantic.transformer.405000.pt
coarse.transformer.683000.pt
fine.transformer.828000.pt
However, the testing results do not sound like human speech. It seems that the speech rate is very fast.
import argparse
import ast
from audiolm_pytorch import SemanticTransformer, SemanticTransformerTrainer
from audiolm_pytorch import HubertWithKmeans, CoarseTransformer, CoarseTransformerTrainer
from audiolm_pytorch import FineTransformer, FineTransformerTrainer
from utils import seed_util, my_parser
from audiolm_pytorch import EncodecWrapper
import torch
import soundfile
from torchaudio.transforms import Resample
from audiolm_pytorch import AudioLM
import torchaudio

the_path = "/zhangpai21/webdataset/audio/splitspeechdatasets/LibriTTS-R/train/tar"

wav2vec = HubertWithKmeans(
    checkpoint_path='./hubert/hubert_base_ls960.pt',
    kmeans_path='./hubert/hubert_base_ls960_L9_km500.bin'
)

encodec = EncodecWrapper()

semantic_transformer = SemanticTransformer(
    num_semantic_tokens=wav2vec.codebook_size,
    dim=1024,
    depth=6,
    flash_attn=False
)

coarse_transformer = CoarseTransformer(
    num_semantic_tokens=wav2vec.codebook_size,
    codebook_size=1024,
    num_coarse_quantizers=3,
    dim=512,
    depth=6,
    flash_attn=False
)
fine_transformer = FineTransformer(
    num_coarse_quantizers=3,
    num_fine_quantizers=5,
    codebook_size=1024,
    dim=512,
    depth=6,
    flash_attn=True
)

def train_semantic():
    trainer = SemanticTransformerTrainer(
        transformer=semantic_transformer,
        wav2vec=wav2vec,
        folder=the_path,
        batch_size=64,
        data_max_length=320 * 32,
        num_train_steps=1_000_000,
        results_folder='./results',
    )

    trainer.train()

def train_coarse():
    trainer = CoarseTransformerTrainer(
        transformer=coarse_transformer,
        codec=encodec,
        wav2vec=wav2vec,
        folder=the_path,
        batch_size=64,
        data_max_length=320 * 32,
        num_train_steps=1_000_000,
        results_folder='./results_coarse',
    )

    trainer.train()

def train_fine():
    trainer = FineTransformerTrainer(
        transformer=fine_transformer,
        codec=encodec,
        folder=the_path,
        batch_size=64,
        data_max_length=320 * 32,
        num_train_steps=1_000_000,
        results_folder='./results_fine',
    )

    trainer.train()

def get_real_semantic_ids():
    audio_path = "/zhangpai21/workspace/cgy/1_projects/1_valle/p1/examples/libritts/prompts/8463_294825_000043_000000.wav"
    data, sample_hz = torchaudio.load(audio_path)
    target_sample_rate = 16000
    resample_transform = Resample(orig_freq=sample_hz, new_freq=target_sample_rate)
    data = resample_transform(data)
    sematic_token_ids = wav2vec(data)
    return sematic_token_ids

def do_inference():
    semantic_transformer.load("results/semantic.transformer.405000.pt")
    coarse_transformer.load("results_coarse/coarse.transformer.683000.pt")
    fine_transformer.load("results_fine/fine.transformer.828000.pt")

    audiolm = AudioLM(
        wav2vec=wav2vec,
        codec=encodec,
        semantic_transformer=semantic_transformer,
        coarse_transformer=coarse_transformer,
        fine_transformer=fine_transformer
    ).cuda()

    generated_wav = audiolm(batch_size=1)
    # tensor([[-0.0101, -0.0111, -0.0039,  ..., -0.0439, -0.1621,  0.0146]])
    wav = generated_wav[0].detach().cpu().numpy()
    # soundfile.write("output.wav", wav, samplerate=16000)
    soundfile.write("output.wav", wav, samplerate=24000)

if __name__ == '__main__':
    parser = argparse.ArgumentParser()
    parser.add_argument("--type", default="coarse")
    args = parser.parse_args()

    if args.type == "semantic":
        train_semantic()
    elif args.type == "coarse":
        train_coarse()
    elif args.type == "fine":
        train_fine()
    elif args.type == "infer":
        do_inference()

Similar issue: I trained on the LibriTTS training dataset with a batch size of 64 and obtained the following models:
semantic.transformer.405000.pt coarse.transformer.683000.pt fine.transformer.828000.pt However, the testing results do not sound like human speech. It seems that the speech rate is very fast.
import argparse
import ast
from audiolm_pytorch import SemanticTransformer, SemanticTransformerTrainer
from audiolm_pytorch import HubertWithKmeans, CoarseTransformer, CoarseTransformerTrainer
from audiolm_pytorch import FineTransformer, FineTransformerTrainer
from utils import seed_util, my_parser
from audiolm_pytorch import EncodecWrapper
import torch
import soundfile
from torchaudio.transforms import Resample
from audiolm_pytorch import AudioLM
import torchaudio

the_path = "/zhangpai21/webdataset/audio/splitspeechdatasets/LibriTTS-R/train/tar"

wav2vec = HubertWithKmeans(
    checkpoint_path='./hubert/hubert_base_ls960.pt',
    kmeans_path='./hubert/hubert_base_ls960_L9_km500.bin'
)

encodec = EncodecWrapper()

semantic_transformer = SemanticTransformer(
    num_semantic_tokens=wav2vec.codebook_size,
    dim=1024,
    depth=6,
    flash_attn=False
)

coarse_transformer = CoarseTransformer(
    num_semantic_tokens=wav2vec.codebook_size,
    codebook_size=1024,
    num_coarse_quantizers=3,
    dim=512,
    depth=6,
    flash_attn=False
)
fine_transformer = FineTransformer(
    num_coarse_quantizers=3,
    num_fine_quantizers=5,
    codebook_size=1024,
    dim=512,
    depth=6,
    flash_attn=True
)

def train_semantic():
    trainer = SemanticTransformerTrainer(
        transformer=semantic_transformer,
        wav2vec=wav2vec,
        folder=the_path,
        batch_size=64,
        data_max_length=320 * 32,
        num_train_steps=1_000_000,
        results_folder='./results',
    )

    trainer.train()

def train_coarse():
    trainer = CoarseTransformerTrainer(
        transformer=coarse_transformer,
        codec=encodec,
        wav2vec=wav2vec,
        folder=the_path,
        batch_size=64,
        data_max_length=320 * 32,
        num_train_steps=1_000_000,
        results_folder='./results_coarse',
    )

    trainer.train()

def train_fine():
    trainer = FineTransformerTrainer(
        transformer=fine_transformer,
        codec=encodec,
        folder=the_path,
        batch_size=64,
        data_max_length=320 * 32,
        num_train_steps=1_000_000,
        results_folder='./results_fine',
    )

    trainer.train()

def get_real_semantic_ids():
    audio_path = "/zhangpai21/workspace/cgy/1_projects/1_valle/p1/examples/libritts/prompts/8463_294825_000043_000000.wav"
    data, sample_hz = torchaudio.load(audio_path)
    target_sample_rate = 16000
    resample_transform = Resample(orig_freq=sample_hz, new_freq=target_sample_rate)
    data = resample_transform(data)
    sematic_token_ids = wav2vec(data)
    return sematic_token_ids

def do_inference():
    semantic_transformer.load("results/semantic.transformer.405000.pt")
    coarse_transformer.load("results_coarse/coarse.transformer.683000.pt")
    fine_transformer.load("results_fine/fine.transformer.828000.pt")

    audiolm = AudioLM(
        wav2vec=wav2vec,
        codec=encodec,
        semantic_transformer=semantic_transformer,
        coarse_transformer=coarse_transformer,
        fine_transformer=fine_transformer
    ).cuda()

    generated_wav = audiolm(batch_size=1)
    # tensor([[-0.0101, -0.0111, -0.0039,  ..., -0.0439, -0.1621,  0.0146]])
    wav = generated_wav[0].detach().cpu().numpy()
    # soundfile.write("output.wav", wav, samplerate=16000)
    soundfile.write("output.wav", wav, samplerate=24000)

if __name__ == '__main__':
    parser = argparse.ArgumentParser()
    parser.add_argument("--type", default="coarse")
    args = parser.parse_args()

    if args.type == "semantic":
        train_semantic()
    elif args.type == "coarse":
        train_coarse()
    elif args.type == "fine":
        train_fine()
    elif args.type == "infer":
        do_inference()

Hi! I meet the same problem as you,the generated wav sounds like sped up...Have you solve this problem?


Add missing interactions in Select component

Changes made

Moved all user interaction-related methods up to the select tag.
Added isDisabled and selectedValues properties:

isDisabled was missing in former versions.
selectedValues will replace the former logic in the option tag and now in the select tag.

My pull request is for

[x] A bugfix

[ ] A new component

[x] An existing component update

[ ] Dependencies version update

In case of a bug or an existing component update

[ ] Updated unit tests that reach at least 90% of code coverage.
[x] Updated interfaces, types, tuples, and enums for the impacted component/s

Screenshots
N/A

I used the following link from React documentation to align Select logic with a better standard.


0101

IMPORTANT: Please do not create a Pull Request without an issue.
All Submissions:

[X] I have read the CONTRIBUTING document.
[X] My code is written in Python3 and is ending with .py
[X] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
[X] I have checked that my submission does pass the test on LeetCode.com
[X] Does your filename follow the naming Conventions?
[X] Have you linked your PR to an Issue?

Closing issues
closes #715

I think we should create our own issues and wait to be assigned?

@CaptainYANG Sorry, I didn't realize that.


Error - App Not registered with Office 365

Hi I downloaded the project , updated the NuGet Packages to latest version , then I added the Office 365 Connector (I can see the app on Azure), but when I build the project I get an error the App is not registered  with office 365 , please connect .
any ideas how to fix it ?
I am using Windows 8.1 pc  and VS2015
Thanks

Found the problem .... fix now , sorry

I'm glad you found a resolution. What was the issue?

after you connect O365 the key string is
< x:String x:Key="ida:ClientId"></x:String>
I updated the key to <x:String x:Key="ida:ClientID"></x:String> and it works now .

Is this about the casing of the ClientId (or ClientID) key? We'll probably need to add a note to the Readme about this, since the experience is different for VS 2013 and VS 2015 users.

there is a note on the readme already ...
Note: This sample will work if you are using Visual Studio 2015 with Update 1. After you configure the sample, though, you'll need to edit this key/value pair in your App.xaml file:
<x:String x:Key="ida:ClientId">your client id</x:String> .
The code in the sample looks for the  ClientID  key, so the key/value pair should look like this:
<x:String x:Key="ida:ClientID">your client id</x:String> .


Update DJL version 0.12.0-SNSPSHOT

Description
Brief description of what this PR is about

If this change is a backward incompatible change, why must this change be made?
Interesting edge cases to note here

Codecov Report

Merging #930 (e5b6722) into master (6a22602) will decrease coverage by 0.07%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master     #930      +/-   ##
============================================
- Coverage     70.31%   70.24%   -0.08%
+ Complexity     5085     5077       -8
============================================
  Files           501      501
  Lines         22431    22431
  Branches       2334     2334
============================================
- Hits          15773    15757      -16
- Misses         5417     5432      +15
- Partials       1241     1242       +1

Impacted Files
Coverage Δ
Complexity Δ

...djl/training/listener/LoggingTrainingListener.java
83.18% <0.00%> (-5.31%)
22.00% <0.00%> (-6.00%)

...gine/src/main/java/ai/djl/dlr/engine/DlrModel.java
53.12% <0.00%> (-3.13%)
4.00% <0.00%> (ø%)

api/src/main/java/ai/djl/training/Trainer.java
91.83% <0.00%> (-3.07%)
33.00% <0.00%> (-1.00%)

api/src/main/java/ai/djl/util/Platform.java
43.47% <0.00%> (-2.18%)
8.00% <0.00%> (ø%)

api/src/main/java/ai/djl/repository/Artifact.java
91.37% <0.00%> (-1.73%)
37.00% <0.00%> (-1.00%)

...c/main/java/ai/djl/mxnet/engine/MxSymbolBlock.java
82.01% <0.00%> (-1.44%)
40.00% <0.00%> (-1.00%)

...g/src/main/java/ai/djl/serving/util/Connector.java
55.40% <0.00%> (-1.36%)
21.00% <0.00%> (ø%)

...ngine/src/main/java/ai/djl/mxnet/jna/LibUtils.java
42.23% <0.00%> (-1.25%)
15.00% <0.00%> (ø%)

...rc/main/java/ai/djl/paddlepaddle/jni/LibUtils.java
51.14% <0.00%> (ø)
14.00% <0.00%> (ø%)

.../ai/djl/serving/http/ManagementRequestHandler.java
92.17% <0.00%> (+1.73%)
26.00% <0.00%> (+1.00%)

Continue to review full report at Codecov.

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


Bump k8s-openapi to 0.20.0

Also bumps minimum kubernetes version.
Standard just bump-k8s plus cargo upgrade -p k8s-openapi -i and the few readme updates.
Last one before release.

Ah, yes, will add.

Out of curiosity, for all the places where you updated the k8s-openapi feature v1_27 to v1_28, why don't you use latest ?
If you're worried about latest updating to a different version in a semver-compatible update, that won't happen, because adding (or removing) supported versions is always a semver-incompatible change. Not only could that break anyone using latest, but also it could break anyone using the version macros.

Ah, yes. Actually just hadn't gotten around to do it yet. I did just update the recommendation in our docs yesterday to tell people to use latest. And there was also some automation for it in the justfile to bump so it has not been a hard job.
Still, nice to clear all that up. Will put up a PR to update it to latest as that side is a pretty clear improvement.
By the way, the earliest alias is also very nice, and could be very nice for the other side of the range (for testing our minimum supported version), but we are slightly misaligned on our policies (we have currently settled on a 6 version range, and you have 7 - so our MSRV is always +1 of earliest atm). It's probably a bit surprising to folks that we deviate.
Do you have strong feelings about supporting this extended range? It could make k8s-openapi a little more lightweight to drop one. We reasoned that it made sense to follow upstream EOL cycles as per our current https://kube.rs/kubernetes-version/#policy - but if you are not keen on that, we could alternatively increase our range instead.

My policy is to support the oldest one that public clouds support, per https://github.com/Arnavion/k8s-openapi/blob/master/CONTRIBUTING.md#cloud-offerings . ACK tends to be the oldest one.

In practice, that looks like it gives you sometimes 7 versions supported, and sometimes 8. At the very least, it would be good to have a consistent answer.
(ACK running 1.22 a full 10 months after upstream maintenance was dropped is an interesting choice - but i guess all cloud providers lag behind upstream support here to some extent)


Question about Interdependence in Forecast Generation

Hi,
Thank you for your contributions.
I would like to know if the forecasts generated are interdependent. For example, if I need to forecast stock prices for 7 consecutive days, does the forecast value for the 7th day depend on the values forecasted for the previous 6 days? Additionally, are the forecast values sampled within the same day independent of each other?
I look forward to your response. Sincerely

Do you have a more precise definition of what you mean by interdependent? The values are not autoregressively generated, but share the same embeddings. For values sampled for the same time step, they are sampled independently from the same distribution.


README.md Add magic=bash param

Otherwise magic fizzles
https://github.com/teaxyz/cli/issues/336

this assumes bash. With no parameters tea detects the shell which should work here.
works for me.
Can you describe what doesn’t work?

@mxcl again, it doesn't work in Gitpod.
$ source <(./tea --magic)
error: unsupported shell
$ echo $SHELL
/bin/bash

hmm, I am not particularly familiar with gitpod, can you provide a minimal repro case for me? Something is amiss and I cannot figure it out without trying it there.


Change in code

This PR fixes #

https://hacktoberfest.digitalocean.com/details#spam

Stop creating 100% useless PRs for HacktoberFest.


Stricter compiler warning policy

Make warnings errors in CMakeLists.txt, and then fix all the resulting errors.
I was not able to fix the errors about unknown macros, but I'm not sure where they are coming from or what to do to fix it. Looks like it's related to cppcheck but you're not using cppcheck...

Hey, thanks for doing this!
After you posted this I realized that builds weren't running for pull requests so I updated them to run on pull requests as well. Could you add an empty commit to trigger the build action? E.g. git commit --allow-empty -m "Trigger build action"

(It requires your approval to run.)

Looks like I missed some errors. Hmm, am I building it wrong? I just used CMake...

FYI, looks like Windows Release action is broken. Something to do with installing Neovim via Chocolatey.

I'll leave a PR on your branch to fix the Windows warnings when I have some time.

I can soon if you don't. Next time I reboot ;)

Alright everything looks good now, I'll merge it. Thanks for the help!


modify simple_uart_list to accept filter for UART port listing

This PR enables the simple_uart to accept user defined filters for UART port naming in linux/apple.
Modify simple_uart_list to accept UART device templates from user. Therefore are two new arguments introduced num number of entries in filter table **filtp as array of pointers.
Custom Filters can used with following example:
char        **names;
char        **descriptions;
int         numUarts;
const char* myTTY[] = {
    "ttyACM[0-9]*"
};
const int   numMyTTY = 1;

numUarts = simple_uart_list(&names, &descriptions, numMyTTY, (char**) &myTTY);
for (int i = 0; i < numUarts; i++) {
    printf("Port %d: %s: %s\n", i, names[i], (descriptions && descriptions[i]) ? descriptions[i] : "unknown");
}

In case of the standard ports can the function called with:
numUarts = simple_uart_list(&names, &descriptions, 0, NULL);

I'm not so keen on this - it doesn't feel like the kind of thing the user should have to specify directly. What about this change instead: https://github.com/AndreRenaud/simple_uart/pull/18

Daccord, please go forward with your draft, my comments are in this P&R.


Only directory structure downloaded, no files

Expected Behavior
Application should download full file tree.
Actual Behavior
Application only downloads the directory structure but creates no files.
The Remote Explorer does work
Steps to Reproduce the Problem

SFTP: Download Project

Requisites
Config
{
"protocol": "sftp",
"host": "...",
"port": 22,
"username": "...",
"password": "...",
"uploadOnSave": true,
"remotePath": "/home/.../"
}
Log
[error] Error: Failure
at SFTPStream._transform (/Users/jan/.vscode/extensions/liximomo.sftp-1.7.0/node_modules/ssh2-streams/lib/sftp.js:412:27)
at SFTPStream.Transform._read (_stream_transform.js:186:10)
at SFTPStream._read (/Users/jan/.vscode/extensions/liximomo.sftp-1.7.0/node_modules/ssh2-streams/lib/sftp.js:183:15)
at SFTPStream.Transform._write (_stream_transform.js:174:12)
at doWrite (_stream_writable.js:387:12)
at writeOrBuffer (_stream_writable.js:373:5)
at SFTPStream.Writable.write (_stream_writable.js:290:11)
at Channel.ondata (_stream_readable.js:639:20)
at emitOne (events.js:116:13)
at Channel.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
at readableAddChunk (_stream_readable.js:250:11)
at Channel.Readable.push (_stream_readable.js:208:10)
at SSH2Stream. (/Users/jan/.vscode/extensions/liximomo.sftp-1.7.0/node_modules/ssh2/lib/Channel.js:166:15)
at emitOne (events.js:116:13)
at SSH2Stream.emit (events.js:211:7)
at parsePacket (/Users/jan/.vscode/extensions/liximomo.sftp-1.7.0/node_modules/ssh2-streams/lib/ssh.js:3445:10)
at SSH2Stream._transform (/Users/jan/.vscode/extensions/liximomo.sftp-1.7.0/node_modules/ssh2-streams/lib/ssh.js:671:13)
at SSH2Stream.Transform._read (_stream_transform.js:186:10)
at SSH2Stream._read (/Users/jan/.vscode/extensions/liximomo.sftp-1.7.0/node_modules/ssh2-streams/lib/ssh.js:253:15)
at SSH2Stream.Transform._write (_stream_transform.js:174:12)
at doWrite (_stream_writable.js:387:12)
at writeOrBuffer (_stream_writable.js:373:5)
at SSH2Stream.Writable.write (_stream_writable.js:290:11)
at Socket.ondata (_stream_readable.js:639:20)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
at readableAddChunk (_stream_readable.js:250:11)
at Socket.Readable.push (_stream_readable.js:208:10)
at TCP.onread (net.js:594:20)
Specifications

Extension Name: sftp
Extension Version: 1.7.0
OS Version: Darwin x64 18.0.0
VSCode version: 1.28.2

It's likely that your server runs out of file descriptors. Try to increase the file descriptor limit.

Yes that fixed it. Thank you sir.


Add Tests and CI

This PR adds tests and continuous integration to this project. The commits themselves break down what they do better than I could summarize here but effectively, we add tests and make changes to the library that were necessary to make those tests possible, while also trying to modify the repo as little as possible. And a little bit of CI, as a bonus since I was already here.
I don't believe I've changed any functionality here but the logic around the changing of return to process.exit(1) is technically different behavior because process.exit(1) will always quit while return might quit. I explain the why of that change in the first commit as well.

@wardellbagby Hi again!  Could you resolve the latest conflicts?  And also, is your branch testable yet by me or someone else? or is it still somewhat of a WIP (work in progress) or Draft?

Hey @thadguidry! Yeah, I'll resolve the conflicts in a bit.
Yes, it's testable and once I resolve conflicts, it'll be mergable.
You can run the tests via npm run test.

@thadguidry Alright, I think I've address everything now.

@thadguidry Alright, I think I've address everything now.

awesome! so I'll checkout and run npm run test

E:\GitHubRepos\delete-tag-and-release>npm run test

><EMAIL_ADDRESS>test
> jest index.spec.js

'jest' is not recognized as an internal or external command,
operable program or batch file.

E:\GitHubRepos\delete-tag-and-release>

E:\GitHubRepos\delete-tag-and-release>npm run test

><EMAIL_ADDRESS>test
> jest index.spec.js

'jest' is not recognized as an internal or external command,
operable program or batch file.

E:\GitHubRepos\delete-tag-and-release>

Since there's a new dependency added, you have to run npm install first. Apologies; I should've mentioned that.

@wardellbagby OK, the local testing passed.
Now, hmm, that is all mocked. Great!  But what would be your ideas or plan to remain in sync with the GitHub API (since your mocking a portion of the API responses, yeah?)  How do other Actions in the Marketplace do that if they also use mocking?

Don't worry @thadguidry, I plan on following this PR up with one that ports it to using the Octokit libraries and that'll rewrite these tests as well.
I want this PR merged as the "safe" version that doesn't change any functionality so that the refactor will have a good tested base to compare to.
I'll also update the README as well with development instructions and implement Prettier and eslint for solid source code management.


Plugin prevents packaging

When plugin is enabled, all packaging fails due to "Unknown Cook Failure".
Starting the editor without the plugin successfully packages the project.
I need to look into this issue, but I do not have a viable internet connection, so it has to wait a bit.
Sorry for the inconvenience.

Gonna take a look at this now.

Could you post your console output during packaging with the plugin enabled, please?

CookingFailed.txt

CookingFailed.txt

Yeah, that's the one. I'm experiencing exactly the same series of errors.
I've tried many things from which none worked, but I'm going to continue trying. We'll figure it out.

Not sure if this is useful at all, but it might be a lead: https://answers.unrealengine.com/questions/958804/how-to-exclude-editor-module-that-is-part-of-plugi.html

I have stumbled upon this a while back too.
Sadly, we already have this setting for version 1.2.0, so the issue has to be elsewhere.

Wow, you fixed it? Great job!


Incorrect in msg hash

Hello, i have make a jetton transfer transaction and save external msg hash to confirm the transaction. But api v2/blockchain/transactions/  return   "error": "entity not found". I have checked and found that the in_msg hash of jetton transfer is incorrect (get by transaction hash fe4df7b482a31981274d6232887f102812b9b7106fb627909f346a3e1ea5f351)
https://testnet.tonapi.io/v2/blockchain/transactions/fe4df7b482a31981274d6232887f102812b9b7106fb627909f346a3e1ea5f351
It return me the in msg hash is: 42fbe403afe8c495cf323a3293ff1062031e6989344389d7f133d27d35f0bc33 (mean QvvkA6/oxJXPMjoyk/8QYgMeaYk0Q4nX8TPSfTXwvDM= in base64)
When i filter it by another viewer (tonscan), tonscan return me not found that hash (the correct hash is QpNatGrhFnwpO2/BseDbz/T6fP7dTVE5P9zuXBtrsM0=, that also is saved in my database when send transaction).
So i think it make both /v2/blockchain/messages/{msg_id}/transaction and /v2/blockchain/transactions/{transaction_id} return not found when i filter by correct hash
Ton scan transaction: https://testnet.tonscan.org/tx/%2Fk33tIKjGYEnTWIyiH8QKBK5txBvtieQnzRqPh6l81E=

The same problem occurs when using the BOC hex hash. It previously worked fine, but now it returns entity not found in most cases.
Here’s the code used to convert the BOC string from @tonconnect to a hex hash:
const boc = response.boc; // response from tonConnectUI.sendTransaction fn
const cell = Cell.fromBoc(Buffer.from(boc, 'base64'))[0];
const hash =  cell.hash().toString('hex');

fixeid. please subscribe on https://t.me/tonconsole_com for future updates