let parser detect constant strs used in LdElem and make them PropertyString

It's a relatively common pattern to declare some constant string in an outer scope and then use that as a property key inside inner functions.
Perf win here is about 4% in react, with smaller (~1%) wins in backbone and ember.

@dotnet-bot test Windows arm_release

@dotnet-bot test Ubuntu _no_jit_shared_ubuntu_linux_test


How to properly validate that an error is an insert error and not a DB connection error

The problem I am trying to solve is that I want to check that if my query returns an error, that that error is NOT a database connection error. My goal is to identify that if an error occurs, to identify if it's data related or connection related.
I've read the docs, and specifically https://github.com/mysqljs/mysql#error-handling but the examples just show some of the connection related errors and not all.
Is there a way to know if a query failed due to data error and not a connection error ?

That is what the fatal flag signals.

If you're looking for a specific error, you'll need to know which errors you want to check for from the MySQL Server documentation (example https://dev.mysql.com/doc/refman/5.5/en/server-error-reference.html) and then the errors this module provides populates several properties with information about the error your code can check for the condition it wants to handle.

@dougwilson, so the fatal flag indicates that the error is DB related ( connection issues ) and not data related ?

@gangelovq6inc Looking at the server error page sent by @dougwilson, I guess u can use error number specified for each error to determine whether its database connection or data error?

Fatal indicates only if the error is fatal to the connection, regardless of the error source. But you can still have non-fatal-non-data errors. For example transaction deadlock or query terminated on the server. These errors are not related to the data, but are not fatal to the connection, as you can continue to use the connection.


Library-private final fields get different instances depending on how the library was imported

I tried to find relevant issues via search but it didn't yield anything similar.
This may be me learning, but I find following behavior really confusing.
For instance, this Dart file:
// lib/src/a.dart
final _a = new A();

class A {}

void doWithA(String from) {
  print('Hash code of A from $from: ${_a.hashCode}');
}

Up until now I assumed that _a would always be the same instance, but it turns out not entirely true and there can actually be multiple instances of _a depending on how import / export statements are organized in a project.
It is a bit verbose to describe in this issue so I created example project here: https://github.com/pulyaevskiy/library-private-issue
Executing dart lib/main.dart there prints something like this for me:
Hash code of A from main: 931022103
Hash code of A from B: 85304837

Combination of export and import statements in that project is probably far from perfect and normally should be cleaned up. However it seems dangerous to even allow such scenarios.

Dart libraries are identified by their import URI. If you import the same file using two different URIs, say file:///something/lib/main.dart and package:library-private-issue/main.dart, then you get two different libraries with the same source code, each with their own separate variables. That's what is happening here.
This is expected behavior. To act differently, Dart would have to somehow recognize that it's the same file (either by content or by resolving the package: URI to a file: URI) which it doesn't do.
My personal rule of thumb is "never have lib in a path". In this case, your main library is specified with a path of /lib/main.dart which is causing your troubles.
I would recommend one of number of solutions:

Move the main.dart file to bin/.
Move the main method to a separate file from the actual library, one that does imports using package: URIs, and which is never imported again itself.
Start the program using dart package:library-private-issue/main.dart.

Thanks @anders-sandholm , this is really helpful. I wasn't sure which actual part caused this issue.
I must note though that I used lib/main.dart purposely as it is a standard way to organize Flutter apps. Moving this file in a different location will probably break all the tooling.
So in this case replacing relative imports with package: versions is the simplest.
I submitted relevant issue in flutter/flutter#15748  for completeness.

Can we get this re-opened to discuss fixing these semantics in say, Dart 3?
@anders-sandholm @lrhn @leafpetersen

Looks like a dup of #33076

Duplicate of https://github.com/dart-lang/sdk/issues/33076.


Better error handling

I'm finding that error handling is not a particular strength of the Bolt compiler. For the most part, when I have an error in my bolt file, it can direct me to the line (or near the line) of code that is causing the issue, but the message is typically a generic:
bolt:LINE_NUM:COL_NUM: Expected comment, end of input, function definition, path statement, type statement or whitespace but "f"/"p"/"t" found.

This already bit me once #98, and although it was quite a silly mistake on my part, for some reason my eyes could not see the (now) very apparent error.
I haven't seen a singular location where errors that cause the generic error to be issued are listed (there maybe an internal list), but I think it would help if there was something public that users could contribute to when they stumble.
LIST OF ERROR MESSAGES TO BE IMPROVED:

Description
Error Statement Received
Improved Error Statement

In path statements, read(), write(), and validate() functions must be proceeded with an equals sign, not a colon.
bolt:LINE_NUM:COL_NUM: Expected comment, end of input, function definition, path statement, type statement or whitespace but "p" found.
read(), write(), and validate() was not proceeded by "=", instead ":" found.

For an equality check, something other than a double- or triple-equals sign (i.e. a single equals sign) will generate an error
bolt:LINE_NUM:COL_NUM: Expected comment, end of input, function definition, path statement, type statement or whitespace but "f" found.
Unknown operator "=" used. Did you mean "=="?

I'll continue to add onto this as I come across more of these, and I'll to the main table as others comment as well.
Hope this is useful...

Agreed!  Thanks for the useful specific suggestions!


Compiling JS example

Hey there!
Am new to Nim, thus I am not sure if the fault is on my side but trying to compile the js example (nim js fig8_js_interactive.nim) yields following error for me:
/home/ritzo/Documents/moukle.github.io/assets/js/nim_plots/fig8_js_interactive.nim(56, 4) template/generic instantiation of `animate` from here
/home/ritzo/Documents/moukle.github.io/assets/js/nim_plots/fig8_js_interactive.nim(15, 39) template/generic instantiation of `parseTraces` from here
/home/ritzo/.nimble/pkgs/plotly-0.2.0/plotly/plotly_js.nim(24, 17) Error: type mismatch: got <seq[Trace[system.int]]>
but expected one of:
proc `%`(x, y: JsObject): JsObject
  first type mismatch at position: 1
  required type for x: JsObject
  but expression 'traces' is of type: seq[Trace[system.int]]

System:

nim 1.2.0
plotly .0.2.0

looks like that has some bit rot as it's not tested.
I think this change fixes:
diff --git a/src/plotly/plotly_js.nim b/src/plotly/plotly_js.nim
index 454d707..e62b7e1 100644
--- a/src/plotly/plotly_js.nim
+++ b/src/plotly/plotly_js.nim
@@ -1,7 +1,8 @@
 import jsbind
 import jsffi
 import dom
-import plotly_types
+import ./plotly_types
+import ./api

maybe @Vindaar can verify?

Yep, that's almost all that's needed. And the resulting js file is apparently not put into the nimcache directory anymore, so the html template has to be changed. I'll open a PR.

Thanks for the fast response! :)


Upgrade pulumi-terraform-bridge to v3.84.0

This PR was generated via $ upgrade-provider pulumiverse/pulumi-cockroach --kind=bridge --target-bridge-version=latest.

Upgrading pulumi-terraform-bridge from v3.83.0 to v3.84.0.
Upgrading pulumi-terraform-bridge/pf from v0.36.0 to v0.37.0.

Superseded by #40


rewriting index with tsm very slow when restarting server

Running from git, we've noticed the server just "disappear" after a while while the process is still running.  This isn't a big deal since we know we are in for some of that, but something possibly worth mentioning is that the restarts have been taking an incredibly long time.  During the restart the server is mostly idle with only a couple CPUs busy.  I see not much happening on the disks at all.  As you can see here, there are quite large chunks of time while it rewrites index files.
Dec 02 02:26:48 influxdb influxd[21949]: [tsm1] 2015/12/02 02:26:48 rewriting index file /influxdb/data/telegraf/3months/26741/0000839.tsm1 with /influxdb/data/telegraf/3months/26741/0000841.tsm1
Dec 02 02:28:55 influxdb influxd[21949]: [tsm1wal] 2015/12/02 02:28:55 /influxdb/data/telegraf/3months/26741 flush to index took 2m7.084940928s
Dec 02 02:28:56 influxdb influxd[21949]: [tsm1wal] 2015/12/02 02:28:56 tsm1 WAL starting with 5242880 flush memory size threshold and 104857600 max memory size threshold
Dec 02 02:28:56 influxdb influxd[21949]: [tsm1wal] 2015/12/02 02:28:56 tsm1 WAL writing to /influxdb/data/telegraf/3months/28299
Dec 02 02:28:57 influxdb influxd[21949]: [tsm1wal] 2015/12/02 02:28:57 startup flush of /influxdb/data/telegraf/3months/28299 with 82450 keys and 286496 total values of 4588678 bytes
Dec 02 02:28:58 influxdb influxd[21949]: [tsm1] 2015/12/02 02:28:58 rewriting index file /influxdb/data/telegraf/3months/28299/0000830.tsm1 with /influxdb/data/telegraf/3months/28299/0000832.tsm1
Dec 02 02:31:07 influxdb influxd[21949]: [tsm1wal] 2015/12/02 02:31:07 /influxdb/data/telegraf/3months/28299 flush to index took 2m9.970747255s
Dec 02 02:31:08 influxdb influxd[21949]: [tsm1wal] 2015/12/02 02:31:08 tsm1 WAL starting with 5242880 flush memory size threshold and 104857600 max memory size threshold
Dec 02 02:31:08 influxdb influxd[21949]: [tsm1wal] 2015/12/02 02:31:08 tsm1 WAL writing to /influxdb/data/telegraf/3months/29856
Dec 02 02:31:09 influxdb influxd[21949]: [tsm1wal] 2015/12/02 02:31:09 startup flush of /influxdb/data/telegraf/3months/29856 with 82836 keys and 393553 total values of 6303262 bytes
Dec 02 02:31:11 influxdb influxd[21949]: [tsm1] 2015/12/02 02:31:11 rewriting index file /influxdb/data/telegraf/3months/29856/0000489.tsm1 with /influxdb/data/telegraf/3months/29856/0000491.tsm1
Dec 02 02:32:31 influxdb influxd[21949]: [tsm1wal] 2015/12/02 02:32:31 /influxdb/data/telegraf/3months/29856 flush to index took 1m21.486255322s
Dec 02 02:32:37 influxdb influxd[21949]: [tsm1wal] 2015/12/02 02:32:37 tsm1 WAL starting with 5242880 flush memory size threshold and 104857600 max memory size threshold
Dec 02 02:32:37 influxdb influxd[21949]: [tsm1wal] 2015/12/02 02:32:37 tsm1 WAL writing to /influxdb/data/telegraf/3months/31349
Dec 02 02:32:39 influxdb influxd[21949]: [tsm1wal] 2015/12/02 02:32:39 startup flush of /influxdb/data/telegraf/3months/31349 with 82816 keys and 490279 total values of 7852805 bytes
Dec 02 02:32:41 influxdb influxd[21949]: [tsm1] 2015/12/02 02:32:41 writing new index file /influxdb/data/telegraf/3months/31349/0000576.tsm1
Dec 02 02:32:41 influxdb influxd[21949]: [tsm1] 2015/12/02 02:32:41 rewriting index file /influxdb/data/telegraf/3months/31349/0000574.tsm1 with /influxdb/data/telegraf/3months/31349/0000577.tsm1
Dec 02 02:32:41 influxdb influxd[21949]: [tsm1] 2015/12/02 02:32:41 rewriting index file /influxdb/data/telegraf/3months/31349/0000573.tsm1 with /influxdb/data/telegraf/3months/31349/0000578.tsm1
Dec 02 02:34:12 influxdb influxd[21949]: [tsm1wal] 2015/12/02 02:34:12 /influxdb/data/telegraf/3months/31349 flush to index took 1m32.614097171s
Dec 02 02:34:12 influxdb influxd[21949]: [tsm1] 2015/12/02 02:34:12 Starting compaction in /influxdb/data/telegraf/3months/31349 of 8 files to new file /influxdb/data/telegraf/3months/31349/0000579.tsm1

