Aresniia : Weclome to JS : 3 weeks

my fork of module repository

Learning Objectives
1. What is Programming
What is a program? What is a programming language? How do programs and people
fit together?

[x] Data in, Data Out: You understand that computer programs are used to
transform data, and can explain a JS program from this module in terms of
the data that goes in and the data that comes out.
[ ] Three Audiences: You can explain how a single file of code is used to
communicate with 3 different audiences:
[x] Developers: You can explain how code formatting, comments, logs and
variable names make it easier (or harder!) for a developer to understand a
program.
[x] Computers: You can explain how a computer follows your instructions to
store, read and modify data in program memory.
[x] Users: You can explain how the computer creates a dynamic user
experience by following different executions paths depending on user
input.
[x] Tracing Variables: You can complete a trace table for a program that
uses only variables, and can check your work using the "trace" button.

2. Just Enough JavaScript
Go in depth on JavaScript you need to know for writing interactive text-based
programs in the browser. Along the way you will learn how each language feature
works in small programs.

[x] JavaScript Syntax: Given a program, you can identify these parts of
JavaScript syntax:
[x] Primitives
[x] Operators
[x] Identifiers
[x] Keywords
[x] Checks
[ ] Blocks
[x] Function Calls
Listening and Reading: You can read code out loud, and understand your
classmates when they read code to you. You don't need to understand how a
program works to master these learning objectives!
[x] Listening You can exactly re-write a program that a classmate has read
[x] Reading You can read a program out loud and guide your classmates to
re-write exactly the same code without them seeing the program. Every
indentation, semi-colon, comment and spelling in their program must be
identical to yours.
[x] Static vs. Dynamic Analysis: You can explain and use these two ways of
studying a program, each can help you understand different aspects of your
code. To help understand this concept, the options panel in Study Lenses
is organized into static and dynamic study options:
[x] Static: Studying the text in a code file without running it. Some
static study methods are creating a flowchart, analyzing variables,
filling out a trace table, and drawing on code.
[x] Dynamic: Running code and studying the computer's behavior. Some
dynamic study methods are running code and reading console logs, using the
trace button, and stepping through in the debugger or JS Tutor.
[x] Tracing Execution: You can complete a "steps" trace table for all JS
language features in Just Enough JavaScript, and can correct your table
using console output from the "trace" button.
[x] Analyzing Variables: You can list all the variables in a program, and
answer these 5 questions for each variable:

Where is the variable declared?
What is the variable's scope?
Is the variable initialized with a value?
How many times is its value used (read) in the program?
How many times is the variable assigned a new value?
What types are assigned to this variable during the program's execution?

[x] Completing Programs: You can successfully fill in blanks for a program
when the missing words are provided, including distractors.
[x] Translating Pseudo Code: Given a program written in Pseudo Code, you
can translate it to working JavaScript.
[x] Comparing Programs: You can compare two programs with similar code and
explain if they have the same behavior or not. If they do not, you can
explain how they behave differently and why.
[x] Constructing Programs: You can reconstruct a program's lines and
indentation, successfully ignoring distractor lines.

3. Understanding Programs
Learn how to understand a larger programs by finding connections between the
details and the big picture. By the end of this chapter you will know how to
read a new program and do a simple code review.

[x] Stepping Through: You can pause a script in a your browser's debugger,
arrange the debugger, collapse extra panels, and step through a script
written with Just Enough JS. At each point in execution you can make a
prediction of the next line before executing, and can check your
prediction using the scopes panel.
[x] Imperative Programming: You can explain what the Imperative
Programming paradigm is, and can explain how you know the programs in
Welcome to JS are Imperative.
[x] Program Goals: You understand that a full JavaScript program can be
explained as a series of smaller goals, and can write names for the goals
in a simple working program.
[x] Logging: You can tracing specific aspects of a program's execution and
log them to the console.
[x] Tracing Backwards You can trace backwards from a program's output to
it's input.
[x] Naming Variables: You can analyze how a variable is used in a program
and give it two names:

Generic: You can give a generic name to a variable based on how it is
used in the program.
Specific: You can give a specific name to a variable based on how it's
used and the program's domain (the program's specific data and use-case).

[x] Describing Programs: You can read a program and describe it with
comments using to the methodology from /describing-programs:

Zoom Out
Zoom In
Find Connections
Describe Goals

[x] Code Review: Given a working program you can review the code for
clarity, correctness and style.
[x] Same Behavior, Different Code: You can study simple programs with the
same behavior (data in, data out) but different source code and explain
how the differences matter for each audience.

4. Developing Programs
Learn to modify and write larger programs in JavaScript. You'll cover many of
the hidden skills necessary to develop quality software and to work
collaboratively on a code base.

[ ] Linting: You can find and fix simple linting errors in JavaScript
programs.
[ ] Program Life Cycle: You can explain the two phases of a program's life
cycle.

Creation Phase
Execution Phase

[ ] Fixing Errors: You can use the structured comment to describe an error
in your program, and can make several educated guesses at how to fix the
error.
[ ] Fixing Bugs: You can use the structured comment to describe and fix a
bug in small programs.
[ ] Modifying Programs: You can make small changes in a program to change
its behavior without breaking it.
[ ] Refactoring: Given a working program, you can make changes to the code
without changing the program's behavior.
[ ] Writing Programs: Given a description of a program's behavior (user
story + test cases), you can plan goals for the program and write code to
pass the tests.
Reverse Engineering: Given a working program with unreadable code, you
can:
[ ] Give the program a name.
[ ] Describe the program's behavior with a user story, acceptance criteria and
test cases.
[ ] Plan goals for the program.
[ ] Develop your own working program with the exact same behavior.
Imagining Programs: Given an empty page, you can imagine and develop your
own programs using Just Enough JavaScript. This includes:
[ ] A title.
[ ] A description with a user story, acceptance criteria and test cases.
[ ] Commented goals.
[ ] Fully working Code.

Week 1
I Need Help With:
Nothing for now.
What went well?
Understanding basic concepts of JS.
What went less well?
I had some problems with installing the study-lenses.
Lessons Learned
Basic concepts of JS, how programming is working.

Week 2
I Need Help With:
Nothing for  now.
What went well?
Working with variables, loops, conditions. I understood these concepts.
What went less well?
Sometimes it is tricky to understand the logic of programming. I need to learn a lot.
Lessons Learned
We need to learn a lot and everyday.

Week 3
I Need Help With:
Nothing for  now.
What went well?
I can find the errors and bugs in simple code and fix it.
What went less well?
Sometimes it is tricky to understand the logic of programming. I need to learn a lot.
Lessons Learned
We can solve the same goal in different ways in JS, but the solution should be optimized.

@ArseniiaDamaksina  can you add your check-ins for week 1 and 2

We can solve the same goal differently in JS, but the solution should be optimized.
That is what we call same behavior and different implementation, we will study it after inside-js


Docs: Document Blender -> VRChat pipeline

This isn't the first or last time we are importing avatars to VRChat, a process fraught with required incantations and landmines that will destroy your progress re: materials, components, textures, rigging, and so on.
We should go through the full procedure a few times and document the exact steps:

What to install (Unity and Blender)
In what order
Which incantations to click

So that the end result is an avatar published to VRChat (presuming you have an account with that capability).
If there is another guide out there which we can source from that would be a good head start.

These will both be in flux for a while as I contribute to them while working. I want them to be as noob-friendly as possible, and that'll come with time.
https://hackmd.io/pFAGdiUXQhudzkA__MH50A
https://hackmd.io/_NcOHtfjR-aGQ2oegyt_ww
I'm assuming that the markdown format shouldn't be too difficult to bring over to official docs if these are going to have a home there, as well. Will probably need some cleanup on formatting.

Went through these guides this weekend, excellent work! I want to contribute a section about having wearables with the VRoid, as that is what I did this weekend. It's a bit tricky: for jackets you will want to combine meshes in blender, parent with envelope weights, and export the VRM. For hats and accessories, importing then attaching the models to bones in Unity is the way to go.

Data transfers from existing body + corrective smooth / weightpaint smooth-all is probably a simpler way to go about that. Envelope weights can be wildly incorrect if left unchanged by default (envelopes too large / small, etc).
Hats and accessories yes, unless you want to toggle them on/off via a blendshape specifically, then you should add them in Blender and create said blendshape.

The existing docs in https://github.com/webaverse/app/issues/1411#issuecomment-900527868 should be good enough, so I'm going to backburner this for now, but this will likely need revision as VRchat updates, and as we implement more features, we should probably include the how-to on takeout to another platform (eg - auto wearables, weapon equips, etc)
Closing for now.


add vimscript language

Hey, I've been using your crate for a while now, and always wanted to have vimscript (vimL) support. In fact it took me less than half an hour to get it to work. I'm contributing the modifications hoping you like it.
Nice work with the build script anyway :+1:

Thanks, trying to publish an updated version with all grammars updated as well, but currently failing on cargo publish


Accessing library in Robot Framework's RIDE

I'm trying to use the Image Horizon Library on RIDE but it can't seem to access it and its keywords. When trying to import a library, it shows up as red.

What is the error message in RIDE console?

Closing since no new information. Please create a new one if this problem still persist and provide debug informationf rom RIDE's console


Not working in Safari

Thanks for this starter project! I've noticed that it doesn't load in Safari 9.1.1 (11601.6.17) - it does however load in the safari technology preview version. There's no Errors in the console in Safari 9.1.1

If you replace the usages of letwith varit works in Safari - the babel transpiler must not be transpiling correctly somehow?


stash_sqlite: use NativeDatabase.createInBackground to create a store

Is your feature request related to a problem? Please describe.
As sqlite3 is a synchronous C library, accessing the database from the main isolate can cause blocking IO operations
Describe the solution you'd like
drift can spawn a long-running isolate to run SQL statements using NativeDatabase.createInBackground instead of the default NativeDatabase constructor.
Describe alternatives you've considered
None
Additional context
https://drift.simonbinder.eu/docs/advanced-features/isolates/

This seems ok, thank you for the PR. If all goes well I will release today or tomorrow

After looking it to it further I will probably change this a bit once merged to do not affect existing users, i.e. I will make it an opt-in feature the outcome will be the same but with a slightly different API. I will update here once done

Added two new methods:

newSqliteBackgroundVaultStore
newSqliteBackgroundCacheStore

You can use them to create a background isolate and thus achieve the same that you were proposing with your PR. It was released on the 5.1.0 version of stash_sqlite

Great, thank you


if display resolution is scaled, window content is blurred

Describe the bug
if display resolution is scaled, window content is blurred
To Reproduce
Steps to reproduce the behavior:

Go to 'System Preferences'
Click on 'Displays'
Click on 'Resolution: Scaled'
Click on right button with example image
Open app: window content is blurred

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots

