Missing styleguide for component

Instead of using directives we can use component on those places where we dont need to DOM manipulate. But I cant find any styleguide for this in angularjs 1.5.

What suggestions does the community have for this?

I like it this way:
(function() {
	'use strict';

	angular
		.module('app.widget.activeplaces')
		.component('activePlaces', {
			bindings: {
				data: '<'
			},
			templateUrl: 'components/active-places/active-places.widget.html',
			controller: ActivePlacesController,
			controllerAs: 'vm'
		});

	function ActivePlacesController(activityService) {
		var vm = this;

		vm.activities = [];
		vm.doFunnyStuff = doFunnyStuff;

		function doFunnyStuff() {
			vm.activities.push('yolo');
		}
	}

}());

Alternatively move component registration to the bottom:
(function() {
	'use strict';

	var activePlaces = {
		bindings: {
			data: '<'
		},
		templateUrl: 'components/active-places/active-places.widget.html',
		controller: ActivePlacesController,
		controllerAs: 'vm'
	};

	function ActivePlacesController(activityService) {
		var vm = this;

		vm.activities = [];
		vm.doFunnyStuff = doFunnyStuff;

		function doFunnyStuff() {
			vm.activities.push('yolo');
		}
	}

	angular
		.module('app.widget.activeplaces')
		.component('activePlaces', activePlaces);

}());

The problem is that I would prefer using the new  $ctrl reference instead of vm which makes the vm-pattern inconsistent. So either switch completely to $ctrl or simply add controllerAs: 'vm' to the component settings object to be consistent with the rest of the style guide :)

I like the second way better. I'd also consider putting methods on a prototype to make it easier to migrate to ES6 classes later. I also agree it's time to switch to $ctrl as it's the default and not having to declare controllerAs reduces the boilerplate needed.

I prefer the first way fwiw :grin:
(without vm of cource :stuck_out_tongue:)

i'd add to the first controller:
// other vm vars/assigns here
vm.$onInit = activate;

// functions
function activate() {
  // initialization magic here
}

of course we can change the name of activate function to init or onInit etc.

This is a bit more opinionated and ES2016 but for my components I do it like that :
(function() {
  'use strict';
  /*
<active-places data="">
</active-places>
   */
  const componentConfig = {
    bindings: { data: '<' },
    templateUrl: 'components/active-places/active-places.widget.html',
    controller: ActivePlacesController,
  };

  /* @ngInject */
  function ActivePlacesController(activityService) {
    Object.assign(this, {
      activities: [],
      doFunnyStuff,
    })

    function doFunnyStuff() {
      this.activities.push('yolo');
    }
  }
  angular
    .module('app.widget.activeplaces')
    .component('activePlaces', componentConfig);

}());

I like to have a copy-pastable snippet at the top of my file, that make me gain a lot of time. And it is more explicit and useful when developing in a project than the module and component declaration AMHO.
I also like the Object.assign (ES2015 could use angular.extend) call to bind all the methods and props to the component scope and also shave the file of all those little vm..
I also dropped the vm capture variable for the this use. Since ES2015, it is way more usable and since NG1.5+ I always find a way not to use $watch. Bonus effect, I learn to use it instead of running away from it.

Here is a revision using ES6 if you are interested.
https://github.com/rwwagner90/angular-styleguide-es6

This is also opinionated but I like to keep it simple. No vm, just $ctrl. No division of what to be exposed to the view. Thoughts?
	(function(){
		'use strict';

		angular
			.module('app.shared')
			.component('buttonList', {
				bindings: {
					data: '<',
				},
				template: `
								<button class="btn btn-default" ng-click="$ctrl.removeButton(button)">{{ ::button.name }}</button>
							`,
				controller: MyDataController
			});

		function MyDataController(dataService) {

			this.$onInit = function () {
				this.buttons = [];
				this.loadData();
			};

			this.removeButton = function (button) {
				var index = this.buttons.indexOf(button);
				this.buttons.splice(index, 1);
			};

		}

	})();

I helped push the team for a .component feature for A1 ... and I am thrilled they did this.
I also voted very publicly for vm.* to continue in the A1 version of .component. But the community voted on the issue to go with $ctrl. In the spirit of the style guide, consistency is most important. As such, I think $ctrl is the best option here and it is in line with the defaults mentioned in your notes above.
Other things to consider are

how to define the configuration
how to set properties in the component (this, vm, $ctrl)
2b. if using this (see # 2 above) how to handle new closures (e.g. self) ... yuk
Naming of the function (Component or Controller)
how to handle callbacks in bindings
naming of bindings

These are just some examples I grabbed out of the many ways I have seen and used .component thus far.
Let's keep the chat going on these and any other relevant ones.

I am keen on the 1st format that declares the component at the top. The reason is that the 2nd version introduces a new variable activePlaces, the name of would need to be debated and which adds more complexity to reading the file.
I would also be keen to put the controller methods on the prototype. Unlike services, you can get multiple instances of controllers, especially if used in components, and it would seem more favourable not to be creating new copies of every method per instance.
Since components require a controller as, the default of $ctrl is my preferred option, you tend not to get context-free function calls so often of the controller methods.
I have always been calling the function [ComponentName]Controller since it is a controller for a component. I would recommend this, despite the fact that when we move to A2 these names would change - it would be a simple refactoring.
It is important in components to make use of the lifecycle hooks, rather than the controller constructor:

constructor - only simple initialisation of properties, such as attaching injected services to properties. No real work should be done here, since going forward none of the bindings will be assigned here.
$onInit - at this point the bindings and any required controllers have been assigned. This is where any real initialization work should be done.
$onChanges - this is called whenever any of the input (<) and interpolation (@) bindings change. It is important to realise that mutation of input objects does not trigger the interpolation. But this is a good place to put code that reacts to changes to the inputs, which saves on creating watches. I would suggest that if you ar going for a "one-way data flow" approach then this is a good place to make a copy of the input objects as they change so that you don't inadvertently mutate an object that is passed.
$onDestroy - the only reason for this method is to release or close long running resources that have been acquired or opened during the life of the component. Note that this hook does not get called if you manually destroy the component's isolate scope, nor if you manually remove the components element from the DOM. It only gets destroyed if the containing scope, the scope in which this component lives, is destroyed.

For output bindings I have been following the approach of having a handler method buttonClick(button) that actually triggers the output onButtonClick({$event: button}). And that the payload for the output is always put on the $event property. This means that on the outside you are able to do <button-list on-button-click="$ctrl.doStuff($event)"> which is similar to what you see in Angular 2.
So it all tends to look like this:
    (function(){
        'use strict';

        angular
            .module('app.shared')
            .component('buttonList', {
                bindings: {
                    buttons: '<',
                    onButtonClick: '&'
                },
                template: `
                                <button class="btn btn-default" ng-click="$ctrl.buttonClick(button)">{{ ::button.name }}</button>
                            `,
                controller: ButtonListController
            });

        function ButtonListController(dataService) {
            this.dataService = dataService;
        }

        ButtonListController.prototype = {
            $onInit: function () {
                this.loadData();
            },
            $onChange: function(changes) {
                if (changes.buttons) {
                    this.buttons = angular.copy(this.buttons);
                }
            },
            buttonClick: function (button) {
              this.onButtonClick({ $event: { button });
            }
        };
    })();

@petebacondarwin  I like what you have with a few changes.
I prefer not to embed the  { } for the configuration for the component and instead to use a variable. I find this easier to read and debug. The name is irrelevant to me ...
var componentConfig = { ... };
angular
            .module('app.shared')
            .component('buttonList', componentConfig);

My larger concern is about the use of this and how functions can access the properties of the controller. The controller will have state ... yours has $ctrl.buttons in the template and I assume we'd have a this.buttons in the controller. When we create functions (prototype or otherwise) we have closures and some of those have their own this reference. This happens, for example, when we use $timeout(). How are you seeing these being resolved?

I had this problem in my example with the promise then handler. I chose to use .bind

yeah, but that is not fun :)
that's another reason we used vm in A1 controllers

Well you can always go with $ctrl in that case
On 14 Sep 2016 19:05, "John Papa"<EMAIL_ADDRESS>wrote:

yeah, but that is not fun :)
that's another reason we used vm in A1 controllers
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/johnpapa/angular-styleguide/issues/766#issuecomment-247103228,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAA9J5DE4qIUEOEuPEIPLKobfDKT_Bbjks5qqDeEgaJpZM4Jyo-5
.

Right now I'm doing it like this (going with $ctrl):
( function() {
  'use strict';

  var component = {
    bindings: {
      data: '='
    },
    controller: controller,
    templateUrl: '/breadcrumbs.html'
  };

  angular.module( 'app' ).component( 'breadcrumbs', component );

  function controller( $log, $state ) {
    var logger = $log.getLogger( 'breadcrumbs' );
    var $ctrl = this;

    logger.log( $ctrl );

    $ctrl.goToState = goToState;

    function goToState( breadcrumb ) {
      logger.log( 'goToState()', breadcrumb );
      $state.go( breadcrumb.state, breadcrumb.data );
    }
  }
} )();

What do you guys think?

I guess one could be inspired from Todd Motto styleguide ?
https://github.com/toddmotto/angular-styleguide

Yes but that's ES2015. What happens with people still stuck with pre-ES2015?

Personally I've been using the following style:
(function(){
  'use strict';

  angular
    .module('app')
    .component('exampleComponent', exampleComponent())
    .controller('ExampleComponentController', ExampleComponentController);

  function exampleComponent() {
    var component = {
      bindings: {
        /* bindings - avoiding "=" */
      },
      controller: 'ExampleComponentController',
      controllerAs: 'ctrl',
      templateUrl: 'path/to/example-component.html'
    };

    return component;
  }

  ExampleComponentController.$inject = ['exampleService'];

  /* @ngInject */
  function ExampleComponentController(exampleService) {
    var vm = this;

    /* generic controller code */
  }
})();

What about providing unique prefix for component as in directive? Is it considered necessary?

@petebacondarwin I like your example as it emphasizes one way data bindings and the need to copy them in the $onChange lifecycle hook to truly achieve one-way data (i.e. state that a child may not change in a way that propagates to parent). A few questions:

