Trouble Installing OCaml in Windows

Hi! Yesterday I tried installing OCaml, but unfortunately my computer shut down halfway through, and now I'm running into various errors when trying to reinstall. I've deleted tried deleting the program files, along with the appdata of OCaml, however it has only caused me to run into new errors. I'd appreciate any help regarding this.
Currently, after deleting the appdata and rerunning the installer, I'm running into the following error:
2023-03-23T02:33:29.841Z [Win32] C:\Program Files\Git\cmd\git.exe -C C:\Users\Eric\AppData\Local\Temp\PA26B7~1\0 clone https://github.com/thekid/inotify-win.git
Cloning into 'inotify-win'...
2023-03-23T02:33:30.357Z [Win32] C:\Program Files\Git\cmd\git.exe -C C:\Users\Eric\AppData\Local\Temp\PA26B7~1\0\inotify-win -c advice.detachedHead=false checkout 36d18f3dfe042b21d7136a1479f08f0d8e30e2f9
HEAD is now at 36d18f3 Merge branch 'master' of github.com:thekid/inotify-win
2023-03-23T02:33:30.447Z [Win32] C:\WINDOWS\system32\cmd.exe /c call "C:\Users\Eric\AppData\Local\Temp\PA26B7~1\0\inotify-win\compile.bat"
C:\Users\Eric\AppData\Local\Temp\7z648B7AA0>"C:\DiskuvOCaml\BuildTools\Common7\Tools\vsdevcmd.bat" -no_logo -vcvars_ver=14.26 -winsdk=10.0.18362.0   && csc.exe /nologo /target:exe "/out:C:\Users\Eric\AppData\Local\Temp\PA26B7~1\0\inotify-win\inotifywait.exe" "C:\Users\Eric\AppData\Local\Temp\PA26B7~1\0\inotify-win\src*.cs"
The system cannot find the path specified.

Can you go to the Control Panel and select Add or remove programs? You should be able to uninstall "Diskuv OCaml".
Then run Visual Studio Installer (press the Windows key, and then type it in). You will need to "More > Uninstall" (or "More > Repair") the Visual Studio Build Tools 2019 installation.

Hopefully that will get you to a clean state where you can re-run the installer.

If it was compile.bat step that was failing, try the Windows 64-bit Installer at https://gitlab.com/diskuv-ocaml/distributions/dkml/-/releases/1.2.1-10


Please invite me to the GitHub Community Organization

Name
spiderman
Discord Username (if applicable)
spiderman
Additional Context
Hello, I am friend of attractiveDev.
I want to join your team.

hello, I am friend of attractiveDev.
I want to join your team.


pretrained models?

Great work! Are the pretrained models availabel?

I don't think so. It's mentioned that TPU x 3 were used in the original paper. Just wait for the official release of the pretrained model :P

I don't think so. It's mentioned that TPU x 3 were used in the original paper. Just wait for the official release of the pretrained model :P

Great work! Are the pretrained models availabel?

A pytorch version: https://github.com/BIGBALLON/distribuuuu/blob/master/distribuuuu/models/botnet.py,
The results (the model trained by distribuuuu) :

model
epoch
total batch
lr policy
base lr
Acc@1
Acc@5
model / config

resnet18
100
256 (32*8GPUs)
cos
0.2
70.902
89.894
Google Drive / cfg

resnet18
100
1024 (128*8GPUs)
cos
0.8
70.994
89.892

resnet18
100
8192 (128*64GPUs)
cos
6.4
70.165
89.374

resnet18
100
16384 (256*64GPUs)
cos
12.8
68.766
88.381

resnet50
100
256 (32*8GPUs)
cos
0.2
77.252
93.430
Google Drive / cfg

botnet50
100
256 (32*8GPUs)
cos
0.2
77.604
93.682
Google Drive / cfg

Training log: https://gist.github.com/BIGBALLON/3d53c81b2b11ea5dd66417c2a985cd89
@oukohou

@BIGBALLON yeah thanks for your work! I will try that later.Great thanks again.

Hello, I am having some problems with your pre-trained model. I would like to ask how should I use botnet50.pth. I found no state_dict in it to load when I tried to run it. Then I tried to unzip it and only found a data.pkl file. And when I tried to load it, I got an error: _pickle.UnpicklingError: A load persistent id instruction was encountered.

Great work! Are the pretrained models availabel?

A pytorch version: https://github.com/BIGBALLON/distribuuuu/blob/master/distribuuuu/models/botnet.py,
The results (the model trained by distribuuuu) :
model	epoch	total batch	lr policy	base lr	Acc@1	Acc@5	model / config
resnet18	100	256 (328GPUs)	cos	0.2	70.902	89.894	Google Drive / cfg
resnet18	100	1024 (1288GPUs)	cos	0.8	70.994	89.892
resnet18	100	8192 (12864GPUs)	cos	6.4	70.165	89.374
resnet18	100	16384 (25664GPUs)	cos	12.8	68.766	88.381
resnet50	100	256 (328GPUs)	cos	0.2	77.252	93.430	Google Drive / cfg
botnet50	100	256 (328GPUs)	cos	0.2	77.604	93.682	Google Drive / cfg
Training log: https://gist.github.com/BIGBALLON/3d53c81b2b11ea5dd66417c2a985cd89
@oukohou

Hi, You really did a great job. But I am having some problems with your pre-trained model. I would like to ask how should I use botnet50.pth. I found no state_dict in it to load when I tried to run it. Then I tried to unzip it and only found a data.pkl file. And when I tried to load it, I got an error: _pickle.UnpicklingError: A load persistent id instruction was encountered.

@BIGBALLON   when I open the botnet50' model Hyperlink, Google Drive indicates that the file doesn't exist.

me too

Great work! Are the pretrained models availabel?

A pytorch version: https://github.com/BIGBALLON/distribuuuu/blob/master/distribuuuu/models/botnet.py,
The results (the model trained by distribuuuu) :
model	epoch	total batch	lr policy	base lr	Acc@1	Acc@5	model / config
resnet18	100	256 (328GPUs)	cos	0.2	70.902	89.894	Google Drive / cfg
resnet18	100	1024 (1288GPUs)	cos	0.8	70.994	89.892
resnet18	100	8192 (12864GPUs)	cos	6.4	70.165	89.374
resnet18	100	16384 (25664GPUs)	cos	12.8	68.766	88.381
resnet50	100	256 (328GPUs)	cos	0.2	77.252	93.430	Google Drive / cfg
botnet50	100	256 (328GPUs)	cos	0.2	77.604	93.682	Google Drive / cfg
Training log: https://gist.github.com/BIGBALLON/3d53c81b2b11ea5dd66417c2a985cd89
@oukohou

hello！ the botnet50 pre-trained model's Hyperlink doesn't work,can you share it for me,thank you！

@rookiiiie leave an email and i will send it to you.

my email<EMAIL_ADDRESS>

@rookiiiie leave an email and i will send it to you.

my email<EMAIL_ADDRESS>

@rookiiiie leave an email and i will send it to you.

hello！ the botnet50 pre-trained model's Hyperlink doesn't work,can you share it for me,thank you！
my email is<EMAIL_ADDRESS>

@rookiiiie leave an email and i will send it to you.

Hello! Can you please send pre-trained botnet50 model to me? My email is<EMAIL_ADDRESS>Thank you!

sent. Don't know if this behavior is appropriate, maybe you all contact the author first.

留下电子邮件，我会把它发送给你。

Hello, the botent50.pth

@rookiiiie leave an email and i will send it to you.
hello, can y sent pretrained botnet50 to me? my email<EMAIL_ADDRESS>

@rookiiiie leave an email and i will send it to you.

hello, can y sent pretrained botnet50 to me? my email<EMAIL_ADDRESS>

hello, can y sent pretrained botnet50 to me? my email<EMAIL_ADDRESS>

closing as my problem is solved, people who wants weights may contact the author first.


Use promiseWithValue in Swift code

We have a project with both Objc and Swift.
I am a newbie to PromiseKit
Version details
PromiseKit version: 6.8.3
Swift version: 5
Pods used:  PromiseKIt and PromiseKit/Alamofire
Now ObjC AnyPromise.h there's a method:
+ (instancetype __nonnull)promiseWithValue:(__nullable id)value NS_REFINED_FOR_SWIFT;
I need to use this method in Swift and send NSError as a parameter
Something like this but in Swift:
[AnyPromise promiseWithValue:TheInternet.cannotBeTrusted]
Now although the method declaration in **AnyPromise.h** says NS_REFINED_FOR_SWIFT, how do I find its redefined version for Swift?

AnyPromise(Promise(error:  myError))


Update index.html

Description

...
...
...

Related issue(s)

U haven't understood about the screenshot. Can u pls explain?
On Mon, 3 Oct, 2022, 11:52 am Vinayak Gavariya, @.***>
wrote:

@.**** commented on this pull request.
Can you just add a screenshot to your change please?
Will be happy to merge.
—
Reply to this email directly, view it on GitHub
https://github.com/VG-1/PlaylistAdda/pull/7#pullrequestreview-1127842167,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AUUMX25XJLNMNW4UYNHVSCTWBJ3RRANCNFSM6AAAAAAQ3I3QPI
.
You are receiving this because you authored the thread.Message ID:
@.***>


Debian 11 Wallet Support Issue?

This issue is raised in discord. Indeed Debian 11 was release just days ago.

FcoLeonSalazar — Today at 8:09 PM
@honglu69 since Debian 11 has been released do you think both cheetah and neng wallet will work ?
honglu69 — Today at 8:22 PM
not tested yet. Not sure for now.  Debian is big release, this would be in my next testing work on agenda.

Debian 11 is fully supported on v2.1.0 release.  The linux wallet is static linked so that any arm or x84_64 or i686 hardware should work now.


fix proper support for expandable calendar search

ref https://github.com/tobixen/calendar-cli/issues/52

one user reported that he was unable to fetch events where recurrances are within the time range.  Make sure this works, and make options to explicitly request this from the server
also, currently the server does not expand recurring events into multiple objects in a date search.  We need this feature for good agendas in calendar-cli.