Desktop (please complete the following information):

macOS Mojave
10.14.6

Duplicate #1 and #7.


A small question?

in Jpeg compression, the used window size is 7, what if the input image size cannot totally be divided by 7? then some code like
x=x.view(...) will produce bug.

@CrissyHoo  I do not remember the details but probably padding is being applied

@CrissyHoo I do not remember the details but probably padding is being applied

I noticed that in test function there is a param named tile. if we don't use tile, then the lq is tested as a whole. Does that mean if the image size can be divided by window size, then we can choose not to use tile. Or we have to use tile?


GATK: Upgrade to 3.8

And benchmark expected performance changes

Put on hold due to GATK bug. See Trello notes


QLever does not find query plan in JOIN with predicate path

QLever does not find a query plan ("BAD QUERY: Could not find a suitable execution tree ...") for the following query. It requires a join with the result of a predicate path query.  If a star is added after the wdt:P279, it works. It also works, if the / is replaced by ?tmp . ?tmp.
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT * WHERE {
  ?city wdt:P17 wd:Q183 .
  ?city wdt:P31/wdt:P279 wd:Q515 .
}

https://qlever.cs.uni-freiburg.de/wikidata/jczmjR

PS: This was broken by 2c2e4f3aabbf61f4d6ca1f5c6387564c06dda286 ("Simplify the code for computing the seed row in the query planner")


sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: application