This continues for a while, and in the end it takes about 15 - 20 minutes to start the server.  I'm guessing that since the server is mostly idle, something isn't quite right.  If you need any more information, please let me know.
Cheers

@cheribral what version are you running?

I have been running from git, but this morning I noticed that it tripped over one of the files because it was corrupt, so perhaps there was something else going on.  The box was mistakenly bounced by support a few days ago, so it is possible that the corruption came from that.  I've wiped that database, and am starting again.  After letting it run for a day or two, I will see if the problem comes back.
If I can cause it to happen again, I'll update the ticket.

tsm1 has been significantly re-written in the 0.9.6 release. Even with hundreds of gigabytes, I see start-up times of less than a minute.
Please try the latest software.
https://influxdata.com/downloads/


New: Game End

Game will end on 15 points
Motivation
Game was infinite.

Also added
Refactor on actions system.
Bug fixing on turns system.
Bug fixing on points system.


I'm thinking of adding a new miscellaneous generator for UPC (13-char string of digits, padded with zeroes, and ending with a computed check digit). Looking for thoughts on whether this is something others would use, or if I'm better off with just a local mixin.

Cool!
I assume this is somewhat standardized across the industry? (I know little about UPCs)
If so, I think it's great to add and would gladly accept a PR! If it's more specific to your industry or your company, then probably better as a mixin.

As feedback, there are several types (UPC-A, UPCE, and EAN,...)
I think a link to a spec should be proposed here before developers get their hands dirty.
Also, I'm assuming here that we're only sticking to generating the numbers, and not a graphic with a barcode. Leave that to a different library/font.

I would recommend just starting with UPC (12 digits) and EAN-13 (the 1-up of UPC)
It could be separate method names, but for futureproofing, it should probably be just .barcode(String type, Object options).

For reference,  Here are details for the popular UPC-A
It's 12 digit number:

6 digits manufacturer code
5 digit product code
checksum digit

https://en.wikipedia.org/wiki/Universal_Product_Code#Check_digit_calculation
So<PHONE_NUMBER>5x has a check digit of 2, resulting in<PHONE_NUMBER>52

chance.barcode('UPC-A')
chance.barcode('UPC-A', { prefix: '036000' })
// note the manufacturer prefix is a string to support leading zero

lindell's JsBarcode is MIT licensed and contains the checksum calculations
https://github.com/lindell/JsBarcode/tree/master/src/barcodes/EAN_UPC
And here's ChatGPT's output:
  const digits = code.split('').map(Number);
  const oddSum = digits.filter((_, index) => index % 2 === 0).reduce((sum, digit) => sum + digit, 0);
  const evenSum = digits.filter((_, index) => index % 2 === 1).reduce((sum, digit) => sum + digit, 0);
  const totalSum = oddSum * 3 + evenSum;
  const checkDigit = (10 - (totalSum % 10)) % 10;


Internal Server Error while using Content-Type=multipart/form-data; boundary=cats on /v1/user/keys

Description
Description
While doing some fuzzing using https://github.com/Endava/cats I discovered an issue for the /v1/user/keys" endpoint. Doing a POST with multipart/form-data; boundary=cats Content-Type results in a 500, rather that something more meaningful.
You can reproduce the issue using (just replace $token with your own token):
cats replay Test1246.json
Test1246.json.zip
Gitea Version
1.17.0+dev-573-ge45738e3c
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
Onlinehttps://try.gitea.io/
Database
No response

Would it be possible to see some logs for this?

It could be reproduced by:
curl -v -XPOST -H "Authorization: token $token" -H "Content-Type: multipart/form-data; boundary=cats" "https://try.gitea.io/api/v1/user/keys"

panic here:

https://gitea.com/go-chi/binding/pulls/13


Does anybody comfront NCCL ERROR?

RuntimeError: NCCL error in: /opt/conda/conda-bld/pytorch_1591914880026/work/torch/lib/c10d/ProcessGroupNCCL.cpp:514, internal error, NCCL version 2.4.8

Are you running the code in Windows?

Have the same issue, could you fix it?


Documents "runas" verb in ShellExecute

The text is copied from https://docs.microsoft.com/en-us/windows/win32/api/shellapi/ns-shellapi-shellexecuteinfoa

@xiaoyinl : Thanks for your contribution! The author(s) have been notified to review your proposed change.


Could not find Genshin Process

I got an error if I closed the game before starting the program, stating Process not Found
If I instead leave the game open (in 1280x720) before starting the scanner it works as expected

Hi there, I know this issue is old but can you see if this issue still persists in any of the newer releases or prereleases? If it does, can you find the name of the exe responsible for Genshin as it appears under Details in Task Manager?

I am going to close this issue as no feedback has been given for over a month. Feel free to reopen this issue if you still experience this problem.


Optional parameters

Create support for optional parameters. Some logs can have a different set of parts that might not be always present, so we should have a way how to define optional parameters.

This was enabled with #29 which allows regex as parsing patterns. This by no means is a user-friendly way how to support this but it is sufficient for now.


[WIP] support for Amazon Bedrock

Adding support for Amazon bedrock

Wait @brnaba-aws does bedrock use the openai format? Or is it slightly different

Wait @brnaba-aws does bedrock use the openai format? Or is it slightly different

It is different.

Wait @brnaba-aws does bedrock use the openai format? Or is it slightly different

It is different.

@brnaba-aws its different format, but supports many models behind. Its called Converse API - more here. We plan to add more capabilities once the basic provider setup is done with many model calling works. (this is explorer from discord)

Beautiful work!


Need a faster way to visualize the data

We have https://github.com/qdrant/vector-db-benchmark/blob/master/scripts/process-benchmarks.ipynb but it only prepares the data.
So web based interactive graphs would be nice. One can use plotly or dash framework.
Please use benchmarks.js as a reference. The logic for filterBestPoints is important to avoid clutter in graph.
It should look like qdrant.tech/benchmarks

@KShivendu, i was trying to run this benchmark for qdrant-rps-m16-ef128-glove-100-angular, and have the below JSON files in results folder. When i try to use this ipynb notebook, cell 17 gives the following error. Any help would be appreciated.
(vector-db-bench) [aprabh2]$ ls results
qdrant-rps-m-16-ef-128-glove-100-angular-search-0-2024-04-15-15-22-45.json
qdrant-rps-m-16-ef-128-glove-100-angular-search-3-2024-04-15-15-23-51.json
qdrant-rps-m-16-ef-128-glove-100-angular-search-6-2024-04-15-15-24-41.json
qdrant-rps-m-16-ef-128-glove-100-angular-search-1-2024-04-15-15-23-04.json
qdrant-rps-m-16-ef-128-glove-100-angular-search-4-2024-04-15-15-24-08.json
qdrant-rps-m-16-ef-128-glove-100-angular-search-7-2024-04-15-15-24-58.json
qdrant-rps-m-16-ef-128-glove-100-angular-search-2-2024-04-15-15-23-25.json
qdrant-rps-m-16-ef-128-glove-100-angular-search-5-2024-04-15-15-24-25.json
qdrant-rps-m-16-ef-128-glove-100-angular-upload-2024-04-15-15-22-26.json
cell17:
_search = search_df.reset_index()
_upload = upload_df.reset_index()

joined_df = _search.merge(_upload, on=["engine", "m", "ef", "dataset"], how="left", suffixes=("_search", "_upload"))
print(len(joined_df))
joined_df

ERROR:
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
/tmp/ipykernel_1302491/1721113676.py in ?()
----> 1 _search = search_df.reset_index()
      2 _upload = upload_df.reset_index()
      3
      4 joined_df = _search.merge(_upload, on=["engine", "m", "ef", "dataset"], how="left", suffixes=("_search", "_upload"))

/fastdata/01/aprabh2/anaconda3/envs/vector-db-bench/lib/python3.11/site-packages/pandas/util/_decorators.py in ?(*args, **kwargs)
    307                     msg.format(arguments=arguments),
    308                     FutureWarning,
    309                     stacklevel=stacklevel,
    310                 )
--> 311             return func(*args, **kwargs)

/fastdata/01/aprabh2/anaconda3/envs/vector-db-bench/lib/python3.11/site-packages/pandas/core/frame.py in ?(self, level, drop, inplace, col_level, col_fill)
   5844                     level_values = algorithms.take(
   5845                         level_values, lab, allow_fill=True, fill_value=lev._na_value
   5846                     )
   5847
-> 5848                 new_obj.insert(0, name, level_values)
   5849
   5850         new_obj.index = new_index
   5851         if not inplace:

/fastdata/01/aprabh2/anaconda3/envs/vector-db-bench/lib/python3.11/site-packages/pandas/core/frame.py in ?(self, loc, column, value, allow_duplicates)
   4439                 "'self.flags.allows_duplicate_labels' is False."
   4440             )
   4441         if not allow_duplicates and column in self.columns:
   4442             # Should this be a different kind of error??
