WebSockets is work erorr Reverse Proxy

⚠ Please verify that this bug has NOT been raised before.

[X] I checked and didn't find similar issue

🛡 Security Policy

[X] I agree to have read this project Security Policy

📝 Describe your problem
WebSockets is work but ? Cannot connect to the socket server. [Error: websocket error] Reconnecting...
Using a Reverse Proxy?

🐻 Uptime-Kuma Version
1.17.1
💻 Operating System and Arch
win
🌐 Browser
chrome
🐋 Docker Version
no Docker
🟩 NodeJS Version
16

If you're getting this error then your reverse proxy isn't setup to be able to use websockets. Documentation is available here to find configurations available for your reverse proxy: https://github.com/louislam/uptime-kuma/wiki/Reverse-Proxy


Decentralised storage for sharing transactions

Support decentralised storage platforms like arweave or shadowstore for sharing transactions

a more fancier solution here: having a better call sol smart contract to allow users to create their user profile, save their working (transactions) on decentralized storage platforms and share them (which just sharing the account address)

Can just store in a Solana account


expose window.print handler to page world

Task/Issue URL:
Tech Design URL:
CC:
Description:

Steps to test this PR:
1.
2.

Copy Testing:

[ ] Use of correct apostrophes in new copy, ie ’ rather than '

Orientation Testing:

[ ] Portrait
[ ] Landscape

Device Testing:

[ ] iPhone SE (1st Gen)
[ ] iPhone 8
[ ] iPhone X
[ ] iPhone 14 Pro
[ ] iPad

OS Testing:

[ ] iOS 14
[ ] iOS 15
[ ] iOS 16

Theme Testing:

[ ] Light theme
[ ] Dark theme

Internal references:
Software Engineering Expectations
Technical Design Template

Current dependencies on/for this PR:

develop

PR #2210   👈

This stack of pull requests is managed by Graphite.


[krabsetw] Add new port

Describe the pull request

What does your PR fix? Fixes #
Adding new port for krabsetw

Which triplets are supported/not supported? Have you updated the CI baseline?
Windows (non UWP) triplets are supported. Other platforms not. CI baseline not updated.

Does your PR follow the maintainer guide?
Yes

/azp run

/azp run

Is this a header-only library?

Yes it is header-only

LGTM now, thanks for your PR @jrave.

Thanks for your contribution!


SSR - Only 100 requests per second with express-template-master example which is without database connection. 702 from 10 000 failed

Versions

nuxt:
node:

Reproduction