Why did you call this.dataService.loadData() inside of the $onInit hook? As far as I understand it, since dataService is declared as a dependency as a controller parameter, angular's dependency injection mechanisms will ensure such (singleton) service is available when the controller object is constructed. Would it make sense to make use of the require part of the component/directive API to showcase the $onInit guaranty instead?
Why would you add to the prototype of  ButtonListController when you can just as easily add these methods inside the constructor function itself without any loss in behavior, especially considering that ButtonListController will not be used as part of some prototypical chain of inheritance. Is there something you're trying to emphasize here?

@texonidas :

Do  you need to explicitly attach "$injectables" to a constructor function that references them as parameters?
Why introduce exampleComponent() when you can just pass the component configuration (object literal) directly as a parameter to the component method? Among other things, you're introducing a variable named component, only to return the same variable and to method by the same name.

@jbmilgrom

It is much easier to control your unit tests if you do not put "real" work in the constructor. If your constructor does work such as loading then it is impossible to prevent this from happening (or delaying it) inside your tests. WIth the added complication of the DI system doing the instantiation you lose even more control over the timing.

Given that this component could be used numerous times in a single app it is more memory efficient to put the methods, which will be shared between instances, on the prototype.

@petebacondarwin thanks for the response, makes sense.
By declaring methods in the scope of the constructor function that reference variables also declared in the scope of the constructor function, you can gain a kinda private state (through a closure). That appears to not be possible in your setup. Instead, do you bind all state to this and delegate to services if privacy is desired?

@jbmilgrom

The $inject is there for minification safety. It's not absolutely required, and if this was to go into the styleguide, I would remove it, as it is laid out explicitly further on in the section on minification.

I went with the same syntax the styleguide recommends for services:

/* recommended */
function dataService() {
    var someValue = '';
    var service = {
        save: save,
        someValue: someValue,
        validate: validate
    };
    return service;

    ////////////

    function save() {
        /* */
    };

    function validate() {
        /* */
    };
}

in that you explicitly name the variable, then return it.

I am using an aproach  similar to texonidas's, but decided to keep the default $ctrl in the html (not using controllerAs).
file name: example.component.js
angular
    .module('app.moduleName')
    .component('exampleComponent', componentConfig());

function componentConfig () {
    return{
        bindings: {
            /*bindings*/
        },
        templateUrl: 'path/to/example.html',
        controller: exampleController
    };
};

exampleController.$inject = ['exampleService'];

function exampleController (exampleService){
    var ctrl = this;
    ctrl.someFunction = someFunction;
    ctrl.$onInit = function(){
        ctrl.someVar = 'initial values';
   }
   .
   .
   .
};

Should the component be registered with the module?
My teams interpretation of the v1 style guide is that all controllers should be registered with the module and referenced by the name.
angular
    .module('app.moduleName')
    .controller('exampleController', exampleController)
    .component('exampleComponent', componentConfig());

function componentConfig () {
    return{
        bindings: {
            /*bindings*/
        },
        templateUrl: 'path/to/example.html',
        controller: 'exampleController'
    };
};


Swapped parameters for promiseExec

promiseExec has the err and data parameter swapped. This trickles down into alasql.exec and further.
Spawned from https://github.com/elipalmer/alasql/blob/3f996ea8eaf774f380a069d493518e3ea27c70a2/src/40select.js#L371

Hi @mathiasrw,
Could I start working on this issue if no one else has? If so can you kindly give me a suggestion on where to start.
Thanks!

Hi @alphagamer7
That would be so lovely if you could look into this.
Where are you in the process? Are you able to get to step 6 of https://github.com/agershun/alasql/blob/develop/.github/CONTRIBUTING.md ?


Submissions are stored twice

Describe the bug
The submissions are stored twice for some students. So they have the same id, commit hash and so on. But the results are only stored in the first of the clones.
The student can also not see a result because of this bug, since Artemis tries to fetch a result from the clone without results.
To Reproduce
I currently don't really know when or why the submissions get duplicated, but it happens sometimes...
Expected behavior
No duplicated submissions
Screenshots

What browsers are you seeing the problem on?
Safari
Additional context
No response
Relevant log output
No response

Duplicate of #4257


Body table with fix width 100px

