Start a Sonos list in a random song every time

This was referenced a while back in this quote:
"Not now but I guess Node-RED can do that. Use get.items and store it in a flow variable. Then use other Node-RED nodes to create "random" number between 1 and get.items array length."
Originally posted by @hklages in https://github.com/hklages/node-red-contrib-sonos-plus/issues/60#issuecomment-628074640
I was wondering if there's been any advances in this idea and if not, could you help a newbie out in achieving this?
Thanks!

Hi. It should be possible with Node-RED. Lets try.
What is your detailed request?
In My Sonos, you store many playlists (how many?). Should all be included or only "some"
You want to play one out of them? What should happen after that is played?
How is the process triggered - do you use a button in the Node-RED dashboard?
get all items, filter playlists, store them as array in flow or global variable.
Then use random to get a random number. Retrieve the title with that number as index from flow variable and us it in group.play.mysonos.

I currently have a flow that turns on/off several lights (not finished yet, but works) and also plays a certain playlist called relax on a Sonos.

Basically I want to have that one playlist be on random... right now it's got only a couple of songs, but as time goes by I'll be adding more and more... so that I don't get bored just listening to the same 3 hour long song every time..

Hi.
Playing the songs of one playlist in random order is a build in function of the SONOS-Queue. You only have to activate the "SHUFFLE" mode (instead of "NORMAL") to do that.
In you flow you should

remove group.clear.queue as group.play.mysonos does that by default.
remove group.play.queue as group.play.mysonos does that automatically.
set the queue to shuffle mode (maybe with a delay) try it.

Here is the flow in  export format. You have to use Node-RED import and change the grey nodes to use your player and you playlist from My Sonos.
Does it work in your environment?
[{"id":"0cb12a259087b29e","type":"debug","z":"f1e9954c32e7d4fe","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":390,"y":240,"wires":[]},{"id":"69d1b4e51648cee2","type":"inject","z":"f1e9954c32e7d4fe","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":100,"y":80,"wires":[["8ef287cd392b5dd9"]]},{"id":"8ef287cd392b5dd9","type":"sonos-universal","z":"f1e9954c32e7d4fe","confignode":"2fb67e61a2b0d13e","command":"group.play.mysonos","state":"HERZ","stateType":"str","avoidCheckPlayerAvailability":false,"name":"","x":180,"y":120,"wires":[["992669d7df7e333b"]]},{"id":"992669d7df7e333b","type":"sonos-universal","z":"f1e9954c32e7d4fe","confignode":"2fb67e61a2b0d13e","command":"group.set.queuemode","state":"SHUFFLE","stateType":"str","avoidCheckPlayerAvailability":false,"name":"","x":280,"y":180,"wires":[["0cb12a259087b29e"]]},{"id":"2fb67e61a2b0d13e","type":"sonos-config","name":"Kitchen","serialnum":"","ipaddress":"<IP_ADDRESS>"}]

