全屏ID和小屏ID使用统一资源管理提供的唯一ID，消除报错

强迫症发作，报红很难受

完美

你好，咱们项目推出数字通证饺子token，https://github.com/lipangit/JZT， 给所有提交过pr的朋友30000个JZT，表示对你过去对项目支持的感谢。
请下载币威钱包https://www.bitcv.app/，把里面的以太坊地址给我，币威的地址站内转账不需要手续费。这东西值不值钱不重要，玩的是信仰。
Hello, let's launch the JiaoZiToken, https://github.com/lipangit/JZT, and give all the friends who submitted pr 30,000 JZT, thank you for your support of the project.
Please download the coin wallet https://www.bitcv.app/?from=bitcvCom and give me the address of the Ethereum. There is no charge for transferring money at the address station, if you do not know Chinese , you can give me other address of the eth. It is not important that the value of this thing is worthless. It is faith.


Remove "edit automoderator config" tab from subreddit config

The tab seems pointless to me now that a link to the automoderator config exists in the sidebar moderation tools list. All the other tabs are specific to toolbox.
The config tabs also wrap to a new line, and removing the automod tab would prevent that from happening.

False.  This allows you to edit the config from any page without leaving it.   Also from the mod queue.
Pls 2 revert.

No, I still use this fairly often as it is easier as I don't have to leave the page.

Oh, this wasn't a commit.


Remove the findResultsCount-check from PDFFindBar.updateResultsCount, and unnecessary defaults from the constructor

Given that PDFFindBar is written specifically for the default viewer, rather than general usage (as opposed to the PDFFindController), we should be able to simply assume that the findResultsCount DOM-element is always present. Even more so, when we're purposely not doing any similar checks for other DOM-elements in this code.
Also, remove unnecessary null defaults for the various DOM-element options in the constructor, since the code simply assumes that all of the relevant DOM-elements are in fact available.

/botio-linux preview

Looks better; thanks!


sortBy function of Collection will throw error when used with sort key

Laravel Version: 8.48.2
PHP Version: 7.4.26
Database Driver & Version: mysql  Ver 8.0.27 for macos11.6 on x86_64 (Homebrew)

Description:
sortBy function of Collection can not be used with sort key. It will throw ErrorException.
Following is the error message:
ErrorException

sort() expects parameter 2 to be int, array given