hi,i have a grid.
i pass options to it,and show table in bootstrap tab with click event,but table-body have 100px width! :(
document.querySelector('a[data-target="#inbox"]').addEventListener('click', function () {
    $('#inboxGrid').mygrid({
        height: 'auto',
        width: '100%',
        paging: true,
        autoload: true,
        filtering: false,
        sorting: false,
        pageLoading: true,
        pageIndex: 1,
        pageSize: 12,
        selecting: true,
        pageButtonCount: 5,
        noDataContent: '....',
        loadIndication: true,
        loadIndicationDelay: 300,
        loadMessage: 'wait...',
        loadShading: true,
        LoadDataUrl: './inbox/q',
        fields: [
            {name: "inbox_msg_id", title: '', width: 50},
            {name: "inbox_msg_title", title: '', width: 50},
            {name: "inbox_msg_date_register", title: '', width: 50},
            {name: "name", title: '', width: 50}
        ]
    });

Have you seen this issue https://github.com/tabalinas/jsgrid/issues/265#issuecomment-216817771?

yes,can i call _refreshSize method directly?
when call this method?

yes,can i call _refreshSize method directly?
when call this method?

thanks,its resolved,when i using "shown" instead of "click" event

glad that you figured it out.
regarding _refreshSize it's not the best idea to use it since it's a private method and can be renamed or changed in future (no guarantee for backward compatibility). Maybe it makes sense publish this method, to avoid rerendering all the grid data when calling refresh.


⚠ Samsung has degraded performance

In c08d7e0, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2542 ms

Resolved: Samsung performance has improved in 926891c.


Token.Comment does not handle line breaks

/*  ONLY
rules = ImplicitClassPrivateParams
 */

val in = new String(Array[Byte](47, 42, 32, 32, 79, 78, 76, 89, 13, 10, 114, 117, 108, 101, 115, 32, 61, 32, 73, 109, 112, 108, 105, 99, 105, 116, 67, 108, 97, 115, 115, 80, 114, 105, 118, 97, 116, 101, 80, 97, 114, 97, 109, 115, 13, 10, 32, 42, 47, 13, 10))
import scala.meta._
val tokens = in.parse[Source].get.tokens
tokens.collect{ case Token.Comment(in) => in }.head

What is the expected output here? Would be good to have a reproduction for basis of a unit test.


Updated rustwide to 0.7.1

As discussed on discord, this is part of an attempt to semi-incrementally re-implement step 1 of the async RFC now that the (hopefully) root cause of the crash was solved with git gc

Some more things mentioned:

This means we will depend on both tokio 0.1 and 0.2, but since we plan to follow it up shortly with the rest of #758, that seems reasonable.
Since Rustwide uses tokio much less heavily, it is unlikely this will have a performance impact (or at least, not nearly as bad as #758)


Syuruq Time

Salam Brother, just a sugestion, can you give option to add time for syuruq/sunrise?
Jazakallah..

Salam @Feyruzefendi ,
Yes I can, and the services already provide this info but I'm not sure about its precision, that's why I didn't include it.
If it's important to you, I can add it in next version. If so, I will be grateful if you tell me how it's important, because I like to learn from the people how they are going to use the widget :)

Thank you, it's important because we know, the time for Fajr prayer lasts from the onset of the true dawn until the sun starts to rise. So knowing when is the time limit for fajr prayer is a must. So i can adjust my alarm and my schedule. Especially in summer, where dawn starts at 3 and the sun already rises at 5. sometimes it's difficult to wake up on time, so knowing when the deadline is important.

Thank you, it's important because we know, the time for Fajr prayer lasts from the onset of the true dawn until the sun starts to rise. So knowing when is the time limit for fajr prayer is a must. So i can adjust my alarm and my schedule. Especially in summer, where dawn starts at 3 and the sun already rises at 5. sometimes it's difficult to wake up on time, so knowing when the deadline is important.

Thank your for the clarification :)

@Feyruzefendi Shuruq time is now available in v3.2.


Make FieldSpecFactory that contains the factory methods in fieldSpec

Optional tech debt, up for discussion if it's the right thing to do

This appears to have been done already under #1430.


[FIF-287] Created an error boundary

Select one of the components, for example StudentDetail.

Add an exception in StudentDetail, to test the ErrorBoundary.

On the screen where the component is used, put it inside the ErrorBoundary.
<ErrorBoundary><StudentDetail></StudentDetail></ErrorBoundary>

Run the application in production mode. If you run it with the development version, the error screen will be displayed.
yarn start-prod -p 4200

It should display the error message.

Warning looks good!
I was also expecting to surround our App component with this, so that any errors bubbling up to the top-most App parent will be captured. This also prevents the React "white-screen of death".

@kurtjohnson-HS , I updated index.ts to add this change.
ReactDOM.render(<ErrorBoundary><App /></ErrorBoundary>, document.getElementById('root'));

Looks good. It only needs a yarn lint to pass the build and we should merge it. For me this is approved pending the lint.

One more thing... Can you do a rebase so that all of these file changes disappear? I am concerned that we might overwrite some master changes with merge changes.

One more thing... Can you do a rebase so that all of these file changes disappear? I am concerned that we might overwrite some master changes with merge changes.

I rebased the branch. I fixed the linting issues in ErrorBoundary.

Above, it still shows the PR will change 31 files. It only looks like it should change five.  Can you rebase again? I know that you will have to resolve the yarn.lock and package.json.

How about adding an email for support in  ... contact support if the error keeps happening. it can be configured in .env

Needs a rebase to just show five file changes.

I rebased this branch before pushing my changes (3 files). After I rebased the branch those 31 files appeared. I have not modified those files, they are the ones that come from main. I didn't merge main into FIF-287.


Adding Circular Prime Number Checker

Project title
Circular Prime Number Checker
Project Description
A circular prime is a prime number with the property that the number generated at each intermediate step when cyclically permuting its digits will be prime. For example, 1193 is a circular prime, since 1931, 9311, and 3119 all are also prime.
Stack:

[x] Html
[x] CSS
[x] JavaScript

/assign


Addition of starport to dockerfile and related configs

Have added support to starport built cosmos chains.
Added libwasmvm.so to support chains that require this library.
Added juno docker-compose.yml and deploy.yml
Added new build includes to publish.yaml

This pull request has been mentioned on Akash Support. There might be relevant details there:
https://forum.akash.network/t/cosmos-omnibus-starport-compatibility-update-and-deployment-guide/612/2

I've submitted some changes to this PR but it's looking good overall https://github.com/nullMames/cosmos-omnibus/pull/1

Ready to merge if no further comments.


Contact name list

The list of names in contacts needs to show First and Last names. It currently only shows First Name, which is not very informative.

@sanaani Now we are display both first name and last name in the contact list page


Word wrapping - "Précédent" button on "How COVID Alert works" in FR - (iOS/Android)

both iPhone 8 and galaxy S8+ (v9) have this issue.
language = French
from the menu, selected the "How COVID Alert works" option.
Clicked Next
the word "Précédent" wraps and it shouldn't

@timarney @smcmurtry how are we addressing responsive design in the app? Given the screen resolutions across the phones that can be used is pretty wide ranging and the features of phones enable large text, zoom and magnification, is there a way to address this meaningfully?

This doesn't seem to happen anymore on iPhone 8, @mmiron-HC or @JuliannaR can you confirm?

Currently the app supports text magnification of 200%. Above 200% and the user will encounter this. @mmiron-HC I think we can close this one as it functions to WCAG requirement of screen zoom.


The JS/TS language service crashed 5 times in the last 5 Minutes.

ADD ISSUE DESCRIPTION HERE
Version: 1.76.1
Commit: 5e805b79fcb6ba4c2d23712967df89a089da575b
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36 Edg/110.0.1587.69
Embedder: codespaces

Thanks for creating this issue! We figured it's missing some basic information or in some other way doesn't follow our issue reporting guidelines. Please take the time to review these and update the issue.
Happy Coding!

Same issue just started this week
Version: 1.76.2 (system setup)
Commit: ee2b180d582a7f601fa6ecfdad8d9fd269ab1884
Date: 2023-03-14T17:55:54.936Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: <IP_ADDRESS>-electron.0
OS: Windows_NT x64 10.0.19045
Sandboxed: No

I'm having the same issue:
Steps Needed:
Immediately upon starting VS Code, I get the following error:
The JS/TS language service immediately crashed 5 times. The service will not be restarted.

Actual Results:
Syntax highlighting for JS/TS fails to work. Error message is displayed immediately upon opening VS Code.
Expected Results:
Expect VS Code to start without errors/warnings and with the JS/TS language services working.
Additional Notes:
I've restarted my computer and VS Code several times but this has not resolved the issue.
VS Code version: Code 1.77.0 (https://github.com/microsoft/vscode/commit/7f329fe6c66b0f86ae1574c2911b681ad5a45d63, 2023-03-29T10:02:16.981Z)
OS version: Windows_NT x64 10.0.19044
Modes:
Sandboxed: No
Remote OS version: Linux x64 <IP_ADDRESS>-microsoft-standard-WSL2


Cut version 0.23.1 of Bigtable.

Only commits since the last release came from #3089, so release notes will be easy.
$ git log bigtable-0.23.0..cut-bigtable-0.23.1 -- bigtable/
commit f99fb80baf810ca4447c7f1bc6b39a9f430f7072
Author: Danny Hermes<EMAIL_ADDRESS>Date:   Fri Mar 3 11:18:05 2017 -0800

    Cut version 0.23.1 of Bigtable.

commit 20ffd2be9b31bbff9bca8bd698c941da5a7f1951
Author: Danny Hermes<EMAIL_ADDRESS>Date:   Thu Mar 2 16:54:21 2017 -0800

    Sending x-goog-api-client header in Bigtable.

    We missed this because it does not use GAPIC (the most
    recent generated Bigtable GAPIC surface is 5+ months old).

Suggested release notes:
google-cloud-bigtable 0.23.1

Sending x-goog-api-client gRPC header with all requests for usage metrics inside Google (#3089)

PyPI: https://pypi.python.org/pypi/google-cloud-bigtable/0.23.1

Merging without CI, since there are no code changes.

Eh, nevermind, no hurry.

CircleCI is done, Travis has started. Yay for throttling builds!

Here is the "push to PyPI" build: https://circleci.com/gh/GoogleCloudPlatform/google-cloud-python/1094


Using import: to mock globals messes up coverage (with c8)

If I use import: in esmock to mock a global it messes up the coverage report. At least it does when run with c8 mocha. I constructed a minimal test scenario for it below:
Here's an example source file src/myfile.js:
function someFun() {
  console.log('something');
}

export async function testFun() {
  console.log('test');

  return 418;
}

And here's an example test for it. It only tests the testFun method, but it has a mock defined for the global fetch (which isn't actually used):
import assert from 'assert';
import esmock from 'esmock';

describe('ESMock test case', () => {
  it('Simple test', async () => {

    const { testFun } = await esmock(
      '../src/myfile.js', {
        import: { fetch: async (url) => {} }
    });

    assert.strictEqual(418, await testFun());
  })
});

When I run this and look at the coverage report it looks like this:

The above coverage report is clearly wrong.
If I comment out the line with the import, e.g.:
    const { testFun } = await esmock(
      '../src/myfile.js', {
        // import: { fetch: async (url) => {} }
    });

the coverage report is correct again:

Note that using esmock with things other than globals, doesn't have this issue, e.g. the following doesn't cause this issue:
    const { postSource } = await esmock(
      '../../src/source.js', {
        '../../src/included.js': {
          default: mockResp
      }
    });

It would be great if I can use the globals mocking without messing up the coverage report 😄

if there's no objection, I'd like to close this issue to merge with an earlier similar issue https://github.com/iambumblehead/esmock/issues/271 (will wait for reply)
There is a long-outstanding issue at the c8 repo for this https://github.com/bcoe/c8/issues/325
The maintainer requested a reproduction and I submitted one, but there was no follow-up https://github.com/bcoe/c8/pull/501 possibly the solution would need to come in multiple separated PRs
The c8 maintainer doesn't seem interested to resolve the issue but probably would accept PRs from someone else to resolve the issue. Not criticizing c8 sources here but, they are difficult for new-comers like myself to work with and the solution would imo most practically come from the c8 author himself

I'm surprised the coverage report is correct when modules and not globals are mocked

I have no problem with merging this with #271 but it would be nice to describe this import: related problem there then too. I did read that issue before reporting this one and thought it was about a different problem.
To me it sounds like that these are 2 different problems that might have the same underlying cause?

If you recommend any changes the title or anything else around that ticket they can be made.

To me it sounds like that these are 2 different problems that might have the same underlying cause?

Okay, will keep this issue open while considering it.
For mocking global values, esmock returns a modified version of source file(s) to node's loader; where the global value being mocked is defined at the top of the file. Maybe that change would need to be coordinated with the coverage tool in some way, but to be honest I don't know how to solve the issue. Any ideas for a solution?
const {fetch} = global.esmockCacheGet("treeid5"); // <- esmock adds this
// rest of file

Any ideas for a solution?

One thing I've been doing as an alternative way to mock these globals is to use globalThis.
For example something like this if I want to replace the global fetch:
    const mockFetch = async (url) => { ... }; // My mock fetch function

    const savedFetch = globalThis.fetch; // Save the original global fetch
    try {
      globalThis.fetch = mockFetch; // replace the global fetch with my mockFetch

      // Now call my function that calls fetch under the covers
      // it will use the mockFetch
      assert.strictEqual(418, await testFun());
    } finally {
      globalThis.fetch = savedFetch; // put the original global fetch back in the finally block
    }

You can make these changes to globalThis after the source file being tested is loaded, so you could put something like this in the logic of await esmock(...) call without the need to alter the original source file.
The only thing that needs to be done extra is to reset the original values, which I do in a finally block. Maybe an extra call something like esmock.resetGlobals() could do this, but there might be a smarter way to do that somehow.

So it seems supporting globalThis and esmock.resetGlobals() would require esmock to lose its ability to be used concurrently OR esmock would need to provide an extra interface and logic that conditionally use globalThis and implicitly requires sequential usage from the user.
Maybe support for a second "import"-like namespace, such as "globalThis", could be added in order to use globalThis for mocking.
One of the main benefits of esmock imo is that it can be used with concurrent tests and so using globalThis is a downgrade in that regard.
If you are around feel free to chime in @koshic
Also "setting" and "clearing" properties of globalThis could be handled with a seperate file or package and does not actually need to be handled by esmock. However, for users who would want to use globalThis, it would be convenient if esmock could help with that.

I wish there were a way to avoid using globalThis and to get correct results from c8 here but don't know if, or how, it could be achieved.

node.js' native coverage tooling now allows one to specify files for coverage analysis https://github.com/nodejs/node/pull/53553
Have not tried it myself yet, but perhaps native coverage results do not exhibit this same issue

another we could try doing is; putting the lines added by esmock onto the existing first line of the file with no additional newlines.

this issue also happens using node's native test coverage tools.
another idea is to add 'global' definitions to the bottom of the file using "var" so to make the definitions available at the top of the file

@iambumblehead can /* c8 ignore start */ / /* c8 ignore end */ around injected code help us for c8 use case? It's a question (may be a bit stupid...), I didn't try it yet )

I experimented with adding using var but the definitions are not "hoisted" the way that I expected.
This results in a runtime error where dateWrapper becomes undefined
const dateWrapper = Date

export {
  dateWrapper
}

var Date = { now: () => 'now' }

@koshic thanks for the suggestion that might be something to try. wondering if there is something similar for native node test coverage tools.

ime usage of c8 ignore removes sections of code from being included in the report, but it does not elide those lines from the analysis in a way that would shift the lines being reported

I also tried replacing "const" with "  var" to try and get the hoisting behaviour... but var-defined dateWrapper is still 'undefined'
sourcesafe.replace(/const/g, '  var')

I'm all out of ideas

well, node runs all tests now run separated threads with own global environment and maybe the globals could be defined there without side-effects that would have occurred in earlier versions

Technically we can fix source map for the particular module via inline directive. If tested module is a 'pure JS' (== loaded without loader hooks) source map is not exists so coverage tools will use original source, right (we are testing source code, not compiled packages with corresponding .map files)? If tested module was transformed via hooks, previous hook may (should for more or less good tools like tsx) provide source map in separate field -> we can fix it as we want.

node runs all tests now run separated threads

it's not quite true due to https://nodejs.org/docs/latest/api/cli.html#--experimental-test-isolationmode

Technically we can fix source map for the particular module via inline directive. If tested module is a 'pure JS' (== loaded without loader hooks) source map is not exists so coverage tools will use original source, right (we are testing source code, not compiled packages with corresponding .map files)? If tested module was transformed via hooks, previous hook may (should for more or less good tools like tsx) provide source map in separate field -> we can fix it as we want.

This is a really interesting idea. Re-stating this idea, we would include our own source-map directive which references our own modified version of the file, possibly an updated version of a source-map from the previous file.
Thinking about this

const dateWrapper = Date

export {
  dateWrapper
}

await (async () => (await import('./globalsredefine.js')).setItBack())()
export * from './globalsredefine.js'

globalsredefine.js
var originalDate = Date

globalThis.Date = { now: () => 'now' }

const setItBack = () => {
  globalThis.Date = originalDate
}

export {
  setItBack
}

test (passing)
test('should use mocked global', async () => {
  const hostObjects = await import('../local/usesImportObjects.js')

  assert.strictEqual(hostObjects.dateWrapper.now(), 'now')
  assert.strictEqual(typeof Date.now(), 'number')

maybe there is some potential here,

esmock could define the 'globalsredefine.js' module,
original parts of the file used for coverage analysis are un-modified --lines are only added to the bottom of the file
esm loads the imported file first, even though the import is defined at the end of the file

but this approach mutates globalThis and not sure what the best way to "unset" that would be and overall is not entirely different from the earlier suggestion https://github.com/iambumblehead/esmock/issues/296#issuecomment-2043599080

elaborating on that idea, its possible to get the calling files from the stack trace
at TestContext.<anonymous> (file:///Users/bumble/test.global.test.js:18:46)',

and so another thing that could be done is, check the stack trace to see if the originating call should have the default global value behaviour or the mocked behaviour
globalThis.Date = {
  now: function (...args) {
    const mocksAvailable = mocksForThisCaller((new Error).stack)
    return mocksAvailable
      ? mocksAvailable['now'](...args)
      : originalDate.now(...args)
  }
}

we could also possibly use querystring in a clever way and attach some reset behaviour to esmock.purge(loadConfig)

another very hacky idea is to replace the references to global variables with function calls that use the exact same number of characters to return a mocked version of the thing, something like this
-const dateWrapper = Date
-const setTimeoutWrapper = setTimeout
-const fetchWrapper = fetch
-const reqUsers = async url => fetch(url)
+const dateWrapper = ZZ()
+const setTimeoutWrapper = ZZZZZZZZ()
+const fetchWrapper = ZZC()
+const reqUsers = async url => ZZC()(url)

export {
  dateWrapper,
  setTimeoutWrapper,
  fetchWrapper,
  reqUsers as default,
  child
}

export * from './globalsredefine.js'


502 Bad Gateway

502 Bad Gateway
Happen only with this course, i tried 2 other courses and it worked fine.
OS: Windows 10 1809 (build 17763.379)
Course URL: https://www.udemy.com/react-redux
Steps:

Used command : udemy-dl.py https://www.udemy.com/react-redux -k cookies.txt --skip-sub
Wait a few seconds and : 502 Bad Gateway ...

Make a request manually

I'm able to download the course successfully

What's happening ?
If the response size from "Downloading course information..." exceeds 3MB, you get "502 Bad Gateway"
Why 3MB ? I tried to change "&page_size=10000" to "&page_size=400", and i got 200 OK status code and the response size is about 3,01MB, it shows 502 then change to 200 OK right away.
Of course i tried 401, 402, ... 500, 1000 but i only got 502 status code.
In the request, i see ", caption" and i got response with caption (url, language,...) in it's body.
Then i tried to make a request caption to a specific lecture, i got response with size about 13KB.
If a course have about 400 lectures like this course => 13 * 400 = ~5MB
Then i don't have any space in response body for lectures (lectures url, 720p, 1080p,...)
So i deleted that ", caption" in request url, and now the response size is ~1MB and i got 200 OK status code, i can download the course without any problem.
But this fix is not for someone who need auto subtitle. Maybe @r0oth3x49 will find a way, like make another request only for subtitle, or make a loop with page 1, 2, ... until no more pages left.


Exceptions should show all details

Example of JSON:
error": {
            "code": "ValidationError",
            "message": "One or more fields contain incorrect values: ",
            "details": [
                {
                    "code": "ValidationError",
                    "target": "representation",
                    "message": "Parsing error(s): String '' does not match regex pattern '^[^{}/ :]+(?: :\\\\d+)?$'. Path 'host', line 1, position 297."
                },
                {
                    "code": "ValidationError",
                    "target": "representation",
                    "message": "Parsing error(s): The input OpenAPI file is not valid for the OpenAPI specificate https: //github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md (schema https://github.com/OAI/OpenAPI-Specification/blob/master/schemas/v2.0/schema.json)."
                }
            ]
        }

Right now, just the initial lines are shown. We should see all in a multiline line log

Fixed


implement login , register pages

Notes :

input & form & buttons use shadcn
stepers build custom one or https://flowbite.com/docs/components/stepper/ it can help


Suppress default 'Open launch.json' button if debug adapter returns error with command-type actions

Issue Type: Bug
Debug adapters have long been able to provide uris along with error responses, and these uris add buttons to the error dialog. Now that my PR #123833 has merged these can be command uris.
However it is not currently possible to prevent an extra 'Open launch.json' button being added to the error dialog.
In some situations there may be no point in the user opening launch.json. Instead they should use a button that the error response added.
@isidorn would it be reasonable for us to suppress addition of the 'Open launch.json' button when the error is adding its own command-type button(s)? Limiting the change in this way should minimize the chance of upsetting existing DAs which return uris with their errors. It's unlikely they have been returning command-type uris because until now these haven't been actionable.
VS Code version: Code - Insiders 1.57.0-insider (40d5e6796fbc32d67dd0009e5b0027003803fd7e, 2021-05-14T20:13:58.234Z)
OS version: Windows_NT x64 10.0.19042

@gjsjohnmurray this sounds reasonable.
What is your exact use case? Just to check if other debug adapters might also profit here.
fyi @weinand

@isidorn my specific use case is that our implementation of launchRequest may determine that there is no debugging license for the target server. In this situation we want to help the user run the command which submits a request for a license. There is no point in suggesting that they edit their launch.json file.
Are you happy for me to submit a PR?

Let's best wait and see @weinand feedback before you create a PR. Thanks

@gjsjohnmurray Yes, this request makes sense -  feel free to submit a PR.

PR submitted

Lovely, thanks! Let me review it.

@gjsjohnmurray Would also be great if you double check with you debugger once we have a new Insiders on Monday. Thanks!

/verified


Adds support for preselecting values when using countdown timer mode

--- Pickers/ActionSheetDatePicker.m
+++ Pickers/ActionSheetDatePicker.m
@@ -168,6 +168,15 @@
// if datepicker is set with a date in countDownMode then
// 1h is added to the initial countdown
if (self.datePickerMode == UIDatePickerModeCountDownTimer) {
+

   // For preselecting values

   if (!self.countDownDuration) {

       NSDateComponents *components = [[NSCalendar currentCalendar] components:(NSHourCalendarUnit | NSMinuteCalendarUnit) fromDate:self.selectedDate];

           NSUInteger hours = components.hour;

           NSUInteger minutes = components.minute;

           self.countDownDuration = (int)(hours * 3600 + minutes * 60);

   }
   datePicker.countDownDuration = self.countDownDuration;
   // Due to a bug in UIDatePicker, countDownDuration needs to be set asynchronously
   // more info: http://stackoverflow.com/a/20204317/1161723

This version is deprecated: use ActionSheetPicker-3.0 instead.


fix(cloudvol/write): allow sharded writes by removing forced autocrop

@supersergiy This autocrop was added two years ago. Can you imagine why? Right now it prevents me from uploading shards at the dataset boundary, when the shard as a whole is not aligned with the dataset bounds.

It's been a while since I've touched this part of the code, but I think the autocrop handles some weird cases when the user needs to process outside the edge of the dataset but only the internals get written. Does this branch pass integration tests?

Ah, probably not - I noticed CV complaining at me for different tasks with this change when my processing chunk size was larger than the dataset bounds.

Need to rethink how to handle sharded writes...


CAMEL-15272 Bump version for jira-rest-client-api

I believe this should be also in 3.4.x especially because of camel-k. Jira will be used as a quickstart for knative camel event sources and it'd be good to have it working also with JIRA-cloud.

Sounds good.


Updated dependencies and removed joi-model because it was not being used...

....

Just ran the tests in my dev environment, and looks like it's working! Thanks!


Invalid redeclaration

How to fix it? thx .

Are you doing cocoapod install or manual install?

No response. closing.


train time

Hello, I'm trying to implement this code to Pytorch. But it seems to be too slow for one epoch, about 90s. Here is my information: Nvidia 1080 * 3
Could you tell me how long you train one epoch? And the total time of 80K epoch?
:)

@kannidekan Around 1s:)

ok, thanks :)


Avoid reporting asset save errors, in the "already exists" case.

It is normal to have "asset already exists" cases. We get them when loading oars with assets, and also we get them on every region startup. It's not really an error to try to save the same asset with a specific ID again, so this PR moves the error report to the else case where we've already specifically handled the already exists error case. It also eliminates the second duplicate report for the same thing.

Released (finally) in v0.9.42.


Snippet incorrectly adding multipart/form-data bondaries

const sdk = require('api')('@developers/v2.0#1yl2ql5lb604m');

sdk.auth('REDACTED');
sdk.uploadAPISpecification({spec: 'owlbert.png'}, {
  Accept: 'application/json',
  'Content-Type': 'multipart/form-data; boundary=---011000010111000001101001'
})
  .then(res => console.log(res))
  .catch(err => console.error(err));

We shouldn't need to add multipart boundaries into snippets because the api internals handle this already. Should also be able to remove the Accept header here too.

This was fixed with https://github.com/readmeio/api/pull/495.


Add Chirag to mentors

@chiragagrawal9200 hey, if you have any projects please send the pr or dm me i will add it.


from_chars: BigUnsigned::ReadDigits discards significant digits

This is certainly an edge case, but the ReadDigits method may discard significant digits if the number is of the form 0.000[...]0ddd... with lots of leading zeros in the fractional part and lots of significant digits ddd....
The problem is that currently the leading 0's in the fractional part are counted as significant digits. A case where that happens is, e.g., the number 2^-1075 in fixed-point notation: This number has 323 leading zeros in the fractional part and 752 significant digits. The number is halfway between 0 and the smallest denormal 2^-1074 and should round to 0 in round-to-nearest-even mode. (The same number in scientific form is parsed correctly.)
I think a possible fix would be to add something like
int exponent_adjust = 0;
// Discard leading zeros after the decimal point if the number is of the
// form 0.000ddd.
if (begin < end && *begin == '.') {
  after_decimal_point = true;
  ++begin;
  while (begin < end && *begin == '0') {
    ++begin;
    --exponent_adjust;
  }
}

just after https://github.com/abseil/abseil-cpp/blob/b35973e3e35cb1eccb086d6a549c253c49579474/absl/strings/internal/charconv_bigint.cc#L199-L202
FWIW, here is 2^-1075 written out in fixed-point notation
0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024703282292062327208828439643411068618252990130716238221279284125033775363510437593264991818081799618989828234772285886546332835517796989819938739800539093906315035659515570226392290858392449105184435931802849936536152500319370457678249219365623669863658480757001585769269903706311928279558551332927834338409351978015531246597263579574622766465272827220056374006485499977096599470454020828166226237857393450736339007967761930577506740176324673600968951340535537458516661134223766678604162159680461914467291840300530057530849048765391711386591646239524912623653881879636239373280423891018672348497668235089863388587925628302755995657524455507255189313690836254779186948667994968324049705821028513185451396213837722826145437693412532098591327667236328125

Xin chào thế giới


Include marketo integration

@ebembi-crdb I'm noting a lot of errors thrown in the console when I inspect this in the preview. Do you have a sense for why those errors are being thrown?

@ebembi-crdb I'm noting a lot of errors thrown in the console when I inspect this in the preview. Do you have a sense for why those errors are being thrown?

I'm seeing the same on the official website, i guess it's related to fetching some third party js libraries.
It seems independent of the change in my opinion, i'll look into the errors issue.
Please do let me know if you are referring to the same errors


Triage Valid Values Issues

By mid sprint: Development of new issues and triage for any issues emerging from Valid Value Review
Mid sprint: Feasibility review and triage based on impact assessment for centers.

Triage completed and issue created with the label valid-values

Let's do this today during our mid-sprint review


Global SPAHM gradient

I assume you went for a 2 step formula for the finite differences because it was slow otherwise. If its not slow (small molecule) we should probably use a four point stencil (i.e. https://en.wikipedia.org/wiki/Five-point_stencil) for the numerical gradient.
Also, in the test, myfunc is evil (evil name, evil use of mol that is not passed as argument). Otherwise the reactors look good. And tests pass.

Thanks!

I assume you went for a 2 step formula for the finite differences because it was slow otherwise. If its not slow (small molecule) we should probably use a four point stencil (i.e. https://en.wikipedia.org/wiki/Five-point_stencil) for the numerical gradient.

I'm not sure it makes sense given the numerical gradient is only for this test. Why make it more complicated?

Also, in the test, myfunc is evil (evil name, evil use of mol that is not passed as argument). Otherwise the reactors look good. And tests pass.

I've changed the evil name but can't find where's the problem with mol...

The 2 step finite differences can be bad so the same test could potentially fail for a different molecule (for example).
Issue with mol is in
mymol.atom = [ (mol.atom_symbol(i), r[i]) for i in range(mol.natm)]
which takes mol from outside the function. This is also a liability.

Issue with mol is in
mymol.atom = [ (mol.atom_symbol(i), r[i]) for i in range(mol.natm)]
which takes mol from outside the function. This is also a liability.

This line is inside build_mol() which takes mol as the first argument

Yes, you fixed it.  Lets push! GJ!


Initialization erroneously requires trait Movable

public type Bar {
  var y : Int
  public init() {
    &y = 0
  }
}

public type Foo {
  var x : Bar

  public init() {
    &x = .new()
  }
}

produces
error: type 'Bar' does not conform to trait 'Movable'
    &x = .new()
    ~~~~~~~~~~~

I don't think this is erroneous. We agreed that assignment syntax would be treated as assignment by the type checker because in general there's no way to tell whether a specific occurrence is assignment or initialization without flow-sensitive analysis. This constraint makes it possible to run type checking without any flow-sensitive information, which is a huge win for the simplicity of the sema.
One way to address your use case is to use a memberwise initializer. Another way would be to escape in unsafe world if we added a free subscript like uninitialized_pointer<Pointee>(to pointee: set Pointee): PointerToMutable<Pointee> to stdlib.
I am comfortable keeping the restriction because the issue will only occur when writing immovable types, which should be unusual. The above workarounds can be used to address those rare cases. For the common cases, we have the guarantee that flow sensitive analysis will figure out that the statement is initialization and so it won't generate needless moves.

I don't think the unsafe solution works because the compiler know that the member has been initialized, and the code should be rejected. If I am comfortable with the member wise approach for now, but we might want to consider explicit member initialization syntax at some point.

If I am comfortable with the member wise approach for now, but we might want to consider explicit member initialization syntax at some point.

Sure. Let's keep an eye open to see if the pain becomes too great.

For the member wise initializer are you suggesting something like the following?
public type Bar {
  var y : Int
  public init() {
    &y = 0
  }
}

public type Foo {
  var x : Bar
  private memberwise init

  public init() {
    init( x : .new() )
  }
}

Close:
public type Foo {
  var x: Bar
  private memberwise init
  public init() {
    &self = .new(x: Bar())
  }
}

IIUC that there is no other way to initialize members, we should never require private memberwise unit to be explicitly declared.

We can initialize private members in good old initializers in general:
type Circle {
  public var origin: Vector2
  public var radius: Float64

  /// Creates a circle with given `radius` centered at the origin.
  public init(radius: sink Float64) {
    &self.origin = .zero()
    &self.radius = radius
  }
}

Memberwise initializers are just like the default initializers we get from Swift. They are roughly sugar for initializers that are easy to synthesize. But they are also more flexible than Swift's because we can change their visibility and have them coexist with other initializers.
I added the explicit declaration requirement because it simplifies shadowing rules in situations where one declares an initializer with the same signature. This situation has legit use cases, like checking for preconditions.
type Circle {
  public var origin: Vector2
  public var radius: Float64

  /// Creates a circle with given `radius`, centered at `origin`.
  ///
  /// - Precondition: `radius >= 0.0`
  public init(radius: sink Float64, origin: sink Vector2) {
    precondition(radius >= 0.0)
    &self.origin = origin
    &self.radius = radius
  }
}

What made OP's case special is that the type of the field to initialize is immovable, making it impossible to use the assignment syntax. In this situation, a memberwise initializer is the only resort because it allows us to take a shortcut. Since we're generating IR code directly, there is no syntactic ambiguity to resolve. As a result, we can build rvalues in place and don't have to use move operations.
Note that this trick won't work in general because it requires that we're able to inline the memberwise initializer call. That is only possible if the layout of the type to initialize is part of the visible ABI. If it isn't, then we can no longer build rvalues in place. I think we can address this situation by defining an initializer that projects the the storage to initialize in a lambda.
// In Module A

// Note: 'Bar' is immovable.
public type Bar {
  public init() {}
}

// Note: 'Foo' is not "frozen"; layout is opaque behind module boundary
public type Foo {
  pubic var x: Bar
  public init<E>(initialize_parts: [E](set Bar) -> Void) {
    initialize_parts(&self.x)
  }
}

// In Module B

import A

let f = Foo(initialize_parts: (_ x) { Bar.init(self. &x) })


[OpenSearch] create CloudFormation template for the log publisher stack

Description of changes

Description: AWS ParallelCluster Observability Log Publisher CloudFormation Stack

Tests

Created a CloudFormation stack using this template by providing Cluster LogGroup name and Lambda function ARN but not the LogGroup and Lambda function information for JobInfo. It successfully created the Lambda permission and filter subscription for the Cluster LogGroup and ignored the JobInfo LogGroup (which implied that the Condition worked as expected).

References

Link to related PRs in other packages (i.e. cookbook, node).
Link to documentation useful to understand the changes.

Checklist

[x] Make sure you are pointing to the right branch and add a label in the PR title (i.e. 2.x vs 3.x)
[x] Check all commits' messages are clear, describing what and why vs how.
[x] Make sure to have added unit tests or integration tests to cover the new/modified code.
[x] Check if documentation is impacted by this change.

Please review the guidelines for contributing and Pull Request Instructions.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Maybe not part of this PR, but I think we'll want to add tags to the resources created by this template.

I found that neither AWS::Logs::SubscriptionFilter nor AWS::Lambda::Permission has the "Tags" attribute so unfortunately I can't add tags to them (I would get the AttributeError if I include them).


Suggest new UI components

We're always looking for ways to improve our library of UI components built with Tailwind CSS, and we would love to hear your suggestions for new components that we can add.
If you have an idea for a new component that you think would be useful, please let us know by leaving a comment on this issue. Here are some things to consider when proposing a new component:
What is the purpose of the component? What problem does it solve?
What props or classes would be needed to customize the component?
Are there any existing components that are similar to what you're proposing?
We appreciate your input and look forward to hearing your ideas. Thank you for helping us make our library even better!

In the testimonials section, maybe we can add carousel type testimonials? Just a suggestion.

@Shalini469717  yes that's a great idea. Do you want want to work on it ?

I don't know how to do it using CSS, I made one using Bootstrap before

@Shalini469717  can you share the code on issue #7  so that i can change it to tailwindCss ?

I used the one present in the documentation of bootstrap
Checkout this part of the documentation

In the navbar section, we could add vertical display (there's horizontal one already) and a dropdown menu?

There are very less navbar components. How about adding a couple more?
Like one with a dropdown or a search bar?
Or maybe one with a profile menu dropdown?

Great, @gabrysia694! I plan to include a vertical display and a dropdown menu shortly. Do you happen to have one already?

Thank you @debasish-dutta  for your suggestion! I appreciate your feedback on the current navbar components available. Adding more options, such as a navbar with a dropdown or search bar, or a navbar with a profile menu dropdown, is definitely something worth considering. I'll keep your ideas in mind as I work on expanding our component library.

@lewisushindi  I am interested to contribute to nav bar components like animated nav bar/ bottom nav bar.
If you are already working on them please let me know.

And also how about adding new UI components like progress bars.

@SoundaryaKoutharapu Thank you for showing interest , you can work on the navbar components.

Great, @gabrysia694! I plan to include a vertical display and a dropdown menu shortly. Do you happen to have one already?

I don't have any at the moment but I'll be happy to work on that unless you've already got them ready to add


VPC and RouteTable bootstrap

Connected to #60

Replacing this PR with #372 (includes all this code)


zsh: command not found: ros2

Thanks for the great guidance.
I followed the instructions and installed under the documents folder.
The installation itself seems to be working, but I am unable to run the ros2 command.
The same result was obtained when I launched a new window.
I suspect the paths are not set correctly, but please let me know if there is anything additional that needs to be written to the .zshrc.

I apologize for the delayed response. I have added it to the Qiita article mentioned in the README.


Add D1 support

Shouldn't be too bad since no D2 features are that rooted, I'd love some help for this though

I'm wondering if this is even a reasonable goal. By the time this gets started, D1 will likely not be supported by DM. Of those watching, any input into this?

The stuff using __traits has to be ripped out, leaving out class conversions (which haven't really been started yet...), and the struct conversion stuff has to be refactored to use tupleof. The type wrapper structs using alias this must be refactored, probably by using mixin templates. The incomplete LuaDynamic type, using opDispatch, will also not be supported. And of course, there are minor issues like some use of const and immutable.
But all in all, that's not actually a whole lot of work. So it's reasonable in that it's not hard to do, especially if kept in a branch and not the same codebase, but that is tedious to update, hence I'd like to do it once the project is more complete.
So I guess the question is whether D1 will be relevant by then. But since it's not a whole lot of work, does it really matter? If there's any interest, it's a relatively easy job to do. Personally, I don't have a lot of interest in D1 anymore, but I'd still do the groundwork for a D1 branch if there is any interest by then. And of course, I would gladly accept pull requests if anyone else wants to do the job before I get around to it.

I made the comment in hopes to get any D1 users out of the wood works. I'm thinking most if not all just want it for D2.


Adds hello bar to site by pulling data from CNCF main site

Related issue
In order to increase the reach of our ad campaigns we'd like to run a hello bar on the Glossary site and other CNCF subsites. This hello bar will be controlled from the settings in the CNCF main site. Subsites will pull these settings using an API call.

Closing this in favor of our new approach


Spyder doesn't launch on OsX 13

Description
What steps will reproduce the problem?

simply launching spyder using anaconda navigator

I don't have any time to copy the issue : there's a first message from Spyder/anaconda, it disappears really quickly. Then, a trial to connect to the kernel, a message"new spyder version" and just after spyder closes

afterwards there is a message from apple ("Python quit in an unexpected way", approximativly translated from french)

Also, anaconda navigator doesn't want to upgrade (the message for the new version is always there, even after conda update anaconda-navigator, where some packages are downgraded...)

What is the expected output? What do you see instead?
Please provide any additional information below
File "/Users/frederic/anaconda3/lib/python3.6/site-packages/spyder/plugins/ipythonconsole.py", line 950, in update_working_directory
shellwidget.get_cwd()
File "/Users/frederic/anaconda3/lib/python3.6/site-packages/spyder/widgets/ipythonconsole/shell.py", line 128, in get_cwd
self.silent_exec_method(code)
File "/Users/frederic/anaconda3/lib/python3.6/site-packages/spyder/widgets/ipythonconsole/shell.py", line 340, in silent_exec_method
local_uuid = to_text_string(uuid.uuid1())
File "/Users/frederic/anaconda3/lib/python3.6/uuid.py", line 606, in uuid1
clock_seq_hi_variant, clock_seq_low, node), version=1)
File "/Users/frederic/anaconda3/lib/python3.6/uuid.py", line 168, in init
raise ValueError('field 6 out of range (need a 48-bit value)')
ValueError: field 6 out of range (need a 48-bit value)
Version and main components

Spyder Version: 3.2.6
Python Version: 3.6.3
Qt Versions: 5.6.2, PyQt5 5.6 on Darwin

Dependencies
pyflakes >=0.6.0 :  1.6.0 (OK)
pycodestyle >=2.3:  2.3.1 (OK)
pygments >=2.0   :  2.2.0 (OK)
pandas >=0.13.1  :  0.22.0 (OK)
numpy >=1.7      :  1.14.0 (OK)
sphinx >=0.6.6   :  1.6.6 (OK)
rope >=0.9.4     :  0.10.7 (OK)
jedi >=0.9.0     :  0.11.1 (OK)
psutil >=0.3     :  5.4.3 (OK)
nbconvert >=4.0  :  5.3.1 (OK)
sympy >=0.7.3    :  1.1.1 (OK)
cython >=0.21    :  0.27.3 (OK)
qtconsole >=4.2.0:  4.3.1 (OK)
IPython >=4.0    :  6.2.1 (OK)
pylint >=0.25    :  1.8.2 (OK)

I am not developer but could you try to update Spyder inside Anaconda ?
https://stackoverflow.com/questions/41849718/how-to-update-spyder-on-anaconda

Hi @Frederic-Mandon this is a duplicate of https://github.com/spyder-ide/spyder/issues/6335 you need to update python to be at least 3.6.5 to have the fix (the issue is related with Python 3.6 and Mac OS High Sierra rather than Spyder itself).
Hope this info is useful :)

Hi !
This issue just happened with python 3.9 XD for me ! And never before (and not with 3.6.5)

Oh but the issue says that your Python version is 3.6.3 with Spyder 3.2.6, or did you create a new env with Python 3.9 and the error keeps showing?


 Wondering if you're able to turn that feature back on so it shows the targets again for positions that are already open.

This feature was added yesterday :D https://github.com/markrickert/cryptohopper-dashboard-watchlist/pull/10


Add moreutils package in microscope.

To enable the timestamps in the output.
Related to: https://github.com/cilium/cilium/issues/4566
Signed-off-by: Eloy Coto<EMAIL_ADDRESS>

Superseded by #75


The hints in modal will not show

i add a code in the file "show-hints.js" that: " hints.style.zIndex = 9999999;"  in line 205 to fixed this problem

That's an interaction with your own CSS. I don't think it is a good idea for the library to start getting into a z-index race with other code, so I prefer not to include that in the default style.


Automatic number of columns on grid view?

As the size of each game box seems to be fixed, would it be possible to divide the width of screen size and the games width to make it show a dynamic amount of columns?

This was originally how I had planned to code it, however I decided on the way it's set up currently. I figure there are very few users who are constantly resizing their windows, so giving them a static column count gives them more fine-tuned control (say they want the grid to not take up the entire window, but have margins on the sides. They can do this easily).

Latest commit is the best of both worlds. Added a checkbox you can check to automatically update the grid, or uncheck to adjust column count manually.

Oh, nice, thanks!


Suggestion: Add update functionality, so that Kea can update comics that you've already downloaded

It would be really cool if I could keep my local copy of comics in sync with the online version using Kea, Right now, I think you need to have an empty folder for Kea to copy into, or else there will be problems saving the first CBR file.

I'm not sure what you mean by this. Are you talking about a button you can click to download all newly released chapters of previously downloaded comics?
By the way you can use non-empty folders as a saving directory for downloads (just don't re-download chapters you have already downloaded into that folder).
Perhaps I'm not understanding your suggestion so feel free to correct me

Ah, I guess that it would automatically know which chapters you have downloaded, so if you attempt to download chapter 1 but chapter 1 is already downloaded, it would skip.


Implement a way to track validation blocks during generation

Currently adding validation to the param block of generated resources is done manually. A solution should be implemented similarly to the static corrections,

resolved in mentioned PR


Task Routing

Hello,
I couldn't find anything in the current docs but is it possible to route tasks similar to what Celery does (https://docs.celeryq.dev/en/stable/userguide/routing.html)?
I am specifically working on an application where I have tasks that are lower and higher priority. The lower priority tasks are kicked at a much higher rate than my higher priority tasks and I would like to be able to route the tasks so that the higher priority tasks are not overwhelmed by the lower priority tasks.
Thanks in advance!

https://github.com/taskiq-python/taskiq-aio-pika?tab=readme-ov-file#priorities

https://github.com/taskiq-python/taskiq-aio-pika?tab=readme-ov-file#priorities

This is great! Is there something similarly implemented for Redis?

Redis knows nothing about priorities. If you need to set priority you should use rabbitmq. Celery has redis task priority support, but it is weird, it creates 4 queues: celery, celery1 - 3 as described at https://docs.celeryq.dev/en/stable/userguide/routing.html#redis-message-priorities
It is not real task priorities, not broker server native priorities

Thank you for your advice! Will look into it :)


Frame Shortcuts should superseed Global Shortcuts

Let's make it so that collision is possible.

Tools Shortcuts must superseed frame ones.
Tools > Frames > Global

I think that is a question of collisions. I think we can get away with displaying warning if there is a collision between a frame and a global shortcut (background yellow). Then set the defaults sane and most people will never change them.

Done, will need you to review again @MrTopom
This will be nice when we get to implementing undo for frame specific actions (e.g. when changing the color palette). The global ctr + z will work, but when pressing it in the color palette it will do the undo there.
Now onto defining what the shortcuts should look like for this release. I'm not too happy with them currently: https://github.com/simlu/voxelshop/issues/157

This is basically done. However I think we want to display colliding shortcuts with yellow be. Or do we? Thoughts?

So the edit field will be yellow when editing a shortcut with a soft collision (collision between global and frame shortcut), but the field color is the same for all if not editing.
Merged.


use configured baseUrl instead of app url

Lumen reads the $baseUrl from Laravel\Lumen\Testing\TestCase rather than from the config.
With the change I made, you can set a baseUrl like protected $baseUrl = 'http://localhost/v2'; rather than prefixing every URL with "v2", which is pretty handy.
https://github.com/laravel/lumen-framework/blob/5.6/src/Testing/Concerns/MakesHttpRequests.php#L358

on second thoughts, maybe you want to do it the Laravel way to keep maximum compatibility?
Seems Laravel $baseUrl diverged some time ago and prefers config(['app.url' => 'foo']) in setUp().
Unfortunate that the frameworks do this differently.
https://stackoverflow.com/questions/45381501/change-of-baseurl-for-phpunit-in-laravel-5-4

Hi @stevethomas ,
Sorry for the late reply and thanks for your pull request, I decide to keep them both in the end.


HDDS-6147. Add ability in OM to get limited delta updates

What changes were proposed in this pull request?
In HDDS-1391, the API to get delta updates from OM is added.
In a busy cluster, the delta updates may be very large that could affect the OM's performance while the API is being invoked. This issue happens when Recon is trying to retrieve large delta updates from OM.
This ticket is to add a new API to limit the update counts clients can retrieve each time.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-6147
How was this patch tested?
unit test

@avijayanhwx @adoroszlai @ferhui Could you help to review this PR?

@bharatviswa504 Thanks for the review.
Yes, there will be another ticket for Recon to use this new API.
The performance issue is when Recon trying to get delta updates from OM, the updates are too large which causes the GC of OM, even after OM fully retrieved the result, the error of "org.apache.hadoop.ipc.RemoteException(java.lang.NegativeArraySizeException): java.lang.NegativeArraySizeException" could be thrown, which should be indicating the large response can not be parsed with protobuf.

@symious Thanks for your contribution. @bharatviswa504 Thanks for your review! Merged


feat(authz): first stage of review: proto, sdktypes, sdkservices, testing, cli

will be merged as part of #911


v2.0.x Attu FAQ (attu_faq.md) Doc Update. Not support vectors copied

Is there an existing issue for this?

[X] I have searched the existing issues.

Issue
Attu latest version not support vectors copied.
images:

Suggestion
No response
Anything else?
No response

/assign @nameczz

@xTerry how many dimensions ?

@xTerry hello, we can't reproduce this issue, can you give use more details? Like dimension, attu version, milvus version, collection schema..
Thanks a lot


How to productionize the code | Any recommendation

Can you please help me to productionize the model, here the difficulty I have faced

TF serving with ngnix (recommended)  : Because it store model in pickle file so not sure how to provide pickle file path as model, can you please help me
Flask App with ngnix : It loose graph reference after few calls, random behavior and seems its too hard to provide same offering as TF serving

please help us with sample code

Hi, Thanks for pointing out the issue @jaiswalvineet , I am also having trouble with tensorflow serving of the model. Any help would be appreciated.
Thanks in advance

Regarding question two, I responded to your problem in #120. I hope this fixes your problem. But I am also very interested in running TensorRec in production. Especially in performance optimizations. Currently solution with flask and TensorRec using predict_ranks method gives me a latency of 150-300ms even on larger compute instances on AWS.
Use case is computing a recommendation for a single user and roughly 100 items with 12 item features.
If anybody can recommend some performance tuning tipps for model serving, it would be awesome :)


Can't highlight linkifyed text

Cant seem to be able to highlight text that has been created into a link.   This is a no issue


Updated code style

Description
This PR updates code-style documentation.
Motivation and Context
The rules we use for the existing code style are old and incomplete. Some of them are confusing and others too broad ultimately making the entire code base diversify rather than fixing the problem like its original intention. This PR aims to fix that by providing unified and precise rules whose sole purpose is to solve the code confusion that grew over the years once and for all.
Adjusting code to the new code style helps to make it more readable and easier to understand. The new standard was designed in mind of improving productivity and ease of recognizing parts of code.
@yaichenbaum

cc @gave92 @duke7553

@d2dyno1 could you highlight where the new code rules are in contrast to what we had before?
E.g this one Use camelCase prefixed with '_' for private fields.

Some examples of new code style:

@gave92

This PR is open to feedback, feel free to suggest your ideas 💡

So should we merge this or should we continue to leave this open for discussion @d2dyno1 @yaichenbaum?

@d2dyno1 can you resolve the points @chingucoding brought up?

@d2dyno1

I don't know if it's going to work


Fix documentation bug

In the documentation with the new RMS the citation is not rendering properly

I believe this is just because the } was offset, so I changed that to match the other citations

LGTM!
Thank you for the quick fix :)