It sort of works... that is, it starts playing... but it only loads one song from the playlist... ignoring the rest (there's 4 right now) and therefore not doing the shuffle... ideas?

Hmmmm. Lets have a look at your "queue".
Try this and send me the output of the debug node:
[{"id":"0cb12a259087b29e","type":"debug","z":"f1e9954c32e7d4fe","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":430,"y":240,"wires":[]},{"id":"69d1b4e51648cee2","type":"inject","z":"f1e9954c32e7d4fe","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":100,"y":80,"wires":[["8ef287cd392b5dd9"]]},{"id":"8ef287cd392b5dd9","type":"sonos-universal","z":"f1e9954c32e7d4fe","confignode":"2fb67e61a2b0d13e","command":"group.play.mysonos","state":"HERZ","stateType":"str","avoidCheckPlayerAvailability":false,"name":"","x":180,"y":120,"wires":[["992669d7df7e333b"]]},{"id":"992669d7df7e333b","type":"sonos-universal","z":"f1e9954c32e7d4fe","confignode":"2fb67e61a2b0d13e","command":"group.set.queuemode","state":"SHUFFLE","stateType":"str","avoidCheckPlayerAvailability":false,"name":"","x":220,"y":180,"wires":[["33ae18d699f9853a"]]},{"id":"33ae18d699f9853a","type":"sonos-universal","z":"f1e9954c32e7d4fe","confignode":"2fb67e61a2b0d13e","command":"group.get.queue","state":"","stateType":"str","avoidCheckPlayerAvailability":false,"name":"","x":240,"y":240,"wires":[["0cb12a259087b29e"]]},{"id":"2fb67e61a2b0d13e","type":"sonos-config","name":"Kitchen","serialnum":"","ipaddress":"<IP_ADDRESS>"}]

That's what I have... a playlist called Relax with those 4 songs...
But it only imports the second one

Could you please rename the playlist to something more unique such as  "My Relax Playlist" and use that title in the group.play.mysonos.
group.play.mysonos uses the "first" partial matching item and if you have any other item with "Relax" in its name it might be used.

Genius! That name change did it... (as well as the flow, which I obviously had wrong...)
Thanks!

@hklages i tried this but without luck.
It always starts with the first item of the playlist and doesn't activate shuffle.
The set.queuemode node also says Queue is empty.
Any ideas? Also even if this is working, woudn't it always start with the first song of the playlist and only then suffle afterwards?
[{"id":"ce94d963bccce4ac","type":"inject","z":"14db225ac2e36dd8","name":"trigger","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":330,"y":440,"wires":[["f2a57fa26e7ab4bd"]]},{"id":"f2a57fa26e7ab4bd","type":"sonos-universal","z":"14db225ac2e36dd8","confignode":"88e9fa70.4a53e8","command":"household.create.group","state":"Arbeitszimmer","stateType":"str","avoidCheckPlayerAvailability":false,"name":"","x":550,"y":440,"wires":[["90e88f598304db6d"]]},{"id":"0b168950b92dd086","type":"sonos-universal","z":"14db225ac2e36dd8","confignode":"b09be450f3bbbcc8","command":"group.play.mysonos","state":"","stateType":"str","avoidCheckPlayerAvailability":false,"name":"","x":1040,"y":460,"wires":[["179a0d195e745bc2"]]},{"id":"90e88f598304db6d","type":"change","z":"14db225ac2e36dd8","name":"Set Properties","rules":[{"t":"set","p":"payload","pt":"msg","to":"Matz Favs","tot":"str"},{"t":"set","p":"volume","pt":"msg","to":"10","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":800,"y":460,"wires":[["0b168950b92dd086"]]},{"id":"179a0d195e745bc2","type":"sonos-universal","z":"14db225ac2e36dd8","confignode":"88e9fa70.4a53e8","command":"group.set.queuemode","state":"SHUFFLE","stateType":"str","avoidCheckPlayerAvailability":false,"name":"","x":1300,"y":460,"wires":[["74e5687a4166cb33"]]},{"id":"74e5687a4166cb33","type":"sonos-universal","z":"14db225ac2e36dd8","confignode":"b09be450f3bbbcc8","command":"group.get.queue","state":"","stateType":"str","avoidCheckPlayerAvailability":false,"name":"","x":1560,"y":460,"wires":[["37b0575ed13e38c4"]]},{"id":"37b0575ed13e38c4","type":"debug","z":"14db225ac2e36dd8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1770,"y":460,"wires":[]},{"id":"88e9fa70.4a53e8","type":"sonos-config","name":"Sonos Arc","serialnum":"","ipaddress":"<IP_ADDRESS>"},{"id":"b09be450f3bbbcc8","type":"sonos-config","name":"Sonos Arbeitszimmer","serialnum":"","ipaddress":"<IP_ADDRESS>"}]

Hi.
SONOS does not allow to set the queue mode in case of an empty queue. So first you have to "fill" the queue and if that is done (that may take some seconds depending on the source) and then you should be able to set the mode.
For instance you can use the my sonos queue item to add to the queue without start playing and then set the mode.
Does that work for you?

would you mind pointing me to where i can add mysonos items to the queue? when i use # group.play.mysonos it seems nothing is added to the queue. at least it tells me the queue is empty afterwards. nevertheless since it's a spotify album i added it to queue by group.queue.urispotify which seems to do the trick

Try this:
In the SONOS app:

use the "Browse" tab, select "Spotify" and select your playlist
there is small menu with that you can add that playlist to "My Sonos"
you can check it in the My Sonos tab / favorities of the app

Then use group.play.mysonos with the title of the playlist as payload.
Here is a link to the wiki
That should work for almost every source such as Music library, Deezer, Amazon, Spotify, YouTube, ... (except podcasts)


Create a timeline

Add a list of all your activities, achievements, work experience. Add as much info as you can remember. In case you don’t have working experience, tell about your pet-projects or student projects. Don’t be shy :)

Guide yourself by the following format

```html
* Experiences
h3 class="experiences__header">Experience

    2005-Present

Binary Studio

    Full-Stack Developer

Binary Studio Website

Backend Architecture

Frontend Development

API Integration

Code Maintenance

Experience block template

Experiences

Experience

2005-Present
Binary Studio

Full-Stack Developer
Binary Studio Website

Backend Architecture
Frontend Development
API Integration
Code Maintenance


How to update Selected Fields? .Select().Update() only take the first args in Select into account

Your issue may already be reported! Please search on the issue track before creating one.
What version of Go are you using (go version)?
1.10
Which database and its version are you using?
Postgres
Please provide a complete runnable program to reproduce your issue. IMPORTANT
Need to runnable with GORM's docker compose config or please provides your config.
package main

import (
	"github.com/jinzhu/gorm"
	_ "github.com/jinzhu/gorm/dialects/mssql"
	_ "github.com/jinzhu/gorm/dialects/mysql"
	_ "github.com/jinzhu/gorm/dialects/postgres"
	_ "github.com/jinzhu/gorm/dialects/sqlite"
)

var db *gorm.DB

func init() {
	var err error
//	db, err = gorm.Open("sqlite3", "test.db")
	db, err = gorm.Open("postgres", "user=gorm password=gorm DB.name=gorm port=9920 sslmode=disable")
	// db, err = gorm.Open("mysql", "gorm:gorm@tcp(localhost:9910)/gorm?charset=utf8&parseTime=True")
	// db, err = gorm.Open("mssql", "sqlserver://gorm:LoremIpsum86@localhost:9930?database=gorm")
	if err != nil {
		panic(err)
	}
	db.LogMode(true)
}

func main() {
init()
db.Select("field1", "field2", "field3").Where(`id = ?`, 1)Update(&my.Model{})
// The sql generated will be `UPDATE model SET field1 = 1 WHERE id = 1`;
}

I have tried
db.Select("field1").Select("field2").Select("field3").Where(id = ?, 1)Update(&my.Model{})
db.Select("field1,field2,field3").Where(id = ?, 1)Update(&my.Model{})
All fail.


Update BSK

Task/Issue URL: https://app.asana.com/0/1163321984198618/1207889813347127/f
Tech Design URL:
CC:
Description:
Steps to test this PR:

No macos changes in this PR

Definition of Done:

[ ] Does this PR satisfy our Definition of Done?

Internal references:
Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation

@SlayterDev I already updated BSK on another PR to 185.1.1, so I believe this is not needed.

Thank you @jotaemepereira!


add overlay tappable for geometry renderder

Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

[x] Make sure to open a GitHub issue as a bug/feature request before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
[x] Ensure the tests and linter pass
[x] Code coverage does not decrease (if any source code was changed)
[ ] Appropriate docs were updated (not necessary)

Fixes #375 🦕
I have tried and tested the tappable geometry rendered.

Thanks for the PR. Can you update this so that all geometries and not just polygons and polylines are tappable?

@arriolac Hi, I have added them! Thanks

Thanks, @rxng8. One last edit before we can merge your change—please fix the failing Semantic Pull Request check. You can prefix your PR and commit message with "feat: " which should pass the check.

@arriolac Done! Thanks!


Question on sparse vector

Why is an untrained linear layer used to compute the sparse vector? I feel there should be a better way to do this, no?
        self.sparse_linear = torch.nn.Linear(in_features=self.model.config.hidden_size, out_features=1)

@aiodinlabs01 , we fine-tune this layer and the ckpt will be loaded automatically when the ckpt is saved in local file: https://github.com/FlagOpen/FlagEmbedding/blob/master/FlagEmbedding/BGE_M3/modeling.py#L86

Nice!! thanks for the pointer.
Follow-up questions:

Splade uses a different approach to embedding. Is yours based on any paper or does it have benchmark/comparison to SPLADE?
It seems the spare vector computation is done on CPU (hard coded in the load_pooler fn linked above). Is there a plan to support GPUs also as it is a bottleneck for computation?

Currently, we use the simplest way to compute sparse vector, and don't try the splade method.
Spare-vector module is a part of bge-m3 model. If you load the model with transformers, you can use model.cuda() to move the model to GPU. If you use FlagEmbedding, this script will load the model on all available GPUs automatically.


Add a test script to show we sort keys for upsert

Description
See #1736.
This PR adds a test to show that we do not preserve the ordering of keys when upsert is true. We actually sort them before inserting the document. This is not how MongoDB behaves. I came across this when I ran update9.js.

Readiness checklist

[ ] I added unit tests for new functionality or bug fixes.
[ ] I added integration tests for new functionality or bug fixes.
[ ] I added compatibility tests for new functionality or bug fixes.
[ ] I made spot refactorings.
[ ] I updated user documentation.
[ ] I ran task all, and it passed.
[ ] I added/updated comments for both exported and unexported top-level declarations (functions, types, etc).
[ ] I checked comments rendering with task godocs.
[ ] I ensured that the title is good enough for the changelog.
[ ] (for maintainers only) I set Reviewers (@FerretDB/core), Assignee, Labels, Project and project's Sprint fields.
[ ] I marked all done items in this checklist.

Test script for fixed bug passes. Great!


[liblzma] Generally fix output name

What does your PR fix?
This PR fixes liblzma to not mess with the platform's prefix but simply always use the lzma "namespec" that matches -llzma[d] as used in the .pc file. This fixes library name issues on mingw. The change is complemented by tightening the find_ calls in the exported cmake configuration.
Another change fixes the warning about the unused CMAKE_DEBUG_POSTFIX variable.

Which triplets are supported/not supported?  I update the initial post. Sorry for the inconvenience.


created the insertion_sort.py file using python

@TechVine please take a look at this code and assign me more issues so that i can solve them. and please merge this PR.

Hello @TechVine sir. i have just commited  the selection sort file by using python . please merge my PR.


Design System > Side Navigation > Side Navigation with List > When we click on sub menu these are not highlighted.

Describe the bug
Side Navigation with List > When we click on sub menu these are not highlighted.
Steps to reproduce bug

Go to 'https://stage-react.raaghu.ai/'
Navigate to 'Design System > Side Navigation > Side Navigation with List'
Click on Administration click on Users

Actual result-
Side Navigation with List > When we click on sub menu these are not highlighted.
Screenshots

Expected result-
Side Navigation with List > When we click on sub menu these should be highlighted.
Desktop (please complete the following information):
-OS: [Windows 10 Enterprise]
-Browser [ edge]
-Version [ 125.0.2535.92]

Fixed on dev


could not determine kind of name for C.EVP_sha

CGO_LDFLAGS="-g" "-O2" "-lssl" "-lcrypto" /usr/lib/golang/pkg/tool/linux_amd64/cgo -objdir $WORK/github.com/spacemonkeygo/openssl/_obj/ -importpath github.com/spacemonkeygo/openssl -- -I $WORK/github.com/spacemonkeygo/openssl/_obj/ bio.go build.go cert.go ciphers.go ciphers_gcm.go conn.go ctx.go dhparam.go digest.go engine.go hostname.go init.go init_posix.go key.go old_openssl_compat.go sha1.go sha256.go ssl.go tickets.go
# github.com/spacemonkeygo/openssl
could not determine kind of name for C.EVP_sha

Happens with libressl 2.3.2.

Wow, I haven't heard of anyone trying to get this to work with libressl before. Is openssl off the table?

SHA0 is being phased out, it's not even in master branch of openssl.
https://www.openssl.org/docs/manmaster/crypto/EVP_sha1.html

Closing in favor of a larger ticket to document and support more recent openssl implementations.


N-26 Component-Automation

First question: Is this doable at all? (I expect: yes)
Second question: Does this look like a good solution?
short description
To avoid that users have to mess with functional components like container or prose we need some kind of component-detection.
Components detect whether container or prose are mounted by a parent, grandparent, ... or not.
definition
To simply this we define two classes of components (some components belong to both, some to none of them)

Page-Component is a Component that may be used at first-level and always should be inside section>container
'Prose-Provider` has a default-slot that supports prose-formatting

These examples describe what should apply:

A user in Obsidian uses the component columns as root-component -> if the component gets mounted in Vue it detects that there is no wrapping element around it and sets up section>container on its own

The same component used inside the footer does not self-wrap inside section>container

A user in Obsidian adds a column inside it -> the column-component detects that there is no prose-support setup by its parents or grandparents and wraps it's slot inside prose (with component :is-syntax)

If we use a slider inside the column (below a fancy prose-based heading) ... slide inside of slider detects that two levels up the prose-support already is enabled and does not set up this again

This is MUCH simpler to do in the Obsidian > Nuxt Content parser than in Vue/Nuxt. I suggest that you prepare all Obsidian Markdown documents, and I can create a parser that transforms them into MDC with the correct parent components. Doing this in the Vue component alone will make our lives miserable.

ok got you. I'm on it.
Will finish this 'prepare all markdown docs' tonight (working on it 4th day straight)


Crash when opening a Glyphs file

I just got this crash when opening a Glyphs file. But I cannot reproduce it again.
Traceback (most recent call last):

  File "GlyphsApp/__init__.py", line 1333, in callback_

  File "plugin.py", line 334, in update
    self.tokenField.setPlaceholderString_("")

AttributeError: 'GSBackgroundLayer' object has no attribute 'setPlaceholderString_'

App:3.0.3-3081 Plugin:1.0.0-6

These seems odd considering that the plugin never interacts with the background layer. I will look into it. Thank you for reporting, could you also tell me what macOS version your are using?

Thanks! I'm on macOS 10.13.6.

But I cannot reproduce it again.

Did it ever occur again? I can not reproduce this bug.

While I still have no idea what might have caused this error, I think (hope) that the release today fixes it.


Use cargo hack for powerset feature testing

Prelimnary tests show that all configurations of iroha_core and some configurations of the entire project compile and run without error. However, iroha_core triggers a warning that kills all trybuild tests for some feature combinations.

As #1938 is merged, we should now be able to run the QA tests, and clear the Iroha 2 RC2 for release.


README.md: Span records are only emitted after the span is complete or N minutes have passed.

Since spans can be updated, why not emit the span directly at the moment of creating it and at the moment of completing just update it? I believe is more complicated to enforce an N minutes policy and it prone to resulting to non-existing parent spans...

Updates are tricky.  At BlueOwl, where we had something similar, we were careful to trap panic() and always Flush() the current log.  That worked.
Of course, other logs might be lost with a panic, but the one that caused the panic was retained.
This behavior is up to the particular base loggers.  There is no requirement that base loggers buffer or only emit spans at Flush().

Okay, now that I am thinking it more, it might not be something that the library itself can control. It is up to the user to write code in such a way that those scenarios can be handled... Do you envision users using the "N minutes policy"?


Getting "RuntimeError: Cannot find cuda device suitable for rendering cuda:0" when training an RL agent

System:

OS version: Ubuntu 22.04 LTS
Python version (if applicable): Python 3.8.10

Describe the bug
I have used sapien to render camera pictures as observations in a gym environment. However, the following error occured during training.
Traceback (most recent call last):
  File "/home/liuyuhao/anaconda3/envs/tactile_sim/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/home/liuyuhao/anaconda3/envs/tactile_sim/lib/python3.8/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/liuyuhao/workspace/tacktile_vision_fusion/scripts/../utils/gym_env_utils.py", line 44, in _safe_run_worker
    observation = env.reset()
  File "/home/liuyuhao/anaconda3/envs/tactile_sim/lib/python3.8/site-packages/gym/wrappers/order_enforcing.py", line 16, in reset
    return self.env.reset(**kwargs)
  File "/home/liuyuhao/workspace/tacktile_vision_fusion/scripts/../envs/continuous_insertion.py", line 1292, in reset
    obs = super().reset(specify_offset)
  File "/home/liuyuhao/workspace/tacktile_vision_fusion/scripts/../envs/continuous_insertion.py", line 603, in reset
    reset_ok, sim_offset = self.__initialize__(sim_offset)
  File "/home/liuyuhao/workspace/tacktile_vision_fusion/scripts/../envs/continuous_insertion.py", line 382, in __initialize__
    renderer = sapien.VulkanRenderer(device="cuda:0", offscreen_only=True)
RuntimeError: Cannot find cuda device suitable for rendering cuda:0

The agent had already interacted with the gym environment before the above error occured, and the memory for the corresponding gpu is sufficient. The agent model is on cuda:2 device. I want to know why the error could occur and how to fix it.
Expected behavior
Successfully obtain a renderer and set it to the sapien engine.
Additional context
Also in the beginning I run the code without device="cuda:0", and another error occured
File "/home/liuyuhao/workspace/tacktile_vision_fusion/scripts/../encoded_env/custom_td3.py", line 341, in learn
    return super().learn(
  File "/home/liuyuhao/anaconda3/envs/tactile_sim/lib/python3.8/site-packages/stable_baselines3/common/off_policy_algorithm.py", line 356, in learn
    rollout = self.collect_rollouts(
  File "/home/liuyuhao/anaconda3/envs/tactile_sim/lib/python3.8/site-packages/stable_baselines3/common/off_policy_algorithm.py", line 597, in collect_rollouts
    if callback.on_step() is False:
  File "/home/liuyuhao/anaconda3/envs/tactile_sim/lib/python3.8/site-packages/stable_baselines3/common/callbacks.py", line 100, in on_step
    return self._on_step()
  File "/home/liuyuhao/anaconda3/envs/tactile_sim/lib/python3.8/site-packages/stable_baselines3/common/callbacks.py", line 204, in _on_step
    continue_training = callback.on_step() and continue_training
  File "/home/liuyuhao/anaconda3/envs/tactile_sim/lib/python3.8/site-packages/stable_baselines3/common/callbacks.py", line 100, in on_step
    return self._on_step()
  File "/home/liuyuhao/anaconda3/envs/tactile_sim/lib/python3.8/site-packages/stable_baselines3/common/callbacks.py", line 447, in _on_step
    episode_rewards, episode_lengths = evaluate_policy(
  File "/home/liuyuhao/anaconda3/envs/tactile_sim/lib/python3.8/site-packages/stable_baselines3/common/evaluation.py", line 86, in evaluate_policy
    actions, states = model.predict(observations, state=states, episode_start=episode_starts, deterministic=deterministic)
  File "/home/liuyuhao/anaconda3/envs/tactile_sim/lib/python3.8/site-packages/stable_baselines3/common/base_class.py", line 632, in predict
    return self.policy.predict(observation, state, episode_start, deterministic)
  File "/home/liuyuhao/anaconda3/envs/tactile_sim/lib/python3.8/site-packages/stable_baselines3/common/policies.py", line 333, in predict
    observation, vectorized_env = self.obs_to_tensor(observation)
  File "/home/liuyuhao/anaconda3/envs/tactile_sim/lib/python3.8/site-packages/stable_baselines3/common/policies.py", line 252, in obs_to_tensor
    observation = obs_as_tensor(observation, self.device)
  File "/home/liuyuhao/anaconda3/envs/tactile_sim/lib/python3.8/site-packages/stable_baselines3/common/utils.py", line 466, in obs_as_tensor
    return {key: th.as_tensor(_obs).to(device) for (key, _obs) in obs.items()}
  File "/home/liuyuhao/anaconda3/envs/tactile_sim/lib/python3.8/site-packages/stable_baselines3/common/utils.py", line 466, in <dictcomp>
    return {key: th.as_tensor(_obs).to(device) for (key, _obs) in obs.items()}
RuntimeError: CUDA error: unspecified launch failure
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

I guess it was because the renderer and the agent used the same gpu, and this is the reason I chose to specify the device of the renderer.

Did you set cuda:2 in your torch code or did you set CUDA_VISIBLE_DEVICES=2? CUDA_VISIBLE_DEVICES=2 will make the GPU with index 2 to become cuda:0.

Did you set cuda:2 in your torch code or did you set CUDA_VISIBLE_DEVICES=2? CUDA_VISIBLE_DEVICES=2 will make the GPU with index 2 to become cuda:0.

I set cuda:2 in my torch code.

Given the current information, it is very hard to understand what is causing the error.
We are currently developing SAPIEN 3, and it should come with more error detection and workarounds in the renderer. It will have a few API changes and I am not sure if it you greatly affect your code.
Our latest development version will always be posted to the release page (Nightly Release). You can try it out and see if the error still exists.

Hi, I meet the same error. Is there any possible solution / related issue to this issue? Thanks.

I meet the same error. Any solution will be highly appreciated....🧎🧎🧎

what version of sapien are you using? And are you testing this via ManiSkill?

Hi, I met with this error too. I am using sapien version of 2.2.2. Tried with NVIDIA A40 and A5000.
I was testing it via ManiSkill, but the error occurs even if I run:
>>> import sapien.core as sapien
>>> sapien.SapienRenderer(offscreen_only=True, device="cuda:0")

Any help would be highly appreciated.

@srye2 can you install sapien==3.0.0b1 and run
sapien info --all
If it doesn't work please follow https://maniskill.readthedocs.io/en/latest/user_guide/getting_started/installation.html#troubleshooting,
make sure the relevant packages and files are installed


Lo-fi layout

https://www.figma.com/file/ueQQviOG62IwkdxBB5NMi7/Untitled?node-id=0%3A1

I designed the password reset screen that allows user create a new password in a case where current password used doesn't match.


What images should have what desktop configurations??

From #23

How to handle different Surface variants/DEs? The Surface laptops should have the desktop GNOME/Plasma but for the tablets we should have Phosh/GNOME Mobile Shell/Plasma Mobile.

I don't have one of these so we'll need to start gathering input from folks and then start filing issues after we figure out the how.

I propose that like Kionite is specific for Plasma Desktop, there should be variants for touch driven DEs like Plasma Mobile and Phosh. I've been using Gnome on my Surface Go for years now and am vary satisfied with it, but understand the appeal of a more touch driven DE on this class of device.
Additionally and tangentially related to this issue, if there is a variant developed for Plasma Mobile there should be a variant developed for the Plasma Bigscreen DE that would serve a similar purpose to the HTPC Bazzite variants.
These seem more relevant to the uBlue project at large, than specific to Surface devices.

These seem more relevant to the uBlue project at large, than specific to Surface devices.

Yeah the issue with that is we'd multiply the amount of images dramatically if we did it up the chain. Perhaps this would be a good place to start prototyping what it should look like, and then moving the patter up in places where it makes sense? cc @ublue-os/approver

Also I wonder if a good middle ground is just adding those specific sessions in the login manager so that the user can pick on the device?

That's basically what I did in https://github.com/plata/ublue-surface: it is Kinoite + Plasma Mobile.
However, I'm not so sure that you'd want this at scale. Plasma Desktop and Plasma Mobile share a lot but GNOME and Phosh or even GNOME and Plasma Mobile? It will become pretty big soon.
On the other hand, we probably don't want to (or maybe even can't) remove the original DE from Silverblue/Kinoite. So unless someone creates something like Kinoite Mobile upstream, it will always be Kinoite + Plasma Mobile.
So: If we do not want to increase the amount of images, the only way can be to layer it on top of the existing images at install-/runtime. I.e. the installer/first boot wizard would provide an option "Plasma Mobile" etc. and then rpm-ostree install the required packages.
At this point, however, we're entering very fundamental considerations of would should be in a distribution and what should be configured/installed by the user. There's a similar issue already with Flatpaks: which Flatpaks should be preinstalled, which are suggested in the wizard and how can I still keep the advantage that the OS is super tailored for my needs while being general enough for a huge group of users at the same time?

In my opinion, Phosh and Plasma Mobile should be separate images. Both will require significant adjustments that would interfere with the scope of existing GNOME and Plasma images were they entangled. With that said, I think this is a great idea and I will look into it

Phosh and Plasma Mobile as seperate images would also align with their primary purpose as desktop environments for mobile devices (specifically smartphones). The uBlue build pipeline may not be ready for this right now, but I for see a future where it is able to build images for specific ARM SoCs with hardware enablement for specific boards and phones. Imagine postmarketOS but built with cloud-native tech.
I think uBlue is uniquely positioned to fill the role of an immutable mobile phone distro in the future, and that this conversation is even happening is proof of that.

That would be really nice.
@castrojo can you elaborate on the limitations regarding number of images? Is it a management problem or do we hit GH actions/GHCR restrictions?

We're currently not hitting any limits it's more of a human issue. Each option you add doesn't just increase the image pool by 1, it adds an image for 37, 38, 39, with and without nvidia, etc.
And ARM would double the amount of images on top of that. My question is more "Are there enough of people that would use these?" that would make it worth the effort?

It ends up we're not the only ones! https://www.opencode.net/justinz/oneplus6-fedora-image/-/blob/main/Containerfile

The OnePlus 6 is a very good example of the model I explained above. The Qualcomm SOC it runs is one of the best supported for aftermarket use with an almost mainline kernel, meaning that not only is the OnePlus 6 & 6T well supported with one kernel but so are phones from a few other manufacturers that use the same SOC. Because the phones themselves require slight differences in init and userspace postmarketOS builds seperate images for them. The uBlue image model would serve very well here. Other examples would include the Allwiner SOCs in the Pine64 products, and the Apple Silicon images built with the Asahi kernel

Within the context of Microsoft Surface products, adopting ARM images would allow this repo to support the Surface Pro X (https://github.com/linux-surface/surface-pro-x) and eventually the Surface Duo (https://wiki.postmarketos.org/wiki/Microsoft_Surface_Duo_(microsoft-duo))

Ideally, I would imagine that a uBlue repository does not even have a Containerfile

This would require commiting to the same approach, or even the same tools as VanillaOS, ie. a Containerfile compiler. Could be great, especially if we can work on top of Vib, but would bring us very far in terms of abstraction.

With the startingpoint approach, the Containerfile is already empty. It only duplicates some information (e.g. base image) which is already contained in the recipe. So the "compiler" would only replace ~2 variables in a template.

It doesn't duplicate that information, the information is given as build arguments and there are placeholder values for if someone doesn't pass the correct arguments.
To go containerfile-less, it should be possible to generate a containerfile from scratch, not from a template. With a template, the approach would be very similar to how everything currently works, but worse. This would also require an implementation of COPY for the recipe, which is something Vib already does.


Figure out how to handle scrolling gracefully

By default, Next.js scrolls to the top of a page when a Link is clicked: https://github.com/zeit/next.js/blob/13cf9429f766c0542106504efc8f195ed87b8671/lib/link.js#L79. However, this is undesirable when using transitions, because the page will jump to the top before the transition has completed (or maybe before it's even started).
It doesn't look like Next supports disabling scrolling on all Link components (just with a one-off scroll={false} prop). Options include convincing Next to allow disabling this behavior at the app level, or possibly monkey-patching window.scrollTo to disable Next's scrolling during a transition.

Surely this would help:
https://github.com/zeit/next.js/blob/canary/readme.md#disabling-the-scroll-changes-to-top-on-page

Resolved for now with ba40f13


python312Packages.sqlmodel: 0.0.16 -> 0.0.18

Changelog: https://github.com/tiangolo/sqlmodel/releases/tag/0.0.18
Description of changes

Things done

Built on platform(s)

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

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] 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

[ ] 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
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 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

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 307948 run on x86_64-linux 1

2 packages marked as broken and skipped:

khoj
khoj.dist

12 packages built:

python311Packages.llama-index-vector-stores-postgres
python311Packages.llama-index-vector-stores-postgres.dist
python311Packages.pgvector
python311Packages.pgvector.dist
python311Packages.sqlmodel
python311Packages.sqlmodel.dist
python312Packages.llama-index-vector-stores-postgres
python312Packages.llama-index-vector-stores-postgres.dist
python312Packages.pgvector
python312Packages.pgvector.dist
python312Packages.sqlmodel
python312Packages.sqlmodel.dist


Large pools timeout retrieving blocks

Need to significantly improve performance of getBlocks query for large pools

closed by #56


Remove HCMType "TransitOnly"

The model code doesn't require this HCMType, and it's largely redundant given the DTWB field. There are two minor references to "TransitOnly" in filtering queries which should be removed as part of this change, too.

Follow up with Kyle about what's the appropriate HCMType for these links after removing "TransitOnly".


docs(plugins) add doc for ldap-auth-advanced

Summary
Adds documentation for the ldap-auth-advanced plugin
Full changelog

Add doc for ldap-auth-advanced plugin

Checklist:

[x] Commit message & atomicity checked
[x] Documentation
[x] Spellchecked my updates
[ ] Ready to be merged

Dupe of #792?

Didn't know #792 existed. That doc doesn't look very complete, and it puts an enterprise plugin into a non-enterprise plugins directory.


YOLOv4ObjectDetection is not working on windows 10

I'm submitting a Bug Report
I searched for similar issues and did not find one.
Current behavior

\Samples\Tutorial Samples\YOLOv4ObjectDetection doesn't work.
new LearningModelSession is throwing exception saying:

The parameter is incorrect.
Failed to load model with error: Unknown model file format version.

Expected behavior
Should just work.  And if it fails it should tell me how to fix it.
Minimal reproduction of the problem with instructions
Build and run the sample.
Environment
ONNX Runtime installed from (source or binary): C:\Windows\System32\Windows.AI.MachineLearning.dll
ONNX Runtime version: 1.0.2007.1310
Windows Build Number: Windows 10 version 21H1 build 19043.1110
App min and target version: 10.0.18362.0  and 10.0.19041.0
OS Version (Server, IoT Core, Desktop, etc): Desktop
Graphics Driver version: NVidia GeForce GTX 1080, Driver Version 471.41
DxDiag:
DxDiag.txt
WinMLTools specific:
- Source training framework: (e.g. CoreML, Scikit-learn, …)
- WinMLTools version
Visual Studio

[x] 2019 (version: 16.10.4)

@lovettchris - thanks for reporting. It looks like the problem is that the operator set from the yolo model is not supported by the version of Windows on your machine. The yolo model requires operator set version 11, but your OS build only supports version 9 (version support table is here: https://docs.microsoft.com/en-us/windows/ai/windows-ml/onnx-versions). You can upgrade to an insider flight of Windows to unblock yourself while we work on a fix, since the tutorial should probably not require you to be on an insider flight of Windows.
Also, we are aware that the error message you're seeing isn't exactly helpful. Cleaning that up is on our backlog.

I see, well I just got upgraded to windows 11 and it works now... but yeah, would be nice if it also worked on windows 10.

great, glad it's working for you. We're working on making this not require windows 11.
In the meantime, looks like your theming changes work well!

Yeah, we've hit this as well. It'd be great if the models could target op set 7 for working on 1809+.

great, glad it's working for you. We're working on making this not require windows 11.
In the meantime, looks like your theming changes work well!

I'm quite interested in this! Any ETA when this will work? Thanks!

This issue should now be resolved as the sample has been changed to use the Microsoft.AI.MachineLearning NuGet package.


docs: fix docs links

Motivation
I found a bunch of broken links from the rewrite process.  Went through all pages and double checked each link.
I also added a landing page for incoming search engine views because they need to reindex the site.  That security page is in #6234

:tada: This PR is included in v1.14.0 :tada:


Integration v1.1.8 not working

Not sure exactly what information you need so let's start with this:
Home Assistant Core 2022.6.4
Home Assistant Supervisor 2022.05.3
Home Assistant OS 8.1
2022-06-08 16:21:24 INFO (MainThread) [homeassistant.bootstrap] Setting up stage 2: {'ipp', 'mobile_app', 'growatt_server', 'upnp', 'logbook', 'input_select', 'counter', 'persistent_notification', 'input_button', 'sun', 'trace', 'map', 'scene', 'media_source', 'group', 'default_config', 'cast', 'blueprint', 'lifx', 'system_health', 'tag', 'automation', 'my', 'rpi_power', 'uptime', 'mqtt', 'dlna_dmr', 'timer', 'input_datetime', 'application_credentials', 'history', 'input_text', 'tts', 'hacs', 'spotify', 'plex', 'energy', 'zha', 'climate', 'xbox', 'input_boolean', 'brother', 'input_number', 'bureau_of_meteorology', 'device_tracker', 'unifi', 'zone', 'script'}
2022-06-08 16:21:24 INFO (MainThread) [homeassistant.setup] Setting up bureau_of_meteorology
2022-06-08 16:21:24 INFO (MainThread) [homeassistant.setup] Setup of domain bureau_of_meteorology took 0.0 seconds
2022-06-08 16:21:36 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Broadmeadows for bureau_of_meteorology
File "/config/custom_components/bureau_of_meteorology/init.py", line 65, in async_setup_entry
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 339, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/bureau_of_meteorology/init.py", line 65, in async_setup_entry
name=f"BOM observation {entry.data[CONF_WEATHER_NAME]}",
KeyError: 'weather_name'

(Also v1.1.10)

You appear to be the only person reporting this issue. Can I ask if you have any other weather related integrations installed as it looks like it possibly could be a conflict.

Deleted the integration, restarted, reinstalled the integration, restarted - and now we seem to be fine. Should have tried that sooner.


Adding Nancy.Viewengines.Razor NuGet package breaks xbuild on mono on Ubuntu

If a project has the "Nancy.Viewengines.Razor" NuGet package added then the build of the project  fails when using xbuild on mono on Ubuntu.
This is because the package adds the following to the csproj file:
<PostBuildEvent>
if $(ConfigurationName) == Debug (
xcopy /s /y /R "$(SolutionDir)packages\Nancy.Viewengines.Razor.0.17.1\BuildProviders\Nancy.ViewEngines.Razor.BuildProviders.dll" "$(ProjectDir)bin\"
xcopy /s /y /R "$(SolutionDir)packages\Nancy.Viewengines.Razor.0.17.1\lib\Net40\Nancy.ViewEngines.Razor.dll" "$(ProjectDir)bin\"
)</PostBuildEvent>

My current workaround is to remove the content of the <PostBuildEvent> and reference any type in the Nancy.ViewEngines.Razor.dll explicitly somewhere in the project. e.g. Overriding the default bootstrapper and then adding this:
protected override System.Collections.Generic.IEnumerable<System.Type> ViewEngines
{
  get
  {
    yield return typeof (RazorViewEngine);
  }
}

So far, this seems to work without issue - although the Nancy.ViewEngine.Razor.BuildProviders.dll is not copied in this instance.

Let me ask the bigger question. Lots of OSS C# has xcopy commands in the msbuild. It would be relatively trivial to write an xcopy program in C or python, or shell that would sit in the path and make this magicallywork. The hard part is getting mono to ship this binary alongsize xbuild

@zippy1981 I just learned about xcopy, but for those familiar with both xcopy and rsync, couldn't we just write a wrapper around rsync that converts xcopy->rsync flags? At the very least we could make an alias for xcopy?

Why don't simply use the copy task of msbuild which is supported by xbuild on mono out of the box? https://msdn.microsoft.com/library/3e54c37h.aspx (also featured in the msbuild task porting guide: http://www.mono-project.com/archived/porting_msbuild_projects_to_xbuild/)
There was a little bug in monodevelop but with the latest release it does not break the .csproj anymore and can be widely adopted with full tooling support.

shrug
If anyone wants to create a PR which fixes this, runs on both Windows and Linux, doesn't involve any installing of things to work, and achieves the same end goal. We will be happy.


Please reopen and fix https://github.com/sirupsen/logrus/issues/972, skipping caller frames

Adding the feature to skip a given number of caller frames allows logrus to be wrapped, so please add it.
See https://github.com/sirupsen/logrus/issues/972 for details.  Please reopen that issue and close this one.

For my purposes, adding a (entry) LogSkipCallers(count) function would be ideal.

As stated in #972, SetCallerReportSkipFrames() would work.
Alternatively, add a (entry) LogSkipCallers(count) function would avoid having to wrap all Entry functions.


V3: base path not stripped from WebSocket upgrade requests

Checks

[X] I understand project setup issues should be asked on StackOverflow or in GitHub Discussions.
[X] I updated to latest http-proxy-middleware.

Describe the bug (be clear and concise)
When http-proxy-middleware@3 receives a HTTP request, it passes the HTTP request URL to your configured pathFilter and uses this to determine whether or not to proxy this request through. With most requests, the base URI on which the middleware is mounted is removed from the URL. But for a WebSocket upgrade the base URI is left on.
Step-by-step reproduction instructions
This isn't a fully functional reproduce but it should give an idea. I have HPM configured like so:
app.use('/a/b/c', createProxyMiddleware({
  target: 'http://localhost:4415',
  ws: true,
  pathFilter: pathname => {
    console.log(pathname)
    return pathname.startsWith('/api') ||
      pathname.startsWith('/raw-ws')
})

Then the application listens on http://localhost:5056.
Expected behavior (be clear and concise)
When I make a HTTP request to http://localhost:5056/a/b/c/api/whatever, the console outputs:
/whatever

, my filter returns true and HPM proxies the request through, correctly. Note how "/a/b/c" has been removed from pathname.
But when my application tries to open a web socket on http://localhost:5056/a/b/c/raw-ws, the console outputs:
/a/b/c/raw-ws

, the filter returns false, and my filter does not proxy the request through. Currently I am working around this by altering my filter to say:
pathname.startsWith('/api') ||
  pathname.startsWith('/a/b/c/raw-ws')

How is http-proxy-middleware used in your project?
<EMAIL_ADDRESS>`--<EMAIL_ADDRESS>
What http-proxy-middleware configuration are you using?
{
  target: 'http://localhost:4415',
  ws: true,
  pathFilter: pathname => {
    console.log(pathname)
    return pathname.startsWith('/api') ||
      pathname.startsWith('/raw-ws')
}

What OS/version and node/version are you seeing the problem?
Windows, Node.js 18.17.1

Additional context (optional)
Big fan of the V3 upgrade because it's taken a lot of manual base path management off my hands! Just this last little bit :)

Thanks for the feedback @s100!
In the HPM v3, the path argument in pathFilter is provided by the webserver you are using (req.url).
Same goes for the path stripping behaviour and the full path with WebSockets.
Across different servers paths are getting quite messy (to get the full path as seen in the logger) 😅
https://github.com/chimurai/http-proxy-middleware/blob/2e5ccac41edf3ede465f705e5b76481b74d03b8f/src/plugins/default/logger-plugin.ts#L25-L30
I'll have to investigate this and decide whether to keep the new behaviour with extra documentation or patch the path.

Thanks for the update. By the way I noticed a small but significant typo in my original issue, which I have now corrected.

I'm facing the same issue. In my opinion, both the proxied HTTP and WebSocket URLs should follow the same format. Otherwise, the upstream URLs will differ for both.
As a workaround, I'm using pathRewrite to remove the base path from the URL, if it exists, to make the URLs consistent for both HTTP and WebSocket requests.


Support for some Scala 3 syntactic constructs in Scala 2 with -Xsource:3

Not sure if this is the correct place to discuss this, but this is a heads-up that Scala 2.13.6 and 2.12.14 will support a subset of the Scala 3 syntax under -Xsource:3:

Support ? as wildcard marker
Support case in pattern bindings
Support Scala 3 wildcard and renaming imports
Allow soft keywords open and infix
Support Scala 3 vararg splice syntax
Support writing & instead of with in types

These are all just parser changes intended to ease cross-compilation and it would be great if metals/scalameta/scalafmt/scalafix/... could understand these constructs in a Scala 2 codebase without the user having to do anything in particular. Note that while all these changes are currently under -Xsource:3, some of them might end up being enabled by default in future Scala 2 releases to ease migration.

Thanks for the heads up! We have two choices here:

Add these features to Scala212 and Scala213 dialects, which would make it all easier to use and would not require any changes in other tools, but would mean that we would parse things with the assumption of -Xsource:3
Create separate dialects, which means we would have to detect -Xsource:3 it in every tool that uses scalameta parser
Modification of 1., where we would also create LegacyScala212 and LegacyScala213 dialect, which can be used explicitely whenever needed.

I would honestly opt for 3 as it would mean most users will not really be affected and would not need to do anything. Scalafmt, Scalafix, Mdoc do not need errors from the parser and we should be able to handle it Metals thanks to recent changes by @dos65
Opinions, anyone? @olafurpg @ckipp01 @kitbellew  @mlachkar ?

Speaking of dialect, I assume that Scala3 will become the default dialect once Scala 3.0 is out? In that case whether or not a new dialect is used to support these constructs won't matter so much if the default already support them.

Speaking of dialect, I assume that Scala3 will become the default dialect once Scala 3.0 is out? In that case whether or not a new dialect is used to support these constructs won't matter so much if the default already support them.

I think scala3 will become the default dialect after Scala 3.0 adoption exceeds that of Scala 2.1x.

Speaking of dialect, I assume that Scala3 will become the default dialect once Scala 3.0 is out? In that case whether or not a new dialect is used to support these constructs won't matter so much if the default already support them.

I think scala3 will become the default dialect after Scala 3.0 adoption exceeds that of Scala 2.1x.

Also, we cannot possibly force everyone to set Scala 2 dialect in their projects. We will try to add some improvements so that users will know they need to add the new option.

I agree that the default dialect should remain Scala 2 for a while even after the 3.0 release. Changing the default dialect to Scala 3 could cause breakages for all Scala 2 users.


Adding num_beams, early_stopping and being able to make the MarianMT model .half()

Hereby a pull request to speed up translation.

Thank you!  As mentioned here, I ended up adding this in at your request before seeing you had also submitted PR for it (sorry again).  Thanks again


[resolves #642] Switch to using relative path for betamax tapeRoot

Refer to this link for build results (access rights to CI server needed):
https://fabric8-ci.fusesource.com/job/wildfly-camel-pullreq/459/
Test PASSed.


[Bug]: Dropdown in JSON Form doesn't close on clicking outside the dropdown

Is there an existing issue for this?

[X] I have searched the existing issues

Description
https://user-images.githubusercontent.com/10436935/163262358-9c9f0b02-dbe5-42fa-91ec-69f88adcb869.mov
Clicking outside the dropdown doesn't close the dropdown consistently. This is observed only in edit mode.
Steps To Reproduce

Add a JSON Form widget
Make one field to be a dropdown
open the dropdown
Try clicking outside the dropdown

Public Sample App
No response
Version
Cloud v1.6.20

I observed a very similar behaviour on a dashboard I too was working on, This seems like an issue with the select / multiselect issue, maybe its not really related to the JSON form.
https://user-images.githubusercontent.com/11089579/163334064-8eca814a-ecce-47bb-ba64-21c8ff79876a.mov
Chat ref

@somangshu this isn't a Select or MultiSelect issue
@ashit-rath, I noticed the dropdown doesn't readjust after the first render as seen in the Recording.
https://user-images.githubusercontent.com/31691737/163948639-9408246c-49bc-4825-8696-6d93791e12be.mov

@Tooluloope Is right, it's not a select or multiselect issue,  it's actually the byproduct of a feature.
We have label-input association, eg - If you have text input field and you click on the label rather than the input, the input would be focused.
As our widgets didn't support ids we had to use the explicit label-input association.
https://css-tricks.com/html-inputs-and-labels-a-love-story/
The exact same behaviour should be present in our widgets as well. I think we should take this up in the widget reskinning and use the recommended way to have labels and inputs.

@Tooluloope Yes you are right about the dropdown width; it was done for some performance reasons and I was thinking of dealing with it separately when dealing with the select /  multi select perf.
The App viewers won't see this issue thought.

@ashit-rath That's fine, But I guess we might need to handle the flickering of the dropdown. So it doesn't flicker when the Label is clicked

@ashit-rath i guess the problem is flickering of dropdown


Supports PuTTY User Key File 3

Describe the feature
Yet WebSSH only supports V1 and V2 about the private keys generated by puttygen.
The supports of V3 needs an implementation.
Find below an example of V3 key :
putty_public_key.txt
putty_private_key.ppk.txt
These keys are examples in order to check the future implementation.
Don't use them in production.

PPK File Format
https://tartarus.org/~simon/putty-snapshots/htmldoc/AppendixC.html

Done since WebSSH 17.1.866


Don't apply lib default styles (go...) when using custom JSX

I want to style toast component with custom styles/components, where default ones (prefixed as go...) are being injected (background color etc.). I understand some of them are necessary for example animation, position etc.

Same Here!

How are creating the custom toast? Have you tried using providing a custom render function? This way, it should apply the required styles for positioning.
I'll close this for now.


The categories dots should be easier tappable

It takes time to make the precise tap. Please make the tapping zone bigger. If possible, please check that the visual feedback (e.g. the green outer circle) is shown fast enough

checked


remove listener after finishing the capture script

Remove listener after finishing the capture script to allow multiple runs.
This also remove the comment that the library doesn't support multiple runs.

ping


Possible 2FA Fallback Bug

While configuring 2FA with authenticator it works only when the fallback is set to None.  If Local database is the fallback when 2FA is entered the login fails, but the login is possible with the password alone without the OTP

that's logical (not a bug), if you fallback to a method without 2FA it doesn't need your token for the second authenticator attempt.

The issue is not of fallback.  If the 2FA is configured with the Fallback as the Local database, 2FA does not work.  It gives an error wrong username and password.
But if only the username and the local password is provided it will logon without 2FA.
The possible bug is when the fallback is configured and 2FA does not work.  If fallback is disabled then 2FA works.

Some unsers reported 2FA being useless with local fallback and this after over a year is the first that said it doesn’t work at all in that case. From a code perspective this is very unlikely. Do you have the steps to reproduce?

Just to be sure, I've just tested 2FA in combination with fallback which authorises both (user/2fa+pass and user+pass).
It's a useless combination, but works like expected on my end.

PS: to respond to your forum question... any primary auth server is reset to local auth via the console password reset (option 4). Make sure to set your console to auto login and physically secure access for an uncomplicated reset procedure.

Looks like this happens only when the server is configured for such a combination initially without a reboot.  I tested in another newly minted machine and the behaviour is the same as not allowing me to login, but after a reboot it works as expected.
Thanks for all the help.


The historical usage stats are changing after deleting users

We noticed that after deleting a user from a tenant, their usage stats seem to disappear from the app. This is impacting both recent usage and historical periods. Our expected behavior was that the historical usage should be retained in QVDs so that it is not impacted if any users are removed from the tenant, which will make them unavailable via API at the latest reload.
We have a weekly workflow that frees up licenses and deletes users based on certain period of inactivity. This is working as expected but also altering our historical usage stats showing in the app. I wonder if there is any option to retain the historical usage in the app after removing users from the tenant.

@serjko-brightly closing this as we missed it before and this is likely stale. Please feel free to reply with any updates if this is still an issue and we can look at it.


Perfect reindexes, with no failures

10th July
The reindexer ran slowly because DynamoDB didn't scale up correctly.
20 records went to the reindexer DLQ. 347 records weren't indexed into Elasticsearch.

11th July
We preset the DynamoDB capacity on the SourceData and recorder tables to the max, and disabled autoscaling. The reindexer ran much faster, and no new records ended up on the DLQ.
876 records went to the ingestor DLQ. 29 records went to the merger DLQ. 79 records weren't indexed into Elasticsearch.

11th July (take 2)
DynamoDB was similarly preset to max capacity.
I’m reducing the max instances on the ingestor to 10 (see 88b9f2b).


Support for webpack resolution of modules.

When I tried to get Flow working in our project last week, I was saddened that it wouldn't work because of the custom resolution we're using via webpack's modulesDirectories.
You can read more about our folder structure here: https://gist.github.com/ryanflorence/daafb1e3cb8ad740b346#shared-module-resolution
And webpack's modulesDirectories here: http://webpack.github.io/docs/resolving.html#resolving-a-module-path
Is there any chance that Flow will support this?

I am also interested in this. I asked a similar question in IRC in Feb: https://botbot.me/freenode/flowtype/2015-02-10/?msg=31705409&page=2
At the time, @gabelevi mentioned that @jeffmo and @mroch were already talking about how to build it.
This seems somewhat related to #101.

I have a feature that I'm working on (that should be ready fairly soon) that will allow you to specify a config entry that lets you write a search/replace regexp pattern that gets applied to all module names before flow attempts to resolve them.
It's mostly geared towards supporting things like module aliases, but depending on how complex your lookup algorithm is compared to the built-in one this might achieve what you want?
An example of the feature I'm describing would be that you could write a config entry like:
module.name_mapper="(.*)", "/some/path/to/where/my/modules/are/\1"
This would match all module names and rewrite them to an absolute path somewhere that contains all of your modules. You'll be able to specify multiple of these entries in order to write up different rewrites for different patterns.
Would this do what you need by chance?

What is the behavior if a module name is matched by multiple entries?

There are a couple of options for how it could work, but at the moment it seems to me that the least surprising would be that the first one that matches (in order of specification) wins. Thoughts?

My preference would be that the first one that matches that can actually resolve the file wins. That would allow you to have global defaults with reasonable fallbacks. It would also more closely match the strategy that webpack uses which could help for familiarity and adoption.

Sorry I'm late in replying, but this sounds like this would work swimmingly! +1 to first match that resolves a file wins.

Ok, I'll take a wack at first-to-match-and-stat. I'm slightly unsure about stating the fs so often (read: perf for big projects), but I might be able to make it work.
Thanks for the feedback, this was helpful!

I just landed this config option yesterday and summarized how it works over toward the end the following issue. Thanks for the report!
https://github.com/facebook/flow/issues/345

@jeffmo would this solve my use case for the webpack resolve path? If I use ../../components/Foo flow works but if I use components/Foo I get the following error:
src/pages/DashLayout.js:4
  4: import Header from 'components/Header';
                        ^^^^^^^^^^^^^^^^^^^ components/Header. Required module not found

@AdamBrodzinski Yes, it will help, take a look here.
https://github.com/cdebotton/react-universal/commit/e57aadbcbd8be4e2031f308187392f44d02b44f9

@kompot Thanks you're the best! working great now :smile:

For everyone looking at this issue in 2016, module.system.node.resolve_dirname was added in 0.18.1.
I solved this by adding these lines to my .flowconfig options:
module.system.node.resolve_dirname=node_modules
module.system.node.resolve_dirname=src

The relevant part of my webpack config is:
resolve: {
  modules: ["src", "node_modules"]
}

@dlindenkreuz what did you do exactly? Problem remains for me. Flow tells me Required module not found.
E.g. for src/foo/bar.js, import stuff from 'foo/bar' doesnt work.

@MoeSattler The important part is that resolve_dirname in .flowconfig and the resolve paths for modules in the webpack config are the same.
Are you on a recent flow version (>= 0.18.1)? Sometimes, the locally installed flow version in node_modules/.bin/flow is different from the globally installed in /usr/bin/flow.

@MoeSattler Did you manage to set it up?
I have the same issue as you are having right now.

Note that this solutions no longer works in Flow 0.57.
In Flow 0.57 they introduced an optimization to,

only check the files in  node_modules/ which are direct or transitive dependencies of the non-node_modules code.

Because the trick above made Flow think your app modules were another source of node_modules,
now the app source would not be focused either. You could see this in Flow logs by
almost all app files being omitted from the "focused" count.
A working alternative is to explicitly define module.name_mapper directives for each
child of your root directory, to tell Flow how to resolve those files. (Thanks to
https://github.com/cdebotton/react-universal/commit/e57aadbcbd8be4e2031f308187392f44d02b44f9#commitcomment-19062820
for the idea.)
This script generates the directives you need in [options] of your .flowconfig:
https://gist.github.com/turadg/4c11ef9ac1af7b41276d0acc4d4bf8c8

Hmmm... the solution above seemed to work fine for me in<EMAIL_ADDRESS>

@kentcdodds can't get this to work in flow 0.72.0
in .flowconfig:
[options]
module.system.node.resolve_dirname=node_modules

in webpack config:
resolve: {
  modules: ["node_modules"]
}

I'm trying to do something like import moment from 'moment' but I'm given Cannot resolve module moment. Do you know if this solution is supposed to work in this version of flow, or is there a new workaround?

@JohnDDuncanIII Do you use monorepo?

yes — another developer is type-checking their {PROJECT_ROOT}/shared/ directory that we are sharing between react and react-native. I am attempting to figure out how to fix the issue that they're running into (they ended up using // $NoFlow as a hack for all imports that fail.
The node_modules live inside of {PROJECT_ROOT}/node_modules/, and we are running flow from inside of {PROJECT_ROOT}/shared/ dir.
In .flowconfig, the developer has:
[ignore]
.*/node_modules/*

[options]
module.system.node.resolve_dirname=node_modules

but even removing the node_modules [ignore] does not seem to alleviate the problem.


consider offering an API to attach metadata to an EventLoop

It can be very useful for users of SwiftNIO to attach metadata to an EventLoop, we should consider having an API for that.

@weissi what would be the access pattern for it ? Is it only allow to add / get / remove on the current EventLoop ?

At the moment I think I am leaning to not do this and just do #61 . This way the semantics related to concurrency are clear and its always safe.
@Lukasa @weissi thoughts ?
Also @tanner0101 wdyt ?

My use-case is that I'd like to have one service container (dependency injection container) for each event loop. This let's me design all of our services to not care about being thread safe (since any initialized service will only be used by one thread). It seems that the distinction here between being actually attached to each event loop and just being attached to a particular thread isn't really a huge deal (unless I'm missing some common use-case where you want to run more than one event loop on a single thread).
If all of that sounds right, my thinking is I can just use the APIs in #61 as a hopefully speedier replacement to the current solution using foundation thread dictionary. In which case I'm fine closing this issue. 👍

Yep this sounds right @tanner0101

I think we close this for now as  #61 was fixed.


No matching function for call to 'gesdd' when building with Xcode

I installed xtl, xtensor and xtensor-blas via conda. Versions:
libblas            conda-forge/osx-64::libblas-3.8.0-9_openblas
libcblas           conda-forge/osx-64::libcblas-3.8.0-9_openblas
liblapack          conda-forge/osx-64::liblapack-3.8.0-9_openblas
liblapacke         conda-forge/osx-64::liblapacke-3.8.0-9_openblas
openblas           conda-forge/osx-64::openblas-0.3.6-hd44dcd8_2
xtensor            conda-forge/osx-64::xtensor-0.20.5-h770b8ee_0
xtensor-blas       conda-forge/osx-64::xtensor-blas-0.16.1-h7f1c7fb_0
xtl                conda-forge/osx-64::xtl-0.6.4-h770b8ee_0

I use the following settings to build by Xcode project with xtensor:
Project type: command line tool

Project - Build settings -

Search Paths:

Header search paths: /Users/[username]/anaconda3/include
Library search paths: /Users/[username]/anaconda3/lib

Apple Clang - Language - C++:

C++ language dialect: GNU++14 [-std=gnu++14]
C++ standard library: libc++ (LLVM C++ standard library with C++ 11 support)

Target - Build phases

Link binary with libraries

libopenblasp-r0.3.6.a
libopenblasp-r0.3.6.dylib

(both these libraries are in the directory /Users/[username]/anaconda3/lib)
When building my project, Xcode raises the error No matching function for call to 'gesdd' in the file /Users/[username]/anaconda3/include/xtensor-blas/xlapack.hpp. Is there any solution to this problem?
I'm using Xcode 10.2.1 on macOS Mojave 10.14.4.

I think it might be that you additionally need to link to the lapack library.

I installed lapack by the command conda install -c conda-forge lapack. Installed version
lapack             conda-forge/osx-64::lapack-3.6.1-ha44fe06_2

And I added the installed /Users/[username]/anaconda3/lib/liblapack.3.6.1.dylib to "Link binary with libraries". But it doesn't work.

otool -TV your.dylib
Can you use the command line and cmake to configure your project? since I am not an XCode user, I can't give you any XCode specific help here ...
you shoudl be able to see if gesdd is in the library with this command line instruction:
otool -TV liblapack.3.6.1.dylib

and
otool -TV liblapack.3.6.1.dylib | grep gesdd

otool -TV liblapack.3.6.1.dylib gives the following result:
warning: /Library/Developer/CommandLineTools/usr/bin/otool: -T functionality obsolete
OVERVIEW: llvm object file dumper

USAGE: objdump [options] <input object files>

OPTIONS:
  -aarch64-neon-syntax     - Choose style of NEON code to emit from AArch64 backend:
    =generic               -   Emit generic NEON assembly
    =apple                 -   Emit Apple-style NEON assembly
  -all-headers             - Display all available header information
  -arch=<string>           - architecture(s) from a Mach-O file to dump
  -arch-name=<string>      - Target arch to disassemble for, see -version for available targets
  -archive-headers         - Display archive header information
  -archive-member-offsets  - Print the offset to each archive member for Mach-O archives (requires -macho and -archive-headers)
  -bind                    - Display mach-o binding info
  -color                   - Use colors in output (default=autodetect)
  -data-in-code            - Print the data in code table for Mach-O objects (requires -macho)
  -demangle=<string>       - Demangle symbols names
  -df=<string>             - List of functions to disassemble
  -dis-symname=<string>    - disassemble just this symbol's instructions (requires -macho)
  -disassemble             - Display assembler mnemonics for the machine instructions
  -disassemble-all         - Display assembler mnemonics for the machine instructions
  -dsym=<string>           - Use .dSYM file for debug info
  -dwarf                   - Dump of dwarf debug sections:
    =frames                -   .debug_frame
  -dylib-id                - Print the shared library's id for the dylib Mach-O file (requires -macho)
  -dylibs-used             - Print the shared libraries used for linked Mach-O files (requires -macho)
  -dynamic-reloc           - Display the dynamic relocation entries in the file
  -exports-trie            - Display mach-o exported symbols
  -fault-map-section       - Display contents of faultmap section
  -file-headers            - Display the contents of the overall file header
  -full-leading-addr       - Print full leading address
  -g                       - Print line information from debug info if available
  -help                    - Display available options (-help-hidden for more)
  -indirect-symbols        - Print indirect symbol table for Mach-O objects (requires -macho)
  -info-plist              - Print the info plist section as strings for Mach-O objects (requires -macho)
  -lazy-bind               - Display mach-o lazy binding info
  -line-numbers            - Display source line numbers with disassembly. Implies disassemble object
  -link-opt-hints          - Print the linker optimization hints for Mach-O objects (requires -macho)
  -macho                   - Use MachO specific object file parser
  -mattr=<a1,+a2,-a3,...>  - Target specific attributes
  -mcpu=<cpu-name>         - Target a specific cpu type (-mcpu=help for details)
  -no-leading-addr         - Print no leading address
  -no-leading-headers      - Print no leading headers
  -no-show-raw-insn        - When disassembling instructions, do not print the instruction bytes.
  -no-symbolic-operands    - do not symbolic operands when disassembling (requires -macho)
  -non-verbose             - Print the info for Mach-O objects in non-verbose or numeric form (requires -macho)
  -objc-meta-data          - Print the Objective-C runtime meta data for Mach-O files (requires -macho)
  -print-imm-hex           - Use hex format for immediate values
  -private-header          - Display only the first format specific file header
  -private-headers         - Display format specific file headers
  -r                       - Display the relocation entries in the file
  -raw-clang-ast           - Dump the raw binary contents of the clang AST section
  -rebase                  - Display mach-o rebasing info
  -s                       - Display the content of each section
  -section=<string>        - Operate on the specified sections only. With -macho dump segment,section
  -section-headers         - Display summaries of the headers for each section.
  -source                  - Display source inlined with disassembly. Implies disassemble object
  -start-address=<address> - Disassemble beginning at address
  -stop-address=<address>  - Stop disassembly at address
  -t                       - Display the symbol table
  -triple=<string>         - Target triple to disassemble for, see -version for available targets
  -universal-headers       - Print Mach-O universal headers (requires -macho)
  -unwind-info             - Display unwind information
  -version                 - Display the version of this program
  -weak-bind               - Display mach-o weak binding info

And otool -TV liblapack.3.6.1.dylib | grep gesdd gives nothing but a deprecation warning
warning: /Library/Developer/CommandLineTools/usr/bin/otool: -T functionality obsolete

So it seems that gesdd is not in my lapack?

sorry, as the message says the -T flag doesn't work anymore.
Try this one instead: nm -gU thelib.dylib

nm -gU liblapack.3.6.1.dylib | grep gesdd gives
00000000003bdf96 T _cgesdd_
00000000001ed89c T _dgesdd_
00000000000260ba T _sgesdd_
000000000059a8f6 T _zgesdd_

So the package does include gesdd and I should try using the command line directly to configure my program?

did you also do this: https://solarianprogrammer.com/images/2017/03/24/10_macos_compiler_search_paths.png (note that there you will need to use the appropriate conda directory)
from (https://solarianprogrammer.com/2017/03/24/getting-started-armadillo-cpp-linear-algebra-windows-mac-linux/)

Unfortunately, I have already modified those entries in Xcode. Maybe I'll try using the command line later, but I am a little bit busy right now. Now I close this issue, but I still welcome anyone who succeeds in configuring xtensor with Xcode telling me how to do it.

I encountered this when I try to xt::linalg::norm(array, 2) where array is of type xt::xarray<int>.

I encountered this when I try to xt::linalg::norm(array, 2) where array is of type xt::xarray<int>.

I found that if I change array to be xt::array<double>, this error will disappear. So only double is accepted?


Error: "Could not create a link to the env!"

enaml-native-cli version 2.3.1
I ran "enaml-native create app" and got the follow error:
#
# To activate this environment, use
#
#     $ conda activate helloworld
#
# To deactivate an active environment, use
#
#     $ conda deactivate

Could not create a link to the env!
ERROR: Stopping generation because post_gen_project hook script didn't exit successfully
Traceback (most recent call last):
  File "/share/Projects/android/enaml/venv3/bin/enaml-native", line 8, in <module>
    sys.exit(main())
  File "/share/Projects/android/enaml/venv3/lib/python3.6/site-packages/enamlnativecli/main.py", line 1772, in main
    EnamlNativeCli().start()
  File "/share/Projects/android/enaml/venv3/lib/python3.6/site-packages/enamlnativecli/main.py", line 1766, in start
    cmd.run(self.args)
  File "/share/Projects/android/enaml/venv3/lib/python3.6/site-packages/enamlnativecli/main.py", line 259, in run
    overwrite_if_exists=args.overwrite_if_exists)
  File "/share/Projects/android/enaml/venv3/lib/python3.6/site-packages/cookiecutter/main.py", line 94, in cookiecutter
    output_dir=output_dir
  File "/share/Projects/android/enaml/venv3/lib/python3.6/site-packages/cookiecutter/generate.py", line 376, in generate_files
    delete_project_on_failure
  File "/share/Projects/android/enaml/venv3/lib/python3.6/site-packages/cookiecutter/generate.py", line 236, in _run_hook_from_repo_dir
    run_hook(hook_name, project_dir, context)
  File "/share/Projects/android/enaml/venv3/lib/python3.6/site-packages/cookiecutter/hooks.py", line 144, in run_hook
    run_script_with_context(script, project_dir, context)
  File "/share/Projects/android/enaml/venv3/lib/python3.6/site-packages/cookiecutter/hooks.py", line 128, in run_script_with_context
    run_script(temp.name, cwd)
  File "/share/Projects/android/enaml/venv3/lib/python3.6/site-packages/cookiecutter/hooks.py", line 91, in run_script
    'Hook script failed (exit status: {})'.format(exit_status)
cookiecutter.exceptions.FailedHookException: Hook script failed (exit status: 1)
(venv3)

Moved to https://github.com/codelv/enaml-native-cli/issues/20


Travis ci docs

Did three main things:

Added Travis-CI short documentation md file as high level overview of travis and how to use it
Got rid of warnings on compilation and added some compiler flags including -Werror. This means that warnings are now errors, I'm pretty sure this is good practice to enforce on pushes to master to force good programming, might be wrong there though.
Cleaned up cmake file significantly and changed travis build scripts, since I had misunderstood it before and it had made a bit of a mess. I thought before that we were to execute cmake ., but the actual build directory we want is build/, which meant a bunch of files were getting created that weren't. Deleted these files and updated travis script to build properly.
Sorry these probably should have been 3 separate pull requests, but too late now. Also branch name is awful.

Just wanted to add that basically ALL of my CMakeLists.txt files are absolute atrocities; if you figure out what they are supposed to look like I'd be very pleased.

Alright, after doing some debugging on Travis's end I think it should be working now. The issue was I was using some CMake syntax build -S .. -B . that wasn't available on their (old) version of CMake. I've added a pre-script to update to the latest version of CMake to avoid similar problems in the future and changed that syntax to equivalent just to be sure.

@Esouder if you could review and merge (if everything is fine) that would be great.

@misprit7 Looks great, the documentation is very handy.


catalog page support displaying endpoint point properly

Rancher version 2.0 master 05/24
Steps to Reproduce:

Go to Catalog Apps and deploy the Prometheus chart (or app with multiple endpoints)

the way to display endpoints are not user-friendly and service name is missing,
so service and ingress for the same app components should go to the same block with it service name, for example like:
Grafana: 31745/tcp, 80/http        |    Prometheus: 30732/tcp, 80/http
serviceGraph: 31745/tcp, 80/http   |     Zipkin: 30732/tcp, 80/http

@vincent99 do you agree this design? I have fixed the style issue with ellipsis. I think user can go to the app detail page to see the all endpoints.

Yes I think showing a limited set of ports on the app with ellipsis is good, you can't show an unlimited number of endpoints and have a decently lined up display of multiple applications.

using ellipsis is good, but @vincent99 @loganhz here are two main concerns,

we got to know which server the port belongs to when have multiple service in one chart, e.g, a Prometheus chart may contains Grafana, Prometheus and Alertmannager.
should we use a label to specify whether an endpoint should appears on the catalog landing page, e.g, catalog-endpoint: true

There are too many endpoints for some app. We need to add a particular field in publicEndpoint to let UI know if we should show the port in app list page.

Master 6/18/18
Validated endpoints added within app


setting "indent size = 2" not work

setting "indent size = 2" not work
The results of beautification are not what I expect. I set the 'indent size: 2'. but after running command Atom Beautify: Beautify Editor.The indent size is 4.
Input Before Beautification
function Test(name) {
  this.name = name
}

Expected Output
function Test(name) {
  this.name = name
}

Actual Output
function Test(name) {
    this.name = name
}

Steps to Reproduce

Add code to Atom editor
Run command Atom Beautify: Beautify Editor
This beautified code does not look right!

Debug
Here is a link to the debug.md Gist:
Checklist
I have:

[x] Tried uninstalling and reinstalling Atom Beautify to ensure it installed properly
[x] Reloaded (or restarted) Atom to ensure it is not a caching issue
[x] Searched through existing Atom Beautify Issues at https://github.com/Glavin001/atom-beautify/issues
so I know this is not a duplicate issue
[ ] Filled out the Input, Expected, and Actual sections above or have edited/removed them in a way that fully describes the issue.
[ ] Generated debugging information by executing Atom Beautify: Help Debug Editor command in Atom and added link for debug.md Gist to this issue

+1

+1
If the beautifier is set to JS Beautify the indent settings does not have any effect on the output, but with Pretty Diff it works.

Please follow the issue template provided. More specifically, adding a link to the required debug.md Gist which includes debugging information that answers our most commonly asked questions.
Thank you.


Build(deps-dev): Bump prettier from 2.8.8 to 3.0.0 (#4990)

Pull request opened by the merge tool on behalf of #4990

Merged in 30dd9ad459afc66bbc93a2fa91791dad3e975af1


TRANSFER APPLICATION LOGIC FROM YACHT-ANALYZE

codehub -> sweatShop-analyzer

test caching w/ redis stack

Analyzing logic is migrated. Caching into Redis Stack worked.

perfect


Feature Request:  Have a keyboard shortcut and toggle making the code comments transparent

For those people who write plenty of comment, it becomes sometimes to difficult to follow the code.
Those comments are life saver but only when you need it to.
I would love to have a feature to turn off all comments from showing
Since themes already know how to color code the comments, I think it would be no issue to turn them transparent in the current given theme.
And with a quick keyboard shortcut, you can come back to the editing environment again.

@halukkaramete you can customize any theme via user settings.
e.g.
"editor.tokenColorCustomizations": {
	"comments": "#FF000000"
},

You can easily write an extension that uses vscode API to toggle this specific setting.

Thank you for the tip. I will integrate this into the API which I was not aware of earlier, which means you now have opened up a new territory of fun to get into. Thanks for that.
I still think that having an editor level capability where all users can toggle this on/off with a shortcut toggle or a little button to click to toggle would be appreciated.


Interactive control of color map?

Datamapplot is an incredible package and I would love to use this for interactive exploration of single cell RNA seq datasets. However, for scRNAseq data, the ability to interact with additional (non-categorical) features is important.  If the user were able to dynamically overlay alternative color mappings onto the data points (e.g. expression levels of individual genes, PCA scores, etc) this could add tremendous functionality. Datamapplot appears to be able to handle custom color mappings via "marker_color_array", but not interactively.
This may be outside the scope of your original vision for the tool, but could some guidance be provided on how one might incorporate such interactivity in the form of a pull-down menu /search bar ?  Ideally one would be able to toggle between different sets of categorical and continuous color mappings while browsing the data.
Thank you Leland for building this beautiful plotting tool!

It is within scope, and is actually on my TODO list, but I haven't had the time to sit down and implement it properly. You can consider it one of the features I expect to have for the next major release however.


search exclusion does not work with .folder/**/. pattern

Visual Studio Code - Insiders
Version: 1.25.0-insider
Commit: b7e6e04666ca8dde560b69081c43365dce77d12a
Date: 2018-06-22T05:17:08.689Z
Electron: 2.0.2
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64
Steps to Reproduce:

create a folder named .folder, to this folder add test.txt file with test in it
add "search.exclude": { ".folder": true } to settings.json or type .folder/**/*.* to files to exclude field in Search tab
search for test
observe results are still found in test.txt despite being instructed to omit

Does this issue occur when all extensions are disabled?: Yes

i followed the tips, and still have problem, please make it clear what more info you need

Is test.txt open?
If not, please follow the steps at the bottom of the page to get the logs


The generic implementation of math.Point entails significant overhead. Should there be an alternative or warning?

Hi Dart folks, long time no see.
Take this as an RFC... arguably math.Point is working exactly as implemented and nothing I'm going to say will be a major surprise, at least qualitatively....
I've always wondered if math.Point isn't a pathological use-case for reified generics? In my head, reified generics work great for cases where you have a lot of generic code (where you wanna pay the cost to binary size once) dealing with mostly opaque objects like with containers. However, math.Point is the polar opposite. On top, the operations it implements are extremely cheap lending exacerbated significance to the virtual function overhead that comes with reified generics.
I finally came around to quantify the impact with a silly micro-benchmark (never trust a micro-benchmark in general and don't trust me specifically) and found the overhead for simple vector additions to be in the order of 20+x [1].
Motivated by that result I replaced math.Point with my own basic points in some number-crunching heavy libraries and got real-life performance improvements of tens or hundreds of percent. Nothing to sneeze at.
So my question to you, is math.Point (and probably math.Rectangle as well) setting a bad example? By virtue of being in the standard library, it's the go-to solution for many mathy dart libraries. Unless you want to write code that specifically deals with Point<num> (and all the type assertion exceptions that come with it), there isn't much benefit in math.Point being generic. My hunch is that most users would happily pay the cost to binary size for an unrolled version given the significant performance advantage. I would even argue that something as frame-time-sensitive as Flutter would greatly benefit from a pivot.
I understand that removing math.Point won't fly w/o breaking the world but maybe it's worth warning/steering users to an unrolled alternative?
Curious to hear what you think.
Cheers,
Sebastian
[1] my micro-benchmark:
import 'dart:math';

class PointInt {
  final int x;
  final int y;

  const PointInt(this.x, this.y);

  PointInt operator +(PointInt other) =>
    PointInt(x + other.x, y + other.y);
}

class PointDouble {
  final double x;
  final double y;

  const PointDouble(this.x, this.y);

  PointDouble operator +(PointDouble other) =>
    PointDouble(x + other.x, y + other.y);
}

const N =<PHONE_NUMBER>;

final ints = <(String, Function)>[
  ('PointInt', () {
      var x = PointInt(23, 23), y = PointInt(42, 42);
      for (int i = 0; i < N; ++i) x += y;
    }),
  ('Point<int>', () {
      var x = Point<int>(23, 23), y = Point<int>(42, 42);
      for (int i = 0; i < N; ++i) x += y;
    }),
];

final doubles = <(String, Function)>[
  ('PointDouble', () {
      var x = PointDouble(23, 23), y = PointDouble(42, 42);
      for (int i = 0; i < N; ++i) x += y;
    }),
  ('Point<double>',
    () {
      var x = Point<double>(23, 23), y = Point<double>(42, 42);
      for (int i = 0; i < N; ++i) x += y;
    }),
];

void main() {
  for (final suite in [ints, doubles]) {
    final results = suite.map((s) {
      final (k, f) = s;
      final w = Stopwatch()..start();
      f();
      return (k, w.elapsed);
    });

    final factor =
        results.last.$2.inMicroseconds / results.first.$2.inMicroseconds;

    print('${results}: ${factor.toStringAsFixed(1)}');
  }
}

and example output:
$ dart compile exe generic2.dart && ./generic2.exe
Generated: /home/sebastian/projects/dart/generic2.exe
((PointInt, 0:00:00.335539), (Point<int>, 0:00:08.149218)): 19.1
((PointDouble, 0:00:00.284572), (Point<double>, 0:00:09.913140)): 23.1

That's a very interesting observation! Note the relations to monomorphization, e.g., issue https://github.com/dart-lang/sdk/issues/52722, and other issues that @modulovalue created or commented on.
Perhaps macros could offer compact code (avoiding two or more copies of essentially the same code at the source level) with type specific variants (e.g., int and double specific variants of classes like Point).

@ignatz if you want backwards compatibility with the Point interface, you could try subclassing Point from dart:math like this:
import 'dart:math';

class PointInt {
  final int x;
  final int y;

  const PointInt(this.x, this.y);

  PointInt operator +(PointInt other) =>
    PointInt(x + other.x, y + other.y);
}

class PointDouble {
  final double x;
  final double y;

  const PointDouble(this.x, this.y);

  PointDouble operator +(PointDouble other) =>
    PointDouble(x + other.x, y + other.y);
}

class PointDouble2 extends Point<double> {
  const PointDouble2(super.x, super.y);

  PointDouble2 operator +(covariant PointDouble2 other) =>
    PointDouble2(x + other.x, y + other.y);
}

class PointInt2 extends Point<int> {
  const PointInt2(super.x, super.y);

  PointInt2 operator +(covariant PointInt2 other) =>
    PointInt2(x + other.x, y + other.y);
}

const N = 10000000;

final ints = <(String, Function)>[
  ('PointInt', () {
      var x = PointInt(23, 23), y = PointInt(42, 42);
      for (int i = 0; i < N; ++i) x += y;
    }),
  ('Point<int>', () {
      var x = Point<int>(23, 23), y = Point<int>(42, 42);
      for (int i = 0; i < N; ++i) x += y;
    }),
  ('PointInt2', () {
      var x = PointInt2(23, 23), y = PointInt2(42, 42);
      for (int i = 0; i < N; ++i) x += y;
    }),
];

final doubles = <(String, Function)>[
  ('PointDouble', () {
      var x = PointDouble(23, 23), y = PointDouble(42, 42);
      for (int i = 0; i < N; ++i) x += y;
    }),
  ('Point<double>',
    () {
      var x = Point<double>(23, 23), y = Point<double>(42, 42);
      for (int i = 0; i < N; ++i) x += y;
    }),
  ('PointDouble2',
    () {
      var x = PointDouble2(23, 23), y = PointDouble2(42, 42);
      for (int i = 0; i < N; ++i) x += y;
    }),
];

void main() {
  for (final suite in [ints, doubles]) {
    final results = suite.map((s) {
      final (k, f) = s;
      final w = Stopwatch()..start();
      f();
      return (k, w.elapsed);
    });

    final factor =
        results.last.$2.inMicroseconds / results.first.$2.inMicroseconds;

    print('${results}: ${factor.toStringAsFixed(1)}');
  }
}

I've tested it on DartPad (other runtimes might vary) and it appears to provide the performance that you're looking for:
((PointInt, 0:00:00.047000), (Point<int>, 0:00:00.235000), (PointInt2, 0:00:00.046000)): 1.4
((PointDouble, 0:00:00.047000), (Point<double>, 0:00:00.239000), (PointDouble2, 0:00:00.049000)): 1.0

explanation
A self type would be nice for getting rid of the use of covariant here.
It looks like other languages have annotations for doing this in an automated way.
For performance sensitive use cases there's a first party vector_math package that avoids the use of generics.

Thanks Erik, thanks Modestas for the super quick reply.
Let me take a step back, I feel like we're mixing two conversations:

How this could be fixed, e.g. with a new language/toolchain features could force monomorphization of all math.Points in existence w/o requiring interaction by library maintainers
What existing alternatives there are or how to best roll your own.

Personally, I'm not very interested in (2.) unless it comes shipped as part of the standard library and with clear guidance to create momentum. Implementing your own Point class isn't very hard or verbose. However, getting folks to use yours or having to deal with the glue for 50 different Point implementations throughout your program's transitive closure of dependencies is hard.
Let me just quickly comment on the proposed inheritance-based solution. It is a fun little detail that inheritance forces monomorphization (guaranteed or not). I will certainly remember this trick. Compiling to native, I'm seeing the projected performance gains, however in "compat" mode:
Point<int> x = PointInt2(23, 23);
Point<int> y = PointInt2(42, 42);
for (int i = 0; i < N; ++i) x += y;

I'm seeing a 12x performance reduction over plain PointInt. Whether or not this "compat" approach can save me anything in practice, both in terms of typing and performance, seems very case dependent. What does an external library looking like List<Point> expensive(List<Point> input) do internally?
Independent of vector_math, PointInt, PointInt2, if I have to convince a library owner to move away from math.Point the amount of work for them will roughly be the same and my lack of persuasiveness would only be helped by some divine endorsement, e.g. a standard library provided solution (no matter the implemenation) or at least a big friendly warning regarding math.Point's performance implications.
Coming back to (1.),  before-mentioned annotations (et al) would arguably be a silver-bullet: huge performance gains w/o any additional work besides re-compiling. I'm keen to hear from you how attainable such a solution would be in the short/mid/long-term? Depending on the time-horizon, maybe there's still an opportunity to at least create awareness one way or another?
From my point of view, Dart is a really fast language, just math.Point leaves a lot of performance on the table and many authors don't even realize.

Point and Rectangle are not great classes, and not well-positioned in dart:math. The design is actually more "screen"-based than math based. (The rectangle considers (min-x, min-y) the top-left corner, not the bottom-left corner, like "screen coordinates").
It's trying to solve too many problems, while doing none of them really well.
I'd be happy to move the class into package:html or similar, which is where it's used, if I can get away with it. (But they probably want just the Point<int> type then).
Deprecating it entirely and throwing it away would also be great. Probably hard to sell, since there are uses.
Deprecating the class and replacing it with an extension type might be more sellable, at least you should get some performance benefits.
Something like https://dartpad.dev/?id=9f717b5f699fcda195d5d3d466d2951f&channel=master
Still, removing, replacing, or even changing, platform library types is hard, because there is no versioning or opt-out for users. Their code gets the new version when their users upgrade their SDK.

Deprecating it entirely and throwing it away would also be great. Probably hard to sell, since there are uses.

I don't see your proposals as mutually exclusive. Even if the end goal was to throw it away eventually, you'd need to offer alternatives and leave plenty of lead time first.

Deprecating the class and replacing it with an extension type might be more sellable, at least you should get some performance benefits.
Something like https://dartpad.dev/?id=9f717b5f699fcda195d5d3d466d2951f&channel=master

Marking math.Point (et al) explicitly as Deprecated and offering alternatives would certainly send a very strong signal and such be all I could have ever hoped for.
I had a quick look at extension types, it's not clear to me if one even wanted to tie shiny new alternatives to math.Point through inheritance or else. Personally, I'd be fine if they don't share any traits, which would also help to address some of your earlier concerns that math.Point and math.Ractangle should maybe do less or certain things differently.
Hope you folks will have a chance to talk this out. I don't feel very strong, at least not yet, towards any solution. In the end it would just be lovely, to see fewer libraries grab for math.Point in compute-heavy tasks and sometimes unknowingly pay 3 or 4 digit percentage points overhead.
Thanks y'all for being so responsive and on top of things.


Pagination is broken when filters are applied

Steps to Reproduce

Visit https://ocw-studio.odl.mit.edu/sites/18-04-complex-variables-with-applications-spring-2018/type/resource/?q=Topic Or any filtered listing page with more than 10 list items
Click the paginate buttons at bottom >

Expected Behavior
Next page of results loads
Actual Behavior
Next page of results loads and then you're quickly brought back to the first page.  😭

This went out in #1237


copy_to turns Dates into numeric columns (with only the year)

When copying over a data frame (or tbl_df) with a Date column, it is rounded to the year:
library(sparklyr)
library(dplyr)

sc <- spark_connect(master = "local")

example <- data_frame(a = 1,
                      b = "text",
                      c = Sys.Date())

example_tbl <- copy_to(sc, example)

example_tbl
collect(example_tbl)

The resulting c column contains only 2016, not the full date:
Source:   query [?? x 3]
Database: spark connection master=local[16] app=sparklyr local=TRUE

      a     b     c
  <dbl> <chr> <dbl>
1     1  text  2016

I'm encountering this problem as well. I have a Spark DataFrame that I want to join on a timestamp column, so I generate a time series in R and then use copy_to so that I can do the join, but

Yes, this is an issue for me too. I am currently working around this by converting the date to epoch with as.integer but ideally would like a cast() or to_date() wrapper, or simply just have copy_to() preserve dates.

This work is now being tracked by https://github.com/rstudio/sparklyr/issues/941

My date are in the format "2018-12-01" in R dataframe and column is Date type but when copy_to spark dataframe, the output looks like this:
bank_name  Date  Open  High   Low Close T           Q

1 AB           14613 1700  1728. 1693. 1706.             305049
2 AB           14614 1710  1725  1705  1707.             838660
why so?

I have the same problem.
economics_rdf <- ggplot2::economics

head(economics_rdf, 3)
# A tibble: 3 x 6
  date         pce    pop psavert uempmed unemploy
  <date>     <dbl>  <dbl>   <dbl>   <dbl>    <dbl>
1 1967-07-01  507. 198712    12.6     4.5     2944
2 1967-08-01  510. 198911    12.6     4.7     2945
3 1967-09-01  516. 199113    11.9     4.6     2958

dplyr::copy_to(sc, economics_rdf, overwrite = TRUE)
# Source: spark<economics_rdf> [?? x 6]
    date   pce    pop psavert uempmed unemploy
   <dbl> <dbl>  <dbl>   <dbl>   <dbl>    <dbl>
 1  -915  507. 198712    12.6     4.5     2944
 2  -884  510. 198911    12.6     4.7     2945
 3  -853  516. 199113    11.9     4.6     2958

sparklyr::sdf_copy_to(sc, economics_rdf, overwrite = TRUE)
# Source: spark<economics_rdf> [?? x 6]
    date   pce    pop psavert uempmed unemploy
   <dbl> <dbl>  <dbl>   <dbl>   <dbl>    <dbl>
 1  -915  507. 198712    12.6     4.5     2944
 2  -884  510. 198911    12.6     4.7     2945
 3  -853  516. 199113    11.9     4.6     2958


bug references got "Ticket not found", but they exist

sles+extratests -> boo#1011931 (Ticket not found)

Existing Product bugs:

migration_offline_sle12 -> bsc#1012564 (Ticket not found)

probably fixed with https://github.com/okurz/openqa_review/commit/8239c34199d95fcaf34bafe4640cd60452fb32be