Add touch support

More progress on #138.

[x] touch support
[ ] make the touch areas for the resize handles larger (they don’t have to appear visually larger though)
[x] two-finger pan/zoom
[x] fix press&hold on canvas triggering selection (maybe it’s not fixed? hard to tell)
[ ] edit text
[x] delete objects (toolbar button?)
[x] finalize line creation

[ ] fix how existing finalize action deletes last line

[ ] undo/redo

It would be great if someone with an iPad could test this out because I don’t have one so I don’t know how well it would work. Specifically, holding space and dragging with one finger should work.

Is there an input for removing an element?

Not yet @nrgapple

I don’t understand why all the tests are failing

Omg omg omg, just tried it on my phone and it’s working!!

One small thing, the hints location is off on mobile

Probably not a bug introduced by this PR but because there’s no way to end a multi arrow selection, it let me try something unconventional:

Click on the unlock icon to lock it
Select arrow
Click somewhere to start the arrow
Click somewhere else to continue the arrow
Click on the lock icon to unlock it
The previous action resets the shape to selection and unselects the arrow
Now you have both selection AND continue building the arrow

Note: doesn’t need to be fixed in this PR, but we should keep track of it. I assume that when we’ll add some sort of done button (maybe next to the edit one), people won’t click on the lock anymore.

For the editing, we’ll want to do something with the UI (don’t really know what yet) but now it’s almost unusable as it covers the entire scene.

For deletion, I can think of a trash icon next to the edit one. We’ll also likely want to put undo redo nearby. Maybe a way to copy paste as well

Btw, I’m not opposed to disable the tests if you can’t find out why they are breaking. Mobile support is more important than the tests in the short term. Hopefully we’ll find the root cause and fix them afterwards.

Seems like it’s green. Do you want to merge and keep iterating on subsequent PRs?

Sure!

Seems like https://github.com/excalidraw/excalidraw/pull/787 made the element properties menu appear even when no element is selected:

Fixed @dwelle

@j-f1 Cool. Tiny thing tho: you need to ensure the variable is always a boolean if you want to do a conditional rendering via showSelectedShapeActions && :smile::

Now the elements property is not visible when inserting new elements..


Could you explain the q_sample ?

The return of the q_sample function is defined as : return (continuous_sqrt_alpha_cumprod * x_start + (1 - continuous_sqrt_alpha_cumprod**2).sqrt() * noise)
I do not understand this part . (1 - continuous_sqrt_alpha_cumprod**2).sqrt() : Why there is a need for square and the square root afterwards. I could not find anything in the main paper or the following paper that SR3 using to define their noise schedule.  Some explanation would be good to understand it.
Thank you.

@sandeepjangir07  I have the same question

@kada0720 @sandeepjangir07
You can find it in DDPM page 4

Here continuous_sqrt_alpha_cumprod is $\sqrt{\bar{\alpha}_t}$, thus  continuous_sqrt_alpha_cumprod**2 equals to $\bar{\alpha}_t$
Besides, you could find similar formula in SR3 paper on the top left corner of page 3.


home-assistant-custom-lovelace-modules.zigbee2mqtt-networkmap: unstable-2023-12-16 -> 0.9.0

Changelog: https://github.com/azuwis/zigbee2mqtt-networkmap/releases/tag/v0.9.0

Format using nixfmt-rfc-style
Add passthru.updateScript
Add meta.changelog

Description of changes

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 309719 run on aarch64-linux 1

1 package built:

home-assistant-custom-lovelace-modules.zigbee2mqtt-networkmap


Text not displayed properly

Which operating system does the issue occur on?
macOS 10.14.4
Sorry for the generic title but the issue is a bit difficult to explain and inconsistent.
Issue Description
On macOS when in fullscreen, Alacritty doesn't show the entire output of a program (vim, fzf, etc.). Sometimes it only shows the text above the cursor and sometimes below the cursor.
The frequency of this issue is inconsistent, sometimes I can go on for hours in fullscreen mode before getting this issue and sometimes it surfaces within a few minutes.
Reopening Alacritty fixes it (temporarily).
I have added a screencast of this issue so that you can get a better understanding of what I mean.
Demo
In the screencast, I have demoed the issue with and without tmux. For your understanding: whenever there is a green bar at the bottom this means that I am in a tmux session.
Screencast: https://streamable.com/iimcy
The screencast demo:

I have a Alacritty window and open an example file in neovim: no issue
I go fullscreen and open same file: issue occurs
I exit tmux session, remain still in fullscreen, and open same file: issue occurs
I exit fullscreen and open same file again: no issue

Even though I have demoed with neovim, I have also seen this issue happen with fzf.
Let me know if I can help in anyway :)

Can you reproduce this with the latest git master?

This is a duplicate of https://github.com/jwilm/alacritty/issues/2353 and has been fixed on the latest master.
If you can still reproduce this on the latest Alacritty master, please let me know and I'll re-open.

@chrisduerr @kchibisov Sorry for the late reply. master seems to have resolved this.


Change _Id to id

Steps to reproduce
  const options = {
    name: 'pipeline',
    Model,
    paginate,
    id: 'id'
  };

  // Initialize our service with any options it requires
  app.use('/pipeline', createService(options));

Expected behavior
Service should use the _id property as "id" when querying and creating new elements.
Actual behavior
But It doesn't work, the service keeps creating documents with "_id" property and having the id as "_id" when querying. Am I doing something wrong?
System configuration
Module versions
"@feathersjs/feathers":  "version": "3.3.1"
"feathers-mongoose": "version": "7.3.2",
"mongoose": "version": "5.5.12"
NodeJS version:
v10.12.0

An _id property will always be generated by MongoDB. When changing the property the adapter will use that id field for get and other queries however. Keep in mind that custom id field values will not be generated automatically.

Oh, I got with, I thought that the "id" was for specifying the "_id" alias.
Thanks for the answer @daffl.
Do you have any idea of how I should do It then? I just need an alias for the _id property because I'm migrating my project from feathers-knex to feathers-mongoose and my frontend already uses the property "id". I've tried putting a Mongoose alias in the schema, but It didn't work either.

@daffl I tried to use this two libraries but without result. This issue I have is related to this other issue?
LIbraries to change _id to id on the response (not on DB):

https://github.com/meanie/mongoose-to-json
https://github.com/abranhe/normalize-mongoose


feat(NODE-6157): add signature to github releases

Description
Sign releases in both 5.x and 6.x
What is changing?
Automate release signing with a detached signature and verification instructions in the README.
Is there new documentation needed for these changes?
No
What is the motivation for this change?
SSDLC Compliance

Release Highlight

Add Signature to Github Releases
The Github release for the mongodb package now contains a detached signature file for the NPM package (named
mongodb-X.Y.Z.tgz.sig), on every major and patch release to 6.x and 5.x.  To verify the signature, follow the instructions in the 'Release Integrity' section of the README.md file.

Double check the following

[ ] Ran npm run check:lint script
[ ] Self-review completed using the steps outlined here
[ ] PR title follows the correct format: type(NODE-xxxx)[!]: description

Example: feat(NODE-1234)!: rewriting everything in coffeescript

[ ] Changes are covered by tests
[ ] New TODOs have a related JIRA ticket

Do we have an example of a successful signing using the gpg-sign v2 action?  Either here or from js-bson would be fine since I assume the scripts are almost identical.

@baileympearson Just added a link to an example in the PR description!


GUI: Server Health from GUI header - Phase 2

Following test cases will be automated under this issue.

[ ] Verify Content Search Element Appears

[ ] Verify Filter By Date Element Appears

[ ] Verify Filter By Event Status Element Appears

I tried to push thru my Mac instead of from our pool system.. looks like issue got closed automatically. So reopening it.


[Bug]: Unexpected token o in JSON at position 1

What happened?
I'm encountering a consistent issue in both my main Next.js project and an example project from UploadThing named "minimal-pagedir." During the file upload process, I receive the following error message:
- error Error [SyntaxError]: Unexpected token o in JSON at position 1

What did you expect to happen?
I expected the files to upload successfully without encountering JSON parsing errors.
Version
"dependencies": {
    "@uploadthing/react": "5.6.0",
    "next": "13.4.4",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "uploadthing": "5.6.0"
  },
  "devDependencies": {
    "@types/node": "18.16.0",
    "@types/react": "18.2.8",
    "@types/react-dom": "18.2.4",
    "typescript": "^5.1.6"
  }

Reproduction Steps

Install UploadThing in a Next.js project and configure it according to the official documentation.
Try uploading a file in the main project.
Separately, clone the UploadThing example project named "minimal-pagedir."
Try uploading a file in the example project as well.