at vendor/laravel/framework/src/Illuminate/Collections/Collection.php:1227
  1223▕
  1224▕                 $result = 0;
  1225▕
  1226▕                 if (is_callable($prop)) {
➜ 1227▕                     $result = $prop($a, $b);
  1228▕                 } else {
  1229▕                     $values = [data_get($a, $prop), data_get($b, $prop)];
  1230▕
  1231▕                     if (! $ascending) {

    +1 vendor frames
2   [internal]:0
    Illuminate\Support\Collection::Illuminate\Support\{closure}(["Taylor Otwell"], ["Abigail Otwell"])

    +2 vendor frames
5   tests/Feature/TmpTest.php:133
    Illuminate\Support\Collection::sortBy()

Steps To Reproduce:

Instantiate a collection with multiple elements. (The value of collection can be any array.)
sort it by function sortBy with the string sort

$sorted = (new Collection([1, 2]))
	->sortBy([
		['sort', 'asc'],
	]);

I also tried with latest Laravel version (v8.77.1), and the same error is thrown.

Reproduced and this seems to give a clue as to what is happening...
  sort(): Argument #1 ($array) must be of type array, int given

  at vendor/laravel/framework/src/Illuminate/Collections/Collection.php:1310
    1306▕
    1307▕                 $result = 0;
    1308▕
    1309▕                 if (is_callable($prop)) {
  ➜ 1310▕                     $result = $prop($a, $b);
    1311▕                 } else {
    1312▕                     $values = [data_get($a, $prop), data_get($b, $prop)];
    1313▕
    1314▕                     if (! $ascending) {

It's going into this branch because sort() is a built-in function and thus callable. So it's trying to call sort(1, 2) (assuming 1 and 2 are the elements in the array, like in your example.)
What do you think would be the desired behavior in this case @louis222220 ? I can give this a shot.

Wait, I wonder if it could be fixed by checking if it's a string first? So that if you pass in a user-defined function, it will work, but a string will be treated as a key. That is, what if we changed that conditional to: if (!is_string($prop) && is_callable($prop)) { ... }

@cheryllium
Thank you for the reply.
Following is an example modified from Laravel Docs - Collections to show my expected behavior.
I would like to sort an array with a column named sort and one other column.
And then I found this problem with sortBy function.
$collection = collect([
    ['name' => 'Taylor Otwell', 'sort' => 34],
    ['name' => 'Abigail Otwell', 'sort' => 30],
    ['name' => 'Taylor Otwell', 'sort' => 36],
    ['name' => 'Abigail Otwell', 'sort' => 32],
]);

$sorted = $collection->sortBy([
    ['name', 'asc'],
    ['sort', 'desc'],
]);

$sorted->values()->all();

/*
    [
        ['name' => 'Abigail Otwell', 'sort' => 32],
        ['name' => 'Abigail Otwell', 'sort' => 30],
        ['name' => 'Taylor Otwell', 'sort' => 36],
        ['name' => 'Taylor Otwell', 'sort' => 34],
    ]
*/

The related PR was merged. Thanks


Avoid android specific code for TrustRootIndex

Split out Android TrustRootIndex into AndroidPlatform only code, avoid executing on other platforms

Relates to https://github.com/square/okhttp/issues/3426

Love this. Thanks!


[Candidate 2v2 Bricks 2v2 ZH v1] Terrain under Command Center is not flat

Issue Description
Terrain under Command Center is not flat.
Expected behavior
Terrain under Command Center is flat.
Screenshots

Fixed.
Bricks 2v2 ZH v1.zip

Fixed with https://github.com/xezon/GeneralsRankedMaps/commit/46f13a6b2d6ad92413ff1834bcbdd188ac518601


Please get tests going, and nightly tests

For these add-ons to be successful, some decent automated tests (and run nightly) are critical. Please enable them and make sure the tests are good.

Hello,
There are tests. Both for stable, and Edge and HEAD.
I'm running stable on my custom runner which always has a stable version of ddev for my other projects, and HEAD and edge tests on the github runners.
Stable is run on my runner because it's much much faster than github runners
Feel free to check out the workflows.

No, for stable I'm using a custom runner maintained by me. It's always on latest stable DDEV version.
It saves a lot of time during testing. Entire test suite is complete in 1m (compared to 5m+ for github runners).
For bleeding Edge DDEV, I'm using github hosted runners.
In any case, the tests are there - and addon works.

The problem with local runners is the maintenance factor. I know because we have to use buildkite local runners with DDEV for macOS and Windows + WSL2. And I'm the one who has to reboot them when they fail. And there's the visibility factor - nobody else can contribute. That's where Github Actions (or CircleCI, etc.) shine: They're maintainable by a team, and their results are visible and repeatable.

In any case, the tests are there - and addon works.

The idea of open source and Ci is not just that "it works", but rather than a team or organization can verify that it works and be confident that it will work in 1 year or 5 years.

Well, it's your add-on and can be done any way you want until the point you want to promote it to an official add-on.
But yes, online runners mean more visibility and a wider community being able to maintain and improve it.

I note that the tests are failing consistently. Could you please get them working?
I recommend not using the :latest tag for minio/minio, because things can change underneath you.

You can close this issue. It seems to have been a problem with my local setup. I did a bunch of cleanup (removed ~/.lima, ~/.colima, and ~/.ddev) and got it working.

No, this issue can't be closed. The tests are failing every night.

Tests reworked and fully operational

Thanks!


[FEATURE] Configurable Node/Disk Priority/Weights

The use-case here-
I am currently running a cluster with 6 nodes.
Two, of these nodes (Kube03, Kube04), have 10GBe, and are tainted, to only allow storage pods.
Two more of these nodes(Kube05, Kube06), only have 1GBe, and are mostly compute oriented. These nodes, are running on optiplex micros, which are quite efficient.

My ask here-
It would be very nice, if I had the ability to "weight" a node for replica selection.
In this scenario- I would prefer all of my replicas goto kube03, and kube04, since the only purpose of these nodes its storage, and, they have fast networking.
Likewise, it would be ideal to deprioritize kube05/kube06, due to their slow networking, so that only the "running copy" of a volume is stored here, assuming space exists elsewhere too.

Have you considered creating multiple Longhorn StorageClasses for each scenario that includes storage tags?

Wouldn't resolve this particular issue.
Using tags to say, separate "fast nodes", from "slow nodes", would end up in a situation where only data is stored on the fast nodes, and wouldn't allow a local replica to exist if the compute was running on a "slow node"
Ideally, it would be nice to be able to "weight" the priority of each node, so that, the nodes with fast connectivity, and tons of storage are preferred over less fortunate nodes.


API - getAllPages

getAllPages
A JSON object, having URL strings as keys and the following attributes.

We still have to think about how we handle sub-pages, e.g. /blog/article

html
HTML file location.
name
The name of the used template.
example
let pageData = {
  '/page1': {
    html: 'build/page1.html',
    name: 'default'
  },
  '/page2': {
    html: 'build/page2.html',
    name: 'default'
  }
};

Was done in 7735e752f8de97fa29400e115ab50d64d3eeb081.


Music Library/database

I'm investigating AmplitudeJS for a particular application - I wanted to be able to allow the user choose albums/tracks from his large music database (stored locally on PC or LAN) & dynamically load these into AmplitudeJS JSON playlist. In other words to be able to add tracks to this playlist on an ongoing basis from his main music library database
I can't see examples of this usage - can you direct me to some knowledge base on this?

@oscar4 This is now available in 4.1. You can now run Amplitude.addSongToPlaylist( songObject, playlist ) and add any song you need to a playlist. Check out the docs here: https://521dimensions.com/open-source/amplitudejs/docs/functions/index.html#add-song-to-playlist


Double quote PATH declaration in win32.bat

Failing to do so can introduce problems when some of the directories in
include spaces in their paths, eventually manifesting themselves as
weird "is not recognized as an internal or external command,
operable program or batch file" errors.
See: https://github.com/resin-io/etcher/issues/1025
Signed-off-by: Juan Cruz Viotti<EMAIL_ADDRESS>

It's not the spaces in the path that's the problem, but having an & in the path - that's why this only showed up for MySQL (which adds C:\Program Files (x86)\MySQL\MySQL Fabric 1.5.4 & MySQL Utilities 1.5.4 1.5 to the %PATH%) and not other paths / programs.


accept4 is not defined in libc for android

In libc 0.2.87 there's no accept4 in unix/linux_like/android/mod.rs.
It is defined in unix/linux_like/linux/mod.rs, but this module is not loaded on android

This is a regression in libc, not Mio. See https://github.com/rust-lang/libc/issues/2101.

For a quick fix add the following to your Cargo.toml:
[dependencies]
libc = "=0.2.86" # Note the `=` here.

@Thomasdezeeuw I had to add libc to fix my build as the dependency to libc without = is defined in https://github.com/tokio-rs/mio/blob/master/Cargo.toml#L49


CLI commands in the Tutorials are not displaying properly

The Argo CLI commands in the Tutorials are not displaying properly after last "build-publish" of the Argo site. For example, in Tutorial 1, the markdown from argo_tutorial_1_create_ci_workflow.md looks like this:
Run the CI workflow:
$ argo job submit example-workflow-approval --argument "parameters.REQUIRED_APPROVALS=<your_email_address>" --repo https://github.com/argoproj/ci-workflow.git
Get the job ID of the running job:
$ argo job list
Get the status of a job:
$ argo job show <job_ID>
However, if you look at the attached screenshot, the code snippet shows a fragment from Tutorial 2 (Docker-in-Docker example.)

All 7 of the tutorials are displaying the same issue.

I think that Markdown has wrong syntax.
If you want make code block you need to add new line after starting marks and before ending marks. For example:

```
asdasd
```

Fixed the Markdown syntax. Had to add new lines both before the starting the marks and also after the ending marks.


Adds keyserver fallbacks

Closes https://github.com/docker-library/python/issues/334
Ref https://github.com/nodejs/docker-node/issues/380
Ref https://github.com/nodejs/docker-node/blob/526c6e618300bdda0da4b3159df682cae83e14aa/Dockerfile-alpine.template#L23-L25
Ref https://gitlab.com/meltano/meltano/issues/90

See https://github.com/docker-library/official-images/issues/4252#issuecomment-405749749.

Ah I missed that. Thanks for the info. I'll adjust accordingly


Make tutorials visible again after merge conflicts

This got lost after fixing the merge conflicts for last PR

bors ping

bors r+

bors r-

bors r+

Fixing conflict rolled back CI workflow name changes
bors r-

One more time
bors r+

bors didn't start a required test
bors r-

bors r+

bors r+

Rust client example is failing since the recent update. Need to fix.
bors r-

bors r+

bors r+


Pagination or infinite scroll

Once the number of extensions is larger, we should do some form of pagination or a fetch-for-infinite scroll.
Pagination is simple: https://www.gatsbyjs.com/docs/adding-pagination/
Infinite scroll might be a better user experience, but is harder to implement. https://www.reddit.com/r/gatsbyjs/comments/nz49vw/how_to_implement_infinite_scroll_with_gatsbyjs/ also points out we will need to be aware of SEO issues. https://www.erichowey.dev/writing/load-more-button-and-infinite-scroll-in-gatsby/ has a tutorial on implementing infinite scroll.

With 600 extensions in it, quarkus.io/extensions is getting a bit slow to load. This is becoming more pressing.


ADOPT optimizer integration

Description
Modification to incorporate ADOPT optimizer
Motivation and Context

How has this been tested?
Ran it on tinyllama, works so far.
Screenshots (if appropriate)
Types of changes

Social Handles (Optional)

@bursteratom I think we need to wrap the test case in a decorator that requires torch 2.5.1

just added that and it passed the e2e


plugins/helpers/writer.py", line 643, in del ValueError: ExcelWriter destructor, Dear coder, you forgot to close file.

I was trying recover auto-sync-deleted iCloud notes from my MacBook Pro(Mojave).
Follow the tutorial to install on my mac:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
sudo chown -R $(whoami) /usr/local/bin /usr/local/lib /usr/local/sbin
chmod u+w /usr/local/bin /usr/local/lib /usr/local/sbin
brew install python3 git
sudo pip3 install --upgrade virtualenv
git clone --recursive https://github.com/ydkhatri/pylzfse
cd pylzfse
python setup.py build
python setup.py install
pip3 install pytsk3==20170802 libvmdk-python==20181227
tar xfz ./libewf-20140808.tar.gz
cd libewf-20140808
python setup.py build
python setup.py install
pip install biplist construct==2.9.45 xlsxwriter plistutils kaitaistruct lz4 pycryptodome cryptography pybindgen==0.21.0 pillow
cd ..
sudo pip3 install pyaff4-0.31-yk.zip
git clone https://github.com/libyal/libewf-legacy/
cd libewf-20140808
python3 setup.py build
sudo python3 setup.py install
cd
cd mac_apt/
source env/bin/activate
(env) jianw-mbp:mac_apt jianw$ cp /Users/jianw/Library/Group\ Containers/group.com.apple.notes/NoteStore.sqlite ~/Desktop/
(env) jianw-mbp:mac_apt jianw$  python ./mac_apt.py  -x  -o output E01  /Users/jianw/Desktop/NoteStore.sqlite   NOTES -l DEBUG
Output path was : /Users/jianw/mac_apt/output
MAIN-INFO-Started macOS Artifact Parsing Tool, version 0.6
MAIN-INFO-Dates and times are in UTC unless the specific artifact being parsed saves it as local time!
MAIN-DEBUG-./mac_apt.py -x -o output E01 /Users/jianw/Desktop/NoteStore.sqlite NOTES -l DEBUG
MAIN-INFO-Pytsk version  = 20170801
MAIN-INFO-Pyewf version  = 20140808
MAIN-INFO-Pyvmdk version = 20181227
MAIN-INFO-PyAFF4 version = 0.31
MAIN-ERROR-Failed to load image. Error Details are: pyewf_glob: unable to glob filenames. libewf_glob: invalid filename - missing extension.
Exception ignored in: <function SqliteWriter.del at 0x105a95f80>
Traceback (most recent call last):
File "/Users/jianw/mac_apt/plugins/helpers/writer.py", line 402, in del
ValueError: SqliteWriter destructor, Dear coder, you forgot to close db.
Exception ignored in: <function ExcelWriter.del at 0x105a98b00>
Traceback (most recent call last):
File "/Users/jianw/mac_apt/plugins/helpers/writer.py", line 643, in del
ValueError: ExcelWriter destructor, Dear coder, you forgot to close file.
(env) jianw-mbp:mac_apt jianw$  ls -lrt ./output
total 8
drwxr-xr-x  3 jianw  staff   96 Jun  1 20:06 Export
-rw-r--r--  1 jianw  staff    0 Jun  1 20:06 mac_apt.db
-rw-r--r--  1 jianw  staff  697 Jun  1 20:06 Log.20200601-200610.txt
I rename the sqlite file to txt in order to upload.
NoteStore.sqlite.txt

Tried using direct query  as from : https://www.swiftforensics.com/2018/02/reading-notes-database-on-macos.html
Empty output as well.
Any help would be really appreciated!
(env) jianw-mbp:Desktop jianw$ sqlite3  ./NoteStore.sqlite
SQLite version 3.24.0 2018-06-04 14:10:15
Enter ".help" for usage hints.
sqlite> list
...> help
...>
...> SELECT n.Z_PK, n.ZNOTE as note_id, n.ZDATA as data,c3.ZFILESIZE,c4.ZFILENAME, c4.ZIDENTIFIER as att_uuid,c1.ZTITLE1 as title, c1.ZSNIPPET as snippet, c1.ZIDENTIFIER as noteID,datetime(c1.ZCREATIONDATE1, 'unixepoch') as created, datetime(c1.ZLASTVIEWEDMODIFICATIONDATE, 'unixepoch'), datetime(c1.ZMODIFICATIONDATE1, 'unixepoch') as modified,c2.ZACCOUNT3, c2.ZTITLE2 as folderName, c2.ZIDENTIFIER as folderID,c5.ZNAME as acc_name, c5.ZIDENTIFIER as acc_identifier, c5.ZACCOUNTTYPEFROM ZICNOTEDATA as nLEFT JOIN ZICCLOUDSYNCINGOBJECT as c1 ON c1.ZNOTEDATA = n.Z_PKLEFT JOIN ZICCLOUDSYNCINGOBJECT as c2 ON c2.Z_PK = c1.ZFOLDERLEFT JOIN ZICCLOUDSYNCINGOBJECT as c3 ON c3.ZNOTE= n.ZNOTELEFT JOIN ZICCLOUDSYNCINGOBJECT as c4 ON c4.ZATTACHMENT1= c3.Z_PKLEFT JOIN ZICCLOUDSYNCINGOBJECT as c5 ON c5.Z_PK = c1.ZACCOUNT2ORDER BY note_id
...>
...>

OK, thanks for sharing the database. I will take a look and let you know.
Also, you are using the wrong script. mac_apt.py is for full disk images. You want to use mac_apt_artifact_only.py to process single artifact files. You would run it as below:
python ./mac_apt_artifact_only.py -x -o output -l DEBUG -i /Users/jianw/Desktop/NoteStore.sqlite NOTES

So, with the command above, I was able to run and extract 8 notes from it. However, the database does not have any notes with content in them.

So, with the command above, I was able to run and extract 8 notes from it. However, the database does not have any notes with content in them.

Thank you so much for your prompt help.
I guess 8 notes is my offline notes which I stored locally. I had ~100 notes before wiped out.
Do you think
/Users/jianw/Library/Containers/com.apple.Notes/Data/Library/Notes/NotesV7.storedata
would make any difference?
https://drive.google.com/drive/folders/1mCL2snbCRizHF1fLaW1zsGGwsnL4W5Bv?usp=sharing
Seems I still have trouble running your suggested command.
(env) jianw-mbp:mac_apt jianw$ python ./mac_apt_artifact_only.py -x -o output -l DEBUG -i /Users/jianw/Desktop/NoteStore.sqlite NOTES
usage: mac_apt_artifact_only.py [-h] [-i INPUT_PATH [INPUT_PATH ...]]
[-o OUTPUT_PATH] [-x] [-c] [-l LOG_LEVEL]
[--plugin_help]
plugin
mac_apt_artifact_only.py: error: the following arguments are required: plugin

This one is empty. Were there any files with the same name but ending in -wal or -journal in the same folder? If so, the data you are looking for may be there.
I fixed my command in above comment. Here it is again. The script needs -i and -o parameters first.
python ./mac_apt_artifact_only.py -i /Users/jianw/Desktop/NoteStore.sqlite -o output -x -l DEBUG  NOTES

Thanks a lot for your time. That is very helpful.
The command line really worked for my NoteStore.sqlite, although it seems still not work for NoteStore.sqlite-wal  file.
(env) jianw-mbp:mac_apt jianw$ python ./mac_apt_artifact_only.py -i /Users/jianw/Downloads/NoteStore.sqlite-wal    -o output2 -x -l DEBUG  NOTES
Output path was : output2
MAIN-INFO-Started macOS Artifact Parsing Tool - Artifact Only mode, version 0.6
MAIN-INFO-Dates and times are in UTC unless the specific artifact being parsed saves it as local time!
MAIN-DEBUG-./mac_apt_artifact_only.py -i /Users/jianw/Downloads/NoteStore.sqlite-wal -o output2 -x -l DEBUG NOTES
MAIN-DEBUG-Trying to create db @ output2/mac_apt.db
MAIN-DEBUG-Trying to create xlsx file @ output2/mac_apt.xlsx
MAIN-INFO---------------------------------------------------
MAIN-INFO-Running plugin NOTES
MAIN-INFO---------------------------------------------------
MAIN.NOTES-INFO-Module Started as standalone
MAIN.NOTES-DEBUG-Input file passed was: /Users/jianw/Downloads/NoteStore.sqlite-wal
MAIN.NOTES-INFO-Processing file /Users/jianw/Downloads/NoteStore.sqlite-wal
MAIN.NOTES-DEBUG-Opened database successfully
MAIN.NOTES-ERROR-Failed to list tables of db. Error Details:file is not a database
MAIN.NOTES-ERROR-Query  execution failed. Query was:  SELECT n.Z_PK, n.ZNOTE as note_id, n.ZDATA as data,  c3.ZFILESIZE,  c4.ZFILENAME, c4.ZIDENTIFIER as att_uuid,   c1.ZTITLE1 as title, c1.ZSNIPPET as snippet, c1.ZIDENTIFIER as noteID,  c1.ZCREATIONDATE1 as created, c1.ZLASTVIEWEDMODIFICATIONDATE, c1.ZMODIFICATIONDATE1 as modified,  c2.ZACCOUNT3, c2.ZTITLE2 as folderName, c2.ZIDENTIFIER as folderID,  c5.ZNAME as acc_name, c5.ZIDENTIFIER as acc_identifier, c5.ZACCOUNTTYPE  FROM ZICNOTEDATA as n  LEFT JOIN ZICCLOUDSYNCINGOBJECT as c1 ON c1.ZNOTEDATA = n.Z_PK   LEFT JOIN ZICCLOUDSYNCINGOBJECT as c2 ON c2.Z_PK = c1.ZFOLDER  LEFT JOIN ZICCLOUDSYNCINGOBJECT as c3 ON c3.ZNOTE= n.ZNOTE  LEFT JOIN ZICCLOUDSYNCINGOBJECT as c4 ON c4.ZATTACHMENT1= c3.Z_PK  LEFT JOIN ZICCLOUDSYNCINGOBJECT as c5 ON c5.Z_PK = c1.ZACCOUNT2   ORDER BY note_id
Traceback (most recent call last):
File "/Users/jianw/mac_apt/plugins/notes.py", line 209, in ReadNotesHighSierra
cursor = db.execute(query)
sqlite3.DatabaseError: file is not a database
MAIN.NOTES-INFO-No notes found in /Users/jianw/Downloads/NoteStore.sqlite-wal
MAIN-INFO---------------------------------------------------
MAIN-INFO-Finished in time = 00:00:00
MAIN-INFO-Review the Log file and report any ERRORs or EXCEPTIONS to the developers

The -wal file is processed automatically when it is in the same folder as the main database. You cannot process it separately. Just put main database and its -wal file in the same folder, then process the main database with mac_apt.

Closing for a lack of response!


App icon proposal

I've come up with a new idea for the app icon. If you mind losing the original one with this pull request, here's a ZIP with all the new assets (PNG + ICNS + Iconset).

Hi @Zabriskije,
I appreciate your fantastic work. The app icon is exquisite with a neomorphic style. To be honest, I love your design.
I always consider exchanging a new icon for OnlySwitch, but I don't have good design skills. Though my current icon does look not good, I believe that it already built certain users' cognition. Thus, I expect there are some connections between old and new designs, which help easily transition to new visual cognition. I don't expect to see a situation where users say where OnlySwitch is when they update to the new icon.
So, shall we find a compromise plan? To have a better design and keep the users' visual cognition for OnlySwitch.
Thank you again!

Thanks for the compliments <3
The one below was my first design, and the one that most resembles the current icon:

I've tried first using the current gradient but it limited the slider's internal colors, so I opted for a dark blue instead.
Although I understand the icon recognition issue, I think we can get away with the pull request icon since the app is used via the menu bar, doesn't get closed, and launches itself at startup. If the normal user path for using the app would be via Launcher or the Apps folder I could see this as a more substantial issue – but that's obviously up to you :)

Thanks for the reply!
From a regular usage perspective, maybe you are right. But I also consider other things such as promotion.
The first design looks like OneSwitch's icon. I think the name OnlySwitch already made many users confused. Basically, I like your white blue design. The current purple blue gradient was inspired by the theme color of Big Sur, but it has been out of date. My idea is that we can keep the two toggles design with neomorphic style and use white blue as the theme color. It would be better. Do you think so?
Actually, I am considering changing the separating icon( ·|· ) on the menu bar as well. If you have a good idea, feel free to share it to me.
Thank you

Something like this?

For the separating icon: I like minimal stuff, so I would go for a small filled circle when items are hidden and an outlined one when shown ● ○

Something like this?

For the separating icon: I like minimal stuff, so I would go for a small filled circle when items are hidden and an outlined one when shown ● ○

Nice job, man! I prefer the first design. If the toggles can have the outer shadow as same as the second one, I think it would be better. But it's up to you, you already finished the elegant work. Please update the pull request if could.
Regarding the separating icon, I think your idea is good. I will try to update it in the next version.
I know sometimes the iterative discussions about design are annoying and your initial pull request is indeed awesome, but as a product, I have to consider kinds of factors. Thank you so much again for your contribution.

Hot take: iterative design discussions = bug fixes 🤓
I'm always happy to receive feedback, and you made a valid point, so it's all good.
Again, thanks for the kind words, and let me know if you're happy with the result.


Update THANKS file

Hi @manifest
I'd like to add you to the THANKS file - ok for you? :)

Sure. It would be an honor :-)

hehe, we're super happy for the feedback and the contributions! and please keep it coming - the MQTTv5 support is still new and some things are still not exactly where they should be, but we're working on the polish, but really feedback from actual users is just the best! So thanks!


Marlowe-pab improvements

Pre-submit checklist:

Branch

[ ] Commit sequence broadly makes sense
[ ] Key commits have useful messages
[ ] Relevant tickets are mentioned in commit messages
[ ] Formatting, materialized Nix files, PNG optimization, etc. are updated

PR

[ ] Self-reviewed the diff
[ ] Useful pull request description
[ ] Reviewer requested

Pre-merge checklist:

[ ] Someone approved it
[ ] Commits have useful messages
[ ] Review clarifications made it into the code
[ ] History is moderately tidy; or going to squash-merge

Going to merge this into the scp-2264-constant-space branch


[DOC]Fix tidytuesday 20190430

PR Description
Please describe the changes proposed in the pull request:

Clean up TidyTuesday 2019-04-30 as per #327
Show original dataframe previews in cell output
Show resulting dataframe previews in cell output

This PR resolves #327.

PR Checklist

Please ensure that you have done the following:

[X] PR in from a fork off your branch. Do not PR from <your_username>:master, but rather from <your_username>:<branch_name>.

[X] If you're not on the contributors list, add yourself to AUTHORS.rst.

Quick Check
To do a very quick check that everything is correct, follow these steps below:

[X] Run the command make check from pyjanitor's top-level directory. This will automatically run:

black formatting
pycodestyle checking
running the test suite
docs build

Once done, please check off the check-box above.
If make check does not work for you, you can execute the commands listed in the Makefile individually.
Documentation Changes

If you are adding documentation changes, please ensure the following:

[X] Build the docs locally.
[X] View the docs to check that it renders correctly.

Relevant Reviewers

Please tag maintainers to review.

@ericmjl

@jk3587 this is great! Thank you for making the notebook look good!


Add Project Portfolio Page

To be done by next tutorial (3 Mar 2023)
Create a skeletal version of your Project Portfolio Page (PPP).
Just the headings are enough. You can write to be added soon as placeholders for content.
PDF conversion not required.
Objectives

For you to use (e.g. in your resume) as a well-documented data point of your SE experience
For evaluators to use as a data point for evaluating your project contributions

PPP Sections to include
Overview: A short overview of your product to provide some context to the reader. The opening 1-2 sentences may be reused by all team members. If your product overview extends beyond 1-2 sentences, the remainder should be written by yourself.
Summary of Contributions --Suggested items to include:

Code contributed: Give a link to your code on [tP Code Dashboard]

Enhancements implemented: A summary of the enhancements you implemented.

Contributions to the UG: Which sections did you contribute to the UG?

Contributions to the DG: Which sections did you contribute to the DG? Which UML diagrams did you add/updated?

Contributions to team-based tasks

Review/mentoring contributions: Links to PRs reviewed, instances of helping team members in other ways.

Contributions beyond the project team:

Evidence of helping others e.g. responses you posted in our forum, bugs you reported in other team's products
Evidence of technical leadership e.g. sharing useful information in the forum

All PPP added by @NappySprout


In RouteInfoManager.getSystemTopicList() method, topicList add cluster name and broker name incorrectly

BUG REPORT

Please describe the issue you observed:
In RouteInfoManager.getSystemTopicList() method, topicList add cluster name and broker name incorrectly.

What did you do (The steps to reproduce)?
I ran the unit test and found the topicList add the cluster name and broker name instead of the topic name.

What did you expect to see?
topicList add the topic name

What did you see instead?
topicList add cluster name and broke name

Please tell us about your environment:
Ubuntu 18.04 LTS
Java 1.8.0_181
RocketMQ 4.3.1

BTW, @vongosling first found this bug, thanks.

I think my understanding of systemTopicList is incorrect.
At the beginning, I thought that getSystemTopicList means getting all the topic names, then I read the code carefully yesterday and found RouteInfoManager.getAllTopicList() has done this. I traced the call chain of getSystemToplicList and found MQClientAPIImpl.getSystemTopicList() is the last method called, so RouteManagerInfo.getSystemTopicList() never be called? ? ?
At the same time, I found some systemTopic will be added in rocketmq.broker.topic.TopicConfigManager#TopicConfigManager() when the BrokerController is initialized, including the broker name and cluster name. So systemTopicList should include broker name and cluster name. The original code is correct.


feat: display info message if app is not deployed

Currently blocked by https://github.com/dokku/dokku/issues/4134

We can now continue with this one https://github.com/dokku/dokku/issues/4134#issuecomment-731845451.
The best would be:

when we sync, check if the app is deployed
save it in the db as a boolean flag
on the page along with the message add a button to update the app status

This should be unblocked. Also, exit codes are now slightly different (or should be) if an app does not exist. See https://dokku.github.io/release/dokku-0.24.0 for details, but basically if you get an exit code of 20, that means the app does not exist. Might save on ssh commands :)


Reimplement creation of default charge links - now orchestrated by metering point domain

Synopsis
Currently, the assumption was to listen to the loosely typed contract for metering point created event and then create charge links for the metering point. However, architects has decided to go with orchestration and it has now become the responsibility of the metering point domain to explicitly request when the charges domain must create the default charge links and when default charge link message are to be made available for the PostOffice.
Tech Notes
With the rise of the request-reply pattern we need to refactor our default charge link related event to be handled as requests and replies as shown below:

For further details about this, please see this PR
Following assumptions stems from a talk between @kft, @Sondergaard  and @BjarkeMeier:

Volt defines the contracts - done by 587, see this.
Communication uses request-reply (async) semantics
Transport uses queues
Volt provides functionality by means of NuGet packages

Team assumptions

logging according to ADR-008 is out of scope atm.

Acceptance-Criteria
AC 1:
Given the metering point domain
And a metering point is known in the charges domain from integration events
When the metering point domain requests the charges domain to link charges to the metering point
Then the charges domain links charges from default charges (if any applies to the metering point type in question)
And replies to the metering point domain (regardless if any charge links were created)
AC 2:
Given a developer that want to create default charge links
When he search nuget.org for a package
Then a package is presented in the search result
AC 3:
Given a developer that is using the package
When he integrates the package into his solution
Then he does not see the underlying technology except for when configuring the client.
Tasklist V2

[ ]   implement "Reply" functionality in Charges after a CreateDefaultChargeLinkMessagesRequestAsync is recieved (stub implementation)
[x]   Write integrationtest for CreateDefaultLinksRequest (https://github.com/Energinet-DataHub/green-force-art/tree/33d2b40bf32d764cade9cc8e8771d4deb31a3640/tools/green-force/intra-domain-test-squadron/Samples.Tests)
[ ]   Write integrationtest for CreateDefaultLinkMessagesRequest - only for replies, request is done.

Unresolved Tasklist -> moved to dev session board

[x]   Replace should_skip with has_changes in all workflows within the Charges domain @BjarkeMeier? Dev board topic
[x]   Is CreateLinkCommandEvent a command or an event? Dev session topic

Move to seperate stories

[x]   Write integration tests for Charges when using the package. #772
[x]   Write initial documentation and release notes for the Nuget package @HenrikSommer #773

Tasklist Historic

[X]   Remove topic sbt-create-link-command and subscription sbs-create-link-command-charges from Charges
[X]  Create queue create-link-request in Charges "Shared"
[X]  Create queue create-link-reply in Charges "Shared"
[X]  Create queue create-link-request in Shared
[X]  Create queue create-link-reply in Shared
[X]   Create NuGet package with CreateDefaultChargeLinkRequestAsync(string meteringpointId) @lasrinnil
[X]   Create in NuGet package CreateDefaultChargeLinkReplyAsync(string respondQueue)
[x]   implement "Reply" functionality in Charges after a CreateDefaultChargeLinkRequestAsync is recieved

[x]   Refactor the event to contain a list of commands to ensure bundling is handled (needs team approvel in dev session) @lasrinnil

[X]   implement Read(byte[] message) in Nuget package (delegate solution requested) @HenrikSommer
[X]   Create queue create-link-messages-request in Charges "Shared"
[X]   Create queue create-link-messages-reply in Charges "Shared"
[X]   Create queue create-link-messages-request in Shared
[X]   Create queue create-link-messages-reply in Shared
[X]   Implement CreateDefaultChargeLinkMessagesRequestAsync in Nuget package
[X]   Setup a pipeline able to build / test / build nuget package, and upload to nuget.org (there is excisting examples in our hackathon repo) - ensure package version is bumped witch checking the version number is not occupied on nuget ((NUGET_TOKEN))
[X]   Unit test CreateDefaultChargeLinkRequestAsync() functionality
[X]   Unit test Read(byte[] message) functionality
[X]   Unit test CreateDefaultChargeLinkMessagesRequestAsync() functionality
[x]   implement Read(byte[] message) in Nuget package for Messages reply
[x]   Unit test Read(byte[] message) for Messages reply functionality
[x]   Re-visit Proto documentation (.proto files have moved into NuGet-package)
[x]   According to ART decision the NuGet package must support Service Bus queue name overriding with the purpose of enabling system tests
- [ ]   Consider moving DefaultChargeLinkReplyReaderBase, DefaultChargeLinkMessagesReplyReaderBase and other parts to separate projects
[x]   Use Protobuf oneof to differentiate between succeeded and failed reply

To whoever tests this ticket, ping me so I can give you a quick introduction on how to use the NuGet package to request Charges to create default charge links.

Tested by sending a message using the nuget package for metering point<PHONE_NUMBER>25497398
The message flowed through Charges domain as expected and was received by Metering Point domain


Where is the permission "com.sec.android.fido.uaf.asm.permissions.FIDO_UAF_ASM"?

I notice that in AndroidManifest.xml, a permission "com.sec.android.fido.uaf.asm.permissions.FIDO_UAF_ASM" is claimed. I googled this permission, it seems that this is a permission defined by Samsum?
So the android part in the repository must be installed in Samsum device that support FIDO, like Galaxy S6?

Thanks for your input. It is a good point. I have unnecessary permission removed:
https://github.com/eBay/UAF/commit/cd0780a55e0bec2e6557bd9cb0344d2c60638d54
Regards,
Neb.

Closing the issue.


[Feature request] Extend android.media.Image extensions to fill YUV_420 buffers out of Bitmap

Hi,
I am trying to mock Camera API in order to run my tests in CI. The idea is to create an alternative producer of YUV frames instead of Camera hardware.
I would like to have this alternative based on android.media.ImageWriter so it could produce YUV frames converted from predefined jpeg/png/bitmap etc. Something like:
suspend fun startFrameProducer(target: Surface) {
   val testImageBitmap = BitmapFactory.decodeBitmap(testFile)
   val imageWriter = ImageWriter.newInstance(target, 1)
   val imageFrame = imageWriter.dequeueInputImage()
   imageFrame.fillYUVBuffers(testImageBitmap) // TODO: This is something I am missing
   imageWriter.queueInputImage(imageFrame)
}

Can you help how to use existing API of this library in order to fill buffers correctly with YUV420 pixel format?

I think it can be done as follows.

Create a Buffer using Bitmap#copyPixelsToBuffer or Bitmap#getPixels
Implement android.media.Image.Plane.
Implement android.media.Image.

I don't think this is within the scope of this library.

Thank you for such a quick response.
This is exactly the domain (constructing planes: y,u,v values) I have limited knowledge and I would love to have some reliable third-party solution which could help me with this.
For some reason most of the samples show how to convert YUV Image into RGBA Bitmap, but there is none for the other way around.
I would appreciate it if you could guide me how the RGBA buffer from Bitmap could be split into planes with correct values.

If you want to get Y/U/V buffers from a Bitmap, you can use the following code (1920=width, 1080=height)
  val bitmap = Bitmap.createBitmap(1920, 1080, Bitmap.Config.ARGB_8888)

  val argbBuffer = AbgrBuffer.allocate(1920, 1080)
  bitmap.copyPixelsToBuffer(argbBuffer.asBuffer())
  val yuvBuffer = I420Buffer.allocate(1920, 1080)
  argbBuffer.convertTo(yuvBuffer)

  // Y/U/V ByteBuffers.
  // yuvBuffer.planeY.buffer
  // yuvBuffer.planeU.buffer
  // yuvBuffer.planeV.buffer

Just found some time to come up with the sample app based on your recommendation. It works on emulator (both archs M1 arm64 and Intel Macbook x86) but unfortunately the result on physical devices is inconsistent:
Source image (taken from https://en.wikipedia.org/wiki/File:Andrew_Hink_selfie.jpeg)

Original
Emulator
Pixel 5 (Android 12)

The sample app project can be found here: https://github.com/adjorno/Bitmap2YUV
Can it be some inconsistency in the native library?

Since Android 420 is NV21, it is possible to convert from a Bitmap image by converting Image to NV21Buffer.
Image rowStribe and width are not equal, so size of data per row is different between Image and I420Buffer, resulting in image misalignment.
If Buffer is created from Image, rowStribe of Image is used.
    private fun prepareImage(width: Int, height: Int): ArgbBuffer {
        return argbBuffer ?: run {
//                bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888).apply {
//                    eraseColor(Color.BLUE)
//                }
            bitmap = BitmapFactory.decodeStream(assets.open("selfie.jpeg")).scale(width, height)
            ArgbBuffer.allocate(width, height).also {
                bitmap?.copyPixelsToBuffer(it.asBuffer())
                argbBuffer = it
            }
        }
    }

    private fun startRendering() {
        imageWriter?.let { imageWriter ->
            running = true
            lifecycleScope.launch(Dispatchers.IO) {
                while (running) {
                    delay(1000)
                    val image = imageWriter.dequeueInputImage()
                    val buffer = prepareImage(image.width, image.height)
                    buffer.convertTo(image.toNv21Buffer())
                    imageWriter.queueInputImage(image)
                }
            }
        }
    }

Width of TextureView needs to be adjusted to be a multiple of 16.
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        textureView = TextureView(this)
        textureView.layoutParams = FrameLayout.LayoutParams(1088, 1900, Gravity.CENTER)
        textureView.surfaceTextureListener = this
        setContentView(textureView)
    }

    private fun prepareImage(width: Int, height: Int): Nv21Buffer {
        return yuvBuffer ?: run {
            Nv21Buffer.allocate(width, height).also {
                yuvBuffer = it
//                bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888).apply {
//                    eraseColor(Color.BLUE)
//                }
                bitmap = BitmapFactory.decodeStream(assets.open("selfie.jpeg")).scale(width, height)
                val argbBuffer = ArgbBuffer.allocate(width, height)
                bitmap?.copyPixelsToBuffer(argbBuffer.asBuffer())
                argbBuffer.convertTo(it)
            }
        }
    }

    private fun startRendering() {
        imageWriter?.let { imageWriter ->
            running = true
            lifecycleScope.launch(Dispatchers.IO) {
                while (running) {
                    delay(1000)
                    val image = imageWriter.dequeueInputImage()
                    val yuvBuffer = prepareImage(image.width, image.height)
                    val bufferVU = yuvBuffer.planeVU.buffer
                    val capacityVU = bufferVU.limit()
                    val bufferV = bufferVU.let {
                        it.position(0)
                        it.limit(capacityVU - 1)
                        it.slice()
                    }
                    val bufferU = bufferVU.let {
                        it.position(1)
                        it.limit(capacityVU)
                        it.slice()
                    }

                    yuvBuffer.planeY.buffer.position(0)
                    image.planes[0].buffer.put(yuvBuffer.planeY.buffer)
                    image.planes[1].buffer.put(bufferU)
                    image.planes[2].buffer.put(bufferV)
                    imageWriter.queueInputImage(image)
                }
            }
        }
    }

If Buffer is created from Image, rowStribe of Image is used.

This idea indeed improved the situation dramatically. But still not ideal result on a physical device:

Emulator
Pixel 5

    private fun createImageWriter(surface: Surface, width: Int, height: Int) {
        yuvBuffer = I420Buffer.allocate(width, height).apply {
            val abgrBuffer = AbgrBuffer.allocate(width, height).apply {
                BitmapFactory.decodeStream(assets.open("selfie.jpeg")).scale(width, height).copyPixelsToBuffer(asBuffer())
            }
            abgrBuffer.convertTo(this)
        }
        imageWriter = ImageWriter.newInstance(surface, 1, ImageFormat.YUV_420_888)
        startRendering()
    }

    private fun startRendering() {
        imageWriter?.let { imageWriter ->
            yuvBuffer?.let { yuvBuffer ->
                running = true
                lifecycleScope.launch(Dispatchers.IO) {
                    while (running) {
                        delay(1000)
                        val image = imageWriter.dequeueInputImage()
                        yuvBuffer.convertTo(image.toI420Buffer())
                        imageWriter.queueInputImage(image)
                    }
                }
            }
        }
    }

Thank you for support! Your library indeed does the job. There is just something more that I can't get.

           yuvBuffer.convertTo(image.toNv12Buffer())
```
Please try to do this.


feat(repo) Add OpenSSF Scorecard badge to README.md

SUMMARY
Adds OpenSSF Scorecard badge to the README.md that links to the OpenSSF's Scorecard Report for the repo. OpenSSF's Scorecard and GitHub Action has become a
TESTING INSTRUCTIONS
You're able to run the OpenSSF's scorecard tool that analyzes the repo for best practices and detected vulnerabilities.
docker run -e GITHUB_AUTH_TOKEN=<generated_auth_token> gcr.io/openssf/scorecard:stable --repo=https://github.com/apache/superset

Hmm, interesting. It would just need a little dialing in if that can be done. As one example it gives a 0 for "signed releases" because it's looking at the (unofficial) helm charts rather than the official (and signed) releases.

Thanks for the feedback @rusackas, I haven't had the chance to tweak how it looks to the proper helm chart yet. I've only dealt with the listed Vulnerabilities since the "Vulnerabilities" check can be a bit noisy. I'll be sure to ping y'all once this is ready.


Twitter logIn exception

Currently twitter-kit internally use:
retrofit = 'com.squareup.retrofit:retrofit:1.6.1'
okHttp = 'com.squareup.okhttp:okhttp:2.0.0'
okHttpUrlConnection = 'com.squareup.okhttp:okhttp-urlconnection:2.0.0'

and with that setup everything work.
In my project i use:
compile('com.twitter.sdk.android:twitter:1.7.0@aar') {
    transitive = true;
}
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.4.0'
compile 'com.squareup.okhttp:okhttp:2.4.0'

and with this setup i get exception on login:
com.twitter.sdk.android.core.TwitterApiException: method POST must have a request body.
        at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:400)
        at retrofit.RestAdapter$RestHandler.access$100(RestAdapter.java:220)
        at retrofit.RestAdapter$RestHandler$2.obtainResponse(RestAdapter.java:278)
        at retrofit.CallbackRunnable.run(CallbackRunnable.java:42)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
        at retrofit.Platform$Android$2$1.run(Platform.java:142)
        at java.lang.Thread.run(Thread.java:818)

some changes to POST have been made in okhttp 2.3.0 -> 2.4.0 that don't allow POST without request body.

@dvasko Thanks for the note. This is a known issue with okhttp/retrofit. See: https://github.com/square/retrofit/issues/854

@efrohnhoefer
The following issues have been closed.
https://github.com/square/okhttp/issues/751
https://github.com/square/retrofit/issues/854
JakeWharton suggests to add an empty body with @Body String body and pass an empty string as a workaround.
Are you going to add any workaround for this issue?

I believe the issue has been resolved in okhttp 2.5. We will likely be upgrading in the near future.

@efrohnhoefer
I checked okhttp / okhttp-urlconnection 2.5.0 in my project, but still having the same exception.

There's already version 1.11.0 released. Doesn't this issue fixed yet? Are there any workarounds?

TwitterKit was updated to v1.12.1. See changelog for more details.


Feat: Add bidirectional unicode support 🌐

Using the unic_bidi Crate to add bidirectional unicode support.
Before:

After:

Either one of those tools does not handle it that way ... in all of them it shows the "Wrong Way" (vim, bat, less)


Triggering Alarm moves GUI

As of this morning (7/18/2024, about 8:30 AM Central Standard Time) a triggered alarm moves the plugin information in the upper left corner of Rune Lite down to the bottom left corner. Clearing the alarm moves things back, but as soon as the alarm triggers again, the UI components get moved again. This wasn't happening 12 hours ago but just started happening when I logged in this morning.

Alright I'll do this with #41. I didn't think to test plugin interoperability like this when I brought back the AlarmOverlay (with significant changes). Will wait a few days for people to open any other issues they find with the rollback.

+1, my info just disappears entirely

@theswede402 I'm unable to reproduce this, would you be able to share your plugin configuration? Also, are you on Windows?

Sure; plugin details provided here:

I am also using the Stretched Mode setting, with the following settings, but was also using this two days ago before this issue started to happen:

Also been experiencing the same issue since at least around Aug 20, settings attached

I'm surprised that it's happening with the notification overrides' flash and not the plugin's own. I'm still unable to reproduce this. Are you seeing the same bug when the idle notifier activates?

I actually did observe this with idle notifier after testing it but haven't been able to reproduce it consistently. It does seem like it's tied to the notification system I guess.

@theswede402 (or anyone else who experienced this issue) would you be able to verify that it still reproduces? The above PR has merged to the hub which contains a fix for #41, which may have been the root cause of this issue.

There were some insight into this from the above issue, and I was able to repro this with the config provided in that thread. It turns out this issue does have to do with the layer that the plugin is rendered on. The current default of OverlayLayer.ABOVE_SCENE is the same layer that the ping grapher widget is drawn on, so the graph gets pushed out when the alarm overlay is rendered covering the whole screen.
I do prefer the 'above scene' layer because it keeps the inventory and chatbox in its true color, so I'm going to add another config option that allows user control of this behavior which should be a way to resolve this problem


Implement code signing/notarization for renkit on macOS

This will be useful for installation, especially through Homebrew, as they apply quarantine by default.
Probably should also use rcodesign for this to sign things in the release action.

Implement with the release of v3.


Fix for background scrolling

Pull Request Template
Type of Change
Select a category that relates to the content of your pull request (choose all that apply).

[x] Bug Fix
[ ] Content
[ ] New Feature
[ ] Documentation
[ ] Code Refactoring

Summary of Changes
Provide a brief summary of the changes you made and their purpose as they relate to Index UI. If applicable, please link the corresponding issue number.
This was a small change I made to fix the background scrolling issue when the Mobile Menu is open or when the Connect Wallet overlay is on screen.
I tested this on MacOS, Windows, iOS, and Android, and this seemed to resolve the issue.

**Fixes: Issue #620

Submission Reminders
By submitting this pull request, you are confirming the following to be true:

I have reviewed the Contribution Guidelines.
I have performed a self-review of my own code.
I have updated my repository to match the master at SetProtocol/index-ui.
I have included test data or screenshots that prove my fix is effective or that my feature works.

@0xModene  This is all that I had done so far. I read up on various ways to address the issue, but apparently some legacy versions of iOS don't play nicely with some of the fixes. This fix worked for all of the devices that I tested though, and it was a relatively simple change.


spotify not working

I installed balena on my raspberry pi zeri w.
I got the Bluetooth to work by going in the /usr/share/alsa/alsa.conf
and changing the defualts.ctl.card and defaults.pcm.card
value to match that of my USB to 3.5mm jack.
but the same fix is not working for Spotify. I can see the device in Spotify and can connect to it but unable to play audio. as soon as I play audio it disconnects

these are the error logs in the terminal
22.06.20 15:10:53 (+0200)  spotify  [2020-06-22T13:10:53Z INFO  librespot_playback::player] <Doin' it Right (feat. Panda Bear)> loaded
22.06.20 15:10:54 (+0200)  snapcast-client  2020-06-22 13-10-54 [Error] (worker) Exception in Controller::worker(): connect: Connection refused
22.06.20 15:10:54 (+0200)  snapcast-client  2020-06-22 13-10-54 [Error] (stop) Error in socket shutdown: Transport endpoint is not connected

I have a user who is unable to get Spotify Connect to work and I ran my own version an RPi 3 (not 64). The spotify service will not start and shows an exited status. The balenaSound_251e device shows up for a moment, then disappears. I've confirmed this on my mobile Spotify app, Web browser and installed desktop app.

Hi @RJStevenson, unfortunately there is no easy fix for the problem you are experiencing. The fix you applied to use the USB soundcard will be a hit or miss in my experience. This will be fixed however in the next major version of balenaSound.
Also @support-agents i think the linked JF thread does not relate to the original issue.

Hey @RJStevenson, with the release of balenaSound v3.0 USB soundcards should be supported out of the box. Let us know if you have trouble setting it up or have any other questions. Thanks!


[CP] Fix crash in DateTime.timezoneOffset

Commit(s) to merge
https://github.com/dart-lang/sdk/commit/b3ce1647a8c29f51b2cec3d156d7aa7a3ae2995b
Target
beta
Prepared changelist for beta/stable
https://dart-review.googlesource.com/c/sdk/+/374441
Issue Description
In some combinations of dart2js compile flags, DateTime.timezoneOffset can crash.
This has been observed on Firefox for Ads properties.
It is one of their leading crashes.
What is the fix
The fix is to handle fractional minutes (i.e. seconds expressed as the fractional part of a double).
Why cherry-pick
Developers can access the combination of compiler flags that cause the problem to become an app crash.
Risk
Low - relatively simple scaling minutes to seconds and clipping to int value.
Issue link(s)
b/350561030
Extra Info
No response

@sigmundch and @a-siva can you take a look at this cherry-pick request?

Overall, I am supportive, but I'm trying to gauge the need for a cherry-pick. In terms of risk, this is very contained and doesn't give me concern. However, the internal case that was affected is already addressed, so this would only make sense to cherry-pick if it can affect external users.
@rakudrama - is that combination of flags actually possible externally? Other than --extra-sound-null-safety-checks, is there another way to expose the issue in SNS programs (e.g. with -O2) or is the check causing the failure always (improperly) optimized away?

@sigmundch My main concern was that one of the other dart2js flags for adding checks (e.g. on native calls) would have a similar effect, or that we could cause other places along the flow of the value to have checks, for example, dart2js adds checks in static methods to make them implement a dynamic entry-point. Luckily the only place the value flows is into the Duration constructor, and constructor tear-offs are done via a separate synthesized static function, so the synthetic function is where the 'dynamic' entry checks end up.
On balance, after trying harder to make them happen, I now think these failure modes are unlikely and withdraw the request.


Prem AI Vectorizer support

This PR adds support for Prem AI Embeddings in DSPy modules.sentence_vectorizer

are the changes in dataloader just lint fixes?


"Find all references" missing in VS 2015

I have "Find all references" checked in the options, but it does not appear on the context menu when I right-click an identifier, and Shift-F12 does nothing. It works fine in VS 2013 on the same machine. Am I missing something?

Find all references still works fine for me.
Does Shift-F12 still work fine on C# projects? Do you have any VS extension that possibly occupies Shift-F12 key binding?

Yes, Find all References works in C# projects (unless of course the reference is in an F# project). I don't have any VS extension that would take over the key binding. In particular, Resharper is not installed. In addition, even if the key binding were overwritten, I don't think that would cause the Find All References menu item to vanish from the context menu.
My co-workers all have the same issue. At least those I've asked about it.
I thought it might be caused by a solution containing a mixture of C# and F# projects, but Find All References is also not an option in all-F# solutions.
I tried turning off Find All References, restarting VS, and turning it back on, but that didn't help.
I tried running VS 2015 As Administrator, and that also didn't help.
Frankly, I'm at a loss as to how to tell you a way to reproduce the issue. Is there a log file that would help?
From my perspective, it flat-out doesn't work at all in VS 2015, and never has. Worked great in VS 2013, and still does on the same machine even now.

I don't have a clue either.
Could you please try as follows:

Turn on Diagnostics Mode as per http://fsprojects.github.io/VisualFSharpPowerTools/faq.html#What-is-Diagnostic-mode-When-should-I-use-it

Press Shift F12 on an identifier and check whether there is any output in Output Window --> F# Power Tools tab

Check whether there is any F# Power Tools entry in C:\Users<user name>\AppData\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml.

Open View --> Other Windows --> Command Window. In your solution, place the cursor on an identifier and type Edit.FindAllReferences on Command Window.

Check whether Find All References appears and works on a newly-created F# project.

Any information would help me diagnose the issue. Thanks.

No "F# Power Tools" option in the Output window.

I think the following is probably relevant:

<entry>
    <record>98</record>
    <time>2015/07/28 15:14:46.189</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Begin package load [PowerToolsCommandsPackage]</description>
    <guid>{F152487E-9A22-4CF9-BEE6-A8F7C77F828D}</guid>
  </entry>
  <entry>
    <record>99</record>
    <time>2015/07/28 15:14:46.284</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>SetSite failed for package [PowerToolsCommandsPackage]</description>
    <guid>{F152487E-9A22-4CF9-BEE6-A8F7C77F828D}</guid>

80131534

    <errorinfo>The type initializer for 'ForegroundThreadGuard' threw an exception.</errorinfo>
  </entry>
  <entry>
    <record>100</record>
    <time>2015/07/28 15:14:46.284</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>End package load [PowerToolsCommandsPackage]</description>
    <guid>{F152487E-9A22-4CF9-BEE6-A8F7C77F828D}</guid>

80131534

    <errorinfo>The type initializer for 'ForegroundThreadGuard' threw an exception.</errorinfo>
  </entry>

And then, further, down, there is the following, which implies that maybe I need an assembly binding redirect for Visual Studio itself?
  <entry>
    <record>560</record>
    <time>2015/07/28 15:15:22.461</time>
    <type>Error</type>
    <source>Editor or Editor Extension</source>
    <description>System.IO.FileNotFoundException: Could not load file or assembly 'FSharp.Core, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'FSharp.Core, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at FSharpVSPowerTools.Setting.getGeneralOptions(IServiceProvider serviceProvider)
   at FSharpVSPowerTools.UnusedDeclarationMarginProvider.CreateMargin(IWpfTextViewHost wpfTextViewHost, IWpfTextViewMargin marginContainer)
   at Microsoft.VisualStudio.Text.Utilities.ContainerMargin.<AddMargins>b__25_1(IWpfTextViewMarginProvider mp)
   at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InstantiateExtension[TExtension,TMetadata,TExtensionInstance](Object errorSource, Lazy`2 provider, Func`2 getter)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
</description>
  </entry>

Likewise with this:
<entry>
    <record>565</record>
    <time>2015/07/28 15:15:22.629</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Begin package load [PowerToolsCommandsPackage]</description>
    <guid>{F152487E-9A22-4CF9-BEE6-A8F7C77F828D}</guid>
  </entry>
  <entry>
    <record>566</record>
    <time>2015/07/28 15:15:22.629</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>SetSite failed for package [PowerToolsCommandsPackage]</description>
    <guid>{F152487E-9A22-4CF9-BEE6-A8F7C77F828D}</guid>

80131534

    <errorinfo>The type initializer for 'ForegroundThreadGuard' threw an exception.</errorinfo>
  </entry>
  <entry>
    <record>567</record>
    <time>2015/07/28 15:15:22.629</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>End package load [PowerToolsCommandsPackage]</description>
    <guid>{F152487E-9A22-4CF9-BEE6-A8F7C77F828D}</guid>

80131534

    <errorinfo>The type initializer for 'ForegroundThreadGuard' threw an exception.</errorinfo>
  </entry>
  <entry>
    <record>568</record>
    <time>2015/07/28 15:15:22.796</time>
    <type>Error</type>
    <source>Window Configurations</source>
    <description>Could not load document states: System.IO.FileNotFoundException: Could not load file or assembly 'FSharp.Core, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'FSharp.Core, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at FSharpVSPowerTools.Setting.getGeneralOptions(IServiceProvider serviceProvider)
   at FSharpVSPowerTools.StandardCommandDispatcher.Register(IVsTextView interopTextView, IWpfTextView textView, CodeFormattingServices services)
   at FSharpVSPowerTools.CodeFormattingHookHelper.RegisterCommandDispatcher(IWpfTextView wpfTextView)
   at FSharpVSPowerTools.CodeFormattingHookHelper.<>c__DisplayClass8_0.<TextViewCreated>b__0()
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at Microsoft.Internal.VisualStudio.Shell.Interop.IVsTrackSelectionExPrivate.Register()
   at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ConnectSelectionContext()
   at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.Activate()
   at Microsoft.VisualStudio.Platform.WindowManagement.WindowManagerService.viewManager_ActiveViewChanged(Object sender, ActiveViewChangedEventArgs e)
   at Microsoft.VisualStudio.PlatformUI.ExtensionMethods.RaiseEvent[TEventArgs](EventHandler`1 eventHandler, Object source, TEventArgs args)
   at Microsoft.VisualStudio.PlatformUI.Shell.ViewManager.SetActiveView(View view, ActivationType type)
   at Microsoft.VisualStudio.PlatformUI.Shell.ViewManager.ActiveViewDeferrer.DisposeManagedResources()
   at Microsoft.VisualStudio.PlatformUI.DisposableObject.Dispose(Boolean disposing)
   at Microsoft.VisualStudio.PlatformUI.DisposableObject.Dispose()
   at Microsoft.VisualStudio.Platform.WindowManagement.SolutionOptions.<>c__DisplayClass22_0.<LoadBinaryDocumentStates>b__0(VersionedBinaryReader VersionedBinaryReader)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
</description>
  </entry>

Command "Edit.FindAllReferences" is not available.

Find All Reference is not an option in a newly-created F# project.

Rename does not work (except in VS 2013). There is syntax coloring in the source code, but things like "grey out unused opens" do not appear to function.

Because I knew you were going to ask, I found a copy of FSharp.Core <IP_ADDRESS> on my machine, and installed it into the GAC. Things are still not working, but I'm getting a different set of error messages in ActivityLog.xml.
  <entry>
    <record>128</record>
    <time>2015/09/21 17:23:17.613</time>
    <type>Error</type>
    <source>F# Power Tools</source>
    <description>Exception Message: No exports were found that match the constraint:
	ContractName	FSharpVSPowerTools.TaskList.CrossSolutionTaskListCommentManager
	RequiredTypeIdentity	FSharpVSPowerTools.TaskList.CrossSolutionTaskListCommentManager
Stack Trace:    at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportsCore(Type type, Type metadataViewType, String contractName, ImportCardinality cardinality)
   at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportedValueCore[T](String contractName, ImportCardinality cardinality)
   at FSharpVSPowerTools.PowerToolsCommandsPackage.PerformRegistrations(IGeneralOptions generalOptions)</description>
  </entry>

Also possibly relevant:
<entry>
    <record>759</record>
    <time>2015/09/21 17:23:51.046</time>
    <type>Warning</type>
    <source>VisualStudio</source>
    <description>Performance warning: String load failed. Pkg:{F152487E-9A22-4CF9-BEE6-A8F7C77F828D} (PowerToolsCommandsPackage) LANG:0409 ID:0
</description>
  </entry>
  <entry>
    <record>760</record>
    <time>2015/09/21 17:23:51.047</time>
    <type>Warning</type>
    <source>VisualStudio</source>
    <description>Performance warning: String load failed. Pkg:{F152487E-9A22-4CF9-BEE6-A8F7C77F828D} (PowerToolsCommandsPackage) LANG:0409 ID:0
</description>
  </entry>
  <entry>
    <record>761</record>
    <time>2015/09/21 17:23:51.048</time>
    <type>Warning</type>
    <source>VisualStudio</source>
    <description>Performance warning: String load failed. Pkg:{F152487E-9A22-4CF9-BEE6-A8F7C77F828D} (PowerToolsCommandsPackage) LANG:0409 ID:0
</description>
  </entry>
  <entry>
    <record>762</record>
    <time>2015/09/21 17:23:51.049</time>
    <type>Warning</type>
    <source>VisualStudio</source>
    <description>Performance warning: String load failed. Pkg:{F152487E-9A22-4CF9-BEE6-A8F7C77F828D} (PowerToolsCommandsPackage) LANG:0409 ID:0
</description>
  </entry>
  <entry>
    <record>763</record>
    <time>2015/09/21 17:23:51.050</time>
    <type>Warning</type>
    <source>VisualStudio</source>
    <description>Performance warning: String load failed. Pkg:{F152487E-9A22-4CF9-BEE6-A8F7C77F828D} (PowerToolsCommandsPackage) LANG:0409 ID:0
</description>
  </entry>

I kind of get what's going on.
Could you try the following:

Uninstall the extension
Reinstall the latest version (v2.0.0) using an Administrator account.

Possible explanations:

Windows UAC causes installation of the extension silently fail.
In VS 2015 RTM, Visual F# is no longer on default installation. So the extension may initialize before Visual F# is ready; which causes initialization failures. Reinstalling the latest version of extension may fix this.

That fixed it! So to sum up, FSharp.Core <IP_ADDRESS> was not in the GAC, so I had to manually add it to the GAC, then uninstall, restart VS, and reinstall the F# Power Tools extension, being sure that VS is running as Administrator during the reinstall.
Thanks for the help.

My pleasure :-). Missing FSharp.Core <IP_ADDRESS> is due to cascaded failures. It's no harm to put it into GAC though.


Add passive event listeners

There's a warning on Chrome that points here: https://chromestatus.com/feature/5745543795965952
Fix listeners to remove warning on Chrome.

merged in dev


npm install failing

Does npm install fail for anyone else? Getting an issue around editorconfig saying the file can not be found.
npm version 2.11.3
node version 0.12.7

Works fine for me.

With the same version numbers of npm and node? I have no issues installing other npm libraries.

Yes. I have the exact same Node and npm versions. Try npm cache clean.


Only working in Safari not working in Firefox or Chrome or IE

For some reason textillate is only working in Safari and not in any other browser.
any ideas or solutions?
Thanks!!

The demo page: http://textillate.js.org/ is working for me in Chrome and Firefox.
Can you provide an example of textillate only working in safari?

 If you open up dev tools you'll see a ton of mixed content warnings when loading your page over https. It's a bit tough for me to debug, but I assume it's because the textillate script is hardcoded to load over http:// somewhere. You want to load your scripts using only https or a protocol relative url:
http://www.paulirish.com/2010/the-protocol-relative-url/

Ahhh! I'm working in a website preview mode for hubspot which has the site in https. so that might be the problem. I think all is good then. Thank you so much for your help tho! I'm loving Textillate!

No problem! By the way, you're website has me intrigued as my startup is also in the digital signage industry. We're strictly on the software side at the moment so I'd be interested in learning more about what you do. You can contact me at<EMAIL_ADDRESS>


[FEATURE] Refactor maps.py

Feature Description
The current maps.py file is ~1400 LOC. To improve maintainability, it will be good to separate it out into distinct modules.
Implementation (Optional)
Logically distinct modules like - maps/gates.py, maps/constants.py and maps/expressions.py

Hi @TheGupta2012, Can I work on this issue?

Sure, go ahead!

Hi @TheGupta2012, I did the setup and explored the codebase. Before making the changes I wanted to confirm which functions have to be moved to which file. Here is what I have figured out yet:
/src/pyqasm/map/gates.py:

u3_gate
u3_inv_gate
u2_gate
u2_inv_gate
global_phase_gate
sxdg_gate_op
cy_gate
ch_gate
xy_gate
xx_plus_yy_gate
ryy_gate
zz_gate
phaseshift_gate
cswap_gate
pswap_gate
iswap_gate
crx_gate
cry_gate
crz_gate
cu_gate
cu3_gate
cu1_gate
csx_gate
rxx_gate
rccx_gate
rzz_gate
cphaseshift_gate
cphaseshift00_gate
cphaseshift01_gate
cphaseshift10_gate
gpi_gate
gpi2_gate
ms_gate
ccx_gate_op
ecr_gate
c3sx_gate
c4x_gate
prx_gate
one_qubit_gate_op
one_qubit_rotation_op
two_qubit_gate_op

/src/pyqasm/map/constants.py:

OPERATOR_MAP
ONE_QUBIT_OP_MAP
ONE_QUBIT_ROTATION_MAP
TWO_QUBIT_OP_MAP
THREE_QUBIT_OP_MAP
FOUR_QUBIT_OP_MAP
FIVE_QUBIT_OP_MAP
SELF_INVERTING_ONE_QUBIT_OP_SET
ST_GATE_INV_MAP
ROTATION_INVERSION_ONE_QUBIT_OP_MAP
U_INV_ROTATION_MAP
LIMITS_MAP
CONSTANTS_MAP
VARIABLE_TYPE_MAP
VARIABLE_TYPE_CAST_MAP
ARRAY_TYPE_MAP
MAX_ARRAY_DIMENSIONS
SWITCH_BLACKLIST_STMTS
SUPPORTED_QASM_VERSIONS
QUANTUM_STATEMENTS

/src/pyqasm/map/expressions.py:

qasm3_expression_op_map
map_qasm_op_to_callable
map_qasm_inv_op_to_callable
qasm_variable_type_cast

Let me know if the segregation I have done is correct so that I can move forward with the task.

Hi @devilkiller-ag -

Naming the folder as maps would be better
The segregation for gates.py should also include -

OPERATOR_MAP
ONE_QUBIT_OP_MAP
ONE_QUBIT_ROTATION_MAP
TWO_QUBIT_OP_MAP
THREE_QUBIT_OP_MAP
FOUR_QUBIT_OP_MAP
FIVE_QUBIT_OP_MAP
SELF_INVERTING_ONE_QUBIT_OP_SET
ST_GATE_INV_MAP
ROTATION_INVERSION_ONE_QUBIT_OP_MAP
U_INV_ROTATION_MAP

This is because if you add these in the constants.py file, it would greatly increase the size of the imports due to the fact that you will have to import every gate implementation from gates.py. Moreover, keeping the map_qasm_op_to_callable and map_qasm_inv_op_to_callable inside gates.py would make more sense as they are logically related to the gates.

In similar fashion, every element related to expressions should be placed inside the expressions. Thus -

LIMITS_MAP
CONSTANTS_MAP
VARIABLE_TYPE_MAP
VARIABLE_TYPE_CAST_MAP
ARRAY_TYPE_MAP
MAX_ARRAY_DIMENSIONS

should be moved to expressions.py
Now that I think of it using a constants.py file might group unrelated constants together which we do not want. Better to just use expressions.py and gates.py for the segregration. For the -

SWITCH_BLACKLIST_STMTS
SUPPORTED_QASM_VERSIONS
QUANTUM_STATEMENTS

we can move them to the __init__.py file for the maps. This will allow us to do something like from pyqasm.maps import QUANTUM_STATEMENTS directly, without having a separate file for these constants.


remove user-configurable context

This is complete in the v0.3 branch, just waiting for #22 to merge it in


Playback of live content keeps jumping back and forth

Have you read the FAQ and checked for duplicate open issues?
Yes
If the problem is related to FairPlay, have you read the tutorial?
N/A, no FairPlay
What version of Shaka Player are you using?
Latest: 4.11.7
Can you reproduce the issue with our latest release version?
Yes
Can you reproduce the issue with the latest code from main?
Yes
Are you using the demo app or your own custom app?
Basic demo app: https://drosalmez.github.io/shaka_player_demo/
If custom app, can you reproduce the issue using our demo app?
Yes
What browser and OS are you using?
WPE 2017 browser on Linux
For embedded devices (smart TVs, etc.), what model and firmware version are you using?
Proprietary firmware
What are the manifest and license server URIs?
See demo app above.
What configuration are you using?  What is the output of player.getNonDefaultConfiguration()?
See demo app above.
What did you do?
Load the above demo app on the WPE browser.
What did you expect to happen?
Sample BBC live content plays back smoothly.
https://github.com/user-attachments/assets/5a6091f7-b13a-42a7-a309-b2f4af2128a1
What actually happened?
Playback keeps jumping back and forth. See attached recording. The same behaviour can be reproduced with all the live content streams I have tested.
Are you planning send a PR to fix it?
?

I see the issue in the recording, but I can't reproduce it in a normal desktop browser (ChromeOS 128).  I tried your demo link, and I tried throttling the network to trigger track changes, but nothing I did triggered the bug.
Does this only happen in WPE 2017?
If so, how would I get this version specifically?  My version of Ubuntu seems to have "2.36.0-2" available, so I'm not sure how to compare that to "WPE 2017".

We found another browser configuration in which the above basic demo app actually plays back correctly. We will do some more investigation on our side and open a new issue if necessary. For now closing this one.


Automated backups

Describe Your Problem:
I like your idea how you implemented the backup and restore of the Homebridge with all the installed plugins. I would like it even more if I could automate the download. I had in mind a curl command that I would call via cron. Unfortunately, I failed to get authorization.
 I have also tried to use homebridge-config-ui-x without login authentication, but it does not work at all.
Is there any way to automate the backup function in this way?
Logs:

n/a

Homebridge Config:
n/a

Screenshots:
n/a
Environment:

Node.js Version: v12.16.3
NPM Version: 6.14.4
Homebridge Version: 1.0.4
Homebridge Config UI X Version: 4.17.1
Operating System: Raspbian Buster
Process Supervisor: systemd

You should be able to request an auth token using curl as well.
I'll take a look and write you up a script tomorrow.

@sschuste here you go:
#!/bin/bash

#
# This script requires the "jq" package to be installed.
# Linux: apt-get install jq
# macOS: brew install jq
#

set -e

# Uncomment to debug
# set -x

USERNAME=admin
PASSWORD=admin
UI_HOST=http://localhost:8581
BACKUP_FILE_PATH="$(pwd)"

BACKUP_FILE_NAME="backup-$(date '+%Y-%m-%d').tar.gz"

# Get Access Token
ACCESS_TOKEN=$(curl -fs "$UI_HOST/api/auth/login" \
    -H 'Content-Type: application/json' \
    --data-binary "{\"username\":\"$USERNAME\",\"password\":\"$PASSWORD\"}" \
  | jq -r .access_token)

# Download Backup
curl -fs "$UI_HOST/api/backup/download" \
  -H "Authorization: bearer $ACCESS_TOKEN" \
  -o "$BACKUP_FILE_PATH/$BACKUP_FILE_NAME"

echo "Backup saved to $BACKUP_FILE_PATH/$BACKUP_FILE_NAME"

Yeah, how cool is that? That's awesome. I just had to make a few minor adjustments and another problem solved. Thanks for doing extra work for me. Wunderbar. Dankeschön.

Happy to help. I've been thinking about making the UI do backups every day automatically (they are very small so disk space won't be a concern) - but still need to work out the implications of doing it.