qpoases: 3.2.1-4 in 'noetic/distribution.yaml' [bloom]

Increasing version of package(s) in repository qpoases to 3.2.1-4:

upstream repository: https://github.com/Levi-Armstrong/qpOASES.git
release repository: https://github.com/ros-industrial-release/qpoases-release.git
distro file: noetic/distribution.yaml
bloom version: 0.10.0
previous version for package: null

The source repository doesn't agree with the (forked) one listed by bloom. This isn't a problem in the long run, since the one listed in the distribution.yaml will always be used, but it is odd.

The reason for the fork was they tag the things as release/v#.#.# and this cause error when using this tag during the bloom release process. So I forked it and created a new tag that works with bloom. Is there away around this using the bloom?

The upstream source repository isn't a catkin package; it is a standard library. I see you are overlaying the package.xml in the release repository, which is fine.

I followed the third party release tutorial, should I have done something different?

In melodic, we have a qpoases_vendor package that was added in #22226 . I don't really care which one we have, but I don't think we should have both. @Levi-Armstrong can you work with @JWhitleyWork to figure out which one we should have in Noetic?

@JWhitleyWork Do you plan to do a noetic release of qpOASIS? If not, @clalancette should I just rename this to match what is in melodic?

The source repository doesn't agree with the (forked) one listed by bloom. This isn't a problem in the long run, since the one listed in the distribution.yaml will always be used, but it is odd.