with 43b798e
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
    self.dialect.do_execute(
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
    cursor.execute(statement, parameters)
sqlite3.OperationalError: no such table: application

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/bin/flask", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/site-packages/flask/cli.py", line 1050, in main
    cli.main()
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1651, in invoke
    cmd_name, cmd, args = self.resolve_command(ctx, args)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1698, in resolve_command
    cmd = self.get_command(ctx, cmd_name)
  File "/usr/local/lib/python3.9/site-packages/flask/cli.py", line 578, in get_command
    app = info.load_app()
  File "/usr/local/lib/python3.9/site-packages/flask/cli.py", line 312, in load_app
    app = locate_app(import_name, None, raise_if_not_found=False)
  File "/usr/local/lib/python3.9/site-packages/flask/cli.py", line 218, in locate_app
    __import__(module_name)
  File "/app/app.py", line 30, in <module>
    app = create_app(Production(configfiles), configfiles, init_for_operation=False)
  File "/app/webmodules/__init__.py", line 95, in create_app
    g.loutility = Application.query.filter_by(application=app.config['APP_LOUTILITY']).one_or_none()
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 2850, in one_or_none
    return self._iter().one_or_none()
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 2916, in _iter
    result = self.session.execute(
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1714, in execute
    result = conn._execute_20(statement, params or {}, execution_options)
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1705, in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/sql/elements.py", line 334, in _execute_on_connection
    return connection._execute_clauseelement(
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1572, in _execute_clauseelement
    ret = self._execute_context(
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1943, in _execute_context
    self._handle_dbapi_exception(
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 2124, in _handle_dbapi_exception
    util.raise_(
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
    raise exception
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
    self.dialect.do_execute(
  File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: application
[SQL: SELECT application.id AS application_id, application.application AS application_application, application.version_id AS application_version_id
FROM application
WHERE application.application = ?]
[parameters: ('webmodules',)]
(Background on this error at: https://sqlalche.me/e/14/e3q8)

users.cfg needed update for users vs user key names, database name


Divide by file duration if endTime - startTime is zero

When calculating currentTime, there is a division by endTime - startTime which, before playing the audio file, is 0.0. This fix checks for this and sets it to duration if true, as duration is set when loading the file.
fixes #1577.

Looks like the travis failure is unrelated to the PR... Some sort of flaky behaviour. Found this reporting the same issue - https://github.com/Microsoft/azure-pipelines-tasks/issues/8840

Thank you I love the issue fixing PRs the most!


Fixed the bad object check issue

Thanks for the PR and adding tests, but I don't think this is the behavior you'd want? As I mentioned in #2, much like for React elements, I think ommiting null and undefined children completely in serialization would be the correct handling

Sorry for the late reply. I have omitted the null and undefined children. Please take a look.

Hi, sorry, your solutions does not really omit null and undefined children but rather makes them like empty text nodes, which does not serialize the same. I've pushed https://github.com/jeysal/pretty-format-snabbdom/commit/f061ee73f6fd5098583c1a4ad02d886a4e0fd0d4 which should be the proper solution to your issue I think, and I will publish a new version.

Let me know when you publish the new version

Let me know when you publish the new version

1.0.1 should have already been published

Cool, thanks.


Feature/chatbot error handling

Summary by CodeRabbit

New Features

Integrated Google Generative AI for blog content summarization
Added toast notification system for improved user feedback
Introduced AI-powered chat suggestions for blog posts
Enhanced blog chat interface with more context and error handling

Dependencies

Added new libraries for AI generation, toast notifications, and content parsing
Installed Google Generative AI, Radix UI Toast, DOMPurify, and Sonner

Improvements

Updated API endpoint to use Google Generative AI
Added custom scrollbar styles
Improved error handling and user interaction in chat interface

UI/UX Changes

Updated blog post interaction button
Added animated chat suggestions
Implemented more informative toast notifications
Enhanced overall layout and visual presentation of components

Hey @tyaga001 reviewed all the suggestions made by @coderabbitai and implented it along with all the updates.
have a look and let me know if any changes is needed.

Hey @Rahulsoni9321, can you please pull from main and resolve conflitcs

soni9

Hey @nirnejak ,
Resolved all conflicts and made all the changes suggested by coderabbit. Please have a look and let me know if anything else is needed.


Config option to remove "Last updated" text

It would be nice to have a config or metadata option to turn off the last updated text that automatically gets added at the top of pages!

This issue should be fixed in Quartz 4. I'll be closing it for now but please reopen this issue if this persists in the new version.


Hide TileSet's properties from the inspector

All the necessary tools to edit TileSets are available in the TileSet Editor, so there's no need for the properties themselves to appear in the inspector when the resource is selected.
This fixes #29238. As it is now possible to open its file without the editor crashing and without wait time.

Thanks!

Cherry-picked for 3.2.1.

How to do a task, such as modify the texture of a tile without the properties for each tile?

It's much more straightforward to edit a tile in the inspector than in the editor.


Slow Drush

Drush tasks execute time is relatively longer compared to drupal vagrant enviroments that I've been previously using.
my config:
Memory and CPU to use for this VM.
vagrant_memory: 2048
vagrant_cpus: 2
....
php_memory_limit: "256M"
php_realpath_cache_size: "1024K"
How can I make it a bit faster?

@anttimakela - Are you able to give some examples of drush commands that are performing slowly? Most of the time, commands like status, cc, features-revert-all, updatedb, migrate-import, etc. are highly dependent on the actual Drupal site being run.
That being said, I haven't typically encountered any slowness when running sites on this VM vs other VMs, but if you're running the commands locally (on your host) connecting through to the VM, there's a chance that a connection problem is causing a delay...

@geerlingguy cc, updb, en, dis. I've noticed this after clean make-install and several d7 sites at work when we have changed the vagrant enviroments to drupalvm. It's at least 3-5 seconds longer... I run drush inside vagrant.

I took time for drush cc all. approximately 45-50 seconds to complete. Typical amount of modules enabled for basic site (30), no features created. database.mysql size 3.2M
Site and UI-side is running fast.

@anttimakela - Can you run drush --version to verify what version you're running? It's possible that if you're running a 7.x Drush release (e.g. if you have drush_version: master in your config.yml), there might be a performance problem in the master/latest release.
Try rebuilding the VM with drush_version: 6.6.0 or drush_version: 6.5.0 (for an older stable release), and see if that makes a difference.

@geerlingguy , Drush version:  7.0-dev. I try 6 and comment here the changes.

@geerlingguy
vagrant@site:/vagrant/drupal$ drush status
Drupal version                  :  7.35
Site URI                        :  http://default
Database driver                 :  mysql
Database username               :  drupal
Database name                   :  drupal
Database                        :  Connected
Drupal bootstrap                :  Successful
Drupal user                     :  Anonyymi
Default theme                   :  theme
Administration theme            :  seven
PHP executable                  :  /usr/bin/php
PHP configuration               :  /etc/php5/cli/php.ini
PHP OS                          :  Linux
Drush version                   :  6.6.0
Drush configuration             :
Drush alias files               :
Drupal root                     :  /vagrant/drupal
Site path                       :  sites/default
File directory path             :  sites/default/files
Temporary file directory path   :  sites/default/files/tmp
vagrant@site:/vagrant/drupal$ drush cc all
all' cache was cleared.                                                                                [success]
vagrant@site:/vagrant/drupal$
45 seconds, no improvement in performance.

@anttimakela - Interesting. Can you also let me know what is the type of synced folder in config.yml, and also what kind of computer you're using? (Windows, Mac, basic specs, etc.). I'll do a little benchmarking to see if I can find anything obvious.

@geerlingguy, type: nfs
##Home
Model: MacBook Pro
ProIntel Core i5
2,53 GHz
Processors: 1
Cores: 2
Ram: 8 Gt
Prosessoriväylän nopeus: 4.8 Gb/s
Samsung SSD 120Gb
Work
iMac
21.5-inch: 1.4GHz
Specifications
1.4GHz dual-core Intel Core i5
Turbo Boost up to 2.7GHz
8GB memory
500GB hard drive1
Intel HD Graphics 5000

@anttimakela - In my own testing (comparing with drush times in a native Drupal install, a Drupal install on DigitalOcean, and one in Drupal VM), drush times seem to be very close to the same. I wonder if maybe that particular site has, as part of its cache clearing operation, something that's calling a blocking network service or something like that (the length of time points to either a timeout, or just tons of caches being rebuilt, but I suspect the former).
I'm going to close this as not reproducible (since I can't see the site where you're encountering these issues); please try installing the default included Drupal 8 or a Drupal 7 site using the makefile, and see if you are able to reproduce these slow drush operations.
Also, please try comparing some other drush operations like drush migrate-status, drush pm-list, drush pm-enable [some-module], and see if you can get a better performance comparison. Clearing caches is one operation that can have drastic differences depending on the exact modules you're running and what they're doing.

@geerlingguy, Drush version:  6.2.0.
drush cc all 18 sec. (before 45 sec.)
drush status 4 sec. (before 14 sec.)
This fixed it for me.

@anttimakela - Very strange. It seems like maybe drush has some sort of performance bug with later/newer versions in that case. I've been using 6.2.0 and 6.5.0 on most of my live infrastructure, and haven't noticed these performance issues.
I would suggest if you encounter any further issues, try reporting them upstream to the drush-ops project: https://github.com/drush-ops/drush

Just to let you know, that if the NFS shares with Vagrant are still too slow for you, you can do the contrary : instead of installing a NFS server on your host machine, you can install it on the VM guest : http://guillaumeduveau.com/en/drupal-lightning-fast-synced-folders-in-vagrant-virtualbox/

@guix77 - Definitely an option! There's also gatling-rsync: https://github.com/smerrill/vagrant-gatling-rsync

Well I got the idea from your blog article :) Mollom won't let me add the comment. Thanks again !

Thanks for the updates. I recently bought new macbook pro (Mid 2015, 2,5 GHz Intel Core i7, 16 GB 1600 MHz DDR3) and haven't had any performance issues since. Using mainly Drush 8.x now.

@guix77 - Ha, well, sometimes Mollom is a bit of a pain :/


Server.js failing to start

can't get the example to run.
npm install
tsd reinstall
npm start

and I'm getting:
><EMAIL_ADDRESS>start /Users/xavi/Projects/ng2-redux/examples/counter
> node server.js

events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE <IP_ADDRESS>:3000
    at Object.exports._errnoException (util.js:874:11)
    at exports._exceptionWithHostPort (util.js:897:20)
    at Server._listen2 (net.js:1234:14)
    at listen (net.js:1270:10)
    at net.js:1379:9
    at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:63:16)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:82:10)

npm ERR! Darwin 15.0.0
npm ERR! argv "/Users/xavi/.nvm/versions/node/v4.2.2/bin/node" "/Users/xavi/.nvm/versions/node/v4.2.2/bin/npm" "start"
npm ERR! node v4.2.2
npm ERR! npm  v2.14.7
npm ERR! code ELIFECYCLE
npm ERR<EMAIL_ADDRESS>start: `node server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>start script 'node server.js'.
npm ERR! This is most likely a problem with the counter-redux package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node server.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls counter-redux
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/xavi/Projects/ng2-redux/examples/counter/npm-debug.log

what am i doing wrong?

'EADDRINUSE' means that your port 3000 is already in use, either by another instance of server.js or something else (did you launch it twice in two terminals for example?).
I'm closing this issue as it is most likely not related to ng2-redux.


Rename examples folder and move into the new MRTK folder hierarchy

This change takes #5483 into account and adds the Examples folder to the MRTK folder hierarchy.
As with the previous change (#7479), the MixedRealityToolkit.Generated folder is not being changed.
Packaging has been updated to with the new folder location.
All tests were run prior to opening this PR. NuGet packaging scripts have been run and confirmed successful package building.


Unhandable information found in DoHome : "incidentDetection"

Hallo, after i added the ecovacs adapter to iobroker, i will get this los entry

tado.0
2020-10-01 21:32:14.787
error
(767) Send this info to developer !!! { Unhandable information found in DoHome : "incidentDetection" with value : {"supported":true,"enabled":false}

Would be cool to get some meta data of your system like the installed adapter version of Tado-adapter.
I guess you are using adapter version less than 0.2.0.
Please install this version and verify the result.

Good morning,
i use the version 0.2.0-beta.1 of the tado adapter.
i think the error would come after i installed the recommend packages from the mrbungle64/ioBroker.ecovacs-deebot github-side https://github.com/mrbungle64/ioBroker.ecovacs-deebot https://github.com/mrbungle64/ioBroker.ecovacs-deebot
all my adapters are on the latest available version.
i’m new in iobroker, where can i get the meta data???
my iobroker run in an docker container on my openmediavault intsallation on my qnap 509
let me know if you need more information.
the tado adatper works fine in spite of the error… thank you for the great job!

Am 01.10.2020 um 22:00 schrieb HGlab<EMAIL_ADDRESS>Would be cool to get some meta data of your system like the installed adapter version of Tado-adapter.
I guess you are using adapter version less than 0.2.0.
Please install this version and verify the result.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/iobroker-community-adapters/ioBroker.tado/issues/72#issuecomment-702365354, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARHBTBXR4ENECY3B77JVBS3SITNUFANCNFSM4SA3D7XQ.

as stated..
Please update to version 0.2.0

This command is Bad
sudo npm install canvas --unsafe-perm=true
Enter  console,
stop iobroker
and the  run
iobroker fix
Endige the proper Adapter Version is installer it Must be 0.2.0 and Not 0.2.0-xxx.xx

thanks after i install 0.2.0 the error would be fine.
the adapter at iobroker doesn't show me 0.2.0, i have to uninstall it und get it new from github.
i could not stop iobroker
root@nas:/opt/iobroker# iobroker stop
iobroker controller daemon is not running
root@nas:/opt/iobroker# iobroker status
iobroker is running on this host.
At least one iobroker host is running.
Objects type: file
States  type: file
root@nas:/opt/iobroker# systemctl stop iobroker
bash: systemctl: Kommando nicht gefunden.

Root@nas ? Do you use docker or what is your base system?

Yes I use docker for iobroker, and docker run on openmedivault on my nas.
I use the terminal in the iobroker portainer

Am 02.10.2020 um 09:53 schrieb Dutchman<EMAIL_ADDRESS>
Root@nas ? Do you use docker or what is your base system?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Yes I use docker for iobroker, and docker run on openmedivault on my nas. I use the terminal in the iobroker portainer
…

you should follow the docker guide than and use
pkill io
instead of iobroker stop

thank you, i'm not that good at linux.
i fixed it with your help!!


bump version to v0.5.2

Related to #6434

We might want to merge #6140 before the release. Currently, Mixtral doesn't work on my machine because of the Triton cache issue and the PR fixes the bug.

The link for the soft tuned prompts pr is wrong in the intro: https://github.com/vllm-project/vllm/releases/tag/v0.5.2


Edit hdinsight-python.md

Edit complete. Sent the following to Larry:
Line 159: Both links are 404.
Line 171: Writing out WASB. Do you have a better way?
Line 203: You use the term “statements.” I have been using “code.” Go with what you want, but look for consistency.
Line 221: Link is 404
Line 242: Link is 404…seems to be a pattern here. Could be my connection?
Line 313: Your table is not rendering correctly.
Lines 329-333: Links are 404

Hi @ClarityQueen, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!

It looks like you're working at Microsoft (v-diree). If you're full-time, we DON'T require a contribution license agreement.

If you are a vendor, or work for Microsoft Open Technologies, DO please sign the electronic contribution license agreement. It will take 2 minutes and there's no faxing! https://cla.azure.com.

TTYL, AZPRBOT;

@ClarityQueen
Deprecated content that needs to be removed from ACOM.


Interface interception doesn't work if the interface is implemented by a base type of the implementing type.

The following code illustrates the problem:
public interface ITestCalls
{
    void Test1();
}

public abstract class BaseTestCalls : ITestCalls
{
    public void Test()
    {
    }
}

[Tag("track")]
public class TrackTestCalls : BaseTestCalls
{
}

[Tag("track1")]
public class TrackTestCalls1 : ITestCalls
{
    public void Test()
    {
    }
}

static void Main(string[] args)
{
    IUnityContainer container = new UnityContainer();

    container.AddNewExtension<Interception>();

    container
        .Configure<Interception>()
        .AddPolicy("track")
        .AddMatchingRule<TagAttributeMatchingRule>(
                            new InjectionConstructor("track", false))
        .AddCallHandler<TrackCallHandler>(
                            new ContainerControlledLifetimeManager())
        ;

    container
        .RegisterType<ITestCalls, TrackTestCalls>(
            "track",
            new InterceptionBehavior<PolicyInjectionBehavior>(),
            new Interceptor<TransparentProxyInterceptor>())

        .RegisterType<ITestCalls, TrackTestCalls1>(
            "track1",
            new InterceptionBehavior<PolicyInjectionBehavior>(),
            new Interceptor<TransparentProxyInterceptor>())
        ;

    var test = container.Resolve<ITestCalls>("track");

    test.Test();

    var test1 = container.Resolve<ITestCalls>("track1");

    test1.Test();
}

test.Test() does not exhibit the decorated behavior and the object test is not supplied with a pipeline. However test1.Test() behaves as expected and test1 has the pipeline.
I could not find this being documented anywhere.

Unity documentation needs some work, would you like to improve it?

I don't think that this is a documentation problem. IMO, this is a bug that needs fixing. In the code above both test and test1 should have been injected with the decorator TrackCallHandler.

I agree. I did not have a chance to work on interception much. The code is what original Unity implemented. I will try to improve it when v6 is released.


Remove all mentions of deprecated functions in code samples

Any mention of deprecated functions (like Mesh.Create???) should be replaced with the new function.

List of playground to process:
https://playground.babylonjs.com/#JA1ND3#6
https://playground.babylonjs.com/#FH3FM2#4
https://playground.babylonjs.com/#8GY6J8#198
https://playground.babylonjs.com/#N96NXC
https://playground.babylonjs.com/#JA1ND3#63
https://playground.babylonjs.com/#X6MQ1L
https://playground.babylonjs.com/#RA18GJ
https://playground.babylonjs.com/#ZT8BKT#2
https://playground.babylonjs.com/#7QCYPB
https://playground.babylonjs.com/#9CLJEF
https://playground.babylonjs.com/#YAWBMY
https://playground.babylonjs.com/#TAFSN0#230
https://playground.babylonjs.com/#5MV04
https://playground.babylonjs.com/#YPABS1
https://playground.babylonjs.com/#G9VPHQ
https://playground.babylonjs.com/#TAFSN0#323
https://playground.babylonjs.com/#LG3GS#107
https://playground.babylonjs.com/#JA1ND3#40
https://playground.babylonjs.com/#JA1ND3#18
https://playground.babylonjs.com/#SRV2A0
https://playground.babylonjs.com/#RC2IAH#1
https://playground.babylonjs.com/#DGEP8N
https://playground.babylonjs.com/#M7MYT8#11
https://playground.babylonjs.com/#VIGXA3#7
https://playground.babylonjs.com/#PCY1J#4
https://playground.babylonjs.com/#KST50Y
https://playground.babylonjs.com/#76U9TK
https://playground.babylonjs.com/#DEYAQ5#47
https://playground.babylonjs.com/#8L50Q3#1
https://playground.babylonjs.com/#1CL0BO
https://playground.babylonjs.com/#5G9MC5
https://playground.babylonjs.com/#FH3FM2#5
https://playground.babylonjs.com/#GG06BQ#97
https://playground.babylonjs.com/#K41IJ
https://playground.babylonjs.com/#G3Q7GR#1
https://playground.babylonjs.com/#24C4KC#17
https://playground.babylonjs.com/#8GY6J8#199
https://playground.babylonjs.com/#5A4TP5
https://playground.babylonjs.com/#VS5XS7#0
https://playground.babylonjs.com/#C21DGD#2
https://playground.babylonjs.com/#PPM311#63
https://playground.babylonjs.com/#ZHYP5K
https://playground.babylonjs.com/#FH3FM2#10
https://playground.babylonjs.com/#JA1ND3#48
https://playground.babylonjs.com/#ULACCM#2
https://playground.babylonjs.com/#1H7L5C#37
https://playground.babylonjs.com/#5Y2GIC#39
https://playground.babylonjs.com/#KJ8ZRZ#2
https://playground.babylonjs.com/#YCCU8U
https://playground.babylonjs.com/#3B5W22#29
https://playground.babylonjs.com/#FAXLY2
https://playground.babylonjs.com/#7HH1UH

Still to be updated
https://playground.babylonjs.com/#JA1ND3#6
https://playground.babylonjs.com/#8GY6J8#198
https://playground.babylonjs.com/#JA1ND3#63
https://playground.babylonjs.com/#X6MQ1L
https://playground.babylonjs.com/#RA18GJ
https://playground.babylonjs.com/#7QCYPB
https://playground.babylonjs.com/#9CLJEF
https://playground.babylonjs.com/#YAWBMY
https://playground.babylonjs.com/#TAFSN0#230
https://playground.babylonjs.com/#5MV04
https://playground.babylonjs.com/#G9VPHQ
https://playground.babylonjs.com/#TAFSN0#323
https://playground.babylonjs.com/#JA1ND3#40
https://playground.babylonjs.com/#JA1ND3#18
https://playground.babylonjs.com/#SRV2A0
https://playground.babylonjs.com/#DGEP8N
https://playground.babylonjs.com/#M7MYT8#11
https://playground.babylonjs.com/#VIGXA3#7
https://playground.babylonjs.com/#KST50Y
https://playground.babylonjs.com/#76U9TK
https://playground.babylonjs.com/#DEYAQ5#47
https://playground.babylonjs.com/#5G9MC5
https://playground.babylonjs.com/#GG06BQ#97
https://playground.babylonjs.com/#G3Q7GR#1
https://playground.babylonjs.com/#8GY6J8#199
https://playground.babylonjs.com/#5A4TP5
https://playground.babylonjs.com/#C21DGD#2
https://playground.babylonjs.com/#ZHYP5K
https://playground.babylonjs.com/#JA1ND3#48
https://playground.babylonjs.com/#5Y2GIC#39
https://playground.babylonjs.com/#KJ8ZRZ#2
https://playground.babylonjs.com/#YCCU8U
https://playground.babylonjs.com/#3B5W22#29
https://playground.babylonjs.com/#FAXLY2


Some styles are not applied

I am working on a (very very old) webpage which has styles set as attributes on the <body> tag, like:
<body bgcolor="#ffffff" ...>

And these are ignored, so the page doesn't really look the way it will in a browser.

There is no way to change body background property, nither through bgcolor, nor through css background property. They are just ignored.

This is because the editor has a default transparent background. I can change the css to target the html tag if that helps people?

I know this have been posted a while ago but as it is not marked closed or resolved, I thought I add my concern here rather than a new issue for a similar issue.
I just installed this and the HTML preview is not an accurate representation of the code which unfortunately makes it hard to rely on. One of the most obvious issues is the background colors and a few other things not being applied, despite being inside a linked CSS file.
Any way to update the rendering to actually produce the results faithfully to the HTML code AND the accompanying CSS files. For quick and basic stuff, it does the job but not enough to rely on as a true representation of what it looks like in the browser.
Thanks in advance, and a great start, well done.

Setting the bgcolor is now possible, the default background color of body is transparent in v0.2.4


Bump open props to latest version.

Open Props added some new variables, like $size-px-1.

Thanks! Tested it out and the new variables are showing up ok. 👍


IdleStateHandler may be changed when proxy to broker using the same connection

As #588 has introduced custom protocol between proxy and broker, the IdleStateHandler may be changed every time when there is connect command, because the channel is shared.

Closed by #674 .


add trace id to error response messages

Signed-off-by: lukelee-sl<EMAIL_ADDRESS>Description:
Add trace id to error response messages.
There is no obvious place to return the trace id when the call is successful without changing the schema.
Related issue(s):
Fixes #431
Notes for reviewer:
Checklist

[ ] Documented (Code comments, README, etc.)
[ ] Tested (unit, integration, etc.)

Codecov Report

Merging #473 (4f22a04) into main (512e1b8) will not change coverage.
The diff coverage is n/a.

:exclamation: Current head 4f22a04 differs from pull request most recent head 61551a4. Consider uploading reports for the commit 61551a4 to get more accurate results

@@           Coverage Diff           @@
##             main     #473   +/-   ##
=======================================
  Coverage   76.46%   76.46%
=======================================
  Files          12       12
  Lines         922      922
  Branches      143      143
=======================================
  Hits          705      705
  Misses        165      165
  Partials       52       52

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


ValueError: numpy.ndarray size changed when calling import hdbscan

I recently installed the clusters plotter and ran into an issue when running hdbscan. When I run the clustering on a set of measurements (e.g., based on blobs.gif), I receive this error:
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
Here's a screenshot of the setup

and the complete traceback:
File e:\biapol\projects\napari-clusters-plotter\napari_clusters_plotter\_clustering.py:274, in ClusteringWidget.run(self=<napari_clusters_plotter._clustering.ClusteringWidget object>, labels_layer=<Labels layer 'labels'>, selected_measurements_list=['min_intensity', 'max_intensity', 'sum_intensity', 'area', 'mean_intensity', 'centroid_x', 'centroid_y', 'centroid_z', 'mean_distance_to_centroid', 'standard_deviation_intensity', 'max_distance_to_centroid', 'mean_max_distance_to_centroid_ratio'], selected_method='HDBSCAN', num_clusters=2, num_iterations=300, standardize=False, min_cluster_size=5, min_nr_samples=5)
    271     add_column_to_layer_tabular_data(labels_layer, "KMEANS_CLUSTER_ID_SCALER_" + str(standardize), y_pred)
    273 elif selected_method == "HDBSCAN":
--> 274     y_pred = hdbscan_clustering(standardize, selected_properties, min_cluster_size, min_nr_samples)
        selected_properties =     min_intensity  max_intensity  ...  max_distance_to_centroid  mean_max_distance_to_centroid_ratio
0           152.0          232.0  ...                 19.075121                             2.262548
1           152.0          224.0  ...                  9.869590                             1.911683
2           152.0          248.0  ...                 16.878197                             1.795291
3           152.0          248.0  ...                 12.767069                             1.674100
4           152.0          248.0  ...                 15.421144                             1.845683
..            ...            ...  ...                       ...                                  ...
57          152.0          224.0  ...                  8.849086                             1.716192
58          152.0          216.0  ...                 10.764353                             2.296404
59          152.0          248.0  ...                  8.658107                             2.178612
60          152.0          248.0  ...                  6.827476                             2.224879
61          152.0          224.0  ...                  7.477417                             2.171838

[62 rows x 12 columns]
        standardize = False
        min_cluster_size = 5
        min_nr_samples = 5
    275     print("HDBSCAN predictions finished.")
    276     # write result back to features/properties of the labels layer

File e:\biapol\projects\napari-clusters-plotter\napari_clusters_plotter\_clustering.py:305, in hdbscan_clustering(standardize=False, measurements=    min_intensity  max_intensity  ...  max_dista...                 2.171838

[62 rows x 12 columns], min_cluster_size=5, min_samples=5)
    304 def hdbscan_clustering(standardize, measurements, min_cluster_size, min_samples):
--> 305     import hdbscan
    306     print("HDBSCAN predictions started (standardize: " + str(standardize) + ")...")
    308     clustering_hdbscan = hdbscan.HDBSCAN(min_cluster_size=min_cluster_size, min_samples=min_samples)

File ~\anaconda3\envs\napari_clusters\lib\site-packages\hdbscan\__init__.py:1, in <module>
----> 1 from .hdbscan_ import HDBSCAN, hdbscan
      2 from .robust_single_linkage_ import RobustSingleLinkage, robust_single_linkage
      3 from .validity import validity_index

File ~\anaconda3\envs\napari_clusters\lib\site-packages\hdbscan\hdbscan_.py:21, in <module>
     17 from joblib.parallel import cpu_count
     19 from scipy.sparse import csgraph
---> 21 from ._hdbscan_linkage import (single_linkage,
     22                                mst_linkage_core,
     23                                mst_linkage_core_vector,
     24                                label)
     25 from ._hdbscan_tree import (condense_tree,
     26                             compute_stability,
     27                             get_clusters,
     28                             outlier_scores)
     29 from ._hdbscan_reachability import (mutual_reachability,
     30                                     sparse_mutual_reachability)

File hdbscan/_hdbscan_linkage.pyx:1, in init hdbscan._hdbscan_linkage()

ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

I looked up the error and it probably boils down to this issue. I tried a few of the suggestions from this thread (e.g., rolling numpy back to 1.20.5), but couldn't solve the issue. I currently have numpy 1.21.5 installed.
Edit: It seems that will be solved once the new release of hdbscan is out (apparently it works when installing directly from hdbscan master branch), but I haven't verified this.

Hi, Johannes @jo-mueller, thanks for reporting! So I just tried to reproduce the error on two laptops but I wasn't successful, the plugin works fine on both machines. But with one laptop, which is quite old, it's a different story since I am creating there an environment with a lower python version (3.8), and lower pyopencl version (2020.1). While with my laptop I always need to install hdbscan via conda prior to installing the plugin, because it always fails to build wheels for hdbscan. I see installing hdbscan via conda was also mentioned as a solution in the issue you linked, which might be why I am not seeing this error. Have you tried installing hdbscan that way?
These are the exact steps I do in case it might be helpful:
conda create --name ncp-env python=3.9
conda install -c conda-forge pyopencl
python -m pip install "napari[all]"
conda install -c conda-forge hdbscan
pip install napari-clusters-plotter
I also have numpy 1.21.5 installed in the environment, hdbscan=0.8.27, numba=0.55.0

Hi Laura @lazigu ,
thanks for the quick fix, this solves it :) I'll make a small PR to add this to the troubleshooting.


Setup Github Actions to run tests on PRs

Docs: https://docs.github.com/en/free-pro-team@latest/actions

Fixed in 67c317e741b6a91dcde1d69a51ee8c180022cf20


is usgov supported

We just ran into a bug in our USGov deployment and realized it was stemming from the wrong url call to a storage table in USGov. Any clue if there is support for other DC types in this module?

Hi @chughesvf , yes, sovereign clouds are supported but not directly from Get-AzTableTable cmdlet. You need to use the following to get the table reference (note that in this case you need to create the table beforehand).
$SaContext = (Get-AzStorageAccount -ResourceGroupName $resourceGroup -Name $storageAccount).Context
$table = (Get-AzStorageTable -Name $tableName -Context $saContext).CloudTable

can be closed as per above comment.


chore: release main

:robot: I have created a release beep boop
ui5-cc-excelupload: 0.16.4
0.16.4 (2023-05-09)
Bug Fixes

check on mandatory fields (#192) (05dbcc9)

ui5-cc-excelupload-button: 0.4.4
Dependencies

The following workspace dependencies were updated

dependencies

ui5-cc-excelupload bumped from 0.16.3 to 0.16.4

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/marianfoo/ui5-cc-excelUpload/releases/tag/ui5-cc-excelupload-v0.16.4 :sunflower:

:robot: Release is at https://github.com/marianfoo/ui5-cc-excelUpload/releases/tag/ui5-cc-excelupload-button-v0.4.4 :sunflower:


OCM-9967 | ci: fix id:73731,75150,73492

$ ginkgo --focus "(73492|75150)" tests/e2e/
Ginkgo detected a version mismatch between the Ginkgo CLI and the version of Ginkgo imported by your packages:
Ginkgo CLI Version:
2.14.0
Mismatched package versions found:
2.17.1 used by e2e
Ginkgo will continue to attempt to run but you may see errors (including flag
parsing errors) and should either update your go.mod or your version of the
Ginkgo CLI to match.
To install the matching version of the CLI run
go install github.com/onsi/ginkgo/v2/ginkgo
from a path that contains a go.mod file.  Alternatively you can use
go run github.com/onsi/ginkgo/v2/ginkgo
from a path that contains a go.mod file to invoke the matching version of the
Ginkgo CLI.
If you are attempting to test multiple packages that each have a different
version of the Ginkgo library with a single Ginkgo CLI that is currently
unsupported.
Running Suite: ROSA CLI e2e tests suite - /home/aaraj/ocm-forked-code/rosa/tests/e2e
Random Seed:<PHONE_NUMBER>
Will run 2 of 160 specs
SSSSSSSSSSSSSSSSSSSSS•SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS•SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
Ran 2 of 160 Specs in 80.391 seconds
SUCCESS! -- 2 Passed | 0 Failed | 0 Pending | 158 Skipped
PASS
Ginkgo ran 1 suite in 1m28.00699366s
Test Suite Passed

/test all


Many golint errors reported for torus packages

Filtering out protobuf-generated code:
$ golint ./... | grep -v ".pb.go" | wc -l
300

While golint isn't always perfect, it makes godoc documentation infinitely more useful, and helps keep things tidy and in-line with the community's standards.

$ golint ./... | grep -v '\.pb\.go' | grep 'should have comment or be unexported' | wc -l
261

:)

I personally disagree.  Comments on exported types are very useful for those who are not familiar with a package's API, and they don't take that much effort to write.
Imagine trying to use the standard library without documentation comments.  It sure wouldn't be as easy as it is today.

Sorry, I'm not arguing that it's good to not have code comments. Yes, the source should have a lot more comments. I was amused by how many errors stem from the lack of them.

My apologies, I misunderstood your reply.  Glad we are on the same page.


Exported variable 'x' has or is using name 'y' from external module 'z' but cannot be named

Bug Report
🔎 Search Terms

exported
external
4.2
symbol

🕗 Version & Regression Information
This error started popping up in 4.2.2. We rolled back all our typescript versions to 4.1.5. I suspect it might be a regression, but I don't understand the error well enough to be certain.

This changed between versions 4.1.5 and 4.2.2

⏯ Playground Link
So, this really sucks but I've been trying to create a minimal version of this issue, but because this crosses multiple packages all my efforts so far were fruitless. I control all the relevant packages though
💻 Code
This is a simplified version of the code that doesn't trigger this bug unfortunately.
The following is a basic middleware framework:
const middlewareCall = Symbol('middleware-call');
export { middlewareCall };

/**
 * A function that can act as a middleware.
 */
type MiddlewareFunction = (
  ctx: number,
  next: () => Promise<void>
) => Promise<void> | void;

/**
 * An object that exposes a symbol can also function as a middleware
  */
type MiddlewareObject = {
  [middlewareCall]: MiddlewareFunction
};

type Middleware = MiddlewareFunction | MiddlewareObject;

export class App {

  use(mw: Middleware[]) {

    console.log(mw);

  }

}

An application might use this as such:
import routes from './c';
import { App } from './a';

const app = new App();

app.use(routes);

The routes file is where the error occurs:
import Controller from './d';

export default [
  new Controller()
];

Lastly, the controller:
import { middlewareCall } from './a';

export default class Controller {

  [middlewareCall](ctx: number, next: () => Promise<void>) {

  }
}

I know this is a lot. I would hate to get this bug report. The issue with the above is indeed that it doesn't reproduce the issue. To see it for yourself, run tsc on the following git repo (after upgrading to 4.2.2):
https://github.com/curveball/a12n-server
🙁 Actual behavior
src/routes.ts:37:7 - error TS4023: Exported variable 'routes' has or is using name 'middlewareCall' from external module "/home/evert/src/curveball/a12n-server/node_modules/@curveball/core/dist/application" but cannot be named.

37 const routes = [
         ~~~~~~

Found 1 error.
🙂 Expected behavior
No errors

This is fixed in Typecript 4.2.3


fix: Pending references preventing accepting application

Previous logic dictated that if a reference was under pending, it would try to accept when the application is accepted. However, a reference can only be accepted if it has been submitted.
This logic has been fixed to operate correctly (accept if submitted, cancel if not submitted)

:tada: This PR is included in version 6.30.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Is version 3.1.0 released?

I'm trying to sync my gradle file but im having an error.

This version is not released yet, it's waiting for #88. It should be released once the PR passes ~ today/tomorrow


AMP Support

Hi, I wonder if we could add in AMP support now that torchsparse supports mixed precision. I think it would just require addition of GradScaler and an amp.autocast block.

This is not supposed to be natively supported in TorchPack as the philosophy of TorchPack is to not interfere with the actual forward/backward pass. Using AMP should only add a few lines to Trainer, which you can refer to https://github.com/zhijian-liu/torchpack/blob/master/examples/image-classification/core/trainers.py#L34-L44.

I'm sorry, I did not read the _run_step close enough. Thanks!


blank window on data urls Windows

What OS are you using (uname -a, or Windows version)?
Windows
MSYS_NT-10.0-17763 glr-win2019 3.1.7-340.x86_64 2021-03-26 22:17 UTC x86_64 Msys

What programming language are you using (C/C++/Go/Rust)?
C
After I wasn't successful compiling with MSYS2, I tried on native windows and installed the Visual Studio C++ build tools:
Microsoft (R) C/C++ Optimizing Compiler Version 19.31.31105 for x86

I downloaded the webview2.h from https://github.com/webview/webview/blob/master/script/WebView2.h and used the following commands to compile:
cl /c webview.cc /std:c++17 /EHsc /Fo"obj\webview.obj"
cl /c main.c /Fo"obj\main.obj"
link obj\main.obj obj\webview.obj WebView2Loader.dll.lib /OUT:"bin\webview-test.exe"

That worked fine.
What did you expect to see and what you saw instead?
First: Displaying (external) webpages works as expected, e.g.
webview_navigate(w, "https://example.com");

However, embedding html in a data url does not work, e.g.
webview_navigate(w, "data:text/html,%3Ch1%3EHello%2C%20World%21%3C%2Fh1%3E");

This just displayed an empty window.
Any idea why that's the case?
Interestingly, setting html with webview_set_html(w, "<html>hello</html>"); - while also not working as expected - displays the data url as text in the window, e.g. in this case data:text/html,%3chtml%3ehello%3c%2fhtml%3e.
I really don't have an idea for both of these behaviors. Any help is greatly appreciate. Thanks in advance.

This is definitely not working as intended. Could you try 8a9afe0b8a2766f16f56fbf6ce4a8d9499e4ac80 (i.e., before we changed this function) and see if it works?

Indeed with commit https://github.com/webview/webview/commit/8a9afe0b8a2766f16f56fbf6ce4a8d9499e4ac80 webview_navigate with data urls works as expected.

@dandeto Could you take a look at this? It works as expected on my Linux system, so this is likely a Windows-specific problem.

I'll test it later today and get back with you. I know for a fact it works on my machine in C++. I need to dounlecheck C.

main.cc
#include "webview.h"

#ifdef _WIN32
int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
                     LPSTR lpCmdLine, int nCmdShow)
#else
int main()
#endif
{
  webview_t w = webview_create(1, 0);
  webview_set_title(w, "Hello World");
  webview_navigate(w, "data:text/html,%3Ch1%3EHello%2C%20World%21%3C%2Fh1%3E");
  webview_run(w);
  return 0;
}

This works just fine. Hello world is styled as an h1. Try using the build.bat script and report back, please @zachmann. I use the same major version of your compiler, so I have no idea why it isn't working for you... Did you use WebView2Loader.dll.lib from our repo?

Yes I used the WebView2Loader.dll.lib from the repo.
I tried the build.bat script and it successfully build the application. However, in the a2b7746141c38e935b3d66869a61aac8e2a0d6c5 commit (before removing edge html) same behavior appears. However with the latest master the window appears shortly but then exits immediately.
So could this be related to EdgeHTML? On the system I build the application edge is not installed, but on the system where I tried to run webview edge is installed. Do I need to have edge installed on the build system? Do I need any other dependencies on the system I run webview? (I have Edge installed and the WebView2Loader.dll and webview.dll).
I'm sorry if these are stupid questions, I'm coming from linux (everything works fine there) and don't have much experience on windows.

I didn't need to do anything fancy on my system. If you can compile, I assume you have a recent version of the Windows10 sdk.
What you describe sounds exactly like you're running EdgeHTML instead of webview2... try installing webview2 via the Evergreen Bootstrapper or installer and see if that fixes the issue.

If you can compile, I assume you have a recent version of the Windows10 sdk.

Yes, I Installed it with the C++ build tools for visual studio

What you describe sounds exactly like you're running EdgeHTML instead of webview2... try installing webview2 via the Evergreen Bootstrapper or installer and see if that fixes the issue.

I installed it on the build system and built the master branch again with the build.bat script. Running the executable on that machine is now more successfull than it was before (when EdgeHTML was used - because there was no edge on the system). However, the result is still not as expected.

On my other system with edge installed, the new executable does not behave differently then the one build when webview2 wasn't installed on the build system (it still closes the window without displaying anything). So I guess the webview2 is not needed for compilation (since the webview2 header is in this repo), but for running the application it is needed.
When I install the webview2 environment on the system same result as on the build system.

Aah, that's my bad. I just realized that is the actual behavior of the example main.cc. It adds the full useragent string.
So with webview2 installed it works as expected.
Thank you for your help.
However, you might want to mention that users need to have webview2 installed. (Especially now with edgehtml dropped). On my test there was edge installed which wasn't enough.

@zachmann, do you mind testing PR #705 to see if it solves the issues you ran into? Now that you installed webview2, you may need to change line 1227 from std::make_unique<webview::edge_chromium>(); to std::make_unique<webview::edge_html>(); to force edge_html as the backend. That's the simplest way for me, at least.

Yes, that fixes the problem.
Thank you.


Optimized TreeNode.ancestors

This PR adds parameter include_self to TreeNode.ancestors to optionally include the initial node in the path (default: False). This logic is consistent with the newly added path, which has include_ends. With this parameter, one can easily generate a lineage from any taxon to the root.
@christapo I guess this addition can also make path simpler. What do you think?
This PR also improved the performance of ancestors. In my benchmarks:
Before: 40.3 ms ± 565 μs
After: 21.8 ms ± 194 μs
After (with include_self=True): 22.1 ms ± 278 μs
Please complete the following checklist:

[x] I have read the contribution guidelines.

[x] I have documented all public-facing changes in the changelog.

[ ] This pull request includes code, documentation, or other content derived from external source(s). If this is the case, ensure the external source's license is compatible with scikit-bio's license. Include the license in the licenses directory and add a comment in the code giving proper attribution. Ensure any other requirements set forth by the license and/or author are satisfied.

It is your responsibility to disclose code, documentation, or other content derived from external source(s). If you have questions about whether something can be included in the project or how to give proper attribution, include those questions in your pull request and a reviewer will assist you.

[x] This pull request does not include code, documentation, or other content derived from external source(s).

Note: This document may also be helpful to see some of the things code reviewers will be verifying when reviewing your pull request.

I think this option is a good idea! I think it will simplify thepath function as well as other potential functions that will utilize TreeNode.ancestors.

@christapo Thanks! Let's see!


cmd: add environment variable to disable/enable 'Terminate batch job (Y/N)?' confirmation

(migrated from https://github.com/PowerShell/PowerShell/issues/7080 per @BrucePay's suggestion)
When I cancel a cmd script with Ctrl C, the following dialog pops up:
Terminate batch job (Y/N)?

I understand why this exists, but I'd also like the option to disable it, so cancelling cancels immediately. Judging by Stack Overflow, I'm not the only one
So a request: could we have an environment variable to control this?

@paulcam206 as the cmd guru, he'll probably have more thoughts on the matter.
I really highly doubt that we could just add an env var to disable this, but it is an interactive-only scenario, so it might be possible...

Thanks for responding Mike! Any specific reason why checking a flag would be so difficult? Looking forward to seeing what @paulcam206 thinks.

Honestly, changing cmd.exe at all is a bit terrifying. You can't be sure who in the world is actually depending on that behavior for some reason or another.
relevant xkcd

it's possible that this could be done with something like a new setlocal setting. however, we've not added one of these in a long time. that said, I'll file an item on our backlog to investigate :)

Ack @zadjii-msft - not proposing to change the default, so should only affect people who've explicitly set some very long string.
@paulcam206 thanks! I'm not sure about how setlocal works - my real experience of cmd is launching cmd files from powershell). Would I still be
$env:TERMINATE_IMMEDIATELY='yes'
somefile.cmd

Then press Ctrl C when I need to and have it work?

setlocal doesn't behave the same way as an environment variable. It's a thing that would have to be put in at the top of the batch script that is somefile.cmd as one of its first commands to adjust the way that one specific batch file is processed by the cmd.exe engine. That's probably not suitable for your needs, but that's the way we have to go.
I don't think anyone is disagreeing with you, @mikemaccana, that this would be a five minute development change to read that environment variable and change the behavior of cmd.exe. It absolutely would be a tiny development time.
It's just that from our experience, we know there's going to be a 3-24 month bug tail here where we get massive investigation callbacks by some billion dollar enterprise customer who for whatever reason was already using the environment variable we pick for another purpose. Their script that they give their rank-and-file folks will tell them to press Ctrl+C at some point in the batch script to do whatever happens, it will do something different, those people will notice the script doesn't match the computer anymore. They will then halt the production line and tell their supervisor. The supervisor tells some director. Their director comes screaming at their Microsoft enterprise support contract person that we've introduced a change to the OS that is costing them millions if not billions of dollars in shipments per month. Our directors at Microsoft then come bashing down our doors angry with us and make us fix it ASAP or revert it, we don't get to go home at 5pm to our families or friends because we're fixing it, we get stressed the heck out, we have to spin up servicing potentially for already shipped operating systems which is expensive and headache-causing...etc.
We can see this story coming a million miles away because it has happened before with other 'tiny' change we've been asked to make to cmd.exe in the past few years.
I would just ask you to understand that cmd.exe is very, very much in a maintenance mode and I just want to set expectations here. We maintain it, yes. We have a renewed interest in command-line development, yes. But our focuses are revolving around improving the terminal and platform itself and bringing modern, supported shells to be the best they can be on Windows. Paul will put this on the backlog of things that people want in cmd.exe, yes. But it will sink to the bottom of the backlog because changing cmd.exe is our worst nightmare as its compatibility story is among the heaviest of any piece of the operating system.
I would highly recommend that Gulp convert to using PowerShell scripts and that if such an issue exists with PowerShell, that we get their modern, supported, and better-engineered platform to support the scenario. I don't want you to sit around waiting for cmd.exe to change this because it's really not going to happen faster than that script could be converted to ps1 and it fixed in PowerShell Core (if that's even a problem in that world.)

oh god I'm having ptsd flashbacks just reading that

yep

@All - @miniksa @zadjii-msft and @paulcam206 are not kidding - the unexpected impact of even the smallest change to Cmd has resulted in calamities, misfortune, lost-weekends and evenings, stress and unnecessary turmoil.
Cmd is in maintenance mode. It isn't being deprecated or removed - in fact, I doubt it'll EVER be removed from Windows, but do understand that Cmd is extremely fragile and difficult to change.
I keep saying it, and now that PowerShell is available almost everywhere - even Linux & macOS - if you're writing command-line scripts today, they should be PowerShell scripts wherever possible.

Thanks @bitcrazed. I appreciate the testimony directly from the horse's mouth - I've submitted a PR to one of the many noe projects that use cmd scripts, with a .ps1 replacement. Hopefully it gets accepted and we start moving node onto a more supported scripting language.

Powershell is just as good as cmd here. If you're calling yarn.js from some other language of course you'd run node yarn.js, whether yarn comes with yarn.cmd or yarn.ps1.

Well, relevant to this thread, adding the setlocal option is just as good and addresses my concerns also - then all the projects that use cmd scripts this way just add another line at the top.
It still requires projects to opt into this behavior, and it's not compatible with older versions of Windows, but it seems like the best way to do this to me. Doesn't break any other cmd scripts assuming yarn is a command, and I'd be happy replacing my hacked together exe launcher with these.

The point is you can type yarn from the command line (which in Windows is powershell)
With all the recent console improvements and WSL, I think there's a possibility of seeing alternate shells on Windows in the future. Cmd may be in maintenance mode, but people still use it too, so I'm not a huge fan of this assumption.

Personally I'd really like to see the setlocal option, regardless of how projects choose to handle this.

It seems to me that cmd scripts are generally used in the place of exe symlinks and shebang scripts, which PowerShell is not a good replacement for

It's true. For example, perl wraps all scripts installed from cpan in a batch file using pl2bat.  setlocal variant would be very helpful for perl because it would allow us to fix Terminate batch job (Y/N)? issue by modifying pl2bat.

@bitcrazed
But, executing PowerShell script is not enabled by default.

@parkovski
An interesting idea would be using WSF/WSH files.

Any progress on this issue?

cmd.exe is very, very much in a maintenance mode and I just want to set expectations here. We maintain it, yes. We have a renewed interest in command-line development, yes. But our focuses are revolving around improving the terminal and platform itself and bringing modern, supported shells to be the best they can be on Windows.

We're not going to make changes to cmd.exe to support this scenario.

cmd.exe is very, very much in a maintenance mode and I just want to set expectations here. We maintain it, yes. We have a renewed interest in command-line development, yes. But our focuses are revolving around improving the terminal and platform itself and bringing modern, supported shells to be the best they can be on Windows.

We're not going to make changes to cmd.exe to support this scenario.

Okay, I understand this.
But, is there an unofficial / hack solution to this?
I searched the web and only found someone patching binary to do this.
Unfortunately, that only works for Windows XP to and Windows 7
Then I found another project, https://github.com/sgraham/cmdEx
Only works for Windows 8.1 32bit
:(

Something replacing .cmd and .bat?
PS1 is too complex and too slow.

发件人: Jack Works<EMAIL_ADDRESS>发送时间: Tuesday, April 2, 2019 10:06:41 PM
收件人: Microsoft/console
抄送: Renzhi Li; Comment
主题: Re: [Microsoft/console] cmd: add environment variable to disable/enable 'Terminate batch job (Y/N)?' confirmation (#217)
cmd.exe is very, very much in a maintenance mode and I just want to set expectations here. We maintain it, yes. We have a renewed interest in command-line development, yes. But our focuses are revolving around improving the terminal and platform itself and bringing modern, supported shells to be the best they can be on Windows.
We're not going to make changes to cmd.exe to support this scenario.
Okay, I understand this.
But, is there an unofficial / hack solution to this?
I searched the web and only found someone patching binary to do this.
Unfortunately, that only works for Windows XP to and Windows 7
Then I found another project, https://github.com/sgraham/cmdExhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fsgraham%2FcmdEx&data=02|01|Renzhi.Li%40microsoft.com|ea8b6c7e4ee14e5d780d08d6b7746eb7|72f988bf86f141af91ab2d7cd011db47|1|0|636898108031211694&sdata=Id%2FYm1klHq6nHjQY50Uph9FdTWHsGsTXRYOODmYox8s%3D&reserved=0
Only works for Windows 8.1 32bit
:(
―
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fconsole%2Fissues%2F217%23issuecomment-479012154&data=02|01|Renzhi.Li%40microsoft.com|ea8b6c7e4ee14e5d780d08d6b7746eb7|72f988bf86f141af91ab2d7cd011db47|1|0|636898108031211694&sdata=dVp4NGya3W6yH7NMFgg87lb38fhjj7r%2F%2Fmr3xTTwHuM%3D&reserved=0, or mute the threadhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAOp25uHVKve6DUbDGCsqYMg3lRvJlcDks5vc2PxgaJpZM4VGR0n&data=02|01|Renzhi.Li%40microsoft.com|ea8b6c7e4ee14e5d780d08d6b7746eb7|72f988bf86f141af91ab2d7cd011db47|1|0|636898108031221686&sdata=jVKSOX8R0tjLrlcqejdOgDPJ4pTVFg9FhuzSKS7fPAc%3D&reserved=0.

@Jack-Works, we are not in the business of developing or propagating unofficial hacks to our software. If you figure something out, more power to you. But we can't help you there.
@be5invis, I'm sure the Powershell team would be happy to accept your feedback and improve their product. They are the Microsoft team that has funding for the interactive shell space.

As everyone else says, the fix for this is moving from cmd  to ps1. @bitcrazed mentioned he's going to publish a blog post recommending people do this a little while ago (since a lot of node folks etc are producing new cmd scripts).
While we wait for peopel to start distributing ps1 scripts, the safest bet to handle leftover cmds is to etiher press Ctrl C twice or use something like Hyper's https://hyper.is/plugins/hyper-yes

I kinda agree with  the problem with using poewrshell here instead of cmd (which I agree would be ideal), except it's  far too slow in its initialization time.  Even more unfortunately the new pwsh is even slower to initialize.  Something I opened an issue about, but the situation is not likely to be improved https://github.com/PowerShell/PowerShell/issues/6443.

CMD.exe is not getting updated. I don't know how to stress that any further.

Sorry I should've been made it clear that  I know that cmd.exe won't be updated.  I  wanted to highlight the issues with the powershell recommendation, compared to using cmd.exe, and that hopefully an another solution may exist.

@miniksa @musm @zadjii-msft
.PS1's problem:

PowerShell is still 10× times slower than CMD.
Scripts are disabled by default!

I don't know all the details of this and would be curious to hear some more informed opinions, but:

PE files (.exe) start with the "magic number" MZ.
Executable shell scripts with a shebang also have a two byte magic number, #!.

Is there any way to inform the loader that when the magic number is #!, it will be passed to the interpreter specified in the rest of the line, like linux shebang files? As far as I can tell, this would solve all the issues regarding slow shell startup time (we bypass PowerShell and cmd altogether), the PATHEXT issue that exists with .ps1 files, the pain point of trying to launch them from WSL, and any weird behavior caused by using cmd.exe for this purpose.
It also seems to me, although I'm certainly not an expert, that there wouldn't really be a security risk here, as a regular binary exe could do anything and more that a shebang script could, and if signing was enabled for these scripts, I can't see how they would be any different than any other exes.

@parkovski This wouldn't be safe at all since Windows has no equivalent of the execute bit (chmod +x).

Why not? .exe is the execute bit. Totally open to corrections, but a shebang exe would be basically equivalent to a shim exe that just launches another process, without the overhead of actually loading a launcher process. All other security features that already apply to exes would still apply to this type; it's just a special form where the shebang line replaces the exe name, just as .bat automatically invokes cmd.exe, or a shim exe can "fork out" to another exe.

Oh, I see -- you're not advocating allowing any file to be a shebang script. I can't speak to the can of worms that would open, nor do I ever think this would be considered but it's interesting to ponder nonetheless.

Yeah, I'm not too optimistic about this actually being embedded in Windows, but if we were allowed to have !# exes (and only .exes), I think that would solve a lot of these weird cmd script issues.

I'm just going to leave this here :D https://github.com/sgraham/cmdEx for people that don't accept reality and want to substitute it with something else.

You could just open source cmd and somebody would just produce a highly compatible (but not fully), and with these tiny new things we all want. A cmd2, let's say, or even a cmd we could replace the original one with. That big enterprise will never see it, and we all get to live a little bit better.

We've got enough on our hands with the new open-source Terminal. Thanks for the suggestion, though!

Personally, I would like to see this feature tied somehow to developer mode
developer mode could unlock more options not just side loading apps. If the big corporation is running servers in developer mode then well...
I run npm start
hit CTRL C, and I get the Terminate Batch Job Y/N I just HIT CTRL C
If I hit N it does the same as Y anyways in the above example.

@parkovski This wouldn't be safe at all since Windows has no equivalent of the execute bit (chmod +x).

Filesystems that support ACLs (i.e. those with the flag FILE_PERSISTENT_ACLS), such as NTFS (required for the system drive), have equivalent FILE_EXECUTE discretionary access control. CreateProcessW will fail with access denied (5) if the caller doesn't have execute access.
For example, grant the owner of "spam.exe" generic execute access and the right to modify the  discretionary ACL: icacls "spam.exe" /grant *OW:(GE,WDAC).  (The File object type maps GENERIC_EXECUTE access to FILE_EXECUTE | FILE_READ_ATTRIBUTES | READ_CONTROL | SYNCHRONIZE. "OW" is SDDL for the "OWNER RIGHTS" security principle.)
We can also set SYSTEM_MANDATORY_LABEL_NO_EXECUTE_UP mandatory access restriction for caller's at a lower integrity level than that of the file, but Windows doesn't include a command-line utility to modify the no-execute-up flag in a file's mandatory label.
One major problem is portable filesystems such as FAT32 and exFAT that lack security. You'd need a policy to disable shebang support for these filesystems. The next problem is that the default ACLs in Windows liberally grant execute access based on rules inherited from the root directory and the primary system directories (e.g. "Windows", "Program Files", "ProgramData", "Users"). Removing inherited execute access would require assigning custom security instead of relying completely on inheritance.
Filetypes that ShellExecuteExW passes directly to CreateProcessW use "%1" %* as their command template, where "%1" is the file itself. This is currently used for ".EXE", ".COM", ".CMD" and ".BAT" files. In principle this can be extended to filenames that have no extension. To the shell this is ".", because "spam" and "spam." are equivalent in DOS.

@parkovski
Another option may be let npm, etc. to generate real EXE files that simply launches node whatever. There should be able to create some trick to keep the EXE signed.

billion dollar enterprise customer who for whatever reason was already using the environment variable we pick for another purpose

@miniksa Is it possible to introduce a flag in the registry instead of an environment variable for that purpose? As far as I can see, that would address this concern.

Then there's just another billion-dollar enterprise out there that for some unknowable reason is already setting that flag in the registry for some other purpose, and will run into the same issues.

Then there's just another billion-dollar enterprise out there that for some unknowable reason is already setting that flag in the registry for some other purpose, and will run into the same issues.

Surely you're kidding.
This would prevent any changes to any aspect of Windows.

Then there's just another billion-dollar enterprise out there that for some unknowable reason is already setting that flag in the registry for some other purpose, and will run into the same issues.

GUID should be good for this 🙂
Nobody can predict GUID

Then there's just another billion-dollar enterprise out there that for some unknowable reason is already setting that flag in the registry for some other purpose, and will run into the same issues.

No enterprise has any business adding custom values to CMD's configuration key, "[HKLM|HKCU]\Software\Microsoft\Command Processor". Surely you have to draw some reasonable lines in the sand with your customers.

This looks to me like a case of the emacs spacebar. Obviously nobody wants to potentially deal with these kind of issues.  I agree that an environment variable is risky, but the registry key strikes me as the all-around best solution to this.

Cmd has been changed - it turns on ENABLE_VIRTUAL_TERMINAL_PROCESSING. Maybe other things as well, but I at least know of this one.
This change would be extremely small in scope and would make at least me disproportionately happy.
A setlocal would at least be an option, but every script would have to be updated so it doesn't seem like a great way to do this.
The registry is already used for tons of potential breaking change backcompat type switches.
This "feature" is so obnoxious that if there were a way to bribe you guys I'd chip in a couple dollars for the cause.

I understand the fear of changing cmd and I can't be upset with you guys if you don't change this (although I can certainly be upset at whoever introduced it). If it did happen though, you guys are already minor personal heroes, but I guess it'd be an extra point there, and I think that's all I got.

I was 85% joking, and 15% "we've been burned literally every time we've touched cmd.exe so it's almost certainly not happening"
Even the ENABLE_VIRTUAL_TERMINAL_PROCESSING required us to go back and change it such that cmd.exe only enables that flag for itself, and disables it again for child processes.

@zadjii-msft Please correct me if I'm wrong (seriously! I hope I am 😄), but I think Powershell isn't a good general option. Even if we add .ps1 in the PATHEXT, it seems that the default file association opens it with Notepad or VS, which prevents it from being a replacement for cmd being used as a kind of "enhanced symbolic link" (we pass additional arguments).
It's your project, and any change would be your responsibility so I understand if it doesn't happen, but the setlocal option sounded interesting, and would definitely be useful to us.

Of note, we tried these past months to use a binary to workaround this problem, but it unfortunately doesn't work for some of our users that are in locked Windows environments. Even signing our jumper wouldn't help in those circumstances ...

@arcanis , I've realized that a known quirk of CMD can be used as a work-around.

GOTO undefined label is a fatal error. It immediately terminates batch processing, but the currently executing block of code that has already been parsed continues to completion. However, the remainder of the code is executed using a command line context instead of a batch context.

dbenham (commenting on this StackOverflow answer)

I've used this to work around another annoying CMD bug (the fact that exit /b 1 within a script doesn't set the process exit code unless the script in question is called via call SCRIPT, which is obviously uncontrollable by script itself; further explanation (and fix) is within the commentary for commit 9a7db966 that I added to pl2bat.
But you can use the same quirk here to kill the calling script, avoiding any "Terminate batch job (Y/N)?" prompt originating from the calling script, while still executing the remainder of the code in the parsed unit.
@rem ...
goto #_undefined_# 2>NUL || title %COMSPEC% & "%PROG_NAME%" %ARGS%
@rem ...

The title %COMSPEC% command is included to work-around the fact that using this prevents the caller from resetting the window title to a prior value which can lead to ever-expanding window titles. I think it's a minor inconvenience for the benefits gained, both suppression of "Terminate..." and correct process exit values, no matter how the script is called.
In example, I'm using the following code as a replacement for the npm shim for my installation of hexo...
@setLocal
@echo off
goto :_START_

:set_real_dp0
@rem:: ref: "https://stackoverflow.com/questions/19781569/cmd-failure-of-d0-when-call-quotes-the-name-of-the-batch-file"
@rem:: ref: "https://stackoverflow.com/questions/12141482/what-is-the-reason-for-batch-file-path-referenced-with-dp0-sometimes-changes-o/26851883#26851883"
@rem:: ref: "https://www.dostips.com/forum/viewtopic.php?f=3&t=5057"
set dp0=%~dp0
set "dp0=%dp0:~0,-1%" &@rem:: clip trailing path separator
goto :EOF

:_START_
call :set_real_dp0

IF EXIST "%dp0%\node.exe" (
  SET "_prog=%dp0%\node.exe"
) ELSE (
  SET "_prog=node"
  SET PATHEXT=%PATHEXT:;.JS;=;%
)

goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\node_modules\hexo\bin\hexo" %*

This construction of the hexo shim runs the node.exe executable in "command line mode" so any interrupts are not passed back up to the caller batch file. I've suggested that npm start using it as a template for future shims (see https://github.com/npm/cli/issues/969 and https://github.com/npm/cmd-shim/pull/46).
And, although I might personally consider this something of a "hack", it uses the standard, non-patched, CMD shell. So, it should be fair game. And, I expect, some billion-dollar customer will soon be using it somewhere (if they aren't already), so it should be stable. 😄

Hello All ,
For anyone having issues ctr+c and break of batch. Then just use Keyfreez software.
you can run keyfreez at the start of the batch and end it using taskkill command at the end of batch

It appears like nobody wants to approach cmd.exe and touch it with a stick, because "we can break something".  So cmd.exe has been in "maintenance mode", while its legitimate use keeps growing due to the popularity of CLI tools like Node.js, NPM, Deno etc., which heavily rely upon .CMD and .BAT files on Windows.
I struggle to come up with even a contrived scenario where the proper Ctrl+C handling (especially behind a feature flag) could possibly break any legacy scripts. OTOH, I can think of a magnitude of cases where the current behavior causes annoyances and harm.
E.g., when the following batch file is executing and I hit Ctrl+C trying to stop it, the infamous "Terminate batch job (Y/N)?" prompt is shown. I hit Ctrl+C again to escape, but the execution is continuing instead, deleting my GIF files:
@echo off
echo About to delete *.gif. Press Ctrl+C to stop
pause
del /q *.gif

For a more convincing example, speak to this person:

Luckily, there's new CreatePseudoConsole Win32 API that should make possible to create a proper shim for cmd.exe, to look for and intercept the "Terminate batch job (Y/N)?" prompt. Such shim can then be set as an active command shell via COMSPEC env variable.
When time allows, I'm going to explore this options, like I did to address another controversial behavior, paste-with-formatting-by-default.

It appears like nobody wants to approach cmd.exe and touch it with a stick, because "we can break something". So cmd.exe has been in "maintenance mode", while its legitimate use keeps growing due to the popularity of CLI tools like Node.js, NPM, Deno etc., which heavily rely upon .CMD and .BAT files on Windows.
I struggle to come up with even a contrived scenario where the proper Ctrl+C handling (especially behind a feature flag) could possibly break any legacy scripts. OTOH, I can think of a magnitude of cases where the current behavior causes annoyances and harm.
E.g., when the following batch file is executing and I hit Ctrl+C trying to stop it, the infamous "Terminate batch job (Y/N)?" prompt is shown. I hit Ctrl+C again to escape, but the execution is continuing instead, deleting my GIF files:
@echo off
echo About to delete *.gif. Press Ctrl+C to stop
pause
del /q *.gif

For a more convincing example, speak to this person:

Luckily, there's new CreatePseudoConsole Win32 API that should make possible to create a proper shim for cmd.exe, to look for and intercept the "Terminate batch job (Y/N)?" prompt. Such shim can then be set as an active command shell via COMSPEC env variable.
When time allows, I'm going to explore this options, like I did to address another controversial behavior, paste-with-formatting-by-default.

This specific issue came in through Feedback Hub as well and I spent some time reproducing it. When I use conhost.exe, the first time I run the contrived script and do Ctrl+C twice, it exits properly. But subsequent runs, it deletes at the second one anyway. And when through Terminal... it just immediately goes to the second state and deletes.
So you've hit my interest further and I will be pulling this particular case out into a separate bug to figure out why the state changes and differs.

When I use conhost.exe, the first time I run the contrived script and do Ctrl+C twice, it exits properly. But subsequent runs, it deletes at the second one anyway. And when through Terminal... it just immediately goes to the second state and deletes.

Canceling the batch termination prompt uses no as the default answer, and thus the script continues to run. In particular, cmd!PromptUser() handles a failed/canceled or empty (EOF) read by defaulting the answer to no. That's reasonable behavior in the general case (e.g. do not delete all the files in the "foo" directory for del foo). For the batch termination prompt, it probably would have been more reasonable to handle repeated Ctrl+C presses by terminating the script instead of canceling the prompt itself. (I'm thinking of a user frantically pressing Ctrl+C.) A parameter could have been added to PromptUser() to set the default answer instead of hard coding no as the default.

If MSFT is still watching this... what's the likelihood of being able to add a stub-specific replacement, and a new default entry to PATHEXT? I'm thinking the .cmd stub builders of the world like npm can instead emit a .some-stub-ext file that contains some trivial format like:
cd ..\..\some-package
exec node.exe
arg --some-option
forward-args
arg --
arg another-option

If it's part of windows, runs very fast, doesn't alter cmd.exe etc., that seems to mostly fix people's issues in this thread. It's mostly the change to the PATHEXT default that seems scary.

Notably, .lnk files cover a lot of that usage, and seems to work quite well if you add them to PATHEXT. Are there issues with using .lnk as stubs?

@zadjii-msft can you hear the people chanting "Terminate batch job (Yes/No) has got to go!"?
One option is to break cmd.exe, forcing all shims to be authored anew. Because the prompt is kind of on the journey there already.

You're heard, for sure. But we're not planning on touching cmd.exe. Literally last week we had a P0 fire where we broke the core Windows build because we tried making what seemed like a trivial internal change to the CMD.exe code. It's literally burned us 100% of the times we've tried to touch it.
If you want a modern, updated shell on Windows, you should try out PowerShell 7. Or clink. Or yori.

You're heard, for sure. But we're not planning on touching cmd.exe. Literally last week we had a P0 fire where we broke the core Windows build because we tried making what seemed like a trivial internal change to the CMD.exe code. It's literally burned us 100% of the times we've tried to touch it.
If you want a modern, updated shell on Windows, you should try out PowerShell 7. Or clink. Or yori.

This would make a super interesting blog post (which you could point people to any time they ask this again) -- maybe ping Raymond Chen? :D

I use https://frippery.org/busybox/

It's literally burned us 100% of the times we've tried to touch it.

Would it be possible to release the source of cmd.exe? Is it even that sensitive? Lemme pitch the metric: "Number of cmd.exes open sourced." An increase in this metric from 0 to 1, it's +infinity percent!
I got you, thanks for the kind note.

You're heard, for sure. But we're not planning on touching cmd.exe. Literally last week we had a P0 fire where we broke the core Windows build because we tried making what seemed like a trivial internal change to the CMD.exe code. It's literally burned us 100% of the times we've tried to touch it.
If you want a modern, updated shell on Windows, you should try out PowerShell 7. Or clink. Or yori.

Sadly, many popular CLI/DevOps tools (Node.js, NPM, Chromium build, etc) use CMD on Windows.
The fear of changing CMD to actually terminate upon Ctrl+C is not only irrational, but also dangerous.
E.g., like I mentioned previously in this thread, the following will delete all .gif files, when I franticly press Ctrl+C two times while trying to stop it. It's just beyond my comprehension. What do you think about that, @zadjii-msft?
@echo off
echo About to delete *.gif.
pause
del /q *.gif

At least, it it possible to make the second Ctrl+C act as Y when CMD is already asking Terminate batch job (Y/N)? ❓

The question is not for me, but it also concerns me. This is COOKED_READ territory.
The Terminate batch job (Y/N)? command is represented in the system as <noalias> (this is its exe name), so the input for it can be altered using doskey macro. Try the following example (press Ctrl+C and n):
test1.cmd:
@echo off
doskey /exename=^<noalias^> n=y
echo About to do it.
pause
echo test

The following approach works in WT on Windows10 but does not work directly in conhost:
test2.cmd:
@echo off
doskey /exename=^<noalias^> =y
echo About to do it.
pause
echo test

The doskey /exename=^<noalias^> =y command contains ASCII character with code 0x03 (ETX, Ctrl+C). It can be inserted to the test2.cmd using for example Notepad++ by typing text 03, select it, and apply plugin Plugins->Converter->HEXtoASCII.
Perhaps you can think through this idea and come up with a full-fledged workaround.
Anyway, we can handle Ctrl+C for  exe name as a special (configurable) case, and do not touching cmd.exe itself.

I understand why you are terrified of changing anything in cmd.exe.
But:

Define a brand new registry value (or even a whole new key) which nobody is using–if you are truly paranoid about the chance someone already has it set, put it somewhere unrelated to the registry keys cmd.exe already looks at, even put a random GUID in the key or value name so the chance that it already exists is astronomically low
At cmd.exe startup, check if that registry value exists and has the value 1, and if so set an internal boolean flag
If the boolean flag is set, skip displaying the Terminate batch job (Y/N)? prompt, act as if Y was answered. This is likely just one extra if statement (if that)

That way, people who want to make this prompt go away, can create the new registry key/value.
It is rather difficult to conceive of a way in which the above change could possibly break anything. If the registry key/value isn't set, it behaves identically to at present. If setting it breaks something, the solution is to remove that registry setting.

Define a brand new registry value

Bad idea. It will affect all cmd.exe instances. Better, for example, to extend setlocal with a new flag like:
setlocal DISABLECTRLBREAKINTERACTION

Keep speaking into void, folks. Whoever hopes this abomination will ever gets a proper fix, check this historic question: https://superuser.com/questions/35698/how-to-supress-terminate-batch-job-y-n-confirmation

@skissane said:

It is rather difficult to conceive of a way in which the above change could possibly break anything.

With these words, you explain exactly why this change is so insidiously dangerous.

With these words, you explain exactly why this change is so insidiously dangerous.

Can it get any worse than data loss, caused by the existing behavior, when it simply continues if you hit Ctrl+C twice? Someone deleted the whole database! 🥲
As is, it's not just annoying, it's dangerous enough already.

With these words, you explain exactly why this change is so insidiously dangerous.

Can it get any worse than data loss, caused by the existing behavior, when it simply continues if you hit Ctrl+C twice? Someone deleted the whole database! 🥲
As is, it's not just annoying, it's dangerous enough already.

I don't disagree, but somebody, somewhere, is depending on this behaviour.

I don't disagree, but somebody, somewhere, is depending on this behaviour.

And this behavior, too ;)
"BatBadBut: You can't securely execute commands on Windows"
https://flatt.tech/research/posts/batbadbut-you-cant-securely-execute-commands-on-windows/
I wonder if CMD.exe will be touched to address this vulnerability.  But of course it is different from "Terminate batch job (Y/N)?" 🥲

I can see how changing the default behavior of cmd or its pause may burn someone, but adding a new option to pause or an optional, opt-in mode to cmd should not be an issue.
Failing that, please at least make powershell pause || exit not wreck cmd's font...

This nuisance, along with some brand new recent "improvements" to Windows, has finally pushed me to move my preferred dev environment to Linux, and I'm not missing anything. I'm glad I've decided to not wait for another 20 yrs for some sort of resolution to this.