Any additional thoughts on this? Would love a way to do auto backups every day...!

@sschuste I'm looking at adding this into the UI service directly.
My current idea is as follows:

automated daily backups at 1am
backups are stored in the homebridge storage folder by default under backups/instance-backups/
backups will be kept for a rolling 7 days
the instance backup path will be customisable (so you can set it to a shared folder or network drive for example)

Thoughts?

@oznu Great ideas. Maybe you could also add an option to mark a backup to be stored even after the seven days, in case it is an important one.
On top of that it would be nice to have an API endpoint which allows you to get an info about all stored backup files with the date the backup was created, if it was manually or automated, if it should stay stored after the 7 days and maybe also notes (as requested in #910 )

API endpoints to list and download the scheduled backups will be available as soon as this feature lands - I'm just thinking of delaying the UI features by a release (~one week) to ensure their are no issues in the server side component.
The initial release will only include scheduled backups, not user generated backups, as they are downloaded to the users local machine - which also kind of solves the "I want to keep it more than 7 days" problem 😄
This is currently in @test - though you won't get a backup saved until 01:15am local time.
https://github.com/oznu/homebridge-config-ui-x/wiki/How-To-Test-Upcoming-Changes

Will land, along with the UI features, in v4.31.0.

Thank you very much. That's a good one. I scripted a similar mechanism that does a little bit more:

daily backup on the Raspi triggered by a cron job (will be replaced by your solution)
rsync copy of the backup to my Mac's iCloud directory

Copying to the iCloud increases the security of my backup. For me the Raspi is something that can break at any time. I do not want to leave a complicated homebridge configuration to the capabilities of the SD card.
But the much more elegant solution would be an upload to GitHub with a simple git push/pull mechanism. I am fully aware that GitHub is not really the right place for backups. But an automated solution that stores backups somewhere other than on the Raspi itself would be awesome.
 I have a solution that works, even if it could be nicer. Maybe a manual on how to synchronize backups/instance-backups/ with a dropbox or other service is enough. This is not to say that this is your job, but maybe you have a good idea.

I’ve noticed that even though automated backups are only supposed to be stored for the last 7 days, old backups are not being purged.

Any way to build an automation to auto copy backups offsite/off sd card?  Maybe to an iCloud or google drive link?  The SD card is the main point of failure for the device.


Feature Request: Use the repo to receive and send tokens via different chains.

Is your feature request related to a problem? Please describe.
Hello:
I want to know how to use this wallet SDK in Node.js (Version 19.1.0)
First, I want to know if I can receive tokens from one network, and send the tokens to another address via another network.
One example is: if I want to receive some USDT via ERC20 network, then I want to send the received USDT, less the gas fees to another address via BEP20 network.
If it is possible, then show me some basic Node.js code for doing this.
Describe the solution you'd like
const data = await wallet.getBalance({
address: '0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22',
network: 'ethereum',
rpcUrl: 'https://1rpc.io/eth',
});
const transfer = await wallet.transfer({
recipientAddress: '0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22',
amount: 10,
network: 'ethereum',
rpcUrl: 'https://1rpc.io/bnb', => BEP20 RPC URL
privateKey: 'private key',
tokenAddress: '0xdac17f958d2ee523a2206206994597c13d831ec7', => USDT contract address
});
Describe alternatives you've considered
Need some feed back.
Additional context
I tried to install SDK using npm for the latest version 3.6.2.
But look at the output, I saw a lot of deprecated packages.
D:\nodejs\CoinbaseWallet>npm install @coinbase/wallet-sdk
npm WARN deprecated<EMAIL_ADDRESS>Renamed to @metamask/safe-event-emitter
npm WARN deprecated<EMAIL_ADDRESS>See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated<EMAIL_ADDRESS>Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated<EMAIL_ADDRESS>Deprecated in favor of '@metamask/eth-sig-util'
npm WARN deprecated<EMAIL_ADDRESS>See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated<EMAIL_ADDRESS>https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated<EMAIL_ADDRESS>support for ECMAScript is superseded by uglify-js as of v3.13.0
added 882 packages, and audited 883 packages in 1m
58 packages are looking for funding
run npm fund for details
found 0 vulnerabilities
Is it possible to update all the packages?
By the way, can I use this package without becoming a customer for Coinbase exchange?
Thanks,

hi. sorry for the belated response.
to send assets to a different network, you need to use bridges.
we are working on updating our sdk to replace deprecated dependencies.
thanks.


Koios: Support new methods in TransactionService and AssetService

Add support for following two methods for Koios backend

In TransactionService to get tx redeemers by tx hash.
In AssetService to get transactions for an asset.

@edridudi fyi


Adds caret to @xmldom/xmldom package version number

This PR adds a caret to the package version number for @xmldom/xmldom, so that an error in our ADS extensions build pipeline can be resolved.

Wasn't needed, just needed to run some pipelines that hadn't ran yet.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
3 unchanged lines in 1 file lost coverage.
Overall coverage increased (+0.008%) to 41.965%

Files with Coverage Reduction
New Missed Lines
%

extensions/machine-learning/src/common/processService.ts
3
77.78%

Totals

Change from base Build<PHONE_NUMBER>:
0.008%

Covered Lines:
28915

Relevant Lines:
64014

💛  - Coveralls


Feat/cv smart feats

Productionizing the smart features in CV. See ticket https://app.shortcut.com/galileo/stories/space/457/owned-by-me

Blocked by the deprecation of Python3.7 and removing the CI test (the dependency imagededup does not support 3.7)

Codecov Report

Merging #719 (a892253) into main (f1c72bb) will increase coverage by 0.08%.
The diff coverage is 96.80%.

@@            Coverage Diff             @@
##             main     #719      +/-   ##
==========================================
+ Coverage   89.77%   89.85%   +0.08%
==========================================
  Files         168      170       +2
  Lines       13590    13876     +286
==========================================
+ Hits        12200    12468     +268
- Misses       1390     1408      +18

Files Changed
Coverage Δ

dataquality/core/log.py
94.92% <ø> (ø)

tests/integrations/fastai/test_cv_fai.py
98.03% <ø> (ø)

...uality/loggers/data_logger/image_classification.py
88.74% <93.75%> (+1.15%)
:arrow_up:

dataquality/utils/cv_smart_features.py
95.21% <95.21%> (ø)

...ataquality/loggers/data_logger/base_data_logger.py
89.53% <100.00%> (+0.09%)
:arrow_up:

tests/assets/constants.py
100.00% <100.00%> (ø)

tests/loggers/test_image_classification.py
100.00% <100.00%> (ø)

tests/loggers/test_log_image_dataset.py
100.00% <100.00%> (ø)

tests/utils/test_cv_smart_features.py
100.00% <100.00%> (ø)

... and 10 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

Works on a run https://console.dev.rungalileo.io/insights/e460a344-b91d-49be-93e1-833f24f58610/9cafc223-42fd-4cf7-aeec-988a24c591ca
Just don't watch the images 🙈


Webhook with POST and GET methods at the sametime

Hi I created a route in Flask app to handle webhook which is accept both POST and GET request and will handle it depending on the request method sent to the route.
here is the "happy path" of a Flask route
@app.route('/webhook', methods=['GET','POST'])
def webhook():
    if request.method == 'POST':
        # request.json #dosomething
        return 'EVENT_RECEIVED' , 200
    else:

        response = dict()

        response["hub.challenge"] = request.args.get('hub.challenge')

        return response, 200

I am trying the same with FAST API using the Request starlette class and the Basemodel I wanted to make both optional and handle separately. Like checking the Request object first if not then get the request body of a post request.
@app.post("/webhook")
@app.get("/webhook")
async def webhook(request: Request, event: Event):

    challenge = request.query_params.get('hub.challenge')

    if challenge:
        return {"hub.challenge": challenge}

    event #dosomething
    return 'EVENT_RECEIVED' , 200

Here is a get request example
import requests

url = "http://<IP_ADDRESS>:8000/webhook?hub.verify_token=STRAVA&hub.challenge=15f7d1a91c1f40f8a748fd134752feb3&hub.mode=subscribe"

r = requests.get(url)

Here is a post request example
import requests

event = {
    "aspect_type": "update",
    "event_time":<PHONE_NUMBER>,
    "object_id":<PHONE_NUMBER>,
    "object_type": "activity",
    "owner_id": 134815,
    "subscription_id": 120475,
    "updates": {
        "title": "Messy"
    }
}

r = requests.post("http://<IP_ADDRESS>:8000/webhook", json=event)

The post is working but when I send a get request here is the IO response
{'date': 'Mon, 01 Feb 2021 11:29:28 GMT', 'server': 'uvicorn', 'content-length': '81', 'content-type': 'application/json'}
{"detail":[{"loc":["body"],"msg":"field required","type":"value_error.missing"}]}
422

FastAPI Logs
INFO:     <IP_ADDRESS>:56956 - "GET /webhook?hub.verify_token=STRAVA&hub.challenge=15f7d1a91c1f40f8a748fd134752feb3&hub.mode=subscribe HTTP/1.1" 422 Unprocessable Entity

Thanks for assistance on this
:)
First check