The reason for the fork was they tag the things as release/v#.#.# and this cause error when using this tag during the bloom release process. So I forked it and created a new tag that works with bloom. Is there away around this using the bloom?

The upstream source repository isn't a catkin package; it is a standard library. I see you are overlaying the package.xml in the release repository, which is fine.

I followed the third party release tutorial, should I have done something different?

In melodic, we have a qpoases_vendor package that was added in #22226 . I don't really care which one we have, but I don't think we should have both. @Levi-Armstrong can you work with @JWhitleyWork to figure out which one we should have in Noetic?

@JWhitleyWork Do you plan to do a noetic release of qpOASIS? If not, @clalancette should I just rename this to match what is in melodic?

@Levi-Armstrong: https://github.com/ros/rosdistro/pull/27998
I'm happy to continue maintaining this. Please let me know if you have an issue with it.

@Levi-Armstrong: https://github.com/ros/rosdistro/pull/27998
I'm happy to continue maintaining this. Please let me know if you have an issue with it.

@Levi-Armstrong: #27998
I'm happy to continue maintaining this. Please let me know if you have an issue with it.

@JWhitleyWork  Would you be willing to do a noetic and foxy release?

@Levi-Armstrong: #27998
I'm happy to continue maintaining this. Please let me know if you have an issue with it.

