Hash,Date,Author,commit_message,IsMerge,Additions,Deletions,Total Changes,git_diff,Repository Name,Owner,Primary Language,Language,Stars,Forks,Description,Repository,type,Comment 57b5f42847c70347afe43d04f007f937c46b2699,,Jeroen Van Goey,Remove unintended double negation in docstring (#6541) Small typo fix. `ImportError: If importing vertexai SDK didn't not succeed.` -> `ImportError: If importing vertexai SDK did not succeed.`.,False,1,1,0,"--- vertexai.py @@ -32,7 +32,7 @@ def init_vertexai( will be ascertained from the environment. Raises: - ImportError: If importing vertexai SDK didn't not succeed. + ImportError: If importing vertexai SDK did not succeed. """""" try: import vertexai",langchain-ai_langchain.json,,,,,,,langchain-ai_langchain.json,BUG_FIX,"5, obvious" 6b44651fa805cbd70ea93279ad7c95ea88081ff0,2025-03-21 17:06:37,Muhammad Khuzaima Umair,set `CodeDataTransfers.EDITORS` for directories too. It is required to show the markdown link for directory,False,2,5,7,"--- src/vs/workbench/browser/dnd.ts @@ -332,10 +332,13 @@ export function fillEditorsDragData(accessor: ServicesAccessor, resourcesOrEdito draggedEditors.push(editor); } - const draggedDirectories: URI[] = fileSystemResources.filter(({ isDirectory }) => isDirectory).map(({ resource }) => resource); + if (draggedEditors.length) { + event.dataTransfer.setData(CodeDataTransfers.EDITORS, stringify(draggedEditors)); + } + + const draggedDirectories: URI[] = fileSystemResources.filter(({ isDirectory }) => isDirectory).map(({ resource }) => resource) if (draggedEditors.length || draggedDirectories.length) { - event.dataTransfer.setData(CodeDataTransfers.EDITORS, stringify([...draggedEditors, ...draggedDirectories])); // Add a URI list entry const uriListEntries: URI[] = [...draggedDirectories]; ",vscode,microsoft,TypeScript,TypeScript,168072.0,30802.0,Visual Studio Code,microsoft_vscode,BUG_FIX,Obvious 5d5fb431cfa6d224fa650162dc6636a1fd272fe3,2024-06-19 11:01:53,Aryaman Sharda,Update README.md,False,1,0,1,"--- README.md @@ -211,7 +211,6 @@ Please see [CONTRIBUTING](https://github.com/vsouza/awesome-ios/blob/master/.git - [URLNavigator](https://github.com/devxoul/URLNavigator) - Elegant URL Routing for Swift - [WAAppRouting](https://github.com/Wasappli/WAAppRouting) - iOS routing done right. Handles both URL recognition and controller displaying with parsed parameters. All in one line, controller stack preserved automatically! - [ZIKRouter](https://github.com/Zuikyo/ZIKRouter) - An interface-oriented router for discovering modules and injecting dependencies with protocol in OC & Swift, iOS & macOS. Handles route in a type safe way. -- [GetUniversal.link](https://getuniversal.link/) - Free Universal Link & Apple App Site Association testing tool. ## App Store ",awesome-ios,vsouza,Swift,Swift,48363.0,6877.0,"A curated list of awesome iOS ecosystem, including Objective-C and Swift Projects ",vsouza_awesome-ios,DOC_CHANGE,Obvious f7531d9874e0dd3682bf0ed7ae408927e1fae472,2023-07-22 15:41:04,Tianyi Zheng,"Add note in `CONTRIBUTING.md` about not asking to be assigned to issues (#8871) * Add note in CONTRIBUTING.md about not asking to be assigned to issues Add a paragraph to CONTRIBUTING.md explicitly asking contributors to not ask to be assigned to issues * Update CONTRIBUTING.md * Update CONTRIBUTING.md --------- Co-authored-by: Christian Clauss ",False,2,0,2,"--- CONTRIBUTING.md @@ -25,8 +25,6 @@ We appreciate any contribution, from fixing a grammar mistake in a comment to im Your contribution will be tested by our [automated testing on GitHub Actions](https://github.com/TheAlgorithms/Python/actions) to save time and mental energy. After you have submitted your pull request, you should see the GitHub Actions tests start to run at the bottom of your submission page. If those tests fail, then click on the ___details___ button try to read through the GitHub Actions output to understand the failure. If you do not understand, please leave a comment on your submission page and a community member will try to help. -If you are interested in resolving an [open issue](https://github.com/TheAlgorithms/Python/issues), simply make a pull request with your proposed fix. __We do not assign issues in this repo__ so please do not ask for permission to work on an issue. - Please help us keep our issue list small by adding `Fixes #{$ISSUE_NUMBER}` to the description of pull requests that resolve open issues. For example, if your pull request fixes issue #10, then please add the following to its description: ``` ",python,thealgorithms,Python,Python,197891.0,46346.0,All Algorithms implemented in Python,thealgorithms_python,DOC_CHANGE,changes in md file ff442a2eb0a69df80bc5c721541b62858a18096f,,Vladimir Iakovlev,#682: Remove `script` log on exit,False,2,0,2,"--- bash.py @@ -41,6 +41,7 @@ class Bash(Generic): export THEFUCK_INSTANT_MODE=True; export THEFUCK_OUTPUT_LOG={log}; script -feq {log}; + rm {log}; exit '''.format(log='/tmp/thefuck-script-log-{}'.format(uuid4().hex)) --- zsh.py @@ -40,6 +40,7 @@ class Zsh(Generic): export THEFUCK_INSTANT_MODE=True; export THEFUCK_OUTPUT_LOG={log}; script -feq {log}; + rm {log}; exit '''.format(log='/tmp/thefuck-script-log-{}'.format(uuid4().hex))",nvbn_thefuck.json,,,,,,,nvbn_thefuck.json,CODE_IMPROVEMENT,"4, Refactored the code to remove script log" 79f8966d6d711844e1917877cd61989710c72526,2024-11-26 19:45:03,Simon Hamp,"Dock goodies (#421) * Dock goodies * Fix styling * fix --------- Co-authored-by: simonhamp ",False,40,0,40,"--- src/Dock.php @@ -17,38 +17,4 @@ class Dock 'items' => $items, ]); } - - public function show() - { - $this->client->post('dock/show'); - } - - public function hide() - { - $this->client->post('dock/hide'); - } - - public function icon(string $path) - { - $this->client->post('dock/icon', ['path' => $path]); - } - - public function bounce(string $type = 'informational') - { - $this->client->post('dock/bounce', ['type' => $type]); - } - - public function cancelBounce() - { - $this->client->post('dock/cancel-bounce'); - } - - public function badge(?string $label = null): void|string - { - if (is_null($label)) { - return $this->client->get('dock/badge'); - } - - $this->client->post('dock/badge', ['label' => $label]); - } } --- src/Facades/Dock.php @@ -6,13 +6,7 @@ use Illuminate\Support\Facades\Facade; use Native\Laravel\Menu\Menu; /** - * @method static void bounce() - * @method static void|string badge(string $type = null) - * @method static void cancelBounce() - * @method static void hide() - * @method static void icon(string $Path) * @method static void menu(Menu $menu) - * @method static void show() */ class Dock extends Facade { ",laravel,nativephp,PHP,PHP,3498.0,182.0,Laravel wrapper for the NativePHP framework,nativephp_laravel,BUG_FIX,styling fixed 63230a4a1b56f38dcea02ae540b95ed48fff9c4e,2024-01-07 14:59:22,LJ,Update zookeeper-intro.md 修改语义错误 应该是二进制序列吧,有错别字,False,1,1,2,"--- docs/distributed-system/distributed-process-coordination/zookeeper/zookeeper-intro.md @@ -77,7 +77,7 @@ _破音:拿出小本本,下面的内容非常重要哦!_ ### Data model(数据模型) -ZooKeeper 数据模型采用层次化的多叉树形结构,每个节点上都可以存储数据,这些数据可以是数字、字符串或者是二进制序列。并且。每个节点还可以拥有 N 个子节点,最上层是根节点以“/”来代表。每个数据节点在 ZooKeeper 中被称为 **znode**,它是 ZooKeeper 中数据的最小单元。并且,每个 znode 都有一个唯一的路径标识。 +ZooKeeper 数据模型采用层次化的多叉树形结构,每个节点上都可以存储数据,这些数据可以是数字、字符串或者是二级制序列。并且。每个节点还可以拥有 N 个子节点,最上层是根节点以“/”来代表。每个数据节点在 ZooKeeper 中被称为 **znode**,它是 ZooKeeper 中数据的最小单元。并且,每个 znode 都有一个唯一的路径标识。 强调一句:**ZooKeeper 主要是用来协调服务的,而不是用来存储业务数据的,所以不要放比较大的数据在 znode 上,ZooKeeper 给出的每个节点的数据大小上限是 1M 。** ",javaguide,snailclimb,Java,Java,148495.0,45728.0,「Java学习+面试指南」一份涵盖大部分 Java 程序员所需要掌握的核心知识。准备 Java 面试,首选 JavaGuide!,snailclimb_javaguide,DOC_CHANGE,Obvious f3306081b87ac48c2348433e2d7b89897fe79dd3,2025-01-24 14:37:52,Fatih Uzunoglu,"qml: do not use `Screen.devicePixelRatio` in `ArtistTopBanner.qml` `Screen.devicePixelRatio` is not reported correctly on Wayland, unlike window's effective device pixel ratio.",False,3,2,5,"--- modules/gui/qt/medialibrary/qml/ArtistTopBanner.qml @@ -104,11 +104,10 @@ FocusScope { Widgets.RoundImage { id: roundImage source: artist.cover || VLCStyle.noArtArtist - sourceSize.width: width * eDPR - sourceSize.height: height * eDPR + sourceSize.width: width * Screen.devicePixelRatio + sourceSize.height: height * Screen.devicePixelRatio anchors.fill: parent radius: VLCStyle.cover_normal - readonly property real eDPR: MainCtx.effectiveDevicePixelRatio(Window.window) } Rectangle { ",vlc,,C,C,,,Video player,_vlc,BUG_FIX,obvious f94cdd1723ebfed265c17fb4def13c9ce17c3e06,2024-10-16 19:33:42,David Sherret,chore: add dhat feature (#26285),False,48,1,49,"--- Cargo.lock @@ -1188,7 +1188,6 @@ dependencies = [ ""deno_task_shell"", ""deno_terminal 0.2.0"", ""deno_tower_lsp"", - ""dhat"", ""dissimilar"", ""dotenvy"", ""dprint-plugin-json"", @@ -2426,22 +2425,6 @@ version = ""1.4.3"" source = ""registry+https://github.com/rust-lang/crates.io-index"" checksum = ""b6e854126756c496b8c81dec88f9a706b15b875c5849d4097a3854476b9fdf94"" -[[package]] -name = ""dhat"" -version = ""0.3.3"" -source = ""registry+https://github.com/rust-lang/crates.io-index"" -checksum = ""98cd11d84628e233de0ce467de10b8633f4ddaecafadefc86e13b84b8739b827"" -dependencies = [ - ""backtrace"", - ""lazy_static"", - ""mintex"", - ""parking_lot"", - ""rustc-hash 1.1.0"", - ""serde"", - ""serde_json"", - ""thousands"", -] - [[package]] name = ""diff"" version = ""0.1.13"" @@ -4452,12 +4435,6 @@ dependencies = [ ""simd-adler32"", ] -[[package]] -name = ""mintex"" -version = ""0.1.3"" -source = ""registry+https://github.com/rust-lang/crates.io-index"" -checksum = ""9bec4598fddb13cc7b528819e697852653252b760f1228b7642679bf2ff2cd07"" - [[package]] name = ""mio"" version = ""0.8.11"" @@ -7204,12 +7181,6 @@ dependencies = [ ""syn 2.0.72"", ] -[[package]] -name = ""thousands"" -version = ""0.2.0"" -source = ""registry+https://github.com/rust-lang/crates.io-index"" -checksum = ""3bf63baf9f5039dadc247375c29eb13706706cfde997d0330d05aa63a77d8820"" - [[package]] name = ""thread_local"" version = ""1.1.8"" --- cli/Cargo.toml @@ -38,11 +38,6 @@ path = ""./bench/lsp_bench_standalone.rs"" [features] default = [""upgrade"", ""__vendored_zlib_ng""] -# A feature that enables heap profiling with dhat on Linux. -# 1. Compile with `cargo build --profile=release-with-debug --features=dhat-heap` -# 2. Run the executable. It will output a dhat-heap.json file. -# 3. Open the json file in https://nnethercote.github.io/dh_view/dh_view.html -dhat-heap = [""dhat""] # A feature that enables the upgrade subcommand and the background check for # available updates (of deno binary). This is typically disabled for (Linux) # distribution packages. @@ -103,7 +98,6 @@ color-print.workspace = true console_static_text.workspace = true dashmap.workspace = true data-encoding.workspace = true -dhat = { version = ""0.3.3"", optional = true } dissimilar = ""=1.0.4"" dotenvy = ""0.15.7"" dprint-plugin-json = ""=0.19.3"" --- cli/main.rs @@ -61,10 +61,6 @@ use std::ops::Deref; use std::path::PathBuf; use std::sync::Arc; -#[cfg(feature = ""dhat-heap"")] -#[global_allocator] -static ALLOC: dhat::Alloc = dhat::Alloc; - /// Ensures that all subcommands return an i32 exit code and an [`AnyError`] error type. trait SubcommandOutput { fn output(self) -> Result; @@ -391,9 +387,6 @@ pub(crate) fn unstable_exit_cb(feature: &str, api_name: &str) { } pub fn main() { - #[cfg(feature = ""dhat-heap"")] - let profiler = dhat::Profiler::new_heap(); - setup_panic_hook(); util::unix::raise_fd_limit(); @@ -414,12 +407,7 @@ pub fn main() { run_subcommand(Arc::new(flags)).await }; - let result = create_and_run_current_thread_with_maybe_metrics(future); - - #[cfg(feature = ""dhat-heap"")] - drop(profiler); - - match result { + match create_and_run_current_thread_with_maybe_metrics(future) { Ok(exit_code) => std::process::exit(exit_code), Err(err) => exit_for_error(err), } ",deno,denoland,Rust,Rust,102021.0,5502.0,A modern runtime for JavaScript and TypeScript.,denoland_deno,PERF_IMPROVEMENT,Code change: indexing added 1a9076e26775bb6aff525cdd8ae2f0f61d262772,2023-08-29 18:11:24,Ben Pasquariello,Update README.md,False,3,3,6,"--- README.md @@ -379,9 +379,9 @@ If you're part of a student society or club and want to organize an exciting MAT Please note that while MathWorks cannot offer financial support or prizes for these events, we're here to assist you in creating an unforgettable learning experience for your participants. -| **MATLAB Onramp Party Resources** | **Cody Competition Resources** | -| :---: | :---: | -|


- [Onramp Toolkit](https://github.com/mathworks/awesome-matlab-students/tree/main/Student%20Societies%20and%20Clubs/Onramp%20Toolkit)
- [How to host an Onramp Party Guide](https://github.com/mathworks/awesome-matlab-students/blob/main/Student%20Societies%20and%20Clubs/Onramp%20Toolkit/1_How_to_Run_an_Onramp_Party.docx)
- [Example Presentations](https://github.com/mathworks/awesome-matlab-students/tree/main/Student%20Societies%20and%20Clubs/Onramp%20Toolkit/Example%20Presentations) |


- [Cody Competition Toolkit](https://github.com/mathworks/awesome-matlab-students/tree/main/Student%20Societies%20and%20Clubs/Cody%20Competition%20Toolkit)
- [Competition Guidelines](https://github.com/mathworks/awesome-matlab-students/blob/main/Student%20Societies%20and%20Clubs/Cody%20Competition%20Toolkit/1_Competition_Guidelines.docx)
- [What is a Cody Competition?](https://github.com/mathworks/awesome-matlab-students/tree/main/Student%20Societies%20and%20Clubs/Cody%20Competition%20Toolkit/Video%20Series%20(Start%20Here)) | +| **MATLAB Onramp Party Resources**
| **Cody Competition Resources**
| +|---|---| +| - [Onramp Toolkit](https://github.com/mathworks/awesome-matlab-students/tree/main/Student%20Societies%20and%20Clubs/Onramp%20Toolkit)
- [How to host an Onramp Party Guide](https://github.com/mathworks/awesome-matlab-students/blob/main/Student%20Societies%20and%20Clubs/Onramp%20Toolkit/1_How_to_Run_an_Onramp_Party.docx)
- [Example Presentations](https://github.com/mathworks/awesome-matlab-students/tree/main/Student%20Societies%20and%20Clubs/Onramp%20Toolkit/Example%20Presentations) | - [Cody Competition Toolkit](https://github.com/mathworks/awesome-matlab-students/tree/main/Student%20Societies%20and%20Clubs/Cody%20Competition%20Toolkit)
- [Competition Guidelines](https://github.com/mathworks/awesome-matlab-students/blob/main/Student%20Societies%20and%20Clubs/Cody%20Competition%20Toolkit/1_Competition_Guidelines.docx)
- [What is a Cody Compeition?](https://github.com/mathworks/awesome-matlab-students/tree/main/Student%20Societies%20and%20Clubs/Cody%20Competition%20Toolkit/Video%20Series%20(Start%20Here)) | ## What's New in MATLAB and Simulink? ",awesome-matlab-students,mathworks,MATLAB,MATLAB,393.0,42.0,"An awesome list of helpful resources for students learning MATLAB & Simulink. List includes tips & tricks, tutorials, videos, cheat sheets, and opportunities to learn MATLAB & Simulink.",mathworks_awesome-matlab-students,CONFIG_CHANGE,Very small changes ca1cad9bfce5f13d752cca4e7e98a7c67f3b7228,2025-01-03 22:23:12,github-actions[bot],chore: update roadmap content json (#7969) Co-authored-by: kamranahmedse <4921183+kamranahmedse@users.noreply.github.com>,False,23,3,26,"--- public/roadmap-content/computer-science.json @@ -835,11 +835,6 @@ ""url"": ""https://www.bigocheatsheet.com/"", ""type"": ""article"" }, - { - ""title"": ""Big O Notation | Brilliant Math & Science Wiki"", - ""url"": ""https://brilliant.org/wiki/big-o-notation/"", - ""type"": ""article"" - }, { ""title"": ""Big O Notation — Calculating Time Complexity"", ""url"": ""https://www.youtube.com/watch?v=Z0bH0cMY0E8"", @@ -859,18 +854,13 @@ }, ""c-NrTtJuNihbHzyPEOKTW"": { ""title"": ""Big O"", - ""description"": ""The Big O notation can be used to describe how the running time of an algorithm scales with the growth of the input size, ignoring implementation details such as programming language and computer speed. Specifically, it denotes the upper bound of the growth rate of a function that relates the running time of an algorithm to its input size. It can be used to compare algorithms and determine which one is better.\n\nVisit the following resources to learn more:"", + ""description"": ""Big O Notation describes, how well an algorithm scales with the input size. It is used to describe the worst case scenario of an algorithm. It is used to compare algorithms and to determine which algorithm is better.\n\nVisit the following resources to learn more:"", ""links"": [ { ""title"": ""moviesCS 61B Lecture 19: Asymptotic Analysis"", ""url"": ""https://archive.org/details/ucberkeley_webcast_VIS4YDpuP98"", ""type"": ""article"" }, - { - ""title"": ""Big O Notation | Brilliant Math & Science Wiki"", - ""url"": ""https://brilliant.org/wiki/big-o-notation/"", - ""type"": ""article"" - }, { ""title"": ""Big O Notation — Calculating Time Complexity"", ""url"": ""https://www.youtube.com/watch?v=Z0bH0cMY0E8"", @@ -890,13 +880,8 @@ }, ""ThLpVZQIJ4diY5m0dik8m"": { ""title"": ""Big-Theta"", - ""description"": ""If a function has the same Big O and Big Omega, they also become the function's Big Theta. Big Theta is used to describe the exact growth rate of a function. It is denoted by the symbol Θ.\n\nVisit the following resources to learn more:"", + ""description"": ""While Big O Notation refers to the upper bound of a function, Big Theta Notation refers to the exact bound of a function. Big Theta Notation is used to describe the exact growth rate of a function. It is denoted by the symbol Θ.\n\nVisit the following resources to learn more:"", ""links"": [ - { - ""title"": ""Big O Notation | Brilliant Math & Science Wiki"", - ""url"": ""https://brilliant.org/wiki/big-o-notation/"", - ""type"": ""article"" - }, { ""title"": ""Big Oh Notation (and Omega and Theta)"", ""url"": ""https://www.youtube.com/watch?v=ei-A_wy5Yxw&list=PL1BaGV1cIH4UhkL8a9bJGG356covJ76qN&index=3"", @@ -911,13 +896,8 @@ }, ""X33735aeAVSlJ6yv9GS-h"": { ""title"": ""Big Omega"", - ""description"": ""The Big Omega notation is similar to the Big O notation. The only difference is that it denotes the lower bound on the growth rate of a function.\n\nVisit the following resources to learn more:"", + ""description"": ""Big Omega notation is used to describe the lower bound of a function. It is the opposite of Big O notation. While Big O is used to describe the worst case scenario of an algorithm, Big Omega is used to describe the best case scenario of an algorithm.\n\nVisit the following resources to learn more:"", ""links"": [ - { - ""title"": ""Big O Notation | Brilliant Math & Science Wiki"", - ""url"": ""https://brilliant.org/wiki/big-o-notation/"", - ""type"": ""article"" - }, { ""title"": ""Big Oh Notation (and Omega and Theta)"", ""url"": ""https://www.youtube.com/watch?v=ei-A_wy5Yxw&list=PL1BaGV1cIH4UhkL8a9bJGG356covJ76qN&index=3"", ",developer-roadmap,kamranahmedse,TypeScript,TypeScript,309677.0,40429.0,"Interactive roadmaps, guides and other educational content to help developers grow in their careers.",kamranahmedse_developer-roadmap,DOC_CHANGE,"The prefix fix: suggests a bug fix, but the actual change is not fixing code behavior, it’s improving documentation rendering" f83547531858ada228d347b2514645a9fc5a775d,2024-06-11 17:32:58,dependabot[bot],chore(deps): bump braces from 3.0.2 to 3.0.3 in /libraries/javascript (#160),False,8,8,16,"--- libraries/javascript/yarn.lock @@ -1101,11 +1101,11 @@ brace-expansion@^2.0.1: balanced-match ""^1.0.0"" braces@^3.0.2: - version ""3.0.3"" - resolved ""https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789"" - integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== + version ""3.0.2"" + resolved ""https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== dependencies: - fill-range ""^7.1.1"" + fill-range ""^7.0.1"" browserslist@^4.21.9: version ""4.21.10"" @@ -1548,10 +1548,10 @@ file-entry-cache@^8.0.0: dependencies: flat-cache ""^4.0.0"" -fill-range@^7.1.1: - version ""7.1.1"" - resolved ""https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292"" - integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== +fill-range@^7.0.1: + version ""7.0.1"" + resolved ""https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== dependencies: to-regex-range ""^5.0.1"" ",standard-webhooks,standard-webhooks,Elixir,Elixir,1390.0,37.0,The Standard Webhooks specification,standard-webhooks_standard-webhooks,CODE_IMPROVEMENT,Code change: type annotation added ca32ee3a0eafe6b16d4332f0f966b556d2bb9cad,2025-03-17 18:25:08,2dust,Update proxy_packagename.txt,False,173,1,174,"--- V2rayNG/app/src/main/assets/proxy_packagename.txt @@ -4,7 +4,6 @@ au.com.shiftyjelly.pocketcasts bbc.mobile.news.ww be.mygod.vpnhotspot ch.protonmail.android -cm.aptoide.pt co.wanqu.android com.alphainventor.filemanager com.amazon.kindle @@ -35,9 +34,7 @@ com.chrome.canary com.chrome.dev com.cl.newt66y com.cradle.iitc_mobile -org.exarhteam.iitc_mobile com.cygames.shadowverse -com.dcard.freedom com.devhd.feedly com.devolver.reigns2 com.discord @@ -111,7 +108,6 @@ com.ifttt.ifttt com.imgur.mobile com.innologica.inoreader com.instagram.android -com.instagram.lite com.instapaper.android com.jarvanh.vpntether com.kapp.youtube.final @@ -119,7 +115,6 @@ com.klinker.android.twitter_l com.lastpass.lpandroid com.linecorp.linelite com.lingodeer -com.ltnnews.news com.mediapods.tumbpods com.mgoogle.android.gms com.microsoft.emmx @@ -164,7 +159,6 @@ com.slack com.snaptube.premium com.sololearn com.sonelli.juicessh -com.sparkslab.dcardreader com.spotify.music com.tencent.huatuo com.termux @@ -179,13 +173,10 @@ com.twitter.android com.u91porn com.u9porn com.ubisoft.dance.justdance2015companion -com.udn.news com.utopia.pxview +com.valvesoftware.android.steam.communimunity com.valvesoftware.android.steam.community -com.vanced.manager com.vanced.android.youtube -com.vanced.android.apps.youtube.music -com.mgoogle.android.gms com.vimeo.android.videoapp com.vivaldi.browser com.vivaldi.browser.snapshot @@ -195,12 +186,10 @@ com.wire com.wuxiangai.refactor com.xda.labs com.xvideos.app -com.yahoo.mobile.client.android.superapp com.yandex.browser com.yandex.browser.beta com.yandex.browser.alpha com.z28j.feel -com.zhiliaoapp.musically con.medium.reader de.apkgrabber de.robv.android.xposed.installer @@ -221,7 +210,6 @@ jp.bokete.app.android jp.naver.line.android jp.pxv.android luo.speedometergpspro -m.cna.com.tw.App mark.via.gp me.tshine.easymark net.teeha.android.url_shortener @@ -238,7 +226,6 @@ org.mozilla.firefox_beta org.mozilla.focus org.schabi.newpipe org.telegram.messenger -org.telegram.messenger.web org.telegram.multi org.telegram.plus org.thunderdog.challegram @@ -252,162 +239,3 @@ tw.com.gamer.android.activecenter videodownloader.downloadvideo.downloader uk.co.bbc.learningenglish com.ted.android -de.danoeh.antennapod -com.kiwibrowser.browser -nekox.messenger -com.nextcloud.client -com.aurora.store -com.aurora.adroid -chat.simplex.app -im.vector.app -network.loki.messenger -eu.siacs.conversations -xyz.nextalone.nagram -net.programmierecke.radiodroid2 -im.fdx.v2ex -ml.docilealligator.infinityforreddit -com.bytemyth.ama -app.vanadium.browser -com.cakewallet.cake_wallet -org.purplei2p.i2pd -dk.tacit.android.foldersync.lite -com.nononsenseapps.feeder -com.m2049r.xmrwallet -com.paypal.android.p2pmobile -com.google.android.apps.googlevoice -com.readdle.spark -org.torproject.torbrowser -com.deepl.mobiletranslator -com.microsoft.bing -com.keylesspalace.tusky -com.ottplay.ottplay -ru.iptvremote.android.iptv.pro -jp.naver.line.android -com.xmflsct.app.tooot -com.forem.android -app.revanced.android.youtube -com.mgoogle.android.gms -com.pionex.client -vip.mytokenpocket -im.token.app -com.linekong.mars24 -com.feixiaohao -com.aicoin.appandroid -com.binance.dev -com.kraken.trade -com.okinc.okex.gp -com.authy.authy -air.com.rosettastone.mobile.CoursePlayer -com.blizzard.bma -com.amazon.kindle -com.google.android.apps.fitness -net.tsapps.appsales -com.wemesh.android -com.google.android.apps.googleassistant -allen.town.focus.reader -me.hyliu.fluent_reader_lite -com.aljazeera.mobile -com.ft.news -de.marmaro.krt.ffupdater -myradio.radio.fmradio.liveradio.radiostation -com.google.earth -eu.kanade.tachiyomi.j2k -com.audials -com.microsoft.skydrive -com.mb.android.tg -com.melodis.midomiMusicIdentifier.freemium -com.foxnews.android -ch.threema.app -com.briarproject.briar.android -foundation.e.apps -com.valvesoftware.android.steam.friendsui -com.imback.yeetalk -so.onekey.app.wallet -com.xc3fff0e.xmanager -meditofoundation.medito -com.picol.client -com.streetwriters.notesnook -shanghai.panewsApp.com -org.coursera.android -com.positron_it.zlib -com.blizzard.messenger -com.javdb.javrocket -com.picacomic.fregata -com.fxl.chacha -me.proton.android.drive -com.lastpass.lpandroid -com.tradingview.tradingviewapp -com.deviantart.android.damobile -com.fusionmedia.investing -com.ewa.ewaapp -com.duolingo -com.hellotalk -io.github.huskydg.magisk -com.jsy.xpgbox -com.hostloc.app.hostloc -com.dena.pokota -com.vitorpamplona.amethyst -com.zhiliaoapp.musically -us.spotco.fennec_dos -com.fongmi.android.tv -com.pocketprep.android.itcybersecurity -com.cloudtv -com.glassdoor.app -com.indeed.android.jobsearch -com.linkedin.android -com.github.tvbox.osc.bh -com.example.douban -com.sipnetic.app -com.microsoft.rdc.androidx -org.zwanoo.android.speedtest -com.sonelli.juicessh -com.scmp.newspulse -org.lsposed.manager -mnn.Android -com.thomsonretuers.reuters -com.guardian -com.ttxapps.onesyncv2 -org.fcitx.fcitx5.android.updater -com.tailscale.ipn -tw.nekomimi.nekogram -com.nexon.kartdrift -io.syncapps.lemmy_sync -com.seazon.feedme -com.readwise -de.spiritcroc.riotx -com.openai.chatgpt -io.changenow.changenow -com.poe.android -com.twingate -com.blinkslabs.blinkist.android -com.ichi2.anki -md.obsidian -com.musixmatch.android.lyrify -com.cyber.turbo -com.offsec.nethunter -me.ghui.v2er -com.samruston.twitter -org.adaway -org.swiftapps.swiftbackup -com.zerotier.one -com.quietmobile -com.instagram.barcelona -im.molly.app -com.rvx.android.youtube -com.deepl.mobiletranslator -com.qingsong.yingmi -com.lemurbrowser.exts -com.silverdev.dnartdroid -me.ash.reader -de.tutao.tutanota -dev.imranr.obtainium -com.getsomeheadspace.android -org.cromite.cromite -com.nutomic.syncthingandroid -com.bumble.app -com.cnn.mobile.android.phone -com.google.android.apps.authenticator2 -com.microsoft.copilot -com.netflix.NGP.Storyteller -com.Slack -com.server.auditor.ssh.client \ No newline at end of file ",v2rayng,2dust,Kotlin,Kotlin,38863.0,5828.0,"A V2Ray client for Android, support Xray core and v2fly core",2dust_v2rayng,CONFIG_CHANGE,txt file updated 4a087ba3a6f2a0b3b973a8019e34468fca5ac7eb,2024-07-10 00:51:11,Will Ceolin,Stripe: Set retries,False,4,0,4,"--- config/runtime.exs @@ -25,8 +25,6 @@ if config_env() in [:prod, :dev] do api_key: System.get_env(""STRIPE_API_KEY""), webhook_secret: System.get_env(""STRIPE_WEBHOOK_SECRET"") - config :stripity_stripe, :retries, max_attempts: 5, base_backoff: 500, max_backoff: 2_000 - # Cloudflare images config :zoonk, :cloudflare, account_id: System.get_env(""CLOUDFLARE_ACCOUNT_ID""), --- config/test.exs @@ -44,5 +44,3 @@ config :stripity_stripe, api_key: ""sk_test_thisisaboguskey"", webhook_secret: ""whsec_thisisaboguskey"", api_base_url: ""http://localhost:12111"" - -config :stripity_stripe, :retries, max_attempts: 5, base_backoff: 500, max_backoff: 2_000 ",uneebee,zoonk,Elixir,Elixir,1339.0,83.0,Platform for creating interactive courses.,zoonk_uneebee,NEW_FEAT,retries are set ebe7dd2b15c8cc13fc28a5182180ac3280f4f078,2025-01-09 23:49:40,Ao Li,"KAFKA-18418: Use CDL to block the thread termination to avoid flaky tests (#18418) This PR fixed a race-condition in KafkaStreamsTest, by replacing a non-deterministic sleep with a CountDownLatch to fully control how long a thread blocks. Reviewers: David Arthur , Matthias J. Sax ",False,54,17,71,"--- streams/src/test/java/org/apache/kafka/streams/KafkaStreamsTest.java @@ -89,7 +89,6 @@ import java.util.Optional; import java.util.Properties; import java.util.Set; import java.util.UUID; -import java.util.concurrent.CountDownLatch; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ThreadFactory; @@ -146,7 +145,7 @@ public class KafkaStreamsTest { private Properties props; private MockAdminClient adminClient; private StateListenerStub streamsStateListener; - + @Mock private StreamThread streamThreadOne; @Mock @@ -345,49 +344,13 @@ public class KafkaStreamsTest { }).when(thread).start(); } - private CountDownLatch terminableThreadBlockingLatch = new CountDownLatch(1); - private void prepareTerminableThread(final StreamThread thread) throws InterruptedException { doAnswer(invocation -> { - terminableThreadBlockingLatch.await(); + Thread.sleep(2000L); return null; }).when(thread).join(); } - private class KafkaStreamsWithTerminableThread extends KafkaStreams { - - KafkaStreamsWithTerminableThread(final Topology topology, - final Properties props, - final KafkaClientSupplier clientSupplier, - final Time time) { - super(topology, props, clientSupplier, time); - } - - - KafkaStreamsWithTerminableThread(final Topology topology, - final Properties props, - final KafkaClientSupplier clientSupplier) { - super(topology, props, clientSupplier); - } - - KafkaStreamsWithTerminableThread(final Topology topology, - final StreamsConfig applicationConfigs) { - super(topology, applicationConfigs); - } - - KafkaStreamsWithTerminableThread(final Topology topology, - final StreamsConfig applicationConfigs, - final KafkaClientSupplier clientSupplier) { - super(topology, applicationConfigs, clientSupplier); - } - - @Override - public void close() { - terminableThreadBlockingLatch.countDown(); - super.close(); - } - } - @Test public void testShouldTransitToNotRunningIfCloseRightAfterCreated() { prepareStreams(); @@ -984,7 +947,7 @@ public class KafkaStreamsTest { prepareThreadState(streamThreadOne, state1); prepareThreadState(streamThreadTwo, state2); prepareTerminableThread(streamThreadOne); - try (final KafkaStreams streams = new KafkaStreamsWithTerminableThread(getBuilderWithSource().build(), props, supplier, time)) { + try (final KafkaStreams streams = new KafkaStreams(getBuilderWithSource().build(), props, supplier, time)) { streams.start(); waitForCondition( () -> streams.state() == KafkaStreams.State.RUNNING, @@ -1009,7 +972,7 @@ public class KafkaStreamsTest { when(mockClientSupplier.getAdmin(any())).thenReturn(adminClient); - try (final KafkaStreams streams = new KafkaStreamsWithTerminableThread(getBuilderWithSource().build(), props, mockClientSupplier, time)) { + try (final KafkaStreams streams = new KafkaStreams(getBuilderWithSource().build(), props, mockClientSupplier, time)) { streams.start(); waitForCondition( () -> streams.state() == KafkaStreams.State.RUNNING, @@ -1034,7 +997,7 @@ public class KafkaStreamsTest { prepareThreadState(streamThreadOne, state1); prepareThreadState(streamThreadTwo, state2); prepareTerminableThread(streamThreadOne); - try (final KafkaStreams streams = new KafkaStreamsWithTerminableThread(getBuilderWithSource().build(), props, supplier, time)) { + try (final KafkaStreams streams = new KafkaStreams(getBuilderWithSource().build(), props, supplier, time)) { streams.start(); waitForCondition( () -> streams.state() == KafkaStreams.State.RUNNING, @@ -1191,7 +1154,7 @@ public class KafkaStreamsTest { prepareTerminableThread(streamThreadOne); // do not use mock time so that it can really elapse - try (final KafkaStreams streams = new KafkaStreamsWithTerminableThread(getBuilderWithSource().build(), props, supplier)) { + try (final KafkaStreams streams = new KafkaStreams(getBuilderWithSource().build(), props, supplier)) { assertFalse(streams.close(Duration.ofMillis(10L))); } } @@ -1203,7 +1166,7 @@ public class KafkaStreamsTest { prepareStreamThread(streamThreadTwo, 2); prepareTerminableThread(streamThreadOne); - try (final KafkaStreams streams = new KafkaStreamsWithTerminableThread(getBuilderWithSource().build(), props, supplier, time)) { + try (final KafkaStreams streams = new KafkaStreams(getBuilderWithSource().build(), props, supplier, time)) { assertThrows(IllegalArgumentException.class, () -> streams.close(Duration.ofMillis(-1L))); } } @@ -1215,7 +1178,7 @@ public class KafkaStreamsTest { prepareStreamThread(streamThreadTwo, 2); prepareTerminableThread(streamThreadOne); - try (final KafkaStreams streams = new KafkaStreamsWithTerminableThread(getBuilderWithSource().build(), props, supplier, time)) { + try (final KafkaStreams streams = new KafkaStreams(getBuilderWithSource().build(), props, supplier, time)) { // with mock time that does not elapse, close would not return if it ever waits on the state transition assertFalse(streams.close(Duration.ZERO)); } @@ -1230,7 +1193,7 @@ public class KafkaStreamsTest { final KafkaStreams.CloseOptions closeOptions = new KafkaStreams.CloseOptions(); closeOptions.timeout(Duration.ofMillis(10L)); - try (final KafkaStreams streams = new KafkaStreamsWithTerminableThread(getBuilderWithSource().build(), props, supplier)) { + try (final KafkaStreams streams = new KafkaStreams(getBuilderWithSource().build(), props, supplier)) { assertFalse(streams.close(closeOptions)); } } @@ -1244,7 +1207,7 @@ public class KafkaStreamsTest { final KafkaStreams.CloseOptions closeOptions = new KafkaStreams.CloseOptions(); closeOptions.timeout(Duration.ofMillis(-1L)); - try (final KafkaStreams streams = new KafkaStreamsWithTerminableThread(getBuilderWithSource().build(), props, supplier, time)) { + try (final KafkaStreams streams = new KafkaStreams(getBuilderWithSource().build(), props, supplier, time)) { assertThrows(IllegalArgumentException.class, () -> streams.close(closeOptions)); } } @@ -1258,7 +1221,7 @@ public class KafkaStreamsTest { final KafkaStreams.CloseOptions closeOptions = new KafkaStreams.CloseOptions(); closeOptions.timeout(Duration.ZERO); - try (final KafkaStreams streams = new KafkaStreamsWithTerminableThread(getBuilderWithSource().build(), props, supplier)) { + try (final KafkaStreams streams = new KafkaStreams(getBuilderWithSource().build(), props, supplier)) { assertFalse(streams.close(closeOptions)); } } @@ -1277,7 +1240,7 @@ public class KafkaStreamsTest { final KafkaStreams.CloseOptions closeOptions = new KafkaStreams.CloseOptions(); closeOptions.timeout(Duration.ofMillis(10L)); closeOptions.leaveGroup(true); - try (final KafkaStreams streams = new KafkaStreamsWithTerminableThread(getBuilderWithSource().build(), props, mockClientSupplier)) { + try (final KafkaStreams streams = new KafkaStreams(getBuilderWithSource().build(), props, mockClientSupplier)) { assertFalse(streams.close(closeOptions)); } } @@ -1295,7 +1258,7 @@ public class KafkaStreamsTest { final KafkaStreams.CloseOptions closeOptions = new KafkaStreams.CloseOptions(); closeOptions.timeout(Duration.ofMillis(-1L)); closeOptions.leaveGroup(true); - try (final KafkaStreams streams = new KafkaStreamsWithTerminableThread(getBuilderWithSource().build(), props, mockClientSupplier, time)) { + try (final KafkaStreams streams = new KafkaStreams(getBuilderWithSource().build(), props, mockClientSupplier, time)) { assertThrows(IllegalArgumentException.class, () -> streams.close(closeOptions)); } } @@ -1314,7 +1277,7 @@ public class KafkaStreamsTest { final KafkaStreams.CloseOptions closeOptions = new KafkaStreams.CloseOptions(); closeOptions.timeout(Duration.ZERO); closeOptions.leaveGroup(true); - try (final KafkaStreams streams = new KafkaStreamsWithTerminableThread(getBuilderWithSource().build(), props, mockClientSupplier)) { + try (final KafkaStreams streams = new KafkaStreams(getBuilderWithSource().build(), props, mockClientSupplier)) { assertFalse(streams.close(closeOptions)); } } @@ -1337,7 +1300,7 @@ public class KafkaStreamsTest { builder.table(""topic"", Materialized.as(""store"")); props.setProperty(StreamsConfig.METRICS_RECORDING_LEVEL_CONFIG, RecordingLevel.DEBUG.name()); - try (final KafkaStreams streams = new KafkaStreamsWithTerminableThread(getBuilderWithSource().build(), props, supplier, time)) { + try (final KafkaStreams streams = new KafkaStreams(getBuilderWithSource().build(), props, supplier, time)) { streams.start(); } @@ -1361,7 +1324,7 @@ public class KafkaStreamsTest { final StreamsConfig mockConfig = spy(config); when(mockConfig.getKafkaClientSupplier()).thenReturn(supplier); - try (final KafkaStreams ignored = new KafkaStreamsWithTerminableThread(getBuilderWithSource().build(), mockConfig)) { + try (final KafkaStreams ignored = new KafkaStreams(getBuilderWithSource().build(), mockConfig)) { // no-op } // It's called once in above when mock @@ -1398,7 +1361,7 @@ public class KafkaStreamsTest { final StreamsConfig config = new StreamsConfig(props); final StreamsConfig mockConfig = spy(config); - try (final KafkaStreams ignored = new KafkaStreamsWithTerminableThread(getBuilderWithSource().build(), mockConfig, supplier)) { + try (final KafkaStreams ignored = new KafkaStreams(getBuilderWithSource().build(), mockConfig, supplier)) { // no-op } // It's called once in above when mock ",apache-kafka,,Java,Java,,,"a distributed, open-source streaming platform designed for building real-time data pipelines and streaming applications",_apache-kafka,BUG_FIX,fixed the race condition in KafkaStream tests 40d5d2edccd00b4a66fb0e24d887d8b1a0d7ea0e,2024-12-02 06:40:39,Satya Vinay,Add Stripe engineering blog (#592),False,4,0,4,"--- README-ja.md @@ -1732,7 +1732,6 @@ Notes * [Salesforce Engineering Blog](https://developer.salesforce.com/blogs/engineering/) * [Slack Engineering Blog](https://slack.engineering/) * [Spotify Labs](https://labs.spotify.com/) -* [Stripe Engineering Blog](https://stripe.com/blog/engineering) * [Twilio Engineering Blog](http://www.twilio.com/engineering) * [Twitter Engineering](https://engineering.twitter.com/) * [Uber Engineering Blog](http://eng.uber.com/) --- README-zh-Hans.md @@ -1743,7 +1743,6 @@ Notes * [Salesforce Engineering Blog](https://developer.salesforce.com/blogs/engineering/) * [Slack Engineering Blog](https://slack.engineering/) * [Spotify Labs](https://labs.spotify.com/) -* [Stripe Engineering Blog](https://stripe.com/blog/engineering) * [Twilio Engineering Blog](http://www.twilio.com/engineering) * [Twitter Engineering](https://engineering.twitter.com/) * [Uber Engineering Blog](http://eng.uber.com/) --- README-zh-TW.md @@ -1733,7 +1733,6 @@ Notes * [Salesforce Engineering Blog](https://developer.salesforce.com/blogs/engineering/) * [Slack Engineering Blog](https://slack.engineering/) * [Spotify Labs](https://labs.spotify.com/) -* [Stripe Engineering Blog](https://stripe.com/blog/engineering) * [Twilio Engineering Blog](http://www.twilio.com/engineering) * [Twitter Engineering](https://engineering.twitter.com/) * [Uber Engineering Blog](http://eng.uber.com/) --- README.md @@ -1783,7 +1783,6 @@ Handy metrics based on numbers above: * [Salesforce Engineering Blog](https://developer.salesforce.com/blogs/engineering/) * [Slack Engineering Blog](https://slack.engineering/) * [Spotify Labs](https://labs.spotify.com/) -* [Stripe Engineering Blog](https://stripe.com/blog/engineering) * [Twilio Engineering Blog](http://www.twilio.com/engineering) * [Twitter Engineering](https://blog.twitter.com/engineering/) * [Uber Engineering Blog](http://eng.uber.com/) ",system-design-primer,donnemartin,Python,Python,290909.0,48355.0,Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.,donnemartin_system-design-primer,DOC_CHANGE,Obvious 6c1d2efd04c9225ce7b76295be30ab954f8038c5,2022-05-28 18:03:12,Evan You,wip: setup() tests,False,358,75,433,"--- src/core/instance/lifecycle.ts @@ -18,7 +18,7 @@ import { invokeWithErrorHandling } from '../util/index' import { currentInstance, setCurrentInstance } from 'v3/currentInstance' -import { syncSetupAttrs } from 'v3/apiSetup' +import { syncObject } from 'v3/apiSetup' export let activeInstance: any = null export let isUpdatingChildComponent: boolean = false @@ -253,13 +253,12 @@ export function updateChildComponent( // Any static slot children from the parent may have changed during parent's // update. Dynamic scoped slots may also have changed. In such cases, a forced // update is necessary to ensure correctness. - let needsForceUpdate = !!( + const needsForceUpdate = !!( renderChildren || // has new static slots vm.$options._renderChildren || // has old static slots hasDynamicScopedSlot ) - const prevVNode = vm.$vnode vm.$options._parentVnode = parentVnode vm.$vnode = parentVnode // update vm's placeholder node without re-render @@ -272,22 +271,10 @@ export function updateChildComponent( // update $attrs and $listeners hash // these are also reactive so they may trigger child update if the child // used them during render - const attrs = parentVnode.data.attrs || emptyObject + vm.$attrs = parentVnode.data.attrs || emptyObject if (vm._attrsProxy) { - // force update if attrs are accessed and has changed since it may be - // passed to a child component. - if ( - syncSetupAttrs( - vm._attrsProxy, - attrs, - (prevVNode.data && prevVNode.data.attrs) || emptyObject, - vm - ) - ) { - needsForceUpdate = true - } + syncObject(vm._attrsProxy, vm.$attrs) } - vm.$attrs = attrs vm.$listeners = listeners || emptyObject --- src/core/instance/render.ts @@ -16,7 +16,7 @@ import VNode, { createEmptyVNode } from '../vdom/vnode' import { isUpdatingChildComponent } from './lifecycle' import type { Component } from 'typescript/component' import { setCurrentInstance } from 'v3/currentInstance' -import { syncSetupSlots } from 'v3/apiSetup' +import { syncObject } from 'v3/apiSetup' export function initRender(vm: Component) { vm._vnode = null // the root of the child tree @@ -97,70 +97,73 @@ export function renderMixin(Vue: Component) { Vue.prototype._render = function (): VNode { const vm: Component = this const { render, _parentVnode } = vm.$options + setCurrentInstance(vm) - if (_parentVnode) { - vm.$scopedSlots = normalizeScopedSlots( - _parentVnode.data!.scopedSlots, - vm.$slots, - vm.$scopedSlots - ) - if (vm._slotsProxy) { - syncSetupSlots(vm._slotsProxy, vm.$scopedSlots) + try { + if (_parentVnode) { + vm.$scopedSlots = normalizeScopedSlots( + _parentVnode.data!.scopedSlots, + vm.$slots, + vm.$scopedSlots + ) + if (vm._slotsProxy) { + syncObject(vm._slotsProxy, vm.$scopedSlots) + } } - } - // set parent vnode. this allows render functions to have access - // to the data on the placeholder node. - vm.$vnode = _parentVnode! - // render self - let vnode - try { - // There's no need to maintain a stack because all render fns are called - // separately from one another. Nested component's render fns are called - // when parent component is patched. - setCurrentInstance(vm) - currentRenderingInstance = vm - vnode = render.call(vm._renderProxy, vm.$createElement) - } catch (e: any) { - handleError(e, vm, `render`) - // return error render result, - // or previous vnode to prevent render error causing blank component - /* istanbul ignore else */ - if (__DEV__ && vm.$options.renderError) { - try { - vnode = vm.$options.renderError.call( - vm._renderProxy, - vm.$createElement, - e - ) - } catch (e: any) { - handleError(e, vm, `renderError`) + // set parent vnode. this allows render functions to have access + // to the data on the placeholder node. + vm.$vnode = _parentVnode! + // render self + let vnode + try { + // There's no need to maintain a stack because all render fns are called + // separately from one another. Nested component's render fns are called + // when parent component is patched. + currentRenderingInstance = vm + vnode = render.call(vm._renderProxy, vm.$createElement) + } catch (e: any) { + handleError(e, vm, `render`) + // return error render result, + // or previous vnode to prevent render error causing blank component + /* istanbul ignore else */ + if (__DEV__ && vm.$options.renderError) { + try { + vnode = vm.$options.renderError.call( + vm._renderProxy, + vm.$createElement, + e + ) + } catch (e: any) { + handleError(e, vm, `renderError`) + vnode = vm._vnode + } + } else { vnode = vm._vnode } - } else { - vnode = vm._vnode + } finally { + currentRenderingInstance = null + } + // if the returned array contains only a single node, allow it + if (isArray(vnode) && vnode.length === 1) { + vnode = vnode[0] + } + // return empty vnode in case the render function errored out + if (!(vnode instanceof VNode)) { + if (__DEV__ && isArray(vnode)) { + warn( + 'Multiple root nodes returned from render function. Render function ' + + 'should return a single root node.', + vm + ) + } + vnode = createEmptyVNode() } + // set parent + vnode.parent = _parentVnode + return vnode } finally { - currentRenderingInstance = null setCurrentInstance() } - // if the returned array contains only a single node, allow it - if (isArray(vnode) && vnode.length === 1) { - vnode = vnode[0] - } - // return empty vnode in case the render function errored out - if (!(vnode instanceof VNode)) { - if (__DEV__ && isArray(vnode)) { - warn( - 'Multiple root nodes returned from render function. Render function ' + - 'should return a single root node.', - vm - ) - } - vnode = createEmptyVNode() - } - // set parent - vnode.parent = _parentVnode - return vnode } } --- src/core/vdom/create-element.ts @@ -11,8 +11,7 @@ import { isTrue, isObject, isPrimitive, - resolveAsset, - isFunction + resolveAsset } from '../util/index' import { normalizeChildren, simpleNormalizeChildren } from './helpers/index' @@ -77,7 +76,7 @@ export function _createElement( ) } // support single function children as default scoped slot - if (isArray(children) && isFunction(children[0])) { + if (isArray(children) && typeof children[0] === 'function') { data = data || {} data.scopedSlots = { default: children[0] } children.length = 0 --- src/platforms/web/runtime/modules/attrs.ts @@ -1,6 +1,6 @@ import { isIE, isIE9, isEdge } from 'core/util/env' -import { extend, isDef, isUndef, isTrue } from 'shared/util' +import { extend, isDef, isUndef } from 'shared/util' import type { VNodeWithData } from 'typescript/vnode' import { @@ -26,7 +26,7 @@ function updateAttrs(oldVnode: VNodeWithData, vnode: VNodeWithData) { const oldAttrs = oldVnode.data.attrs || {} let attrs: any = vnode.data.attrs || {} // clone observed objects, as the user probably wants to mutate it - if (isDef(attrs.__ob__) || isTrue(attrs._v_attr_proxy)) { + if (isDef(attrs.__ob__)) { attrs = vnode.data.attrs = extend({}, attrs) } --- src/platforms/web/runtime/modules/dom-props.ts @@ -1,4 +1,4 @@ -import { isDef, isUndef, extend, toNumber, isTrue } from 'shared/util' +import { isDef, isUndef, extend, toNumber } from 'shared/util' import type { VNodeWithData } from 'typescript/vnode' import { isSVG } from 'web/util/index' @@ -13,7 +13,7 @@ function updateDOMProps(oldVnode: VNodeWithData, vnode: VNodeWithData) { const oldProps = oldVnode.data.domProps || {} let props = vnode.data.domProps || {} // clone observed objects, as the user probably wants to mutate it - if (isDef(props.__ob__) || isTrue(props._v_attr_proxy)) { + if (isDef(props.__ob__)) { props = vnode.data.domProps = extend({}, props) } --- src/v3/apiSetup.ts @@ -1,8 +1,8 @@ import { Component } from 'typescript/component' import type { SetupContext } from 'typescript/options' -import { def, invokeWithErrorHandling, isReserved, warn } from '../core/util' +import { invokeWithErrorHandling, isReserved, warn } from '../core/util' import VNode from '../core/vdom/vnode' -import { bind, emptyObject, isFunction, isObject } from '../shared/util' +import { bind, isFunction, isObject } from '../shared/util' import { currentInstance, setCurrentInstance } from './currentInstance' import { isRef } from './reactivity/ref' @@ -75,55 +75,19 @@ function proxySetupProperty( function initAttrsProxy(vm: Component) { if (!vm._attrsProxy) { - const proxy = (vm._attrsProxy = {}) - def(proxy, '_v_attr_proxy', true) - syncSetupAttrs(proxy, vm.$attrs, emptyObject, vm) + syncObject((vm._attrsProxy = {}), vm.$attrs) } return vm._attrsProxy } -export function syncSetupAttrs( - to: any, - from: any, - prev: any, - instance: Component -) { - let changed = false - for (const key in from) { - if (!(key in to)) { - changed = true - defineProxyAttr(to, key, instance) - } else if (from[key] !== prev[key]) { - changed = true - } - } - for (const key in to) { - if (!(key in from)) { - changed = true - delete to[key] - } - } - return changed -} - -function defineProxyAttr(proxy: any, key: string, instance: Component) { - Object.defineProperty(proxy, key, { - enumerable: true, - configurable: true, - get() { - return instance.$attrs[key] - } - }) -} - function initSlotsProxy(vm: Component) { if (!vm._slotsProxy) { - syncSetupSlots((vm._slotsProxy = {}), vm.$scopedSlots) + syncObject((vm._slotsProxy = {}), vm.$scopedSlots) } return vm._slotsProxy } -export function syncSetupSlots(to: any, from: any) { +export function syncObject(to: any, from: any) { for (const key in from) { to[key] = from[key] } --- test/unit/features/v3/apiSetup.spec.ts @@ -1,236 +0,0 @@ -import { h, ref, reactive } from 'v3' -import { nextTick } from 'core/util' -import { effect } from 'v3/reactivity/effect' -import Vue from 'vue' - -function renderToString(comp: any) { - const vm = new Vue(comp).$mount() - return vm.$el.outerHTML -} - -describe('api: setup context', () => { - it('should expose return values to template render context', () => { - const Comp = { - setup() { - return { - // ref should auto-unwrap - ref: ref('foo'), - // object exposed as-is - object: reactive({ msg: 'bar' }), - // primitive value exposed as-is - value: 'baz' - } - }, - render() { - return h('div', `${this.ref} ${this.object.msg} ${this.value}`) - } - } - expect(renderToString(Comp)).toMatch(`
foo bar baz
`) - }) - - it('should support returning render function', () => { - const Comp = { - setup() { - return () => { - return h('div', 'hello') - } - } - } - expect(renderToString(Comp)).toMatch(`
hello
`) - }) - - it('props', async () => { - const count = ref(0) - let dummy - - const Parent = { - render: () => h(Child, { props: { count: count.value } }) - } - - const Child = { - props: { count: Number }, - setup(props) { - effect(() => { - dummy = props.count - }) - return () => h('div', props.count) - } - } - - const vm = new Vue(Parent).$mount() - expect(vm.$el.outerHTML).toMatch(`
0
`) - expect(dummy).toBe(0) - - // props should be reactive - count.value++ - await nextTick() - expect(vm.$el.outerHTML).toMatch(`
1
`) - expect(dummy).toBe(1) - }) - - it('context.attrs', async () => { - const toggle = ref(true) - - const Parent = { - render: () => - h(Child, { attrs: toggle.value ? { id: 'foo' } : { class: 'baz' } }) - } - - const Child = { - // explicit empty props declaration - // puts everything received in attrs - // disable implicit fallthrough - inheritAttrs: false, - setup(_props: any, { attrs }: any) { - return () => h('div', { attrs }) - } - } - - const vm = new Vue(Parent).$mount() - expect(vm.$el.outerHTML).toMatch(`
`) - - // should update even though it's not reactive - toggle.value = false - await nextTick() - expect(vm.$el.outerHTML).toMatch(`
`) - }) - - // vuejs/core #4161 - it('context.attrs in child component slots', async () => { - const toggle = ref(true) - - const Wrapper = { - template: `
` - } - - const Child = { - inheritAttrs: false, - setup(_: any, { attrs }: any) { - return () => { - return h(Wrapper, [h('div', { attrs })]) - } - } - } - - const Parent = { - render: () => - h(Child, { attrs: toggle.value ? { id: 'foo' } : { class: 'baz' } }) - } - - const vm = new Vue(Parent).$mount() - expect(vm.$el.outerHTML).toMatch(`
`) - - // should update even though it's not reactive - toggle.value = false - await nextTick() - expect(vm.$el.outerHTML).toMatch(`
`) - }) - - it('context.attrs in child component scoped slots', async () => { - const toggle = ref(true) - - const Wrapper = { - template: `
` - } - - const Child = { - inheritAttrs: false, - setup(_: any, { attrs }: any) { - return () => { - return h(Wrapper, { - scopedSlots: { - default: () => h('div', { attrs }) - } - }) - } - } - } - - const Parent = { - render: () => - h(Child, { attrs: toggle.value ? { id: 'foo' } : { class: 'baz' } }) - } - - const vm = new Vue(Parent).$mount() - expect(vm.$el.outerHTML).toMatch(`
`) - - // should update even though it's not reactive - toggle.value = false - await nextTick() - expect(vm.$el.outerHTML).toMatch(`
`) - }) - - it('context.slots', async () => { - const id = ref('foo') - - const Child = { - setup(props: any, { slots }: any) { - return () => h('div', [...slots.foo(), ...slots.bar()]) - } - } - - const Parent = { - components: { Child }, - setup() { - return { id } - }, - template: ` - - - ` - } - - const vm = new Vue(Parent).$mount() - expect(vm.$el.outerHTML).toMatch(`
foobar
`) - - // should update even though it's not reactive - id.value = 'baz' - await nextTick() - expect(vm.$el.outerHTML).toMatch(`
bazbar
`) - }) - - it('context.emit', async () => { - const count = ref(0) - const spy = vi.fn() - - const Child = { - props: { - count: { - type: Number, - default: 1 - } - }, - setup(props, { emit }) { - return () => - h( - 'div', - { - on: { click: () => emit('inc', props.count + 1) } - }, - props.count - ) - } - } - - const Parent = { - components: { Child }, - setup: () => ({ - count, - onInc(newVal: number) { - spy() - count.value = newVal - } - }), - template: `` - } - - const vm = new Vue(Parent).$mount() - expect(vm.$el.outerHTML).toMatch(`
0
`) - - // emit should trigger parent handler - triggerEvent(vm.$el as HTMLElement, 'click') - expect(spy).toHaveBeenCalled() - await nextTick() - expect(vm.$el.outerHTML).toMatch(`
1
`) - }) -}) ",vue,vuejs,TypeScript,TypeScript,208427.0,33725.0,"This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core",vuejs_vue,NEW_FEAT,Obvious e26dbf9ad57e4d70aae639e36580e15cb3feb9ba,2022-05-26 15:27:15,Robert Felker,update links,False,4,1,5,"--- README.md @@ -26,14 +26,11 @@ If you appreciate the content 📖, support projects visibility, give 👍| ⭐|
",awesome-flutter,solido,Dart,Dart,54974.0,6726.0,"An awesome list that curates the best Flutter libraries, tools, tutorials, articles and more.",solido_awesome-flutter,DOC_CHANGE,Obvious 80bbbdf59ea703d4c252a89529566ab0540ec8b8,2022-12-19 20:55:18,Vinicius Souza,Reorganize Courses category,False,21,27,48,"--- README.md @@ -8,8 +8,8 @@

-## Contents - +### Content +- [Courses](#courses) - [Accessibility](#accessibility) - [Alexa](#alexa) - [Analytics](#analytics) @@ -28,7 +28,6 @@ - [Command Line](#command-line) - [Concurrency](#concurrency) - [Core Data](#core-data) -- [Courses](#courses) - [Database](#database) - [Data Structures / Algorithms](#data-structures--algorithms) - [Date & Time](#date--time) @@ -168,6 +167,31 @@ - [Other Awesome Lists](#other-awesome-lists) - [Contributing](#contributing-and-license) +## Courses + +### Getting Started + +*Courses, tutorials and guides* + +- [Apple- Start Developing with iOS](https://developer.apple.com/library/archive/referencelibrary/GettingStarted/DevelopiOSAppsSwift/) - Apple Guide. +- [Apple - Object-Oriented Programming with Objective-C](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/OOP_ObjC/Introduction/Introduction.html) +- [Apple - Programming with Objective-C](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/Introduction/Introduction.html) +- [CodeProject](https://www.codeproject.com/articles/88929/getting-started-with-iphone-and-ios-development) - Getting Started with iPhone and iOS Development. +- [Lifehacker](https://lifehacker.com/i-want-to-write-ios-apps-where-do-i-start-1644802175) - I Want to Write iOS Apps. Where Do I Start? +- [Ray Wenderlich](https://www.raywenderlich.com/2690-learn-to-code-ios-apps-1-welcome-to-programming) - Learn to code iOS Apps. +- [Stanford - Developing iOS 7 Apps for iPhone and iPad](https://itunes.apple.com/us/course/developing-ios-7-apps-for-iphone-and-ipad/id733644550) +- [Stanford - Developing iOS 10 Apps with Swift](https://itunes.apple.com/in/course/developing-ios-10-apps-swift/id1198467120) - Stanford's 2017 iTunes U course. +- [Stanford - Developing iOS 11 Apps with Swift](https://itunes.apple.com/us/course/developing-ios-11-apps-with-swift/id1309275316) - Stanford's 2017 iTunes U course updated for iOS 11 and Swift. +- [Swifteducation - Teaching App Development with Swift](https://swifteducation.github.io/teaching_app_development_with_swift/) +- [Udacity - Intro to iOS App Development with Swift](https://www.udacity.com/course/intro-to-ios-app-development-with-swift--ud585) +- [Udemy - ARKit - Beginner to Professional in Swift 4 and iOS 11](https://www.udemy.com/course/arkit-beginner-to-professional/) +- [ARStarter](https://github.com/codePrincess/ARStarter) - Get started with ARKit - A little exercise for beginners. +- [iOS 13 & Swift 5 - The Complete iOS App Development Bootcamp](https://www.udemy.com/course/ios-13-app-development-bootcamp/) +- [Classpert - A list of 500 iOS Development courses (free and paid), from top e-learning platforms](https://classpert.com/ios-development) - Complete catalog of courses from Udacity, Pluralsight, Coursera, Edx, Treehouse and Skillshare. +- [iOS Lead Essentials Program](https://iosacademy.essentialdeveloper.com/p/ios-lead-essentials) - Online program meticulously thought out for iOS developers who want to become world-class senior developers and be part of the highest-paid iOS devs in the world. Focuses on key concepts like Swift, TDD, BDD, DDD, Clean Architecture, Design Patterns, Git, Automation, CI/CD, and Modular Design. +- [ARHeadsetKit Tutorials](https://github.com/philipturner/ARHeadsetKit) - Interactive guides to a high-level framework for experimenting with AR. +- [100 Days of SwiftUI](https://www.hackingwithswift.com/100/swiftui) - Free collection of videos and tutorials updated for iOS 15 and Swift 5.5. + ## Accessibility *Frameworks that help to support accessibility features and enable people with disabilities to use your app* @@ -501,24 +525,6 @@ - [PredicateFlow](https://github.com/andreadelfante/PredicateFlow) - Write amazing, strong-typed and easy-to-read NSPredicate, allowing you to write flowable NSPredicate, without guessing attribution names, predicate operation or writing wrong arguments type. - [CloudCore](https://github.com/deeje/CloudCore) - Robust CloudKit synchronization: offline editing, relationships, shared and public databases, field-level deltas, and more. -## Courses - -### Getting Started - -*Courses, tutorials, guides and bootcamps* - -- [Apple - Object-Oriented Programming with Objective-C](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/OOP_ObjC/Introduction/Introduction.html) -- [ARHeadsetKit Tutorials](https://github.com/philipturner/ARHeadsetKit) - Interactive guides to a high-level framework for experimenting with AR. -- [ARStarter](https://github.com/codePrincess/ARStarter) - Get started with ARKit - A little exercise for beginners. -- [Classpert - A list of 500 iOS Development courses (free and paid), from top e-learning platforms](https://classpert.com/ios-development) - Complete catalog of courses from Udacity, Pluralsight, Coursera, Edx, Treehouse and Skillshare. -- [iOS & Swift - The Complete iOS App Development Bootcamp](https://www.udemy.com/course/ios-13-app-development-bootcamp/) -- [Ray Wenderlich](https://www.raywenderlich.com/2690-learn-to-code-ios-apps-1-welcome-to-programming) - Learn to code iOS Apps. -- [Stanford - Developing apps for iOS](https://itunes.apple.com/us/itunes-u/developing-apps-for-ios-hd/id395605774) - Stanford's iTunes U course. -- [Udacity - Intro to iOS App Development with Swift](https://www.udacity.com/course/intro-to-ios-app-development-with-swift--ud585) - Udacity free course. Make Your First iPhone App. -- [100 Days of SwiftUI](https://www.hackingwithswift.com/100/swiftui) - Free collection of videos and tutorials updated for iOS 15 and Swift 5.5. - -**[back to top](#contents)** - ## Database *Wrappers, clients, Parse alternatives and safe tools to deal with ephemeral and persistent data.* ",awesome-ios,vsouza,Swift,Swift,48363.0,6877.0,"A curated list of awesome iOS ecosystem, including Objective-C and Swift Projects ",vsouza_awesome-ios,DOC_CHANGE,Matched \.md\b in diff 352b4ea5b924412f3485290123fdf538cfdd8aa8,,Jeff Garzik,"Reduce minimum TX fee for new transactions, to 0.0005.",False,1,1,0,"--- main.h @@ -29,7 +29,7 @@ static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/2; static const int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50; static const int64 COIN = 100000000; static const int64 CENT = 1000000; -static const int64 MIN_TX_FEE = CENT; +static const int64 MIN_TX_FEE = 50000; static const int64 MIN_RELAY_TX_FEE = 50000; static const int64 MAX_MONEY = 21000000 * COIN; inline bool MoneyRange(int64 nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }",bitcoin_bitcoin.json,,,,,,,bitcoin_bitcoin.json,NEW_FEAT,"4, kind of new feature as minm fee is reduced now" fecbf47d0e56931e90c9af76d986a3c730a63615,2024-06-03 20:56:20,Tingsong (Terrence) Ou,added comments to avoid confusion between the default values and customized ones (#3888),False,4,4,8,"--- docs/d3-axis.md @@ -218,7 +218,7 @@ const axis = d3.axisBottom(x).tickSize(0); If *size* is not specified, returns the current inner tick size, which defaults to 6. ```js -axis.tickSize() // 0, as specified above +axis.tickSize() // 0 ``` ## *axis*.tickSizeInner(size) {#axis_tickSizeInner} @@ -232,7 +232,7 @@ const axis = d3.axisBottom(x).tickSizeInner(0); If *size* is not specified, returns the current inner tick size, which defaults to 6. ```js -axis.tickSizeInner() // 0, as specified above +axis.tickSizeInner() // 0 ``` The inner tick size controls the length of the tick lines, offset from the native position of the axis. @@ -248,7 +248,7 @@ const axis = d3.axisBottom(x).tickSizeOuter(0); If *size* is not specified, returns the current outer tick size, which defaults to 6. ```js -axis.tickSizeOuter() // 0, as specified above +axis.tickSizeOuter() // 0 ``` The outer tick size controls the length of the square ends of the domain path, offset from the native position of the axis. Thus, the “outer ticks” are not actually ticks but part of the domain path, and their position is determined by the associated scale’s domain extent. Thus, outer ticks may overlap with the first or last inner tick. An outer tick size of 0 suppresses the square ends of the domain path, instead producing a straight line. @@ -264,7 +264,7 @@ const axis = d3.axisBottom(x).tickPadding(0); If *padding* is not specified, returns the current padding which defaults to 3 pixels. ```js -axis.tickPadding() // 0, as specified above +axis.tickPadding() // 0 ``` ## *axis*.offset(offset) {#axis_offset} ",d3,d3,Shell,Shell,109977.0,22868.0,"Bring data to life with SVG, Canvas and HTML. :bar_chart::chart_with_upwards_trend::tada:",d3_d3,BUG_FIX,Fixing an issue with axis ticks 3191fe56fc663a27acea63977c5d5403b63596d1,2025-01-17 19:40:31,TengYao Chi,"KAFKA-18413: Remove AdminZkClient (#18585) Reviewers: Mickael Maison ",False,1,615,616,"--- core/src/main/scala/kafka/zk/AdminZkClient.scala @@ -0,0 +1,591 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the ""License""); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an ""AS IS"" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ +package kafka.zk + +import java.util.{Collections, Optional, Properties} +import kafka.admin.RackAwareMode +import kafka.controller.ReplicaAssignment +import kafka.server.{DynamicConfig, KafkaConfig} +import kafka.utils._ +import org.apache.kafka.admin.{AdminUtils, BrokerMetadata} +import org.apache.kafka.common.{TopicPartition, Uuid} +import org.apache.kafka.common.errors._ +import org.apache.kafka.common.internals.Topic +import org.apache.kafka.server.common.AdminOperationException +import org.apache.kafka.server.config.{ConfigType, ZooKeeperInternals} +import org.apache.kafka.storage.internals.log.LogConfig + +import scala.jdk.CollectionConverters._ +import scala.collection.{Map, Seq} + +/** + * Provides admin related methods for interacting with ZooKeeper. + * + * This is an internal class and no compatibility guarantees are provided, + * see org.apache.kafka.clients.admin.AdminClient for publicly supported APIs. + */ +class AdminZkClient(zkClient: KafkaZkClient, + kafkaConfig: Option[KafkaConfig] = None) extends Logging { + + /** + * Creates the topic with given configuration + * @param topic topic name to create + * @param partitions Number of partitions to be set + * @param replicationFactor Replication factor + * @param topicConfig topic configs + * @param rackAwareMode rack aware mode for replica assignment + * @param usesTopicId Boolean indicating whether the topic ID will be created + */ + def createTopic(topic: String, + partitions: Int, + replicationFactor: Int, + topicConfig: Properties = new Properties, + rackAwareMode: RackAwareMode = RackAwareMode.Enforced, + usesTopicId: Boolean = false): Unit = { + val brokerMetadatas = getBrokerMetadatas(rackAwareMode).asJava + val replicaAssignment = CoreUtils.replicaToBrokerAssignmentAsScala(AdminUtils.assignReplicasToBrokers(brokerMetadatas, partitions, replicationFactor)) + createTopicWithAssignment(topic, topicConfig, replicaAssignment, usesTopicId = usesTopicId) + } + + /** + * Gets broker metadata list + * + * @param rackAwareMode rack aware mode for replica assignment + * @param brokerList The brokers to gather metadata about. + * @return The metadata for each broker that was found. + */ + def getBrokerMetadatas(rackAwareMode: RackAwareMode = RackAwareMode.Enforced, + brokerList: Option[Seq[Int]] = None): Seq[BrokerMetadata] = { + val allBrokers = zkClient.getAllBrokersInCluster + val brokers = brokerList.map(brokerIds => allBrokers.filter(b => brokerIds.contains(b.id))).getOrElse(allBrokers) + val brokersWithRack = brokers.filter(_.rack.nonEmpty) + if (rackAwareMode == RackAwareMode.Enforced && brokersWithRack.nonEmpty && brokersWithRack.size < brokers.size) { + throw new AdminOperationException(""Not all brokers have rack information. Add --disable-rack-aware in command line"" + + "" to make replica assignment without rack information."") + } + val brokerMetadatas = rackAwareMode match { + case RackAwareMode.Disabled => brokers.map(broker => new BrokerMetadata(broker.id, Optional.empty())) + case RackAwareMode.Safe if brokersWithRack.size < brokers.size => + brokers.map(broker => new BrokerMetadata(broker.id, Optional.empty())) + case _ => brokers.map(broker => new BrokerMetadata(broker.id, Optional.ofNullable(broker.rack.orNull))) + } + brokerMetadatas.sortBy(_.id) + } + + /** + * Create topic and optionally validate its parameters. Note that this method is used by the + * TopicCommand as well. + * + * @param topic The name of the topic + * @param config The config of the topic + * @param partitionReplicaAssignment The assignments of the topic + * @param validate Boolean indicating if parameters must be validated or not (true by default) + * @param usesTopicId Boolean indicating whether the topic ID will be created + */ + def createTopicWithAssignment(topic: String, + config: Properties, + partitionReplicaAssignment: Map[Int, Seq[Int]], + validate: Boolean = true, + usesTopicId: Boolean = false): Unit = { + if (validate) + validateTopicCreate(topic, partitionReplicaAssignment, config) + + info(s""Creating topic $topic with configuration $config and initial partition "" + + s""assignment $partitionReplicaAssignment"") + + // write out the config if there is any, this isn't transactional with the partition assignments + zkClient.setOrCreateEntityConfigs(ConfigType.TOPIC, topic, config) + + // create the partition assignment + writeTopicPartitionAssignment(topic, partitionReplicaAssignment.map { case (k, v) => k -> ReplicaAssignment(v) }, + isUpdate = false, usesTopicId) + } + + /** + * Validate topic creation parameters. Note that this method is indirectly used by the + * TopicCommand via the `createTopicWithAssignment` method. + * + * @param topic The name of the topic + * @param partitionReplicaAssignment The assignments of the topic + * @param config The config of the topic + */ + def validateTopicCreate(topic: String, + partitionReplicaAssignment: Map[Int, Seq[Int]], + config: Properties): Unit = { + Topic.validate(topic) + if (zkClient.isTopicMarkedForDeletion(topic)) { + throw new TopicExistsException(s""Topic '$topic' is marked for deletion."") + } + if (zkClient.topicExists(topic)) + throw new TopicExistsException(s""Topic '$topic' already exists."") + else if (Topic.hasCollisionChars(topic)) { + val allTopics = zkClient.getAllTopicsInCluster() + // check again in case the topic was created in the meantime, otherwise the + // topic could potentially collide with itself + if (allTopics.contains(topic)) + throw new TopicExistsException(s""Topic '$topic' already exists."") + val collidingTopics = allTopics.filter(Topic.hasCollision(topic, _)) + if (collidingTopics.nonEmpty) { + throw new InvalidTopicException(s""Topic '$topic' collides with existing topics: ${collidingTopics.mkString("", "")}"") + } + } + + if (partitionReplicaAssignment.values.map(_.size).toSet.size != 1) + throw new InvalidReplicaAssignmentException(""All partitions should have the same number of replicas"") + + partitionReplicaAssignment.values.foreach(reps => + if (reps.size != reps.toSet.size) + throw new InvalidReplicaAssignmentException(""Duplicate replica assignment found: "" + partitionReplicaAssignment) + ) + + val partitionSize = partitionReplicaAssignment.size + val sequenceSum = partitionSize * (partitionSize - 1) / 2 + if (partitionReplicaAssignment.size != partitionReplicaAssignment.toSet.size || + partitionReplicaAssignment.keys.filter(_ >= 0).sum != sequenceSum) + throw new InvalidReplicaAssignmentException(""partitions should be a consecutive 0-based integer sequence"") + + LogConfig.validate(Collections.emptyMap(), config, + kafkaConfig.map(_.extractLogConfigMap).getOrElse(Collections.emptyMap()), + kafkaConfig.exists(_.remoteLogManagerConfig.isRemoteStorageSystemEnabled()), + true) + } + + private def writeTopicPartitionAssignment(topic: String, replicaAssignment: Map[Int, ReplicaAssignment], + isUpdate: Boolean, usesTopicId: Boolean = false): Unit = { + try { + val assignment = replicaAssignment.map { case (partitionId, replicas) => (new TopicPartition(topic,partitionId), replicas) }.toMap + + if (!isUpdate) { + val topicIdOpt = if (usesTopicId) Some(Uuid.randomUuid()) else None + zkClient.createTopicAssignment(topic, topicIdOpt, assignment.map { case (k, v) => k -> v.replicas }) + } else { + val topicIds = zkClient.getTopicIdsForTopics(Set(topic)) + zkClient.setTopicAssignment(topic, topicIds.get(topic), assignment) + } + debug(""Updated path %s with %s for replica assignment"".format(TopicZNode.path(topic), assignment)) + } catch { + case e2: Throwable => throw new AdminOperationException(e2.toString) + } + } + + /** + * Creates a delete path for a given topic + * @param topic Topic name to delete + */ + def deleteTopic(topic: String): Unit = { + if (zkClient.topicExists(topic)) { + try { + zkClient.createDeleteTopicPath(topic) + } catch { + case e: Throwable => throw new AdminOperationException(e.getMessage) + } + } else { + throw new UnknownTopicOrPartitionException(s""Topic `$topic` to delete does not exist"") + } + } + + /** + * Add partitions to existing topic with optional replica assignment. Note that this + * method is used by the TopicCommand. + * + * @param topic Topic for adding partitions to + * @param existingAssignment A map from partition id to its assignment + * @param allBrokers All brokers in the cluster + * @param numPartitions Number of partitions to be set + * @param replicaAssignment Manual replica assignment, or none + * @param validateOnly If true, validate the parameters without actually adding the partitions + * @return the updated replica assignment + */ + def addPartitions(topic: String, + existingAssignment: Map[Int, ReplicaAssignment], + allBrokers: Seq[BrokerMetadata], + numPartitions: Int = 1, + replicaAssignment: Option[Map[Int, Seq[Int]]] = None, + validateOnly: Boolean = false): Map[Int, Seq[Int]] = { + + val proposedAssignmentForNewPartitions = createNewPartitionsAssignment( + topic, + existingAssignment, + allBrokers, + numPartitions, + replicaAssignment + ) + + if (validateOnly) { + (existingAssignment ++ proposedAssignmentForNewPartitions) + .map { case (k, v) => k -> v.replicas } + } else { + createPartitionsWithAssignment(topic, existingAssignment, proposedAssignmentForNewPartitions) + .map { case (k, v) => k -> v.replicas } + } + } + + /** + * Create assignment to add the given number of partitions while validating the + * provided arguments. + * + * @param topic Topic for adding partitions to + * @param existingAssignment A map from partition id to its assignment + * @param allBrokers All brokers in the cluster + * @param numPartitions Number of partitions to be set + * @param replicaAssignment Manual replica assignment, or none + * @return the assignment for the new partitions + */ + def createNewPartitionsAssignment(topic: String, + existingAssignment: Map[Int, ReplicaAssignment], + allBrokers: Seq[BrokerMetadata], + numPartitions: Int = 1, + replicaAssignment: Option[Map[Int, Seq[Int]]] = None): Map[Int, ReplicaAssignment] = { + val existingAssignmentPartition0 = existingAssignment.getOrElse(0, + throw new AdminOperationException( + s""Unexpected existing replica assignment for topic '$topic', partition id 0 is missing. "" + + s""Assignment: $existingAssignment"")).replicas + + val partitionsToAdd = numPartitions - existingAssignment.size + if (partitionsToAdd <= 0) + throw new InvalidPartitionsException( + s""The number of partitions for a topic can only be increased. "" + + s""Topic $topic currently has ${existingAssignment.size} partitions, "" + + s""$numPartitions would not be an increase."") + + replicaAssignment.foreach { proposedReplicaAssignment => + validateReplicaAssignment(proposedReplicaAssignment, existingAssignmentPartition0.size, + allBrokers.map(_.id).toSet) + } + + val proposedAssignmentForNewPartitions = replicaAssignment.getOrElse { + val startIndex = math.max(0, allBrokers.indexWhere(_.id >= existingAssignmentPartition0.head)) + CoreUtils.replicaToBrokerAssignmentAsScala(AdminUtils.assignReplicasToBrokers(allBrokers.asJava, partitionsToAdd, existingAssignmentPartition0.size, + startIndex, existingAssignment.size)) + } + + proposedAssignmentForNewPartitions.map { case (tp, replicas) => + tp -> ReplicaAssignment(replicas, List(), List()) + } + } + + /** + * Add partitions to the existing topic with the provided assignment. This method does + * not validate the provided assignments. Validation must be done beforehand. + * + * @param topic Topic for adding partitions to + * @param existingAssignment A map from partition id to its assignment + * @param newPartitionAssignment The assignments to add + * @return the updated replica assignment + */ + def createPartitionsWithAssignment(topic: String, + existingAssignment: Map[Int, ReplicaAssignment], + newPartitionAssignment: Map[Int, ReplicaAssignment]): Map[Int, ReplicaAssignment] = { + + info(s""Creating ${newPartitionAssignment.size} partitions for '$topic' with the following replica assignment: "" + + s""$newPartitionAssignment."") + + val combinedAssignment = existingAssignment ++ newPartitionAssignment + + writeTopicPartitionAssignment(topic, combinedAssignment, isUpdate = true) + + combinedAssignment + } + + private def validateReplicaAssignment(replicaAssignment: Map[Int, Seq[Int]], + expectedReplicationFactor: Int, + availableBrokerIds: Set[Int]): Unit = { + + replicaAssignment.foreachEntry { (partitionId, replicas) => + if (replicas.isEmpty) + throw new InvalidReplicaAssignmentException( + s""Cannot have replication factor of 0 for partition id $partitionId."") + if (replicas.size != replicas.toSet.size) + throw new InvalidReplicaAssignmentException( + s""Duplicate brokers not allowed in replica assignment: "" + + s""${replicas.mkString("", "")} for partition id $partitionId."") + if (!replicas.toSet.subsetOf(availableBrokerIds)) + throw new BrokerNotAvailableException( + s""Some brokers specified for partition id $partitionId are not available. "" + + s""Specified brokers: ${replicas.mkString("", "")}, "" + + s""available brokers: ${availableBrokerIds.mkString("", "")}."") + partitionId -> replicas.size + } + val badRepFactors = replicaAssignment.collect { + case (partition, replicas) if replicas.size != expectedReplicationFactor => partition -> replicas.size + } + if (badRepFactors.nonEmpty) { + val sortedBadRepFactors = badRepFactors.toSeq.sortBy { case (partitionId, _) => partitionId } + val partitions = sortedBadRepFactors.map { case (partitionId, _) => partitionId } + val repFactors = sortedBadRepFactors.map { case (_, rf) => rf } + throw new InvalidReplicaAssignmentException(s""Inconsistent replication factor between partitions, "" + + s""partition 0 has $expectedReplicationFactor while partitions [${partitions.mkString("", "")}] have "" + + s""replication factors [${repFactors.mkString("", "")}], respectively."") + } + } + + /** + * Parse broker from entity name to integer id + * @param broker The broker entity name to parse + * @return Integer brokerId after successfully parsed or default None + */ + def parseBroker(broker: String): Option[Int] = { + broker match { + case ZooKeeperInternals.DEFAULT_STRING => None + case _ => + try Some(broker.toInt) + catch { + case _: NumberFormatException => + throw new IllegalArgumentException(s""Error parsing broker $broker. The broker's Entity Name must be a single integer value"") + } + } + } + + /** + * Change the configs for a given entityType and entityName + * @param entityType The entityType of the configs that will be changed + * @param entityName The entityName of the entityType + * @param configs The config of the entityName + * @param isUserClientId If true, this entity is user and clientId entity + */ + def changeConfigs(entityType: String, entityName: String, configs: Properties, isUserClientId: Boolean = false): Unit = { + + entityType match { + case ConfigType.TOPIC => changeTopicConfig(entityName, configs) + case ConfigType.CLIENT => changeClientIdConfig(entityName, configs) + case ConfigType.USER => changeUserOrUserClientIdConfig(entityName, configs, isUserClientId) + case ConfigType.BROKER => changeBrokerConfig(parseBroker(entityName), configs) + case ConfigType.IP => changeIpConfig(entityName, configs) + case _ => throw new IllegalArgumentException(s""$entityType is not a known entityType. Should be one of List(${String.join("", "",ConfigType.ALL)})"") + } + } + + /** + * Try to clean quota nodes in zk, if the configs of the node are empty and there are no children left, + * to avoid infinite growth of quota nodes + * @param entityType The entityType of the node we are trying to clean + * @param entityName The entityName of the entityType + * @param isUserClientId If true, this entity is user and clientId entity + * @return True, if the node is deleted + */ + private def tryCleanQuotaNodes(entityType: String, entityName: String, isUserClientId: Boolean): Boolean = { + val currPath = ConfigEntityZNode.path(entityType, entityName) + if (zkClient.getChildren(currPath).isEmpty) { + var pathToDelete = currPath + // If the entity is user and clientId, we need to do some further check if the parent user node is also empty + // after current userClientId node deleted. If so, we also need to try cleaning the corresponding user node. + if (isUserClientId) { + val user = entityName.substring(0, entityName.indexOf(""/"")) + val clientId = entityName.substring(entityName.lastIndexOf(""/"") + 1) + val clientsPath = ConfigEntityZNode.path(ConfigType.USER, user + ""/"" + ConfigType.CLIENT) + val clientsChildren = zkClient.getChildren(clientsPath) + // If current client is the only child of clients, the node of clients can also be deleted. + if (clientsChildren == Seq(clientId)) { + pathToDelete = clientsPath + val userData = fetchEntityConfig(ConfigType.USER, user) + val userPath = ConfigEntityZNode.path(ConfigType.USER, user) + val userChildren = zkClient.getChildren(userPath) + // If the configs of the user are empty and the clients node is the only child of the user, + // the node of user can also be deleted. + if (userData.isEmpty && userChildren == Seq(ConfigType.CLIENT)) { + pathToDelete = userPath + } + } + } + info(s""Deleting zk node $pathToDelete since node of entityType $entityType and entityName $entityName is empty."") + zkClient.deletePath(pathToDelete) + true + } else + false + } + + /** + * Update the config for a client and create a change notification so the change will propagate to other brokers. + * If clientId is , default clientId config is updated. ClientId configs are used only if + * and configs are not specified. + * + * @param sanitizedClientId: The sanitized clientId for which configs are being changed + * @param configs: The final set of configs that will be applied to the topic. If any new configs need to be added or + * existing configs need to be deleted, it should be done prior to invoking this API + * + */ + def changeClientIdConfig(sanitizedClientId: String, configs: Properties): Unit = { + DynamicConfig.Client.validate(configs) + changeEntityConfig(ConfigType.CLIENT, sanitizedClientId, configs) + } + + /** + * Update the config for a or and create a change notification so the change will propagate to other brokers. + * User and/or clientId components of the path may be , indicating that the configuration is the default + * value to be applied if a more specific override is not configured. + * + * @param sanitizedEntityName: or /clients/ + * @param configs: The final set of configs that will be applied to the topic. If any new configs need to be added or + * existing configs need to be deleted, it should be done prior to invoking this API + * @param isUserClientId If true, this entity is user and clientId entity + * + */ + def changeUserOrUserClientIdConfig(sanitizedEntityName: String, configs: Properties, isUserClientId: Boolean = false): Unit = { + if (sanitizedEntityName == ZooKeeperInternals.DEFAULT_STRING || sanitizedEntityName.contains(""/clients"")) + DynamicConfig.Client.validate(configs) + else + DynamicConfig.User.validate(configs) + changeEntityConfig(ConfigType.USER, sanitizedEntityName, configs, isUserClientId) + } + + /** + * Validates the IP configs. + * @param ip ip for which configs are being validated + * @param configs properties to validate for the IP + */ + private def validateIpConfig(ip: String, configs: Properties): Unit = { + if (!DynamicConfig.Ip.isValidIpEntity(ip)) + throw new AdminOperationException(s""$ip is not a valid IP or resolvable host."") + DynamicConfig.Ip.validate(configs) + } + + /** + * Update the config for an IP. These overrides will be persisted between sessions, and will override any default + * IP properties. + * @param ip ip for which configs are being updated + * @param configs properties to update for the IP + */ + def changeIpConfig(ip: String, configs: Properties): Unit = { + validateIpConfig(ip, configs) + changeEntityConfig(ConfigType.IP, ip, configs) + } + + /** + * validates the topic configs + * @param topic topic for which configs are being validated + * @param configs properties to validate for the topic + */ + def validateTopicConfig(topic: String, configs: Properties): Unit = { + Topic.validate(topic) + if (!zkClient.topicExists(topic)) + throw new UnknownTopicOrPartitionException(s""Topic '$topic' does not exist."") + // remove the topic overrides + LogConfig.validate(Collections.emptyMap(), configs, + kafkaConfig.map(_.extractLogConfigMap).getOrElse(Collections.emptyMap()), + kafkaConfig.exists(_.remoteLogManagerConfig.isRemoteStorageSystemEnabled()), true) + } + + /** + * Update the config for an existing topic and create a change notification so the change will propagate to other brokers + * + * @param topic: The topic for which configs are being changed + * @param configs: The final set of configs that will be applied to the topic. If any new configs need to be added or + * existing configs need to be deleted, it should be done prior to invoking this API + * + */ + def changeTopicConfig(topic: String, configs: Properties): Unit = { + validateTopicConfig(topic, configs) + changeEntityConfig(ConfigType.TOPIC, topic, configs) + } + + /** + * Override the broker config on some set of brokers. These overrides will be persisted between sessions, and will + * override any defaults entered in the broker's config files + * + * @param brokers: The list of brokers to apply config changes to + * @param configs: The config to change, as properties + */ + def changeBrokerConfig(brokers: Seq[Int], configs: Properties): Unit = { + validateBrokerConfig(configs) + brokers.foreach { + broker => changeEntityConfig(ConfigType.BROKER, broker.toString, configs) + } + } + + /** + * Override a broker override or broker default config. These overrides will be persisted between sessions, and will + * override any defaults entered in the broker's config files + * + * @param broker: The broker to apply config changes to or None to update dynamic default configs + * @param configs: The config to change, as properties + */ + def changeBrokerConfig(broker: Option[Int], configs: Properties): Unit = { + validateBrokerConfig(configs) + changeEntityConfig(ConfigType.BROKER, broker.map(_.toString).getOrElse(ZooKeeperInternals.DEFAULT_STRING), configs) + } + + /** + * Validate dynamic broker configs. Since broker configs may contain custom configs, the validation + * only verifies that the provided config does not contain any static configs. + * @param configs configs to validate + */ + private def validateBrokerConfig(configs: Properties): Unit = { + DynamicConfig.Broker.validate(configs) + } + + private def changeEntityConfig(rootEntityType: String, fullSanitizedEntityName: String, configs: Properties, isUserClientId: Boolean = false): Unit = { + val sanitizedEntityPath = rootEntityType + '/' + fullSanitizedEntityName + var needUpdateConfigs = true + // If the entityType is quota and node is empty, which means if the configs are empty and no children left, + // we should try to clean up to avoid continuous increment of zk nodes. + if ((ConfigType.CLIENT.equals(rootEntityType) || ConfigType.USER.equals(rootEntityType) || ConfigType.IP.equals(rootEntityType)) && configs.isEmpty) { + if (tryCleanQuotaNodes(rootEntityType, fullSanitizedEntityName, isUserClientId)) { + needUpdateConfigs = false + } + } + if (needUpdateConfigs) { + zkClient.setOrCreateEntityConfigs(rootEntityType, fullSanitizedEntityName, configs) + } + + // create the change notification + zkClient.createConfigChangeNotification(sanitizedEntityPath) + } + + /** + * Read the entity (topic, broker, client, user, or ) config (if any) from zk + * sanitizedEntityName is , , , , /clients/ or . + * @param rootEntityType entityType for which configs are being fetched + * @param sanitizedEntityName entityName of the entityType + * @return The successfully gathered configs + */ + def fetchEntityConfig(rootEntityType: String, sanitizedEntityName: String): Properties = { + zkClient.getEntityConfigs(rootEntityType, sanitizedEntityName) + } + + /** + * Gets all the entity configs for a given entityType + * @param entityType entityType for which configs are being fetched + * @return The successfully gathered configs of the entityType + */ + def fetchAllEntityConfigs(entityType: String): Map[String, Properties] = + zkClient.getAllEntitiesWithConfig(entityType).map(entity => (entity, fetchEntityConfig(entityType, entity))).toMap + + /** + * Gets all the entity configs for a given childEntityType + * @param rootEntityType rootEntityType for which configs are being fetched + * @param childEntityType childEntityType of the rootEntityType + * @return The successfully gathered configs of the childEntityType + */ + def fetchAllChildEntityConfigs(rootEntityType: String, childEntityType: String): Map[String, Properties] = { + def entityPaths(rootPath: Option[String]): Seq[String] = { + val root = rootPath match { + case Some(path) => rootEntityType + '/' + path + case None => rootEntityType + } + val entityNames = zkClient.getAllEntitiesWithConfig(root) + rootPath match { + case Some(path) => entityNames.map(entityName => path + '/' + entityName) + case None => entityNames + } + } + entityPaths(None) + .flatMap(entity => entityPaths(Some(entity + '/' + childEntityType))) + .map(entityPath => (entityPath, fetchEntityConfig(rootEntityType, entityPath))).toMap + } + +} + --- core/src/test/scala/integration/kafka/api/CustomQuotaCallbackTest.scala @@ -87,7 +87,7 @@ class CustomQuotaCallbackTest extends IntegrationTestHarness with SaslSetup { override def configureSecurityBeforeServersStart(testInfo: TestInfo): Unit = { super.configureSecurityBeforeServersStart(testInfo) - createScramCredentials(createAdminClient(), JaasTestUtils.KAFKA_SCRAM_ADMIN, JaasTestUtils.KAFKA_SCRAM_ADMIN_PASSWORD) + createScramCredentials("""", JaasTestUtils.KAFKA_SCRAM_ADMIN, JaasTestUtils.KAFKA_SCRAM_ADMIN_PASSWORD) } @ParameterizedTest(name = TestInfoUtils.TestWithParameterizedQuorumAndGroupProtocolNames) --- core/src/test/scala/integration/kafka/api/SaslSetup.scala @@ -21,12 +21,15 @@ import kafka.security.JaasTestUtils import kafka.security.JaasTestUtils.JaasSection import kafka.security.minikdc.MiniKdc import kafka.utils.TestUtils +import kafka.zk.{AdminZkClient, KafkaZkClient} import org.apache.kafka.clients.admin.{Admin, AdminClientConfig, ScramCredentialInfo, UserScramCredentialUpsertion, ScramMechanism => PublicScramMechanism} import org.apache.kafka.common.config.SaslConfigs import org.apache.kafka.common.config.internals.BrokerSecurityConfigs import org.apache.kafka.common.security.JaasUtils import org.apache.kafka.common.security.auth.SecurityProtocol import org.apache.kafka.common.security.authenticator.LoginManager +import org.apache.kafka.common.security.scram.internals.{ScramCredentialUtils, ScramFormatter, ScramMechanism} +import org.apache.kafka.server.config.ConfigType import java.io.File import java.util @@ -36,6 +39,7 @@ import scala.collection.Seq import scala.jdk.CollectionConverters._ import scala.jdk.OptionConverters._ import scala.jdk.javaapi.OptionConverters +import scala.util.Using /* * Implements an enumeration for the modes enabled here: @@ -188,4 +192,23 @@ trait SaslSetup { results.all.get }) } + + def createScramCredentials(zkConnect: String, userName: String, password: String): Unit = { + Using.resource(new KafkaZkClient()) { zkClient => + val adminZkClient = new AdminZkClient(zkClient) + + val entityType = ConfigType.USER + val entityName = userName + val configs = adminZkClient.fetchEntityConfig(entityType, entityName) + + ScramMechanism.values().foreach(mechanism => { + val credential = new ScramFormatter(mechanism).generateCredential(password, 4096) + val credentialString = ScramCredentialUtils.credentialToString(credential) + configs.setProperty(mechanism.mechanismName, credentialString) + }) + + adminZkClient.changeConfigs(entityType, entityName, configs) + } + } + } ",apache-kafka,,Java,Java,,,"a distributed, open-source streaming platform designed for building real-time data pipelines and streaming applications",_apache-kafka,CODE_IMPROVEMENT,probably redundant code removed 1cadc9221a90e8b0f195912e87c8278c76e31994,,Cheng Zhao,win: Download ATL binaries.,False,2,1,1,"--- update-external-binaries.py @@ -7,7 +7,7 @@ import os from lib.util import safe_mkdir, rm_rf, extract_zip, tempdir, download -VERSION = 'v0.1.0' +VERSION = 'v0.2.0' SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) FRAMEWORKS_URL = 'https://github.com/atom/atom-shell-frameworks/releases' \ '/download/' + VERSION @@ -28,6 +28,7 @@ def main(): download_and_unzip('ReactiveCocoa') download_and_unzip('Squirrel') elif sys.platform in ['cygwin', 'win32']: + download_and_unzip('atl') download_and_unzip('directxsdk') download_and_unzip('vs2012_crt')",electron_electron.json,,,,,,,electron_electron.json,NEW_FEAT,"3, vague" 18d2152798e15898f3c11a2fd3d8a59a62b4ac33,2022-09-09 00:03:23,James Yeoman,feat(gcloud): support for official apt repo (#10889) Fixes #10888 Closes #10889,False,17,3,20,"--- plugins/gcloud/gcloud.plugin.zsh @@ -10,8 +10,7 @@ if [[ -z ""${CLOUDSDK_HOME}"" ]]; then ""/opt/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk"" ""/usr/share/google-cloud-sdk"" ""/snap/google-cloud-sdk/current"" - ""/usr/lib/google-cloud-sdk"" - ""/usr/lib64/google-cloud-sdk"" + ""/usr/lib64/google-cloud-sdk/"" ""/opt/google-cloud-sdk"" ) @@ -21,28 +20,15 @@ if [[ -z ""${CLOUDSDK_HOME}"" ]]; then break fi done - unset search_locations gcloud_sdk_location fi if (( ${+CLOUDSDK_HOME} )); then - # Only source this if gcloud isn't already on the path if (( ! $+commands[gcloud] )); then + # Only source this if GCloud isn't already on the path if [[ -f ""${CLOUDSDK_HOME}/path.zsh.inc"" ]]; then source ""${CLOUDSDK_HOME}/path.zsh.inc"" fi fi - - # Look for completion file in different paths - for comp_file ( - ""${CLOUDSDK_HOME}/completion.zsh.inc"" # default location - ""/usr/share/google-cloud-sdk/completion.zsh.inc"" # apt-based location - ); do - if [[ -f ""${comp_file}"" ]]; then - source ""${comp_file}"" - break - fi - done - unset comp_file - + source ""${CLOUDSDK_HOME}/completion.zsh.inc"" export CLOUDSDK_HOME fi ",ohmyzsh,ohmyzsh,Shell,Shell,176465.0,26013.0,"🙃 A delightful community-driven (with 2,400+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python, etc), 140+ themes to spice up your morning, and an auto-update tool that makes it easy to keep up with the latest updates from the community.",ohmyzsh_ohmyzsh,NEW_FEAT,"Common words: ['10889', 'feat', 'gcloud']" 39faeb4fb5ba5d3dfd140ab7dd1d2e4f24ee4d92,2024-01-09 05:29:41,Steven Bucher,Include information about upgrading in README (#20993),False,6,0,6,"--- README.md @@ -134,12 +134,6 @@ You can also download the PowerShell binary archives for Windows, macOS, and Lin To install a specific version, visit [releases](https://github.com/PowerShell/PowerShell/releases). -## Upgrading PowerShell - -For best results when upgrading, you should use the same install method you used when you first -installed PowerShell. The update method will be different for each platform and install method. For -more information, see [Installing PowerShell](https://learn.microsoft.com/powershell/scripting/install/installing-powershell). - ## Community Dashboard [Dashboard](https://aka.ms/PSPublicDashboard) with visualizations for community contributions and project status using PowerShell, Azure, and PowerBI. ",powershell,powershell,C#,C#,46656.0,7522.0,PowerShell for every system!,powershell_powershell,DOC_CHANGE,changes in readme 87a9f72b9a323ef2e49db9e74bd740cc9c2aab31,2024-04-24 01:11:59,Mike Griese,Don't explode when duplicating a pane (#17110) I forgot to check here if the `INewContentArgs` were null or not. Pretty dumb mistake honestly. Closes #17075 Closes #17076,False,2,1,3,"--- src/cascadia/TerminalApp/TerminalPage.cpp @@ -3152,8 +3152,7 @@ namespace winrt::TerminalApp::implementation TerminalConnection::ITerminalConnection existingConnection) { - const auto& newTerminalArgs{ contentArgs.try_as() }; - if (contentArgs == nullptr || newTerminalArgs != nullptr || contentArgs.Type().empty()) + if (const auto& newTerminalArgs{ contentArgs.try_as() }) { // Terminals are of course special, and have to deal with debug taps, duplicating the tab, etc. return _MakeTerminalPane(newTerminalArgs, sourceTab, existingConnection); ",terminal,microsoft,C++,C++,97273.0,8477.0,"The new Windows Terminal and the original Windows console host, all in the same place!",microsoft_terminal,BUG_FIX,Obvious 6a414cb9a3d39bd0d8338b9625cd40c039b7c5fb,,Dave Stewart,Update ECOSYSTEM.md (#1690) Add Axios Actions package,False,1,0,1,"--- ECOSYSTEM.md @@ -19,3 +19,4 @@ This is a list of axios related libraries and resources. If you have a suggestio * [redux-saga-requests](https://github.com/klis87/redux-saga-requests) - Redux-Saga addon to simplify handling of AJAX requests. * [axios-fetch](https://github.com/lifeomic/axios-fetch) - A WebAPI Fetch implementation backed by an Axios client * [axios-curlirize](https://www.npmjs.com/package/axios-curlirize) - Logs axios requests as curl commands, also adds a property to the response object with the curl command as value. +* [axios-actions](https://github.com/davestewart/axios-actions) - Bundle endpoints as callable, reusable services",axios_axios.json,,,,,,,axios_axios.json,CONFIG_CHANGE,"5, readme or comment change" ab27231dc51aa2535df37555797e630d31047fa4,2024-12-21 01:55:30,Jordan Brown,"[compiler] add fire imports (#31797) Summary: Adds import {useFire} from 'react' when fire syntax is used. This is experimentation and may not become a stable feature in the compiler. -- --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31797). * #31811 * #31798 * __->__ #31797",False,19,1,20,"--- compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Program.ts @@ -564,11 +564,6 @@ export function compileProgram( if (environment.enableChangeDetectionForDebugging != null) { externalFunctions.push(environment.enableChangeDetectionForDebugging); } - - const hasFireRewrite = compiledFns.some(c => c.compiledFn.hasFireRewrite); - if (environment.enableFire && hasFireRewrite) { - externalFunctions.push({source: 'react', importSpecifierName: 'useFire'}); - } } catch (err) { handleError(err, pass, null); return; --- compiler/packages/babel-plugin-react-compiler/src/HIR/Environment.ts @@ -787,7 +787,6 @@ export class Environment { fnType: ReactFunctionType; useMemoCacheIdentifier: string; hasLoweredContextAccess: boolean; - hasFireRewrite: boolean; #contextIdentifiers: Set; #hoistedIdentifiers: Set; @@ -812,7 +811,6 @@ export class Environment { this.#shapes = new Map(DEFAULT_SHAPES); this.#globals = new Map(DEFAULT_GLOBALS); this.hasLoweredContextAccess = false; - this.hasFireRewrite = false; if ( config.disableMemoizationForDebugging && --- compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/CodegenReactiveFunction.ts @@ -103,11 +103,6 @@ export type CodegenFunction = { * This is true if the compiler has the lowered useContext calls. */ hasLoweredContextAccess: boolean; - - /** - * This is true if the compiler has compiled a fire to a useFire call - */ - hasFireRewrite: boolean; }; export function codegenFunction( @@ -360,7 +355,6 @@ function codegenReactiveFunction( prunedMemoValues: countMemoBlockVisitor.prunedMemoValues, outlined: [], hasLoweredContextAccess: fn.env.hasLoweredContextAccess, - hasFireRewrite: fn.env.hasFireRewrite, }); } --- compiler/packages/babel-plugin-react-compiler/src/Transform/TransformFire.ts @@ -32,6 +32,7 @@ import {BuiltInFireId, DefaultNonmutatingHook} from '../HIR/ObjectShape'; /* * TODO(jmbrown): * In this stack: + * - Insert useFire import * - Assert no lingering fire calls * - Ensure a fired function is not called regularly elsewhere in the same effect * @@ -225,7 +226,6 @@ function replaceFireFunctions(fn: HIRFunction, context: Context): void { if (rewriteInstrs.size > 0 || deleteInstrs.size > 0) { hasRewrite = true; - fn.env.hasFireRewrite = true; } } --- compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/transform-fire/basic.expect.md @@ -21,7 +21,6 @@ function Component(props) { ## Code ```javascript -import { useFire } from ""react""; import { c as _c } from ""react/compiler-runtime""; // @enableFire import { fire } from ""react""; --- compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/transform-fire/deep-scope.expect.md @@ -30,7 +30,6 @@ function Component(props) { ## Code ```javascript -import { useFire } from ""react""; import { c as _c } from ""react/compiler-runtime""; // @enableFire import { fire } from ""react""; --- compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/transform-fire/multiple-scope.expect.md @@ -29,7 +29,6 @@ function Component(props) { ## Code ```javascript -import { useFire } from ""react""; import { c as _c } from ""react/compiler-runtime""; // @enableFire import { fire } from ""react""; --- compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/transform-fire/repeated-calls.expect.md @@ -22,7 +22,6 @@ function Component(props) { ## Code ```javascript -import { useFire } from ""react""; import { c as _c } from ""react/compiler-runtime""; // @enableFire import { fire } from ""react""; --- compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/transform-fire/shared-hook-calls.expect.md @@ -26,7 +26,6 @@ function Component({bar, baz}) { ## Code ```javascript -import { useFire } from ""react""; import { c as _c } from ""react/compiler-runtime""; // @enableFire import { fire } from ""react""; ",react,facebook,JavaScript,JavaScript,232878.0,47794.0,The library for web and native user interfaces.,facebook_react,NEW_FEAT,Introduce a new functionality​ 4967dd09b9ee511a6f83b9045e18c1ba85f2b27a,,Adam Wathan,Update the test that was actually failing,False,1,1,0,"--- cli.compile.test.js @@ -13,7 +13,7 @@ describe('cli compile', () => { it('compiles CSS file', () => { return compile({ inputFile, outputFile, plugins }).then((result) => { expect(result.css).toContain('.example') - expect(result.css).toContain('-ms-input-placeholder') + expect(result.css).toContain('-webkit-max-content') }) }) })",tailwindlabs_tailwindcss.json,,,,,,,tailwindlabs_tailwindcss.json,CODE_IMPROVEMENT,"4, update the failing test" 39b7dcf91fb49f34020e7103ed31d5d29f96ac07,,Yuxin Wu,Update build_imagenet_data.py,False,1,1,0,"--- build_imagenet_data.py @@ -171,7 +171,7 @@ def _float_feature(value): def _bytes_feature(value): """"""Wrapper for inserting bytes features into Example proto."""""" - if isinstance(value, six.string_types): + if six.PY3 and isinstance(value, six.text_type): value = six.binary_type(value, encoding='utf-8') return tf.train.Feature(bytes_list=tf.train.BytesList(value=[value]))",tensorflow_models.json,,,,,,,tensorflow_models.json,CODE_IMPROVEMENT,"4, update the code to check for new condition" f7483d94c97f77bf4ae5eb83d9f3a9f9fadcc365,2024-01-29 08:21:36,Zezhong Li,Update README.md add tables,False,33,0,33,"--- README.md @@ -38,36 +38,3 @@ NOTE: the ranking has no particular order. | Survey | *EAAI '11* | A review on time series data mining | None | | Survey | *CSUR '11* | Time-series data mining | None | | Dataset | *GI '04* | Segmenting Motion Capture Data into Distinct Behaviors | [Website](http://graphics.cs.cmu.edu/projects/segmentation/) 🌟 | -## [David Hallac (Stanford)](https://scholar.google.com/citations?hl=zh-CN&user=o23Mn0cAAAAJ&view_op=list_works&sortby=pubdate) -| TYPE | Venue | Paper Title and Paper Interpretation | Code | -| :----------------------------------------------------------: | :----------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | -| ![multivariate time series forecasting](https://img.shields.io/badge/-Multivariate-red) | *KDD Workshop MiLeTS '20* | Driver2vec Driver Identification from Automotive Data | [Driver2vec](https://github.com/JingboYang/driver2vec) | -| ![multivariate time series forecasting](https://img.shields.io/badge/-Multivariate-red) | *Adv. Data Anal. Classif. '19* | Greedy Gaussian segmentation of multivariate time series 🌟 | [GGS](https://github.com/cvxgrp/GGS) | -| ![multivariate time series forecasting](https://img.shields.io/badge/-Multivariate-red) | *Arxiv '18* | MASA: Motif-Aware State Assignment in Noisy Time Series Data | [MASA](https://github.com/snap-stanford/masa?utm_source=catalyzex.com) | -| *Ph.D. Thesis* | *ProQuest '18* | Inferring Structure from Multivariate Time Series Sensor Data | None | -| ![multivariate time series forecasting](https://img.shields.io/badge/-Multivariate-red) | *KDD '17* | Toeplitz Inverse Covariance-Based Clustering of Multivariate Time Series Data 🌟 | [TICC](https://github.com/davidhallac/TICC) | -| ![multivariate time series forecasting](https://img.shields.io/badge/-Multivariate-red) | *KDD '17* | Network Inference via the Time-Varying Graphical Lasso 🌟 | [TVGL](https://github.com/davidhallac/TVGL) | -## [Shaghayegh Gharghabi](https://scholar.google.com/citations?hl=en&user=EITBC1YAAAAJ&view_op=list_works&sortby=pubdate) (from [Eamonn Keogh](https://www.cs.ucr.edu/~eamonn/)'s Lab, UC Riverside) -| TYPE | Venue | Paper Title and Paper Interpretation | Code | -| :----------------------------------------------------------: | :--------: | :----------------------------------------------------------: | :----------------------------------------------------------: | -| ![multivariate time series forecasting](https://img.shields.io/badge/-Multivariate-red) | *DMKD '19* | Domain agnostic online semantic segmentation for multi-dimensional time series 🌟 | [Floss & datasets](https://www.cs.ucr.edu/%7eeamonn/FLOSS/) | -| ![univariate time series forecasting](https://img.shields.io/badge/-Univariate-brightgreen) | *ICDM '17* | Matrix Profile VIII Domain Agnostic Online Semantic Segmentation at Superhuman Performance Levels 🌟 | [Floss](https://sites.google.com/site/onlinesemanticsegmentation/) | - -## [Yasuko Matsubara](https://www.dm.sanken.osaka-u.ac.jp/~yasuko/) & [Yasushi Sakurai](https://www.dm.sanken.osaka-u.ac.jp/~yasushi/) (from [Sakurai & Matsubara Lab](https://www.dm.sanken.osaka-u.ac.jp/)) -| TYPE | Venue | Paper Title and Paper Interpretation | Code | -| :----------------------------------------------------------: | :-----------: | :----------------------------------------------------------: | :----------------------------------------------------------: | -| ![spatio-temporal forecasting](https://img.shields.io/badge/-Tensor-blue) | WWW '23 | Fast and Multi-aspect Mining of Complex Time-stamped Event Streams 🌟 | [CubeScope](https://github.com/kotaNakm/CubeScope) | -| ![spatio-temporal forecasting](https://img.shields.io/badge/-Tensor-blue) | *KDD '22* | Fast Mining and Forecasting of Co-evolving Epidemiological Data Streams 🌟 | None | -| ![spatio-temporal forecasting](https://img.shields.io/badge/-Tensor-blue) | *CIKM '22* | Modeling Dynamic Interactions over Tensor Streams | [Dismo](https://github.com/kokikwbt/dismo) | -| ![multivariate time series forecasting](https://img.shields.io/badge/-Multivariate-red) | *CIKM '22* | Mining Reaction and Diffusion Dynamics in Social Activities 🌟 | None | -| ![spatio-temporal forecasting](https://img.shields.io/badge/-Tensor-blue) | *NeurIPS '21* | SSMF Shifting Seasonal Matrix Factorization | [ssmf](https://github.com/kokikwbt/ssmf) | -| ![spatio-temporal forecasting](https://img.shields.io/badge/-Tensor-blue) | *KDD '20* | Non-Linear Mining of Social Activities in Tensor Streams 🌟 | None | -| ![spatio-temporal forecasting](https://img.shields.io/badge/-Tensor-blue) | *ICDM '19* | Multi-aspect mining of complex sensor sequences 🌟 | [CubeMarker](https://github.com/TakatoHonda/CubeMarker) | -| ![multivariate time series forecasting](https://img.shields.io/badge/-Multivariate-red) | *KDD '19* | Dynamic Modeling and Forecasting of Time-evolving Data Streams | [OrbitMap](https://github.com/yasuko-matsubara/orbitmap) | -| ![multivariate time series forecasting](https://img.shields.io/badge/-Multivariate-red) | *CIKM '19* | Automatic Sequential Pattern Mining in Data Streams | None | -| ![multivariate time series forecasting](https://img.shields.io/badge/-Multivariate-red) | *KDD '16* | Regime Shifts in Streams: Real-time Forecasting of Co-evolving Time Sequences | [RegimeCast](https://www.dm.sanken.osaka-u.ac.jp/~yasuko/SRC/regimecast.zip) | -| ![spatio-temporal forecasting](https://img.shields.io/badge/-Tensor-blue) | *WWW '16* | Non-linear mining of competing local activities | [CompCube](https://www.dm.sanken.osaka-u.ac.jp/~yasuko/SRC/compcube.zip) | -| ![spatio-temporal forecasting](https://img.shields.io/badge/-Tensor-blue) | WWW '15 | The web as a jungle: Non-linear dynamical systems for co-evolving online activities 🌟 | [Ecoweb & dataset](https://www.dm.sanken.osaka-u.ac.jp/~yasuko/SRC/ecoweb.zip) | -| ![multivariate time series forecasting](https://img.shields.io/badge/-Multivariate-red) | *SIGMOD '14* | AutoPlait Automatic Mining of Co-evolving Time Sequences 🌟 | [AutoPlait](https://www.dm.sanken.osaka-u.ac.jp/~yasuko/SRC/autoplait.zip) | -| ![multivariate time series forecasting](https://img.shields.io/badge/-Multivariate-red) | *ICDM '14* | Fast and Exact Monitoring of Co-evolving Data Streams | None | -| ![spatio-temporal forecasting](https://img.shields.io/badge/-Tensor-blue) | *KDD '14* | FUNNEL Automatic Mining of Spatially Coevolving Epidemics | [Funnel](https://www.dm.sanken.osaka-u.ac.jp/~yasuko/SRC/funnel.zip) | ",awesome-time-series-segmentation-papers,lzz19980125,MATLAB,MATLAB,454.0,8.0,This repository contains a reading list of papers on Time Series Segmentation. This repository is still being continuously improved.,lzz19980125_awesome-time-series-segmentation-papers,DOC_CHANGE,Obvious 039dfef306938362aba92b6830b916e80fd5758e,2024-02-06 08:38:23,Suoqin Jin,Rename `object@meta$slices` as `object@meta$samples`,False,76,74,150,"--- R/visualization.R @@ -84,7 +84,7 @@ scPalette <- function(n) { #' @param out.format the format of output figures: svg, png and pdf #' #' Parameters below are set for ""spatial"" diagram. Please also check the function `netVisual_spatial` for more parameters. -#' @param sample.use the sample used for visualization, which should be the element in `object@meta$samples`. +#' @param slice.use the slice used for visualization, which should be the element in `object@meta$slices`. #' @param alpha.image the transparency of individual spots #' @param point.size the size of spots #' @@ -118,7 +118,7 @@ netVisual <- function(object, signaling, signaling.name = NULL, color.use = NULL weight.scale = TRUE, edge.weight.max.individual = NULL, edge.weight.max.aggregate = NULL, edge.width.max=8, layout = c(""circle"",""hierarchy"",""chord"",""spatial""), height = 5, thresh = 0.05, pt.title = 12, title.space = 6, vertex.label.cex = 0.8,from = NULL, to = NULL, bidirection = NULL,vertex.size = NULL, out.format = c(""svg"",""png""), - sample.use = NULL, alpha.image = 0.15, point.size = 1.5, + slice.use = NULL, alpha.image = 0.15, point.size = 1.5, group = NULL,cell.order = NULL,small.gap = 1, big.gap = 10, scale = FALSE, reduce = -1, show.legend = FALSE, legend.pos.x = 20,legend.pos.y = 20, nCol = NULL, ...) { layout <- match.arg(layout) @@ -318,7 +318,7 @@ netVisual <- function(object, signaling, signaling.name = NULL, color.use = NULL #signalName_i <- paste0(pairLR$ligand[i], ""-"",pairLR$receptor[i], sep = """") signalName_i <- pairLR$interaction_name_2[i] prob.i <- prob[,,i] - netVisual_spatial(prob.i, coordinates = coordinates, meta = meta.t, sample.use = sample.use, alpha.image = alpha.image, point.size = point.size, sources.use = sources.use, targets.use = targets.use, idents.use = idents.use, remove.isolate = remove.isolate, top = top, color.use = color.use, vertex.weight = vertex.weight, vertex.weight.max = vertex.weight.max, vertex.size.max = vertex.size.max, weight.scale = weight.scale, edge.weight.max = edge.weight.max, edge.width.max=edge.width.max,title.name = signalName_i, vertex.label.cex = vertex.label.cex,...) + netVisual_spatial(prob.i, coordinates = coordinates, meta = meta.t, slice.use = slice.use, alpha.image = alpha.image, point.size = point.size, sources.use = sources.use, targets.use = targets.use, idents.use = idents.use, remove.isolate = remove.isolate, top = top, color.use = color.use, vertex.weight = vertex.weight, vertex.weight.max = vertex.weight.max, vertex.size.max = vertex.size.max, weight.scale = weight.scale, edge.weight.max = edge.weight.max, edge.width.max=edge.width.max,title.name = signalName_i, vertex.label.cex = vertex.label.cex,...) } dev.off() @@ -331,7 +331,7 @@ netVisual <- function(object, signaling, signaling.name = NULL, color.use = NULL #signalName_i <- paste0(pairLR$ligand[i], ""-"",pairLR$receptor[i], sep = """") signalName_i <- pairLR$interaction_name_2[i] prob.i <- prob[,,i] - netVisual_spatial(prob.i, coordinates = coordinates, meta = meta.t, sample.use = sample.use, alpha.image = alpha.image, point.size = point.size, sources.use = sources.use, targets.use = targets.use, idents.use = idents.use, remove.isolate = remove.isolate, top = top, color.use = color.use, vertex.weight = vertex.weight, vertex.weight.max = vertex.weight.max, vertex.size.max = vertex.size.max, weight.scale = weight.scale, edge.weight.max = edge.weight.max, edge.width.max=edge.width.max,title.name = signalName_i, vertex.label.cex = vertex.label.cex,...) + netVisual_spatial(prob.i, coordinates = coordinates, meta = meta.t, slice.use = slice.use, alpha.image = alpha.image, point.size = point.size, sources.use = sources.use, targets.use = targets.use, idents.use = idents.use, remove.isolate = remove.isolate, top = top, color.use = color.use, vertex.weight = vertex.weight, vertex.weight.max = vertex.weight.max, vertex.size.max = vertex.size.max, weight.scale = weight.scale, edge.weight.max = edge.weight.max, edge.width.max=edge.width.max,title.name = signalName_i, vertex.label.cex = vertex.label.cex,...) } dev.off() @@ -345,7 +345,7 @@ netVisual <- function(object, signaling, signaling.name = NULL, color.use = NULL #signalName_i <- paste0(pairLR$ligand[i], ""-"",pairLR$receptor[i], sep = """") signalName_i <- pairLR$interaction_name_2[i] prob.i <- prob[,,i] - netVisual_spatial(prob.i, coordinates = coordinates, meta = meta.t, sample.use = sample.use, alpha.image = alpha.image, point.size = point.size, sources.use = sources.use, targets.use = targets.use, idents.use = idents.use, remove.isolate = remove.isolate, top = top, color.use = color.use, vertex.weight = vertex.weight, vertex.weight.max = vertex.weight.max, vertex.size.max = vertex.size.max, weight.scale = weight.scale, edge.weight.max = edge.weight.max, edge.width.max=edge.width.max,title.name = signalName_i, vertex.label.cex = vertex.label.cex,...) + netVisual_spatial(prob.i, coordinates = coordinates, meta = meta.t, slice.use = slice.use, alpha.image = alpha.image, point.size = point.size, sources.use = sources.use, targets.use = targets.use, idents.use = idents.use, remove.isolate = remove.isolate, top = top, color.use = color.use, vertex.weight = vertex.weight, vertex.weight.max = vertex.weight.max, vertex.size.max = vertex.size.max, weight.scale = weight.scale, edge.weight.max = edge.weight.max, edge.width.max=edge.width.max,title.name = signalName_i, vertex.label.cex = vertex.label.cex,...) } dev.off() @@ -355,18 +355,18 @@ netVisual <- function(object, signaling, signaling.name = NULL, color.use = NULL # prob.sum <-(prob.sum-min(prob.sum))/(max(prob.sum)-min(prob.sum)) if (is.element(""svg"", out.format)) { svglite(file = paste0(signaling.name,""_"", layout, ""_aggregate.svg""), width = height, height = 1*height) - netVisual_spatial(prob.sum, coordinates = coordinates, meta = meta.t, sample.use = sample.use, alpha.image = alpha.image, point.size = point.size, sources.use = sources.use, targets.use = targets.use, idents.use = idents.use, remove.isolate = remove.isolate, top = top, color.use = color.use, vertex.weight = vertex.weight, vertex.weight.max = vertex.weight.max, vertex.size.max = vertex.size.max, weight.scale = weight.scale, edge.weight.max = edge.weight.max, edge.width.max=edge.width.max,title.name = paste0(signaling.name, "" signaling pathway network""), vertex.label.cex = vertex.label.cex,...) + netVisual_spatial(prob.sum, coordinates = coordinates, meta = meta.t, slice.use = slice.use, alpha.image = alpha.image, point.size = point.size, sources.use = sources.use, targets.use = targets.use, idents.use = idents.use, remove.isolate = remove.isolate, top = top, color.use = color.use, vertex.weight = vertex.weight, vertex.weight.max = vertex.weight.max, vertex.size.max = vertex.size.max, weight.scale = weight.scale, edge.weight.max = edge.weight.max, edge.width.max=edge.width.max,title.name = paste0(signaling.name, "" signaling pathway network""), vertex.label.cex = vertex.label.cex,...) dev.off() } if (is.element(""png"", out.format)) { grDevices::png(paste0(signaling.name,""_"", layout, ""_aggregate.png""), width = height, height = 1*height, units = ""in"",res = 300) - netVisual_spatial(prob.sum, coordinates = coordinates, meta = meta.t, sample.use = sample.use, alpha.image = alpha.image, point.size = point.size, sources.use = sources.use, targets.use = targets.use, idents.use = idents.use, remove.isolate = remove.isolate, top = top, color.use = color.use, vertex.weight = vertex.weight, vertex.weight.max = vertex.weight.max, vertex.size.max = vertex.size.max, weight.scale = weight.scale, edge.weight.max = edge.weight.max, edge.width.max=edge.width.max,title.name = paste0(signaling.name, "" signaling pathway network""), vertex.label.cex = vertex.label.cex,...) + netVisual_spatial(prob.sum, coordinates = coordinates, meta = meta.t, slice.use = slice.use, alpha.image = alpha.image, point.size = point.size, sources.use = sources.use, targets.use = targets.use, idents.use = idents.use, remove.isolate = remove.isolate, top = top, color.use = color.use, vertex.weight = vertex.weight, vertex.weight.max = vertex.weight.max, vertex.size.max = vertex.size.max, weight.scale = weight.scale, edge.weight.max = edge.weight.max, edge.width.max=edge.width.max,title.name = paste0(signaling.name, "" signaling pathway network""), vertex.label.cex = vertex.label.cex,...) dev.off() } if (is.element(""pdf"", out.format)) { # grDevices::pdf(paste0(signaling.name,""_"", layout, ""_aggregate.pdf""), width = height, height = 1*height) grDevices::cairo_pdf(paste0(signaling.name,""_"", layout, ""_aggregate.pdf""), width = height, height = 1*height) - netVisual_spatial(prob.sum, coordinates = coordinates, meta = meta.t, sample.use = sample.use, alpha.image = alpha.image, point.size = point.size, sources.use = sources.use, targets.use = targets.use, idents.use = idents.use, remove.isolate = remove.isolate, top = top, color.use = color.use, vertex.weight = vertex.weight, vertex.weight.max = vertex.weight.max, vertex.size.max = vertex.size.max, weight.scale = weight.scale, edge.weight.max = edge.weight.max, edge.width.max=edge.width.max,title.name = paste0(signaling.name, "" signaling pathway network""), vertex.label.cex = vertex.label.cex,...) + netVisual_spatial(prob.sum, coordinates = coordinates, meta = meta.t, slice.use = slice.use, alpha.image = alpha.image, point.size = point.size, sources.use = sources.use, targets.use = targets.use, idents.use = idents.use, remove.isolate = remove.isolate, top = top, color.use = color.use, vertex.weight = vertex.weight, vertex.weight.max = vertex.weight.max, vertex.size.max = vertex.size.max, weight.scale = weight.scale, edge.weight.max = edge.weight.max, edge.width.max=edge.width.max,title.name = paste0(signaling.name, "" signaling pathway network""), vertex.label.cex = vertex.label.cex,...) dev.off() } } else if (layout == ""chord"") { @@ -482,7 +482,7 @@ netVisual <- function(object, signaling, signaling.name = NULL, color.use = NULL #' @param vertex.label.cex The label size of vertex in the network #' #' Parameters below are set for ""spatial"" diagram. Please also check the function `netVisual_spatial` for more parameters. -#' @param sample.use the sample used for visualization, which should be the element in `object@meta$samples`. +#' @param slice.use the slice used for visualization, which should be the element in `object@meta$slices`. #' @param alpha.image the transparency of individual spots #' @param point.size the size of spots #' @@ -510,7 +510,7 @@ netVisual_aggregate <- function(object, signaling, signaling.name = NULL, color. weight.scale = TRUE, edge.weight.max = NULL, edge.width.max=8, layout = c(""circle"",""hierarchy"",""chord"",""spatial""), pt.title = 12, title.space = 6, vertex.label.cex = 0.8, - sample.use = NULL, alpha.image = 0.15, point.size = 1.5, + slice.use = NULL, alpha.image = 0.15, point.size = 1.5, group = NULL,cell.order = NULL,small.gap = 1, big.gap = 10, scale = FALSE, reduce = -1, show.legend = FALSE, legend.pos.x = 20,legend.pos.y = 20, ...) { layout <- match.arg(layout) @@ -596,7 +596,7 @@ netVisual_aggregate <- function(object, signaling, signaling.name = NULL, color. labels <- object@idents meta.t <- object@meta meta.t$labels <- labels - gg <- netVisual_spatial(prob.sum, coordinates = coordinates, meta = meta.t, sample.use = sample.use, alpha.image = alpha.image, point.size = point.size, sources.use = sources.use, targets.use = targets.use, idents.use = idents.use, remove.isolate = remove.isolate, top = top, color.use = color.use, vertex.weight = vertex.weight, vertex.weight.max = vertex.weight.max, vertex.size.max = vertex.size.max, weight.scale = weight.scale, edge.weight.max = edge.weight.max, edge.width.max=edge.width.max,title.name = paste0(signaling.name, "" signaling pathway network""), vertex.label.cex = vertex.label.cex,...) + gg <- netVisual_spatial(prob.sum, coordinates = coordinates, meta = meta.t, slice.use = slice.use, alpha.image = alpha.image, point.size = point.size, sources.use = sources.use, targets.use = targets.use, idents.use = idents.use, remove.isolate = remove.isolate, top = top, color.use = color.use, vertex.weight = vertex.weight, vertex.weight.max = vertex.weight.max, vertex.size.max = vertex.size.max, weight.scale = weight.scale, edge.weight.max = edge.weight.max, edge.width.max=edge.width.max,title.name = paste0(signaling.name, "" signaling pathway network""), vertex.label.cex = vertex.label.cex,...) } else if (layout == ""chord"") { prob.sum <- apply(prob, c(1,2), sum) @@ -786,7 +786,7 @@ netVisual_individual <- function(object, signaling, signaling.name = NULL, pairL for (i in 1:length(pairLR.name.use)) { signalName_i <- pairLR$interaction_name_2[i] prob.i <- prob[,,i] - gg[[i]] <- netVisual_spatial(prob.i, coordinates = coordinates, meta = meta.t, sample.use = sample.use, alpha.image = alpha.image, point.size = point.size, sources.use = sources.use, targets.use = targets.use, idents.use = idents.use, remove.isolate = remove.isolate, top = top, color.use = color.use, vertex.weight = vertex.weight, vertex.weight.max = vertex.weight.max, vertex.size.max = vertex.size.max, weight.scale = weight.scale, edge.weight.max = edge.weight.max, edge.width.max=edge.width.max,title.name = signalName_i, vertex.label.cex = vertex.label.cex,...) + gg[[i]] <- netVisual_spatial(prob.i, coordinates = coordinates, meta = meta.t, slice.use = slice.use, alpha.image = alpha.image, point.size = point.size, sources.use = sources.use, targets.use = targets.use, idents.use = idents.use, remove.isolate = remove.isolate, top = top, color.use = color.use, vertex.weight = vertex.weight, vertex.weight.max = vertex.weight.max, vertex.size.max = vertex.size.max, weight.scale = weight.scale, edge.weight.max = edge.weight.max, edge.width.max=edge.width.max,title.name = signalName_i, vertex.label.cex = vertex.label.cex,...) } } else if (layout == ""chord"") { if (graphics.init) { @@ -1413,9 +1413,9 @@ mycircle <- function(coords, v=NULL, params) { #' #' @param net A weighted matrix representing the connections #' @param coordinates a data matrix in which each row gives the spatial locations/coordinates of each cell/spot -#' @param meta a data frame with at least two columns named `labels` and `samples`. -#' `meta$labels` is a vector giving the group label of each cell/spot. `meta$samples` is a factor vector defining the sample labels of each dataset. The length should be the same as the number of rows in `coordinates`. -#' @param sample.use the sample used for visualization, which should be the element in `meta$samples`. +#' @param meta a data frame with at least two columns named `labels` and `slices`. +#' `meta$labels` is a vector giving the group label of each cell/spot. `meta$slices` is a factor vector defining the slice labels of each dataset. The length should be the same as the number of rows in `coordinates`. +#' @param slice.use the slice used for visualization, which should be the element in `meta$slices`. #' @param color.use Colors represent different cell groups #' @param title.name the name of the title #' @param sources.use a vector giving the index or the name of source cell groups @@ -1451,22 +1451,22 @@ mycircle <- function(coords, v=NULL, params) { #' @importFrom ggnetwork geom_nodetext_repel #' @return an object of ggplot #' @export -netVisual_spatial <-function(net, coordinates, meta, sample.use = NULL, color.use = NULL,title.name = NULL, sources.use = NULL, targets.use = NULL, idents.use = NULL, remove.isolate = FALSE, remove.loop = TRUE, top = 1, +netVisual_spatial <-function(net, coordinates, meta, slice.use = NULL, color.use = NULL,title.name = NULL, sources.use = NULL, targets.use = NULL, idents.use = NULL, remove.isolate = FALSE, remove.loop = TRUE, top = 1, weight.scale = FALSE, vertex.weight = 20, vertex.weight.max = NULL, vertex.size.max = NULL, vertex.label.cex = 5,vertex.label.color= ""black"", edge.weight.max = NULL, edge.width.max=8, edge.curved=0.2, alpha.edge = 0.6, arrow.angle = 5, arrow.size = 0.2, alpha.image = 0.15, point.size = 1.5, legend.size = 5){ cells.level <- rownames(net) labels <- meta$labels - samples <- meta$samples + slices <- meta$slices if (ncol(coordinates) == 2) { colnames(coordinates) <- c(""x_cent"",""y_cent"") - if (length(unique(samples)) > 1) { - if (is.null(sample.use)) { - stop(""`sample.use` should be provided for visualizing signaling on each individual sample."") - } else if (sample.use %in% unique(samples)) { - coordinates = coordinates[samples == sample.use, ] - labels = labels[samples == sample.use] + if (length(unique(slices)) > 1) { + if (is.null(slice.use)) { + stop(""`slice.use` should be provided for visualizing signaling on each individual slice."") + } else if (slice.use %in% unique(slices)) { + coordinates = coordinates[slices == slice.use, ] + labels = labels[slices == slice.use] } else { - stop(""Please check the input `sample.use`, which should be the element in `meta$samples`."") + stop(""Please check the input `slice.use`, which should be the element in `meta$slices`."") } } temp_coordinates = coordinates @@ -3940,10 +3940,12 @@ dotPlot <- function(object, features, rotation = TRUE, colormap = ""OrRd"", color. #' #' @param object seurat object #' @param features Features to plot (gene expression, metrics) -#' @param colors.use defining the color for each cell group +#' @param color.use defining the color for each cell group #' @param colors.ggplot whether use ggplot color scheme; default: colors.ggplot = FALSE #' @param split.by Name of a metadata column to split plot by; #' @param idents Which classes to include in the plot (default is all) +#' @param show.median whether show the median value +#' @param median.size the shape size of the median #' @param show.text.y whther show y-axis text #' @param line.size line width in the violin plot #' @param pt.size size of the dots @@ -3958,20 +3960,19 @@ dotPlot <- function(object, features, rotation = TRUE, colormap = ""OrRd"", color. #' @examples #' @import ggplot2 #' @importFrom patchwork wrap_plots -# #' @importFrom Seurat VlnPlot StackedVlnPlot<- function(object, features, idents = NULL, split.by = NULL, - colors.use = NULL, colors.ggplot = FALSE, + color.use = NULL, colors.ggplot = FALSE,show.median = FALSE, median.size = 1, angle.x = 90, vjust.x = NULL, hjust.x = NULL, show.text.y = TRUE, line.size = NULL, pt.size = 0, plot.margin = margin(0, 0, 0, 0, ""cm""), ...) { options(warn=-1) - if (is.null(colors.use)) { - numCluster <- length(levels(Idents(object))) + if (is.null(color.use)) { + numCluster <- length(levels(Seurat::Idents(object))) if (colors.ggplot) { - colors.use <- NULL + color.use <- NULL } else { - colors.use <- scPalette(numCluster) + color.use <- scPalette(numCluster) } } if (is.null(vjust.x) | is.null(hjust.x)) { @@ -3982,7 +3983,7 @@ StackedVlnPlot<- function(object, features, idents = NULL, split.by = NULL, hjust.x = hjust[angle == angle.x] } - plot_list<- purrr::map(features, function(x) modify_vlnplot(object = object, features = x, idents = idents, split.by = split.by, cols = colors.use, pt.size = pt.size, + plot_list<- purrr::map(features, function(x) modify_vlnplot(object = object, features = x, idents = idents, split.by = split.by, cols = color.use, show.median = show.median, median.size = median.size, pt.size = pt.size, show.text.y = show.text.y, line.size = line.size, ...)) # Add back x-axis title to bottom plot. patchwork is going to support this? @@ -3991,29 +3992,39 @@ StackedVlnPlot<- function(object, features, idents = NULL, split.by = NULL, theme(axis.text.x = element_text(angle = angle.x, hjust = hjust.x, vjust = vjust.x)) + theme(axis.text.x = element_text(size = 10)) - p<- patchwork::wrap_plots(plotlist = plot_list, ncol = 1) + # change the y-axis tick to only max value + ymaxs<- purrr::map_dbl(plot_list, extract_max) + plot_list<- purrr::map2(plot_list, ymaxs, function(x,y) x + + scale_y_continuous(breaks = c(y)) + + expand_limits(y = y)) + + p<- patchwork::wrap_plots(plotlist = plot_list, ncol = 1) + patchwork::plot_layout(guides = ""collect"") return(p) } + #' modified vlnplot #' @param object Seurat object #' @param features Features to plot (gene expression, metrics) #' @param split.by Name of a metadata column to split plot by; #' @param idents Which classes to include in the plot (default is all) #' @param cols defining the color for each cell group +#' @param show.median whether show the median value +#' @param median.size the shape size of the median #' @param show.text.y whther show y-axis text #' @param line.size line width in the violin plot #' @param pt.size size of the dots #' @param plot.margin adjust the white space between each plot #' @param ... pass any arguments to VlnPlot in Seurat #' @import ggplot2 -# #' @importFrom Seurat VlnPlot #' modify_vlnplot<- function(object, features, idents = NULL, split.by = NULL, cols = NULL, + show.median = FALSE, + median.size = 1, show.text.y = TRUE, line.size = NULL, pt.size = 0, @@ -4022,11 +4033,13 @@ modify_vlnplot<- function(object, options(warn=-1) p<- Seurat::VlnPlot(object, features = features, cols = cols, pt.size = pt.size, idents = idents, split.by = split.by, ... ) + xlab("""") + ylab(features) + ggtitle("""") + if (show.median) { + p <- p + stat_summary(fun.y=median, geom=""point"", shape=3, size=median.size) + } p <- p + theme(text = element_text(size = 10)) + theme(axis.line = element_line(size=line.size)) + theme(axis.text.x = element_text(size = 10), axis.text.y = element_text(size = 8), axis.line.x = element_line(colour = 'black', size=line.size),axis.line.y = element_line(colour = 'black', size= line.size)) # theme(plot.title = element_text(size = 10, face = ""bold"", hjust = 0.5)) - p <- p + theme(legend.position = ""none"", - plot.title= element_blank(), + p <- p + theme(plot.title= element_blank(), # legend.position = ""none"", axis.title.x = element_blank(), axis.text.x = element_blank(), axis.ticks.x = element_blank(), @@ -4034,17 +4047,6 @@ modify_vlnplot<- function(object, axis.text.y = element_text(size = rel(1)), plot.margin = plot.margin ) + theme(axis.text.y = element_text(size = 8)) - - p <- p + scale_y_continuous(labels = function(x) { - idx0 = which(x == 0) - if (idx0 > 1) { - c(rep(x = """", times = idx0-1), ""0"",rep(x = """", times = length(x) -2-idx0), x[length(x) - 1], """") - } else { - c(""0"", rep(x = """", times = length(x)-3), x[length(x) - 1], """") - } - }) - # #c(rep(x = """", times = length(x)-2), x[length(x) - 1], """")) - p <- p + theme(element_line(size=line.size)) if (!show.text.y) { @@ -4058,7 +4060,7 @@ modify_vlnplot<- function(object, #' @importFrom ggplot2 ggplot_build extract_max<- function(p){ ymax<- max(ggplot_build(p)$layout$panel_scales_y[[1]]$range$range) - return(signif(ymax,2)) + return(ceiling(ymax)) } @@ -4095,17 +4097,13 @@ barPlot <- function(object, features, group.by = NULL, split.by = NULL, color.us truncatedMean = function(x) mean(x, trim = trim, na.rm = TRUE), triMean = triMean, median = function(x) median(x, na.rm = TRUE)) - if (packageVersion(""Seurat"") < ""5.0.0"") { - data.all <- object[[assay]]@data - } else { - data.all <- object[[assay]]$data - } + if (!is.null(split.by)) { group = object@meta.data[,split.by] group.levels <- levels(group) df <- data.frame() for (i in 1:length(group.levels)) { - data = data.all[, group == group.levels[i], drop = FALSE] + data = GetAssayData(object, slot = ""data"", assay = assay)[, group == group.levels[i]] labels.use <- labels[group == group.levels[i]] dataavg <- aggregate(t(data[features, ]), list(labels.use) , FUN = FunMean) dataavg <- t(dataavg[,-1]) @@ -4121,7 +4119,7 @@ barPlot <- function(object, features, group.by = NULL, split.by = NULL, color.us df$condition <- factor(df$condition, levels = group.levels) } else { - data = data.all + data = GetAssayData(object, slot = ""data"", assay = assay) dataavg <- aggregate(t(data[features, ]), list(labels) , FUN = FunMean) dataavg <- t(dataavg[,-1]) colnames(dataavg) <- levels(labels) @@ -4225,7 +4223,7 @@ barplot_internal <- function(df, x = ""cellType"", y = ""value"", fill = ""condition"" #' @param object cellchat object #' @param color.use defining the color for each cell group #' @param group.by Name of one metadata columns to group (color) cells. Default is the defined cell groups in CellChat object -#' @param sample.use the sample name used for visualization, which should be the element in `object@meta$samples`. +#' @param slice.use the slice name used for visualization, which should be the element in `object@meta$slices`. #' @param sources.use a vector giving the index or the name of source cell groups #' @param targets.use a vector giving the index or the name of target cell groups #' @param idents.use a vector giving the index or the name of cell groups of interest @@ -4242,7 +4240,7 @@ barplot_internal <- function(df, x = ""cellType"", y = ""value"", fill = ""condition"" #' @export #' #' @examples -spatialDimPlot <- function(object, color.use = NULL, group.by = NULL, sample.use = NULL, sources.use = NULL, targets.use = NULL, idents.use = NULL, +spatialDimPlot <- function(object, color.use = NULL, group.by = NULL, slice.use = NULL, sources.use = NULL, targets.use = NULL, idents.use = NULL, alpha = 1, shape.by = 16, title.name = NULL, point.size = 2.4, legend.size = 5, legend.text.size = 8, legend.position = ""right"", ncol = 1, byrow = FALSE){ if (is.null(group.by)) { @@ -4254,17 +4252,17 @@ spatialDimPlot <- function(object, color.use = NULL, group.by = NULL, sample.use cells.level <- levels(labels) coordinates <- object@images$coordinates - samples <- object@meta$samples + slices <- object@meta$slices if (ncol(coordinates) == 2) { colnames(coordinates) <- c(""x_cent"",""y_cent"") - if (length(unique(samples)) > 1) { - if (is.null(sample.use)) { - stop(""`sample.use` should be provided for visualizing signaling on each individual sample."") - } else if (sample.use %in% unique(samples)) { - coordinates = coordinates[samples == sample.use, ] - labels = labels[samples == sample.use] + if (length(unique(slices)) > 1) { + if (is.null(slice.use)) { + stop(""`slice.use` should be provided for visualizing signaling on each individual slice."") + } else if (slice.use %in% unique(slices)) { + coordinates = coordinates[slices == slice.use, ] + labels = labels[slices == slice.use] } else { - stop(""Please check the input `sample.use`, which should be the element in `meta$samples`."") + stop(""Please check the input `slice.use`, which should be the element in `meta$slices`."") } } temp_coordinates = coordinates @@ -4334,7 +4332,7 @@ spatialDimPlot <- function(object, color.use = NULL, group.by = NULL, sample.use #' @param features a char vector containing features to visualize. `features` can be genes or column names of `object@meta`. #' @param signaling signalling names to visualize #' @param pairLR.use a data frame consisting of one column named ""interaction_name"", defining the L-R pairs of interest -#' @param sample.use the sample used for visualization, which should be the element in `object@meta$samples`. +#' @param slice.use the slice used for visualization, which should be the element in `object@meta$slices`. #' @param enriched.only whether only return the identified enriched signaling genes in the database. Default = TRUE, returning the significantly enriched signaling interactions #' @param do.group set `do.group = TRUE` when only showing enriched signaling based on cell group-level communication; set `do.group = FALSE` when only showing enriched signaling based on individual cell-level communication #' @param thresh threshold of the p-value for determining significant interaction when visualizing links at the level of ligands/receptors; @@ -4355,7 +4353,7 @@ spatialDimPlot <- function(object, color.use = NULL, group.by = NULL, sample.use #' #' @examples -spatialFeaturePlot <- function(object, features = NULL, signaling = NULL, pairLR.use = NULL, sample.use = NULL, enriched.only = TRUE,thresh = 0.05, do.group = TRUE, +spatialFeaturePlot <- function(object, features = NULL, signaling = NULL, pairLR.use = NULL, slice.use = NULL, enriched.only = TRUE,thresh = 0.05, do.group = TRUE, color.heatmap = ""Spectral"", n.colors = 8, direction = -1, do.binary = FALSE, cutoff = NULL, color.use = NULL, alpha = 1, point.size = 0.8, legend.size = 3, legend.text.size = 8, shape.by = 16, ncol = NULL, @@ -4363,18 +4361,18 @@ spatialFeaturePlot <- function(object, features = NULL, signaling = NULL, pairLR data <- as.matrix(object@data) meta <- object@meta coords <- object@images$coordinates - samples <- meta$samples + slices <- meta$slices if (ncol(coords) == 2) { colnames(coords) <- c(""x_cent"",""y_cent"") - if (length(unique(samples)) > 1) { - if (is.null(sample.use)) { - stop(""`sample.use` should be provided for visualizing signaling on each individual sample."") - } else if (sample.use %in% unique(samples)) { - coords = coords[samples == sample.use, ] - meta = meta[samples == sample.use, ] - data = data[, samples == sample.use] + if (length(unique(slices)) > 1) { + if (is.null(slice.use)) { + stop(""`slice.use` should be provided for visualizing signaling on each individual slice."") + } else if (slice.use %in% unique(slices)) { + coords = coords[slices == slice.use, ] + meta = meta[slices == slice.use, ] + data = data[, slices == slice.use] } else { - stop(""Please check the input `sample.use`, which should be the element in `meta$samples`."") + stop(""Please check the input `slice.use`, which should be the element in `meta$slices`."") } } temp_coords = coords ",cellchat,jinworks,R,R,367.0,61.0,"R toolkit for inference, visualization and analysis of cell-cell communication from single-cell and spatially resolved transcriptomics",jinworks_cellchat,CODE_IMPROVEMENT,"Non-functional code changes to improve readability, migration etc." 9918e49bb12d9787340b895624b45082b8c19d4c,,bao-qian,"Only deploy to NuGet when API changed (interface or implementation), see #360",False,1,1,0,"--- appveyor.yml @@ -29,4 +29,4 @@ deploy: secure: yybUOFgBuGVpbmOVZxsurC8OpkClzt9dR+/54WpMWcq6b6oyMatciaelRPnXsjRn artifact: nugetpackage on: - branch: master + branch: api",microsoft_PowerToys.json,,,,,,,microsoft_PowerToys.json,NEW_FEAT,"4, Part of pull request adding a new feature" dfb81c969f795275e1c238f4ee618d4249e2333f,,Harrison Chase,bump version 0.0.6 (#56),False,1,1,0,"--- VERSION @@ -1 +1 @@ -0.0.5 +0.0.6",langchain-ai_langchain.json,,,,,,,langchain-ai_langchain.json,CONFIG_CHANGE,Just a version change fb92b90d5c06e8e06e9f725c1e1471e556d5a1dc,2024-10-25 15:28:54,2dust,Bug fix https://github.com/2dust/v2rayN/issues/5909,False,12,13,25,"--- v2rayN/ServiceLib/ViewModels/StatusBarViewModel.cs @@ -104,18 +104,6 @@ namespace ServiceLib.ViewModels public StatusBarViewModel(Func>? updateView) { _config = AppHandler.Instance.Config; - SelectedRouting = new(); - SelectedServer = new(); - RunningServerToolTipText = ""-""; - - if (_config.TunModeItem.EnableTun && AppHandler.Instance.IsAdministrator) - { - EnableTun = true; - } - else - { - _config.TunModeItem.EnableTun = EnableTun = false; - } #region WhenAnyValue && ReactiveCommand @@ -191,6 +179,19 @@ namespace ServiceLib.ViewModels private async Task Init() { + SelectedRouting = new(); + SelectedServer = new(); + RunningServerToolTipText = ""-""; + + if (_config.TunModeItem.EnableTun && AppHandler.Instance.IsAdministrator) + { + EnableTun = true; + } + else + { + _config.TunModeItem.EnableTun = EnableTun = false; + } + await RefreshRoutingsMenu(); await InboundDisplayStatus(); await ChangeSystemProxyAsync(_config.SystemProxyItem.SysProxyType, true); ",v2rayn,2dust,C#,C#,75986.0,12289.0,"A GUI client for Windows, Linux and macOS, support Xray and sing-box and others",2dust_v2rayn,BUG_FIX,obvious 3038c77a8c59269d300a15b5925c22b7ec47a6f3,2022-01-28 01:32:10,0xFF,fix error (#637),False,1,1,2,"--- README.ru-RU.md @@ -37,7 +37,7 @@ _Читать на других языках:_ * `B` [Двунаправленный связный список](src/data-structures/doubly-linked-list) * `B` [Очередь](src/data-structures/queue) * `B` [Стек](src/data-structures/stack) -* `B` [Хеш-таблица](src/data-structures/hash-table) +* `B` [Хеш-табица](src/data-structures/hash-table) * `B` [Куча](src/data-structures/heap) — максимальная и минимальная версии * `B` [Очередь с приоритетом](src/data-structures/priority-queue) * `A` [Префиксное дерево](src/data-structures/trie) ",javascript-algorithms,trekhleb,JavaScript,JavaScript,190336.0,30518.0,📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings,trekhleb_javascript-algorithms,DOC_CHANGE,changes in readme f339e9e3391465de4921aea3194f3021016f07d1,,Matt Corallo,Make ThreadOpenAddedConnections2 exit quicker if(GetNameProxy()).,False,2,0,2,"--- net.cpp @@ -1544,6 +1544,8 @@ void ThreadOpenAddedConnections2(void* parg) CSemaphoreGrant grant(*semOutbound); OpenNetworkConnection(addr, &grant, strAddNode.c_str()); Sleep(500); + if (fShutdown) + return; } vnThreadsRunning[THREAD_ADDEDCONNECTIONS]--; Sleep(120000); // Retry every 2 minutes",bitcoin_bitcoin.json,,,,,,,bitcoin_bitcoin.json,PERF_IMPROVEMENT,"3, commii msg suggest that connection will exit quicker" 61890fe864a40f7e6a6e621344ca7816c1330673,2025-02-26 04:59:36,Sam Zhou,Cleanup uses of internal Flow types (#49683) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/49683 Use of these types will trigger `[internal-type]` error in the next version of Flow. This diff cleans them up ahead of the time. Changelog: [Internal] Reviewed By: gkz Differential Revision: D70202028 fbshipit-source-id: 97b7217040b63514f20888fb20c86596235a82a6,False,2,2,4,"--- packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap @@ -9211,7 +9211,7 @@ exports[`public API should not change unintentionally src/private/setup/setUpPer exports[`public API should not change unintentionally src/private/types/HostComponent.js 1`] = ` ""export type HostComponent = component( - ref: React.RefSetter, + ref: React$RefSetter, ...Config ); "" --- packages/react-native/src/private/types/HostComponent.js @@ -11,6 +11,6 @@ import type {HostInstance} from './HostInstance'; export type HostComponent = component( - ref: React.RefSetter, + ref: React$RefSetter, ...Config ); ",react-native,facebook,C++,C++,120863.0,24536.0,A framework for building native applications using React,facebook_react-native,CODE_IMPROVEMENT,some cleanups done in the code to handle internal errors that might arise in the future e92e2001bf22ff90735d207eaa9df56508a0f1b4,2024-03-25 03:37:00,Kieran Eglin,Testing GHCR support,False,7,0,7,"--- .github/workflows/build_and_push_docker.yml @@ -28,13 +28,6 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Login to GHCR - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push uses: docker/build-push-action@v5 with: ",pinchflat,kieraneglin,Elixir,Elixir,2779.0,59.0,Your next YouTube media manager,kieraneglin_pinchflat,CODE_IMPROVEMENT,Code change: type annotation added 61c1bf0a41157bdfbc06b060e6f6ef34db72065a,,Thomas Aylott,fixes browserify task transforms support,False,1,1,0,"--- browserify.js @@ -46,7 +46,7 @@ module.exports = function() { }; // TODO: make sure this works, test with this too - config.transforms.forEach(bundle.transform, this); + config.transforms.forEach(bundle.transform, bundle); // Actually bundle it up var _this = this;",facebook_react.json,,,,,,,facebook_react.json,BUG_FIX,"4, Fix written in commit msg which clearly fixes a code error" e678a3fed232574da8e89b28b1f1fe687b8755d5,2024-01-15 04:48:34,Halimao,"refactor: improve the flow of `forc deploy` when selecting an account that doesn't exist (#5447) ## Description Close #5310 Co-authored-by: Joshua Batty ",False,17,5,22,"--- forc-plugins/forc-client/src/util/tx.rs @@ -224,23 +224,11 @@ impl TransactionBuilderExt for Tran } print_account_balances(&accounts, &account_balances); - let mut account_index; - loop { - print!(""\nPlease provide the index of account to use for signing: ""); - std::io::stdout().flush()?; - let mut input_account_index = String::new(); - std::io::stdin().read_line(&mut input_account_index)?; - account_index = input_account_index.trim().parse::()?; - if accounts.contains_key(&account_index) { - break; - } - let options: Vec = accounts.keys().map(|key| key.to_string()).collect(); - println_warning(&format!( - ""\""{}\"" is not a valid account.\nPlease choose a valid option from {}"", - account_index, - options.join("",""), - )); - } + print!(""\nPlease provide the index of account to use for signing: ""); + std::io::stdout().flush()?; + let mut account_index = String::new(); + std::io::stdin().read_line(&mut account_index)?; + let account_index = account_index.trim().parse::()?; let secret_key = derive_secret_key(&wallet_path, account_index, &password) .map_err(|e| { ",sway,fuellabs,Rust,Rust,62435.0,5382.0,🌴 Empowering everyone to build reliable and efficient smart contracts.,fuellabs_sway,CODE_IMPROVEMENT,Obvious eb19abcc6b144327217ad90534610f6cdef9a9ee,2023-01-15 19:03:19,Sam Miller,"Update broken link to IronFleet paper (#709) Current link is broken. IronFleet paper retrieved via link on Microsoft Research [publication](https://www.microsoft.com/en-us/research/publication/ironfleet-proving-practical-distributed-systems-correct/) page. Paper is formatted in two-columns, further indicating that it is the same paper as the previously linked one.",False,1,1,2,"--- distributed_systems/README.md @@ -269,4 +269,4 @@ Full Cluster Geo-replication](tiered-replication-a-cost-effective-alternative-to An Analysis of Production Failures in Distributed Data-Intensive Systems](https://www.usenix.org/system/files/conference/osdi14/osdi14-paper-yuan.pdf) -* :scroll: [IronFleet: Proving Practical Distributed Systems Correct](https://www.microsoft.com/en-us/research/wp-content/uploads/2015/10/ironfleet.pdf)) +* :scroll: [IronFleet: Proving Practical Distributed Systems Correct](http://research.microsoft.com/pubs/255833/IronFleet-twocol.pdf) ",papers-we-love,papers-we-love,Shell,Shell,91347.0,5859.0,Papers from the computer science community to read and discuss.,papers-we-love_papers-we-love,DOC_CHANGE,changes in readme 55f0682b320dacc390eaae3ae755ec02b947d229,2023-02-21 19:32:19,Guo Zhanyu,"add pid, todo",False,7,0,7,"--- local_planner/pid.m @@ -1,7 +0,0 @@ -function [outputArg1,outputArg2] = pid(inputArg1,inputArg2) -%PID Summary of this function goes here -% Detailed explanation goes here -outputArg1 = inputArg1; -outputArg2 = inputArg2; -end - --- simulation_global.mlx Binary files a/simulation_global.mlx and b/simulation_global.mlx differ --- simulation_local.mlx Binary files a/simulation_local.mlx and b/simulation_local.mlx differ --- simulation_total.mlx Binary files a/simulation_total.mlx and /dev/null differ ",matlab_motion_planning,ai-winter,MATLAB,MATLAB,419.0,66.0,"Motion planning and Navigation of AGV/AMR:matlab implementation of Dijkstra, A*, Theta*, JPS, D*, LPA*, D* Lite, RRT, RRT*, RRT-Connect, Informed RRT*, ACO, Voronoi, PID, LQR, MPC, APF, RPP, DWA, DDPG, Bezier, B-spline, Dubins, Reeds-Shepp etc.",ai-winter_matlab_motion_planning,NEW_FEAT,Obvious 7a094cec63795a3ebbaacebdf9dc4294cd3179b2,2022-04-23 18:44:45,Kian-Meng Ang,Fix typos (#661),False,3,3,6,"--- CONTRIBUTING.md @@ -61,7 +61,7 @@ See [Translations](TRANSLATIONS.md). ### Adding translations to new languages -Translations to new languages are always welcome! Keep in mind a translation must be maintained. +Translations to new languages are always welcome! Keep in mind a transation must be maintained. * Do you have time to be a maintainer for a new language? Please see the list of [translations](TRANSLATIONS.md) and tell us so we know we can count on you in the future. * Check the [translations](TRANSLATIONS.md), issues, and pull requests to see if a translation is in progress or stalled. If it's in progress, offer to help. If it's stalled, consider becoming the maintainer if you can commit to it. --- README.md @@ -1673,7 +1673,7 @@ Handy metrics based on numbers above: | Design an online multiplayer card game | [indieflashblog.com](https://web.archive.org/web/20180929181117/http://www.indieflashblog.com/how-to-create-an-asynchronous-multiplayer-game.html)
[buildnewgames.com](http://buildnewgames.com/real-time-multiplayer/) | | Design a garbage collection system | [stuffwithstuff.com](http://journal.stuffwithstuff.com/2013/12/08/babys-first-garbage-collector/)
[washington.edu](http://courses.cs.washington.edu/courses/csep521/07wi/prj/rick.pdf) | | Design an API rate limiter | [https://stripe.com/blog/](https://stripe.com/blog/rate-limiters) | -| Design a Stock Exchange (like NASDAQ or Binance) | [Jane Street](https://youtu.be/b1e4t2k2KJY)
[Golang Implementation](https://around25.com/blog/building-a-trading-engine-for-a-crypto-exchange/)
[Go Implementation](http://bhomnick.net/building-a-simple-limit-order-in-go/) | +| Design a Stock Exchange (like NASDAQ or Binance) | [Jane Street](https://youtu.be/b1e4t2k2KJY)
[Golang Implementation](https://around25.com/blog/building-a-trading-engine-for-a-crypto-exchange/)
[Go Implemenation](http://bhomnick.net/building-a-simple-limit-order-in-go/) | | Add a system design question | [Contribute](#contributing) | ### Real world architectures --- generate-epub.sh @@ -34,7 +34,7 @@ generate () { cat $name.md | generate_from_stdin $name.epub $language } -# Check if dependencies exist +# Check if depencies exist check_dependencies () { for dependency in ""${dependencies[@]}"" do ",system-design-primer,donnemartin,Python,Python,290909.0,48355.0,Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.,donnemartin_system-design-primer,DOC_CHANGE,changes in md file 759f70f1967c56e0ce9b8f51a6c0b33efdea869b,2025-02-05 12:15:35,Jordan Harband,[Refactor] prefer `case` over if/else chains,False,14,11,25,"--- nvm.sh @@ -1415,11 +1415,11 @@ nvm_add_iojs_prefix() { nvm_strip_iojs_prefix() { local NVM_IOJS_PREFIX NVM_IOJS_PREFIX=""$(nvm_iojs_prefix)"" - - case ""${1-}"" in - ""${NVM_IOJS_PREFIX}"") nvm_echo ;; - *) nvm_echo ""${1#""${NVM_IOJS_PREFIX}""-}"" ;; - esac + if [ ""${1-}"" = ""${NVM_IOJS_PREFIX}"" ]; then + nvm_echo + else + nvm_echo ""${1#""${NVM_IOJS_PREFIX}""-}"" + fi } nvm_ls() { @@ -1551,15 +1551,12 @@ nvm_ls() { fi if [ ""${NVM_ADD_SYSTEM-}"" = true ]; then - case ""${PATTERN}"" in - '' | v) - VERSIONS=""${VERSIONS} + if [ -z ""${PATTERN}"" ] || [ ""${PATTERN}"" = 'v' ]; then + VERSIONS=""${VERSIONS} system"" - ;; - system) - VERSIONS=""system"" - ;; - esac + elif [ ""${PATTERN}"" = 'system' ]; then + VERSIONS=""system"" + fi fi if [ -z ""${VERSIONS}"" ]; then @@ -1693,7 +1690,7 @@ EOF LTS=""${LTS#lts/}"" fi - VERSIONS=""$( { command awk -v lts=""${LTS-}"" '{ + VERSIONS=""$({ command awk -v lts=""${LTS-}"" '{ if (!$1) { next } if (lts && $10 ~ /^\-?$/) { next } if (lts && lts != ""*"" && tolower($10) !~ tolower(lts)) { next } ",nvm,nvm-sh,Shell,Shell,82623.0,8249.0,Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions,nvm-sh_nvm,CODE_IMPROVEMENT,Obvious cd69374820b39e0576df80a7d7b9241db3eeccd6,2025-02-14 16:58:34,Steve Lhomme,pulse: assume pa_usec_t is in microseconds As the name suggests. VLC_TICK_FROM_US() is already used in many places for that. The hardcoded value for DEMUX_GET_TIME was bogus.,False,3,3,6,"--- modules/access/pulse.c @@ -169,9 +169,9 @@ static void stream_read_cb(pa_stream *s, size_t length, void *userdata) return; } if (negative) - pts += VLC_TICK_FROM_US(latency); + pts += latency; else - pts -= VLC_TICK_FROM_US(latency); + pts -= latency; es_out_SetPCR(demux->out, pts); if (unlikely(sys->es == NULL)) @@ -206,7 +206,7 @@ static int Control(demux_t *demux, int query, va_list ap) if (pa_stream_get_time(sys->stream, &us) < 0) return VLC_EGENERIC; - *(va_arg(ap, vlc_tick_t *)) = VLC_TICK_FROM_US(us); + *(va_arg(ap, vlc_tick_t *)) = us * 10000000LL / CLOCK_FREQ; break; } ",vlc,,C,C,,,Video player,_vlc,CODE_IMPROVEMENT,"Non-functional code changes to improve readability, migration etc." 38d87fe7c2173847ce45a87ff43f69c056169b23,2023-09-28 01:09:04,Dongbo Wang,Merged PR 27795: Fix the regex for package name validation Fix the regex for package name validation,False,1,1,2,"--- tools/releaseBuild/azureDevOps/templates/release-ValidatePackageNames.yml @@ -44,7 +44,7 @@ steps: - pwsh: | $message = @() Get-ChildItem $(System.ArtifactsDirectory)\* -recurse -filter *.tar.gz | ForEach-Object { - if($_.Name -notmatch 'powershell-(lts-)?\d+\.\d+\.\d+\-([a-z]*.\d+\-)?(linux|osx|linux-linux-musl)+\-(x64\-fxdependent|x64|arm32|arm64|x64\-alpine\-fxdependent)\.(tar\.gz)') + if($_.Name -notmatch 'powershell-(lts-)?\d+\.\d+\.\d+\-([a-z]*.\d+\-)?(linux|osx|linux-linux-musl)+\-(x64\-fxdependent|x64|arm32|arm64|x64\-fxdependent)\.(tar\.gz)') { $messageInstance = ""$($_.Name) is not a valid package name"" $message += $messageInstance ",powershell,powershell,C#,C#,46656.0,7522.0,PowerShell for every system!,powershell_powershell,BUG_FIX,regex fixed 23c78e2fa66007ed5a4303f7784b7319adc39e29,2024-10-18 16:34:56,"Daniel, Petrica Andrei-Daniel",Skip links as supporting library doesn't support that (#378),False,1,0,1,"--- src/NativeServiceProvider.php @@ -157,7 +157,6 @@ class NativeServiceProvider extends PackageServiceProvider 'driver' => 'local', 'root' => env($env, ''), 'throw' => false, - 'links' => 'skip', ]]); } } ",laravel,nativephp,PHP,PHP,3498.0,182.0,Laravel wrapper for the NativePHP framework,nativephp_laravel,BUG_FIX,links skipped that library doesn't support 5b14c5fc45f0eff0bbc6fa3947635e4bfced711a,2025-02-18 07:17:26,macro,Update SmsFlashPromotionProductRelationService.java,False,1,1,2,"--- mall-admin/src/main/java/com/macro/mall/service/SmsFlashPromotionProductRelationService.java @@ -33,7 +33,7 @@ public interface SmsFlashPromotionProductRelationService { SmsFlashPromotionProductRelation getItem(Long id); /** - * 根据限时购和场次id分页查询限时购商品信息 + * 分页查询相关商品及限时购促销信息 * * @param flashPromotionId 限时购id * @param flashPromotionSessionId 限时购场次id ",mall,macrozheng,Java,Java,79319.0,29052.0,mall项目是一套电商系统,包括前台商城系统及后台管理系统,基于Spring Boot+MyBatis实现,采用Docker容器化部署。 前台商城系统包含首页门户、商品推荐、商品搜索、商品展示、购物车、订单流程、会员中心、客户服务、帮助中心等模块。 后台管理系统包含商品管理、订单管理、会员管理、促销管理、运营管理、内容管理、统计报表、财务管理、权限管理、设置等模块。,macrozheng_mall,CONFIG_CHANGE,Very small changes 7d13e6863a940fbc81987b32700681a513794f4a,2022-01-22 15:20:33,Oleksii Trekhleb,README fixes.,False,5,2,7,"--- src/algorithms/cryptography/caesar-cipher/README.md @@ -1,8 +1,5 @@ # Caesar Cipher Algorithm -_Read this in other languages:_ -[_Русский_](README.ru-RU.md) - In cryptography, a **Caesar cipher**, also known as **Caesar's cipher**, the **shift cipher**, **Caesar's code** or **Caesar shift**, is one of the simplest and most widely known encryption techniques. It is a type of substitution cipher in which each letter in the plaintext is replaced by a letter some fixed number of positions down the alphabet. For example, with a left shift of `3`, `D` would be replaced by `A`, `E` would become `B`, and so on. The method is named after Julius Caesar, who used it in his private correspondence. ![Caesar Cipher Algorithm](https://upload.wikimedia.org/wikipedia/commons/4/4a/Caesar_cipher_left_shift_of_3.svg) --- src/algorithms/linked-list/traversal/README.md @@ -1,7 +1,7 @@ # Linked List Traversal _Read this in other languages:_ -[_Русский_](README.ru-RU.md), +[_Русский_](README.ru-RU.md) [中文](README.zh-CN.md) The task is to traverse the given linked list in straight order. --- src/algorithms/string/knuth-morris-pratt/knuthMorrisPratt.js @@ -43,7 +43,7 @@ export default function knuthMorrisPratt(text, word) { if (text[textIndex] === word[wordIndex]) { // We've found a match. if (wordIndex === word.length - 1) { - return (textIndex - word.length) + 1; + return textIndex - word.length + 1; } wordIndex += 1; textIndex += 1; ",javascript-algorithms,trekhleb,JavaScript,JavaScript,190336.0,30518.0,📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings,trekhleb_javascript-algorithms,PERF_IMPROVEMENT,Code change: indexing added 65cbcb2f73d89459a9cae5dc9b083be8f07eabae,,Peter Bacon Darwin,chore(doc-gen): ensure `log` is injected into `getExportDocType` See #2446,False,1,1,0,"--- getExportDocType.js @@ -1,6 +1,6 @@ var ts = require('typescript'); -module.exports = function getExportDocType() { +module.exports = function getExportDocType(log) { return function(symbol) { if(symbol.flags & ts.SymbolFlags.FunctionScopedVariable) {",angular_angular.json,,,,,,,angular_angular.json,BUG_FIX,"5, There is a number in commit message, and when you go to that link in angular repo, you can see that it is a bug fix" 0828b38d4fd9da21dcbf093295d9c2c7ced1b7d9,2022-09-17 08:14:57,Eugene Chernyshov,added asty (#4405),False,1,0,1,"--- README.md @@ -2909,7 +2909,6 @@ _Libraries and tools to implement Zero Trust architectures._ _Source code analysis tools, also known as Static Application Security Testing (SAST) Tools._ - [apicompat](https://github.com/bradleyfalzon/apicompat) - Checks recent changes to a Go project for backwards incompatible changes. -- [asty](https://github.com/asty-org/asty) - Converts golang AST to JSON and JSON to AST. - [ChainJacking](https://github.com/Checkmarx/chainjacking) - Find which of your Go lang direct GitHub dependencies is susceptible to ChainJacking attack. - [dupl](https://github.com/mibk/dupl) - Tool for code clone detection. - [errcheck](https://github.com/kisielk/errcheck) - Errcheck is a program for checking for unchecked errors in Go programs. ",awesome-go,avelino,Go,Go,139192.0,12134.0,"A curated list of awesome Go frameworks, libraries and software",avelino_awesome-go,DOC_CHANGE,changes in readme 9160c16cf14c71cba9bb8557d451bf89312dbe7d,2023-04-01 08:11:41,Mike Bostock,d3-delaunay 6.0.4,False,71,71,142,"--- API.md @@ -357,43 +357,43 @@ Compute contour polygons using marching squares. * [*density*.bandwidth](https://github.com/d3/d3-contour/blob/v4.0.2/README.md#density_bandwidth) - set the bandwidth of the density estimator. * [*density*.contours](https://github.com/d3/d3-contour/blob/v4.0.2/README.md#density_contours) - compute density contours. -## [Voronoi Diagrams (d3-delaunay)](https://github.com/d3/d3-delaunay/tree/v6.0.4) +## [Voronoi Diagrams (d3-delaunay)](https://github.com/d3/d3-delaunay/tree/v6.0.3) Compute the Voronoi diagram of a set of two-dimensional points. -* [new Delaunay](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#new_Delaunay) - create a delaunay triangulation for an array of point coordinates. -* [Delaunay.from](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#delaunay_from) - create a delaunay triangulation for an iterable of points. -* [*delaunay*.points](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#delaunay_points) - the coordinates of the points. -* [*delaunay*.halfedges](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#delaunay_halfedges) - the delaunay halfedges. -* [*delaunay*.hull](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#delaunay_hull) - the convex hull as point indices. -* [*delaunay*.triangles](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#delaunay_triangles) - the delaunay triangles. -* [*delaunay*.inedges](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#delaunay_inedges) - the delaunay inedges -* [*delaunay*.find](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#delaunay_find) - find the closest point in the delaunay triangulation. -* [*delaunay*.neighbors](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#delaunay_neighbors) - the neighbors of a point in the delaunay triangulation. -* [*delaunay*.render](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#delaunay_render) - render the edges of the delaunay triangulation. -* [*delaunay*.renderHull](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#delaunay_renderHull) - render the convex hull. -* [*delaunay*.renderTriangle](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#delaunay_renderTriangle) - render a triangle. -* [*delaunay*.renderPoints](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#delaunay_renderPoints) - render the points. -* [*delaunay*.hullPolygon](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#delaunay_hullPolygon) - the closed convex hull as point coordinates. -* [*delaunay*.trianglePolygons](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#delaunay_trianglePolygons) - iterate over all the triangles as polygons. -* [*delaunay*.trianglePolygon](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#delaunay_trianglePolygon) - return a triangle as a polygon. -* [*delaunay*.update](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#delaunay_update) - update a delaunay triangulation in place. -* [*delaunay*.voronoi](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#delaunay_voronoi) - compute the voronoi diagram associated with a delaunay triangulation. -* [*voronoi*.delaunay](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#voronoi_delaunay) - the voronoi diagram’s source delaunay triangulation. -* [*voronoi*.circumcenters](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#voronoi_circumcenters) - the triangles’ circumcenters. -* [*voronoi*.vectors](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#voronoi_vectors) - directions for the outer (infinite) cells of the voronoi diagram. -* [*voronoi*.xmin](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#voronoi_xmin) - set the *xmin* bound of the extent. -* [*voronoi*.ymin](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#voronoi_ymin) - set the *ymin* bound of the extent. -* [*voronoi*.xmax](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#voronoi_xmax) - set the *xmax* bound of the extent. -* [*voronoi*.ymax](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#voronoi_ymax) - set the *ymax* bound of the extent. -* [*voronoi*.contains](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#voronoi_contains) - test whether a point is inside a voronoi cell. -* [*voronoi*.neighbors](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#voronoi_neighbors) - the neighbors of a point in the voronoi diagram. -* [*voronoi*.render](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#voronoi_render) - render the mesh of voronoi cells. -* [*voronoi*.renderBounds](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#voronoi_renderBounds) - render the extent. -* [*voronoi*.renderCell](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#voronoi_renderCell) - render a voronoi cell. -* [*voronoi*.cellPolygons](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#voronoi_cellPolygons) - iterate over all the cells as polygons. -* [*voronoi*.cellPolygon](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#voronoi_cellPolygon) - return a cell as a polygon. -* [*voronoi*.update](https://github.com/d3/d3-delaunay/blob/v6.0.4/README.md#voronoi_update) - update a voronoi diagram in place. +* [new Delaunay](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#new_Delaunay) - create a delaunay triangulation for an array of point coordinates. +* [Delaunay.from](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#delaunay_from) - create a delaunay triangulation for an iterable of points. +* [*delaunay*.points](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#delaunay_points) - the coordinates of the points. +* [*delaunay*.halfedges](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#delaunay_halfedges) - the delaunay halfedges. +* [*delaunay*.hull](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#delaunay_hull) - the convex hull as point indices. +* [*delaunay*.triangles](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#delaunay_triangles) - the delaunay triangles. +* [*delaunay*.inedges](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#delaunay_inedges) - the delaunay inedges +* [*delaunay*.find](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#delaunay_find) - find the closest point in the delaunay triangulation. +* [*delaunay*.neighbors](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#delaunay_neighbors) - the neighbors of a point in the delaunay triangulation. +* [*delaunay*.render](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#delaunay_render) - render the edges of the delaunay triangulation. +* [*delaunay*.renderHull](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#delaunay_renderHull) - render the convex hull. +* [*delaunay*.renderTriangle](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#delaunay_renderTriangle) - render a triangle. +* [*delaunay*.renderPoints](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#delaunay_renderPoints) - render the points. +* [*delaunay*.hullPolygon](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#delaunay_hullPolygon) - the closed convex hull as point coordinates. +* [*delaunay*.trianglePolygons](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#delaunay_trianglePolygons) - iterate over all the triangles as polygons. +* [*delaunay*.trianglePolygon](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#delaunay_trianglePolygon) - return a triangle as a polygon. +* [*delaunay*.update](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#delaunay_update) - update a delaunay triangulation in place. +* [*delaunay*.voronoi](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#delaunay_voronoi) - compute the voronoi diagram associated with a delaunay triangulation. +* [*voronoi*.delaunay](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#voronoi_delaunay) - the voronoi diagram’s source delaunay triangulation. +* [*voronoi*.circumcenters](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#voronoi_circumcenters) - the triangles’ circumcenters. +* [*voronoi*.vectors](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#voronoi_vectors) - directions for the outer (infinite) cells of the voronoi diagram. +* [*voronoi*.xmin](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#voronoi_xmin) - set the *xmin* bound of the extent. +* [*voronoi*.ymin](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#voronoi_ymin) - set the *ymin* bound of the extent. +* [*voronoi*.xmax](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#voronoi_xmax) - set the *xmax* bound of the extent. +* [*voronoi*.ymax](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#voronoi_ymax) - set the *ymax* bound of the extent. +* [*voronoi*.contains](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#voronoi_contains) - test whether a point is inside a voronoi cell. +* [*voronoi*.neighbors](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#voronoi_neighbors) - the neighbors of a point in the voronoi diagram. +* [*voronoi*.render](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#voronoi_render) - render the mesh of voronoi cells. +* [*voronoi*.renderBounds](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#voronoi_renderBounds) - render the extent. +* [*voronoi*.renderCell](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#voronoi_renderCell) - render a voronoi cell. +* [*voronoi*.cellPolygons](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#voronoi_cellPolygons) - iterate over all the cells as polygons. +* [*voronoi*.cellPolygon](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#voronoi_cellPolygon) - return a cell as a polygon. +* [*voronoi*.update](https://github.com/d3/d3-delaunay/blob/v6.0.3/README.md#voronoi_update) - update a voronoi diagram in place. ## [Dispatches (d3-dispatch)](https://github.com/d3/d3-dispatch/tree/v3.0.1) --- yarn.lock @@ -3,9 +3,9 @@ ""@babel/code-frame@^7.10.4"": - version ""7.21.4"" - resolved ""https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.21.4.tgz#d0fa9e4413aca81f2b23b9442797bda1826edb39"" - integrity sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g== + version ""7.18.6"" + resolved ""https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a"" + integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== dependencies: ""@babel/highlight"" ""^7.18.6"" @@ -31,18 +31,18 @@ eslint-visitor-keys ""^3.3.0"" ""@eslint-community/regexpp@^4.4.0"": - version ""4.5.0"" - resolved ""https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.5.0.tgz#f6f729b02feee2c749f57e334b7a1b5f40a81724"" - integrity sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ== + version ""4.4.1"" + resolved ""https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.4.1.tgz#087cb8d9d757bb22e9c9946c9c0c2bf8806830f1"" + integrity sha512-BISJ6ZE4xQsuL/FmsyRaiffpq977bMlsKfGHTQrOGFErfByxIe6iZTxPf/00Zon9b9a7iUykfQwejN3s2ZW/Bw== -""@eslint/eslintrc@^2.0.2"": - version ""2.0.2"" - resolved ""https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.0.2.tgz#01575e38707add677cf73ca1589abba8da899a02"" - integrity sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ== +""@eslint/eslintrc@^2.0.1"": + version ""2.0.1"" + resolved ""https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.0.1.tgz#7888fe7ec8f21bc26d646dbd2c11cd776e21192d"" + integrity sha512-eFRmABvW2E5Ho6f5fHLqgena46rOj7r7OKHYfLElqcBfGFHHpjBhivyi5+jOEQuSpdc/1phIZJlbC2te+tZNIw== dependencies: ajv ""^6.12.4"" debug ""^4.3.2"" - espree ""^9.5.1"" + espree ""^9.5.0"" globals ""^13.19.0"" ignore ""^5.2.0"" import-fresh ""^3.2.1"" @@ -50,10 +50,10 @@ minimatch ""^3.1.2"" strip-json-comments ""^3.1.1"" -""@eslint/js@8.37.0"": - version ""8.37.0"" - resolved ""https://registry.yarnpkg.com/@eslint/js/-/js-8.37.0.tgz#cf1b5fa24217fe007f6487a26d765274925efa7d"" - integrity sha512-x5vzdtOOGgFVDCUs81QRB2+liax8rFg3+7hqM+QhBG0/G3F1ZsoYl97UrqgHgQ9KKT7G6c4V+aTUCgu/n22v1A== +""@eslint/js@8.36.0"": + version ""8.36.0"" + resolved ""https://registry.yarnpkg.com/@eslint/js/-/js-8.36.0.tgz#9837f768c03a1e4a30bd304a64fb8844f0e72efe"" + integrity sha512-lxJ9R5ygVm8ZWgYdUweoq5ownDlJ4upvoWmO4eLxBYHdMo+vZ/Rx0EN6MbKWDJOSUGrqJy2Gt+Dyv/VKml0fjg== ""@humanwhocodes/config-array@^0.11.8"": version ""0.11.8"" @@ -169,9 +169,9 @@ integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== ""@types/node@*"": - version ""18.15.11"" - resolved ""https://registry.yarnpkg.com/@types/node/-/node-18.15.11.tgz#b3b790f09cb1696cffcec605de025b088fa4225f"" - integrity sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q== + version ""18.15.8"" + resolved ""https://registry.yarnpkg.com/@types/node/-/node-18.15.8.tgz#222383320e71f9a1397d25c416e9c62d347758e0"" + integrity sha512-kzGNJZ57XEH7RdckxZ7wfRjB9hgZABF+NLgR1B2zogUvV0gmK0/60VYA4yb4oKZckPiiJlmmfpdqTfCN0VRX+Q== ""@types/resolve@1.20.2"": version ""1.20.2"" @@ -424,9 +424,9 @@ d3-contour@4: d3-array ""^3.2.0"" d3-delaunay@6: - version ""6.0.4"" - resolved ""https://registry.yarnpkg.com/d3-delaunay/-/d3-delaunay-6.0.4.tgz#98169038733a0a5babbeda55054f795bb9e4a58b"" - integrity sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A== + version ""6.0.3"" + resolved ""https://registry.yarnpkg.com/d3-delaunay/-/d3-delaunay-6.0.3.tgz#d0824ba2012a5f6cd17d035653d0515d1c098257"" + integrity sha512-1gPbiMuikAgU/rFcT6WMu17zx0aelw9Hh80go7/TwZQ+/uq8DqqmiNYy+EqPEvTSp/BkJFIpQxjac4Gk/w0zOg== dependencies: delaunator ""5"" @@ -658,20 +658,20 @@ eslint-scope@^7.1.1: esrecurse ""^4.3.0"" estraverse ""^5.2.0"" -eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.0: - version ""3.4.0"" - resolved ""https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz#c7f0f956124ce677047ddbc192a68f999454dedc"" - integrity sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ== +eslint-visitor-keys@^3.3.0: + version ""3.3.0"" + resolved ""https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826"" + integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== eslint@8: - version ""8.37.0"" - resolved ""https://registry.yarnpkg.com/eslint/-/eslint-8.37.0.tgz#1f660ef2ce49a0bfdec0b0d698e0b8b627287412"" - integrity sha512-NU3Ps9nI05GUoVMxcZx1J8CNR6xOvUT4jAUMH5+z8lpp3aEdPVCImKw6PWG4PY+Vfkpr+jvMpxs/qoE7wq0sPw== + version ""8.36.0"" + resolved ""https://registry.yarnpkg.com/eslint/-/eslint-8.36.0.tgz#1bd72202200a5492f91803b113fb8a83b11285cf"" + integrity sha512-Y956lmS7vDqomxlaaQAHVmeb4tNMp2FWIvU/RnU5BD3IKMD/MJPr76xdyr68P8tV1iNMvN2mRK0yy3c+UjL+bw== dependencies: ""@eslint-community/eslint-utils"" ""^4.2.0"" ""@eslint-community/regexpp"" ""^4.4.0"" - ""@eslint/eslintrc"" ""^2.0.2"" - ""@eslint/js"" ""8.37.0"" + ""@eslint/eslintrc"" ""^2.0.1"" + ""@eslint/js"" ""8.36.0"" ""@humanwhocodes/config-array"" ""^0.11.8"" ""@humanwhocodes/module-importer"" ""^1.0.1"" ""@nodelib/fs.walk"" ""^1.2.8"" @@ -682,8 +682,8 @@ eslint@8: doctrine ""^3.0.0"" escape-string-regexp ""^4.0.0"" eslint-scope ""^7.1.1"" - eslint-visitor-keys ""^3.4.0"" - espree ""^9.5.1"" + eslint-visitor-keys ""^3.3.0"" + espree ""^9.5.0"" esquery ""^1.4.2"" esutils ""^2.0.2"" fast-deep-equal ""^3.1.3"" @@ -709,14 +709,14 @@ eslint@8: strip-json-comments ""^3.1.0"" text-table ""^0.2.0"" -espree@^9.5.1: - version ""9.5.1"" - resolved ""https://registry.yarnpkg.com/espree/-/espree-9.5.1.tgz#4f26a4d5f18905bf4f2e0bd99002aab807e96dd4"" - integrity sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg== +espree@^9.5.0: + version ""9.5.0"" + resolved ""https://registry.yarnpkg.com/espree/-/espree-9.5.0.tgz#3646d4e3f58907464edba852fa047e6a27bdf113"" + integrity sha512-JPbJGhKc47++oo4JkEoTe2wjy4fmMwvFpgJT9cQzmfXKp22Dr6Hf1tdCteLz1h0P3t+mGvWZ+4Uankvh8+c6zw== dependencies: acorn ""^8.8.0"" acorn-jsx ""^5.3.2"" - eslint-visitor-keys ""^3.4.0"" + eslint-visitor-keys ""^3.3.0"" esquery@^1.4.2: version ""1.5.0"" ",d3,d3,Shell,Shell,109977.0,22868.0,"Bring data to life with SVG, Canvas and HTML. :bar_chart::chart_with_upwards_trend::tada:",d3_d3,CODE_IMPROVEMENT,Code change: type annotation added d95b111484c1dcdc80c4be7ebb188230b0e204c5,2025-03-22 02:08:51,Quoc Truong,Remove GitHub Actions for building tensorflow sigs Dockerfile since we have migrated to the new ML build container. The new ML Build Container Dockerfile can be found under https://github.com/tensorflow/tensorflow/tree/master/ci/official/containers/ml_build PiperOrigin-RevId: 739282534,False,0,299,299,"--- .github/workflows/sigbuild-docker-branch.yml @@ -0,0 +1,86 @@ +# Copyright 2022 The TensorFlow Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============================================================================== + +name: Upload SIG Build docker containers modified for release branches + +on: + workflow_dispatch: + push: + paths: + - '.github/workflows/sigbuild-docker-branch.yml' + - 'tensorflow/tools/tf_sig_build_dockerfiles/**' + - '!tensorflow/tools/tf_sig_build_dockerfiles/README.md' + branches: + - ""r[1-9].[0-9]+"" + +permissions: + contents: read + +jobs: + docker: + if: github.repository == 'tensorflow/tensorflow' # Don't do this in forks + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [python3.9, python3.10, python3.11, python3.12] + steps: + - name: Delete unnecessary tools folder + run: rm -rf /opt/hostedtoolcache + - + name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0 + - + name: Login to DockerHub + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Login to GCR + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 + with: + registry: gcr.io + username: _json_key + password: ${{ secrets.GCP_CREDS }} + - + name: Generate variables for cache busting and tag naming + run: | + echo ""DATE=$(date +'%Y-%m-%d')"" >> ""$GITHUB_OUTPUT"" + # Converts r2.9 to just 2.9 + echo ""REF=$(echo $GITHUB_REF_NAME | sed 's/r//g')"" >> ""$GITHUB_OUTPUT"" + id: vars + - + name: Build and push + id: docker_build + uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0 + with: + push: true + context: ./tensorflow/tools/tf_sig_build_dockerfiles + target: devel + build-args: | + PYTHON_VERSION=${{ matrix.python-version }} + CACHEBUSTER=${{ steps.vars.outputs.DATE }} + tags: | + tensorflow/build:${{ steps.vars.outputs.REF }}-${{ matrix.python-version }} + gcr.io/tensorflow-sigs/build:${{ steps.vars.outputs.REF }}-${{ matrix.python-version }} + cache-from: type=registry,ref=tensorflow/build:${{ steps.vars.outputs.REF }}-${{ matrix.python-version }} + cache-to: type=inline + - + name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }} + --- .github/workflows/sigbuild-docker-presubmit.yml @@ -0,0 +1,108 @@ +# Copyright 2022 The TensorFlow Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============================================================================== + +name: Build SIG Build containers as presubmits + +on: + pull_request: + types: [labeled, opened, synchronize, reopened] + paths: + - '.github/workflows/sigbuild-docker-presubmit.yml' + - 'tensorflow/tools/tf_sig_build_dockerfiles/**' + - '!tensorflow/tools/tf_sig_build_dockerfiles/README.md' + +permissions: + contents: read + +jobs: + docker: + if: github.repository == 'tensorflow/tensorflow' # Don't do this in forks + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [python3.9, python3.10, python3.11, python3.12] + permissions: + contents: read + pull-requests: write + steps: + - name: Delete unnecessary tools folder + run: | + df -h + rm -rf /opt/hostedtoolcache + df -h + - + name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0 + - + name: Login to GCR + if: contains(github.event.pull_request.labels.*.name, 'build and push to gcr.io for staging') + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 + with: + registry: gcr.io + username: _json_key + password: ${{ secrets.GCP_CREDS }} + - + name: Login to AR + # Once this is verified, change the label's name. For now, we will piggyback on gcr.io actions. + if: contains(github.event.pull_request.labels.*.name, 'build and push to gcr.io for staging') + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 + with: + registry: us-central1-docker.pkg.dev + username: _json_key + password: ${{ secrets.GCP_CREDS }} + - + name: Grab the date to do cache busting (assumes same day OK to keep) + run: | + echo ""DATE=$(date +'%Y-%m-%d')"" >> ""$GITHUB_OUTPUT"" + id: date + - + name: Build containers, and push to GCR only if the 'build and push to gcr.io for staging' label is applied + id: docker_build + uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0 + with: + push: ${{ contains(github.event.pull_request.labels.*.name, 'build and push to gcr.io for staging') }} + context: ./tensorflow/tools/tf_sig_build_dockerfiles + target: devel + build-args: | + PYTHON_VERSION=${{ matrix.python-version }} + CACHEBUSTER=${{ steps.date.outputs.DATE }} + tags: | + gcr.io/tensorflow-sigs/build:${{ github.event.number }}-${{ matrix.python-version }} + us-central1-docker.pkg.dev/tensorflow-sigs/tensorflow/build:${{ github.event.number }}-${{ matrix.python-version }} + cache-from: | + type=registry,ref=tensorflow/build:latest-${{ matrix.python-version }} + type=registry,ref=gcr.io/tensorflow-sigs/build:${{ github.event.number }}-${{ matrix.python-version }} + cache-to: type=inline + - + name: Add a comment with the pushed containers + uses: mshick/add-pr-comment@dd126dd8c253650d181ad9538d8b4fa218fc31e8 # v2 + if: contains(github.event.pull_request.labels.*.name, 'build and push to gcr.io for staging') + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + message: | + I pushed these containers: + + - `gcr.io/tensorflow-sigs/build:${{ github.event.number }}-python3.12` + - `gcr.io/tensorflow-sigs/build:${{ github.event.number }}-python3.11` + - `gcr.io/tensorflow-sigs/build:${{ github.event.number }}-python3.10` + - `gcr.io/tensorflow-sigs/build:${{ github.event.number }}-python3.9` + + Re-apply the `build and push to gcr.io for staging` label to rebuild and push again. This comment will only be posted once. + - + name: Print image digest + run: echo ${{ steps.docker_build.outputs.digest }} --- .github/workflows/sigbuild-docker.yml @@ -0,0 +1,105 @@ +# Copyright 2022 The TensorFlow Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============================================================================== + +name: Upload SIG Build docker containers regularly + +on: + workflow_dispatch: + schedule: + # Run once a week on Sunday at midnight. See http://crontab.guru + - cron: '0 0 * * 0' + push: + paths: + - '.github/workflows/sigbuild-docker.yml' + - 'tensorflow/tools/tf_sig_build_dockerfiles/**' + - '!tensorflow/tools/tf_sig_build_dockerfiles/README.md' + branches: + - master + +permissions: + contents: read + +jobs: + docker: + if: github.repository == 'tensorflow/tensorflow' # Don't do this in forks + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [python3.9, python3.10, python3.11, python3.12] + steps: + - name: Delete unnecessary tools folder + run: rm -rf /opt/hostedtoolcache + - + name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0 + - + name: Login to DockerHub + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Login to GCR + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 + with: + registry: gcr.io + username: _json_key + password: ${{ secrets.GCP_CREDS }} + - + name: Login to AR + # Once this is verified, removed gcr.io actions. + uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 + with: + registry: us-central1-docker.pkg.dev + username: _json_key + password: ${{ secrets.GCP_CREDS }} + - + name: Grab the upcoming TF version to tag this container + run: | + # [[:digit:]] searches for numbers and \+ joins them together + major_version=$(grep ""^#define TF_MAJOR_VERSION"" ./tensorflow/core/public/version.h | grep -o ""[[:digit:]]\+"") + minor_version=$(grep ""^#define TF_MINOR_VERSION"" ./tensorflow/core/public/version.h | grep -o ""[[:digit:]]\+"") + echo ""TF_VERSION=${major_version}.${minor_version}"" >> ""$GITHUB_OUTPUT"" + # Also get the current date to do cache busting. Assumes one day + # is an ok range for rebuilds + echo ""DATE=$(date +'%Y-%m-%d')"" >> ""$GITHUB_OUTPUT"" + id: tf-version + - + name: Build and push + id: docker_build + uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0 + with: + push: true + context: ./tensorflow/tools/tf_sig_build_dockerfiles + target: devel + build-args: | + PYTHON_VERSION=${{ matrix.python-version }} + CACHEBUSTER=${{ steps.tf-version.outputs.DATE }} + tags: | + tensorflow/build:latest-${{ matrix.python-version }} + tensorflow/build:${{ steps.tf-version.outputs.TF_VERSION }}-${{ matrix.python-version }} + gcr.io/tensorflow-sigs/build:latest-${{ matrix.python-version }} + gcr.io/tensorflow-sigs/build:${{ steps.tf-version.outputs.TF_VERSION }}-${{ matrix.python-version }} + us-central1-docker.pkg.dev/tensorflow-sigs/tensorflow/build:latest-${{ matrix.python-version }} + us-central1-docker.pkg.dev/tensorflow-sigs/tensorflow/build:${{ steps.tf-version.outputs.TF_VERSION }}-${{ matrix.python-version }} + cache-from: type=registry,ref=tensorflow/build:latest-${{ matrix.python-version }} + cache-to: type=inline + - + name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }} + ",tensorflow,tensorflow,C++,C++,188388.0,74565.0,An Open Source Machine Learning Framework for Everyone,nan_tensorflow,CONFIG_CHANGE,redundant files deleted since migration to new container has been done c8643526b87173e97af5e99385fc9880c615ef71,2024-10-29 16:24:41,hiddenSharp429,fix: update feature.yml for build configuration,False,2,0,2,"--- .github/workflows/feature.yml @@ -24,8 +24,6 @@ jobs: - name: Build run: | brew install automake - brew install autoconf - brew install libtool make VERSION=""${GITHUB_SHA::7}"" debug make debug-dmg shasum -a 256 build/Debug/ShadowsocksX-NG.dmg > build/Debug/ShadowsocksX-NG.dmg.checksum `",shadowsocksx-ng,shadowsocks,Swift,Swift,32651.0,7935.0,Next Generation of ShadowsocksX,shadowsocks_shadowsocksx-ng,CONFIG_CHANGE,yml file updated bbe818a61b6db36afaf6f18212d2890bfb428c93,,Kanitkorn S,Fix wrong detection of proptype when isRequired is set,False,1,0,1,"--- PropTable.js @@ -8,6 +8,7 @@ for (let typeName in React.PropTypes) { } const type = React.PropTypes[typeName]; PropTypesMap.set(type, typeName); + PropTypesMap.set(type.isRequired, typeName); } const stylesheet = {",storybookjs_storybook.json,,,,,,,storybookjs_storybook.json,BUG_FIX,"5, obvious" ac50a949ecda8639d64f04141939cd183d931527,2024-03-08 13:58:55,Zezhong Li,Update README.md,False,1,1,2,"--- README.md @@ -99,7 +99,7 @@ NOTE: the ranking has no particular order. | TYPE | Venue | Paper Title and Paper Interpretation | Code | | :----------------------------------------------------------: | :--------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | -| ![multivariate time series forecasting](https://img.shields.io/badge/-Multivariate-red) | *JAIR '24* | Detecting Change Intervals with Isolation Distributional Kernel 🌟 | [ICD](https://github.com/IsolationKernel/Codes/tree/main/IDK/iCID)![Stars](https://img.shields.io/github/stars/IsolationKernel/Codes) | +| ![multivariate time series forecasting](https://img.shields.io/badge/-Multivariate-red) | *Arxiv '23* | Detecting Change Intervals with Isolation Distributional Kernel 🌟 | [ICD](https://github.com/IsolationKernel/Codes/tree/main/IDK/iCID)![Stars](https://img.shields.io/github/stars/IsolationKernel/Codes) | | ![multivariate time series forecasting](https://img.shields.io/badge/-Multivariate-red) | *IMWUT '22* | COCOA Cross Modality Contrastive Learning for Sensor Data 🌟 | [COCOA](https://github.com/cruiseresearchgroup/COCOA)![Stars](https://img.shields.io/github/stars/cruiseresearchgroup/COCOA) | | ![multivariate time series forecasting](https://img.shields.io/badge/-Multivariate-red) | *WWW '21* | Time Series Change Point Detection with Self-Supervised Contrastive Predictive Coding 🌟 | [TSCP2](https://github.com/cruiseresearchgroup/TSCP2)![Stars](https://img.shields.io/github/stars/cruiseresearchgroup/TSCP2) | | ![multivariate time series forecasting](https://img.shields.io/badge/-Multivariate-red) | *IMWUT '20* | ESPRESSO Entropy and ShaPe awaRe timE-Series SegmentatiOn for Processing Heterogeneous Sensor Data | [ESPRESSO](https://github.com/cruiseresearchgroup/ESPRESSO)![Stars](https://img.shields.io/github/stars/cruiseresearchgroup/ESPRESSO) | ",awesome-time-series-segmentation-papers,lzz19980125,MATLAB,MATLAB,454.0,8.0,This repository contains a reading list of papers on Time Series Segmentation. This repository is still being continuously improved.,lzz19980125_awesome-time-series-segmentation-papers,DOC_CHANGE,Obvious 7e8f93e57db6c016906121b9a868d1d767dd5edb,2022-07-31 22:14:43,Chetan Nair,Fix typo (#694),False,1,1,2,"--- README.md @@ -461,7 +461,7 @@ Waiting for a response from the partitioned node might result in a timeout error Responses return the most readily available version of the data available on any node, which might not be the latest. Writes might take some time to propagate when the partition is resolved. -AP is a good choice if the business needs to allow for [eventual consistency](#eventual-consistency) or when the system needs to continue working despite external errors. +AP is a good choice if the business needs allow for [eventual consistency](#eventual-consistency) or when the system needs to continue working despite external errors. ### Source(s) and further reading ",system-design-primer,donnemartin,Python,Python,290909.0,48355.0,Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.,donnemartin_system-design-primer,DOC_CHANGE,changes in readme e6ffd3a86fcc3585cf2291b151fb4625f435586e,,pthrasher,Fix for issue #136. Now nests fine in both layouts.,False,3,0,3,"--- patterns.less @@ -742,6 +742,9 @@ input[type=submit].btn { .content { background-color: @white; padding: 14px; + min-width:inherit; + max-width:inherit; + margin:auto; .border-radius(0 0 3px 3px); .background-clip(padding-box); p, ul, ol {",twbs_bootstrap.json,,,,,,,twbs_bootstrap.json,BUG_FIX,"5, obvious" 5f5d8f1d2f5153f1e2a6cf7d042aecc5f2f7b760,2024-09-28 13:38:40,2dust,Fix https://github.com/2dust/v2rayNG/pull/3609,False,33,15,48,"--- V2rayNG/app/src/main/AndroidManifest.xml @@ -198,7 +198,6 @@ --- V2rayNG/app/src/main/kotlin/com/v2ray/ang/AppConfig.kt @@ -150,7 +150,7 @@ object AppConfig { const val WIREGUARD = ""wireguard://"" const val TUIC = ""tuic://"" const val HYSTERIA2 = ""hysteria2://"" - + /** Give a good name to this, IDK*/ const val VPN = ""VPN"" --- V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/SettingsActivity.kt @@ -8,6 +8,7 @@ import androidx.activity.viewModels import androidx.preference.CheckBoxPreference import androidx.preference.EditTextPreference import androidx.preference.ListPreference +import androidx.preference.Preference import androidx.preference.PreferenceFragmentCompat import androidx.work.ExistingPeriodicWorkPolicy import androidx.work.PeriodicWorkRequest @@ -220,7 +221,7 @@ class SettingsActivity : BaseActivity() { ).forEach { key -> key?.text = key?.summary.toString() } - + listOf( AppConfig.PREF_SNIFFING_ENABLED, ).forEach { key -> --- V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/MmkvManager.kt @@ -29,6 +29,7 @@ object MmkvManager { private val mainStorage by lazy { MMKV.mmkvWithID(ID_MAIN, MMKV.MULTI_PROCESS_MODE) } val settingsStorage by lazy { MMKV.mmkvWithID(ID_SETTING, MMKV.MULTI_PROCESS_MODE) } + val serverStorage by lazy { MMKV.mmkvWithID(ID_SERVER_CONFIG, MMKV.MULTI_PROCESS_MODE) } private val serverStorage by lazy { MMKV.mmkvWithID(ID_SERVER_CONFIG, MMKV.MULTI_PROCESS_MODE) } private val profileStorage by lazy { MMKV.mmkvWithID(ID_PROFILE_CONFIG, MMKV.MULTI_PROCESS_MODE) } private val serverAffStorage by lazy { MMKV.mmkvWithID(ID_SERVER_AFF, MMKV.MULTI_PROCESS_MODE) } @@ -52,6 +53,14 @@ object MmkvManager { mainStorage.encode(KEY_ANG_CONFIGS, Gson().toJson(serverList)) } + fun encodeStartOnBoot(startOnBoot: Boolean) { + settingsStorage.encode(PREF_IS_BOOTED, startOnBoot) + } + + fun decodeStartOnBoot(): Boolean { + return settingsStorage.decodeBool(PREF_IS_BOOTED, false) + } + fun decodeServerList(): MutableList { val json = mainStorage.decodeString(KEY_ANG_CONFIGS) return if (json.isNullOrBlank()) { @@ -308,17 +317,4 @@ object MmkvManager { } //endregion - - //region Others - - fun encodeStartOnBoot(startOnBoot: Boolean) { - settingsStorage.encode(PREF_IS_BOOTED, startOnBoot) - } - - fun decodeStartOnBoot(): Boolean { - return settingsStorage.decodeBool(PREF_IS_BOOTED, false) - } - - //endregion - } --- V2rayNG/app/src/main/kotlin/com/v2ray/ang/viewmodel/SettingsViewModel.kt @@ -49,7 +49,6 @@ class SettingsViewModel(application: Application) : AndroidViewModel(application } AppConfig.PREF_ROUTE_ONLY_ENABLED, - AppConfig.PREF_IS_BOOTED, AppConfig.PREF_SPEED_ENABLED, AppConfig.PREF_PROXY_SHARING, AppConfig.PREF_LOCAL_DNS_ENABLED, --- V2rayNG/app/src/main/res/values-ar/strings.xml @@ -131,8 +131,6 @@ إعدادات VPN الوكيل لكل تطبيق عام: التطبيق المحدد هو وكيل، غير المحدد اتصال مباشر؛ \nوضع التجاوز: التطبيق المحدد متصل مباشرة، غير المحدد وكيل. \nخيار تحديد تطبيق الوكيل تلقائيًا في القائمة - Auto connect at startup - Automatically connects to the selected server at startup, which may be unsuccessful إعدادات Mux تمكين Mux --- V2rayNG/app/src/main/res/values-bn/strings.xml @@ -128,8 +128,6 @@ VPN সেটিংস প্রতি-অ্যাপ প্রক্সি সাধারণ: চেকড অ্যাপ প্রক্সি, আনচেকড সরাসরি সংযোগ; \nবাইপাস মোড: চেকড অ্যাপ সরাসরি সংযুক্ত, আনচেকড প্রক্সি। \nমেনুতে প্রক্সি অ্যাপ্লিকেশন স্বয়ংক্রিয়ভাবে নির্বাচন করার বিকল্প - Auto connect at startup - Automatically connects to the selected server at startup, which may be unsuccessful Mux সেটিংস Mux সক্রিয় করুন --- V2rayNG/app/src/main/res/values-fa/strings.xml @@ -126,8 +126,6 @@ تنظیمات VPN پروکسی به تفکیک برنامه عمومی: برنامه بررسی شده پروکسی است، اتصال مستقیم بدون بررسی است. \nحالت bypass: برنامه بررسی شده مستقیما متصل است، پراکسی بررسی نشده است. \nگزینه‌ای برای انتخاب خودکار پروکسی برنامه در منو است - Auto connect at startup - Automatically connects to the selected server at startup, which may be unsuccessful تنظیمات Mux فعال کردن Mux --- V2rayNG/app/src/main/res/values-ru/strings.xml @@ -130,8 +130,6 @@ Настройки VPN Прокси для выбранных приложений Основной: выделенное приложение соединяется через прокси, не выделенное — напрямую;\nРежим обхода: выделенное приложение соединяется напрямую, не выделенное — через прокси.\nЕсть возможность автоматического выбора проксируемых приложений в меню. - Auto connect at startup - Automatically connects to the selected server at startup, which may be unsuccessful Настройки мультиплексирования Использовать мультиплексирование --- V2rayNG/app/src/main/res/values-vi/strings.xml @@ -127,8 +127,6 @@ Cài đặt VPN Proxy theo Ứng dụng - Bình thường: Ứng dụng đã chọn sẽ kết nối thông qua Proxy, chưa chọn sẽ kết nối trực tiếp. \n- Chế độ Bypass: Ứng dụng đã chọn sẽ kết nối trực tiếp, chưa chọn sẽ kết nối qua Proxy. \n- Nếu bạn đang ở Trung Quốc thì vào Menu, chọn Tự động chọn ứng dụng Proxy. - Auto connect at startup - Automatically connects to the selected server at startup, which may be unsuccessful Cài đặt Mux Bật Mux --- V2rayNG/app/src/main/res/values-zh-rCN/strings.xml @@ -127,8 +127,6 @@ VPN 设置 分应用代理 常规:勾选的App被代理,未勾选的直连;\n绕行模式:勾选的App直连,未勾选的被代理.\n不明白者在菜单中选择自动选中需代理应用 - 开机时自动连接 - 开机时自动连接选择的服务器,可能会不成功 Mux 多路复用 设置 启用 Mux 多路复用 --- V2rayNG/app/src/main/res/values-zh-rTW/strings.xml @@ -127,8 +127,6 @@ VPN 設定 Proxy 個別應用程式 常規:勾選的 App 啟用 Proxy,未勾選的直接連線;\n繞行模式:勾選的 App 直接連線,未勾選的啟用 Proxy。\n可在選單中選擇自動選中需 Proxy 應用 - 開機時自動連線 - 開機時自動連線選擇的伺服器,可能會不成功 Mux 設定 啟用 Mux 多路復用 --- V2rayNG/app/src/main/res/values/strings.xml @@ -130,9 +130,10 @@ Advanced Settings VPN Settings Per-app proxy + Auto start + Automatically start VPN if a server has already been selected + General: Checked App is proxy, unchecked direct connection; \nbypass mode: checked app directly connected, unchecked proxy. \nThe option to automatically select the proxy application in the menu - Auto connect at startup - Automatically connects to the selected server at startup, which may be unsuccessful Mux Settings Enable Mux ",v2rayng,2dust,Kotlin,Kotlin,38863.0,5828.0,"A V2Ray client for Android, support Xray core and v2fly core",2dust_v2rayng,BUG_FIX,this commit fixes/polishes an earlier feature (auto-start from PR #3609) 157da269a0590dfdc5c7af31618f3da582b5cdea,2025-01-13 23:35:39,Prabhakar Yadav,"fix(curriculum): removed global variable ab(use) in lunch picker (#58014) Co-authored-by: Dario-DC <105294544+Dario-DC@users.noreply.github.com> Co-authored-by: Ilenia <26656284+ilenia-magoni@users.noreply.github.com>",False,299,104,403,"--- curriculum/challenges/english/25-front-end-development/lab-lunch-picker-program/66db529d37ad966480ebb633.md @@ -15,36 +15,25 @@ In this lab, you'll build a program that helps in managing lunch options. You'll 1. You should create a `lunches` variable and assign it an empty array that will be used to store lunch items. -2. You should create a function `addLunchToEnd` that takes an array as the first argument and a string as the second argument. The function should: - - Add the string to the end of the array. - - Log the string `""[Lunch Item] added to the end of the lunch menu.""` to the console, where `[Lunch Item]` is the string passed to the function. - - Return the updated array. - -3. You should create a function `addLunchToStart` that takes an array as the first argument and a string as the second argument. The function should: - - Add the string to the start of the array. - - Log the string `""[Lunch Item] added to the start of the lunch menu.""` to the console, where `[Lunch Item]` is the string passed to the function. - - Return the updated array. - -4. You should create a function `removeLastLunch` that takes an array as its argument. The function should: - - Remove the last element from the array. - - If the removal is successful, log the string `""[Lunch Item] removed from the end of the lunch menu.""` to the console, where `[Lunch Item]` is the element removed from the array. - - If the array is empty, log the string `""No lunches to remove.""` to the console. - - Return the updated array. - -5. You should create a function `removeFirstLunch` that takes an array as its argument. The function should: - - Remove the first element from the array. - - If the removal is successful, log the string `""[Lunch Item] removed from the start of the lunch menu.""` to the console, where `[Lunch Item]` is the element removed from the array. - - If the array is empty, log the string `""No lunches to remove.""` to the console. - - Return the updated array. - -6. You should create a function `getRandomLunch` that takes an array as its argument. The function should: - - Select a random element from the array. - - If successful, log the string `""Randomly selected lunch: [Lunch Item]""` to the console, where `[Lunch Item]` is a random element in the array. - - If the array is empty, log the string `""No lunches available.""` to the console. - -7. You should create a function `showLunchMenu` that takes an array as its argument and: - - If there are elements in the array, logs the string `""Menu items: [Lunch Item], [Lunch Item]...` to the console, where each `[Lunch item]` is one of the elements in the array, in order. - - If the array is empty, logs the string `""The menu is empty.""` to the console. +2. You should create a function `addLunchToEnd` that takes a string parameter and adds it to the end of the `lunches` array and returns a string in the format: `""[Lunch Item] added to the end of the lunch menu.""` + +3. You should create a function `addLunchToStart` that takes a string parameter and adds it to the start of the `lunches` array and returns a string in the format: `""[Lunch Item] added to the start of the lunch menu.""` + +4. You should create a function `removeLastLunch` that removes the last lunch item from the `lunches` array and: + - If successful, returns a string in the format: `""[Lunch Item] removed from the end of the lunch menu.""` + - If the `lunches` array is empty, returns a string: `""No lunches to remove.""` + +5. You should create a function `removeFirstLunch` that removes the first lunch item from the `lunches` array and: + - If successful, returns a string in the format: `""[Lunch Item] removed from the start of the lunch menu.""` + - If the `lunches` array is empty, returns a string: `""No lunches to remove.""` + +6. You should create a function `getRandomLunch` that selects a random lunch item from the `lunches` array and: + - If successful, returns a string in the format: `""Randomly selected lunch: [Lunch Item]""` + - If the `lunches` array is empty, returns a string: `""No lunches available.""` + +7. You should create a function `showLunchMenu` that: + - If there are items in the `lunches` array, returns a string in the format: `""Menu items: [Lunch Item], [Lunch Item]...` + - If the `lunches` array is empty, returns a string: `""The menu is empty.""` # --hints-- @@ -60,40 +49,20 @@ You should define a function `addLunchToEnd`. assert.isFunction(addLunchToEnd); ``` -The function `addLunchToEnd` should have two parameters. +The function `addLunchToEnd` should take a single argument. ```js -assert.lengthOf(addLunchToEnd, 2); +assert.lengthOf(addLunchToEnd, 1); ``` -`addLunchToEnd(lunches, ""Tacos"")` should log the string `""Tacos added to the end of the lunch menu.""` to the console. +`addLunchToEnd(""Tacos"")` should return the string `""Tacos added to the end of the lunch menu.""`. ```js -const tempArr = []; -const temp = console.log; -const testLunches = [] -try { - console.log = obj => tempArr.push(obj); - addLunchToEnd(testLunches, ""Tacos""); - assert.strictEqual(tempArr[0], ""Tacos added to the end of the lunch menu.""); - addLunchToEnd(testLunches, ""Pizza""); - assert.strictEqual(tempArr[1], ""Pizza added to the end of the lunch menu.""); -} finally { - console.log = temp; -} -``` +assert.strictEqual(addLunchToEnd(""Tacos""), ""Tacos added to the end of the lunch menu.""); -`addLunchToEnd([""Pizza"", ""Tacos""], ""Burger"")` should return `[""Pizza"", ""Tacos"", ""Burger""]`. - -```js -const temp = console.log; -console.log = () => {} -try { - assert.deepStrictEqual(addLunchToEnd([""Pizza"", ""Tacos""], ""Burger""), [""Pizza"", ""Tacos"", ""Burger""]); - assert.deepStrictEqual(addLunchToEnd([""Fries""], ""Tacos""), [""Fries"", ""Tacos""]); -} finally { - console.log = temp; -} +// prevent hardcoding +assert.strictEqual(addLunchToEnd(""Pizza""), ""Pizza added to the end of the lunch menu.""); +assert.strictEqual(addLunchToEnd(""Burger""), ""Burger added to the end of the lunch menu.""); ``` You should define a function `addLunchToStart`. @@ -102,40 +71,20 @@ You should define a function `addLunchToStart`. assert.isFunction(addLunchToStart); ``` -The function `addLunchToStart` should have two parameters. +The function `addLunchToStart` should take a single argument. ```js -assert.lengthOf(addLunchToStart, 2); +assert.lengthOf(addLunchToStart, 1); ``` -`addLunchToStart(lunches, ""Sushi"")` should log the string `""Sushi added to the start of the lunch menu.""` to the console. +`addLunchToStart(""Sushi"")` should return the string `""Sushi added to the start of the lunch menu.""`. ```js -const tempArr = []; -const testLunches = []; -const temp = console.log; -try { - console.log = obj => tempArr.push(obj); - addLunchToStart(testLunches, ""Sushi""); - assert.strictEqual(tempArr[0], ""Sushi added to the start of the lunch menu.""); - addLunchToStart(testLunches, ""Burger""); - assert.strictEqual(tempArr[1], ""Burger added to the start of the lunch menu.""); -} finally { - console.log = temp; -} -``` - -`addLunchToStart([""Burger"", ""Sushi""], ""Pizza"")` should return `[""Pizza"", ""Burger"", ""Sushi""]`. +assert.strictEqual(addLunchToStart(""Sushi""), ""Sushi added to the start of the lunch menu.""); -```js -const temp = console.log; -console.log = () => {} -try { - assert.deepStrictEqual(addLunchToStart([""Burger"", ""Sushi""], ""Pizza""), [""Pizza"", ""Burger"", ""Sushi""]); - assert.deepStrictEqual(addLunchToStart([""Noodles""], ""Sushi""), [""Sushi"", ""Noodles""]); -} finally { - console.log = temp; -} +// prevent hardcoding +assert.strictEqual(addLunchToStart(""Salad""), ""Salad added to the start of the lunch menu.""); +assert.strictEqual(addLunchToStart(""Pasta""), ""Pasta added to the start of the lunch menu.""); ``` You should define a function `removeLastLunch`. @@ -144,190 +93,76 @@ You should define a function `removeLastLunch`. assert.isFunction(removeLastLunch) ``` -The function `removeLastLunch` should have one parameter. - -```js -assert.lengthOf(removeLastLunch, 1); -``` - -When the input array is empty, the function `removeLastLunch` should log the string `""No lunches to remove.""` to the console. - -```js -const testLunches = []; -const tempArr = []; -const temp = console.log; -try { - console.log = obj => tempArr.push(obj); - removeLastLunch(testLunches); - assert.strictEqual(tempArr[0], ""No lunches to remove.""); -} finally { - console.log = temp; -} -``` - -`removeLastLunch([""Stew"", ""Soup"", ""Toast""])` should log the string `""Toast removed from the end of the lunch menu.""` to the console. +When the `lunches` array is empty, the function `removeLastLunch` should return the string `""No lunches to remove.""`. ```js -let testLunches = [""Stew"", ""Soup"", ""Toast""]; -const tempArr = []; -const temp = console.log; -try { - console.log = obj => tempArr.push(obj); - removeLastLunch(testLunches); - assert.strictEqual(tempArr[0], ""Toast removed from the end of the lunch menu.""); - testLunches = [""Rice"", ""Pizza""]; - removeLastLunch(testLunches); - assert.strictEqual(tempArr[1], ""Pizza removed from the end of the lunch menu.""); -} finally { - console.log = temp; -} +lunches = []; +assert.strictEqual(removeLastLunch(), ""No lunches to remove.""); ``` -`removeLastLunch([""Sushi"", ""Pizza"", ""Noodles""])` should return `[""Sushi"", ""Pizza""]`. +When `lunches = [""Stew"", ""Soup"", ""Toast""]`, the function `removeLastLunch` should return the string `""Toast removed from the end of the lunch menu.""`. ```js -const temp = console.log; -console.log = () => {} -try { - assert.deepStrictEqual(removeLastLunch([""Sushi"", ""Pizza"", ""Noodles""]), [""Sushi"", ""Pizza""]); - assert.deepStrictEqual(removeLastLunch([""Pizza"", ""Burger""]), [""Pizza""]); -} finally { - console.log = temp; -} -``` - -You should define a function `removeFirstLunch`. +lunches = [""Stew"", ""Soup"", ""Toast""]; +assert.strictEqual(removeLastLunch(), ""Toast removed from the end of the lunch menu.""); -```js -assert.isFunction(removeFirstLunch); +// prevent hardcoding +assert.strictEqual(removeLastLunch(), ""Soup removed from the end of the lunch menu.""); +assert.strictEqual(removeLastLunch(), ""Stew removed from the end of the lunch menu.""); ``` -The function `removeFirstLunch` should have a single parameter. +When the `lunches` array is empty, the function `removeFirstLunch` should return the string `""No lunches to remove.""`. ```js -assert.lengthOf(removeFirstLunch, 1); +lunches = []; +assert.strictEqual(removeFirstLunch(), ""No lunches to remove.""); ``` -When the input array is empty, the function `removeFirstLunch` should log the string `""No lunches to remove.""` to the console. +When `lunches = [""Salad"", ""Eggs"", ""Cheese""]`, the function `removeFirstLunch` should return the string `""Salad removed from the start of the lunch menu.""`. ```js -const testLunches = []; -const tempArr = []; -const temp = console.log; -try { - console.log = obj => tempArr.push(obj); - removeFirstLunch(testLunches); - assert.strictEqual(tempArr[0], ""No lunches to remove.""); -} finally { - console.log = temp; -} -``` - -`removeFirstLunch([""Salad"", ""Eggs"", ""Cheese""])` should log the string `""Salad removed from the start of the lunch menu.""` to the console. +lunches = [""Salad"", ""Eggs"", ""Cheese""]; +assert.strictEqual(removeFirstLunch(), ""Salad removed from the start of the lunch menu.""); -```js -let testLunches = [""Salad"", ""Eggs"", ""Cheese""]; -const tempArr = []; -const temp = console.log; -try { - console.log = obj => tempArr.push(obj); - removeFirstLunch(testLunches); - assert.strictEqual(tempArr[0], ""Salad removed from the start of the lunch menu.""); - testLunches = [""Stew"", ""Soup"", ""Toast""] - removeFirstLunch(testLunches); - assert.strictEqual(tempArr[1], ""Stew removed from the start of the lunch menu.""); -} finally { - console.log = temp; -} +// prevent hardcoding +assert.strictEqual(removeFirstLunch(), ""Eggs removed from the start of the lunch menu.""); +assert.strictEqual(removeFirstLunch(), ""Cheese removed from the start of the lunch menu.""); ``` -`removeFirstLunch([""Sushi"", ""Pizza"", ""Burger""])` should return `[""Pizza"", ""Burger""]`. +You should define a function `getRandomLunch`. ```js -const temp = console.log; -console.log = () => {} -try { - assert.deepStrictEqual(removeFirstLunch([""Sushi"", ""Pizza"", ""Burger""]), [""Pizza"", ""Burger""]); - assert.deepStrictEqual(removeFirstLunch([""Pizza"", ""Burger""]), [""Burger""]); -} finally { - console.log = temp; -} +assert.isFunction(getRandomLunch); ``` -`addLunchToEnd`, `addLunchToStart`, `removeLastLunch`, and `removeFirstLunch` should return the same array passed as an argument after updating it. +When the `lunches` array is empty, the function `getRandomLunch` should return the string `""No lunches available.""`. ```js -const temp = console.log; -console.log = () => {} -const testLunches = [""Spam""]; -try { - assert.equal(addLunchToEnd(testLunches, ""Pizza""), testLunches); - assert.equal(addLunchToStart(testLunches, ""Caviar""), testLunches); - assert.equal(removeLastLunch(testLunches), testLunches); - assert.equal(removeFirstLunch(testLunches), testLunches); -} finally { - console.log = temp; -} +lunches = []; +assert.strictEqual(getRandomLunch(), ""No lunches available.""); ``` -You should define a function `getRandomLunch`. +When `lunches = [""Fish"", ""Fries"", ""Roast""]`, the function `getRandomLunch` should return a string in the format `""Randomly selected lunch: [Lunch Item]""`. ```js -assert.isFunction(getRandomLunch); -``` - -The function `getRandomLunch` should have a single parameter. +const temp = Math.random; -```js -assert.lengthOf(getRandomLunch, 1); -``` +lunches = [""Fish"", ""Fries"", ""Roast""]; -When the input array is empty, the function `getRandomLunch` should log the string `""No lunches available.""` to the console. +// check that it correctly outputs the first item +Math.random = () => 0; +assert.equal(getRandomLunch(), `Randomly selected lunch: ${lunches[0]}`); -```js -const testLunches = []; -const tempArr = []; -const temp = console.log; -try { - console.log = obj => tempArr.push(obj); - getRandomLunch(testLunches); - assert.strictEqual(tempArr[0], ""No lunches available.""); -} finally { - console.log = temp; -} -``` +// second item +Math.random = () => 0.4; +assert.equal(getRandomLunch(), `Randomly selected lunch: ${lunches[1]}`); -When the input array is not empty, the function `getRandomLunch` should log a string in the format `""Randomly selected lunch: [Lunch Item]""` to the console. +// third item +Math.random = () => 0.8; +assert.equal(getRandomLunch(), `Randomly selected lunch: ${lunches[2]}`); -```js -const testLunches = [""Fish"", ""Fries"", ""Roast""]; -const tempRandom = Math.random; -const tempArr = []; -const temp = console.log; - -try { - console.log = obj => tempArr.push(obj); - - // check that it correctly outputs the first item - Math.random = () => 0; - getRandomLunch(testLunches); - assert.strictEqual(tempArr[0], `Randomly selected lunch: ${testLunches[0]}`); - - // second item - Math.random = () => 0.4; - getRandomLunch(testLunches); - assert.strictEqual(tempArr[1], `Randomly selected lunch: ${testLunches[1]}`); - - // third item - Math.random = () => 0.8; - getRandomLunch(testLunches); - assert.strictEqual(tempArr[2], `Randomly selected lunch: ${testLunches[2]}`); - -} finally { - // restore Math.random - Math.random = tempRandom; - console.log = temp; -} +// restore Math.random +Math.random = temp; ``` You should define a function `showLunchMenu`. @@ -336,43 +171,21 @@ You should define a function `showLunchMenu`. assert.isFunction(showLunchMenu); ``` -The function `showLunchMenu` should have a single parameter. +When the `lunches` array is empty, the function `showLunchMenu` should return the string `""The menu is empty.""`. ```js -assert.lengthOf(showLunchMenu, 1); +lunches = []; +assert.strictEqual(showLunchMenu(), ""The menu is empty.""); ``` -When the input array is empty, the function `showLunchMenu` should log the string `""The menu is empty.""` to the console. +When `lunches = [""Greens"", ""Corns"", ""Beans""]`, the function `showLunchMenu` should return a string in the format `""Menu items: Greens, Corns, Beans""`. ```js -const testLunches = []; -const tempArr = []; -const temp = console.log; -try { - console.log = obj => tempArr.push(obj); - showLunchMenu(testLunches); - assert.strictEqual(tempArr[0], ""The menu is empty.""); -} finally { - console.log = temp; -} -``` +lunches = [""Greens"", ""Corns"", ""Beans""]; +assert.strictEqual(showLunchMenu(), ""Menu items: Greens, Corns, Beans""); -`showLunchMenu([""Greens"", ""Corns"", ""Beans""])` should log `""Menu items: Greens, Corns, Beans""` to the console. - -```js -let testLunches = [""Greens"", ""Corns"", ""Beans""]; -const tempArr = []; -const temp = console.log; -try { - console.log = obj => tempArr.push(obj); - showLunchMenu(testLunches); - assert.strictEqual(tempArr[0], ""Menu items: Greens, Corns, Beans""); - testLunches = [""Pizza"", ""Burger"", ""Fries""] - showLunchMenu(testLunches); - assert.strictEqual(tempArr[1], ""Menu items: Pizza, Burger, Fries""); -} finally { - console.log = temp; -} +lunches = [""Pizza"", ""Burger"", ""Fries""]; +assert.strictEqual(showLunchMenu(), ""Menu items: Pizza, Burger, Fries""); ``` # --seed-- @@ -388,69 +201,61 @@ try { ```js const lunches = []; -// Add a new lunch to the end of the list -function addLunchToEnd(lunches, newLunch) { +// Add a new lunch to the list (at the end) +function addLunchToEnd(newLunch) { lunches.push(newLunch); - console.log(`${newLunch} added to the end of the lunch menu.`); - return lunches; + return `${newLunch} added to the end of the lunch menu.`; } // Add a new lunch to the start of the list -function addLunchToStart(lunches, newLunch) { +function addLunchToStart(newLunch) { lunches.unshift(newLunch); - console.log(`${newLunch} added to the start of the lunch menu.`); - return lunches; + return `${newLunch} added to the start of the lunch menu.`; } // Remove the last lunch from the list -function removeLastLunch(lunches) { +function removeLastLunch() { const removedLunch = lunches.pop(); if (removedLunch) { - console.log(`${removedLunch} removed from the end of the lunch menu.`); + return `${removedLunch} removed from the end of the lunch menu.`; } else { - console.log(""No lunches to remove.""); + return ""No lunches to remove.""; } - return lunches; } // Remove the first lunch from the list -function removeFirstLunch(lunches) { +function removeFirstLunch() { const removedLunch = lunches.shift(); if (removedLunch) { - console.log(`${removedLunch} removed from the start of the lunch menu.`); + return `${removedLunch} removed from the start of the lunch menu.`; } else { - console.log(""No lunches to remove.""); + return ""No lunches to remove.""; } - return lunches; } // Function to get a random lunch from the list -function getRandomLunch(lunches) { +function getRandomLunch() { if (lunches.length === 0) { - console.log(""No lunches available.""); - } - else { - const randomIndex = Math.floor(Math.random() * lunches.length); - const randomLunch = lunches[randomIndex]; - console.log(`Randomly selected lunch: ${randomLunch}`); + return ""No lunches available.""; } + const randomIndex = Math.floor(Math.random() * lunches.length); + const randomLunch = lunches[randomIndex]; + return `Randomly selected lunch: ${randomLunch}`; } -// Function to display all the lunches in the list -function showLunchMenu(lunches) { +// New function to display the lunches as a numbered menu using a for loop +function showLunchMenu() { if (lunches.length === 0) { - console.log(""The menu is empty.""); - } - else { - console.log(`Menu items: ${lunches.join(', ')}`); + return ""The menu is empty.""; } + return `Menu items: ${lunches.join(', ')}`; } -addLunchToEnd(lunches, ""Tacos""); -addLunchToStart(lunches, ""Sushi""); -removeLastLunch(lunches); -removeFirstLunch(lunches); -getRandomLunch(lunches); -showLunchMenu(lunches); +addLunchToEnd(""Tacos""); +addLunchToStart(""Sushi""); +removeLastLunch(); +removeFirstLunch(); +getRandomLunch(); +showLunchMenu(); ``` ",freecodecamp,freecodecamp,TypeScript,TypeScript,410748.0,39092.0,freeCodeCamp.org's open-source codebase and curriculum. Learn to code for free.,freecodecamp_freecodecamp,BUG_FIX,obvious 833cc6196bd9ed1fd902ce7d4b9eec875eea1b71,2024-01-30 03:13:30,dependabot[bot],"chore(deps-dev): bump the lint group in /libraries/javascript with 2 updates (#109) Bumps the lint group in /libraries/javascript with 2 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) and [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser). Updates `@typescript-eslint/eslint-plugin` from 6.19.0 to 6.20.0
Release notes

Sourced from @​typescript-eslint/eslint-plugin's releases.

v6.20.0

6.20.0 (2024-01-29)

🚀 Features

  • eslint-plugin: [member-ordering] allow easy reuse of the default ordering (#8248)

🩹 Fixes

  • eslint-plugin: [no-useless-template-literals] incorrect bigint autofix result (#8283)
  • eslint-plugin: [prefer-nullish-coalescing] treat any/unknown as non-nullable (#8262)
  • eslint-plugin: [no-useless-template-literals] report Infinity & NaN (#8295)
  • eslint-plugin: [prefer-readonly] disable checking accessors (#8300)

❤️ Thank You

You can read about our versioning strategy and releases on our website.

v6.19.1

6.19.1 (2024-01-22)

🩹 Fixes

  • eslint-plugin: [no-unnecessary-condition] fix false positive for type variable (#8235)
  • type-utils: preventing isUnsafeAssignment infinite recursive calls (#8237)

❤️ Thank You

You can read about our versioning strategy and releases on our website.

Changelog

Sourced from @​typescript-eslint/eslint-plugin's changelog.

6.20.0 (2024-01-29)

🚀 Features

  • eslint-plugin: [member-ordering] allow easy reuse of the default ordering

🩹 Fixes

  • eslint-plugin: [no-useless-template-literals] incorrect bigint autofix result

  • eslint-plugin: [prefer-nullish-coalescing] treat any/unknown as non-nullable

  • eslint-plugin: [no-useless-template-literals] report Infinity & NaN

  • eslint-plugin: [prefer-readonly] disable checking accessors

❤️ Thank You

  • Alex Parloti
  • auvred
  • James Browning
  • StyleShit
  • YeonJuan

You can read about our versioning strategy and releases on our website.

6.19.1 (2024-01-22)

🩹 Fixes

  • type-utils: preventing isUnsafeAssignment infinite recursive calls

  • eslint-plugin: [no-unnecessary-condition] fix false positive for type variable

❤️ Thank You

  • YeonJuan

You can read about our versioning strategy and releases on our website.

Commits
  • a01a6e6 chore(release): publish 6.20.0
  • 4d2ce3b fix(eslint-plugin): [prefer-readonly] disable checking accessors (#8300)
  • 9dca40e chore(eslint-plugin): fix typos in schema definitions (#8311)
  • d02d086 fix(eslint-plugin): [no-useless-template-literals] report Infinity & NaN (#8295)
  • 70505e4 fix(eslint-plugin): [prefer-nullish-coalescing] treat any/unknown as non-null...
  • d0137c8 chore: enable prefer-nullish-coalescing internally (#7955)
  • bbc6770 feat(eslint-plugin): [member-ordering] allow easy reuse of the default orderi...
  • 8622286 fix(eslint-plugin): [no-useless-template-literals] incorrect bigint autofix r...
  • a911214 chore(release): publish 6.19.1
  • 920f909 fix(eslint-plugin): [no-unnecessary-condition] fix false positive for type va...
  • Additional commits viewable in compare view

Updates `@typescript-eslint/parser` from 6.19.0 to 6.20.0
Release notes

Sourced from @​typescript-eslint/parser's releases.

v6.20.0

6.20.0 (2024-01-29)

🚀 Features

  • eslint-plugin: [member-ordering] allow easy reuse of the default ordering (#8248)

🩹 Fixes

  • eslint-plugin: [no-useless-template-literals] incorrect bigint autofix result (#8283)
  • eslint-plugin: [prefer-nullish-coalescing] treat any/unknown as non-nullable (#8262)
  • eslint-plugin: [no-useless-template-literals] report Infinity & NaN (#8295)
  • eslint-plugin: [prefer-readonly] disable checking accessors (#8300)

❤️ Thank You

You can read about our versioning strategy and releases on our website.

v6.19.1

6.19.1 (2024-01-22)

🩹 Fixes

  • eslint-plugin: [no-unnecessary-condition] fix false positive for type variable (#8235)
  • type-utils: preventing isUnsafeAssignment infinite recursive calls (#8237)

❤️ Thank You

You can read about our versioning strategy and releases on our website.

Changelog

Sourced from @​typescript-eslint/parser's changelog.

6.20.0 (2024-01-29)

This was a version bump only for parser to align it with other projects, there were no code changes.

You can read about our versioning strategy and releases on our website.

6.19.1 (2024-01-22)

This was a version bump only for parser to align it with other projects, there were no code changes.

You can read about our versioning strategy and releases on our website.

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>",False,52,52,104,"--- libraries/javascript/package.json @@ -33,8 +33,8 @@ ""devDependencies"": { ""@stablelib/utf8"": ""^1.0.2"", ""@types/jest"": ""^29.5.11"", - ""@typescript-eslint/eslint-plugin"": ""^6.20.0"", - ""@typescript-eslint/parser"": ""^6.20.0"", + ""@typescript-eslint/eslint-plugin"": ""^6.19.0"", + ""@typescript-eslint/parser"": ""^6.19.0"", ""@typescript-eslint/typescript-estree"": ""^6.6.0"", ""eslint"": ""^8.56.0"", ""jest"": ""^29.7.0"", --- libraries/javascript/yarn.lock @@ -868,16 +868,16 @@ dependencies: ""@types/yargs-parser"" ""*"" -""@typescript-eslint/eslint-plugin@^6.20.0"": - version ""6.20.0"" - resolved ""https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.20.0.tgz#9cf31546d2d5e884602626d89b0e0d2168ac25ed"" - integrity sha512-fTwGQUnjhoYHeSF6m5pWNkzmDDdsKELYrOBxhjMrofPqCkoC2k3B2wvGHFxa1CTIqkEn88nlW1HVMztjo2K8Hg== +""@typescript-eslint/eslint-plugin@^6.19.0"": + version ""6.19.0"" + resolved ""https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.19.0.tgz#db03f3313b57a30fbbdad2e6929e88fc7feaf9ba"" + integrity sha512-DUCUkQNklCQYnrBSSikjVChdc84/vMPDQSgJTHBZ64G9bA9w0Crc0rd2diujKbTdp6w2J47qkeHQLoi0rpLCdg== dependencies: ""@eslint-community/regexpp"" ""^4.5.1"" - ""@typescript-eslint/scope-manager"" ""6.20.0"" - ""@typescript-eslint/type-utils"" ""6.20.0"" - ""@typescript-eslint/utils"" ""6.20.0"" - ""@typescript-eslint/visitor-keys"" ""6.20.0"" + ""@typescript-eslint/scope-manager"" ""6.19.0"" + ""@typescript-eslint/type-utils"" ""6.19.0"" + ""@typescript-eslint/utils"" ""6.19.0"" + ""@typescript-eslint/visitor-keys"" ""6.19.0"" debug ""^4.3.4"" graphemer ""^1.4.0"" ignore ""^5.2.4"" @@ -885,47 +885,47 @@ semver ""^7.5.4"" ts-api-utils ""^1.0.1"" -""@typescript-eslint/parser@^6.20.0"": - version ""6.20.0"" - resolved ""https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.20.0.tgz#17e314177304bdf498527e3c4b112e41287b7416"" - integrity sha512-bYerPDF/H5v6V76MdMYhjwmwgMA+jlPVqjSDq2cRqMi8bP5sR3Z+RLOiOMad3nsnmDVmn2gAFCyNgh/dIrfP/w== +""@typescript-eslint/parser@^6.19.0"": + version ""6.19.0"" + resolved ""https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.19.0.tgz#80344086f362181890ade7e94fc35fe0480bfdf5"" + integrity sha512-1DyBLG5SH7PYCd00QlroiW60YJ4rWMuUGa/JBV0iZuqi4l4IK3twKPq5ZkEebmGqRjXWVgsUzfd3+nZveewgow== dependencies: - ""@typescript-eslint/scope-manager"" ""6.20.0"" - ""@typescript-eslint/types"" ""6.20.0"" - ""@typescript-eslint/typescript-estree"" ""6.20.0"" - ""@typescript-eslint/visitor-keys"" ""6.20.0"" + ""@typescript-eslint/scope-manager"" ""6.19.0"" + ""@typescript-eslint/types"" ""6.19.0"" + ""@typescript-eslint/typescript-estree"" ""6.19.0"" + ""@typescript-eslint/visitor-keys"" ""6.19.0"" debug ""^4.3.4"" -""@typescript-eslint/scope-manager@6.20.0"": - version ""6.20.0"" - resolved ""https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.20.0.tgz#8a926e60f6c47feb5bab878246dc2ae465730151"" - integrity sha512-p4rvHQRDTI1tGGMDFQm+GtxP1ZHyAh64WANVoyEcNMpaTFn3ox/3CcgtIlELnRfKzSs/DwYlDccJEtr3O6qBvA== +""@typescript-eslint/scope-manager@6.19.0"": + version ""6.19.0"" + resolved ""https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.19.0.tgz#b6d2abb825b29ab70cb542d220e40c61c1678116"" + integrity sha512-dO1XMhV2ehBI6QN8Ufi7I10wmUovmLU0Oru3n5LVlM2JuzB4M+dVphCPLkVpKvGij2j/pHBWuJ9piuXx+BhzxQ== dependencies: - ""@typescript-eslint/types"" ""6.20.0"" - ""@typescript-eslint/visitor-keys"" ""6.20.0"" + ""@typescript-eslint/types"" ""6.19.0"" + ""@typescript-eslint/visitor-keys"" ""6.19.0"" -""@typescript-eslint/type-utils@6.20.0"": - version ""6.20.0"" - resolved ""https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.20.0.tgz#d395475cd0f3610dd80c7d8716fa0db767da3831"" - integrity sha512-qnSobiJQb1F5JjN0YDRPHruQTrX7ICsmltXhkV536mp4idGAYrIyr47zF/JmkJtEcAVnIz4gUYJ7gOZa6SmN4g== +""@typescript-eslint/type-utils@6.19.0"": + version ""6.19.0"" + resolved ""https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.19.0.tgz#522a494ef0d3e9fdc5e23a7c22c9331bbade0101"" + integrity sha512-mcvS6WSWbjiSxKCwBcXtOM5pRkPQ6kcDds/juxcy/727IQr3xMEcwr/YLHW2A2+Fp5ql6khjbKBzOyjuPqGi/w== dependencies: - ""@typescript-eslint/typescript-estree"" ""6.20.0"" - ""@typescript-eslint/utils"" ""6.20.0"" + ""@typescript-eslint/typescript-estree"" ""6.19.0"" + ""@typescript-eslint/utils"" ""6.19.0"" debug ""^4.3.4"" ts-api-utils ""^1.0.1"" -""@typescript-eslint/types@6.20.0"": - version ""6.20.0"" - resolved ""https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.20.0.tgz#5ccd74c29011ae7714ae6973e4ec0c634708b448"" - integrity sha512-MM9mfZMAhiN4cOEcUOEx+0HmuaW3WBfukBZPCfwSqFnQy0grXYtngKCqpQN339X3RrwtzspWJrpbrupKYUSBXQ== +""@typescript-eslint/types@6.19.0"": + version ""6.19.0"" + resolved ""https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.19.0.tgz#689b0498c436272a6a2059b09f44bcbd90de294a"" + integrity sha512-lFviGV/vYhOy3m8BJ/nAKoAyNhInTdXpftonhWle66XHAtT1ouBlkjL496b5H5hb8dWXHwtypTqgtb/DEa+j5A== -""@typescript-eslint/typescript-estree@6.20.0"", ""@typescript-eslint/typescript-estree@^6.6.0"": - version ""6.20.0"" - resolved ""https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.20.0.tgz#5b2d0975949e6bdd8d45ee1471461ef5fadc5542"" - integrity sha512-RnRya9q5m6YYSpBN7IzKu9FmLcYtErkDkc8/dKv81I9QiLLtVBHrjz+Ev/crAqgMNW2FCsoZF4g2QUylMnJz+g== +""@typescript-eslint/typescript-estree@6.19.0"", ""@typescript-eslint/typescript-estree@^6.6.0"": + version ""6.19.0"" + resolved ""https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.19.0.tgz#0813ba364a409afb4d62348aec0202600cb468fa"" + integrity sha512-o/zefXIbbLBZ8YJ51NlkSAt2BamrK6XOmuxSR3hynMIzzyMY33KuJ9vuMdFSXW+H0tVvdF9qBPTHA91HDb4BIQ== dependencies: - ""@typescript-eslint/types"" ""6.20.0"" - ""@typescript-eslint/visitor-keys"" ""6.20.0"" + ""@typescript-eslint/types"" ""6.19.0"" + ""@typescript-eslint/visitor-keys"" ""6.19.0"" debug ""^4.3.4"" globby ""^11.1.0"" is-glob ""^4.0.3"" @@ -933,25 +933,25 @@ semver ""^7.5.4"" ts-api-utils ""^1.0.1"" -""@typescript-eslint/utils@6.20.0"": - version ""6.20.0"" - resolved ""https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.20.0.tgz#0e52afcfaa51af5656490ba4b7437cc3aa28633d"" - integrity sha512-/EKuw+kRu2vAqCoDwDCBtDRU6CTKbUmwwI7SH7AashZ+W+7o8eiyy6V2cdOqN49KsTcASWsC5QeghYuRDTyOOg== +""@typescript-eslint/utils@6.19.0"": + version ""6.19.0"" + resolved ""https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.19.0.tgz#557b72c3eeb4f73bef8037c85dae57b21beb1a4b"" + integrity sha512-QR41YXySiuN++/dC9UArYOg4X86OAYP83OWTewpVx5ct1IZhjjgTLocj7QNxGhWoTqknsgpl7L+hGygCO+sdYw== dependencies: ""@eslint-community/eslint-utils"" ""^4.4.0"" ""@types/json-schema"" ""^7.0.12"" ""@types/semver"" ""^7.5.0"" - ""@typescript-eslint/scope-manager"" ""6.20.0"" - ""@typescript-eslint/types"" ""6.20.0"" - ""@typescript-eslint/typescript-estree"" ""6.20.0"" + ""@typescript-eslint/scope-manager"" ""6.19.0"" + ""@typescript-eslint/types"" ""6.19.0"" + ""@typescript-eslint/typescript-estree"" ""6.19.0"" semver ""^7.5.4"" -""@typescript-eslint/visitor-keys@6.20.0"": - version ""6.20.0"" - resolved ""https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.20.0.tgz#f7ada27f2803de89df0edd9fd7be22c05ce6a498"" - integrity sha512-E8Cp98kRe4gKHjJD4NExXKz/zOJ1A2hhZc+IMVD6i7w4yjIvh6VyuRI0gRtxAsXtoC35uGMaQ9rjI2zJaXDEAw== +""@typescript-eslint/visitor-keys@6.19.0"": + version ""6.19.0"" + resolved ""https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.19.0.tgz#4565e0ecd63ca1f81b96f1dd76e49f746c6b2b49"" + integrity sha512-hZaUCORLgubBvtGpp1JEFEazcuEdfxta9j4iUwdSAr7mEsYYAp3EAUyCZk3VEEqGj6W+AV4uWyrDGtrlawAsgQ== dependencies: - ""@typescript-eslint/types"" ""6.20.0"" + ""@typescript-eslint/types"" ""6.19.0"" eslint-visitor-keys ""^3.4.1"" ""@ungap/structured-clone@^1.2.0"": ",standard-webhooks,standard-webhooks,Elixir,Elixir,1390.0,37.0,The Standard Webhooks specification,standard-webhooks_standard-webhooks,CONFIG_CHANGE,version updates are done 1af870c16c6d9957e30cf808da7256cc66760b8c,2023-08-21 22:35:41,Thomas Nieto,Remove blank lines as instructed by `CodeFactor` rules (#20086),False,0,4,4,"--- src/Microsoft.PowerShell.Commands.Management/commands/management/TestPathCommand.cs @@ -247,5 +247,6 @@ namespace Microsoft.PowerShell.Commands } } #endregion Command code + } } --- src/Microsoft.PowerShell.Commands.Utility/commands/utility/ConvertFrom-StringData.cs @@ -59,6 +59,7 @@ namespace Microsoft.PowerShell.Commands foreach (string line in lines) { + if (string.IsNullOrEmpty(line) || line[0] == '#') continue; --- src/Microsoft.PowerShell.ConsoleHost/host/msh/Executor.cs @@ -505,6 +505,7 @@ namespace Microsoft.PowerShell /// internal bool? ExecuteCommandAndGetResultAsBool(string command) { + bool? result = ExecuteCommandAndGetResultAsBool(command, out _); return result; --- src/System.Management.Automation/engine/NativeCommandProcessor.cs @@ -813,6 +813,7 @@ namespace System.Management.Automation stdOutDestination, stdOutSource, out _stdOutByteTransfer); + } } } ",powershell,powershell,C#,C#,46656.0,7522.0,PowerShell for every system!,powershell_powershell,CODE_IMPROVEMENT,blank lines removed from code 80fa5e137672a529f65a05e396b40f0d133b2432,2024-09-05 23:51:14,Carlo Sala,fix(1password): copy password properly in `opswd` Closes #12635,False,1,1,2,"--- plugins/1password/opswd @@ -27,7 +27,7 @@ function opswd() { local password # Copy the password to the clipboard - if ! password=$(op item get ""$service"" --reveal --fields password 2>/dev/null); then + if ! password=$(op item get ""$service"" --fields password 2>/dev/null); then echo ""error: could not obtain password for $service"" return 1 fi ",ohmyzsh,ohmyzsh,Shell,Shell,176465.0,26013.0,"🙃 A delightful community-driven (with 2,400+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python, etc), 140+ themes to spice up your morning, and an auto-update tool that makes it easy to keep up with the latest updates from the community.",ohmyzsh_ohmyzsh,BUG_FIX,Matched \bfix(e[ds]|ing)?\b in message 47822ef8f1b03ab7124aba694709825a93897994,2025-03-21 04:58:45,Iain Buclaw,d: Fix quoted command-line options to match lang.opt [PR118545] It was noticed that not all D language options get a url in diagnostics. These have been checked and fixed as necessary. PR d/118545 gcc/d/ChangeLog: * d-lang.cc (d_handle_option): Adjust quoted options.,False,3,3,6,"--- gcc/d/d-lang.cc @@ -460,7 +460,7 @@ d_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value, break; } - error (""bad argument for %<-fdebug=%>: %qs"", arg); + error (""bad argument for %<-fdebug%>: %qs"", arg); break; case OPT_fdoc: @@ -533,7 +533,7 @@ d_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value, case OPT_fmodule_file_: global.params.modFileAliasStrings.push (arg); if (!strchr (arg, '=')) - error (""bad argument for %<-fmodule-file=%>: %qs"", arg); + error (""bad argument for %<-fmodule-file%>: %qs"", arg); break; case OPT_fmoduleinfo: @@ -700,7 +700,7 @@ d_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value, break; } - error (""bad argument for %<-fversion=%>: %qs"", arg); + error (""bad argument for %<-fversion%>: %qs"", arg); break; case OPT_H: ",gcc,gcc-mirror,C,C,,,Compiler,gcc-mirror_gcc,BUG_FIX,Obvious a4918e33b80684386fce1ec64fc0204e0bac6b90,2023-06-01 08:02:47,Gaël Poupard,"docs(spinners): improve buttons examples accessibility (#38632) * docs(spinners): improve buttons examples accessibility * docs(spinners): missed occurrence of wrong role + aria-hidden --------- Co-authored-by: Patrick H. Lauke ",False,10,10,20,"--- site/content/docs/5.3/components/spinners.md @@ -96,8 +96,8 @@ Use [flexbox utilities][flex], [float utilities][float], or [text alignment][tex {{< example >}}
- Loading... -
+ Loading... +
{{< /example >}} @@ -151,23 +151,23 @@ Use spinners within buttons to indicate an action is currently processing or tak {{< example >}} {{< /example >}} {{< example >}} {{< /example >}} ",bootstrap,twbs,JavaScript,JavaScript,171693.0,79045.0,"The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.",twbs_bootstrap,DOC_CHANGE,Obvious 53fd09cd2366d5fa4a1ca2fbfa5f183290f0a934,2022-09-19 18:03:46,bannedbook,update,False,0,0,0,"--- v2ss/server-cfg/custom_outbound.json Binary files a/v2ss/server-cfg/custom_outbound.json and b/v2ss/server-cfg/custom_outbound.json differ ",fanqiang,bannedbook,Kotlin,Kotlin,39286.0,7317.0,翻墙-科学上网,bannedbook_fanqiang,CONFIG_CHANGE,changes in json file af600652667ef5d44137eba6d80f3e60c2d8503d,2023-02-06 17:09:50,cccabinet,Fix alerts colors by using `*-text-emphasis` CSS vars in Sass loop (#38003),False,2,2,4,"--- scss/_alert.scss @@ -59,10 +59,10 @@ // Generate contextual modifier classes for colorizing the alert @each $state in map-keys($theme-colors) { .alert-#{$state} { - --#{$prefix}alert-color: var(--#{$prefix}#{$state}-text-emphasis); + --#{$prefix}alert-color: var(--#{$prefix}#{$state}-text); --#{$prefix}alert-bg: var(--#{$prefix}#{$state}-bg-subtle); --#{$prefix}alert-border-color: var(--#{$prefix}#{$state}-border-subtle); - --#{$prefix}alert-link-color: var(--#{$prefix}#{$state}-text-emphasis); + --#{$prefix}alert-link-color: var(--#{$prefix}#{$state}-text); } } // scss-docs-end alert-modifiers ",bootstrap,twbs,JavaScript,JavaScript,171693.0,79045.0,"The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.",twbs_bootstrap,BUG_FIX,obvious e2e008e4fa7481686d620f86aa0f2f0564409987,2025-01-13 22:45:32,Costa Tsaousis,"Reduce glibc fragmentation Part 2 (#19390) * dictionary uses exclusively aral for allocations, except when the dictionary is variable sized * make all fixed size dictionaries use flag DICT_OPTION_FIXED_SIZE * memory accounting for rrd memory slots * use aral for extents * extent page sizes per KiB * test to see if 4KiB is better than 1KiB",False,114,49,163,"--- src/collectors/cups.plugin/cups_plugin.c @@ -227,7 +227,7 @@ int main(int argc, char **argv) { errno_clear(); - dict_dest_job_metrics = dictionary_create_advanced(DICT_OPTION_SINGLE_THREADED | DICT_OPTION_FIXED_SIZE, NULL, sizeof(struct job_metrics)); + dict_dest_job_metrics = dictionary_create(DICT_OPTION_SINGLE_THREADED); // ------------------------------------------------------------------------ // the main loop --- src/collectors/debugfs.plugin/module-libsensors.c @@ -1230,7 +1230,7 @@ void *libsensors_thread(void *ptr __maybe_unused) { } if(fp) fclose(fp); - sensors_dict = dictionary_create_advanced(DICT_OPTION_DONT_OVERWRITE_VALUE | DICT_OPTION_SINGLE_THREADED | DICT_OPTION_FIXED_SIZE, NULL, sizeof(SENSOR)); + sensors_dict = dictionary_create(DICT_OPTION_DONT_OVERWRITE_VALUE | DICT_OPTION_SINGLE_THREADED); // preflight to check data collection latency { --- src/collectors/diskspace.plugin/plugin_diskspace.c @@ -332,7 +332,7 @@ static inline void do_disk_space_stats(struct mountinfo *mi, int update_every) { SIMPLE_PATTERN_EXACT, true); - dict_mountpoints = dictionary_create_advanced(DICT_OPTION_FIXED_SIZE, &dictionary_stats_category_collectors, sizeof(struct mount_point_metadata)); + dict_mountpoints = dictionary_create_advanced(DICT_OPTION_NONE, &dictionary_stats_category_collectors, 0); dictionary_register_delete_callback(dict_mountpoints, mountpoint_delete_cb, NULL); } --- src/collectors/proc.plugin/sys_block_zram.c @@ -268,7 +268,7 @@ int do_sys_block_zram(int update_every, usec_t dt) { } procfile_close(ff); - devices = dictionary_create_advanced(DICT_OPTION_SINGLE_THREADED | DICT_OPTION_FIXED_SIZE, &dictionary_stats_category_collectors, sizeof(ZRAM_DEVICE)); + devices = dictionary_create_advanced(DICT_OPTION_SINGLE_THREADED, &dictionary_stats_category_collectors, 0); device_count = init_devices(devices, update_every); } --- src/collectors/proc.plugin/sys_devices_pci_aer.c @@ -42,7 +42,7 @@ static bool aer_value_conflict_callback(const DICTIONARY_ITEM *item __maybe_unus static void aer_insert_callback(const DICTIONARY_ITEM *item __maybe_unused, void *value, void *data __maybe_unused) { struct aer_entry *a = value; - a->values = dictionary_create_advanced(DICT_OPTION_SINGLE_THREADED|DICT_OPTION_DONT_OVERWRITE_VALUE|DICT_OPTION_FIXED_SIZE, &dictionary_stats_category_collectors, sizeof(struct aer_value)); + a->values = dictionary_create(DICT_OPTION_SINGLE_THREADED|DICT_OPTION_DONT_OVERWRITE_VALUE); dictionary_register_conflict_callback(a->values, aer_value_conflict_callback, NULL); } @@ -209,7 +209,7 @@ int do_proc_sys_devices_pci_aer(int update_every, usec_t dt __maybe_unused) { if(!do_root_ports && !do_pci_slots) return 1; - aer_root = dictionary_create_advanced(DICT_OPTION_SINGLE_THREADED | DICT_OPTION_DONT_OVERWRITE_VALUE | DICT_OPTION_FIXED_SIZE, &dictionary_stats_category_collectors, sizeof(struct aer_entry)); + aer_root = dictionary_create(DICT_OPTION_SINGLE_THREADED | DICT_OPTION_DONT_OVERWRITE_VALUE); dictionary_register_insert_callback(aer_root, aer_insert_callback, NULL); AER_TYPE types = ((do_root_ports) ? (AER_ROOTPORT_TOTAL_ERR_COR|AER_ROOTPORT_TOTAL_ERR_FATAL) : 0) | --- src/collectors/statsd.plugin/statsd.c @@ -623,7 +623,7 @@ static inline void statsd_process_dictionary(STATSD_METRIC *m, const char *value statsd_reset_metric(m); if (unlikely(!m->dictionary.dict)) - m->dictionary.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS | DICT_OPTION_FIXED_SIZE, &dictionary_stats_category_collectors, sizeof(STATSD_METRIC_DICTIONARY_ITEM)); + m->dictionary.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS, &dictionary_stats_category_collectors, 0); if(unlikely(value_is_zinit(value))) { // magic loading of metric, without affecting anything @@ -2455,13 +2455,13 @@ void *statsd_main(void *ptr) { worker_register_job_name(WORKER_STATSD_FLUSH_DICTIONARIES, ""dictionaries""); worker_register_job_name(WORKER_STATSD_FLUSH_STATS, ""statistics""); - statsd.gauges.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS | DICT_OPTION_FIXED_SIZE, &dictionary_stats_category_collectors, sizeof(STATSD_METRIC)); - statsd.meters.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS | DICT_OPTION_FIXED_SIZE, &dictionary_stats_category_collectors, sizeof(STATSD_METRIC)); - statsd.counters.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS | DICT_OPTION_FIXED_SIZE, &dictionary_stats_category_collectors, sizeof(STATSD_METRIC)); - statsd.histograms.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS | DICT_OPTION_FIXED_SIZE, &dictionary_stats_category_collectors, sizeof(STATSD_METRIC)); - statsd.dictionaries.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS | DICT_OPTION_FIXED_SIZE, &dictionary_stats_category_collectors, sizeof(STATSD_METRIC)); - statsd.sets.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS | DICT_OPTION_FIXED_SIZE, &dictionary_stats_category_collectors, sizeof(STATSD_METRIC)); - statsd.timers.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS | DICT_OPTION_FIXED_SIZE, &dictionary_stats_category_collectors, sizeof(STATSD_METRIC)); + statsd.gauges.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS, &dictionary_stats_category_collectors, 0); + statsd.meters.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS, &dictionary_stats_category_collectors, 0); + statsd.counters.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS, &dictionary_stats_category_collectors, 0); + statsd.histograms.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS, &dictionary_stats_category_collectors, 0); + statsd.dictionaries.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS, &dictionary_stats_category_collectors, 0); + statsd.sets.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS, &dictionary_stats_category_collectors, 0); + statsd.timers.dict = dictionary_create_advanced(STATSD_DICTIONARY_OPTIONS, &dictionary_stats_category_collectors, 0); dictionary_register_insert_callback(statsd.gauges.dict, dictionary_metric_insert_callback, &statsd.gauges); dictionary_register_insert_callback(statsd.meters.dict, dictionary_metric_insert_callback, &statsd.meters); --- src/collectors/tc.plugin/plugin_tc.c @@ -98,7 +98,7 @@ static bool tc_class_conflict_callback(const DICTIONARY_ITEM *item __maybe_unuse static void tc_class_index_init(struct tc_device *d) { if(!d->classes) { - d->classes = dictionary_create_advanced(DICT_OPTION_DONT_OVERWRITE_VALUE | DICT_OPTION_SINGLE_THREADED | DICT_OPTION_FIXED_SIZE, &dictionary_stats_category_collectors, sizeof(struct tc_class)); + d->classes = dictionary_create_advanced(DICT_OPTION_DONT_OVERWRITE_VALUE | DICT_OPTION_SINGLE_THREADED, &dictionary_stats_category_collectors, 0); dictionary_register_delete_callback(d->classes, tc_class_free_callback, d); dictionary_register_conflict_callback(d->classes, tc_class_conflict_callback, d); @@ -111,7 +111,7 @@ static void tc_class_index_destroy(struct tc_device *d) { } static struct tc_class *tc_class_index_add(struct tc_device *d, struct tc_class *c) { - return dictionary_set(d->classes, string2str(c->id), c, sizeof(struct tc_class)); + return dictionary_set(d->classes, string2str(c->id), c, sizeof(*c)); } static void tc_class_index_del(struct tc_device *d, struct tc_class *c) { --- src/daemon/dyncfg/dyncfg.c @@ -161,7 +161,7 @@ static bool dyncfg_conflict_cb(const DICTIONARY_ITEM *item __maybe_unused, void void dyncfg_init_low_level(bool load_saved) { if(!dyncfg_globals.nodes) { - dyncfg_globals.nodes = dictionary_create_advanced(DICT_OPTION_FIXED_SIZE | DICT_OPTION_DONT_OVERWRITE_VALUE, &dictionary_stats_category_dyncfg, sizeof(DYNCFG)); + dyncfg_globals.nodes = dictionary_create_advanced(DICT_OPTION_FIXED_SIZE | DICT_OPTION_DONT_OVERWRITE_VALUE, NULL, sizeof(DYNCFG)); dictionary_register_insert_callback(dyncfg_globals.nodes, dyncfg_insert_cb, NULL); dictionary_register_react_callback(dyncfg_globals.nodes, dyncfg_react_cb, NULL); dictionary_register_conflict_callback(dyncfg_globals.nodes, dyncfg_conflict_cb, NULL); --- src/daemon/pulse/pulse-daemon-memory.c @@ -4,16 +4,6 @@ #include ""pulse-daemon-memory.h"" #include ""streaming/stream-replication-sender.h"" -static size_t rrd_slot_memory = 0; - -void rrd_slot_memory_added(size_t added) { - __atomic_add_fetch(&rrd_slot_memory, added, __ATOMIC_RELAXED); -} - -void rrd_slot_memory_removed(size_t added) { - __atomic_sub_fetch(&rrd_slot_memory, added, __ATOMIC_RELAXED); -} - #define dictionary_stats_memory_total(stats) \ ((stats).memory.dict + (stats).memory.values + (stats).memory.index) @@ -48,7 +38,6 @@ void pulse_daemon_memory_do(bool extended) { static RRDDIM *rd_workers = NULL; static RRDDIM *rd_aral = NULL; static RRDDIM *rd_judy = NULL; - static RRDDIM *rd_slots = NULL; static RRDDIM *rd_other = NULL; if (unlikely(!st_memory)) { @@ -90,7 +79,6 @@ void pulse_daemon_memory_do(bool extended) { rd_workers = rrddim_add(st_memory, ""workers"", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE); rd_aral = rrddim_add(st_memory, ""aral"", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE); rd_judy = rrddim_add(st_memory, ""judy"", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE); - rd_slots = rrddim_add(st_memory, ""slots"", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE); rd_other = rrddim_add(st_memory, ""other"", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE); } @@ -184,9 +172,6 @@ void pulse_daemon_memory_do(bool extended) { rrddim_set_by_pointer(st_memory, rd_judy, (collected_number) judy_aral_structures()); - rrddim_set_by_pointer(st_memory, rd_slots, - (collected_number)__atomic_load_n(&rrd_slot_memory, __ATOMIC_RELAXED)); - rrddim_set_by_pointer(st_memory, rd_other, (collected_number)dictionary_stats_memory_total(dictionary_stats_category_other)); --- src/daemon/pulse/pulse-daemon-memory.h @@ -26,7 +26,4 @@ extern struct netdata_buffers_statistics { void pulse_daemon_memory_do(bool extended); #endif -void rrd_slot_memory_added(size_t added); -void rrd_slot_memory_removed(size_t added); - #endif //NETDATA_PULSE_DAEMON_MEMORY_H --- src/daemon/pulse/pulse-dictionary.c @@ -12,7 +12,6 @@ struct dictionary_stats dictionary_stats_category_rrdlabels = { .name = ""labels"" struct dictionary_stats dictionary_stats_category_rrdhealth = { .name = ""health"" }; struct dictionary_stats dictionary_stats_category_functions = { .name = ""functions"" }; struct dictionary_stats dictionary_stats_category_replication = { .name = ""replication"" }; -struct dictionary_stats dictionary_stats_category_dyncfg = { .name = ""dyncfg"" }; #ifdef DICT_WITH_STATS struct dictionary_categories { @@ -65,7 +64,6 @@ struct dictionary_categories { { .stats = &dictionary_stats_category_rrdhealth, }, { .stats = &dictionary_stats_category_functions, }, { .stats = &dictionary_stats_category_replication, }, - { .stats = &dictionary_stats_category_dyncfg, }, { .stats = &dictionary_stats_category_other, }, // terminator --- src/daemon/pulse/pulse-dictionary.h @@ -14,7 +14,6 @@ extern struct dictionary_stats dictionary_stats_category_rrdlabels; extern struct dictionary_stats dictionary_stats_category_rrdhealth; extern struct dictionary_stats dictionary_stats_category_functions; extern struct dictionary_stats dictionary_stats_category_replication; -extern struct dictionary_stats dictionary_stats_category_dyncfg; #if defined(PULSE_INTERNALS) void pulse_dictionary_do(bool extended); --- src/database/contexts/api_v2_contexts_alert_config.c @@ -131,6 +131,5 @@ int contexts_v2_alert_config_to_json(struct web_client *w, const char *config_ha } } - dictionary_destroy(configs); return ret; } --- src/database/engine/page.c @@ -100,23 +100,13 @@ static size_t aral_sizes[] = { sizeof(gorilla_writer_t), sizeof(PGD), - // per 512B - 512, 1024, 1536, 2048, 5 * 512, 6 * 512, 7 * 512, 8 * 512, /* 9 * 512, */ - - // per 1KiB -// 5 * 1024, 6 * 1024, 7 * 1024, 8 * 1024, 9 * 1024, 10 * 1024, 11 * 1024, -// 12 * 1024, 13 * 1024, 14 * 1024, 15 * 1024, 16 * 1024, 17 * 1024, 18 * 1024, -// 19 * 1024, 20 * 1024, 21 * 1024, 22 * 1024, 23 * 1024, 24 * 1024, 25 * 1024, -// 26 * 1024, 27 * 1024, 28 * 1024, 29 * 1024, 30 * 1024, 31 * 1024, 32 * 1024, - - // test to see if 4KiB has less overheads than 1KiB - 8 * 1024, 12 * 1024, 16 * 1024, 20 * 1024, 24 * 1024, 28 * 1024, 32 * 1024, - - // per 4KiB - 36 * 1024, 40 * 1024, 44 * 1024, 48 * 1024, 52 * 1024, 56 * 1024, 60 * 1024, - 64 * 1024, 68 * 1024, 72 * 1024, 76 * 1024, 80 * 1024, 84 * 1024, 88 * 1024, - 92 * 1024, 96 * 1024, 100 * 1024, 104 * 1024, 108 * 1024, 112 * 1024, 116 * 1024, - 120 * 1024, 124 * 1024, 128 * 1024, + 512, 1024, 1536, 2048, 5 * 512, 6 * 512, 7 * 512, + 4 * 1024, 8 * 1024, 12 * 1024, 16 * 1024, 20 * 1024, + 24 * 1024, 28 * 1024, 32 * 1024, 36 * 1024, 40 * 1024, + 44 * 1024, 48 * 1024, 52 * 1024, 56 * 1024, 60 * 1024, + 64 * 1024, 68 * 1024, 72 * 1024, 76 * 1024, 80 * 1024, + 84 * 1024, 88 * 1024, 92 * 1024, 96 * 1024, 100 * 1024, + 104 * 1024, 108 * 1024, 112 * 1024, 116 * 1024, 120 * 1024, }; static ARAL **arals = NULL; @@ -327,16 +317,6 @@ static size_t pgd_data_footprint(size_t size, size_t partition) { return size; } -// ---------------------------------------------------------------------------- - -void *dbengine_extent_alloc(size_t size) { - return pgd_data_alloc(size, 0, false); -} - -void dbengine_extent_free(void *extent, size_t size) { - pgd_data_free(extent, size, 0); -} - // ---------------------------------------------------------------------------- // management api --- src/database/engine/page.h @@ -56,9 +56,6 @@ size_t pgd_append_point(PGD *pg, void pgdc_reset(PGDC *pgdc, PGD *pgd, uint32_t position); bool pgdc_get_next_point(PGDC *pgdc, uint32_t expected_position, STORAGE_POINT *sp); -void *dbengine_extent_alloc(size_t size); -void dbengine_extent_free(void *extent, size_t size); - #ifdef __cplusplus } #endif --- src/database/engine/pdc.c @@ -1288,10 +1288,12 @@ void epdl_find_extent_and_populate_pages(struct rrdengine_instance *ctx, EPDL *e void *extent_data = datafile_extent_read(ctx, epdl->file, epdl->extent_offset, epdl->extent_size); if(extent_data != NULL) { +#if defined(NETDATA_TRACE_ALLOCATIONS) void *tmp = dbengine_extent_alloc(epdl->extent_size); memcpy(tmp, extent_data, epdl->extent_size); datafile_extent_read_free(extent_data); extent_data = tmp; +#endif if(worker) worker_is_busy(UV_EVENT_DBENGINE_EXTENT_CACHE_LOOKUP); --- src/database/engine/rrdengine.c @@ -584,6 +584,15 @@ static inline struct rrdeng_cmd rrdeng_deq_cmd(bool from_worker) { // ---------------------------------------------------------------------------- +void *dbengine_extent_alloc(size_t size) { + void *extent = mallocz(size); + return extent; +} + +void dbengine_extent_free(void *extent, size_t size __maybe_unused) { + freez(extent); +} + static void journalfile_extent_build(struct rrdengine_instance *ctx, struct extent_io_descriptor *xt_io_descr) { unsigned count, payload_length, descr_size, size_bytes; void *buf; --- src/database/engine/rrdengine.h @@ -470,6 +470,9 @@ static inline void ctx_last_flush_fileno_set(struct rrdengine_instance *ctx, uns #define ctx_is_available_for_queries(ctx) (__atomic_load_n(&(ctx)->quiesce.enabled, __ATOMIC_RELAXED) == false && __atomic_load_n(&(ctx)->quiesce.exit_mode, __ATOMIC_RELAXED) == false) +void *dbengine_extent_alloc(size_t size); +void dbengine_extent_free(void *extent, size_t size); + bool rrdeng_ctx_tier_cap_exceeded(struct rrdengine_instance *ctx); int init_rrd_files(struct rrdengine_instance *ctx); void finalize_rrd_files(struct rrdengine_instance *ctx); --- src/database/rrdset.c @@ -34,15 +34,13 @@ static void rrdset_stream_send_chart_slot_release(RRDSET *st) { spinlock_lock(&host->stream.snd.pluginsd_chart_slots.available.spinlock); if(host->stream.snd.pluginsd_chart_slots.available.used >= host->stream.snd.pluginsd_chart_slots.available.size) { - uint32_t old_slots = host->stream.snd.pluginsd_chart_slots.available.size; - uint32_t new_slots = (old_slots > 0) ? (old_slots * 2) : 1024; + uint32_t old_size = host->stream.snd.pluginsd_chart_slots.available.size; + uint32_t new_size = (old_size > 0) ? (old_size * 2) : 1024; host->stream.snd.pluginsd_chart_slots.available.array = - reallocz(host->stream.snd.pluginsd_chart_slots.available.array, new_slots * sizeof(uint32_t)); + reallocz(host->stream.snd.pluginsd_chart_slots.available.array, new_size * sizeof(uint32_t)); - host->stream.snd.pluginsd_chart_slots.available.size = new_slots; - - rrd_slot_memory_added((new_slots - old_slots) * sizeof(uint32_t)); + host->stream.snd.pluginsd_chart_slots.available.size = new_size; } host->stream.snd.pluginsd_chart_slots.available.array[host->stream.snd.pluginsd_chart_slots.available.used++] = @@ -53,8 +51,6 @@ static void rrdset_stream_send_chart_slot_release(RRDSET *st) { } void rrdhost_pluginsd_send_chart_slots_free(RRDHOST *host) { - rrd_slot_memory_removed(host->stream.snd.pluginsd_chart_slots.available.size * sizeof(uint32_t)); - spinlock_lock(&host->stream.snd.pluginsd_chart_slots.available.spinlock); host->stream.snd.pluginsd_chart_slots.available.ignore = true; freez(host->stream.snd.pluginsd_chart_slots.available.array); @@ -99,7 +95,6 @@ void rrdset_pluginsd_receive_unslot_and_cleanup(RRDSET *st) { rrdset_pluginsd_receive_unslot(st); - rrd_slot_memory_removed(st->pluginsd.size * sizeof(struct pluginsd_rrddim)); freez(st->pluginsd.prd_array); st->pluginsd.prd_array = NULL; st->pluginsd.size = 0; @@ -118,8 +113,6 @@ static void rrdset_pluginsd_receive_slots_initialize(RRDSET *st) { } void rrdhost_pluginsd_receive_chart_slots_free(RRDHOST *host) { - rrd_slot_memory_removed(host->stream.rcv.pluginsd_chart_slots.size * sizeof(uint32_t)); - spinlock_lock(&host->stream.rcv.pluginsd_chart_slots.spinlock); if(host->stream.rcv.pluginsd_chart_slots.array) { --- src/health/health_prototypes.c @@ -288,7 +288,7 @@ void health_init_prototypes(void) { if(health_globals.prototypes.dict) return; - health_globals.prototypes.dict = dictionary_create_advanced(DICT_OPTION_DONT_OVERWRITE_VALUE | DICT_OPTION_FIXED_SIZE, &dictionary_stats_category_rrdhealth, sizeof(RRD_ALERT_PROTOTYPE)); + health_globals.prototypes.dict = dictionary_create(DICT_OPTION_DONT_OVERWRITE_VALUE); dictionary_register_insert_callback(health_globals.prototypes.dict, health_prototype_insert_cb, NULL); dictionary_register_conflict_callback(health_globals.prototypes.dict, health_prototype_conflict_cb, NULL); dictionary_register_delete_callback(health_globals.prototypes.dict, health_prototype_delete_cb, NULL); @@ -472,7 +472,7 @@ bool health_prototype_add(RRD_ALERT_PROTOTYPE *ap, char **msg) { // add it to the prototypes dictionary_set_advanced(health_globals.prototypes.dict, string2str(ap->config.name), string_strlen(ap->config.name), - ap, sizeof(RRD_ALERT_PROTOTYPE), + ap, sizeof(*ap), NULL); return true; --- src/libnetdata/dictionary/dictionary.c @@ -20,36 +20,13 @@ inline void dictionary_write_unlock(DICTIONARY *dict) { ll_recursive_unlock(dict, DICTIONARY_LOCK_WRITE); } -// ---------------------------------------------------------------------------- -// ARAL for dict and hooks - -static ARAL *ar_dict = NULL; -static ARAL *ar_hooks = NULL; - -static void dictionary_init_aral(void) { - if(ar_dict && ar_hooks) return; - - static SPINLOCK spinlock = SPINLOCK_INITIALIZER; - spinlock_lock(&spinlock); - - if(!ar_dict) - ar_dict = aral_by_size_acquire(sizeof(DICTIONARY)); - - if(!ar_hooks) - ar_hooks = aral_by_size_acquire(sizeof(struct dictionary_hooks)); - - spinlock_unlock(&spinlock); -} - // ---------------------------------------------------------------------------- // callbacks registration static inline void dictionary_hooks_allocate(DICTIONARY *dict) { if(dict->hooks) return; - dictionary_init_aral(); - - dict->hooks = aral_callocz(ar_hooks); + dict->hooks = callocz(1, sizeof(struct dictionary_hooks)); dict->hooks->links = 1; DICTIONARY_STATS_PLUS_MEMORY(dict, 0, sizeof(struct dictionary_hooks), 0); @@ -60,7 +37,7 @@ static inline size_t dictionary_hooks_free(DICTIONARY *dict) { REFCOUNT links = __atomic_sub_fetch(&dict->hooks->links, 1, __ATOMIC_ACQUIRE); if(links == 0) { - aral_freez(ar_hooks, dict->hooks); + freez(dict->hooks); dict->hooks = NULL; DICTIONARY_STATS_MINUS_MEMORY(dict, 0, sizeof(struct dictionary_hooks), 0); @@ -291,7 +268,7 @@ static bool dictionary_free_all_resources(DICTIONARY *dict, size_t *mem, bool fo if(dict->value_aral) aral_by_size_release(dict->value_aral); - aral_freez(ar_dict, dict); + freez(dict); internal_error( false, @@ -487,10 +464,9 @@ static bool api_is_name_good_with_trace(DICTIONARY *dict __maybe_unused, const c // API - dictionary management static DICTIONARY *dictionary_create_internal(DICT_OPTIONS options, struct dictionary_stats *stats, size_t fixed_size) { - dictionary_init_aral(); cleanup_destroyed_dictionaries(); - DICTIONARY *dict = aral_callocz(ar_dict); + DICTIONARY *dict = callocz(1, sizeof(DICTIONARY)); dict->options = options; dict->stats = stats; --- src/plugins.d/pluginsd_internals.h @@ -141,7 +141,6 @@ static inline void pluginsd_rrddim_put_to_slot(PARSER *parser, RRDSET *st, RRDDI st->pluginsd.prd_array[i].id = NULL; } - rrd_slot_memory_added((wanted_size - st->pluginsd.size) * sizeof(struct pluginsd_rrddim)); st->pluginsd.size = wanted_size; } @@ -302,8 +301,6 @@ static inline void pluginsd_rrdset_cache_put_to_slot(PARSER *parser, RRDSET *st, host->stream.rcv.pluginsd_chart_slots.size = new_slots; spinlock_unlock(&host->stream.rcv.pluginsd_chart_slots.spinlock); - - rrd_slot_memory_added((new_slots - old_slots) * sizeof(uint32_t)); } host->stream.rcv.pluginsd_chart_slots.array[slot - 1] = st; --- src/streaming/stream-replication-sender.c @@ -1286,7 +1286,7 @@ void replication_sender_delete_pending_requests(struct sender_state *sender) { void replication_sender_init(struct sender_state *sender) { sender->replication.requests = dictionary_create_advanced(DICT_OPTION_DONT_OVERWRITE_VALUE | DICT_OPTION_FIXED_SIZE, - &dictionary_stats_category_replication, sizeof(struct replication_request)); + NULL, sizeof(struct replication_request)); dictionary_register_react_callback(sender->replication.requests, replication_request_react_callback, sender); dictionary_register_conflict_callback(sender->replication.requests, replication_request_conflict_callback, sender); ",netdata,netdata,C,C,73681.0,6023.0,X-Ray Vision for your infrastructure!,netdata_netdata,BUG_FIX,obvious 65c0460f1eb0fc2d5e22ceb848a607c881e8197a,2023-11-22 23:08:25,Jaida Wu,Refine readme,False,21,20,41,"--- README.md @@ -1,16 +1,16 @@ # Xiaomi BootLoader Bypass -![Version: 1.0](https://img.shields.io/badge/Version-1.0-brightgreen?style=for-the-badge) [![中文文档](https://img.shields.io/badge/中文文档-brightgreen?style=for-the-badge)](README-zh.md) +![Version: 1.0](https://img.shields.io/badge/Version-1.0-brightgreen?style=for-the-badge) ![中文文档](https://img.shields.io/badge/中文文档-brightgreen?style=for-the-badge) A PoC that exploits a vulnerability to bypass the Xiaomi HyperOS community restrictions of BootLoader unlocked account bindings. Feel free pull request if you want :) -## 💘 php-adb +## php-adb The project proudly uses the [php-adb](https://github.com/MlgmXyysd/php-adb) library. -## ☕ Buy me a Coffee +## Buy me a Coffee ✨ If you like my projects, you can buy me a coffee at: @@ -18,7 +18,7 @@ The project proudly uses the [php-adb](https://github.com/MlgmXyysd/php-adb) lib - [PayPal](https://paypal.me/MlgmXyysd) - [Patreon](https://www.patreon.com/MlgmXyysd) -## ⚠️ Warning +## Warning After unlocking the BootLoader, you may encounter the following situations: @@ -35,25 +35,25 @@ If you're experiencing any of the above, you should take all the responsibility If you're experiencing any of the above, consider yourself damned. Ever since Xiaomi restricted unlocking BootLoader, it has been against Xiaomi's 'geek' spirit and even the GPL. Xiaomi's restrictions on BootLoader unlocking are endless, and there's nothing we as developers can do about it. -## 📲 Unlocking requirements +## Unlocking requirements - An valid device: - A unbanned\* Xiaomi, Redmi or POCO device. - - Your device is running the official version of HyperOS. - - (Update 2023/11/23) Your device is not forced to verify account qualification by Xiaomi. + - Device is running the official version of HyperOS. + - (Update 2023/11/23) Device is not forced to verify account qualification by Xiaomi. - An valid SIM card: - - \* Except for tablets that cannot use SIM cards. + - Except for tablets that cannot use SIM cards. - SIM card must not be out of service. - SIM card needs to be able to access the internet. - Only 2 devices per valid SIM card are allowed to be unlock to a valid SIM card within a three-month period. - An valid Xiaomi account: - - A unbanned\* Xiaomi account. - Each account can only unlock 1 phone in a month and 3 phones in a year period. -- You have read and understood the [Warning](#-Warning) above. + - Account not banned\*. +- You have read and understood the Warning above. -\* According to the unlocking instructions provided by Xiaomi, it will prohibit some accounts and devices from using the unlocking tool, which is called ""risk control"". +- \* According to the unlocking instructions provided by Xiaomi, it will prohibit some accounts and devices from using the unlocking tool, which is called ""risk control"". -## ⚙️ How to use +## How to use 1. Download and install PHP 8.0+ for your system from the [official website](https://www.php.net/downloads). 2. Enable OpenSSL extension in `php.ini`. @@ -69,34 +69,33 @@ If you're experiencing any of the above, consider yourself damned. Ever since Xi 9. Connect phone to PC via wired interface. 10. Check `Always allow from this computer` and click `OK`. -\* See ""[Unlocking Requirements](#-Unlocking-requirements)"" above. +- \* See ""Unlocking Requirements"" below. 11. Wait and follow the prompts of script. 12. After successful binding, you can use the [official unlock tool](https://en.miui.com/unlock/index.html) to check the time you need to wait. -## 📖 Workaround +## Workaround - [52 Pojie]() - [My Blog]() - [My Blog (English)]() -## 🔖 FAQs +## FAQ - Q: Why does the unlock tool still remind me to wait 168/360 (or more) hours? - A: By principle, this PoC only bypasses the restrictions added for HyperOS. You still need to comply with the restrictions for MIUI. -- Q: Binding failed with error code `401`. +- Q: Binding failed with error code 401. - A: Your Xiaomi account credentials have expired, you need to log out and log in again in your device. -- Q: Binding failed with error code `20086`. +- Q: Binding failed with error code 20086. - A: Your device credentials have expired, you need to reboot your device. -- Q: Binding failed with error code `20090` or `20091`. +- Q: Binding failed with error code 20090 & 20091. - A: Device's Security Device Credential Manager function failure, contact after-sales. -- Q: Binding failed with error code `30001`. +- Q: Binding failed with error code 30001. - A: Your device has been forced to verify the account qualification by Xiaomi. Xiaomi lost its 'geek' spirit a long time ago, and there's nothing we can do about it. -## ⚖️ License - +## License No license, you are only allowed to use this project. All copyright (and link, etc.) in this software is not allowed to be deleted or changed without permission. All rights are reserved by [MeowCat Studio](https://github.com/MeowCat-Studio), [Meow Mobile](https://github.com/Meow-Mobile) and [NekoYuzu](https://github.com/MlgmXyysd). ",xiaomi-hyperos-bootloader-bypass,mlgmxyysd,PHP,PHP,3496.0,367.0,A PoC that exploits a vulnerability to bypass the Xiaomi HyperOS community restrictions of BootLoader unlocked account bindings.,mlgmxyysd_xiaomi-hyperos-bootloader-bypass,CODE_IMPROVEMENT,Code change: type annotation added 0d747c6d96f94e54d24d8c005da0c87105bf0fd5,2022-11-14 04:54:20,Pushpendra Pal,[readme] add space before code blocks,False,4,0,4,"--- README.md @@ -73,8 +73,6 @@ Other Style Guides - `symbol` - `bigint` -
- ```javascript const foo = 1; let bar = foo; @@ -93,8 +91,6 @@ Other Style Guides - `array` - `function` -
- ```javascript const foo = [1, 2]; const bar = foo; ",javascript,airbnb,JavaScript,JavaScript,146197.0,26671.0,JavaScript Style Guide,airbnb_javascript,DOC_CHANGE,changes in readme 46226a90c827dae18aa436a74d954ab45d622d70,2025-03-18 05:20:31,Nikita Shulga,"[EZ][BE] Remove cross-compilation options from mac-build.yml (#149237) It has long been gone Pull Request resolved: https://github.com/pytorch/pytorch/pull/149237 Approved by: https://github.com/seemethere, https://github.com/atalman",False,0,15,15,"--- .github/workflows/_mac-build.yml @@ -33,6 +33,10 @@ on: default: ""3.9"" description: | The python version to be used. Will be 3.9 by default + environment-file: + required: false + type: string + description: Set the conda environment file used to setup macOS build. test-matrix: required: false type: string @@ -82,12 +86,23 @@ jobs: fi - name: Setup miniconda + if: inputs.environment-file == '' uses: pytorch/test-infra/.github/actions/setup-miniconda@main with: python-version: ${{ inputs.python-version }} environment-file: .github/requirements/conda-env-${{ runner.os }}-${{ runner.arch }} pip-requirements-file: .github/requirements/pip-requirements-${{ runner.os }}.txt + # This option is used when cross-compiling arm64 from x86-64. Specifically, we need arm64 conda + # environment even though the arch is x86-64 + - name: Setup miniconda using the provided environment file + if: inputs.environment-file != '' + uses: pytorch/test-infra/.github/actions/setup-miniconda@main + with: + python-version: ${{ inputs.python-version }} + environment-file: ${{ inputs.environment-file }} + pip-requirements-file: .github/requirements/pip-requirements-${{ runner.os }}.txt + - name: Install sccache (only for non-forked PRs, and pushes to trunk) uses: nick-fields/retry@v3.0.0 if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }} ",pytorch,,python,Python,,,Tensors and Dynamic neural networks in Python with strong GPU acceleration,_pytorch,BUG_FIX,this commit fixes/polishes an earlier feature 43785de6e77323f15bba91fac94706e2eee151f1,2025-01-26 13:11:37,Ruifeng Zheng,"[SPARK-50925][ML][PYTHON][CONNECT] Support GeneralizedLinearRegression on Connect ### What changes were proposed in this pull request? Support GeneralizedLinearRegression on Connect ### Why are the changes needed? for feature parity ### Does this PR introduce _any_ user-facing change? yes, new algorithm supported on connect ### How was this patch tested? added test ### Was this patch authored or co-authored using generative AI tooling? no Closes #49673 from zhengruifeng/ml_connect_glr. Authored-by: Ruifeng Zheng Signed-off-by: Ruifeng Zheng ",False,137,1,138,"--- mllib/src/main/resources/META-INF/services/org.apache.spark.ml.Estimator @@ -28,7 +28,6 @@ org.apache.spark.ml.classification.GBTClassifier # regression org.apache.spark.ml.regression.LinearRegression -org.apache.spark.ml.regression.GeneralizedLinearRegression org.apache.spark.ml.regression.DecisionTreeRegressor org.apache.spark.ml.regression.RandomForestRegressor org.apache.spark.ml.regression.GBTRegressor --- mllib/src/main/resources/META-INF/services/org.apache.spark.ml.Transformer @@ -44,7 +44,6 @@ org.apache.spark.ml.classification.GBTClassificationModel # regression org.apache.spark.ml.regression.LinearRegressionModel -org.apache.spark.ml.regression.GeneralizedLinearRegressionModel org.apache.spark.ml.regression.DecisionTreeRegressionModel org.apache.spark.ml.regression.RandomForestRegressionModel org.apache.spark.ml.regression.GBTRegressionModel --- mllib/src/main/scala/org/apache/spark/ml/regression/GeneralizedLinearRegression.scala @@ -1009,8 +1009,6 @@ class GeneralizedLinearRegressionModel private[ml] ( with GeneralizedLinearRegressionBase with MLWritable with HasTrainingSummary[GeneralizedLinearRegressionTrainingSummary] { - private[ml] def this() = this(Identifiable.randomUID(""glm""), Vectors.empty, Double.NaN) - /** * Sets the link prediction (linear predictor) column name. * @@ -1184,7 +1182,7 @@ object GeneralizedLinearRegressionModel extends MLReadable[GeneralizedLinearRegr @Since(""2.0.0"") class GeneralizedLinearRegressionSummary private[regression] ( dataset: Dataset[_], - origModel: GeneralizedLinearRegressionModel) extends Summary with Serializable { + origModel: GeneralizedLinearRegressionModel) extends Serializable { import GeneralizedLinearRegression._ --- python/pyspark/ml/regression.py @@ -2795,7 +2795,6 @@ class GeneralizedLinearRegressionSummary(JavaWrapper): @property @since(""2.0.0"") - @try_remote_attribute_relation def predictions(self) -> DataFrame: """""" Predictions output by the model's `transform` method. @@ -2851,7 +2850,6 @@ class GeneralizedLinearRegressionSummary(JavaWrapper): """""" return self._call_java(""residualDegreeOfFreedomNull"") - @try_remote_attribute_relation def residuals(self, residualsType: str = ""deviance"") -> DataFrame: """""" Get the residuals of the fitted model by type. --- python/pyspark/ml/tests/test_regression.py @@ -25,10 +25,6 @@ from pyspark.sql import SparkSession from pyspark.ml.regression import ( LinearRegression, LinearRegressionModel, - GeneralizedLinearRegression, - GeneralizedLinearRegressionModel, - GeneralizedLinearRegressionSummary, - GeneralizedLinearRegressionTrainingSummary, LinearRegressionSummary, LinearRegressionTrainingSummary, DecisionTreeRegressor, @@ -167,104 +163,6 @@ class RegressionTestsMixin: model2 = LinearRegressionModel.load(d) self.assertEqual(str(model), str(model2)) - def test_generalized_linear_regression(self): - spark = self.spark - df = ( - spark.createDataFrame( - [ - (1, 1.0, Vectors.dense(0.0, 0.0)), - (2, 1.0, Vectors.dense(1.0, 2.0)), - (3, 2.0, Vectors.dense(0.0, 0.0)), - (4, 2.0, Vectors.dense(1.0, 1.0)), - ], - [""index"", ""label"", ""features""], - ) - .coalesce(1) - .sortWithinPartitions(""index"") - .select(""label"", ""features"") - ) - - glr = GeneralizedLinearRegression( - family=""gaussian"", - link=""identity"", - linkPredictionCol=""p"", - ) - glr.setRegParam(0.1) - glr.setMaxIter(1) - self.assertEqual(glr.getFamily(), ""gaussian"") - self.assertEqual(glr.getLink(), ""identity"") - self.assertEqual(glr.getLinkPredictionCol(), ""p"") - self.assertEqual(glr.getRegParam(), 0.1) - self.assertEqual(glr.getMaxIter(), 1) - - model = glr.fit(df) - self.assertTrue(np.allclose(model.intercept, 1.543859649122807, atol=1e-4), model.intercept) - self.assertTrue( - np.allclose(model.coefficients.toArray(), [0.43859649, -0.35087719], atol=1e-4), - model.coefficients, - ) - self.assertEqual(model.numFeatures, 2) - - vec = Vectors.dense(1.0, 2.0) - pred = model.predict(vec) - self.assertTrue(np.allclose(pred, 1.280701754385965, atol=1e-4), pred) - - expected_cols = [""label"", ""features"", ""p"", ""prediction""] - - output = model.transform(df) - self.assertEqual(output.columns, expected_cols) - self.assertEqual(output.count(), 4) - - # Model summary - self.assertTrue(model.hasSummary) - - summary = model.summary - self.assertIsInstance(summary, GeneralizedLinearRegressionSummary) - self.assertIsInstance(summary, GeneralizedLinearRegressionTrainingSummary) - self.assertEqual(summary.numIterations, 1) - self.assertEqual(summary.numInstances, 4) - self.assertEqual(summary.rank, 3) - self.assertTrue( - np.allclose( - summary.tValues, - [0.3725037662281711, -0.49418209022924164, 2.6589353685797654], - atol=1e-4, - ), - summary.tValues, - ) - self.assertTrue( - np.allclose( - summary.pValues, - [0.7729938686180984, 0.707802691825973, 0.22900885781807023], - atol=1e-4, - ), - summary.pValues, - ) - self.assertEqual(summary.predictions.columns, expected_cols) - self.assertEqual(summary.predictions.count(), 4) - self.assertEqual(summary.residuals().columns, [""devianceResiduals""]) - self.assertEqual(summary.residuals().count(), 4) - - summary2 = model.evaluate(df) - self.assertIsInstance(summary2, GeneralizedLinearRegressionSummary) - self.assertNotIsInstance(summary2, GeneralizedLinearRegressionTrainingSummary) - self.assertEqual(summary2.numInstances, 4) - self.assertEqual(summary2.rank, 3) - self.assertEqual(summary.predictions.columns, expected_cols) - self.assertEqual(summary.predictions.count(), 4) - self.assertEqual(summary2.residuals().columns, [""devianceResiduals""]) - self.assertEqual(summary2.residuals().count(), 4) - - # Model save & load - with tempfile.TemporaryDirectory(prefix=""generalized_linear_regression"") as d: - glr.write().overwrite().save(d) - glr2 = GeneralizedLinearRegression.load(d) - self.assertEqual(str(glr), str(glr2)) - - model.write().overwrite().save(d) - model2 = GeneralizedLinearRegressionModel.load(d) - self.assertEqual(str(model), str(model2)) - def test_decision_tree_regressor(self): df = self.df --- sql/connect/server/src/main/scala/org/apache/spark/sql/connect/ml/MLUtils.scala @@ -532,34 +532,6 @@ private[ml] object MLUtils { (classOf[BinaryLogisticRegressionSummary], Set(""scoreCol"")), // Regression Models - ( - classOf[GeneralizedLinearRegressionModel], - Set(""intercept"", ""coefficients"", ""numFeatures"", ""evaluate"")), - ( - classOf[GeneralizedLinearRegressionSummary], - Set( - ""aic"", - ""degreesOfFreedom"", - ""deviance"", - ""dispersion"", - ""nullDeviance"", - ""numInstances"", - ""predictionCol"", - ""predictions"", - ""rank"", - ""residualDegreeOfFreedom"", - ""residualDegreeOfFreedomNull"", - ""residuals"")), - ( - classOf[GeneralizedLinearRegressionTrainingSummary], - Set( - ""numIterations"", - ""solver"", - ""tValues"", - ""pValues"", - ""coefficientStandardErrors"", - ""coefficientsWithStatistics"", - ""toString"")), (classOf[LinearRegressionModel], Set(""intercept"", ""coefficients"", ""scale"", ""evaluate"")), ( classOf[LinearRegressionSummary], ",apache-spark,,Scala,Scala,,,Apache Spark - A unified analytics engine for large-scale data processing,_apache-spark,NEW_FEAT,app supports Generalized Linear Regression 1bec973803e0b3c00d2765bbf80447439127574d,2025-03-20 00:23:39,Miguel Ribeiro,"feat: add ukranian translation (#756) feat: add sort by renew type feat: add filter by renew type fix: state filter not cleared by clear button fix: special chars on calendar exports fix: special chars on notifications feat: remove ""Wallos"" text from calendar export fix: ical trigger to spec RFC5545",False,230,157,387,"--- api/subscriptions/get_ical_feed.php @@ -163,7 +163,7 @@ if ($_SERVER[""REQUEST_METHOD""] === ""POST"" || $_SERVER[""REQUEST_METHOD""] === ""GET $subscription['price'] = number_format($subscription['price'], 2); $uid = uniqid(); - $summary = html_entity_decode($subscription['name'], ENT_QUOTES, 'UTF-8'); + $summary = $subscription['name']; $description = ""Price: {$subscription['currency']}{$subscription['price']}\\nCategory: {$subscription['category']}\\nPayment Method: {$subscription['payment_method']}\\nPayer: {$subscription['payer_user']}\\nNotes: {$subscription['notes']}""; $dtstart = (new DateTime($subscription['next_payment']))->format('Ymd'); $dtend = (new DateTime($subscription['next_payment']))->format('Ymd'); --- endpoints/cronjobs/sendnotifications.php @@ -233,7 +233,7 @@ while ($userToNotify = $usersToNotify->fetchArray(SQLITE3_ASSOC)) { echo ""Next payment date: "" . $nextPaymentDate->format('Y-m-d') . ""
""; echo ""Current date: "" . $currentDate->format('Y-m-d') . ""
""; echo ""Difference: "" . $difference . ""
""; - $notify[$rowSubscription['payer_user_id']][$i]['name'] = html_entity_decode($rowSubscription['name'], ENT_QUOTES, 'UTF-8'); + $notify[$rowSubscription['payer_user_id']][$i]['name'] = $rowSubscription['name']; $notify[$rowSubscription['payer_user_id']][$i]['price'] = $rowSubscription['price'] . $currencies[$rowSubscription['currency_id']]['symbol']; $notify[$rowSubscription['payer_user_id']][$i]['currency'] = $currencies[$rowSubscription['currency_id']]['name']; $notify[$rowSubscription['payer_user_id']][$i]['category'] = $categories[$rowSubscription['category_id']]['name']; --- endpoints/subscription/exportcalendar.php @@ -39,13 +39,13 @@ if ($_SERVER[""REQUEST_METHOD""] === ""POST"") { // Create ICS from subscription information $uid = uniqid(); - $summary = html_entity_decode($subscription['name'], ENT_QUOTES, 'UTF-8'); + $summary = ""Wallos: "" . $subscription['name']; $description = ""Price: {$subscription['currency']}{$subscription['price']}\nCategory: {$subscription['category']}\nPayment Method: {$subscription['payment_method']}\nPayer: {$subscription['payer_user']}\n\nNotes: {$subscription['notes']}""; $dtstart = (new DateTime($subscription['next_payment']))->format('Ymd\THis\Z'); $dtend = (new DateTime($subscription['next_payment']))->modify('+1 hour')->format('Ymd\THis\Z'); $location = isset($subscription['url']) ? $subscription['url'] : ''; - $alarm_trigger = '-P' . $subscription['trigger'] . 'D'; + $alarm_trigger = '-' . $subscription['trigger'] . 'D'; $icsContent = << - 1) { - ?> -
-
-
- -
"" data-memberid=""""> -
- -
-
- - 1) { - ?> -
-
-
- -
"" data-categoryid=""""> - -
- -
-
- - 1) { - ?> -
-
-
- -
"" data-paymentid=""""> - -
- -
-
- - -
-
-
-
-
-
-
- - -
-
-
-
-
-
-
- -
-
- -
-
- \ No newline at end of file --- includes/i18n/cs.php @@ -48,7 +48,6 @@ $i18n = [ ""last_added"" => ""Naposledy přidané"", ""price"" => ""Cena"", ""next_payment"" => ""Další platba"", - ""renewal_type"" => ""Typ obnovení"", ""auto_renewal"" => ""Automatické obnovení"", ""automatically_renews"" => ""Automaticky se obnovuje"", ""manual_renewal"" => ""Ruční obnovení"", --- includes/i18n/de.php @@ -48,7 +48,6 @@ $i18n = [ ""last_added"" => ""Zuletzt hinzugefügt"", ""price"" => ""Preis"", ""next_payment"" => ""Nächste Zahlung"", - ""renewal_type"" => ""Verlängerungstyp"", ""auto_renewal"" => ""Automatische Verlängerung"", ""automatically_renews"" => ""Automatisch verlängert"", ""manual_renewal"" => ""Manuelle Verlängerung"", --- includes/i18n/el.php @@ -48,7 +48,6 @@ $i18n = [ ""last_added"" => ""Τελευταία προσθήκη"", ""price"" => ""Τιμή"", ""next_payment"" => ""Επόμενη πληρωμή"", - ""renewal_type"" => ""Τύπος ανανέωσης"", ""auto_renewal"" => ""Αυτόματη ανανέωση"", ""automatically_renews"" => ""Ανανεώνεται αυτόματα"", ""manual_renewal"" => ""Χειροκίνητη ανανέωση"", --- includes/i18n/en.php @@ -48,7 +48,6 @@ $i18n = [ ""last_added"" => ""Last Added"", ""price"" => ""Price"", ""next_payment"" => ""Next Payment"", - ""renewal_type"" => ""Renewal Type"", ""auto_renewal"" => ""Auto Renewal"", ""automatically_renews"" => ""Automatically renews"", ""manual_renewal"" => ""Manual Renewal"", --- includes/i18n/es.php @@ -48,7 +48,6 @@ $i18n = [ ""last_added"" => ""Última Añadida"", ""price"" => ""Precio"", ""next_payment"" => ""Próximo Pago"", - ""renewal_type"" => ""Tipo de Renovación"", ""auto_renewal"" => ""Renovación Automática"", ""automatically_renews"" => ""Renovación Automática"", ""manual_renewal"" => ""Renovación Manual"", --- includes/i18n/fr.php @@ -48,7 +48,6 @@ $i18n = [ ""last_added"" => ""Dernier ajouté"", ""price"" => ""Prix"", ""next_payment"" => ""Prochain paiement"", - ""renewal_type"" => ""Type de renouvellement"", ""auto_renewal"" => ""Renouvellement automatique"", ""automatically_renews"" => ""Renouvellement automatique"", ""manual_renewal"" => ""Renouvellement manuel"", --- includes/i18n/it.php @@ -52,7 +52,6 @@ $i18n = [ ""last_added"" => 'Ultimo aggiunto', ""price"" => 'Prezzo', ""next_payment"" => 'Prossimo pagamento', - ""renewal_type"" => 'Tipo di rinnovo', ""auto_renewal"" => 'Rinnovo automatico', ""automatically_renews"" => 'Si rinnova automaticamente', ""manual_renewal"" => ""Rinnovo manuale"", --- includes/i18n/jp.php @@ -48,7 +48,6 @@ $i18n = [ ""last_added"" => ""最終追加日"", ""price"" => ""金額"", ""next_payment"" => ""次回支払い"", - ""renewal_type"" => ""更新タイプ"", ""auto_renewal"" => ""自動更新"", ""automatically_renews"" => ""自動更新"", ""manual_renewal"" => ""手動更新"", --- includes/i18n/ko.php @@ -48,7 +48,6 @@ $i18n = [ ""last_added"" => ""최근 등록"", ""price"" => ""가격"", ""next_payment"" => ""다음 결제일"", - ""renewal_type"" => ""갱신 방법"", ""auto_renewal"" => ""자동 갱신"", ""automatically_renews"" => ""자동 갱신"", ""manual_renewal"" => ""수동 갱신"", --- includes/i18n/nl.php @@ -48,7 +48,6 @@ $i18n = [ ""last_added"" => ""Laatst toegevoegd"", ""price"" => ""Prijs"", ""next_payment"" => ""Volgende betaling"", - ""renewal_type"" => ""Verlengingstype"", ""auto_renewal"" => ""Automatische verlenging"", ""automatically_renews"" => ""Verlengt automatisch"", ""manual_renewal"" => ""Handmatige verlenging"", --- includes/i18n/pl.php @@ -48,7 +48,6 @@ $i18n = [ ""last_added"" => ""Ostatnio dodane"", ""price"" => ""Cena"", ""next_payment"" => ""Następna płatność"", - ""renewal_type"" => ""Typ odnowienia"", ""auto_renewal"" => ""Automatyczne odnawianie"", ""automatically_renews"" => ""Automatycznie odnawia się"", ""manual_renewal"" => ""Ręczne odnawianie"", --- includes/i18n/pt.php @@ -48,7 +48,6 @@ $i18n = [ ""last_added"" => ""Última Adicionada"", ""price"" => ""Preço"", ""next_payment"" => ""Próximo Pagamento"", - ""renewal_type"" => ""Tipo de Renovação"", ""auto_renewal"" => ""Renovação Automática"", ""automatically_renews"" => ""Renova automaticamente"", ""manual_renewal"" => ""Renovação Manual"", --- includes/i18n/pt_br.php @@ -48,7 +48,6 @@ $i18n = [ ""last_added"" => ""Última adicionada"", ""price"" => ""Preço"", ""next_payment"" => ""Próximo pagamento"", - ""renewal_type"" => ""Tipo de renovação"", ""auto_renewal"" => ""Renovação automática"", ""automatically_renews"" => ""Renova automaticamente"", ""manual_renewal"" => ""Renovação manual"", --- includes/i18n/ru.php @@ -48,7 +48,6 @@ $i18n = [ ""last_added"" => ""Дата создания"", ""price"" => ""Стоимость"", ""next_payment"" => ""Следующий платеж"", - ""renewal_type"" => ""Тип продления"", ""auto_renewal"" => ""Автоматическое продление"", ""automatically_renews"" => ""Автоматическое продление"", ""manual_renewal"" => ""Ручное продление"", --- includes/i18n/sl.php @@ -48,7 +48,6 @@ $i18n = [ ""last_added"" => ""Zadnje dodano"", ""price"" => ""Cena"", ""next_payment"" => ""Naslednje plačilo"", - ""renewal_type"" => ""Vrsta obnove"", ""auto_renewal"" => ""Samodejno obnavljanje"", ""automatically_renews"" => ""Se samodejno obnavlja"", ""manual_renewal"" => ""Ročno obnavljanje"", --- includes/i18n/sr.php @@ -47,8 +47,7 @@ $i18n = [ ""name"" => ""Назив"", ""last_added"" => ""Последње додато"", ""price"" => ""Цена"", - ""next_payment"" => ""Следећа уплата"", - ""renewal_type"" => ""Тип обнове"", + ""next_payment"" => ""Следећа уплата"", ""auto_renewal"" => ""Аутоматско обновљење"", ""automatically_renews"" => ""Аутоматски обновља"", ""manual_renewal"" => ""Ручно обновљење"", --- includes/i18n/sr_lat.php @@ -48,7 +48,6 @@ $i18n = [ ""last_added"" => ""Poslednje dodato"", ""price"" => ""Cena"", ""next_payment"" => ""Sledeća uplata"", - ""renewal_type"" => ""Tip obnove"", ""auto_renewal"" => ""Automatsko obnavljanje"", ""automatically_renews"" => ""Automatsko obnavljanje"", ""manual_renewal"" => ""Ručno obnavljanje"", --- includes/i18n/tr.php @@ -48,7 +48,6 @@ $i18n = [ ""last_added"" => ""Son Eklenen"", ""price"" => ""Fiyat"", ""next_payment"" => ""Sonraki Ödeme"", - ""renewal_type"" => ""Yenileme Türü"", ""auto_renewal"" => ""Otomatik Yenileme"", ""automatically_renews"" => ""Otomatik Yenileme"", ""manual_renewal"" => ""Manuel Yenileme"", --- includes/i18n/uk.php @@ -48,7 +48,6 @@ $i18n = [ ""last_added"" => ""Дата створення"", ""price"" => ""Вартість"", ""next_payment"" => ""Наступний платіж"", - ""renewal_type"" => ""Тип продовження"", ""auto_renewal"" => ""Автоматичне продовження"", ""automatically_renews"" => ""Автоматичне продовження"", ""manual_renewal"" => ""Ручне продовження"", --- includes/i18n/vi.php @@ -48,7 +48,6 @@ $i18n = [ ""last_added"" => ""Thêm gần đây"", ""price"" => ""Giá"", ""next_payment"" => ""Thanh toán tiếp theo"", - ""renewal_type"" => ""Loại gia hạn"", ""auto_renewal"" => ""Tự động gia hạn"", ""automatically_renews"" => ""Tự động gia hạn"", ""manual_renewal"" => ""Gia hạn thủ công"", --- includes/i18n/zh_cn.php @@ -52,7 +52,6 @@ $i18n = [ ""last_added"" => ""创建时间"", ""price"" => ""价格"", ""next_payment"" => ""下次支付时间"", - ""renewal_type"" => ""续订类型"", ""auto_renewal"" => ""自动续订"", ""automatically_renews"" => ""自动续订"", ""manual_renewal"" => ""手动续订"", --- includes/i18n/zh_tw.php @@ -48,7 +48,6 @@ $i18n = [ ""last_added"" => ""最近新增"", ""price"" => ""價格"", ""next_payment"" => ""下次付款日期"", - ""renewal_type"" => ""續訂方式"", ""auto_renewal"" => ""自動續訂"", ""automatically_renews"" => ""自動續訂"", ""manual_renewal"" => ""手動續訂"", --- includes/sort_options.php @@ -1,35 +0,0 @@ -
-
    -
  • onClick=""setSortOption('name')"" id=""sort-name""> - -
  • -
  • onClick=""setSortOption('id')"" id=""sort-id""> - -
  • -
  • onClick=""setSortOption('price')"" id=""sort-price""> - -
  • -
  • onClick=""setSortOption('next_payment')"" - id=""sort-next_payment"">
  • -
  • onClick=""setSortOption('payer_user_id')"" - id=""sort-payer_user_id"">
  • -
  • onClick=""setSortOption('category_id')"" - id=""sort-category_id"">
  • -
  • onClick=""setSortOption('payment_method_id')"" - id=""sort-payment_method_id""> - -
  • - -
  • onClick=""setSortOption('inactive')"" - id=""sort-inactive"">
  • - -
  • onClick=""setSortOption('alphanumeric')"" - id=""sort-alphanumeric"">
  • -
  • onClick=""setSortOption('renewal_type')"" - id=""sort-renewal_type"">
  • -
-
\ No newline at end of file --- includes/version.php @@ -1,3 +1,3 @@ \ No newline at end of file --- index.php @@ -21,7 +21,7 @@ if (isset($_COOKIE['sortOrder']) && $_COOKIE['sortOrder'] != """") { } $sortOrder = $sort; -$allowedSortCriteria = ['name', 'id', 'next_payment', 'price', 'payer_user_id', 'category_id', 'payment_method_id', 'inactive', 'alphanumeric', 'renewal_type']; +$allowedSortCriteria = ['name', 'id', 'next_payment', 'price', 'payer_user_id', 'category_id', 'payment_method_id', 'inactive', 'alphanumeric']; $order = ($sort == ""price"" || $sort == ""id"") ? ""DESC"" : ""ASC""; if ($sort == ""alphanumeric"") { @@ -32,10 +32,6 @@ if (!in_array($sort, $allowedSortCriteria)) { $sort = ""next_payment""; } -if ($sort == ""renewal_type"") { - $sort = ""auto_renew""; -} - $sql = ""SELECT * FROM subscriptions WHERE user_id = :userId""; if (isset($_GET['member'])) { @@ -110,6 +106,7 @@ $sql .= "" ORDER BY "" . implode("", "", $orderByClauses); $stmt = $db->prepare($sql); $stmt->bindValue(':userId', $userId, SQLITE3_INTEGER); + if (!empty($params)) { foreach ($params as $key => $value) { $stmt->bindValue($key, $value, SQLITE3_INTEGER); @@ -199,7 +196,119 @@ $headerClass = count($subscriptions) > 0 ? ""main-actions"" : ""main-actions hidden - +
+ 1) { + ?> +
+
+
+ +
"" data-memberid=""""> +
+ +
+
+ + 1) { + ?> +
+
+
+ +
"" data-categoryid=""""> + +
+ +
+
+ + 1) { + ?> +
+
+
+ +
"" data-paymentid=""""> + +
+ +
+
+ + +
+
+
+
+
+
+
+ + +
+
+ +
+
+
@@ -207,7 +316,39 @@ $headerClass = count($subscriptions) > 0 ? ""main-actions"" : ""main-actions hidden title=""""> - +
+
    +
  • onClick=""setSortOption('name')"" id=""sort-name""> + +
  • +
  • onClick=""setSortOption('id')"" id=""sort-id""> + +
  • +
  • onClick=""setSortOption('price')"" id=""sort-price""> + +
  • +
  • onClick=""setSortOption('next_payment')"" + id=""sort-next_payment"">
  • +
  • onClick=""setSortOption('payer_user_id')"" + id=""sort-payer_user_id"">
  • +
  • onClick=""setSortOption('category_id')"" + id=""sort-category_id"">
  • +
  • + onClick=""setSortOption('payment_method_id')"" id=""sort-payment_method_id""> + +
  • + +
  • onClick=""setSortOption('inactive')"" + id=""sort-inactive"">
  • + +
  • onClick=""setSortOption('alphanumeric')"" + id=""sort-alphanumeric"">
  • +
+
--- scripts/calendar.js @@ -73,12 +73,6 @@ function openSubscriptionModal(subscriptionId) { .catch(error => console.error('Error:', error)); } -function decodeHtmlEntities(str) { - const txt = document.createElement('textarea'); - txt.innerHTML = str; - return txt.value; -} - function exportCalendar(subscriptionId) { fetch('endpoints/subscription/exportcalendar.php', { method: 'POST', @@ -95,7 +89,7 @@ function exportCalendar(subscriptionId) { const a = document.createElement('a'); a.href = url; // Use the subscription name for the file name, replacing any characters that are invalid in file names - a.download = `${decodeHtmlEntities(data.name).replace(/[\/\\:*?""<>|]/g, '_').toLowerCase()}.ics`; + a.download = `${data.name.replace(/[\/\\:*?""<>|]/g, '_').toLowerCase()}.ics`; document.body.appendChild(a); a.click(); window.URL.revokeObjectURL(url); --- scripts/dashboard.js @@ -358,9 +358,6 @@ function fetchSubscriptions(id, event, initiator) { if (activeFilters['state'] !== """") { getSubscriptions += getSubscriptions.includes(""?"") ? `&state=${activeFilters['state']}` : `?state=${activeFilters['state']}`; } - if (activeFilters['renewalType'] !== """") { - getSubscriptions += getSubscriptions.includes(""?"") ? `&renewalType=${activeFilters['renewalType']}` : `?renewalType=${activeFilters['renewalType']}`; - } fetch(getSubscriptions) .then(response => response.text()) @@ -603,7 +600,6 @@ activeFilters['categories'] = []; activeFilters['members'] = []; activeFilters['payments'] = []; activeFilters['state'] = """"; -activeFilters['renewalType'] = """"; document.addEventListener(""DOMContentLoaded"", function () { var filtermenu = document.querySelector('#filtermenu-button'); @@ -697,23 +693,9 @@ document.querySelectorAll('.filter-item').forEach(function (item) { }); this.classList.add('selected'); } - } else if (this.hasAttribute('data-renewaltype')) { - const renewalType = this.getAttribute('data-renewaltype'); - if (activeFilters['renewalType'] === renewalType) { - activeFilters['renewalType'] = """"; - this.classList.remove('selected'); - } else { - activeFilters['renewalType'] = renewalType; - Array.from(this.parentNode.children).forEach(sibling => { - sibling.classList.remove('selected'); - }); - this.classList.add('selected'); - } } - if (activeFilters['categories'].length > 0 || activeFilters['members'].length > 0 || - activeFilters['payments'].length > 0 || activeFilters['state'] !== """" || - activeFilters['renewalType'] !== """") { + if (activeFilters['categories'].length > 0 || activeFilters['members'].length > 0 || activeFilters['payments'].length > 0) { document.querySelector('#clear-filters').classList.remove('hide'); } else { document.querySelector('#clear-filters').classList.add('hide'); @@ -729,9 +711,6 @@ function clearFilters() { activeFilters['categories'] = []; activeFilters['members'] = []; activeFilters['payments'] = []; - activeFilters['state'] = """"; - activeFilters['renewalType'] = """"; - document.querySelectorAll('.filter-item').forEach(function (item) { item.classList.remove('selected'); }); ",wallos,ellite,PHP,PHP,4155.0,178.0,Wallos: Open-Source Personal Subscription Tracker,ellite_wallos,NEW_FEAT,obvious afe5cf9ccb7e9cb0f54798fb7130a11473b49cd1,2023-04-13 04:11:33,Wout De Puysseleir,Update package-lock,False,3,3,6,"--- example_project/assets/package-lock.json @@ -25,7 +25,7 @@ }, "".."": {}, ""../.."": { - ""version"": ""0.4.1"", + ""version"": ""0.4.0"", ""license"": ""MIT"", ""devDependencies"": { ""prettier"": ""2.8.7"", --- package-lock.json @@ -1,12 +1,12 @@ { ""name"": ""live_svelte"", - ""version"": ""0.4.1"", + ""version"": ""0.4.0"", ""lockfileVersion"": 2, ""requires"": true, ""packages"": { """": { ""name"": ""live_svelte"", - ""version"": ""0.4.1"", + ""version"": ""0.4.0"", ""license"": ""MIT"", ""devDependencies"": { ""prettier"": ""2.8.7"", ",live_svelte,woutdp,Elixir,Elixir,1416.0,58.0,Svelte inside Phoenix LiveView with seamless end-to-end reactivity,woutdp_live_svelte,CONFIG_CHANGE,version updates are done 9148ac0a16d182e565cbd9b43577e5adf271b792,2025-03-25 22:15:52,Neeraj Sanjay Kale,"Bluetooth: btnxpuart: Add support to set BD address This adds support for setting BD address during hci registration. NXP FW does not allow vendor commands unless it receives a reset command after FW download and initialization done. As a workaround, the .set_bdaddr callback function will first send the HCI reset command, followed by the actual vendor command to set BD address. The driver checks for the local-bd-address property in device tree, and if preset, it sets the HCI_QUIRK_USE_BDADDR_PROPERTY quirk. With this quirk set, the driver's set_bdaddr callback function is called after FW download is complete and before HCI initialization, which sends the hci reset and 3f 22 commands. During initialization, kernel reads the newly set BD address from the controller. Signed-off-by: Loic Poulain Signed-off-by: Johan Korsnes Signed-off-by: Kristian Krohn Tested-by: Neeraj Sanjay Kale Signed-off-by: Neeraj Sanjay Kale Signed-off-by: Luiz Augusto von Dentz ",False,54,5,59,"--- drivers/bluetooth/btnxpuart.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later /* * NXP Bluetooth driver - * Copyright 2023-2025 NXP + * Copyright 2023 NXP */ #include @@ -99,16 +99,13 @@ #define PS_STATE_AWAKE 0 #define PS_STATE_SLEEP 1 -/* NXP Vendor Commands. Refer user manual UM11628 on nxp.com */ -/* Set custom BD Address */ -#define HCI_NXP_SET_BD_ADDR 0xfc22 -/* Set Auto-Sleep mode */ +/* Bluetooth vendor command : Sleep mode */ #define HCI_NXP_AUTO_SLEEP_MODE 0xfc23 -/* Set Wakeup method */ +/* Bluetooth vendor command : Wakeup method */ #define HCI_NXP_WAKEUP_METHOD 0xfc53 -/* Set operational baudrate */ +/* Bluetooth vendor command : Set operational baudrate */ #define HCI_NXP_SET_OPER_SPEED 0xfc09 -/* Independent Reset (Soft Reset) */ +/* Bluetooth vendor command: Independent Reset */ #define HCI_NXP_IND_RESET 0xfcfc /* Bluetooth vendor command: Trigger FW dump */ #define HCI_NXP_TRIGGER_DUMP 0xfe91 @@ -326,15 +323,6 @@ struct nxp_fw_dump_hdr { __le16 buf_len; }; -union nxp_set_bd_addr_payload { - struct { - u8 param_id; - u8 param_len; - u8 param[6]; - } __packed data; - u8 buf[8]; -}; - static u8 crc8_table[CRC8_TABLE_SIZE]; /* Default configurations */ @@ -1306,35 +1294,6 @@ static int nxp_recv_acl_pkt(struct hci_dev *hdev, struct sk_buff *skb) return hci_recv_frame(hdev, skb); } -static int nxp_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr) -{ - union nxp_set_bd_addr_payload pcmd; - int err; - - pcmd.data.param_id = 0xfe; - pcmd.data.param_len = 6; - memcpy(pcmd.data.param, bdaddr, 6); - - /* BD address can be assigned only after first reset command. */ - err = __hci_cmd_sync_status(hdev, HCI_OP_RESET, 0, NULL, - HCI_INIT_TIMEOUT); - if (err) { - bt_dev_err(hdev, - ""Reset before setting local-bd-addr failed (%d)"", - err); - return err; - } - - err = __hci_cmd_sync_status(hdev, HCI_NXP_SET_BD_ADDR, sizeof(pcmd), - pcmd.buf, HCI_CMD_TIMEOUT); - if (err) { - bt_dev_err(hdev, ""Changing device address failed (%d)"", err); - return err; - } - - return 0; -} - /* NXP protocol */ static int nxp_setup(struct hci_dev *hdev) { @@ -1672,7 +1631,6 @@ static int nxp_serdev_probe(struct serdev_device *serdev) { struct hci_dev *hdev; struct btnxpuart_dev *nxpdev; - bdaddr_t ba = {0}; nxpdev = devm_kzalloc(&serdev->dev, sizeof(*nxpdev), GFP_KERNEL); if (!nxpdev) @@ -1723,15 +1681,8 @@ static int nxp_serdev_probe(struct serdev_device *serdev) hdev->shutdown = nxp_shutdown; hdev->wakeup = nxp_wakeup; hdev->reset = nxp_reset; - hdev->set_bdaddr = nxp_set_bdaddr; SET_HCIDEV_DEV(hdev, &serdev->dev); - device_property_read_u8_array(&nxpdev->serdev->dev, - ""local-bd-address"", - (u8 *)&ba, sizeof(ba)); - if (bacmp(&ba, BDADDR_ANY)) - set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks); - if (hci_register_dev(hdev) < 0) { dev_err(&serdev->dev, ""Can't register HCI device\n""); goto probe_fail; ",linux,torvalds,C,C,189022.0,55340.0,Linux kernel source tree,torvalds_linux,NEW_FEAT,obvious 7f7f12dad32dc708e89573fdd0767b48b0c18049,2025-02-08 21:10:50,Pāvels Nadtočajevs,[Tests] Add Packed*Array to_byte_array variant call tests.,False,148,0,148,"--- tests/core/templates/test_vector.h @@ -215,154 +215,6 @@ TEST_CASE(""[Vector] Get, set"") { CHECK(vector.get(4) == 4); } -TEST_CASE(""[Vector] To byte array (variant call)"") { - // PackedInt32Array. - { - PackedInt32Array vector[] = { { 0, -1, 2008 }, {} }; - PackedByteArray out[] = { { /* 0 */ 0x00, 0x00, 0x00, 0x00, /* -1 */ 0xFF, 0xFF, 0xFF, 0xFF, /* 2008 */ 0xD8, 0x07, 0x00, 0x00 }, {} }; - - for (size_t i = 0; i < std::size(vector); i++) { - Callable::CallError err; - Variant v_ret; - Variant v_vector = vector[i]; - v_vector.callp(""to_byte_array"", nullptr, 0, v_ret, err); - CHECK(v_ret.get_type() == Variant::PACKED_BYTE_ARRAY); - CHECK(v_ret.operator PackedByteArray() == out[i]); - } - } - - // PackedInt64Array. - { - PackedInt64Array vector[] = { { 0, -1, 2008 }, {} }; - PackedByteArray out[] = { { /* 0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* -1 */ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* 2008 */ 0xD8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, {} }; - - for (size_t i = 0; i < std::size(vector); i++) { - Callable::CallError err; - Variant v_ret; - Variant v_vector = vector[i]; - v_vector.callp(""to_byte_array"", nullptr, 0, v_ret, err); - CHECK(v_ret.get_type() == Variant::PACKED_BYTE_ARRAY); - CHECK(v_ret.operator PackedByteArray() == out[i]); - } - } - - // PackedFloat32Array. - { - PackedFloat32Array vector[] = { { 0.0, -1.0, 200e24 }, {} }; - PackedByteArray out[] = { { /* 0.0 */ 0x00, 0x00, 0x00, 0x00, /* -1.0 */ 0x00, 0x00, 0x80, 0xBF, /* 200e24 */ 0xA6, 0x6F, 0x25, 0x6B }, {} }; - - for (size_t i = 0; i < std::size(vector); i++) { - Callable::CallError err; - Variant v_ret; - Variant v_vector = vector[i]; - v_vector.callp(""to_byte_array"", nullptr, 0, v_ret, err); - CHECK(v_ret.get_type() == Variant::PACKED_BYTE_ARRAY); - CHECK(v_ret.operator PackedByteArray() == out[i]); - } - } - // PackedFloat64Array. - { - PackedFloat64Array vector[] = { { 0.0, -1.0, 200e24 }, {} }; - PackedByteArray out[] = { { /* 0.0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* -1.0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xBF, /* 200e24 */ 0x35, 0x03, 0x32, 0xB7, 0xF4, 0xAD, 0x64, 0x45 }, {} }; - - for (size_t i = 0; i < std::size(vector); i++) { - Callable::CallError err; - Variant v_ret; - Variant v_vector = vector[i]; - v_vector.callp(""to_byte_array"", nullptr, 0, v_ret, err); - CHECK(v_ret.get_type() == Variant::PACKED_BYTE_ARRAY); - CHECK(v_ret.operator PackedByteArray() == out[i]); - } - } - - // PackedStringArray. - { - PackedStringArray vector[] = { { ""test"", ""string"" }, {}, { """", ""test"" } }; - PackedByteArray out[] = { { /* test */ 0x74, 0x65, 0x73, 0x74, /* null */ 0x00, /* string */ 0x73, 0x74, 0x72, 0x69, 0x6E, 0x67, /* null */ 0x00 }, {}, { /* null */ 0x00, /* test */ 0x74, 0x65, 0x73, 0x74, /* null */ 0x00 } }; - - for (size_t i = 0; i < std::size(vector); i++) { - Callable::CallError err; - Variant v_ret; - Variant v_vector = vector[i]; - v_vector.callp(""to_byte_array"", nullptr, 0, v_ret, err); - CHECK(v_ret.get_type() == Variant::PACKED_BYTE_ARRAY); - CHECK(v_ret.operator PackedByteArray() == out[i]); - } - } - - // PackedVector2Array. - { - PackedVector2Array vector[] = { { Vector2(), Vector2(1, -1) }, {} }; -#ifdef REAL_T_IS_DOUBLE - PackedByteArray out[] = { { /* X=0.0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Y=0.0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* X=1.0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3F, /* Y=-1.0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xBF }, {} }; -#else - PackedByteArray out[] = { { /* X=0.0 */ 0x00, 0x00, 0x00, 0x00, /* Y=0.0 */ 0x00, 0x00, 0x00, 0x00, /* X=1.0 */ 0x00, 0x00, 0x80, 0x3F, /* Y=-1.0 */ 0x00, 0x00, 0x80, 0xBF }, {} }; -#endif - - for (size_t i = 0; i < std::size(vector); i++) { - Callable::CallError err; - Variant v_ret; - Variant v_vector = vector[i]; - v_vector.callp(""to_byte_array"", nullptr, 0, v_ret, err); - CHECK(v_ret.get_type() == Variant::PACKED_BYTE_ARRAY); - CHECK(v_ret.operator PackedByteArray() == out[i]); - } - } - - // PackedVector3Array. - { - PackedVector3Array vector[] = { { Vector3(), Vector3(1, 1, -1) }, {} }; -#ifdef REAL_T_IS_DOUBLE - PackedByteArray out[] = { { /* X=0.0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Y=0.0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Z=0.0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* X=1.0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3F, /* Y=1.0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3F, /* Z=-1.0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xBF }, {} }; -#else - PackedByteArray out[] = { { /* X=0.0 */ 0x00, 0x00, 0x00, 0x00, /* Y=0.0 */ 0x00, 0x00, 0x00, 0x00, /* Z=0.0 */ 0x00, 0x00, 0x00, 0x00, /* X=1.0 */ 0x00, 0x00, 0x80, 0x3F, /* Y=1.0 */ 0x00, 0x00, 0x80, 0x3F, /* Z=-1.0 */ 0x00, 0x00, 0x80, 0xBF }, {} }; -#endif - - for (size_t i = 0; i < std::size(vector); i++) { - Callable::CallError err; - Variant v_ret; - Variant v_vector = vector[i]; - v_vector.callp(""to_byte_array"", nullptr, 0, v_ret, err); - CHECK(v_ret.get_type() == Variant::PACKED_BYTE_ARRAY); - CHECK(v_ret.operator PackedByteArray() == out[i]); - } - } - - // PackedColorArray. - { - PackedColorArray vector[] = { { Color(), Color(1, 1, 1) }, {} }; - PackedByteArray out[] = { { /* R=0.0 */ 0x00, 0x00, 0x00, 0x00, /* G=0.0 */ 0x00, 0x00, 0x00, 0x00, /* B=0.0 */ 0x00, 0x00, 0x00, 0x00, /* A=1.0 */ 0x00, 0x00, 0x80, 0x3F, /* R=1.0 */ 0x00, 0x00, 0x80, 0x3F, /* G=1.0 */ 0x00, 0x00, 0x80, 0x3F, /* B=1.0 */ 0x00, 0x00, 0x80, 0x3F, /* A=1.0 */ 0x00, 0x00, 0x80, 0x3F }, {} }; - - for (size_t i = 0; i < std::size(vector); i++) { - Callable::CallError err; - Variant v_ret; - Variant v_vector = vector[i]; - v_vector.callp(""to_byte_array"", nullptr, 0, v_ret, err); - CHECK(v_ret.get_type() == Variant::PACKED_BYTE_ARRAY); - CHECK(v_ret.operator PackedByteArray() == out[i]); - } - } - - // PackedVector4Array. - { - PackedVector4Array vector[] = { { Vector4(), Vector4(1, -1, 1, -1) }, {} }; -#ifdef REAL_T_IS_DOUBLE - PackedByteArray out[] = { { /* X=0.0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Y=0.0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* Z 0.0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* W=0.0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* X=1.0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3F, /* Y=-1.0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xBF, /* Z=1.0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3F, /* W=-1.0 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xBF }, {} }; -#else - PackedByteArray out[] = { { /* X=0.0 */ 0x00, 0x00, 0x00, 0x00, /* Y=0.0 */ 0x00, 0x00, 0x00, 0x00, /* Z=0.0 */ 0x00, 0x00, 0x00, 0x00, /* W 0.0 */ 0x00, 0x00, 0x00, 0x00, /* X 1.0 */ 0x00, 0x00, 0x80, 0x3F, /* Y=-1.0 */ 0x00, 0x00, 0x80, 0xBF, /* Z=1.0 */ 0x00, 0x00, 0x80, 0x3F, /* W=-1.0 */ 0x00, 0x00, 0x80, 0xBF }, {} }; -#endif - - for (size_t i = 0; i < std::size(vector); i++) { - Callable::CallError err; - Variant v_ret; - Variant v_vector = vector[i]; - v_vector.callp(""to_byte_array"", nullptr, 0, v_ret, err); - CHECK(v_ret.get_type() == Variant::PACKED_BYTE_ARRAY); - CHECK(v_ret.operator PackedByteArray() == out[i]); - } - } -} - TEST_CASE(""[Vector] To byte array"") { Vector vector; vector.push_back(0); ",godot,godotengine,C++,C++,94776.0,21828.0,Godot Engine – Multi-platform 2D and 3D game engine,godotengine_godot,NEW_FEAT,Obvious 1d6bcd21a273e0f11e27332d75d446930d235865,2023-05-27 15:52:08,Marcel Pociot,Consistently rename config and headers to 'NativePHP',False,37,37,74,"--- README.md @@ -18,14 +18,14 @@ composer require nativephp/laravel You can publish and run the migrations with: ```bash -php artisan vendor:publish --tag=""nativephp-migrations"" +php artisan vendor:publish --tag=""native-php-migrations"" php artisan migrate ``` You can publish the native app provider using ```bash -php artisan vendor:publish --tag=""nativephp-provider"" +php artisan vendor:publish --tag=""native-php-provider"" ``` ## Testing --- src/Client/Client.php @@ -13,10 +13,10 @@ class Client public function __construct() { $this->client = Http::asJson() - ->baseUrl(config('nativephp.api_url', '')) + ->baseUrl(config('native-php.api_url', '')) ->timeout(60 * 60) ->withHeaders([ - 'X-NativePHP-Secret' => config('nativephp.secret'), + 'X-Native-PHP-Secret' => config('native-php.secret'), ]) ->asJson(); } --- src/Commands/LoadStartupConfigurationCommand.php @@ -11,6 +11,6 @@ class LoadStartupConfigurationCommand extends Command public function handle() { - echo json_encode(config('nativephp')); + echo json_encode(config('native-php')); } } --- src/Http/Controllers/NativeAppBootedController.php @@ -9,7 +9,7 @@ class NativeAppBootedController { public function __invoke(Request $request) { - $provider = app(config('nativephp.provider')); + $provider = app(config('native-php.provider')); $provider->boot(); event(new ApplicationBooted()); --- src/Http/Middleware/PreventRegularBrowserAccess.php @@ -10,13 +10,13 @@ class PreventRegularBrowserAccess public function handle(Request $request, Closure $next) { $cookie = $request->cookie('_php_native'); - $header = $request->header('X-NativePHP-Secret'); + $header = $request->header('X-Native-PHP-Secret'); - if ($cookie && $cookie === config('nativephp.secret')) { + if ($cookie && $cookie === config('native-php.secret')) { return $next($request); } - if ($header && $header === config('nativephp.secret')) { + if ($header && $header === config('native-php.secret')) { return $next($request); } --- src/NativeServiceProvider.php @@ -23,7 +23,7 @@ class NativeServiceProvider extends PackageServiceProvider public function configurePackage(Package $package): void { $package - ->name('nativephp') + ->name('native-php') ->hasCommands([ MinifyApplicationCommand::class, LoadStartupConfigurationCommand::class, @@ -39,7 +39,7 @@ class NativeServiceProvider extends PackageServiceProvider ServeCommand::$passthroughVariables[] = $env; } - if (config('nativephp.running')) { + if (config('native-php.running')) { $this->configureApp(); } } @@ -48,14 +48,14 @@ class NativeServiceProvider extends PackageServiceProvider { $oldStoragePath = $this->app->storagePath(); - $this->app->useStoragePath(config('nativephp.storage_path')); + $this->app->useStoragePath(config('native-php.storage_path')); // Patch all config values that contain the old storage path $config = Arr::dot(config()->all()); foreach ($config as $key => $value) { if (is_string($value) && str_contains($value, $oldStoragePath)) { - $newValue = str_replace($oldStoragePath, config('nativephp.storage_path'), $value); + $newValue = str_replace($oldStoragePath, config('native-php.storage_path'), $value); config([$key => $newValue]); } } @@ -63,7 +63,7 @@ class NativeServiceProvider extends PackageServiceProvider config(['database.connections.nativephp' => [ 'driver' => 'sqlite', 'url' => env('DATABASE_URL'), - 'database' => config('nativephp.database_path'), + 'database' => config('native-php.database_path'), 'prefix' => '', 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), ]]); ",laravel,nativephp,PHP,PHP,3498.0,182.0,Laravel wrapper for the NativePHP framework,nativephp_laravel,CODE_IMPROVEMENT,Obvious 0677c6f9654dbe871bee5a05d8321815c76b88e4,2024-01-06 17:33:41,EpicSprout,Update README.md fixed non working link for click,False,1,1,2,"--- README.md @@ -269,7 +269,7 @@ Inspired by [awesome-php](https://github.com/ziadoz/awesome-php). * Command-line Application Development * [cement](http://builtoncement.com/) - CLI Application Framework for Python. - * [click](https://click.palletsprojects.com/en/8.1.x/) - A package for creating beautiful command line interfaces in a composable way. + * [click](http://click.pocoo.org/dev/) - A package for creating beautiful command line interfaces in a composable way. * [cliff](https://docs.openstack.org/developer/cliff/) - A framework for creating command-line programs with multi-level commands. * [docopt](http://docopt.org/) - Pythonic command line arguments parser. * [python-fire](https://github.com/google/python-fire) - A library for creating command line interfaces from absolutely any Python object. ",awesome-python,vinta,Python,Python,236071.0,25368.0,"An opinionated list of awesome Python frameworks, libraries, software and resources.",vinta_awesome-python,DOC_CHANGE,changes in readme a4ec8ec591138ccbfcc5521ae1e9b9a7c211f4d8,2023-12-05 01:55:08,Lonny Wong,"Fix Control+Space not sent to program running in terminal (#16298) Converts null byte to specific input event, so that it's properly delivered to the program running in the terminal. Closes #15939 (cherry picked from commit 8747a39a07dd601141a2ce2ee6eb076a8a5599b6) Service-Card-Id: 91201444 Service-Version: 1.19",False,11,0,11,"--- src/host/inputBuffer.cpp @@ -830,17 +830,6 @@ void InputBuffer::_HandleTerminalInputCallback(const TerminalInput::StringType& for (const auto& wch : text) { - if (wch == UNICODE_NULL) - { - // Convert null byte back to input event with proper control state - const auto zeroKey = OneCoreSafeVkKeyScanW(0); - uint32_t ctrlState = 0; - WI_SetFlagIf(ctrlState, SHIFT_PRESSED, WI_IsFlagSet(zeroKey, 0x100)); - WI_SetFlagIf(ctrlState, LEFT_CTRL_PRESSED, WI_IsFlagSet(zeroKey, 0x200)); - WI_SetFlagIf(ctrlState, LEFT_ALT_PRESSED, WI_IsFlagSet(zeroKey, 0x400)); - _storage.push_back(SynthesizeKeyEvent(true, 1, LOBYTE(zeroKey), 0, wch, ctrlState)); - continue; - } _storage.push_back(SynthesizeKeyEvent(true, 1, 0, 0, wch, 0)); } ",terminal,microsoft,C++,C++,97273.0,8477.0,"The new Windows Terminal and the original Windows console host, all in the same place!",microsoft_terminal,BUG_FIX,obvious f0faeaed25b47a91b36e6637121f80559e8c3ccb,,Graydon Hoare,Yeah. Not even a semantic mix-up: just a damn typo.,False,1,1,0,"--- trans.ml @@ -2720,7 +2720,7 @@ let trans_visitor (curr_iso:Ast.ty_iso option) : unit = match slot.Ast.slot_mode with - Ast.MODE_alias + Ast.MODE_alias -> () (* Aliases are always free to drop. *) | Ast.MODE_local -> drop_ty ty_params cell (slot_ty slot) curr_iso",rust-lang_rust.json,,,,,,,rust-lang_rust.json,CONFIG_CHANGE,"5, obvious" 032a7c6504fe30c28668f11af8800b957e7390ee,2022-11-11 02:34:37,Nikolay Dubina,Update README.md (#4596),False,1,0,1,"--- README.md @@ -1975,7 +1975,6 @@ _Unofficial libraries for package and dependency management._ ## Performance -- [go-instrument](https://github.com/nikolaydubina/go-instrument) - Automatically add spans to all methods and functions. - [jaeger](https://github.com/jaegertracing/jaeger) - A distributed tracing system. - [pixie](https://github.com/pixie-labs/pixie) - No instrumentation tracing for Golang applications via eBPF. - [profile](https://github.com/pkg/profile) - Simple profiling support package for Go. ",awesome-go,avelino,Go,Go,139192.0,12134.0,"A curated list of awesome Go frameworks, libraries and software",avelino_awesome-go,DOC_CHANGE,changes in readme f51b4cf8ea9ec0c27daa05dfd65ae3db16be442d,2024-02-29 01:15:25,Ben Pasquariello,Delete funexamples/txt,False,0,1,1,"--- funexamples/txt @@ -0,0 +1 @@ + ",awesome-matlab-students,mathworks,MATLAB,MATLAB,393.0,42.0,"An awesome list of helpful resources for students learning MATLAB & Simulink. List includes tips & tricks, tutorials, videos, cheat sheets, and opportunities to learn MATLAB & Simulink.",mathworks_awesome-matlab-students,CODE_IMPROVEMENT,Obvious 60629378adabd798eec84c77e56445b1a415a222,2023-10-09 07:13:35,Libin YANG,chore: update workflow auto deploy gitee pages using https://github.com/yanglbme/gitee-pages-action,False,7,7,14,"--- .github/workflows/sync.yml @@ -17,10 +17,10 @@ jobs: source-repo: git@github.com:doocs/advanced-java.git destination-repo: git@gitee.com:Doocs/advanced-java.git - - name: Build Gitee Pages - uses: yanglbme/gitee-pages-action@main - with: - gitee-username: yanglbme - gitee-password: ${{ secrets.GITEE_PASSWORD }} - gitee-repo: doocs/advanced-java - branch: main + # - name: Build Gitee Pages + # uses: yanglbme/gitee-pages-action@main + # with: + # gitee-username: yanglbme + # gitee-password: ${{ secrets.GITEE_PASSWORD }} + # gitee-repo: doocs/advanced-java + # branch: main ",advanced-java,doocs,Java,Java,77149.0,19158.0,😮 Core Interview Questions & Answers For Experienced Java(Backend) Developers | 互联网 Java 工程师进阶知识完全扫盲:涵盖高并发、分布式、高可用、微服务、海量数据处理等领域知识,doocs_advanced-java,CONFIG_CHANGE,yml file updated 5c1f7c248e130352258fa51e923eafb72e26176a,2025-01-24 16:49:18,Ruifeng Zheng,[SPARK-50934][ML][PYTHON][CONNECT] Support CountVectorizer and OneHotEncoder on Connect ### What changes were proposed in this pull request? Support CountVectorizer and OneHotEncoder on Connect ### Why are the changes needed? for feature parity ### Does this PR introduce _any_ user-facing change? yes ### How was this patch tested? added tests ### Was this patch authored or co-authored using generative AI tooling? no Closes #49647 from zhengruifeng/ml_connect_cv. Authored-by: Ruifeng Zheng Signed-off-by: Ruifeng Zheng ,False,70,1,71,"--- mllib/src/main/resources/META-INF/services/org.apache.spark.ml.Estimator @@ -58,6 +58,3 @@ org.apache.spark.ml.feature.VarianceThresholdSelector org.apache.spark.ml.feature.StringIndexer org.apache.spark.ml.feature.PCA org.apache.spark.ml.feature.Word2Vec -org.apache.spark.ml.feature.CountVectorizer -org.apache.spark.ml.feature.OneHotEncoder - --- mllib/src/main/resources/META-INF/services/org.apache.spark.ml.Transformer @@ -63,6 +63,3 @@ org.apache.spark.ml.feature.VarianceThresholdSelectorModel org.apache.spark.ml.feature.StringIndexerModel org.apache.spark.ml.feature.PCAModel org.apache.spark.ml.feature.Word2VecModel -org.apache.spark.ml.feature.CountVectorizerModel -org.apache.spark.ml.feature.OneHotEncoderModel - --- mllib/src/main/scala/org/apache/spark/ml/feature/CountVectorizer.scala @@ -277,8 +277,6 @@ class CountVectorizerModel( import CountVectorizerModel._ - private[ml] def this() = this(Identifiable.randomUID(""cntVecModel""), Array.empty) - @Since(""1.5.0"") def this(vocabulary: Array[String]) = { this(Identifiable.randomUID(""cntVecModel""), vocabulary) --- mllib/src/main/scala/org/apache/spark/ml/feature/OneHotEncoder.scala @@ -234,8 +234,6 @@ class OneHotEncoderModel private[ml] ( import OneHotEncoderModel._ - private[ml] def this() = this(Identifiable.randomUID(""oneHotEncoder)""), Array.emptyIntArray) - // Returns the category size for each index with `dropLast` and `handleInvalid` // taken into account. private def getConfigedCategorySizes: Array[Int] = { --- python/pyspark/ml/tests/test_feature.py @@ -28,8 +28,6 @@ from pyspark.ml.feature import ( Bucketizer, CountVectorizer, CountVectorizerModel, - OneHotEncoder, - OneHotEncoderModel, HashingTF, IDF, NGram, @@ -538,61 +536,6 @@ class FeatureTestsMixin: model2 = Word2VecModel.load(d) self.assertEqual(str(model), str(model2)) - def test_count_vectorizer(self): - df = self.spark.createDataFrame( - [(0, [""a"", ""b"", ""c""]), (1, [""a"", ""b"", ""b"", ""c"", ""a""])], - [""label"", ""raw""], - ) - - cv = CountVectorizer() - cv.setInputCol(""raw"") - cv.setOutputCol(""vectors"") - self.assertEqual(cv.getInputCol(), ""raw"") - self.assertEqual(cv.getOutputCol(), ""vectors"") - - model = cv.fit(df) - self.assertEqual(sorted(model.vocabulary), [""a"", ""b"", ""c""]) - - output = model.transform(df) - self.assertEqual(output.columns, [""label"", ""raw"", ""vectors""]) - self.assertEqual(output.count(), 2) - - # save & load - with tempfile.TemporaryDirectory(prefix=""count_vectorizer"") as d: - cv.write().overwrite().save(d) - cv2 = CountVectorizer.load(d) - self.assertEqual(str(cv), str(cv2)) - - model.write().overwrite().save(d) - model2 = CountVectorizerModel.load(d) - self.assertEqual(str(model), str(model2)) - - def test_one_hot_encoder(self): - df = self.spark.createDataFrame([(0.0,), (1.0,), (2.0,)], [""input""]) - - encoder = OneHotEncoder() - encoder.setInputCols([""input""]) - encoder.setOutputCols([""output""]) - self.assertEqual(encoder.getInputCols(), [""input""]) - self.assertEqual(encoder.getOutputCols(), [""output""]) - - model = encoder.fit(df) - self.assertEqual(model.categorySizes, [3]) - - output = model.transform(df) - self.assertEqual(output.columns, [""input"", ""output""]) - self.assertEqual(output.count(), 3) - - # save & load - with tempfile.TemporaryDirectory(prefix=""count_vectorizer"") as d: - encoder.write().overwrite().save(d) - encoder2 = OneHotEncoder.load(d) - self.assertEqual(str(encoder), str(encoder2)) - - model.write().overwrite().save(d) - model2 = OneHotEncoderModel.load(d) - self.assertEqual(str(model), str(model2)) - def test_tokenizer(self): df = self.spark.createDataFrame([(""a b c"",)], [""text""]) --- sql/connect/server/src/main/scala/org/apache/spark/sql/connect/ml/MLUtils.scala @@ -589,9 +589,7 @@ private[ml] object MLUtils { (classOf[UnivariateFeatureSelectorModel], Set(""selectedFeatures"")), (classOf[VarianceThresholdSelectorModel], Set(""selectedFeatures"")), (classOf[PCAModel], Set(""pc"", ""explainedVariance"")), - (classOf[Word2VecModel], Set(""getVectors"", ""findSynonyms"", ""findSynonymsArray"")), - (classOf[CountVectorizerModel], Set(""vocabulary"")), - (classOf[OneHotEncoderModel], Set(""categorySizes""))) + (classOf[Word2VecModel], Set(""getVectors"", ""findSynonyms"", ""findSynonymsArray""))) private def validate(obj: Any, method: String): Unit = { assert(obj != null) ",apache-spark,,Scala,Scala,,,Apache Spark - A unified analytics engine for large-scale data processing,_apache-spark,NEW_FEAT,Introduce a new functionality 2975939cfb3fa4948d6a6b4a67e1ae874081c6e5,,Jeremy Wadsack,Do not check for interactive session to shut down dev server (#8845),False,1,1,0,"--- start.js @@ -165,7 +165,7 @@ checkBrowsers(paths.appPath, isInteractive) }); }); - if (isInteractive || process.env.CI !== 'true') { + if (process.env.CI !== 'true') { // Gracefully exit when stdin ends process.stdin.on('end', function() { devServer.close();",facebook_create-react-app.json,,,,,,,facebook_create-react-app.json,BUG_FIX,"4, probably some issue with shutting down dev server earlier" d90f35831121aef79627f47e64c0737660a0df74,,Jason Mustafa,contents(algo): fix typo in matrix cheat sheet (#273),False,1,1,0,"--- matrix.md @@ -40,7 +40,7 @@ For questions involving traversal or dynamic programming, you almost always want This can be done easily in Python in one line. ```py -# Assumes that the matrix is is non-empty +# Assumes that the matrix is non-empty zero_matrix = [[0 for _ in range(len(matrix[0]))] for _ in range(len(matrix))] ```",yangshun_tech-interview-handbook.json,,,,,,,yangshun_tech-interview-handbook.json,CONFIG_CHANGE,"5, obvious" 889a0ef399cee02a6d7cdee7a38ac60483786d11,2025-03-24 20:01:50,Edward Hsing,remove issue template,False,0,36,36,"--- .github/ISSUE_TEMPLATE/github-donate-kyc.md @@ -0,0 +1,12 @@ +--- +name: GitHub Donate KYC +about: Describe this issue template's purpose here. +title: Request GitHub Donate KYC- +labels: '' +assignees: '' + +--- + +Donation amount: + +Make sure the title format is ""Request GitHub Donate KYC-YOUR_USERNAME"", After that, you can submit your request! You may also attach a screenshot of the donation receipt, thank you! --- .github/ISSUE_TEMPLATE/github-kyc.md @@ -0,0 +1,24 @@ +--- +name: GitHub KYC +about: GitHub KYC Template +title: '' +labels: '' +assignees: '' + +--- + +### KYC Using Your GitHub Account + +Please make sure your GitHub account meets the following requirements (all are required): + +- [ ] The issue title **must** be: Request GitHub KYC - Your US.KG Panel registered username. This ensures our automated script can detect your registered username. (For example, your title should be: **Request GitHub KYC-example**) +- [ ] This is not a new GitHub account; it has existing repositories and stars. (New registered GitHub accounts are not accepted) +- [ ] This is my first DigitalPlat FreeDomain account. +- [ ] I promise not to use the domain name for criminal or abusive purposes. + +**Your Account Details (US.KG NIC Panel):** + +Please fill out the following information; otherwise, your request will not be processed: + +- Username: +- Reason for Registering the .US.KG Domain Name (Why): ",freedomain,digitalplatdev,HTML,HTML,41142.0,933.0,DigitalPlat FreeDomain: Free Domain For Everyone,digitalplatdev_freedomain,DOC_CHANGE,Obvious 9a769630d7a2e3d3413527d1d8ca21612b86175a,,emmanuel-ferdman,[readme] fix typo in resolv.conf filename Signed-off-by: emmanuel-ferdman <35470921+emmanuel-ferdman@users.noreply.github.com>,False,1,1,0,"--- README.md @@ -1020,7 +1020,7 @@ This could simply be solved by running this in your root directory: sudo chattr +i /etc/resolv.conf ``` -This deletes your `resolve.conf` file thats automatically generated when u run WSL, creates a new file and puts `nameserver 8.8.8.8`, then creates a `wsl.conf` file and adds `[network]` and `generateResolveConf = false` to prevent auto generation of that file. +This deletes your `resolv.conf` file thats automatically generated when u run WSL, creates a new file and puts `nameserver 8.8.8.8`, then creates a `wsl.conf` file and adds `[network]` and `generateResolveConf = false` to prevent auto generation of that file. You can check the contents of the file by running:",nvm-sh_nvm.json,,,,,,,nvm-sh_nvm.json,CONFIG_CHANGE,"4, typo fix" e512cb6862506d5d6ea93e0dd59cc36cfea8bd31,2022-03-25 17:38:26,Jose Alcérreca,Adds ATD to non-GMD runs,False,10,0,10,"--- .github/workflows/blueprints.yaml @@ -164,16 +164,6 @@ jobs: disable-animations: true script: ./gradlew app:cMDAT --stacktrace - - name: Run instrumentation tests API 30 ATD - uses: reactivecircus/android-emulator-runner@v2 - with: - api-level: 30 - arch: x86 - channel: canary - target: aosp_atd - disable-animations: true - script: ./gradlew app:cMDAT --stacktrace - - name: Upload build reports if: always() uses: actions/upload-artifact@v2 ",architecture-samples,android,Kotlin,Kotlin,44806.0,11701.0,A collection of samples to discuss and showcase different architectural tools and patterns for Android apps.,android_architecture-samples,CONFIG_CHANGE,changes in yaml file 24d30cc9bc6158fbc14e3ed31786d2e1e2dff60c,2022-03-24 23:14:26,Jose Alcérreca,Proper setup of GMD devices (no atd <30),False,4,4,8,"--- app/build.gradle @@ -121,16 +121,16 @@ android { systemImageSource = ""aosp"" abi = ""x86"" } - pixel2api27(com.android.build.api.dsl.ManagedVirtualDevice) { + pixel2api27atd(com.android.build.api.dsl.ManagedVirtualDevice) { device = ""Pixel 2"" apiLevel = 27 - systemImageSource = ""aosp"" + systemImageSource = ""aosp-atd"" abi = ""x86"" } - nexus9api29(com.android.build.api.dsl.ManagedVirtualDevice) { + nexus9api29atd(com.android.build.api.dsl.ManagedVirtualDevice) { device = ""Nexus 9"" apiLevel = 29 - systemImageSource = ""aosp"" + systemImageSource = ""aosp-atd"" abi = ""x86"" } } ",architecture-samples,android,Kotlin,Kotlin,44806.0,11701.0,A collection of samples to discuss and showcase different architectural tools and patterns for Android apps.,android_architecture-samples,CONFIG_CHANGE,Obvious e161b2a5164369a8168df422568552fb0643110f,2022-11-14 02:34:17,Anand,Update latency vs throughput blog link (#716),False,1,1,2,"--- README.md @@ -433,7 +433,7 @@ Generally, you should aim for **maximal throughput** with **acceptable latency** ### Source(s) and further reading -* [Understanding latency vs throughput](https://community.cadence.com/cadence_blogs_8/b/fv/posts/understanding-latency-vs-throughput) +* [Understanding latency vs throughput](https://community.cadence.com/cadence_blogs_8/b/sd/archive/2010/09/13/understanding-latency-vs-throughput) ## Availability vs consistency ",system-design-primer,donnemartin,Python,Python,290909.0,48355.0,Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.,donnemartin_system-design-primer,CODE_IMPROVEMENT,Refactoring the system design primer to improve readability 407ab8768c1c08bc2a9b4df384c4e2a5e9539d37,2025-03-24 16:53:32,lawnjelly,"Physics Interpolation - Fix project setting tooltip Corrects a confusing documentation which refers to physics objects, whereas FTI applies to all rendered objects.",False,5,3,8,"--- doc/classes/ProjectSettings.xml @@ -2383,10 +2383,9 @@ [b]Note:[/b] This property is only read when the project starts. To change the maximum number of simulated physics steps per frame at runtime, set [member Engine.max_physics_steps_per_frame] instead. - If [code]true[/code], the renderer will interpolate the transforms of objects (both physics and non-physics) between the last two transforms, so that smooth motion is seen even when physics ticks do not coincide with rendered frames. See also [method Node.reset_physics_interpolation]. - [b]Note:[/b] Although this is a global setting, finer control of individual branches of the [SceneTree] is possible using [member Node.physics_interpolation_mode]. + If [code]true[/code], the renderer will interpolate the transforms of physics objects between the last two transforms, so that smooth motion is seen even when physics ticks do not coincide with rendered frames. See also [member Node.physics_interpolation_mode] and [method Node.reset_physics_interpolation]. + [b]Note:[/b] If [code]true[/code], the physics jitter fix should be disabled by setting [member physics/common/physics_jitter_fix] to [code]0.0[/code]. [b]Note:[/b] This property is only read when the project starts. To toggle physics interpolation at runtime, set [member SceneTree.physics_interpolation] instead. - [b]Note:[/b] Property [member physics/common/physics_jitter_fix] is automatically disabled if [member physics/common/physics_interpolation] is set to [code]true[/code], as the two methods are incompatible. Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of in-game clock and real clock, but allows smoothing out framerate jitters. The default value of 0.5 should be good enough for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended. --- doc/classes/SceneTree.xml @@ -266,9 +266,8 @@ - Depending on each node's [member Node.process_mode], their [method Node._process], [method Node._physics_process] and [method Node._input] callback methods may not called anymore. - If [code]true[/code], the renderer will interpolate the transforms of objects (both physics and non-physics) between the last two transforms, so that smooth motion is seen even when physics ticks do not coincide with rendered frames. + If [code]true[/code], the renderer will interpolate the transforms of physics objects between the last two transforms, so that smooth motion is seen even when physics ticks do not coincide with rendered frames. The default value of this property is controlled by [member ProjectSettings.physics/common/physics_interpolation]. - [b]Note:[/b] Although this is a global setting, finer control of individual branches of the [SceneTree] is possible using [member Node.physics_interpolation_mode]. If [code]true[/code], the application quits automatically when navigating back (e.g. using the system ""Back"" button on Android). ",godot,godotengine,C++,C++,94776.0,21828.0,Godot Engine – Multi-platform 2D and 3D game engine,godotengine_godot,BUG_FIX,Code change: fix keyword in code 6054b760883ad4efb9c884a5941dc946330c62dc,2023-02-20 10:22:24,Luís Miranda,add paid ebook let's-go-further (#4742),False,1,0,1,"--- README.md @@ -3252,7 +3252,6 @@ _Where to discover new Go libraries._ - [Go Faster](https://leanpub.com/gofaster) - This book seeks to shorten your learning curve and help you become a proficient Go programmer, faster. - [Know Go: Generics](https://bitfieldconsulting.com/books/generics) - A guide to understanding and using generics in Go. - [Lets-Go](https://lets-go.alexedwards.net) - A step-by-step guide to creating fast, secure and maintanable web applications with Go. -- [Lets-Go-Further](https://lets-go-further.alexedwards.net) - Advanced patterns for building APIs and web applications in Go. - [The Power of Go: Tests](https://bitfieldconsulting.com/books/tests) - A guide to testing in Go. - [The Power of Go: Tools](https://bitfieldconsulting.com/books/tools) - A guide to writing command-line tools in Go. - [Writing A Compiler In Go](https://compilerbook.com) ",awesome-go,avelino,Go,Go,139192.0,12134.0,"A curated list of awesome Go frameworks, libraries and software",avelino_awesome-go,DOC_CHANGE,changes in readme c40b46ff63d1af2d32e6457dcb4a70d157648db2,,Chris Tessum,Rename deetection_inference.py to detection_inference.py (#6199) This file was inadvertantly renamed in #6071.,False,0,0,0,--- detection_inference.py,tensorflow_models.json,,,,,,,tensorflow_models.json,CONFIG_CHANGE,"4, just a name change" 6b18311bbc94864af48d10aad73fd4eb7ea0d9a1,2025-03-18 23:52:30,Michael Matloob,cmd/go/internal/clean: add logging to help debug openbsd flakes This change adds extra logging in the case where there's an error removing all the files in the gomodcache using modfetch.RemoveAll. It logs the names of the files found in GOMODCACHE as well as their modes. The modes are included because they should all be writable by the time we call robustio.RemoveAll. For #68087 Change-Id: Id9ae68bf6a3392baf88ec002d08fed1faf525927 Reviewed-on: https://go-review.googlesource.com/c/go/+/658816 Reviewed-by: Alan Donovan LUCI-TryBot-Result: Go LUCI Auto-Submit: Michael Matloob ,False,34,0,34,"--- src/cmd/go/internal/clean/clean.go @@ -7,10 +7,8 @@ package clean import ( ""context"" - ""errors"" ""fmt"" ""io"" - ""io/fs"" ""os"" ""path/filepath"" ""runtime"" @@ -218,15 +216,6 @@ func runClean(ctx context.Context, cmd *base.Command, args []string) { if !cfg.BuildN { if err := modfetch.RemoveAll(cfg.GOMODCACHE); err != nil { base.Error(err) - - // Add extra logging for the purposes of debugging #68087. - // We're getting ENOTEMPTY errors on openbsd from RemoveAll. - // Check for os.ErrExist, which can match syscall.ENOTEMPTY - // and syscall.EEXIST, because syscall.ENOTEMPTY is not defined - // on all platforms. - if runtime.GOOS == ""openbsd"" && errors.Is(err, fs.ErrExist) { - logFilesInGOMODCACHE() - } } } } @@ -239,29 +228,6 @@ func runClean(ctx context.Context, cmd *base.Command, args []string) { } } -// logFilesInGOMODCACHE reports the file names and modes for the files in GOMODCACHE using base.Error. -func logFilesInGOMODCACHE() { - var found []string - werr := filepath.WalkDir(cfg.GOMODCACHE, func(path string, d fs.DirEntry, err error) error { - if err != nil { - return err - } - var mode string - info, err := d.Info() - if err == nil { - mode = info.Mode().String() - } else { - mode = fmt.Sprintf("""", info.Mode()) - } - found = append(found, fmt.Sprintf(""%s (mode: %s)"", path, mode)) - return nil - }) - if werr != nil { - base.Errorf(""walking files in GOMODCACHE (for debugging go.dev/issue/68087): %v"", werr) - } - base.Errorf(""files in GOMODCACHE (for debugging go.dev/issue/68087):\n%s"", strings.Join(found, ""\n"")) -} - var cleaned = map[*load.Package]bool{} // TODO: These are dregs left by Makefile-based builds. ",go,golang,Go,Go,126191.0,17926.0,The Go programming language,golang_go,BUG_FIX,Code change: bug removal cdf3480f4a15ee622c20d1e850d057f1cefefec8,2022-09-17 10:33:00,Collider LI,Plugin: remove temp variable `iinaObject`,False,3,3,6,"--- iina/JavascriptPluginInstance.swift @@ -26,7 +26,7 @@ class JavascriptPluginInstance { return self.evaluateFile(requiredURL, asModule: true) } - apis = [ + let iinaObject = [ ""core"": JavascriptAPICore(context: ctx, pluginInstance: self), ""mpv"": JavascriptAPIMpv(context: ctx, pluginInstance: self), ""event"": JavascriptAPIEvent(context: ctx, pluginInstance: self), @@ -38,9 +38,9 @@ class JavascriptPluginInstance { ""utils"": JavascriptAPIUtils(context: ctx, pluginInstance: self), ""preferences"": JavascriptAPIPreferences(context: ctx, pluginInstance: self) ] - + apis = iinaObject ctx.setObject(JavascriptAPIRequire, forKeyedSubscript: ""require"" as NSString) - ctx.setObject(apis, forKeyedSubscript: ""iina"" as NSString) + ctx.setObject(iinaObject, forKeyedSubscript: ""iina"" as NSString) apis!.values.forEach { $0.extraSetup() } return ctx ",iina,iina,Swift,Swift,39591.0,2605.0,The modern video player for macOS.,iina_iina,CONFIG_CHANGE,Very small changes 005e52d0b6f1a5bf9679789c5c4b90afd442d86b,2022-07-13 08:14:57,Evan You,fix(types): support Vue interface augmentations in defineComponent fix #12642,False,41,25,66,"--- types/test/augmentation-test.ts @@ -1,4 +1,4 @@ -import Vue, { defineComponent } from '../index' +import Vue from '../index' declare module '../vue' { // add instance property and method @@ -44,10 +44,3 @@ vm.$instanceMethod() Vue.staticProperty Vue.staticMethod() - -defineComponent({ - mounted() { - this.$instanceMethod - this.$instanceProperty - } -}) --- types/test/v3/define-component-test.tsx @@ -1143,7 +1143,6 @@ defineComponent({ // https://github.com/vuejs/vue/issues/12628#issuecomment-1177258223 defineComponent({ render(h) { - // vue 2 this.$listeners this.$on('foo', () => {}) this.$ssrContext --- types/v3-component-public-instance.d.ts @@ -5,7 +5,7 @@ import { } from './v3-generated' import { UnionToIntersection } from './common' -import { Vue, VueConstructor } from './vue' +import { Vue, Vue2Instance, VueConstructor } from './vue' import { ComputedOptions, MethodOptions, @@ -13,7 +13,8 @@ import { ComponentOptionsMixin, ComponentOptionsBase } from './v3-component-options' -import { EmitFn, EmitsOptions } from './v3-setup-context' +import { EmitFn, EmitsOptions, Slots } from './v3-setup-context' +import { VNode } from './vnode' /** * Custom properties added to component instances in any way and can be accessed through `this` @@ -172,19 +173,18 @@ interface Vue3Instance< Defaults, MakeDefaultsOptional, Options -> extends Vue< - D, - Readonly< - MakeDefaultsOptional extends true - ? Partial & Omit

- : P & PublicProps - >, - ComponentPublicInstance | null, - ComponentPublicInstance, - ComponentPublicInstance[], - Options & MergedComponentOptionsOverride, - EmitFn - > {} +> extends Vue2Instance { + $data: D + readonly $props: Readonly< + MakeDefaultsOptional extends true + ? Partial & Omit

+ : P & PublicProps + > + readonly $root: ComponentPublicInstance | null + readonly $parent: ComponentPublicInstance | null + readonly $emit: EmitFn + readonly $options: Options & MergedComponentOptionsOverride +} type MergedHook void> = T | T[] --- types/vue.d.ts @@ -35,25 +35,17 @@ export interface CreateElement { ): VNode } -export interface Vue< - Data = Record, - Props = Record, - Parent = never, - Root = never, - Children = never, - Options = never, - Emit = (event: string, ...args: any[]) => Vue -> { - // properties with different types in defineComponent() - readonly $data: Data - readonly $props: Props - readonly $parent: Parent extends never ? Vue : Parent - readonly $root: Root extends never ? Vue : Root - readonly $children: Children extends never ? Vue[] : Children +export interface Vue extends Vue2Instance { + readonly $data: Record + readonly $props: Record + readonly $parent: Vue + readonly $root: Vue + readonly $children: Vue[] readonly $options: ComponentOptions - $emit: Emit + $emit(event: string, ...args: any[]): this +} - // Vue 2 only or shared +export interface Vue2Instance { readonly $el: Element readonly $refs: { [key: string]: Vue | Element | (Vue | Element)[] | undefined ",vue,vuejs,TypeScript,TypeScript,208427.0,33725.0,"This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core",vuejs_vue,BUG_FIX,this commit fixes/polishes an earlier feature 730111b9cf99d5b27adfa6c688d7666df8146d60,,Jason Zaman,app-crypt/simple-tpm-pk11: RESTRICT test since it requires the TPM configured and doesnt build Package-Manager: portage-2.2.20.1,False,1,0,1,"--- simple-tpm-pk11-0.03.ebuild @@ -21,6 +21,7 @@ else fi IUSE="""" +RESTRICT=""test"" # needs to communicate with the TPM and gtest is all broken DEPEND=""app-crypt/tpm-tools[pkcs11] dev-libs/opencryptoki[tpm]",gentoo_gentoo.json,,,,,,,gentoo_gentoo.json,BUG_FIX,probably the test was failing because of the TPM configuration 966370c9080afa5fcf3b94617135a3306c1a76f4,2025-01-10 00:34:52,David Sherret,"refactor(npm): move `InNpmPackageChecker` code to deno_resolver (#27609) As title. Will allow consumers to create this struct and use our behaviour. Closes #27409",False,81,69,150,"--- cli/factory.rs @@ -12,8 +12,6 @@ use deno_core::futures::FutureExt; use deno_core::FeatureChecker; use deno_error::JsErrorBox; use deno_resolver::cjs::IsCjsResolutionMode; -use deno_resolver::npm::managed::ManagedInNpmPkgCheckerCreateOptions; -use deno_resolver::npm::CreateInNpmPkgCheckerOptions; use deno_resolver::npm::NpmReqResolverOptions; use deno_resolver::DenoResolverOptions; use deno_resolver::NodeAndNpmReqResolver; @@ -66,11 +64,14 @@ use crate::node::CliNodeCodeTranslator; use crate::node::CliNodeResolver; use crate::node::CliPackageJsonResolver; use crate::npm::create_cli_npm_resolver; +use crate::npm::create_in_npm_pkg_checker; use crate::npm::CliByonmNpmResolverCreateOptions; +use crate::npm::CliManagedInNpmPkgCheckerCreateOptions; use crate::npm::CliManagedNpmResolverCreateOptions; use crate::npm::CliNpmResolver; use crate::npm::CliNpmResolverCreateOptions; use crate::npm::CliNpmResolverManagedSnapshotOption; +use crate::npm::CreateInNpmPkgCheckerOptions; use crate::npm::NpmRegistryReadPermissionChecker; use crate::npm::NpmRegistryReadPermissionCheckerMode; use crate::resolver::CjsTracker; @@ -386,7 +387,7 @@ impl CliFactory { CreateInNpmPkgCheckerOptions::Byonm } else { CreateInNpmPkgCheckerOptions::Managed( - ManagedInNpmPkgCheckerCreateOptions { + CliManagedInNpmPkgCheckerCreateOptions { root_cache_dir_url: self.npm_cache_dir()?.root_dir_url(), maybe_node_modules_path: cli_options .node_modules_dir_path() @@ -394,7 +395,7 @@ impl CliFactory { }, ) }; - Ok(deno_resolver::npm::create_in_npm_pkg_checker(options)) + Ok(create_in_npm_pkg_checker(options)) }) } --- cli/lsp/resolver.rs @@ -23,8 +23,6 @@ use deno_graph::Range; use deno_npm::NpmSystemInfo; use deno_path_util::url_to_file_path; use deno_resolver::cjs::IsCjsResolutionMode; -use deno_resolver::npm::managed::ManagedInNpmPkgCheckerCreateOptions; -use deno_resolver::npm::CreateInNpmPkgCheckerOptions; use deno_resolver::npm::NpmReqResolverOptions; use deno_resolver::DenoResolverOptions; use deno_resolver::NodeAndNpmReqResolver; @@ -55,10 +53,12 @@ use crate::node::CliNodeResolver; use crate::node::CliPackageJsonResolver; use crate::npm::create_cli_npm_resolver_for_lsp; use crate::npm::CliByonmNpmResolverCreateOptions; +use crate::npm::CliManagedInNpmPkgCheckerCreateOptions; use crate::npm::CliManagedNpmResolverCreateOptions; use crate::npm::CliNpmResolver; use crate::npm::CliNpmResolverCreateOptions; use crate::npm::CliNpmResolverManagedSnapshotOption; +use crate::npm::CreateInNpmPkgCheckerOptions; use crate::npm::ManagedCliNpmResolver; use crate::resolver::CliDenoResolver; use crate::resolver::CliNpmReqResolver; @@ -736,14 +736,14 @@ impl<'a> ResolverFactory<'a> { pub fn in_npm_pkg_checker(&self) -> &Arc { self.services.in_npm_pkg_checker.get_or_init(|| { - deno_resolver::npm::create_in_npm_pkg_checker( + crate::npm::create_in_npm_pkg_checker( match self.services.npm_resolver.as_ref().map(|r| r.as_inner()) { Some(crate::npm::InnerCliNpmResolverRef::Byonm(_)) | None => { CreateInNpmPkgCheckerOptions::Byonm } Some(crate::npm::InnerCliNpmResolverRef::Managed(m)) => { CreateInNpmPkgCheckerOptions::Managed( - ManagedInNpmPkgCheckerCreateOptions { + CliManagedInNpmPkgCheckerCreateOptions { root_cache_dir_url: m.global_cache_root_url(), maybe_node_modules_path: m.maybe_node_modules_path(), }, --- cli/npm/managed/mod.rs @@ -38,6 +38,7 @@ use installers::create_npm_fs_installer; use installers::NpmPackageFsInstaller; use node_resolver::errors::PackageFolderResolveError; use node_resolver::errors::PackageFolderResolveIoError; +use node_resolver::InNpmPackageChecker; use node_resolver::NpmPackageFolderResolver; use super::CliNpmCache; @@ -275,6 +276,35 @@ async fn snapshot_from_lockfile( Ok(snapshot) } +#[derive(Debug)] +struct ManagedInNpmPackageChecker { + root_dir: Url, +} + +impl InNpmPackageChecker for ManagedInNpmPackageChecker { + fn in_npm_package(&self, specifier: &Url) -> bool { + specifier.as_ref().starts_with(self.root_dir.as_str()) + } +} + +pub struct CliManagedInNpmPkgCheckerCreateOptions<'a> { + pub root_cache_dir_url: &'a Url, + pub maybe_node_modules_path: Option<&'a Path>, +} + +pub fn create_managed_in_npm_pkg_checker( + options: CliManagedInNpmPkgCheckerCreateOptions, +) -> Arc { + let root_dir = match options.maybe_node_modules_path { + Some(node_modules_folder) => { + deno_path_util::url_from_directory_path(node_modules_folder).unwrap() + } + None => options.root_cache_dir_url.clone(), + }; + debug_assert!(root_dir.as_str().ends_with('/')); + Arc::new(ManagedInNpmPackageChecker { root_dir }) +} + #[derive(Debug, Clone, PartialEq, Eq)] pub enum PackageCaching<'a> { Only(Cow<'a, [PackageReq]>), --- cli/npm/mod.rs @@ -14,6 +14,7 @@ use deno_core::url::Url; use deno_error::JsErrorBox; use deno_npm::npm_rc::ResolvedNpmRc; use deno_npm::registry::NpmPackageInfo; +use deno_resolver::npm::ByonmInNpmPackageChecker; use deno_resolver::npm::ByonmNpmResolver; use deno_resolver::npm::CliNpmReqResolver; use deno_resolver::npm::ResolvePkgFolderFromDenoReqError; @@ -22,10 +23,13 @@ use deno_semver::package::PackageNv; use deno_semver::package::PackageReq; use http::HeaderName; use http::HeaderValue; +use managed::create_managed_in_npm_pkg_checker; +use node_resolver::InNpmPackageChecker; use node_resolver::NpmPackageFolderResolver; pub use self::byonm::CliByonmNpmResolver; pub use self::byonm::CliByonmNpmResolverCreateOptions; +pub use self::managed::CliManagedInNpmPkgCheckerCreateOptions; pub use self::managed::CliManagedNpmResolverCreateOptions; pub use self::managed::CliNpmResolverManagedSnapshotOption; pub use self::managed::ManagedCliNpmResolver; @@ -130,6 +134,22 @@ pub async fn create_cli_npm_resolver( } } +pub enum CreateInNpmPkgCheckerOptions<'a> { + Managed(CliManagedInNpmPkgCheckerCreateOptions<'a>), + Byonm, +} + +pub fn create_in_npm_pkg_checker( + options: CreateInNpmPkgCheckerOptions, +) -> Arc { + match options { + CreateInNpmPkgCheckerOptions::Managed(options) => { + create_managed_in_npm_pkg_checker(options) + } + CreateInNpmPkgCheckerOptions::Byonm => Arc::new(ByonmInNpmPackageChecker), + } +} + pub enum InnerCliNpmResolverRef<'a> { Managed(&'a ManagedCliNpmResolver), #[allow(dead_code)] --- cli/standalone/mod.rs @@ -39,9 +39,6 @@ use deno_error::JsErrorBox; use deno_npm::npm_rc::ResolvedNpmRc; use deno_package_json::PackageJsonDepValue; use deno_resolver::cjs::IsCjsResolutionMode; -use deno_resolver::npm::create_in_npm_pkg_checker; -use deno_resolver::npm::managed::ManagedInNpmPkgCheckerCreateOptions; -use deno_resolver::npm::CreateInNpmPkgCheckerOptions; use deno_resolver::npm::NpmReqResolverOptions; use deno_runtime::deno_fs; use deno_runtime::deno_fs::FileSystem; @@ -84,11 +81,14 @@ use crate::node::CliNodeCodeTranslator; use crate::node::CliNodeResolver; use crate::node::CliPackageJsonResolver; use crate::npm::create_cli_npm_resolver; +use crate::npm::create_in_npm_pkg_checker; use crate::npm::CliByonmNpmResolverCreateOptions; +use crate::npm::CliManagedInNpmPkgCheckerCreateOptions; use crate::npm::CliManagedNpmResolverCreateOptions; use crate::npm::CliNpmResolver; use crate::npm::CliNpmResolverCreateOptions; use crate::npm::CliNpmResolverManagedSnapshotOption; +use crate::npm::CreateInNpmPkgCheckerOptions; use crate::npm::NpmRegistryReadPermissionChecker; use crate::npm::NpmRegistryReadPermissionCheckerMode; use crate::resolver::CjsTracker; @@ -738,7 +738,7 @@ pub async fn run( .map(|node_modules_dir| root_path.join(node_modules_dir)); let in_npm_pkg_checker = create_in_npm_pkg_checker(CreateInNpmPkgCheckerOptions::Managed( - ManagedInNpmPkgCheckerCreateOptions { + CliManagedInNpmPkgCheckerCreateOptions { root_cache_dir_url: npm_cache_dir.root_dir_url(), maybe_node_modules_path: maybe_node_modules_path.as_deref(), }, @@ -796,7 +796,7 @@ pub async fn run( )); let in_npm_pkg_checker = create_in_npm_pkg_checker(CreateInNpmPkgCheckerOptions::Managed( - ManagedInNpmPkgCheckerCreateOptions { + CliManagedInNpmPkgCheckerCreateOptions { root_cache_dir_url: npm_cache_dir.root_dir_url(), maybe_node_modules_path: None, }, --- resolvers/deno/Cargo.toml @@ -14,7 +14,7 @@ description = ""Deno resolution algorithm"" path = ""lib.rs"" [features] -sync = [""dashmap"", ""deno_package_json/sync"", ""node_resolver/sync""] +sync = [""dashmap""] [dependencies] anyhow.workspace = true @@ -27,10 +27,10 @@ deno_config.workspace = true deno_error.workspace = true deno_media_type.workspace = true deno_npm.workspace = true -deno_package_json.workspace = true +deno_package_json = { workspace = true, features = [""sync""] } deno_path_util.workspace = true deno_semver.workspace = true -node_resolver.workspace = true +node_resolver = { workspace = true, features = [""sync""] } parking_lot.workspace = true sys_traits.workspace = true thiserror.workspace = true --- resolvers/deno/npm/managed/common.rs @@ -9,9 +9,6 @@ use deno_npm::NpmPackageId; use node_resolver::errors::PackageFolderResolveError; use url::Url; -use crate::sync::MaybeSend; -use crate::sync::MaybeSync; - #[allow(clippy::disallowed_types)] pub(super) type NpmPackageFsResolverRc = crate::sync::MaybeArc; @@ -23,7 +20,7 @@ pub struct NpmPackageFsResolverPackageFolderError(deno_semver::StackString); /// Part of the resolution that interacts with the file system. #[async_trait(?Send)] -pub trait NpmPackageFsResolver: MaybeSend + MaybeSync { +pub trait NpmPackageFsResolver: Send + Sync { /// The local node_modules folder if it is applicable to the implementation. fn node_modules_path(&self) -> Option<&Path>; --- resolvers/deno/npm/managed/mod.rs @@ -5,13 +5,10 @@ mod global; mod local; mod resolution; -use std::path::Path; use std::path::PathBuf; -use node_resolver::InNpmPackageChecker; use sys_traits::FsCanonicalize; use sys_traits::FsMetadata; -use url::Url; pub use self::common::NpmPackageFsResolver; pub use self::common::NpmPackageFsResolverPackageFolderError; @@ -46,32 +43,3 @@ pub fn create_npm_fs_resolver< )), } } - -#[derive(Debug)] -pub struct ManagedInNpmPackageChecker { - root_dir: Url, -} - -impl InNpmPackageChecker for ManagedInNpmPackageChecker { - fn in_npm_package(&self, specifier: &Url) -> bool { - specifier.as_ref().starts_with(self.root_dir.as_str()) - } -} - -pub struct ManagedInNpmPkgCheckerCreateOptions<'a> { - pub root_cache_dir_url: &'a Url, - pub maybe_node_modules_path: Option<&'a Path>, -} - -pub fn create_managed_in_npm_pkg_checker( - options: ManagedInNpmPkgCheckerCreateOptions, -) -> ManagedInNpmPackageChecker { - let root_dir = match options.maybe_node_modules_path { - Some(node_modules_folder) => { - deno_path_util::url_from_directory_path(node_modules_folder).unwrap() - } - None => options.root_cache_dir_url.clone(), - }; - debug_assert!(root_dir.as_str().ends_with('/')); - ManagedInNpmPackageChecker { root_dir } -} --- resolvers/deno/npm/mod.rs @@ -34,32 +34,11 @@ pub use self::byonm::ByonmNpmResolverRc; pub use self::byonm::ByonmResolvePkgFolderFromDenoReqError; pub use self::local::get_package_folder_id_folder_name; pub use self::local::normalize_pkg_name_for_node_modules_deno_folder; -use self::managed::create_managed_in_npm_pkg_checker; -use self::managed::ManagedInNpmPkgCheckerCreateOptions; -use crate::sync::new_rc; -use crate::sync::MaybeSend; -use crate::sync::MaybeSync; mod byonm; mod local; pub mod managed; -pub enum CreateInNpmPkgCheckerOptions<'a> { - Managed(ManagedInNpmPkgCheckerCreateOptions<'a>), - Byonm, -} - -pub fn create_in_npm_pkg_checker( - options: CreateInNpmPkgCheckerOptions, -) -> InNpmPackageCheckerRc { - match options { - CreateInNpmPkgCheckerOptions::Managed(options) => { - new_rc(create_managed_in_npm_pkg_checker(options)) - } - CreateInNpmPkgCheckerOptions::Byonm => new_rc(ByonmInNpmPackageChecker), - } -} - #[derive(Debug, Error, JsError)] #[class(generic)] #[error(""Could not resolve \""{}\"", but found it in a package.json. Deno expects the node_modules/ directory to be up to date. Did you forget to run `deno install`?"", specifier)] @@ -120,7 +99,7 @@ pub type CliNpmReqResolverRc = crate::sync::MaybeArc; // todo(dsherret): a temporary trait until we extract // out the CLI npm resolver into here -pub trait CliNpmReqResolver: Debug + MaybeSend + MaybeSync { +pub trait CliNpmReqResolver: Debug + Send + Sync { fn resolve_pkg_folder_from_deno_module_req( &self, req: &PackageReq, --- resolvers/deno/sync.rs @@ -6,8 +6,6 @@ pub use inner::*; mod inner { #![allow(clippy::disallowed_types)] - pub use core::marker::Send as MaybeSend; - pub use core::marker::Sync as MaybeSync; pub use std::sync::Arc as MaybeArc; pub use dashmap::DashMap as MaybeDashMap; @@ -23,11 +21,6 @@ mod inner { use std::hash::RandomState; pub use std::rc::Rc as MaybeArc; - pub trait MaybeSync {} - impl MaybeSync for T where T: ?Sized {} - pub trait MaybeSend {} - impl MaybeSend for T where T: ?Sized {} - // Wrapper struct that exposes a subset of `DashMap` API. #[derive(Debug)] pub struct MaybeDashMap(RefCell>); ",deno,denoland,Rust,Rust,102021.0,5502.0,A modern runtime for JavaScript and TypeScript.,denoland_deno,BUG_FIX,Fixing a security vulnerability in Deno's HTTP server 0cb5254a4572e2267c7ca9237a942dbb61807686,2022-12-08 17:15:24,David Angulo,add specializing ruby paper (#700),False,3,0,3,"--- languages/Ruby/README.md @@ -1,3 +0,0 @@ -# Ruby - -* [SPECIALISING DYNAMIC TECHNIQUES FOR IMPLEMENTING THE RUBY PROGRAMMING LANGUAGE (2015)](https://chrisseaton.com/phd/specialising-ruby.pdf) by Chris Seaton ",papers-we-love,papers-we-love,Shell,Shell,91347.0,5859.0,Papers from the computer science community to read and discuss.,papers-we-love_papers-we-love,DOC_CHANGE,Obvious 28b5a5746b445cb8b81e523ca87b96e6fa32212b,2025-01-01 05:53:07,netdatabot,[ci skip] Update changelog and version for nightly build: v2.1.0-63-nightly.,False,6,6,12,"--- CHANGELOG.md @@ -6,11 +6,6 @@ **Merged pull requests:** -- Fix shutdown [\#19306](https://github.com/netdata/netdata/pull/19306) ([ktsaou](https://github.com/ktsaou)) -- WAITQ: fixed mixed up ordering [\#19305](https://github.com/netdata/netdata/pull/19305) ([ktsaou](https://github.com/ktsaou)) -- load rrdcontext dimensions in batches [\#19304](https://github.com/netdata/netdata/pull/19304) ([ktsaou](https://github.com/ktsaou)) -- improvement\(go.d/nats\): add cluster\_name label and jetstream status chart [\#19303](https://github.com/netdata/netdata/pull/19303) ([ilyam8](https://github.com/ilyam8)) -- Waiting Queue [\#19302](https://github.com/netdata/netdata/pull/19302) ([ktsaou](https://github.com/ktsaou)) - revert waiting-queue optimization [\#19301](https://github.com/netdata/netdata/pull/19301) ([ktsaou](https://github.com/ktsaou)) - Improve stream sending thread error message [\#19300](https://github.com/netdata/netdata/pull/19300) ([ilyam8](https://github.com/ilyam8)) - Streaming improvements No 12 [\#19299](https://github.com/netdata/netdata/pull/19299) ([ktsaou](https://github.com/ktsaou)) @@ -464,6 +459,11 @@ - Update metadata.yaml [\#18755](https://github.com/netdata/netdata/pull/18755) ([Ancairon](https://github.com/Ancairon)) - Remove the overview section from cloud notif. integrations [\#18754](https://github.com/netdata/netdata/pull/18754) ([Ancairon](https://github.com/Ancairon)) - Add Ubuntu 24.10 and Fedora 41 to CI. [\#18753](https://github.com/netdata/netdata/pull/18753) ([Ferroin](https://github.com/Ferroin)) +- Simplify sentence on cloud notification integrations [\#18750](https://github.com/netdata/netdata/pull/18750) ([Ancairon](https://github.com/Ancairon)) +- Regenerate integrations.js [\#18749](https://github.com/netdata/netdata/pull/18749) ([netdatabot](https://github.com/netdatabot)) +- fix\(freebsd.plugin\): fix sysctl arcstats.p fails on FreeBSD 14 [\#18748](https://github.com/netdata/netdata/pull/18748) ([ilyam8](https://github.com/ilyam8)) +- fix\(python.d.plugin\): fix plugin exit if no python found [\#18747](https://github.com/netdata/netdata/pull/18747) ([ilyam8](https://github.com/ilyam8)) +- Fix crash on agent initialization [\#18746](https://github.com/netdata/netdata/pull/18746) ([stelfrag](https://github.com/stelfrag)) ## [v1.47.5](https://github.com/netdata/netdata/tree/v1.47.5) (2024-10-24) --- packaging/version @@ -1 +1 @@ -v2.1.0-63-nightly +v2.1.0-57-nightly ",netdata,netdata,C,C,73681.0,6023.0,X-Ray Vision for your infrastructure!,netdata_netdata,DOC_CHANGE,changes in md file 3487fbf1a841f8820baa14a0bc4ca283324bf6e6,2025-03-19 23:02:33,Henning Dieterichs,Fixes https://github.com/microsoft/vscode-copilot/issues/14488 (#244025),False,31,0,31,"--- src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.ts @@ -129,31 +129,8 @@ export class InlineCompletionsModel extends Disposable { this._editor.pushUndoStop(); } })); - - this._didUndoInlineEdits.recomputeInitiallyAndOnChange(this._store); } - private _lastAcceptedInlineCompletionInfo: { textModelVersionIdAfter: number; /* already freed! */ inlineCompletion: InlineCompletionItem } | undefined = undefined; - private readonly _didUndoInlineEdits = derivedHandleChanges({ - owner: this, - createEmptyChangeSummary: () => ({ didUndo: false }), - handleChange: (ctx, changeSummary) => { - changeSummary.didUndo = ctx.didChange(this._textModelVersionId) && !!ctx.change?.isUndoing; - return true; - } - }, reader => { - const versionId = this._textModelVersionId.read(reader); - if (versionId !== null - && this._lastAcceptedInlineCompletionInfo - && this._lastAcceptedInlineCompletionInfo.textModelVersionIdAfter === versionId - 1 - && this._lastAcceptedInlineCompletionInfo.inlineCompletion.isInlineEdit - ) { - this._lastAcceptedInlineCompletionInfo = undefined; - return true; - } - return false; - }); - public debugGetSelectedSuggestItem(): IObservable { return this._selectedSuggestItem; } @@ -259,13 +236,6 @@ export class InlineCompletionsModel extends Disposable { return Promise.resolve(true); } - if (this._didUndoInlineEdits.read(reader)) { - transaction(tx => { - this._source.clear(tx); - }); - return undefined; - } - const context: InlineCompletionContext = { triggerKind: changeSummary.inlineCompletionTriggerKind, selectedSuggestionInfo: suggestItem?.toSelectedSuggestionInfo(), @@ -718,7 +688,6 @@ export class InlineCompletionsModel extends Disposable { } this._inAcceptFlow.set(true, undefined); - this._lastAcceptedInlineCompletionInfo = { textModelVersionIdAfter: this.textModel.getVersionId(), inlineCompletion: completion }; } public async acceptNextWord(editor: ICodeEditor): Promise { ",vscode,microsoft,TypeScript,TypeScript,168072.0,30802.0,Visual Studio Code,microsoft_vscode,BUG_FIX,obvious beea6f9c829928f472b1dc78e805314099bd5658,,Andrey Lushnikov,chore(testrunner): fix typo in readme,False,1,1,0,"--- README.md @@ -31,7 +31,7 @@ beforeAll(state => { describe('math', () => { it('to be sane', async (state, test) => { - state.parallel; // Very first test will always be ran by the 0's thread + state.parallelIndex; // Very first test will always be ran by the 0's thread state.foo; // this will be 'bar' expect(2 + 2).toBe(4); });",puppeteer_puppeteer.json,,,,,,,puppeteer_puppeteer.json,CONFIG_CHANGE,"5, only a typo fix" 9be4d2a904bade797b8c141daaeaadc6f1221aa4,2024-09-26 18:42:16,Jaida Wu,Redmi Note 14 Pro+: ❌ Blocked,False,11,6,17,"--- status.md @@ -7,8 +7,7 @@ - ✔️ Opening: Unlock channel available. Restrictions can be bypassed. - ❌ Blocked: Xiaomi has enforced verification. Unlocking is only possible with an authorized account. -- ⚠️ Unsupported: Xiaomi prohibits unlocking this device, regardless of permissions. -- ❓ Unknown: The unlock policy for this device could not be found in Xiaomi servers. Please refer to the actual situation. (Feedback required) +- ⚠️ Closed: Xiaomi prohibits unlocking this device, regardless of permissions. ---- @@ -35,7 +34,7 @@ | Xiaomi 14 | houji | 2023-10-26 | Xiaomi HyperOS | ❌ Blocked | | Xiaomi 14 Pro | shennong | 2023-10-26 | Xiaomi HyperOS | ❌ Blocked | | Xiaomi 14 Pro Ti Satellite | shennong | 2024-02-22 | Xiaomi HyperOS | ❌ Blocked | -| Xiaomi 14 Ultra | aurora | 2024-02-22 | Xiaomi HyperOS | ❓ Unknown | +| Xiaomi 14 Ultra | aurora | 2024-02-22 | Xiaomi HyperOS | ❌ Blocked | | Xiaomi MIX 4 | odin | 2021-08-10 | MIUI | ✔️ Opening | | Xiaomi MIX Fold | cetus | 2021-03-30 | MIUI Fold | ✔️ Opening | | Xiaomi MIX Fold 2 | zizhan | 2022-08-11 | MIUI Fold | ✔️ Opening | @@ -61,7 +60,6 @@ | Redmi Note 12R | sky | 2023-06-28 | MIUI | ✔️ Opening | | Redmi 13R | air | 2023-12-08 | MIUI | ✔️ Opening | | Redmi 13C | air | 2023-12-29 | MIUI | ✔️ Opening | -| Redmi 14R | flame | 2024-09-18 | Xiaomi HyperOS | ❓ Unknown | | Redmi Note 11R | light | 2022-09-29 | MIUI | ✔️ Opening | | Redmi Note 11E | light | 2022-03-01 | MIUI | ✔️ Opening | | Redmi Note 11E Pro | veux | 2022-03-01 | MIUI | ✔️ Opening | @@ -78,13 +76,10 @@ | Redmi Note 12 Turbo | marble | 2023-03-28 | MIUI | ✔️ Opening | | Redmi Note 12T Pro | pearl | 2023-05-30 | MIUI | ✔️ Opening | | Redmi Note 13R | breeze | 2024-05-30 | Xiaomi HyperOS | ❌ Blocked | -| Redmi Note 13 | gold | 2023-09-21 | MIUI | ⚠️ Unsupported | -| Redmi Note 13R Pro | gold | 2023-11-20 | MIUI | ⚠️ Unsupported | -| Redmi Note 13 Pro | garnet | 2023-09-21 | MIUI | ⚠️ Unsupported | -| Redmi Note 13 Pro+ | zircon | 2023-09-21 | MIUI | ⚠️ Unsupported | -| Redmi Note 14 | beryl | 2024-09-26 | Xiaomi HyperOS | ❓ Unknown | -| Redmi Note 14 Pro | malachite | 2024-09-26 | Xiaomi HyperOS | ❓ Unknown | -| Redmi Note 14 Pro+ | amethyst | 2024-09-26 | Xiaomi HyperOS | ❌ Blocked | +| Redmi Note 13 | gold | 2023-09-21 | MIUI | ⚠️ Closed | +| Redmi Note 13R Pro | gold | 2023-11-20 | MIUI | ⚠️ Closed | +| Redmi Note 13 Pro | garnet | 2023-09-21 | MIUI | ⚠️ Closed | +| Redmi Note 13 Pro+ | zircon | 2023-09-21 | MIUI | ⚠️ Closed | | Redmi Turbo 3 | peridot | 2024-04-10 | Xiaomi HyperOS | ❌ Blocked | | Redmi K40 Gaming | ares | 2021-04-27 | MIUI | ✔️ Opening | | Redmi K40 | alioth | 2021-02-25 | MIUI | ✔️ Opening | ",xiaomi-hyperos-bootloader-bypass,mlgmxyysd,PHP,PHP,3496.0,367.0,A PoC that exploits a vulnerability to bypass the Xiaomi HyperOS community restrictions of BootLoader unlocked account bindings.,mlgmxyysd_xiaomi-hyperos-bootloader-bypass,DOC_CHANGE,changes in md file b690cb4ea3adfdf4ef7c7c8ed05ec64328d28a90,2025-01-08 18:45:58,Łukasz Jan Niemier,"feat: use Telemetry in MetricsCleaner (#534) Switch to using Telemetry for reporting duration of cleanup. This should help with future observability.",False,39,29,68,"--- lib/supavisor/metrics_cleaner.ex @@ -11,32 +11,18 @@ defmodule Supavisor.MetricsCleaner do def init(_args) do Logger.info(""Starting MetricsCleaner"") - - :telemetry.attach( - {__MODULE__, :report}, - [:supavisor, :metrics_cleaner, :stop], - &__MODULE__.__report_long_cleanups__/4, - [] - ) - {:ok, %{check_ref: check()}} end - @doc false - def __report_long_cleanups__(_event_name, %{duration: duration}, _metadata, _config) do - exec_time = :erlang.convert_time_unit(duration, :native, :millisecond) - - if exec_time > :timer.seconds(5), - do: Logger.warning(""Metrics check took: #{exec_time} ms"") - end - def handle_info(:check, state) do Process.cancel_timer(state.check_ref) - :telemetry.span([:supavisor, :metrics_cleaner], %{}, fn -> - count = loop_and_cleanup_metrics_table() - {[], %{orphaned_metrics: count}, %{}} - end) + start = System.monotonic_time(:millisecond) + loop_and_cleanup_metrics_table() + exec_time = System.monotonic_time(:millisecond) - start + + if exec_time > :timer.seconds(5), + do: Logger.warning(""Metrics check took: #{exec_time} ms"") {:noreply, %{state | check_ref: check()}} end @@ -52,28 +38,32 @@ defmodule Supavisor.MetricsCleaner do metrics_table = Supavisor.Monitoring.PromEx.Metrics tenant_registry_table = :syn_registry_by_name_tenants - func = fn elem, acc -> - with {{_, - %{ - type: type, - mode: mode, - user: user, - tenant: tenant, - db_name: db, - search_path: search_path - }} = key, _} <- elem, - [] <- :ets.lookup(tenant_registry_table, {{type, tenant}, user, mode, db, search_path}) do - Logger.warning(""Found orphaned metric: #{inspect(key)}"") - :ets.delete(metrics_table, key) - - acc + 1 - else - _ -> acc - end + func = fn + {{_, + %{ + type: type, + mode: mode, + user: user, + tenant: tenant, + db_name: db, + search_path: search_path + }} = key, _}, + _ -> + case :ets.lookup(tenant_registry_table, {{type, tenant}, user, mode, db, search_path}) do + [] -> + Logger.warning(""Found orphaned metric: #{inspect(key)}"") + :ets.delete(metrics_table, key) + + _ -> + nil + end + + _, acc -> + acc end {_, tids} = Peep.Persistent.storage(Supavisor.Monitoring.PromEx.Metrics) - Enum.each(List.wrap(tids), &:ets.foldl(func, 0, &1)) + Enum.each(List.wrap(tids), &:ets.foldl(func, nil, &1)) end end ",supavisor,supabase,Elixir,Elixir,1869.0,64.0,"A cloud-native, multi-tenant Postgres connection pooler.",supabase_supavisor,NEW_FEAT,obvious 7038bb12e188e527b81b06c31126b986053b0f5a,2022-02-07 17:11:59,Matheus Felipe,"Update Bittrex, new link",False,1,1,2,"--- README.md @@ -399,7 +399,7 @@ API | Description | Auth | HTTPS | CORS | | [BitcoinCharts](https://bitcoincharts.com/about/exchanges/) | Financial and Technical Data related to the Bitcoin Network | No | Yes | Unknown | | [Bitfinex](https://docs.bitfinex.com/docs) | Cryptocurrency Trading Platform | `apiKey` | Yes | Unknown | | [Bitmex](https://www.bitmex.com/app/apiOverview) | Real-Time Cryptocurrency derivatives trading platform based in Hong Kong | `apiKey` | Yes | Unknown | -| [Bittrex](https://bittrex.github.io/api/v3) | Next Generation Crypto Trading Platform | `apiKey` | Yes | Unknown | +| [Bittrex](https://bittrex.com/Home/Api) | Next Generation Crypto Trading Platform | `apiKey` | Yes | Unknown | | [Block](https://www.block.io/docs/basic) | Bitcoin Payment, Wallet & Transaction Data | `apiKey` | Yes | Unknown | | [Blockchain](https://www.blockchain.com/api) | Bitcoin Payment, Wallet & Transaction Data | `apiKey` | Yes | Unknown | | [BlockFacts](https://blockfacts.io/) | Real-time crypto data from multiple exchanges via a single unified API, and much more | `apiKey` | Yes | Unknown | ",public-apis,public-apis,Python,Python,329015.0,34881.0,A collective list of free APIs,public-apis_public-apis,DOC_CHANGE,changes in readme a631be56013c2899bc35a17a2e49d169233fb29a,2025-03-24 22:24:32,Sandeep Somavarapu,fix #244295 (#244476),False,1,1,2,"--- src/vs/workbench/contrib/preferences/browser/settingsTreeModels.ts @@ -342,7 +342,7 @@ export class SettingsTreeSettingElement extends SettingsTreeElement { // so we reset the default value source to the non-language-specific default value source for now. this.defaultValueSource = this.setting.nonLanguageSpecificDefaultValueSource; - if (inspected.policyValue !== undefined) { + if (inspected.policyValue) { this.hasPolicyValue = true; isConfigured = false; // The user did not manually configure the setting themselves. displayValue = inspected.policyValue; ",vscode,microsoft,TypeScript,TypeScript,168072.0,30802.0,Visual Studio Code,microsoft_vscode,BUG_FIX,Obvious 747e26bfc59e2ae8bda31ee9f30803210f9566bb,2024-03-13 21:59:21,Jaime Bernardo,[Deps][ci]Update System.Drawing.Common to 8.0.3 (#31903),False,2,2,4,"--- Directory.Packages.props @@ -73,7 +73,7 @@ - + --- NOTICE.md @@ -1353,7 +1353,7 @@ EXHIBIT A -Mozilla Public License. - System.Data.SqlClient 4.8.6 - System.Diagnostics.EventLog 8.0.0 - System.Diagnostics.PerformanceCounter 8.0.0 -- System.Drawing.Common 8.0.3 +- System.Drawing.Common 8.0.2 - System.IO.Abstractions 17.2.3 - System.IO.Abstractions.TestingHelpers 17.2.3 - System.Management 8.0.0 ",powertoys,microsoft,C#,C#,115301.0,6789.0,Windows system utilities to maximize productivity,microsoft_powertoys,CONFIG_CHANGE,just some version change 0e13d8c952bb960837ce5e6553b25331e272370b,,Christian Sánchez Mendoza,Remove route event in componentWillUnmount (#6196) `Router.events.off` should be called instead of `Router.events.on` in `componentWillInmount`.,False,1,1,0,"--- header-nav.js @@ -26,7 +26,7 @@ class HeaderNav extends React.Component { componentWillUnmount () { Router.onRouteChangeComplete = null - Router.events.on('routeChangeComplete', this.handleRouteChangeTopLevelRouter) + Router.events.off('routeChangeComplete', this.handleRouteChangeTopLevelRouter) this.props.router.events.off('routeChangeComplete', this.handleRouteChange) }",vercel_next.js.json,,,,,,,vercel_next.js.json,BUG_FIX,"4, sounds like a bug fix" ce020c6a79166a416c12f1b038906d9c57d94e25,2025-01-23 19:37:46,Shaun Hamilton,fix(client): display correct full-stack requirement (#58325),False,2,2,4,"--- client/src/client-only-routes/show-project-links.tsx @@ -106,7 +106,7 @@ const ShowProjectLinks = (props: ShowProjectLinksProps): JSX.Element => { { name: Certification.JsAlgoDataStruct }, { name: Certification.LegacyFrontEnd }, { name: Certification.LegacyDataVis }, - { name: Certification.BackEndDevApis }, + { name: Certification.LegacyBackEnd }, { name: Certification.LegacyInfoSecQa } ] as const; --- client/src/components/settings/certification.tsx @@ -160,7 +160,7 @@ const LegacyFullStack = (props: CertificationSettingsProps) => {

  • {t(`certification.title.${Certification.JsAlgoDataStruct}`)}
  • {t(`certification.title.${Certification.LegacyFrontEnd}`)}
  • {t(`certification.title.${Certification.LegacyDataVis}`)}
  • -
  • {t(`certification.title.${Certification.BackEndDevApis}`)}
  • +
  • {t(`certification.title.${Certification.LegacyBackEnd}`)}
  • {t(`certification.title.${Certification.LegacyInfoSecQa}`)}
  • ",freecodecamp,freecodecamp,TypeScript,TypeScript,410748.0,39092.0,freeCodeCamp.org's open-source codebase and curriculum. Learn to code for free.,freecodecamp_freecodecamp,BUG_FIX,obvious 9bdeda24e58b39852225c69b0ef7218835fa5bbf,2025-04-02 01:24:00,Allan Renucci,[XLA:GPU] Delete no-op `xla_gpu_enable_nccl_clique_optimization` flag and associated code. The flag was used in the now deleted ([#9329](https://github.com/openxla/xla/pull/9329)) XLA GPU runtime. PiperOrigin-RevId: 742801435,False,12,438,450,"--- third_party/xla/xla/debug_options_flags.cc @@ -254,6 +254,7 @@ DebugOptions DefaultDebugOptionsIgnoringFlags() { opts.set_xla_gpu_enable_split_k_autotuning(true); opts.set_xla_gpu_enable_reduction_epilogue_fusion(true); + opts.set_xla_gpu_enable_nccl_clique_optimization(false); opts.set_xla_gpu_cublas_fallback(true); opts.set_xla_gpu_cudnn_gemm_fusion_level(0); opts.set_xla_gpu_enable_while_loop_double_buffering(false); @@ -1919,6 +1920,12 @@ void MakeDebugOptionsFlags(std::vector* flag_list, &DebugOptions::set_xla_gpu_enable_reduction_epilogue_fusion), debug_options->xla_gpu_enable_reduction_epilogue_fusion(), ""Enable fusion for reduction epilogues"")); + flag_list->push_back( + tsl::Flag(""xla_gpu_enable_nccl_clique_optimization"", + bool_setter_for( + &DebugOptions::set_xla_gpu_enable_nccl_clique_optimization), + debug_options->xla_gpu_enable_nccl_clique_optimization(), + ""Allow early return when acquiring NCCL cliques"")); flag_list->push_back( tsl::Flag(""xla_gpu_cublas_fallback"", bool_setter_for(&DebugOptions::set_xla_gpu_cublas_fallback), --- third_party/xla/xla/service/gpu/BUILD @@ -2164,6 +2164,7 @@ cc_library( ""//xla/service/gpu/model:sol_latency_estimator"", ""//xla/service/gpu/transforms:async_collective_annotator"", ""//xla/service/gpu/transforms:pgle_accuracy_checker"", + ""//xla/service/gpu/transforms:schedule_postprocessing"", ""//xla/service/gpu/transforms:scheduling_instruction_annotator"", ""//xla/service/gpu/transforms/collectives:collective_ops_utils"", ""//xla/stream_executor:device_description"", @@ -2206,6 +2207,7 @@ xla_test( ""//xla/service:hlo_module_config"", ""//xla/service:latency_hiding_scheduler"", ""//xla/service:legalize_scheduling_annotations"", + ""//xla/service/gpu/transforms:schedule_postprocessing"", ""//xla/service/gpu/transforms:scheduling_instruction_annotator"", ""//xla/stream_executor:device_description"", ""//xla/tests:hlo_test_base"", --- third_party/xla/xla/service/gpu/backend_configs.proto @@ -118,16 +118,19 @@ message BitcastBackendConfig { // Backend config for async collective operations. Note that for is_sync will // be false by default, so even if a backend config is not explicitly attached // to the HLOInstruction, getting the backend_config will yield a default valued -// proto which will have is_sync = false. +// proto which will have is_sync = false. Attribute no_parallel_custom_call +// asserts that an asynchronous collective operation does not execute in +// parallel with custom-calls, which can trigger device synchronization . This +// attribute will also be false by default and should lead to conversative +// runtime behavior. message CollectiveBackendConfig { bool is_sync = 1; + bool no_parallel_custom_call = 2; // Determines whether the collective op of interested has been pipelined // within a loop. bool is_pipelined = 3; // Cost model prediction. repeated ReificationCost reification_cost = 4; - - reserved 2; } // Backend config for cost model estimates. --- third_party/xla/xla/service/gpu/backend_configs_test.cc @@ -59,6 +59,7 @@ TEST_F(BackendConfigsTest, DefaultCollectiveBackendConfig) { const auto& collective_backend_config = gpu_config.collective_backend_config(); EXPECT_THAT(collective_backend_config.is_sync(), IsFalse()); + EXPECT_THAT(collective_backend_config.no_parallel_custom_call(), IsFalse()); } TEST_F(BackendConfigsTest, DefaultGpuBackendConfigParseOpQueue) { --- third_party/xla/xla/service/gpu/gpu_hlo_schedule.cc @@ -59,6 +59,7 @@ limitations under the License. #include ""xla/service/gpu/transforms/async_collective_annotator.h"" #include ""xla/service/gpu/transforms/collectives/collective_ops_utils.h"" #include ""xla/service/gpu/transforms/pgle_accuracy_checker.h"" +#include ""xla/service/gpu/transforms/schedule_postprocessing.h"" #include ""xla/service/gpu/transforms/scheduling_instruction_annotator.h"" #include ""xla/service/hlo_module_config.h"" #include ""xla/service/latency_hiding_scheduler.h"" @@ -595,6 +596,7 @@ absl::Status RunLatencyHidingSchedulerPasses( std::move(estimator), std::move(async_tracker), std::move(scheduler_core), shape_size_in_bytes); pipeline.AddPass(); + pipeline.AddPass(); return pipeline.Run(module).status(); } --- third_party/xla/xla/service/gpu/gpu_hlo_schedule_test.cc @@ -43,6 +43,7 @@ limitations under the License. #include ""xla/service/backend.h"" #include ""xla/service/gpu/gpu_compiler.h"" #include ""xla/service/gpu/gpu_latency_hiding_scheduler.h"" +#include ""xla/service/gpu/transforms/schedule_postprocessing.h"" #include ""xla/service/gpu/transforms/scheduling_instruction_annotator.h"" #include ""xla/service/hlo_module_config.h"" #include ""xla/service/latency_hiding_scheduler.h"" --- third_party/xla/xla/service/gpu/transforms/BUILD @@ -2828,6 +2828,43 @@ xla_cc_test( ], ) +cc_library( + name = ""schedule_postprocessing"", + srcs = [""schedule_postprocessing.cc""], + hdrs = [""schedule_postprocessing.h""], + deps = [ + ""//xla/hlo/ir:hlo"", + ""//xla/hlo/pass:hlo_pass"", + ""//xla/hlo/utils:hlo_query"", + ""//xla/service/gpu:backend_configs_cc"", + ""//xla/service/gpu/transforms/collectives:collective_ops_utils"", + ""@com_google_absl//absl/algorithm:container"", + ""@com_google_absl//absl/container:flat_hash_map"", + ""@com_google_absl//absl/container:flat_hash_set"", + ""@com_google_absl//absl/status:statusor"", + ""@com_google_absl//absl/strings:string_view"", + ""@local_tsl//tsl/platform:errors"", + ""@local_tsl//tsl/platform:statusor"", + ], +) + +xla_cc_test( + name = ""schedule_postprocessing_test"", + srcs = [""schedule_postprocessing_test.cc""], + deps = [ + "":schedule_postprocessing"", + ""//xla:util"", + ""//xla/hlo/ir:hlo"", + ""//xla/hlo/parser:hlo_parser"", + ""//xla/service/gpu:backend_configs_cc"", + ""//xla/tests:hlo_test_base"", + ""//xla/tests:xla_internal_test_main"", + ""@com_google_absl//absl/strings:string_view"", + ""@com_google_googletest//:gtest"", + ""@local_tsl//tsl/platform:statusor"", + ], +) + cc_library( name = ""scheduling_instruction_annotator"", srcs = [""scheduling_instruction_annotator.cc""], --- third_party/xla/xla/service/gpu/transforms/command_buffer_scheduling_test.cc @@ -209,7 +209,7 @@ TEST_F(CommandBufferSchedulingTest, AllReduceStartFollowedByDone) { %a = s32[4] parameter(0) %start = s32[4]{0} all-reduce-start(s32[4]{0} %a), replica_groups={{0,1}}, to_apply=%add, - backend_config={""collective_backend_config"": {""is_sync"":true}} + backend_config={""collective_backend_config"": {""is_sync"":true,""no_parallel_custom_call"":false}} ROOT %done = s32[4]{0} all-reduce-done(s32[4]{0} %start) })""; @@ -242,7 +242,7 @@ TEST_F(CommandBufferSchedulingTest, AllGatherStartFollowedByDone) { %start = (s32[2]{0}, s32[4]{0}) all-gather-start(%a), channel_id=555, replica_groups={{0,1}}, dimensions={0}, - backend_config={""collective_backend_config"": {""is_sync"":true}} + backend_config={""collective_backend_config"": {""is_sync"":true,""no_parallel_custom_call"":false}} ROOT %done = s32[4]{0} all-gather-done(%start) })""; @@ -282,7 +282,7 @@ TEST_F(CommandBufferSchedulingTest, ReduceScatterStartFollowedByDone) { %start = ((s32[4]{0}), s32[2]{0}) reduce-scatter-start(%a), channel_id=555, replica_groups={{0,1}}, dimensions={0}, to_apply=add, - backend_config={""collective_backend_config"": {""is_sync"":true}} + backend_config={""collective_backend_config"": {""is_sync"":true,""no_parallel_custom_call"":false}} ROOT %done = s32[2]{0} reduce-scatter-done(%start) })""; @@ -321,7 +321,7 @@ TEST_F(CommandBufferSchedulingTest, AllReduceStartFollowedByBitcast) { %a = s32[4] parameter(0) %start = s32[4]{0} all-reduce-start(s32[4]{0} %a), replica_groups={{0,1}}, to_apply=%add, - backend_config={""collective_backend_config"": {""is_sync"":true}} + backend_config={""collective_backend_config"": {""is_sync"":true,""no_parallel_custom_call"":false}} %bitcast = s32[4] bitcast(s32[4]{0} %a) ROOT %done = s32[4]{0} all-reduce-done(s32[4]{0} %start) })""; @@ -361,10 +361,10 @@ TEST_F(CommandBufferSchedulingTest, AllReduceStartFollowedAllReduceStart) { %a = s32[4] parameter(0) %start1 = s32[4]{0} all-reduce-start(s32[4]{0} %a), replica_groups={{0,1}}, to_apply=%add, - backend_config={""collective_backend_config"": {""is_sync"":true}} + backend_config={""collective_backend_config"": {""is_sync"":true,""no_parallel_custom_call"":false}} %start2 = s32[4]{0} all-reduce-start(s32[4]{0} %a), replica_groups={{0,1}}, to_apply=%add, - backend_config={""collective_backend_config"": {""is_sync"":true}} + backend_config={""collective_backend_config"": {""is_sync"":true,""no_parallel_custom_call"":false}} %done1 = s32[4]{0} all-reduce-done(s32[4]{0} %start1) ROOT %done2 = s32[4]{0} all-reduce-done(s32[4]{0} %start2) })""; @@ -418,11 +418,11 @@ TEST_F(CommandBufferSchedulingTest, DoNotCaptureUnmatchedAsyncDone) { %b = s32[] parameter(1) %start1 = s32[4]{0} all-reduce-start(s32[4]{0} %a), replica_groups={{0,1}}, to_apply=%add, - backend_config={""collective_backend_config"": {""is_sync"":true}} + backend_config={""collective_backend_config"": {""is_sync"":true,""no_parallel_custom_call"":false}} %c = s32[] custom-call(), custom_call_target=""target"" %start2 = s32[4]{0} all-reduce-start(s32[4]{0} %a), replica_groups={{0,1}}, to_apply=%add, - backend_config={""collective_backend_config"": {""is_sync"":true}} + backend_config={""collective_backend_config"": {""is_sync"":true,""no_parallel_custom_call"":false}} %done1 = s32[4]{0} all-reduce-done(s32[4]{0} %start1) %done2 = s32[4]{0} all-reduce-done(s32[4]{0} %start2) %fusion = s32[] fusion(s32[] %b, s32[] %c), kind=kLoop, calls=%fused_computation --- third_party/xla/xla/service/gpu/transforms/schedule_postprocessing.cc @@ -0,0 +1,158 @@ +/* Copyright 2023 The OpenXLA Authors. + +Licensed under the Apache License, Version 2.0 (the ""License""); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an ""AS IS"" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#include ""xla/service/gpu/transforms/schedule_postprocessing.h"" + +#include + +#include ""absl/algorithm/container.h"" +#include ""absl/container/flat_hash_map.h"" +#include ""absl/container/flat_hash_set.h"" +#include ""absl/status/statusor.h"" +#include ""absl/strings/string_view.h"" +#include ""xla/hlo/ir/hlo_computation.h"" +#include ""xla/hlo/ir/hlo_instruction.h"" +#include ""xla/hlo/ir/hlo_opcode.h"" +#include ""xla/hlo/ir/hlo_schedule.h"" +#include ""xla/hlo/utils/hlo_query.h"" +#include ""xla/service/gpu/backend_configs.pb.h"" +#include ""xla/service/gpu/transforms/collectives/collective_ops_utils.h"" +#include ""tsl/platform/errors.h"" +#include ""tsl/platform/statusor.h"" + +namespace xla { +namespace gpu { +namespace { +// Maps a computation to a boolean that indicates whether the computation may +// invoke custom-calls directly or indirectly, which can eventually trigger gpu +// synchronization. +using CustomCallInComputation = + absl::flat_hash_map; + +// Returns whether the hlo may invoke custom-calls which may trigger gpu +// synchronization. Currently, we only check for custom-calls, because they are +// the only operations that can be parallel with asynchronous collectives +// operations in an hlo-schedule and may trigger gpu synchronization. +bool MayInvokeCustomCall( + const HloInstruction* hlo, + const CustomCallInComputation& custom_call_in_computation) { + if (HloPredicateIsOp(hlo)) { + return true; + } + + return absl::c_any_of( + hlo->called_computations(), [&](const HloComputation* callee) { + return custom_call_in_computation.find(callee)->second; + }); +} + +// Returns true if this is an asynchronous collective start operation, excluding +// P2P operations. +bool IsRelevantAsynchronousStart(const HloInstruction* hlo) { + return hlo_query::IsAsyncCollectiveStartOp(hlo, + /*include_send_recv=*/false) && + !IsGPUSyncCollective(*hlo); +} + +// Returns true if this is a collective done operation, excluding P2P +// operations. +bool IsRelevantAsynchronousDone(const HloInstruction* hlo) { + return hlo_query::IsAsyncCollectiveDoneOp(hlo, + /*include_send_recv=*/false); +} + +// For a given computation, finds all the asynchronous collective operations +// that aren't parallel with custom-calls and sets its no_parallel_custom_call +// attribute to true. Also records whether the given computation may invoke +// custom-calls. +absl::StatusOr ProcessComputation( + const HloSchedule& schedule, HloComputation* computation, + CustomCallInComputation& custom_call_in_computation) { + bool changed = false; + bool has_custom_call = false; + absl::flat_hash_set async_starts; + const HloInstructionSequence& sequence = schedule.sequence(computation); + + // Visit instructions in the sequence. Collect relevant asynchronous + // collective start ops. When we see a relevant asynchronous collective done + // op, remove the corresponding start op from the collection and set its + // attribute no_parallel_custom_call to true. When we see a custom-call, clear + // the start ops from the collection and keep their attribute + // no_parallel_custom_call as false. + const std::vector& all_instructions = + sequence.instructions(); + for (HloInstruction* hlo : all_instructions) { + if (MayInvokeCustomCall(hlo, custom_call_in_computation)) { + async_starts.clear(); + has_custom_call = true; + continue; + } + if (IsRelevantAsynchronousStart(hlo)) { + async_starts.insert(hlo); + continue; + } + + if (IsRelevantAsynchronousDone(hlo)) { + HloInstruction* async_start = hlo->mutable_operand(0); + if (async_starts.contains(async_start)) { + changed = true; + TF_ASSIGN_OR_RETURN(GpuBackendConfig gpu_config, + async_start->backend_config()); + CollectiveBackendConfig& collective_backend_config = + *gpu_config.mutable_collective_backend_config(); + collective_backend_config.set_no_parallel_custom_call(true); + TF_RETURN_IF_ERROR(async_start->set_backend_config(gpu_config)); + async_starts.erase(async_start); + } + } + } + + custom_call_in_computation[computation] = has_custom_call; + return changed; +} + +} // anonymous namespace + +absl::StatusOr SchedulePostprocessing::Run( + HloModule* module, + const absl::flat_hash_set& execution_threads) { + if (!module->has_schedule()) return false; + HloSchedule& schedule = module->schedule(); + bool changed = false; + CustomCallInComputation custom_call_in_computation; + + // We visit computations in the order of callees to callers, as information is + // propagated from calles to callers. + std::vector all_computations = + module->MakeComputationPostOrder(execution_threads); + for (auto iter = all_computations.begin(); iter != all_computations.end(); + ++iter) { + HloComputation* computation = *iter; + if (computation->IsFusionComputation()) { + custom_call_in_computation[computation] = false; + continue; + } + + TF_ASSIGN_OR_RETURN( + bool result, + ProcessComputation(schedule, computation, custom_call_in_computation)); + changed |= result; + } + + return changed; +} + +} // namespace gpu +} // namespace xla --- third_party/xla/xla/service/gpu/transforms/schedule_postprocessing.h @@ -0,0 +1,50 @@ +/* Copyright 2023 The OpenXLA Authors. + +Licensed under the Apache License, Version 2.0 (the ""License""); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an ""AS IS"" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#ifndef XLA_SERVICE_GPU_TRANSFORMS_SCHEDULE_POSTPROCESSING_H_ +#define XLA_SERVICE_GPU_TRANSFORMS_SCHEDULE_POSTPROCESSING_H_ + +#include ""absl/container/flat_hash_set.h"" +#include ""absl/status/statusor.h"" +#include ""absl/strings/string_view.h"" +#include ""xla/hlo/ir/hlo_module.h"" +#include ""xla/hlo/pass/hlo_pass_interface.h"" + +namespace xla { +namespace gpu { + +// Amends a schedule result with the needed information to support a runtime +// implementation. Currently, this pass refines attribute +// no_parallel_custom_call for asynchronous collective operations to support +// runtime optimization, such as skipping rendezvous of all participating +// threads for NCCL collective operations. In particular, it sets the attribute +// value for Collective-start operations with is_sync=false; it also keeps the +// attribute value untouch for the operations with is_sync=true and for P2P +// operations, assumming the runtime won't use those values. +// +class SchedulePostprocessing : public HloModulePass { + public: + absl::string_view name() const override { return ""schedule-postprocessing""; } + + using HloPassInterface::Run; + absl::StatusOr Run( + HloModule* module, + const absl::flat_hash_set& execution_threads) override; +}; + +} // namespace gpu +} // namespace xla + +#endif // XLA_SERVICE_GPU_TRANSFORMS_SCHEDULE_POSTPROCESSING_H_ --- third_party/xla/xla/service/gpu/transforms/schedule_postprocessing_test.cc @@ -0,0 +1,163 @@ +/* Copyright 2023 The OpenXLA Authors. + +Licensed under the Apache License, Version 2.0 (the ""License""); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an ""AS IS"" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +==============================================================================*/ + +#include ""xla/service/gpu/transforms/schedule_postprocessing.h"" + +#include + +#include +#include ""absl/strings/string_view.h"" +#include ""xla/hlo/ir/hlo_computation.h"" +#include ""xla/hlo/ir/hlo_instruction.h"" +#include ""xla/hlo/ir/hlo_module.h"" +#include ""xla/hlo/parser/hlo_parser.h"" +#include ""xla/service/gpu/backend_configs.pb.h"" +#include ""xla/tests/hlo_test_base.h"" +#include ""xla/util.h"" +#include ""tsl/platform/statusor.h"" + +namespace xla { +namespace gpu { +namespace { + +using SchedulePostprocessingTest = HloTestBase; + +TEST_F(SchedulePostprocessingTest, SynchronousOpsNotChanged) { + constexpr absl::string_view kHloString = R""( + HloModule module, is_scheduled=true + + ENTRY entry { + pf32 = f32[1] parameter(0) + + all-gather-start = (f32[1], f32[2]) all-gather-start(pf32), dimensions={0}, backend_config={""collective_backend_config"":{""is_sync"":true,""no_parallel_custom_call"":false}} + ROOT all-gather-done = f32[2] all-gather-done(all-gather-start) + } +)""; + TF_ASSERT_OK_AND_ASSIGN(std::unique_ptr module, + ParseAndReturnUnverifiedModule((kHloString))); + SchedulePostprocessing pass; + TF_ASSERT_OK_AND_ASSIGN(bool changed, pass.Run(module.get())); + EXPECT_FALSE(changed); +} + +TEST_F(SchedulePostprocessingTest, P2POpsNotChanged) { + constexpr absl::string_view kHloString = R""( + HloModule module, is_scheduled=true + + ENTRY main { + f0 = f32[] constant(0.0) + init = f32[1, 1024, 1024] broadcast(f0), dimensions={} + + after-all = token[] after-all() + recv = (f32[1, 1024, 1024], u32[], token[]) recv(after-all), channel_id=2, + frontend_attributes={ + _xla_send_recv_source_target_pairs=""{{0,1}, {1,2}}"" + } + recv-done = (f32[1, 1024, 1024], token[]) recv-done(recv), channel_id=2 + ROOT recv-data = f32[1, 1024, 1024] get-tuple-element(recv-done), index=0 + } +)""; + TF_ASSERT_OK_AND_ASSIGN(std::unique_ptr module, + ParseAndReturnUnverifiedModule((kHloString))); + SchedulePostprocessing pass; + TF_ASSERT_OK_AND_ASSIGN(bool changed, pass.Run(module.get())); + EXPECT_FALSE(changed); +} + +TEST_F(SchedulePostprocessingTest, AsynchronousOpsChanged) { + constexpr absl::string_view kHloString = R""( + HloModule module, is_scheduled=true + + ENTRY entry { + pf32 = f32[1] parameter(0) + pf32.2 = f32[1] custom-call(pf32), custom_call_target=""my_custom_call"" + all-gather-start = (f32[1], f32[2]) all-gather-start(pf32.2), dimensions={0}, backend_config={""collective_backend_config"":{""is_sync"":false}} + ROOT all-gather-done = f32[2] all-gather-done(all-gather-start) + } +)""; + TF_ASSERT_OK_AND_ASSIGN(std::unique_ptr module, + ParseAndReturnUnverifiedModule((kHloString))); + SchedulePostprocessing pass; + TF_ASSERT_OK_AND_ASSIGN(bool changed, pass.Run(module.get())); + EXPECT_TRUE(changed); + + HloInstruction* start = FindInstruction(module.get(), ""all-gather-start""); + TF_ASSERT_OK_AND_ASSIGN(GpuBackendConfig gpu_config, + start->backend_config()); + const CollectiveBackendConfig& collective_backend_config = + gpu_config.collective_backend_config(); + EXPECT_TRUE(collective_backend_config.no_parallel_custom_call()); +} + +TEST_F(SchedulePostprocessingTest, AsynchronousOpsWithParallelCustomcall) { + constexpr absl::string_view kHloString = R""( + HloModule module, is_scheduled=true + + ENTRY entry { + pf32 = f32[1] parameter(0) + all-gather-start = (f32[1], f32[2]) all-gather-start(pf32), dimensions={0}, backend_config={""collective_backend_config"":{""is_sync"":false}} + pf32.2 = f32[1] custom-call(pf32), custom_call_target=""my_custom_call"" + all-gather-done = f32[2] all-gather-done(all-gather-start) + ROOT out = (f32[1], f32[2]) tuple(f32[1] pf32.2, f32[2] all-gather-done) + } +)""; + TF_ASSERT_OK_AND_ASSIGN(std::unique_ptr module, + ParseAndReturnUnverifiedModule((kHloString))); + SchedulePostprocessing pass; + TF_ASSERT_OK_AND_ASSIGN(bool changed, pass.Run(module.get())); + EXPECT_FALSE(changed); + + HloInstruction* start = FindInstruction(module.get(), ""all-gather-start""); + TF_ASSERT_OK_AND_ASSIGN(GpuBackendConfig gpu_config, + start->backend_config()); + const CollectiveBackendConfig& collective_backend_config = + gpu_config.collective_backend_config(); + EXPECT_FALSE(collective_backend_config.no_parallel_custom_call()); +} + +TEST_F(SchedulePostprocessingTest, + AsynchronousOpsWithParallelNestedCustomcall) { + constexpr absl::string_view kHloString = R""( + HloModule module, is_scheduled=true + foo { + v = f32[1] parameter(0) + ROOT ret = f32[1] custom-call(v), custom_call_target=""my_custom_call"" + } + + ENTRY entry { + pf32 = f32[1] parameter(0) + all-gather-start = (f32[1], f32[2]) all-gather-start(pf32), dimensions={0}, backend_config={""collective_backend_config"":{""is_sync"":false}} + pf32.2 = f32[1] call(f32[1] pf32), to_apply=foo + all-gather-done = f32[2] all-gather-done(all-gather-start) + ROOT out = (f32[1], f32[2]) tuple(f32[1] pf32.2, f32[2] all-gather-done) + } +)""; + TF_ASSERT_OK_AND_ASSIGN(std::unique_ptr module, + ParseAndReturnUnverifiedModule((kHloString))); + SchedulePostprocessing pass; + TF_ASSERT_OK_AND_ASSIGN(bool changed, pass.Run(module.get())); + EXPECT_FALSE(changed); + + HloInstruction* start = FindInstruction(module.get(), ""all-gather-start""); + TF_ASSERT_OK_AND_ASSIGN(GpuBackendConfig gpu_config, + start->backend_config()); + const CollectiveBackendConfig& collective_backend_config = + gpu_config.collective_backend_config(); + EXPECT_FALSE(collective_backend_config.no_parallel_custom_call()); +} + +} // namespace +} // namespace gpu +} // namespace xla --- third_party/xla/xla/xla.proto @@ -443,6 +443,9 @@ message DebugOptions { // threads. Setting to 0 (the default value) means no enforcement. bool xla_gpu_enable_llvm_module_compilation_parallelism = 268; + // Allow early return when acquiring NCCL cliques. + bool xla_gpu_enable_nccl_clique_optimization = 244; + // Enable NCCL communicator splitting. bool xla_gpu_enable_nccl_comm_splitting = 272; @@ -803,7 +806,6 @@ message DebugOptions { // go/keep-sorted end - reserved 244; // xla_gpu_enable_nccl_clique_optimization reserved 276; // xla_gpu_enable_nccl_per_stream_comms //--------------------------------------------------------------------------// ",tensorflow,tensorflow,C++,C++,188388.0,74565.0,An Open Source Machine Learning Framework for Everyone,nan_tensorflow,PERF_IMPROVEMENT,Code change: indexing added 75f3e4c5ee70f78178442933fbbd6742c71fe087,2022-05-06 12:14:10,longpanda,Add EDK debug info.,False,2,1,3,"--- EDK2/edk2_mod/edk2-edk2-stable201911/MdeModulePkg/Application/Ventoy/VentoyProtocol.c @@ -155,8 +155,7 @@ STATIC EFI_STATUS EFIAPI ventoy_read_iso_sector ventoy_override_chunk *pOverride = g_override_chunk; EFI_BLOCK_IO_PROTOCOL *pRawBlockIo = gBlockData.pRawBlockIo; - debug(""read iso sector %lu count %u Buffer:%p Align:%u blk:%u"", - Sector, Count, Buffer, pRawBlockIo->Media->IoAlign, pRawBlockIo->Media->BlockSize); + debug(""read iso sector %lu count %u Buffer:%p Align:%u"", Sector, Count, Buffer, pRawBlockIo->Media->IoAlign); ReadStart = Sector * 2048; ReadEnd = (Sector + Count) * 2048; --- INSTALL/ventoy/ventoy_aa64.efi Binary files a/INSTALL/ventoy/ventoy_aa64.efi and b/INSTALL/ventoy/ventoy_aa64.efi differ --- INSTALL/ventoy/ventoy_ia32.efi Binary files a/INSTALL/ventoy/ventoy_ia32.efi and b/INSTALL/ventoy/ventoy_ia32.efi differ --- INSTALL/ventoy/ventoy_x64.efi Binary files a/INSTALL/ventoy/ventoy_x64.efi and b/INSTALL/ventoy/ventoy_x64.efi differ ",ventoy,ventoy,C,C,65265.0,4197.0,A new bootable USB solution.,ventoy_ventoy,CODE_IMPROVEMENT,Obvious 199d0065e108f8de45f0acdca481f118a01a8047,2024-06-14 21:53:40,Kieran Eglin,Updated screenshots,False,2,2,4,"--- README.md @@ -71,8 +71,8 @@ If it doesn't work for your use case, please make a feature request! You can als ## Screenshots - - + + ## Installation --- priv/static/images/app-form-screenshot.jpg Binary files a/priv/static/images/app-form-screenshot.jpg and /dev/null differ --- priv/static/images/app-form-screenshot.png Binary files /dev/null and b/priv/static/images/app-form-screenshot.png differ --- priv/static/images/app-screenshot.jpg Binary files a/priv/static/images/app-screenshot.jpg and /dev/null differ --- priv/static/images/app-screenshot.png Binary files /dev/null and b/priv/static/images/app-screenshot.png differ ",pinchflat,kieraneglin,Elixir,Elixir,2779.0,59.0,Your next YouTube media manager,kieraneglin_pinchflat,CONFIG_CHANGE,Very small changes 2f9e65f16b64e524adb245159ecee82bfc5f9dff,,Yui T,Update gitignore to ignore internal test folders,False,1,0,1,"--- .gitignore @@ -43,3 +43,4 @@ scripts/word2md.js scripts/ior.js scripts/*.js.map coverage/ +internal/",microsoft_TypeScript.json,,,,,,,microsoft_TypeScript.json,CONFIG_CHANGE,"5, obvious" 46320fc7fcb841fadb4741b7d1759428b6bf2f94,2022-09-17 08:24:52,Tim,Add ThreadLocal library (#4386),False,1,0,1,"--- README.md @@ -1232,7 +1232,6 @@ _Tools for managing and working with Goroutines._ - [pond](https://github.com/alitto/pond) - Minimalistic and High-performance goroutine worker pool written in Go. - [pool](https://github.com/go-playground/pool) - Limited consumer goroutine or unlimited goroutine pool for easier goroutine handling and cancellation. - [queue](https://github.com/AnikHasibul/queue) - Gives you a `sync.WaitGroup` like queue group accessibility. Helps you to throttle and limit goroutines, wait for the end of the all goroutines and much more. -- [routine](https://github.com/timandy/routine) - `routine` is a `ThreadLocal` for go library. It encapsulates and provides some easy-to-use, non-competitive, high-performance `goroutine` context access interfaces, which can help you access coroutine context information more gracefully. - [routine](https://github.com/x-mod/routine) - go routine control with context, support: Main, Go, Pool and some useful Executors. - [semaphore](https://github.com/kamilsk/semaphore) - Semaphore pattern implementation with timeout of lock/unlock operations based on channel and context. - [semaphore](https://github.com/marusama/semaphore) - Fast resizable semaphore implementation based on CAS (faster than channel-based semaphore implementations). ",awesome-go,avelino,Go,Go,139192.0,12134.0,"A curated list of awesome Go frameworks, libraries and software",avelino_awesome-go,DOC_CHANGE,Obvious 6dced5ece04bee7ca1c149e3b7af052f83d074b4,2023-09-26 17:28:17,dependabot[bot],"chore(deps): bump spotify from 0.11.0 to 0.12.0 (#733) Bumps [spotify](https://github.com/rinukkusu/spotify-dart) from 0.11.0 to 0.12.0. - [Release notes](https://github.com/rinukkusu/spotify-dart/releases) - [Changelog](https://github.com/rinukkusu/spotify-dart/blob/master/CHANGELOG.md) - [Commits](https://github.com/rinukkusu/spotify-dart/commits) --- updated-dependencies: - dependency-name: spotify dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>",False,3,11,14,"--- pubspec.lock @@ -1486,6 +1486,14 @@ packages: url: ""https://pub.dev"" source: hosted version: ""2.2.1"" + pedantic: + dependency: transitive + description: + name: pedantic + sha256: ""67fc27ed9639506c856c840ccce7594d0bdcd91bc8d53d6e52359449a1d50602"" + url: ""https://pub.dev"" + source: hosted + version: ""1.11.1"" permission_handler: dependency: ""direct main"" description: @@ -1855,10 +1863,10 @@ packages: dependency: ""direct main"" description: name: spotify - sha256: e967c5e295792e9d38f4c5e9e60d7c2868ed9cb2a8fac2a67c75303f8395e374 + sha256: c7c3f157f052143f713477bd5a764b080a0023ed084428bd0cf5a9e3bc260cc6 url: ""https://pub.dev"" source: hosted - version: ""0.12.0"" + version: ""0.11.0"" sqflite: dependency: transitive description: --- pubspec.yaml @@ -86,7 +86,7 @@ dependencies: sidebarx: ^0.15.0 skeleton_text: ^3.0.1 smtc_windows: ^0.1.0 - spotify: ^0.12.0 + spotify: ^0.11.0 stroke_text: ^0.0.2 supabase: ^1.9.9 system_theme: ^2.1.0 ",spotube,krtirtho,Dart,Dart,35895.0,1491.0,🎧 Open source Spotify client that doesn't require Premium nor uses Electron! Available for both desktop & mobile!,krtirtho_spotube,CONFIG_CHANGE,dependencies updated 432ba82ad2ec42e8de988974e8fe5bb50215b55a,,Ryan Sullivan,Set Chrome userDataDir to be under .vscode folder (#1657),False,1,1,0,"--- README.md @@ -269,7 +269,7 @@ Then add the block below to your `launch.json` file and put it inside the `.vsco ""request"": ""launch"", ""url"": ""http://localhost:3000"", ""webRoot"": ""${workspaceRoot}/src"", - ""userDataDir"": ""${workspaceRoot}/.chrome"", + ""userDataDir"": ""${workspaceRoot}/.vscode/chrome"", ""sourceMapPathOverrides"": { ""webpack:///src/*"": ""${webRoot}/*"" }",facebook_create-react-app.json,,,,,,,facebook_create-react-app.json,CONFIG_CHANGE,vague e0fc3bcd0a68e8be0c599b388818ca20ebe1cddb,2023-09-26 05:54:16,Dustin L. Howett,"About: check PackageManager for updates in addition to Store (#16012) With us adding a .appinstaller distribution of Canary, the Store services update checker has beome insufficient to determine whether there are package updates. App Installer supports us checking for updates by using PackageManager and the Package interfaces. We'll use those instead of the Store services interface, and bail out early if the App Installer gives us an answer.",False,46,7,53,"--- src/cascadia/TerminalApp/AboutDialog.cpp @@ -86,54 +86,16 @@ namespace winrt::TerminalApp::implementation co_await wil::resume_foreground(strongThis->Dispatcher()); UpdatesAvailable(true); #else // release build, likely has a store context - bool packageManagerAnswered{ false }; - - try - { - if (auto currentPackage{ winrt::Windows::ApplicationModel::Package::Current() }) - { - // We need to look up our package in the Package Manager; we cannot use Current - winrt::Windows::Management::Deployment::PackageManager pm; - if (auto lookedUpPackage{ pm.FindPackageForUser(winrt::hstring{}, currentPackage.Id().FullName()) }) - { - using winrt::Windows::ApplicationModel::PackageUpdateAvailability; - auto availabilityResult = co_await lookedUpPackage.CheckUpdateAvailabilityAsync(); - co_await wil::resume_foreground(strongThis->Dispatcher()); - auto availability = availabilityResult.Availability(); - switch (availability) - { - case PackageUpdateAvailability::Available: - case PackageUpdateAvailability::Required: - case PackageUpdateAvailability::NoUpdates: - UpdatesAvailable(availability != PackageUpdateAvailability::NoUpdates); - packageManagerAnswered = true; - break; - case PackageUpdateAvailability::Error: - case PackageUpdateAvailability::Unknown: - default: - // Do not set packageManagerAnswered, which will trigger the store check. - break; - } - } - } - } - catch (...) - { - } // Do nothing on failure - - if (!packageManagerAnswered) + if (auto storeContext{ winrt::Windows::Services::Store::StoreContext::GetDefault() }) { - if (auto storeContext{ winrt::Windows::Services::Store::StoreContext::GetDefault() }) + const auto updates = co_await storeContext.GetAppAndOptionalStorePackageUpdatesAsync(); + co_await wil::resume_foreground(strongThis->Dispatcher()); + if (updates) { - const auto updates = co_await storeContext.GetAppAndOptionalStorePackageUpdatesAsync(); - co_await wil::resume_foreground(strongThis->Dispatcher()); - if (updates) + const auto numUpdates = updates.Size(); + if (numUpdates > 0) { - const auto numUpdates = updates.Size(); - if (numUpdates > 0) - { - UpdatesAvailable(true); - } + UpdatesAvailable(true); } } } --- src/cascadia/TerminalApp/pch.h @@ -49,7 +49,6 @@ #include #include #include -#include #include #include ",terminal,microsoft,C++,C++,97273.0,8477.0,"The new Windows Terminal and the original Windows console host, all in the same place!",microsoft_terminal,BUG_FIX,Obvious b7fe985cab368b4854726ed2b8b20a528f413298,2025-03-22 00:21:37,Weiyi Wang,Add relu6 support for qnn PiperOrigin-RevId: 739247779,False,81,3,84,"--- tensorflow/lite/experimental/litert/test/testdata/simple_relu6_op.mlir @@ -1,6 +0,0 @@ -module { -func.func @main(%arg0: tensor<8x100x1xf32>) -> tensor<8x100x1xf32> { - %0 = ""tfl.relu6""(%arg0) : (tensor<8x100x1xf32>) -> tensor<8x100x1xf32> - return %0 : tensor<8x100x1xf32> -} -} --- tensorflow/lite/experimental/litert/tools/dump.cc @@ -205,15 +205,12 @@ void Dump(LiteRtOpCode code, std::ostream& out) { case kLiteRtOpCodeTflResizeNearestNeighbor: out << ""RESIZE_NEAREST_NEIGHBOR""; break; - case kLiteRtOpCodeTflRelu: - out << ""TFL_RELU""; - break; - case kLiteRtOpCodeTflRelu6: - out << ""TFL_RELU6""; - break; default: out << ""UKNOWN_OP_CODE: "" << code; break; + case kLiteRtOpCodeTflRelu: + out << ""TFL_RELU""; + break; } }; --- tensorflow/lite/experimental/litert/vendors/qualcomm/compiler/BUILD @@ -155,7 +155,6 @@ litert_lib( ""//tensorflow/lite/experimental/litert/vendors/qualcomm/core/builders:pool2d_op_builder"", ""//tensorflow/lite/experimental/litert/vendors/qualcomm/core/builders:quantize_op_builder"", ""//tensorflow/lite/experimental/litert/vendors/qualcomm/core/builders:reduce_op_builder"", - ""//tensorflow/lite/experimental/litert/vendors/qualcomm/core/builders:relu6_op_builder"", ""//tensorflow/lite/experimental/litert/vendors/qualcomm/core/builders:relu_op_builder"", ""//tensorflow/lite/experimental/litert/vendors/qualcomm/core/builders:reshape_op_builder"", ""//tensorflow/lite/experimental/litert/vendors/qualcomm/core/builders:resize_op_builder"", --- tensorflow/lite/experimental/litert/vendors/qualcomm/compiler/qnn_compose_graph.cc @@ -62,7 +62,6 @@ #include ""tensorflow/lite/experimental/litert/vendors/qualcomm/core/builders/pool2d_op_builder.h"" #include ""tensorflow/lite/experimental/litert/vendors/qualcomm/core/builders/quantize_op_builder.h"" #include ""tensorflow/lite/experimental/litert/vendors/qualcomm/core/builders/reduce_op_builder.h"" -#include ""tensorflow/lite/experimental/litert/vendors/qualcomm/core/builders/relu6_op_builder.h"" #include ""tensorflow/lite/experimental/litert/vendors/qualcomm/core/builders/relu_op_builder.h"" #include ""tensorflow/lite/experimental/litert/vendors/qualcomm/core/builders/reshape_op_builder.h"" #include ""tensorflow/lite/experimental/litert/vendors/qualcomm/core/builders/resize_op_builder.h"" @@ -392,11 +391,6 @@ LiteRtStatus ConvertOp( ::qnn::BuildReluOp(tensor_pool, input_tensors, output_tensors); break; } - case LiteRtOpCode::kLiteRtOpCodeTflRelu6: { - op_wrappers = - ::qnn::BuildRelu6Op(tensor_pool, input_tensors, output_tensors); - break; - } case LiteRtOpCode::kLiteRtOpCodeTflBatchMatmul: { bool adj_x{}; LITERT_RETURN_IF_ERROR( --- tensorflow/lite/experimental/litert/vendors/qualcomm/core/builders/BUILD @@ -181,23 +181,6 @@ cc_library( ], ) -cc_library( - name = ""relu6_op_builder"", - srcs = [""relu6_op_builder.cc""], - hdrs = [""relu6_op_builder.h""], - tags = [ - # Don't build/test in OS until qnn is available. - ""nobuilder"", - ], - deps = [ - "":op_builder"", - # copybara:uncomment ""//third_party/qairt/latest:qnn_lib_headers"", - ""//tensorflow/lite/experimental/litert/vendors/qualcomm/core:tensor_pool"", - ""//tensorflow/lite/experimental/litert/vendors/qualcomm/core/wrappers:op_wrapper"", - ""//tensorflow/lite/experimental/litert/vendors/qualcomm/core/wrappers:tensor_wrapper"", - ], -) - cc_library( name = ""matmul_op_builder"", srcs = [""matmul_op_builder.cc""], --- tensorflow/lite/experimental/litert/vendors/qualcomm/core/builders/relu6_op_builder.cc @@ -1,24 +0,0 @@ -// Copyright (c) Qualcomm Innovation Center, Inc. -// All Rights Reserved. - -#include - -#include ""third_party/qairt/latest/include/QNN/QnnOpDef.h"" -#include ""tensorflow/lite/experimental/litert/vendors/qualcomm/core/builders/op_builder.h"" -#include ""tensorflow/lite/experimental/litert/vendors/qualcomm/core/tensor_pool.h"" -#include ""tensorflow/lite/experimental/litert/vendors/qualcomm/core/wrappers/op_wrapper.h"" -#include ""tensorflow/lite/experimental/litert/vendors/qualcomm/core/wrappers/tensor_wrapper.h"" - -namespace qnn { - -std::vector BuildRelu6Op( - TensorPool& tensor_pool, const std::vector& inputs, - const std::vector& outputs) { - std::vector res; - - CreateSimpleActivationOp(res, QNN_OP_RELU6, inputs[0], outputs[0]); - - return res; -} - -} // namespace qnn --- tensorflow/lite/experimental/litert/vendors/qualcomm/core/builders/relu6_op_builder.h @@ -1,21 +0,0 @@ -// Copyright (c) Qualcomm Innovation Center, Inc. -// All Rights Reserved. - -#ifndef TENSORFLOW_LITE_EXPERIMENTAL_LITERT_VENDORS_QUALCOMM_CORE_BUILDERS_RELU6_OP_BUILDER_H_ -#define TENSORFLOW_LITE_EXPERIMENTAL_LITERT_VENDORS_QUALCOMM_CORE_BUILDERS_RELU6_OP_BUILDER_H_ - -#include - -#include ""tensorflow/lite/experimental/litert/vendors/qualcomm/core/tensor_pool.h"" -#include ""tensorflow/lite/experimental/litert/vendors/qualcomm/core/wrappers/op_wrapper.h"" -#include ""tensorflow/lite/experimental/litert/vendors/qualcomm/core/wrappers/tensor_wrapper.h"" - -namespace qnn { - -std::vector BuildRelu6Op( - TensorPool& tensor_pool, const std::vector& inputs, - const std::vector& outputs); - -} // namespace qnn - -#endif // TENSORFLOW_LITE_EXPERIMENTAL_LITERT_VENDORS_QUALCOMM_CORE_BUILDERS_RELU6_OP_BUILDER_H_ ",tensorflow,tensorflow,C++,C++,188388.0,74565.0,An Open Source Machine Learning Framework for Everyone,nan_tensorflow,NEW_FEAT,Obvious 2acfc07159b75fb6c0e5c86c2cd77b61543877d2,2023-11-30 07:21:40,Tien Do Nam,feat: automatically finish (#951),False,168,15,183,"--- app/assets/CHANGELOG.md @@ -1,6 +1,5 @@ ## 1.13.0 (unreleased) -- feat: add option to automatically finish - feat: show favorite name in the device list if marked as favorite (@Tienisto) - feat: ignore duplicate files when selected from file picker (@programmermager) - feat: add donation options (@Tienisto) --- app/assets/i18n/_missing_translations_ar.json @@ -4,9 +4,6 @@ ""After editing this file, you can run 'dart run slang apply --locale=ar' to quickly apply the newly added translations."" ], ""settingsTab"": { - ""receive"": { - ""autoFinish"": ""Auto Finish"" - }, ""other"": { ""title"": ""Other"", ""support"": ""Support LocalSend"", --- app/assets/i18n/_missing_translations_bn.json @@ -4,9 +4,6 @@ ""After editing this file, you can run 'dart run slang apply --locale=bn' to quickly apply the newly added translations."" ], ""settingsTab"": { - ""receive"": { - ""autoFinish"": ""Auto Finish"" - }, ""other"": { ""title"": ""Other"", ""support"": ""Support LocalSend"", --- app/assets/i18n/_missing_translations_ca.json @@ -18,9 +18,6 @@ ""oled"": ""OLED"" } }, - ""receive"": { - ""autoFinish"": ""Auto Finish"" - }, ""other"": { ""title"": ""Other"", ""support"": ""Support LocalSend"", --- app/assets/i18n/_missing_translations_cs.json @@ -4,9 +4,6 @@ ""After editing this file, you can run 'dart run slang apply --locale=cs' to quickly apply the newly added translations."" ], ""settingsTab"": { - ""receive"": { - ""autoFinish"": ""Auto Finish"" - }, ""other"": { ""title"": ""Other"", ""support"": ""Support LocalSend"", --- app/assets/i18n/_missing_translations_el.json @@ -4,9 +4,6 @@ ""After editing this file, you can run 'dart run slang apply --locale=el' to quickly apply the newly added translations."" ], ""settingsTab"": { - ""receive"": { - ""autoFinish"": ""Auto Finish"" - }, ""other"": { ""title"": ""Other"", ""support"": ""Support LocalSend"", --- app/assets/i18n/_missing_translations_es_ES.json @@ -4,9 +4,6 @@ ""After editing this file, you can run 'dart run slang apply --locale=es-ES' to quickly apply the newly added translations."" ], ""settingsTab"": { - ""receive"": { - ""autoFinish"": ""Auto Finish"" - }, ""other"": { ""title"": ""Other"", ""support"": ""Support LocalSend"", --- app/assets/i18n/_missing_translations_eu.json @@ -4,9 +4,6 @@ ""After editing this file, you can run 'dart run slang apply --locale=eu' to quickly apply the newly added translations."" ], ""settingsTab"": { - ""receive"": { - ""autoFinish"": ""Auto Finish"" - }, ""other"": { ""title"": ""Other"", ""support"": ""Support LocalSend"", --- app/assets/i18n/_missing_translations_fa.json @@ -2,10 +2,5 @@ ""@@info"": [ ""Here are translations that exist in but not in ."", ""After editing this file, you can run 'dart run slang apply --locale=fa' to quickly apply the newly added translations."" - ], - ""settingsTab"": { - ""receive"": { - ""autoFinish"": ""Auto Finish"" - } - } + ] } --- app/assets/i18n/_missing_translations_fil_PH.json @@ -2,10 +2,5 @@ ""@@info"": [ ""Here are translations that exist in but not in ."", ""After editing this file, you can run 'dart run slang apply --locale=fil-PH' to quickly apply the newly added translations."" - ], - ""settingsTab"": { - ""receive"": { - ""autoFinish"": ""Auto Finish"" - } - } + ] } --- app/assets/i18n/_missing_translations_fr.json @@ -4,9 +4,6 @@ ""After editing this file, you can run 'dart run slang apply --locale=fr' to quickly apply the newly added translations."" ], ""settingsTab"": { - ""receive"": { - ""autoFinish"": ""Auto Finish"" - }, ""other"": { ""title"": ""Other"", ""support"": ""Support LocalSend"", --- app/assets/i18n/_missing_translations_he.json @@ -4,9 +4,6 @@ ""After editing this file, you can run 'dart run slang apply --locale=he' to quickly apply the newly added translations."" ], ""settingsTab"": { - ""receive"": { - ""autoFinish"": ""Auto Finish"" - }, ""other"": { ""title"": ""Other"", ""support"": ""Support LocalSend"", --- app/assets/i18n/_missing_translations_hu.json @@ -4,9 +4,6 @@ ""After editing this file, you can run 'dart run slang apply --locale=hu' to quickly apply the newly added translations."" ], ""settingsTab"": { - ""receive"": { - ""autoFinish"": ""Auto Finish"" - }, ""other"": { ""title"": ""Other"", ""support"": ""Support LocalSend"", --- app/assets/i18n/_missing_translations_id.json @@ -18,9 +18,6 @@ ""oled"": ""OLED"" } }, - ""receive"": { - ""autoFinish"": ""Auto Finish"" - }, ""other"": { ""title"": ""Other"", ""support"": ""Support LocalSend"", --- app/assets/i18n/_missing_translations_it.json @@ -4,9 +4,6 @@ ""After editing this file, you can run 'dart run slang apply --locale=it' to quickly apply the newly added translations."" ], ""settingsTab"": { - ""receive"": { - ""autoFinish"": ""Auto Finish"" - }, ""other"": { ""title"": ""Other"", ""support"": ""Support LocalSend"", --- app/assets/i18n/_missing_translations_ja.json @@ -4,9 +4,6 @@ ""After editing this file, you can run 'dart run slang apply --locale=ja' to quickly apply the newly added translations."" ], ""settingsTab"": { - ""receive"": { - ""autoFinish"": ""Auto Finish"" - }, ""other"": { ""title"": ""Other"", ""support"": ""Support LocalSend"", --- app/assets/i18n/_missing_translations_km.json @@ -13,9 +13,6 @@ } }, ""settingsTab"": { - ""receive"": { - ""autoFinish"": ""Auto Finish"" - }, ""other"": { ""title"": ""Other"", ""support"": ""Support LocalSend"", --- app/assets/i18n/_missing_translations_ko.json @@ -4,9 +4,6 @@ ""After editing this file, you can run 'dart run slang apply --locale=ko' to quickly apply the newly added translations."" ], ""settingsTab"": { - ""receive"": { - ""autoFinish"": ""Auto Finish"" - }, ""other"": { ""title"": ""Other"", ""support"": ""Support LocalSend"", --- app/assets/i18n/_missing_translations_ne.json @@ -18,9 +18,6 @@ ""oled"": ""OLED"" } }, - ""receive"": { - ""autoFinish"": ""Auto Finish"" - }, ""other"": { ""title"": ""Other"", ""support"": ""Support LocalSend"", --- app/assets/i18n/_missing_translations_nl.json @@ -4,9 +4,6 @@ ""After editing this file, you can run 'dart run slang apply --locale=nl' to quickly apply the newly added translations."" ], ""settingsTab"": { - ""receive"": { - ""autoFinish"": ""Auto Finish"" - }, ""other"": { ""title"": ""Other"", ""support"": ""Support LocalSend"", --- app/assets/i18n/_missing_translations_pl.json @@ -2,10 +2,5 @@ ""@@info"": [ ""Here are translations that exist in but not in ."", ""After editing this file, you can run 'dart run slang apply --locale=pl' to quickly apply the newly added translations."" - ], - ""settingsTab"": { - ""receive"": { - ""autoFinish"": ""Auto Finish"" - } - } + ] } --- app/assets/i18n/_missing_translations_pt_BR.json @@ -2,10 +2,5 @@ ""@@info"": [ ""Here are translations that exist in but not in ."", ""After editing this file, you can run 'dart run slang apply --locale=pt-BR' to quickly apply the newly added translations."" - ], - ""settingsTab"": { - ""receive"": { - ""autoFinish"": ""Auto Finish"" - } - } + ] } --- app/assets/i18n/_missing_translations_ru.json @@ -2,10 +2,5 @@ ""@@info"": [ ""Here are translations that exist in but not in ."", ""After editing this file, you can run 'dart run slang apply --locale=ru' to quickly apply the newly added translations."" - ], - ""settingsTab"": { - ""receive"": { - ""autoFinish"": ""Auto Finish"" - } - } + ] } --- app/assets/i18n/_missing_translations_sv.json @@ -18,9 +18,6 @@ ""oled"": ""OLED"" } }, - ""receive"": { - ""autoFinish"": ""Auto Finish"" - }, ""other"": { ""title"": ""Other"", ""support"": ""Support LocalSend"", --- app/assets/i18n/_missing_translations_th.json @@ -2,10 +2,5 @@ ""@@info"": [ ""Here are translations that exist in but not in
    ."", ""After editing this file, you can run 'dart run slang apply --locale=tr' to quickly apply the newly added translations."" - ], - ""settingsTab"": { - ""receive"": { - ""autoFinish"": ""Auto Finish"" - } - } + ] } --- app/assets/i18n/_missing_translations_uk.json @@ -2,10 +2,5 @@ ""@@info"": [ ""Here are translations that exist in but not in ."", ""After editing this file, you can run 'dart run slang apply --locale=uk' to quickly apply the newly added translations."" - ], - ""settingsTab"": { - ""receive"": { - ""autoFinish"": ""Auto Finish"" - } - } + ] } --- app/assets/i18n/_missing_translations_ur.json @@ -18,9 +18,6 @@ ""oled"": ""OLED"" } }, - ""receive"": { - ""autoFinish"": ""Auto Finish"" - }, ""other"": { ""title"": ""Other"", ""support"": ""Support LocalSend"", --- app/assets/i18n/_missing_translations_vi.json @@ -4,9 +4,6 @@ ""After editing this file, you can run 'dart run slang apply --locale=vi' to quickly apply the newly added translations."" ], ""settingsTab"": { - ""receive"": { - ""autoFinish"": ""Auto Finish"" - }, ""other"": { ""title"": ""Other"", ""support"": ""Support LocalSend"", --- app/assets/i18n/_missing_translations_zh_CN.json @@ -2,10 +2,5 @@ ""@@info"": [ ""Here are translations that exist in but not in ."", ""After editing this file, you can run 'dart run slang apply --locale=zh-CN' to quickly apply the newly added translations."" - ], - ""settingsTab"": { - ""receive"": { - ""autoFinish"": ""Auto Finish"" - } - } + ] } --- app/assets/i18n/_missing_translations_zh_HK.json @@ -4,9 +4,6 @@ ""After editing this file, you can run 'dart run slang apply --locale=zh-HK' to quickly apply the newly added translations."" ], ""settingsTab"": { - ""receive"": { - ""autoFinish"": ""Auto Finish"" - }, ""other"": { ""title"": ""Other"", ""support"": ""Support LocalSend"", --- app/assets/i18n/_missing_translations_zh_TW.json @@ -4,9 +4,6 @@ ""After editing this file, you can run 'dart run slang apply --locale=zh-TW' to quickly apply the newly added translations."" ], ""settingsTab"": { - ""receive"": { - ""autoFinish"": ""Auto Finish"" - }, ""other"": { ""title"": ""Other"", ""support"": ""Support LocalSend"", --- app/assets/i18n/strings.i18n.json @@ -105,7 +105,6 @@ ""receive"": { ""title"": ""Receive"", ""quickSave"": ""@:general.quickSave"", - ""autoFinish"": ""Auto Finish"", ""destination"": ""Destination"", ""downloads"": ""(Downloads)"", ""saveToGallery"": ""Save media to gallery"", --- app/assets/i18n/strings_de.i18n.json @@ -105,7 +105,6 @@ ""receive"": { ""title"": ""Empfangen"", ""quickSave"": ""@:general.quickSave"", - ""autoFinish"": ""Autom. beenden"", ""destination"": ""Ziel-Ordner"", ""downloads"": ""(Downloads)"", ""saveToGallery"": ""Medien in die Gallerie speichern"", --- app/lib/gen/strings.g.dart @@ -4,7 +4,7 @@ /// To regenerate, run: `dart run slang` /// /// Locales: 33 -/// Strings: 9083 (275 per locale) +/// Strings: 9081 (275 per locale) // coverage:ignore-file --- app/lib/gen/strings_de.g.dart @@ -491,7 +491,6 @@ class _StringsSettingsTabReceiveDe extends _StringsSettingsTabReceiveEn { // Translations @override String get title => 'Empfangen'; @override String get quickSave => '${_root.general.quickSave}'; - @override String get autoFinish => 'Autom. beenden'; @override String get destination => 'Ziel-Ordner'; @override String get downloads => '(Downloads)'; @override String get saveToGallery => 'Medien in die Gallerie speichern'; --- app/lib/gen/strings_en.g.dart @@ -561,7 +561,6 @@ class _StringsSettingsTabReceiveEn { // Translations String get title => 'Receive'; String get quickSave => '${_root.general.quickSave}'; - String get autoFinish => 'Auto Finish'; String get destination => 'Destination'; String get downloads => '(Downloads)'; String get saveToGallery => 'Save media to gallery'; --- app/lib/model/state/settings_state.dart @@ -20,7 +20,6 @@ class SettingsState with SettingsStateMappable { final bool saveToGallery; // only Android, iOS final bool saveToHistory; final bool quickSave; // automatically accept file requests - final bool autoFinish; // automatically finish sessions final bool minimizeToTray; // minimize to tray instead of exiting the app final bool launchAtStartup; // Tracks if the option is enabled on Linux final bool autoStartLaunchMinimized; // start hidden in tray (only available when launchAtStartup is true) @@ -43,7 +42,6 @@ class SettingsState with SettingsStateMappable { required this.saveToGallery, required this.saveToHistory, required this.quickSave, - required this.autoFinish, required this.minimizeToTray, required this.launchAtStartup, required this.autoStartLaunchMinimized, --- app/lib/model/state/settings_state.mapper.dart @@ -52,9 +52,6 @@ class SettingsStateMapper extends ClassMapperBase { static bool _$quickSave(SettingsState v) => v.quickSave; static const Field _f$quickSave = Field('quickSave', _$quickSave); - static bool _$autoFinish(SettingsState v) => v.autoFinish; - static const Field _f$autoFinish = - Field('autoFinish', _$autoFinish); static bool _$minimizeToTray(SettingsState v) => v.minimizeToTray; static const Field _f$minimizeToTray = Field('minimizeToTray', _$minimizeToTray); @@ -96,7 +93,6 @@ class SettingsStateMapper extends ClassMapperBase { #saveToGallery: _f$saveToGallery, #saveToHistory: _f$saveToHistory, #quickSave: _f$quickSave, - #autoFinish: _f$autoFinish, #minimizeToTray: _f$minimizeToTray, #launchAtStartup: _f$launchAtStartup, #autoStartLaunchMinimized: _f$autoStartLaunchMinimized, @@ -121,7 +117,6 @@ class SettingsStateMapper extends ClassMapperBase { saveToGallery: data.dec(_f$saveToGallery), saveToHistory: data.dec(_f$saveToHistory), quickSave: data.dec(_f$quickSave), - autoFinish: data.dec(_f$autoFinish), minimizeToTray: data.dec(_f$minimizeToTray), launchAtStartup: data.dec(_f$launchAtStartup), autoStartLaunchMinimized: data.dec(_f$autoStartLaunchMinimized), @@ -200,7 +195,6 @@ abstract class SettingsStateCopyWith<$R, $In extends SettingsState, $Out> bool? saveToGallery, bool? saveToHistory, bool? quickSave, - bool? autoFinish, bool? minimizeToTray, bool? launchAtStartup, bool? autoStartLaunchMinimized, @@ -234,7 +228,6 @@ class _SettingsStateCopyWithImpl<$R, $Out> bool? saveToGallery, bool? saveToHistory, bool? quickSave, - bool? autoFinish, bool? minimizeToTray, bool? launchAtStartup, bool? autoStartLaunchMinimized, @@ -256,7 +249,6 @@ class _SettingsStateCopyWithImpl<$R, $Out> if (saveToGallery != null) #saveToGallery: saveToGallery, if (saveToHistory != null) #saveToHistory: saveToHistory, if (quickSave != null) #quickSave: quickSave, - if (autoFinish != null) #autoFinish: autoFinish, if (minimizeToTray != null) #minimizeToTray: minimizeToTray, if (launchAtStartup != null) #launchAtStartup: launchAtStartup, if (autoStartLaunchMinimized != null) @@ -282,7 +274,6 @@ class _SettingsStateCopyWithImpl<$R, $Out> saveToGallery: data.get(#saveToGallery, or: $value.saveToGallery), saveToHistory: data.get(#saveToHistory, or: $value.saveToHistory), quickSave: data.get(#quickSave, or: $value.quickSave), - autoFinish: data.get(#autoFinish, or: $value.autoFinish), minimizeToTray: data.get(#minimizeToTray, or: $value.minimizeToTray), launchAtStartup: data.get(#launchAtStartup, or: $value.launchAtStartup), autoStartLaunchMinimized: data.get(#autoStartLaunchMinimized, --- app/lib/pages/progress_page.dart @@ -90,8 +90,8 @@ class _ProgressPageState extends State with Refena { } Future _onWillPop() async { - final receiveSession = ref.read(serverProvider.select((s) => s?.session)); - final sendSession = ref.read(sendProvider)[widget.sessionId]; + final receiveSession = ref.watch(serverProvider.select((s) => s?.session)); + final sendSession = ref.watch(sendProvider)[widget.sessionId]; final SessionStatus? status = receiveSession?.status ?? sendSession?.status; if (status == null) { return true; --- app/lib/pages/tabs/settings_tab.dart @@ -214,13 +214,6 @@ class SettingsTab extends StatelessWidget { await ref.notifier(settingsProvider).setSaveToGallery(b); }, ), - _BooleanEntry( - label: t.settingsTab.receive.autoFinish, - value: vm.settings.autoFinish, - onChanged: (b) async { - await ref.notifier(settingsProvider).setAutoFinish(b); - }, - ), _BooleanEntry( label: t.settingsTab.receive.saveToHistory, value: vm.settings.saveToHistory, --- app/lib/provider/network/server/controller/receive_controller.dart @@ -16,7 +16,6 @@ import 'package:localsend_app/model/session_status.dart'; import 'package:localsend_app/model/state/send/send_session_state.dart'; import 'package:localsend_app/model/state/server/receive_session_state.dart'; import 'package:localsend_app/model/state/server/receiving_file.dart'; -import 'package:localsend_app/pages/home_page.dart'; import 'package:localsend_app/pages/progress_page.dart'; import 'package:localsend_app/pages/receive_page.dart'; import 'package:localsend_app/provider/device_info_provider.dart'; @@ -485,13 +484,12 @@ class ReceiveController { ), ), ); - if ((server.ref.read(settingsProvider).quickSave || server.ref.read(settingsProvider).autoFinish) && - server.getState().session?.message == null) { - // close the session **after** return of the response + if (server.ref.read(settingsProvider).quickSave && server.getState().session?.message == null) { + // close the session after return of the response Future.delayed(Duration.zero, () { closeSession(); // ignore: use_build_context_synchronously - Routerino.context.pushRootImmediately(() => const HomePage(initialTab: HomeTab.receive, appStart: false)); + Routerino.context.popUntilRoot(); }); } _logger.info('Received all files.'); --- app/lib/provider/persistence_provider.dart @@ -58,7 +58,6 @@ const _destinationKey = 'ls_destination'; const _saveToGallery = 'ls_save_to_gallery'; const _saveToHistory = 'ls_save_to_history'; const _quickSave = 'ls_quick_save'; -const _autoFinish = 'ls_auto_finish'; const _minimizeToTray = 'ls_minimize_to_tray'; const _launchAtStartup = 'ls_launch_at_startup'; const _autoStartLaunchMinimized = 'ls_auto_start_launch_minimized'; @@ -277,14 +276,6 @@ class PersistenceService { await _prefs.setBool(_quickSave, quickSave); } - bool isAutoFinish() { - return _prefs.getBool(_autoFinish) ?? false; - } - - Future setAutoFinish(bool autoFinish) async { - await _prefs.setBool(_autoFinish, autoFinish); - } - bool isMinimizeToTray() { return _prefs.getBool(_minimizeToTray) ?? false; } --- app/lib/provider/settings_provider.dart @@ -31,7 +31,6 @@ class SettingsService extends Notifier { saveToGallery: _service.isSaveToGallery(), saveToHistory: _service.isSaveToHistory(), quickSave: _service.isQuickSave(), - autoFinish: _service.isAutoFinish(), minimizeToTray: _service.isMinimizeToTray(), launchAtStartup: _service.isLaunchAtStartup(), autoStartLaunchMinimized: _service.isAutoStartLaunchMinimized(), @@ -114,13 +113,6 @@ class SettingsService extends Notifier { ); } - Future setAutoFinish(bool autoFinish) async { - await _service.setAutoFinish(autoFinish); - state = state.copyWith( - autoFinish: autoFinish, - ); - } - Future setMinimizeToTray(bool minimizeToTray) async { await _service.setMinimizeToTray(minimizeToTray); state = state.copyWith( ",localsend,localsend,Dart,Dart,58423.0,3136.0,An open-source cross-platform alternative to AirDrop,localsend_localsend,NEW_FEAT,Obvious 1887fd91e1575f3ed329823d73d3594f444823fa,2025-03-31 04:54:20,vercel-release-bot,v15.3.0-canary.26,False,33,33,66,"--- lerna.json @@ -16,5 +16,5 @@ ""registry"": ""https://registry.npmjs.org/"" } }, - ""version"": ""15.3.0-canary.26"" + ""version"": ""15.3.0-canary.25"" } --- packages/create-next-app/package.json @@ -1,6 +1,6 @@ { ""name"": ""create-next-app"", - ""version"": ""15.3.0-canary.26"", + ""version"": ""15.3.0-canary.25"", ""keywords"": [ ""react"", ""next"", --- packages/eslint-config-next/package.json @@ -1,6 +1,6 @@ { ""name"": ""eslint-config-next"", - ""version"": ""15.3.0-canary.26"", + ""version"": ""15.3.0-canary.25"", ""description"": ""ESLint configuration used by Next.js."", ""main"": ""index.js"", ""license"": ""MIT"", @@ -10,7 +10,7 @@ }, ""homepage"": ""https://nextjs.org/docs/app/api-reference/config/eslint"", ""dependencies"": { - ""@next/eslint-plugin-next"": ""15.3.0-canary.26"", + ""@next/eslint-plugin-next"": ""15.3.0-canary.25"", ""@rushstack/eslint-patch"": ""^1.10.3"", ""@typescript-eslint/eslint-plugin"": ""^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0"", ""@typescript-eslint/parser"": ""^5.4.2 || ^6.0.0 || ^7.0.0 || ^8.0.0"", --- packages/eslint-plugin-next/package.json @@ -1,6 +1,6 @@ { ""name"": ""@next/eslint-plugin-next"", - ""version"": ""15.3.0-canary.26"", + ""version"": ""15.3.0-canary.25"", ""description"": ""ESLint plugin for Next.js."", ""main"": ""dist/index.js"", ""license"": ""MIT"", --- packages/font/package.json @@ -1,7 +1,7 @@ { ""name"": ""@next/font"", ""private"": true, - ""version"": ""15.3.0-canary.26"", + ""version"": ""15.3.0-canary.25"", ""repository"": { ""url"": ""vercel/next.js"", ""directory"": ""packages/font"" --- packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { ""name"": ""@next/bundle-analyzer"", - ""version"": ""15.3.0-canary.26"", + ""version"": ""15.3.0-canary.25"", ""main"": ""index.js"", ""types"": ""index.d.ts"", ""license"": ""MIT"", --- packages/next-codemod/package.json @@ -1,6 +1,6 @@ { ""name"": ""@next/codemod"", - ""version"": ""15.3.0-canary.26"", + ""version"": ""15.3.0-canary.25"", ""license"": ""MIT"", ""repository"": { ""type"": ""git"", --- packages/next-env/package.json @@ -1,6 +1,6 @@ { ""name"": ""@next/env"", - ""version"": ""15.3.0-canary.26"", + ""version"": ""15.3.0-canary.25"", ""keywords"": [ ""react"", ""next"", --- packages/next-mdx/package.json @@ -1,6 +1,6 @@ { ""name"": ""@next/mdx"", - ""version"": ""15.3.0-canary.26"", + ""version"": ""15.3.0-canary.25"", ""main"": ""index.js"", ""license"": ""MIT"", ""repository"": { --- packages/next-plugin-rspack/package.json @@ -1,6 +1,6 @@ { ""name"": ""@next/plugin-rspack"", - ""version"": ""15.3.0-canary.26"", + ""version"": ""15.3.0-canary.25"", ""repository"": { ""url"": ""vercel/next.js"", ""directory"": ""packages/next-plugin-rspack"" --- packages/next-plugin-storybook/package.json @@ -1,6 +1,6 @@ { ""name"": ""@next/plugin-storybook"", - ""version"": ""15.3.0-canary.26"", + ""version"": ""15.3.0-canary.25"", ""repository"": { ""url"": ""vercel/next.js"", ""directory"": ""packages/next-plugin-storybook"" --- packages/next-polyfill-module/package.json @@ -1,6 +1,6 @@ { ""name"": ""@next/polyfill-module"", - ""version"": ""15.3.0-canary.26"", + ""version"": ""15.3.0-canary.25"", ""description"": ""A standard library polyfill for ES Modules supporting browsers (Edge 16+, Firefox 60+, Chrome 61+, Safari 10.1+)"", ""main"": ""dist/polyfill-module.js"", ""license"": ""MIT"", --- packages/next-polyfill-nomodule/package.json @@ -1,6 +1,6 @@ { ""name"": ""@next/polyfill-nomodule"", - ""version"": ""15.3.0-canary.26"", + ""version"": ""15.3.0-canary.25"", ""description"": ""A polyfill for non-dead, nomodule browsers."", ""main"": ""dist/polyfill-nomodule.js"", ""license"": ""MIT"", --- packages/next-swc/package.json @@ -1,6 +1,6 @@ { ""name"": ""@next/swc"", - ""version"": ""15.3.0-canary.26"", + ""version"": ""15.3.0-canary.25"", ""private"": true, ""files"": [ ""native/"" --- packages/next/package.json @@ -1,6 +1,6 @@ { ""name"": ""next"", - ""version"": ""15.3.0-canary.26"", + ""version"": ""15.3.0-canary.25"", ""description"": ""The React Framework"", ""main"": ""./dist/server/next.js"", ""license"": ""MIT"", @@ -100,7 +100,7 @@ ] }, ""dependencies"": { - ""@next/env"": ""15.3.0-canary.26"", + ""@next/env"": ""15.3.0-canary.25"", ""@swc/counter"": ""0.1.3"", ""@swc/helpers"": ""0.5.15"", ""busboy"": ""1.6.0"", @@ -164,11 +164,11 @@ ""@jest/types"": ""29.5.0"", ""@mswjs/interceptors"": ""0.23.0"", ""@napi-rs/triples"": ""1.2.0"", - ""@next/font"": ""15.3.0-canary.26"", - ""@next/polyfill-module"": ""15.3.0-canary.26"", - ""@next/polyfill-nomodule"": ""15.3.0-canary.26"", - ""@next/react-refresh-utils"": ""15.3.0-canary.26"", - ""@next/swc"": ""15.3.0-canary.26"", + ""@next/font"": ""15.3.0-canary.25"", + ""@next/polyfill-module"": ""15.3.0-canary.25"", + ""@next/polyfill-nomodule"": ""15.3.0-canary.25"", + ""@next/react-refresh-utils"": ""15.3.0-canary.25"", + ""@next/swc"": ""15.3.0-canary.25"", ""@opentelemetry/api"": ""1.6.0"", ""@playwright/test"": ""1.41.2"", ""@storybook/addon-a11y"": ""8.6.0"", --- packages/react-refresh-utils/package.json @@ -1,6 +1,6 @@ { ""name"": ""@next/react-refresh-utils"", - ""version"": ""15.3.0-canary.26"", + ""version"": ""15.3.0-canary.25"", ""description"": ""An experimental package providing utilities for React Refresh."", ""repository"": { ""url"": ""vercel/next.js"", --- packages/third-parties/package.json @@ -1,6 +1,6 @@ { ""name"": ""@next/third-parties"", - ""version"": ""15.3.0-canary.26"", + ""version"": ""15.3.0-canary.25"", ""repository"": { ""url"": ""vercel/next.js"", ""directory"": ""packages/third-parties"" @@ -26,7 +26,7 @@ ""third-party-capital"": ""1.0.20"" }, ""devDependencies"": { - ""next"": ""15.3.0-canary.26"", + ""next"": ""15.3.0-canary.25"", ""outdent"": ""0.8.0"", ""prettier"": ""2.5.1"", ""typescript"": ""5.8.2"" --- pnpm-lock.yaml @@ -829,7 +829,7 @@ importers: packages/eslint-config-next: dependencies: '@next/eslint-plugin-next': - specifier: 15.3.0-canary.26 + specifier: 15.3.0-canary.25 version: link:../eslint-plugin-next '@rushstack/eslint-patch': specifier: ^1.10.3 @@ -893,7 +893,7 @@ importers: packages/next: dependencies: '@next/env': - specifier: 15.3.0-canary.26 + specifier: 15.3.0-canary.25 version: link:../next-env '@swc/counter': specifier: 0.1.3 @@ -1018,19 +1018,19 @@ importers: specifier: 1.2.0 version: 1.2.0 '@next/font': - specifier: 15.3.0-canary.26 + specifier: 15.3.0-canary.25 version: link:../font '@next/polyfill-module': - specifier: 15.3.0-canary.26 + specifier: 15.3.0-canary.25 version: link:../next-polyfill-module '@next/polyfill-nomodule': - specifier: 15.3.0-canary.26 + specifier: 15.3.0-canary.25 version: link:../next-polyfill-nomodule '@next/react-refresh-utils': - specifier: 15.3.0-canary.26 + specifier: 15.3.0-canary.25 version: link:../react-refresh-utils '@next/swc': - specifier: 15.3.0-canary.26 + specifier: 15.3.0-canary.25 version: link:../next-swc '@opentelemetry/api': specifier: 1.6.0 @@ -1712,7 +1712,7 @@ importers: version: 1.0.20 devDependencies: next: - specifier: 15.3.0-canary.26 + specifier: 15.3.0-canary.25 version: link:../next outdent: specifier: 0.8.0 ",next.js,vercel,JavaScript,JavaScript,129891.0,27821.0,The React Framework,vercel_next.js,CODE_IMPROVEMENT,Code change: type annotation added 2272cf2f35fafd5cd486bfb4ee89df5bbc625b97,,yfszzx,fix two bug,False,1,1,0,"--- images_history.py @@ -133,7 +133,7 @@ def archive_images(dir_name, date_to): date = sort_array[loads_num][2] filenames = [x[1] for x in sort_array] else: - date = sort_array[-1][2] + date = None if len(sort_array) == 0 else sort_array[-1][2] filenames = [x[1] for x in sort_array] filenames = [x[1] for x in sort_array if x[2]>= date] _, image_list, _, visible_num = get_recent_images(1, 0, filenames)",AUTOMATIC1111_stable-diffusion-webui.json,,,,,,,AUTOMATIC1111_stable-diffusion-webui.json,BUG_FIX,"5, obvious" cf1c9f99bd211b6fe9364f9b1a306bea29d59adb,2025-02-19 13:57:58,Zezhong Li,Update README.md,False,1,1,2,"--- README.md @@ -173,7 +173,7 @@ NOTE: the ranking has no particular order. | TYPE | Venue | Paper Title and Paper Interpretation | Code | | :----------------------------------------------------------: | :---------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | -| ![univariate time series forecasting](https://img.shields.io/badge/-Univariate-brightgreen) | *CIKM'24* | Towards Uncertainty Quantification for Time Series Segmentation | [UQ-TSS](https://github.com/ecdraayer/UQ-TSS)![Stars](https://img.shields.io/github/stars/ecdraayer/UQ-TSS)| +| ![univariate time series forecasting](https://img.shields.io/badge/-Univariate-brightgreen) | *CIKM'24* | Towards Uncertainty Quantification for Time Series Segmentation | [UQ-TSS](https://github.com/ecdraayer/UQ-TSS) | | ![multivariate time series forecasting](https://img.shields.io/badge/-Multivariate-red) | *SDM'24* | Pattern-based Time Series Semantic Segmentation with Gradual State Transitions | [Patss](https://gitlab.kuleuven.be/u0143709/patss) [Dataset](https://rdr.kuleuven.be/dataset.xhtml?persistentId=doi:10.48804/G2YRDR) | | ![spatio-temporal forecasting](https://img.shields.io/badge/-Tensor-blue) | *TKDE'24* | Discovering Dynamic Patterns From Spatiotemporal Data With Time-Varying Low-Rank Autoregression | [Vars](https://github.com/xinychen/vars)![Stars](https://img.shields.io/github/stars/xinychen/vars) | | ![multivariate time series forecasting](https://img.shields.io/badge/-Multivariate-red) | *WWW '24* | E2Usd: Efficient-yet-effective Unsupervised State Detection for Multivariate Time Series 🌟 | [E2Usd](https://github.com/AI4CTS/E2Usd)![Stars](https://img.shields.io/github/stars/AI4CTS/E2Usd) | ",awesome-time-series-segmentation-papers,lzz19980125,MATLAB,MATLAB,454.0,8.0,This repository contains a reading list of papers on Time Series Segmentation. This repository is still being continuously improved.,lzz19980125_awesome-time-series-segmentation-papers,DOC_CHANGE,changes in readme 3d44cc801264034183abe5c0e673cf9427b1d0c0,2024-01-27 21:05:20,Suoqin Jin,Add files via upload,False,10,9,19,"--- man/identifyOverExpressedGenes.Rd @@ -51,11 +51,11 @@ When group.DE.combined = TRUE, it will perform DE analysis by combining all cell \item{return.object}{whether to return the object; otherwise return a data frame consisting of over-expressed signaling genes associated with each cell group} -\item{thresh.pc}{Threshold of the fraction of cells expressed in one cluster, i.e., thresh.pc = 0.1} +\item{thresh.pc}{Threshold of the percent of cells expressed in one cluster} -\item{thresh.fc}{Threshold of Log Fold Change, i.e., thresh.pc = 0.1} +\item{thresh.fc}{Threshold of Log Fold Change} -\item{thresh.p}{Threshold of p-values, i.e., thresh.pc = 0.05} +\item{thresh.p}{Threshold of p-values} \item{do.DE}{Whether to perform differential expression analysis. By default do.DE = TRUE; When do.DE = FALSE, selecting over-expressed genes that are expressed in more than `min.cells` cells.} --- man/netVisual_heatmap.Rd @@ -11,7 +11,7 @@ netVisual_heatmap( signaling = NULL, slot.name = c(""netP"", ""net""), color.use = NULL, - color.heatmap = NULL, + color.heatmap = c(""Reds""), title.name = NULL, width = NULL, height = NULL, @@ -39,8 +39,7 @@ netVisual_heatmap( \item{color.use}{the character vector defining the color of each cell group} -\item{color.heatmap}{A vector of two colors corresponding to max/min values, or a color name in brewer.pal only when the data in the heatmap do not contain negative values. -By default, color.heatmap = c('#2166ac','#b2182b') when taking a merged CellChat object as input; color.heatmap = ""Reds"" when taking a single CellChat object as input.} +\item{color.heatmap}{A vector of two colors corresponding to max/min values, or a color name in brewer.pal only when the data in the heatmap do not contain negative values} \item{title.name}{the name of the title} @@ -68,13 +67,13 @@ By default, color.heatmap = c('#2166ac','#b2182b') when taking a merged CellChat an object of ComplexHeatmap } \description{ -This heatmap can be used to 1) show differential number of interactions or interaction strength in the cell-cell communication network between two datasets; -2) the number of interactions or interaction strength in a single dataset; -3) the inferred cell-cell communication network in a single dataset, defined by `signaling`. Please see @Details below for detailed explanations of this heatmap plot. +This heatmap can be used to show differential number of interactions or interaction strength in the cell-cell communication network between two datasets; +the number of interactions or interaction strength in a single dataset +the inferred cell-cell communication network in single dataset, defined by `signaling` } \details{ When show differential number of interactions or interaction strength in the cell-cell communication network between two datasets, the width of edges represent the relative number of interactions or interaction strength. Red (or blue) colored edges represent increased (or decreased) signaling in the second dataset compared to the first one. -The top colored bar plot represents the sum of absolute values displayed in each column of the heatmap. The right colored bar plot represents the sum of absolute values in each row. +The top colored bar plot represents the sum of column of values displayed in the heatmap. The right colored bar plot represents the sum of row of values. } ",cellchat,jinworks,R,R,367.0,61.0,"R toolkit for inference, visualization and analysis of cell-cell communication from single-cell and spatially resolved transcriptomics",jinworks_cellchat,CONFIG_CHANGE,files uploaded c51a37f03a00157b23985c42c5fabe1d6bf3fd5f,2025-04-02 01:16:15,Kevin Gleason,[MHLO] Allow partial conversion between StableHLO and MHLO for ops with direct HLO lowerings PiperOrigin-RevId: 742799109,False,21,9,30,"--- third_party/xla/xla/mlir_hlo/mhlo/transforms/mhlo_passes.td @@ -181,12 +181,8 @@ def HloLegalizeToStablehloPass : Pass<""hlo-legalize-to-stablehlo"", ""ModuleOp""> { def StablehloLegalizeToHloPass : Pass<""stablehlo-legalize-to-hlo"", ""ModuleOp""> { let summary = ""Legalize StableHLO to HLO.""; + let constructor = ""createStablehloLegalizeToHloPass()""; let dependentDialects = [""mhlo::MhloDialect""]; - let options = [ - Option<""convert_xla_supported_stablehlo_"", ""convert-xla-supported-stablehlo"", - ""bool"", /*default=*/""true"", - ""Don't convert ops that have direct HLO lowering support.""> - ]; } def PrepareForExportPass : Pass<""xla-prepare-for-export"", ""mlir::func::FuncOp""> { --- third_party/xla/xla/mlir_hlo/mhlo/transforms/passes.h @@ -72,6 +72,9 @@ std::unique_ptr> createCollapseElementwiseMapPass(); // Pass to replace unsigned types with signless integers. std::unique_ptr> createConvertToSignlessPass(); +// Legalizes from the StableHLO dialect to the MHLO dialect. +std::unique_ptr> createStablehloLegalizeToHloPass(); + // Test passes. std::unique_ptr createTestInferShapedTypeMethodsPass(); std::unique_ptr createTestMaterializeBroadcastsPass(); --- third_party/xla/xla/mlir_hlo/mhlo/transforms/stablehlo_legalize_to_hlo/stablehlo_legalize_to_hlo_pass.cc @@ -41,17 +41,11 @@ namespace { struct StablehloLegalizeToHloPass : public impl::StablehloLegalizeToHloPassBase { - using StablehloLegalizeToHloPassBase::StablehloLegalizeToHloPassBase; void runOnOperation() override { ConversionTarget target(getContext()); target.addIllegalDialect(); target.addLegalDialect(); - // Allow injecting legal ops to permit gradual migration. - if (!convert_xla_supported_stablehlo_) { - target.addLegalOp(); - } - stablehlo::StablehloToHloTypeConverter converter; RewritePatternSet patterns(&getContext()); stablehlo::populateStablehloToHloPatterns(&patterns, &converter, @@ -69,5 +63,10 @@ struct StablehloLegalizeToHloPass } // namespace +std::unique_ptr> +createStablehloLegalizeToHloPass() { + return std::make_unique(); +} + } // namespace mhlo } // namespace mlir --- third_party/xla/xla/mlir_hlo/tests/Dialect/mhlo/stablehlo-legalize-to-hlo-partial.mlir @@ -1,10 +0,0 @@ -// RUN: mlir-hlo-opt --stablehlo-legalize-to-hlo=convert-xla-supported-stablehlo=false --split-input-file --verify-diagnostics %s | FileCheck %s - - -// CHECK-LABEL: op_constant -func.func @op_constant(%arg0: tensor) -> tensor { - // CHECK: stablehlo.constant - // CHECK-NOT: mhlo.constant - %cst = stablehlo.constant dense<0.000000e+00> : tensor - return %cst : tensor -} ",tensorflow,tensorflow,C++,C++,188388.0,74565.0,An Open Source Machine Learning Framework for Everyone,tensorflow_tensorflow,CODE_IMPROVEMENT,Code change: type annotation added 7475d568da137b661ce23edc24446871d58c67ef,2024-08-29 04:29:25,Joe Savona,"[wip][compiler] Infer optional dependencies Updates PropagateScopeDeps and DeriveMinimalDeps to understand optional dependency paths (`a?.b`). There a few key pieces to this: In PropagateScopeDeps we jump through some hoops to work around the awkward structure of nested OptionalExpressions. This is much easier in HIR form, but I managed to get this pretty close and i think it will be landable with further cleanup. A good chunk of this is avoiding prematurely registering a value as a dependency - there are a bunch of indirections in the ReactiveFunction structure: ``` t0 = OptionalExpression SequenceExpression t0 = Sequence ... LoadLocal t0 ``` Where if at any point we call `visitOperand()` we'll prematurely register a dependency instead of declareProperty(). The other bit is that optionals can be optional=false for nested member expressions where not all the parts are actually optional (`foo.bar?.bar.call()`). And of course, parts of an optional chain can still be conditional even when optional=true (for example the `x` in `foo.bar?.[x]?.baz`). Not all of this is tested yet so there are likely bugs still. The other bit is DeriveMinimalDeps, which is thankfully easier. We add OptionalAccess and OptionalDep and update the merge and reducing logic for these cases. There is probably still more to update though, for things like merging subtrees. There are a lot of ternaries that assume a result can be exactly one of two states (conditional/unconditional, dependency/access) and these assumptions don't hold anymore. I'd like to refactor to dependency/access separate from conditional/optional/unconditional. Also, the reducing logic isn't quite right: once a child is optional we keep inferring all the parents as optional too, losing some precision. I need to adjust the reducing logic to let children decide whether their path token is optional or not. ghstack-source-id: 207842ac64560cf0f93ec96eb9ae1f17c62493ac Pull Request resolved: https://github.com/facebook/react/pull/30819",False,755,128,883,"--- compiler/packages/babel-plugin-react-compiler/src/HIR/Environment.ts @@ -224,14 +224,6 @@ const EnvironmentConfigSchema = z.object({ enableReactiveScopesInHIR: z.boolean().default(true), - /** - * Enables inference of optional dependency chains. Without this flag - * a property chain such as `props?.items?.foo` will infer as a dep on - * just `props`. With this flag enabled, we'll infer that full path as - * the dependency. - */ - enableOptionalDependencies: z.boolean().default(false), - /* * Enable validation of hooks to partially check that the component honors the rules of hooks. * When disabled, the component is assumed to follow the rules (though the Babel plugin looks --- compiler/packages/babel-plugin-react-compiler/src/HIR/PrintHIR.ts @@ -191,7 +191,7 @@ export function printTerminal(terminal: Terminal): Array | string { case 'branch': { value = `[${terminal.id}] Branch (${printPlace(terminal.test)}) then:bb${ terminal.consequent - } else:bb${terminal.alternate} fallthrough:bb${terminal.fallthrough}`; + } else:bb${terminal.alternate}`; break; } case 'logical': { --- compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/CodegenReactiveFunction.ts @@ -1446,19 +1446,9 @@ function codegenDependency( dependency: ReactiveScopeDependency, ): t.Expression { let object: t.Expression = convertIdentifier(dependency.identifier); - if (dependency.path.length !== 0) { - const hasOptional = dependency.path.some(path => path.optional); + if (dependency.path !== null) { for (const path of dependency.path) { - if (hasOptional) { - object = t.optionalMemberExpression( - object, - t.identifier(path.property), - false, - path.optional, - ); - } else { - object = t.memberExpression(object, t.identifier(path.property)); - } + object = t.memberExpression(object, t.identifier(path.property)); } } return object; --- compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/DeriveMinimalDependencies.ts @@ -60,14 +60,13 @@ export class ReactiveScopeDependencyTree { const {path} = dep; let currNode = this.#getOrCreateRoot(dep.identifier); + const accessType = inConditional + ? PropertyAccessType.ConditionalAccess + : PropertyAccessType.UnconditionalAccess; + for (const item of path) { // all properties read 'on the way' to a dependency are marked as 'access' let currChild = getOrMakeProperty(currNode, item.property); - const accessType = inConditional - ? PropertyAccessType.ConditionalAccess - : item.optional - ? PropertyAccessType.OptionalAccess - : PropertyAccessType.UnconditionalAccess; currChild.accessType = merge(currChild.accessType, accessType); currNode = currChild; } @@ -78,9 +77,7 @@ export class ReactiveScopeDependencyTree { */ const depType = inConditional ? PropertyAccessType.ConditionalDependency - : isOptional(currNode.accessType) - ? PropertyAccessType.OptionalDependency - : PropertyAccessType.UnconditionalDependency; + : PropertyAccessType.UnconditionalDependency; currNode.accessType = merge(currNode.accessType, depType); } @@ -88,12 +85,10 @@ export class ReactiveScopeDependencyTree { deriveMinimalDependencies(): Set { const results = new Set(); for (const [rootId, rootNode] of this.#roots.entries()) { - const deps = deriveMinimalDependenciesInSubtree(rootNode, null); + const deps = deriveMinimalDependenciesInSubtree(rootNode); CompilerError.invariant( deps.every( - dep => - dep.accessType === PropertyAccessType.UnconditionalDependency || - dep.accessType == PropertyAccessType.OptionalDependency, + dep => dep.accessType === PropertyAccessType.UnconditionalDependency, ), { reason: @@ -178,27 +173,6 @@ export class ReactiveScopeDependencyTree { } return res.flat().join('\n'); } - - debug(): string { - const buf: Array = [`tree() [`]; - for (const [rootId, rootNode] of this.#roots) { - buf.push(`${printIdentifier(rootId)} (${rootNode.accessType}):`); - this.#debugImpl(buf, rootNode, 1); - } - buf.push(']'); - return buf.length > 2 ? buf.join('\n') : buf.join(''); - } - - #debugImpl( - buf: Array, - node: DependencyNode, - depth: number = 0, - ): void { - for (const [property, childNode] of node.properties) { - buf.push(`${' '.repeat(depth)}.${property} (${childNode.accessType}):`); - this.#debugImpl(buf, childNode, depth + 1); - } - } } /* @@ -222,10 +196,8 @@ export class ReactiveScopeDependencyTree { */ enum PropertyAccessType { ConditionalAccess = 'ConditionalAccess', - OptionalAccess = 'OptionalAccess', UnconditionalAccess = 'UnconditionalAccess', ConditionalDependency = 'ConditionalDependency', - OptionalDependency = 'OptionalDependency', UnconditionalDependency = 'UnconditionalDependency', } @@ -239,16 +211,9 @@ function isUnconditional(access: PropertyAccessType): boolean { function isDependency(access: PropertyAccessType): boolean { return ( access === PropertyAccessType.ConditionalDependency || - access === PropertyAccessType.OptionalDependency || access === PropertyAccessType.UnconditionalDependency ); } -function isOptional(access: PropertyAccessType): boolean { - return ( - access === PropertyAccessType.OptionalAccess || - access === PropertyAccessType.OptionalDependency - ); -} function merge( access1: PropertyAccessType, @@ -257,7 +222,6 @@ function merge( const resultIsUnconditional = isUnconditional(access1) || isUnconditional(access2); const resultIsDependency = isDependency(access1) || isDependency(access2); - const resultIsOptional = isOptional(access1) || isOptional(access2); /* * Straightforward merge. @@ -273,12 +237,6 @@ function merge( } else { return PropertyAccessType.UnconditionalAccess; } - } else if (resultIsOptional) { - if (resultIsDependency) { - return PropertyAccessType.OptionalDependency; - } else { - return PropertyAccessType.OptionalAccess; - } } else { if (resultIsDependency) { return PropertyAccessType.ConditionalDependency; @@ -298,34 +256,19 @@ type ReduceResultNode = { accessType: PropertyAccessType; }; -function promoteResult( - accessType: PropertyAccessType, - path: {property: string; optional: boolean} | null, -): Array { - const result: ReduceResultNode = { +const promoteUncondResult = [ + { relativePath: [], - accessType, - }; - if (path !== null) { - result.relativePath.push(path); - } - return [result]; -} + accessType: PropertyAccessType.UnconditionalDependency, + }, +]; -function prependPath( - results: Array, - path: {property: string; optional: boolean} | null, -): Array { - if (path === null) { - return results; - } - return results.map(result => { - return { - accessType: result.accessType, - relativePath: [path, ...result.relativePath], - }; - }); -} +const promoteCondResult = [ + { + relativePath: [], + accessType: PropertyAccessType.ConditionalDependency, + }, +]; /* * Recursively calculates minimal dependencies in a subtree. @@ -334,76 +277,42 @@ function prependPath( */ function deriveMinimalDependenciesInSubtree( dep: DependencyNode, - property: string | null, ): Array { const results: Array = []; for (const [childName, childNode] of dep.properties) { - const childResult = deriveMinimalDependenciesInSubtree( - childNode, - childName, + const childResult = deriveMinimalDependenciesInSubtree(childNode).map( + ({relativePath, accessType}) => { + return { + relativePath: [ + {property: childName, optional: false}, + ...relativePath, + ], + accessType, + }; + }, ); results.push(...childResult); } switch (dep.accessType) { case PropertyAccessType.UnconditionalDependency: { - return promoteResult( - PropertyAccessType.UnconditionalDependency, - property !== null ? {property, optional: false} : null, - ); + return promoteUncondResult; } case PropertyAccessType.UnconditionalAccess: { if ( results.every( ({accessType}) => - accessType === PropertyAccessType.UnconditionalDependency || - accessType === PropertyAccessType.OptionalDependency, + accessType === PropertyAccessType.UnconditionalDependency, ) ) { // all children are unconditional dependencies, return them to preserve granularity - return prependPath( - results, - property !== null ? {property, optional: false} : null, - ); + return results; } else { /* * at least one child is accessed conditionally, so this node needs to be promoted to * unconditional dependency */ - return promoteResult( - PropertyAccessType.UnconditionalDependency, - property !== null ? {property, optional: false} : null, - ); - } - } - case PropertyAccessType.OptionalDependency: { - return promoteResult( - PropertyAccessType.OptionalDependency, - property !== null ? {property, optional: true} : null, - ); - } - case PropertyAccessType.OptionalAccess: { - if ( - results.every( - ({accessType}) => - accessType === PropertyAccessType.UnconditionalDependency || - accessType === PropertyAccessType.OptionalDependency, - ) - ) { - // all children are unconditional dependencies, return them to preserve granularity - return prependPath( - results, - property !== null ? {property, optional: true} : null, - ); - } else { - /* - * at least one child is accessed conditionally, so this node needs to be promoted to - * unconditional dependency - */ - return promoteResult( - PropertyAccessType.OptionalDependency, - property !== null ? {property, optional: true} : null, - ); + return promoteUncondResult; } } case PropertyAccessType.ConditionalAccess: @@ -419,19 +328,13 @@ function deriveMinimalDependenciesInSubtree( * unconditional access. * Truncate results of child nodes here, since we shouldn't access them anyways */ - return promoteResult( - PropertyAccessType.ConditionalDependency, - property !== null ? {property, optional: true} : null, - ); + return promoteCondResult; } else { /* * at least one child is accessed unconditionally, so this node can be promoted to * unconditional dependency */ - return promoteResult( - PropertyAccessType.UnconditionalDependency, - property !== null ? {property, optional: true} : null, - ); + return promoteUncondResult; } } default: { --- compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/PrintReactiveFunction.ts @@ -113,7 +113,7 @@ export function printDependency(dependency: ReactiveScopeDependency): string { const identifier = printIdentifier(dependency.identifier) + printType(dependency.identifier.type); - return `${identifier}${dependency.path.map(token => `${token.optional ? '?.' : '.'}${token.property}`).join('')}`; + return `${identifier}${dependency.path.map(token => `.${token.property}`).join('')}`; } export function printReactiveInstructions( --- compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/PropagateScopeDependencies.ts @@ -6,7 +6,6 @@ */ import {CompilerError} from '../CompilerError'; -import {Environment} from '../HIR'; import { areEqualPaths, BlockId, @@ -23,7 +22,6 @@ import { PrunedReactiveScopeBlock, ReactiveFunction, ReactiveInstruction, - ReactiveOptionalCallValue, ReactiveScope, ReactiveScopeBlock, ReactiveScopeDependency, @@ -67,7 +65,11 @@ export function propagateScopeDependencies(fn: ReactiveFunction): void { }); } } - visitReactiveFunction(fn, new PropagationVisitor(fn.env), context); + visitReactiveFunction( + fn, + new PropagationVisitor(fn.env.config.enableTreatFunctionDepsAsConditional), + context, + ); } type TemporariesUsedOutsideDefiningScope = { @@ -463,7 +465,6 @@ class Context { #getProperty( object: Place, property: string, - optional: boolean, ): ReactiveScopePropertyDependency { const resolvedObject = this.resolveTemporary(object); const resolvedDependency = this.#properties.get(resolvedObject.identifier); @@ -484,18 +485,13 @@ class Context { }; } - objectDependency.path.push({property, optional}); + objectDependency.path.push({property, optional: false}); return objectDependency; } - declareProperty( - lvalue: Place, - object: Place, - property: string, - optional: boolean, - ): void { - const nextDependency = this.#getProperty(object, property, optional); + declareProperty(lvalue: Place, object: Place, property: string): void { + const nextDependency = this.#getProperty(object, property); this.#properties.set(lvalue.identifier, nextDependency); } @@ -575,8 +571,8 @@ class Context { this.visitDependency(dependency); } - visitProperty(object: Place, property: string, optional: boolean): void { - const nextDependency = this.#getProperty(object, property, optional); + visitProperty(object: Place, property: string): void { + const nextDependency = this.#getProperty(object, property); this.visitDependency(nextDependency); } @@ -675,11 +671,12 @@ class Context { } class PropagationVisitor extends ReactiveFunctionVisitor { - env: Environment; + enableTreatFunctionDepsAsConditional = false; - constructor(env: Environment) { + constructor(enableTreatFunctionDepsAsConditional: boolean) { super(); - this.env = env; + this.enableTreatFunctionDepsAsConditional = + enableTreatFunctionDepsAsConditional; } override visitScope(scope: ReactiveScopeBlock, context: Context): void { @@ -747,212 +744,51 @@ class PropagationVisitor extends ReactiveFunctionVisitor { }); } - extractOptionalProperty( - context: Context, - optionalValue: ReactiveOptionalCallValue, - lvalue: Place, - ): { - lvalue: Place; - object: Place; - property: string; - optional: boolean; - } | null { - const sequence = optionalValue.value; - CompilerError.invariant(sequence.kind === 'SequenceExpression', { - reason: 'Expected OptionalExpression value to be a SequenceExpression', - description: `Found a \`${sequence.kind}\``, - loc: sequence.loc, - }); - /** - * Base case: inner ` ""."" or ""?."""" ` - *``` - * = OptionalExpression optional=true (`optionalValue` is here) - * Sequence (`sequence` is here) - * t0 = LoadLocal - * Sequence - * t1 = PropertyLoad t0 . - * LoadLocal t1 - * ``` - */ - if ( - sequence.instructions.length === 1 && - sequence.instructions[0].value.kind === 'LoadLocal' && - sequence.instructions[0].lvalue !== null && - sequence.instructions[0].value.place.identifier.name !== null && - !context.isUsedOutsideDeclaringScope(sequence.instructions[0].lvalue) && - sequence.value.kind === 'SequenceExpression' && - sequence.value.instructions.length === 1 && - sequence.value.instructions[0].value.kind === 'PropertyLoad' && - sequence.value.instructions[0].value.object.identifier.id === - sequence.instructions[0].lvalue.identifier.id && - sequence.value.instructions[0].lvalue !== null && - sequence.value.value.kind === 'LoadLocal' && - sequence.value.value.place.identifier.id === - sequence.value.instructions[0].lvalue.identifier.id - ) { - context.declareTemporary( - sequence.instructions[0].lvalue, - sequence.instructions[0].value.place, - ); - const propertyLoad = sequence.value.instructions[0].value; - return { - lvalue, - object: propertyLoad.object, - property: propertyLoad.property, - optional: optionalValue.optional, - }; - } - /** - * Composed case: ` ""."" or ""?."" ` - * - * This case is convoluted, note how `t0` appears as an lvalue *twice* - * and then is an operand of an intermediate LoadLocal and then the - * object of the final PropertyLoad: - * - * ``` - * = OptionalExpression optional=false (`optionalValue` is here) - * Sequence (`sequence` is here) - * t0 = Sequence - * t0 = - * - * LoadLocal t0 - * Sequence - * t1 = PropertyLoad t0. - * LoadLocal t1 - * ``` - */ - if ( - sequence.instructions.length === 1 && - sequence.instructions[0].value.kind === 'SequenceExpression' && - sequence.instructions[0].value.instructions.length === 1 && - sequence.instructions[0].value.instructions[0].lvalue !== null && - sequence.instructions[0].value.instructions[0].value.kind === - 'OptionalExpression' && - sequence.instructions[0].value.value.kind === 'LoadLocal' && - sequence.instructions[0].value.value.place.identifier.id === - sequence.instructions[0].value.instructions[0].lvalue.identifier.id && - sequence.value.kind === 'SequenceExpression' && - sequence.value.instructions.length === 1 && - sequence.value.instructions[0].lvalue !== null && - sequence.value.instructions[0].value.kind === 'PropertyLoad' && - sequence.value.instructions[0].value.object.identifier.id === - sequence.instructions[0].value.value.place.identifier.id && - sequence.value.value.kind === 'LoadLocal' && - sequence.value.value.place.identifier.id === - sequence.value.instructions[0].lvalue.identifier.id - ) { - const {lvalue: innerLvalue, value: innerOptional} = - sequence.instructions[0].value.instructions[0]; - const innerProperty = this.extractOptionalProperty( - context, - innerOptional, - innerLvalue, - ); - if (innerProperty === null) { - return null; - } - context.declareProperty( - innerProperty.lvalue, - innerProperty.object, - innerProperty.property, - innerProperty.optional, - ); - const propertyLoad = sequence.value.instructions[0].value; - return { - lvalue, - object: propertyLoad.object, - property: propertyLoad.property, - optional: optionalValue.optional, - }; - } - return null; - } - - visitOptionalExpression( - context: Context, - id: InstructionId, - value: ReactiveOptionalCallValue, - lvalue: Place | null, - ): void { - /** - * If this is the first optional=true optional in a recursive OptionalExpression - * subtree, we check to see if the subtree is of the form: - * ``` - * NestedOptional = - * ` . / ?. ` - * ` . / ?. ` - * ``` - * - * Ie strictly a chain like `foo?.bar?.baz` or `a?.b.c`. If the subtree contains - * any other types of expressions - for example `foo?.[makeKey(a)]` - then this - * will return null and we'll go to the default handling below. - * - * If the tree does match the NestedOptional shape, then we'll have recorded - * a sequence of declareProperty calls, and the final visitProperty call here - * will record that optional chain as a dependency (since we know it's about - * to be referenced via its lvalue which is non-null). - */ - if ( - lvalue !== null && - value.optional && - this.env.config.enableOptionalDependencies - ) { - const inner = this.extractOptionalProperty(context, value, lvalue); - if (inner !== null) { - context.visitProperty(inner.object, inner.property, inner.optional); - return; - } - } - - // Otherwise we treat everything after the optional as conditional - const inner = value.value; - /* - * OptionalExpression value is a SequenceExpression where the instructions - * represent the code prior to the `?` and the final value represents the - * conditional code that follows. - */ - CompilerError.invariant(inner.kind === 'SequenceExpression', { - reason: 'Expected OptionalExpression value to be a SequenceExpression', - description: `Found a \`${value.kind}\``, - loc: value.loc, - suggestions: null, - }); - // Instructions are the unconditionally executed portion before the `?` - for (const instr of inner.instructions) { - this.visitInstruction(instr, context); - } - // The final value is the conditional portion following the `?` - context.enterConditional(() => { - this.visitReactiveValue(context, id, inner.value, null); - }); - } - visitReactiveValue( context: Context, id: InstructionId, value: ReactiveValue, - lvalue: Place | null, ): void { switch (value.kind) { case 'OptionalExpression': { - this.visitOptionalExpression(context, id, value, lvalue); + const inner = value.value; + /* + * OptionalExpression value is a SequenceExpression where the instructions + * represent the code prior to the `?` and the final value represents the + * conditional code that follows. + */ + CompilerError.invariant(inner.kind === 'SequenceExpression', { + reason: + 'Expected OptionalExpression value to be a SequenceExpression', + description: `Found a \`${value.kind}\``, + loc: value.loc, + suggestions: null, + }); + // Instructions are the unconditionally executed portion before the `?` + for (const instr of inner.instructions) { + this.visitInstruction(instr, context); + } + // The final value is the conditional portion following the `?` + context.enterConditional(() => { + this.visitReactiveValue(context, id, inner.value); + }); break; } case 'LogicalExpression': { - this.visitReactiveValue(context, id, value.left, null); + this.visitReactiveValue(context, id, value.left); context.enterConditional(() => { - this.visitReactiveValue(context, id, value.right, null); + this.visitReactiveValue(context, id, value.right); }); break; } case 'ConditionalExpression': { - this.visitReactiveValue(context, id, value.test, null); + this.visitReactiveValue(context, id, value.test); const consequentDeps = context.enterConditional(() => { - this.visitReactiveValue(context, id, value.consequent, null); + this.visitReactiveValue(context, id, value.consequent); }); const alternateDeps = context.enterConditional(() => { - this.visitReactiveValue(context, id, value.alternate, null); + this.visitReactiveValue(context, id, value.alternate); }); context.promoteDepsFromExhaustiveConditionals([ consequentDeps, @@ -968,7 +804,7 @@ class PropagationVisitor extends ReactiveFunctionVisitor { break; } case 'FunctionExpression': { - if (this.env.config.enableTreatFunctionDepsAsConditional) { + if (this.enableTreatFunctionDepsAsConditional) { context.enterConditional(() => { for (const operand of eachInstructionValueOperand(value)) { context.visitOperand(operand); @@ -1015,9 +851,9 @@ class PropagationVisitor extends ReactiveFunctionVisitor { } } else if (value.kind === 'PropertyLoad') { if (lvalue !== null && !context.isUsedOutsideDeclaringScope(lvalue)) { - context.declareProperty(lvalue, value.object, value.property, false); + context.declareProperty(lvalue, value.object, value.property); } else { - context.visitProperty(value.object, value.property, false); + context.visitProperty(value.object, value.property); } } else if (value.kind === 'StoreLocal') { context.visitOperand(value.value); @@ -1060,7 +896,7 @@ class PropagationVisitor extends ReactiveFunctionVisitor { }); } } else { - this.visitReactiveValue(context, id, value, lvalue); + this.visitReactiveValue(context, id, value); } } @@ -1111,30 +947,25 @@ class PropagationVisitor extends ReactiveFunctionVisitor { break; } case 'for': { - this.visitReactiveValue(context, terminal.id, terminal.init, null); - this.visitReactiveValue(context, terminal.id, terminal.test, null); + this.visitReactiveValue(context, terminal.id, terminal.init); + this.visitReactiveValue(context, terminal.id, terminal.test); context.enterConditional(() => { this.visitBlock(terminal.loop, context); if (terminal.update !== null) { - this.visitReactiveValue( - context, - terminal.id, - terminal.update, - null, - ); + this.visitReactiveValue(context, terminal.id, terminal.update); } }); break; } case 'for-of': { - this.visitReactiveValue(context, terminal.id, terminal.init, null); + this.visitReactiveValue(context, terminal.id, terminal.init); context.enterConditional(() => { this.visitBlock(terminal.loop, context); }); break; } case 'for-in': { - this.visitReactiveValue(context, terminal.id, terminal.init, null); + this.visitReactiveValue(context, terminal.id, terminal.init); context.enterConditional(() => { this.visitBlock(terminal.loop, context); }); @@ -1143,12 +974,12 @@ class PropagationVisitor extends ReactiveFunctionVisitor { case 'do-while': { this.visitBlock(terminal.loop, context); context.enterConditional(() => { - this.visitReactiveValue(context, terminal.id, terminal.test, null); + this.visitReactiveValue(context, terminal.id, terminal.test); }); break; } case 'while': { - this.visitReactiveValue(context, terminal.id, terminal.test, null); + this.visitReactiveValue(context, terminal.id, terminal.test); context.enterConditional(() => { this.visitBlock(terminal.loop, context); }); --- compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.todo-optional-member-expression-as-memo-dep.expect.md @@ -0,0 +1,32 @@ + +## Input + +```javascript +// @validatePreserveExistingMemoizationGuarantees +function Component(props) { + const data = useMemo(() => { + return props.items?.edges?.nodes ?? []; + }, [props.items?.edges?.nodes]); + return ; +} + +``` + + +## Error + +``` + 1 | // @validatePreserveExistingMemoizationGuarantees + 2 | function Component(props) { +> 3 | const data = useMemo(() => { + | ^^^^^^^ +> 4 | return props.items?.edges?.nodes ?? []; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +> 5 | }, [props.items?.edges?.nodes]); + | ^^^^ CannotPreserveMemoization: React Compiler has skipped optimizing this component because the existing manual memoization could not be preserved. The inferred dependencies did not match the manually specified dependencies, which could cause the value to change more or less frequently than expected (3:5) + 6 | return ; + 7 | } + 8 | +``` + + \ No newline at end of file --- compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.todo-optional-member-expression-as-memo-dep.js @@ -0,0 +1,7 @@ +// @validatePreserveExistingMemoizationGuarantees +function Component(props) { + const data = useMemo(() => { + return props.items?.edges?.nodes ?? []; + }, [props.items?.edges?.nodes]); + return ; +} --- compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/optional-member-expression-as-memo-dep.expect.md @@ -1,48 +0,0 @@ - -## Input - -```javascript -// @validatePreserveExistingMemoizationGuarantees @enableOptionalDependencies -function Component(props) { - const data = useMemo(() => { - return props?.items.edges?.nodes.map(); - }, [props?.items.edges?.nodes]); - return ; -} - -``` - -## Code - -```javascript -import { c as _c } from ""react/compiler-runtime""; // @validatePreserveExistingMemoizationGuarantees @enableOptionalDependencies -function Component(props) { - const $ = _c(4); - - props?.items.edges?.nodes; - let t0; - let t1; - if ($[0] !== props?.items.edges?.nodes) { - t1 = props?.items.edges?.nodes.map(); - $[0] = props?.items.edges?.nodes; - $[1] = t1; - } else { - t1 = $[1]; - } - t0 = t1; - const data = t0; - let t2; - if ($[2] !== data) { - t2 = ; - $[2] = data; - $[3] = t2; - } else { - t2 = $[3]; - } - return t2; -} - -``` - -### Eval output -(kind: exception) Fixture not implemented \ No newline at end of file --- compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/optional-member-expression-as-memo-dep.js @@ -1,7 +0,0 @@ -// @validatePreserveExistingMemoizationGuarantees @enableOptionalDependencies -function Component(props) { - const data = useMemo(() => { - return props?.items.edges?.nodes.map(); - }, [props?.items.edges?.nodes]); - return ; -} --- compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/optional-member-expression-single-with-unconditional.expect.md @@ -1,65 +0,0 @@ - -## Input - -```javascript -// @validatePreserveExistingMemoizationGuarantees @enableOptionalDependencies -import {ValidateMemoization} from 'shared-runtime'; -function Component(props) { - const data = useMemo(() => { - const x = []; - x.push(props?.items); - x.push(props.items); - return x; - }, [props?.items]); - return ; -} - -``` - -## Code - -```javascript -import { c as _c } from ""react/compiler-runtime""; // @validatePreserveExistingMemoizationGuarantees @enableOptionalDependencies -import { ValidateMemoization } from ""shared-runtime""; -function Component(props) { - const $ = _c(7); - - props?.items; - let t0; - let x; - if ($[0] !== props.items) { - x = []; - x.push(props?.items); - x.push(props.items); - $[0] = props.items; - $[1] = x; - } else { - x = $[1]; - } - t0 = x; - const data = t0; - const t1 = props?.items; - let t2; - if ($[2] !== t1) { - t2 = [t1]; - $[2] = t1; - $[3] = t2; - } else { - t2 = $[3]; - } - let t3; - if ($[4] !== t2 || $[5] !== data) { - t3 = ; - $[4] = t2; - $[5] = data; - $[6] = t3; - } else { - t3 = $[6]; - } - return t3; -} - -``` - -### Eval output -(kind: exception) Fixture not implemented \ No newline at end of file --- compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/optional-member-expression-single-with-unconditional.js @@ -1,11 +0,0 @@ -// @validatePreserveExistingMemoizationGuarantees @enableOptionalDependencies -import {ValidateMemoization} from 'shared-runtime'; -function Component(props) { - const data = useMemo(() => { - const x = []; - x.push(props?.items); - x.push(props.items); - return x; - }, [props?.items]); - return ; -} --- compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/optional-member-expression-single.expect.md @@ -1,63 +0,0 @@ - -## Input - -```javascript -// @validatePreserveExistingMemoizationGuarantees @enableOptionalDependencies -import {ValidateMemoization} from 'shared-runtime'; -function Component(props) { - const data = useMemo(() => { - const x = []; - x.push(props?.items); - return x; - }, [props?.items]); - return ; -} - -``` - -## Code - -```javascript -import { c as _c } from ""react/compiler-runtime""; // @validatePreserveExistingMemoizationGuarantees @enableOptionalDependencies -import { ValidateMemoization } from ""shared-runtime""; -function Component(props) { - const $ = _c(7); - - props?.items; - let t0; - let x; - if ($[0] !== props?.items) { - x = []; - x.push(props?.items); - $[0] = props?.items; - $[1] = x; - } else { - x = $[1]; - } - t0 = x; - const data = t0; - const t1 = props?.items; - let t2; - if ($[2] !== t1) { - t2 = [t1]; - $[2] = t1; - $[3] = t2; - } else { - t2 = $[3]; - } - let t3; - if ($[4] !== t2 || $[5] !== data) { - t3 = ; - $[4] = t2; - $[5] = data; - $[6] = t3; - } else { - t3 = $[6]; - } - return t3; -} - -``` - -### Eval output -(kind: exception) Fixture not implemented \ No newline at end of file --- compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/optional-member-expression-single.js @@ -1,10 +0,0 @@ -// @validatePreserveExistingMemoizationGuarantees @enableOptionalDependencies -import {ValidateMemoization} from 'shared-runtime'; -function Component(props) { - const data = useMemo(() => { - const x = []; - x.push(props?.items); - return x; - }, [props?.items]); - return ; -} --- compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/optional-member-expression-with-conditional-optional.expect.md @@ -1,74 +0,0 @@ - -## Input - -```javascript -// @validatePreserveExistingMemoizationGuarantees @enableOptionalDependencies -import {ValidateMemoization} from 'shared-runtime'; -function Component(props) { - const data = useMemo(() => { - const x = []; - x.push(props?.items); - if (props.cond) { - x.push(props?.items); - } - return x; - }, [props?.items, props.cond]); - return ( - - ); -} - -``` - -## Code - -```javascript -import { c as _c } from ""react/compiler-runtime""; // @validatePreserveExistingMemoizationGuarantees @enableOptionalDependencies -import { ValidateMemoization } from ""shared-runtime""; -function Component(props) { - const $ = _c(9); - - props?.items; - let t0; - let x; - if ($[0] !== props?.items || $[1] !== props.cond) { - x = []; - x.push(props?.items); - if (props.cond) { - x.push(props?.items); - } - $[0] = props?.items; - $[1] = props.cond; - $[2] = x; - } else { - x = $[2]; - } - t0 = x; - const data = t0; - - const t1 = props?.items; - let t2; - if ($[3] !== t1 || $[4] !== props.cond) { - t2 = [t1, props.cond]; - $[3] = t1; - $[4] = props.cond; - $[5] = t2; - } else { - t2 = $[5]; - } - let t3; - if ($[6] !== t2 || $[7] !== data) { - t3 = ; - $[6] = t2; - $[7] = data; - $[8] = t3; - } else { - t3 = $[8]; - } - return t3; -} - -``` - -### Eval output -(kind: exception) Fixture not implemented \ No newline at end of file --- compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/optional-member-expression-with-conditional-optional.js @@ -1,15 +0,0 @@ -// @validatePreserveExistingMemoizationGuarantees @enableOptionalDependencies -import {ValidateMemoization} from 'shared-runtime'; -function Component(props) { - const data = useMemo(() => { - const x = []; - x.push(props?.items); - if (props.cond) { - x.push(props?.items); - } - return x; - }, [props?.items, props.cond]); - return ( - - ); -} --- compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/optional-member-expression-with-conditional.expect.md @@ -1,74 +0,0 @@ - -## Input - -```javascript -// @validatePreserveExistingMemoizationGuarantees @enableOptionalDependencies -import {ValidateMemoization} from 'shared-runtime'; -function Component(props) { - const data = useMemo(() => { - const x = []; - x.push(props?.items); - if (props.cond) { - x.push(props.items); - } - return x; - }, [props?.items, props.cond]); - return ( - - ); -} - -``` - -## Code - -```javascript -import { c as _c } from ""react/compiler-runtime""; // @validatePreserveExistingMemoizationGuarantees @enableOptionalDependencies -import { ValidateMemoization } from ""shared-runtime""; -function Component(props) { - const $ = _c(9); - - props?.items; - let t0; - let x; - if ($[0] !== props?.items || $[1] !== props.cond) { - x = []; - x.push(props?.items); - if (props.cond) { - x.push(props.items); - } - $[0] = props?.items; - $[1] = props.cond; - $[2] = x; - } else { - x = $[2]; - } - t0 = x; - const data = t0; - - const t1 = props?.items; - let t2; - if ($[3] !== t1 || $[4] !== props.cond) { - t2 = [t1, props.cond]; - $[3] = t1; - $[4] = props.cond; - $[5] = t2; - } else { - t2 = $[5]; - } - let t3; - if ($[6] !== t2 || $[7] !== data) { - t3 = ; - $[6] = t2; - $[7] = data; - $[8] = t3; - } else { - t3 = $[8]; - } - return t3; -} - -``` - -### Eval output -(kind: exception) Fixture not implemented \ No newline at end of file --- compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/optional-member-expression-with-conditional.js @@ -1,15 +0,0 @@ -// @validatePreserveExistingMemoizationGuarantees @enableOptionalDependencies -import {ValidateMemoization} from 'shared-runtime'; -function Component(props) { - const data = useMemo(() => { - const x = []; - x.push(props?.items); - if (props.cond) { - x.push(props.items); - } - return x; - }, [props?.items, props.cond]); - return ( - - ); -} ",react,facebook,JavaScript,JavaScript,232878.0,47794.0,The library for web and native user interfaces.,facebook_react,PERF_IMPROVEMENT,Code change: memoization 6e3f801fc5ece56644db1964c416fdab62ce66e2,2023-07-18 17:32:12,Jelly Lee,Update train.md,False,5,2,7,"--- docs/llm_interview/train.md @@ -7,13 +7,10 @@ - DeepSpeed的特点是什么?各个 ZeRO Stage 都有什么用? - -## RLHF - -- RLHF 完整训练过程是什么?RL建模过程中涉及到几个模型? +- RLHF完整训练过程是什么?RL建模过程中涉及到几个模型? - -- RLHF 过程中RM随着训练过程的进行,得分越来越高,效果就一定好吗? +- RLHF过程中RM随着训练过程的进行,得分越来越高,效果就一定好吗? - ",llm-action,liguodongiot,HTML,HTML,15588.0,1812.0,本项目旨在分享大模型相关技术原理以及实战经验(大模型工程化、大模型应用落地),liguodongiot_llm-action,DOC_CHANGE,changes in md file 99bf7c5da5f80beed10fc27414518601a50d5103,,greenkeeper[bot],Update touch to the latest version 🚀 (#2411),False,1,1,0,"--- package.json @@ -90,7 +90,7 @@ ""source-map-support"": ""0.4.15"", ""strip-ansi"": ""4.0.0"", ""styled-jsx"": ""1.0.6"", - ""touch"": ""2.0.2"", + ""touch"": ""3.0.0"", ""uglifyjs-webpack-plugin"": ""0.4.6"", ""unfetch"": ""3.0.0"", ""url"": ""0.11.0"",",vercel_next.js.json,,,,,,,vercel_next.js.json,CONFIG_CHANGE,just dependency version update 1d58205632810ab55341c59297ef242af98449aa,2025-02-24 20:45:58,"Sebastian ""Sebbie"" Silbermann",[dev-overlay] Link to section explaining opt-in error feedback (#76424),False,9,1,10,"--- packages/next/src/client/components/react-dev-overlay/ui/components/errors/error-overlay-footer/error-feedback/error-feedback.tsx @@ -53,15 +53,7 @@ export function ErrorFeedback({ errorCode, className }: ErrorFeedbackProps) {

    ) : ( <> -

    - - Was this helpful? - -

    +

    Was this helpful?

    - - - - -
    - -[Instant Chat Integration](https://getstream.io/chat/sdk/flutter/?utm_source=Github&utm_medium=Github_Repo_Content_Ad&utm_content=Developer&utm_campaign=Github_Mar2022_FlutterChatSDK&utm_term=Awesome) - -[with Stream!](https://getstream.io/chat/sdk/flutter/?utm_source=Github&utm_medium=Github_Repo_Content_Ad&utm_content=Developer&utm_campaign=Github_Mar2022_FlutterChatSDK&utm_term=Awesome) +[Instant Chat Integration with Stream!](https://getstream.io/chat/sdk/flutter/?utm_source=Github&utm_medium=Github_Repo_Content_Ad&utm_content=Developer&utm_campaign=Github_Mar2022_FlutterChatSDK&utm_term=Awesome) ."", ""After editing this file, you can run 'dart run slang apply --locale=th' to quickly apply the newly added translations."" - ], - ""settingsTab"": { - ""receive"": { - ""autoFinish"": ""Auto Finish"" - } - } + ] } --- app/assets/i18n/_missing_translations_tr.json @@ -2,10 +2,5 @@ ""@@info"": [ ""Here are translations that exist in but not in
    Individual Development; Documentation; Testing; open-source community efforts
    Leon MenkreoIndividualML Engineer; MLOps; DevOps
    ",manifesto,opentofu,HTML,HTML,36134.0,1083.0,The OpenTF Manifesto expresses concern over HashiCorp's switch of the Terraform license from open-source to the Business Source License (BSL) and calls for the tool's return to a truly open-source license.,opentofu_manifesto,NEW_FEAT,obvious fd8b9ce853f2675840d17726a75df7a27833cc47,2023-06-19 03:04:41,krahets,Update README and the landing page.,False,15,14,29,"--- README.md @@ -2,22 +2,22 @@ +     + + +

    - -

    - -

    - 在动画与代码中掌握数据结构与算法 + 动画图解、能运行、可提问的数据结构与算法教程

    - + - +

    --- docs/index.assets/btn_download_code.png Binary files /dev/null and b/docs/index.assets/btn_download_code.png differ --- docs/index.assets/btn_download_code_dark.png Binary files a/docs/index.assets/btn_download_code_dark.png and /dev/null differ --- docs/index.assets/btn_download_code_light.png Binary files a/docs/index.assets/btn_download_code_light.png and /dev/null differ --- docs/index.assets/btn_download_pdf.png Binary files /dev/null and b/docs/index.assets/btn_download_pdf.png differ --- docs/index.assets/btn_download_pdf_dark.png Binary files a/docs/index.assets/btn_download_pdf_dark.png and /dev/null differ --- docs/index.assets/btn_download_pdf_light.png Binary files a/docs/index.assets/btn_download_pdf_light.png and /dev/null differ --- docs/index.assets/btn_read_online.png Binary files /dev/null and b/docs/index.assets/btn_read_online.png differ --- docs/index.assets/btn_read_online_dark.png Binary files a/docs/index.assets/btn_read_online_dark.png and /dev/null differ --- docs/index.assets/btn_read_online_light.png Binary files a/docs/index.assets/btn_read_online_light.png and /dev/null differ --- docs/index.assets/hello_algo_knowledge_map_tp.png Binary files a/docs/index.assets/hello_algo_knowledge_map_tp.png and b/docs/index.assets/hello_algo_knowledge_map_tp.png differ --- docs/index.md @@ -7,22 +7,21 @@ hide:

    - + +    

    《 Hello 算法 》

    -

    在动画与代码中掌握数据结构与算法

    +

    动画图解、能运行、可提问的数据结构与算法教程

    - - + - - +

    @@ -93,7 +92,7 @@ hide:

    作者简介

    -靳宇栋 ([Krahets](https://leetcode.cn/u/jyd/)),大厂高级算法工程师,上海交通大学硕士。力扣(LeetCode)全网阅读量最高博主,其 LeetBook《图解算法数据结构》已被订阅 24 万本。 +靳宇栋 (Krahets),大厂高级算法工程师,上海交通大学硕士。力扣(LeetCode)全网阅读量最高博主,其 LeetBook《图解算法数据结构》已被订阅 24 万本。 --- --- mkdocs.yml @@ -2,7 +2,7 @@ site_name: Hello 算法 site_url: https://www.hello-algo.com/ site_author: Krahets -site_description: 在动画与代码中掌握数据结构与算法 +site_description: 一本动画图解、能运行、可提问的数据结构与算法入门书 docs_dir: build # Repository repo_name: krahets/hello-algo ",hello-algo,krahets,Java,Java,109696.0,13651.0,"《Hello 算法》:动画图解、一键运行的数据结构与算法教程。支持 Python, Java, C++, C, C#, JS, Go, Swift, Rust, Ruby, Kotlin, TS, Dart 代码。简体版和繁体版同步更新,English version ongoing",krahets_hello-algo,DOC_CHANGE,Obvious edaeb47778f326669abec81fc45769977e8eecb4,2024-01-18 02:17:05,Wout De Puysseleir,Add to Changelog,False,12,0,12,"--- CHANGELOG.md @@ -6,22 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## UNRELEASED -## [0.13.0] - 2024-01-17 - -### Added - -- Added flake setup with direnv - -### Fixed - -- Memory leak [issue](https://github.com/woutdp/live_svelte/issues/108) -- Explicitly set npm install folder [fixes package.json on Windows](https://github.com/woutdp/live_svelte/issues/75) -- Properly support binary for SSR ### Changed - Started work on a plugable SSR renderer [PR](https://github.com/woutdp/live_svelte/pull/82) -- Async and improved setup tasks ## [0.12.0] - 2023-08-19 ",live_svelte,woutdp,Elixir,Elixir,1416.0,58.0,Svelte inside Phoenix LiveView with seamless end-to-end reactivity,woutdp_live_svelte,CONFIG_CHANGE,Matched \.json\b in diff 4f99aa053906ca07cf489a928f5a5e73212c58c1,2023-07-24 20:12:34,Winter,update: README,False,0,0,0,"--- examples/simulation_global.mlx Binary files a/examples/simulation_global.mlx and b/examples/simulation_global.mlx differ --- gif/voronoi_matlab.png Binary files a/gif/voronoi_matlab.png and b/gif/voronoi_matlab.png differ ",matlab_motion_planning,ai-winter,MATLAB,MATLAB,419.0,66.0,"Motion planning and Navigation of AGV/AMR:matlab implementation of Dijkstra, A*, Theta*, JPS, D*, LPA*, D* Lite, RRT, RRT*, RRT-Connect, Informed RRT*, ACO, Voronoi, PID, LQR, MPC, APF, RPP, DWA, DDPG, Bezier, B-spline, Dubins, Reeds-Shepp etc.",ai-winter_matlab_motion_planning,DOC_CHANGE,Obvious c1880da51a9228e187cef45a7b0bb7248458ffa4,2024-08-03 00:24:18,Łukasz Jan Niemier,test: reduce amount of error log messages during tests (#415),False,18,10,28,"--- config/test.exs @@ -42,7 +42,8 @@ config :supavisor, Supavisor.Vault, # Print only warnings and errors during test config :logger, :console, - level: :error, + level: :info, + format: ""$time [$level] $message $metadata\n"", metadata: [:error_code, :file, :line, :pid, :project, :user, :mode] # Initialize plugs at runtime for faster test compilation --- lib/supavisor/handlers/proxy/client.ex @@ -56,10 +56,7 @@ defmodule Supavisor.Handlers.Proxy.Client do auth: auth, backend_key_data: b }) do - if b != %{} do - :ok = HandlerHelpers.cancel_query(~c""#{auth.host}"", auth.port, auth.ip_ver, b.pid, b.key) - end - + :ok = HandlerHelpers.cancel_query(~c""#{auth.host}"", auth.port, auth.ip_ver, b.pid, b.key) :keep_state_and_data end --- lib/supavisor/monitoring/prom_ex.ex @@ -155,7 +155,7 @@ defmodule Supavisor.Monitoring.PromEx do |> String.trim() if value != cleaned do - Logger.warning(""Tag validation: #{inspect(value)} / #{inspect(cleaned)}"") + Logger.error(""Tag validation: #{inspect(value)} / #{inspect(cleaned)}"") end ""=\""#{cleaned}\"""" --- test/integration/proxy_test.exs @@ -8,7 +8,7 @@ defmodule Supavisor.Integration.ProxyTest do @tenant ""proxy_tenant1"" - setup do + setup_all do db_conf = Application.get_env(:supavisor, Repo) {:ok, proxy} = @@ -205,13 +205,8 @@ defmodule Supavisor.Integration.ProxyTest do Process.flag(:trap_exit, true) db_conf = Application.get_env(:supavisor, Repo) - connection_opts = [ - hostname: db_conf[:hostname], - port: Application.get_env(:supavisor, :proxy_port_transaction), - username: ""max_clients.#{@tenant}"", - database: ""postgres"", - password: db_conf[:password] - ] + url = + ""postgresql://max_clients.#{@tenant}:#{db_conf[:password]}@#{db_conf[:hostname]}:#{Application.get_env(:supavisor, :proxy_port_transaction)}/postgres?sslmode=disable"" assert {:error, {_, @@ -224,7 +219,7 @@ defmodule Supavisor.Integration.ProxyTest do severity: ""FATAL"", unknown: ""FATAL"" } - }, _}}} = single_connection(connection_opts) + }, _}}} = parse_uri(url) |> single_connection() end test ""change role password"", %{origin: origin} do --- test/supavisor/prom_ex_test.exs @@ -6,7 +6,7 @@ defmodule Supavisor.PromExTest do @tenant ""prom_tenant"" - setup do + setup_all do db_conf = Application.get_env(:supavisor, Repo) {:ok, proxy} = --- test/support/fixtures/single_connection.ex @@ -2,7 +2,6 @@ defmodule SingleConnection do @moduledoc false alias Postgrex, as: P - @behaviour P.SimpleConnection def connect(conf) do --- test/test_helper.exs @@ -2,5 +2,5 @@ Cachex.start_link(name: Supavisor.Cache) -ExUnit.start(capture_log: true) +ExUnit.start() Ecto.Adapters.SQL.Sandbox.mode(Supavisor.Repo, :auto) ",supavisor,supabase,Elixir,Elixir,1869.0,64.0,"A cloud-native, multi-tenant Postgres connection pooler.",supabase_supavisor,CONFIG_CHANGE,Obvious 5a97b86c62cd57927538b6de3747376ff964e202,2024-07-03 02:13:03,Toshiaki Takeuchi,Updated the link to api key,False,1,1,2,"--- MatGPT.mlapp Binary files a/MatGPT.mlapp and b/MatGPT.mlapp differ --- README.md @@ -32,7 +32,7 @@ Please note that: * **Submodule**: '[Large Language Models (LLMs) with MATLAB](https://github.com/matlab-deep-learning/llms-with-matlab/) * **MathWorks Products (https://www.mathworks.com)**: Use MatGPT to run on [MATLAB Online](https://www.mathworks.com/products/matlab-online.html) that comes with the most commonly used toolboxes. To use it on desktop, you must have MATLAB R2023a or later installed on your computer. -* **OpenAI API Key**: Additionally, you will need your own API key from [https://platform.openai.com/api-keys](https://platform.openai.com/api-keys). If you don’t want to set up an API access with OpenAI, [MATLAB AI Chat Playground](https://www.mathworks.com/matlabcentral/playground/) is a better option. +* **OpenAI API Key**: Additionally, you will need your own API key from [https://platform.openai.com/account/api-keys](https://platform.openai.com/account/api-keys). If you don’t want to set up an API access with OpenAI, [MATLAB AI Chat Playground](https://www.mathworks.com/matlabcentral/playground/) is a better option. * GPT-4 models are [available to all API users who have a history of successful payments](https://openai.com/blog/gpt-4-api-general-availability). If you have not made any payment to OpenAI, the GPT-4 models are not accessible. ## Installation ",matgpt,toshiakit,MATLAB,MATLAB,218.0,33.0,MATLAB app to access ChatGPT API from OpenAI,toshiakit_matgpt,CODE_IMPROVEMENT,link updation a63726f3fe282db764dbce01b040aeac610cd26d,2025-03-22 01:51:36,Julia Guo,Update pretty_name for benchmark_presubmit for consistency PiperOrigin-RevId: 739276489,False,1,1,2,"--- third_party/xla/.github/workflows/benchmark_presubmit.yml @@ -51,7 +51,7 @@ jobs: { pool: ""linux-x86-g2-16-l4-1gpu"", container: ""us-central1-docker.pkg.dev/tensorflow-sigs/tensorflow/ml-build-cuda12.8-cudnn9.8:latest"", - pretty_name: ""XLA Linux x86 GPU L4 16 vcpu Presubmit"", + pretty_name: ""XLA Linux x86 GPU T4 16 vcpu Presubmit"", bazel_arch_dir: ""k8-opt"", platform: ""GPU"" }, ",tensorflow,tensorflow,C++,C++,188388.0,74565.0,An Open Source Machine Learning Framework for Everyone,tensorflow_tensorflow,CONFIG_CHANGE,changes in yml file 47193ea641fac34c75bdd38e79347540189baf07,2023-05-05 11:34:06,adams549659584,feat: 同步官网最新,False,24,7,31,"--- common/proxy.go @@ -41,25 +41,18 @@ func NewSingleHostReverseProxy(target *url.URL) *httputil.ReverseProxy { httpsSchemeName := ""https"" var originalHost string var originalPath string - var originalDomain string director := func(req *http.Request) { if req.URL.Scheme == httpsSchemeName || req.Header.Get(""X-Forwarded-Proto"") == httpsSchemeName { originalScheme = httpsSchemeName } originalHost = req.Host originalPath = req.URL.Path - originalDomain = fmt.Sprintf(""%s:%s"", originalScheme, originalHost) req.URL.Scheme = target.Scheme req.URL.Host = target.Host req.Host = target.Host - originalRefer := req.Referer() - if originalRefer != """" && !strings.Contains(originalRefer, ""/web/chat.html"") { - req.Header.Set(""Referer"", strings.ReplaceAll(originalRefer, originalDomain, BING_URL.String())) - } else { - req.Header.Set(""Referer"", fmt.Sprintf(""%s/search?q=Bing+AI"", BING_URL.String())) - } + req.Header.Set(""Referer"", fmt.Sprintf(""%s/search?q=Bing+AI"", BING_URL.String())) // 随机ip randIp := fmt.Sprintf(""%d.%d.%d.%d"", RandInt(1, 10), RandInt(1, 255), RandInt(1, 255), RandInt(1, 255)) @@ -101,16 +94,6 @@ func NewSingleHostReverseProxy(target *url.URL) *httputil.ReverseProxy { // } res.Header.Del(""Set-Cookie"") - // 删除 CSP - res.Header.Del(""Content-Security-Policy-Report-Only"") - res.Header.Del(""Report-To"") - - // location := res.Header.Get(""Location"") - // if strings.Contains(location, ""https://cn.bing.com"") { - // res.Header.Set(""Location"", strings.ReplaceAll(location, ""https://cn.bing.com"", originalDomain)) - // log.Println(`Location : `, location) - // } - return nil } errorHandler := func(res http.ResponseWriter, req *http.Request, err error) { --- web/chat.html @@ -42,7 +42,7 @@
    @@ -101,7 +101,7 @@ })(_w.onload, _w.si_PP); _w.rms.js( { 'A:rms:answers:Shared:BingCore.Bundle': '/rp/oJ7sDoXkkNOICsnFb57ZJHBrHcw.br.js' }, - { 'A:rms:answers:Web:SydneyFSCHelper': '/rp/TX6KXuLRS5pzZvnN8FM7MahUoUQ.br.js' }, + { 'A:rms:answers:Web:SydneyFSCHelper': '/rp/q6gG3uKBf5j5T2ZgRG-BbgRzW_I.br.js' }, { 'A:rms:answers:VisualSystem:ConversationScope': '/rp/YFRe970EMtFzujI9pBYZBGpdHEo.br.js' }, { 'A:rms:answers:CodexBundle:cib-bundle': '/rp/LOB20GsbD-KR9Gwi_Ukp8-BJZCQ.br.js' }, { 'A:rms:answers:SharedStaticAssets:speech-sdk': '/rp/6slp3E-BqFf904Cz6cCWPY1bh9E.br.js' }, --- web/sw.js @@ -1,7 +1,7 @@ // 引入workbox 框架 importScripts('./js/sw/workbox-sw.js'); -const SW_VERSION = '1.2.2'; +const SW_VERSION = '1.2.0'; const CACHE_PREFIX = 'BingAI'; workbox.setConfig({ debug: false, logLevel: 'warn' }); @@ -35,8 +35,8 @@ workbox.precaching.precacheAndRoute([ revision: '2023.05.05', }, { - url: '/rp/TX6KXuLRS5pzZvnN8FM7MahUoUQ.br.js', - revision: '2023.05.05.14', + url: '/rp/q6gG3uKBf5j5T2ZgRG-BbgRzW_I.br.js', + revision: '2023.05.05', }, { url: '/rp/YFRe970EMtFzujI9pBYZBGpdHEo.br.js', @@ -61,7 +61,7 @@ workbox.precaching.precacheAndRoute([ // html { url: '/web/chat.html', - revision: '2023.05.05.14', + revision: '2023.05.05.12', }, // ico { ",go-proxy-bingai,adams549659584,HTML,HTML,8773.0,13135.0,用 Vue3 和 Go 搭建的微软 New Bing 演示站点,拥有一致的 UI 体验,支持 ChatGPT 提示词,国内可用。,adams549659584_go-proxy-bingai,NEW_FEAT,Obvious 22f3425ace67cdda02b01951d5b0387ef3438505,2024-07-22 14:30:29,21pages,fix custom client show ip whiltelist warning (#8778) Signed-off-by: 21pages ,False,10,10,20,"--- flutter/lib/common.dart @@ -3425,12 +3425,6 @@ get defaultOptionWhitelist => isCustomClient ? ',' : ''; get defaultOptionAccessMode => isCustomClient ? 'custom' : ''; get defaultOptionApproveMode => isCustomClient ? 'password-click' : ''; -bool whitelistNotEmpty() { - // https://rustdesk.com/docs/en/self-host/client-configuration/advanced-settings/#whitelist - final v = bind.mainGetOptionSync(key: kOptionWhitelist); - return v != '' && v != ','; -} - // `setMovable()` is only supported on macOS. // // On macOS, the window can be dragged by the tab bar by default. --- flutter/lib/desktop/pages/desktop_setting_page.dart @@ -1119,9 +1119,12 @@ class _SafetyState extends State<_Safety> with AutomaticKeepAliveClientMixin { bool enabled = !locked; // Simple temp wrapper for PR check tmpWrapper() { - RxBool hasWhitelist = whitelistNotEmpty().obs; + RxBool hasWhitelist = (bind.mainGetOptionSync(key: kOptionWhitelist) != + defaultOptionWhitelist) + .obs; update() async { - hasWhitelist.value = whitelistNotEmpty(); + hasWhitelist.value = bind.mainGetOptionSync(key: kOptionWhitelist) != + defaultOptionWhitelist; } onChanged(bool? checked) async { --- flutter/lib/mobile/pages/settings_page.dart @@ -97,7 +97,8 @@ class _SettingsState extends State with WidgetsBindingObserver { kOptionEnableAbr, bind.mainGetOptionSync(key: kOptionEnableAbr)); _denyLANDiscovery = !option2bool(kOptionEnableLanDiscovery, bind.mainGetOptionSync(key: kOptionEnableLanDiscovery)); - _onlyWhiteList = whitelistNotEmpty(); + _onlyWhiteList = (bind.mainGetOptionSync(key: kOptionWhitelist)) != + defaultOptionWhitelist; _enableDirectIPAccess = option2bool( kOptionDirectServer, bind.mainGetOptionSync(key: kOptionDirectServer)); _enableRecordSession = option2bool(kOptionEnableRecordSession, @@ -281,7 +282,9 @@ class _SettingsState extends State with WidgetsBindingObserver { initialValue: _onlyWhiteList, onToggle: (_) async { update() async { - final onlyWhiteList = whitelistNotEmpty(); + final onlyWhiteList = + (await bind.mainGetOption(key: kOptionWhitelist)) != + defaultOptionWhitelist; if (onlyWhiteList != _onlyWhiteList) { setState(() { _onlyWhiteList = onlyWhiteList; ",rustdesk,rustdesk,Rust,Rust,83345.0,11693.0,"An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.",rustdesk_rustdesk,BUG_FIX,Obvious dc88cda24762ab15ff19225abc23e4b6719e5644,2024-12-27 12:31:05,Edward Hsing,Update README.md,False,2,0,2,"--- README.md @@ -4,8 +4,6 @@ The US.KG domain has been fully restored, and all domains are functioning normally. If you are unable to resolve the domain properly, please clear your DNS cache or wait up to 24 hours for full DNS propagation. -We are actively communicating with Kyrgyzstan (.KG domain registry) to ensure that similar incidents are minimized as much as possible. We emphasize proactive collaboration and encourage any issues to be discussed with us in advance to guarantee stable service. - ## 🌐 Say Goodbye to Domain Fees Welcome to **DigitalPlat FreeDomain**, where we believe everyone deserves a digital identity. Whether you're an individual, or an organization, we’re offering free domain names to bring your ideas to life – no strings attached! ",freedomain,digitalplatdev,HTML,HTML,41142.0,933.0,DigitalPlat FreeDomain: Free Domain For Everyone,digitalplatdev_freedomain,PERF_IMPROVEMENT,Matched \bcache\b in diff f5c3896966ec35d8a300dc43f3e262c339b69bf6,2023-07-30 22:22:07,Wout De Puysseleir,Run formatter,False,1,2,3,"--- example_project/lib/example_web/live/live_json.ex @@ -5,7 +5,8 @@ defmodule ExampleWeb.LiveJson do ~H""""""
    - SSR: <.svelte name=""LiveJson"" live_json_props={%{big_data_set: @ljbig_data_set}} /> + SSR: + <.svelte name=""LiveJson"" live_json_props={%{big_data_set: @ljbig_data_set}} />
    No SSR: ",live_svelte,woutdp,Elixir,Elixir,1416.0,58.0,Svelte inside Phoenix LiveView with seamless end-to-end reactivity,woutdp_live_svelte,CONFIG_CHANGE,Very small changes 6723bfbe327da6b447f7cefed4e02bc9d7a74eea,2025-03-21 18:03:25,Charles Kerr,refactor: reduce coupling in `electron::api::Protocol` (#46122) * refactor: decouple api::Protocol from ElectronBrowserContext now they do not know about each other * refactor: make electron::api::ProtocolError private * refactor: remove unused isolate arg in Protocol constructor * refactor: use =default for trivial destructor,False,54,58,112,"--- shell/browser/api/electron_api_protocol.cc @@ -14,6 +14,7 @@ #include ""gin/handle.h"" #include ""gin/object_template_builder.h"" #include ""shell/browser/browser.h"" +#include ""shell/browser/electron_browser_context.h"" #include ""shell/browser/protocol_registry.h"" #include ""shell/common/gin_converters/callback_converter.h"" #include ""shell/common/gin_converters/net_converter.h"" @@ -193,39 +194,41 @@ const char* const kBuiltinSchemes[] = { ""about"", ""file"", ""http"", ""https"", ""data"", ""filesystem"", }; -} // namespace - -Protocol::Protocol(ProtocolRegistry* protocol_registry) - : protocol_registry_{protocol_registry} {} - // Convert error code to string. -// static -std::string_view Protocol::ErrorCodeToString(Error error) { +constexpr std::string_view ErrorCodeToString(ProtocolError error) { switch (error) { - case Error::kRegistered: + case ProtocolError::kRegistered: return ""The scheme has been registered""; - case Error::kNotRegistered: + case ProtocolError::kNotRegistered: return ""The scheme has not been registered""; - case Error::kIntercepted: + case ProtocolError::kIntercepted: return ""The scheme has been intercepted""; - case Error::kNotIntercepted: + case ProtocolError::kNotIntercepted: return ""The scheme has not been intercepted""; default: return ""Unexpected error""; } } -Protocol::Error Protocol::RegisterProtocol(ProtocolType type, - const std::string& scheme, - const ProtocolHandler& handler) { +} // namespace + +Protocol::Protocol(v8::Isolate* isolate, ProtocolRegistry* protocol_registry) + : protocol_registry_(protocol_registry) {} + +Protocol::~Protocol() = default; + +ProtocolError Protocol::RegisterProtocol(ProtocolType type, + const std::string& scheme, + const ProtocolHandler& handler) { bool added = protocol_registry_->RegisterProtocol(type, scheme, handler); - return added ? Error::kOK : Error::kRegistered; + return added ? ProtocolError::kOK : ProtocolError::kRegistered; } bool Protocol::UnregisterProtocol(const std::string& scheme, gin::Arguments* args) { bool removed = protocol_registry_->UnregisterProtocol(scheme); - HandleOptionalCallback(args, removed ? Error::kOK : Error::kNotRegistered); + HandleOptionalCallback( + args, removed ? ProtocolError::kOK : ProtocolError::kNotRegistered); return removed; } @@ -233,17 +236,18 @@ bool Protocol::IsProtocolRegistered(const std::string& scheme) { return protocol_registry_->FindRegistered(scheme) != nullptr; } -Protocol::Error Protocol::InterceptProtocol(ProtocolType type, - const std::string& scheme, - const ProtocolHandler& handler) { +ProtocolError Protocol::InterceptProtocol(ProtocolType type, + const std::string& scheme, + const ProtocolHandler& handler) { bool added = protocol_registry_->InterceptProtocol(type, scheme, handler); - return added ? Error::kOK : Error::kIntercepted; + return added ? ProtocolError::kOK : ProtocolError::kIntercepted; } bool Protocol::UninterceptProtocol(const std::string& scheme, gin::Arguments* args) { bool removed = protocol_registry_->UninterceptProtocol(scheme); - HandleOptionalCallback(args, removed ? Error::kOK : Error::kNotIntercepted); + HandleOptionalCallback( + args, removed ? ProtocolError::kOK : ProtocolError::kNotIntercepted); return removed; } @@ -271,14 +275,15 @@ v8::Local Protocol::IsProtocolHandled(const std::string& scheme, base::Contains(kBuiltinSchemes, scheme)); } -void Protocol::HandleOptionalCallback(gin::Arguments* args, Error error) { +void Protocol::HandleOptionalCallback(gin::Arguments* args, + ProtocolError error) { base::RepeatingCallback)> callback; if (args->GetNext(&callback)) { util::EmitWarning( args->isolate(), ""The callback argument of protocol module APIs is no longer needed."", ""ProtocolDeprecateCallback""); - if (error == Error::kOK) + if (error == ProtocolError::kOK) callback.Run(v8::Null(args->isolate())); else callback.Run(v8::Exception::Error( @@ -287,9 +292,11 @@ void Protocol::HandleOptionalCallback(gin::Arguments* args, Error error) { } // static -gin::Handle Protocol::Create(v8::Isolate* isolate, - ProtocolRegistry* protocol_registry) { - return gin::CreateHandle(isolate, new Protocol{protocol_registry}); +gin::Handle Protocol::Create( + v8::Isolate* isolate, + ElectronBrowserContext* browser_context) { + return gin::CreateHandle( + isolate, new Protocol(isolate, browser_context->protocol_registry())); } // static --- shell/browser/api/electron_api_protocol.h @@ -22,6 +22,7 @@ class Handle; namespace electron { +class ElectronBrowserContext; class ProtocolRegistry; namespace api { @@ -34,12 +35,21 @@ void AddServiceWorkerScheme(const std::string& scheme); void RegisterSchemesAsPrivileged(gin_helper::ErrorThrower thrower, v8::Local val); +// Possible errors. +enum class ProtocolError { + kOK, // no error + kRegistered, + kNotRegistered, + kIntercepted, + kNotIntercepted, +}; + // Protocol implementation based on network services. class Protocol final : public gin::Wrappable, public gin_helper::Constructible { public: static gin::Handle Create(v8::Isolate* isolate, - ProtocolRegistry* protocol_registry); + ElectronBrowserContext* browser_context); // gin_helper::Constructible static gin::Handle New(gin_helper::ErrorThrower thrower); @@ -53,34 +63,23 @@ class Protocol final : public gin::Wrappable, const char* GetTypeName() override; private: - // Possible errors. - enum class Error { - kOK, // no error - kRegistered, - kNotRegistered, - kIntercepted, - kNotIntercepted, - }; + Protocol(v8::Isolate* isolate, ProtocolRegistry* protocol_registry); + ~Protocol() override; // Callback types. using CompletionCallback = base::RepeatingCallback)>; - explicit Protocol(ProtocolRegistry* protocol_registry); - ~Protocol() override = default; - - [[nodiscard]] static std::string_view ErrorCodeToString(Error error); - // JS APIs. - Error RegisterProtocol(ProtocolType type, - const std::string& scheme, - const ProtocolHandler& handler); + ProtocolError RegisterProtocol(ProtocolType type, + const std::string& scheme, + const ProtocolHandler& handler); bool UnregisterProtocol(const std::string& scheme, gin::Arguments* args); bool IsProtocolRegistered(const std::string& scheme); - Error InterceptProtocol(ProtocolType type, - const std::string& scheme, - const ProtocolHandler& handler); + ProtocolError InterceptProtocol(ProtocolType type, + const std::string& scheme, + const ProtocolHandler& handler); bool UninterceptProtocol(const std::string& scheme, gin::Arguments* args); bool IsProtocolIntercepted(const std::string& scheme); @@ -93,21 +92,21 @@ class Protocol final : public gin::Wrappable, bool RegisterProtocolFor(const std::string& scheme, const ProtocolHandler& handler, gin::Arguments* args) { - const auto result = RegisterProtocol(type, scheme, handler); + auto result = RegisterProtocol(type, scheme, handler); HandleOptionalCallback(args, result); - return result == Error::kOK; + return result == ProtocolError::kOK; } template bool InterceptProtocolFor(const std::string& scheme, const ProtocolHandler& handler, gin::Arguments* args) { - const auto result = InterceptProtocol(type, scheme, handler); + auto result = InterceptProtocol(type, scheme, handler); HandleOptionalCallback(args, result); - return result == Error::kOK; + return result == ProtocolError::kOK; } // Be compatible with old interface, which accepts optional callback. - void HandleOptionalCallback(gin::Arguments* args, Error error); + void HandleOptionalCallback(gin::Arguments* args, ProtocolError error); // Weak pointer; the lifetime of the ProtocolRegistry is guaranteed to be // longer than the lifetime of this JS interface. --- shell/browser/api/electron_api_session.cc @@ -553,9 +553,7 @@ Session::Session(v8::Isolate* isolate, ElectronBrowserContext* browser_context) SessionPreferences::CreateForBrowserContext(browser_context); - protocol_.Reset( - isolate, - Protocol::Create(isolate, browser_context->protocol_registry()).ToV8()); + protocol_.Reset(isolate, Protocol::Create(isolate, browser_context).ToV8()); browser_context->SetUserData( kElectronApiSessionKey, ",electron,electron,C++,C++,115677.0,15852.0,":electron: Build cross-platform desktop apps with JavaScript, HTML, and CSS",electron_electron,CODE_IMPROVEMENT,simplify decoder draining logic 3cd74bb8a86e00d6d78e21b0eb750d6d2240ff46,,Eric Paris,"Fix typo ""replicationContollers""",False,1,1,0,"--- kubectl.go @@ -190,7 +190,7 @@ func resolveResource(target, resource string) (string, error) { } default: // It might be a GUID, but we don't know how to handle those for now. - err = fmt.Errorf(""Resource %s not recognized; need pods, replicationContollers, services or minions."", resource) + err = fmt.Errorf(""Resource %s not recognized; need pods, replicationControllers, services or minions."", resource) } return resolved, err }",kubernetes_kubernetes.json,,,,,,,kubernetes_kubernetes.json,CONFIG_CHANGE,"5, obvious" 00ac57e8c3a7920e7752f213d526a776415bc457,2024-01-15 12:36:09,renovate[bot],Update plugin org.gradle.toolchains.foojay-resolver-convention to v0.8.0 (#8198) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>,False,1,1,2,"--- settings.gradle.kts @@ -1,7 +1,7 @@ rootProject.name = ""okhttp-parent"" plugins { - id(""org.gradle.toolchains.foojay-resolver-convention"") version(""0.8.0"") + id(""org.gradle.toolchains.foojay-resolver-convention"") version(""0.7.0"") } include("":mockwebserver"") ",okhttp,square,Kotlin,Kotlin,46179.0,9194.0,"Square’s meticulous HTTP client for the JVM, Android, and GraalVM.",square_okhttp,CONFIG_CHANGE,Very small changes f30fd963a104649e7d388cc68f3fbc5d635baa4a,2023-03-11 02:52:15,Romain Vimont,"Upgrade FFmpeg custom builds for Windows Use a build which includes the pcm_s16le decoder, to support RAW audio. Refs ",False,14,14,28,"--- app/prebuilt-deps/prepare-ffmpeg.sh @@ -6,11 +6,11 @@ cd ""$DIR"" mkdir -p ""$PREBUILT_DATA_DIR"" cd ""$PREBUILT_DATA_DIR"" -VERSION=6.0-scrcpy-2 +VERSION=6.0-scrcpy DEP_DIR=""ffmpeg-$VERSION"" FILENAME=""$DEP_DIR"".7z -SHA256SUM=98ef97f8607c97a5c4f9c5a0a991b78f105d002a3619145011d16ffb92501b14 +SHA256SUM=f3956295b4325a84aada05447ba3f314fbed96697811666d495de4de40d59f98 if [[ -d ""$DEP_DIR"" ]] then --- cross_win32.txt @@ -16,6 +16,6 @@ cpu = 'i686' endian = 'little' [properties] -prebuilt_ffmpeg = 'ffmpeg-6.0-scrcpy-2/win32' +prebuilt_ffmpeg = 'ffmpeg-6.0-scrcpy/win32' prebuilt_sdl2 = 'SDL2-2.26.1/i686-w64-mingw32' prebuilt_libusb = 'libusb-1.0.26/libusb-MinGW-Win32' --- cross_win64.txt @@ -16,6 +16,6 @@ cpu = 'x86_64' endian = 'little' [properties] -prebuilt_ffmpeg = 'ffmpeg-6.0-scrcpy-2/win64' +prebuilt_ffmpeg = 'ffmpeg-6.0-scrcpy/win64' prebuilt_sdl2 = 'SDL2-2.26.1/x86_64-w64-mingw32' prebuilt_libusb = 'libusb-1.0.26/libusb-MinGW-x64' --- release.mk @@ -94,11 +94,11 @@ dist-win32: build-server build-win32 cp app/data/scrcpy-noconsole.vbs ""$(DIST)/$(WIN32_TARGET_DIR)"" cp app/data/icon.png ""$(DIST)/$(WIN32_TARGET_DIR)"" cp app/data/open_a_terminal_here.bat ""$(DIST)/$(WIN32_TARGET_DIR)"" - cp app/prebuilt-deps/data/ffmpeg-6.0-scrcpy-2/win32/bin/avutil-58.dll ""$(DIST)/$(WIN32_TARGET_DIR)/"" - cp app/prebuilt-deps/data/ffmpeg-6.0-scrcpy-2/win32/bin/avcodec-60.dll ""$(DIST)/$(WIN32_TARGET_DIR)/"" - cp app/prebuilt-deps/data/ffmpeg-6.0-scrcpy-2/win32/bin/avformat-60.dll ""$(DIST)/$(WIN32_TARGET_DIR)/"" - cp app/prebuilt-deps/data/ffmpeg-6.0-scrcpy-2/win32/bin/swresample-4.dll ""$(DIST)/$(WIN32_TARGET_DIR)/"" - cp app/prebuilt-deps/data/ffmpeg-6.0-scrcpy-2/win32/bin/zlib1.dll ""$(DIST)/$(WIN32_TARGET_DIR)/"" + cp app/prebuilt-deps/data/ffmpeg-6.0-scrcpy/win32/bin/avutil-58.dll ""$(DIST)/$(WIN32_TARGET_DIR)/"" + cp app/prebuilt-deps/data/ffmpeg-6.0-scrcpy/win32/bin/avcodec-60.dll ""$(DIST)/$(WIN32_TARGET_DIR)/"" + cp app/prebuilt-deps/data/ffmpeg-6.0-scrcpy/win32/bin/avformat-60.dll ""$(DIST)/$(WIN32_TARGET_DIR)/"" + cp app/prebuilt-deps/data/ffmpeg-6.0-scrcpy/win32/bin/swresample-4.dll ""$(DIST)/$(WIN32_TARGET_DIR)/"" + cp app/prebuilt-deps/data/ffmpeg-6.0-scrcpy/win32/bin/zlib1.dll ""$(DIST)/$(WIN32_TARGET_DIR)/"" cp app/prebuilt-deps/data/platform-tools-33.0.3/adb.exe ""$(DIST)/$(WIN32_TARGET_DIR)/"" cp app/prebuilt-deps/data/platform-tools-33.0.3/AdbWinApi.dll ""$(DIST)/$(WIN32_TARGET_DIR)/"" cp app/prebuilt-deps/data/platform-tools-33.0.3/AdbWinUsbApi.dll ""$(DIST)/$(WIN32_TARGET_DIR)/"" @@ -113,11 +113,11 @@ dist-win64: build-server build-win64 cp app/data/scrcpy-noconsole.vbs ""$(DIST)/$(WIN64_TARGET_DIR)"" cp app/data/icon.png ""$(DIST)/$(WIN64_TARGET_DIR)"" cp app/data/open_a_terminal_here.bat ""$(DIST)/$(WIN64_TARGET_DIR)"" - cp app/prebuilt-deps/data/ffmpeg-6.0-scrcpy-2/win64/bin/avutil-58.dll ""$(DIST)/$(WIN64_TARGET_DIR)/"" - cp app/prebuilt-deps/data/ffmpeg-6.0-scrcpy-2/win64/bin/avcodec-60.dll ""$(DIST)/$(WIN64_TARGET_DIR)/"" - cp app/prebuilt-deps/data/ffmpeg-6.0-scrcpy-2/win64/bin/avformat-60.dll ""$(DIST)/$(WIN64_TARGET_DIR)/"" - cp app/prebuilt-deps/data/ffmpeg-6.0-scrcpy-2/win64/bin/swresample-4.dll ""$(DIST)/$(WIN64_TARGET_DIR)/"" - cp app/prebuilt-deps/data/ffmpeg-6.0-scrcpy-2/win64/bin/zlib1.dll ""$(DIST)/$(WIN64_TARGET_DIR)/"" + cp app/prebuilt-deps/data/ffmpeg-6.0-scrcpy/win64/bin/avutil-58.dll ""$(DIST)/$(WIN64_TARGET_DIR)/"" + cp app/prebuilt-deps/data/ffmpeg-6.0-scrcpy/win64/bin/avcodec-60.dll ""$(DIST)/$(WIN64_TARGET_DIR)/"" + cp app/prebuilt-deps/data/ffmpeg-6.0-scrcpy/win64/bin/avformat-60.dll ""$(DIST)/$(WIN64_TARGET_DIR)/"" + cp app/prebuilt-deps/data/ffmpeg-6.0-scrcpy/win64/bin/swresample-4.dll ""$(DIST)/$(WIN64_TARGET_DIR)/"" + cp app/prebuilt-deps/data/ffmpeg-6.0-scrcpy/win64/bin/zlib1.dll ""$(DIST)/$(WIN64_TARGET_DIR)/"" cp app/prebuilt-deps/data/platform-tools-33.0.3/adb.exe ""$(DIST)/$(WIN64_TARGET_DIR)/"" cp app/prebuilt-deps/data/platform-tools-33.0.3/AdbWinApi.dll ""$(DIST)/$(WIN64_TARGET_DIR)/"" cp app/prebuilt-deps/data/platform-tools-33.0.3/AdbWinUsbApi.dll ""$(DIST)/$(WIN64_TARGET_DIR)/"" ",scrcpy,genymobile,C,C,118486.0,11201.0,Display and control your Android device,genymobile_scrcpy,CODE_IMPROVEMENT,Code change: type annotation added 71c4d116fa8a7edd4b5ae1970763fd0e86ff36c9,,Tomáš Szabo,Minor performance improvements (#7587) - use ESLint cache - remove useless `watch` option in fork-ts-checker,False,1,1,0,"--- webpack.config.js @@ -334,6 +334,7 @@ module.exports = function(webpackEnv) { use: [ { options: { + cache: true, formatter: require.resolve('react-dev-utils/eslintFormatter'), eslintPath: require.resolve('eslint'), resolvePluginsRelativeTo: __dirname, @@ -690,7 +691,6 @@ module.exports = function(webpackEnv) { '!**/src/setupProxy.*', '!**/src/setupTests.*', ], - watch: paths.appSrc, silent: true, // The formatter is invoked directly in WebpackDevServerUtils during development formatter: isEnvProduction ? typescriptFormatter : undefined,",facebook_create-react-app.json,,,,,,,facebook_create-react-app.json,CODE_IMPROVEMENT,"4, performance improvements" e1c0f5cf1e4cece2c4aa235bfbf8511ad7b1fe59,2023-06-10 12:40:01,Kingkor Roy Tirtho,fix: remove useBreakpoints as it clogs up memory with unnecessary state updates,False,113,216,329,"--- lib/components/player/player_track_details.dart @@ -4,7 +4,7 @@ import 'package:spotify/spotify.dart'; import 'package:spotube/collections/assets.gen.dart'; import 'package:spotube/components/shared/image/universal_image.dart'; -import 'package:spotube/extensions/constrains.dart'; +import 'package:spotube/hooks/use_breakpoints.dart'; import 'package:spotube/provider/proxy_playlist/proxy_playlist_provider.dart'; import 'package:spotube/utils/type_conversion_utils.dart'; @@ -17,7 +17,7 @@ class PlayerTrackDetails extends HookConsumerWidget { @override Widget build(BuildContext context, ref) { final theme = Theme.of(context); - final mediaQuery = MediaQuery.of(context); + final breakpoint = useBreakpoints(); final playback = ref.watch(ProxyPlaylistNotifier.provider); return Row( @@ -37,7 +37,7 @@ class PlayerTrackDetails extends HookConsumerWidget { ), ), ), - if (mediaQuery.isSm || mediaQuery.isMd) + if (breakpoint.isLessThanOrEqualTo(Breakpoints.md)) Flexible( child: Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -60,7 +60,7 @@ class PlayerTrackDetails extends HookConsumerWidget { ], ), ), - if (mediaQuery.lgAndUp) + if (breakpoint.isMoreThan(Breakpoints.md)) Flexible( flex: 1, child: Column( --- lib/components/root/bottom_player.dart @@ -12,8 +12,8 @@ import 'package:spotube/components/player/player_actions.dart'; import 'package:spotube/components/player/player_overlay.dart'; import 'package:spotube/components/player/player_track_details.dart'; import 'package:spotube/components/player/player_controls.dart'; -import 'package:spotube/extensions/constrains.dart'; import 'package:spotube/extensions/context.dart'; +import 'package:spotube/hooks/use_breakpoints.dart'; import 'package:spotube/hooks/use_brightness_value.dart'; import 'package:spotube/models/logger.dart'; import 'package:flutter/material.dart'; @@ -33,7 +33,7 @@ class BottomPlayer extends HookConsumerWidget { final layoutMode = ref.watch(userPreferencesProvider.select((s) => s.layoutMode)); - final mediaQuery = MediaQuery.of(context); + final breakpoint = useBreakpoints(); String albumArt = useMemoized( () => playlist.activeTrack?.album?.images?.isNotEmpty == true @@ -57,7 +57,7 @@ class BottomPlayer extends HookConsumerWidget { // returning an empty non spacious Container as the overlay will take // place in the global overlay stack aka [_entries] if (layoutMode == LayoutMode.compact || - ((mediaQuery.isSm || mediaQuery.isMd) && + (breakpoint.isLessThanOrEqualTo(Breakpoints.md) && layoutMode == LayoutMode.adaptive)) { return PlayerOverlay(albumArt: albumArt); } --- lib/components/root/sidebar.dart @@ -9,8 +9,8 @@ import 'package:spotube/collections/assets.gen.dart'; import 'package:spotube/collections/side_bar_tiles.dart'; import 'package:spotube/collections/spotube_icons.dart'; import 'package:spotube/components/shared/image/universal_image.dart'; -import 'package:spotube/extensions/constrains.dart'; import 'package:spotube/extensions/context.dart'; +import 'package:spotube/hooks/use_breakpoints.dart'; import 'package:spotube/hooks/use_brightness_value.dart'; import 'package:spotube/hooks/use_sidebarx_controller.dart'; import 'package:spotube/provider/download_manager_provider.dart'; @@ -49,7 +49,7 @@ class Sidebar extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - final mediaQuery = MediaQuery.of(context); + final breakpoints = useBreakpoints(); final downloadCount = ref.watch( downloadManagerProvider.select((s) => s.length), @@ -60,7 +60,7 @@ class Sidebar extends HookConsumerWidget { final controller = useSidebarXController( selectedIndex: selectedIndex, - extended: mediaQuery.lgAndUp, + extended: breakpoints > Breakpoints.md, ); final theme = Theme.of(context); @@ -82,16 +82,16 @@ class Sidebar extends HookConsumerWidget { }, [controller]); useEffect(() { - if (mediaQuery.lgAndUp && !controller.extended) { + if (breakpoints > Breakpoints.md && !controller.extended) { controller.setExtended(true); - } else if ((mediaQuery.isSm || mediaQuery.isMd) && controller.extended) { + } else if (breakpoints <= Breakpoints.md && controller.extended) { controller.setExtended(false); } return null; - }, [mediaQuery, controller]); + }, [breakpoints, controller]); if (layoutMode == LayoutMode.compact || - (mediaQuery.isSm && layoutMode == LayoutMode.adaptive)) { + (breakpoints.isSm && layoutMode == LayoutMode.adaptive)) { return Scaffold(body: child); } @@ -183,10 +183,10 @@ class SidebarHeader extends HookWidget { @override Widget build(BuildContext context) { - final mediaQuery = MediaQuery.of(context); + final breakpoint = useBreakpoints(); final theme = Theme.of(context); - if (mediaQuery.isSm || mediaQuery.isMd) { + if (breakpoint <= Breakpoints.md) { return Container( height: 40, width: 40, @@ -224,7 +224,7 @@ class SidebarFooter extends HookConsumerWidget { @override Widget build(BuildContext context, ref) { final theme = Theme.of(context); - final mediaQuery = MediaQuery.of(context); + final breakpoint = useBreakpoints(); final me = useQueries.user.me(ref); final data = me.data; @@ -236,7 +236,7 @@ class SidebarFooter extends HookConsumerWidget { final auth = ref.watch(AuthenticationNotifier.provider); - if (mediaQuery.isSm || mediaQuery.isMd) { + if (breakpoint <= Breakpoints.md) { return IconButton( icon: const Icon(SpotubeIcons.settings), onPressed: () => Sidebar.goToSettings(context), --- lib/components/root/spotube_navigation_bar.dart @@ -7,8 +7,8 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:spotube/collections/side_bar_tiles.dart'; import 'package:spotube/components/root/sidebar.dart'; -import 'package:spotube/extensions/constrains.dart'; import 'package:spotube/extensions/context.dart'; +import 'package:spotube/hooks/use_breakpoints.dart'; import 'package:spotube/hooks/use_brightness_value.dart'; import 'package:spotube/provider/download_manager_provider.dart'; import 'package:spotube/provider/user_preferences_provider.dart'; @@ -29,7 +29,7 @@ class SpotubeNavigationBar extends HookConsumerWidget { final downloadCount = ref.watch( downloadManagerProvider.select((s) => s.length), ); - final mediaQuery = MediaQuery.of(context); + final breakpoint = useBreakpoints(); final layoutMode = ref.watch(userPreferencesProvider.select((s) => s.layoutMode)); @@ -49,9 +49,8 @@ class SpotubeNavigationBar extends HookConsumerWidget { }, [selectedIndex]); if (layoutMode == LayoutMode.extended || - (mediaQuery.mdAndUp && layoutMode == LayoutMode.adaptive)) { - return const SizedBox(); - } + (breakpoint.isMoreThan(Breakpoints.sm) && + layoutMode == LayoutMode.adaptive)) return const SizedBox(); return ClipRect( child: BackdropFilter( --- lib/components/shared/adaptive/adaptive_list_tile.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:spotube/extensions/constrains.dart'; + +import 'package:spotube/hooks/use_breakpoints.dart'; class AdaptiveListTile extends HookWidget { final Widget Function(BuildContext, StateSetter?)? trailing; @@ -8,7 +9,7 @@ class AdaptiveListTile extends HookWidget { final Widget? subtitle; final Widget? leading; final void Function()? onTap; - final bool? breakOn; + final Breakpoints breakOn; const AdaptiveListTile({ super.key, @@ -17,20 +18,20 @@ class AdaptiveListTile extends HookWidget { this.title, this.subtitle, this.leading, - this.breakOn , + this.breakOn = Breakpoints.md, }); @override Widget build(BuildContext context) { - final mediaQuery = MediaQuery.of(context); + final breakpoint = useBreakpoints(); return ListTile( title: title, subtitle: subtitle, trailing: - breakOn ?? mediaQuery.isSm ? null : trailing?.call(context, null), + breakpoint.isLessThan(breakOn) ? null : trailing?.call(context, null), leading: leading, - onTap: breakOn ?? mediaQuery.isSm + onTap: breakpoint.isLessThan(breakOn) ? () { onTap?.call(); showDialog( --- lib/components/shared/adaptive/adaptive_popup_menu_button.dart @@ -3,7 +3,7 @@ import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:popover/popover.dart'; import 'package:spotube/collections/spotube_icons.dart'; -import 'package:spotube/extensions/constrains.dart'; +import 'package:spotube/hooks/use_breakpoints.dart'; class Action extends StatelessWidget { final Widget text; @@ -49,18 +49,18 @@ class Action extends StatelessWidget { class AdaptiveActions extends HookWidget { final List actions; - final bool? breakOn; + final Breakpoints breakOn; const AdaptiveActions({ required this.actions, - this.breakOn, + this.breakOn = Breakpoints.lg, super.key, }); @override Widget build(BuildContext context) { - final mediaQuery = MediaQuery.of(context); + final breakpoint = useBreakpoints(); - if (breakOn ?? mediaQuery.lgAndUp) { + if (breakpoint.isLessThan(breakOn)) { return IconButton( icon: const Icon(SpotubeIcons.moreHorizontal), onPressed: () { --- lib/components/shared/adaptive/adaptive_select_tile.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:spotube/extensions/constrains.dart'; +import 'package:spotube/hooks/use_breakpoints.dart'; class AdaptiveSelectTile extends HookWidget { final Widget title; @@ -12,6 +12,8 @@ class AdaptiveSelectTile extends HookWidget { final List> options; + final Breakpoints breakAfterOr; + /// Show the smaller value when the breakpoint is reached /// /// If false, the control will be hidden when the breakpoint is reached @@ -19,8 +21,6 @@ class AdaptiveSelectTile extends HookWidget { /// Defaults to `true` final bool showValueWhenUnfolded; - final bool? breakLayout; - const AdaptiveSelectTile({ required this.title, required this.value, @@ -29,7 +29,7 @@ class AdaptiveSelectTile extends HookWidget { this.controlAffinity = ListTileControlAffinity.trailing, this.subtitle, this.secondary, - this.breakLayout, + this.breakAfterOr = Breakpoints.md, this.showValueWhenUnfolded = true, super.key, }); @@ -37,7 +37,7 @@ class AdaptiveSelectTile extends HookWidget { @override Widget build(BuildContext context) { final theme = Theme.of(context); - final mediaQuery = MediaQuery.of(context); + final breakpoint = useBreakpoints(); final rawControl = DropdownButton( items: options, value: value, @@ -55,7 +55,7 @@ class AdaptiveSelectTile extends HookWidget { .child, [value, options]); - final control = breakLayout ?? mediaQuery.mdAndUp + final control = breakpoint >= breakAfterOr ? rawControl : showValueWhenUnfolded ? Container( @@ -85,7 +85,7 @@ class AdaptiveSelectTile extends HookWidget { trailing: controlAffinity == ListTileControlAffinity.leading ? secondary : control, - onTap: breakLayout ?? mediaQuery.mdAndUp + onTap: breakpoint >= breakAfterOr ? null : () { showDialog( --- lib/components/shared/shimmers/shimmer_lyrics.dart @@ -2,8 +2,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:skeleton_text/skeleton_text.dart'; -import 'package:spotube/extensions/constrains.dart'; import 'package:spotube/extensions/theme.dart'; +import 'package:spotube/hooks/use_breakpoints.dart'; const widths = [20, 56, 89, 60, 25, 69]; @@ -21,7 +21,7 @@ class ShimmerLyrics extends HookWidget { final shimmerBackgroundColor = shimmerTheme.shimmerBackgroundColor ?? Colors.grey; - final mediaQuery = MediaQuery.of(context); + final breakpoint = useBreakpoints(); return ListView.builder( itemCount: 20, @@ -29,10 +29,10 @@ class ShimmerLyrics extends HookWidget { physics: const NeverScrollableScrollPhysics(), itemBuilder: (context, index) { final widthsCp = [...widths]; - if (mediaQuery.isMd) { + if (breakpoint.isMd) { widthsCp.removeLast(); } - if (mediaQuery.isSm) { + if (breakpoint.isSm) { widthsCp.removeLast(); widthsCp.removeLast(); } --- lib/components/shared/track_table/track_tile.dart @@ -10,8 +10,8 @@ import 'package:spotube/collections/spotube_icons.dart'; import 'package:spotube/components/shared/heart_button.dart'; import 'package:spotube/components/shared/links/link_text.dart'; import 'package:spotube/components/shared/image/universal_image.dart'; -import 'package:spotube/extensions/constrains.dart'; import 'package:spotube/extensions/context.dart'; +import 'package:spotube/hooks/use_breakpoints.dart'; import 'package:spotube/models/logger.dart'; import 'package:spotube/provider/authentication_provider.dart'; import 'package:spotube/provider/blacklist_provider.dart'; @@ -66,7 +66,7 @@ class TrackTile extends HookConsumerWidget { @override Widget build(BuildContext context, ref) { final theme = Theme.of(context); - final mediaQuery = MediaQuery.of(context); + final breakpoint = useBreakpoints(); final isBlackListed = ref.watch( BlackListNotifier.provider.select( (blacklist) => blacklist.contains( @@ -233,7 +233,7 @@ class TrackTile extends HookConsumerWidget { ), Padding( padding: EdgeInsets.symmetric( - horizontal: mediaQuery.lgAndUp ? 8.0 : 0, + horizontal: breakpoint.isMoreThan(Breakpoints.md) ? 8.0 : 0, vertical: 8.0, ), child: ClipRRect( @@ -278,7 +278,7 @@ class TrackTile extends HookConsumerWidget { track.value.name ?? """", style: TextStyle( fontWeight: FontWeight.bold, - fontSize: mediaQuery.isSm ? 14 : 17, + fontSize: breakpoint.isSm ? 14 : 17, ), overflow: TextOverflow.ellipsis, ), @@ -304,13 +304,13 @@ class TrackTile extends HookConsumerWidget { : TypeConversionUtils.artists_X_ClickableArtists( track.value.artists ?? [], textStyle: TextStyle( - fontSize: mediaQuery.isSm || mediaQuery.isMd + fontSize: breakpoint.isLessThan(Breakpoints.lg) ? 12 : 14)), ], ), ), - if (mediaQuery.lgAndUp && showAlbum) + if (breakpoint.isMoreThan(Breakpoints.md) && showAlbum) Expanded( child: isLocal ? Text(track.value.album?.name ?? """") @@ -321,7 +321,7 @@ class TrackTile extends HookConsumerWidget { overflow: TextOverflow.ellipsis, ), ), - if (!mediaQuery.isSm) ...[ + if (!breakpoint.isSm) ...[ const SizedBox(width: 10), Text(duration), ], --- lib/components/shared/track_table/tracks_table_view.dart @@ -10,9 +10,8 @@ import 'package:spotube/components/shared/fallbacks/not_found.dart'; import 'package:spotube/components/shared/sort_tracks_dropdown.dart'; import 'package:spotube/components/shared/track_table/track_tile.dart'; import 'package:spotube/components/library/user_local_tracks.dart'; -import 'package:spotube/extensions/constrains.dart'; import 'package:spotube/extensions/context.dart'; - +import 'package:spotube/hooks/use_breakpoints.dart'; import 'package:spotube/provider/download_manager_provider.dart'; import 'package:spotube/provider/blacklist_provider.dart'; import 'package:spotube/provider/proxy_playlist/proxy_playlist_provider.dart'; @@ -49,7 +48,7 @@ class TracksTableView extends HookConsumerWidget { TextStyle tableHeadStyle = const TextStyle(fontWeight: FontWeight.bold, fontSize: 16); - final mediaQuery = MediaQuery.of(context); + final breakpoint = useBreakpoints(); final selected = useState>([]); final showCheck = useState(false); @@ -107,7 +106,7 @@ class TracksTableView extends HookConsumerWidget { ), ), // used alignment of this table-head - if (mediaQuery.lgAndUp) ...[ + if (breakpoint.isMoreThan(Breakpoints.md)) ...[ const SizedBox(width: 100), Expanded( child: Row( @@ -121,7 +120,7 @@ class TracksTableView extends HookConsumerWidget { ), ) ], - if (!mediaQuery.isSm) ...[ + if (!breakpoint.isSm) ...[ const SizedBox(width: 10), Text(context.l10n.time, style: tableHeadStyle), const SizedBox(width: 10), --- lib/extensions/constrains.dart @@ -5,7 +5,7 @@ extension ContainerBreakpoints on BoxConstraints { bool get isMd => biggest.width > 640 && biggest.width <= 768; bool get isLg => biggest.width > 768 && biggest.width <= 1024; bool get isXl => biggest.width > 1024 && biggest.width <= 1280; - bool get is2Xl => biggest.width > 1280; + bool get is2Xl => biggest.width > 1280 && biggest.width <= 1536; bool get mdAndUp => isMd || isLg || isXl || is2Xl; bool get lgAndUp => isLg || isXl || is2Xl; @@ -17,7 +17,7 @@ extension ScreenBreakpoints on MediaQueryData { bool get isMd => size.width > 640 && size.width <= 768; bool get isLg => size.width > 768 && size.width <= 1024; bool get isXl => size.width > 1024 && size.width <= 1280; - bool get is2Xl => size.width > 1280; + bool get is2Xl => size.width > 1280 && size.width <= 1536; bool get mdAndUp => isMd || isLg || isXl || is2Xl; bool get lgAndUp => isLg || isXl || is2Xl; --- lib/hooks/use_breakpoint_value.dart @@ -1,6 +1,4 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:spotube/extensions/constrains.dart'; +import 'package:spotube/hooks/use_breakpoints.dart'; T useBreakpointValue({ T? sm, @@ -16,29 +14,28 @@ T useBreakpointValue({ (isSomeNull && others != null) || (!isSomeNull && others == null), 'You must provide a value for all breakpoints or a default value for others', ); - final context = useContext(); - final mediaQuery = MediaQuery.of(context); + final breakpoint = useBreakpoints(); if (isSomeNull) { - if (mediaQuery.isSm) { + if (breakpoint.isSm) { return sm ?? others!; - } else if (mediaQuery.isMd) { + } else if (breakpoint.isMd) { return md ?? others!; - } else if (mediaQuery.isXl) { + } else if (breakpoint.isXl) { return xl ?? others!; - } else if (mediaQuery.is2Xl) { + } else if (breakpoint.isXxl) { return xxl ?? others!; } else { return lg ?? others!; } } else { - if (mediaQuery.isSm) { + if (breakpoint.isSm) { return sm; - } else if (mediaQuery.isMd) { + } else if (breakpoint.isMd) { return md; - } else if (mediaQuery.isXl) { + } else if (breakpoint.isXl) { return xl; - } else if (mediaQuery.is2Xl) { + } else if (breakpoint.isXxl) { return xxl; } else { return lg; --- lib/hooks/use_breakpoints.dart @@ -0,0 +1,104 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_hooks/flutter_hooks.dart'; + +class BreakpointUtils { + Breakpoints breakpoint; + List breakpointList = [ + Breakpoints.sm, + Breakpoints.md, + Breakpoints.lg, + Breakpoints.xl, + Breakpoints.xxl + ]; + BreakpointUtils(this.breakpoint); + + bool get isSm => breakpoint == Breakpoints.sm; + bool get isMd => breakpoint == Breakpoints.md; + bool get isLg => breakpoint == Breakpoints.lg; + bool get isXl => breakpoint == Breakpoints.xl; + bool get isXxl => breakpoint == Breakpoints.xxl; + + bool isMoreThanOrEqualTo(Breakpoints b) { + return breakpointList + .sublist(breakpointList.indexOf(b)) + .contains(breakpoint); + } + + bool isLessThanOrEqualTo(Breakpoints b) { + return breakpointList + .sublist(0, breakpointList.indexOf(b) + 1) + .contains(breakpoint); + } + + bool isMoreThan(Breakpoints b) { + return breakpointList + .sublist(breakpointList.indexOf(b) + 1) + .contains(breakpoint); + } + + bool isLessThan(Breakpoints b) { + return breakpointList + .sublist(0, breakpointList.indexOf(b)) + .contains(breakpoint); + } + + bool operator >(other) { + return isMoreThan(other); + } + + bool operator <(other) { + return isLessThan(other); + } + + bool operator >=(other) { + return isMoreThanOrEqualTo(other); + } + + bool operator <=(other) { + return isLessThanOrEqualTo(other); + } + + @override + String toString() { + return ""BreakpointUtils($breakpoint)""; + } +} + +enum Breakpoints { sm, md, lg, xl, xxl } + +BreakpointUtils useBreakpoints() { + final context = useContext(); + final width = MediaQuery.of(context).size.width; + final breakpoint = useState(Breakpoints.lg); + final utils = BreakpointUtils(breakpoint.value); + + useEffect(() { + if (width > 1920 && breakpoint.value != Breakpoints.xxl) { + breakpoint.value = Breakpoints.xxl; + } else if (width > 1366 && + width <= 1920 && + breakpoint.value != Breakpoints.xl) { + breakpoint.value = Breakpoints.xl; + } else if (width > 800 && + width <= 1366 && + breakpoint.value != Breakpoints.lg) { + breakpoint.value = Breakpoints.lg; + } else if (width > 500 && + width <= 800 && + breakpoint.value != Breakpoints.md) { + breakpoint.value = Breakpoints.md; + } else if (width >= 250 && + width <= 500 && + breakpoint.value != Breakpoints.sm) { + breakpoint.value = Breakpoints.sm; + } + return null; + }, [width]); + + useEffect(() { + utils.breakpoint = breakpoint.value; + return null; + }, [breakpoint.value]); + + return utils; +} --- lib/pages/album/album.dart @@ -6,7 +6,7 @@ import 'package:spotify/spotify.dart'; import 'package:spotube/components/shared/heart_button.dart'; import 'package:spotube/components/shared/track_table/track_collection_view.dart'; import 'package:spotube/components/shared/track_table/tracks_table_view.dart'; -import 'package:spotube/extensions/constrains.dart'; +import 'package:spotube/hooks/use_breakpoints.dart'; import 'package:spotube/provider/proxy_playlist/proxy_playlist_provider.dart'; import 'package:spotube/services/queries/queries.dart'; import 'package:spotube/utils/service_utils.dart'; @@ -53,7 +53,7 @@ class AlbumPage extends HookConsumerWidget { ), [album.images]); - final mediaQuery = MediaQuery.of(context); + final breakpoint = useBreakpoints(); final isAlbumPlaying = useMemoized( () => playlist.containsTracks(tracksSnapshot.data ?? []), @@ -67,7 +67,7 @@ class AlbumPage extends HookConsumerWidget { tracksSnapshot: tracksSnapshot, album: album, routePath: ""/album/${album.id}"", - bottomSpace: mediaQuery.isSm || mediaQuery.isMd, + bottomSpace: breakpoint.isLessThanOrEqualTo(Breakpoints.md), onPlay: ([track]) { if (tracksSnapshot.hasData) { if (!isAlbumPlaying) { --- lib/pages/artist/artist.dart @@ -12,9 +12,9 @@ import 'package:spotube/components/shared/track_table/track_tile.dart'; import 'package:spotube/components/shared/image/universal_image.dart'; import 'package:spotube/components/artist/artist_album_list.dart'; import 'package:spotube/components/artist/artist_card.dart'; -import 'package:spotube/extensions/constrains.dart'; import 'package:spotube/extensions/context.dart'; import 'package:spotube/hooks/use_breakpoint_value.dart'; +import 'package:spotube/hooks/use_breakpoints.dart'; import 'package:spotube/models/logger.dart'; import 'package:spotube/provider/authentication_provider.dart'; import 'package:spotube/provider/blacklist_provider.dart'; @@ -55,6 +55,8 @@ class ArtistPage extends HookConsumerWidget { xxl: mediaQuery.size.width * 0.18, ); + final breakpoint = useBreakpoints(); + final playlistNotifier = ref.watch(ProxyPlaylistNotifier.notifier); final playlist = ref.watch(ProxyPlaylistNotifier.provider); @@ -152,7 +154,7 @@ class ArtistPage extends HookConsumerWidget { ), Text( data.name!, - style: mediaQuery.isSm + style: breakpoint.isSm ? textTheme.headlineSmall : textTheme.headlineMedium, ), @@ -164,7 +166,7 @@ class ArtistPage extends HookConsumerWidget { ), style: textTheme.bodyMedium?.copyWith( fontWeight: - mediaQuery.isSm ? null : FontWeight.bold, + breakpoint.isSm ? null : FontWeight.bold, ), ), const SizedBox(height: 20), --- lib/pages/desktop_login/desktop_login.dart @@ -5,15 +5,15 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:spotube/collections/assets.gen.dart'; import 'package:spotube/components/desktop_login/login_form.dart'; import 'package:spotube/components/shared/page_window_title_bar.dart'; -import 'package:spotube/extensions/constrains.dart'; import 'package:spotube/extensions/context.dart'; +import 'package:spotube/hooks/use_breakpoints.dart'; class DesktopLoginPage extends HookConsumerWidget { const DesktopLoginPage({Key? key}) : super(key: key); @override Widget build(BuildContext context, ref) { - final mediaQuery = MediaQuery.of(context); + final breakpoint = useBreakpoints(); final theme = Theme.of(context); final color = theme.colorScheme.surfaceVariant.withOpacity(.3); @@ -35,7 +35,7 @@ class DesktopLoginPage extends HookConsumerWidget { children: [ Assets.spotubeLogoPng.image( width: MediaQuery.of(context).size.width * - (mediaQuery.isSm || mediaQuery.isMd ? .5 : .3), + (breakpoint <= Breakpoints.md ? .5 : .3), ), Text( context.l10n.add_spotify_credentials, --- lib/pages/lyrics/lyrics.dart @@ -9,8 +9,8 @@ import 'package:spotube/components/shared/fallbacks/anonymous_fallback.dart'; import 'package:spotube/components/shared/page_window_title_bar.dart'; import 'package:spotube/components/shared/image/universal_image.dart'; import 'package:spotube/components/shared/themed_button_tab_bar.dart'; -import 'package:spotube/extensions/constrains.dart'; import 'package:spotube/extensions/context.dart'; +import 'package:spotube/hooks/use_breakpoints.dart'; import 'package:spotube/hooks/use_custom_status_bar_color.dart'; import 'package:spotube/hooks/use_palette_color.dart'; import 'package:spotube/pages/lyrics/plain_lyrics.dart'; @@ -36,7 +36,7 @@ class LyricsPage extends HookConsumerWidget { [playlist.activeTrack?.album?.images], ); final palette = usePaletteColor(albumArt, ref); - final mediaQuery = MediaQuery.of(context); + final breakpoint = useBreakpoints(); useCustomStatusBarColor( palette.color, @@ -117,7 +117,7 @@ class LyricsPage extends HookConsumerWidget { return DefaultTabController( length: 2, child: SafeArea( - bottom: mediaQuery.mdAndUp, + bottom: breakpoint > Breakpoints.md, child: Scaffold( extendBodyBehindAppBar: true, appBar: !kIsMacOS --- lib/pages/lyrics/plain_lyrics.dart @@ -6,8 +6,7 @@ import 'package:palette_generator/palette_generator.dart'; import 'package:spotify/spotify.dart'; import 'package:spotube/components/lyrics/zoom_controls.dart'; import 'package:spotube/components/shared/shimmers/shimmer_lyrics.dart'; -import 'package:spotube/extensions/constrains.dart'; - +import 'package:spotube/hooks/use_breakpoints.dart'; import 'package:spotube/provider/proxy_playlist/proxy_playlist_provider.dart'; import 'package:spotube/services/queries/queries.dart'; @@ -27,9 +26,11 @@ class PlainLyrics extends HookConsumerWidget { @override Widget build(BuildContext context, ref) { final playlist = ref.watch(ProxyPlaylistNotifier.provider); - final lyricsQuery = - useQueries.lyrics.spotifySynced(ref, playlist.activeTrack); - final mediaQuery = MediaQuery.of(context); + final lyricsQuery = useQueries.lyrics.spotifySynced( + ref, + playlist?.activeTrack, + ); + final breakpoint = useBreakpoints(); final textTheme = Theme.of(context).textTheme; final textZoomLevel = useState(defaultTextZoom); @@ -43,7 +44,7 @@ class PlainLyrics extends HookConsumerWidget { Center( child: Text( playlist.activeTrack?.name ?? """", - style: mediaQuery.mdAndUp + style: breakpoint >= Breakpoints.md ? textTheme.displaySmall : textTheme.headlineMedium?.copyWith( fontSize: 25, @@ -55,7 +56,7 @@ class PlainLyrics extends HookConsumerWidget { child: Text( TypeConversionUtils.artists_X_String( playlist.activeTrack?.artists ?? []), - style: (mediaQuery.mdAndUp + style: (breakpoint >= Breakpoints.md ? textTheme.headlineSmall : textTheme.titleLarge) ?.copyWith(color: palette.bodyTextColor), --- lib/pages/lyrics/synced_lyrics.dart @@ -6,8 +6,8 @@ import 'package:spotify/spotify.dart'; import 'package:spotube/collections/spotube_icons.dart'; import 'package:spotube/components/lyrics/zoom_controls.dart'; import 'package:spotube/components/shared/shimmers/shimmer_lyrics.dart'; -import 'package:spotube/extensions/constrains.dart'; import 'package:spotube/hooks/use_auto_scroll_controller.dart'; +import 'package:spotube/hooks/use_breakpoints.dart'; import 'package:spotube/hooks/use_synced_lyrics.dart'; import 'package:scroll_to_index/scroll_to_index.dart'; import 'package:spotube/provider/proxy_playlist/proxy_playlist_provider.dart'; @@ -33,13 +33,13 @@ class SyncedLyrics extends HookConsumerWidget { Widget build(BuildContext context, ref) { final playlist = ref.watch(ProxyPlaylistNotifier.provider); - final mediaQuery = MediaQuery.of(context); + final breakpoint = useBreakpoints(); final controller = useAutoScrollController(); final delay = ref.watch(_delay); final timedLyricsQuery = - useQueries.lyrics.spotifySynced(ref, playlist.activeTrack); + useQueries.lyrics.spotifySynced(ref, playlist?.activeTrack); final lyricValue = timedLyricsQuery.data; @@ -63,9 +63,9 @@ class SyncedLyrics extends HookConsumerWidget { ref.read(_delay.notifier).state = 0; }); return null; - }, [playlist.activeTrack]); + }, [playlist?.activeTrack]); - final headlineTextStyle = (mediaQuery.mdAndUp + final headlineTextStyle = (breakpoint >= Breakpoints.md ? textTheme.displaySmall : textTheme.headlineMedium?.copyWith(fontSize: 25)) ?.copyWith(color: palette.titleTextColor); @@ -86,7 +86,7 @@ class SyncedLyrics extends HookConsumerWidget { child: Text( TypeConversionUtils.artists_X_String( playlist.activeTrack?.artists ?? []), - style: mediaQuery.mdAndUp + style: breakpoint >= Breakpoints.md ? textTheme.headlineSmall : textTheme.titleLarge, ), @@ -139,7 +139,7 @@ class SyncedLyrics extends HookConsumerWidget { }, ), ), - if (playlist.activeTrack != null && + if (playlist?.activeTrack != null && (lyricValue == null || lyricValue.lyrics.isEmpty == true)) const Expanded(child: ShimmerLyrics()), ], --- lib/pages/player/player.dart @@ -12,7 +12,7 @@ import 'package:spotube/components/player/player_controls.dart'; import 'package:spotube/components/shared/animated_gradient.dart'; import 'package:spotube/components/shared/page_window_title_bar.dart'; import 'package:spotube/components/shared/image/universal_image.dart'; -import 'package:spotube/extensions/constrains.dart'; +import 'package:spotube/hooks/use_breakpoints.dart'; import 'package:spotube/hooks/use_custom_status_bar_color.dart'; import 'package:spotube/hooks/use_palette_color.dart'; import 'package:spotube/models/local_track.dart'; @@ -36,16 +36,16 @@ class PlayerView extends HookConsumerWidget { final isLocalTrack = ref.watch(ProxyPlaylistNotifier.provider.select( (value) => value.activeTrack is LocalTrack, )); - final mediaQuery = MediaQuery.of(context); + final breakpoint = useBreakpoints(); useEffect(() { - if (mediaQuery.lgAndUp) { + if (breakpoint.isMoreThan(Breakpoints.md)) { WidgetsBinding.instance.addPostFrameCallback((_) { GoRouter.of(context).pop(); }); } return null; - }, [mediaQuery.lgAndUp]); + }, [breakpoint]); String albumArt = useMemoized( () => TypeConversionUtils.image_X_UrlString( --- lib/pages/playlist/playlist.dart @@ -4,7 +4,7 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:spotube/components/shared/heart_button.dart'; import 'package:spotube/components/shared/track_table/track_collection_view.dart'; import 'package:spotube/components/shared/track_table/tracks_table_view.dart'; -import 'package:spotube/extensions/constrains.dart'; +import 'package:spotube/hooks/use_breakpoints.dart'; import 'package:spotube/models/logger.dart'; import 'package:flutter/material.dart'; import 'package:spotify/spotify.dart'; @@ -48,7 +48,7 @@ class PlaylistView extends HookConsumerWidget { final proxyPlaylist = ref.watch(ProxyPlaylistNotifier.provider); final playlistNotifier = ref.watch(ProxyPlaylistNotifier.notifier); - final mediaQuery = MediaQuery.of(context); + final breakpoint = useBreakpoints(); final meSnapshot = useQueries.user.me(ref); final tracksSnapshot = useQueries.playlist.tracksOfQuery(ref, playlist.id!); @@ -99,7 +99,7 @@ class PlaylistView extends HookConsumerWidget { playlistNotifier.addTracks(tracksSnapshot.data!); } }, - bottomSpace: mediaQuery.isSm || mediaQuery.isMd, + bottomSpace: breakpoint.isLessThanOrEqualTo(Breakpoints.md), showShare: playlist.id != ""user-liked-tracks"", routePath: ""/playlist/${playlist.id}"", onShare: () { --- lib/pages/search/search.dart @@ -16,8 +16,8 @@ import 'package:spotube/components/shared/track_table/track_tile.dart'; import 'package:spotube/components/shared/waypoint.dart'; import 'package:spotube/components/artist/artist_card.dart'; import 'package:spotube/components/playlist/playlist_card.dart'; -import 'package:spotube/extensions/constrains.dart'; import 'package:spotube/extensions/context.dart'; +import 'package:spotube/hooks/use_breakpoints.dart'; import 'package:spotube/provider/authentication_provider.dart'; import 'package:spotube/provider/proxy_playlist/proxy_playlist_provider.dart'; import 'package:spotube/services/queries/queries.dart'; @@ -41,7 +41,7 @@ class SearchPage extends HookConsumerWidget { final albumController = useScrollController(); final playlistController = useScrollController(); final artistController = useScrollController(); - final mediaQuery = MediaQuery.of(context); + final breakpoint = useBreakpoints(); final searchTerm = ref.watch(searchTermStateProvider); @@ -216,9 +216,10 @@ class SearchPage extends HookConsumerWidget { }, ), child: Scrollbar( - scrollbarOrientation: mediaQuery.lgAndUp - ? ScrollbarOrientation.bottom - : ScrollbarOrientation.top, + scrollbarOrientation: + breakpoint > Breakpoints.md + ? ScrollbarOrientation.bottom + : ScrollbarOrientation.top, controller: playlistController, child: Waypoint( onTouchEdge: () { --- lib/pages/settings/settings.dart @@ -16,8 +16,8 @@ import 'package:spotube/components/shared/adaptive/adaptive_list_tile.dart'; import 'package:spotube/components/shared/adaptive/adaptive_select_tile.dart'; import 'package:spotube/components/shared/page_window_title_bar.dart'; import 'package:spotube/collections/spotify_markets.dart'; -import 'package:spotube/extensions/constrains.dart'; import 'package:spotube/extensions/context.dart'; +import 'package:spotube/hooks/use_breakpoints.dart'; import 'package:spotube/l10n/l10n.dart'; import 'package:spotube/provider/download_manager_provider.dart'; import 'package:spotube/provider/authentication_provider.dart'; @@ -35,7 +35,6 @@ class SettingsPage extends HookConsumerWidget { final isDownloading = ref.watch(downloadManagerProvider.select((s) => s.isNotEmpty)); final theme = Theme.of(context); - final mediaQuery = MediaQuery.of(context); final pickColorScheme = useCallback(() { return () => showDialog( @@ -170,7 +169,7 @@ class SettingsPage extends HookConsumerWidget { ], ), AdaptiveSelectTile( - breakLayout: mediaQuery.lgAndUp, + breakAfterOr: Breakpoints.lg, secondary: const Icon(SpotubeIcons.shoppingBag), title: Text(context.l10n.market_place_region), subtitle: Text(context.l10n.recommendation_country), ",spotube,krtirtho,Dart,Dart,35895.0,1491.0,🎧 Open source Spotify client that doesn't require Premium nor uses Electron! Available for both desktop & mobile!,krtirtho_spotube,CODE_IMPROVEMENT,Large balanced changes 2fd43c0f7ff1d7f72fa65a528ddabccf90c89a0d,2023-10-05 05:03:12,Tauseef Hilal Tantary,"[New Algorithm] - Bell Numbers (#9324) * Add Bell Numbers * Use descriptive variable names * Add type hints * Fix failing tests",False,78,0,78,"--- maths/bell_numbers.py @@ -1,78 +0,0 @@ -"""""" -Bell numbers represent the number of ways to partition a set into non-empty -subsets. This module provides functions to calculate Bell numbers for sets of -integers. In other words, the first (n + 1) Bell numbers. - -For more information about Bell numbers, refer to: -https://en.wikipedia.org/wiki/Bell_number -"""""" - - -def bell_numbers(max_set_length: int) -> list[int]: - """""" - Calculate Bell numbers for the sets of lengths from 0 to max_set_length. - In other words, calculate first (max_set_length + 1) Bell numbers. - - Args: - max_set_length (int): The maximum length of the sets for which - Bell numbers are calculated. - - Returns: - list: A list of Bell numbers for sets of lengths from 0 to max_set_length. - - Examples: - >>> bell_numbers(0) - [1] - >>> bell_numbers(1) - [1, 1] - >>> bell_numbers(5) - [1, 1, 2, 5, 15, 52] - """""" - if max_set_length < 0: - raise ValueError(""max_set_length must be non-negative"") - - bell = [0] * (max_set_length + 1) - bell[0] = 1 - - for i in range(1, max_set_length + 1): - for j in range(i): - bell[i] += _binomial_coefficient(i - 1, j) * bell[j] - - return bell - - -def _binomial_coefficient(total_elements: int, elements_to_choose: int) -> int: - """""" - Calculate the binomial coefficient C(total_elements, elements_to_choose) - - Args: - total_elements (int): The total number of elements. - elements_to_choose (int): The number of elements to choose. - - Returns: - int: The binomial coefficient C(total_elements, elements_to_choose). - - Examples: - >>> _binomial_coefficient(5, 2) - 10 - >>> _binomial_coefficient(6, 3) - 20 - """""" - if elements_to_choose in {0, total_elements}: - return 1 - - if elements_to_choose > total_elements - elements_to_choose: - elements_to_choose = total_elements - elements_to_choose - - coefficient = 1 - for i in range(elements_to_choose): - coefficient *= total_elements - i - coefficient //= i + 1 - - return coefficient - - -if __name__ == ""__main__"": - import doctest - - doctest.testmod() ",python,thealgorithms,Python,Python,197891.0,46346.0,All Algorithms implemented in Python,thealgorithms_python,NEW_FEAT,Obvious d6cc887627de8868d88fe93968978a90f243c8e1,,volzhs,fix gradle build on windows,False,1,1,0,"--- SCsub @@ -59,7 +59,7 @@ for x in env.android_dependencies: gradle_java_dirs_text="""" for x in env.android_java_dirs: - gradle_java_dirs_text+="",'""+x+""'"" + gradle_java_dirs_text+="",'""+x.replace(""\\"",""/"")+""'"" gradle_res_dirs_text=""""",godotengine_godot.json,,,,,,,godotengine_godot.json,BUG_FIX,"5, obvious" 39af7d9ba157c5c6e3b9f9413013e482f1baac65,2025-02-06 02:31:10,Wout De Puysseleir,Add named slots example,False,60,22,82,"--- example_project/assets/svelte/Slots.svelte @@ -1,15 +0,0 @@ - - -Opening -
    - -

    {@render children?.()}

    -{#if subtitle} -

    Svelte Subtitle

    - {@render subtitle?.()} -{/if} - -
    -Closing --- example_project/assets/svelte/SlotsExperiment.svelte @@ -0,0 +1,8 @@ + + +

    Before slot

    +

    {@render children?.()}

    +

    After slot

    --- example_project/lib/example_web/components/layouts/app.html.heex @@ -108,17 +108,11 @@ 14 - - 15 -
    --- example_project/lib/example_web/live/live_slots_dynamic.ex @@ -1,24 +0,0 @@ -defmodule ExampleWeb.LiveSlotsDynamic do - use ExampleWeb, :live_view - - def render(assigns) do - ~H"""""" - <.svelte name=""Slots"" socket={@socket}> - - <%= @number %> - - <:subtitle> - <%= @number %> - - - """""" - end - - def mount(_session, _params, socket) do - {:ok, assign(socket, :number, 1)} - end - - def handle_event(""increase"", _, socket) do - {:noreply, assign(socket, :number, socket.assigns.number + 1)} - end -end --- example_project/lib/example_web/live/live_slots_simple.ex @@ -1,9 +1,9 @@ -defmodule ExampleWeb.LiveSlotsSimple do +defmodule ExampleWeb.LiveSlotsExperiment do use ExampleWeb, :live_view def render(assigns) do ~H"""""" - <.svelte name=""Slots"" socket={@socket}> + <.svelte name=""SlotsExperiment"" socket={@socket}> Inside Slot """""" --- example_project/lib/example_web/router.ex @@ -31,8 +31,7 @@ defmodule ExampleWeb.Router do live ""/struct"", LiveStruct live ""/sigil"", LiveSigil live ""/live-json"", LiveJson - live ""/slots-simple"", LiveSlotsSimple - live ""/slots-dynamic"", LiveSlotsDynamic + live ""/slots-experiment"", LiveSlotsExperiment live ""/composition"", LiveComposition end --- lib/component.ex @@ -101,7 +101,7 @@ defmodule LiveSvelte do data-props={json(@props)} data-ssr={@ssr_render != nil} data-live-json={if @init, do: json(@live_json_props), else: @live_json_props |> Map.keys() |> json()} - data-slots={@slots |> Slots.base_encode_64() |> json} + data-slots={Slots.base_encode_64(@slots) |> json} phx-update=""ignore"" phx-hook=""SvelteHook"" class={@class} ",live_svelte,woutdp,Elixir,Elixir,1416.0,58.0,Svelte inside Phoenix LiveView with seamless end-to-end reactivity,woutdp_live_svelte,NEW_FEAT,Obvious 0efb7237f9c8f9d6e32a7a528bcb881ebf00efa9,2023-03-12 08:39:27,Matt Svoboda,Fix LanguageTokenField crash. Also fix incorrect edit string when loading from saved prefs. Disallow duplicate language entries. Sort autocomplete entries. Trim language tokens for whitespace & make lowercase. (#4074),False,267,44,311,"--- iina/Extensions.swift @@ -422,10 +422,6 @@ extension String { return localizedCompare(other) == .orderedSame } - var quoted: String { - return ""\""\(self)\"""" - } - mutating func deleteLast(_ num: Int) { removeLast(Swift.min(num, count)) } --- iina/ISO639Helper.swift @@ -1,5 +1,5 @@ // -// ISO639_Helper.swift +// ISO639_2Helper.swift // iina // // Created by lhc on 14/3/2017. @@ -27,8 +27,6 @@ class ISO639Helper { let names = v.split(separator: "";"").map { String($0) } result.append(Language(code: k, name: names)) } - // Sort by description, ascending alpha order - result.sort{$0.description.localizedCompare($1.description) == .orderedAscending} return result }() --- iina/LanguageTokenField.swift @@ -8,139 +8,47 @@ import Cocoa -fileprivate let enableLookupLogging = false +fileprivate class Token: NSObject { + var content: String + var code: String -// Data structure: LangToken -// A token suitable for use by an `NSTokenField`, which represents a single ISO639 language -fileprivate struct LangToken: Equatable, Hashable, CustomStringConvertible { - // The 3-digit ISO639 language code, if a matching language was found: - let code: String? - // The `editingString` which shows up when a token is double-clicked. - // Will be equivalent to `description` field of matching `ISO639Helper.Language`, if match was found. - let editingString: String - - // As a displayed token, this is used as the displayString. When stored in prefs CSV, this is used as the V[alue]: - var identifierString: String { - code ?? normalizedEditingString - } - - // For logging and debugging only. Not to be confused with `ISO639Helper.Language.description` - var description: String { - return ""LangToken(code: \(code?.quoted ?? ""nil""), editStr: \(editingString.quoted))"" - } - - // ""Normalizes"" the editingString so it can be serialized to CSV. Removes whitespace and commas. - // Also makes lowercase, because it will be used as an case-agnostic identifier. - private var normalizedEditingString: String { - self.editingString.lowercased().replacingOccurrences(of: "","", with: "";"").trimmingCharacters(in: .whitespaces) - } - - // Need the following to prevent NSTokenField from doing an infinite loop - - func equalTo(_ rhs: LangToken) -> Bool { - return self.editingString == rhs.editingString - } - - static func ==(lhs: LangToken, rhs: LangToken) -> Bool { - return lhs.equalTo(rhs) - } - - static func !=(lhs: LangToken, rhs: LangToken) -> Bool { - return !lhs.equalTo(rhs) - } - - func hash(into hasher: inout Hasher) { - hasher.combine(editingString) - } - - // If code is valid, looks up its description and uses it for `editingString`. - // If code not found, falls back to init from editingString. - static func from(_ string: String) -> LangToken { - let matchingLangs = ISO639Helper.languages.filter({ $0.code == string }) - if !matchingLangs.isEmpty { - let langDescription = matchingLangs[0].description - return LangToken(code: string, editingString: langDescription) - } - return LangToken(code: nil, editingString: string) - } -} - -// Data structure: LangSet -// A collection of unique languages (usually the field's entire contents) -fileprivate struct LangSet { - let langTokens: [LangToken] - - init(langTokens: [LangToken]) { - self.langTokens = langTokens - } - - init(fromCSV csv: String) { - self.init(langTokens: csv.isEmpty ? [] : csv.components(separatedBy: "","").map{ LangToken.from($0.trimmingCharacters(in: .whitespaces)) }) - } - - init(fromObjectValue objectValue: Any?) { - self.init(langTokens: (objectValue as? NSArray)?.compactMap({ ($0 as? LangToken) }) ?? []) - } - - func toCommaSeparatedValues() -> String { - return langTokens.map{ $0.identifierString }.joined(separator: "","") - } - - func toNewlineSeparatedValues() -> String { - return langTokens.map{ $0.identifierString }.joined(separator: ""\n"") - } - - func contains(_ token: LangToken) -> Bool { - return !langTokens.filter({ $0.identifierString == token.identifierString }).isEmpty + init(_ content: String) { + self.content = content + self.code = ISO639Helper.descriptionRegex.captures(in: content)[at: 1] ?? content } } class LanguageTokenField: NSTokenField { private var layoutManager: NSLayoutManager? - // Should match the value from the prefs. - // Is only changed when `commaSeparatedValues` is set, and by `submitChanges()`. - private var savedSet = LangSet(langTokens: []) - - // may include unsaved tokens from the edit session - fileprivate var objectValueLangSet: LangSet { - LangSet(fromObjectValue: self.objectValue) - } - - var commaSeparatedValues: String { - get { - let csv = savedSet.toCommaSeparatedValues() - Logger.log(""LTF Generated CSV from savedSet: \(csv.quoted)"", level: .verbose) - return csv - } set { - Logger.log(""LTF Setting savedSet from CSV: \(newValue.quoted)"", level: .verbose) - self.savedSet = LangSet(fromCSV: newValue) - // Need to convert from CSV to newline-SV - self.stringValue = self.savedSet.toNewlineSeparatedValues() - } - } - override func awakeFromNib() { super.awakeFromNib() self.delegate = self - self.tokenStyle = .rounded - // Cannot use commas, because language descriptions are used as editing strings, and many of them contain commas, whitespace, quotes, - // and NSTokenField will internally tokenize editing strings. We should be able to keep using CSV in the prefs - self.tokenizingCharacterSet = .newlines } - @objc func controlTextDidEndEditing(_ notification: Notification) { - Logger.log(""LTF Submitting changes from controlTextDidEndEditing()"", level: .verbose) - submitChanges() + override var stringValue: String { + set { + self.objectValue = newValue.count == 0 ? + [] : newValue.components(separatedBy: "","").map(Token.init) + } + get { + return (objectValue as? NSArray)?.map({ val in + if let token = val as? Token { + return token.code + } else if let str = val as? String { + return str + } + return """" + }).joined(separator: "","") ?? """" + } } func controlTextDidChange(_ obj: Notification) { guard let layoutManager = layoutManager else { return } let attachmentChar = Character(UnicodeScalar(NSTextAttachment.character)!) let finished = layoutManager.attributedString().string.split(separator: attachmentChar).count == 0 - if finished { - Logger.log(""LTF Submitting changes from controlTextDidChange()"", level: .verbose) - submitChanges() + if finished, let target = target, let action = action { + target.performSelector(onMainThread: action, with: self, waitUntilDone: false) } } @@ -150,159 +58,42 @@ class LanguageTokenField: NSTokenField { } return true } +} - private func submitChanges() { - let langSetNew = filterDuplicates(from: self.objectValueLangSet, basedOn: self.savedSet) - makeUndoableUpdate(to: langSetNew) - } - - // Filter out duplicates. Use the prev set to try to figure out which copy is newer, and favor that one. - private func filterDuplicates(from langSetNew: LangSet, basedOn langSetOld: LangSet) -> LangSet { - let dictOld: [String: [Int]] = countTokenIndexes(langSetOld) - let dictNew: [String: [Int]] = countTokenIndexes(langSetNew) - - var indexesToRemove = Set() - // Iterate over only the duplicates: - for (dupString, indexesNew) in dictNew.filter({ $0.value.count > 1 }) { - if let indexesOld = dictOld[dupString] { - let oldIndex = indexesOld[0] - var indexToKeep = indexesNew[0] - for index in indexesNew { - // Keep the token which is farthest distance from old location - if abs(index - oldIndex) > abs(indexToKeep - oldIndex) { - indexToKeep = index - } - } - for index in indexesNew { - if index != indexToKeep { - indexesToRemove.insert(index) - } - } - } - } - let filteredTokens = langSetNew.langTokens.enumerated().filter({ !indexesToRemove.contains($0.offset) }).map({ $0.element }) - return LangSet(langTokens: filteredTokens) - } - - private func countTokenIndexes(_ langSet: LangSet) -> [String: [Int]] { - var dict: [String: [Int]] = [:] - for (index, token) in langSet.langTokens.enumerated() { - if var list = dict[token.identifierString] { - list.append(index) - dict[token.identifierString] = list - } else { - dict[token.identifierString] = [index] - } - } - return dict +extension LanguageTokenField: NSTokenFieldDelegate { + func tokenField(_ tokenField: NSTokenField, styleForRepresentedObject representedObject: Any) -> NSTokenField.TokenStyle { + return .rounded } - private func makeUndoableUpdate(to langSetNew: LangSet) { - let langSetOld = self.savedSet - let csvOld = langSetOld.toCommaSeparatedValues() - let csvNew = langSetNew.toCommaSeparatedValues() - - Logger.log(""LTF Updating \(csvOld.quoted) -> \(csvNew.quoted)}"", level: .verbose) - if csvOld == csvNew { - Logger.log(""LTF No changes to lang set"", level: .verbose) + func tokenField(_ tokenField: NSTokenField, displayStringForRepresentedObject representedObject: Any) -> String? { + if let token = representedObject as? Token { + return token.code } else { - self.savedSet = langSetNew - if let target = target, let action = action { - target.performSelector(onMainThread: action, with: self, waitUntilDone: false) - } - - // Register for undo or redo. Needed because the change to stringValue below doesn't include it - if let undoManager = self.undoManager { - undoManager.registerUndo(withTarget: self, handler: { languageTokenField in - self.makeUndoableUpdate(to: langSetOld) - }) - } + return representedObject as? String } - - // Update tokenField value - self.stringValue = langSetNew.toNewlineSeparatedValues() } -} - -extension LanguageTokenField: NSTokenFieldDelegate { func tokenField(_ tokenField: NSTokenField, hasMenuForRepresentedObject representedObject: Any) -> Bool { - // Tokens never have a context menu return false } - // Returns array of auto-completion results for user's typed string (`substring`) - func tokenField(_ tokenField: NSTokenField, completionsForSubstring substring: String, - indexOfToken tokenIndex: Int, indexOfSelectedItem selectedIndex: UnsafeMutablePointer?) -> [Any]? { + func tokenField(_ tokenField: NSTokenField, completionsForSubstring substring: String, indexOfToken tokenIndex: Int, indexOfSelectedItem selectedIndex: UnsafeMutablePointer?) -> [Any]? { let lowSubString = substring.lowercased() - let currentLangCodes = Set(self.savedSet.langTokens.compactMap{$0.code}) let matches = ISO639Helper.languages.filter { lang in - return !currentLangCodes.contains(lang.code) && lang.name.contains { $0.lowercased().hasPrefix(lowSubString) } + return lang.name.contains { $0.lowercased().hasPrefix(lowSubString) } } - let descriptions = matches.map { $0.description } - if enableLookupLogging { - Logger.log(""LTF Given substring: \(substring.quoted) -> returning completions: \(descriptions)"", level: .verbose) - } - return descriptions - } - - // Called by AppKit. Token -> DisplayStringString. Returns the string to use when displaying as a token - func tokenField(_ tokenField: NSTokenField, displayStringForRepresentedObject representedObject: Any) -> String? { - guard let token = representedObject as? LangToken else { return nil } - - if enableLookupLogging { - Logger.log(""LTF Given token: \(token) -> returning displayString: \(token.identifierString.quoted)"", level: .verbose) - } - return token.identifierString + return matches.map { $0.description } } - // Called by AppKit. Token -> EditingString. Returns the string to use when editing a token. func tokenField(_ tokenField: NSTokenField, editingStringForRepresentedObject representedObject: Any) -> String? { - guard let token = representedObject as? LangToken else { return nil } - - if enableLookupLogging { - Logger.log(""LTF Given token: \(token) -> returning editingString: \(token.editingString.quoted)"", level: .verbose) - } - return token.editingString - } - - // Called by AppKit. EditingString -> Token - func tokenField(_ tokenField: NSTokenField, representedObjectForEditing editingString: String) -> Any? { - // Return language code (if possible) - let token: LangToken - // editingString is description? - if let langCode = ISO639Helper.descriptionRegex.captures(in: editingString)[at: 1] { - token = LangToken.from(langCode) + if let token = representedObject as? Token { + return token.content } else { - token = LangToken.from(editingString) - } - if enableLookupLogging { - Logger.log(""LTF Given editingString: \(editingString.quoted) -> returning: \(token)"", level: .verbose) + return representedObject as? String } - return token } - // Serializes an array of LangToken objects into a string of CSV (cut/copy/paste support) - // Need to override this because it will default to using `tokenizingCharacterSet`, which needed to be overriden for - // internal parsing of `editingString`s to work correctly, but we want to use CSV when exporting `identifierString`s - // because they are more user-readable. - func tokenField(_ tokenField: NSTokenField, writeRepresentedObjects objects: [Any], to pboard: NSPasteboard) -> Bool { - guard let tokens = objects as? [LangToken] else { - return false - } - let langSet = LangSet(langTokens: tokens) - - pboard.clearContents() - pboard.setString(langSet.toCommaSeparatedValues(), forType: NSPasteboard.PasteboardType.string) - return true - } - - // Parses CSV from the given pasteboard and returns an array of LangToken objects (cut/copy/paste support) - // See note for `tokenField(writeRepresentedObjects....)` above. - func tokenField(_ tokenField: NSTokenField, readFrom pboard: NSPasteboard) -> [Any]? { - if let pbString = pboard.string(forType: NSPasteboard.PasteboardType.string) { - return LangSet(fromCSV: pbString).langTokens - } - return [] + func tokenField(_ tokenField: NSTokenField, representedObjectForEditing editingString: String) -> Any? { + return Token(editingString) } } --- iina/PrefCodecViewController.swift @@ -41,7 +41,7 @@ class PrefCodecViewController: PreferenceViewController, PreferenceWindowEmbedda override func viewDidLoad() { super.viewDidLoad() - audioLangTokenField.commaSeparatedValues = Preference.string(for: .audioLanguage) ?? """" + audioLangTokenField.stringValue = Preference.string(for: .audioLanguage) ?? """" updateHwdecDescription() } @@ -88,11 +88,7 @@ class PrefCodecViewController: PreferenceViewController, PreferenceWindowEmbedda } @IBAction func preferredLanguageAction(_ sender: LanguageTokenField) { - let csv = sender.commaSeparatedValues - if Preference.string(for: .audioLanguage) != csv { - Logger.log(""Saving \(Preference.Key.audioLanguage.rawValue): \""\(csv)\"""", level: .verbose) - Preference.set(csv, for: .audioLanguage) - } + Preference.set(sender.stringValue, for: .audioLanguage) } private func updateHwdecDescription() { --- iina/PrefSubViewController.swift @@ -71,7 +71,7 @@ class PrefSubViewController: PreferenceViewController, PreferenceWindowEmbeddabl defaultEncodingList.menu?.insertItem(NSMenuItem.separator(), at: 1) loginIndicator.isHidden = true - subLangTokenView.commaSeparatedValues = Preference.string(for: .subLang) ?? """" + subLangTokenView.stringValue = Preference.string(for: .subLang) ?? """" refreshSubSources() refreshSubSourceAccessoryView() @@ -149,11 +149,7 @@ class PrefSubViewController: PreferenceViewController, PreferenceWindowEmbeddabl } @IBAction func preferredLanguageAction(_ sender: LanguageTokenField) { - let csv = sender.commaSeparatedValues - if Preference.string(for: .subLang) != csv { - Logger.log(""Saving \(Preference.Key.subLang.rawValue): \""\(csv)\"""", level: .verbose) - Preference.set(csv, for: .subLang) - } + Preference.set(sender.stringValue, for: .subLang) } private func refreshSubSources() { ",iina,iina,Swift,Swift,39591.0,2605.0,The modern video player for macOS.,iina_iina,BUG_FIX,obvious 822bc2fd52103a62761c4065350b78b21fbf120c,,Cheng Zhao,Only call getDevTools for windows that have devtools.,False,1,1,0,"--- browser-window.coffee @@ -57,7 +57,7 @@ BrowserWindow.fromProcessIdAndRoutingId = (processId, routingId) -> BrowserWindow.fromDevTools = (processId, routingId) -> windows = BrowserWindow.getAllWindows() - for window in windows + for window in windows when window.isDevToolsOpened() devtools = window.getDevTools() return window if devtools.processId == processId and devtools.routingId == routingId",electron_electron.json,,,,,,,electron_electron.json,BUG_FIX,"4, getdevtools was being called for all windows which might have caused some issue, now it is only called for windows that have devtools" 60493c849a92b9a980ff7248537cbcc523c3013a,2024-11-02 06:55:44,low-batt,Correct miss-spelling of rendering in MainWindowController,False,1,1,2,"--- iina/MainWindowController.swift @@ -1884,7 +1884,7 @@ class MainWindowController: PlayerWindowController { osdAccessoryText.baseWritingDirection = .leftToRight fallthrough case .withText(let text): - // data for mustache rendering + // data for mustache redering let osdData: [String: String] = [ ""duration"": player.info.videoDuration?.stringRepresentation ?? Constants.String.videoTimePlaceholder, ""position"": player.info.videoPosition?.stringRepresentation ?? Constants.String.videoTimePlaceholder, ",iina,iina,Swift,Swift,39591.0,2605.0,The modern video player for macOS.,iina_iina,CODE_IMPROVEMENT,"typo fixed in the code, non-functional code change" 55cad3c3b7bd955a78b9b202366b936ac473de6f,,Aleksandr Statciuk,Update af.m3u Test GitHub action,False,1,1,0,"--- af.m3u @@ -47,5 +47,5 @@ rtmp://live.noorlive.com:1935/wesal/wesal1 http://173.208.166.179/zan_tv_live_456qwer586_stop_tyui123ikm159-fuck-off/tracks-v1a1/mono.m3u8 #EXTINF:-1 tvg-id="""" tvg-name="""" tvg-logo=""https://i.imgur.com/TwRnJmn.jpg"" group-title="""",Zarin TV https://5c21f7ec1999d.streamlock.net/8176/8176/playlist.m3u8 -#EXTINF:-1 tvg-id="""" tvg-name="""" tvg-logo=""https://i.imgur.com/dl13q0r.jpg"" group-title="""",Zhwandoon TV +#EXTINF:-1 tvg-id="""" tvg-name="""" tvg-logo=""https://i.imgur.com/dl13q0r.jpg"" group-title="""",Zhwandoon TV http://173.208.166.179/zhwandoon_tv_live-ca76ca2c8763_bastard-koni-dozd-lanati-kona-warkawa-c2df49a4/tracks-v1a1/mono.m3u8",iptv-org_iptv.json,,,,,,,iptv-org_iptv.json,CONFIG_CHANGE,"5, just update in github actions"