-> 4443             raise ValueError(f"cannot insert {column}, already exists")
   4444         if not isinstance(loc, int):
   4445             raise TypeError("loc must be int")
   4446

ValueError: cannot insert dataset, already exists

@aprabhak2 We just merged https://github.com/qdrant/vector-db-benchmark/pull/125
It should be fixed now. Please try now and let us know if you face any issues.

First attempt at adding a plot:
import json
import matplotlib.pyplot as plt
from mplcursors import cursor

with open('results.json') as json_data:
    all_data = json.load(json_data)
    json_data.close()

xaxis="mean_precisions"
yaxis="rps"
dataset_name="glove-100-angular"
parallel=100.0
lower_is_better=False

engine_name_to_xy = {}

xpoints = []
ypoints = []
for curr_data in all_data:
    engine_name = curr_data['engine_name']
    if curr_data['dataset_name'] != dataset_name or curr_data['parallel'] != parallel:
        continue
    if engine_name not in engine_name_to_xy:
        engine_name_to_xy[engine_name]=[]
    engine_name_to_xy[engine_name].append((curr_data[xaxis],curr_data[yaxis]))

def check_better(x,y,lower_is_better):
    return lower_is_better if x < y else not lower_is_better

all_plts=[]
for engine_name, curr_xy_pts in engine_name_to_xy.items():
    curr_xy_pts.sort(key=lambda tup: tup[0], reverse=True)
    curr_x_pts=[]
    curr_y_pts=[]
    for idx, (x,y) in enumerate(curr_xy_pts):
        if idx == 0 or check_better(y,curr_y_pts[-1],lower_is_better):
            curr_y_pts.append(y)
            curr_x_pts.append(x)
    all_plts.append(plt.plot(curr_x_pts,curr_y_pts,label=engine_name,marker = 'o'))
    all_plts.append(cursor(hover=True))

plt.legend(loc="upper right")
plt.xlabel(xaxis)
plt.ylabel(yaxis)
plt.show()

@filipecosta90 would you be interested to pick this up :)
If yes, would be nice if we can do it with plotly to build interactive graphs.

@filipecosta90 would you be interested to pick this up :)
If yes, would be nice if we can do it with plotly to build interactive graphs.

sure. let me pick this one. should be able to devote some time to it at end of week


proposal: embed: conditional embedding support

Really nice to see embed finally gets arrived to standard library!
Yet I believe, conditional embedding would be desirable in some use cases, seems there aren't any.
I was using packr beforehand to achieve this kind of behavior; mainly because when I want to build for container image, I do not want to embed files (mainly frontend built assets files) packed into binary because it will increase memory usage a lot.
I think it would be enough //go:embed might just ignore embedding by giving buildflags or environment variables in build time.

Can you just use a build tag?

@ianlancetaylor Is there any option that can be used for such use cases? Build tag is OK, but it seems currently not supported.

@kesuskim You should be able to put the //go:embed directive in a file with a build tag like this:
// +build embedallowed

package x

//go:embed somefile.txt
var somefile string

Then build with -tags=embedallowed. This is supported now. go build won't process //go:embed directives in files that were excluded by build constraints.

@jayconrod That will do! Thank you 😄 Maybe it will be enough to have some documents or blogs about it, I should make writing on my blog.

@frederikhors
You can achieve similar with build tag. Here is an example for it.
public/box.go
package public

import "embed"

var Box embed.FS

var IsEmbedded bool

func init() {
    Box = ebox
}

public/box_embed.go
// +build embed

package public

import "embed"

//go:embed * index.html
var ebox embed.FS

func init() {
    IsEmbedded = true
}

public/box_noembed.go
// +build !embed

package public

import "embed"

var ebox embed.FS

func init() {
    IsEmbedded = false
}

main.go
package main

import (
    "fmt"
    "log"
    "net/http"

    "myproject/public"
)

const PORT = 8080

var httpRoot http.FileSystem

func main() {
    if public.IsEmbedded {
        httpRoot = http.FS(public.Box)
    } else {
        httpRoot = http.Dir("public/")
    }

    log.Printf("server is listening on :%d", PORT)
    http.Handle("/", http.FileServer(httpRoot))
    if err := http.ListenAndServe(fmt.Sprintf(":%d", PORT), nil); nil != err {
        log.Fatalln(err)
    }
}

To use embed, you can build with build tags like following;
$ go build -tags embed

When we build the binary, we have to decide whether to embed the file or not.  We can't postpone that decision until the binary is run.  But when we build the binary, we don't know whether embedAllowed is true or not.  It might change at run time.  It might be based on a command line option.  It might be based on user input.


chore: add extensions.json file

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Workflow improvement

What is the current behavior? (You can also link to an open issue here)

Project doesn't come with any suggested VS Code extensions.

What is the new behavior (if this is a feature change)?

We provide suggested VS Code Extensions to make bootstrapping easier for new developers. This will show up to developers when opening up the Core repo.

Other information:

Status

[ ] Code documentation for the relevant parts in the code have been added/updated by the PR author
[ ] The functionality has been tested by the PR author
[ ] The functionality has been tested by NRK

Codecov Report

Merging #629 (79613d8) into release38 (a353c82) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           release38     #629   +/-   ##
==========================================
  Coverage      67.27%   67.27%
==========================================
  Files            268      268
  Lines          18693    18693
  Branches        3951     3951
==========================================
  Hits           12576    12576
  Misses          6074     6074
  Partials          43       43

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 a353c82...79613d8. Read the comment docs.


fix(typing): fix packages/rspack-cli ts-expect-error

part of #4640

Summary
This fixes all ts-expect-error in packages/rspack-cli.  Errors are most related to

nullable config.
unannotated callback
not importing types

Test Plan

tsc --noEmit
Require Documentation?

[x] No
[ ] Yes, the corresponding rspack-website PR is __

Looks like the action is stuck https://github.com/web-infra-dev/rspack/actions/runs/6897645847/job/18766208280. Would you like to retry it?


Refactor dockerfile

Some refactoring for better layering of the dockerfile and increased readability.

There are some warnings about apt like "-no-install-recommends" and delete apt-get lists. Do you think would make a difference in the image size?

Probably it will. The --no-install-recommends, however, won't have any effect since there's an autoremove later in the code. It would be good to change this but I'm leaving it for a future PR.


Warning: React does not recognize the inputRef prop on a DOM element.

Environment

Tech
Version

material-ui-pickers
1.0.0-beta.13.1

material-ui
1.0.0-beta.32

React
16.2.0

Browser
Chrome

Platform
Ubuntu16.04

Expected behavior

No console errors
Actual behavior

Warning: React does not recognize the inputRef prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase inputref instead. If you accidentally passed it from a parent component, remove it from the DOM element.

Please update to the newest version (v1.0.0-rc.4)


When hovering over buttons underline is visible

The little line in the screenshot is caused by an underline on one of the elements within the button that's still visible.

We have added the issues to the backlog of our Trello board

Buttons seem to have been removed.


Add kilowatt-hour (kWh) to energy conversion units

Problem Statement

There is no easy way to convert energy values to kilowatt-hours.
Evidence or User Insights

The kilowatt-hour (kWh) is a common unit of energy, used for electricity bills and battery capacity. Outside of scientific and engineering circles, it is more popular than the joule (J). Another representation similar to kWh is the watt-second (W-s).
Proposal

An additional option to the energy conversion units for kilowatt-hour and watt-second would make conversions easier to other forms of energy.
Goals

Add kilowatt-hour (kWh) and watt-second (W-s) to the list of energy conversions.
Determine the common way to shorten kilowatt-hour and watt-second. kWh and W-s is simply how I have represented them here however they may not be the generally-accepted format.

Non-Goals

Add all possible combinations of metric prefixes and units of time (e.g., megawatt-minute, decajoules, etc.)
Low-Fidelity Concept

1 W-s is equivalent to 1 J. 1 kWh is equivalent to 3600 kJ or 3,600,000 J or 3,600,000 W-s.
Requested Assignment

If adding conversion units is relatively simple, I can implement this.

This is your friendly Microsoft Issue Bot. I've seen this issue come in and have gone to tell a human about it.

@grochocki any update on this pitch?

This seems like a relatively simple request. I'm confused why it's taken over a year to get a response or add this feature.

Hey, I implemented this feature but i don't know if i have to translate its display name into languages other than english.


AttributeError: 'NoneType' object has no attribute 'decode'

Installation information

jumpscale version: master
operating system: linux

Detailed description
I saw this stacktrace passing by in AYS logs after I asked for a deletion of a vdisk on be-g8-3
Steps to reproduce
Don't have procedure to reproduce yet.
Relevant stacktraces
ERROR:sanic:Traceback (most recent call last):
  File "/opt/jumpscale9/lib/sanic/app.py", line 503, in handle_request
    response = await response
  File "/opt/code/github/jumpscale/ays9/JumpScale9AYS/ays/server/ays_if.py", line 133, in get
    return await auth(request, ays_api.getJob(request, jobid, repository))
  File "/opt/code/github/jumpscale/ays9/JumpScale9AYS/ays/server/ays_if.py", line 14, in auth
    return await func
  File "/opt/code/github/jumpscale/ays9/JumpScale9AYS/ays/server/ays_api.py", line 316, in getJob
    jobs = repo.jobsList()
  File "/opt/code/github/jumpscale/ays9/JumpScale9AYS/ays/lib/AtYourServiceRepo.py", line 578, in jobsList
    for job in j.core.jobcontroller.db.jobs.find(serviceKey=key):
  File "/opt/code/github/jumpscale/ays9/JumpScale9AYS/jobcontroller/models/JobsCollections.py", line 74, in find
    for key in self.list(actor, service, action, state, serviceKey, fromEpoch, toEpoch, tags):
  File "/opt/code/github/jumpscale/ays9/JumpScale9AYS/jobcontroller/models/JobsCollections.py", line 54, in list
    res0 = self._index.list(regex, returnIndex=True)
  File "/opt/code/github/jumpscale/lib9/JumpScale9Lib/data/key_value_store/redis_store.py", line 109, in list
    key = self.redisclient.hget(self._indexkey, item).decode()
    AttributeError: 'NoneType' object has no attribute 'decode'

already fixed in https://github.com/Jumpscale/core9/pull/69


fix: webside icon visuals (in access and in preview for website type)