@JWhitleyWork  Would you be willing to do a noetic and foxy release?

This has been replaced by #27998

This has been replaced by #27998


Add a menu item as submenu of Project.

Add a menu item as submenu of Project.

This seems a bit of excess clutter, any reason for this over keybinds or the command pallet?

I just thinks this is another way to use it

I really don't want to clutter up all of the menus, I think we'll stick with the command pallet for now. Thanks for your time, though.


Reorganized the config files and split them for periodic and pr

@rakatyal @riknoll @omefire @nikhilkh Can you please review and merge this PR?

LGTM

LGTM!


⚠ Secret Website 3 has degraded performance

In a27f079, Secret Website 3 ($SECRET_WEBSITE_3) experienced degraded performance:

HTTP code: 200
Response time: 2591 ms

Resolved: Secret Website 3 performance has improved in d4e5e1c.


Mix extract doesnt play nice with shared workers

Laravel Mix Version: 1.4.2
Node Version (node -v): 6.4.0
NPM Version (npm -v): 4.5.0
OS: Ubuntu 16.04 64bit

Description:
I use a shared worker in our program, and if mix extract is used anywhere within the mix config, it causes webpackjsonP not defined errors in the shared worker itself.
I figured putting the shared worker in a seperate mix block would cause the vendor to not be extracted for this file, but apparently that is not how mix handles this. https://github.com/KarlJakober/mix-test/blob/master/webpack.mix.js#L6
Im looking for a way to exclude this file specifically from extract so all vendors are bundled properly
Steps To Reproduce:
Clone the following: https://github.com/KarlJakober/mix-test
npm install
npm run dev
node app.js
if you navigate to localhost:8080 and go to chrome://inspect -> shared workers tab -> inspect (in chrome obviously) you will receive the following