7.8.3 is an example, and the formal definition is in section 9.6.5.
If I understand it right, the expand attribute should cause the server to expand a recurring vobject (i.e. "meeting every Wednesday at 12:00") into single vobjects ("meeting this Wednesday, meeting next Wednesday, ....).  Apparently the expand element is passed in the query (ref #40), so it's a bit weird that it doesn't work with calendar-cli.
Ref 7.8.1 and 9.9 recurring vobjects should be returned as long as any recurrences overlaps the query time.  Hence the calendar-cli bug reported that the agenda did not contain recurrences seems to be a server-side error.
Ref 7.6, 9.6.6 and 7.8.2 a calendar query can specify the limit-recurrence-set parameter to override the behaviour above - but limit-recurrence-set is not used in the caldav library presently.
Things to do:

Refactor the calendar query logic a bit to make it more flexible wrg of filtering and attributes sent (I think one of the major purposes of the library is to abstract away all XML interaction, so users of public methods should neither have to deal with XML nor any of the classes under caldav/elements ... at the other hand, I would also like to offer the full flexibility of the query language ... this is a bit tricky).
I think I will procrastinate support for the limit-recurrence-set attribute, but support to choose between expanded and non-expanded reports should be explicitly supported
We need test code that tests both expanded reports and non-expanded reports.
Ref #40, it may be needed with a test config flag to disable expanded searches from servers that don't support expanded searches

I think the work done suffices for release 0.6.0; the date_search now have a parameter "expand".  Default to true'ish for backward-compatibility.

Apparently I need to revisit this one.
There is some test code, but it's not very "hard".  I just wrote a comment that different servers behave differently, so the test code accepts a single non-expanded event as long as the RRULE given - but that's not really "expanded", is it?
Section-references above is (of course) referring to RFC4791
Example query: https://tools.ietf.org/html/rfc4791#section-7.8.3
When using the "expand"-flag to the date_search, the query created by the caldav library looks quite the same as the one given, except the namespace attribute looks a bit misplaced.  Could that be relevant?  I should check that up.

Now the XML sent from the caldav library looks quite the same as the example in the RFC.  Here is the body (manually added some whitespace for clarity):
<?xml version='1.0' encoding='utf-8'?>
<C:calendar-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:I="http://apple.com/ns/ical/">
  <D:prop>
    <C:calendar-data>
      <C:expand start="20081101T160000Z" end="20091103T160000Z"/>
    </C:calendar-data>
  </D:prop>
  <C:filter>
    <C:comp-filter name="VCALENDAR">
        <C:comp-filter name="VEVENT">
          <C:time-range start="20081101T160000Z" end="20091103T160000Z"/>
        </C:comp-filter>
      </C:comp-filter>
   </C:filter>
</C:calendar-query>

Looks quite the same as the example to me.
According to the example in the RFC, the result should be one vcalendar item with two events, both having a recurrence-id, none of them having rrule set.  From radicale I get this (no matter if expand is set or not):
<?xml version='1.0' encoding='utf-8'?>
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav"><response><href>/user1/pythoncaldav-test/19970901T130000Z-123403%40example.com.ics</href><propstat><prop><C:calendar-data>BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Example Corp.//CalDAV Client//EN
BEGIN:VEVENT
<EMAIL_ADDRESS>DTSTART;VALUE=DATE:19971102
CATEGORIES:ANNIVERSARY,PERSONAL,SPECIAL OCCASION
CLASS:CONFIDENTIAL
DTSTAMP:19970901T130000Z
RRULE:FREQ=YEARLY
SUMMARY:Our Blissful Anniversary
TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR

At least, for radicale it seems to be a reported issue on this: https://github.com/Kozea/Radicale/issues/662

The tests have been sharpened, and run towards calendar servers that properly supports the expand-attribute.
As per the assertions in the test itself, the caldav library returns the data it gets from the server - and that's one vCalendar object with multiple vEvents within.  I think this is the correct behavior, as the caldav library mostly should be focusing on the caldav communication, and not so much on the icalendar logic.  At the other hand it's also a bit confusing as the "Event"-class in the caldav library will always be wrapping a vcalendar object, and in this case the vcalendar object contains multiple events.
I guess it would be more intuitive to get a list of events rather than one event.  I've even expected that myself in the calendar-cli utility.  This explains #86
I will close this issue, and follow up further in #86


Unable to add profile at all

I just installed the algolia CLI via homebrew for MacOS (MacOS version 12.6.1, homebrew 3.6.19, algolia version 1.2.1). When running algolia profile add with credentials copied from my dashboard, the command fails with the error message, invalid application credentials. The credentials are valid, it's what I use in production. Adding the credentials as flags to the command does not work either.
I tried regenerating my admin API key to no avail. Has anyone else encountered this issue?

Hi Andrew!
Just as a sanity check in case your copy/paste operation is somehow missing a character or adding a special character, would you mind retrying by carefully manually entering your App ID and API key?

Yep.. that'll do it. In that case, I'd hope they fix the dashboard to not copy any special characters to your clipboard!

I copied both the application ID as well as the api key from the "API Keys" part of the settings menus, using the "copy to clipboard" buttons.
Chrome: Version 108.0.5359.124
MacOs 12.6.1
Terminal app-zsh

I have the same issue


Disable background service when Android synchronization is off

Checklist

[X] I have used the search function to see if someone else has already submitted the same bug report.
[X] I will describe the problem with as much detail as possible.

App version
6.904
Where did you get the app from?
F-Droid
Android version
LineageOS 21 / Android 14
Device model
No response
Steps to reproduce
Set :

Parameters
General parameters
Network
Background sync : when automatic sync is enabled

Now disable automatic sync in Android parameters.
Expected behavior
K9 sees that automatic sync in Android is disabled and stops the background service (same as K9 parameters > General parameters > Network > Background sync : never) .
When automatic sync in Android is enabled, K9 starts the background service (same as K9 parameters > General parameters > Network > Background sync : always).
Actual behavior
K9 background service is started even if Android sync is off.

Logs
No response

We want Push to be resumed when background sync is enabled again. The only way to accomplish that is to keep the Push service "running". However, it's not doing anything while background sync is disabled.

It's not impossible to be notified when the Android background sync setting is changed. However, if K-9 Mail is in the background at that time, it is not allowed to start the foreground service that is necessary for Push. Keeping the service around avoids this problem.


Using HA app

The problem
It may just be a documentation bug - I followed all instructions, and the tunnel works like a charm. Kudos for your hard work.
I was under the impression that I would be able to use this tunnel with HA apps as well. I am currently using the HA app for iPhone.
However, the app does not connect, there is no meaningful error message, and in the docs and elsewhere I could neither find mention of extra setup steps required to enable apps, or a clear statement that apps aren't supported and the tunnel is limited to normal browsers.
I'd greatly appreciate if you could point me into the right direction.
your add-on is so good and helpful that I am currently setting up instructions for noobs like me that are really simple to follow, and I'd like to include a definite statement in respect to using apps - any authoritative feedback appreciated.
What version of Cloudflared has the issue?
5.1.15
What was the last working version of Cloudflared?
No response
What type of installation are you running?
Home Assistant OS
Add-on YAML Configuration
No response
Anything in the logs that might be useful for us?
No response
Steps to reproduce the issue
On an iphone not connected to WiFi, in the browser navigate to the tunnel domain name = works perfectly well.
When opening the Home Assistant app, the screen basically freezes.
Additional information
No response

Hey @TobiasPSP, the (HA companion) apps should work out of the box with the Cloudflare tunnel.
There are known problems if application rules are defined for the Cloudflare tunnel in Cloudflares zero trust dashboard (e.g. https://github.com/brenner-tobias/addon-cloudflared/issues/654#issuecomment-2162698784).
You should check if the external URL (which can be configured in HA network settings) is correct and points to your Cloudflare tunnel URL. This setting is used to configure the external URL used by the companion apps while setting up the App for the first time.
Otherwise I would assume that there is a DNS cache problem with the iPhone or the iOS HA app. You may need to clear the cache in the app settings or reinstall the app and set it up from scratch.

Thank you very much for your prompt reply. Greatly appreciated.
I am using no Zero Trust (yet) and followed strictly the guide (local tunnel, all tunnel settings from add-in, no additional hardening except mandating https).
Maybe you would like to look over the steps I took which I published here: https://done.land/tools/software/homeassistant/internetaccess
Ultimate goal is to have a one-stop guide so this is going to expand for Zero Trust and many other secondary options.
If you come across errors in my write-up please correct me. I am fairly new to most of this.
Where in HA do I specify the external address?

If you come across errors in my write-up please correct me. I am fairly new to most of this.

Looks pretty good to me, really good work!
As there are no problems accessing HA through your browser, I wouldn't expect any problems related to the Cloudflare tunnel.

Where in HA do I specify the external address?

Settings > System > Network > Home Assistant URL

If you don't see this option, you need to enable 'advanced mode' for your user.
Profile Picture (bottom left) > General > User settings > Toggle Advanced mode

Thank you.
I had set this setting already. I just reinstalled the app but no difference:
when I launch the app, it shows a white screen and an orange gear icon in its right lower corner. It then stays like this forever. Web access in the browser works like a charm.
I am more than happy with just the browser but for my tutorial (and to understand what’s happening) I‘d love to solve this final part.
Do you maybe have another idea what I could try?
I‘ll meanwhile go ahead and try on my wifes‘ smartphone which never ran any ha stuff before to rule out caching issues.

Ok, so when I install the app on a new fresh smartphone, all runs perfectly, including the app.
which raises the question how I could refresh settings on a smartphone that I used with HA before setting up the tunnel :-)
When I uninstalled the HA app, it claimed to also delete all data associated with it. However, when I reinstalled it, it did not ask me about my HA server and apparently still used old information.
on the „fresh“ smartphone, during installation I went through a couple more setting dialogs…

This is what I get on the original smartphone where the HA app was installed before I added the tunnel:
NSURLErrorDomain code -1001
Request timed out

Ok, here is what solved it: on the problematic smartphone, when I launched the HA app, at the blank screen I clicked the gear icon, then went to servers. There was one entry for the local instance, and another for the domain. I deleted both.
On next app start, the app now behaved like on the „fresh“ smartphone, newly detected the local instance, and when I tried with WiFi off, it automatically connected to the tunnel.
no idea what to make of this, but it seems like a quick way to refresh all connections.
Let me iterate how awesome your add-on is - thanks to your great work, accessing HA from anywhere in a safe way is now possible even for noobs like me 👍

Glad it worked and thanks for letting us know how you solved it. 👍🏼


about PointCluster

I am a Surveying  Engineer and not good at programming. There's something I don't understand. in the process of PointCluster, why the function redistribute_points() is connected after the function insertPoint(). After it clears ALL points in the grid, and re-clusters and increases max_dist *20 , nothing more. The function insertPoint() seems no work!

Welcome! After all points have been inserted into the grid and cluster centers have been computed, the paper I've implemented here [0] recommends to recompute the assessment of points to the final clusters because this leads to better results overall.
This is what happens on line 106-107:
https://github.com/anitagraser/movingpandas/blob/210e7d24f233bcaf50a674742e7f1e558dcd48d0/movingpandas/trajectory_aggregator.py#L107
[0] Andrienko, N., & Andrienko, G. (2011). Spatial generalization and aggregation of massive movement data. IEEE Transactions on visualization and computer graphics, 17(2), 205-219

Thanks for your reply
---Original---
From: "Anita<EMAIL_ADDRESS>Date: Tue, Sep 8, 2020 00:32 AM
To<EMAIL_ADDRESS>Cc: "greatathrun"<takuquan<EMAIL_ADDRESS>Subject: Re: [anitagraser/movingpandas] about PointCluster (#79)
Welcome! After all points have been inserted into the grid and cluster centers have been computed, the paper I've implemented here [0] recommends to recompute the assessment of points to the final clusters because this leads to better results overall.
This is what happens on line 106-107:
https://github.com/anitagraser/movingpandas/blob/210e7d24f233bcaf50a674742e7f1e558dcd48d0/movingpandas/trajectory_aggregator.py#L107
[0] Andrienko, N., & Andrienko, G. (2011). Spatial generalization and aggregation of massive movement data. IEEE Transactions on visualization and computer graphics, 17(2), 205-219
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.


Set post status (Issues 13-17)

develop
GitHub Board
Issue link
#11 Issue name
Story link
#11 Story
Code reviewers

[ ] @github_username

Summary of issue

[ ]  Summary of issue
[ ]  Summary of issue

Summary of change

[ ]  Summary of change
[ ]  Summary of change

Looks good for me


What to do when $NINJA points to an invalid ninja executable?

I think something is off with the code that verifies the ninja version in get_requires_for_build_wheel() and when the NINJA environment variable is set: if the variable points to a path that does not exist or to an executable that reports a too old version, we ask the ninja package to be installed. In build_wheel() the NINJA environment variable is updated only if not set, thus it still points to the invalid ninja and Meson will fail when meson-python executes meson setup.
I think that failing when the NINJA environment variable is set incorrectly is the right thing to do. However, we could fail a bit sooner, in particular without installing the ninja package that is never going to be used.

Yeah, that makes sense.
cc @henryiii

Agree, it was an oversight, we should not request ninja if NINJA is set.

In build_wheel() the NINJA environment variable is updated only if not set, thus it still points to the invalid ninja

Hmm, but why does it need to be set at all? The code being used to set it is the same code used to detect if it exists, which is also modeled on the same code Meson uses.
Specifically:

if $NINJA is set, it is always a no-op:

and valid, it is setdefault'ed to the path it already is
and invalid, it is not setdefault'ed to anything

if it is unset, it gets set to the detected version on $PATH, if any

The code only takes effect if the variable is unset. But in that case what you really care about is that meson running in the isolated env can pick up the relevant meson from either the system PATH or the pip-installed build_requires. Which Meson handles without setting this variable.

I think it was "defensive coding" against the ninja discovery algorithm used in meson-python and the one used in Meson diverged. I agree that it is not necessary.

Hmm, fair enough :) it should be harmless either way and unrelated to this problem.
Perhaps _env_ninja_command() should check at the very bottom, right before falling out of the function with return None, if env_ninja is actually something. If it's something, but the version check failed, then raise an error instead of returning None.


Docsify Setup

[ ] Upload a template
[ ] GitHub pages
[ ] Gitlab pages

Already Covered in docsify docs


It's not working on my mac (10.11.5)

This is my code:
const chalk = require('chalk');

console.log(chalk.red('TOTOTOTOT'));
console.log(chalk.blue('Hello world!'));

It just prints white text in iTerm and Terminal
package.json
"chalk": "^1.1.3",

What am I doing wrong here?
Thanks

Probably a bad install or dependency mix-up or something.
Do this and tell me what prints:
const util = require('util');
console.log(util.inspect(chalk.red('foobar')));

'foobar' (in white)
here is my package.json
  "dependencies": {
    "aws-sdk": "^2.3.14",
    "axios": "^0.11.1",
    "babel-polyfill": "^6.9.0",
    "body-parser": "^1.15.1",
    "chalk": "^1.1.3",
    "co": "^4.6.0",
    "express": "^4.13.4",
    "express-routeloader": "^2.0.0",
    "le_node": "^1.3.1",
    "moment": "^2.13.0",
    "mongoose": "^4.4.19",
    "mysql": "^2.10.2",
    "mysql-promise": "^3.0.0",
    "source-map-support": "^0.4.0",
    "superagent": "^1.8.3"
  },
  "devDependencies": {
    "assert": "^1.4.0",
    "babel-cli": "^6.9.0",
    "babel-core": "^6.9.0",
    "babel-preset-es2015": "^6.9.0",
    "babel-preset-stage-1": "^6.5.0",
    "babel-watch": "^2.0.2",
    "mocha": "^2.5.1",
    "mongodb": "^2.1.19"
  },
  "babel": {
    "presets": [
      "es2015",
      "stage-1"
    ]
  }

Please show me the output of the following commands:
$ echo $TERM
$ echo $SHELL
$ echo $TERM_PROGRAM
$ [ -t 1 ] && echo yes || echo no

echo $TERM
xterm
echo $SHELL
/bin/bash
echo $TERM_PROGRAM
iTerm.app
[ -t 1 ] && echo yes || echo no
yes

When you run your script, run it like this:
$ FORCE_COLOR=1 node /path/to/your/script.js

Does it output color?

yes it does!

What command line are you using to invoke your program when it only shows white?

is it maybe because I spawn a node process that spawns another node child process, and that it's the second process that does the logging?

Yes. The child process is piped to the parent process which makes isatty() return 0 (false) within the child process.
Pass an env entry with FORCE_COLOR=1 to the child.
Some pseudo-code:
child_process = ...

if chalk.supportsColor then
    child_process.env.FORCE_COLOR = '1'
endif

thanks!

I'm not spawning any child process but I'm not getting any output from Chalk. No errors either.
I've tried console.log(chalk.supportsColor) and I get true.
I'm on 10.11.6 using either iTerm or Terminal.
I'm launching my script with NPM, nothing fancy here.
packages.json
  "scripts": {
    "do-something": "node something.js",
  }

Then on the terminal:
npm run do-something

Chalk is working just fine in that case. Something is wrong with your terminal. Please update it :)