Link to reproduction
https://github.com/pingdotgg/uploadthing/tree/main/examples/minimal-pagedir
Relevant log output
- error Error [SyntaxError]: Unexpected token o in JSON at position 1
    at JSON.parse (<anonymous>)
    at IncomingMessage.json (file:///G:/coding/uploadthing/uploadthing/examples/minimal-pagedir/node_modules/uploadthing/dist/next-legacy.mjs:27:16)
    at file:///G:/coding/uploadthing/uploadthing/examples/minimal-pagedir/node_modules/uploadthing/dist/chunk-UHCG7WYR.mjs:371:55
    at file:///G:/coding/uploadthing/uploadthing/examples/minimal-pagedir/node_modules/uploadthing/dist/next-legacy.mjs:24:28
    at G:\coding\uploadthing\uploadthing\examples\minimal-pagedir\node_modules\next\dist\server\api-utils\node.js:463:16
    at G:\coding\uploadthing\uploadthing\examples\minimal-pagedir\node_modules\next\dist\server\lib\trace\tracer.js:117:36
    at NoopContextManager.with (G:\coding\uploadthing\uploadthing\examples\minimal-pagedir\node_modules\next\dist\compiled\@opentelemetry\api\index.js:1:7057)
    at ContextAPI.with (G:\coding\uploadthing\uploadthing\examples\minimal-pagedir\node_modules\next\dist\compiled\@opentelemetry\api\index.js:1:516)
    at NoopTracer.startActiveSpan (G:\coding\uploadthing\uploadthing\examples\minimal-pagedir\node_modules\next\dist\compiled\@opentelemetry\api\index.js:1:18086)
    at ProxyTracer.startActiveSpan (G:\coding\uploadthing\uploadthing\examples\minimal-pagedir\node_modules\next\dist\compiled\@opentelemetry\api\index.js:1:18847)
    at G:\coding\uploadthing\uploadthing\examples\minimal-pagedir\node_modules\next\dist\server\lib\trace\tracer.js:106:107
    at NoopContextManager.with (G:\coding\uploadthing\uploadthing\examples\minimal-pagedir\node_modules\next\dist\compiled\@opentelemetry\api\index.js:1:7057)
    at ContextAPI.with (G:\coding\uploadthing\uploadthing\examples\minimal-pagedir\node_modules\next\dist\compiled\@opentelemetry\api\index.js:1:516)
    at NextTracerImpl.trace (G:\coding\uploadthing\uploadthing\examples\minimal-pagedir\node_modules\next\dist\server\lib\trace\tracer.js:106:32)
    at apiResolver (G:\coding\uploadthing\uploadthing\examples\minimal-pagedir\node_modules\next\dist\server\api-utils\node.js:461:63)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async DevServer.runApi (G:\coding\uploadthing\uploadthing\examples\minimal-pagedir\node_modules\next\dist\server\next-server.js:664:9)
    at async Object.fn (G:\coding\uploadthing\uploadthing\examples\minimal-pagedir\node_modules\next\dist\server\next-server.js:1130:35)
    at async Router.execute (G:\coding\uploadthing\uploadthing\examples\minimal-pagedir\node_modules\next\dist\server\router.js:315:32)
    at async DevServer.runImpl (G:\coding\uploadthing\uploadthing\examples\minimal-pagedir\node_modules\next\dist\server\base-server.js:602:29)
    at async DevServer.run (G:\coding\uploadthing\uploadthing\examples\minimal-pagedir\node_modules\next\dist\server\dev\next-dev-server.js:922:20)
    at async DevServer.handleRequestImpl (G:\coding\uploadthing\uploadthing\examples\minimal-pagedir\node_modules\next\dist\server\base-server.js:533:20) {
  digest: undefined
}

Code of Conduct

[X] I agree to follow this project's Code of Conduct

Hmm this is strange... I don't see when this would have breaked.
Looks like req.body is already JSON parsed:

We haven't changed this in forever though so curious why it wasn't broken before?

@AvaYnE2 you can use this canary until the next version is out: pnpm add<EMAIL_ADDRESS>

Hmm weird that it brakes now. Unfortunately, this is the first time I've tried Uploadthing, so I can't really say if there were any related bugs in previous versions.
But thanks a lot, it works fine with the new version!
I hope you find the cause.

Hey want to report that I also go this error when i previously didnt in 5.2.x about 2 months ago

@AvaYnE2 the fix has been released in 5.6.1 now


bug: nothing to repeat

Using default helm chart with the following

helm install cluster-secret ./charts/cluster-secret -n cluster-secret --create-namespace

I get this error when creating a ClusterSecret
[2023-09-03 09:53:11,282] kopf.objects         [ERROR   ] [example-1/simple-cluster-secret] Handler 'create_fn' failed with an exception. Will retry.
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/kopf/_core/actions/execution.py", line 283, in execute_handler_once
    result = await invoke_handler(
  File "/usr/local/lib/python3.9/site-packages/kopf/_core/actions/execution.py", line 378, in invoke_handler
    result = await invocation.invoke(
  File "/usr/local/lib/python3.9/site-packages/kopf/_core/actions/invocation.py", line 117, in invoke
    result = await fn(**kwargs)  # type: ignore
  File "/src/handlers.py", line 114, in create_fn
    matchedns = get_ns_list(logger,body,v1)
  File "/src/csHelper.py", line 66, in get_ns_list
    if re.match(matchns, ns.metadata.name):
  File "/usr/local/lib/python3.9/re.py", line 191, in match
    return _compile(pattern, flags).match(string)
  File "/usr/local/lib/python3.9/re.py", line 304, in _compile
    p = sre_compile.compile(pattern, flags)

con you paste here your cluster secret (ofc offuscate sensitive data).

They are not any sensitive data
apiVersion: clustersecret.io/v1
kind: ClusterSecret
metadata:
  annotations:
    kopf.zalando.org/create_fn: >-
      {"started":"2023-09-03T10:12:37.743492","delayed":"2023-09-03T10:13:37.884919","purpose":"create","retries":1,"success":false,"failure":false,"message":"nothing
      to repeat at position 0"}
    kopf.zalando.org/on_field_data.data: >-
      {"started":"2023-09-03T10:12:37.743479","stopped":"2023-09-03T10:12:37.744809","purpose":"create","retries":1,"success":true,"failure":false}
  creationTimestamp: '2023-09-03T10:12:37Z'
  finalizers:
    - kopf.zalando.org/KopfFinalizerMarker
  generation: 3
  managedFields:
    - apiVersion: clustersecret.io/v1
      fieldsType: FieldsV1
      fieldsV1:
        f:data:
          .: {}
          f:username: {}
      manager: OpenAPI-Generator
      operation: Update
      time: '2023-09-03T10:12:37Z'
    - apiVersion: clustersecret.io/v1
      fieldsType: FieldsV1
      fieldsV1:
        f:metadata:
          f:annotations:
            .: {}
            f:kopf.zalando.org/create_fn: {}
            f:kopf.zalando.org/on_field_data.data: {}
          f:finalizers:
            .: {}
            v:"kopf.zalando.org/KopfFinalizerMarker": {}
        f:status:
          .: {}
          f:kopf:
            .: {}
            f:progress:
              .: {}
              f:create_fn:
                .: {}
                f:delayed: {}
                f:failure: {}
                f:message: {}
                f:purpose: {}
                f:retries: {}
                f:started: {}
                f:success: {}
              f:on_field_data/data:
                .: {}
                f:failure: {}
                f:purpose: {}
                f:retries: {}
                f:started: {}
                f:stopped: {}
                f:success: {}
      manager: kopf
      operation: Update
      time: '2023-09-03T10:12:37Z'
  name: simple-cluster-secret
  namespace: example-1
  resourceVersion: '49895'
  uid: 9122c979-fbca-4088-ba07-5fb2085a7417
  selfLink: >-
    /apis/clustersecret.io/v1/namespaces/example-1/clustersecrets/simple-cluster-secret
status:
  kopf:
    progress:
      create_fn:
        delayed: '2023-09-03T10:13:37.884919'
        failure: false
        message: nothing to repeat at position 0
        purpose: create
        retries: 1
        started: '2023-09-03T10:12:37.743492'
        success: false
      on_field_data/data:
        failure: false
        purpose: create
        retries: 1
        started: '2023-09-03T10:12:37.743479'
        stopped: '2023-09-03T10:12:37.744809'
        success: true
data:
  username: MTIzNDU2Cg==

can you paste here the yaml you are applying.
It seems its incomplete clustersecret object. IE cant see matchNamespace?
if this is the case, we may have to add a verification to fail with a more style, I mean an explicit message.

Yaml applied
apiVersion: clustersecret.io/v1
kind: ClusterSecret
metadata:
  name: global-secret
  namespace: example-1
data:
  username: MTIzNDU2Cg==

I've changed the code to
    for matchns in matchNamespace:
        for ns in nss:
            logger.info(f"matchns: {matchns}")
            logger.info(f"ns.metadata.name {ns.metadata.name}")
            if re.match(matchns, ns.metadata.name):
                matchedns.append(ns.metadata.name)
                logger.debug(f'Matched namespaces: {ns.metadata.name} match pattern: {matchns}')

And got the following
[2023-09-03 10:26:00,902] kopf.objects         [INFO    ] [example-1/simple-cluster-secret] matchns: *
[2023-09-03 10:26:00,902] kopf.objects         [INFO    ] [example-1/simple-cluster-secret] ns.metadata.name cluster-secret
[2023-09-03 10:26:00,903] kopf.objects         [ERROR   ] [example-1/simple-cluster-secret] Handler 'create_fn' failed with an exception. Will retry.
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/kopf/_core/actions/execution.py", line 283, in execute_handler_once
    result = await invoke_handler(
  File "/usr/local/lib/python3.9/site-packages/kopf/_core/actions/execution.py", line 378, in invoke_handler
    result = await invocation.invoke(
  File "/usr/local/lib/python3.9/site-packages/kopf/_core/actions/invocation.py", line 117, in invoke
    result = await fn(**kwargs)  # type: ignore
  File "/src/handlers.py", line 116, in create_fn
    matchedns = get_ns_list(logger,body,v1)
  File "/src/csHelper.py", line 93, in get_ns_list
    if re.match(matchns, ns.metadata.name):
  File "/usr/local/lib/python3.9/re.py", line 191, in match
    return _compile(pattern, flags).match(string)
  File "/usr/local/lib/python3.9/re.py", line 304, in _compile
    p = sre_compile.compile(pattern, flags)
  File "/usr/local/lib/python3.9/sre_compile.py", line 764, in compile
    p = sre_parse.parse(p, flags)
  File "/usr/local/lib/python3.9/sre_parse.py", line 948, in parse
    p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
  File "/usr/local/lib/python3.9/sre_parse.py", line 443, in _parse_sub
    itemsappend(_parse(source, state, verbose, nested + 1,
  File "/usr/local/lib/python3.9/sre_parse.py", line 668, in _parse
    raise source.error("nothing to repeat",
re.error: nothing to repeat at position 0

I think i have a fix here : https://github.com/zakkg3/ClusterSecret/tree/fix-bad-pattern
can you confirm ?

Yes good


#add domain edisonschools.edu.vn

#add domain edisonschools.edu.vn

@haibau I am sorry, I cannot check if the school qualifies to be added to this repository because there is a error displayed about a  connection to the database, instead of the school website content. I'll get back to the request in few days. Hopefully, the issue will be already fixed. See screenshot below. Thank you.

Dear JetBrains/swot,
The website have been updated.
Thanks.
On Fri, Apr 24, 2020 at 16:20 Philip Torchinsky<EMAIL_ADDRESS>wrote:

@haibau https://github.com/haibau I am sorry, I cannot check if the
school qualifies to be added to this repository because there is a error
displayed about a connection to the database, instead of the school website
content. I'll get back to the request in few days. Hopefully, the issue
will be already fixed. See screenshot below. Thank you.
[image: image]
https://user-images.githubusercontent.com/2843439/80195891-376ca380-8625-11ea-819e-0f58b38ae01f.png
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/JetBrains/swot/pull/8189#issuecomment-618902448, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ACVHWUTUCDCNGTAIIRI4XSLROFKUZANCNFSM4MP4GTEQ
.

--
Lee Hai
Co-Founder & CTO
FPT AdTrue, J.S.C
| Skype (lx.hai)
| Email<EMAIL_ADDRESS>

@haibau I am sorry, but as far as I see, the website returns the same error.
 While it is not an issue to be a student (or a teacher), and a CTO of a company at the same time, I have to remind you that free educational subscription for JetBrains tools cannot be used for a purpose other than education. In particular, it is not permitted to use the free license for any kind of commercial development.
With this in mind, I have to close the request without merging, if the website will not be available on the next week. If it becomes available, we'll inspect the circumstances and decide if the school qualifies.
Thank you for the understanding.

@haibau Pull request merged. Thank you!


Create wizard internal API Server

Elegantt data. What's this?

➤ P Sanderson commented:
This is now an API base and is added in the config loader branch
https://github.com/NAVCoin/navpi-go/pull/8


fallback on zmq=/usr/local if default build fails

This tweaks setup.py to fallback on --zmq=/usr/local if the initial zmq test fails.  I have confirmed that this fixes unconfigured build on CentOS with current distribute/pip/cython.  The following command successfully installs pyzmq on this system:
easy_install https://www.github.com/minrk/pyzmq/zipball/fallback
# same goes for pip install

despite the fact the CentOS makes the terrible choice to exclude /usr/local/lib from LD_LIBRARY_PATH by default.
See discussion in #128 for details.

I think this is fine.


Rework the pipeline

After everything else has been reworked, the pipeline itself can be updated to pull from the configs and such.

This is done, and further pipeline reworking is a continual effort.


Added "Keychron K8 Pro RGB ANSI"

Content
Required:

Keyboard name: Keychron K8 Pro RGB
Vid: HID\VID_3434
Pid: PID_0280&REV_0100&MI_02&Col03

Additonal info:

[ ] I have also submitted this keyboard to the official VIA repository (or not)
[x] My keyboard has an unofficial port of QMK (is not part of the main repository) (leave unchecked if official)

Checks

[x] At the moment of submission, the vidpid combination is unique
[x] I understand how ViaMia works (that for others to use your submitted keyboard they have to patch their VIA install too)

FYI I'm not from Keychron's staff, I'm just a K8 Pro owner who downloaded the JSON files from their website and added it here to this PR.
There is also a non-RGB version (white lights only) but I don't own that.
Cheers! :)

Sorry I'm new to this and not 100% sure I followed the right procedure to gather PID and VID. I followed a guy from Keychron's website and as instructed I went to my devices in Windows and this is what I get:

Although in VIA the PID seems to be longer:


Shouldn't Array::pop_front() and pop_back() return pop-ed element?

It seems that pop methods from Array only resize the array, but don't return the actual pop-ed element. What's the point of these methods if they just call Array::resize() ?
https://github.com/godotengine/godot/blob/master/core/array.cpp#L275

+1

I guess it wouldn't hurt to return the pop-ed element instead of just void indeed.

do we have a back() method? it always awkward to do array[array.size()-1]
when using them as stacks
On 19 February 2016 at 06:12, Rémi Verschelde<EMAIL_ADDRESS>wrote:

I guess it wouldn't hurt to return the pop-ed element instead of just void
indeed.
—
Reply to this email directly or view it on GitHub
https://github.com/godotengine/godot/issues/3763#issuecomment-186124612.

In the STL it looks like those functions only remove the first and last elements without returning it though:

http://www.cplusplus.com/reference/list/list/pop_front/
http://www.cplusplus.com/reference/list/list/pop_back/

However in Python the pop() function does return the pop-ed element: http://www.tutorialspoint.com/python/list_pop.htm

do we have a back() method? it always awkward to do array[array.size()-1]
when using them as stacks

Doesn't look like it, but it could easily be added I guess if the back() method is common in other languages. Another alternative would be to add support for array[-1], e.g. change:
Variant& Array::operator[](int p_idx) {

	return _p->array[p_idx];
}

for:
Variant& Array::operator[](int p_idx) {

	if (p_idx < 0) {
		return _p->array[_p->array.size() - p_idx];
	} else {
		return _p->array[p_idx];
	}
}

(untested)

Potential reason: Exception safety.
Source: http://blogs.msdn.com/b/zhanli/archive/2010/06/29/c-tips-why-the-pop-method-of-stl-stack-does-not-return-a-value.aspx
Explanation:
Suppose pop() methods do return the pop-ed element.
Now, let the client write this:
Variant v = array.pop_front(); // will call Variant copy constructor

or
Variant v;
v = array.pop_front(); // will call Variant operator=

What may happen is that either Variant's copy constructor or Variant's operator= throw an exception: the pop-ed element was not correctly inserted in variable v, although the array did change, since it was resized in the pop() function.
Thus, one has to first get the value we want, and then only call pop().
But why doesn't Python bother?

we don't use exceptions tho

I vote for returning those poped values instead of void

@pkowal1982 Read https://github.com/godotengine/godot/issues/3763#issuecomment-186131805 above.
TL;DR: quoting myself:

So, a good solution would simply consist in:
creating new methods Array::back() and Array::top() that get the element we are supposed to get, respectively first and last ones.
proposing new methods pop_front_element() and pop_back_element() that actually copy the element obtained with front() or back() before actually call pop_front() or pop_back(), and finally return the copied element.

Unless anyone has another idea? @punto- @akien-mga @bojidar-bg @akien-mga

What's the difference between adding a pop_front_element() and making pop_front() return the element? Also "copy" in this context mean an actual duplicate of the object (which would be likely not intended)?
In any case, front() and back() are good additions IMO.

@vnen Code talks more than words :)
void Array::pop_front() {
    // doesn't change
    // resizes the Array without returning the front element
}

Variant Array::pop_front_element() {
    Variant element  = this->get_front();
    this->pop_front();
    return element;
}

Variant Array::front() const {
    return this->get(0);
}```

I think having pop_front() and pop_front_element() is too much. pop_front() should return poped element and if you don't want it just ignore it...
front() and back() are OK for me.

It's not that I want it or not. Adding either solution is trivial.
The reason I didn't do it it is that I don't want to implement something that potentially introduces bugs or non-optimized code. Pushing forward for a solution or the other doesn't interest me if there is not argumentation with it.

I was looking into this and it seems that it's been addressed, may be good to close. Current (v3.0.alpha.custom_build) implementations below:
Variant Array::front() const {
ERR_FAIL_COND_V(_p->array.size() == 0, Variant());
return operator[](0);
}

Variant Array::back() const {
ERR_FAIL_COND_V(_p->array.size() == 0, Variant());
return operator[](_p->array.size() - 1);
}

...
Variant Array::pop_back(){
if (!_p->array.empty()) {
	int n = _p->array.size() - 1;
	Variant ret = _p->array.get(n);
	_p->array.resize(n);
	return ret;
}
return Variant();
}

Variant Array::pop_front(){
if (!_p->array.empty()) {
	Variant ret = _p->array.get(0);
	_p->array.remove(0);
	return ret;
}
return Variant();
}

Only thing of concern is the comment made on the commit for the pop_'s:

pop_front, pop_back now return values instead of void. Things I didn't know how to properly implement:
1. pop_front & pop_back shows in the help menu Object as return value. I know this is incorrect but if not Object than what? Cause it can't be void. It needs to be a generic type that includes all the Array types

pop_front, pop_back now return values instead of void. Things I didn't know how to properly implement:

pop_front & pop_back shows in the help menu Object as return value. I know this is incorrect but if not Object than what? Cause it can't be void. It needs to be a generic type that includes all the Array types

The BIND_METHOD call needs to use pop_front:Variant and pop_back:Variant so that the type is enforced in the docs.

Closing as fixed by #6304.


dnscrypt-proxy dissapeared

why did jedisct1/dnscrypt-proxy along with the dnscrypt web-page disappear recently?

Because I don't have any obligation to work on legacy software I don't use, don't like, don't want to spend any more time on.
The website was moved to https://dnscrypt.info


Any reasons why css and js files are not stored in the repo?

😃

@Bunchhieng the frontend is stored in a totally separate repo, and allows me to update the frontend independently of the backend.  https://github.com/gammons/todolist_frontend


[Bug]: Cannot jump to modal from js_object

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
When I am at a js object, and click a modal, modal is not opened. When I click a child element (say, text in modal) then modal is opened.
I should be able to click a modal from js_object and get it to open.
https://user-images.githubusercontent.com/1573771/151761208-91c34cc9-1753-4fc5-8e56-cb17996b62bb.mp4
Steps To Reproduce

Add a modal
Add a js_object
Click at modal, it won't open.

Environment
Production
Version
Cloud

So Glad someone finally reported this! I face this all the time and it's so annoying when it breaks my flow :)

Stats

Stat
Values

Reach
200

Effort (months)
0.5

@kocharrahul7 updating the reach here because this is the same issue that happens when navigating via the omnibar as well and that has much higher usage.


Weights and Biases support

add WandBProgressBarWrapper
add --wandb-project argument
update progress_bar to support wandb_project
Before submitting

[ ] Was this discussed/approved via a Github issue? (no need for typos, doc improvements)
[x] Did you read the contributor guideline?
[ ] Did you make sure to update the docs?
[ ] Did you write any new necessary tests?

What does this PR do?
Adds Weights and Biases support for logging.
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃

Hi! Thank you for fairseq! I really enjoy working with it.
I missed wandb.ai logging and decided to add it to fairseq. I'm currently testing it.

Thank you! I'll be happy to help with the changes!


LD-237 Add other missinv envvariable for .

@faizhasim @yclian @joegaudet Just add missing enviroment variable for cron job script.

Approved.


Use v2 config of buf

Description
Something that I noticed as I was working in this repo. v2 lets us specify inputs, which means that you can invoke buf generate without any args and get the desired behavior.
This is the successor to #185
Changes

Use v2 of buf config

Testing
See that everything goes green and that you can run buf generate locally.

I'll have a look

@tstirrat15 I still get the same errors, just now with the prefixes 😅


Support CmdEdit from go-jira

Editing tickets is hopefully pretty straightforward.
Use 'e' from TicketList and TicketShow to edit the selected issue.

Used 'E' in the end, to reduce the chance of accidentally hitting it.


add e2e for v2 function directive

Description of changes
Add e2e test for v2 graphql function directive.
Description of how you validated changes

E2E in local

Checklist

[x] PR description included
[ ] yarn test passes
[x] Tests are changed or added
[ ] Relevant documentation is changed or added (and PR referenced)
[ ] New AWS SDK calls or CloudFormation actions have been added to relevant test and service IAM policies

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Codecov Report

Merging #8607 (3fe41c2) into master (f72e59b) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #8607   +/-   ##
=======================================
  Coverage   57.06%   57.06%
=======================================
  Files         725      725
  Lines       41095    41095
  Branches     8429     8429
=======================================
  Hits        23452    23452
  Misses      16831    16831
  Partials      812      812

Continue to review full report at Codecov.

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


WVR2 1440x2560 is actually 1440x24560

I have played with rotation, resolution, scaling and tried every possible combination to get a clear screen in both eyes of the WVR2. I have had zero success. The closest I have been able to get is setting the scaling to match the resolution of 1920x1080. For some reason if I do not rotate the screen left in nvidia config, then everything is running vertical instead of horizontal. I have tried viewport in setting and viewport out settings and it keeps forcing viewport out to 1440x2560. Viewport in is 2560x1440 as long as the screen is rotated. SteamVR detects the hmd and it uses Openhmd, so I am trying to figure out what is wrong as to why I can not get this to display correctly.

Also relevant for other HMDs with rotated displays: #53
I gave it a shot with this PR: #58. I think my WVR2 displays correctly in direct mode with this one but there might still be something wrong with it, especially the SteamVR preview window looks wrong.

There are so many changes now that I can't tell if you fixed WVR2 rotations or not. I can test, but I know there are other issues with AMD cards.

Tested with the direct_mode_rotation branch. Rotations are correct, but there is gyro drift and graphical glitches. Graphical glitches are worst on AMD, but Intel users shouldn't see serious problems.

Ok tested out and in SteamVR is great, not sure if Direct mode is actually working. Launch game (Elite Dangerous) and it goes back to the rotation issue. Also it is treating is as a monitor, not HMD. have a I done something. Like adding Option AllowHMD yes to the nvidia config?

3 things I'd like to say on the viability of WVR2 with OpenHMD:

It's on a list of devices that have buggy video output with AMD on Linux, along with PSVR and OSVR HDK2.

The drift may be mitigated by a Kalman filter that Joey is planning to port to the WVR2 driver and other headsets.

The drift varies with the temperature of the headset, and initial gyro offset values OpenHMD currently uses aren't necessarily correct.

Agreed, is the AMD issue an AMD driver issue that needs to be pointed out to Red team?
I find the HMD very usable once the Drift issue is fixed in some manner. If this filter get's ported into the driver what will it do or fix? I love the work both projects have done. I have a HMD that actually works thanks to them, just needs a tweak.

Agreed, is the AMD issue an AMD driver issue that needs to be pointed out to Red team?

It's the open source Mesa driver. You know how these things go.

If this filter get's ported into the driver what will it do or fix?

Sensor fusion between linear movement and rotational movement, which is supposed to smooth out the experience in a pleasing way, though ymmv. We'll see.

Since your using the Open driver have you tried the closed to see if it works since it now works about 80% for gaming?

No, Mesa drivers for Intel and AMD are supposed to be the best on Linux. Nvidia is the odd one out there. Anyways, I'm done with "gaming".


libinput_udev_assign_seat never returns

Please add a minimal working example that somehow listens to libinput events like done at https://wayland.freedesktop.org/libinput/doc/latest/api/. I tried to do the same in Rust and here's what I got so far:
extern crate input;
use input::Libinput;
use input::LibinputInterface;
use std::fs::File;
use std::os::unix::io::FromRawFd;
use std::os::unix::io::IntoRawFd;
use std::os::unix::io::RawFd;
use std::path::Path;

struct Interface;

use udev::Context;

impl LibinputInterface for Interface {
	fn open_restricted(&mut self, path: &Path, flags: i32) -> Result<RawFd, i32> {
		File::open(path)
			.map(|file| file.into_raw_fd())
			.map_err(|err| err.raw_os_error().unwrap())
	}

	fn close_restricted(&mut self, fd: RawFd) {
		unsafe {
			File::from_raw_fd(fd);
		}
	}
}
fn main() {
	let mut input = Libinput::new_from_udev(Interface{}, &Context::new().unwrap());
	println!("{:#?}", input);
	input.udev_assign_seat("seat0").unwrap();
	println!("{:#?}", input);
	loop {
		input.dispatch().unwrap();
		while let Some(event) = input.next() {
			println!("Got event: {:#?}", event);
		}
	}
}

It will only print one line. The call to libinput_udev_assign_seat never returns for some reason.

Okay I got it: My open_restricted code ignored the flags, handling them fixes the issue

Sorry, I have had not much time in the last days. I am glad you figured it out on your own.


Path smoothing alternatives

Just read #5139
I don't understand what is behind the formula to compute path_smooth option:
w_smoothed = (n / path_smooth) * w + w_p / (n / path_smooth + 1)
Being w the optimal weight for a leaf and w_p the weight of the parent (after applied path smoothing).
This formula can return much higher or much lower weights depending on the n (the number of observations in leaf) and path_smooth parameter. How is it affected by learning rate? Big size nodes will have in practice bigger learning rate equivalence.
A desirable property:
If w and w_p are very similar, the result v_smoothed should be like w and w_p. If w = w_p (that in practice never will happen because in that case we don't split), w_smoothed = w = w_p.
In general w_smoothed should be in the interval of both. There isn't any reason for having a w_smoothed out of this range. We can think of a weighted average of both values.
With the current formula we can get values outside the range.
There are several schemas for use that satisfy this property.
One intuitive way is additive smoothing: we compute w_smoothed adding to the leaf an amount of K average nodes of the parent node.
w_smoothed = (n * w + K * w_p) / (n + K)
In this case the amount of regularization depends of the size of leaf (n) and path_smooth parameter (K)
We may be interested in lower regularization when n is big. In that case we can use a second parameter p (p >= 1) to control the proportion of leaf and parent weights.
w_smoothed = (n^p * w + K * w_p) / (n^p + K)

Just read #5139 and formula makes sense now.


linters: fix; unnecessary parentness, if/else => ?, imports

@cristicbz small linter fixes, everything compiles and works

Yes please, seems superfluous. Otherwise air enough on the lint errors
On Sun, 20 Sep 2020, 13:44 Ivan Zvonimir Horvat<EMAIL_ADDRESS>wrote:

@Horki commented on this pull request.
In game/src/lights.rs
https://github.com/cristicbz/rust-doom/pull/142#discussion_r491688162:

@@ -19,7 +19,7 @@ impl Lights {
// TODO(cristicbz): Remove this restriction.
assert!(self.lights.len() < 255);
self.lights.push(light_info.clone());

           (self.lights.len() - 1)

@cristicbz https://github.com/cristicbz it's really not, just my
preference if it's problem I can redo it
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/cristicbz/rust-doom/pull/142#discussion_r491688162,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAGDUMF2BDSHX25IYQUUUQLSGX2LRANCNFSM4RTROTWQ
.

Thanks! Walking on the street right now :) will merge in a few hours when I
get home
On Sun, 20 Sep 2020, 13:50 Ivan Zvonimir Horvat<EMAIL_ADDRESS>wrote:

@Horki commented on this pull request.
In game/src/lights.rs
https://github.com/cristicbz/rust-doom/pull/142#discussion_r491688601:

@@ -19,7 +19,7 @@ impl Lights {
// TODO(cristicbz): Remove this restriction.
assert!(self.lights.len() < 255);
self.lights.push(light_info.clone());

           (self.lights.len() - 1)

@cristicbz https://github.com/cristicbz hi, I removed usize suffix
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/cristicbz/rust-doom/pull/142#discussion_r491688601,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAGDUMDMUBGC7TK3KRCO7GDSGX3BFANCNFSM4RTROTWQ
.

Merged, thanks!


Show "Copied" info when an identicon is clicked

Input from users:

I don't understand why the cursor of the mouse has a "+" when it's hovering an identicon.

This is a behavior coming from the @polkadot/react-identicon icons. If clicked, the address of the account will be copied to the clipboard. Users need to know about this as it's hidden right now.
Proposal: show a "copied" tool-tip above or below the identicon when clicked. It should be visible for ~5 sec
Alternatively we could use a toast with the toast context useToasts

I'd like to work on this issue

Thanks for proposing, feel free to.

@Tbaut For which indenticon I have to make changes?

all of them!
the best way is to:

make a dedicated Identicon component that shows the copy info and pass all other props to the current Identicon implementation
replace all the occurrences of the Identicon component

which one is tooltip here?

@Tbaut tooltip or useToast?

I think tooltip would be better. Thanks.

I  have implemented the feature I don't know why it is not working. Shall I push it? Could you please check it once?

You can push, but please provide some info around what you did and what doesn't work.

Hey, absolutely


Participate at hacktoberfest.com

Details: https://hacktoberfest.com/participation/#pr-mr-details

If I'm understanding this correctly, all I need to do up-front is to tag this repo with hacktoberfest for the month, and then any PRs that are merged count towards your score?

Correct. This will potentially expose the repo to more audiences.

All Enquo repos now have the hacktoberfest topic (amongst others that seemed relevant).


Mention/Ping Toggle

Instead of a one size fits all .block permission that blocks no matter what, a command to toggle pings or toggle mentions would be good.
This command would require the .block permission, and then you would not check if they have permission, but if they want to block pings.
I'll PR this if it is received positively

That's definitely something I've considered before. Its not a bad idea. This is one extra reason for adding storage. We need to store all this information so they won't have to toggle every time. I feel like that's an issue that should have priority. We can definitely implement this one tho.

It took like 2 minutes to implement with the current system, so I'll open a PR and just modify it once the storage system is implemented


Collecting log data for Data Studio reports to show oci-proxy success

Once traffic is redirected via oci-proxy it would make sense to create Data Studio reports to show the success of the project.
Initially the cost saving should be visible in the monthly K8s Infra GCP Billing report.  However, as soon as head room has been created in monthly expenditure work could continue on mitigating the remaining K8s Infra componentes to community infa, which would again increase spending.
This would created a moving target, making it difficult to show the real cost saving achieved over the next months
For this we would need the logs for oci-proxy, reg.k8s.io as well as die log data from the AWS S3 buckets. Further processing of the data would allow us to match SHA and K8s release version, which would give insight into cost per release.
@BobyMCbobs @hh

Requires: https://github.com/kubernetes/k8s.io/issues/3929

/assign @Riaankl

/retitle Collecting log data for Data Studio reports to show registry.k8s.io success

We should be able to see the change in GCR/GCS costs for k8s-artifacts-prod, which is the metric we're actually after.

Even if we move X% of traffic to AWS that doesn't mean we moved X% cost, we should just look at the cost directly.
We can already see the breakdown of costs by specific GCP projects and services in the data studio report.
The net cost change is cost change for k8s-artifacts-prod + cost change for oci-proxy-prod.

Now we serve traffic from AWS for non-GCP traffic, we need to rethink how we want to demonstrate success of registry.k8s.io.
Closing this for now.
/close


Book and AuthorBooks, do I need to create a Book twice to make associations work?

class Book extends Model {
  static get modelName() {
    return "Book";
  }

  static get fields() {
    return {
      id: attr(), // non-relational field for any value; optional but highly recommended
      authorId: fk("Author"),
      title: attr()
    };
  }

  toString() {
    return `Book: ${this.title}`;
  }
}

class Author extends Model {
  static get modelName() {
    return "Author";
  }

  static get fields() {
    return {
      id: attr(), // non-relational field for any value; optional but highly recommended
      books: many("Book"),
      name: attr()
    };
  }

  toString() {
    return `Author: ${this.name}`;
  }
}

Then...
Book.create(bookJSON);
Author.create(authorJSON);

I am expecting both Book and AuthorBooks models to be created within redux state. But only Book gets generated. I seem to need to manually generate both by additionally doing:
Author.withId(...).books.add(bookJSON);

What am I doing wrong? How can I get associations to work automatically?

Remove the many() field from Author and specify Book.fields like this:
static get fields() {
  return {
    id: attr(), // non-relational field for any value; optional but highly recommended
    authorId: fk("Author", "books"),
    title: attr()
  };
}

This works. Thank you, I was thinking of one-to-many when using many, looks like it's strictly for many-to-many, my bad.


When handling a QueryExchangeBenefit at start of Operating Round, Non-Actve Client shows Green Box, no text, Response of NO leaves game in Operating Round

When handling the Query Exchange Benefit, when it triggers at the start of the Operating Round (before any Share Companies are operating), Various Issues appear:

Shows a Panel on remote Clients (not the player who must respond) filled with GREEN, but no Text, just a Title
Show on Checksum Audit  Discrepancies on the actions:

Operating Round 1.1: Jeff performed Query Exchange Benefit Action Chain to Previous [true]
--Effect: Query Exchange Benefit for Jeff to David.
--Effect: State Change for Jeff from Passed to Waiting for Response.
Change Action Number from 124 to 125
Operating Round 1.1: David performed Response To Offer Action Chain to Previous [true]
--Effect:  does not Exchange M&H for 10% of NYC
Retrieved New Action Number 126 from Game Server
Operating Round 1.1: David performed Set Wait State Action Chain to Previous [true]

Show Action  with no Effects:

Operating Round 1.1: David performed Set Wait State Action Chain to Previous [true]
Retrieved New Action Number 124 from Game Server

Game state left in the Operating Round on all clients

Issues resolved


support working with multiple profiles

Now we use recursive algorithm in case we can't get information from BigQuery (it should help to work with different profiles)
Reworked usage of ZetaSQL: we now use SimpleXXXProto types as much as possible because new algorithm sometimes return these types
Got rid of schema tracker, now we use catalog for it and we send it with each request to ZetaSQL

Problem 1:
After addition some column to the table it could not be resolved by new algorithm because the table was already marked as registered.
Problem 2:
Let's imagine that model A depends on model B.
After addition new column to B
CASE price > 100
        WHEN true THEN ...
        ELSE ...
    END as price_category

it could not be recognised in model A.


[Question and/or Event Request] Codeunit 44 Report Management/Codeunit<PHONE_NUMBER> - Access to RunMode or ReportAction

Dear ALAppExtensions team,
First off my question: Is there any problem in subscribing directly to codeunit<PHONE_NUMBER> Reporting Triggers rather than codeunit 44 ReportManagement?
For example in SubstituteReport there is also a parameter RunMode that indicates how a report is called, but this parameter is not passed on to publisher OnAfterSubstituteReport.
I suspect that the events from the Reporting Triggers codeunit are not supposed to be used, and we are supposed to use the events from codeunit 44 instead, but I couldn't find any information on this.
Could you clarify this?
If we are not supposed to subscribe to the events in the Reporting Triggers codeunit directly, then could you add a new parameter or a new event that provides access to the RunMode of a report?

I would further strongly suggest to Microsoft that codeunit 44 OnAfterSubstituteReport has the same parameter signature as codeunit<PHONE_NUMBER> SubstituteReport.
The limitations of codeunit 44's implementation of SubstituteReport is very concerning.
I'm currently upgrading a NAV 5.0 client to BC SaaS and one of the requirements is to route to a custom report based on record values for the report's pertinent dataitem record. Since  codeunit 44 OnAfterSubstituteReport lacks a var recordref parameter, I cannot do that and thus forces me to subscribe to codeunit<PHONE_NUMBER> instead.
I understand that extensions shouldn't subscribe to events in object ID<PHONE_NUMBER> range, but I currently have no choice right now.
Microsoft absolutely needs to revisit their Codeunit 44 OnAfterSubstituteReport  implementation if they ever decide to "close the doors" on codeunit<PHONE_NUMBER> for AL extension developers to event-subscribe to.

Thank you for your feedback. Codeunit 44 is planned for refactoring in the nearer future, where we will consider your feedback. Solution coming up! Stay tuned :)

The signatures have been aligned. The updated codeunit 44 will ship with the June update.


save/load from firebase, fix autosave issues

@zgalant @almeidaalajoel @toto4tots
saves and loads db data both to/from localstorage and firebase. adds a check in the save function to compare the most recently saved data in localstorage with the current in memory db data to see if we should actually push changes to firebase.
turns out there was a field (mtime) in the projects table which was always being updated with the current time whenever the project was saved (including on the autosave interval) which was always causing the equal check to fail, so I changed it to always be set to 0 on save - it doesnt look like that field is ever read anywhere, its only written to, so I think this should be safe.
~right now there is still an issue with the way asset data is saved that causes the equal check to always fail, but I think I know how to address it.
also, will need to update/rebase this off of joel's starter code PR that he is working on~
fixed asset data saving and rebased off of latest changes
https://www.loom.com/share/a194967ebef34290b3ce5b379111754b

this is ready now but would be good to get some eyes on it and some testing

oops looks like this is not working through the normal flow, it only works (as in loads the saved code from firebase) if you go directly to the editor url (as opposed to through home), will work on fixing that tmrw


How to include normative references that are not W3C, IETF and WHATWG?

If I have ISO docs, how would I include them in the normative references table?

@csuwildcat @decentralgabe Can either of you help?

@awoie I usually manually add in references using [[ref: ... ]]
@csuwildcat would need to add something to the processing to pull in ISO docs I believe

@awoie I usually manually add in references using [[ref: ... ]]

@decentralgabe can you give an example? I cannot find anything related to this in the docs.

yes, see the references here for ed25519 and a few others that aren't a part of a group -- https://did-dht.com/#references
https://github.com/TBD54566975/did-dht-method/blob/main/spec/spec.md#references

https://github.com/TBD54566975/did-dht-method/blob/main/spec/spec.md#references

Thank you so much. We should add that to the example spec/docs. This is would be very useful.


⚠ ClamAV has degraded performance

In 0794be9, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 69 ms

Resolved: ClamAV performance has improved in 333c725 after 5 minutes.


Stored Cross-site Scripting (XSS)

Issue
An attacker can gain arbitrary execution of javascript code using the edit function in the page editor.
Steps to reproduce:

Log in and navigate to a page to edit
Click on the insert menu, and click HTML. You will get prompted to enter some HTML code
Insert the following payload:
Visit the page and observer an alert box pop up.

Hello, after save all inline JS is stripped from the pahe content. Have you tried to save the page and load it again?  I just tried and i dont see any javasctipt

Hi @peter-mw ,
I did just confirm it. It does work on my end.
Just to confirm the workflow.
First we choose to insert HTML into a page, as shown in the image below:

Then we enter in  as the HTML:

Then we get an alert box confirming the XSS:

This should prove that XSS is possible on the website. :)
Hope that helps.

@peter-mw if you feel that it is worth fixing, please feel free to open the issue up again. I can help fix it if needed :)

hi, @ProDigySML , yes when you "Insert HTML" you see the alert, but after you save there is no alert

Hi @peter-mw ,
You are correct, apologies for not seeing that. There is another way of getting XSS though. You can include the embed code module and enter the payload  which seems to persist after saving.
Hope that helps
:)

Can you confirm this bug is working for you?

Hi, you can insert JavaScript code in the Embed module yes. That is its purpose. This can be done by admin users only. If the admin user wishes he can insert javascript code in the "embed" module and this is normal function.


Add capability to export logs as type csv not just json.

Checklist

[X] I agree to the terms within the Auth0 Code of Conduct.

Describe the problem you'd like to have solved
I was investigating some issues in our tenant and wanted to export some logs to a .csv file so we can count specific issues and share them with our customer success and support teams. Specifically, you can load the .csv to Excel, which is a friendly tool for non-developers.
Describe the ideal solution
I was able to do it, but I had to do some jq manipulation, which was a bit painful. It would be nice to have a similar flag as --json for csv or have the formatting to the log table be more straightforward to parse to .csv.
Alternatives and current workarounds
I was able to use this to build a csv file from the json output. But it took more effort than I would have liked.
auth0 logs list --filter "type: f AND date:[2023-12-25 TO 2024-01-02]" --json | jq -r '["type", "date", "description", "connection", "client_name", "user_agent"], (.[] | [.type, .date, .description, .connection, .client_name, .user_agent]) | @csv ' >> ~/Downloads/ben-logs.csv
I tried using tr and sed but found that both would not properly break the file apart with the current output formating.
auth0 logs list --filter "type: f AND date:[2023-12-25 TO 2024-01-02]" | tr "\\t" "," >> ~/Downloads/amh-logs.csv
Additional context
I love the new CLI tool. Overall, it is a great addition to help developers troubleshoot.

@DannyPat44 I'm working on a CSV export for another command and looking at generalizing the format. I'll keep logs in mind as I think it's a good fit too. Update you as it comes together.

@DannyPat44 #955 brings the --csv flag to logs and all the rest of our table result-based commands. This should be merged today into the main branch and make it into the next release.
An example of using it in your case would be:
auth0 logs list --filter "type: f AND date:[2023-12-25 TO 2024-01-02]" --csv > ~/Downloads/ben-logs.csv

Wow, that was so quick! Thank you.


Log file stores long data on multiple lines

When the data is too long, it's stored on multiple lines I don't know why.
Storing the data is not necessary on the log. Data column to be removed.

Might be something wrong with formatting which I couldn't solve.
Solved with removing the data from the log file as we are working based on IDs.


why sendBuf() need time.Sleep()?

Hi,
The sendBuf() function will sleep when the RawConn.Write() return error.  Why? I'm getting confused.
What error will RawConn.Write() return when sendBuf write data?

Because want to distinguish transient network errors from permanent ones, and only will sleep if the return error is temporary.
Same error handling both in read and write
https://github.com/xfxdev/xtcp/blob/master/xconn.go#L95
https://github.com/xfxdev/xtcp/blob/master/xconn.go#L153


when /tmp is under tmpfs (in arch linux) opts.DB.IngestExternalFiles(externalFiles) will block forever

snap
directio open file issue
change dir in cluster.go could fix this.

Thanks for your feedback. Do you have any suggestion to fix it?

use another dir to avoid tmpfs. for example current_dir/tmp

I think this is a critical issue since most Linux distros mount /tmp on tmpfs.
And it took me 2 hours to locate the problem which was in the test, not in my code. It was really an unpleasant experience. At least there should be a caveat in the doc.

I think this is a critical issue since most Linux distros mount /tmp on tmpfs.
And it took me 2 hours to locate the problem which was in the test, not in my code. It was really an unpleasant experience. At least there should be a caveat in the doc.

@Rapiz1 Would you mind sending a fix, change the dir or add a caveat warning in the doc.

@Rapiz1 Would you mind sending a fix, change the dir or add a caveat warning in the doc.

func (c *Cluster) Start() {
	......
+	_ = os.RemoveAll("./tmp")
+	_ = os.Mkdir("./tmp", 0755|os.ModeDir)
	for storeID := uint64(1); storeID <= uint64(c.count); storeID++ {
-		dbPath, err := ioutil.TempDir("", "test-raftstore")
+		dbPath, err := ioutil.TempDir("./tmp", "test-raftstore")
	......

maybe somewhat like this?
RemoveAll can be ignored. But when the test failed, the dir will be huge as clients do not call MustDelete.

func (c *Cluster) Start() {
	......
+	_ = os.RemoveAll("./tmp")
+	_ = os.Mkdir("./tmp", 0755|os.ModeDir)
	for storeID := uint64(1); storeID <= uint64(c.count); storeID++ {
-		dbPath, err := ioutil.TempDir("", "test-raftstore")
+		dbPath, err := ioutil.TempDir("./tmp", "test-raftstore")
	......

maybe somewhat like this?
RemoveAll can be ignored. But when the test failed, the dir will be huge as clients do not call MustDelete.

What's the point of using directio here? I think performance and consistency across crash is not an issue since it's a tutorial project. So we can just simply replace all directio.OpenFile with os.OpenFile and just drop directio in badger.


Selected ChannelID on Go Live with Sound is null

https://paste.gg/p/anonymous/ce4c7ce43b864f1e8ef95b71e6b83d49
When pressing the Go Live button, tuxphones sources get created but the live fails to start

Also opening another live and then closing it after this causes tuxphones to crash:
2022-09-14T18:27:49.625200Z  INFO tuxphones: [GetInfo] Command processed (applications found: 1) thread 'tokio-runtime-worker' panicked at 'Failed to send heartbeat: AlreadyClosed', src/discord.rs:223:142

but the live fails to start

What do you mean? We haven't implemented stream feedback for the user that is streaming so you'll not see anything on the interface that indicate that you're streaming but other users should be able to see your live. I'm saying this because from the logs it looks like the stream has started.

@ImTheSquid Can you give the feedback thing a look? Because I remember that at a certain point of the development we got that working. Not the stream preview for the streaming user but at least the streaming UI on the left corner of the screen.

Nothing in Discord changes right now to indicate that you're streaming; we currently have all of that information blocked to make debugging easier. The only thing that works in Discord right now is the stream preview that is shown to everyone else.

What do you mean? We haven't implemented stream feedback for the user that is streaming so you'll not see anything on the interface that indicate that you're streaming but other users should be able to see your live. I'm saying this because from the logs it looks like the stream has started.

Oh my bad, I tested this alone before hopping on a call with my friends.
Will test it with someone later today


[IMPROVEMENT] Change support-bundle-manager image pull policy to PullIfNotPresent

Is your improvement request related to a feature? Please describe (👍 if you like this request)
Having the support-bundle-manager image pull policy to Always is unnecessary and can result in excessive resource consumption and potential network congestion.
Describe the solution you'd like
Modify the support-bundle image pull policy to "PullIfNotPresent".
Describe alternatives you've considered
None
Additional context
None

@ChanYiLin could you help with this? Thank you.

Verified on master-head 20240312

longhorn master-head https://github.com/longhorn/longhorn/commit/88c49e7416c9da25f1c125780e7de2026e92d7d8
longhorn-manager master-head https://github.com/longhorn/longhorn-manager/commit/65bdc09182d4e7c7803f54542ef48f6ac0bdc463

The test steps
https://github.com/longhorn/longhorn/issues/7998#issuecomment-1958605641
Result Passed
When creating support bundles twice, you can see in the pod description for the second support bundle creation that the image is reused, as indicated by the Container image already present on machine event message.
Events:
  Type    Reason     Age   From               Message
  ----    ------     ----  ----               -------
  Normal  Scheduled  10s   default-scheduler  Successfully assigned longhorn-system/longhorn-support-bundle-manager-support-bundle-2024-03-12tj9t2c to ip-10-0-2-212
  Normal  Pulled     10s   kubelet            Container image "longhornio/support-bundle-kit:v0.0.33" already present on machine
  Normal  Created    10s   kubelet            Created container manager
  Normal  Started    10s   kubelet            Started container manager


We need a full mock of the emitter

This is for people who are building apps on top of us. It's much easier to develop and test on the desktop than it is on a phone. So it would be super nice if we had a fully functioning mock mobile layer with dummy peers so tests and such can be run on the desktop.

This is #403


Added netcoreapp3.0 to the target framerworks list and conditional co…

Added netcoreapp3.0 to the target framerworks list and conditional compilation options per recommendation from the ASP.Net Core team (see this issue for additional details)
Resolves #3213

Pull Request Test Coverage Report for Build 98527

0 of 0   changed or added relevant lines in 0 files are covered.
1870 unchanged lines in 258 files lost coverage.
Overall coverage increased (+0.7%) to 79.439%

Files with Coverage Reduction
New Missed Lines
%

/libraries/Adapters/Microsoft.Bot.Builder.Adapters.Facebook/FacebookAdapterOptions.cs
1
86.67%

/libraries/integration/Microsoft.Bot.Builder.Integration.ApplicationInsights.Core/ApplicationBuilderExtensions.cs
1
71.43%

/libraries/Microsoft.Bot.Builder.AI.LUIS/LuisApplication.cs
1
96.36%

/libraries/Microsoft.Bot.Builder.AI.LUIS/V3/LuisApplication.cs
1
96.43%

/libraries/Microsoft.Bot.Builder.AI.LUIS/V3/LuisUtil.cs
1
96.35%

/libraries/Microsoft.Bot.Builder/BotStateSet.cs
1
85.0%

/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Actions/BaseInvokeDialog.cs
1
87.5%

/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Actions/Case.cs
1
87.5%

/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Actions/EditActions.cs
1
93.75%

/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Actions/EndTurn.cs
1
81.82%

Totals

Change from base Build 98407:
0.7%

Covered Lines:
17065

Relevant Lines:
21482

💛  - Coveralls

:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Builder.dll compared against version 4.6.3
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Builder.AI.Luis.dll compared against version 4.6.3
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Builder.AI.QnA.dll compared against version 4.6.3
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Builder.ApplicationInsights.dll compared against version 4.6.3
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Builder.Azure.dll compared against version 4.6.3
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Builder.Dialogs.dll compared against version 4.6.3
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Builder.Integration.ApplicationInsights.Core.dll compared against version 4.6.3
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Builder.Integration.AspNet.Core.dll compared against version 4.6.3
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Builder.TemplateManager.dll compared against version 4.6.3
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Builder.Testing.dll compared against version 4.6.3
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Configuration.dll compared against version 4.6.3
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Connector.dll compared against version 4.6.3
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Schema.dll compared against version 4.6.3
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Streaming.dll compared against version 4.6.3

:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Builder.dll compared against version 4.6.3
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Builder.AI.Luis.dll compared against version 4.6.3
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Builder.AI.QnA.dll compared against version 4.6.3
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Builder.ApplicationInsights.dll compared against version 4.6.3
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Builder.Azure.dll compared against version 4.6.3
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Builder.Dialogs.dll compared against version 4.6.3
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Builder.Integration.ApplicationInsights.Core.dll compared against version 4.6.3
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Builder.Integration.AspNet.Core.dll compared against version 4.6.3
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Builder.TemplateManager.dll compared against version 4.6.3
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Builder.Testing.dll compared against version 4.6.3
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Configuration.dll compared against version 4.6.3
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Connector.dll compared against version 4.6.3
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Schema.dll compared against version 4.6.3
:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Streaming.dll compared against version 4.6.3


When using workbench.action.debug.callStack{Up,Down}, focus does weird things

Does this issue occur when all extensions are disabled?: I have to have the MS Python extensions installed at a minimum to be able to launch the debugger, but disabling all other extensions, yes this issue still occurs.

VS Code Version: 1.86.0-insider (Commit eff7c8a7e1c82320380f42d898a1e03051fefb7)
OS Version: Windows 11 (Connected to WSL via Arch Linux)

I try to avoid using the mouse if at all possible. When using the aforementioned commands to navigate the call stack via the keyboard, I would ideally have my focus placed in the editor window where the new call stack location is, ready to navigate and make edits, but instead, my focus is placed in some kind of limbo. I can sometimes press Tab to shift my focus to the editor, but then comes a secondary issue: when I try to use the arrow keys to move my cursor around (attempting to type text/pressing Escape doesn't help either), I am in some kind of locked state where I can't navigate or type even though my focus is on the editor (my cursor shows up, showing me that I am focused). This happens even when I use the workbench.action.focusActiveEditorGroup to ensure that I am focused on the editor. If I shift focus to some other panel and then back to the editor, I am dropped out of this locked state. This issue seems to happen especially when switching to the next item in the stack has moved me into a new file; most of these issues don't happen when moving locations within the same file.
The text where the call occurred is also selected by default when moving up/down the stack, which I find to be slightly annoying since it is easily deleted on accident, and I'd prefer to just have my cursor placed at the start or end of that selection and have no text selected at all, but I can understand this choice.
To clarify, expected behavior would be to just ensure that my editor is focused and ready to type right after the call stack switch occurs.
I've only tried this using Python/debugpy, but I can't imagine that this has anything to do with the language/debugger used.
Steps to Reproduce:

Open a project with multiple files
Set a breakpoint somewhere that will cause a few items to be added to the call stack
Launch debugger
Use workbench.action.debug.callStack{Up,Down} (either by command palette or create keyboard shortcut) to navigate Up/Down the call stack (especially from one file to another)
Try to find out where your focus currently is inside the window
Try to shift focus back to the editor
Try to type/navigate inside the editor

While this is verified for workbench.action.debug.callStack{Up,Down} I still get the bad behavior for workbench.action.debug.callStackTop and workbench.action.debug.callStackBottom and feel like those commands should have a similar change.
When I run workbench.action.debug.callStack{Top,Bottom} focus is lost from the editor.

Agreed @TylerLeonhardt!


chore: fixed a api doc and added some comments

Pull Request Test Coverage Report for Build<PHONE_NUMBER>0
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 66.31%

Totals

Change from base Build<PHONE_NUMBER>5:
0.0%

Covered Lines:
1921

Relevant Lines:
2897

💛  - Coveralls


More replay/playback speed options

I personally would like to have a slider instead of the current options for speed regarding replay as sometimes 1 is to little and 1.25 to great. In such cases (and probably also other cases) it would be beneficial to be able to adjust the speed more precisely maybe with an increment of 0.05 / 5% or even 0.01 / 1% (1% admittedly might probably be a bit too small, but that would result in complete control over the playback speed). Alternatively I would suggest that the increment could be set somewhere by the user or that you could simply type a value between maybe 0.01 and 3 or maybe even 4 into a input field changing the playback speed this way. In conclusion I would still opt for the first option namely the slider as it appears to me as the best option for this.

#1047 added a url parameter that basically implements this but didn't go along with UI changes that would reasonably enable the user to use that parameter
I personally would like the ability to just add playback rates in the settings


release-17.09 channel update breaks my NixOS configuration

My system's configuration works fine in 71fb65709c, but after updating the channel to 4a17dea467 nixos-rebuild no longer succeeds:
# nixos-rebuild dry-run
building the system configuration...
error: value is null while a string was expected, at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/types.nix:222:23
(use ‘--show-trace’ to show detailed location information)

This is the output with tracing enabled:
# nixos-rebuild dry-run --show-trace
building the system configuration...
error: while evaluating the attribute ‘config.system.build.toplevel’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/system/activation/top-level.nix:252:5:
while evaluating ‘foldr’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/lists.nix:34:20, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/system/activation/top-level.nix:132:12:
while evaluating ‘fold'’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/lists.nix:37:15, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/lists.nix:41:8:
while evaluating ‘showWarnings’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/system/activation/top-level.nix:98:18, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/system/activation/top-level.nix:105:16:
while evaluating ‘foldr’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/lists.nix:34:20, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/system/activation/top-level.nix:98:23:
while evaluating ‘fold'’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/lists.nix:37:15, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/lists.nix:41:8:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/system/activation/top-level.nix:96:40, called from undefined position:
while evaluating the attribute ‘assertion’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/config/users-groups.nix:551:9:
while evaluating ‘idsAreUnique’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/config/users-groups.nix:367:23, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/config/users-groups.nix:377:19:
while evaluating ‘foldr’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/lists.nix:34:20, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/config/users-groups.nix:367:33:
while evaluating ‘fold'’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/lists.nix:37:15, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/lists.nix:41:8:
while evaluating ‘filterAttrs’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/attrsets.nix:115:23, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/config/users-groups.nix:377:33:
while evaluating ‘concatMap’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/lists.nix:102:18, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/attrsets.nix:116:18:
while evaluating the attribute ‘users’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/attrsets.nix:199:44:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:75:45, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/attrsets.nix:199:52:
while evaluating the attribute ‘value’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:312:9:
while evaluating the option `users.users':
while evaluating the attribute ‘mergedValue’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:339:5:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:339:32, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:339:19:
while evaluating ‘merge’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/types.nix:236:22, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:342:8:
while evaluating ‘merge’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/types.nix:203:20, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/types.nix:236:28:
while evaluating ‘mapAttrs’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/attrsets.nix:198:17, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/types.nix:204:9:
while evaluating ‘filterAttrs’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/attrsets.nix:115:23, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/types.nix:204:35:
while evaluating ‘concatMap’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/lists.nix:102:18, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/attrsets.nix:116:18:
while evaluating ‘zipAttrsWith’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/attrsets.nix:346:21, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/types.nix:204:66:
while evaluating ‘zipAttrsWithNames’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/attrsets.nix:331:33, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/attrsets.nix:346:27:
while evaluating ‘concatMap’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/lists.nix:102:18, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/attrsets.nix:346:46:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/types.nix:208:17, called from undefined position:
while evaluating ‘mapAttrsToList’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/attrsets.nix:223:23, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/types.nix:208:35:
while evaluating the attribute ‘value’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/types.nix:222:15:
value is null while a string was expected, at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/types.nix:222:23

git-bisect says that 4ddf1959d0f88eb48511a510c93b748a1793be86 is the commit that causes the breakage (which is plausible since I do have dovecot enabled).
Ping @qknight.

I got it too, There is a fix in #29466 / https://github.com/NixOS/nixpkgs/commit/3ba2095a42af1caa2b9a22cd2d3a0b24f72ccda8.

Pushed to 17.09 in f7411b81ede


idea added

nothing related with core Code/Tests. I just added idea folder in gitignore which can cause pain for newbies using web storm to manually add it. :fire:

Is this only for when using webstorm to contribute to this repository?
There is a way to set a global .gitignore: https://help.github.com/articles/ignoring-files/#create-a-global-gitignore

Closing as stale. Feel free to respond and have this reopened.


Use requests paradigms

ApiClient was added with the intention of making it easier to handle common requests by extending all requests with some default. However, this is exactly what requests.session does (and it does it much better with less cruft)
Also adds a Url abstration to that allows easy URL composing
By using session, a simple BaseAuth object can be bound
With these improvements, ApiClient only takes a Url and an optional get_node_port which is a call back for determining ports for an API that has different ports on different nodes
ApiClient.api_request still takes the same arguments (HTTP verb, something to add to path, node=) but also accepts arbitrary default url substitutions like scheme='http' or query='last_cache=0'

Checklist

[x] Included a test which makes sure cookies are handled by get_user_session as the underlying session will automatically propagate cookies now
[x] Followed relevant code rules Rules for Packages and Systemd

@cmaloney This is ready for review

@jgehrcke PTAL

@orsenthil thanks for the feedback; all comments addressed

LGTM.

@jgehrcke RE: using requests.session vs requests.request
I agree the magic of session (e.g. cookie setting) is somewhat worrisome, but the motivation for using session was how clean its interface is. If we don't use session, then we need to pass through headers and ca_cert explicitly. Same goes for whatever session defaults may be used in the future. things like ca_cert and auth are easy enough to track with class member variables, but headers is where it gets really nasty, whereas session has a very nice override mechanism. For example, when not using session we have to manicure headers in a pretty awkward way, whereas with session, we can blindly pass all kwargs along and only do the custom logic we add.
Also, if we tried to do this with PreparedRequest we could remove most of the implicit magic, but then we would be left with a ton of boiler plate for holding onto requests defaults, not to mention a somewhat tedious constructor would be needed.
E.G. I had to add ca_cert_path everywhere in the old implementation despite nothing in this repo using it simply because if I didnt, I would have to make children to do magic to make it work. Now I can remove that kwarg everywhere and in EE when it actually matters, I just have to do:
def EE_cluster():
    c = ClusterApiClient()
    c.ca_cert_path = ca_cert_path
    return c

and everything will work beautifully with no code addition
TL;DR Yes, session has a little more magic than I would like, but the interface slimming is super valuable. I would rather add a little bit of extra logic to explicitly remove magic from session than make my own interface with its whole slew of testing and naming issues

@mellenburg

I agree the magic of session (e.g. cookie setting) is somewhat worrisome, but the motivation for using session was how clean its interface is [...]

:+1: for that trade-off.

I would rather add a little bit of extra logic to explicitly remove magic from session than make my own interface with its whole slew of testing and naming issues

I am willing to help us go down this road.. :) The first thing that comes to my mind here is, as you also say, the implicit handling of cookies. In general, we would love to take control of every single HTTP request in a well-readable, explicit form. We do generally not wish to see side effects among HTTP requests. Especially we do not want an HTTP response have a side effect on a subsequent request w/o explicitly writing that down in the test code. However, cookies do exactly that.
For instance, I'd love to be really sure that the authentication in tests is by default controlled by only the Authorization header in a request. Don't want to see an authentication cookie injected somewhere by accident! Of course we also have to have tests that test the effect of the authentication cookie (and we do have those), but that must be explicitly readable from the test code.
I think we should, by default, disarm the cookie management part of the requests.Session object used in the ApiClient.
In the requests.Session response generator this function is used to extract cookies from the response(s):
extract_cookies_to_jar(prepared_request._cookies, req, resp.raw)

(https://github.com/kennethreitz/requests/blob/master/requests/sessions.py#L159)
extract_cookies_to_jar in turn reads cookies from the response via the extract_cookies() method of the jar:
jar.extract_cookies(res, req)

(https://github.com/kennethreitz/requests/blob/master/requests/cookies.py#L135)
The jar is a RequestsCookieJar which is API-compatible with http.cookielib.CookieJar in the Python 3 stdlib. It inherits extract_cookies() from there (https://github.com/kennethreitz/requests/blob/master/requests/cookies.py#L174).
http.cookielib.CookieJar.extract_cookies(res, req) is documented here: https://docs.python.org/3.5/library/http.cookiejar.html#http.cookiejar.CookieJar.extract_cookies
That method is meant to modify the jar, it returns None. So, by turning this method into a noop we can easily create an API-compatible cookie jar that simply discards cookies incoming via extract_cookies().
Minimal working example (I find the result kinda cute):
import requests
from requests.cookies import RequestsCookieJar

class DiscardCookieJar(RequestsCookieJar):

    def extract_cookies(self, req, resp):
        ...

class DiscardCookiesSession(requests.Session):

    def __init__(self):
        super().__init__()
        self.cookies = DiscardCookieJar()

with requests.Session() as s:
    s.get('http://httpbin.org/cookies/set?foo=bar')
    print('cookies in %r: %s' % (s, s.cookies))

with DiscardCookiesSession() as s:
    s.get('http://httpbin.org/cookies/set?foo=bar')
    print('cookies in %r: %s' % (s, s.cookies))

Output:
cookies in <requests.sessions.Session object at 0x7f6353c59c50>: <RequestsCookieJar[<Cookie foo=bar for httpbin.org/>]>
cookies in <__main__.DiscardCookiesSession object at 0x7f635f329908>: <DiscardCookieJar[]>

@orsenthil @jgehrcke I did another pass on this, PTAL

This PR should be merged at the same time as #1096

Hey Michael, I gave this another look. Thanks for sitting this through :). We should really start integration this now, as the changes add a lot of value -- we can then iterate on the whole concept in smaller chunks when the need arises.
One thing I am not sure about: from the point of view where I would write some new tests now -- how easy is it to emit non-authenticated requests to the cluster?
And, before Christmas we talked about worrisome implicit state sharing across HTTP requests through request's cookie handling. I proposed:

I think we should, by default, disarm the cookie management part of the requests.Session object used in the ApiClient.

(original comment plus code proposal: https://github.com/dcos/dcos/pull/1016#issuecomment-267330911)
Do we think we need that?

@jgehrcke

how easy is it to emit non-authenticated requests? Quite easy. This PR is meant to be paired with a renaming PR. See: https://github.com/mesosphere/dcos-enterprise/blob/mellenburg/rename_cluster/packages/dcos-integration-test/extra/conftest.py#L37

So, currently you can call "noauth_cluster" fixture in some tests, but we will just roll out a global (and more comprehensible) 'noauth_api_session' that will make requests without any auth persistence

Thanks for reraising the point on killing the cookie persistence between test cases. I went ahead and added the following tidbit that will take care of that issue:

 r = self.session.request(method, request_url, **kwargs)
self.session.cookies.clear()
return r

Thus, the user can get the cookies in the response, but the underlying session will never auto-persist cookies from a given request

but we will just roll out a global (and more comprehensible) 'noauth_api_session' that will make requests without any auth

:+1:

Thus, the user can get the cookies in the response, but the underlying session will never auto-persist cookies from a given request

Perfect, thanks.
I suppose we should ship this now.


Use getImageURI ?

Hi,
Is there a way to use getImageURI to retrieve an image ? Can't find it anywhere on the repo
cf : https://developers.google.com/chart/interactive/docs/printing
Thanks

This is not currently supported by this Gem. PR welcomed. Thanks!


Feature Request : ORPO

Hi,
First of all, thank you for this library! Very clean and I appreciate that all I need is pytorch!
I wanted to make an issue for the integration of ORPO, not needing to do SFT before the RLHF step is huge since it saves a lot of compute when training on preference data. Hoping it can be integrated into torch tune (with Lora support if possible)!
There is an existing integration into TRL
Thanks!

Hi @kartikayk
Ik not that experienced in writing custom training loops. Mainly a huggingface user haha. I'd be no better than llama 3 70b attempting it 🤣

I'm partly serious here, but why not train a codellama 70B using torchtune and then see if this gets you the right recipe :)

@kartikayk finally got round to doing this and saw a new paper called simPO (simple preference optimisation) and it indeed was simpler to implement than orpo. Only real change being the loss function.
I have a draft pr here #1036, draft since it's quite messy and I feel it has a lot of duplicate code. Also I haven't tested it at all.
Closing this issue in favour of #1037


Mass manufacturing utility is not working (IDFGH-567)

Hi,
I am trying the mass manufacturing utility under tools section and it is not working properly.
In mfg_gen.py file:
nvs_partition_gen.nvs_part_gen(input_filename = output_csv_file, output_filename = output_bin_file)
This function directly calls the nvs_part_gen function in the nvs_partition_gen.py file under components/nvs_flash/nvs_partition_generator.
This function requires an input size but the size is not given as input in mfg_gen.py.
When the function is called, it returns " 'NoneType' object has no attribute 'split' " error when it tries to parse the input_size parameter.
I could not find an appropriate parameter to give to function. Could you check? I am working with fixed "8KB" size partitions for now.

The fix for this is under development. It should be available soon.

Hi,
The fix for this is currently under development. It should be available soon.

Any news here? The errors are still in master

Hi,
The fix is done. Should be merged soon.
My kind apologies for the delay.
Will update as soon as its merged on master.

@olegantonyan
Hi, the fix is now in master.

Great! thank


[Doc bug][JSON-LD format]

Type of issue
Typo
Feedback
JASON-LD format should be JSON-LD format
Page URL
https://learn.microsoft.com/en-us/microsoftteams/platform/messaging-extensions/how-to/link-unfurling?tabs=desktop%2Cjson%2Cadvantages#enable-rich-unfurl-previews-of-links
Content source URL
https://github.com/MicrosoftDocs/msteams-docs/blob/main/msteams-platform/messaging-extensions/how-to/link-unfurling.md
Author
@surbhigupta
Document Id
e837e1fd-ec0c-2d6f-b0db-b76cb2d268a4

Issue is resolved.


feat: add support for typed array unmarshalling in TypeScript

Description
This PR adds support for properly unmarshalling array types, when using the TypeScript generator. Previously, the JSON array was being passed straight into the resulting object, which causes issues when using the value in another schema object and marshalling that object. The other object expects the array to contain full objects with a callable marshal function, not a plain object, giving an error like:
err: {
      "type": "TypeError",
      "message": "unionItem.marshal is not a function",
      "stack":
          TypeError: unionItem.marshal is not a function
              at KeywordSearchRequest.marshal
...

Example
Given a type like this:
arrayProperty:
  type: array
  items:
    $ref: "#/definitions/SomeObjectType"

The generator will now generate unmarshalling code like this:
...
instance.arrayProperty = obj["arrayProperty"] == null
  ? null
  : obj["arrayProperty"].map((item: any) => SomeObjectType.unmarshal(item));

Related Issue

Checklist

[x] The code follows the project's coding standards and is properly linted (npm run lint).
[x] Tests have been added or updated to cover the changes.
[ ] Documentation has been updated to reflect the changes.
[] All tests pass successfully locally.(npm run test).

Additional Notes
The tests don't seem to pass even before my changes. I have updated the existing snapshot to cater for this change, and that test runs successfully.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>1
Details

2 of 2 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.005%) to 92.319%

Totals

Change from base Build<PHONE_NUMBER>6:
0.005%

Covered Lines:
6004

Relevant Lines:
6335

💛  - Coveralls

@all-contributors please add @jonjomckay for code, bug, test


changes in luis

It looks like some things have changed in LUIS that aren't covered in the doc.
I get the following after importing the json model.

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

ID: 73b78c1c-bd0f-caec-32ad-47e6dfcc5b34
Version Independent ID: 00957482-fbae-de4e-6c9c-49dae66c74af
Content: Add natural language understanding to your bot - Bot Service - Bot Service
Content Source: articles/v4sdk/bot-builder-howto-v4-luis.md
Service: bot-service
GitHub Login: @JonathanFingold
Microsoft Alias: kamrani

Thanks for letting us know about this @safari137, I'll be updating the article soon.

Closing now that the updates have been merged.


Image Loader

Images, including illustrations and photographs, may load in three phases.
Specs for Image Loader

In development.


feat: Support deserializing other versions in 3.x

I am wondering it would be great if I can use deserialise implementations in this crate for parsing OpenAPI specifications. To do that, we need to set .version to '3.0.3', as specified in rename attribute of the serde derive. I think this crate can support parsing other versions of OpenAPI specification, such as 3.0.0 or 3.1, if the major version is '3'.
This pull request proposes to add deserialisation support of OpenApiVersion enum from other versions; 3.0.0, 3.1, or 3.

@juhaku I thought OpenAPI 3.1 does not have breaking changes from 3.0, so deserialising 3.1 spec as 3.0 is fine. However it is not right. The migration instruction says "v3.1 does have some small breaking changes".
I added denying 3.1 versions and now only accepts 3.0.x.