Edit: just wanted to add to this, even prepending the manifest.js to the worker will not work as there is no window in a shared worker

@karljakober same problem here

@karljakober I had the same issue and it took a long while to track it down. As I see it, it's not possible to use extract, since all webpack module loading is now in the manifest.js file which then needs to be in the same browser context as every other file.
If you do not use extract then webpack module loading will be duplicated in each file you output to via mix.js. Then it works but is not as optimal for your app, since you will have to invalidate the entire app every time, either a vendor is updated or you app code is updated.
It doesn't matter to laravel-mix, if you chain method calls or put them each on a seperate lines.
I think the best work-around is to have multiple webpack.mix.js files. One for your main app, and one for each standalone file that needs to be a webworker, sharedworker or in my edge-case; a standalone file that needs to be injected into a third party iframe.

Or use mix.copy() if you do not need to transpile the code in your shared worker.


project flow and wireguard setup

We worked on this project for a while and tried to make it fit for all linux
distributions including Raspberry Pi OS. Some changes would improve
accessibility and simplicity of the project. Please find those suggested
changes below:
project flow
Problem:
In the original project, it was necessary to complete multiple
steps to set up the project:

running make install command in project folder
editing the file afterwards (changes wouldn't be applied to the
initramfs otherwise)
finally building the initramfs