Before:

After:

🐝 PR preview in Swarm
Preview URL: https://bafybwiaiztb6u2stscdtbfm2da42rwtjvabgtq57ckfgl7ewb2kfkniyvq.bzz.link
Swarm Hash: 08ccc3ea6a53908730959a1839a8da69a80269c3bf128a65fc960e94553518ac
Commit Hash: 3244941df7fd653750c2143a949a494d7c53def4
Commit Message: fix: webside icon visuals (in access and in preview for website type)


Update DB naming

Generalize from flyteadmin to flyte for both DB name and user

Should values-gcp-core.yaml have been deleted in this commit?

@dpmccabe sorry about that. Some work I'm doing on my branch around adding notifications config where I renamed the file and failed to commit it.
Thanks for noticing


Fix memory leak in Service Container component in UserTranslatePage

Add clean-up function?

I'm having the errors intermittently


The IATK menu is not visible

Hello.
I am a student who wants to use your project.
When I download the file from your github and open it in unity, if I click on the right mouse, the IATK menu is not visible.
Can you tell me how to fix it?

Unity version is 2019.2.8f1.
I downloaded the VRTK into the asset folder.
Is there anything else I should do?

I found a closed question.
I found a solution to that question. Thank you.


[layer-internal] refactoring weight, input, output to layer_node

Implement getter for variable and grad of weight, input, output
Implement getNumWeights

Self evaluation:
Build test: [X]Passed [ ]Failed [ ]Skipped
Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: hyeonseok lee<EMAIL_ADDRESS>

:memo: TAOS-CI Version: 1.5.20200925. Thank you for submitting PR #1304. Please a submit 1commit/1PR (one commit per one PR) policy to get comments quickly from reviewers. Your PR must pass all verificiation processes of cibot before starting a review process from reviewers. If you are new member to join this project, please read manuals in documentation folder and wiki page. In order to monitor a progress status of your PR in more detail, visit http://nnstreamer.mooo.com/.


Mod log

You sould know what this is suppose to do.
One thing we will have different is different logs should have the option to go to different channels like on flare.
As of right now don't worry about message delete/edit. I need to put some work in before we can do that.

Roger


How do I connect peers after "NatIntroductionSuccess" message

I'm using "Introduce" on a master server that has 2 connected clients.
When I receive "NatIntroductionSuccess" how do I connect to the peer?
using netPeer.Connection(endPoint) doesn't seem to do anything (the connections doesn't increase).

The code below definitely fires on both clients but I don't get any messages after that and when I check netPeer.Connections it's still at "1" which is the connection to the master server.
   case NetIncomingMessageType.NatIntroductionSuccess:
                        Debug.Log("Nat: " + msg.SenderEndPoint.ToString() + " : " + this.GetHashCode());
                        netPeer.Connect(msg.SenderEndPoint);
                        Debug.Log(netPeer.Connections.Count);

Did you set NetPeerConfiguration.AcceptIncomingConnections to true for each of those peers? I forgot it when I evaluated this library a few days ago :)

Yes, this is my config:
        config.PingInterval = 0.5f;
        config.ConnectionTimeout = 5;
        config.MaximumConnections = 32;
        config.AcceptIncomingConnections = true;
        config.AutoFlushSendQueue = true;
        config.EnableMessageType(NetIncomingMessageType.ConnectionApproval);
        config.EnableMessageType(NetIncomingMessageType.UnconnectedData);
        config.EnableMessageType(NetIncomingMessageType.NatIntroductionSuccess);

I've had it randomly work twice. I get these each time though:
NAT punch received from <IP_ADDRESS>:57754 we're client, so we've succeeded - token is MatchMaking
NAT punch received from <IP_ADDRESS>:57754 we're host, so we ignore this
I'm guessing the NAT punch is really successful enough.

I tried the master server sample and it still doesn't make the connection.
m_client.Connections.Count = 0 in the MSCLIENT after a NatIntroductionSuccess

Just to add to this, I'm spawning 2 NetPeers and having them connect to a master server. I'm assuming I can do this and have those two peers make connections to each other.
Any help would be appreciated as I'm still pretty stuck.

I'll can try to run the same example when I'm at home - what's your setup? Are the peers and master server on the same computer or different ones?

All on same PC.
Master seperate process
Client both in same process as seperate objects

Ok, I turned off UPnP on my router and now get the error below, what's interesting is that I turned UPnP back on then used DiscoverKnownPeer after a NatIntroductionSuccess message and connected on a DiscoveryResponse message and I get the same message.
I assume this is a good message and it's actually trying to connect but it has issues adding with the m_handshakes collection, adding to it from a different thread or something.
System.InvalidOperationException: out of sync
at System.Collections.Generic.Dictionary2+Enumerator[System.Net.IPEndPoint,Lidgren.Network.NetConnection].VerifyState () [0x00028] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:912    at System.Collections.Generic.Dictionary2+Enumerator[System.Net.IPEndPoint,Lidgren.Network.NetConnection].MoveNext () [0x00000] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:835
at Lidgren.Network.NetPeer.Heartbeat () [0x000c0] in C:\Users\David\Documents\LidgrenTest\Assets\Lidgren.Network\NetPeer.Internal.cs:322
at Lidgren.Network.NetPeer.NetworkLoop () [0x00000] in C:\Users\David\Documents\LidgrenTest\Assets\Lidgren.Network\NetPeer.Internal.cs:208
UnityEngine.Debug:Log(Object)
Lidgren.MatchMaking.c__Iterator0:MoveNext() (at Assets/Lidgren.MM/MatchMaking.cs:164)

Ok, I figured out what I was doing wrong.
My master server was trying to Introduce both sides Introduce(A,B) then Introduce(B,A).
And it was also doubling up the introductions. It connects everytime now, sometimes it produces an out of sync error but it still seems to connect the peers successfully.
I've kept the DiscoverKnownPeer as that seems to work when UPnP is enabled or disabled.
Close this issue.


Nuxt Usage

Any documentation to use with nuxtjs?

I have to modify the path to use the dist/vue.min.js, and it works now.
feel free to close this.

you can share your nuxt.config.js of how you did it?


Add searching customers by phone number

I want to merge this change because...

Impact

[ ] Added option to filter staff by phone number as well - many customers don't remember their order number and saying their email through the phone can be tricky, so searching by phone number (for example in the dashboard 'Orders' section) can be useful.

Pull Request Checklist

[ ] Privileged queries and mutations are guarded by proper permission checks
[ ] Database queries are optimized and the number of queries is constant
[ ] Database migration files are up to date
[ ] The changes are tested
[ ] GraphQL schema and type definitions are up to date
[ ] Changes are mentioned in the changelog

Hey @KonstantinosPapadopoulos, thanks for opening the PR! Would you mind adding a test for these changes? Example test that checks some other filtering on that query is here: https://github.com/mirumee/saleor/blob/70d382759cb0e2a7184c50ff588ffdd0c2e0f862/saleor/graphql/account/tests/test_account.py#L3649
We would need to add another function that tests filtering by phone number.

Thanks a lot @maarcingebala for your help. Hopefully it should be fixed now. I am not very sure why the code coverage is failing though :/

@KonstantinosPapadopoulos  Thank you for your contribution to Saleor!


Crash on startup on fabric 1.18.1

log: https://pastebin.com/b4dM3Zqw

[00:57:41] [ForkJoinPool-1-worker-2/WARN]: The mod "libcd" contains invalid entries in its mod json

That line about libcd appear every time, even without your mod and the game works fine, i even tryed removing that but doesn't change nothing

Oh you have clean-cut installed. Sentimentality provides the same thing and as thus, is incompatible.


Table crashes when pipe returns undefined

I'm submitting a ...  (check one with "x")
[X] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter

Current behavior
Error is thrown and table is crashed.
Expected behavior
It does not throw error and does not crash.
Reproduction of the problem
When pipe returns undefined
What is the motivation / use case for changing the behavior?

Please tell us about your environment:
npm 5.4

Table version:
Latest

Angular version:
4.4.1

Browser: Chrome XX

Language: TypeScript

@olaf89 hmm, are you referring to the pipe transforms set in the column property? Also, do pipes that return undefined not throw in Angular templates? I think the pipe property set in columns should match the same behavior.

Yes, i am referring to pipes on the template definition. I don't believe pipe in angular template would throw error. If it would i'm sure i would have noticed it more then once by now ;)

Here is plunkr, uncomment pipe in column definition to see it fails http://plnkr.co/edit/HvNhrgc4Bc80Kdqh8w01?p=preview

@olaf89 Thanks for showing a demo verifying the functionality in the Angular code. The problem occurs when trying to sanitize user input. I created a PR making a case to not sanitize when there is nothing to sanitize.


Move className overwrite of AccordionContent to the children component

In order to have a smooth opening of the accordion, moving the AccordionContent className overwrite to the children wrapper component allow Radix to calculate correctly the animation and execute a smooth animation in case of className on the AccordionContent component.
Possibly related to https://github.com/shadcn-ui/ui/issues/944

Agreed.

Fixes #944


java.lang.IllegalStateException invalid dictionary: prefix not unique