I'm using the latest versions of both apps.

Does printf "\u001b[31mHello\u001b[m" work?

Nope
iTerm

Apple Terminal

I'm not sure what to tell you. For the chalk problem, I'd have to see the output. For the above problem, it appears whatever implementation of printf you have doesn't escape strings.
What version of OS X are you running?

node <<< "console.log('\x1b[31mhello\x1b[m')" outputs hello in red.
I'm on 10.11.6 and using Node 6.3.0

Btw printf is a builtin and sh doesn't support escapes so that might explain it.
So the node snippet works. Does node <<< "require('chalk').red('hello')" work?

Yes, that does indeed work...
 Do I have to use console.log() with chalk?
I completely missed the message in the docs:

Here without console.log for purity.

I'm really sorry for wasting your time.

@PierBover made the same mistake.
The sample code on npm does imply you can just do:
chalk.blue('Hello');
Instead of:
console.log(chalk.blue('Hello');


Fix index out of bounds during selection

This reworks the selection logic to prevent any possible index out of
bounds exceptions by clamping the start and end points before doing
anything else with them when converting selections to spans.
This also fixes a bug where semantic selections would not automatically
expand across double-width characters.
Fixes #2486.

Confirmed fixed for me, using both yes and while true; do echo no; done. Just as I was starting to look into it :sweat_smile:
Good work!

@cole-h Hah, thanks for testing. If you found alternative solutions that might be better, feel free to let me know.
Though I think this is pretty good already, since I've chosen to refactor a fair bit and clean stuff up. Hopefully that makes everything a little more readable now too.

Your solution looks much more elegant than what I had going (which wasn't much; only recently found time to try and work on it). The refactor is a nice bonus.
I also like that sneaky typo-fix at https://github.com/jwilm/alacritty/pull/2511/files#diff-7e09fea17462febd06d3b5bdd2b4512aR444 :wink:


Rework oxc_prettier

crates/oxc_prettier was my attempt at the prettier bounty.
I thought I could finish it in time, except the fact that I rushed too quickly without looking at all the requirements ... It was too late when I got blocked by printing comments.
In order to rework oxc_prettier, we need to understand at least:

How to debug prettier
The Doc IR https://github.com/prettier/prettier/blob/main/commands.md https://github.com/oxc-project/oxc/blob/main/crates/oxc_prettier/src/doc.rs
How to handle comments https://github.com/prettier/prettier/blob/main/src/language-js/comments/handle-comments.js
How to handle parentheses https://github.com/prettier/prettier/blob/main/src/language-js/needs-parens.js

As for the infrastructure, we already have most of the code:

https://github.com/oxc-project/oxc/tree/main/tasks/prettier_conformance shows our js compat is at js compatibility: 264/586 (45.05%). But we need to update prettier to latest make sure this conformance runner still works.
All the code in https://github.com/oxc-project/oxc/tree/main/crates/oxc_prettier mimics and ports prettier https://github.com/prettier/prettier/tree/main/src/language-js

Feel free to remove everything and start from scratch, and copy over the format code https://github.com/oxc-project/oxc/tree/main/crates/oxc_prettier/src/format

I'm sorry to take up some of your time, but I feel confused about the following issues, so please allow me to ask you a few questions...
As we konw, the next minor release of ESLint will deprecate core formatting rules.  But this also means that the linter itself originally had code formatting capabilities, so why isn't Oxlint directly compatible with plugins like ESLint Stylistic? Are there some corner cases where Oxlint doesn't work as well as Prettier, so Oxlint had to be compatible with ESLint and Prettier separately, or it's just a divide-and-conquer engineering trade-off？
I'm guessing one of the reasons for this is that Prettier can support different file formats (not only .js, but also .css and more...), but ESLint or Oxlint can do the same job via plugins.
Thanks.

We made an intentional decision to only support code correctness rules, not stylistic rules. @Boshen can explain reasoning more.

@leaysgur is writing a series of articles in preparation of this task:

Prettier のコードを読む Part.3
Prettier のデバッグ方法について
Prettier のコードを読む Part.2
Prettier のコードを読む Part.1

I'm also working on comment attachments to unblock prettier.

Does this mean that you aim to implement Prettier equivalent which achieves with 60+ utils? 🫨
FYI: Babel also has relevant code(just 300 loc), but that did not seem to meet Prettier's requirement.

Does this mean that you aim to implement Prettier equivalent which achieves with 60+ utils? 🫨

We need to figure out what exactly is prettier doing with those 60+ utils 🥲

For those who are interested in algorithms under the hood, prettier is based on  https://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf,

It has been 3 weeks since I started reading the Prettier source code.
It's still far from being complete, but I'd like to leave some progress and summary here.

How to debug Prettier

There are 3 ways:

Playground

Enable "Debug" options in the sidebar

CLI

With --debug-* args

Node.js API

Under __debug exports

https://leaysgur.github.io/posts/2024/09/03/111109/

It is written in Japanese, but it is all code, so you can understand it. 😉
I also recommend to run node --inspect-brk the code with debugger and inspect it from Chrome DevTools.

How to handle comments

I will post some topics for discussion in a few days.

How to handle comments

As you may know, Prettier's formatting process consists of roughly 3 phases:

P1: original text > AST
P2: AST > Doc
P3: Doc > formatted text

Comments are collected in P1 and used in P2.
In P1:

It simply parses to the AST with comments in the output

However, there are also some adjustments made to the AST nodes
Some parsers, such as Babel, already attach comments to nodes at this stage

However, Prettier does not use them
The reason is to support parsers other than Babel

As the final step of P1 (more technically, the beginning of P2), comments are classified and attached to nodes

First, it starts by finding nearby nodes for each comment
Based on that, it determines the placement(ownLine, endOfLine, remaining) from the lines before and after each comment
Then, it handles about 30(!) known special patterns for each placement
Finally, it finishes using unique tie-breaking algorithm

As a result, some AST nodes have comments property with array of Comment extended with leading, trailing and few more props.
In P2 (I haven’t read the code in detail here yet),

When each node is converted into a Doc, comments are also converted into Docs

Therefore, how they are output seems to have already been decided in P1

In OXC, part of the necessary information is already implemented and can be obtained. / #5785
However, just like with Babel, that information may be different from what Prettier requires...

So, I think I’ve generally understood "what" Prettier is doing.
However, as for "why" Prettier does it that way, I can only say it’s because that’s Prettier’s opinion.
Incidentally, there seem to be at least around 120 issues related to JS/TS at the moment, but

https://github.com/prettier/prettier/issues?q=sort%3Aupdated-desc+is%3Aissue+is%3Aopen+label%3Alang%3Ajavascript%2Cjsx%2Ctypescript+label%3Atype%3Abug

about 50 of them are related to comments, with some remaining unresolved since as far back as 2017.

https://github.com/prettier/prettier/issues?q=sort%3Aupdated-desc+is%3Aissue+is%3Aopen+label%3Alang%3Ajavascript%2Cjsx%2Ctypescript+label%3Atype%3Abug+label%3Aarea%3Acomments

So, what I would like to discuss(confirm?) is: where should oxc_prettier aim to go?
As the name suggests, should it strive for 100% compatibility with Prettier?
If the goal is to achieve compatibility, I think it would mean porting almost all of Prettier’s lines.

Prettier’s coverage is impressively high at 99%.

https://app.codecov.io/gh/prettier/prettier/tree/main/src

Since we don’t use CST like Biome, many of them cannot be omitted
We would also end up porting the same issues I mentioned above

I believe the original aim of this issue was this, but again, is this an acceptable?
If we decide to proceed, let’s consider how we might specifically approach it...
Fortunately, the 3 phases have isolated inputs and outputs, so:

If we have AST + Comments (in .json), we can create a Doc
If we have a Doc (in .json), we can generate formatted text

I think reducing the gaps between each phase will be important.
For that, we’ll need some way to directly compare the result of Prettier.parse() with our implementation.

For example, we could resolve the issue of making our AST ESTree-compatible first?

Fortunately, we know Prettier can run without line|column

https://gist.github.com/leaysgur/411636c61f20558ced9e08a394dc7584

Alternatively, complete the experiment of aligning with Babel AST?

https://github.com/leaysgur/prettier?tab=readme-ov-file
Prettier supports not only ESTree but also Babel AST directly, and OXC AST has many similarities with Babel AST

// OXC
let oxcASTWithComments = oxc_prettier::parse(text);
let oxcEstreeASTWithComments = estreeJSON(oxcASTWithComments);
// let oxcBabelASTWithComments = babelJSON(oxcASTWithComments);

// Prettier
let prettierEstreeASTWithComments = Prettier.parse(text, { parser: "meriyah" });
// let prettierBabelASTWithComments = Prettier.parse(text, { parser: "babel" });

// Diff!
assert(oxcEstreeASTWithComments, prettierEstreeASTWithComments);

What if we don’t aim for full compatibility?

For example, we could continue to use Prettier just as a reference?

But handle comments in our own way without focusing on compatibility
In my opinion as a user, it would be fine to simply restore comments as close to their original positions as possible without special handling

(More personally, I also dislike when parentheses are removed without permission)

But in that case, maybe it would be more like oxformat rather than oxc_prettier?
Anyway, this is what I was thinking these days. What do you think?

For the long run, I envision a more configurable and less opinionated formatter.
Under this assumption, we can relax the "100% compatibility" constraint.
My intention is to reach a high compatibility with prettier so we can bootstrap ourself, and then start deviating behavior.
I've also looked at the prettier and rustfmt issues before, comment positioning is a really difficult subject due to the natural of matching the original intent of the comment.
To move things forward, I suggest @leaysgur to start refactoring our prettier code in preparation for what to come, I believe you know what about prettier than I do. You may ask @Sysix for help given they have started working on this area as well.
Our current code for P2 and P3 is also incomplete, I also suggest to do a little bit of rework first, as well as adding more debug utilities.

I think reducing the gaps between each phase will be important.
For that, we’ll need some way to directly compare the result of Prettier.parse() with our implementation.

I don't think we need to do this. This will leave us too coupled with the prettier implementation, and it may end up being a waste of effort.
We are already matching half of the generated text, a few more iterations of refactoring and implementing details should close our gap to prettier.

I see, what I likely concerned about was: what exactly is meant by "high compatibility". 😅
Does it have to be 100%, or should aim for at least 80% if possible, or is something around 70% good enough? etc...
So, It's good to know that we're not necessarily aiming for 100% compatibility.
It's still uncertain how much the percentage will drop if we give up on porting completeness for comment handling, but for now, I'll move forward.
Following your suggestion:

Understanding and refactoring the oxc_prettier
Continuing with code reading of Prettier from P2

I’ll work on these whenever I have time! 🚀

For the long run, I envision a more configurable and less opinionated formatter.

I love this idea!

For the long run, I envision a more configurable and less opinionated formatter.

Does this mean that oxc_prettier will provide a wide range of configurable options, and offer a preset called prettier to match with prettier?

@leaysgur I was just informed that biome_formatter is a port of the Prettier IR and printer infrastructure. It may be possible to reduce repeated work by using biome_formatter. More investigation for the rework!
So instead of using our current unfinished IR and printer, we can replace them with biome_formatter.

Thanks for the pinning!

biome_formatter is a port of the Prettier IR and printer infrastructure.

Yes, and I just started reading through biome_formatter and biome_js_formatter, so the timing is perfect. 😄
I hadn’t considered it as a viable option for OXC (though I’m not entirely sure why), but if we shift our goal to generating biome_formatter's IR, it could significantly reduce the amount of work, maybe?
I’ll look into this soon (after finishing the regex parser rework), including:

General architecture: https://github.com/biomejs/biome/blob/main/crates/biome_formatter/CONTRIBUTING.md
How their CST(especially comments) is used
biome_formatter IR, aka format_element
etc...

but if we shift our goal to generating biome_formatter's IR

biome_formatter IR, aka format_element

I think it's the same thing as prettiers IR. Also Doc in our code.

Hey all, just dropping by!

My intention is to reach a high compatibility with prettier so we can bootstrap ourself, and then start deviating behavior.

I feel adding support for comments to the current implementation should be feasible.
In fact, I suspect it'll give us a significant boost on the prettier conformance test suite from the current 39%.
We don't have to follow prettier's implementation exactly, but we can do something close to it.
Since the oxc_ast's Program node already stores a pub comments: Vec<'a, Comment> field,
we could just repurpose it to add a third pass over the Doc objects (before the Commands are generated)?
I think it'd end up looking similar to what @leaysgur showed here.
I could do a PoC on my fork and have it up in some time.
Would any of you be interested in taking a look, perhaps?

I want to share my overall idea from end user perspective: After oxc_prettier will be created I suggest to create something like eslint-plugin-oxc-prettier in future for using oxlint with that plugin to show problems in IDE / console and fix it as eslint-plugin-prettier does.

you might want to consider running prettier (or oxc_prettier later) separately:
https://www.joshuakgoldberg.com/blog/you-probably-dont-need-eslint-config-prettier-or-eslint-plugin-prettier/

Recently, I've been reading and researching the code related to Biome's Formatter.
I'd like to note some of my learnings and progress here.
biome_formatter and biome_xxx_formatter
In the Biome repo, the biome_formatter crate is used as infrastructure to implement Formatters for each language.
According to CONTRIBUTING.md, the implementation on each language side(e.g. for JS) is as follows:

Use the biome_rowan crate to define AST/CST nodes as biome_js_syntax

Also used as the parsing result of biome_js_parser

In the biome_js_formatter crate:

Implement the FormatRule trait (compatible with the format! macro) for all those nodes
Implement JsFormatLanguage that implements the FormatLanguage trait

Contains information like context and handling of comments

Then, call biome_formatter::format_node(parsed_tree, format_language)

Performs preprocessing on the AST/CST, finds attached comments, and converts to IR
By calling print() on the return value, you get the formatted string

If I understand correctly, to fully benefit from biome_formatter, we need the AST/CST defined using biome_rowan.
In the Biome repo, that's natural, but since we want to use OXC's AST, we cannot choose this way.
biome_formatter::Printer
As another way to utilize the biome_formatter, using only its IR and Printer may be possible.
A concern is that the IR and its builders also depend on biome_rowan.
Possibly, some of them may not be usable, and in the worst case, there may be no alternative.
Due to my lack of my Rust experience, I couldn't make this judgment from the code and types alone, I think I need to write some code to verify it. I might find problems in more fundamental parts...🥲
Also in this case, the formatting options are limited to those defined in PrinterOptions.

indent_width
print_width
line_ending
indent_style
attribute_position
bracket_spacing

https://github.com/biomejs/biome/blob/main/crates/biome_formatter/src/printer/printer_options/mod.rs#L8

If we want to perform more flexible formatting, we'll have to fork it.
Biome's IR
Biome's IR is called FormatElement, and kinds are:

Space
HardSpace
Line
ExpandParent
StaticText
DynamicText
LocatedTokenText
LineSuffixBoundary
Interned
BestFitting
Tag

https://github.com/biomejs/biome/blob/main/crates/biome_formatter/src/format_element.rs#L19

They are similar but not the same as Prettier's Doc.
Biome also has a struct called Document, but this just holds a Vec<FormatElement>.

https://github.com/biomejs/biome/blob/main/crates/biome_formatter/src/format_element/document.rs#L17

Although the final formatting result is compatible with Prettier, it's better to think of the intermediate processes are entirely different(more sophisticated).
Formatting flow
Basically proceeds in the same way as Prettier.

Parse the code string into an AST/CST
Preprocess the parsed tree

Normalize () and logical expressions, just like Prettier

Collect comments

Checking line spacing between comments and nodes, as in Prettier
Determining the placement of comments also requires heavy conditional branching

Traverse the tree and convert it into Vec<FormatElement>

Each node knows its own formatting rules
Comments are converted similarly

Convert Document::from(format_elements) into a code string

A part different from Prettier is the determination of whether () are necessary.
In the case of Biome, it seems that information is held on the node definition side of biome_js_syntax.

https://github.com/biomejs/biome/tree/main/crates/biome_js_syntax/src/parentheses

As for comments, it seems a lot of code is needed, with both biome_js_formatter and biome_formatter having over 1,000 lines of code.
If we declare Prettier compatibility, it means our codebase will also need a corresponding amount of code...

As the next step, I'm planning to write some code to see whether using only Printer is feasible.
I'm also thinking, "Should we aim for Prettier-compatible comment formatting by creating/maintaining all that code again?" ... but I'm not sure.😌

Progress: An experiment to see if we can use just the Printer from biome_formatter
Based on biome_formatter::format_node(), here's a minimal code example that reproduces a similar flow.

https://gist.github.com/leaysgur/de62398266ef98edcf7a0e3c06325538

My personal impression is that it doesn't seem impossible, but I'm not yet sure if it's the right path. 😅
Here's what I've found out:

To use Printer, create it with Formatted::new(document, context) and then call print()

A Document can be created from a Vec<FormatElement>

In the original code, document.propagate_expand() is called before creating Formatted

However, this propagate_expand() is pub(crate), so it can't be used for us(❗)
It seems it would work if you copy it entirely and adjust the types, but...

FormatElement is constructed using helpers under builders::*

Regarding text printing, there are 3 types of IR and helpers:

StaticText: Accepts &'a static only
DynamicText: Accepts &str, but requires a starting position by biome_text_size::TextSize
LocatedTokenText: Requires a biome_rowan::SyntaxToken

In OXC's AST, tokens can only be generated using StaticText

Because there's no AST corresponding to new in new Foo()

Dynamic parts are often represented with Atom<'a>, so they can't be &'a static

Of course, they can't be SyntaxToken either
That means we have to use DynamicText, but for that, we need to provide a TextSize
While the start of Span fits the type, internal behavior and policy differences may affect things(❗)

In the first place, I'm not sure what is the sourcemap used for in the Formatter

I mentioned "minimal" at the beginning because this Gist does not use the Format trait, which is center of the biome_formatter.

We cannot directly implement the trait from the biome_formatter crate in the oxc_ast crate

Due to Rust's orphan rule

To cope with this, it requires a lot of boilerplate code

While it's understandable that Biome needs these as common infrastructure, but how about for us?

To refer to Biome's code and use other helpers, it might be better to implement it

There are parts we can avoid even with format_with(), but still

Next, I will check this part.

@leaysgur Thank you so much for the research. I think it's enough evidence to just implement our own thing (with some parts ported from Biome)?

to just implement our own thing

Yes..., I also think that's probably the case.
And if we choose to go our own way, even if there are parts we can refer to, I feel there won't be any parts where we can borrow as code. 😓
Go back to the square one, I will re-start by understanding/refactoring the current code, and then think about what to do next.

@leaysgur will lead this project, and is free to make any changes.

Thanks~!
Progress is likely to be slow due to limited resources, but I will try to update progress every 2-3 days or so at the latest comment on this issue.

Now I'm working on:

Reading current oxc_prettier source
Refactoring macro usage, Doc creation, code structure, etc...

Next, I'll check our current implementation. Fully or partially implemented? not yet covered?

You can assume all are partially implemented 😅
Cross referencing the function in our code to the prettier counter part would definitely make things easier to follow.

JS
AST Entry points
👀: Format implemented / 🚧: W.I.P. / ✨: Completed

AST Node
St.
Notes

RegExpLiteral
👀

BigIntLiteral
👀

NumericLiteral
👀

StringLiteral
👀

NullLiteral
👀

BooleanLiteral
👀

EmptyStatement
👀

ExpressionStatement
👀

ChainExpression
👀

ParenthesizedExpression
👀

AssignmentExpression
👀

VariableDeclarator
👀

BinaryExpression, LogicalExpression
👀, 👀

AssignmentPattern
👀

MemberExpression
👀

MetaProperty
👀

Identifier
?
Identifier(Reference/Name)<'a>?

SpreadElement, SpreadElementPattern, SpreadPropertyPattern, RestElement
👀, ?, 👀, ?
BindingRestElement<'a>?

FunctionDeclaration, FunctionExpression
👀
Function<'a>

ArrowFunctionExpression
👀

YieldExpression
👀

AwaitExpression
?

ExportDefaultDeclaration, ExportNamedDeclaration, ExportAllDeclaration
👀, 👀, 👀

ImportDeclaration
👀

ImportSpecifier, ExportSpecifier, ImportNamespaceSpecifier, ExportNamespaceSpecifier, ImportDefaultSpecifier, ExportDefaultSpecifier
👀, 👀, 👀, -, 👀, -

ImportAttribute
👀
ImportAttributeKey<'a>?

Program, BlockStatement, StaticBlock
👀, 👀, 👀

ClassBody
👀

ThrowStatement
👀

ReturnStatement
👀

NewExpression, ImportExpression, OptionalCallExpression, CallExpression
👀, 👀, -, 👀

ObjectExpression, ObjectPattern, RecordExpression
👀, 👀, -

Property
?
Property(Key/Definition)<'a>?

ObjectProperty
👀

ObjectMethod
?
MethodDefinition<'a>?

Decorator
-

ArrayExpression, ArrayPattern
👀, 👀

SequenceExpression
👀

ThisExpression
👀

Super
👀

Directive
👀

UnaryExpression
👀

UpdateExpression
👀

ConditionalExpression
👀

VariableDeclaration
👀

WithStatement
👀

IfStatement
👀

ForStatement
👀

WhileStatement
👀

ForInStatement
👀

ForOfStatement
👀

DoWhileStatement
👀

DoExpression
-

BreakStatement, ContinueStatement
👀, 👀

LabeledStatement
👀

TryStatement
👀

CatchClause
👀

SwitchStatement
👀

SwitchCase
👀

DebuggerStatement
👀

ClassDeclaration, ClassExpression
👀, 👀
Class<'a>

ClassMethod, ClassPrivateMethod, MethodDefinition
👀, 👀, 👀

ClassProperty, PropertyDefinition, ClassPrivateProperty, ClassAccessorProperty, AccessorProperty
👀, 👀, 👀, 👀, 👀

TemplateElement
👀

TemplateLiteral
👀

TaggedTemplateExpression
👀

PrivateIdentifier
👀

PrivateName
-

ArgumentPlaceholder
-

ModuleExpression
-

Printer APIs
👀: File and fn exits / 🚧: W.I.P. / ✨: Completed

File
Function
St.
Notes

array
printArray
👀

isConciselyPrintedArray
-
print_array_elements_concisely?

arrow-function
printArrowFunction
👀

assignment
printAssignment
👀

printAssignmentExpression
👀

printVariableDeclarator
👀

isArrowFunctionVariableDeclarator
-

binaryish
printBinaryishExpression
👀

shouldInlineLogicalExpression
👀

block
printBlock
👀
print_block_body?

call-expression
printCallExpression
👀
is_commons_js_or_amd_call?

class
printClass
👀

printClassBody
👀

printClassMethod
-

printClassProperty
👀

decorators
printClassMemberDecorators
-

printDecorators
-

expression-statement
printExpressionStatement
-

function
printFunction
👀

printMethod
👀

printMethodValue
-

printReturnStatement
-
print_return_or_throw_argument?

printReturnType
-

printThrowStatement
-
print_return_or_throw_argument?

shouldPrintParamsWithoutParens
-

function-parameters
printFunctionParamteres
👀

shouldBreakFunctionParameters
-

shouldGroupFunctionParameters
👀

shouldHugTheOnlyFunctionParameter
👀

literal
printLiteral
-

member
printMemberExpression
-

printMemberLookup
-

module
printExportDeclaration
👀

printImportDeclaration
-

printImportKind
-

printModuleSpecifier
👀

object
printObject
-
print_object_properties?

property
printProperty
-
property.rs?

printPropertyKey
-

statement
printStatementSequence
👀

template-literal
printTemplateLiteral
👀

printTaggedTemplateLiteral
-

ternary
printTernary
👀

semicolon
shouldPrintLeadingSemicolon
-

call-arguments(utils)
printCallArguments
👀

member-chain(utils)
printMemberChain
-

misc
adjustClause
👀

printAbstractToken
-

printBindExpressionCallee
-

printDeclareToken
-

printDefiniteToken
-

printFunctionTypeParameters
-

printOptionalToken
-

printRestSpread
-

printTypeScriptAccessibilityToken
-

JSX, TS
TBD, later... 🥲

I will investigate again and update - and ? things later. Then, start checking it is completed or not.

How to handle parentheses

The basic flow is:

When parsing the AST, ParenthesizedExpression is generally removed
However, not all of them are removed
There are cases where they should be preserved, such as JSDoc casts like /** @type {Type} */ (x)

In the first place, when using a parser compliant with ESTree, ParenthesizedExpression does not exist
Therefore, even in Prettier, the behavior changes when using parsers other than Babel...

https://github.com/prettier/prettier/issues/8171

Then, when converting to IR, re-add () if necessary
This is determined by needs_parens().

https://github.com/prettier/prettier/blob/3.4.2/src/language-js/needs-parens.js

The current issues in oxc_prettier:
1: It assumes specifying preserve_parens: false as an option for oxc_parser.
However, as mentioned above, this cannot keep the () that should be preserved.
2: needs_parens() check is done in the wrap! macro, but it is not applied to all AST nodes.
Basically it can be implemented for each AST node with default: false like Biome does, but...
And for wrap! macro, I think collecting nodes and printing comments+parens can be decoupled. I will revisit this later.

For the time being, I'd like to work on updating the table above. Maybe next week, as soon as I can find the time. 💪🏻


Dockerfile for trino is not working

Hi

I am not able to find .tar.gz file after building ranger project. I have jar files only in the target directory.

@nil1729 any help will be really appreciated. Thanks!

@bhargav2427  Can you please provide a few more details about the environment?

Trino Version
Java Version
How you have built the Ranger

Thanks for your reply @nil1729

Trino Version: 450
Java Version: 11
I am building using commandmvn clean compile package install from the root directory of ranger.
I am building ranger project from release-ranger-2.4.0 tag.

Have you followed the steps mentioned here?
As far as I know, Trino 450 is running on JDK 21. I'm not sure if the built plugin can be installed on Trino 450.
Can I know why you are adopting Apache Ranger? If it's specifically for Trino ACL, you might want to check out OPA
--
Try building the Ranger plugin with JDK 17 using the commands mentioned in the README. I believe the README indicates that the first command will generate the Ranger Admin package, and the second one is for the Trino plugin. I'll fix the README accordingly.


Release/support roadmap in documentation

Is your feature request related to a problem?
I can not find easily info on the release cycle, python versions support, when they would be dropped,  etc.
It's handy to  know e.g. how long would python 3.11 be supported by xarray.
Describe the solution you'd like
We could add a new page in the documentation, similar to Development roadmap, but targeting users.
Say,  "Release Roadmap", with info on:

release cycle
when support (=releases) would cease for a given python version

I understand the release cycle isn't on strict schedule, but then we could mention that, or what the project is striving to achieve.
Describe alternatives you've considered
I have been looking around the project but did not find an overview. If I missed it, my apologies. Let me know :)
Additional context
Nowadays I work on hardening xarray-based workflows for production.
Some of the target systems are rigid.
When designing new systems, it is important to get the python version/env right the first time.
And for aging in-place systems, to plan the update wisely.

Love the renewed web design and landing page by the way. Thanks to all contributors involved.

We could add a new page in the documentation, similar to Development roadmap, but targeting users. Say, "Release Roadmap", with info on:

hm, or not a new page, but generalizing the "development roadmap" into just "Roadmap" and add said info to it.

Over the past two years we've been trying to release at least once a month. This didn't always work out exactly (there's no release in August this year, for example), but in general it's safe to say we try to release every 1-2 months.
The minimum versions policy is documented in the installation guidelines. I guess this is a bit difficult to read (so we might want to change that), but what the time windows mean is that we can require a version as soon as it is older than N months.
python 3.11, for example, will be supported until python 3.12 is at least 30 months old, i.e. until at least April 2026 (python 3.12 has been released in Oct 2023). This means that we tend to support libraries a bit longer than SPEC-0 recommends.

@keewis thank you for elaborating. I reckon i must not be the only one looking for this info, so it may be worth consolidating in the docs in one place.


five_mem_node bench fails with panic

Describe the bug
A clear and concise description of what the bug is.
I am trying to run five_mem_node example using next command:
To Reproduce
Steps to reproduce the behavior:

Run five_mem_node example

$ cargo run --color=always --package raft --example five_mem_node

See error

Expected behavior
Should run without failure
System information

CPU architecture: x86
Distribution and kernel version:  Ubuntu 18.04 LTS, kernel 4.15.0-47-generic
SELinux on?: no
Any other system details we should know?: Rust 1.35.0-nightly

PTAL @Hoverbear

Duplicate of https://github.com/pingcap/raft-rs/issues/205, fixed by https://github.com/pingcap/raft-rs/pull/213

Thanks for reporting this, it's already been reported. Please follow the linked issue.


CORS not blocking requests?

I tried to create a sample project implementing a CORS policy. My CORS configuration specifically indicated that the allowed origin should come from http://microsoft.com.
public void ConfigureServices(IServiceCollection services)
        {
            services.AddCors(options =>
            {
                options.AddPolicy("CORSPolicy", builder=>builder.WithOrigins("http://microsoft.com"));
            });

            services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
        }

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseCors("CORSPolicy");

            app.UseMvc();
        }

However, when I ran the project, the APIs were still accessible via my local browser.

I'm sorry if I am missing something here but is ASP.NET Core smart enough not to execute the CORS Policy if it sees that the request actually comes from the same domain?
If it is, maybe we can update the How CORS works section so noobs like me knows?

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

ID: 59bca5db-1196-2a8b-a0d8-4e89b2382288
Version Independent ID: d3f332c4-4c60-039e-0e1e-bc6b11831f87
Content: Enable Cross-Origin Requests (CORS) in ASP.NET Core
Content Source: aspnetcore/security/cors.md
Product: aspnet-core
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

Localhost is not a cross-origin request to your site. You might want to post this to StackOverflow to get help.

Hi, I am aware of that. But I specified that my AllowedOrigin is only from microsoft.com. Does it mean that ASP.NET Core does not implement the CORS policy because it knows that the request only came from localhost? Because I was assuming that it will always implement the CORS policy; since localhost and microsoft.com are different, I thought it will block it.

Browser security prevents a web page from making requests to a different domain than the one that served the web page. This restriction is called the same-origin policy.
No, it means the domain didn't change.


”Pădina Mare”, ”Biban”, ”Iablanița” are listed in the drop-down menu

Description:
When user writes ”Pădina Mare”, ”Biban”, ”Iablanița” the locations appear in the drop-down menu next to the comune and the county which is a part according to the law.
Precondition:
The website is up an running.

Step 1
Write in the search bar "Pădina Mare"

Expected results
The location appears in the drop-down menu as "Sat Pădina Mare, MEHEDINȚI (Pădina)".

Step 2
Press "x" button.

Expected results
The location was deleted from the search bar.

Step 3
Write in the search bar "Biban"

Expected results
The location appears in the drop-down menu as "Sat Biban, MEHEDINȚI (Pădina)".

Step 4
Press "x" button.

Expected results
The location was deleted from the search bar.

Step 5
Write in the search bar "Iablanița"

Expected results
The location appears in the drop-down menu as "Sat Iablanița, MEHEDINȚI (Pădina)".


Question on fit_one function

Thanks for your great work, I was attracted by the incremental learning property of your work. You use the fit_one function to update the deployed model given the new data, but I did not find the actual method you use to update the model. The fit_one function only has one line to return self, maybe I didn't find the correct position. Can you please share your thoughts on this?

Hi @lzg65, Chantilly was created to be compatible with creme. The models in creme all have a fit_one method. This method updates the internal state of the model, for example the weights of a linear regression or a logistic regression. In the case of creme's linear regression, the fit_one method evaluates the gradient, updates the weights of the model with the optimizer associated with the model and returns self. So, you just have to upload the cream model via the API and it will update it.

Got it, I looked into the example you mentioned in creme, thanks for your quick explanation.


Document type-confusion mitigation

This commit also remove the "Type Mismatch Detection",
since it's a side-effect of the "Size Mismatch Detection":
the allocator isn't type-aware at all.

Original idea here was if you create a custom zone for an object type then confusion of the handle to a ptr would be discovered but I agree the allocator has no idea what the type is.


Eliminate the extra include and examples folders under the platform specific folders in release zip

Change the release folder structure similar to:

hazelcast/Windows_64

lib: Shared and static library directory.

tls: Contains the library with TLS (SSL) support enabled.

include: Directory you need to include when compiling your project.
examples: Contains various examples for each C++ client feature. Each example produces an executable which you can run in a cluster. You may need to set the server IP addresses for the examples to run.

Also update the related section at README.

Linux test PASSed.

Windows test PASSed.

Linux test PASSed.

Windows test PASSed.

Windows test PASSed.

Linux test PASSed.


AVRO-1340: Added Enum Defaults and unit tests.

Added Defaults to Enums.
Enum Defaults are only applied to values which don't match the Reader Enum symbols.
Enum Defaults do not override any Field Default behaviour. Field Defaults are used when a reader reads a datum that does not have the Field defined (as is current behaviour).

To see an example table of this behaviour, see Final Default & Fallback tab in:
https://docs.google.com/spreadsheets/d/1YkTBnHCBPGz2t0gQI3OioKS_xP9h9lq_a-gS2jSGFAc/edit?usp=sharing

Here's a fix for the IDL problem.  The grammar change seems to cause the parser to lookahead farther, so the last documentation comment that's been seen is too far along.  I changed it to grab the doc string once it's seen the enum keyword and that seems to fix it.
+++ b/lang/java/compiler/src/main/javacc/org/apache/avro/compiler/idl/idl.jj
@@ -1102,12 +1102,12 @@ Schema EnumDeclaration():
   String defaultSymbol = null;
 }
 {
-  "enum"
+  "enum" {   String doc = getDoc(); }
   name = Identifier()
   symbols = EnumBody()
       [ <EQUALS> defaultSymbol=Identifier() <SEMICOLON>]
   {
-    Schema s = Schema.createEnum(name, getDoc(), this.namespace, symbols,
+    Schema s = Schema.createEnum(name, doc, this.namespace, symbols,
                                  defaultSymbol);
     names.put(s.getFullName(), s);
     return s;

Patch otherwise looks good.  We should also test the IDL change.  Maybe change simple.avdl to specify an enum default, then update simple.avpr to contain the new output?  (You can use 'mvn package -dskipTests' to create a tools.jar so 'java -jar tools.jar idl ...' can be used to create the new compiler test output file.)

@cutting - Thanks Doug. I applied the patch, added a test and built the tooling to validate that it works. Is there anything else you forsee being required? Also, do we need additional eyes on this? I recall that someone mentioned in the JIRA thread about the "@default" annotation - I don't have any idea how it would interact with this.

We could add an @default annotation now, or commit this now and add that later, I don't have a strong feeling.

I think there's some misunderstanding here - @default already works, since IDL lets any JSON property be set through annotations (although that behavior isn't well-documented). Anything that doesn't work as an annotation doesn't work because of being a reserved property. default, however is a reserved property only for fields.
If I take this a protocol file named test.avdl:
protocol Test {
  @default("UNKNOWN")
  enum Status {
      SUCCESS,
      FAILURE,
      UNKNOWN
  }
}

And then run avro-tools.jar idl test.avdl (tested on both this branch and master), I get this output:
{
  "protocol" : "Test",
  "namespace" : null,
  "types" : [ {
    "type" : "enum",
    "name" : "Status",
    "symbols" : [ "SUCCESS", "FAILURE", "UNKNOWN" ],
    "default" : "UNKNOWN"
  } ],
  "messages" : { }
}

In my JIRA post, I was attempting to provide reasonable answers to the question: "how should we handle cases when both @default and the new = syntax are present."
(Currently on this branch, if I use both I get JSON like:
{
  "protocol" : "Test",
  "namespace" : null,
  "types" : [ {
    "type" : "enum",
    "name" : "Status",
    "symbols" : [ "SUCCESS", "FAILURE", "UNKNOWN" ],
    "default" : "FAILURE",
    "default" : "UNKOWN"
  } ],
  "messages" : { }
}

)

One more quick statement - I noticed that there is next to no testing around the usage of the "@default" notation. I know that my changes work only because I cannot use the "@default" notation on my enums anymore. However, I do not have any tests to prove that. Should this also be part of this JIRA?

As far as @default, I think it's probably a bug that this was not a reserved word in IDL from the start.  We could fix that, but it might break folks who've relied on it (although you could not have used it to set field defaults previously, only to provide a property named "default" on other kinds of schemas).  So only breaking folks who used it on enums is probably best, since we're changing the semantics of that case anyway.  Does that seem reasonable?

My preference is to always impose a minimal change centered around the functionality. In this case I would prefer to leave the @default behaviour as it currently is except for changing it for enum. That being said, I would be happy to file a bug ticket for it as a separate fix - that way if there is a bunch of issues with it that it would be addressable on its own and not affect this commit.

It sounds like we agree about @default.  With the current patch its behavior is only changed for enums, and that this is appropriate.

@cutting Thanks for your help Doug, I really appreciate all the feedback and assistance.


Release builds will use lto = false instead of thin

breaks x86_64-pc-windows-gnullvm target on Windows as with llvm optimization it is impossible to link clang libc++ statically. The gnullvm target is needed as it will link ucrt instead of msvc and allow running it without VC runtime. In theory it should make a fix possible for: kaspanet/rusty-kaspa#417

occasionally lead to node crashes in futures crate, especially when mixed with unsafe and C/C++ code. It is hard to reproduce, but at least with the sync from scratch reproduces the crash relatively often.

Any comment?


Fixed Default assets on Mac os

#115
Fixes ^
Not sure how well this would work on Windows so I made a new branch for it

o.O I think our Visual studio formatting options are different xD
idk what you changed haha
Ill merge it anyway :P

oh boy this might be very bad


Setting and Roadmap missing

there is a post indicating that roadmaps are on by default now. I logged into my Project Online portal and saw the option to create a roadmap, and clicking on it was presented with an error that I had no Project Online license. I am licensed with Project Online Professional for faculty and have no problem standing up PWA instances or projects. Following these instructions there are no options under admin for Project Online settings. In fact, "Services & Add-ins" no longer is a menu option either indicating these instructions are out of date? Does this setting option even exist or has this been moved to an admin center I'm missing?

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

ID: 3f8e9ec2-7927-d246-16cb-70000789ee5c
Version Independent ID: 8294f728-7d03-2cef-07fa-8c60ec81c8d5
Content: Turn Roadmap on or off for your organization
Content Source: ProjectOnline/Turn-Roadmap-on-or-off.md
Service: project-online
GitHub Login: @efrene
Microsoft Alias: efrene

Thank you for your interest in the content.  I checked on this, and Roadmap is currently not available in any of the EDU licenses (Project Online Professional for Faculty, Project Online Premium for Faculty, Project Online Professional for Students, Project Online Premium for Students).  I'll make sure to update the article to include this. Sorry for the inconvenience.

Thanks for the quick response. Is it going to be made available to EDU eventually? This would be a huge benefit to my organization.

I am not aware of any public announcement, so I am not sure.  One thing you can do it post this as an ask in Project User Voice. I know the product team takes a good look at all requests. The URL is https://microsoftproject.uservoice.com/forums/914203-project.  Sorry I couldn't be more help.

@ericmichaelclark Thank you for submitting feedback. We understand that this issue has been resolved.
Please feel free to re-open this issue if there is a specific area of the docs that we can improve or make better. Thank you.

@officedocsbot close


Fixed camera annotation

Hi there :)
How can I set a fixed camera and then export the annotations of the vehicles? The example in annotation_bounding_boxes.ipynb  uses ego.poll_sensors() method however the non-attached cameras don't have this method. I used scenario.render_cameras() method but fail to get the instance attribute.
Thanks a lot!

Thanks! And I get a stalled vehicle play the role of surveillance camera as the substitution.


chore: move passwords needed message

SUMMARY

Addressing @hughhhh's nit on https://github.com/apache/incubator-superset/pull/11936#discussion_r540334383.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A
TEST PLAN

N/A
ADDITIONAL INFORMATION

[ ] Has associated issue:
[ ] Changes UI
[ ] Requires DB Migration.
[ ] Confirm DB Migration upgrade and downgrade tested.
[ ] Introduces new feature or API
[ ] Removes existing feature or API

Codecov Report

Merging #12002 (ba2b985) into master (9256b6f) will decrease coverage by 0.29%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #12002      +/-   ##
==========================================
- Coverage   63.59%   63.30%   -0.30%
==========================================
  Files         940      467     -473
  Lines       45575    28574   -17001
  Branches     4373        0    -4373
==========================================
- Hits        28984    18088   -10896
+ Misses      16415    10486    -5929
+ Partials      176        0     -176

Flag
Coverage Δ

javascript
?

python
63.30% <ø> (-0.81%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

superset/sql_validators/postgres.py
50.00% <0.00%> (-50.00%)
:arrow_down:

superset/views/database/views.py
62.10% <0.00%> (-25.33%)
:arrow_down:

superset/db_engine_specs/mysql.py
79.59% <0.00%> (-12.25%)
:arrow_down:

superset/db_engine_specs/sqlite.py
65.62% <0.00%> (-9.38%)
:arrow_down:

superset/db_engine_specs/presto.py
73.81% <0.00%> (-8.59%)
:arrow_down:

superset/databases/commands/create.py
83.67% <0.00%> (-8.17%)
:arrow_down:

superset/databases/commands/update.py
85.71% <0.00%> (-8.17%)
:arrow_down:

superset/db_engine_specs/base.py
80.73% <0.00%> (-6.87%)
:arrow_down:

superset/sql_validators/base.py
93.33% <0.00%> (-6.67%)
:arrow_down:

superset/views/database/forms.py
83.33% <0.00%> (-5.56%)
:arrow_down:

... and 482 more

Continue to review full report at Codecov.

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


Improvements

PDF.js has received some new attention recently -- see article -- and I think its worth updating PMV to support these improvements. Also need to make sure this didn't break anything.

Also this would have been really nice to have when I was making PMV. Attaching a copy here for posterities sake.


Sb 11168

Codecov Report

Merging #454 into release-1.15 will decrease coverage by 1.69%.
The diff coverage is 100%.

@@                Coverage Diff                @@
##             release-1.15     #454     +/-   ##
=================================================
- Coverage           40.76%   39.06%   -1.7%
+ Complexity            775      725     -50
=================================================
  Files                 110      110
  Lines                7622     7958    +336
  Branches              858      959    +101
=================================================
+ Hits                 3107     3109      +2
- Misses               4175     4509    +334
  Partials              340      340

Impacted Files
Coverage Δ
Complexity Δ

...n/java/org/sunbird/common/models/util/JsonKey.java
0% <ø> (ø)
0 <0> (ø)
:arrow_down:

...va/org/sunbird/common/models/util/ProjectUtil.java
72.28% <100%> (+0.12%)
38 <0> (ø)
:arrow_down:

...ain/java/org/sunbird/common/ElasticSearchUtil.java
35.48% <0%> (-20.48%)
21% <0%> (-50%)

Continue to review full report at Codecov.

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


Bump version to 0.9.2-SNAPSHOT

Coverage remained the same at 81.22% when pulling 9cd1254bee25d200d6ef90a64ae0e1909fd4e8c6 on songy23:release into 149df8baad9c51a3a62402ec463587556df6fc77 on census-instrumentation:v0.9.x.

Codecov Report

Merging #847 into v0.9.x will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             v0.9.x     #847   +/-   ##
=========================================
  Coverage     79.29%   79.29%
  Complexity      903      903
=========================================
  Files           156      156
  Lines          3999     3999
  Branches        375      375
=========================================
  Hits           3171     3171
  Misses          751      751
  Partials         77       77

Impacted Files
Coverage Δ
Complexity Δ

...pencensus/common/OpenCensusLibraryInformation.java
0% <ø> (ø)
0 <0> (ø)
:arrow_down:

Continue to review full report at Codecov.

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


Multi insert issue

Hi, i have just started using mysqly.php library. I have an issue when calling:
mysqly::multi_insert('facts_union', $insert);
Below I am sending var_dump for $insert array and also var_dump for $params in your public static function exec() function. As you can see the column binding is getting mixed up. Only for first insert statement this order seems ok, but for the second and third the binding starts with "r:10" instead of "r:00". And the next array member starts with "r:20" etc. Am I doing something wrong? Is there a limit to columns number or something? I am not very good in php :)
`C:\inetpub\wwwroot...\test.php:224:
array (size=3)
0 =>
array (size=22)
'GENDER' => string 'male' (length=4)
'ID_P_F' => string '19' (length=2)
'YEAR_F' => string '2004' (length=4)
'TMW_F' => string '74' (length=2)
'TML_F' => string '6' (length=1)
'TBW_F' => string '21' (length=2)
'TBL_F' => string '5' (length=1)
'MF_F' => string '74' (length=2)
'ACES_F' => string '557' (length=3)
'DF_F' => string '152' (length=3)
'SRV1_F' => string '62' (length=2)
'WON1_F' => string '78' (length=2)
'WON2_F' => string '58' (length=2)
'SGW_F' => string '92' (length=2)
'BPS_F' => string '73' (length=2)
'PWR1S_F' => string '35' (length=2)
'PWR2S_F' => string '52' (length=2)
'BPW_F' => string '41' (length=2)
'RGW_F' => string '30' (length=2)
'PRIZE_F' => string '6357547' (length=7)
'JobID' => int -1
'JobTimestamp' => string '2023-01-12 12:24:09' (length=19)
1 =>
array (size=22)
'GENDER' => string 'male' (length=4)
'ID_P_F' => string '89' (length=2)
'YEAR_F' => string '2004' (length=4)
'TMW_F' => string '74' (length=2)
'TML_F' => string '16' (length=2)
'TBW_F' => string '36' (length=2)
'TBL_F' => string '11' (length=2)
'MF_F' => string '81' (length=2)
'ACES_F' => string '1017' (length=4)
'DF_F' => string '186' (length=3)
'SRV1_F' => string '63' (length=2)
'WON1_F' => string '81' (length=2)
'WON2_F' => string '56' (length=2)
'SGW_F' => string '91' (length=2)
'BPS_F' => string '69' (length=2)
'PWR1S_F' => string '29' (length=2)
'PWR2S_F' => string '50' (length=2)
'BPW_F' => string '40' (length=2)
'RGW_F' => string '22' (length=2)
'PRIZE_F' => string '2604590' (length=7)
'JobID' => int -1
'JobTimestamp' => string '2023-01-12 12:24:09' (length=19)
2 =>
array (size=22)
'GENDER' => string 'male' (length=4)
'ID_P_F' => string '7' (length=1)
'YEAR_F' => string '2004' (length=4)
'TMW_F' => string '68' (length=2)
'TML_F' => string '18' (length=2)
'TBW_F' => string '18' (length=2)
'TBL_F' => string '9' (length=1)
'MF_F' => string '84' (length=2)
'ACES_F' => string '523' (length=3)
'DF_F' => string '303' (length=3)
'SRV1_F' => string '54' (length=2)
'WON1_F' => string '75' (length=2)
'WON2_F' => string '53' (length=2)
'SGW_F' => string '82' (length=2)
'BPS_F' => string '64' (length=2)
'PWR1S_F' => string '34' (length=2)
'PWR2S_F' => string '53' (length=2)
'BPW_F' => string '43' (length=2)
'RGW_F' => string '32' (length=2)
'PRIZE_F' => string '2766051' (length=7)
'JobID' => int -1
'JobTimestamp' => string '2023-01-12 12:24:09' (length=19)
C:\inetpub\wwwroot...\mysqly.php:103:
array (size=66)
':r00' => string 'male' (length=4)
':r01' => string '19' (length=2)
':r02' => string '2004' (length=4)
':r03' => string '74' (length=2)
':r04' => string '6' (length=1)
':r05' => string '21' (length=2)
':r06' => string '5' (length=1)
':r07' => string '74' (length=2)
':r08' => string '557' (length=3)
':r09' => string '152' (length=3)
':r010' => string '62' (length=2)
':r011' => string '78' (length=2)
':r012' => string '58' (length=2)
':r013' => string '92' (length=2)
':r014' => string '73' (length=2)
':r015' => string '35' (length=2)
':r016' => string '52' (length=2)
':r017' => string '41' (length=2)
':r018' => string '30' (length=2)
':r019' => string '6357547' (length=7)
':r020' => int -1
':r021' => string '2023-01-12 12:24:09' (length=19)
':r10' => string 'male' (length=4)
':r11' => string '89' (length=2)
':r12' => string '2004' (length=4)
':r13' => string '74' (length=2)
':r14' => string '16' (length=2)
':r15' => string '36' (length=2)
':r16' => string '11' (length=2)
':r17' => string '81' (length=2)
':r18' => string '1017' (length=4)
':r19' => string '186' (length=3)
':r110' => string '63' (length=2)
':r111' => string '81' (length=2)
':r112' => string '56' (length=2)
':r113' => string '91' (length=2)
':r114' => string '69' (length=2)
':r115' => string '29' (length=2)
':r116' => string '50' (length=2)
':r117' => string '40' (length=2)
':r118' => string '22' (length=2)
':r119' => string '2604590' (length=7)
':r120' => int -1
':r121' => string '2023-01-12 12:24:09' (length=19)
':r20' => string 'male' (length=4)
':r21' => string '7' (length=1)
':r22' => string '2004' (length=4)
':r23' => string '68' (length=2)
':r24' => string '18' (length=2)
':r25' => string '18' (length=2)
':r26' => string '9' (length=1)
':r27' => string '84' (length=2)
':r28' => string '523' (length=3)
':r29' => string '303' (length=3)
':r210' => string '54' (length=2)
':r211' => string '75' (length=2)
':r212' => string '53' (length=2)
':r213' => string '82' (length=2)
':r214' => string '64' (length=2)
':r215' => string '34' (length=2)
':r216' => string '53' (length=2)
':r217' => string '43' (length=2)
':r218' => string '32' (length=2)
':r219' => string '2766051' (length=7)
':r220' => int -1
':r221' => string '2023-01-12 12:24:09' (length=19)`

I am also posting var_dump($sql) that you have in public static function exec() function. As you can see param numbering is off.
INSERT INTO facts_union(GENDER,ID_P_F,YEAR_F,TMW_F,TML_F,TBW_F,TBL_F,MF_F,ACES_F,DF_F,SRV1_F,WON1_F,WON2_F,SGW_F,BPS_F,PWR1S_F,PWR2S_F,BPW_F,RGW_F,PRIZE_F,JobID,JobTimestamp)
VALUES(:r00,:r01,:r02,:r03,:r04,:r05,:r06,:r07,:r08,:r09,:r010,:r011,:r012,:r013,:r014,:r015,:r016,:r017,:r018,:r019,:r020,:r021),
(:r10,:r11,:r12,:r13,:r14,:r15,:r16,:r17,:r18,:r19,:r110,:r111,:r112,:r113,:r114,:r115,:r116,:r117,:r118,:r119,:r120,:r121),
(:r20,:r21,:r22,:r23,:r24,:r25,:r26,:r27,:r28,:r29,:r210,:r211,:r212,:r213,:r214,',:r215,:r216,:r217,:r218,:r219,:r220,:r221)

The problem was actually in a fetch loop where I was filling $insert array. I was trying to run mysqly::multi_insert every 1000 records in my loop but reinitializing $insert = [] was is not working properly. I will try to use transactions with your library and hope this will fix my issue. I am closing this issue now and will reopen it if neccessary.
Cheers!

After debugging a little I found the issue within your multi_insert function. If more than 10 columns/keys were in the $rows then binding was not done correctly, since first row had the binding ":r00" for 1st column and the last column had binding ":r10". In the second row the 1st column again had the binding ":r10" which was duplicate for the first row.
I changed 2 lines in your mysqly.php script:
original: $values[] = '(' . implode(',', array_map(function($c) use($r) { return ":r{$r}{$c}"; }, range(0, count($row)-1))) . ')';
change: $values[] = '(' . implode(',', array_map(function($c) use($r) { return ":r{$r}_{$c}"; }, range(0, count($row)-1))) . ')'; //added underscore in return
original: $bind[":r{$r}{$c}"] = $v;
change: $bind[":r{$r}_{$c}"] = $v; //added underscore

Hey man!
Sorry for long reply, my country is being bombed systematically, so have hard time getting here.
I'll fix that shortly, thanks for your report.

You actually had detected a severe bug and an efficient fix for it. Thank you!
I've commited into master since it's critical:
https://github.com/mrcrypster/mysqly/commit/440c4ab54d7bd030a18945b95f70120a3c6ff93e

Glad I could help :) Stay safe!


Allow passing through additional options after the enable command

E.g.
takeout enable meilisearch -- --meilisearch-specific-flag-here --other-flag=great

I think it works correctly, but ~some failing tests I'm looking into, and~ I haven't actually tested it the whole way through to actually assuring the flags actually were passed the whole way to Docker the way I want.
Closes #218

OK, it's incomplete in part because I only am processing pass through flags that start with two dashes, so i need to write a test and fix it to also work for this:
takeout enable meilisearch -- -e MEILI_MASTER_KEY='MY_KEY_HERE'

Fixed. Think this is ready to be tested?

Fixed that.

The failing tests are a PHP version issue that we're handling elsewhere.


How do you keep WA online?

Hi,
Simple question how do you keep your WA account/s online? I mean WA app must be always online to be able to access WA web. Are you using emulators in a GPU powered server?

I don't think this project is not quite ready yet for actual use since it's unability to send messages, but if I were to use it I think I'd hook up an old low-end device to a powerbank and charge the powerbank every week or so.

You can run android on VM, even on cloud.

@gstvg which cloud service do you suggest?


New Package: Kitware.Slicer version 5.6.1

[x] Have you signed the Contributor License Agreement?
[ ] Have you checked that there aren't other open pull requests for the same manifest update/change?
[x] This PR only modifies one (1) manifest
[x] Have you validated your manifest locally with winget validate --manifest <path>?

[x] Does your manifest conform to the 1.5 schema?

Resolves https://github.com/microsoft/winget-pkgs/issues/136481

Microsoft Reviewers: Open in CodeFlow

https://github.com/microsoft/winget-pkgs/issues/107639


Constant kills of csi driver because of unhealthy liveness probe

The CSI driver on the node is constantly restarting because the liveness probe errors with a 500

From the logs of the csidriver I can't see anything special

@woehrl01 could you please provide details around the version of driver you are working with and the container-runtime being used?

@mugdha-adhav I'm using 1.1.0, I guess it's related to too many concurrent pulls blocking the driver from reacting.

Related to #153


Facing an error while setting up the development environment

Facing this error:
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\bin\HostX86\x64\cl.exe' failed with exit code
I have the latest build tools installed.
Grateful for any help on this. Thanks

please use the provided template.


Unnecessary use of SafeMath library

I noticed that the OZ's SafeMath library is used in your code. Since Solidity 0.8 release

Checks for overflow are very common, so we made them the default to increase the readability of code, even if it comes at a slight increase of gas costs.

I was trying to understand why you might still need SafeMath in your code, and one other reason would be the try* methods which will return an overflow flag:
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/1b1dd0ca2c61124f83a169da8cebad225d10a678/contracts/utils/math/SafeMath.sol#L22-L28
But in the src/ directory, there are no uses of the try* methods. The only usage in the current version of the code are calls to mul, div, add and sub, for which Solidity (since v0.8) already checks for over/underflows:
https://github.com/dfx-finance/protocol-v2/blob/ecd760bb6cb0b6c1c4e67843407aa44564300f3d/src/assimilators/AssimilatorV2.sol#L100-L105
So if there is no other reason for using these functions, you can save some gas by removing SafeMath usage.

LowGasSafeMath also seems unnecessary to me. It's only used in tests so not really sure why you'd need to worry about gas cost there.


Error BL9981: Unexpected closing tag 'div' with no matching start tag

Blazor: 0.3.0
IDE: VSCode
Steps to Reproduce:

Scaffold Blazor "hosted" (although I suspect any type will do). dotnet new blazorhosted
Open MainLayout.cshtml
Apply an HTML block comment to the inner div tag containing the @Body method.
From:

    @Body

To:

Bug.

C:\...\Shared\MainLayout.cshtml(44,1): error BL9981: Unexpected closing tag 'div' with no matching start tag. [C:\....csproj]
    0 Warning(s)
    1 Error(s)

@rynowak Are Razor style comments (@* *@)required for this case?

My guess is that a Razor comment would fix it.

OK, then closing as "as expected".


Adds automatic distro getting

also reworks script to use functions, making the code more maintainable, checks input from user for common typos near the enter key,  adds command line argument -s --silent for silent and fast operation. -t --test for testing the manager finding output without running the install commands (useful for developing when obs isn't installed).

This PR tracks: https://github.com/Liniuta/obs-nvfbc-patch/pull/2


Feature: Support finding the largest box in the parameter space.

This feature requires two new functionalities that are largely implemented, but not exercised.
First, we need to compute and report the volume of a box in the parameter space.  The volume of a box is the product of the interval widths.  (It's not clear whether this needs to be normalized.  Maybe we could weight each interval to capture a user preference, which could include normalization.)
Second, we need to merge boxes prior to returning a parameter space.  This can use the preexisting Box._compact() function.  We need to call _compact() at the appropriate time (e.g., after adding a box).  Depending on the performance, we might want to make this incremental, instead of visiting the entire set of boxes every time.

Also make sure that Box.volume() reports an exception if one dimension has negative width.


fix: prettier

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


Variable explorer and data viewer do not match documentation / broken

Bug: Notebook Editor, Interactive Window, Editor cells
Version: 1.43.0-insider
Commit: e6a45f4242ebddb7aa9a229f85555e8a3bd987e2
Date: 2020-02-21T05:40:52.685Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 5.3.0-40-generic snap

Steps to Reproduce:

Create conda environment from environment.yml

name: Data-Cleaning
channels:
  - nodefaults
  - fastai
  - pytorch
dependencies:
  - anaconda::python=3.7
  - fastai::fastai
  - anaconda::pylint
  - anaconda::pip
  - anaconda::pandas
  - conda-forge::black
  - conda-forge::nb_black
  - anaconda::jupyterlab
  - anaconda::notebook
  - anaconda::nb_conda
  - anaconda::flake8
  - conda-forge::jupyter_contrib_nbextensions

Create/open jupyter notebook

{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Prepare TextNoText DataBunch"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from fastai.vision import *\n",
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "%load_ext lab_black"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from pathlib import Path\n",
    "from pathlib import PurePath as PP\n",
    "import os"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Directories\n",
    "baseDir = Path.cwd()\n",
    "dataDir = baseDir / \"Data\"\n",
    "imageDir = dataDir / \"Raw_Images\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Datafiles\n",
    "labelCSVPath = baseDir / \"TextNoTextLabels.csv\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "!ls {imageDir} | head"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}

Execute some cells to populate variables. Open the Variable Explorer as described in vs-code jupyter support > variable explorer.

Problem illustration
The Variable Explorer shows an overwhelming list of Jupyter Kernel Variables. It is impossible to find variables local to the notebook. Double-Click to open a Data Viewer does not work.

Developer Tools Console Output
Developer Tools Console Output.txt

Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer

the source for the environment.yml does match the active python environment. its was a direct text copy, with name of env changed only.

Might be a regression due to perf changes we made for variable explorer.

This is actually by design (and not a regression).
However you can change the list of types we filter by modifying this value here:

Clicking on column headers isn't supported anymore though. The docs are wrong there. I'll enter an issue to change that.

There sure are a lot of types though. I'm going to enter a suggestion to filter based on 'just my code' too that would use the path for the variable.
For example, when inspecting the data for the variables, my machine shows this for most of the FastAI types: File:           c:\users\rchiodo.redmond\appdata\local\continuum\miniconda3\envs\jupyter\lib\site-packages\fastai\train.py

Please feel free to up vote the suggestion: #10316


Fix bugs with Global achievements

These are modifications I've made designed to get everything to work nicely. My global achievements were stuck at 99% and never unlocking. Then when they unlocked, the data was never actually saved to a file.

Yo,
Thanks for your contribution!
I changed quite a lot of the code already, but I'll add some of the changes I see here too, thanks again :)

I have some more changes btw. And a typescript definition file started if you like. And a somewhat controversial change I want to propose for Global Achievements. Can we migrate the Achievements file location to the saves folder? So on load if the Achievements.json is in the save folder load that one. Then on save if the old file exists; erase it and save the new one. Also how do we plan on supporting say Mac or Linux too?

About the new changes
Looking good, I'll implement some of these new changes too.
About the d.t.s. file
I don't have much knowledge in programming (I'm a chemistry student) so I'm not sure on what a "typescript definition file" is and I don't know how to use it but I'll definitely study that, it's always good to learn new stuff.
About movng the json file & Compatibility with Mac and Linux
I'm willing to inherit RPGMaker's file save methods (using the StorageManager), this way global achievs should also work on browser, I'm not sure how to support Mac or Linux though, hopefully this change will help with that.

Okay so a .d.ts file is used by Visual Studio Code to provide intellisense (By that I mean it provides popup details when you mouse over a property name). Nobody in the RPG Maker MV community seems to do it. But as someone with an Associate's degree in Computer Science, I tend to want to have every possible method typed to reduce errors. The module.exports thing is related to the Floss testing system that I was trying to integrate with a game I was working on. My integration tests seem good. (which it seeming no one else in the MV and MZ community is using)

Here we are. I believe it works fine the way I set it up with global achievements. Plus I removed the stuff in the code that nobody besides me seems to use.

Here we are. I believe it works fine the way I set it up with global achievements. Plus I removed the stuff in the code that nobody besides me seems to use.