In our opinion, running make install this early in the setup process
complicates the entire process, seeing as how it is then necessary to go to
several different locations within the filesystem to successfully edit the
files.
This requires extensive knowledge about the filesystem and the configuration
process.
It also made the debugging a lot harder, because there is no single point
of failure, and there could be multiple locations where you could break
something during the configuration stage.
To summarize, the main problem we see is that right now, the files are
being distributed and final edits need to be made to the various locations
to make it work.
Proposed solution:
We refactored the folder structure inside the project folder and separated
config files from logic files and initramfs files.
├── configs
│   ├── config
│   ├── pre_shared_key
│   └── private_key
├── initramfs
│   ├── hooks
│   └── init-*
├── scripts
│   └── build_wg_setconf.sh
├── package.json
├── Makefile
└── README.md

The idea is to make all the files available in the downloaded project
folder, edit them there and then distribute them all from the project
folder with a single command (No changes in later stages needed). This
would allow multiple configurations to be maintained by simply copying them
into one folder.
With that, we would also apply the rule of three:
download / configure / make install
The steps needed to complete setting up the project would now be:

downloading the repo
configuring the files inside the configs folder
executing the make install command (at this point it is no longer
necessary to edit any further configs - which means no searching through
the filesystem)
executing the make build_initramfs / make build_initramfs_rpi command

In our opinion, this would simplify the setup process and make it easier to
execute for beginners.
wireguard setup
We would also like to address some specific issues that might require
modification. Please find details on these below:
wg set
The command wg set didn't seem to work on the Raspberry Pi, so we employed
the command wg setconf instead of a previously created configuration file.
This config-file is auto-generated by the script after employing the changes
we described above.
wg conf file
As we just mentioned, we worked to simplify some parts of the script. This
lead to the effect that you'd only need to edit a single config-file in case
you made a typo with the keyfiles.
If the system fails during boot and falls back into the initramsfs shell,
this part is important. This facilitates debugging to a great degree.
date compare
We implement a check due to issue #21 in the initramfs/init-premount
script.
You can review our work here:
https://github.com/xancoder/wireguard-initramfs/tree/project-structure
If you like our work, we could make a pull request in your repo to support this
project.

Thank you for all this work, and submitting this as a bug -- please tag pull requests with this bug to keep all the work in one logical issue to track the changes.
Reviewed the proposed changes and they make sense; with the exception that we should allow a migration path for existing installations to move to the new structure automatically (essentially detecting old structure and migrating it in place; which will allow for users to upgrade versions.)

The PR #25 now also contains a migration script and could be ready for intake.
@xancoder would you have the capacity to rebase on top of #19 and integrate the suggested changes from there along the way?
To me it seems helpful to coordinate with @omkhar's work and aid with how those changes could be applied either on top of #25, or the other way around.

The pull request #26 was merged very quickly.
@r-pufky, many thanks for your trust and the review effort.
I'm happy to help, and I really appreciate clean and organized repositories. ;-)
For this reason, just two small notes:
@r-pufky, there is still the orphaned branch presharedkey
@omkhar, perhaps you could find some time to clean up the open pull requests.
With this, I would like to close this issue. Thanks again.


If opc server not reachable, unhandled exception thrown, after long run, causing applicaiton exit abnormally, possibly due to thread competiting on socket.

UAClient Connection using sample code, retry loop forever if not connected, if opc server not reachable, after a long run, applicaiton exit abnormally, despite the entire code is enclosed in a try catch block.
AppDomain.CurrentDomain.UnhandledException finally caught the exception with immediate application exit.
wrote some stacktrace in this exception handler shows:
Exception: An existing connection was forcibly closed by the remote host.
Stacktrace (line no seems not match the source):

/CurrentDomain_UnhandledException at offset 222 in file:line:column :0:0
/UpdateStatusAfterSocketErrorAndThrowException at offset 119 in file:line:column :0:0
/CloseConnection at offset 182 in file:line:column :0:0
/ThreadTarget at offset 323 in file:line:column :0:0

check in source, i guess:
private void ThreadTarget()
{
...
CloseConnection();   // -> this method call may cause Unhandled Thread Exception, possibly due to thead competiting on socket resources.
}

possibly client.Connect()  is not threadsafe, as is what causes my problem.

What version of the library are you using? (and .NET Core / .NET Framework?)
This should be something like 1.0.2X
Ideally you'd also provide a minimal reproducible repository for this issue.

This looks like a SocketException and should be fixed as of https://github.com/nauful/LibUA/commit/8051a828957317357b4a48b3c3b7de9fe28442fa in 1.0.28.

i used 1.0.24,
upgrade to 1.0.28, solved!
thx!


Quick Accent toolbar position with external monitor egpu hub

Microsoft PowerToys version
0.63.0
Running as admin

[X] Yes

Area(s) with issue?
Quick Accent
Steps to reproduce
When triggering Quick Accent toolbar (via long press + tab), certain position settings result in toolbar not displaying at all, partially, and not in their expected locations, when using a laptop and external monitor, and egpu+enclosure. Monitor is 31.5"  16:9 (set as 'main', "show only on [external], laptop display is off), scale set to 150%.
"Top left" displays at top left.  "Left" displays at bottom left. "Bottom left" isn't visible.
"Top center" displays partially at top right. "Center" displays partially at bottom right.
All others do not display. It seems with this hardware + settings config, QA is detecting a larger screen and thus toolbar positions are being effectively pushed off screen (with position anchoring at the top left.)
✔ Expected Behavior
Expected toolbar position to display at center screen when set to "Center", etc.
❌ Actual Behavior
Set to "Center", a truncated toolbar displays at the bottom right corner of the screen (see 'steps' for more location issues)
Other Software
No response

Works great now, thanks!


Redesign docker environment

Issue Description

docker-compose.yml is outdated, leading to broken installation of the project.
As discussed with @systimotic in Gitter room, I'll build relevant development environment for the project.
Tasks to do:

[ ] Rename docker-compose.yml to sample.docker-compose.yml and add docker-compose.yml to .gitignore - this way developers will be able to copy sample file and create their own docker-compose.yml files, giving them flexibility to make changes as they need.

Define docker-compose services:

[ ] database service - mongodbe
[ ] web server - nodejse
[ ] mail system - mailhog

Installation process:

[ ] Follow the project installation steps and make sure it leads to working instance of the project inside Docker environment.
[ ] Automate all steps so just running one docker-compose up -d command should be enough to get working dev environment.
[ ] Document everything under project's installation section.

Thanks for the interest, and great to see that you are working on it, but that said please see https://github.com/freeCodeCamp/freeCodeCamp/issues/16226#issuecomment-353078476 while you work on this, for some of the criteria that we would like to be followed.
Happy contributing!

Hi @raisedadead,
Thanks for the info.
I don't expect any code changes for this issue, here is what I will need to change:

Rename docker-compose.yml to sample.docker-compose.yml;
Add docker-compose.yml to .gitignore;
Add a small sub-section in CONTRIBUTING.md describing docker installation steps.

There is no need to publish images to the registry because I don't expect that we will need any custom built images, just having sample.docker-compose.yml in our repo should be enough.

Perfect. Thanks a lot for taking this up.

@otarza I have been working on this in a pet project, I will give you what I have so far if you wish to continue with it
docker-compose.yml
version: "3"
services:

  fcc-server:
    container_name: fcc-server
    build:
      context: ./
      dockerfile: production.Dockerfile
    ports:
      - "3000:3000"
    environment:
      MONGODB: mongodb://mongo:27017/freecodecamp
    depends_on:
      - mongo-seed
    command: npm start

  mongo-seed:
    container_name: mongo-seed
    build:
      context: ./
      dockerfile: base.Dockerfile
    environment:
      MONGODB: mongodb://mongo:27017/freecodecamp
      PORT: 3456
    depends_on:
      - mongo
    ports:
      - '3456:3456'
    command: node seed

  mongo:
    image: mongo
    container_name: mongo
    command: mongo

base.Dockerfile
FROM node

ADD package.json /tmp/package.json
ADD package-lock.json /tmp/package-lock.json
RUN cd /tmp && npm install
RUN mkdir -p /usr/fcc && cp -a /tmp/node_modules /usr/fcc/

WORKDIR /usr/fcc
COPY . /usr/fcc

EXPOSE 3000

production.Dockerfile
FROM node

ADD package.json /tmp/package.json
ADD package-lock.json /tmp/package-lock.json
RUN cd /tmp && npm install
RUN mkdir -p /usr/fcc && cp -a /tmp/node_modules /usr/fcc/

WORKDIR /usr/fcc
COPY . /usr/fcc

ENV NODE_ENV=production
RUN npm run build

EXPOSE 3000

I can't remember if I got the whole thing working, but i definitely got the db seeding during compose
Use it or not, I don't mind. Just thought you might find it useful

Hi @Bouncey,
Thank you very much, this might be really helpful.

How is this work going guys? This would be so much win in regards to getting people up to speed.

Hi @ojongerius we could use some help in QA of the linked PR.

@raisedadead cool, had a look 😄


REPL integration with conda

Is there a way to have REPL python interpreter using Conda environments?

This is already a feature. See the Conda: Open REPL command.


New Search UI: Persist the search type option (wildcard or regular) within a user session

Is your feature request related to a problem? Please describe.
Currently the default is a wildcard search. If someone changes the search option, the new option selected should persist for the logged in session. This would make it easier if a user would prefer the regular search for example, rather than having to change it back each time they click New search.

Tested.


fix fix default value for special variables

Before:

After:

Proposed changes
Issue Number: close #xxx

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall

run p0


Segregate home / end hotkeys in search

Either highlight first and last results or move the insertion point of query to beginning and end. Do only one function with hotkey. Currently each hotkey does two things.
Child of #211

Duplicate of #168