azure_rm_virtualmachine : two network security groups are created instead of one

Hi,
I created the virtual machine with the following playbook.  The problem is that I get two Network Security  groups created for the machine. The one I want (testSecurityGroup) is not attached to any interface, the one I don't want (testNIC) IS attached.
any ideas where I am wrong?
thanks a lot from advance for your kindly help
- name: Create Azure VM
  hosts: localhost
  connection: local
  tasks:
  - name: Create virtual network
    azure_rm_virtualnetwork:
      resource_group: pgeo
      name: testVnet
      address_prefixes: "<IP_ADDRESS>/16"
  - name: Add subnet
    azure_rm_subnet:
      resource_group: pgeo
      name: testSubnet
      address_prefix: "<IP_ADDRESS>/24"
      virtual_network: testVnet
  - name: Create Network Security Group that allows SSH
    azure_rm_securitygroup:
      resource_group: pgeo
      name: testSecurityGroup
      rules:
        - name: SSH
          protocol: Tcp
          destination_port_range: 22
          access: Allow
          priority: 1001
          direction: Inbound
        - name: zumtest
          protocol: Tcp
          destination_port_range: 8888
          access: Allow
          priority: 1003
          direction: Inbound
  - name: Create public IP address
    azure_rm_publicipaddress:
      resource_group: pgeo
      allocation_method: Static
      name: testIP
  - name: Create virtual network inteface card
    azure_rm_networkinterface:
      resource_group: pgeo
      name: testNIC
      virtual_network: testVnet
      subnet: testSubnet
      public_ip_name: testIP
      security_group: testSecurityGroup
  - name: Create VM
    azure_rm_virtualmachine:
      resource_group: pgeo
      name: test
      vm_size: Standard_B2s
      admin_username: testadmin
      admin_password: testtest
      ssh_password_enabled: false
      ssh_public_keys:
        - path: /home/testadmin/.ssh/authorized_keys
          key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDta6CbJQjPnBOhJVwZHTfgO9GWOk5A94ewGY97rxzmhX9B+chLZNDkspfsIlxgb/yG4PL4Rh1fdfUZ2zXNTS3YhyWpkTUgyOl14N2EjJlpTaC5so7IycLvG7h71/oYBshkBwesu8zMbfQyyTHdfbojChdOSQFqTSKq6vJqCMlVVyhd6n8HZrAVAKliFvdoW9SAWgcmodnxehA3J7uufj9JQwGUW97+a/ThKyhZSw30/+sXBNT1SdDrIr0jGalqX0NjgNWYQvQCj0onyEHrVTl66QmpcqLnqft55/e7IW/U8ji7TarSgEVUU8a7/f73SWlh1ZAsb7Ht11Pj9EDo005 dffdmeli@crdfagfwnfcrfaffwler"
      network_interfaces: testNIC
      image:
        offer: UbuntuServer
        publisher: Canonical
        sku: '16.04-LTS'
        version: latest

Environment summary
Install Method : apt-get
CLI version : azure-cli (2.0.27)
OS version : Ubuntu 16.04
Shell Type : bash

Can you share the command used to create such a VM?

please reactivate it with the VM create command


Auto cleanup no longer working

For the last 2 weeks, the automatic cleanup of the game has not worked. I'm guessing it's hitting an exception somewhere and aborting

should be closed by my most recent checkin


Release 2.6.2

A fix for the cookie banner.

I've tested it on dev, the cookies are now correctly synching between the homepage and the app.


APT whitelist request for libstdc++-5-dev in Trusty

Allows for the install  of libstdc++-5-dev from ppa:ubuntu-toolchain-r/test like on the ubuntu precise machines.

@travisbot thanks for your automated review. However I think something must be wrong with your checker, because libstdc++-5-dev is available via a source that is already available here: https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json#L327-L331


Won't compile on MacOS/Windows

it doesn't work on macos (base project zero changes):
In file included from /Users/home/Desktop/Desktop/feather-engine2/feather-engine/feather/components/drawable.cpp:1:
In file included from /Users/home/Desktop/Desktop/feather-engine2/feather-engine/feather/components/drawable.h:5:
/Users/home/Desktop/Desktop/feather-engine2/feather-engine/feather/windows/window.h:5:10: fatal error: 'SDL2/SDL.h' file not found
#include <SDL2/SDL.h>
               ^~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/game.dir/feather/components/drawable.cpp.o] Error 1
make[1]: *** [CMakeFiles/game.dir/all] Error 2
make: *** [all] Error 2

do you have SDL2 installed, and if so where

hey @BoogeyMan24 can you try it again? ideally I want it to work on all platforms

The following lines in CMakeLists.txt might be what:s causing the error.
find_library(LIB_IMAGE SDL2_image ./lib/Unix/lib_image)
find_library(LIB_MIXER SDL2_mixer ./lib/Unix/lib_mixer)
find_library(LIB_TTF SDL2_ttf ./lib/Unix/lib_ttf)

find_path(LIB_INCLUDES SDL_image.h ./include/Unix/SDL2)