[ X] I added a very descriptive title to this issue.
[ X] I used the GitHub search to find a similar issue and didn't find it.
[ X] I searched the FastAPI documentation, with the integrated search.
[ X] I already searched in Google "How to X in FastAPI" and didn't find any information.
[ X] I already read and followed all the tutorial in the docs and didn't find an answer.
[ X] I already checked if it is not related to FastAPI but to Pydantic.
[ X] I already checked if it is not related to FastAPI but to Swagger UI.
[ X] I already checked if it is not related to FastAPI but to ReDoc.
[ X] After submitting this, I commit to one of:

Read open issues with questions until I find 2 issues where I can help someone and add a comment to help there.
I already hit the "watch" button in this repository to receive notifications and I commit to help at least 2 people that ask questions in the future.
Implement a Pull Request for a confirmed bug.

Have you looked at the documentation regarding optional fields/query params?

@pedrojunqueira you can use app.api_route decorator for multiple methods and also should set event as Optional:
@app.api_route("/webhook", methods=["GET", "POST"])
async def webhook(request: Request, event: Optional[Event] = None):

    if request.method == "GET":
        return "EVENT_RECEIVED_GET"

    elif request.method == "POST":
        return "EVENT_RECEIVED_POST"

This will not demand JSON with POST request also, you should check it yourself in functiuon.
But i suggest you to change you decision to separated GET and POST functions it would be much easier to maintain and read for some complicated logic.
Also here return 'EVENT_RECEIVED' , 200 will not set the status code of the response, you will just return response as JSON with ["EVENT_RECEIVED", 200]. For response status code read docs here:
https://fastapi.tiangolo.com/tutorial/response-status-code/
and here
https://fastapi.tiangolo.com/advanced/additional-status-codes/