sdk version:
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.12.12'
Android version:
Android 11
Device:
OPPO,vivo,pixel...
I'm facing a issue that crash in Android 11.
this is the crash log:
Fatal Exception: java.lang.ExceptionInInitializerError
at okhttp3.internal.http2.Hpack$Writer.writeByteString(Hpack.java:552)
at okhttp3.internal.http2.Hpack$Writer.writeHeaders(Hpack.java:520)
at okhttp3.internal.http2.Http2Writer.headers(Http2Writer.java:299)
at okhttp3.internal.http2.Http2Writer.synStream(Http2Writer.java:126)
at okhttp3.internal.http2.Http2Connection.newStream(Http2Connection.java:259)
at okhttp3.internal.http2.Http2Connection.newStream(Http2Connection.java:231)
at okhttp3.internal.http2.Http2Codec.writeRequestHeaders(Http2Codec.java:117)
at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:50)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:126)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:254)
at okhttp3.RealCall.execute(RealCall.java:92)
at com.google.firebase.crashlytics.internal.network.HttpRequest.execute(HttpRequest.java:129)
at com.google.firebase.crashlytics.internal.settings.network.DefaultSettingsSpiCall.invoke(DefaultSettingsSpiCall.java:86)
at com.google.firebase.crashlytics.internal.settings.SettingsController$1.then(SettingsController.java:200)
at com.google.firebase.crashlytics.internal.settings.SettingsController$1.then(SettingsController.java:193)
at com.google.android.gms.tasks.zzo.run(zzo.java:2)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:64)
at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:27)
at java.lang.Thread.run(Thread.java:923)
Caused by java.lang.IllegalStateException: invalid dictionary: prefix not unique
at okhttp3.internal.http2.Huffman.addCode(Huffman.java:180)
at okhttp3.internal.http2.Huffman.buildTree(Huffman.java:168)
at okhttp3.internal.http2.Huffman.(Huffman.java:88)
at okhttp3.internal.http2.Huffman.(Huffman.java:79)
at okhttp3.internal.http2.Hpack$Writer.writeByteString(Hpack.java:552)
at okhttp3.internal.http2.Hpack$Writer.writeHeaders(Hpack.java:520)
at okhttp3.internal.http2.Http2Writer.headers(Http2Writer.java:299)
at okhttp3.internal.http2.Http2Writer.synStream(Http2Writer.java:126)
at okhttp3.internal.http2.Http2Connection.newStream(Http2Connection.java:259)
at okhttp3.internal.http2.Http2Connection.newStream(Http2Connection.java:231)
at okhttp3.internal.http2.Http2Codec.writeRequestHeaders(Http2Codec.java:117)
at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:50)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:126)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:254)
at okhttp3.RealCall.execute(RealCall.java:92)
at com.google.firebase.crashlytics.internal.network.HttpRequest.execute(HttpRequest.java:129)
at com.google.firebase.crashlytics.internal.settings.network.DefaultSettingsSpiCall.invoke(DefaultSettingsSpiCall.java:86)
at com.google.firebase.crashlytics.internal.settings.SettingsController$1.then(SettingsController.java:200)
at com.google.firebase.crashlytics.internal.settings.SettingsController$1.then(SettingsController.java:193)
at com.google.android.gms.tasks.zzo.run(zzo.java:2)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun(ExecutorUtils.java:64)
at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run(BackgroundPriorityRunnable.java:27)
at java.lang.Thread.run(Thread.java:923)
and firebase sdk version if you need:
// Import the Firebase BoM
implementation platform('com.google.firebase:firebase-bom:26.1.0')
// When using the BoM, you don't specify versions in Firebase library dependencies
implementation 'com.google.firebase:firebase-analytics'     // firebase analytics
implementation 'com.google.firebase:firebase-messaging'     // firebase 推送
implementation 'com.google.firebase:firebase-crashlytics'   // firebase crashlytics
implementation 'com.google.firebase:firebase-perf'          // firebase performance

please help me clean this issue. thanks

This looks like a runtime bug in vivo devices on Android 11. Could you please report to the device manufacturer?
Alternately, could you provide an executable test case?

This looks like a runtime bug in vivo devices on Android 11. Could you please report to the device manufacturer?
Alternately, could you provide an executable test case?

This looks like a runtime bug in vivo devices on Android 11. Could you please report to the device manufacturer?
Alternately, could you provide an executable test case?

I can't recurrent this bug, so I can't provide an executable test case. and i found this bug in vivo, oppo and google pixel devides, maybe is not the devices bug?

This looks like a runtime bug in vivo devices on Android 11. Could you please report to the device manufacturer?
Alternately, could you provide an executable test case?

I can't recurrent this bug, so I can't provide an executable test case. and i found this bug in vivo, oppo and google pixel devides, maybe is not the devices bug?

Vivo and Oppo are the same company. Google is different – can you paste info on the Google crash? It might tell us something.

Vivo and Oppo are the same company. Google is different – can you paste info on the Google crash? It might tell us something.

Vivo and Oppo are the same company. Google is different – can you paste info on the Google crash? It might tell us something.

OK thanks , i will report this bug to vivo and Google.

Vivo and Oppo are the same company. Google is different – can you paste info on the Google crash? It might tell us something.

OK thanks , i will report this bug to vivo and Google.

Also https://stackoverflow.com/questions/65784940/java-lang-illegalstateexception-invalid-dictionary-prefix-not-unique

Also https://stackoverflow.com/questions/65784940/java-lang-illegalstateexception-invalid-dictionary-prefix-not-unique

Vivo and Oppo are the same company. Google is different – can you paste info on the Google crash? It might tell us something.

OK thanks , i will report this bug to vivo and Google.

Hi, Same issue for our App. Is your problem solved?


Add the Jazzband contributing guideline

Please add a CONTRIBUTING.md file to the repo that contains the snippet listed on https://jazzband.co/docs/guidelines#contributions to show to users opening issues or PRs what the contributing guidelines are.

@jezdez Done.

@camilonova \o/

:)


Webinar registration

Rather than having participants register for STAR webinars through Constant Contact, the team would like to handle registration in DRIVE. The event will be entered as a resource, and will include some additional fields for setting a limit on participants, etc. There will need to be integration with constant contact in order to give participants the option to be added to the STAR email list. There will also need to be automated reminder and follow-up emails.

webinar scripts: https://docs.google.com/document/d/1AJdymvd5U6WfEOXgNu6nHtQCBdsHvh5twKIKwRQeuc4/edit


Should we generate field number constants?

Most consumers don't need them, but if a developer wants to manually parse a binary protobuf stream, they can be useful.  The generator actually could use those constants also in the code it has for getting the .proto file comments, and has instead manually hardcoded field numbers.
Hopefully if the values aren't used they'd dead strip, but it doesn't mean bloat for anyone build frameworks.

Perhaps the field number constants should be an enum?
I've also been considering moving the type metadata (package name constant, etc) into a subtype.  Maybe something like:
struct Foo: ProtobufMessage {
   struct Metadata: ProtobufMessageMetadata {
      static let protoPackageName = "bar.baz";
      static let jsonFieldNames: [String: ProtoFieldNumbers] = [ ... ];
      enum ProtoFieldNumbers: Int {
      case field1 = 1
      case field2 = 2
      }
   }
}

In particular, that would reduce conflict opportunities with these extra names.

Enums would require users to use rawValue whenever they wanted them; since we'd be defining them for the sole purpose of giving them access to the numeric value itself, it would probably be better to just use static let field1 = 1 instead.
We could still use a case-less enum to make the type non-instantiable, but that's an implementation detail.

The metadata as a struct is also nice because it moves a bunch of stuff out of the same namespace the message fields are in.

Opened https://github.com/apple/swift-protobuf/issues/109 to capture the metadata question.

They could be useful in the generator source where we have some hard coded field numbers when fetching comments.
And they could be useful when we do something for #130 as they would allow a developer to know have to hard code field numbers when using that sorta interface.
But for now, I vote we punt and close this as not happing for 1.0.  We can always revisit it in the future, but for now, less API seems better.

It can be added later without breaking anything.  I don't think we would ever use it in the library, so it wouldn't be a constraint between library and generated code.
Post 1.0.

Closing out since we're dropping this until we decide it is needed.


Implement cancel and wait_until_finish(duration) for DataflowRunner

R: @charlesccychen

Coverage decreased (-0.01%) to 69.958% when pulling 5b7323ad9e10a5693ea41a239c8a675139b977de on aaltay:cancel into 260c4fce8dd61c8e50c2bb3f3da671358a773c84 on apache:master.

Thank you @charlesccychen. PTAL

Coverage increased (+0.007%) to 69.975% when pulling 64df8fcb1310e605096b82764081aca91d68e2cd on aaltay:cancel into 260c4fce8dd61c8e50c2bb3f3da671358a773c84 on apache:master.

Coverage remained the same at 69.968% when pulling 99460ac881f3d07d83a7000be695a7b70c3dfc75 on aaltay:cancel into 260c4fce8dd61c8e50c2bb3f3da671358a773c84 on apache:master.


Add sampling app

This is a POC of a sampling app.

By having multiple apps, we can either have an index (need to work on the html) or leave this out and reference the apps ourselves. Here is an example of such index.

cc @gnopik

Something to solve/mitigate. Having a dynamic list for the parameters is tricky to update automagically. For the moment, ones need to change the number of samples or the method after having changed a parametrisation. Non ideal, but it works for now without magic in the code.
Another thing to watch out, for the parametrisation of the distributions: we have to allow passing a dictionary. If this really goes into production we will have to look into hardening this as user can input anything and we actually execute this on the backend. We only need to allow passing a dictionary with limited support to str, int, float.

Whichever would be easier perhaps?
My only suggestion is to make it dumb-proof by calling

the original dashboard: SimDec dashboard
Sampling app: Data generation (sampling)


Accessing token string or tree.data transparently

It would be nice if there was a way so when traversing a tree you don't need to know if a child is a token or a tree in order to decide the alternative path to take, eg given the grammar rule
postfix_expression:  primary_expression
|  postfix_expression "[" expression "]"
|  "(" type_name ")" "{" initializer_list "}"