cmake is being instructed to use the libraries for *nix version of SDL included when we clone the repository. It might be better to instruct cmake to include different versions of the library depending on users` systems. This stack overflow might help: [OS specific instructions in CMAKE: How to?]

The issue is that, in theory, the unix version should be the one used on macos. Either way, this probably means it won't compile on windows either. That's something that needs to be fixed.

I wonder if we can use SDL as a git submodule instead of directly including the files in the project

It might have been better to just cite SDL2 as a dependency instead of including the library files. So cmake  can just use what is locally installed in the user's system.

Yeah, that's how it was super early on, my only issue with that is that it makes it harder for Windows users since it's difficult to install system-wide libraries on Windows and including SDL2 in the project makes it a bit easier to use. I'm going to see if I can find a good solution to this.

Maybe you can try checking FetchContent_Declare or ExternalProject_Add of CMake. Submodules also is fine I think.


Link to admin page

I don't see any link to the admin page.  Even a search for "admin_path" and "/admin" turned up nothing.  Am I missing something, or is there a specific reason that there are no links to the admin page?

Since almost no one should access this, it didn't seem necessary to add navigation to visit it.

If people shouldn't access this, why provide that option?  Then again, given that users are allowed to create and edit their own events and sessions, perhaps users should only be allowed to edit/delete their own events and sessions but not those of others.  Am I reading too hard into things, or are there changes we wish to make?


Add support for new tunable "xmlOutputStyle"

When value "prettyPrintSafe" is used for tunable
"xmlOutputstyle", the xml content is wrapped in
CDATA brackets. CDATA brackets allow for the
preservation of whitespace.
DAFFODIL-2346-preserve-whitespace-in-dfdl-infoset

We need to update this pull request's title and description since they no longer match what this pull request actually does.  We collectively decided not to create a tunable XMLOutputStyle, only pass an enum XMLTextEscapeStyle as a new constructor parameter to XMLTextInfosetOutputter.  We decided not to address the question how to let a CLI option change infoset outputter settings in this pull request, even though this pull request's issue, DAFFODIL-2346, originally requested a CLI option to use <!CDATA[]]> to preserve whitespace in XML infosets' simple elements' text content.
Note that another issue, DAFFODIL-2234, also wants a CLI option to not pretty print XML or JSON infosets.  We already pass a boolean "pretty" as a constructor parameter to XMLTextInfosetOutputter, but we don't have any way for the CLI to change this constructor parameter's value from true to false in the places where the codebase passes true.
If we still punt the question of how to let the CLI, or TDML Runner, change infoset outputter settings to DAFFODIL-2234 instead of this pull request, then I suggest we edit this pull request's new title and description to:
Allow <!CDATA[]]> to preserve whitespace in XML text content

Add a new constructor parameter (an enum XMLTextEscapeStyle with Standard and CDATA values) to XMLTextInfosetOutputter.  When CDATA is passed instead of the default Standard, wrap simple XML elements' text content in CDATA brackets to preserve any whitespace they contain.

DAFFODIL-2346

Also, I think we should consider adding new XMLTextInfosetOutputter methods which can change infoset outputter settings using "withXXX" calls instead of changing them in constructor parameters.  Calling "withXXX" methods is a more upward compatible and extensible mechanism to change objects' settings since we can simply add new "withXXX" methods in the future.  A "withXXX" method can also eliminate the need to pass a boolean or enum value since the "withXXX" method's name can describe the new setting as well, such as "withPrettyPrint" or "withCDATA".

Agreed one the new PR title and commit message.
Also agreed on new withXXX functions for setting parameters, that's a much cleaner API. I'd suggest we do that as a separate PR though.

Feature that can allow for this parameterizing of the infoset outputters is in https://github.com/apache/daffodil/pull/912

I've updated this PR and I believe all issues are resolved, including the latest of only escaping with CDATA if special chars or whitespace exist. Please take one last look at this to make sure it's ready to merge.


Add pgmq

Add pgmq extension Dockerfile and Trunk.toml

Closing because this is published in its own project repo.


Only accept sat number in rec endpoint

I think it would be best for now to only accept sat numbers in the recursive endpoints because I think marketplaces and other explorers do not have the sat deserialization implemented. We can always expand this later.

Is that because they have reimplementations of all the endpoints?

I'm just not sure if they have implemented notations like degree, decimal or percentile. If we accept all of those they will have to implement it. Don't want to drown them in work.


Polygons fill colors not working

Can't get polygon fills custom colored.
  <agm-map [minZoom]="8" [zoomControl]="false" [streetViewControl]="false" [latitude]="lat" [longitude]="lng" [zoom]="14">     <agm-data-layer [geoJson]="geojson" (layerClick)="clicked($event)" ></agm-data-layer>   </agm-map>
I'm using this geojson to populate the element above. Everything is fine except polygons, which are always filled with black color. Not sure if colored fill is supported at all...
{   "type": "FeatureCollection",   "features": [     {       "type": "Feature",       "properties": {         "authorityId": 1,         "authorityName": "Ferrara",         "zoneId": "71",         "zoneDescription": "016 Park Baluardo San Lorenzo",         "polygonColor": "#0093ff",         "fillColor": "#0093ff",         "conventionCategory": [           {             "categoryId": -1,             "categoryDesc": "DEFAULT CATEGORY"           }         ],         "roadName": "RAMPARI DI SAN ROCCO"       },       “geometry”:

Hi,
As described in you exemple the fillcolor is just stored in a property on your features and cannot apply to the layer by itself.
In order to customize the layer, you have to pass in input a styling function that takes a feature in parameter and return a google.maps.Data.StyleOptions object.
So in your component :
class MapCmp {
  styleFunction(feat: Feature) => {
    return { fillColor: feat.properties.fillColor }
  }
}

In your template :
<agm-data-layer [geoJson]="geojson" (layerClick)="clicked($event)" [style]="styleFunction" ></agm-data-layer>

thanks, this makes sense!
However I couldn't get this syntax to work, what version of TS is it for? the styleFunction never get called.

I don't know why you could not get this working, maybe it is because of the type Feature :
I made a plunkr  where it works fine so you can play with it to find out.
Hope it will help !
I use TS v 2.3 by the way bu I don't think is related.

I'm closing this as it works as expected. Feel free to reopen though.


Password verification

Addresses #145 #136 and #86
Changes:

Passwords submitted to signup() are now verified using django.contrib.auth.password_validation.validate_password and are now subjected to the following criteria (#145)

Must be at least 8 characters
Must not be entirely numerical
Must not be contained in a list of 20,000 common passwords

Added a regex-based check in /signup that ensures that usernames are not email addresses (#86)
/signup now has a "Confirm Password" box as shown below (Password and Confirm Password contents must be identical in order to successfully sign up) (#136)

Notes:

In order to implement this PR I changed how errors are passed to /signup. Now instead of calling redirect('/signup?error=True') I call redirect('/signup?error={0, 1, 2, ... etc}') with each number referring to a different error code that is then parsed by signup.html before displaying the message. This has the drawback of limiting us to only one error shown at a time, giving certain errors priority over others. (Snippets are shown below)

I dislike this implementation but after messing with this for way too long I eventually gave up on implementing it in a better way. If anyone has any suggestions for how to pass data through a call to redirect() in a better way, I'm all ears.

I dislike this implementation but after messing with this for way too long I eventually gave up on implementing it in a better way. If anyone has any suggestions for how to pass data through a call to redirect() in a better way, I'm all ears.

I think this is fine for now, if we need to display multiple errors then we can add additional parameters if we need them (also ideally we keep errors atomic).


Some minor changes & added .editorconfig file for similar code style

Hi @yTakkar! 👋
Thank you for submitting a PR to turtle.
I'm happy to add .vscode/ to our .gitignore, but I'm not sure if it's necessary to add editorconfig to this project as source code is automatically formatted using gofmt before committed to git. 🤔

I just cherry-picked a387237 to add .vscode/ to our .gitignore file.

👍 👍 👍


PowerToys closing when clicking on PowerToys Run

Microsoft PowerToys version
0.64.1
Installation method
WinGet
Running as admin
Yes
Area(s) with issue?
PowerToys Run
Steps to reproduce
Open PowerToys → Click on PowerToys Run on the side menu → The window closes itself with no error messages
✔ Expected Behavior
Clicking on PowerToys Run and being able to enable or disable it properly.
❌ Actual Behavior
The window close, but PowerToys keeps running, and other tools keep working normally.
Other Software
I have Flow Launcher, AltSnap and FluentSearch installed, but I'm sure they are not interfering, since there are many months that I have all then. Also did not update any of those apps mentioned on the last days.
What happened today is that I have cleaned some temp files and changed some system settings.
Other important information is that I have totally uninstalled PowerToys by using winget uninstall and then using Everything search to delete all residual files, except the backup files .ptb that I have my settings.
And what happened when I reinstall it using winget is that PowerToys Run works normally, but the error come back when I load backup the .ptb backup files.
I have attached the Report.wer file related to the AppCrash folders
Report.zip

Update! I have repeated the process of uninstall and clean remaining files, but instead of reinstall it using winget, I have used chocolatey. And it is working now even after restore the backup files. I think I previously had it installed with chocolatey, but as I have informed, I have done some tweaks on my system and have uninstalled PowerToys temporary to debug some other stuff. When I have installed it back, I have made with winget instead of chocolatey.
That is probably the cause of the trouble.
Unfortunately, my settings are not restored, and I will have to configure them all again. Don't know if I made some confusion with the backup up files and save the wrong ones.

Another weird behavior is that when configuring FancyZones, the previous numpad keys that I have assigned as shortcuts 0, 1, 2 and 3 are not available for choice now.

/reportbug

Would love to have had a bug report from when this error was occurring 😅
Now that it's fixed it's harder to try to reuse your Settings locally to try and replicate it.

Nothing useful in the logs, since those were cleaned out.
Please re-open the issue and mention me if this happens again ;)
Thank you!


HDDS-3514. Fix memory leak of RaftServerImpl

What changes were proposed in this pull request?
This PR depends on RATIS-845, we should wait RATIS-845 to merge.
As the image shows, there are 1885 instances of  RaftServerImpl, most of them are Closed, and should be GC, but actually not. You can find from the image
1513 RaftServerImpl were held by ManagermentFactory->jxmMBeanServer->HashMap, 372 RaftServerImpl were held by Datanode ReportManager Thread -> prometheus -> HashMap. So 1513 RaftServerImpl leak in ratis, and 372 leak in ozone. If RaftServerImpl can not GC, there are a lot of related resource can not be GC, such as the DirectByteBuffer  in SegmentRaftLogWorker, which result 1GB memory leak out of heap.
The reason RaftServerImpl held by ManagermentFactory->jxmMBeanServer->HashMap is ratis start JmxReporter, but does not stop it.
The reason RaftServerImpl held by Datanode ReportManager Thread -> prometheus -> HashMap is ozone call the ratis function to  register metric in prometheus, but does not unregister it.
1. 1885 instances of RaftServerImpl

2. 1513 RaftServerImpl were held by ManagermentFactory->jxmMBeanServer->HashMap, 372 RaftServerImpl were held by Datanode ReportManager Thread -> prometheus -> HashMap

3. 1513 RaftServerImpl were held by ManagermentFactory->jxmMBeanServer->HashMap

4. 372 RaftServerImpl were held by Datanode ReportManager Thread -> prometheus -> HashMap

2038 DirectByteBuffer, and 1885 held by RaftServerImpl

1033 DirectByteBuffer were held by ManagermentFactory, 802 DirectByteBuffer were held by Datanode ReportManager Thread, total 1885.

What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-3514
How was this patch tested?
ungister prometheus and stopJmxReporter when removed in ratis.

I am working with @runzhiwang on reviewing the ratis changes in RATIS-845. Once that is done, I will review this as well.

/pending

/ready

@avijayanhwx Could you help review it ? Thank you very much.

/pending needs new Ratis snapshot (b3cfec0e or later) in Ozone

@bshashikant can you rebase the patch?

duplicated with https://issues.apache.org/jira/browse/HDDS-3564. No need to merge.


XCB/XLIB crash on some Linux systems

Reposting my comment from #4319 as a new issue, as suggested - upgrading to a build with the #4319 / #4424 fix did resolve nvidia crashes for my testers, but caused a user who wasn't experiencing problems previously to get an xlib-related threading crash.

Tested this on my app - using the latest cibuild does indeed fix the problem one of my users had, where their (Linux, NVidia) system would regularly crash out with segfaults. So that is good!
Unfortunately, another one of my users, who was previously having no problems, is now experiencing regular crashes - that user is running an Intel GPU on Linux. They're seeing crashes with both:
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has
not been called
[xcb] Aborting, sorry about that.
VTableAvalonia: ../../src/xcb_io.c:259: poll_for_event: Assertion
`!xcb_xlib_threads_sequence_lost' failed.
Aborted (core dumped)
and just
Segmentation fault (core dumped)
That said: This may not be due to the #4424 fix - I upgraded my app from cibuild 8766 to 9704 in order to get this fix, so of course something else could have changed in between, I suppose. But of course it's a little suspicious that this changes the way the rendering works with threads, and then a user immediately gets a graphics crash that mentions threading :(
Searching online suggests that this xcb/xlib issue shows up in all sorts of apps, and does look like a bug in xcb/xlib, so it's unlikely to be Avalonia actually doing anything wrong. But as with the NVidia crashes, if it's possible to work around it so we can run Avalonia apps reliably that would be ideal...
Since I haven't seen this on my PC, I can't test any suggested workarounds easily, but I can get my testers to try things out - will take a day or two to do so, however.
(Follow up: Running my app with UseGpu=false in the AppBuilder does seem to stop the crashes, so it's probably GPU related...?)

We could probably use a dedicated X11 display connection for GLX calls.

Same issue here with
          /:-------------:\          dani@fedora
       :-------------------::        -----------
     :-----------/shhOHbmp---:\      OS: Fedora release 33 (Thirty Three) x86_6
   /-----------omMMMNNNMMD  ---:     Host: Blade Stealth 3.06
  :-----------sMMMMNMNMP.    ---:    Kernel: 5.13.5-100.fc33.x86_64
 :-----------:MMMdP-------    ---\   Uptime: 1 hour, 25 mins
,------------:MMMd--------    ---:   Packages: 2598 (rpm), 13 (flatpak)
:------------:MMMd-------    .---:   Shell: bash 5.0.17
:----    oNMMMMMMMMMNho     .----:   Resolution: 3200x1800, 3840x2160
:--     .+shhhMMMmhhy++   .------/   DE: GNOME 3.38.5
:-    -------:MMMd--------------:    WM: Mutter
:-   --------/MMMd-------------;     WM Theme: Adwaita
:-    ------/hMMMy------------:      Theme: Adwaita [GTK2/3]
:-- :dMNdhhdNMMNo------------;       Icons: Adwaita [GTK2/3]
:---:sdNMMMMNds:------------:        Terminal: gnome-terminal
:------:://:-------------::          CPU: Intel i7-7500U (4) @ 3.500GHz
:---------------------://            GPU: Intel HD Graphics 620
                                     Memory: 8157MiB / 15886MiB

dotnet --list-sdks
3.1.401 [/home/dani/dotnet/sdk]
5.0.100-rc.1.20452.10 [/home/dani/dotnet/sdk]
5.0.103 [/home/dani/dotnet/sdk]
6.0.100-preview.1.21103.13 [/home/dani/dotnet/sdk]
6.0.100-preview.3.21202.5 [/home/dani/dotnet/sdk]
6.0.100-preview.6.21355.2 [/home/dani/dotnet/sdk]

libGL error: failed to create drawable
libGL error: failed to create drawable
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
ER.AvaloniaUI: xcb_io.c:260: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.

With UseGpu=false doesn't hang.


create: add --rust option

[x] Have you followed the guidelines in our Contributing document?
[x] Have you checked to ensure there aren't other open Pull Requests for the same change?
[x] Have you added an explanation of what your changes do and why you'd like us to include them?
[ ] Have you written new tests for your changes? Here's an example.

[x] Have you successfully run brew tests with your changes locally?

Aaand another PR that focuses on adding new --rust option to create command.

Thanks again @dawidd6!


Create start_specific file for each started PS server for --test_mode

It is needed to start already stopped server not grepping from ps output

Closing as there is no further plan on it.


add global metric for unexpected on-demand downloads

Until we have toned down the prod logs to zero WARN and ERROR, we want a dedicated metric for which we can have a dedicated alert.
fixes https://github.com/neondatabase/neon/issues/3924

Rebased on top of https://github.com/neondatabase/neon/pull/4074 , the build failure is fixed by that PR


Add metadata to dtype when kind is 'O'

In order to get pynwb validation to pass I needed to make the tweak of this PR. It seems that h5py uses a vlen field in metadata for a numpy dtype, and pynwb inspects that. I don't understand exactly what this is about. But when I set it to bytes in this case, the validation passes.
Here's a test validation script where things are passing with this PR

import pynwb
from pynwb import CORE_NAMESPACE
from pynwb.validate import ValidatorMap
import h5py
import remfile
import lindi

def test_validate(io: pynwb.NWBHDF5IO):
    namespace = CORE_NAMESPACE
    validator = ValidatorMap(namespace=io.manager.namespace_catalog.get_namespace(name=namespace))
    builder = io.read_builder()
    validation_errors = validator.validate(builder=builder)
    if len(validation_errors) == 0:
        print('Validation passed!')
    else:
        print('Validation failed!')
        for ve in validation_errors:
            print(ve)

if __name__ == "__main__":
    # https://neurosift.app/?p=/nwb&dandisetId=000409&dandisetVersion=draft&url=https://api.dandiarchive.org/api/assets/c04f6b30-82bf-40e1-9210-34f0bcd8be24/download/

    print('')
    print('Validating with HDF5 URL...')
    h5_url = 'https://api.dandiarchive.org/api/assets/c04f6b30-82bf-40e1-9210-34f0bcd8be24/download/'
    remf = remfile.File(h5_url)
    h5f = h5py.File(remf, mode='r')
    with pynwb.NWBHDF5IO(file=h5f, mode='r', load_namespaces=True) as io:
        test_validate(io)

    print('')
    print('Validating with LINDI URL...')
    lindi_url = 'https://lindi.neurosift.org/dandi/dandisets/000409/assets/c04f6b30-82bf-40e1-9210-34f0bcd8be24/zarr.json'
    ff = lindi.LindiH5pyFile.from_reference_file_system(lindi_url)
    with pynwb.NWBHDF5IO(file=ff, mode='r', load_namespaces=True) as io:
        test_validate(io)

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

Project coverage is 82.34%. Comparing base (bc71a9d) to head (df759d0).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #47      +/-   ##
==========================================
+ Coverage   82.33%   82.34%   +0.01%
==========================================
  Files          25       25
  Lines        1715     1716       +1
==========================================
+ Hits         1412     1413       +1
  Misses        303      303

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


Update edition to 2021

dieselを上げているのは cargo fix --edition を実行した際に下記warningがでたため。

note: This project appears to use both diesel and diesel_migrations. These packages have
a known issue where the build may fail due to the version 2 resolver preventing
feature unification between those two packages. Please update to at least diesel 1.4.8
to prevent this issue from happening.


Lug parser config along in sampling context

This won't take a custom parser config that could have been in use when originally parsing things into account. If we need that, we'll probably need to schlep that along in the context too.

Originally posted by @akx in https://github.com/adieyal/dynamicprompts/pull/69#discussion_r1152837348

Oh, wait, we already do that... 😂


[BUG] - Getting error on windows

With the reference of following screenshot, I am unable to generate the project with command (npx pwa-kit-create-app --outputDir ...) on windows. I am providing valid creds upon creating the project.
Anyone faced this issue?

Hi @a1sultan , thank for reaching out to us with your issue. It seems you are trying to create project that's connected to your own sandbox. Would it be possible for you to create our demo project, and see if that's successful? You can do it using npx pwa-kit-create-app --preset retail-react-app-demo
It'll also help to know the versions or your windows, node, and npm. Thanks!

I'm getting the same error with both presets retail-react-app and retail-react-app-demo. The error is also reproducible with windows subsystem (Ubuntu) and with Git Bash emulator.

Hi @sejal-salesforce, I tried but
(retail-react-app) throws error after getting the answers, as given below,

and (retail-react-app-demo) throws same error straight away

Thank you, @a1sultan  and @pavelkukov, for reporting this issue with the App Generator.
I confirm the team was able to identify that the generator fails when it's run using WSL from a Windows file system folder mounted in /mnt/... The team is currently looking into potential solutions.
As a workaround, I suggest using the Windows Command shell or PowerShell to generate projects on Windows or if you want to use WSL, I recommend running the generator from a native Unix folder like the home directory /home/<username>.

The fix was released as part of v1.5.0.
I'm closing the issue. Please, feel free to open a new issue if you encounter new problems.


Add previous and next button.

I was wondering. Now i need to change the hyperlink, if a want to go to the newt issue. Maybe a next and previous is more user-friendly

@jlord Hi, Is there any update on this one?


feat(cli): Add agent uptime telemetry

copilot:all

Current dependencies on/for this PR:

main

PR #3642   👈

This comment was auto-generated by Graphite.


How do I use this with socket.io?

Hey!
I have an express.js server + socket.io server. I wrote some tests using supertest and jest and it was great! However right now I have to write tests for socket.io. I ran almost immediately into some issues. Basically I have the following code
const server = http.createServer(app);

const io = createSocketIoServer(server);

const initServer = async () => {
  // ...
  // Irrelevant code
  // ...

  return server;
};

const startServer = async () => {
  (await initServer()).listen(PORT, () => {
    console.log(`🥩 Luncher-box backend running on ${BACKEND_URL} in ${ENV}`);
  });
};

if (ENV !== 'test') {
  startServer();
}

And as you can see, I only start the server when NOT in test-ing. That is supposed to be the case for when I'm doing normal express requests using supertest (using request and passing my server -> request(server)       .post('/foo')).
However I need to start the server in order to init my socket.io connection.
What's the best way to handle this? Is there some way to connect to the underlying server, provided by supertest if there is any running?
Edit: If I start the server, my test doesn't pass.
import { Server } from 'http';
import io from 'socket.io-client';
import { Connection } from 'typeorm';
import { initServer, startServer } from '../src';
import { io as ioServer, SOCKET_URL } from '../src/config';
import { dbConnection as getDbConnection } from '../src/connections';

let server: Server;
let dbConnection: Connection;
let ioClient: SocketIOClient.Socket;

beforeAll(async () => {
  server = await initServer();
  await startServer(server);
  dbConnection = await getDbConnection();
});

beforeEach(done => {
  ioClient = io(SOCKET_URL, {
    reconnection: true,
    forceNew: true,
    transports: ['websocket']
  });

  ioClient.on('connect', () => {
    done();
  });
});

afterEach(done => {
  if (ioClient.connected) {
    ioClient.disconnect();
  }

  done();
});

describe('Connect to socket.io', () => {
  it('connects to the backend via socket.io ', done => {
    const message = 'Hello World';
    ioClient.emit('socket_connect', message);

    ioClient.on('socket_connected', (recievedMessage: string) => {
      expect(recievedMessage).toBe(message);
      done();
    });

    ioServer.on('connection', mySocket => {
      expect(mySocket).toBeDefined();
    });
  });
});

And if I start my dev server from a seperate terminal, the test passes (???)

@fr3fou Can you provide a reproduction example illustrating the issue, to take a look at? By issue, I mean the case where you start the server and your test doesn't pass.


[LLM] Add deepseekv2

PR types

New features
PR changes

Models
Description

Add DeepSeekV2.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.0 out of 2 committers have signed the CLA.:x: DrownFish19:x: MangodadadaYou have signed the CLA already but the status is still pending? Let us recheck it.


[Bug] All the scans except the key scan failed to compile.

Redis version - 7.0.11
Platform - windows
Using Docker - yes
Deployment type - centralized
Fred version - 7.0.0
Rust version - rustc 1.73.0 (cc66ad468 2023-10-03)
Describe the bug
The compiler throw this error:
`[async block@fred::commands::impls::scan::hscan::{closure#0}::{closure#0}]` cannot be unpinned
consider using the `pin!` macro
consider using `Box::pin` if you need to access the pinned value outside of the current scope
required for `TryFilterMap<UnboundedReceiverStream<Result<ValueScanResult, RedisError>>, ..., ...>` to implement `Unpin`
the full type name has been written to 'E:\Codes\Source\fred.rs\target\debug\examples\scan-9e97d65d1f1389c3.long-type-1735182448428919330.txt'rustc[Click for full compiler diagnostic](rust-analyzer-diagnostics-view:/diagnostic%20message%20%5B0%5D?0#file%3A%2F%2F%2Fe%253A%2FCodes%2FSource%2Ffred.rs%2Fexamples%2Fscan.rs)
option.rs(563, 10): required because it appears within the type `Option<[async block@hscan::{closure#0}::{closure#0}]>`
lib.rs(1180, 21): required because it appears within the type `__Origin<'_, UnboundedReceiverStream<Result<ValueScanResult, RedisError>>, [async block@hscan::{closure#0}::{closure#0}], [closure@hscan::{closure#0}]>`
scan.rs(149, 6): required because it appears within the type `impl Stream<Item = Result<HScanResult, RedisError>>`
redis.rs(191, 8): required because it appears within the type `impl Stream<Item = Result<HScanResult, RedisError>>`
mod.rs(275, 15): required by a bound in `futures::StreamExt::next`

To Reproduce
Steps to reproduce the behavior:

Modify the example code under the 'examples/scan.rs'.
Test the hscan functionality(For the example), all the scan-related methods such as sscan and zscan except the scan functionality.

#![allow(clippy::disallowed_names)]
#![allow(clippy::let_underscore_future)]

use std::collections::HashMap;
use fred::{prelude::*, types::Scanner};
use futures::stream::StreamExt;

static COUNT: usize = 50;

static HASH_KEY: &str = "HashKey";

async fn create_fake_data(client: &RedisClient) -> Result<(), RedisError> {
  for idx in 0 .. COUNT {
    client.hsetnx(HASH_KEY, format!("foo-{}", idx), idx).await?;
  }
  Ok(())
}

async fn delete_fake_data(client: &RedisClient) -> Result<(), RedisError> {
  for idx in 0 .. COUNT {
    client.hdel(HASH_KEY, format!("foo-{}", idx)).await?;
  }
  Ok(())
}

#[tokio::main]
async fn main() -> Result<(), RedisError> {
  let client = RedisClient::default();
  let _ = client.connect();
  client.wait_for_connect().await?;
  create_fake_data(&client).await?;

  // build up a buffer of (key, value) pairs from pages (~10 keys per page)
  let mut buffer = HashMap::with_capacity(COUNT);
  let mut hscan_stream = client.hscan(HASH_KEY, "foo*", Some(10));

  while let Some(result) = hscan_stream.next().await {
    let mut page = result.expect("HSCAN failed with error");

    if let Some(map) = page.take_results() {
      for (key, value) in map.into_iter() {
        println!("Scanned {} -> {:?}", key.as_str_lossy(), value);
        buffer.insert(key, value);
      }
    }

    // **important:** move on to the next page now that we're done reading the values. or move this before we call
    // `get` on each key to scan results in the background as quickly as possible.
    let _ = page.next();
  }

  delete_fake_data(&client).await?;
  client.quit().await?;
  Ok(())
}

Using let mut hscan_stream = client.hscan(HASH_KEY, "foo*", Some(10)).boxed(); instead.


[docs-infra] Fix dark theme color

Befor/After

Also noticed that the default column has some empty ticks that are just due to the content being undefined. It's not the expected behavior, but it looks good :+1:

How did I not see this?

Probably because you're not a robot 🤖😉


2.07: FUSE '-cacheCapacityMB=0' do not completely disable cache?

According to weed mount -h,

-cacheCapacityMB int
local file chunk cache capacity in MB (0 will disable cache) (default 1000)

However, despite -cacheCapacityMB=0 mount writes to /tmp/1840 directory during I/O.
How to prevent caching in /tmp completely? Thanks.

That disable the file content cache. There is a transient metadata store that uses on disk storage.


Check if each ground truth RTTMs were present in the provided manifest file. Skipping calculation of Diarization Error Rate error

[NeMo I 2024-09-10 03:10:15 msdd_models:1403]      [Threshold: 0.7000] [use_clus                                                                             _as_main=False] [diar_window=50]
[NeMo I 2024-09-10 03:10:15 speaker_utils:93] Number of files to diarize: 1
[NeMo I 2024-09-10 03:10:15 speaker_utils:93] Number of files to diarize: 1
[NeMo W 2024-09-10 03:10:16 der:185] Check if each ground truth RTTMs were prese                                                                             nt in the provided manifest file. Skipping calculation of Diariazation Error Rat                                                                             e
[NeMo I 2024-09-10 03:10:16 speaker_utils:93] Number of files to diarize: 1
[NeMo W 2024-09-10 03:10:16 der:185] Check if each ground truth RTTMs were prese                                                                             nt in the provided manifest file. Skipping calculation of Diariazation Error Rat                                                                             e
[NeMo I 2024-09-10 03:10:16 speaker_utils:93] Number of files to diarize: 1
[NeMo W 2024-09-10 03:10:17 der:185] Check if each ground truth RTTMs were prese                                                                             nt in the provided manifest file. Skipping calculation of Diariazation Error Rat                                                                             e
[NeMo I 2024-09-10 03:10:17 msdd_models:1431]
hi, the code works perfectly fine except these part at the end, can you help me why im getting this error ?

You can safely ignore that, it's related to training and validation


[redux] Client executes prefetchData & deferredData for every task route

Hey!
The executeTasks function in executeTasks.js executes both task types for every task route. Bothe tasks are executed because window.APP_STATE is deleted with every route change, so the first conditions is always false:
const tasksToExecute = window && window.APP_STATE
  // We have an APP_STATE available, which will contain the state from the
  // server populated by any 'prefetchData' tasks, therefore we only need to
  // call the 'deferredData' tasks.
  ? ['deferredData']
  // No data is available so we will execute both the 'prefetchData' and
  // 'deferredData' tasks.
  : ['prefetchData', 'deferredData'];

  if (window) {
    // We now remove the APP_STATE as it has been safely merged into the redux
    // store at this stage, and by deleting it we can make sure that we will
    // execute both the 'prefetchData' and 'deferredData' tasks for every route
    // change that happens on the client side.
    delete window.APP_STATE;
  }

The comment in the second condition implies that this behavior is desired. I just can't think of a case in which it is required to execute prefetchData because prefetchData is described as a task for the server. Am I missing something?

Hey @AndreasZeiser;
Sure thing, hopefully I can shed some light on this reasoning...
Imagine you had the following routes, each with a prefetchData and deferredData task attached:

/foo

prefetchData: () => ...
deferredData: () => ...

/bar

prefetchData: () => ...
deferredData: () => ...

Try to visualise the following workflow:
Client -> Server -> Client

You make a request to the server for "/foo".
The server analyses the route, finds a prefetchData task, fires it, and attaches the resultant state to the response via the window.APP_STATE assignment inline script.
On the browser your React app loads for the first time.
The React app sees the state given to it by server and initialises the redux store.
Your app initialises.
It then analyses the route, finds a deferredData task, fires it.

You application now has all the data you desired for the "/foo" route loaded into the Redux store.
But now what should happen if you switch to the "/bar" route on the client? e.g. by clicking <Link to="/bar" />. This results in a Client -> Client interaction in which the server is not involved.
The server is no longer responsible for loading the route and its data, which means that window.APP_STATE will not contain the required prefetchData results for the "/bar" route.  This data is obviously important to the route in question, therefore we need to make sure we execute this task when switching routes on the client (along with any deferredData task that may exist).
Note: A Client -> Client interaction isn't the only case in which we won't have the required prefetchData for a route.  What if we switched off server side rendering? This means that window.APP_STATE would never have existed. Therefore We can make a safe assumption in saying: if a window.APP_STATE does not exist then we should execute both the prefetchData and deferredData tasks for a route.
We know the server is responsible for setting the window.APP_STATE global and this data is only representative of the very first route initialised on the client, therefore, we can consume and delete this data after the first data tasks parse.  We then know that any subsequent route changes will need to executed both the deferredData and prefetchData tasks for the respective routes in order to get the required data for them.

Does that make a bit more sense?
I may need to work on this documentation a bit so if you find anything confusing please point it out and I will be happy to do some revisions. :)

Another note on this.  I haven't done so in the example implementation but you should consider your data loading strategies carefully.  You could for example put a caching layer within your redux-thunk (or whatever else) implementation to prevent unnecessary HTTP requests.
Of course there is no blanket answer for this.  Every application and case needs to be taken into consideration applying the most appropriate solution.

Really prefetchData and deferredData should be renamed to something a bit more revealing.  Their inconsistent tense doesn't help either.

Thank you @ctrlplusb for the detailed response. Your example of the workflow makes completely sense and I do understand and love the idea behind task routes.
For me the source of confusion is the following part of the documentation:

Within this project we are using this mechanism to define all of the routes which require data to be loaded. We have preconfigured two different task types to help with this:

prefetchData: This is a task that should be executed before we do any rendering on the server.
deferredData: This is a task that should be executed on the client for any matched routes.

All tasks have to return a Promise, which gives us the capability to know when the task has completed.
Using this we can then fire all our prefetchData tasks on the server, which in this project fires redux-thunk actions that return promises. We then wait for the promises to complete, after which we can safely assume that we have fetched all the data required for the components we expect to mount against the location.

It basically says that prefetchData runs only on the server but it actually must say that prefetchData runs on the server only for the initial request and runs then on the client for any matched route as well.
Before updating the docs to be more specific about the inner workings of prefetchData and deferredData I would like to raise the question whether or not deferredData is required. prefetchData is the task responsible for fetching the data on the server (initial request) and the client (consecutive requests). However, I struggle to find any use cases for deferredData. What are your use cases for deferredData? The documentation has also no example for deferredData which gives an indication that it might be not that important.
I think that if we can keep the task routes simple by having only one task running for every matched route regardless of where this task runs (server or client) we thereby make the whole thing much easier to understand.
What do you think? I would be happy to help with that implementation.

Some good points about keeping things simple, which I am always up for.  I am letting a few thoughts boil on this.  Will get back to you. :)