Thanks @insomnes
final code worked fine. See below
from typing import Optional

from fastapi import FastAPI, Request
from pydantic import BaseModel

app = FastAPI()

class Event(BaseModel):
    aspect_type: str
    event_time: int
    object_id: int
    object_type: str
    owner_id: int
    subscription_id: int
    updates: dict

@app.api_route("/webhook",methods=["GET", "POST"])
async def read_params(request: Request, event: Optional[Event] = None):

    if request.method == 'GET':

        challenge = request.query_params.get('hub.challenge')

        print(challenge) # do something with get request data

        if challenge:
            return {"hub.challenge": request.query_params.get('hub.challenge')}

    print(event) # do something with event data

    return 'EVENT_RECEIVED'

I should have investigated the Request class better. But in the end your answer gave a better understanding on FAST_API
I am going to close the issue.
Cheers

Thanks for the help here @insomnes and @Mause ! 👏  🙇
Thanks for reporting back and closing the issue @pedrojunqueira  👍

Sorry for the long delay! 🙈  I wanted to personally address each issue/PR and they piled up through time, but now I'm checking each one in order.


[LIVY-533] Use setJobGroup/cancelJobGroup to cancel bypass jobs

What changes were proposed in this pull request?
This PR fixes LIVY-533.
The proposed fix invokes setJobGroup() in the worker thread before calling job code, and cancelJobGroup() when another thread tries to cancel job execution. synchronized blocks are employed to guard against race conditions.
Also, this PR removes some unused code from the JobWrapper class.
How was this patch tested?
Manual as well as Livy test suite. No new tests were added, since the code is covered by existing tests.