That is result of an example without database (with database I think will be like my app 10-20 req per sec)
https://github.com/nuxt-community/express-template
Server Software:
Server Hostname:        localhost
Server Port:            3000
Document Path:          /users
Document Length:        4092 bytes
Concurrency Level:      1000
Time taken for tests:   99.588 seconds
Complete requests:      10000
Failed requests:        702
(Connect: 0, Receive: 234, Length: 234, Exceptions: 234)
Total transferred:      42130524 bytes
HTML transferred:       39962472 bytes
Requests per second:    100.41 [#/sec] (mean)
Time per request:       9958.825 [ms] (mean)
Time per request:       9.959 [ms] (mean, across all concurrent requests)
Transfer rate:          413.13 [Kbytes/sec] received
Connection Times (ms)
min  mean[+/-sd] median   max
Connect:        0  709 3122.9      2   65266
Processing:  2977 8186 13729.1   5560   93361
Waiting:        0 5373 3869.4   4922   49591
Total:       3015 8895 14332.6   5845   94407
Percentage of the requests served within a certain time (ms)
50%   5845
66%   6477
75%   6968
80%   7360
90%   8455
95%  13528
98%  94389
99%  94400
100%  94407 (longest request)
Second
Server Software:
Server Hostname:        localhost
Server Port:            3000
Document Path:          /users
Document Length:        4092 bytes
Concurrency Level:      1000
Time taken for tests:   108.360 seconds
Complete requests:      10000
Failed requests:        0
Total transferred:      43140000 bytes
HTML transferred:       40920000 bytes
Requests per second:    92.28 [#/sec] (mean)
Time per request:       10836.010 [ms] (mean)
Time per request:       10.836 [ms] (mean, across all concurrent requests)
Transfer rate:          388.79 [Kbytes/sec] received
Connection Times (ms)
min  mean[+/-sd] median   max
Connect:        0  781 2895.2      2   31442
Processing:  2805 9416 6771.8   7782   68919
Waiting:     1846 8482 6731.1   6981   68087
Total:       2813 10197 7551.3   8335   71966
Percentage of the requests served within a certain time (ms)
50%   8335
66%   9700
75%  10624
80%  11338
90%  14449
95%  21578
98%  42033
99%  43440
100%  71966 (longest request)

Additional Details

Steps to reproduce
What is Expected?
What is actually happening?

@nuxtdev Do read through the advice posted in response to your previous issue.
For support I'd recommend joining our Discord server and the channel to start with is #how-to-get-help. 🙃

@nuxtdev Do read through the advice posted in response to your previous issue.
For support I'd recommend joining our Discord server and the channel to start with is #how-to-get-help.

I was on Discord and ask other questions but no body respond to it :)


buildGoModule: refactor stripping

Current situation

Many Go packages in nixpkgs set ldflags = [ "-s" "-w" ];
nix-init sets ldflags = [ "-s" "-w" ]; for Go packages
stdenv has it's own stripping mechanism, which is turned on by default and can be disabled with dontStrip = true;
For debugging, people want to override individual packages with dontStrip = true; and get the expected debug symbols, which isn't currently working for many packages that set -s -w on a package level (see https://github.com/NixOS/nixpkgs/pull/277609)
There have been repeated discussions in PR review about whether these flags should be added or not

About -w
From the Go v1.22 release notes:

The -w flag suppresses DWARF debug information generation. The -s flag suppresses symbol table generation. The -s flag also implies the -w flag

Setting -w in combination with -s has no effect.
Suggested action items:

[ ] Update nix-init to not set -w flag
[ ] Remove all occurrences of -w in nixpkgs

About -s
Go's native stripping works far better than the stripping done by stdenv (see table below for comparison), binaries are smaller and recognized by file as stripped.
In my opinion, we should use Go's native stripping mechanism by default in buildGoModule. This would mean that we:

Add -s to the ldflags inside of buildGoModule
Don't add -s to the ldflags in case dontStrip is set
Throw a warning in case -s is set in ldflags

We can discuss whether we want to always set dontStrip on the underlying derivation (maybe to fasten up build time) or if we keep it active to prevent confusion and for mixed language derivations (I'd opt for keeping it for now).
Suggested action items:

[ ] Update nix-init to not set -s flag
[ ] Update buildGoModule to strip with -s flag by default, to drop -s when dontStrip = true, throw warning if flag is parsed from outside
[ ] Remove all occurrences of -s in nixpkgs

Example: stripping statistics for uplosi

CGO_ENABLED
dontStrip
ldflags
size
file

1
false

73871744 (71MiB)
dynamically linked, not stripped,

1
true

89904674 (86MiB)
dynamically linked, with debug_info, not stripped,

1
false
-w
73871744 (71MiB)
dynamically linked, not stripped,

1
true
-w
73880107 (71MiB)
dynamically linked, not stripped,

1
false
-s
64374008 (62MiB)
dynamically linked, stripped,

1
true
-s
64372979 (62MiB)
dynamically linked, stripped,

1
false
-s -w
64374008 (62MiB)
dynamically linked, stripped,

1
true
-s -w
64372979 (62MiB)
dynamically linked, stripped,

0
false

73753128 (71MiB)
statically linked, not stripped,

0
true

89767921 (86MiB)
statically linked, with debug_info, not stripped,

0
false
-w
73753128 (71MiB)
statically linked, not stripped,

0
true
-w
73762114 (71MiB)
statically linked, not stripped,

0
false
-s
64269808 (62MiB)
statically linked, stripped,

0
true
-s
64270471 (62MiB)
statically linked, stripped,

0
false
-s -w
64269808 (62MiB)
statically linked, stripped,

0
true
-s -w
64270471 (62MiB)
statically linked, stripped,

Created with https://github.com/katexochen/nixpkgs/commit/169e31b0baad86c8f9bbd820a7919ffe80c68145, which can be used to check results for other packages.

I looked at this a while ago: https://github.com/NixOS/nixpkgs/issues/177698

Add -s to the ldflags inside of buildGoModule
Don't add -s to the ldflags in case dontStrip is set
Throw a warning in case -s is set in ldflags

Agree.

We can discuss whether we want to always set dontStrip on the underlying derivation (maybe to fasten up build time) or if we keep it active to prevent confusion and for mixed language derivations (I'd opt for keeping it for now).

Agree with keeping it for now.

I looked at this a while ago: https://github.com/NixOS/nixpkgs/issues/177698

Ah, I remember that I read that thread a while ago but had forgotten it when opening this issue. Let me catch up with this again, and maybe we should also continue discussion in that thread.

I've updated the issue description with the additional pointers to the previous work. For me, there are two points from the previous discussion we should note:

Ideally, we could integrate the stripping of all symbols (as opposed to debug symbols only) into the builder by setting some additional flags for the stdenv stripping. However, there seem to be problems with doing so on Darwin.
Previous experiments seemed to have unveiled breakage of some packages in case the Go strip flags are set, but there weren't any concrete examples for such package breakages. We should document that, if needed, the Go stripping can be disabled by adding -s=0 to the ldflags. We must ensure to add the default ldflags first.


A safe version of strtok should be strtok_s on Windows.

The function strtok_r, invoked in numerics/src/tools/CSparseMatrix.c, is callable on linux system. On Windows, it should be strtok_s.

Can you try the following fix: at the beginning of numerics/src/tools/CSparseMatrix.c (like before #if defined(__cplusplus)), add
#if defined(_MSC_VER)
  #define strtok_r strtok_s
#endif

This would break with C11, since the latter defines another strtok_s. A proper fix would need to check that case as well.
Out of curiosity, which compiler are you using? MSVC (cl.exe) or Clang (clang-cl.exe)?

I'm using MSVC. I finished compilation by substituting all strtok_r with strtok_s.

Cool! I did some effort compiling siconos on Windows many years back.
Did you compile all of siconos or just numerics?

Just the externals and numerics


Massive amount of warnings with PrimeVue

Environment

Nuxt Version:     3.12.1
CLI Version:      3.12.0
Nitro Version:    2.9.6
Builder:          -
User Config:      devtools, pages, css, modules, runtimeConfig, eslint, primevue, i18n, pinia, tailwindcss
Runtime Modules<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>
Reproduction
Use any nuxt-primevue component in Nuxt 3.12+
Describe the bug
After update to 3.12 nuxt creates massive amount of warnings when used with PrimeVue, as it's BaseComponent reads "pt" key from config.

https://github.com/primefaces/primevue/blob/master/components/lib/basecomponent/BaseComponent.vue
Additional context
Although optional chaining is used in PrimeVue it still uses "get" method of proxy object, so I am kinda unsure if it should be fixed on your side with some kind of config for list of keys to ignore or on PrimeVue side with some other way, e. g. with "key in object" check.
Logs
No response

https://stackblitz.com/edit/github-tyjczq?file=app.vue

PrimeVue should probably do something like this:
const config = useRuntimeConfig()
const primveVueConfig = import.meta.client ? config.public.primevue : config.primevue

We can ensure we only log once, however: https://github.com/nuxt/nuxt/commit/9e56b60c6b948596d29f153a0ef002ee04d5c067.


Error "All APIs are down" 'try again later'

whether the song is in my favorites or in the search results, songs don't seem to play on my end anymore.
was there a recent update to youtube APIs that broke streaming? maybe the culprit is simply my location (North Africa) ? it's been at least a week since it's been like this

okay, it might have something to do with this issue on Piped 'Got error: "Sign in to confirm that you're not a bot"' ?

i get this error randomly when using the default instance "kavin.rocks (official)" but not on other instances like "kavin.rocks libre (official)" even when i'm signed in (to piped) although it might be reffering to signing in to youtube because it seems like recently they've been enforcing it to view videos.

now here's the thing i tried using Musicale on my phone and it seemed to work just fine, Firefox on Android and Chromium, Edge on Windows

I didn't change any API recently... the issue is probably that your IP address with that specific browser (user-agent) was considered "strange" and blocked from Piped's Cloudflare, preventing you from accessing the API.
Once I opened an issue (https://github.com/TeamPiped/Piped/issues/2833) because they were blocking Windows 7/8 devices (as they were considered "old browsers").
For the fact that no other instance was able to act as an alternative from the official one, this could be also because some of them use Cloudflare and others are offline: I put there as many (without CORS) as I could, but I probably need to update them (some might not work anymore at all).

My suggestion is just to wait, downtimes happens also to me sometimes (currently I don't experience it but I see a response slowdown).
A "trick" that could work (if you're not blocked by Cloudflare but Piped is still stuck on the request) is to init a request to Piped (by trying to play the song), wait 2/3 secs, reload and repeat the same multiple times... this sometimes prevents Piped from leaving you stuck on a request and "exploit" another one, giving Piped some time to fetch the data for you.

On Musicale side there's not so much to do as it relies on Piped for everything, anyway some ideas to lower the downtime rates that I could add in the future:

Directly fetch fresh instances from Piped Wiki (could be impossible due to CORS)
Allow users to add/remove/modify instances to use
Save songs locally (complicated because of indexedDB and space available could not be enough, as there's a max space quota of 500MB, divided by ~3MB for each song, allowing only, ideally, 166 songs to be saved)

Update
I've just found that there's an opened issue on Piped itself regarding this problem: https://github.com/TeamPiped/Piped/issues/3658
Seems that Google is doing an a/b test to prevent content scraping, by requiring the user to sign-in to prove of not being a bot...

Anyway, as said before, there's nothing Musicale can do right now to prevent these issues.


fix: use proxy for deployment

:pencil: Description

Implement proxy via Vite config

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


Refactor MusicService notification handling

MusicService is currently responsible for updating the notification each time there are metadata or playback state changes. The code associated with this makes MusicService somewhat cumbersome.
This PR refactors MusicService to delegate the notification handling to PlayerNotifcationManager. An extension provided by ExoPlayer.
A new class is added UampNotificationManager which wraps PlayerNotificationManager. This sets up the UAMP specific UI properties, and handles showing and hiding the notification.
Wherever possible I have copied the existing notification style, where not possible I have taken the attitude of "trust ExoPlayer to do the right thing".
One notable exception is the addition of a STOP button on the notification which stops current playback and dismisses the notification. I took the executive decision to add this because it makes it easier for users to clear the notification (previously you would need to swipe up the activity).

Many thanks for your reviews @keyboardsurfer and @nic0lette


Postgres multiline strings syntax highlight is wrong

Both of these are a single string select and should be highlighted as a string.

That is an issue in Ace editor SQL syntax highlight. Take a look at this online demo: https://ace.c9.io/build/kitchen-sink.html
If you are interested in getting it solved, please open an issue for that here https://github.com/ajaxorg/ace

@maxcnunes Interesting, thanks.
On that note, have you thought about switching to the vscode syntax highlight / language library? Here are some resources:

https://code.visualstudio.com/docs/extensionAPI/language-support
https://code.visualstudio.com/docs/languages/overview
https://code.visualstudio.com/docs/extensions/example-language-server
https://code.visualstudio.com/docs/extensions/themes-snippets-colorizers

It'd be a pretty big project, but it could be interesting. The vscode language infrastructure supports syntax highlighting, validation, snippets and autocompletion, all of it over a well defined generic protocol. I wonder what the tooling is for SQL there...

;)

It's interesting to see that all postgres-specific syntax highlight definitions resolve to this old file:
https://github.com/mulander/postgres.tmbundle/blob/master/Syntaxes/PL pgSQL (Postgres).tmLanguage

I don't have interest going through that work myself 😆
But if that editor supports all features we use nowadays with the current editor and anyone is willing in doing that switch, I wouldn't block that PR if it is working/looking good.


Text can overlay images on DOMPDF exports

Describe the bug
Export pdf with an image
Steps To Reproduce
write an page with an embded image , export pdf.
Expected behavior
pdf correctly exported
Screenshots
Page

pdf

Your Configuration (please complete the following information):

Exact BookStack Version : BookStack v0.26.4
PHP Version: 7.3.5
Hosting Method : Apache

Hi
Have you tried to switch to this?
https://www.bookstackapp.com/docs/admin/pdf-rendering/

Hi,
I will use a Shared Hosting, so I don't think I will able to do it.
Anyway thank you for your help.

Thanks,
I confirm this works : https://www.bookstackapp.com/docs/admin/pdf-rendering
If you get fail to convert PDF after setting wkhtmltopdf in .env and installing wkhtmltopdf with apt-get command : you will need a headless version (with patched QT libraries).
I found an easy way to install it on debian so I share here how to do it :
https://stackoverflow.com/a/38336153

Just come across this while looking through the issue list. Tried testing on my dev instance use a variety of text and image combinations but could not reproduce. Think this may have been addressed in the meantime so will therefore close but feel free to raise again if it can be reproduced following specific steps.


[fix PR submitted] kubectl hangs when running kubectl version with no context causing prompt to hang

The problem
PR #1246 submitted for review with the fix outlined above in place and tested as working with both no context and a context, all works as normal once the fix is applied.
I think this is a recent problem, and through a few hours of debugging I cannot figure out why this behaviour has suddenly changed.
Now I understand this isn't a spaceship-prompt issue, but until whatever issue is resolved in kubectl, a workaround is required otherwise I have to wait around 10 seconds for the prompt to load everytime, which is an obvious frustration.
When using kubectl without a context it now hangs trying to connect to a null context resulting in the following error:
14:31:16 in ~
➜  echo $KUBECONFIG

14:31:20 in ~ took 10s
➜  kubectl version
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.0", GitCommit:"a866cbe2e5bbaa01cfd5e969aa3e033f3282a8a2", GitTreeState:"clean", BuildDate:"2022-08-23T17:44:59Z", GoVersion:"go1.19", Compiler:"gc", Platform:"darwin/arm64"}
Kustomize Version: v4.5.7
Unable to connect to the server: EOF

# 10 second hang

Using brew, I rolled back kubectl to prior versions (currently 1.25, but tried <1.22 as well) and this problem now seems to just keep occuring.
My proposed fix for this is to mirror the context check that occurs within sections/kubectl_context.zsh line 29-30 into sections/kubectl_version.zsh at line 27-28, prior to the version check. So the snippet reads:
# ...

  spaceship::exists kubectl || return

  # New context check that will exit out of the version check if no context is loaded, avoiding the hang
  # Code sourced from ~ sections/kubectl_context.zsh:29-30
  local kube_context=$(kubectl config current-context 2>/dev/null)
  [[ -z $kube_context ]] && return

  # if kubectl can't connect kubernetes cluster, kubernetes version section will be not shown
  local kubectl_version=$(kubectl version --short 2>/dev/null | grep "Server Version" | sed 's/Server Version: \(.*\)/\1/')
  [[ -z $kubectl_version ]] && return

# ...

PR #1246 submitted for review with the fix outlined above in place and tested as working.
Relevant Zsh configuration
This isn't the `~/.zshrc`, this is instead the output of `set -x` to debug ZSH's prompt loading:

+spaceship_kubectl:1> [[ true == false ]]
+spaceship_kubectl:3> spaceship_kubectl_version
+spaceship_kubectl_version:1> [[ true == false ]]
+spaceship_kubectl_version:3> spaceship::exists kubectl
+spaceship::exists:1> command -v kubectl
+spaceship_kubectl_version:6> kubectl version --short
+spaceship_kubectl_version:6> grep '--color=auto' '--exclude-dir=.bzr' '--exclude-dir=CVS' '--exclude-dir=.git' '--exclude-dir=.hg' '--exclude-dir=.svn' '--exclude-dir=.idea' '--exclude-dir=.tox' 'Server Version'
+spaceship_kubectl_version:6> sed 's/Server Version: \(.*\)/\1/'

# hangs for upwards of 15 seconds before continuing

What is version of Spaceship are you using?
v4.5.0
What is version of Zsh are you using?
zsh 5.9 (arm-apple-darwin21.3.0)
What operation system are you running?
macOS 12.5
Do you use any Zsh framework or plugin manager?
No response
Which terminal emulator do you use?
iTerm2
Additional information
No response

Thanks for contributing!

Thanks for the fast merge! 😄

:tada: This issue has been resolved in version 4.5.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


gpsd 3.17

Issue description
I started on this but xgps segfaults for me:
--- a/pkgs/servers/gpsd/0001-Import-LD_LIBRARY_PATH-to-allow-running-scons-check-.patch
+++ b/pkgs/servers/gpsd/0001-Import-LD_LIBRARY_PATH-to-allow-running-scons-check-.patch
@@ -12,14 +12,14 @@
 index fe444a2..f73c87e 100644
 --- a/SConstruct
 +++ b/SConstruct
-@@ -220,6 +220,7 @@ import_env = (
+@@ -263,6 +263,7 @@
      'STAGING_DIR',     # Required by the OpenWRT and CeroWrt builds.
      'STAGING_PREFIX',  # Required by the OpenWRT and CeroWrt builds.
      'WRITE_PAD',       # So we can test WRITE_PAD values on the fly.
 +    'LD_LIBRARY_PATH', # Allows running 'scons check' without 'chrpath'
-     )
+ )
+
  envs = {}
- for var in import_env:
 --
 2.9.0

--- a/pkgs/servers/gpsd/0001-Use-pkgconfig-for-dbus-library.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From b4ed6e9e89e3b7d57e5de9f2c1987a489bb5628c Mon Sep 17 00:00:00 2001
-From: Alexey Shmalko<EMAIL_ADDRESS>-Date: Sat, 9 Jul 2016 20:54:05 +0300
-Subject: [PATCH] Use pkgconfig for dbus library
-
-Without this, gcc can't find library path for the dbus.
-
-This is already fixed upstream, so the patch shouldn't be necessary with
-the next version of gpsd.
----
- SConstruct | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/SConstruct b/SConstruct
-index 0d4b29d..d8624b0 100644
---- a/SConstruct
-+++ b/SConstruct
-@@ -586,8 +586,8 @@ else:
-
-     if env['dbus_export'] and config.CheckPKG('dbus-1'):
-         confdefs.append("#define HAVE_DBUS 1\n")
--        dbusflags = ["-ldbus-1"]
--        env.MergeFlags(pkg_config("dbus-1"))
-+        dbusflags = pkg_config("dbus-1")
-+        env.MergeFlags(dbusflags)
-     else:
-         confdefs.append("/* #undef HAVE_DBUS */\n")
-         dbusflags = []
---
-2.9.0
-
--- a/pkgs/servers/gpsd/0002-Import-XML_CATALOG_FILES-to-be-able-to-validate-the-.patch
+++ b/pkgs/servers/gpsd/0002-Import-XML_CATALOG_FILES-to-be-able-to-validate-the-.patch
@@ -15,14 +15,15 @@
 index f73c87e..0d4b29d 100644
 --- a/SConstruct
 +++ b/SConstruct
-@@ -221,6 +221,7 @@ import_env = (
+@@ -263,7 +263,8 @@
+     'STAGING_DIR',     # Required by the OpenWRT and CeroWrt builds.
      'STAGING_PREFIX',  # Required by the OpenWRT and CeroWrt builds.
      'WRITE_PAD',       # So we can test WRITE_PAD values on the fly.
      'LD_LIBRARY_PATH', # Allows running 'scons check' without 'chrpath'
 +    'XML_CATALOG_FILES', # Enables validating the manual with 'xmlto' using nix build system
-     )
+ )
+
  envs = {}
- for var in import_env:
 --
 2.9.0

--- a/pkgs/servers/gpsd/default.nix
+++ b/pkgs/servers/gpsd/default.nix
@@ -8,11 +8,21 @@
 # TODO: put the X11 deps behind a guiSupport parameter for headless support

 stdenv.mkDerivation rec {
-  name = "gpsd-3.16";
+  name = "gpsd-3.17";
+
+  # outputs = [ "out" "lib" "python" "dev" "man" ];
+
+  # temporarily redirect everything to $out for easier debugging
+  preConfigure = ''
+    export lib=$out
+    export python=$out
+    export dev=$out
+    export man=$out
+  '';

   src = fetchurl {
     url = "http://download-mirror.savannah.gnu.org/releases/gpsd/${name}.tar.gz";
-    sha256 = "0a90ph4qrlz5kkcz2mwkfk3cmwy9fmglp94znz2y0gsd7bqrlmq3";
+    sha256 = "0yp7hm6wxyb8mch98260v1jv8bl1xn5a8srxidzrjcaqzgndpq38";
   };

   nativeBuildInputs = [
@@ -26,27 +36,24 @@
     libxslt libusb1
   ];

-  pythonPath = [
-    python2Packages.pygobject2
-    python2Packages.pygtk
+  pythonPath = with python2Packages; [
+    pygobject3 pycairo
   ];

   patches = [
     ./0001-Import-LD_LIBRARY_PATH-to-allow-running-scons-check-.patch
     ./0002-Import-XML_CATALOG_FILES-to-be-able-to-validate-the-.patch
-
-    # TODO: remove the patch with the next release
-    ./0001-Use-pkgconfig-for-dbus-library.patch
   ];

   # - leapfetch=no disables going online at build time to fetch leap-seconds
   #   info. See <gpsd-src>/build.txt for more info.
   buildPhase = ''
     patchShebangs .
-    sed -e "s|systemd_dir = .*|systemd_dir = '$out/lib/systemd/system'|" -i SConstruct
+    sed -e "s|systemd_dir = .*|systemd_dir = '$lib/lib/systemd/system'|" -i SConstruct
     scons prefix="$out" leapfetch=no gpsd_user=${gpsdUser} gpsd_group=${gpsdGroup} \
-        systemd=yes udevdir="$out/lib/udev" \
-        python_libdir="$out/lib/${python2Packages.python.libPrefix}/site-packages"
+        systemd=yes udevdir="$lib/lib/udev" libdir="$lib/lib" mandir="$man/share/man" \
+        pkgconfig="$dev/lib/pkgconfig" \
+        python_libdir="$python/lib/${python2Packages.python.libPrefix}/site-packages"
   '';

   checkPhase = ''
@@ -54,14 +61,13 @@
     scons check
   '';

-  # TODO: the udev rules file and the hotplug script need fixes to work on NixOS
+  # # TODO: the udev rules file and the hotplug script need fixes to work on NixOS
   installPhase = ''
-    mkdir -p "$out/lib/udev/rules.d"
-    scons install udev-install
+    scons install
   '';

   postFixup = ''
-    wrapPythonProgramsIn $out/bin "$out $pythonPath"
+    wrapPythonProgramsIn $out/bin "$python $pythonPath"
   '';

   meta = with stdenv.lib; {

Perhaps we need to use something like wrapGAppsHook?
I also changed it to use multiple outputs which works pretty nicely.

I would also like to tackle  # TODO: put the X11 deps behind a guiSupport parameter for headless support cause this brings lots of deps to headless arm builds.
I've also found out we're missing PPS support, going to try package pps-tools as well.

Still relevant. gpsd upstream is on 3.21 by now, but nixpkgs is still on 3.16.


Avoid treat normal hosts as unresponsive servers

This is a fix for issue #713
When infra-keep-probing is on, all hosts with expired entries were treated as
unresponsive servers and thus causing problems (see #713).
This commit change that, so that normal hosts with expired entries are treated
as unknown servers.

The locks fixed in commit https://github.com/NLnetLabs/unbound/commit/33bd49af8140e6744064a74eaf1c369ebed86610 . Thanks for the patch!

Thanks for merging it. Our internal patch is exact same as the final version.
I thought the lock changes just made the code nicer and they were identical. Do you mind explain a little bit about the reason the lock should be hold a bit longer? This is my first time look into Unbound code, so would like to learn more about that.

The host->rtt.rto that is used in the if statement in line 731 needs the lock on e. At line 699 it can seen that it is a part of e, e->data.

Ah, that make sense, I missed that. Thanks again!


sanitize output filename

Description

exported function sanitizeFilename -> SanitizeFilename, fixed references
applied function to outputFile command-line parameter

Issues to fix
Please link issues this PR will fix:
#42

Hi @Julian-Chu  and @kkc
Please help to check this

It seems yesterday the integration test was failed due to CI, after retriggering CI, all tests passed.
I have reviewed and  tested it on my local machine.
Thanks @ilmanzo for your contribution. Great job!


Image links are broken.

File: get-started/index.md
Please fix the images links that compare the container stack to a VM stack.

Hi  There,
If you're referring to the two images under Containers and virtual machines, those seem to be rendering correctly.

This issue is resolved. If the problem persists, please open a new issue. Thank you.


Fix python problems

I run the script through flake8 which discovered some minor problems.
This PR fixes most of them

LGTM


Array.map - why is there a element exists check?

In array.map impl, why is there a element exists in the array check? What is that supposed to do?
Its literally taking that value out of the array in the previous line and checking if that exists in that line.
From what i know, the in-built impl doesn't protect against array modification. Is it trying to do that?
Atleast why not just check for undefined (say if length got modified).
I have got nothing against useless checks, but that check alone is bringing down the performance from o(n) to o(n**2).

Not sure if I fully understand what is happening here. As per my understanding, it is happening because indexOf(undefined) is true when there is intentional undefined in the array and then it gives true even in those empty values.
Just dropping this for now:

let test1 = [1, 2, undefined, 4]
undefined
test1.map(val => val*2)
Array(4) [ 2, 4, NaN, 8 ]

test1.newMap(val => val*2)
Array(4) [ 2, 4, NaN, 8 ]

test1[10] = 10
10
test1.newMap(val => val*2)
(11) […]

0: 2

1: 4

2: NaN

3: 8

4: NaN

5: NaN

6: NaN

7: NaN

8: NaN

9: NaN

10: 20

length: 11

<prototype>: Array []

test1.map(val => val*2)
(11) […]

0: 2

1: 4

2: NaN

3: 8

10: 20

length: 11

<prototype>: Array []

The impl should have does this index exist check, instead of does this value exist.
Easiest way will be - Object.hasOwnProperty(this, index)


[geotrans] Upgrade to version 3.8

Describe the pull request
Upgrade geotrans to version 3.8. No features need to test.

What does your PR fix? Fixes issue #10150

The windows and Linux CI test machines can’t access the address with the following failure, it works on osx test machines and I can download the source locally. Does keep the version 3.7 temporarily? Could you help have a look? @strega-nil
-- Downloading ftp://ftp.nga.mil/pub2/gandg/website/wgs84/apps/geotrans/current-version/sw/dev_version/win_dev.zip...
-- Downloading ftp://ftp.nga.mil/pub2/gandg/website/wgs84/apps/geotrans/current-version/sw/dev_version/win_dev.zip... Failed. Status: 28;"Timeout was reached"
CMake Error at scripts/cmake/vcpkg_download_distfile.cmake:175 (message):

      Failed to download file.
      If you use a proxy, please set the HTTPS_PROXY and HTTP_PROXY environment
      variables to "https://user:password@your-proxy-ip-address:port/".
      Otherwise, please submit an issue at https://github.com/Microsoft/vcpkg/issues

@dan-shaw Can you take a look?

The windows and Linux CI test machines can’t access the address with the following failure, it works on osx test machines and I can download the source locally. Does keep the version 3.7 temporarily? Could you help have a look? @strega-nil
-- Downloading ftp://ftp.nga.mil/pub2/gandg/website/wgs84/apps/geotrans/current-version/sw/dev_version/win_dev.zip...
-- Downloading ftp://ftp.nga.mil/pub2/gandg/website/wgs84/apps/geotrans/current-version/sw/dev_version/win_dev.zip... Failed. Status: 28;"Timeout was reached"
CMake Error at scripts/cmake/vcpkg_download_distfile.cmake:175 (message):

      Failed to download file.
      If you use a proxy, please set the HTTPS_PROXY and HTTP_PROXY environment
      variables to "https://user:password@your-proxy-ip-address:port/".
      Otherwise, please submit an issue at https://github.com/Microsoft/vcpkg/issues

@dan-shaw Can you take a look?

@LilyWangL I'm not sure why the CI has a timeout error. Maybe we can change the Control file to version 3.7 instead and fix the immediate issue?

@LilyWangL I'm not sure why the CI has a timeout error. Maybe we can change the Control file to version 3.7 instead and fix the immediate issue?

Thanks for your reply. Done.

/azp run


Build in some different layouts for the matrix entry part

It would be nice to be able to use the matrix entry part for answers that aren't strictly matrices.
One example I've got at the moment asks the student to fill out a probability table for the sum of two discrete random variables. Their answer would look like:
x | input | input | input | ...
P(X=x) | input | input | input | ...
So the layout would be fixed at 2 rows, with headers on the left of the rows, and the student can decide how many columns to use.
Other layouts could fix the number of columns and allow any number of rows, or fix both columns and rows and have headers on both the left and right.

Or brackets around each individual row, to represent a set of vectors.

Or "i", "j" and "k" after each column, when the answer is a 3D vector. (Or give a list of strings for each column, or a 2D array of strings to go after each entry)

The spreadsheet extension would handle this.


How can I increase the height of days box?

Hey,
I'm using this library its awesome but i need a small changes in it.
I want to set custom height of days box but i'm unable to do it.
Can you help me to increasing height of days box?
Let me attach the screenshot for more understanding of this problem.
The bottom event decorater gets cut so i want to increase the day height.
Thanks in advance.

+1

related to #235

This issue has been fixed and is available in the 1.3 snapshot. Stay tuned for the next release.You can try the 1.3 snapshot with the instructions in README. Enjoy and report issues!


Add Alpha_Dash that only allows Alpha and Dash/Underscore, but prevents Numbers

Proposed Solution:
alpha
alpha_num
alpha_dash
alpha_num_dash
as properties as opposed to alpha-dash covering both alpha numeric and dash/underscore.
single-responsibility.

I think the best solution for you will be to create your custom rule.

I think that alpha_dash implies to me alpha ruleset and dash/underscore.
Not alpha_num ruleset and dash/underscore.

@GeorgeWL I am going to see about adding this as built-in for the 3.19 release

@GeorgeWL After reviewing this closer, we are going to leave it as-is.  Making changes as you have proposed will have negative breaking changes for those who have used the current rules.  I may consider adding something like alpha_dash_only
Otherwise, use the recommendation from @vict-shevchenko and create a custom rule

I really like the idea of adding a new rule for it actually.


might be an issue with multiple plots

if you make multiple plots but set the count to 1, it does not finish after the first plot

Does it start a new plot or does it just do nothing and never close?

starts a new plot........

that cant be... I did that many times already, it will wait for copy to finish, but that should be it


assertNotEquals is incorrect for comparing Collection instances

TestNG Version
The testng-7.5-20210913.194404-31 snapshot, but this also occurs in previous releases including 7.4.0, 7.3.0, and 6.9.5.
Expected behavior
assertNotEquals(Collection, Collection) should compare the collections element by element, similar to assertEquals(Collection, Collection)
Actual behavior
assertNotEquals(Collection, Collection) delegates to the first argument's equals() method, which can return a result that's not the inverse of assertEquals
Is the issue reproducible on runner?

[x] Shell
[ ] Maven
[ ] Gradle
[ ] Ant
[ ] Eclipse
[ ] IntelliJ
[ ] NetBeans

Test case sample
I've continued to look at the equality asserts, especially those related to collections, as a followup to #2540. The code paths for the collection overloads of assertEquals and assertNotEquals are quite a bit different, so perhaps it isn't a surprise that they end up not comparing the same thing. This wasn't introduced at the same time as the 7.4.0 breakage though; apparently this has been in the code base for a long time. I haven't had the time to investigate the history any further than running it on several binaries I had available.
Here's a simple test case:
import org.testng.annotations.*;
import static org.testng.Assert.*;

import java.util.*;

@Test
public class AssertNotEqualsCollection {
    Collection<String> c1;
    Collection<String> c2;

    @BeforeClass
    public void setup() {
        c1 = List.of("a", "b", "c");
        c2 = new LinkedHashSet<>(c1);
    }

    // This test passes, as expected.
    @Test
    public void checkEquals() {
        assertEquals(c1, c2);
    }

    // This test also passes!!
    @Test
    public void checkNotEquals() {
        assertNotEquals(c1, c2);
    }
}

The checkEquals test passes, as expected. It calls assertEquals which compares the collections' contents element by element.
The checkNotEquals test also passes, unexpectedly. Inspecting assertNotEquals reveals that it follows a different path, going through getNotEqualReason. This does some reference comparison and null checks and then ends up calling Objects.equals(actual, expected). This JDK method ends up calling actual.equals(expected). This returns false because the logic in the collections checks the runtime types, and a List can never be equal to a Set -- even if they contain the same elements in the same order. Thus assertNotEquals returns without throwing, and checkNotEquals also passes.
There's no documentation for assertNotEquals but one would expect that it always asserts the inverse of the corresponding assertEquals method.

Thanks for the report. Strange we didn't see it before. We will check it asap.


chore(package): update istanbul to version 0.4.3

http://greenkeeper.io/

Current coverage is 82.72%

Merging #30 into master will not affect coverage as of c10c912

@@            master     #30   diff @@
======================================
  Files           11      11
  Stmts          579     579
  Branches       181     181
  Methods          0       0
======================================
  Hit            479     479
  Partial          0       0
  Missed         100     100

Review entire Coverage Diff as of c10c912

Powered by Codecov. Updated on successful CI builds.


TypeError: Cannot read property 'checked' of undefined

When an object with a property having a value undefined is passed to the API $(element).prop(object), a TypeError occurs.
A simple test case to illustrate the TypeError.
$('.prop-fixture').prop({
    "checked": undefined
});

The stack trace of the TypeError.
{ file:///path/cash.js:305
        return (value === undefined ? this[0][name] : this.each(function (v) {
                                             ^

TypeError: Cannot read property 'checked' of undefined
    at Init.prop (file:///path/cash.js:305:46)
    at Init.prop (file:///path/cash.js:311:14)

I think this is happening because your collection doesn't contain any elements.
Cash throws errors sometimes if the collection is empty. I've fixed this in my fork.

I think this is happening because your collection doesn't contain any elements.

Fixed in v2.1.2.


udev: Add partition symlinks

The current rule only creates a symlink for each device. Extend it to create symlinks for partitions too.

Outcome looks something like this:
# find /dev/disk/azure/
/dev/disk/azure/
/dev/disk/azure/os
/dev/disk/azure/os-part4
/dev/disk/azure/os-part9
/dev/disk/azure/os-part3
/dev/disk/azure/os-part2
/dev/disk/azure/os-part6
/dev/disk/azure/os-part7
/dev/disk/azure/os-part1
/dev/disk/azure/local
/dev/disk/azure/local/by-name
/dev/disk/azure/local/by-name/nvme-440G-2
/dev/disk/azure/local/by-name/nvme-440G-1
/dev/disk/azure/local/by-name/nvme-440G-1-part1
/dev/disk/azure/local/by-index
/dev/disk/azure/local/by-index/2
/dev/disk/azure/local/by-index/1
/dev/disk/azure/local/by-index/1-part1


15 min retention time for Kafka topic

Why the retention time for Kafka Topic is 15 minutes and not more than that ? Can we make it configurable ?

@umkhan123  15 minutes was selected empirically. Feel free to propose a PR to make it configurable.
Thank you.

@sbezverk raised the PR

@sbezverk pushed the changes , can you please review .
Thank you


Filling Information

Just a usability issue - when you run twitchat-settings you can just hit enter so if you do that on accident or something it would be nice to have it ask again

You will now receive a single warning when hitting enter without providing a value for each setting.


fix: Clang warning pessimizing move

What type of PR is this?
/kind cleanup
Any specific area of the project related to this PR?
/area build
Does this PR require a change in the driver versions?
No
What this PR does / why we need it:
Fix a recurrent warning with Clang. It complains that an std::move on an object that is already an rvalue reference is unneeded and could prevent optimizations to take place, i.e. force a move when direct construction could be used.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
NONE

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: federico-sysdig
Once this PR has been reviewed and has the lgtm label, please assign lucaguerra for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

LGTM label has been added.  Git tree hash: 7c2a3aafc7570813691aaf277045b6011dbee68f

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: federico-sysdig, jasondellaluce
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [jasondellaluce]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: FedeDP, federico-sysdig, jasondellaluce
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [FedeDP,jasondellaluce]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


Add Broadlink-wifi climate support

Description:
The broadlink_thermostat climate platform is a thermostat implemented in Home Assistant. It is used to control wifi thermostat manufactured by broadlink, like Floureon Smart Wi-Fi Programmable Digital Touch Screen Thermostat, Beok TGT70WIFI-EP Smart Wifi Thermostat and SeeSii Programmable Thermostat Heating WiFi
Pull request in home-assistant.github.io with documentation (if applicable):  home-assistant/home-assistant.io#8920
previous PR:  home-assistant/home-assistant#15363, home-assistant/home-assistant#19223
Example entry for configuration.yaml (if applicable):
climate:
  - platform: broadlink
    friendly_name: Thermostat
    mac: "xx:xx:xx:xx:xx"
    host: "xxx.xxx.xxx.xxx"

Checklist:

[x] The code change is tested and works locally.
[x] Local tests pass with tox. Your PR cannot be merged unless tests pass

If user exposed functionality or configuration variables are added/changed:

[x] Documentation added/updated in home-assistant.github.io

If the code communicates with devices, web services, or third-party tools:

[x] New dependencies have been added to the REQUIREMENTS variable ([example][ex-requir]).
[x] New dependencies are only imported inside functions that use them ([example][ex-import]).
[x] New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
[x] New files were added to .coveragerc.

Services should go on broadlink domain as per #21465

We should be careful with the naming here as we already have broadlink RM switch. And since the RM switch can be used as a climate (as I foresee a merge with the smartIr custom component), we might cause problems. Maybe rename the component to broadlink wifi, so we have a clear distinction?

@tsvi: not sure about naming problem here. This components is made to control thermostat made by broadlink and rebranded. The smartIr custom components you speak about is a components made to control IR climate. It made it simple than using custom climate component, but do the same. I would prefer having this components named broadlink better than a component that provide the same uses cases as another.
If my component should have another name, it will be named by it's brand name, so I'll need to create a least 3 component (breok, floureon, seesii) with the same code inside.

Definitely was not imagining splitting it up.
But maybe rename to Broadlink Wifi Thermostat, as we have #21465 which might create issues. Otherwise we'll need somehow to merge both although they are completely different components.

Hello guys, I am very sorry for such a dummy question but I am completely new. Could you help me step by step how to install this platform? I am 1 day user of HA :) Shall I create a broadlink/climate.py in custom components or it does not work like that? Thank you very much for help!

Please migrate / rebase to https://developers.home-assistant.io/blog/2019/07/03/climate-cleanup.html

There hasn't been any movement here for a long time. I'll close now. We're trying to decrease our open PR buffer. Please open a new PR when ready to finish.


Create a real interface

Create a real interface in order to use the to do list on the real Intuitive interface

i've donne the interfac you can find it in the fork with my name


Lost part of interface after data migration

Please verify that this bug has NOT been raised before.

[X] I checked and didn't find a similar issue

Describe the bug*
I had to move inventree database from one machine to another. Source installation was on docker. Destination - bare metal.
I got prepared data.json file as in https://docs.inventree.org/en/latest/start/migrate/ manual. Copied data catalog from one machine to another (to save images). Next on destination machine i got run invoke import-records -c -f data.json and i think almost everything is in new installation DB (I've lost only attachments).
But...
Part of interface on new installation disappeared. When I get into parts/stock/etc, I have onlu 1/3 of interface. Windows marked red are invisible.

I've looked into web browser console and I see jQuery errors like on picture below (like some icon packs were not found? - loadApiIconPacks):

Have anyone seen such problem?
Steps to Reproduce
Not sure if it can be reproduced.

migrate DB from one instance to another
login
part of interface invisible

Expected behaviour
Those parts of interface should be visible
Deployment Method

[X] Docker
[ ] Package
[X] Bare metal
[ ] Other - added info in Steps to Reproduce

Version Information
0.15.4
Please verify if you can reproduce this bug on the demo site.

[ ] I can reproduce this bug on the demo site.

Relevant log output
No response

Have you run invoke update on your new machine?

Yes
On Wed, Aug 7, 2024 at 6:36 PM Lukas @.***> wrote:

Have you run invoke update on your new machine?
—
Reply to this email directly, view it on GitHub
https://github.com/inventree/InvenTree/issues/7826#issuecomment-2273875330,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHLBYEVK7DNWKFUR4Q5YSIDZQJEI7AVCNFSM6AAAAABMEW5YZ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZTHA3TKMZTGA
.
You are receiving this because you authored the thread.Message ID:
@.***>

Have you done a hard refresh on the page? Could be a cache issue:
https://docs.inventree.org/en/latest/faq/#feature-x-does-not-work-after-update

Yes. I did Ctrl F5
czw., 8 sie 2024, 00:38 użytkownik Oliver @.***>
napisał:

Have you done a hard refresh on the page? Could be a cache issue:
https://docs.inventree.org/en/latest/faq/#feature-x-does-not-work-after-update
—
Reply to this email directly, view it on GitHub
https://github.com/inventree/InvenTree/issues/7826#issuecomment-2274467881,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHLBYERGHVCE5VV7IGIAQ53ZQKOXXAVCNFSM6AAAAABMEW5YZ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZUGQ3DOOBYGE
.
You are receiving this because you authored the thread.Message ID:
@.***>

I have just found out that the thing is not related to migration itself, but ip change.
After I did database migration, I've turned off old machine and changed IP of new one.
After restart, part of interface has gone.
If I set it back to origin IP, it shows parts list etc

This sounds like the site_url is not set up correctly. Can you check that in the global setting and your docker environment settings (INVENTREE_SITE_URL)?

I had the same symptoms with loadApiIconPacks is not defined in a docker-compose environment.
My INVENTREE_SITE_URL however, was set to the correct value.
After fiddling around with various caddy header settings, I ended up in running ./manage.py collectstatic and that ultimately fixed the issue.
My docker environment is automatically updated via watchtower whenever the docker images are updated.
Is there a way to ensure, that after an update, collectstatic is run automatically?

You need to follow the upgrade instructions, just pulling an image is not enough -> https://docs.inventree.org/en/stable/start/docker_install/?h=update#updating-inventree

Yes you are absolutely right.
Sadly, in a Portainer Environment, the way of running invoke update isn't working, and I haven't found a way of doing that, other than from a Portainer Shell in the inventree-server container.

We only support the documented order of operations. We do not have the resources to support the multitude of docker-ish platforms in our free time.

We only support the documented order of operations. We do not have the resources to support the multitude of docker-ish platforms in our free time.

I totally understand that, and my comment was never meant to be a reproach that you didn't.
Instead, your answer got me to the point where I might have figured out how to run invoke update after watchtower updated the container.
https://containrrr.dev/watchtower/lifecycle-hooks/
Looks like setting the watchtower environment var WATCHTOWER_LIFECYCLE_HOOKS=true and adding a label to the inventree-server container might do the trick:
        labels:
          - "com.centurylinklabs.watchtower.lifecycle.post-update='invoke update'"


Mesh and DataCollection upgrades

Adds DataCollection option to visualize a Coefficient or VectorCoefficient to disk.
Adds capability for a ParaViewDataCollection to be constructed for all the mesh boundaries rather than the domain.
Adds option for printing a Mesh or ParMesh with a scale factor applied to the node coordinates.

PR
Author
Editor
Reviewers
Assignment
Approval
Merge

#3525
@sebastiangrimberg
@mlstowell
@pazner + @bslazarov
3/7/23
⌛due 3/21/23
⌛due 3/28/23

This PR is now under review (see the table in the PR description). To help with the review process, please do not force push to the branch.

Hi @sebastiangrimberg,
Thanks for this contribution.

Adds DataCollection option to visualize a Coefficient or VectorCoefficient to disk.

For your purposes, could you use a QuadratureFunction (or even a GridFunction) as the field rather than a Coefficient? I think this would require minimal user code, but would mean we don't need special functionality to handle "coefficient fields".

Adds option for printing a Mesh or ParMesh with a scale factor applied to the node coordinates.

Can't you just use the Transform filter in ParaView to achieve this?

Hi @pazner, in both cases you are right but there's still a reason I like these features:

For QuadratureFunction and GridFunction objects, I have to preallocate and fill a vector with values. A Coefficient let's me just do it on the fly if it is just a function, for example. This isn't a huge deal obviously but does mean less overhead.
Yes you can definitely use Transform in ParaView or in the code just scale the mesh coordinates, print the mesh, and then unscale them. But I think the latter choice is unnecessarily slow (though I have not benchmarked) and the former requires users to add this filter in ParaView every time they open a file, which is not ideal if we can just do it in the code.

I'm open to changing the PR but have found these useful in my application code as implemented here so thought they might be worth upstreaming. I don't think they add much complexity to the ParaviewDataCollection class.

Yeah, I agree scaling and then un-scaling the nodes is not optimal. If it were me, I would probably add the filter in ParaView, but I will confess I don't really understand the use-case — do you often want to visualize a scaled domain? If this is a common use-case for our users, then I agree we should support it, but if it's a very niche feature then maybe it belongs better in user code. Do others have thoughts about this? (cc: @mlstowell, @v-dobrev, @bslazarov)

I definitely welcome input from others, but for more context the use case is nondimensionalization of an input mesh. User inputs a mesh, we do the entire solve in nondimensional length scales, user expects the ParaView output to be with same units as they used on input.

Thanks, that's useful context. Let's see what others on the team think. I'm definitely open to it, I just think we need to strike the right balance between supporting specific use-cases and being general-purpose/generic.

I think this would be a useful feature in many engineering and/or physics applications where various coordinate scalings are a matter of convention. However, I would suggest renaming the argument from sf to scale_factor, or something equally descriptive, to better match the other argument names in these methods.

Ping @mlstowell @pazner
Sorry to bother here but just curious as to what the decision ended up being here and if this PR might be able to be resurrected? If the functionality is desired, what is needed for approval? If the end result is to not merge, please let me know since I'll have to fork the ParaViewDataCollection and mesh printing functionality (would be unfortunate but maintaining this branch as a patch in our application codes is not a good long term strategy).

Hi @sebastiangrimberg,
Apologies for the delay. I remain a bit ambivalent about some of these changes. I know you put effort into making these changes and preparing this PR, but I do have some concerns.
Overall, my thoughts are as follows:

I like the idea of being able to save a Coefficient directly.

Beyond the scope of this PR (probably), but it's unfortunate how Coefficient and VectorCoefficient (and MatrixCoefficient) are completely unrelated classes, necessitating the duplication of RegisterCoeffField and RegisterVCoeffField, etc.
I have seen this come up in a number of other places in the code. There are some ways to address this without making breaking changes, maybe we should think about that.
Maybe the "fallback" for data collections that don't support coefficient fields directly should be projecting to a grid function, and then saving the grid function?

I don't think the scale_factor is a good interface for Mesh::PrintVTU. I understand that this is convenient, and has less overhead that transforming the mesh, saving, and then transforming back, but I think it's too specific. If we do something like this, I think it should be more future-proof (e.g. support more general transformations, maybe even provide something like a lightweight "transformed mesh view" class, that represents the same topological mesh, but with transformed node locations)
I'm also a little worried about ParaViewDataCollection::SetBoundaryOutput, especially since it doesn't work with grid functions or quadrature functions. Again, I understand the utility, but I feel that there is probably a more general/elegant interface to achieve the same thing (e.g. without the checks for bdr_output in the implementation). I think we also want as much parity as possible between the different types of data collections. Maybe there is a possible solution using SubMesh?

Thanks a lot for the response, Will.

Fully agree about wanting to be able to abstract the Coefficient/VectorCoefficient/MatrixCoefficient designation, but definitely will be a slow change that touches a lot of code. I would hope this is something that can be improved in the future. I can definitely just add the coefficient fallback interfaces in the other DataCollection classes. I'm hesitant to have the default behavior to construct and populate a GridFunction internally, the user can just use this from the existing API if it's what they want to do.
Regarding the later two comments, fair enough. I can think about some ways to do this elegantly but probably won't be a worthwhile time commitment I think. I'll have to just build these simple options into our downstream code.

So, I'll leave this PR open for now and will plan to revert the changes to the mesh scaling and boundary output, and just have it add the Coefficient output to DataCollection classes. Let me know if you think this plan sounds good or there's a different approach you'd like to see. In my opinion it's unfortunate to not take advantage of relatively simple changes which allow for the increased functionality that many users would likely find useful, but I do understand that it increases the long term maintenance burden in the code if not done cleanly.


Processing image in batch in testing/evaluation

As metioned in https://github.com/fengyang0317/unsupervised_captioning/issues/4, the testing/evaluation are slow. One reason is they do not support multi-gpu for one model.
And I found the crucial reason might be that they iterate images one by one instead of processing them in batch. I notice that you use different dataloaders between training and testing, where tfrec format and placeholder are used in training and testing respectively. I wonder why not testing/evaluation use the same dataloader and similar pipeline as training so that they can also process data in batch.
Parameter batch_size is defined in caption_infer.py but it seems that the size larger than one will cause errors.
https://github.com/fengyang0317/unsupervised_captioning/blob/ae17dc7edf556689eb943c8e51581a229ad41742/caption_infer.py#L29
Could you please kindly provide a batch version?
Thanks!

The inference code is copied from https://github.com/tensorflow/models/blob/master/research/im2txt/im2txt/inference_utils/caption_generator.py#L141
I think it is possible to write a batch version, but I don't have time to do it.
I have a multi-gpu version. I may push to the repository some days later. I can send to you if you want it now.

Thanks! You may find my email in my github homepage : )

"""Evaluates the performance of all the checkpoints on validation set."""
import cPickle as pkl
import glob
import json
import multiprocessing
import os
import sys

import numpy as np
from absl import app
from absl import flags
from tqdm import tqdm

from config import COCO_PATH

flags.DEFINE_integer('threads', 1, 'num of threads')

from caption_infer import Infer

sys.path.insert(0, COCO_PATH)
from pycocotools.coco import COCO
from pycocoevalcap.eval import COCOEvalCap

FLAGS = flags.FLAGS

def initializer(args):
  """Decides which GPU is assigned to a worker.

  If your GPU memory is large enough, you may put several workers in one GPU.
  """
  devices = os.getenv('CUDA_VISIBLE_DEVICES')
  if devices is None:
    devices = []
  else:
    devices = devices.split(',')
  if len(devices) == 0:
    os.environ['CUDA_VISIBLE_DEVICES'] = ''
  else:
    current = multiprocessing.current_process()
    id = (current._identity[0] - 1) % len(devices)
    os.environ['CUDA_VISIBLE_DEVICES'] = devices[id]
  global infer
  infer = Infer(job_dir='%s/model.ckpt-%s' % (FLAGS.job_dir, args))

def run(args):
  name, feat = args
  sentences = infer.infer(feat[np.newaxis])
  return name, sentences

def image_generator():
  with open('data/image_val.pkl', 'r') as f:
    dic = pkl.load(f)
  for k, v in dic.items():
    yield k, v

def main(_):
  results = glob.glob(FLAGS.job_dir + '/model.ckpt-*')
  results = [os.path.splitext(i)[0] for i in results]
  results = set(results)
  gs_list = [i.split('-')[-1] for i in results]
  gs_list = sorted(gs_list, key=lambda x: int(x))
  with open(COCO_PATH + '/annotations/captions_conceptual.json') as g:
    caption_data = json.load(g)
    name_to_id = [(x['file_name'], x['id']) for x in caption_data['images']]
    name_to_id = dict(name_to_id)

  meta = []
  for i in gs_list:
    out = FLAGS.job_dir + '/val_%s.json' % i
    if not os.path.exists(out):
      ret = []
      pool = multiprocessing.Pool(FLAGS.threads, initializer, (i,))
      for name, sentences in tqdm(pool.imap(run, image_generator()),
                                  total=14748):
        cur = {}
        cur['image_id'] = name_to_id[name]
        cur['caption'] = sentences[0][0]
        ret.append(cur)
      pool.close()
      pool.join()
      with open(out, 'w') as g:
        json.dump(ret, g)

    coco = COCO(COCO_PATH + '/annotations/captions_conceptual.json')
    cocoRes = coco.loadRes(out)
    # create cocoEval object by taking coco and cocoRes
    cocoEval = COCOEvalCap(coco, cocoRes)
    # evaluate on a subset of images by setting
    # cocoEval.params['image_id'] = cocoRes.getImgIds()
    # please remove this line when evaluating the full validation set
    cocoEval.params['image_id'] = cocoRes.getImgIds()
    # evaluate results
    cocoEval.evaluate()
    meta.append((i, cocoEval.eval['CIDEr'], cocoEval.eval['METEOR'],
                 cocoEval.eval['Bleu_4'], cocoEval.eval['Bleu_3'],
                 cocoEval.eval['Bleu_2']))

  ret = meta
  ret = sorted(ret, key=lambda x: x[1])
  with open(FLAGS.job_dir + '/cider.json', 'w') as f:
    json.dump(ret, f)
  ret = sorted(ret, key=lambda x: x[2])
  with open(FLAGS.job_dir + '/meteor.json', 'w') as f:
    json.dump(ret, f)
  ret = sorted(ret, key=lambda x: x[3])
  with open(FLAGS.job_dir + '/b4.json', 'w') as f:
    json.dump(ret, f)
  ret = sorted(ret, key=lambda x: x[4])
  with open(FLAGS.job_dir + '/b3.json', 'w') as f:
    json.dump(ret, f)
  ret = sorted(ret, key=lambda x: x[5])
  with open(FLAGS.job_dir + '/b2.json', 'w') as f:
    json.dump(ret, f)
  ret = sorted(ret, key=lambda x: x[3] + x[4])
  with open(FLAGS.job_dir + '/b34.json', 'w') as f:
    json.dump(ret, f)

if __name__ == '__main__':
  app.run(main)

image_generator return the image name and image.

Hi, it seems that 'data/image_val.pkl' is missing. Could you please upload it?
COCO_PATH + '/annotations/captions_conceptual.json' this file is also missing, do you mean COCO_PATH + '/annotations/captions_val2014.json'?
And could you explain why the total number is 14748 in the following code? If this value represents the number of val images, then it should be 5000?
for name, sentences in tqdm(pool.imap(run, image_generator()),
                                  total=14748)

Thanks!

You don't need the image_val.pkl file. You should re-write image_generator() function.
You can just change 14748 to 5000. I was using this code for some other experiment.


ApplicationInsightsAppender represents even debug log messages as ExceptionTelemetry

I want to raise the question if it's a good idea that ApplicationInsightsAppender sends every log message that includes an exception object as ExceptionTelemetry, even DEBUG or INFO messages.
It seems to me that the Application Insights portal presents Exceptions in a way as if they were equivalent with failures or problems within an application. If this is right, then sending ExceptionTelemetry just because a log message references an exception object is quite misleading. For example, when we catch an exception caused by user input, we might log it on DEBUG or INFO level, then continue our work normally. We don't want Application Insights to regard this as a problem condition.
Maybe only ERROR and FATAL log messages should be logged as ExceptionTelemetry? Or am I misreading the meaning of ExceptionTelemetry?

We tried to convert ExceptionTelemetry items to TraceTelemetry items in a telemetry processor, however, that doesn't work because the new TraceTelemetry item does not have a proper context set and is never logged (because it has, e.g., no AppInsightsKey set in the context). Proper initialization of a telemtry item is only done by TelemetryClient.
We found a "hackaround" here https://stackoverflow.com/questions/58709519/change-telemetry-type-in-telemetry-processor but we think that's not really a solution, because the item would run through the whole pipeline again.
Our last resort is now to fork the ApplicationInisghtsAppender. Do you have a different recommendation?
Best regards,
D.R.

In case anyone needs a working solution: We ended up forking and changing the ApplicationInsightsAppender.


added a new security question

Checklist:

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)

Closes #XXXXX

Hi @dhruviochani !
It looks like you accidentally made a lot of changes to the package-lock.json file.
I am going to close this PR but I encourage you to update your forked copy of the repo and create a new PR with only changes to the quiz file so it can be reviewed.
Thanks for understanding!

ok


Consider additional parameters in main response object.

Right now, if I a successful request is served, {'status': 'success', 'data': 'YOURDATA'} will be in an output. It would be nice if one could provide additional information (i.e. total number of objects and page offset for pagination) inside an additional parameter, like {'status': 'success', 'data': 'YOURDATA', "_meta": {"offset" 10, "totalCount": 24}}.
I know that this is kinda against JSSend specification, but I think that this will be a very nice feature.

Going to close this because I don't think this would be in appropriate scope. A very easy way to accomplish this would be to simply add the _meta keyword your actual data response, i.e.,:
{"status": "success", "data": {"_meta": ..., "foo": "bar", ...}}

This would then still fit within the confines of JSend.


dep: remove master constraint on mapstructure

The goal is to not force mapstructure to be constraint to master and thus provide a cleaner fix for https://github.com/containous/traefik/pull/4320
Signed-off-by: Vincent Demeester<EMAIL_ADDRESS>

Coverage remained the same at 82.921% when pulling 6a5fb93464475b46296ed196026749d6aed438e1 on vdemeester:dep-mapstructure into 66717a0e0ca950c4b6dc8c87b46da0b8495c6e41 on containous:master.

Coverage remained the same at 82.921% when pulling 6a5fb93464475b46296ed196026749d6aed438e1 on vdemeester:dep-mapstructure into 66717a0e0ca950c4b6dc8c87b46da0b8495c6e41 on containous:master.


Add example core-api-schema

Hey Ryan, you want to just put the next version of this in https://github.com/radiantearth/catalog-api-spec ?
Since this one is actually made by consensus just put it in like catalog-api-spec/spec or something? I think it's the main one we'll have people work on.
I'll merge this PR, just so we have a record of this, since I imagine you'll have a more up to date one to commit in the main repo.


"retryQueryOnError" strategies

Adding a placeholder issue for discussion regarding retrying on error strategies.
Current convos from Discord:
Imagine this:
Component A renders. No specification on retries => default behaviour
Component B renders in a different tree. Specifies 5 retries, but doesn't trigger fetch.
Component A calls refetch. => I'd go for default behaviour.

Component A renders. No specification on retries, but has a poll => default behaviour
Component B renders in a different tree. Specifies 5 retries, but doesn't trigger fetch.
Component A polls. => I'd go for default behaviour.

Component A renders. No specification on retries, but has a poll => default behaviour
Component B renders in a different tree. Specifies 5 retries, but doesn't trigger fetch. But has a poll.
Component A polls. => I'd go for default, if component A has the lower poll and otherwise for 5 retries?
Component A renders. No specification on retries, but has a poll => default behaviour
Component B renders in a different tree. Specifies 5 retries, and a refetchOnMountIfOlderThan 10 seconds. Triggers fetch. 5 retries.
The polling thing is not nice, the rest could be explained with "the configuration of the component that leads to the fetch".
Or we just make it per-endpoint, not per-query.
Which is probably a lot cleaner.

Make behavior completely standalone from the rest

function retryStaggered(baseQuery, defaultOptions) {
  return async function(internalQueryArgs, endpointDefinition) {
    const options = { ...defaultOptions, ...endpointDefinition.staggerExtraOptions };
    let retry = 0;
    while (true) {
      try {
        return baseQuery(internalQueryArgs, endpointDefinition)
      } catch (e) {
        if (e.throwImmediately || retry > (options.maxRetries ?? 0) { throw e; }
        async waitStaggered(retry) // whatever
      }
    }
  }
}

The only change to the current core would be that baseQuery is called with the endpointDefinition as the second argument.
** waitStaggered would use exponentional backoff

Introduced in #64


Support IPV6 address

Feature Request
Currently, TiKV doesn't support IPV6 address.

We may need to support it in the future.

A valid IPv6 socket address should be written as [::1]:20160 — note the square brackets. If that ::1:20160 comes from user's settings it would be user's mistakes.

Fixed by https://github.com/tikv/grpc-rs/pull/283


Commit search results in an error if commit doesn't belong to a pull request

Observed behavior
If you search for a commit that is not part of a pull request (e.g., 212d9cf4631cd175cc45e1930d141768a87b45f8), it results in the following error:

Expected behavior
If the commit isn't part of a PR, I was thinking that it would take you straight to the commit itself. For example, searching for 212d9cf4631cd175cc45e1930d141768a87b45f8 could take you to:
https://github.com/bswinnerton/github.lbaction/commit/212d9cf4631cd175cc45e1930d141768a87b45f8
If that's not feasible, it would be nice to gracefully handle the error and inform the user that there is no pull request with the given commit.

Nice catch, @jasonrudolph! I could have swore that I tested this manually, but I don't yet have unit tests for the Commit#pullRequests method.
Once https://github.com/bswinnerton/github.lbaction/issues/20 is addressed, it should add a more graceful error message, but I really love the idea of going straight to a commit. We should be able to determine the repository that commit belongs to by using the Commit.repository GraphQL object, which would give us the ability to build the link to 212d9cf.
I'll get started on both of these points shortly.


Undo collections

@aclar48 This is looking good.
The biggest problem is that there is no notification that collection or uncollection process is happening.  You have to know to refresh the page to see the results.  I think we have to wait until the collection process is moved over to ActiveJob to do this properly, but until then I'd like to go back to what we had before: the page is reloaded and a flash message saying that collection is in progress.
Also, I'd still like to see the popup warning on the "collect all submissions" button saying:
"This operation

Identifies the file version for each submission that meets the due date and/or late penalty set for this assignment.
Creates the views for annotating and grading each submission.

Warning: If this operation is carried out after grading has begun, this grading work will be overwritten. This work can be recovered using the Undo Collection button.
-Submit-
-Cancel-
"
I would also like to see a popup on the Uncollect button (which I would like to rename to "Undo Previous Collection")
"This operation will undo the previous Collect All Submissions operation.  This should only be done if the previous Collect All Submissions operation was done in error.
WARNING: All grading work done since the previous Collect All Submissions operation will be lost."

I notice in the submissions table that if I collect and uncollect a few times, that we end up with multiple records with the same submission_version.  I have seen a case where the uncollect operation picks the wrong older version lead to a problem when looking for the previous version in the uncollect operation.  I think the simplest solution is to delete the old submission_version record when reverting.
(Let me know if this doesn't make sense)
Example:  In the file below, the uncollect operation picked id 33 with submission_version 2 as the one to go to, but the record with id 78 is newer.
submission_table.txt

I can easily move the undo collection to a delayed job, the collection might a bit trickier as it seems for fork a bunch of processes for some reason.

Sure, why don't you move the undo collection to an ActiveJob.  We have another student working on the collect all right now.


artisan optimize & composer vendor-dir

Hi,
We have more than 100 websites in my company, so we don't want to duplicate the vendor directory each time.
So composer.json use a config like that :
"config": {
   "vendor-dir": "../library/vendor"
}

The "vendor" directory is out of the websites structure.
But when I try to execute "php artisan optimize", it failed with this error :
 [InvalidArgumentException]
  Configuration file "/home/seb/www/site1/,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
  ,,,,,,,,,,,,,,,,,,,,,,,,,,,/home/seb/www/site1/app/Providers/AppServiceProvider.php,/home/seb/www/site1/app/Providers/BusServiceProvider.php,/home/seb/www/site1/app/Providers/ConfigServicePr
  ovider.php,/home/seb/www/site1/app/Providers/EventServiceProvider.php,/home/seb/www/site1/app/Providers/RouteServiceProvider.php" does not exist.

In fact, the optimize command use a config file (config.php) in which the vendor dir is inevitably under the website basePath :
$basePath = $app['path.base'];

return array_map('realpath', array(
    $basePath.'/vendor/laravel/framework/src/Illuminate/Contracts/Container/Container.php',
    $basePath.'/vendor/laravel/framework/src/Illuminate/Contracts/Container/ContextualBindingBuilder.php',
    $basePath.'/vendor/laravel/framework/src/Illuminate/Contracts/Foundation/Application.php',
[...]

Just so you know, the most important thing that artisan optimize does, creating optimized autoload files, can be achieved with composer itself:
composer dump-autoload -o

Just so you know, the most important thing that artisan optimize does, creating optimized autoload files, can be achieved with composer itself:

That's already what it does

artisan optimize also generate a complied.php file with the entire framework.

It's not the entire framework, just often used classes. I didn't say this was the solution to your problem. Just wanted to make sure you are aware of this and might want to use it as "workaround"...

Thanks but I also want to compil common classes.

You should artisan optimize --force to create complied file

I already use --force ! But is not the issue.
vendor folder is still nested into $app['path.base']

I had this problem too.
We have a lots applications,we only want to have one common vendor directory like you do.
Like you said, the config.php had the path written pretty solid, the basePath is absolutely unchangeable.
I don't want to change the framework code, it will causing problems when I run update, ln -s may confuse composer I think, and it's ugly.
I figure rewrite a compile console command is a way. Any good thought?


SFENCE.VMA Before or After SATP Write

This paragraph in the 1.10 Privileged Specification implies that a SFENCE.VMA instruction should be run before SATP writes to ensure TLB consistency. (emphasis mine)

If the new address space’s page tables have been modified, it may be necessary to execute an SFENCE.VMA instruction prior to writing satp.

However, the address space switching code for RISC-V in the Linux Kernel does the opposite.
sr_write(sptbr, virt_to_pfn(next->pgd) | SATP_MODE);
local_flush_tlb_all();

So does the ordering of the SFENCE.VMA and SATP write matter as implied by the specification?

Emphasis on "may be necessary."  The concern is, what if the mapping for the instruction immediately after SFENCE.VMA has been modified?   In the Linux kernel, this mapping is fixed (regardless of address space) so the concern does not apply.
The SFENCE after the SATP write is definitely necessary, though.  In general, you need to SFENCE after you've recycled an ASID.  Since we don't use ASIDs in the Linux kernel yet, every context switch is effectively an ASID reuse, hence the full TLB flush.

Thanks for the explanation.


AbortSignal overwrites onabort rather than using addEventListener, preventing multiple use

Resubmitting for visibility an issue that was reported downstream with AbortSignal: https://github.com/aws/aws-sdk-js-v3/issues/4872.

closing this as duplicate, will address in https://github.com/aws/aws-sdk-js-v3/issues/4872


OGC API: handle URLs with URIs as ids

coverage: 60.293% (+0.01%) from 60.282%
when pulling 889235cce14f31b249ffec8d0d3d2ae22b1f6407 on ogcapi-build-url
into 810c9b49cff2a6ca9fb128814cc0c91f2451a7d0 on master.

CI failure intermittent.


remove empty console.log()

Overview
I figure out this during code reading that "how's the dev-server architecture which providing faster live reload rather than normal HRM..."
Thank you 😊

This is here on purpose to add a new line in the console. Thanks!


Invite creation and handling

Add to models:

[x] invites_sent (total number of invites sent)
[x] send_after (datetimefield - invites should be sent if this is in the past

Environment variables:

[x] total_invites_to_send
[x] time_between_invites (time spacing between invites sent)
[x] invite_text (the message to send to the user to invite a rating)

Actions:

[x] Create an endpoint that will be hit by the scheduler that triggers a task which will post outbounds for all invites that have invites_sent < total_invites_to_send and send_after < current_time. This task should then update the model to when the next invite should be sent (if it should)

@jpaidoussi @rudigiesler Please review alongside https://github.com/praekeltfoundation/ndoh-hub/pull/31.


Changed vector field domain to real space at the low rank Gaussian

Changed vector field domain to real space at the low rank Gaussian process interpolation.

I agree in principle. Choosing the full RealSpace as a domain makes much more sense than the bounding box.
There is a small glitch in the PR. In Line 207, you still use the boundingBox.


add multi-color highlight support

Solves #13

Update readme with reference of multi-color highlight
update license to include license of original highlight repo and its reference

If you're fixing a UI issue, make sure you take two screenshots. One that shows the actual bug and another that shows how you fixed it.

Hey @kinalmehta
Can you add a screenshot of the new feature?
Thanks a lot for the contribution!

What you're saying is correct. Just adding the CSS support for colours should ideally work. But it seems the repo I linked is no longer maintained and is not present in the logseq plugins marketplace. So I had to add it to this repo itself.
This is another theme which supports colorful highlight but even here you have to manually set it up instead of directly installing from logseq marketplace.
Hope this makes sense.
Thanks

Hey. Just got to know that the highlight plugin will be uploaded to marketplace in few weeks.
So maybe just adding proper color cas would be a better way to do it as you said earlier.
I'll update the PR to do that once the highlight plugin is available on marketplace.

Hey @kinalmehta Any updates?

Hey @SlyBouhafs,
The original author has still not pushed the highlight plugin on logseq-marketplace.
Any suggestion from your side on how to proceed?
Thanks


Redraw generalization and association lines as classes are moving

Originally reported on Google Code with ID 39

Having the lines be redrawn as classes are being dragged would appear much cleaner -
currently the lines are only redrawn after the class has been moved.

Reported by @umple on 2011-06-23 18:58:08

See also #583. This is an older lower priority issue dealing with the editable class diagrams that really need complete refactoring or replacing.


SchedulingInterval is configure in multiple places

SchedulingInterval is configured in the VolumeReplicationClass and DRPolicy. DRPC passes the SchedulingInterval to the VRG. A mismatch between the two values will cause the VRG instance to not make any forward progress.  The VRG logs the error, but the error is detected at the VRG level instead of close to where it is configured.
I propose to change DRPolity to either fail reconciliation if the SchedulingInterval is different from the VolumeReplicationClass' SchedulingInterval OR Use only the SchedulingInterval configured in the VolumeReplicatonClass
And while at it, change DRPC to add DRPolicy watcher so that if the DRPolicy CR is changed, the already created resources (like MW for VRG) get updated.

With peerClasses and determination of VRClass having the right schedule, this check if moved closer to DRPolicy. Closing this issue.


Crashes when scrolling down from the top of a long scrollback buffer

Windows Terminal version (or Windows build number)
Version: 1.10.2714.0
Other Software
No response
Steps to reproduce
Hard to say definitely because it's only the second time it's happened, but it happened after doing similar things so I guess it's somehow related to too much scrollback data or something?
Anyway, I had multiple terminal tabs open - all running SSH sessions inside WSL (Debian), there were significant amounts of scrollback text in most of them, and when I used the scroll wheel of the mouse to get back down to the bottom the entire window just crashed and disappeared.
The mouse is a Logitech one with the free running wheel, so maybe it got a lot of scroll events too fast to handle or something?
Expected Behavior
No response
Actual Behavior
The whole window just disappeared, killing all my active sessions.

Sorry about the slightly vague issue description, I don't really know exactly what caused it - if you can point me to where I can find some detailed logs I can try to dig them up.
I'll attach my config file here in case that helps
settings.json.txt
.

Sorry about the late reply, I was sure I had already posted one but must have forgotten to do it 😅

This is crazy - have you been able to repro it since? My theory is that the Terminal just so happened to get updated in exactly that window. Often when we push a new release to the Store, we get a few reports like this where the Terminal seemingly crashed for no sensible reason. It's not actually the Terminal crashing, it's the Terminal being force-quit by the Store. I'm not sure where exactly the Store logs are though, to see if the update took place at about the same time as this report. You would have been on v1.10.2383.0 prior, and now 1.10.2714.0 after the update.

Hi, I haven't reproduced it since because I've simply switched to a different terminal for such long jobs to avoid losing work again...
And the theory of updates is a reasonable assumption, that has also happened to me several times - however I've explicitly disabled automatic updates of store applications for this exact reason, so it shouldn't be the case here.

I've explicitly disabled automatic updates of store applications for this exact reason

lol I'm not sure the Store actually obeys that. I'll look into that more, but boy would that be a useful workaround.
Alas, without a repro there's not much else we can do here, so I'll keep my ears open. If you ever come back to the Terminal and hit this again, we can re-open and investigate more.

Ok.
Are there any logs or other stuff I can collect if it happens again, so I'm more prepared with useful diagnostic info for you?
I guess it isn't really helpful with just a message that "it did it again today" without more details to go on...
Terminal is still version 1.10.2714.0 and when I opened store to look for updates now, there was a new available version of Terminal, so it seems it's actually doing something.

If it's something that's trivially reproducible, then the bot has some tips for filing a trace using the Feedback Hub, which should capture a dump: /feedback
Otherwise, if it's not easily reproducible, there's something else we could try. I think you should be able to follow the steps in this post to set up automatic crash dumps. If that works, then you should be able to automatically get a .dmp of the terminal when it crashes. Then, you could zip that dump up and send it to us. A dump of what caused the Terminal to crash is certainly a good place to start!

Thanks for the tip about automatic crash dumps, will use that if/when it happens again!
I guess that dump should then be submitted via Feedback Hub and not attached here?

Meh, emailing it to me would make sure it gets to me, but feedback hub is probably more secure (though admittedly, not always 100% reliable)


rust-crypto fails to compile on alpha2

The current version of rust-crypto fails to compile under Rust 1.0.0alpha2.

I think this is fixed now. Please let me know if you are still having problems. Thanks!


botbuilder-ai depends on moment without using it

The library botbuilder-ai depends on the package moment, which is not even used in the code. There's an import statement in types, but then not references.
Code Search

R10, our next milestone, has a cleanup of dependencies planned. Adding this to that milestone.


Parse null value in array

I have a JSON string like this:
 {     "array" : [         null,         null,         {            "name" : "toto"        }    ] }
And i use DSL to parse it in struct
jsonv::formats_builder()
    .type<cell>()
       .member("name", &cell::name)
    .type<my_array>()
        .member("array", &my_array::array)
        .register_container<std::vector<cell>>()

But when i tried to parse this example, i have an error :
jsonv::extraction_error: Extraction error at .array[0]: Unexpected type: expected object but found null.
Can i have a solution to parse null value ?

The issue here is that the implementation of adapter_for only understands how to extract from objects. The solution would be something like making the cell adapter type aware of how to extract from null. Does something like this make sense?
jsonv::formats_builder()
    .type<cell>()
       .member("name", &cell::name)
       .default_value(cell("no name")) // just some value here
       .default_on_null()
    .type<my_array>()
        .member("array", &my_array::array)
        .register_container<std::vector<cell>>()

This is similar to default_value as a member in the DSL.

Thank: i will test asap :)

And of course, this is right solution for my problem

I'm keeping this issue open as a reminder to actually implement the code.

Minor change: Now uses type_default_value and type_default_on_null to resolve the ambiguity between defaulted members and defaulted types. Otherwise, it should all work.


Add webhook functionality into FleetAutoscaler

Add webhook policy type into FleetAutoscaler declaration.
Provided an example of a webhook pod which receives FleetAutoscaleReview
with a Fleet status and based on that information calculates target
replica set. This process is performed on FleetAustoscaler Sync every 30
seconds. Extends Buffer policy functionality with Webhook policy which is proposed by Mark in #334 comment.

Thanks for the comments.
I have applied most of them. What left: env variables, switch to HTTPS server and documents changes.

I have added the e2e test. I need Mark to push newest change with Scale bool to agones-images/autoscaler-webhook:0.1. So e2e test would be fixed

gcr.io/agones-images/autoscaler-webhook:0.1 image updated. Rerunning the test!

Looked like a flaky http endpoint issue. So kicking off a rebuild.
Only saw 2 small things left on the todo list, I resolved all other conversations in there that were good to go.
Once those are done and in,  I'm happy to merge this in. We may just slip it in to 0.7.0! :fireworks:

Just pushed the most recent version of the webhook image up to gcr. Will rerun the tests, and if all passes, I think this is good to go!


how to maintain the ratio of video image?

Hi, I apologize in advance if my language is not good :)
https://drive.google.com/open?id=0B44cB1gVSzPLT3lJUnVhSFMzd3c
I'm making a video camera and try to record a video. The problem is every time I change the orientation of the smartphone, which previewed image does not have the same image ratio.
As Figures 1 and 2:
Figure 1

Figure 2

Please help me to improve my video  :'(

Hi,
As i can see you do not lock device orientation. How do you handle device rotation?

I mean the question, how to maintain ratio of the image even if the smartphone is rotated?
What's wrong with my program?

You do not keep aspect ratio for the surface view. Check you surface view aspect ratio and your preview size aspect ratio, they should much, i.e.: yourView.getHeight()/yourView.getWidth() to previewSize.height/previewSize.width.
Do not use mCamera.setDisplayOrientation hardcoded in case you are allow rotating screen. If you support it then you need to recalculate display orientation degrees. I.e.

public int getRotation(Context context) {
            final int rotation = ((WindowManager) context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay().getOrientation();
            switch (rotation) {
                case Surface.ROTATION_0:
                    return 90;
                case Surface.ROTATION_90:
                    return 0;
                case Surface.ROTATION_180:
                    return 90;
                default:
                    return 0;
            }
        }

P.S.: I'll close this issue. It's not relevant to this library in case you have such questions then direct mail me. Email presented in my profile.


EKS 1.26 end of standard support, June 2024

Context
Need to upgrade EKS to 1.29 (current as of January 2024) before June 2024.
https://docs.aws.amazon.com/eks/latest/userguide/kubernetes-versions.html
Value and/or benefit
Saves additional costs associated with extended support.
https://aws.amazon.com/blogs/containers/amazon-eks-extended-support-for-kubernetes-versions-pricing/
Anything else?
No response

BTW, Only version 1.28 is supported on Azure atm.

I looked at upgrading to from 1.26 to 1.27 via Azure Console and it looks like the user-scheduler is using a deprecated API.

I went ahead with the upgrade to 1.27 and the upgrade failed due to my cloud Quotas not being high enough, but after I fixed that things seemed to work fine.  I then upgraded to 1.28 and things seemed to work fine as well.

Based on that, I think supporting at least up through k8s 1.28 will be very straight forward.

I have run 1.29 locally and everything seems to be working with some small changes to the local deployment that shouldn't impact cloud deployments. I think we should target 1.29 support.


can not see the details of MFA module, there is only binary file

Can you provide the python code for this please?

You can check multimodal_feature_aggregation here.
https://github.com/youngskkim/CRN/blob/main/layers/fuser/multimodal_feature_aggregation.py

已收到，谢谢！


SAK-42572 Solve ClassCastException on Sitestats

The line on ReportManagerImpl is what actually fixes the problem, but as I was researching it I discovered the user selector is managed in a different way than other multiple ones on the same page (events, tools). So I decided to standardize it and remove all the unnecessary code too.

This has a bit more than expected, the filtering by users is a bit of a mess so I'll try to clean it up a little.

 The sample data used on some tests was wrong and only worked by chance.


Examples cleanup

Cleanup according to #358

have a single ArgumentParser, used by both acoustic and TTI and any other future seismic equations. Perhaps to be moved to a utils.py module under examples/seismic

Not sure about this one, it would make it easier to run/benchmark for us but will start to make the example inaccessible for a lot of users IMO.

Use memoization in acoustic, in the same way we did for TTI

Done

Move legacy leftovers of the following sort to model:

This will end up in if-else somewhere anyway, not sure it should/where it sould be moved.
demo_model docstring updated

The edits are uncontroversial, thanks. I have one question though:

Not sure about this one, it would make it easier to run/benchmark for us but will start to make the example inaccessible for a lot of users IMO.

why would it make the examples less accessible?

It would split the examples. I find it easier to have one file, one example and avoid mixing different ones.

I'm not sure I understanding why defaulting time_order=2 all over the place

Because this is the math
http://www.hl107.math.msstate.edu/pdfs/rein/HighANM_final.pdf

Because this is the math

I haven't checked, but is it clear from the code and/or docstrings that this example/operators are trying to reproduce the method in that paper? ie do you explicitly mention the paper?

Should be green, TRAVIS/conda problem with python 2.7

@mlange05 , while Travis attempts again to get green, do you have any further enquiries ?

Generally I'm ok with this, and I think it's good to go.
One comment, that should not affect this PR, is that instead of unpicking the components of the individual operators are now quite separate and have the 2nd/4th order diff in various places. The alternative would be to create bespoke operators for each case, ie. ForwardOperatorTO2/ForwardOperatorTO4 - this would result in some code replication but would make the documentation of each operator more explicit, as all of the  pieces for each operator are in a single documented place. This one comes largely down to taste, and while I was originally aiming for the replicated case, I'm fine with this approach too.

Unfortunately Travis/Conda are still angry...

Ok, all happy, merging....


Beta 30 breaks OwO Lib

Describe the bug
OwO Lib won't load with Connector beta 30, it loads with beta 29 tho. I have attached the logs on "additional context"
Steps to reproduce

Add OwO Lib
Try to load the game

Logs
No response
Additional context

latest.log
latest_console.log

Duplicate of #620


Group where

According to the documentation, you can use «where groups». However, it's not clear from the documentation how to pass a variable to a nested function.
The documentation provides the following example:
QB::table('my_table')
    ->where('my_table.age', 10)
    ->where(function($q)
        {
            $q->where('name', 'LIKE', '%usman%');
            // You can provide a closure on these wheres too, to nest further.
            $q->orWhere('description', 'LIKE', '%usman%');
        });

However, when attempting something similar, problems arise:
$search = 'Ale';
QB::table('my_table')
    ->where('my_table.age', 10)
    ->where(function($q)
        {
            $q->where('name', 'LIKE', '%'.$search.'%');
            $q->orWhere('description', 'LIKE', '%'.$search.'%');
        });

This results in an error about an unknown variable $search.
To pass a variable to a nested function, you can use the use statement in PHP. Here's the modified code:
$search = 'Ale';
QB::table('my_table')
    ->where('my_table.age', 10)
    ->where(function($q) use ($search)
        {
            $q->where('name', 'LIKE', '%'.$search.'%');
            $q->orWhere('description', 'LIKE', '%'.$search.'%');
        });

By adding use ($search) after the function($q), you can pass the $search variable into the closure.
This should resolve the issue of the unknown variable and allow you to use variables in nested functions.

I'm sorry, I decided to use a translator using ChatGPT to translate my question into English. And he not only translated it but also suggested a solution. Without hesitation, I copied it and wrote it here.

Perhaps let this discussion remain here for posterity. Surely, someone else, just like me, may find themselves in a similar situation and come across the solution. At the same time, they can have a good laugh (at my situation) 😄

This made me laugh hard 😆
Thanks!


Remove space character that affected layout

There was a non-breaking space character after the jQuery script tag.
This was actually affecting the layout of the page, which I noticed when attempting to trigger mouse events.  Ironically, probably one of the more frustrating bugs to diagnose related Crafty to date.  As you might imagine, "is there an invisible character in the source code" was not high on my list of things to check when layout was being weird.  :)  (And while I have Sublime set to show spaces, it didn't show this particular variant!)

White spaces gives some weird problems sometimes :)