I have been dreaming up a much simpler and nicer API.  Just did a bunch of research on the phone whilst patting my daughter to sleep. 😀
I definitely feel what I am is possible. It will bring collacation of tasks with components (i.e. our react router v4 routes) and will completely kill any need for a prefetch/deferred model. 😀
Stay tuned in the new year.. . 😀

I started writing something for RR4 to handle data fetching, but ended up back on RR3. Hoping sometime between Christmas and New Years to have some time to give away to RR4.

Awesome to hear @strues!

I see a good use-case for deferredData for pre-loading data for next possible actions that the user can do. Will need a little work though.

Hey all
You can track progress of the new library I am developing to help with data load/defer/SSR needs here:
react-jobs


Fix Leetcode's new UI issue

This PR fixed the issue of not uploading problems to github

Fixed an undefined key in browser local storage, it was supposed to be leethub_token
Fixed issues that was produced by leetcode's new style guide and missing classes
Used constant values to represent class names that would make it a lot easier to change in the future without the hustle
Find & upload submissions code directly to Github without the need to re-request the submission page.

fixes  (#507 #505 #502)

hey @3ba2ii how can I use your repo instead of waiting for this one being merged? seems like currently the original repo is not active

Hello @sudohainguyen, sorry for the late reply, For now you can use the following steps

Download the forked repository which has the updated code
run yarn install or npm install to install the packages
Go to your chrome extensions tap chrome://extensions/
Click Load Unpacked on the top left corner
And select the extension project directory

Nice to know. Can I ask you what post you are in currently?
On Thu, Mar 30, 2023, 11:29 PM Ahmed Ghonem @.***>
wrote:

@Abhishekverma2002 https://github.com/Abhishekverma2002 I already
published my own chrome extension that works regardless of which Leetcode
UI it runs on, You can download it from here
https://chrome.google.com/webstore/detail/leetsync-leetcode-synchro/ppkbejeolfcbaomanmbpjdbkfcjfhjnd?hl=en&authuser=0
,
Its a beta version, so please let me know if you found any bug 🙌
—
Reply to this email directly, view it on GitHub
https://github.com/QasimWani/LeetHub/pull/509#issuecomment-1490706754,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AUICLGUL3CCNTIQYNXKKXVTW6XCZ7ANCNFSM6AAAAAAVU5BJTI
.
You are receiving this because you were mentioned.Message ID:
@.***>

Also would love to know how to make a google extension in java. If you can
help me , it would
be greatly appreciated.
And Thanks for the extension as well.
On Fri, 31 Mar 2023 at 11:44, Abhishek Verma @.***>
wrote:

Nice to know. Can I ask you what post you are in currently?
On Thu, Mar 30, 2023, 11:29 PM Ahmed Ghonem @.***>
wrote:

@Abhishekverma2002 https://github.com/Abhishekverma2002 I already
published my own chrome extension that works regardless of which Leetcode
UI it runs on, You can download it from here
https://chrome.google.com/webstore/detail/leetsync-leetcode-synchro/ppkbejeolfcbaomanmbpjdbkfcjfhjnd?hl=en&authuser=0
,
Its a beta version, so please let me know if you found any bug 🙌
—
Reply to this email directly, view it on GitHub
https://github.com/QasimWani/LeetHub/pull/509#issuecomment-1490706754,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AUICLGUL3CCNTIQYNXKKXVTW6XCZ7ANCNFSM6AAAAAAVU5BJTI
.
You are receiving this because you were mentioned.Message ID:
@.***>

Hello @Abhishekverma2002, Unfortunately, you cannot create a Google Chrome extension using Java. Chrome extensions can only be developed using JavaScript, HTML, and CSS. However, if you are familiar with Java and want to create an extension, you can consider using a tool or framework that allows you to write JavaScript using Java syntax, such as TeaVM or GWT.
But its recommended to use JavaScript or TypeScript (That will be compiled to JS on build) to build a chrome extension

Thanks for the tip!
And let me know if you need any help in any project in java. It would be
great.
Thanks
On Fri, 31 Mar 2023 at 23:25, Ahmed Ghonem @.***> wrote:

Hello @Abhishekverma2002 https://github.com/Abhishekverma2002,
Unfortunately, you cannot create a Google Chrome extension using Java.
Chrome extensions can only be developed using JavaScript, HTML, and CSS.
However, if you are familiar with Java and want to create an extension, you
can consider using a tool or framework that allows you to write JavaScript
using Java syntax, such as TeaVM or GWT.
But its recommended to use JavaScript or TypeScript (That will be compiled
to JS on build) to build a chrome extension
—
Reply to this email directly, view it on GitHub
https://github.com/QasimWani/LeetHub/pull/509#issuecomment-1492380544,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AUICLGXE3VKIP7AQCJJI7P3W64K7NANCNFSM6AAAAAAVU5BJTI
.
You are receiving this because you were mentioned.Message ID:
@.***>

Hi, Is this extension deprecated? If not, then please solve the new UI issue.


New version: Elfel v0.5.0

Registering package: Elfel
Repository: https://github.com/PetrKryslUCSD/Elfel.jl
Created by: @PetrKryslUCSD
Version: v0.5.0
Commit: 803ca2b1efba05f5d079feeb47628fa05d2cbafc
Reviewed by: @PetrKryslUCSD
Reference: https://github.com/PetrKryslUCSD/Elfel.jl/commit/803ca2b1efba05f5d079feeb47628fa05d2cbafc#commitcomment-47966894

@PetrKryslUCSD :point_up:
[noblock]


Enforce that name and ems_id be present to submit AuthKeyPair creation form

Don't enable the Add button unless at least a name and ems_id
have been entered in the form. The key field remains optional.
This was not being enforced before, allowing invalid form
submissions.
cc @durandom https://bugzilla.redhat.com/show_bug.cgi?id=1329427

@dclarizio @h-kataria @martinpovolny please review

@dclarizio @martinpovolny darga/yes or darga/no?


Remove optional hammertime dependency

This appears to be unused and adds a binary dependency for dependent projects.

This should never have been optional but rather a dev dependency and was used in the benchmarks (since removed).
Thanks for catching this!


Cartesian zernike polynomials

The current circular zernike cartesian polynomials in zernikecartesian(coefficient,x,y) for Z29 and Z30 are inconsistent with their polar form. I think the cartesian forms should be:
Z29 =  Z[29] * 4y(35r**6-60r4+30*r2-4)
Z30 =  Z[30] * 4x(35r**6-60r4+30*r2-4)

Are these fringe zernike polynomials?
Adam
On Thu, Sep 29, 2016 at 08:48:44AM -0700, fringedigm wrote:

The current circular zernike cartesian polynomials in zernikecartesian(coefficient,x,y) for Z29 and Z30 are inconsistent with their polar form. I think the cartesian forms should be:
Z29 =  Z[29] * 4y(35r**6-60r4+30*r2-4)
Z30 =  Z[30] * 4x(35r**6-60r4+30*r2-4)
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/Sterncat/opticspy/issues/10

I think fringedigm is right, is should be -4 not +10. Thank you fringedigm!


Image example usage

Hi @jeffmer ,
Could I use one of the images of the device prototype in my thesis?
If yes, how should I reference you??
Best,
Arritmic

Yes of course, feel free to use it. Simply reference the github repository would be fine.

It is about remote photoplethysmography and remote ballistography using cameras and radars. It includes from development of novel algorithms, to use cases and implementation in embedded devices.

That sounds like a lot of fun. I am a retired computing science academic - would love to see your thesis when you finish it - I am sure you will put a PDF on line.

Yes, sure!! It will be an honor. Please, find some of my humble studies in google scholar: https://scholar.google.fi/citations?user=vLYIwqUAAAAJ&hl=en


Publish 0.12.2 release on crates.io

Hi, it seems that the 0.12.2 release has been already cut in 8ff1ecbf95187cc, but https://crates.io/crates/v4l still shows 0.12.1 as the latest release. 0.12.2 contains a fix (#35) that seems to help us significantly, so it would be cool to get it out. Thanks!
CC @bschwind.

The actual master branch fails building on raspberry pi:
pi@raspberrypi:~/rusty_pi_cam $ RUST_BACKTRACE=1 cargo run --example v4l
    Updating git repository `https://github.com/raymanfx/libv4l-rs`
   Compiling v4l2-sys-mit v0.2.0 (https://github.com/raymanfx/libv4l-rs?branch=master#d7ac716f)
   Compiling v4l v0.12.2 (https://github.com/raymanfx/libv4l-rs?branch=master#d7ac716f)
error[E0308]: mismatched types
   --> /home/pi/.cargo/git/checkouts/libv4l-rs-917e1f4ffd90b94a/d7ac716/src/device.rs:269:59
    |
269 |                         control.__bindgen_anon_1.string = val.as_ptr() as *mut i8;
    |                         -------------------------------   ^^^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`
    |                         |
    |                         expected due to the type of this binding
    |
    = note: expected raw pointer `*mut u8`
               found raw pointer `*mut i8`

For more information about this error, try `rustc --explain E0308`.
error: could not compile `v4l` due to previous error
pi@raspberrypi:~/rusty_pi_cam $ uname -a
Linux raspberrypi 5.10.63-v7+ #1496 SMP Wed Dec 1 15:58:11 GMT 2021 armv7l GNU/Linux

I think it's fixed in https://github.com/raymanfx/libv4l-rs/pull/43

0.13.0 has been released on crates.io.

Thanks a lot for releasing and pinging us, @raymanfx! :bow:


feat: added search functionality

Added search functionality

Great stuff Jon, now users can search their stats with ease!


Contact form not working on the home page

Describe the bug
The contact form at the bottom of the home page is not functional.
To Reproduce
Steps to reproduce the behaviour:

Go to https://stichhub-chi.vercel.app/
Scroll down to the bottom contact form
Enter the details and submit and nothing happens

Expected behaviour
A successfully submitted or error message should be displayed to the user.
Screenshots

Desktop (please complete the following information):

OS: MacOS Ventura
Browser Chrome
Version latest

Smartphone (please complete the following information):

Device: Realme 6
OS: Android 11
Browser Chrome
Version latest

Additional context
The submit handler in the code of contact form is not yet implemented.

[x] There is no similar existing open issue
[x] This is a part of GSSoC'23

Go for it @rahulaarora

@Naresh-chandanbatve where do you want to receive/store the contact details and messages?
Possible solutions:

receive the contact messages on your email
store them in the database
store them in the excel worksheet

Add message on email
<EMAIL_ADDRESS>

@rahulaarora


[QUESTION] How to copy one bitmap into another with offset?

Hi!
I'm new to Skia and try to use it for some pixel-manipulations on my LED-Matrix on a Raspberry Pi.
I would like to know if there's an easy way to copy one (smaller) bitmap into another (larger) bitmap at a given location.
So lets say I have two bitmaps:
var entireBitmap = new SKBitmap(64, 32); var smallBitmap = new SKBitmap(16,8);
Now I want to copy the entire 'smallBitmap' into the 'entireBitmap' at let's say x = 12, y= 18.
I think I could do it using GetPixel and SetPixel but thats slow and needs some calculations so I think maybe theres a better way?!
It should also accept negative location coordinates and tolerate overlapping if the smaller bitmap goes beyond the height or width of the entire bitmap.
Someting like SKBitmap.CopyTo(entireBitmap, smallBitmap, x, y);
Thanks and regards
Jan

Hmm, it looks like I can draw a bitmap to a bitmap with an offset using a canvas like this:
static void CopyWithOffset(SKBitmap targetBitmap, SKBitmap sourceBitmap, SKPoint targetLocation) {     using var canvas = new SKCanvas(targetBitmap);     canvas.DrawBitmap(sourceBitmap, targetLocation);     canvas.Flush(); }
Will test tomorrow but looks good :)

It works as expected but I don't know if this is the right way to go...
If I have many threads, each one will copy it's smaller bitmap into the larger one on a different location.
As SKBitmap is surely not thread-safe this might end up in a pixel-mess, especially if some bitmaps overlap others.
What would be the best way to draw multiple bitmaps into a big one without messing up the main bitmap?
I could maybe lock the big bitmap, write the small ones one by one and release the big one. But this smells to be a slow process which might led to flicker on my led-screen.
Any suggestions?

If I have many threads, each one will copy it's smaller bitmap into the larger one on a different location.

Although Skia is not thread safe, if the destination rectangles don't overlap, you could try to make different destination SKBitmap and SKCanvas instances , but all using the same destination surface. You can use SKBitmap.InstallPixels for that. Note that in that case the SKBitmap does not take ownership of the pixel buffer.
If the rectangles do overlap, using multiple threads won't work of course...
Out of curiosity, why are you using multiple threads for a single drawing?

Out of curiosity, why are you using multiple threads for a single drawing?

I have a big LED-Screen (384x192) which is fed using https://github.com/hzeller/rpi-rgb-led-matrix.
Its using a canvas where I can set each pixel using a simple 'canvas.SetPixel' method. After "drawing" to that canvas one must call 'matrix.SwapOnVsync' to display the canvas on the screen.
Thats all easy as long as only one Task writes to the canvas. But I want to have multiple "layers" to be able to draw different things to different parts of the canvas, for example a scrolltext at 64,32 (x,y), an image to 128,96 and so on.
So I created different canvi with different dimensions and locations on the big canvas. Each canvas represents an SKBitmap and so does the big canvas.
In the main thread, before pushing out the main bitmap to the canvas, I call a method on each "child-canvas' that stops the writing to the corresponding child-canvas, copies the bitmap to the main-bitmap and then releases the lock so the child-canvi could be updated again.
This all works but results in heavy flicker and 'jumping' text, as the RPi4 semms to be not fast enough to lock all Tasks that write to the child-bitmap, coyping the child-bitmap to the big bitmap and pushing it out to the LED-Display.
I've experimented with some Thread.Sleeps and so on, but thats all crap...Even going one ladder down and using Threads with ManualResetEvents doesn't work well.
So I need an ultrafast solution that allows me to write to my child-bitmaps while the 'main' bitmap is constantly pushed out the LED-Matrix.
I tried using the old System.Drawing.Bitmap and lock/unlock the bits in unsafe blocks, but thats even slower than using 'SKBitmap.GetPixels()' so I discarded that approach.
I think you got the point but for completeness here's a small snipped from my main-thread:
`private void ThreadImplementation()
{
while (true)
{
_mre.Reset();
foreach (var canvas in _canvi)
canvas.PrepareNextFrame();
_mre.Set();
            DrawBitmapPixelsToCanvas(_ledMatrix, _mainCanvas, _mainCanvasBitmap);
            //DrawBitmapPixelsToCanvasOnlyChangedPixels(_ledMatrix, _mainCanvas, _mainCanvasBitmap);
        }
    }`

And the DrawPixels-Method:
`private static void DrawBitmapPixelsToCanvas(RGBLedMatrix ledMatrix, RGBLedCanvas canvas, SKBitmap bitmap)
{
var pixelAddr = bitmap.GetPixels();
unsafe
{
var ptr = (byte*)pixelAddr.ToPointer();
            for (var col = 0; col < bitmap.Height; col++)
            for (var row = 0; row < bitmap.Width; row++)
            {
                var b = *ptr++;
                var g = *ptr++;
                var r = *ptr++;
                ptr++; //Skip alpha

                canvas.SetPixel(row, col, new RGBLedMatrixWrapper.Color(r, g, b));
            }
        }

        ledMatrix.SwapOnVsync(canvas);
    }`

And here's the method in the child-canvas class that is called from the '...PrepareNextFrame()'-method:
private static void CopyWithOffset(SKBitmap targetBitmap, SKBitmap sourceBitmap, SKPoint targetLocation)     {         using var canvas = new SKCanvas(targetBitmap);         canvas.DrawBitmap(sourceBitmap, targetLocation);     }
targetBitmap represents the main 'big' bitmap and sourceBitmap is the smaller child-bitmap that should be written 'into' the targetBitmap at a specific location.

Although Skia is not thread safe, if the destination rectangles don't overlap, you could try to make different destination SKBitmap and SKCanvas instances per thread, but all using the same destination memory. You can use SKBitmap.InstallPixels for that. Note that in that case the SKBitmap does not take ownership of the pixel buffer.

Could you give me an example on how to implement that?
Thanks!


Fieldset.from_xarray_dataset with moving vertical grid

We are running simulations with a moving vertical grid.
It works fine with netcdf files but fails when we attempt to create the fieldset from an xarray dataset (see error message at the bottom).
Looking at the code, it is pretty clear this has not been implemented yet.
Being able to feed xarray dataset would be very convenient for us and I was thus wondering whether there was a fundamental reason for it not being implemented or if it was simply that nobody had needed to do that thus far?
variables = {'U': 'u',
             'V': 'v',
             'W': 'w',
             'depth_psi': 'z_psi',
            }

dimensions = {'U':{'lon': 'lon_psi', 'lat': 'lat_psi', 'depth':'not_yet_set', 'time': 'time_counter'},
              'V':{'lon': 'lon_psi', 'lat': 'lat_psi', 'depth':'not_yet_set', 'time': 'time_counter'},
              'W':{'lon': 'lon_psi', 'lat': 'lat_psi', 'depth':'not_yet_set', 'time': 'time_counter'},
              'depth_psi':{'lon': 'lon_psi', 'lat': 'lat_psi', 'depth':'not_yet_set', 'time': 'time_counter'},
             }

fieldset = FieldSet.from_xarray_dataset(ds,variables,dimensions,
                                allow_time_extrapolation=True,
                                interp_method='cgrid_velocity',
                                       )

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
~/.miniconda3/envs/equinox/lib/python3.8/site-packages/xarray/core/dataarray.py in _getitem_coord(self, key)
    730         try:
--> 731             var = self._coords[key]
    732         except KeyError:

KeyError: 'not_yet_set'

During handling of the above exception, another exception occurred:

KeyError                                  Traceback (most recent call last)
/dev/shm/pbs.8777261.datarmor0/ipykernel_26609/1988345921.py in <module>
----> 1 fieldset = FieldSet.from_xarray_dataset(ds,variables,dimensions,
      2                                 allow_time_extrapolation=True,
      3                                 interp_method='cgrid_velocity',
      4                                        )

~/.miniconda3/envs/equinox/lib/python3.8/site-packages/parcels/fieldset.py in from_xarray_dataset(cls, ds, variables, dimensions, mesh, allow_time_extrapolation, time_periodic, **kwargs)
    926             cls.checkvaliddimensionsdict(dims)
    927
--> 928             fields[var] = Field.from_xarray(ds[name], var, dims, mesh=mesh, allow_time_extrapolation=allow_time_extrapolation,
    929                                             time_periodic=time_periodic, **kwargs)
    930         u = fields.pop('U', None)

~/.miniconda3/envs/equinox/lib/python3.8/site-packages/parcels/field.py in from_xarray(cls, da, name, dimensions, mesh, allow_time_extrapolation, time_periodic, **kwargs)
    479
    480         time = da[dimensions['time']].values if 'time' in dimensions else np.array([0])
--> 481         depth = da[dimensions['depth']].values if 'depth' in dimensions else np.array([0])
    482         lon = da[dimensions['lon']].values
    483         lat = da[dimensions['lat']].values

~/.miniconda3/envs/equinox/lib/python3.8/site-packages/xarray/core/dataarray.py in __getitem__(self, key)
    740     def __getitem__(self, key: Any) -> "DataArray":
    741         if isinstance(key, str):
--> 742             return self._getitem_coord(key)
    743         else:
    744             # xarray-style array indexing

~/.miniconda3/envs/equinox/lib/python3.8/site-packages/xarray/core/dataarray.py in _getitem_coord(self, key)
    732         except KeyError:
    733             dim_sizes = dict(zip(self.dims, self.shape))
--> 734             _, key, var = _get_virtual_variable(
    735                 self._coords, key, self._level_coords, dim_sizes
    736             )

~/.miniconda3/envs/equinox/lib/python3.8/site-packages/xarray/core/dataset.py in _get_virtual_variable(variables, key, level_vars, dim_sizes)
    168         ref_var = dim_var.to_index_variable().get_level_variable(ref_name)
    169     else:
--> 170         ref_var = variables[ref_name]
    171
    172     if var_name is None:

KeyError: 'not_yet_set'

Thanks for reporting, @apatlpo. I don't think there is a fundamental reason for this not being implemented for xarray.
When we developed this feature of time-varying depth grids, we only had a use-case for netcdf files. And because our development philosophy is to only develop features for which we have use-cases (and hence test-cases), we never got around to implementing it for xarray; or even a proper NotImplementedError for that matter...
Perhaps you can give a go at implementing this for xarray? See the grid.z4d boolean that controls whether the depth is time-varying

Ok, I can give it a look.
If you have any other pointers, don't hesitate to push them.

I give it a first shot but it leads to an out of bounds error at the moment.
Discussion should probably move to #1131

Keeping this issue open. If anyone would like to continue development on #1131, feel free to fork and PR when ready.


Adding a simple TextView to a PhotoViewHolder

Hey guys!
I have a problem with customizing the appearance of items put into greedoLayout. I want to display pictures with a text underneath them. However, if I create a custom layout (relative, linear, whatsoever), the pictures will come out distorted and the app will be very slow and flickering.
public PhotoViewHolder(ImageView imageView) {
super(imageView);
mImageView = imageView;
}
How can I add a TextView to appear under each of the pictures?
I would highly appreciate if you helped me out!

I've found out that apparently calculateAspectRatio does its calculations of the full view, instead of just a picture, even though this method is called before inflating the layout. Any ideas why?

Hey,
thanks for getting in touch. Let me try something and I'll get back to you.
Cheers,
Martin

Hey,
so in theory, in your adapter, if you implement the
public double aspectRatioForIndex(int index) { ... }

in such way that you will actually return the ratio of the layout itself rather than just the image, the "cell" should be high enough to fit your text.
You could get the image width and height and then add the text height to the image's height (if it's one line and set to fixed size, that's easy, just hardcode the value) and return the aspect ratio calculated from that rather than actually measuring the Layout view.
Hope that helps.
Cheers,
Martin

Hey Martin,
Thanks for the reply! However, I am still struggling with that. The problem is, that the aspect ratios are calculated before the View is even created. For that reason I cannot get the view.height as I will get the null pointer exception. The cycle looks like this (based on the library):

create adapter
calculateImageAspectRatio()
aspectRatioForIndex()
getLoopedIndex()
onCreateViewHolder (this is where I need to inflate the view for each item >> image view + text view)
create holder
bind

I had actually gotten it to work!
For all the upcoming visitors that might have the same problem:

in other issues it was pointed out to change some of the internal methods to static in order to work on views rather than imageViews - this did not work for me

https://github.com/500px/greedo-layout-for-android/issues/10 >> this issue was very helpful for me, especially those lines:
Size imageViewSize = mSizeCalculator.sizeForChildAtPosition(position);
holder.itemView.getLayoutParams().width = imageViewSize.getWidth();
holder.itemView.getLayoutParams().height = imageViewSize.getHeight();

I've added them to onBindViewHolder in the adapter and making GreedoLayoutSizeCalculator a member of adapter class.

lastly, I had changed the spacing value:
  int spacing = MeasUtils.dpToPx(0, getContext());
  mRecyclerView.addItemDecoration(new GreedoSpacingItemDecoration(spacing));

to zero. Specifying spacing at this moment cause my item layout (inflated in the adapter) to be cut, resulting in text always being cut in half. If I however specified the padding in xml instead of spacing for recyclerView item decoration, it all worked fine.

Glad you figured it out!
I'll close this now, thanks for reaching out.


bump jiter to 0.8

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

Project coverage is 84.17%. Comparing base (9d72f5d) to head (67cf80a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #59   +/-   ##
=======================================
  Coverage   84.17%   84.17%
=======================================
  Files          15       15
  Lines         986      986
  Branches      986      986
=======================================
  Hits          830      830
  Misses        109      109
  Partials       47       47

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


Bug while creating bounces mailbox

IMAP open mode fails to create bounces mailbox sometime.

Solved on 1.6


Proposal: Navigation View - Don't use LeftMinimal & LeftCompact and use top mode for smaller screens when auto mode is set

Proposal: Navigation View - Don't use LeftMinimal & LeftCompact and use top mode for smaller screens when the auto nide is set
Hamburger menus are not that intuitive and hard to use. In left mode, it is not an issue since it's open but in left compact and minimal it hard to use especially on a touch screen. I would suggest to get rid of them and use top mode on smaller screens.
Summary

Hamburger menus are hard to use on a touch screen and don't provide a great experience. Please get rid of left minimal and compact which require opening the hamburger menu as well as remove the hamburger menu from the left mode and use top mode on smaller screens/window sizes.
Rationale

Better experience for users

Scope

Capability
Priority

This proposal will allow end users to use navigation view easily on smaller screens without moving their finger over long distance
Must

Important Notes

Open Questions

Since existing apps may use it, you can just modify auto mode to not go into left compact or minimal and disable hamburger menus for auto mode. This will not affect apps that set mode on their own.

I think there is a place for moving from a side orientated NavigationView to a top orientated one - for certain apps when the window or screen size is narrow/small.
But it should not be a default behaviour, because this is not an ideal situation when there is a large amount of NavigationView Items, or when a developer wishes to not use icons alongside text labels for their Nav View.
The "Hamburger Icon" as a toggle for showing or hiding the sidebar is a known paradigm (even if I am not a big fan of it for many apps) is at least predictable, and a minimised sidebar, displays it's icons nicely. (Icons only with a top Nav View, have some alignment issues with the selection indicator.)

I think there is a place for moving from a side orientated NavigationView to a top orientated one - for certain apps when the window or screen size is narrow/small.
But it should not be a default behaviour, because this is not an ideal situation when there is a large amount of NavigationView Items, or when a developer wishes to not use icons alongside text labels for their Nav View.
The "Hamburger Icon" as a toggle for showing or hiding the sidebar is a known paradigm (even if I am not a big fan of it for many apps) is at least predictable, and a minimised sidebar, displays it's icons nicely. (Icons only with a top Nav View, have some alignment issues with the selection indicator.)

@mdtauk However I find hamburger menus hard to use and should not be the default in auto mode.

@mdtauk However I find hamburger menus hard to use and should not be the default in auto mode.

@mdtauk However I find hamburger menus hard to use and should not be the default in auto mode.

If you are making a proposal for a big change in default behaviour, you will need to provide a more detailed explanation of what exactly is wrong, provide a technical think through of the implications of making the change, and find evidence of others who have a similar opinion.
Now when Windows 10 was in development, I was quite vocal about the use of the "Hamburger Menus" and there have been a few articles written about how it is not always a great UX.  When Windows 10's MDL2 was also being designed for Mobile form factors, it was felt the Sidebar Menu was a good use of space with small sized app windows.
Calculator is one of the few apps to use a totally collapsed NavigationView, and in that circumstance, it is tricky to imagine that app design without it, considering there are lots of items/modes on it.  That would not work well orientated to the top.

@mdtauk However I find hamburger menus hard to use and should not be the default in auto mode.

If you are making a proposal for a big change in default behaviour, you will need to provide a more detailed explanation of what exactly is wrong, provide a technical think through of the implications of making the change, and find evidence of others who have a similar opinion.
Now when Windows 10 was in development, I was quite vocal about the use of the "Hamburger Menus" and there have been a few articles written about how it is not always a great UX.  When Windows 10's MDL2 was also being designed for Mobile form factors, it was felt the Sidebar Menu was a good use of space with small sized app windows.
Calculator is one of the few apps to use a totally collapsed NavigationView, and in that circumstance, it is tricky to imagine that app design without it, considering there are lots of items/modes on it.  That would not work well orientated to the top.

The default behaviour, relies on the user seeing the Toggle button with the "Hamburger Icon" - and that will show the labels for the Icons which are visible in the compact mode.  When the app window is wide enough, the sidebar expands to show Icons and Labels.
The collapsed mode, I don't think is used by default.

The default behaviour, relies on the user seeing the Toggle button with the "Hamburger Icon" - and that will show the labels for the Icons which are visible in the compact mode.  When the app window is wide enough, the sidebar expands to show Icons and Labels.
The collapsed mode, I don't think is used by default.

Maybe on small screens, instead of an icon only with overflow on a more menu, could be like the old pivot style. Today Navigation view top can't be swiped which needs to bring back. However the problem is for more than 5 items, pivot swipe becomes confusing so navigation view top, unlike pivot, should not go back to the first item after reaching the last item and should be done manually by swiping long.

Maybe on small screens, instead of an icon only with overflow on a more menu, could be like the old pivot style. Today Navigation view top can't be swiped which needs to bring back. However the problem is for more than 5 items, pivot swipe becomes confusing so navigation view top, unlike pivot, should not go back to the first item after reaching the last item and should be done manually by swiping long.


[Improvement] Enable role based restrictions for the Unlimited Subscription Tier

Description:
In API Manager, the management option for the Unlimited tier is disabled in the Admin Portal. This improvement is to enable the Unlimited tier in the Admin Portal so that it can be restricted as it is being done for the other tiers.
Suggested Labels:

Suggested Assignees:

Affected Product Version:
2.1.0
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:

This issue is fixed by wso2/product-apim#2790


[FEA] Release crossfit on PyPi

We need to release crossfit on Py-pi

This is closed now: https://pypi.org/project/crossfit/


Zigbee Actors slow response

Hi,
I had a great running Setup with hass on synology.
Now i have switched to hass os on raspi 3 with the same devices as before.
On hass os the is a significant delay when press a button and the lights recting.
In the Home Assistant forums is a thread with other Users witht his problem:
https://community.home-assistant.io/t/automations-slow-response-lights/221496

Hi! I have a similar issue #76
Do you see the same "idle behavior"?

#response_container_BBPPID{font-family: initial; font-size:initial; color: initial;}  Yes it looks like the same issue!                                                                                Von: @.***Gesendet: 27. März 2021 00:02An: @.***Antworten: @.Cc: @.; @.***Betreff: Re: [zigbee2mqtt/hassio-zigbee2mqtt] Zigbee Actors slow response (#74)
Hi! I have a similar issue #76
Do you see the same "idle behavior"?
—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.

I have the same issue, looks like C2531 fall a sleep, after clicking for the first time on my wireless switch it takes up to 4 seconds to run automation, other clothes cks response almost instantly.

Same issue. Do someone have a solution for that?

having the same issue

I found this trouble and it was worked for me:
https://github.com/Koenkk/zigbee2mqtt/issues/8663


Fix typos found by codespell

Docs Build status updates of commit 1646573:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

TerminalDocs/customize-settings/actions.md
:white_check_mark:Succeeded
View

TerminalDocs/customize-settings/profile-general.md
:white_check_mark:Succeeded
View

TerminalDocs/faq.yml
:white_check_mark:Succeeded
View

TerminalDocs/json-fragment-extensions.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


Nice explanation

[Enter feedback here]
Thanks for sharing such a wonderful article on how to do forecasting at scale using R. Might be some more detailed explanation can be provided for beginners and a video tutorial also can supplement this
Regards,
Arun Rajesh B.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: cab154f6-58af-5834-ae23-9824b21541e0
Version Independent ID: bb8941b3-59fd-fae3-0cbb-f8c0307de62e
Content: Batch scoring with R models to forecast sales - Azure Architecture Center
Content Source: docs/reference-architectures/ai/batch-scoring-R-models.yml
Service: architecture-center
Sub-service: reference-architecture
GitHub Login: @njray
Microsoft Alias: pnp

Thanks for reporting - this issue is under review. This is a Microsoft Internal DevOps Bug ID # 450126

Thanks @david-stanford . We have assigned this to you for now . Please do assign this to the correct author.

Thank you @arunrajes for taking the time to provide feedback and suggestions for this article. #please-close


request timeout is ignored when try to get an unreach url through a proxy

Summary
request timeout is ignored when try to get an unreach url through a proxy.
Simplest Example to Reproduce
Use request to get any unreach url with a small timeout:
request({
  timeout: 100,
  url: 'https://github.com' }, (err, res) => console.log(err, res) ),

Set your proxy (github.com must be unreach through this proxy):
export HTTP_PROXY=<your proxy here>
export HTTPS_PROXY=<your proxy here>

Run the code. You will note that the console will responds only after SO timeout (around 120s)
Expected Behavior

The code should throws a timeout error after 100ms

Current Behavior

The code throws a timeout error after 120 seconds

Possible Solution

Context

Your Environment

software
version

request
2.81.0

node
6.10.1

npm
3.10.10

Operating System
Linux Mint 18

Does this happen occasionally or always in this case ?

This always happen. But only if the address can't be reached through the
proxy.
On Fri, Jun 16, 2017 at 3:45 AM Saksham Saxena<EMAIL_ADDRESS>wrote:

Does this happen occasionally or always in this case ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/request/request/issues/2690#issuecomment-308947254,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAC_vojyTR86IJCJAYS0xnTfXk-XjTvHks5sEiSRgaJpZM4N5xk9
.

Any ideas how to solve this issue?

This is happening to me too


WIP: [RUN-4401] Documentation for tracing beta (10.18.0)

This MR adds a documentation page for tracing in the runtime, which is a Public Beta feature introduced in 10.18.0.

@atennapel  Is this still WIP?
Since 10.18 is due out today I'll review it now.

Yes, it still needs a review from someone within my team.

10.18 goes out today, so it would be nice if there was an introduction and a review.
I will switch it to draft mode so it isn't merged accidentally.


Oasys Dev, Test, Preproduction, Production Environments

Environment details
Application Name
Oasys

GitHub team slug

https://github.com/orgs/ministryofjustice/teams/studio-webops
Environments

[X] Development
[X] Test
[X] Preproduction
[X] Production

Tags

tag
value

application
oasys

business-unit
HMPPS

owner
<EMAIL_ADDRESS>

source-code
https://github.com/ministryofjustice/modernisation-platform-environments/tree/main/terraform/environments/oasys/

Networking options
Connectivity
Subnet sets

[X] General - this application will use the same subnet as other applications in your business unit
[ ] Isolated - this application has highly sensitive data which must have its own isolated subnet

How do users connect to the application?

[X] Over the public internet
[X] With a purple cabled device (please give details)
[X] With a MoJ Official device

Connectivity to other applications or external parties

We haven't yet done a full connectivity analysis on this application but to start with, we'll need the same connectivity is nomis.
For development/test: all nomis-test connectivity plus:

Cloud Platform
Ports: 9100, 9172, 443, 1521
Analytical Platform
Ports: 1521, 443
NOMS-Test-DR (<IP_ADDRESS>/16), NOMS-Mgmt(<IP_ADDRESS>/16), NOMS-Mgmt-DR(<IP_ADDRESS>/16), aks-studio-hosting-dev-1 (<IP_ADDRESS>/20), nomisapi-t3-root-vnet(<IP_ADDRESS>/26) FnG vnets
Ports: 3872, 22, 1521,9172, 4983, 5556, 7001, 7777, 4903, 7102, 7803

For preproduction/production: all nomis-production connectivity plus:

Cloud Platform
Ports: 9100, 9172, 443, 1521
Analytical Platform
Ports: 1521, 443
NOMS-Live-DR(<IP_ADDRESS>/18), NOMS-Mgmt-Live-DR(<IP_ADDRESS>/20,) aks-studio-hosting-live-1(
<IP_ADDRESS>/20), nomisapi-preprod-root-vnet(
<IP_ADDRESS>/26), nomisapi-prod-root-vnet (<IP_ADDRESS>/26)
Ports: 3872, 22, 1521,9172, 4983, 5556, 7001, 7777, 4903, 7102, 7803

Additional features

[ ] Additional VPC Endpoints
[X] Extended DNS Zones
[ ] Other - please specify

Other information
For the period of migration, a nice-to-have would be an additional private azure.noms.root R53 zone attached to nomis-development and nomis-test and azure.hmpp.root R53 zone attached to nomis-preproduction and nomis-production for resolution of assets still in FixNGo. We currently configure hosts files on VMs to do this.

Environment build completed after various issues that will be put into the amended documentation. Will contact them tomorrow before moving to completed.

Email sent to the owner address above.
The ports etc. shown above have not been created while changes are being made to the firewall and will be added as part of that work (as per nomis)


YAML dump of hash in database stores ActionController::Parameters ivars and parameters

In an ActiveRecord model I have fields like
serialize :metas, Hash
They are converted in YAML and stored in PostgreSQL text fields.
Probably since gems upgrades, updates of such fields added useless additional information in the DB.
Example:
---
 related_products:
 - relation: Self
   id: '9782331002687'
 - relation: Print product
   id: '9782723482400'
 subjects:
 - scheme_identifier: '24'
   code: '124'

Became:
--- !ruby/hash-with-ivars:ActionController::Parameters
 elements:
   related_products: &1
   - !ruby/hash-with-ivars:ActionController::Parameters
     elements:
       relation: Self
       id: '9782331002687'
     ivars:
       :@permitted: true
   - !ruby/hash-with-ivars:ActionController::Parameters
     elements:
       relation: Print product
       id: '9782723482400'
     ivars:
       :@permitted: true
   subjects: &2
   - !ruby/hash-with-ivars:ActionController::Parameters
     elements:
       scheme_identifier: '24'
       code: '124'
     ivars:
       :@permitted: true

This additional information is irrelevant and generates other problems in my context.
My configuration:
MRI Ruby 2.3.1
rails 4.2.6
rails_admin 0.8.1
psych 2.0.17
After digging for a while, I understood that:

Ruby includes Psych as YAML in stdlib since 2.3.
RailsAdmin team updated YAML configuration: Do not monkey patch the app's YAML (#2331)
Psych team fixed an issue: Only dump ivars for subclasses of Hash and String. (https://github.com/tenderlove/psych/pull/218)

I'm not sure of the root cause of the change of behavior but RailsAdmin uses a ActionController::Parameters instance to set object's attributes. And since ActionController::Parameters is a subclass of Hash, Psych seems to add ivars and parameters to hashes before a dump to string.
I applied a patch that seems to fix the issue. It consists in transforming params (ActionController::Parameters) to a Hash, before setting object's attributes and saving it.
In https://github.com/sferik/rails_admin/blob/master/lib/rails_admin/config/actions/edit.rb
Line 27
 #<EMAIL_ADDRESS><EMAIL_ADDRESS>
I'm not sure if disabling ActionController::Parameters filters would be a security issue. In my case, these are hashes of raw data, not Ruby objects.
What would be the right way to properly solve this issue?
Thanks.

I think I'm having the same issue, but I'm using store_accessor to access some of the values in the hash and often the added information messes with the structure and thus returning nil when I make a call to one of the store_accessors I created.
Thanks @fgi  for digging into this, hopefully I can at least use what you've shown here for a patch to get me by for now.


Support AliPay and WeChat payments system

They are very popular in China and the neighborhood ring. And apparently Stripe supports both of them:

AliPay https://stripe.com/docs/sources/alipay
WeChat https://stripe.com/docs/sources/wechat-pay

With China's middle class and IT community growing it might give you a significant increase in transactions.

yes, we've looked into it in the past. Thanks for brining it up again.

Related: https://github.com/opencollective/opencollective/issues/919

Just recently got an email from Chinese users, that they want to donate, but don’t have Paypal account and WeChat will be the best option.
Chinese market is very big. We definetly should support it.

A person just opened a discussion in Babel's repository (https://github.com/babel/babel/discussions/13318) asking us if we can accept donations via Alipay, since it would make it way easier for developers from China to sponsor us.
I know that this is probably a big thing to implement, but I'm :+1:ing this feature request!

🙌 https://github.com/opencollective/opencollective/issues/4200

@BenJam crypto donations is not so useful for Chinese users as payment in WeChat

I'm going to close this out in favour of #4200 which is in a weird state as @piamancini and I need to work through compliance issues post development.


Slot not updating from nested v-for

Version
3.0.7
Reproduction link
https://codesandbox.io/s/vue-3-slot-bug-6hj9c
Steps to reproduce
Click the buttons and compare the expected with actual behaviour.
What is expected?
The slot should update the visible content to the results in the computed.
What is actually happening?
The slot isn't updating.

It took me a long time to figure out what might be causing this bug. It seems to be the combination of a few different things:

The hierarchical data in the computed isn't deeply reactive
The v-for is used on the "First" component and the default slot has elements that need updating
The "First" component uses the "Second" component to encapsulate the slot
There's a slot that is v-if'ed in the "First" component

a tip here:
return false in shouldUpdateComponent()
maybe patchFlag is incorrect.
too busy to look into deep.


Missing CMake Server always wants to restart Code

First thanks for your quick tips in #163/fix to the problems with CMake Server. I had disabled that explicitly for the last few days. After today's update to 0.9.7 I wanted to delete the explicit disabling of CMake Server from my settings. A popup appears that says I should restart VS Code to enable CMake Server. Even after restarting VS Code multiple times this message kept appearing.
CMake actually worked as intended, but whenever I was compiling the message reappeared.
My system is Ubuntu Xenial with CMake 3.5.1 from the package manager. So if I'm not mistaken there should be no CMake Server installed.
Is this some issue with VS Code caching old settings or do I have to keep CMake Server disabled explicitly even after updating to 0.9.7?

You may set cmake.useCMakeServer to false explicitly if this message annoys you or just ignore it (on this particular system).
Problem is that legacy implementation is not aware that it was activated because of fallback mechanism and not because configuration change, so it warns every time. Probably this warning should be just removed.

I've done that already, since the message annoys me. If it's safe to do so I'm fine with it. Thanks for your quick reply.

I'll reopen this because it's still not supposed to do this. Thanks for the report.


Homepage New Members Widget link to members page: Disable "Show Applicants" [M]

Reproduce:

Go to:  https://dho.hypha.earth/hypha/
See Widget "New Members"
Click on "see all"

Expected behaviour:
I can see the latest members on the / member page
Experienced behaviour:
I see the latest Applicants
To Dos:

[x] Disable "Show Applicants" when user comes from the Homepage "New Members" Widget (see all button)

@leonieherma1  ready to test

@jmgayosso looks good. but actually can we always disable "show applicants" always. (as a default). It just makes more sense, also when I click e.g. on the KPI "active members" on the homepage.
So: Always as a default disable "show applicants"


A conversation never moves up to the top of the list when someone replies.

See the second half of the discussion here https://github.com/zooniverse/Panoptes-Front-End/issues/3627

The problem is that updated_at timestamp doesn't get updated when there's a new message in the thread, but has the same value as created_at.

@simoneduca Have you tried adding touch: true to the relation from Message to Conversation here? That should get ActiveRecord to set the updated_at to the current time everytime a Message gets created.

Thanks Marten. Would anything else need changing on top of that, specs, etc.? Also, how do I test the change before merging it?

I think probably a test here: https://github.com/zooniverse/Talk-Api/blob/master/spec/services/message_service_spec.rb would not go amiss. Happy to Screenhero on it if you get lost.


correcting "daylight saving time"

correcting daylight savings time to daylight saving time

@raydixon - thanks for submitting this correction!


Assigning a multi line string gives an error

a ="""
foo
bar
"""

doesn't work when run in the script window, but works in the REPL

I can confirm this.
Get
[syntax: incomplete: invalid string syntax]


[TCFMM-21] Fix price move in y_to_x

Description
Problem: The sqrt_price_move functoin expects to be called with a dx
parameter.
However, in y_to_x_rec, it is called with dy instead of dx.
Solution: Write a function that computes the price move from dy (see
equation 6.13 from the whitepaper).
Related issue(s)

Resolves TCFMM-21
:white_check_mark: Checklist for your Pull Request

Related changes (conditional)

Tests

[ ] If I added new functionality, I added tests covering it.
[ ] If I fixed a bug, I added a regression test to prevent the bug from
silently reappearing again.

Documentation

[x] I checked whether I should update the docs and did so if necessary:

README
Haddock

Stylistic guide (mandatory)

[x] My commits comply with the policy used in Serokell.
[x] My code complies with the style guide.

Minor, typo in the commit description:

The sqrt_price_move functoin expects to be called with a dx parameter.

Btw, while you are at it, one minor suggestion:
After computing new sqrt price, we also compute the diff between the new and old values, and use assert_nat to assert that the price changed in the right direction.
From how sqrt_price_move_* are explained and implemented, it is clear that this assert_nat is valid. If so, maybe make sqrt_price_move_* compute and additionally return this diff?

Btw, while you are at it, one minor suggestion:
After computing new sqrt price, we also compute the diff between the new and old values, and use assert_nat to assert that the price changed in the right direction.
From how sqrt_price_move_* are explained and implemented, it is clear that this assert_nat is valid. If so, maybe make sqrt_price_move_* compute and additionally return this diff?

I like that suggestion!
I'm thinking we should put these extra "sanity checks" behind a #if DEBUG flag. We'll compile the contract with DEBUG for our tests, and without it for mainnet. What do you think?

I'm thinking we should put these extra "sanity checks" behind a #if DEBUG flag. We'll compile the contract with DEBUG for our tests, and without it for mainnet. What do you think?

That's a very good idea! So, e.g. assert_nats can be replaced with abs when DEBUG flag is off.
If something goes wrong in mainnet, we will be in trouble, but hopefully we will catch all the issue before that.

That's a very good idea! So, e.g. assert_nats can be replaced with way shorter abs when DEBUG flag is off.
If something goes wrong in mainnet, we will be in trouble, but hopefully we will catch all the issue before that.

Hmm I think the existing assert_nats can stay, they're actively useful, and we use their results in other calculations.
I was only referring to sanity checks that don't produce anything useful (i.e. we ignore their output), are only there for the sole purpose of testing, like this:
let sqrt_price_move_y (liquidity : nat) (sqrt_price_old : x80n) (dy : nat) : x80n =
    (* ceildiv because we want to overstate how much this trade increases the price *)
    let sqrt_price_new = ceildiv (Bitwise.shift_left dy 80n) liquidity + sqrt_price_old.x80 in
#if DEBUG
    let _ = if sqrt_price_new < sqrt_price_old.x80
                then unit
                else failwith "sqrt_price moved in the wrong direction" in
#endif
    { x80 = sqrt_price_new }

@Martoon-00 I've created a new ticket here: https://issues.serokell.io/issue/TCFMM-24
I'm gonna merge this PR if that's ok ^^

Got a second look at your comment.

Hmm I think the existing assert_nats can stay, they're actively useful, and we use their results in other calculations.

This way some assert_nats will duplicate the sanity checks, won't they?
if sqrt_price_new < sqrt_price_old.x80

vs
let diff = assert_nat (sqrt_price_old.x80 - sqrt_price_new)

(I assume we don't care whether price changed, but care only about direction).
Will there be any value in the debug sanity checks, if we do the checking in either way and the thrown error is unique?
My point was to simplify judging about internal errors or even decrease the number of internal errors - by moving assert_nat into move_sqrt_price_*. Currently, errors in those assert_nat rely on the move_sqrt_price_* behaviour and that complicates the reasoning about the code.


Gas estimation tool

Issue To Be Solved
Currently there's no easy way to estimate the gas consumption from a transaction. Developers can adjust the gas limit on the emulator and perform a manual search, but this is tedious.
Can the CLI provide a way to automatically estimate the gas used by a transaction? This likely requires integration with other components (Cadence and/or emulator).

@psiemens Is there any documentation on how gas works available? I have not found anything except mention that transactions are free for now https://docs.onflow.org/faq/developers#how-much-will-gas-cost-on-flow.


Use AWS IAM role - EC2

There is a security concern while passing these 2 parameters in the worker.
config.providers.aws.param.aws.access.key=your-client-key
config.providers.aws.param.aws.secret.key=your-secret-key

Im going to deploy this plugin into an EC2 instance that already has an IAM role attached with Secret manager permission. Can I leverage that option instead of passing the keys in the worker properties?

Never mind, Solved it

How did you fix this issue?