get_server_info errors out on pytan 2.0.3 against tanium 6.2

In pytan.sessions.py the function get_server_info it looks like self.http_post is returning a str instead of json:
d == digit; h == hex

dddd-ddddd-hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

This of course is problematic as you can't call get on a unicode string. The library technically continues functioning after the exception is thrown though...
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "../lib/pytan/handler.py", line 1609, in _derive_server_version
    self.server_version = self.session.get_server_version()
  File "../lib/pytan/sessions.py", line 421, in get_server_version
    self.server_info = self.get_server_info()
  File "../lib/pytan/sessions.py", line 409, in get_server_info
    body['diags_flat'] = self._flatten_server_info(body.get('Diagnostics', []))
AttributeError: 'unicode' object has no attribute 'get'Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "../lib/pytan/handler.py", line 1609, in _derive_server_version
    self.server_version = self.session.get_server_version()
  File "../lib/pytan/sessions.py", line 421, in get_server_version
    self.server_info = self.get_server_info()
  File "../lib/pytan/sessions.py", line 409, in get_server_info
    body['diags_flat'] = self._flatten_server_info(body.get('Diagnostics', []))
AttributeError: 'unicode' object has no attribute 'get'

I don't really have access to the Tanium instance but I can try to work with the platform owner if this is unexpected. I did a simple get on /info.json and it looks like the second number increases every time and the last bit is random (I tried hex decoding it but it was gibberish).

What version of Tanium platform is this?

Yeah the connection is made to 444 just fine and everything works it's just returning that weird string instead of json. I hard-coded the "server version" to 6.2 so get_server_info is never called and everything works fine (question fires and returns the expected results).

That's.. odd. I've never seen that. Though that string aligns with what would be a session-id, possibly. I'm about to check in a change to pytan.sessions.Sessions.get_server_info() that makes that function a little more error proof. Mind trying with the develop branch?

Point of note, http_post is SUPPOSED to return a string.
get_server_info() is supposed to parse that string as json into a python dict here: https://github.com/tanium/pytan/blob/2.0.3/lib/pytan/sessions.py#L389

Oh right when I said string I just meant it wasn't a json structure (ie it wouldn't be a dictionary which was expected). I went home for the day but I can checkout the dev branch (just master or is there another one?) and see what happens.