Codecov Report

Merging #128 into master will increase coverage by 0.03%.
The diff coverage is 66.66%.

@@             Coverage Diff              @@
##             master     #128      +/-   ##
============================================
+ Coverage     70.98%   71.02%   +0.03%
- Complexity      925      928       +3
============================================
  Files           100      100
  Lines          5511     5511
  Branches        829      831       +2
============================================
+ Hits           3912     3914       +2
+ Misses         1058     1055       -3
- Partials        541      542       +1

Impacted Files
Coverage Δ
Complexity Δ

...in/java/org/apache/livy/rsc/driver/JobWrapper.java
90% <66.66%> (+10%)
9 <3> (+2)
:arrow_up:

...cala/org/apache/livy/scalaapi/ScalaJobHandle.scala
52.94% <0%> (-2.95%)
7% <0%> (ø)

...c/main/scala/org/apache/livy/repl/ReplDriver.scala
30.76% <0%> (-2.57%)
7% <0%> (ø)

...main/java/org/apache/livy/rsc/ContextLauncher.java
81.63% <0%> (-2.56%)
18% <0%> (ø)

...ain/scala/org/apache/livy/utils/SparkYarnApp.scala
77.46% <0%> (-2.12%)
33% <0%> (ø)

...ain/java/org/apache/livy/rsc/driver/RSCDriver.java
80.08% <0%> (+2.11%)
42% <0%> (+1%)
:arrow_up:

...c/src/main/java/org/apache/livy/rsc/RSCClient.java
82.6% <0%> (+2.48%)
26% <0%> (ø)
:arrow_down:

Continue to review full report at Codecov.

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

I have updated some comment in the PR to force a rebuild. The last build I think failed due to an unrelated flaky testcase in the batch integration tests.
Is this otherwise good enough to be merged?

Merging to master.
I can see this not handling 100% of cases (e.g. people setting their own job group in their jobs), but at least it's a best effort.