I have to do
if (is_tree(node.children[0]) and (node.children[0].data == "postfix_expression"):
   <do treey stuff>
elif (is_token(node.children[0]) and (node.children[0].value == "(")):
   <do tokeny stuff>

Token already compares to string transparently without .value (ie. token.value == token), but it would be nice if tree can compare to string transparently too without .data, then the code would become
if (node.children[0] == "postfix_expression"):
   treey stuff
elif (node.children[0] == "("):
   tokeny stuff

A slightly worse option is to add a .data field to token that contains the token string, so you can still handle trees and tokens transparently.
Let me know if there already exists a better way of doing this.

@antoniotejada Is there a specific reason that you want the ( token in your tree? In Lark we recommend to discard punctuation.
Also, you can do tree_or_token == "my_token_value", and it will return true if it's Token(SOME_TYPE, "my_token"value") but False if it's a tree.
However, you should really need to. Maybe take a step back and try to describe what you're trying to solve.

@antoniotejada Is there a specific reason that you want the ( token in your tree? In Lark we recommend to discard punctuation.

I'm not sure which tokens are punctuation for you and which are not, but in C '(' is definitely needed to tell grammar productions apart and generate one or another code, eg
postfix_expression:  primary_expression
  |  postfix_expression "[" expression "]"
  |  postfix_expression "(" argument_expression_list? ")"

the first is array selection, the second is function call. You could say that in this specific case you can tell the difference without hooking on [ and ( and looking if there's a next production and which one it is, but that just complicates the code unnecessarily, from checking a single token you change to having to check if there's a production following and which one it is, and without any tangible benefits that I can see.
Another example:
postfix_expression:  primary_expression
  |  postfix_expression "." identifier
  |  postfix_expression "->" identifier

Maybe you could claim that "." is punctuation and "->" is not, but that seems pretty arbitrary to me and again I can't see the benefits of removing one.

Also, you can do tree_or_token == "my_token_value", and it will return true if it's Token(SOME_TYPE, "my_token"value") but False if it's a tree.

Right, but the problem is that then you need to be very careful to defer any children[0].data checks (which are not valid if children[0] is a token) after you've done all the token checks, which is not maintainable.

However, imho you shouldn't have to. Maybe take a step back and try to describe what you're trying to solve.

@erezsh The way I'm doing things right now is using Lark to generate the tree, and then traversing the tree manually:
tree = parser.parse(source)
generate_ir(tree)

(you can see the full code here https://github.com/antoniotejada/epycc/blob/3467ab77be8eebdee36a83e74cf571f45bcfe07b/epycc.py#L2627 )
I could use Lark's Interpreter or Transformer approach, but at this moment I rather make the code generation independent from Lark as much as possible, so I'm using Lark as an "AST" producer and my code generator consumes the tree and generates code. If I ever switch to another non-Lark parser I just need to generate a tree with nodes that have .children and .value attributes, since that's everything I use from Lark.
In addition, and for the same reason, I want to modify the grammar as little as possible, so I don't want to put markers like "!" or "?" or such to tag which tokens to preserve and which tokens to remove.

The Lark way of doing this is with aliases:
?postfix_expression:  primary_expression              // use ? to discard this option
  |  postfix_expression "[" expression "]"    -> array_get
  |  postfix_expression "(" argument_expression_list? ")"   -> func_call

Similarly,
?postfix_expression:  primary_expression  // discarded
  |  postfix_expression "." identifier    -> get_attr
  |  postfix_expression "->" identifier   -> get_ptr

In this case, both . and -> are punctuation, and are unnecessary in the tree.
If you want to do it another way, you have every right to, and Lark won't stand in your way.
But it to me, it seems silly to not take advantage of Lark's full abilities, and then complain when the result is a little awkward.

If you really want to make the Tree nodes compare equal to string based on the data attribute, you can just defined your own custom subclass:
class TreeEqString(Tree):
    def __eq__(self, other):
       if isinstance(other, str):
            return self.data == other
        else:
            return super(TreeEqString, self).__eq__(self, other)

and then create the parser with

parser=Lark(..., tree_class=TreeEqStr)

However, I also agree with @erezsh that you should probably use Lark abilities (like aliases) instead.

@MegaIng Thanks but if I have to fix it myself I rather monkey patch at import time.
import lark
# Monkey patch lark trees so they can compare to strings, see
# https://github.com/lark-parser/lark/issues/986
old_lark_tree_eq = lark.Tree.__eq__
lark.Tree.__eq__ = lambda self, other: (self.data == other) if isinstance(other, str) else old_lark_tree_eq(self, other)

Interestingly, because lark.Tree.eq is currently silently swallowing the AttributeError, I found that I was already comparing against strings in a few places (but it was against token strings, not rule names, so it was ok).


Namespace PropTypes

Import { PropTypes } from 'react-metrics' may collide with the PropTypes from 'https://www.npmjs.com/package/prop-types'
Suggest namespacing to this package

You can avoid collides by importing with an alias
Import { PropTypes as MetricsPropTypes } from 'react-metrics'

Closed by #38 and #42.


sched.h: add SCHED_BATCH and SCHED_IDLE definition

Summary
Resolve undefined compile-time issues encountered when porting third-party libraries.
Impact
Testing
qemu local:x64

@zhhyu7 are you planing to add these scheduling policies?

@zhhyu7 are you planing to add these scheduling policies?

Hi @acassis, Currently, I do not have any plans to add relevant scheduling policies. These definitions are used only to compare return values in the third-part library. If it's not appropriate, then I will close this PR for now.


fix: Minor UI fixes to JS Editor

Description
Changes

Removed padding top in JS editor
Removed focus and hover states on JS Editor
Changed font family in peek-overlay
Changed comment colour to gray-400

PR fixes following issue(s)
Fixes #24884
Media

Type of change

Bug fix (non-breaking change which fixes an issue)
UI changes

Testing

How Has This Been Tested?

[x] Manual

Test Plan

Add Testsmith test cases links that relate to this PR

Issues raised during DP testing

Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR)

Checklist:
Dev activity

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[ ] PR is being merged under a feature flag

QA activity:

[ ] Speedbreak features have been covered
[ ] Test plan covers all impacted features and areas of interest
[ ] Test plan has been peer reviewed by project stakeholders and other QA members
[ ] Manually tested functionality on DP
[ ] We had an implementation alignment call with stakeholders post QA Round 2
[ ] Cypress test cases have been added and approved by SDET/manual QA
[ ] Added Test Plan Approved label after Cypress tests were reviewed
[ ] Added Test Plan Approved label after JUnit tests were reviewed

/build-deploy-preview env=release

/ok-to-test

/build-deploy-preview

/ok-to-test

LGTM cc: @arunvjn


g:jupytext_fmt = 'md:myst' doesn't work

When you set
let g:jupytext_filetype_map = {'md:myst': 'markdown'}                        let g:jupytext_extension_map = {'md:myst': 'md'}                             let g:jupytext_fmt = 'md:myst'
the new format isn't taken into account and opening a file yields an error about unrecognized format despite jupytext --to md:myst working
A clear and concise description of what the bug is.
Diagnostics

vim --version:  NVIM v0.4.4

Operating system information (e.g. uname -a): SMP Debian 5.14.6-3 (2021-09-28) x86_64 GNU/Linux

python --VV: Python 3.9.7 (default, Sep 24 2021, 09:43:00)

Are you using Anaconda? No

Does converting the notebook to/from ipynb with jupytext on the command line work? Yes

Does it work when you set g:jupytext_command in ~/.vimrc to be the exact some jupytext that you used manually, with the exact same version of Python? Yes

There is no g:jupytext_extension_map. This is not a user-configurable mapping. The keys in s:jupytext_extension_map should be all the formats that jupytext supports, and if jupytext gains new formats, that dict should be extended accordingly. I'm not really following the development of jupytext, but I'd merge PR's that extend s:jupytext_extension_map with new formats.


UnicodeEncodeError on logging events

Always throws error when downloading a new book:
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib/python3.5/logging/__init__.py", line 983, in emit
    stream.write(msg)
UnicodeEncodeError: 'ascii' codec can't encode character '\xa9' in position 50: ordinal not in range(128)
Call stack:
  File "safaribooks.py", line 1023, in <module>
    SafariBooks(args_parsed)
  File "safaribooks.py", line 292, in __init__
    self.display.book_info(self.book_info)
  File "safaribooks.py", line 135, in book_info
    self.info("{0}{1}{2}: {3}".format(self.SH_YELLOW, t[0], self.SH_DEFAULT, t[1]), True)
  File "safaribooks.py", line 67, in info
    self.log(message)
  File "safaribooks.py", line 61, in log
    self.logger.info(str(message))
Message: '\x1b[33mRights\x1b[0m: Copyright \xa9 2018 Packt Publishing'

Could you clone again the repository and try with this new fix?
Let me know.


HanoiDB backend ?

Hello,
what do you think of pluging in an https://github.com/krestenkrab/hanoidb backend ?
Have fun

It looks very good, and it would be great to be Erlang-only, but I'm not sure if it is actively maintained or not, and I don't know of anyone using it. It seems that Basho thought time ago about integrating it with Riak, but they gave up: https://github.com/basho-labs/riak_kv_hanoidb_backend

Hanoi is very interesting but I'm not sure if it's maintained.  It was never an "official" project at Basho, so don't use our abandonment to reason about it's performance or reliability.  We simply didn't have the resources nor the time to continue it.

It's a pity, since it seems a perfect candidate for NkBASE (and Riak, by the way). And coming form Kresten Krab, it is top-quality for sure. It's strange that nobody is continuing it.

Yes, as the NkBase readme states "NkBASE has a clean code base, and can be used as a starting point to learn how to build a distributed Erlang system on top of riak_core, and to test new backends..." I strongly agree that [HanoiDB] "seems a perfect candidate for NkBASE". That would make a "top-quality" flexible pure Erlang solution.
HanoiDB has Triq / Proper / QC tests and is "only" 2000 lines. It's MapReduce & secondary indexing able, it allows live backup etc. I don't understand why Basho takes pain for integrating C++ leveldb instead of HanoiDB. Maybe HanoiDB is not enough "battle proofed" ? See https://github.com/krestenkrab/hanoidb/issues/20

I read somewhere that it's consistently slower and uses more memory than LevelDB but at the same time, it's more predictable (since it's written in Erlang).

Hopefully Basho has made basho_bench which is another very nice piece of software. I think there are use cases for predictable pure Erlang solutions. I'd trade some speed at the node level to have predictable (good) performance at the cluster level. And as the number of cores is increasing at the node level HanoiDB may catchup to LevelDB performance.


Any plan to support newly released mediapipe blendshape v2?

Do you have any plan to transfer mediapipe blendshape model to onnx/trt?
ref link: https://storage.googleapis.com/mediapipe-assets/Model Card Blendshape V2.pdf

I don't see the point of converting the same model.

It is not the same. Actually landmarks cannot be used directly when rendering models. In AR/VR applications, people use blendshapes to drive character expressions, which is the feature supported by mediapipe recently.

https://github.com/keijiro/FaceMeshBarracuda/issues/24

I expect you to contribute to the community, not just want information.
I am open to pull requests for sample code.

face_blendshapes.onnx.zip

$ sit4onnx -if face_blendshapes.onnx -oep cpu
INFO: file: face_blendshapes.onnx
INFO: providers: ['CPUExecutionProvider']
INFO: input_name.1: input_points shape: [1, 146, 2] dtype: float32
INFO: test_loop_count: 10
INFO: total elapsed time:  5.369663238525391 ms
INFO: avg elapsed time per pred:  0.5369663238525391 ms
INFO: output_name.1: output shape: [52] dtype: float32

 sit4onnx -if face_blendshapes.onnx -oep cuda
INFO: file: face_blendshapes.onnx
INFO: providers: ['CUDAExecutionProvider', 'CPUExecutionProvider']
INFO: input_name.1: input_points shape: [1, 146, 2] dtype: float32
INFO: test_loop_count: 10
INFO: total elapsed time:  28.800249099731445 ms
INFO: avg elapsed time per pred:  2.8800249099731445 ms
INFO: output_name.1: output shape: [52] dtype: float32

$ sit4onnx -if face_blendshapes.onnx -oep tensorrt
INFO: file: face_blendshapes.onnx
INFO: providers: ['TensorrtExecutionProvider', 'CPUExecutionProvider']
INFO: input_name.1: input_points shape: [1, 146, 2] dtype: float32
INFO: test_loop_count: 10
INFO: total elapsed time:  3.676176071166992 ms
INFO: avg elapsed time per pred:  0.3676176071166992 ms
INFO: output_name.1: output shape: [52] dtype: float32


Subset MT to specific variants

Quick script to take the seqr labelled variant TSV, a pointer to a MT, and create a subset containing only the relevant variants

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 26.66%. Comparing base (8deea35) to head (7ef9268).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #983   +/-   ##
=======================================
  Coverage   26.66%   26.66%
=======================================
  Files           9        9
  Lines        1699     1699
=======================================
  Hits          453      453
  Misses       1246     1246

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Use a dispatch_once to speed up colour generation, add a gitignore.

The dispatch_once is used to circumvent the expensive colour generation for the 2nd-nth time generation colours. I was seeing performance improvements of 8-12x on an iPhone 6.
Adds a fairly standard gitignore file for the example project too.

Looks good. Thanks for the contribution!


PowerShell should have more concise anonymous object syntax

Summary of the new feature / enhancement
I'm a semi-frequent PS user, but still frequently forget the syntax to create an anonymous object. I looked it up again today and found this answer: https://stackoverflow.com/questions/36081372/how-do-i-create-an-anonymous-object-in-powershell. I started with their first suggestion of using a hashmap, which is the most concise syntax, but when passing those to Format-Table, you get ugly output (see https://stackoverflow.com/questions/20874464/format-table-on-array-of-hash-tables)
So then I used this syntax:
[pscustomobject]@{ Name = $_.Name; $_.Length... }

But compared to C#, this is so much less concise than it could be:
new { x.Name, x.Length }

It would be great if PS had something a little more analogous to that.
Proposed technical implementation details (optional)
Two suggestions:

Anonymous objects should use the argument name as the implicit property name if none other is provided
There should be a way to create an anonymous object without first creating a hashmap and then casting it. I don't know what the syntax would be here, but the request is for something as simple or simpler than C#

Thanks for considering!!

If you add this function to a module or your $profile:
function New-PsCustomObject
{
    [OutputType([pscustomobject])]
    [Alias("New")]
    Param
    (
        [Parameter(Mandatory, ValueFromPipeline)]
        [hashtable]
        $Properties
    )
    Process
    {
        [pscustomobject]$Properties
    }
}

You can create objects like this:
$Objects = @(
    New @{Prop1="Val1";Prop2="Val2"}
    New @{Prop1="Val3";Prop2="Val4"}
    New @{Prop1="Val5";Prop2="Val6"}
)

One caveat about this approach is that the property order will be random because of the nature of hashtables.

@MartinGC94 it might be better to do [System.Collections.IDictionary] as the type so you can do
New [Ordered]@{Foo = 'bar'}

But at that point in time why not just do [PSCustomObject] :).

Anonymous objects should use the argument name as the implicit property name if none other is provided

You can use Select-Object to do this today:
$obj | Select-Object -Property Name, Length

This will create a brand new object that has the Name and Length property of the input object. You can even combine this logic with custom properties
$obj | Select-Object -Property Name, @{N='Size'; E = [$_.Length}}

See also:

#9086

new { x.Name, x.Length }

I don't understand are you talking about PowerShell as a shell or as a scripting language? The first implies concise syntax, the second its readability. How to find the optimal solution? In the console, it is quite possible to get by with an anonymous function to create an object, even if it does not have a parameter block.
& { $h = [ordered] @{}; $h.string,$h.integer = $args; [pscustomobject] $h } 'one' 2

& { param([string]$string, [int]$integer) $h = @{}; $h.string,$h.integer = $string,$integer; [pscustomobject] $h } 'one' 2

Thanks everyone! I'm seeing a bunch of workarounds, none of which are particularly concise in my opinion.
Creating a helper New function is slick, but still requires specifying the field names AND using the ordered keyword if you don't want your properties dumping in random order.
The Select-Object method gives you implicit field names, but seems to require separate code to define and initialize the object.
@237dmitry, I'm not sure about your question. I'd like something that's more concise AND more readable, which I'd argue the example I pasted is for both. Is { Name = x.Name } more or less readable than { x.Name }? Once you're comfortable with the syntax, I'd say it's more readable, and objectively more concise.

The Select-Object method gives you implicit field names, but seems to require separate code to define and initialize the object.

How is that any different from your new { x.Name, x.Length } syntax? In this case x must already have defined a Name and Length property so this would look like $x | Select Name, Length. If you are just talking about a constructor to a class then this is already possible with [TypeName]::new($arg1, $arg2, ...). If you are talking about a class with an empty constructor but you want to set the properties on init you can do [TypeName]@{Prop1 = $foo; Prop2 = $bar}.

Once you're comfortable with the syntax, I'd say it's more readable, and objectively more concise.

I would like to say that if there are such changes, it will not be soon. For this, it is necessary to go a long way of evolution. Backward compatibility, Windows powershell compatibility, it's all heavy baggage. All those who expressed their opinion above, they tried to show that preparation is necessary to solve specific problem effectively. Everyone has their own templates, which are used for concise syntax in everyday tasks. Your desire for a sharp and efficient scripting language is in full agreement with the general opinion, but in my opinion, this is like asking the fsharp syntax for the сsharp syntax.

Good point @237dmitry, back-compat could be a big issue here, for sure!
@jborean93, the specific scenario I was trying was I wanted a new, anonymous object, which was partially populated with an existing field, and partly by a calculated one. Here's how I solved it at the time:
get-appxpackage | % { [pscustomobject]@{ Name = $_.Name; Dependencies = $_.Dependencies | ? { $_ -match "\.NET" } } }

With your original syntax, it would look like this (you had a typo in your example):
get-appxpackage | select Name, @{ L="Dependencies"; E={$_.Dependencies | ? { $_ -match "\.NET" } } }

That's shorter, but I think more confusing, with the throwaway property names and all. With my dream syntax it'd be something like:
get-appxpackage | select { $_.Name, Dependencies = $_.Dependencies | ? { $_ -match "\.NET" }
or
get-appxpackage | % { new { $_.Name, Dependencies = $_.Dependencies | ? { $_ -match "\.NET" } }

As for the desire to have inferred property names:
The C# syntax only works for non-calculated properties; calculated properties require repeating the name of the involved property too:
// `Year =` is required since the property value is an *expression*, not just a simple name or property access.
var dt = DateTime.Now; new { dt.Month, Year = (dt.Year + 1) }

Leaving C#'s ability to use the names of variables (e.g., var Num =42; new { Num }) out of the picture:
Select-Object is therefore a reasonable analog to this functionality.
However, as a separate aspect you can argue - and I would agree - that the syntax for PowerShell's calculated is too verbose and should therefore be simplified; e.g.:
# HYPOTHETICAL example; the concise equivalent of:
#     [datetime]::Now | Select-Object Month, @{ Name = 'Year'; Expression = { $_.Year + 1 } }
[datetime]::Now | Select-Object Month, @{ Year = $_.Year + 1 }

The following preexisting issue proposes this:

#8107
A later duplicate: #11866

If this simplification gets implemented, I'd say Select-Object is then (mostly) on par with C#'s syntax with respect to inferring property names.

As for the desire to have a more concise syntax for object ([pscustomobject]) literals:

without first creating a hashmap and then casting it.

Note that [pscustomobject] @{ one=1; two=2; three=3 } already is syntactic sugar: that is, you're not creating a hashtable by way of a literal @{ ... } that is then converted to [pscustomobject], as evidenced by the fact that this syntax preserves entry definition order, which hashtables themselves do not.

(In terms of implementation, an intermediate (ordered) dictionary type may well be involved - I haven't looked at it. Informal tests suggest that the implementation's efficiency could be improved, as the explicitly equivalent that does involve an explicit - but ordered - hashtable - [pscustomobject] [ordered] @{ one=1; two=2; three=3 } appears to be faster.)

However, I personally agree that [pscustomobject] @{ one=1; two=2; three=3 } is a lot of ceremony for something as frequently used as (anonymous) object construction, especially given that involves additional syntax that builds on that of hashtables.

In an ideal world - one that would be allowed to break backward compatibility in substantial ways - PowerShell would make no distinction between hashtables and custom objects, similar to how objects function in JavaScript, in which case you'd only need one object/dictionary-literal form, and something like @{ one=1; two=2; three=3 } alone would suffice (for less common uses cases such as non-string-typed dictionary keys you'd still need construction of specific .NET types).

Specifically, if something like the System.Dynamic.ExpandoObject class where used in lieu of [psobject] / [pscustomobject], it could situationally act as either an object with properties or as a dictionary with keyed entries.

Given the backward compatibility constraints, I see only two options for shortening the object-literal syntax:

Option A: Introduce a short type accelerator such as [co]:

This would shorten [pscustomobject] @{ one=1; two=2; three=3 } to  [co] @{ one=1; two=2; three=3 }
However, it is technically a breaking change, given that PowerShell custom class definitions named co could exist; conceivably, evaluation of the corpus of PowerShell scripts could let to classifying this as an acceptable breaking change, namely one falling into bucket 3.

Option B: Preferably, introduce a symbol-based variation of the hashtable-literal syntax.

This would shorten [pscustomobject] @{ one=1; two=2; three=3 } to, say,  @[ one=1; two=2; three=3 ]
Given that such a construct currently causes a syntax error (both in expression and argument parsing mode), there is no backward-compatibility concern.
As for the specific delimiters to choose for after @: while [ ... ] is invariably at odds with other languages, in the context of PowerShell it may work due to type literals being enclosed that way

PowerShell isn't meant to be written like C# & those that come to PowerShell infrequently, often voice similar asks.
Personally I don't see this happening but that's more the Language WG to discuss further

I'll admit that even though I must do it about 100x per day, my brain definitely consumes a little extra bandwidth each time I have to type out<EMAIL_ADDRESS>without typos.
I am a pretty fast typist, but I'm positively poor at spelling, so whenever I have to type a word that is say >10 chars long, I'm usually sounding it out in my head, in real-time.
So 100x per day I feel like I'm going:
$SomeVar =  (READY BRAIN? GO<EMAIL_ADDRESS>(😅 nailed it! and no, not actually in all-caps)
When prototyping some script in a REPL environment, I'm trying to move fast and break things so I can iterate on an idea, and a typo isn't a worthy reason to have to go back and iterate again. I've made a few efforts to try and reduce this pain-point for myself (like a function similar to what's been mentioned above), but for some reason I cannot get a type accelerator to work with the PSCustomObject type.
I've been using a number of self-defined accelerators for some time now (mostly aliasing some commonly used types from the System.Collections namespace), but there must be some idiosyncrasy to this specific type and this issue seemed like the perfect opportunity to learn more!
For instance, this works just fine:
> $TypeAccelerators = [psobject].Assembly.GetType('System.Management.Automation.TypeAccelerators')

> $TypeAccelerators::Add('StringSet', [System.Collections.Generic.HashSet[System.String]])

> [StringSet]$MyStrSet = @('one','two','one','three') # should prevent duplicate value 'one'

> $MyStrSet.GetType().FullName
System.Collections.Generic.HashSet`1[[System.String, System.Private.CoreLib, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]

> $MyStringSet
one
two
three

But the same technique will not work with System.Management.Automation.PSCustomObject type, instead you get this error:
> $TypeAccelerators::Add('psco', [System.Management.Automation.PSCustomObject])

> $MyPSCO = [psco]@{ myprop = 'myval' }
InvalidArgument: Cannot convert the "System.Collections.Hashtable" value of type "System.Collections.Hashtable" to type "System.Management.Automation.PSCustomObject".

I assume it has to do with the implementation details concerning the hashtable->pscustomobject conversion done within the syntactic sugar of [pscustomobject]@{} as @mklement0 nicely described.
Anyone have any insights on a workaround for this behavior?

Definitely still an issue!

Definitely still an issue!


shop management: adjustments

update hours of operation to include each day of week
add ability to delete a shop

This is done by pr #109


Column not marked with primaryKey

Hey @ozum - thanks for this project - it's really nice. I'm having the following problem, however.
After creating a table and subsequently enhancing it with an _id column, marked as primaryKey as follows:
module.exports =

  up: (queryInterface, Sequelize) ->
    addColumns = {

      _id:
        type: Sequelize.INTEGER
        unique: true
        allowNull: false
        primaryKey: true
        autoIncrement: true

      _uuid:
        type: Sequelize.UUID
        unique: true
        allowNull: false
        primaryKey: true
        defaultValue: Sequelize.UUIDV4()

    }

    promises = []
    for table in TABLES
      for column, columnSpec of addColumns
        promises.push queryInterface.addColumn table, column, columnSpec
    return Bluebird.join promises...

  down: (queryInterface, Sequelize) ->
    promises = []
    for table in TABLES
      for column in ['_id', '_uuid']
        promises.push queryInterface.removeColumn table, column
    return Bluebird.join promises...

I generate my models with spgen -d database -u user -p pass -o src/autogen-models -t sequelize4
and subsequently attempt to export my ORM as such:
path = require 'path'
database = require path.join __dirname, 'autogen-models'

module.exports = (options) ->
  db = options[options.environment]
  database.setup db.database, db.username, db.password, {
    host: db.host
    port: db.port
  }
  return database

which in turn produces:
> $ node ./index.js                                                                                (💎ruby-2.2.1)(⬡0.12.4)
/home/egeste/Source/project_name/db/node_modules/sequelize/lib/model.js:167
      throw new Error("A column called 'id' was added to the attributes of '"
            ^
Error: A column called 'id' was added to the attributes of 'Action' but not marked with 'primaryKey: true'
  at [object Object].addDefaultAttributes (/home/egeste/Source/project_name/db/node_modules/sequelize/lib/model.js:167:13)
  at [object Object].Model.init (/home/egeste/Source/project_name/db/node_modules/sequelize/lib/model.js:711:24)
  at [object Object].Sequelize.define (/home/egeste/Source/project_name/db/node_modules/sequelize/lib/sequelize.js:552:17)
  at defineModel (/home/egeste/Source/project_name/db/src/autogen-models/index.js:35:35)
  at Array.forEach (native)
  at init (/home/egeste/Source/project_name/db/src/autogen-models/index.js:119:29)
  at Object.module.exports.setup (/home/egeste/Source/project_name/db/src/autogen-models/index.js:153:5)
  at module.exports (/home/egeste/Source/project_name/db/src/index.coffee:6:12)
  at Object.<anonymous> (/home/egeste/Source/project_name/db/index.js:9:18)
  at Module._compile (module.js:460:26)
  at Object.Module._extensions..js (module.js:478:10)
  at Module.load (module.js:355:32)
  at Function.Module._load (module.js:310:12)
  at Function.Module.runMain (module.js:501:10)
  at startup (node.js:129:16)
  at node.js:814:3

What gives?

After debugging the issue a little, it appears that this is actually a bug in pg-structure (which, thankfully, you also own). More interestingly, it appears to be related to the fact that determining which columns are a primaryKey in postgresql is exceptionally difficult.

More interesting observations, according to the PostgreSQL documentation on Primary Keys:
Technically, a primary key constraint is simply a combination of a unique constraint and a not-null constraint.
http://www.postgresql.org/docs/9.0/static/ddl-constraints.html#AEN2494
So a potential workaround may be to check the state of unique and default on a column.
Column.prototype.isPrimaryKey = function () {
    return (this.unique() !== null && this.default() !== null);
}

Closing as a duplicate of https://github.com/ozum/pg-structure/issues/2


Change account creation email(s) to use the .org address.

I closed this assuming it was related to the addressed remark on #143


[ORCA-306] Get and update Challenge submissions

problem
solution

[x] Add a method to get submissions of a desired submission status (default is RECEIVED)
[x] Add a method to update submission statuses of input submission(s)
[x] Add tests
[x] Add challengeutils as a dependency
[x] Add documentation where appropriate
[ ] Fix failing CI jobs

testing & preview

Hi @thomasyu888 thanks for the comments. Since this PR is a blocker for ORCA-302, I'd like to give a status update:
I see no way of mocking the get_submissions test, so I'm constructing a set of integration tests where I build up and tear down a Project with an Evaluation queue for testing. This is what I'm working on right now and will aim to wrap up before the end of the day. @BWMac

Hi @thomasyu888 thanks for the comments. Since this PR is a blocker for ORCA-302, I'd like to give a status update:
I see no way of mocking the get_submissions test since it requires retrieving submissions from an actual submissions view, so I'm constructing a set of integration tests where I build up and tear down a Project with an Evaluation queue for testing. This is what I'm working on right now and will aim to wrap up before the end of the day. @BWMac

See something like this: https://github.com/Sage-Bionetworks/Genie/blob/429dafbaed3bc78bbf71ff6bfffb7d88a6f49d4d/tests/test_clinical.py#L15-L46.  There is a way to create unit tests by mocking the behavior of tableQuery which may be lower lift than an integration test.  That said, those tests I wrote are a bit dated.  There are most likely other ways to achieve the mocking of a table query.

I'm going to mark this as RFR to move things along even though codecov is giving me 75%; The code that it says isn't being covered is covered here and here to my understanding.
I'll continue to look at this as I welcome review comments.


Installation guide wrong settings for nginx

Hi,
The installation guide is wrong @ https://github.com/atech/postal/wiki/Installation#configuring-nginx
sudo cp /opt/postal/app/resource/nginx.cfg /etc/nginx/sites-available/default

# You can create a self signed SSL certificate if you need to (otherwise put your own
# key & cert in /etc/nginx/ssl/postal.crt and postal.key)
sudo mkdir /etc/nginx/ssl/
sudo openssl req -x509 -newkey rsa:4096 -keyout /etc/nginx/ssl/postal.key -out /etc/nginx/ssl/postal.crt -days 365 -nodes

The default postal nginx settings uses this path /etc/nginx/ssl/postal.cert instead of /etc/nginx/ssl/postal.crt

The install script has a fix for this issue
https://github.com/atech/postal/blob/master/script/install/ubuntu1604.sh

Good spot, the certificate extension was standardised to .cert in the code back in https://github.com/atech/postal/issues/98 and https://github.com/atech/postal/pull/350 but the wiki got missed out so the code should be fine but hopefully someone will be able to update the wiki.

Great!

We no longer suggest using nginx.


unison-fsmonitor: init at 0.3.3

Description of changes

https://github.com/autozimu/unison-fsmonitor
unison does not ship a unison-fsmonitor binary for darwin.
This is a separate project for implementing unison-fsmonitor functionality on darwin.
It might be possible to get this working on Linux, but there's no point, as unison already ships unison-fsmonitor.
Tested working with unison -repeat watch

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[x] aarch64-darwin

[x] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-ready-for-review/3032/2760


[urgent] fix for UnproxyableResolutionException

1

I'll add 0.9 to @mbiarnes .1 giving a total of +1 to merge ;)

Already merged. Closing.


WA-279 - Create safe in a three step process

Travis automatic deployment:
https://staging-11-pr-gnosis-team-safe-gnosis.surge.sh
Storybook book automatic deployment:
https://storybook-staging-11-pr-gnosis-team-safe-gnosis.surge.sh

Travis automatic deployment:
https://staging-11-pr-gnosis-team-safe-gnosis.surge.sh
Storybook book automatic deployment:
https://storybook-staging-11-pr-gnosis-team-safe-gnosis.surge.sh

Travis automatic deployment:
https://staging-11-pr-gnosis-team-safe-gnosis.surge.sh
Storybook book automatic deployment:
https://storybook-staging-11-pr-gnosis-team-safe-gnosis.surge.sh

Travis automatic deployment:
https://staging-11-pr-gnosis-team-safe-gnosis.surge.sh
Storybook book automatic deployment:
https://storybook-staging-11-pr-gnosis-team-safe-gnosis.surge.sh

Travis automatic deployment:
https://staging-11-pr-gnosis-team-safe-gnosis.surge.sh
Storybook book automatic deployment:
https://storybook-staging-11-pr-gnosis-team-safe-gnosis.surge.sh