The develop branch is here: https://github.com/tanium/pytan/tree/develop
It contains the next version of PyTan (which is likely to be 2.1.0, although it's currently marked as 2.0.4).
I check in all my changes to develop and once I've fully tested them all, I push to master and do version increments/etc.

Okay cool I'll give it a shot tomorrow and let you know how it goes. Thanks!

Wow that's a lot of documentation in that branch; nice job!
Anyway got this exception now:
2015-08-28 15:19:28,949 WARNING  pytan.sessions.Session: Unable to find Version key in Settings: {}
2015-08-28 15:19:28,949 WARNING  pytan.sessions.Session: Unable to find Version key in Settings: {}
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "../lib/pytan/handler.py", line 194, in get_server_version
    self.server_version_dict = self._parse_versioning()
  File "../lib/pytan/handler.py", line 2320, in _parse_versioning
    raise pytan.exceptions.VersionParseError(m(self.server_version))
VersionParseError: Unable to parse major, minor, revision, and build from server version string: Unable to determine

info_dict is what you're setting in the json.loads exception body; with a value equal to the string I posted above.

Are you able to webex with me? let's take this direct to email, something is going on that I can't see through what you've provided me.
<EMAIL_ADDRESS>

Fixed in 2.1.0.  Thanks!


ul,ol margin-left being overridden by ul{margin-left} in foundation.min.css

I think there is an issue in the minified CSS; I have downloaded the latest from github but Codepen only has 6.0.5 and the issue is present. The ul,ol {margin-left} is being overwritten by a later declaration of ul,ol{margin:0}
Minified 6.0.5 (https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.5/css/foundation.min.css)
http://codepen.io/anon/pen/vLKRMN
Codepen using non-minified: (https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.5/css/foundation.css)
http://codepen.io/anon/pen/jWrzRY
//line 1257
 ul {
    list-style-type: disc;
    margin-left: 1.25rem;
 }

//line 1247
ul, ol, dl {
    line-height: 1.6;
    margin-bottom: 1rem;
    list-style-position: outside;
}
//line 1134
div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, p, blockquote, th, td {
    margin: 0;
    padding: 0;
}

I updated the two CodePens to 6.1.0 and the visuals were identical. Seems to have been fixed!

Either the problem is back or there is a new discrepancy:
Using dist CSS: http://codepen.io/anon/pen/PZOrVz
Using minified CSS: http://codepen.io/anon/pen/bEYPzq
margin-left gets overwritten in min.

Here's v6.2.3 min: http://codepen.io/andycochran/pen/bZAZkR
Seems to work. Gonna close this. Please reopen if the issue pops its head back up.


irmin-pack: implement reading from lower

This PR:

adds a read_exn function to Lower
limits "open" volumes to one at a time for a simple management of open file descriptors
adds volume_identifier to direct keys to allow tracking the context of a read so that subsequent reads can skip looking in the upper
handles dangling parent commits by not propagating the volume identifier to them, thereby forcing a fresh lookup

Codecov Report

Merging #2198 (cd28464) into main (84dcea5) will decrease coverage by 0.01%.
The diff coverage is 72.03%.

:exclamation: Current head cd28464 differs from pull request most recent head ace34a4. Consider uploading reports for the commit ace34a4 to get more accurate results

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@            Coverage Diff             @@
##             main    #2198      +/-   ##
==========================================
- Coverage   68.14%   68.13%   -0.01%
==========================================
  Files         135      135
  Lines       16294    16359      +65
==========================================
+ Hits        11103    11146      +43
- Misses       5191     5213      +22

Impacted Files
Coverage Δ

src/irmin-pack/unix/errors.ml
28.88% <ø> (ø)

src/irmin-pack/unix/gc_worker.ml
4.41% <0.00%> (ø)

src/irmin-pack/unix/io_errors.ml
58.33% <ø> (ø)

src/irmin-pack/unix/store.ml
63.93% <ø> (+0.11%)
:arrow_up:

src/irmin-pack/unix/lower.ml
69.69% <60.00%> (-11.01%)
:arrow_down:

src/irmin-pack/unix/sparse_file.ml
84.67% <76.92%> (+0.93%)
:arrow_up:

src/irmin-pack/unix/dispatcher.ml
62.33% <82.35%> (+3.60%)
:arrow_up:

src/irmin-pack/unix/pack_key.ml
71.42% <83.33%> (+0.59%)
:arrow_up:

src/irmin-pack/unix/pack_store.ml
83.07% <93.33%> (+0.35%)
:arrow_up:

src/irmin-pack/unix/checks.ml
23.28% <100.00%> (ø)

... and 9 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

Just had a fun rebase but can merge when CI is green


Uncaught TypeError: _plainDraggableDefault.default is not a constructor

First of all: plain-draggable is great stuff (thanks for the work on this) and exactly what I need for a project!
I've been trying to use plain-draggable and integrate it into my project for days now, but never get past this error message:
Uncaught TypeError: _plainDraggableDefault.default is not a constructor
    at<EMAIL_ADDRESS>(index.63f9b973.js:441)
    at newRequire (index.63f9b973.js:71)
    at index.63f9b973.js:120
    at index.63f9b973.js:143

My setup is currently a maximally simple one: an npm-based project, a simple HTML-file with some SVGs and a js-file into which I try to import PlainDraggable as follows:
import PlainDraggable from "plain-draggable";

let draggable = new PlainDraggable(document.getElementById('draggable'));

I am trying to start it by using parcel with npx parcel index.html. Works great with every other script I tried to integrate.
I tried a lot and even watched whole tutorials on how to import libraries in JavaScript (I'm pretty new to JS, never really worked intensively with JS and would need some help here).
Thanks in advance for a little advice!

Hi @romanzimnik, thank you for the comment.
I don't know the _plainDraggableDefault symbol, therefore your framework (or something) did something incorrectly maybe, then the error was thrown.
For test, run your app without the Parcel. Remove import PlainDraggable ... and add <script> element into your HTML code.
Or, use another bundler e.g. Webpack.

Hi @anseki, thank you very much for your feedback. You have put me on the right track with the hint regarding webpack. I managed to solve my importing problem. Thanks for this!
For all who might also stumble upon a similar problem and come by here, I'll document my solution path once:
I removed parcel, installed plain-draggable via npm. I then use it in my custom js file to manipulate my SVGs. The import statement of plain-draggable is still present in my js-file and webpack does the bundling. The output is then simply integrated via <script> in the signle HTML-file I use for testing.

I'm glad if I could help you :smile:
Thank you for the information about your solution.


SELECT: option with own attr don't work

Hi Olton!
Example at:
https://codepen.io/TorakikiSan/pen/EeyWmp?editors=1111
I have associated two attributes (data-year and data-status) to each OPTION of a SELECT.
How can I get the attribute values of the selected OPTION?
I tried with
// Try sintax 1
console.log($("#MACHINE option:selected").attr("data-year"));

and
// Try sintax 2
console.log($("option:selected", this).attr("data-year"));

but neither works!
Thank's!

m4q not support syntax option:selected for queries this is specified for jQuery. use option:checked

Perfect!


Build is fail

It seems issue with https://github.com/aubm/hugo-code-editor-theme/blob/master/static/css/theme.scss#L50:
$ npm run build
...
[17:52:53] { Error: static/css/_mixins.scss
Error: You may not @extend an outer selector from within @media.
       You may only @extend selectors within the same directive.
       From "@extend .no-padding-left-and-right" on line 50 of static/css/theme.scss
        on line 1 of static/css/_mixins.scss
>> .no-padding-left-and-right {
   ^

    at options.error (/Users/bborysenko/src/hugo-code-editor-theme/node_modules/node-sass/lib/index.js:286:26)
  status: 1,
  file: '/Users/bborysenko/src/hugo-code-editor-theme/static/css/_mixins.scss',
  line: 1,
  column: 1,
  message: 'static/css/_mixins.scss\nError: You may not @extend an outer selector from within @media.\n       You may only @extend selectors within the same directive.\n       From "@extend .no-padding-left-and-right" on line 50 of static/css/theme.scss\n        on line 1 of static/css/_mixins.scss\n>> .no-padding-left-and-right {\n   ^\n',
  formatted: 'Error: You may not @extend an outer selector from within @media.\n       You may only @extend selectors within the same directive.\n       From "@extend .no-padding-left-and-right" on line 50 of static/css/theme.scss\n        on line 1 of static/css/_mixins.scss\n>> .no-padding-left-and-right {\n   ^\n',
  messageFormatted: '\u001b[4mstatic/css/_mixins.scss\u001b[24m\nError: You may not @extend an outer selector from within @media.\n       You may only @extend selectors within the same directive.\n       From "@extend .no-padding-left-and-right" on line 50 of static/css/theme.scss\n        on line 1 of static/css/_mixins.scss\n>> .no-padding-left-and-right {\n   ^\n',
  messageOriginal: 'You may not @extend an outer selector from within @media.\nYou may only @extend selectors within the same directive.\nFrom "@extend .no-padding-left-and-right" on line 50 of static/css/theme.scss\n',
  relativePath: 'static/css/_mixins.scss',
  name: 'Error',
  stack: 'Error: static/css/_mixins.scss\nError: You may not @extend an outer selector from within @media.\n       You may only @extend selectors within the same directive.\n       From "@extend .no-padding-left-and-right" on line 50 of static/css/theme.scss\n        on line 1 of static/css/_mixins.scss\n>> .no-padding-left-and-right {\n   ^\n\n    at options.error (/Users/bborysenko/src/hugo-code-editor-theme/node_modules/node-sass/lib/index.js:286:26)',
  showStack: false,
  showProperties: true,
  plugin: 'gulp-sass' }
[17:52:53] Finished 'css' after 94 ms

+1

1

+1

Just ran into this myself.  For anyone else who comes along to this issue, it can be fixed by replacing the two @extend .no-padding-left-and-right; statements from the theme.scss file with the following:
    padding-left: 0px;
    padding-right: 0px;

The result should be an identical css output file, as far as I know.

@AidanNelson  make a PR

@zodman Done.


[KYUUBI #5234] Upgraded Jetty version from 9.4.51.v20230217 to 9.4.52.v20230823

Fixes #5234

Codecov Report

Merging #5239 (2498302) into master (8c512f4) will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           master   #5239   +/-   ##
======================================
  Coverage    0.00%   0.00%
======================================
  Files         590     590
  Lines       33344   33344
  Branches     4403    4403
======================================
  Misses      33344   33344

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sidhant-nagpal thanks for your contribution, please follow the docs to upgrade the dependencyList

The first commit looks good, please revert your last commit

Seems there are some issues with GitHub actions, the change should be safe, merging to master/1.8


Add Xembed support.

This is a basic implementation of XEmbed.  Please go easy on me.  I'm a Java developer, and haven't seen rust code until about 3 days ago.  Nevertheless, my interest in XEmbed for this application is to allow it to be used in conjunction with Suckless tabbed - which seems to work fine with not too much effort.
I normally run a basic terminal in tabbed in dwm, but here's what it looks like in Xfce:

Just as a quick update, looks like we will be merging this into Alacritty for now.
If you don't mind, I'd like to get #2336 ready first and then get to this PR afterwards. So I'll wait with the review until then to make sure things don't need to be needlessly changed.

Just to clarify things, this PR is blocked by #2438 and not by #2336, as were originally stated.
P.s.
It seems like github autocomplete failure.

You've added fish/zsh completions, however you're missing bash one.

Agree, there's no reason to add this one to config. I tend to think that this option was added to a config file unintentionally, since the alacritty.yml change is missing, am I correct here @mkosem?.

Just tried this out with tabbed, and it seems to be working very well :tada: I personally use a WM capable of creating tabs, however this effectively solves the problem for anyone on X11 using another kind of WM. I'd be curious if it's nearly this simple to add native macOS tab support (see #1544), since people would really like that.
FWIW, here's what it looks like:

Thanks!  All set from my end. Thanks for being patient with me :)!

Yeah, this is along the lines of something I tried over the weekend. The XSync stuff didn't seem to help, for me when I was trying that, but I may well have been doing something incorrectly and plenty of other apps are doing similar stuff so it looks like a sound approach.

Sorry, didn't mean to close that.


[BUG] Invalid phone number marked as valid

Long phone number are considered valid while the original libphonenumber implementation properly flags them as invalid.
Example: +97233142764978

The thing is long phone number can be valid under some situations, in some countries.
I have to look into it.
But given the divergence from libphonenumber is is definitely a problem.


core not supported in declare module

Snapshot stored with reference name:
refs/pull/13869/merge
Test environment:
https://babylonsnapshots.z22.web.core.windows.net/refs/pull/13869/merge/index.html
To test a playground add it to the URL, for example:
https://babylonsnapshots.z22.web.core.windows.net/refs/pull/13869/merge/index.html#WGZLGJ#4600
Links to test babylon tools with this snapshot:
https://playground.babylonjs.com/?snapshot=refs/pull/13869/merge
https://sandbox.babylonjs.com/?snapshot=refs/pull/13869/merge
https://gui.babylonjs.com/?snapshot=refs/pull/13869/merge
https://nme.babylonjs.com/?snapshot=refs/pull/13869/merge
To test the snapshot in the playground with a playground ID add it after the snapshot query string:
https://playground.babylonjs.com/?snapshot=refs/pull/13869/merge#BCU1XR#0


doc: guide to obtain control-plane metrics in GKE

control-plane metrics are not fetched out-of-the-box in GKE. It would be useful to provide a guide to configure your cluster and the integration to obtain those metrics.

where you thinking to something like this or were you referring some something like a step to step guide?

I was thinking of a step to step guide, but I actually didn't find the link you provided... maybe that is enough


build.getDependency is failing to run successfully

What are you trying to do? Run https://ci.adoptium.net/view/all/job/build.getDependency
Expected behaviour: Job runs without error statis
Observed behaviour: Job has failed since the 6th December and shows a red status with the following message:
Started by timer
ERROR: Unable to find bld from git https://github.com/adoptium/temurin-build.git
Finished: FAILURE

While this may be "normal" behaviour if there is nothing to update, that's not clear from the error message so we should either clarify that in the log/status or fix the underlying problem.
Any other comments:

This may be blocking https://github.com/adoptium/temurin-build/issues/3593, so I'll get this fixed now.

Ok, all fixed.
Proof: https://ci.adoptium.net/view/all/job/build.getDependency/215/console
Underlying cause was that someone had changed the script path to "bld", which is incorrect.
This has now been set to the correct value: cyclonedx-lib/getDependencies


How to enable AI companion download link in self-deployed app inventor website?

I have deployed App inventor on my own server. I noticed that a download link should appear when the about AI companion button clicked. In which way could I enable this link?

You have to set the appropriate URLs at the bottom of YaVersion.java for those links to appear. In the future, you should ask questions of clarification in the open source community.

You have to set the appropriate URLs at the bottom of YaVersion.java for those links to appear. In the future, you should ask questions of clarification in the open source community.


@app.list_resource_templates() not available on Python

Describe the bug
The documentation states here: https://modelcontextprotocol.io/docs/first-server/python that one can expose ResourceTemplates with Python using the @app.list_resource_templates() decorator.
This does not work and will throw an error on startup:
AttributeError: 'Server' object has no attribute 'list_resource_templates'

To Reproduce

Add code to

@app.list_resource_templates()
async def list_resource_templates() -> list[ResourceTemplate]:
    """List available resources."""

    retur  [
        ResourceTemplate(
            uriTemplate="note://obsidian/{path}",
            name="A obsidian note",
            description="Obsidian note identified by a path relative to root vault",
            mimeType="application/txt"
        )
    ]

Start server either via uv run or via Claude UI

Expected behavior
Server should start and ResourceTemplates should be exposed to Client
Logs
Traceback (most recent call last):
  File "/Users/markus/experiments/claude-mvp/mvp-knowledge-base/.venv/bin/mcp-knowledge-base", line 5, in <module>
    from mcp_knowledge_base import main
  File "/Users/markus/experiments/claude-mvp/mvp-knowledge-base/src/mcp_knowledge_base/__init__.py", line 1, in <module>
    from . import server
  File "/Users/markus/experiments/claude-mvp/mvp-knowledge-base/src/mcp_knowledge_base/server.py", line 72, in <module>
    @app.list_resource_templates()
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Server' object has no attribute 'list_resource_templates'

Additional context

Thank you for reporting this. This is fixed in https://github.com/modelcontextprotocol/python-sdk/pull/77, which was released as v1.1.0 of the python sdk


Install lws controller together with llmaz controller in the same namespace

What would you like to be cleaned:
We now install lws-controller in the lws namespace and llma-controller in the llmaz-system, let's merge them together, it's more convenient for users.
Why is this needed:

/help

I will try to migrate lws to llmaz-system in the next few days to see if there will be any deployment problems.


SWFlow and SWFlows

I just noticed that we have the 2 following subfolders in ./proteus: SWFlow and SWFlows.
They share a lot of common subfolders and files but are not exactly the same.
Is that intentional?
@cekees @ejtovar @zhang-alvin

No, I think it's just something that needs to be cleaned up when we refactor the SWFlow app

You can remove the directory ‘SWFLows’. The model files are not in that directory.


How to run multiple listener rules shortly after eachother

I am trying to get hypridle to lock the screen after 5 minutes, and then turn the screen off 30 seconds after that (so 5m 30s in total). I expected that this would do that:
listener {
	timeout = 300
	on-timeout = loginctl lock-session
}

listener {
	timeout = 330
	on-timeout = hyprctl dispatch dpms off
	on-resume = hyprctl dispatch dpms on
}

However, the above config locks the screen after 5 minutes, and then turns the screen off 5m 30s after that (a total of 10m 30s). Is this intended behavior? It closely mirrors the example in the docs.
If intended, what can I change to make it turn the screen off only 30 seconds later after locking?

what's the lock-session command? sounds like it somehow trips hyprland to think that you're back

I am not really sure how lock-session works to be honest; I just set what I have above in hypridle.conf and my hyprlock.conf is just widget customization. Is there something else I was supposed to set?

hyprlock.conf
general {
	grace = 5
	no_fade_out = true
}

background {
	monitor =
	color = rgba(150, 150, 150, 1.0) # fallback if bg doesn't work
	#path = ~/wallpaper
	path = ~/wallpapers/nord_wp1.png
	blur_passes = 3
}

label {
	monitor =
	text = cmd[update:1000] echo "$(date '+%A, %b %d%n%I:%M:%S %p')"
	text_align = center
	font_size = 20
	font_family = JetBrains Mono
	halign = center
	valign = top
	position = 0, -25
}
label {
	monitor =
	text = $USER
	text_align = center
	font_size = 12
	font_family = JetBrains Mono
	halign = center
	valign = bottom
	position = 0, 25
}

# https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock/#input-field
input-field {
	monitor =
	size = 600, 50
	outline_thickness = 3

	dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8
	dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0
	dots_center = false
	dots_rounding = -1 # -1 default circle, -2 follow input-field rounding
	outer_color = rgb(151515)
	inner_color = rgb(200, 200, 200)
	font_color = rgb(10, 10, 10)
	fade_on_empty = true
	fade_timeout = 1000 # Milliseconds before fade_on_empty is triggered.
	placeholder_text = Input Password... # Text rendered in the input box when it's empty.
	hide_input = false
	rounding = -1 # -1 means complete rounding (circle/oval)
	check_color = rgb(204, 136, 34)
	fail_color = rgb(204, 34, 34) # if authentication failed, changes outer_color and fail message color
	fail_text = $FAIL ($ATTEMPTS) # can be set to empty
	fail_timeout = 2000 # milliseconds before fail_text and fail_color disappears
	fail_transition = 300 # transition time in ms between normal outer_color and fail_color
	capslock_color = -1
	numlock_color = -1
	bothlock_color = -1 # when both locks are active. -1 means don't change outer color (same for above)
	invert_numlock = false # change color if numlock is off
	swap_font_color = false # see below

	position = 0, -20
	halign = center
	valign = center
}

can you try to set an explicit command for on-lock in hypridle? that's what should be run on loginctl lock-sesison

After changing general:lock_cmd to notify-send hyprlock, it works as expected and the monitors turn off 3 seconds after I get the test notification. So I guess something is wrong with hyprlock causing it to wake up somehow.
If it's relevant (forgot to mention this in the main post), I'm running on

Arch Linux
SDDM 0.21.0-4
Hyprland 0.42.0-1
hypridle 0.1.2-1

Using proprietary NVidia driver 555.58.02-1, although I wouldn't think this would impact locking? Tomorrow I should be able to test this on my AMD computer to see if it does.

hm, odd.

However, the above config locks the screen after 5 minutes, and then turns the screen off 5m 30s after that (a total of 10m 30s). Is this intended behavior? It closely mirrors the example in the docs.
If intended, what can I change to make it turn the screen off only 30 seconds later after locking?

Yeah I've had this issue too. After some troubleshooting && timekeeping I detected some spooky behavior. For example in this hypridle.conf:
general {
    lock_cmd = pidof hyprlock || hyprlock
    before_sleep_cmd = hyprlock
}

listener {
    timeout = 450
    on-timeout = hyprlock
    on-resume = notify-send "Welcome back!"
}

listener {
    timeout = 90
    on-timeout = systemctl suspend
}

It seems to ignore the order of which listeners are written and it only picked the listeners with least timeout (descending order) and not running listeners simultaneously or even strictly in order. Also general:lock_cmd = notify-send hyprlock didn't fix the issue for me.
For good measure, I installed the latest hyprland tagged version with all its utils recently:
Kernel: Linux 6.10.7-arch-1
hyprland v0.42.0-1
hypridle v0.1.2-1

@BBaoVanC @vaxerski does this ring any bells to you?

order of listeners is irrelevant, all run at the same time

order of listeners is irrelevant, all run at the same time

well they don't for me. maybe the listeners "reset" themselves or smth but for real I don't know why every listener in config must take its timeout time, hence the issue

order of listeners is irrelevant, all run at the same time

well they don't for me. maybe the listeners "reset" themselves or smth but for real I don't know why every listener in config must take its timeout time, hence the issue

At least based on the behavior for me, somehow hyprlock is causing it to think it was woken up and not idle anymore

order of listeners is irrelevant, all run at the same time

well they don't for me. maybe the listeners "reset" themselves or smth but for real I don't know why every listener in config must take its timeout time, hence the issue

At least based on the behavior for me, somehow hyprlock is causing it to think it was woken up and not idle anymore

then any possible solution on our end?

no, should be reported in hyprland prolly

Alright, I guess I'll make an issue report over there

https://github.com/hyprwm/hypridle/issues/80 prolly related, judging from the description.

it is indeed the same

closing as dupe then


Remove unused std::result import

Currently, the following warning is generated when building:
warning: unused import: `std::result`
 --> crates/debug/src/write_debuginfo.rs:5:5
  |
5 | use std::result;
  |     ^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

This commit removes this unused import.

Unless I'm mistaken the CI failures are related to https://github.com/bytecodealliance/wasmtime/pull/598.

I should have read through the PR list a little more carefully and I would have realised that this will be fixed by https://github.com/bytecodealliance/wasmtime/pull/597. Sorry about the noise.


Field has an invalid name on upgrading 1.0.5 to 2.0.4

I'm attempting to upgrade a database from 1.0.5 to 2.0.4 but the upgrade fails.
It doesn't appear to like spaces in field names?
`.\LiteDB.2.0.4\tools\LiteDB.Shell.exe .\database.db --upgrade .\database_v2.db --exit
Welcome to LiteDB Shell
Getting started with help

open .\database.db
open "database.db" (v1.0.4)
dump > C:\Users\Tim\AppData\Local\Temp\tmp73D3.tmp
open .\database_v2.db
open "database_v2.db" (v2.0.4)
dump < C:\Users\Tim\AppData\Local\Temp\tmp73D3.tmp
Field 'Transparent Dark' has an invalid name.
`

The upgraded database ends up with no entries in the problem collection.
Opening the old database it seems happy to dump it and I can even query the collection from the shell without upgrading.
I can't post the exact content publically, but this gives an example of a collection entry that's a problem on upgrade. There's more content in each element in reality.
{     "_id": {"$oid": "57fe86100dc86c3324b1a7c1"},     "Name": "A Name",     "Description": "Description",     "Themes":     {         "Dark":         {             "Name": "Dark"         },         "Light":         {             "Name": "Light"         },         "Transparent Dark":         {             "Name": "Transparent Dark"         }    } }

Could "$oid" becausing the issue? Such that it should be "oid" and not
"$oid"
On Jan 5, 2017 4:38 PM, "Tim Moore"<EMAIL_ADDRESS>wrote:

I'm attempting to upgrade a database from 1.0.5 to 2.0.4 but the upgrade
fails.
It doesn't appear to like spaces in field names?
`.\LiteDB.2.0.4\tools\LiteDB.Shell.exe .\database.db --upgrade
.\database_v2.db --exit
Welcome to LiteDB Shell
Getting started with help
open .\database.db
open "database.db" (v1.0.4)
dump > C:\Users\Tim\AppData\Local\Temp\tmp73D3.tmp
open .\database_v2.db
open "database_v2.db" (v2.0.4)
dump < C:\Users\Tim\AppData\Local\Temp\tmp73D3.tmp
Field 'Transparent Dark' has an invalid name.
`
The upgraded database ends up with no entries in the problem collection.
Opening the old database it seems happy to dump it and I can even query
the collection from the shell without upgrading.
I can't post the exact content publically, but this gives an example of a
collection entry that's a problem on upgrade. There's more content in each
element in reality.
{ "_id": {"$oid": "57fe86100dc86c3324b1a7c1"}, "Name": "A Name",
"Description": "Description", "Themes": { "Dark": { "Name": "Dark" },
"Light": { "Name": "Light" }, "Transparent Dark": { "Name": "Transparent
Dark", } } }
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/mbdavid/LiteDB/issues/414, or mute the thread
https://github.com/notifications/unsubscribe-auth/AVQ2C_Fqf0QUsLfds_RI1kCdmppCer5Kks5rPQBWgaJpZM4Lbv-U
.

It's the field 'Transparent Dark' it complains about.
$oid is just the default object ID entry I guess. My class defines this to expose a unique Id, and that $oid is what gets dumped out when querying the collection via the shell.
public ObjectId Id { get; set; }

How are you doing this "upgrade"? Shell, Or via commands manually?
On Jan 5, 2017 4:53 PM, "Tim Moore"<EMAIL_ADDRESS>wrote:

It's the field 'Transparent Dark' it complains about.
$oid is just the default object ID entry I guess. My class defines this to
expose a unique Id, and that $oid is what gets dumped out when querying the
collection via the shell.
public ObjectId Id { get; set; }
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/mbdavid/LiteDB/issues/414#issuecomment-270662212, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AVQ2C6fJSCstsRznCyhi6X90G9cZzFLsks5rPQPwgaJpZM4Lbv-U
.

I suggest in the meantime that you do an sql dump of the entire database
and then do the update by run the sql script in a new version. It maybe a
bug in the upgrading procedure. Because it seems that what is happen is
that the fields value is being used as the field column name by mistake.
On Jan 5, 2017 4:59 PM, "Dean Van Greunen"<EMAIL_ADDRESS>wrote:

How are you doing this "upgrade"? Shell, Or via commands manually?
On Jan 5, 2017 4:53 PM, "Tim Moore"<EMAIL_ADDRESS>wrote:

It's the field 'Transparent Dark' it complains about.
$oid is just the default object ID entry I guess. My class defines this
to expose a unique Id, and that $oid is what gets dumped out when querying
the collection via the shell.
public ObjectId Id { get; set; }
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/mbdavid/LiteDB/issues/414#issuecomment-270662212,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AVQ2C6fJSCstsRznCyhi6X90G9cZzFLsks5rPQPwgaJpZM4Lbv-U
.

Via the shell in one line:
LiteDB.Shell.exe database.db --upgrade database_v2.db --exit
as above the shell expands this out into individual shell commands:
open database.db
dump > C:\Users\Tim\AppData\Local\Temp\tmp73D3.tmp
open database_v2.db
dump < C:\Users\Tim\AppData\Local\Temp\tmp73D3.tmp

I can do a fix but it's a messy workaround. I have to run a command first to dump the DB
LiteDB.Shell.exe database.db --exec "dump > upgrade.tmp" --exit
Then run a regex on the upgrade.tmp file to convert the field names
Then reimport
LiteDB.Shell.exe database_v2.db --exec "dump < upgrade.tmp" --exit
Noting for production purposes I need to be able to run the upgrade programmatically or scripted with no interaction. There is already a released product using v1.0.5 DB in the field and upgrades must be seamless.

I'm busy taking a look at the upgrade code
1.0.5 to 2.0.4
On Jan 5, 2017 8:43 PM, "Tim Moore"<EMAIL_ADDRESS>wrote:

I can do a fix but it's a messy workaround. I have to run a command first
to dump the DB
LiteDB.Shell.exe database.db --exec "dump > upgrade.tmp" --exit
Then run a regex on the upgrade.tmp file to convert the field names
Then reimport
LiteDB.Shell.exe database_v2.db --exec "dump < upgrade.tmp" --exit
Noting for production purposes I need to be able to run the upgrade
programmatically or scripted with no interaction. There is already a
released product using v1.0.5 DB in the field and upgrades must be seamless.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/mbdavid/LiteDB/issues/414#issuecomment-270722292, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AVQ2C_Jcrol8JAxI4aYSY6tZYRv-OAmrks5rPTmygaJpZM4Lbv-U
.

The current upgrade only support's upgrade from v6 to v7
I suggest you get the other copies of she'll which allow upgrades from v5
to v6 ... and say you got v1 you will need to do upgrade to v2 then to v3
then to v4 and then to v5
Once I get my laptop I'll downloaded the report and push a new upgrade
which allows specifying upgrades from version x to version y., where x and
y are user defined / user inputable via command string example
--upgrade:v3-v7
On Jan 5, 2017 8:51 PM, "Dean Van Greunen"<EMAIL_ADDRESS>wrote:

I'm busy taking a look at the upgrade code
1.0.5 to 2.0.4
On Jan 5, 2017 8:43 PM, "Tim Moore"<EMAIL_ADDRESS>wrote:

I can do a fix but it's a messy workaround. I have to run a command first
to dump the DB
LiteDB.Shell.exe database.db --exec "dump > upgrade.tmp" --exit
Then run a regex on the upgrade.tmp file to convert the field names
Then reimport
LiteDB.Shell.exe database_v2.db --exec "dump < upgrade.tmp" --exit
Noting for production purposes I need to be able to run the upgrade
programmatically or scripted with no interaction. There is already a
released product using v1.0.5 DB in the field and upgrades must be
seamless.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/mbdavid/LiteDB/issues/414#issuecomment-270722292,
or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AVQ2C_
Jcrol8JAxI4aYSY6tZYRv-OAmrks5rPTmygaJpZM4Lbv-U>
.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/mbdavid/LiteDB/issues/414#issuecomment-270724552, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AVQ2C5W35xDABQyLtJ4lkhiE_QaulS3Wks5rPTuWgaJpZM4Lbv-U
.

@todo xX-MLG-Xx extend upgrade command for shell and litedb engine

Hi guys, it's a "simple" bug in this convertion. The problem is when 1.0.4 serialize your Dictionary  there is validation in key (support any string). But, when you try deserialize in 2.x BsonDocument key must be validate from here:
https://github.com/mbdavid/LiteDB/blob/master/LiteDB/Document/BsonDocument.cs#L51
v3 has no upgrade from v1 yet, but it's on my plans.
For now, change this method to returns always true.


Cannot get back to Linux after logging out. Chrome OS

name: xenial
encrypted: no
Entering /mnt/stateful_partition/crouton/chroots/xenial...
crouton: version 1-20200116214215~master:9017d640
release: xenial
architecture: amd64
xmethod: xorg
targets: xfce
host: version 12871.67.0 (Official Build) stable-channel nami
kernel: Linux localhost 4.4.211-17198-ga431862f6e61 #1 SMP PREEMPT Thu Apr 2 18:28:00 PDT 2020 x86_64 x86_64 x86_64 GNU/Linux
freon: yes
Unmounting /mnt/stateful_partition/crouton/chroots/xenial...

Im new to Linux and coding. I logged out of Linux which took me back to Chrome OS and now I cant get back to Linux. Not sure what Im doing wrong. Thank you for the help.
If known, describe the steps to reproduce the issue: While in Linux, I just logged out and it took  me back to Chrome. I cant get back to Linux. What am I doing wrong.

Hey @AlphaRomeo81 .
What you'll need to do from the CROS shell (from ChromeOS, the one you get to with ctrl-alt-t) is first type shell to get to the shell, then type sudo startxfce4 since you have xenial with xfce installed (the command would vary if you installed other desktop environments. For example, gnome would be sudo startgnome by default).
One more little thing, if you are in linux and just need to go back to ChromeOS for something quick, you don't have to fully logout. You can go back and forth between ChromeOS and your chroot by using ctrl+alt+shift+"back arrow" and ctrl+alt+shift+"forward arrow".

I'm in the same situation.
Actually the problem is that once you logged out for the first time, the desktop doesn't work anymore after typing startgnome or any command for other desktop.
The startgnome script does run and pulled up the desktop, but it exit after the cursor showed up for about 1 second on the black screen. All seems like that the "logout" button has been automatically pressed.


Add "Show Password" toggle button to password input field

Description:
We need to enhance the user experience by adding a "Show Password" toggle button to the password input field. This feature will allow users to toggle the visibility of their password, improving accessibility and usability, especially for users who might have difficulty typing or seeing their passwords correctly.
Current Behavior:
The password input field hides the entered password by default.
Users cannot view the password they are typing.
Expected Behavior:
A toggle button (e.g., an eye icon) will be added to the password input field.
Clicking the toggle button will switch between showing and hiding the password.

would like to work on it myself as well


Images_to_samples.py (hdf5s) --> data_to_tiles.py (tiles as tifs and geojsons)

Features

CRS mismatch automatic handling
Resize image to new spatial resolution (ex.: 50cm to 25cm)
Don't rewrite tiles for an image that has all expected tiles
Crop geopackage to geojson (don't burn right away)
Input a csv directly (rush mode)
Input an image directly (for inference if pre-tiling is preferred?)
Parallelize tiling

Where to write tiles?
data_path / experiment_name / samples_folder_name ?
ex.:
geo_deep_learning/data/geobase_buildings/tiles_3bands_minannot1
How to deal with CRS mismatch?

to be discussed...

Onboarding solaris

How to integrate necessary solaris' utils?
1st attempt

Suggested logic for data_to_tiles.py

Suggested class structure for use in data_to_tiles.py

Seeing comments from team members on Slack and Github, seems like this issue needs further discussion.
I suggest starting from a pros/cons table, then discussing it in a meeting based on this table.

Tiling approach
Pros
Cons

HDF5
*

Plain .geotiff/.geojson

*This type of table that expects a list of items is much easier done with Google Doc than Markdown

@victorlazio109 , @mpelchat04 , @ymoisan , @CharlesAuthier, please add/review the following Google Doc "Pros and Cons" table. This will serve as a basis for discussing the relevance of this PR and overall transition away from HDF5s.


Suggestion: Update best practice Fire-And-Forget example to use AsyncScope

I think the usage of AsyncServiceScope should be encouraged in this example, given that the example shows usage of resolving a service that implements IAsyncDisposable.
I realize there is some documentation elsewhere in this repository referencing IServiceScope and I don't think there are other places referencing AsyncServiceScope, so this could be a little misleading/incohesive.

Hello @jufa2401 ... We prefer an issue for a change like this for a couple of reasons ...

It will ping the author and maintainer of the example.
There might be text changes required to go along with the change(s).

Can you open an issue from the bottom of ...
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/best-practices?view=aspnetcore-8.0
... using the Open a documentation issue link?
After the issue is opened, add a remark in your opening comment :point_up: with a "fixes" for the issue number ...
Fixes #........

Hello @jufa2401 ... We prefer an issue for a change like this for a couple of reasons ...

It will ping the author and maintainer of the example.
There might be text changes required to go along with the change(s).

Can you open an issue from the bottom of ...
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/best-practices?view=aspnetcore-8.0
... using the Open a documentation issue link?
After the issue is opened, add a remark in your opening comment ☝ with a "fixes" for the issue number ...
Fixes #........

Thank you, will do 👍

@jufa2401  looks like a nice improvement.


No Touch ID prompt

I am not getting a touch ID prompt to scan my finger on iOS when retrieving a value stored using the touchID: true option. Any idea why that may be occurring? I am seeing the same behavior on the example app as well.

This only occurs when running the app on the iOS simulator. Closing.


CI:ECL: load with :verbose and :print options writes text of file unsafely

For the new prime-factors example I implemented a factorization wheel with a circular list. This became an issue with the ECL tests because ECL's load with :verbose and :print set to true (or possibly just one of those), like we use by default, prints the file to the screen, but does so with *print-circle* left at nil. If the file contained a circular list load would never finish.
This could be seen as a bug in ECL but I would like to come up with a work-around. It might be enough to set *print-circle* to t in xlisp-test. Before I download ECL and start tinkering with it, what do you think about this?
Failing job: https://travis-ci.org/wobh/xlisp/jobs/82872525

That sounds like an interesting implementation and I'd love to see it. (It does sound like it might go against my "don't be clever in example.lisp" pseudo-rule though...)
If setting *print-circle* to nil fixes it then do it in xlisp-test - perhaps under a feature test for ECL.

Let me know if you think it's too clever.
https://github.com/wobh/xlisp/commit/198213441c88b0257f52609d312d2b9887ee4a67
I also added a bunch of tests.

It's definitely ECL's load with the :print option and setting *print-circle* to t makes it work as expected. Reviewing the spec for *print-circle* http://l1sp.org/cl/*print-circle* it seems like it would be fine to set it to t generally, and perhaps even a good idea.

A passing build: https://travis-ci.org/wobh/xlisp/jobs/83063702
I have two ideas here based on the same foundation.
First add some constants to label the verbosity levels. This takes care of an irksome remainder I decided not to do initially for some reason, but also makes distinguishing the two solutions a easier.
Solution 1. Set *print-circle* to t in the lexical scope of load-package. This is a minimal typing solution and the passing build above is the prime-factors exercise rebased onto that branch. At the bottom you can see the circular list printed correctly. The rationale here is that whatever the load outputs, it should be safe, so just set it to t and be done.
Solution 2. Set *print-circle* to the outcome of (verbosity-p +debug+) in the lexical scope of load-package and set the load :print argument to the same. This is a minimal effect solution, observing that the extra output of load with :print is not strictly desirable for general testing, and *print-circle* doesn't need to be any value not required.
I prefer solution 1 for the time being, but I think considering what solution 2 does for us is worth thinking about more generally. If/when we find another place to set *print-circle* to t or have to set it's dynamic value in test-exercises we can do so by verbosity level required with verbosity-p.

I agree - it looks like setting *print-circle* to t is a good idea. It is a good thing for a testing harness to do - given that there may be circular data - we'd want the harness to be able to handle and report on that without it having its own problems.
I go with solution 1. If we tied it to verbosity then we should consider the other *print-x* settings which might also be needed/useful. But I think the simpler approach is better for now.


explicitly states it's bytes being downloaded in get_data.py

Here we can explicitly states it's bytes being downloaded

@JTarakRam looks like this was already fixed and merged here: https://github.com/refuel-ai/autolabel/pull/361
going to close this PR, but can reopen if needed.


Can't get resource pack. Can i get some help please?

"Can't get resourcepack" as in it won't download? That's a little odd as Github is usually very reliable. You can always try an alternative source like Planet Minecraft or Curseforge.

Sorry forgot I needed it in the rescorces folder my bad


Issue while following sanic motor example

Traceback
2017-05-26 14:22:13 - (sanic)[ERROR]: Exception occurred while handling uri: "http://<IP_ADDRESS>:1230/write"
Traceback (most recent call last):
  File "/home/sreenadh/Projects/Sanic_tests/hello/.hello/lib/python3.5/site-packages/sanic/app.py", line 471, in handle_request
    response = await response
  File "/usr/lib/python3.5/asyncio/coroutines.py", line 124, in throw
    return self.gen.throw(exc)
  File "app.py", line 18, in write_db
    obj_id = await client.hello.write_col.save(data)
  File "/usr/lib/python3.5/asyncio/futures.py", line 361, in __iter__
    yield self  # This tells Task to wait for completion.
RuntimeError: Task <Task pending coro=<Sanic.handle_request() running at /home/sreenadh/Projects/Sanic_tests/hello/.hello/lib/python3.5/site-packages/sanic/app.py:471> created at /home/sreenadh/Projects/Sanic_tests/hello/.hello/lib/python3.5/site-packages/sanic/server.py:185> got Future <Future pending cb=[_chain_future.<locals>._call_check_cancel() at /usr/lib/python3.5/asyncio/futures.py:431]> attached to a different loop

I have just started using Sanic, and I actually find it ver good, since am a big fan of Flask and simplicity that it gives. So I was following the same way as mentioned in the sanic_motor.py to test out writing some simple data from a POST request. i.e.:
def get_client():
	from motor.motor_asyncio import AsyncIOMotorClient
	client = AsyncIOMotorClient("mongodb://user:password@localhost:27045")
	return client
.
.
.

@app.route('/write',methods=['POST'])
async def write_db(request):
	data = request.json
	client = get_client()
	obj_id = await client.hello.write_col.save(data)
	return response.json({ 'status':True, 'id':str(obj_id) })

Am I doing something wrong here?
Can anyone comment on this! :thinking:

Motor client need to use same ioloop as sanic. You can initialize ioloop by yourself or get it from framework.

Thanks for the quick reply :+1:
def get_client():
	from motor.motor_asyncio import AsyncIOMotorClient
	from sanic import app
	client = AsyncIOMotorClient("mongodb://rootuser:passme123@localhost:27045",io_loop=app.get_event_loop())
	return client

I changed the get_client() as this, and everything worked as expected. So is this the correct way?
Also, one doubt about calling the client function each time we need to access DB, is that a proper way to do it( I followed the example to test as such before digging around), or would it be better to define the client as a constant at the top along with app = Sanic(__name__)?

@sreecodeslayer I think it would be better to define constant at the top because it is calling it outside of the event loop.

Sitting inside a function handler that is.

Solution was provided and worked: https://github.com/channelcat/sanic/issues/749#issuecomment-304239758. Please close this issue.

I have tried the solution they comment but it is making connections all the time without reusing the previous ones, right?
It would not be easier to do this:
@app.listener('before_server_start')
def init(sanic, loop):
    global db
    from motor.motor_asyncio import AsyncIOMotorClient
    mongo_uri = "mongodb://<IP_ADDRESS>:27017/test"
    db = AsyncIOMotorClient(mongo_uri)['test'

So you can reuse the connection and the result of the requests is quite faster:
get_db()
Requests/sec:    580.71
Transfer/sec:     73.16KB

before_server_start
Requests/sec:   2174.00
Transfer/sec:    273.87KB

This is exactly the technique I was searching for. Solves my doubt regarding the efficiency of using the method over and over again.
Great one.

Would @kianxineki solutions work inside a blueprint scope? Like lets say I want to use the "db" object across blueprints so every blueprints can access a different database collection but doesn't need to create a new connection.

@andreheringer
I think I could do something similar to this:
models/__ init__.py
from motor.motor_asyncio import AsyncIOMotorClient

mongo_uri = "mongodb://<IP_ADDRESS>:27017/test"
db = AsyncIOMotorClient(mongo_uri)['database']

so you can do this anywhere
from models import db

does anyone on this thread have a public repo with some example code around this?
i have decent experience with node/express/mongo, but just new to python/sanic and some example code would be a big help to see some idiomatic patterns. any references appreciated!

@kianxineki would the above specifically need to use the io_loop trick from above like so?:
from motor.motor_asyncio import AsyncIOMotorClient
from sanic import app

mongo_uri = "mongodb://<IP_ADDRESS>:27017/test"
db = AsyncIOMotorClient(mongo_uri, io_loop=app.get_event_loop())['database']

from what i'm reading above, i thought motor need to be connected to sanic by event-loop and i don't see it in your sample, or are you making that "connection" elsewhere...?

does anyone on this thread have a public repo with some example code around this?
I happen to have a repo that is quite old by now, you could still take a look at it Sanic Todo and relatively a new one, incomplete, having issues with Peewee and its orm. So its kinda dormant now.


Skip dependee RAR resolvers for externally resolved references

Depends on #2716.
Whenever RAR tries to resolve a reference, it first looks for [winmd, dll, exe] files in all the dependee directories before using the input search paths. However, if a reference is marked as being resolved externally, RAR should not make assumptions and just use the provided search paths.
This shaves off about 500ms of total RAR time in Roslyn.

@nguerrera

I've rebased this on master, ready to review / merge.

@dotnet-bot test this please


Any way to pass the Latent couple settings through automatic1111 API?

I'm using automatic1111 API to call txt2img/img2img process and would like to take the advantage of Latent couple extension. But have no idea how to pass the settings to the extension through API.
Need some help if possible,
Thanks a lot!

I'm stuck in the same boat, Did you find a solution?

I also want to integrate the functionality of Latent Couple with other applications, but I cannot find any relevant documentation for the Restful API. Does anyone have any clues? Thank you.

It seems I found a way to make it work: in a recent commit "alwayson_scripts" field was added in the API payload options. You can add the name of the extension and list its arguments, like this for example:
"alwayson_scripts": {'Latent Couple extension':{"args":[True,
                                                      "1:1,1:2,1:2",
                                                      "0:0,0:0,0:1",
                                                      "0.5,0.8,0.8",30]}}

To find the arguments and title for the script I had to check the source code,
"title" field in the Script class of the extension source code,
and to get arguments check "process_script_params" function.


[Remove Free Workspace Creation] Make all Collect Policies Created From NewDot Accessible In NewDot

Coming from the design doc section here
Update api.php to set the isPolicyExpenseChatEnabled param to true here
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~01b3d619776771ca87
Upwork Job ID:<PHONE_NUMBER>271715840
Last Price Increase: 2024-02-23

As this was a Web-PR and it hit prod 2 days ago, can we close this issue?

Yep!

@GandalfGwaihir I took a look at that commend. Are you saying that when you create a new workspace in NewDot, it is not being returned with isPolicyExpenseChat enabled?
cc @dangrous

OK, that's a shame. I've pinged the backend engineers to have them look into it and see what might be going on. cc @Gonals @dangrous

I didn't work a lot on setting this, but I think this may be somewhat expected behavior. If we look at the isPolicyExpenseChatEnabled function in PHP, we see it returns true if isPolicyExpenseChatEnabled is set OR the workspace  is free. I believe we do not set isPolicyExpenseChatEnabled for free workspaces at all.

Actually we are creating Collect Policy with this PR, and we want isPolicyExpenseChatEnabled to be true :)

Ah, gotcha!
Looking at the flow in the backend, we seem to set the isPolicyExpenseChatEnabled flag to true... just to pass it back to onyx, but I'm fairly sure we are not correctly storing it in the DB. This would be consistent with the behavior you are seeing (initially set to true, but resets to false shortly afterwards).
I can create a quick PR to try to fix it

Any updates on the PR @Gonals ?

It is currently in staging


npm run build:flow fails on not finding registry.json

I wanted to try out the new flow parser, but executing the npm run build:flow fails, running on tag 0.4. All other parsers work fine with my .env config.
npm run build:flow

><EMAIL_ADDRESS>build:flow
> npm run clean --silent && npm run generate --silent -- --format=flow

[1/3] 🔎 Fetching data from AWS...
[2/3] 🧑🏻💻 Generating format for desired tool: flow ...
e [Error: ENOENT: no such file or directory, open '/home/aki/src/github/eventbridge-atlas/src/parsers/flow/src/lib/data/registry.json'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/aki/src/github/eventbridge-atlas/src/parsers/flow/src/lib/data/registry.json'
}

Thanks @hanninen I will check it out and see what's going on, will report back 👍

Cool found the issue @hanninen
If you pull latest should be fixed, let me know if it works 👍

Thanks @boyney123 for the quick fix, managed to generate the docs with the flow parse.


Rock Paper Scissor Game Extension

Is your feature request related to a problem? Please describe.
The feature request aims to provide entertainment and engagement for users who want to play the classic game of Rock Paper Scissors without leaving their web browsing experience.
Describe the solution you'd like
I'd like to create a Rock Paper Scissors game extension using JavaScript that users can integrate into their web browsers. The extension should provide a simple interface where users can choose their move (rock, paper, or scissors) and compete against the computer.
Describe alternatives you've considered
An alternative solution could involve embedding a Rock Paper Scissors game directly into web pages using JavaScript. However, creating a browser extension would offer the advantage of accessibility across different websites and platforms, allowing users to play the game wherever they are browsing.
Additional context
This feature is aimed at providing a fun and interactive experience for users during their web browsing sessions. It's a light-hearted addition that can help pass the time and add some enjoyment to the browsing experience.
What problem is this feature trying to solve?
The feature is trying to solve the problem of boredom or monotony during web browsing sessions by offering users a simple and entertaining game to play without leaving their current webpage.
How do we know when the feature is complete?
The feature can be considered complete when the Rock Paper Scissors game extension is successfully integrated into popular web browsers, functions smoothly without any bugs or glitches, and provides a satisfying user experience. Additionally, the extension should offer options for customization, such as different difficulty levels or game modes, to cater to a wide range of users.

80% Code done


Cannot set border width

Hi,
I tired to set border width by set option bellow
                    array('data' => $data, 'label' =>'Jumlah')+$colors[$color_index], 'borderwidth'=>1,
                    );

Then i got this link : https://jsfiddle.net/kewmh8w0/   but confuse to implement in your code framework
Thanks in advance

Hi,
It works! thanks


Explicitly return TimeoutError on WebSocketResponse.close() (#1084)

What do these changes do?
Revises WebSocketResponse.close() patch by explicitly returning TimeoutError with close code 1006 in #1084 for #1002.
Are there changes in behavior for the user?
Nothing.
Related issue number
#1002
Checklist

[x] I think the code is well written
[x] Unit tests for the changes exist
[ ] Documentation reflects the changes

Current coverage is 97.62% (diff: 100%)

Merging #1089 into master will increase coverage by <.01%

@@             master      #1089   diff @@
==========================================
  Files            28         28
  Lines          6429       6432     +3
  Methods           0          0
  Messages          0          0
  Branches       1094       1094
==========================================
+ Hits           6276       6279     +3
  Misses           81         81
  Partials         72         72

Powered by Codecov. Last update 2269068...6a07366

I have fixed the branch according to your comments and rebased!
...ough... forced push has made your comments invisible... 😢

Thanks!


[Feature]: Infer form validation from HTML5 attributes?

What is the new or updated feature that you are suggesting?
When writing a form using the uppercase Form tag, you rely on HTML semantics for submitting the form by default, and need very little code to do so.
But then when you have to validate inputs - extremely common and very good advice - you have to write your own function. Really?
If we can infer the data model being sent from the inputs, we could infer the validation required simply by putting HTML5 attributes on the relevant input tags. Then just as the browser will block submission when inputs are invalid in real-time on the client (and we can attach CSS to this), so too can the server which created the HTML for the form look at the form’s HTML to infer what the validation should be - which fields are required, min and max length, regex matching, and so on. By default, https://developer.mozilla.org/en-US/docs/Learn/Forms/Form_validation could be validated server-side, and if such validation isn’t desired it could be turned off with an attribute on the Form tag, perhaps.
Bonus points if we can use the input type to validate and parse inputs to other native JavaScript objects, e.g. type=checkbox to boolean (assuming there’s no value attribute set), type=month, type=time, etc.
Extra bonus points if smart input fields exist to handle serialization from array to input then back to array, or if there’s a common approach for creating custom input fields that can validate in a similar way to Rails form input flexibility and built in support for per-field error messaging. Folks might not remember this but 37signals wrote the book on form error handling before they built Rails, and a lot of know-how (pre-HTML5) went into form validation in Rails as a result :)
Why should this feature be included?
It’s not acceptable to compromise on usability or accessibility by delivering sub-par input validation client side. You should whenever possible use HTML attributes to express whether a form/input is valid or not. And if a rule can be expressed within the confines of html client side validation, then for simplicity’s sake, we shouldn’t reinvent the wheel, we should use the attributes in HTML to perform the validation. If the data model lives in the form HTML, then the validation should too, if simple enough.

Instead of writing your own functions you could rely on something like ZOD do to the work for you. With the power of typescript you can also make this DevX quite nice. See below:
Create function to parse form from and comply with zod schema
import { ZodObject, ZodRawShape } from "zod";

export default function useFormData<T extends ZodRawShape>(
  form: FormData,
  inputSchema: ZodObject<T>
) {
  const keys = Object.keys(inputSchema.shape);
  let returnObject: Record<string, any> = {};
  keys.forEach((item) => {
    returnObject[item] = form.get(item);
  });

  return inputSchema.parse(returnObject);
}

Use this function as follows routes/login.ts

const LoginObjectSchema = z.object({
  username: z.string(),
  password: z.string().min(5),
  redirectTo: z.string().optional(),
});

// Create a response model
export const action: ActionFunction = async ({
  request,
}): Promise<Response | any> => {
  const form = await request.formData();
  const { username, password, redirectTo } = getFormData(
    form,
    LoginObjectSchema
  );
 // ... Not needed in example
};

export default function Login() {
  const [searchParams] = useSearchParams();
  return (
    <Form action="/login" method="post">
      <input
        type="hidden"
        name="redirectTo"
        value={searchParams.get("redirectTo") ?? undefined}
      />

        <input type="text" name="username" required />

        <input type="password" name="password" required />

      <button type="submit">Log In</button>
    </Form>
  );
}

Note: This solution may not be exactly what you were asking for but it is defo a better approach than the example given in the docs

Interesting. But yeah, my ask is more like being able to say:
export default function Login() {
  return (
    <Form action="/login" method="post">
        <input type="text" name="username" required />
        <input type="password" name="password" required minlength="5" />
      <button type="submit">Log In</button>
    </Form>
  );
}

And have the following get generated automatically from the above function, perhaps with something like const LoginObjectSchema = formToZod(Login); or that at some later step, the Form can look at its rendered children to infer the data model or schema. For example, maybe Form could use https://github.com/grrowl/react-keyed-flatten-children or similar to see what input children it has, in a similar way to how React-Router can use children to know what routes have been provided to the router.
// What I don't want to have to write:
const LoginObjectSchema = z.object({
  username: z.string(),
  password: z.string().min(5),
  redirectTo: z.string().optional(),
});

My guess it there would need to be some serverside magic happening here as if you were to generate it on the client side anyone could theoretically change your input validation.  I completely understand why you'd want what youre asking for - but looking from the outside in it could potentially be a massive pain to implement.
If you have any ideas for the approach im happy to take a look.

There's already server-side magic happening for routing... if we can process JSX server-side for:
<Route path="/" element={<App />}>
  <Route path="sales" element={<Sales />}>
    <Route path="invoices" element={<Invoices />}>
      <Route path=":invoice" element={<Invoice />} />
    </Route>
  </Route>
</Route>

E.g. this would be an awesome way to write a login form:
const LoginForm = ({fields}) => (
<Form fields={fields} onValidSubmit={loginFunction}>
  <TextInput name="username" required {...fields.username}>Username</TextInput>
  <PasswordInput name="password" required minLength={5} {...fields.password}>Password</TextInput>
</Form>
);

Where fields might be something like the current state of the form
{ "username": {
  value: "current value from a form submit with errors...",
  errors: ["Error 1", "Some other error message"]
}, "password": {
  value: "",
  errors: ["cannot be left blank"]
} }

FormBuilder({
  username: {label: "Username", required: true},
  password: {label: "Password", required: true, minLength: 5,
  buttonText: "Login"
});

It's too abstract from the HTML it generates later, after all. At that point, might as well build a model object because that's what you're describing, with the exception of the labels.

Yeah i feel like if we're at this point - using zod or any sort of schema validation may as well be implemeneted. :/ Sorry for taking this issue slightly off topic - Just wanted to share my approach to solving a simular sort of issue


Improve support for alternative container runtimes

In several cases, alternative container runtimes offers a docker compatible API and populates the docker context accordingly.
However, in the current implementation of testcontainers, the context is often ignored as the EnvironmentAndSystemPropertyClientProviderStrategy only considers the DOCKER_HOST override either through testcontainers property or the environment variables.
Improve the support of multiple container runtimes by honoring the current docker context.
In addition, improve the detection of whether the Docker engine runs in a virtual machine without root access for the current user, so it removes the need to configure TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE in standard cases.
This change has been tested with:

colima
rancher desktop (in non-privileged mode)
docker desktop
orbstack

Thanks for your contribution, @tjamet. Can you please run ./gradlew spotlessApply? or give me access to update the branch, please.

@kiview I've updated the PR taking your thoughts into considerations.
From my trials, the default behaviour for rootless docker containers is to create the docker socket inside XDG_RUNTIME_DIR (usually /var/run/${userID}, while mac os desktop providers creates the socket inside the user home directory.
Both initialised the Docker context.
This means that it is likely that most of the RootlessDockerClientProviderStrategy and DockerDesktopClientProviderStrategy start to use the EnvironmentAndSystemPropertyClientProviderStrategy.
This is what I see on a linux machine:
docker context ls
NAME         DESCRIPTION                               DOCKER ENDPOINT                     ERROR
default      Current DOCKER_HOST based configuration   unix:///var/run/docker.sock
rootless *   Rootless mode                             unix:///run/user/1000/docker.sock

ls -al /run/user/1000/docker.sock
srw-rw---T 1 thibault thibault 0 Sep 25 09:52 /run/user/1000/docker.sock

And on a mac one:
docker context ls
NAME                DESCRIPTION                               DOCKER ENDPOINT                                            ERROR
colima              colima                                    unix:///Users/thibault.jamet/.colima/default/docker.sock
default             Current DOCKER_HOST based configuration   unix:///var/run/docker.sock
desktop-linux       Docker Desktop                            unix:///Users/thibault.jamet/.docker/run/docker.sock
orbstack            OrbStack                                  unix:///Users/thibault.jamet/.orbstack/run/docker.sock
rancher-desktop *   Rancher Desktop moby context              unix:///Users/thibault.jamet/.rd/docker.sock

ls -al /Users/thibault.jamet/.rd/docker.sock
srw-------  1 thibault.jamet  staff  0  9 Sep 13:19 /Users/thibault.jamet/.rd/docker.sock

With this in mind, I changed the approach to consider the socket is virtualised only if it is a unix socket inside the home directory
The previous change checking the user ID would indeed break the rootless Docker approach

/windows-test

/windows-test


Update README.md, added config instructions for windows

Hello,
When using sublime text windows, we have to change 2 lines in the config file: node_executable_path and global_node_modules_path
This will be helpful for new people who are using this plugin for web dev.

Thank you! Sorry for the delay, I completely forgot about this.


By default, log only to stderr, and not to disk.

This fixes a common problem when running under VS Code, the user doesn't have permissions to create a log directory in the CWD.
The old behavior can be re-enabled by setting RA_INTERNAL_MODE=1
Fixes #282

Nit: can you not do the match statement as
if std::env::var("RA_INTERNAL_MODE“) == Ok(“1“){
   ...
}

? I might be wrong, and can't check atm

Ah, well we don't really care about allocations in ra_lsp_server.
Anyway, here's the tracking issue for the api that would allow this easily. https://github.com/rust-lang/rust/issues/50264 .

bors r+
Thanks!

Actually, I think we can also do
let var = std::env::var("RA_INTERNAL_MODE“);
if var.map(Deref::deref) ==Ok("1"){
   ...
}


fixes #4285 -- allow full-path to pymodule with nested declarative modules

Hmm, how would expanding the macros eagerly work? Handling the variety of different forms a user can write this in is... expansive. (A user can use pyo3::prelude as foo; which this PR obviously doesn't handle.)

Are there other pieces you'd like here besides expanding to pyfunction/pyclass?

I think that's just it, I see you solved the Path complication above 👍
The eager expansion / unlimited forms of use imports can be problems for the future.

Will add support for those after work today. Thanks for the review
On Tue, Jul 2, 2024, 9:15 AM David Hewitt @.***> wrote:

I think that's just it, I see you solved the Path complication above 👍
The eager expansion / unlimited forms of use imports can be problems for
the future.
—
Reply to this email directly, view it on GitHub
https://github.com/PyO3/pyo3/pull/4288#issuecomment-2203129364, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAAGBGKNVKA5AIDT53ZPC3ZKKRWPAVCNFSM6AAAAABJ5BGK2CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBTGEZDSMZWGQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

Ok, added!


Add the ability to open a modal by default

By adding the attribute data-modal-show="true" to the modal div will open the modal by default.

Thanks, @csoutham! Will be released under v1.4.4.

Hello I cannot seem to be able to use that feature and cannot find any documentation on the matter
I tried
<!-- Button to trigger the modal -->
<button data-modal-target="myModal">Open Modal</button>

<!-- Modal -->
<div id="myModal" data-modal-show="true">
<!-- Modal content -->
</div>

But it gives me the following error "Modal with id true does not exist. Are you sure that the data-modal-show attribute points to the correct modal id?"
May it be that the latest releases throw an error on that feature ?

@lucie1704 Looks like this feature was removed in https://github.com/themesberg/flowbite/commit/96e843b48fea33ba32501a4fc4f1970b33cb79e5 and data-modal-show now serves a different purpose.


[move core modules] events for mint, burn, preburn, cancel_burn

Getting closer to production-like mint/burn flows!

Add events for each of mint, burn, preburn, and cancel_burn. These events are only emitted for reserve-backed stablecoins (i.e., Coin1, Coin2 for now), not for synthetic coins like LBR. The reason is that creating/destroying reserve-backed coins is a privileged operation, but anyone can create/destroy LBR.
Add a BurnCapability (allocated to the 0xA550C18 account, just like the MintCapability) and require it to burn. Previously, the holder of the MintCapability also had permission to burn.

To make this work, I had to make some unrelated tweaks:

The genesis setup initializes the CurrencyInfo for Coin1 and Coin2 (which now require event streams created by 0xA550C18) before it creates the 0xA550C18 account. It needs to be this way because account creation depends on Coin1 and Coin2 existing... To fix this, I added somewhat of a hack to give 0xA550C18 the ability to create event streams before its account is created. This hack is limited to two local changes in the Event module that can only be used in genesis. Tim and I brainstormed several ways to mitigate this and concluded that this one is ugly, but not fragile (unlike the other solutions we considered). Added a TODO for thinking of a better approach sometime in the future...
All of the existing mint/burn/preburn/cancel_burn tests used LBR. I switched them to use Coin1 because minting/burning of LBR isn't privileged and doesn't emit events.
I had to add max-gas and gas-price directives to many of the functional tests I touched because gas costs are now much higher and we don't yet support collecting tx fees in non-LBR currencies.

Motivation
See above.
Have you read the Contributing Guidelines on pull requests?
Y
Test Plan
New tests to check that events are emitted at the appropriate times.

Awesome! (side note: it's safe to assume that LBR cannot be minted or burned, so it's absolutely ok to build these for reserve-backed stablecoins only)

0xA550C18 is a generic 'association account', right?
Can we create separate account in genesis for burning and give association account capability to rotate its key?
Separate account is needed because we will rotate key of this account to the key of HSM (and probably don't want to rotate master association key, as it is used for minting and reconfiguration which is not yet supported in HSM)

Can we create separate account in genesis for burning and give association account capability to rotate its key?

Yep, that makes a ton of sense. Now that we have a BurnCapability, we can change the genesis setup to

create a burn account (eager to hear creative hex suggestions for address. 0xD1E is the best I can come up with)
give the BurnCapability<CoinType> for each CoinType to 0xD1E
delegate 0xD1E's KeyRotationCapability to A550C18

once this PR lands.

I can take a stub at creating separate account with your help :)

@bors-libra r=tzakian

:pushpin: Commit 6d0150a has been approved by tzakian

:hourglass: Testing commit 6d0150ab427096ecb28e5f873888b572ca6d3385 with merge fe9253caa611faf71667f9125be49c0101ebb395...

:sunny: Test successful - checks-actions_land_blocking_test, checks-circle_commit_workflow
Approved by: tzakian
Pushing fe9253caa611faf71667f9125be49c0101ebb395 to master...

Totally unrelated question: is there some hidden rule behind the special addresses like 0xD1E or 0xA550C18? (I was playing with kabbalah numerology for these but didn't find anything)

Totally unrelated question: is there some hidden rule behind the special addresses like 0xD1E or 0xA550C18? (I was playing with kabbalah numerology for these but didn't find anything)

Haha no hidden rule other than trying to write descriptive human-readable addresses in hex... @phlip9's 0xD15C0 for the discovery set is my favorite so far


Respond to UX feedback on resolved/unresolved comments

Part of #127473

@laurentlb, @rebornix, and @isidorn FYI.

Thanks a lot!
@alberto, please see the UX feedback
(cc @hermannloose)


test: add new test to check for stable version support

Description
Issue : https://github.ibm.com/GoldenEye/issues/issues/6660

Release required?

[x] No release
[ ] Patch release (x.x.X)
[ ] Minor release (x.X.x)
[ ] Major release (X.x.x)

Release notes content

Run the pipeline
If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.
Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:
/run pipeline

Checklist for reviewers

[ ] If relevant, a test for the change is included or updated with this PR.
[ ] If relevant, documentation for the change is included or updated with this PR.

For mergers

Use a conventional commit message to set the release level. Follow the guidelines.
Include information that users need to know about the PR in the commit message. The commit message becomes part of the GitHub release notes.
Use the Squash and merge option.

/run pipeline

@Aashiq-J what's the need to have CloudInfoService for every test? Except for the one you just added to check the supporting versions.
Also, rather than repetitive code, maybe add setUpOptions code block which contains all the common info for the tests?

@toddgiguere suggested to use a common CloudServiceInfo for all the test. Now for every test we are creating a new obj of CloudServiceInfo.
With this line CloudInfoService: sharedInfoSvc, we are telling all the test to use a single common obj of the CloudServiceInfo

/run pipeline

@shemau ,
We are running only RunTestPlan because, when we run the terraform plan itself the variable validation will throw an error if the version is supported or not and a full terraform apply and destroy is not required.


Allow @Builder on instance methods

This is a simple extension to allow @Builder on instance methods using an inner class for the builder class.
Alternatively, it could be implemented by adding an instance field to the builder class, that would make possible (with a few additional changes) to use have the builder declared in an interface.
For example:
class UserService {
	@Builder
	public User createUser(String firstName, String lastName) { ... }
}

Turns into:
class UserService {
	public class UserBuilder {
		private String firstName;
		private String lastName;
		public UserBuilder firstName(final String firstName) { this.firstName = firstName; return this; }
		public UserBuilder lastName(final String lastName) { this.lastName = lastName; return this; }
		public User build() {
			return UserService.this.createUser(firstName, lastName);
		}
	}
	public User buildUser() {
		return new UserBuilder();
	}
	public User createUser(String firstName, String lastName) { ... }
}

This looks great. Well done! Roel was particularly enamoured by the inclusion of some unit tests :+1:
We need three more things before we can accept this pull request:

Add your name to the AUTHORS file in the root of the project. To cover our legal behinds, we need you to do this one.

We forgot to perform a check that is now more necessary: When the Builder class already exists, we should check if it is as static as we want it to be, so, for instance method builders it should NOT be static (generate an error if it is explaining the problem, and stop generating code), and for all other builds it SHOULD be static (alternatively, the generated builder() method should not be static, then it'll work out, but I'm not sure if we should set that precedent. Up to you, that's the advantage of contributing a pull request!). If you don't have time for this right now, we can pick this up if you prefer.

The feature page docs on website/features/Builder.html needs to be updated. We can do this if you prefer.

Thanks again!

Thanks @rzwitserloot, I'm glad the PR is well received.
I performed those three changes you mentioned. However, I'm still unconvinced that Builders for instance methods should be non-static classes and not simply static classes with an explicit reference to the outer class given to it's constructor. The reason is that I'd like this to also work for interfaces and it is not possible to define non-static classes inside interfaces (afaik). I understand this isn't particularly useful right now because the builder method is always defined (and will fail with "interface method cannot have a body"), but with a few additional changes:

For Java >=8 the builder method could be fully defined using a default method.
For Java <8 the builder method could be left undefined and the implementor could define it manually, or with an annotation on the original method implementation (or combination of @Builder and @Override? not sure).
Given this, it might be good to have builders defined consistently regardless of the @Builder being placed in an interface or in a class method.

What do you think?

hi @rzwitserloot, any comment on this?

Working on it now as part of the big builder update.

:+1: sounds great. please consider the inheritance case I described. thanks!


[FLINK-9794] [jdbc] JDBCOutputFormat does not consider idle connection and multithreads synchronization

What is the purpose of the change
This pull request fix bugs in original implementation of JDBCOutputFormat, which does not consider idle connection and multithreads synchronization .

The Connection was established when JDBCOutputFormat is opened, and will be used all the time. But if this connection lies idle for a long time, the database will force close the connection, thus errors may occur.
The flush() method is called when batchCount exceeds the threshold, but it is also called while snapshotting state. So two threads may modify upload and batchCount, but without synchronization.
We don't need synchronization here, because there is already synchronization in StreamTask.

Brief change log

Using a Timer to test the jdbc connection periodically and keep it alive
Add synchronization for batch operation

Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): (no)
The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
The serializers: (no)
The runtime per-record code paths (performance sensitive): (no)
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
The S3 file system connector: (no)

Documentation

Does this pull request introduce a new feature? (no)
If yes, how is the feature documented? (not applicable)

Hi @sihuazhou snapshots are executed in a separated thread, you can check this : https://github.com/apache/flink/blob/53e6657658bc750b78c32e91fa7e2c02e8c54e33/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java#L1212

Hi @jrthe42, In general the checkpoint include two part of works.

part1: take a snapshot of the state.
part2: transfer the snapshot to the checkpoint destination(e.g. DFS)

The part1 need to be sync, and the part2 can be async, if I'm not wrong.

Hi @sihuazhou , I am not familiar with the checkpoint mechanism of Flink, and I check the source code again.
Although the RichSinkFunction#invoke() and RichSinkFunction#snapshotState() are not executed in the same thread, but there is already synchronization mechanism in StreamTask. StreamTask use a checkpoint lock object to make sure they won't be called concurrently. Check StreamTask#performCheckpoint() and StreamInputProcessor#processInput() if you want to know more.
Thanks for your comment, I removed synchronization here, and this PR is updated. cc @yanghua

@sihuazhou is right and reviewed, +1 from my side

@jrthe42 Hi, thanks for your PR.
From my side, I think use a connection pool to solve the connection problem is a better way. We don't need to keep the connections all the way. It wastes the connection resources if most threads have been idle for a long time. Also, the connection pool will not bring extra cost if threads are busy writing data into database, since the connections in the pool will be reused.
I googled just now and find the MiniConnectionPoolManager  descriptions here.  Maybe we can use it.
Best, Hequn

Hi @hequn8128, I agree with you that a connection pool is more effective using connection resource. I didn't choose connection pool because that will introduce new dependencies, and I'm not sure if that tradeoff is acceptable. I will check MiniConnectionPoolManager  to see if it's a better way.


[TF 2] Expose tf.layers as alias for tf.keras.layers

cc #26176

In In https://github.com/tensorflow/tensorflow/issues/26176, @MarkDaoust said that:

I think this is the plan. It's just not quite implemented yet.

It's been some time since then, so I thought I'd go ahead and send the PR. Let me know if anything needs changing!

There was a discussion around making this change and the summary was that this change will break checkpoints and also there are default arg value differences between tf layers and keras layers. We do not want to make this change at this point is my understanding.


v1.13 Backports 2023-03-14

[ ] #24132 (@ysksuzuki)
[ ] #24336 (@ti-mo)
[ ] #24343 (@alan-kut)

Once this PR is merged, you can update the PR labels via:
for pr in 24132 24336 24343; do contrib/backporting/set-labels.py $pr done 1.13; done

or with
make add-labels BRANCH=v1.13 ISSUES=24132,24336,24343

/test-backport-1.13

/test-1.26-net-next

k8s-1.26-kernel-net-next  failed due to vm provisioning issue :thinking:

/test-1.26-net-next


Help using this...

Hey this is a greate project! I set this up and it runs but I can't seem to ask any questions? I'm using Firefox - am I doing something wrong? When I press enter after asking a question nothing happens...Any help appreciated

Did you create a .env file in the client directory with your API key in it? Inside the file you will want to have a variable like REACT_APP_OPENAI_KEY=theapikey

Thanks for getting back to me. Yup I called it OpenAIkey.env. Should that be ok?

Can you try renaming it to just .env? Since it is using react, I believe it will be looking for just .env in the client directory.

Thanks so much - that worked!


[Bug] betterdiscord doesnt work

Describe the Bug
it just doesnt work
tried to repair/reinstall betterdiscord and reinstall discord, nothing works
To Reproduce
try to install betterdiscord
Discord Version

Additional Context
tried installing manually, didnt work
also tried renaming betterdiscord folder in /AppData/Roaming/BetterDiscord, no difference
and it also ran once with me doing nothing

Works for me. What do you mean by "doesnt work"? Does it launch?

yes i mean it doesnt launch


Ctrl+C / Ctrl+V stopped working?

In the latest version of Excalidraw (latest Chrome on Ubuntu 20.04) I'm seeing that copying / pasting shapes using Ctrl+C / Ctrl+V is sometimes not working. Haven't pinned down a pattern yet, but will update here if I have any more details.

What seems to be happening is that it will work for the first few moments of a drawing session, then it will start getting "stale" (Ctrl+V will paste an old shape on the clipboard, no matter what I try adding to the clipboard via Ctrl+C).
If I refresh the page then it starts working again.

I've recently made a fix that was actually supposed to prevent stale pasting (but even that was only happening in special cases where you copy/pasted stuff across apps/files — not within the single app), and generally simplified the code.
If could could come up with a concrete steps to reproduce, that would be great.
In the mean time, can you post what's your excalidraw version? Toggle the "stats for nerds" (via contextmenu) & click on the version (it'll copy the version to your clipboard).

Correction: that fix was still not merged :smile: https://github.com/excalidraw/excalidraw/pull/3257
So in theory if you're pasting across browser windows/tabs, or are caching the clipboard to a file or something, then the stale pasting can happen.

You can check the preview whether you can still reproduce the issue: https://excalidraw-git-improveclipboard-excalidraw.vercel.app/

Nope! I was not able to reproduce in your preview deployment there.
In case you're still interested in concrete steps, I was able to reproduce by making any edit to any text object. After editing any piece of text, it appears that Ctrl+C no longer works. A page refresh fixes the issue.
https://user-images.githubusercontent.com/2414826/111395764-fc87ba00-8693-11eb-8e00-6848a68b1ddb.mp4

Woah, that's interesting. Will investigate lest it pops up again in some edge case (even though the PR will probably fix it for good). Thanks!

Turns out it's a recent regression unrelated to our clipboard handling (in a way).


Full path of repeated identifiers should not be used in error messages

Example:
let x = 5;
let x = 6;

We get the following error:

We shouldn't have ::x anywhere in the above.

No longer an issue.


TEST: test macbook manual perf test.

Thank you for contributing to harp.gl!
Before requesting a pull request, please remember to check the following documents:

contribution guidelines
coding style

If you are adding new functionality we would highly appreciate if you can describe what is the capability you are adding and even better if you can add some examples. Please also remember to add tests for it.
CI Check
Our bots will check whether your PR can be directly integrated into the mainline. We have some internal integration tests running on the background, our bots will inform you of the next steps and someone from our team will take a look and help if needed!
And please do not forget to sign-off your commit! You can read more about DCO here. But, in short, you just need to use git commit -s or append --signoff when you are committing to the repo.
Happy contributing!

macbook tests please

@harpgl-bot macbook tests please

@harpgl-bot GPU tests please

GPU tests please


Machine linux-9 went dead from network monitoring website.

Machine linux-9 went dead from network monitoring website.

Machine linux-9 was hung and required to power recycle machine.


TypeScript's ecosystem of self-bundled typings does not work with npm

When npm dependencies have same packages of different versions, tsc throws duplicate identifier errors. TypeScript's ecosystem of packages is weaker than npm, and does not have compatibility with npm. I believe this is a large problem. And this will be a popular problem because npm always install an exact version in resolving dependencies. For example, when depending<EMAIL_ADDRESS>and<EMAIL_ADDRESS>as another package's dependency, its project has<EMAIL_ADDRESS>and<EMAIL_ADDRESS>npm can resolve these different versions, but TypeScript cannot.
TypeScript Version:
1.9.0-dev.20160526

This is a serious problem. But when you say that

because npm always install an exact version in resolving dependencies. For example, when depending<EMAIL_ADDRESS>and<EMAIL_ADDRESS>as another package's dependency, its project has<EMAIL_ADDRESS>and<EMAIL_ADDRESS>npm can resolve these different versions, but TypeScript cannot.

it is important to note that the way npm resolves these transitive dependencies is by recursively installing and resolving packages as nested dependencies. Versioning is handled by directory nesting. This is far from ideal and is part of the reason why tools like jspm exist. I'm bringing this up here, in a npm issue, because I think the problem is broader and that a more abstract solution needs to exist.

if the declaration files are authored correctly as modules, then there are no issues here. if the declaration file is authored as global, then the conflict in the global scope is what i would expect.
@DanielRosenwasser what did you have in mind marking this as "community tooling"?

@mhegazy Indeed, there might be global declarations, such as node being dependencies of submodules. Perhaps as a simple solution, TypeScript should disregard such global dependencies in case the parent module already has them included? Might not work in all cases, but it's a good start. A better solution would be to somehow have TypeScript wrap all the modules in a similar fashion to the Typings tool, which prevents conflicts between global dependencies.

TypeScript wrap all the modules in a similar fashion to the Typings tool, which prevents conflicts between global dependencies.

this is not a viable option. wrapping declarations change their shape and origin and leads to more conflicts down the road. it also changes user code, which makes identifying problems and fixing them much harder.

@mhegazy Indeed, there might be global declarations, such as node being dependencies of submodules.

not sure i understand what you mean by this.

@mhegazy Something I didn't think about for a long time was that the declare module "..." syntax, while modeling the shape of external modules, actually introduced another global namespace in which collisions are as problematic as any other. Given how widespread this practice has become, and given how typings automatically wraps declaration files, I think clear guidance is needed on how to author declaration files correctly. Furthermore, and I'm sorry for beating a dead horse here, but if the answer to that question is "you can only use the proper (non-polluting) form with node, otherwise you need to use a hack" then there's a definite problem that needs to be addressed at the language level.

here is the documentation we are adding to the handbook. take a look and let us know if there is something that is missing: https://github.com/Microsoft/TypeScript-Handbook/pull/335

@mhegazy What I meant is that dependencies or their dependencies might require an older, conflicting version of a given global typing (e.g. node). Will the TypeScript compiler know to distinguish the in their respectable scopes, or will it cause problems, like the OP described?

no. and that is why packages should not rely on specific versions of an @types package, it should be major.minor.* or major.* or just latest for cases like node.

@mhegazy This seems to still be a problem.
Has anybody put any thought into how this might work?
What TypeScript currently does is not in line with how NPM is meant to work. You should be able to have two versions of a package installed (e.g<EMAIL_ADDRESS>and library-a@4.0.0). Therefore TypeScript needs to be able to determine the correct types for the correct version of each library (whether they are contained against @types or packageJson.types).
We have a situation in which we are writing code within a monorepo. We're writing a library library-e which is dependent on library-b and library-c. library-b uses the older version of library-a but the library-c uses the newer version of library-a. The old version of library-a needed a @types/library-a while the new version has its types within its packageJson.types.
I do not know how I can tell TypeScript to use different @types packages for the different versions of a library, and how to tell it to not use this in the case of the modern library with its types contained within the package. And I also do not know how to stop the types from colliding.
Are we meant to use skipLibCheck? This doesn't seem right.

Coming back to this issue but what I am thinking of doing is using tsconfig.json#paths to ensure TypeScript only imports the types of a specific version of a package (which contains its types against its package.json#types/typings).

Another problem arose: #31148

As a response for a label; a proposal to resolve a real problem #31148 caused by this core issue is written in there.


Please add this new game

"Tactics Ogre: Reborn" just came out. Appreciate if added. Thanks

I have added the game(s) you requested in the most recent release: https://github.com/hobby-grade/Nintendo-Switch-Discord-Status/releases/tag/v1.1.2
Thank you for checking out the project, reach out if you have any more suggestions!


Default file extension link

When starting up new machines, after running ROGIERS Wizard, i don't want to manually link all the common file extensions to the correct application. Provide a Powershell script (in Wizard with checkbox option) that verifies presence of certain '.exe' applications. If so, link file extensions to that application.

Useful information found :
https://gist.github.com/timabell/bc90e0808ec1cda173ca09225a16e194
Testing in VM Windows 10

Powershell script added to change default apps for the required extensions, thanks to the ps1 file created by @timabell


Adds Wudoku 1.0.0 manifest

This PR adds Wudoku 1.0.0 app manifest to the bucket

Closes #1

[x] I have read the Contributing Guide.

/verify


consider empy xlink(entry)

link = xlink(entry) is on some cases empty which leads to 'broken links' (see. e.g. ClimateMachine.jl/latest/References).
The proposed change omits the HTML linking on such cases.

Thanks @LazyScholar! I'll merge and tag v0.2.2.


Cannot connect to mongo:latest docker container

I am running a mongo container like this:
docker network create chonk-network
docker run -p 27017:27017 --name chonk-engine-docker -d --network chonk-network mongo:latest
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' chonk-engine-docker

With the resulting IP being <IP_ADDRESS>.
I would like to connect to this instance on the host directly (macOS), not from within another container. So I open Compass and use this connection string:

mongodb://<IP_ADDRESS>:27017

The connection times out, however. What might I be doing wrong?

It's <IP_ADDRESS> duh