update vs update_with_buffer

I just wrote a bug by mistaking update_with_buffer as a superset of update, thinking that it also takes in keyboard events when it does not, leading to the window not responding after the first key press. Maybe a better name like set_framebuffer could avoid the confusion, considering the crate is not yet 1.0?
It apparently does and it turns out that I didn't update the window before checking for keyboard event in the while loop condition. Still, it might be a good idea to make it explicit in the docs? Also, found a weird behavior with key repeat below. I can make a separate issue for it if you'd like.

After some more testing:
loop {
    buffer = get_new_buffer();
    window.update_with_buffer(&buffer, width, width).unwrap();
    while !window.is_key_pressed(Key::Space, KeyRepeat::Yes) {
        window.update();
    }
}

Results in the key not being repeated, while
loop {
    buffer = get_new_buffer();
    window.update_with_buffer(&buffer, width, width).unwrap();
    while !window.is_key_pressed(Key::Space, KeyRepeat::Yes) {
        window.update_with_buffer(&buffer, width, width).unwrap();
    }
}

...works fine. I couldn't figure out why this happens from reading the docs for update and update_with_buffer.

So the docs can be clarified, but if you look at all the examples the are structured like this:
    while window.is_open() && !window.is_key_down(Key::Escape) {
        let new_size = (window.get_size().0, window.get_size().1);
        // .. more code here
        // read somes keys here
        window.get_keys().iter().for_each(|key| match key {
            Key::W => println!("holding w!"),
            Key::T => println!("holding t!"),
            _ => (),
        });
       // .. update here
         window
            .update_with_buffer(&buffer, new_size.0, new_size.1)
            .unwrap();
    }

So user code is expected to follow a similar pattern.

Thanks for the response. In my case I only care about one key, so iterating over all possible keys seem a bit verbose. Am I using is_key_pressed wrong? And why would update_with_buffer work yet update doesn't? (I don't change the image in the loop so updating with buffer seems unnecessary here.)

Should only ever call either update_with_buffer or update during each loop, they should never be called twice.

Something like this (untested) should work fine
    while window.is_open() {
        if window.is_key_down(Key::Space) {
           println!("space!");
        }
        // .. update here
         window
            .update_with_buffer()
            .unwrap();
    }

docs has now been updated to state that only one of update_with_buffer and update should be called for a single window.

Closing this, if you still have issues post (here) again.

Should only ever call update_with_buffer or update during each loop, they should never be called twice.

Does this mean that they shouldn't be called consecutively twice without checking for keys etc. (which I was doing)?

docs has now been updated to state that only one of update_with_buffer and update should be called for a single window.

Does this mean that for a given window, only one of the two methods can be called, i.e. once update_with_buffer is called, it is now invalid to call update on the same window, in the next iteration, and only update_with_buffer is valid to call? If so I don't really understand the point. Under the scenario where the window content (framebuffer) is only set once in the very beginning and not changed and only the key presses are of interest, isn't it unnecessary to update the framebuffer again?

Usually applications pick one of the either.

Applications has a buffer to display then they will always call update_with_buffer regardless of the buffer been updated or not.
Applications that does their own custom rendering (such as OpenGL/etc) uses update

Switching between them isn't directly support but should work, something like this should work, but is really untested.
while window.is_open() {
    window.is_key_down(Keys::space) {
        ...
    }

    if needs_to_update_buffer {
        window.update_with_buffer(...);
    } else {
        window.update();
    }
}


Support for x931 in RSA

What version of Go are you using (go version)?

$ go version
go version go1.12.8 linux/amd64

Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/lakshmi/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/lakshmi/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib/go-1.12"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go-1.12/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build349271738=/tmp/go-build -gno-record-gcc-switches"

What did you do?

As per the documentation available in https://golang.org/pkg/crypto/rsa/  there is no functions for x931 scheme. Is such a implemention available for RSA? where can I find it?
What did you expect to see?
What did you see instead?

Hi there,
Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
For asking questions, see:

Stack Overflow with questions tagged "go"

The Go Forum, a web-based forum

Gophers Slack, use the invite app for access. The #general channel is a good starting point.

Go Community on Hashnode with questions and posts tagged with "go"

The golang-nuts mailing list

IRC channel #go-nuts on Freenode

Please ask the question on one of the above forums.
(Quoted from https://golang.org/wiki/Questions)


fails to build under Raspbian

Describe the bug
Building elf2cfetbl under Raspbian (the Debian variant released for the popular Raspberry Pi SBC's by the Raspberry Pi organization) it fails with a long laundry list of printf type mismatch errors.
/home/pi/cFS/tools/elf2cfetbl/elf2cfetbl.c:2211:67: error: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘size_t’ {aka ‘unsigned int’} [-Werror=format=]
             printf("strstr[%d] = %s; strlenSN = %ld; strlenON = %ld\n",i,strstr(SymbolNames[i], TblFileDef.ObjectName),
                                                                 ~~^
                                                                 %d

To Reproduce
Build elf2cfetbl under Raspbian.
Expected behavior
Should be casting types to what printf expects.
Code snips
If applicable, add references to the software.
System observed on:
Raspberry Pi Zero W.
Additional context
Add any other context about the problem here.
Reporter Info
<EMAIL_ADDRESS>

Fails for me as well, on a Raspberry Pi Zero (non -W). Compiles without errors on an x86-64 machine.

Note @stanislaw developed a python alternative at https://github.com/stanislaw/bin2cfetbl, see https://github.com/nasa/elf2cfetbl/pull/34.

Also failed on VxWorks... I'll take this one.

This was only partially fixed in #36.  @CDKnightNASA could you check if this is still an issue on Raspbian?

This was only partially fixed in #36. @CDKnightNASA could you check if this is still an issue on Raspbian?

or @Jkillelea...

Ping @CDKnightNASA @Jkillelea - does this now work for you?

Looks like I've got pointer alignment problems.
pi@raspberrypi:~/cfs-test/build/tools $ uname -a
Linux raspberrypi 4.19.66+ #1253 Thu Aug 15 11:37:30 BST 2019 armv6l GNU/Linux
pi@raspberrypi:~/cfs-test/build/tools $ make
[ 14%] Building C object tools/cFS-GroundSystem/Subsystems/cmdUtil/CMakeFiles/cmdUtil.dir/SendUdp.c.o
/home/pi/cfs-test/tools/cFS-GroundSystem/Subsystems/cmdUtil/SendUdp.c: In function ‘SendUdp’:
/home/pi/cfs-test/tools/cFS-GroundSystem/Subsystems/cmdUtil/SendUdp.c:90:20: error: cast increases required alignment of target type [-Werror=cast-align]
         inet_ntoa(((struct sockaddr_in*)result->ai_addr)->sin_addr), port);
                    ^
cc1: all warnings being treated as errors
tools/cFS-GroundSystem/Subsystems/cmdUtil/CMakeFiles/cmdUtil.dir/build.make:86: recipe for target 'tools/cFS-GroundSystem/Subsystems/cmdUtil/CMakeFiles/cmdUtil.dir/SendUdp.c.o' failed
make[2]: *** [tools/cFS-GroundSystem/Subsystems/cmdUtil/CMakeFiles/cmdUtil.dir/SendUdp.c.o] Error 1
CMakeFiles/Makefile2:462: recipe for target 'tools/cFS-GroundSystem/Subsystems/cmdUtil/CMakeFiles/cmdUtil.dir/all' failed
make[1]: *** [tools/cFS-GroundSystem/Subsystems/cmdUtil/CMakeFiles/cmdUtil.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

Edit: disregard my previous comment (since deleted), looks like this is working for me.
I have problems with some of the other submodules, but I'll open separate issues for them.
pi@raspberrypi:~/cfs-test/build/tools/elf2cfetbl $ ls
CMakeFiles  cmake_install.cmake  CTestTestfile.cmake  Makefile
pi@raspberrypi:~/cfs-test/build/tools/elf2cfetbl $ uname -a
Linux raspberrypi 4.19.66+ #1253 Thu Aug 15 11:37:30 BST 2019 armv6l GNU/Linux
pi@raspberrypi:~/cfs-test/build/tools/elf2cfetbl $ make
[ 50%] Building C object tools/elf2cfetbl/CMakeFiles/elf2cfetbl.dir/elf2cfetbl.c.o
[100%] Linking C executable elf2cfetbl
[100%] Built target elf2cfetbl
pi@raspberrypi:~/cfs-test/build/tools/elf2cfetbl $ echo $?
0


Add Replacement Cycling scenario

Issue
I can not run ariard's replacement cycling test in Warnet.
Cause
A number of the test framework components available in Bitcoin Core have not been ported into Warnet.
Solution

Add the replacement cycling test as a scenario.
Modify our copy of the testing framework to mirror Bitcoin Core's test framework functionality.

Limitations
There is a conflict with the ln cli test.
Wins
The test runs without meaningful augmentation. This is great because it points us in a direction of copy/pasting tests that run today in Core's functional test framework. We can then augment the tests to work in realistic environments with lightning nodes and other future tank types.
✨ New Wins

[x] Got connect_nodes working.
[x] Added anticycling from instagibbs
[x] Added sequence zmq functionality
[x] Created log narrative for cycling vs anticycling

Future work

[x] Fix ln cli conflict
[x] "Bubble up" changes in the test framework class to the warnet test framework class
[x] Expand sync_all logic to account for tank state
[x] Align zmq ports (also in Dockerfile)
[x] Break out this PR into its independent parts for review

Concept ACK - assuming you'll move this out of draft when it's "ready for review?"

This requests issue is very annoying 😢

This requests issue is very annoying 😢

You can try rebasing on main now

I'm closing this in favor of the broken-out PRs:
#370
#371
#372
#373


How can I use userInput in custom matcher?

Hi,
I'm trying to build a custom matcher following this guide. Is it possible to use in this custom matcher userInput?
Thanks

Hey, this is more of a discussion than a issue so i move it there.
But the userInput will be added to the global ZxcvbnOptions and is handled as every other dictionary.
So you can access it over the ZxcvbnOptions.
In version 3.x.x ZxcvbnOption is a singleton which is available globally and can be directly used in the matcher with an import.
So it could be accessed with:
import { zxcvbnOptions } from '@zxcvbn-ts/core'

const userInputDictionary = zxcvbnOptions.rankedDictionaries.userInputs


Passing parameters to request

I would like to pass parameters to request such as timeout. Is this currently possible? I've had a few tries but can't seem to figure out how to do it.

Unfortunately, it is not supported, however, it would be trivial to support. I will accept any PR.
You should be able to pass a raw object with additional request options that should be merged with the options internally defined by imaginary client.

I felt the best place to supply these options was when the imaginary server is specified as it keeps those communication options together. You can see an example here: https://github.com/krazyjakee/node-imaginary/blob/master/test/imaginary.js#L43
Those http_params are merged here: https://github.com/krazyjakee/node-imaginary/blob/master/lib/request.js#L26-L31
It's also not a breaking change to any existing code.
Please let me know your thoughts on this solution.

Feature shipped in v0.1.10. Feel free to update your dependency tree.


Port to Fastify

Fastify is 🚀 fast. Convert from express adaptor to this new one.
Tried in #125 but failed because the middleware strategy used fails when using */ in the url for middleware consumer. I'm certain it's a bug in nest but I can't be bothered to fix it yet.
Just fork and switch to feat/fastify branch and PR to that branch. Can revisit it in the future.

Fixed by #154 (uses node:http now)


Failed to load weights

When I tried to create an instance of MTCNN detector, something went wrong:
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-7-be16e7eec9f4> in <module>
      3
      4 img = cv2.imread("ivan.jpg")
----> 5 detector = MTCNN()
      6
      7 for i in range(len(images)):

.../lib/python3.5/site-packages/mtcnn/mtcnn.py in __init__(self, weights_file, min_face_size, steps_threshold, scale_factor)
    193             self.__session = tf.Session(config=config, graph=self.__graph)
    194
--> 195             weights = np.load(weights_file).item()
    196             self.__pnet = PNet(self.__session, False)
    197             self.__pnet.set_weights(weights['PNet'])

.../lib/python3.5/site-packages/numpy/lib/npyio.py in load(file, mmap_mode, allow_pickle, fix_imports, encoding)
    445             else:
    446                 return format.read_array(fid, allow_pickle=allow_pickle,
--> 447                                          pickle_kwargs=pickle_kwargs)
    448         else:
    449             # Try a pickle

.../lib/python3.5/site-packages/numpy/lib/format.py in read_array(fp, allow_pickle, pickle_kwargs)
    690         # The array contained Python objects. We need to unpickle the data.
    691         if not allow_pickle:
--> 692             raise ValueError("Object arrays cannot be loaded when "
    693                              "allow_pickle=False")
    694         if pickle_kwargs is None:

ValueError: Object arrays cannot be loaded when allow_pickle=False

I googled a bit and now think that problem causes due to new versions of numpy (see this issue: https://github.com/tensorflow/tensorflow/issues/28102).

Exactly. It works after adding  allow_pickle=True
https://github.com/ipazc/mtcnn/pull/32

I fixed it by changing line 195 in mtcnn.py to:
weights = np.load(weights_file, allow_pickle=True).item()
Just in case any others have the same problem

@togelian @ahmedelmahy @vBLFTePebWNi6c
I just git cloned it to Colab and check mtcnn.py and although it looked like allow_pickle=True, I'm still getting the a similar error but in line 195 of mtcnn.py
Traceback (most recent call last):
  File "mtcnn-video.py", line 21, in <module>
    detector = MTCNN()
  File "/gdrive/My Drive/pixelation/mtcnn/mtcnn/mtcnn.py", line 195, in __init__
    weights = np.load(weights_file).item()
  File "/usr/local/lib/python3.6/dist-packages/numpy/lib/npyio.py", line 447, in load
    pickle_kwargs=pickle_kwargs)
  File "/usr/local/lib/python3.6/dist-packages/numpy/lib/format.py", line 696, in read_array
    raise ValueError("Object arrays cannot be loaded when "
ValueError: Object arrays cannot be loaded when allow_pickle=False

Do you have any ideas on how to fix this?


[DNM] libswift-enabled

Just for testing the build with libswift enabled.

@swift-ci test

Build failed
Swift Test Linux Platform
Git Sha - bba2579e54705786673da7893855d2d107809efc


added boost to setup instructions and refactored visualizer_rllib

closes #159 and addresses Eugene's comment in #188

Think this is failing for reasons not to do with you, once we merge some higher up PRs this should pass.

this has become stale, so closing. please feel free to reopen if needed.


feat: always initialize mediator

Always initialize the mediator during agent.initialize(), to prevent attempts to initialize twice due to parallelism

Codecov Report

Merging #985 (092f5f7) into main (0128c2a) will increase coverage by 0.41%.
The diff coverage is 94.11%.

@@            Coverage Diff             @@
##             main     #985      +/-   ##
==========================================
+ Coverage   87.76%   88.17%   +0.41%
==========================================
  Files         475      487      +12
  Lines       11417    11548     +131
  Branches     1804     1921     +117
==========================================
+ Hits        10020    10183     +163
+ Misses       1393     1305      -88
- Partials        4       60      +56

Impacted Files
Coverage Δ

...re/src/modules/routing/services/MediatorService.ts
91.57% <92.85%> (-0.98%)
:arrow_down:

packages/core/src/agent/Agent.ts
95.34% <100.00%> (+0.02%)
:arrow_up:

...ackages/core/src/modules/routing/MediatorModule.ts
81.63% <100.00%> (+0.78%)
:arrow_up:

packages/core/src/modules/proofs/ProofsModule.ts
79.11% <0.00%> (-0.76%)
:arrow_down:

packages/core/src/storage/IndyStorageService.ts
94.26% <0.00%> (-0.57%)
:arrow_down:

...ules/routing/services/MediationRecipientService.ts
84.14% <0.00%> (-0.47%)
:arrow_down:

...ckages/core/src/modules/routing/RecipientModule.ts
61.61% <0.00%> (-0.39%)
:arrow_down:

packages/node/src/NodeFileSystem.ts
37.14% <0.00%> (ø)

packages/core/src/crypto/JwsService.ts
90.90% <0.00%> (ø)

packages/core/src/storage/Repository.ts
100.00% <0.00%> (ø)

... and 71 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Thanks @niallshaw-absa! I've seen that some tests failed. Are they working locally for you? Maybe it'll be needed to update snapshots as now the mediator routing record is created at the start.

@genaris - tests are failing for me locally also, if possible can you show me how to update the snapshots? Thanks!

Thanks @niallshaw-absa! I've seen that some tests failed. Are they working locally for you? Maybe it'll be needed to update snapshots as now the mediator routing record is created at the start.

@genaris - tests are failing for me locally also, if possible can you show me how to update the snapshots? Thanks!

To update snapshots you need to add -u parameter to yarn test. However it was not enough, because this new behaviour implied the generation of a different record each time (as routing key changed), so I've added some mocks on DID generation for that particular test suite.


docs(auth): update to credential to use object notation

Working on a project with cloud_firestore: ^0.14.0+2 as I learn my way around firebase, I noticed that the current documentation causes an error, because the current sdk for flutter uses object notations.
Description
Replace this paragraph with a description of what this PR is doing. If you're modifying existing behavior, describe the existing behavior, how this PR is changing it, and what motivated the change.
Related Issues
Replace this paragraph with a list of issues related to this PR from the issue database. Indicate, which of these issues are resolved or fixed by this PR. Note that you'll have to prefix the issue numbers with flutter/flutter#.
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).
This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
[x] All existing and new tests are passing.
[x] I updated/added relevant documentation (doc comments with ///).
[x] The analyzer (flutter analyze) does not report any problems on my PR.
[x] I read and followed the Flutter Style Guide.
[x] I signed the CLA.
[x] I am willing to follow-up on review comments in a timely manner.

Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?

[ ] Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
[x] No, this is not a breaking change.

@googlebot I signed it!

Thank you!


Allow nested destructurings in patterns, not just in function parameters

Description
This would fix an inconsistency wherein function parameters support more kinds of destructurings than normal let bindings.
// currently allowed
#let foo((bar,)) = {}
// not permitted at the moment
#let ((bar,)) = foo

The parser part of this should be easy to implement.
Just insert the marked text of the former link inside the match of the latter.
https://github.com/typst/typst/blob/main/src/syntax/parser.rs#L1249-L1252
https://github.com/typst/typst/blob/main/src/syntax/parser.rs#L1297
Use Case
This would enable more flexible destructurings, while also fixing an inconsistency.

It seems this issue was misguided. It seems I did not fully understand the syntax.


Added electron-release-server link to the docs

By request from a couple users, I've added a link to the electron-release-server, that makes using the auto-updater much easier.

@ArekSredzki Nice! Mind submitting it to https://github.com/sindresorhus/awesome-electron too?

@sindresorhus Done :smile:

Thanks for the awesome app!


Response abstraction

Resolves https://github.com/microsoft/typespec/issues/3693

API change check
APIView has identified API level changes in this PR and created following API reviews.
Microsoft.Generator.CSharp

Corresponding Azure Plugin consumption is in https://github.com/Azure/azure-sdk-for-net/pull/46530


Templates don't show in selection list

The templates don't show in the selection list.

Only after I created a new template, I am able to use the command:
Templates: Generate & insert
I use a custom folder for the templates /Extra/textgenerator/prompts/
maybe that creates this issue?

remove the / at the end of your custom folder path


Rectangle Data Type

Rectangle data type 0x18. Serialization format to be determined. This needs to be implemented to properly serialize the SliceCenter property on ImageButtons.

Completed.


As a SoC professor who values maintainability, I can integrate some existing SoC-made softwares within

... so that I can have more familiarity with the platform. (e.g. TEAMMATES, RepoSense)

Closed as this is an upcoming feature beyond v1.4.


Incorrect link on home page: https://h3rald.com/10-more-programming-languages/

Hi
I was trying to get to
https://h3rald.com/articles/10-more-programming-languages/
but the link on your home page points to
https://h3rald.com/10-more-programming-languages/
and fails - reverting to loading the home page.
I enjoyed reading both language lists and plan to play with min.
Kind Regards Gavin Holt

Well spotted! Fixed, thanks!


feat: Use RRSA to configure the cloud API access

What would you like to be added:
We should use RRSA to implement the cloud API access.
Why is this needed:
Now, we will use a secret (containing AK/SK) to configure cloud API access, which is convenient and fast for development, but it's unsafe. In the future, we should use RRSA to implement this, as it is more secure.
Completion requirements:
This enhancement requires the following artifacts:

[ ] Design doc
[ ] API change
[ ] Docs update

The artifacts should be linked in subsequent comments.

From the documentation, it seems that RRSA only supports ACK. Maybe STS is a more general choice.

From the documentation, it seems that RRSA only supports ACK. Maybe STS is a more general choice.

Do u have any related doc? Can u paste the link here?

Based on the doc, rrsa is based on STS


The problem of flutter automatically installing JDK dependencies

My computer has already installed JDK17, why install flutter and also install temurin8-jdk

$ scoop status
Scoop is up to date.

Name    Installed Version Latest Version Missing Dependencies Info
----    ----------------- -------------- -------------------- ----
flutter 3.3.10                           java/temurin8-jdk

# 13697 @ donglufei in E:\test\deno [17:53:17]
$ java -version
openjdk version "17.0.5" 2022-10-18 LTS
OpenJDK Runtime Environment Corretto-<IP_ADDRESS>.1 (build 17.0.5+8-LTS)
OpenJDK 64-Bit Server VM Corretto-<IP_ADDRESS>.1 (build 17.0.5+8-LTS, mixed mode, sharing)

# 13697 @ donglufei in E:\test\deno [17:57:04]

-i, --independent               Don't install dependencies automatically

scoop install extras/flutter -i


Icon is replacing Font Awesome icons in project

I have a project that is using Font Awesome icons, and just added a little react app form that is using material-ui icons.
The problem is that since this was added, looks like material-ui is replacing every font-awesome icons with their SVG versions, and when the name does not match replaces it with a non-found icon.
This is a PHP 7.1 project

Tech
Version

Material-UI  Core
v3.9.1

Material-UI  Icons
v3.0.2

React
v16.7

Current Result:

What should be expected:

@mesparza5 Do you have a minimal reproduction example?


ISOTP?

Are there any plans to support automatic ISOTP segmentation on the controller layer for the TouCAN adapter?
Given the hardware specs, it looks like the controller could do this.

It would be great to have a hardware implementation of the ISO/TP protocol (ISO 15765-2).
Can you pl. point me to the hardware specs.

Well, according to the fact sheet on the website, it‘s a Cortex M4 @100MHz and given the buffer of 20000 frames, isotp should be very possible.

I don't have any ideas yet about command system between USB host and CAN device with implemented ISOTP protocol then.Currently TouCAN adapter is just dumb gate between CAN and USB buses.It sends can bus frames packed into usb frames only.
Can you point me to similar device existing in the market  with hardware implementaion of the ISOTP protocol?  For devices like PCAN and Kvaser all these protocols are implemented like external library.
I work on new dual CAN FD USB (ETH, WiFi) adapter based on STM32H7xx with external DDR 8MB memory and Zephyr RTOS and maybe is worth to add protocols like ISOTP, VSCP, OpenCAN, NMEA2000 etc... in this new adapter.

Well, ISOTP with its strong timing guarantees is always a struggle to do right in the higher layers, that's why almost all non-trivial (i.e. those which only work with OBD2 PIDs that are worth 2 bytes of data) adapters implement this on the controller.
The whole OBDLINK family, WGSoft.de UniCarScan, and almost all J2534 passthrough adapters do it.

But adapters from manufacturers like Peak and Kvaser have implemented J2354 passthrough  protocol have like external dll library ? Not in the hardware ?
And yes they all use high speed USB 480 Mbit interface because full speed USB becomes too slow.
Maybe then is worth to develop  adapter for example based on STM32MP1xx mcu with Linux inside and to use SocketCAN...
In this case would be available a lot of interfaces like WiFI, EThernet, USB, Bluetooth...
I need to explore more ISOTP protocol because all my CAN bus toys are dedicated for VSCP home automation protocol.


Fails to install on mac osx node 8.0.0

Hi,
npm install fails on my machine with node 8.0.0.
Should I change something? will code be updated to support newer versions as I only see issues opened & fixed for version 4.x..
Log:
1647 verbose stack Error<EMAIL_ADDRESS>install: node-gyp rebuild
1647 verbose stack Exit status 1
1647 verbose stack     at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:280:16)
1647 verbose stack     at emitTwo (events.js:125:13)
1647 verbose stack     at EventEmitter.emit (events.js:213:7)
1647 verbose stack     at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
1647 verbose stack     at emitTwo (events.js:125:13)
1647 verbose stack     at ChildProcess.emit (events.js:213:7)
1647 verbose stack     at maybeClose (internal/child_process.js:887:16)
1647 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
1648 verbose pkgid<EMAIL_ADDRESS>1649 verbose cwd /Users/iddo/Development/server
1650 verbose Darwin 17.3.0
1651 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "durable" "--save"
1652 verbose node v8.0.0
1653 verbose npm  v5.4.1
Thanks.

was able to install after adding
--unsafe-perm
to npm install.....
any nicer solution or is this one ok?

Hi, tanks for reporting this issue. Let me look for a better solution. I will report back in a couple of days.

Many thanks.

@jruizgit Hi,
Do you have any updates here?


[Bug] WithOtherFields duplicates on deserialize

Component
network, json-rpc, provider, pubsub
What version of Alloy are you on?
main
Operating System
None
Describe the bug
the WithOtherFields contains two serde(flatten) with one being a catch all map.
due to how serde flatten behaves, the Otherfields will always contain all key values of the object.
this isn't easy to fix, and would require a lot of custom serde.
a quick fix would be to serialize the inner into a serde_json::Map and remove those keys from the serde_Value we serialized into initially
cc @klkvr

fixed via #495
there's no other way to do this really, the overhead should be acceptable here


IKEA E27 filament bulb LED1842G3

IKEA has a new tradfri bulb with filament look, model number LED1842G3, as seen here:https://www.ikea.com/be/nl/p/tradfri-led-lamp-e27-250-lumen-draadloos-dimbaar-warm-schijnsel-globe-bruin-helder-glas-70455676/
It's supported in the dev branche of zigbee2mqtt as shown by the following snippet from devices.js:
   {         zigbeeModel: ['TRADFRI bulb E27 WW clear 250lm'],         model: 'LED1842G3',         vendor: 'IKEA',         description: 'TRADFRI LED bulb E27 WW clear 250 lumen, dimmable',         extend: generic.light_onoff_brightness,     },
And I could get it to work with the plugin by adding this to init.py:
    'LED1842G3': DimmableBulbAdapter,   # IKEA TRADFRI LED bulb E27 250 lumen, dimmable, clear

Thanks! Support was added to plugin.


Displayport on Jetson Nano devkit not working

I've created an core-image-base image using poky and the meta-tegra layer for the Jetson Nano (MACHINE = "jetson-nano-qspi-sd") . It boots the devkit correctly and shows console when i plug in hdmi. When i plug in the display port on the devkit i get a black screen. Is there anything i need to do extra to enable display port?

I don't think there is, but I haven't tested with a DP monitor.  I do see some issues over on the NVIDIA forums on this topic.  Does it work if you run the stock L4T/JetPack Nano build?

Yeah i noticed those issues too (dont have the exact link atm). It does work with the default L4T sd-card image that comes from the nvidia site (which is why it took me a few hours to realize the image i was building was actually working, but the display was not showing anything). At first i thought my image was just not working or i flashed my devkit the wrong way but everything is working fine with hdmi.

I tried some tests with my 4K Dell monitor, and see the same.  It looks like the DP link training never succeeds when it's just the framebuffer being used.  (The NVIDIA boot logo never shows, either.) If I boot a sato or weston image, the display does come up in X/Weston.

Alright, good to hear you can reproduce the issue and know where to look (i have no clue). I have not tried a sato image yet since we wanted to start building our own image from the core-image-minimal since our application actually does not need a display, but for debugging purposes it would be nice to have a display.

I don't think there's much I can really do about this, unfortunately.  I strongly suspect it is a problem in L4T itself - some kind of interaction between the DP driver and the framebuffer driver.

Hello guys @MJLHThomassen-Sorama @madisongh
Anyone try the latest L4T release to check if it works ? if no, I will try it later and will let you know.
I'm planning to check with stock L4T and Yocto tegra-demo-distro ?

Hello  @MJLHThomassen-Sorama @madisongh
I tried the DP with the latest release L4T R32.6.1 and it doesn't work. I need to try with NV stock L4T

We are currently not actively using the devkits anymore since we have our own boards now so I'm afraid I can't be of further assistance here.

Since this isn't an issue with the layer, I'm moving this to the discussion board.


v1.2.0 breaks extension

Upgrading to v1.2.0 breaks the extension on my system. Downgrading to v1.1.7 resolves this problem.
Running via WSL Ubuntu 20.04 on Windows 11.
ex:

switching to v1.2.0:

Even the syntax highlighting shown in the screenshot of v1.1.7 is not correct, you probably installed other extensions that will cause related effects, please try to check and disable other extensions that may be related.


refactor: environment and compose

Create .env.example from docs
Clean up compose.yml
Reference new example file in docs
Format entrypoint.sh

Created minor issue in production 😅

Just a minor issue


Permission denied mounting Azure Files volume

I have a container app I am trying to use with an Azure File storage volume. I've followed the instructions at https://learn.microsoft.com/en-us/azure/container-apps/storage-mounts?pivots=azure-cli#azure-files, created the storage account and file share, added it to my container app environment, then setup the volumeMount and volumes options in my container app bicep file.
While it appears like everything is correct in the portal, when I try to startup the container it fails to start and eventually times out, with the following in the system log:
MountVolume.SetUp failed for volume "<volumename>" : rpc error: code = Internal desc = volume() mount //<storageaccount>.file.core.windows.net/<storagefolder> on /var/lib/kubelet/pods/<guid>/volumes/kubernetes.io~csi/<volumename>/mount failed with mount failed: exit status 32
Mounting command: mount
Mounting arguments: -t cifs -o ,file_mode=0777,dir_mode=0777,actimeo=30,mfsymlinks,nosharesock,<masked> //<storageaccount>.file.core.windows.net/<storagefolder> /var/lib/kubelet/pods/<guid>/volumes/kubernetes.io~csi/<volumename>/mount
Output: mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)

There doesn't appear to be much more I can do to resolve this. I have tried giving the container app a role assignment to the storage account, tried several different file paths, turning off Secure transfer required. Both the container environment and storage account are on the same VNet and region.
Is there anything else I can do to resolve this issue?

Hi @Steve887 , there are several reasons that may cause this error, for example, the accesskey is not right, the network is not blocked or allowed to access the storage account.
could you check your settings according to https://learn.microsoft.com/en-us/troubleshoot/azure/azure-kubernetes/fail-to-mount-azure-file-share#mounterror13?

@njuCZ
I have checked those things. The container environment and storage are on the same VNET. Storage is set to most Maximum Compatibility and the storage key is correct.
Can you confirm if I need to supply a Kubernetes secret resource? I would assume since it's a managed service I wouldn't need to do any Kubernetes setup myself?

@Steve887 can you DM me your container app arm resource id so I can take a check?

@Steve887 you could send email to acasupport at microsoft.com with your arm resource info and we could take a check

I believe I worked it out. I had two issues: I was trying to map to a subfolder in the storage account, which doesn't seem possible, and the container app apparently needs at least Contributor access to the storage account to map the volume. After doing both of these things by storage is mounted correctly.

@Steve887, container app also supports mounting a storage account subpath by specifying the subpath property in the volumeMount


Proguard fails on latest version of sdk

Running the latest version (3.0) of the sdk fails when proguard is enabled with the below:
Warning: com.optimizely.ab.config.parser.JacksonConfigParser$ProjectConfigModule: can't find referenced method 'com.fasterxml.jackson.databind.module.SimpleModule addDeserializer(java.lang.Class,com.fasterxml.jackson.databind.JsonDeserializer)' in program class com.optimizely.ab.config.parser.JacksonConfigParser$ProjectConfigModule

Thanks for reporting @matt-harris-mc . We are looking into this.

hi @matt-harris-mc what proguard rules are you using?

can you try the following:
can you add the following to your proguard rules?
-keep class com.fasterxml.jackson.** {*;}

We have a set of rules locally that we use for other stuff, but I was under the impression any required rules are automatically included in the aar. Are you worried that we possibly have rules that conflict with those?

@thomaszurkan-optimizely I added that line to my proguard file and it is still failing with the same message. Also reverted to 2.1.4 to confirm my build is still working and it is not something else local to me.

so, 2.1.4 works and 3.0 doesn't?

Yep 2.1.4 is building without issue.

compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.8'

are you compiling in jackson-databind?

We are not using it directly or even indirectly. It looks like the only reference to jackson we have is in a progaurd section we have included (commented as for firebase): -keepnames class com.fasterxml.jackson.** { *; }

hmm, if you add the jackson-databind in there i would assume it would work.  we are looking into a solution.  thanks!

Yea it looks like adding that lib as a dependency does fix the issue. Going to hold on 2.1.4 for now though. Thanks for the quick responses.

could you try not compiling with jackson databind and instead add  -dontwarn com.fasterxml.jackson.databind.**?  to see if that works

@thomaszurkan-optimizely Are you saying to leave out jackson-databind and add the proguard rule? Gave that a try and it still fails.

Hi guys,
Any new information about this? We are facing the same issue with the 3.0.0 SDK.

Also running into this issue. Using a -dontwarn com.optimizely.ab.config.parser.JacksonConfigParser$ProjectConfigModule until this gets fixed.

@matt-harris-mc compile 'com.optimizely.ab:android-sdk:3.0.1'
Sorry it took so long.  We fixed the other issues as well.  Thanks.

https://github.com/optimizely/android-sdk/releases/tag/3.0.1


Unchecked growth in Search Service due to documents not being deleted when CosmosDB TTL expires

Description
We've encountered an issue within the azurechat application related to document indexing and deletion. Although the application is designed to upload documents to Azure Search Service, it seems that deletion of documents is not handled properly in all scenarios.
Problem
When users upload documents to chat in azurechat, these documents are indexed in Azure Search Service. When chat threads are deleted via the UI, the deleteDocuments function within the azure-cog-vector-store.ts correctly removes the corresponding documents from the Search Service index.
However, if the thread is automatically removed once the time-to-live (TTL) period for the Cosmos DB history table is reached, the associated documents remain in the search index. This is because the deleteDocuments function is not triggered when the TTL mechanism deletes the thread.
Consequence
This leads to unchecked growth in the Search Service as orphaned documents accumulate, which becomes problematic over time. This incurs unnecessary costs, given that the Search Service is a premium component of this application.
Potential Solutions
Implement a background process that checks for documents associated with threads that are close to their TTL and explicitly calls deleteDocuments before TTL expiration.
Reevaluate the TTL strategy by possibly introducing a soft-delete mechanism where records are flagged as deleted and then purged systematically by a cleanup service.
Request
We need to design and implement a solution that ensures documents are consistently deleted from the Search Service index when their corresponding threads are no longer present. It's critical for managing expenses associated with the Search Service.

Yes, I have the same issue. We should have a background job that will check and clean up in Azure Search index

If you set TTL on CosmosDB - History container then in version 2, Extensions and Personas configuration will be deleted automatically as well.

Anyone have a quick solution to this issue? I want to set TTL on my history container. First I will move personas and extensions to config. Then I will need to have a process of removing the documents from the index near TTL expiration for history.


fix: Fix mobile view error

Signed-off-by: ErikQQY<EMAIL_ADDRESS>

@ErikQQY it's still not fully right:

@ErikQQY any update?

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


JMX monitoring of connections

I have been trying for a full day now to get JMX monitoring of my connection pool working.
There is a wiki page under brettwooldridge that documents how to do this:
https://github.com/brettwooldridge/HikariCP/wiki/MBean-(JMX)-Monitoring-and-Management
I attempted to do just that and I am receiving the following error:

Here is my code snippet:

My googling skills haven't yielded many results.  Most seem to imply that this configuration should work.  The datasource jmx does appear, so that is good.  But it doesn't give me all the data I want about the connection pool.

Any help would be much appreciated.  If you need more information just let me know!
Thank you in advance.

Of course my issue is #666, totally fits!  This is my nightmare!

HikariCP is designed for two different configuration patterns in mind: 1) configuration through the HikariConfig class, or 2) direct configuration of the HikariDataSource.
If your case, you have combined the two, which is not valid.  If you are using the HikariConfig approach, you need to call setRegisterMBean(true) on that object instead of the DataSource.  And that call needs to occur before the HikariDataSource is created.

You were absolutely right.  As soon as I changed it to be valid it worked as expected.  Thank you for the quick response.


remove PATH commands from .bashrc

references:
http://superuser.com/questions/789448/choosing-between-bashrc-profile-bash-profile-etc
http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html
https://en.wikipedia.org/wiki/Bash_(Unix_shell)#Startup_scripts

Done.


[Get] Only instantiate Repo objects once for items in Packages.

The old algorithm was O(N^2)... this gives a 3x speedup in null build time
for a large project (Zewo).

@mxcl can you review at some point? I'm not entirely sure this is safe, but it is a big win if so.

Possibly a problem because repo paths change during the Get and Update processes based on which checkouts are selected and the Git.Repo path is not changed.
Probably it's fine because the renames happen last. But may be better to just figure out why Repo.init is slow.

It is slow because it shells out to git to check things... that said I'm worried about anything which is O(N^2) even if we made it much cheaper...
I was worried about the situations you mentioned, but couldn't get it to fail in any cases. We could always force invalidation like the last bit of the patch does in any other places that updates the repo.
What should we do here? I'd really like to see something like this merged just for the Zewo perf win.

The initializer is:
    public init?(path: String) {
            guard let realroot = try? realpath(path) else { return nil }
            self.path = realroot
            guard Path.join(path, ".git").isDirectory else { return nil }
        }

It seems like origin is the slower function?
However I imagine this is safe since you identified the place where invalidation should happen.
I worry about this sort of thing however. The slow part of all this is the HTTP.

I'm going to go ahead and take this once it passes CI, if there is fallout then that is probably useful to identify and codify in test cases, and I really want to see the perf win land.

@swift-ci please test and merge

Linux failure is unrelated.


Add comment to travis.yml

2cbbe384b8d0d27af3aacc62ab860be9c7cba273

24th of the 10th 2022 to the fourth of the 11th 2022 root 8:30 am Ventnor Isle of Wight


Quick language fix

Just added a word to fix the language.

Thanks for merging! @enclave, do you have a second to chat about this project? I have a few questions. Mind shooting me an email to matt.kadenbach at gmail.com or @mattes on telegram/ discord? I couldn't find your contact details. :-)

+1


Feature/dropdown

:tada: This PR is included in version 1.17.0 :tada:
The release is available on:

GitHub release
npm package (@latest dist-tag)

Your semantic-release bot :package::rocket:


Fix mouse wheel not working in PLATFORM_RPI or PLATFORM_DRM

In the meantime (just to not leave the mouse wheel broken) I think the problem was sharing the same variable for holding both "the event" and "the current" value since they run independently.
GetMouseWheelMove() returns the CORE.Input.currentWheelMove (L3949-L3959). But that is always zeroed by PollInputEvents() (L5065) when it runs on EndDrawing(). So the event.value (L6680) never ends up staying on CORE.Input.currentWheelMove long enough before it gets zeroed. This could be solved by storing the event.value in a new CORE.Input.eventWheelMove (R471, R6682). And, after updating the CORE.Input.currentWheelMove (that is what GetMouseWheelMove() needs), reset the CORE.Input.eventWheelMove instead (L5065-R5067).
Tested the fix successfully for PLATFORM_DRM on Raspberry Pi 3 Model B 1.2 with Raspberry Pi OS (11 Bullseye) 32-bit armhf.
Fix https://github.com/raysan5/raylib/issues/2660.
Edit: added line marks.

@ubkp thank you very much for reviewing this issue! As always, a great description of the issue and a great fix! Your contributions to raylib are really appreciated!


Add types to represent NGEP entities in EP

Relevant information
Creating new entities to represent new NGEP entity types in EP. These new types will eventually replace the NR1|FLEET entity, and the AGENT|* entity types.
Checklist

[x] I've read the guidelines and understand the acceptance criteria.
[ ] The value of the attribute marked as identifier will be unique and valid.
[ ] I've confirmed that my entity type wasn't already defined. If it is I'm providing an explanation above.

gc build


Support for hipchat cards in notifications

https://developer.atlassian.com/hipchat/guide/sending-messages
To support cards, alertmanager would have to accept a card config and pass that along to the hipchat API when sending a notification. The card is defined as a JSON object with various objects, could be easy enough to just create a basic template that creates the necessary JSON.

Would you like to send a PR to add that?

I'm taking a look at this just now. The first obstacle I've hit is that notifiers don't appear to be very testable. With most calling ctxhttp.Post() directly, there's no opportunity to intercept their output and validate what they're doing.
My first thought is to inject a Doer with the same signature as ctxhttp.Do() into Notify(), as per Peter Bourgon's recommendations (see Logging and Instrumentation). This would help for all of the current Notifiers bar Emailer. I can't think of a more generic way of dealing with this right now, but I'm pondering it.
@brian-brazil I'd appreciate your thoughts on this, in particular:

Would you be happy for me to alter the signature of Notify()?
Can you think of a better way to do this, that would work for Emailer, too?

@brian-brazil in case this is still relevant, could you follow up on @rossmcf comment?

Normally in Go you'd create a test http server and then check what was sent.

HipChat being phased out (https://github.com/prometheus/alertmanager/issues/1930) I'm closing this issue.


fix: Initial conditional expression support

Fixes: #1860
Successfully parse existing mapping conditional expressions

No widget tokenization yet - that's next.

@riccardo-forina - wdyt?  This gets the expression component  classes introduced.


Support for Object.hasOwn (lib.d.ts and narrowing)

Object.hasOwn(obj, key) has just moved to stage 3.
https://github.com/tc39/proposal-accessible-object-hasownproperty

Discussed a bit with @jamiebuilds offline. Some key scenarios and questions to resolve:
declare const ra: Record<string, any>;
if (Object.hasOwn(ra, "foo")) {
  ra.foo; // should be 'any'
}

declare const ru: Record<string, unknown>;
if (Object.hasOwn(ra, "foo")) {
  ra.foo; // should be 'unknown'
}

declare const abcd: { a: string, b: string } | { c: string, d: string };
if (Object.hasOwn(abcd, "a")) {
  abcd.b; // should be OK
}
// Should this be OK?
// Could argue either way
Object.hasOwn(abcd, "efg")

// TODO: Add more use cases + desired behavior

Should this be a catch-all issue for hasOwn guards? Doesn't https://github.com/microsoft/TypeScript/pull/43947 already hande hasOwnProperty specially?

declare const abcd: { a: string, b: string } | { c: string, d: string };
if (Object.hasOwn(abcd, "a")) {
  abcd.b; // should be OK
}

I don't like it, but we already did it for in.
I think one concern I have is making sure that the else branch doesn't narrow out anything that does have that property. Specifically this:
declare const abcd: { a: string, b: string } | { c: string, d: string };
if ("a" in abcd) {
    abcd.b; // okay
}
else {
    abcd.c // okay
    abcd.d // okay
}

in currently does a negated narrowing because of the prototype walk, but hasOwn won't. In theory, it would be more correct to keep the type of abcd as { a: string, b: string } | { c: string, d: string } in the else branch. But maybe that's too pedantic.

Object.hasOwn has reached stage 4 and is finally in GA of V8/Chromium-based browsers/Node.js.
It's a time to update lib.es5.d.ts.

Since there doesn't seem to be much progress here, could I help with this in any way?

This feature is, AFAIK, now Stage 4 and scheduled to be part of this June release of ES2022. It would be wonderful if it could do narrowing, because I wouldn't be surprised if it will eventually replace most usages of Object#hasOwnProperty(hasOwn is safer) and the in operator(hasOwn doesn't have to go through the prototype chain).

fp-ts has a totally good implementation: https://github.com/gcanti/fp-ts/blob/2.11.9/src/ReadonlyRecord.ts#L249
Could probably just copy it verbatim, it's pretty good.

I'm using this, I suggest others try it out and if there are no issues, we merge this baby :)
export const hasOwn = <RecordKeys extends string>(
  record: Readonly<Record<RecordKeys, unknown>>,
  key: string,
): key is RecordKeys => {
  return Object.prototype.hasOwnProperty.call(record, key)
}

(PS I basically copied from fp-ts has function)

@devinrhode2 That approach has a lot of flaws
This is the current definition I'm using:
export type SetRequired<BaseType, Keys extends keyof BaseType> =
    BaseType &
    Omit<BaseType, Keys> &
    Required<Pick<BaseType, Keys>>;

interface ObjectConstructor {
    hasOwn<BaseType, Key extends keyof BaseType>(record: BaseType, key: Key): record is SetRequired<BaseType, Key>
    hasOwn<Key extends PropertyKey>(record: object, key: Key): record is { [K in Key]: unknown }
}

hmm... not working in the one case I'd like it to work
let role = 'adsf'
const rolesConst = {
    'admin': 'admin',
    'user': 'user'
} as const
if (!Object.hasOwn(rolesConst, role)) {
    throw new Error('Unknown role: ' + role)
}
role // Should not be `string`
// assert<IsEqual<typeof role, keyof typeof rolesConst>>()

@devinrhode2 If you make role a const or if you type it to be keyof typeof rolesConst it will work. So overall it can still cover more cases

Maybe the fp-ts version should require the object to look like a const (have "readonly" modifiers)
And it doesn't look like a const, recommend using your version?
How could we get the best of both worlds?!

Actually, as strange as it is, I am actually going to tweak the fp-ts type a little, for key I am going to accept any. Because, in my case, a "string" coming over the wire could actually shake out to be a number for all I know.
export const hasOwn = <RecordKeys extends string>(
  record: Readonly<Record<RecordKeys, unknown>>,
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
  key: any,
): key is RecordKeys => {
  return Object.prototype.hasOwnProperty.call(record, key)
}

(forgot boolean in that screenshot, but it also works fine, just returns false like the others)

This allows me to both cleanup type-guards before calling hasOwn (I don't need to ensure it's a 'string' type) and encourages callers to just pass in anything. Because any nonsense will get caught and/or filtered out.

Is there a benefit to using any instead of unknown? I'm fairly confident they're the same type, but unknown is generally preferred to any. I'm not completely sure if there's already precedent here for using any though.

When I'm passing a parameter into this util, the type is unknown.
I broke my own holy rule, document decisions. I recall trying to use unknown first but maybe I was getting a type error on the return type? Or maybe on hasOwnProperty.call...
Anyway, I found any was preferable, you literally can pass anything into hasOwnProperty and it gives a correct return value.

Here's a playground with a possible implementation.

Just for good measure, I really just copied source from fp-ts project. Actually the type guard there was originally implemented in this PR: https://github.com/gcanti/fp-ts/pull/1075 by @gcanti
As such I think it'd be good to seek a "thumbs up lgtm" from @gcanti before this slips into core :)

@jamiebuilds is there a better way to write the code snippet I provided?

Given a list of known good user roles (const array/object/enum, rolesConst)
Check if an unknown string role is part of this list (has(rolesConst, role), rolesConst[role] !== undefined, role in rolesConst)
If it's part of this list, the type should be a union of the known good user role names

I did experiment briefly with a const array approach but opted to go with const object instead because i liked being able to write code like:
if (role === rolesConst.admin) { ...yay }

As opposed to:
if (role === rolesConst[2]) { ...ew }

Maybe this is an edge case where a const enum would be useful, idk.
=====
Did some hacking on the test cases, was able to add a few failing test cases for narrowing of a string key (2nd argument) passed in.

Another idea I've had is that if/when #49220 or #33471 become reality, the Object.hasOwn type can use unknown | RecordKeys to suggest through intellisense that the inputted key be a member of RecordKeys, but still support narrowing the type of key.

ES2022 has Object.hasOwn support

I'm happy to PR in this implementation (i added my narrowing implementation on top of the current base) if the maintainers are wanting it.

@nicolas377 doesn't pass as many test cases as my last example
But, idk how valuable these test cases are, it's been a minute, and I didn't originally write them. Regardless, I assume we want to get as many of those passing as possible. When I swap in your implementation, it goes from 8 failing tests to 27 :(

Wouldn't you need exact types here otherwise you could do:
const result: { a: string } | { b: string, c: string } = { a: '', b: '' }
if (Object.hasOwn(result, "b")) {
  result.c; // should NOT be ok
}

Otherwise we would need some type of absent key type:
declare const result: { a: string, b: nokey } | { b: string, c: string } = { a: '', b: '' } // Would fail

/** Extract from T those types that has K keys  */
type ExtractByKey<T, K extends keyof any> =
  T extends infer R
    ? K extends keyof R
      ? R
      : never
    : never

module global {
  interface ObjectConstructor {
    /**
     * Determines whether an object has a property with the specified name.
     * @param o An object.
     * @param v A property name.
     */
    hasOwn<T extends Record<keyof any, any>, K extends keyof any>(
      o: T,
      v: K
    ): o is ExtractByKey<T, K>;
  }
}

Try this, this works for me

/** Extract from T those types that has K keys  */
type ExtractByKey<T, K extends keyof any> =
  T extends infer R
    ? K extends keyof R
      ? R
      : never
    : never

module global {
  interface ObjectConstructor {
    /**
     * Determines whether an object has a property with the specified name.
     * @param o An object.
     * @param v A property name.
     */
    hasOwn<T extends Record<keyof any, any>, K extends keyof any>(
      o: T,
      v: K
    ): o is ExtractByKey<T, K>;
  }
}

Try this, this works for me

So to clarify to myself and others a thing or two:

this is strongly related to https://github.com/microsoft/TypeScript/issues/41915 as Object.prototype.hasOwnProperty() is an older and less safe version of Object.hasOwn().
the less performant and still potentially unsafe version, the in operator (which might still have its very limited and rare use cases, but in a modern project it should almost never be preferred over the top ones) has a narrowing implementation in TypeScript, so people will most likely only use the in version because of this in TS projects
how is in considered good enough to have a narrowing type but the others aren't? Is the in operator actually type safe? Or did it get its narrowing functionality back when the devs of TS didn't know any better?

Totally guessing, but it's probably due to its unique syntax
On Tue, Dec 12, 2023 at 5:36 AM F. Levi @.***> wrote:

So to clarify to myself and others a thing or two:

this is strongly related to #41915
https://github.com/microsoft/TypeScript/issues/41915 as
Object.prototype.hasOwnProperty()
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty
is an older and less safe version of Object.hasOwn()
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwn
.
the less performant and still potentially unsafe version, the in
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/in
operator (which might still have its very limited and rare use cases, but
in a modern project it should almost never be preferred over the top ones)
has a narrowing implementation in TypeScript, so people will most likely
only use the in version because of this in TS projects
how is in considered good enough to have a narrowing type but the
others aren't? Is the in operator actually type safe? Or did it get
its narrowing functionality back when the devs of TS didn't know any better?

—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/TypeScript/issues/44253#issuecomment-1851865834,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAEDZKHBJZUKPTIXAL253SDYJA6S5AVCNFSM45P6SZZ2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBVGE4DMNJYGM2A
.
You are receiving this because you were mentioned.Message ID:
@.***>

// https://github.com/microsoft/TypeScript/issues/1260#issuecomment-1288111146
// Creates a union of all keys of all objects in the Terface union
type AllKeys<Terface> = Terface extends any ? (keyof Terface & (string | number | symbol)) : never;
// Creates a new interface adding the missing keys to Terface
type Wrap<Terface, Keys extends string | number | symbol> = (Terface & {
  [K in Exclude<Keys, keyof Terface>]?: undefined;
});
// Distributes the union and automatically add the missing keys
type NicerUndefineds<Terface, Keys extends AllKeys<Terface> = AllKeys<Terface>> = Terface extends any ? Wrap<Terface, Keys> : never;

declare global {
  interface ObjectConstructor {
    hasOwn<
      K extends string|number|symbol,
      O extends Record<any, any>,
      OK extends NicerUndefineds<O> extends { [k in K]?: infer VType }
        ? { [k in K]: VType } & O : { [k in K]: unknown } & O,
    >(obj: O, k: K): obj is OK;
  }
}

I'm seriously tired of all of these. Finally I can proceed with my day.
Thank you too.

any progress on this one?

I believe this awaits someone's PR, right?

Yes, we're awaiting a PR. This is a pretty complicated problem to solve, as you may have noticed from the discussions above. There are a couple of proposed solutions, but I think it'd be a good idea to gather use/test cases for .hasOwn() and build the definition off of that. That's my opinion though. I'm unable to contribute at the moment, but I'll get some more time soon, and I'll definitely be returning here.

@furkanmustafa

Thank you too.

Actually "no thank you" to me. My code doesn't satisty most of the requirements demanded here.
My latest tests confirm that the second implementation by @ziloen above makes all of the tests happy.
Tested every case stated above. Also tested a rather large codebase in our project. All works fine.
Last question would be, how to solve the sad ts-expect-error mark there.

This is still not being addressed in any PR?
Currently there is no type inference after the use of hasOwn
if (
        Object.hasOwn(obj, "prefix") && obj.prefix // <---- not being inferred as a valid key
    ){/** etc */}
    ``

Our use case for Object.hasOwn() is to avoid the in operator as a type guard for objects which should explicitly not return true for a property inherited via the prototype chain.  For such cases, Object.hasOwn() can prevent prototype pollution vulnerabilities.
From a secure coding perspective, I might suggest that as a general rule Object.hasOwn() should always be preferred over in--unless in is really what you mean.


Updated Libuiohook dependency to the latest version (1.1) 🎉

Updated dependency 'libuiohook' to the latest version to resolve #58 and more Window build problems.
Description

Updated Libuiohook
Updated CMake
Updated appveyor build to reflect new CMakeList changes

Motivation and Context
Resolves #58
How Has This Been Tested?

Tested locally and checked builds.
Please test @abhishekgargg @hrishabhkumar @Djiit @skyrocker

Screenshots (if appropriate):

Types of changes

[X] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[X] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[X] My code follows the code style of this project.
[  ] My change requires a change to the documentation.
[  ] I have updated the documentation accordingly.
[  ] I have added tests to cover my changes.
[  ] All new and existing tests passed.

This is madness ! Merging this now. Will be shipped in 0.1.14


umap fitness metric

Is there an metric within UMAP which provides an overall scalar for the error in the embedding? Perhaps it could be useful to provide a function umap_score(data, embedding) in the API to call the loss function directly for use cases such as:

Running UMAP on the same data generates slightly different results - is any better than the rest?
If the data changes over time, can we measure the error introduced in keeping the previous embedding?

I haven't really found any scores that are both reasonably computable and actually useful, so for now there is nothing like that unfortunately.


Nodes on the chain with GPUs has be querable

Users of the grid need to be able to find and query available nodes that has GPUs

[x] allow a node to set gpu to true/false
[x] add client methods
[x] add graphql indexing

https://circles.threefold.me/project/tf_engineering_coordination/us/70?kanban-status=2521

How we implemented https://github.com/threefoldtech/tfchain/pull/726 is pretty generic in a way that the concept allows to set an extra price for additional "features" that a node has. So querying this storage map gives a list of nodes that have an extra price attached which can then be queried via RMB for a list of features (gpu, high end cpu, ...)

We came to the solution that we will store a boolean in a seperate storage map that indicates if the node has a GPU or not, this can be set by the node itself and also be queries by the clients.

Verified on devnet.
tfchain
from polkadot UI -> Chain State -> tfgridmodule nodes with gpus can be queried using nodeGpuStatus

and extra fees can be queried from Chain State -> smartContractModule -> dedicatedNodesExtraFee

graphql
Nodes with gpu can be queried from graphql as seen in https://github.com/threefoldtech/tfchain_graphql/issues/104#issuecomment-1596944403


wintertodt: Adjust banking logic to deposit everything except hammer if fixBrazier is enabled

This change aims to make the banking more human-like when you have the fix brazier option enabled by having the script not deposit and withdraw the hammer everytime it banks anymore.

Closing this PR and redoing it for development branch.


Bug: fixing the colour alignment of everything in black and white mode

the current dark mode , some text are black which makes it not visible

more like the invert is wrongly put

more like the invert is wrongly put

@sivaprasath2004 has completely messed the design.
So @Che140401 I want you to please fix the design like it was before please 🥺

no need for this now.


Standalone application?

From the screenshots, WPFHexaEditor looks great.  Is there a standalone application using it, like a general purpose hex editor?

From now it's only a components  for using in apps. In future I want to make complete apps for it

I'm excited :)

Before working on it I want work on file format detector with for visual view of file format (with background color, tooltip etc...)

Fow now i'm plan to only make a good user control.
I think do have the time to make a complete stand alone app.


feat(schema): set minItems and maxItems in JSON schema for tuples

Change Summary
We didn't enforce the length of the tuple in the JSON schema. We could hence set smaller or longer tuples.
Also handles case of empty tuple by not setting items at all to fix #2496

Related issue number

Checklist

[x] Unit tests for the changes exist
[x] Tests pass on CI and coverage remains at 100%
[x] Documentation reflects the changes where applicable
[x] changes/<pull request or issue id>-<github username>.md file added describing change
(see changes/README.md for details)

I'll wait for #2375 before updating this PR. If I should update it before please tell me

please review 🙏

Thank you.


inputmask.option method bug

Hi, I have a problem when I use inputmask.option method to update the existing mask option, the input is displayed incorrectly value
Please see: https://codepen.io/yuneath/pen/rNrQVzP?editors=1010

@yuniit ,
Probably not working because that property ius used to build the initial mask.  I need to review the option again to verify.


Add feature to check for ObjcProvider linker info availability

Some rulesets inspect linking information from ObjcProvider and fallback to CcInfo only if a rule doesn’t propagate an ObjcProvider. After 7.0.0-pre.20230724.1 a ObjcProvider will exist, but it won’t have any linking information set.

For future reference, can you put a link to the relevant Bazel change in the PR description or code comment?

Added to both.


Package and make pip installable

I'll send a PR your way to make this package installable with pip and so you can upload it to PyPI as well. I'll also add some nice entrypoints so you don't have to write python -m ...

Absolutely! The ability to pip install this package is crucial for others to use it as part of their applications.


developer account

hello sir ,is there any sandbox account in ccavenue for testing purpose ???

There is no sandbox account.
But you can use dummy card number 4111 1111 1111 1111 to test for a unsuccessful transaction.
This things in mentioned in CCAVenueWorldIntegrationManual pdf.
Read this:
https://world.ccavenue.com/downloads/CCAVenueWorldIntegrationManual.pdf


Add MSE Optimizer

The goal of this issue is to implement MSE Optimizer.
I have tested it on CNN models and Transformer-typed models(but not LLMs), mse worked pretty well. What's more, MSE is simple and intuitive.

Feel free to give it a try implementing your own Optimizer classes.


[WIP] ENH add explained_variance to PCA

closes #2341. this is written to return an optional explained_variance. I am not sure if this is pythonic. The other option would be to make a separate function but then it wouldn't be DRY.

@teonlamont : I was thinking more in terms of adding an attributed called explained_variance_ to the proj object instead of returning it in every function. More along the lines of sklearn API ...

i'm fine with that. that actually makes more sense ;)

Actually instead of creating a new constant, maybe we can just reuse mne_ica_pca_explained_var   3605 ? "PCA explained variance" from (mne-fiff-constants) [https://github.com/mne-tools/mne-fiff-constants]? Maybe we could even just rename it to a more generic mne_pca_explained_variance (with the same value) and use it both places. Then we can add it to our projectors when we save and load them. We'd want to check that the C tools could still read it, though.

Actually instead of creating a new constant, maybe we can just reuse mne_ica_pca_explained_var 3605 ? "PCA explained variance" from mne-fiff-constants?

that sounds like the way to go. I guess for older proj files without this file, we would return None?

Yeah. If the value is None (default for constructor), don't write the value. If non-None, write the value.

...but before you work on that, get me those head point .txt files please :)

the errors in the travis built is due to the gamma inverse map. ready for review

I restarted the builds, in theory they should come back okay

LGTM. Have you tried loading the projectors saved this way with the MNE-C tools? You can do it by creating some on raw data in mne-python, saving them, and going into mne_browse_raw and trying to apply them to the loaded data.

just noticed two things with the comparison: 1. the saved file stores it as the explained_var as a float32 whereas the generated one is float64. 2. the saved file is loaded as an array and the generated one is float.

Both of those things actually true of almost all our reading functions (float64 gets cast to float32; everything ends up being array). If you really want you can do float(val) when reading to ensure it's a singleton.

oh ok, i don't know the test passed then. would it be better to do an assert_array_almost_equal for the comparison. I am also trying to do the mne_browse_raw. I am having some x11 problems (I rarely use the mne-c functions)

you can use mne_process_raw probably too and avoid X11 altogether

ok, that worked. it didn't break the binary commands however upon saying the projectors with the explained_var, this is not written into the binary actions (understandable) so the saved file has the entry explained_var but it is empty.

Excellent. I guess if you add the tests for explained_var some reasonable amount greater than zero, especially in our preprocessing tests, it should be good to go.

... I think you meant to put [ci skip] in that commit message. I'll kill the builds :)

lol. i couldn't remember what it was ;) what is the test I should add to the preprocessing, just assert that proj['explained_var'] > 0?

Nah something bigger preferably. See how high our EOG and ECG vectors do in testing. Hopefully at least the first component is pretty big > 0.2 at least. If it's 0.05... it's not great. So I'd say make sure they're above a reasonable lower bound and less than or equal to one -- here "reasonable" I guess means the biggest nice looking number you can find such that x > lower_bound.

Setting the threshold that way will allow us to see how we're doing in terms of explained variance, and make sure we don't introduce regressions in our SSP code.

I've used this sort of highest-nice-bound technique in the Maxwell filtering tests to set the minimum and median bound check in a custom assert_meg_snr function, e.g.:
https://github.com/mne-tools/mne-python/blob/master/mne/preprocessing/tests/test_maxwell.py#L219
It seems to be working well so far to spot regressions.

Some components are explaining a lot, some aren't.
In [8]: ssp_eog = [proj for proj in projs if proj['desc'].startswith('EOG')]
In [9]: proj['explained_var'] for proj in ssp_eog]
Out[9]: [0.12477206325547088, 0.072218770574639407,
         0.36892777667722315, 0.15824328731324769,
         0.91739351958113013, 0.039492122694309253]

I'd look at the first component of each channel type probably. I bet that's what the first column is already. And that's about what I'd expect: EEG (last) is highest, mag (second) is next, followed by grad (not awesome). So I'd take that first column and use it (with some comment about why) and ensure each is greater than 0.1, 0.3, and 0.9 respectively, and less than or equal to one.

(and I'd do something similar for ECG, too)

got it. and nice, you were spot on.
In [10]: {proj['desc']: proj['explained_var'] for proj in ssp_eog}
Out[10]: {'EOG-eeg-998--0.200-5.000-PCA-01': 0.91739351958113013,
          'EOG-eeg-998--0.200-5.000-PCA-02': 0.039492122694309253,
          'EOG-axial-998--0.200-5.000-PCA-01': 0.36892777667722315,
          'EOG-axial-998--0.200-5.000-PCA-02': 0.15824328731324769,
          'EOG-planar-998--0.200-5.000-PCA-01': 0.12477206325547088,
          'EOG-planar-998--0.200-5.000-PCA-02': 0.072218770574639407}

@teonlamont can you update a test to read and write the proj which has explained var in it?

@jasmainak that's taken care of in https://github.com/mne-tools/mne-python/pull/2703/files#diff-9c603f5cb5c525cc07ef4656938182c3R102

@jasmainak that's taken care of in https://github.com/mne-tools/mne-python/pull/2703/files#diff-9c603f5cb5c525cc07ef4656938182c3R102

excellent!

I think it's ready

thanks @teonlamont


Add option to load a Safe from owner

Description
This pull request introduces the capability to load the safe-cli from an owner's address. The process involves:

Executing safe-cli with the --is-owner option.
The safe-cli displays the available Safe addresses associated with the provided owner.
Upon selection, the safe-cli loads the chosen safe.

More changes

Change safe_address argument to address that can be a Safe address or an owner address
Add option is-owner to indicate if the provided address is an owner

Closes #13

coverage: 93.375% (+0.3%) from 93.053%
when pulling 8f17f0c65ed305bc93ac70750829c12f93d99ab3 on add_owner_initializer
into b91858fff4a5c96c98dd36581ac3f3b4d3926a9e on master.


Feature generics

The class definition for features could be modified to include a generic type parameter to specify what type of geometry a feature holds. e.g.
class Feature<out T : Geometry?>(
    val geometry: T
// Rest of Feature class definition...

val p: Feature<Point> = Feature(Point(...))
p.geometry // is Point

This would facilitate passing Features in to turf functions as noted in #71.
Pros

Feature geometry can be made type-safe, reducing the number of runtime type checks on a feature's geometry in some cases
The Turf port can take advantage of this allowing for only certain types of features to be passed into some functions

Cons

Collections of features often hold many different types of geometry so any type-safety gains from this feature would be lost,  and either star-projection or filling the generic type with Geometry or Geometry? repeatedly would be required.
Some Turf function signatures will conflict for specialized feature overloads. e.g. length(feature: Feature<?>, ...)

Open Questions

Should FeatureCollections have a generic type applied to them too?

FeatureCollection<LineString> // denotes a collection of LineString features

Should the properties of the feature class also be made a generic type to allow for type-safe feature properties?

Regarding the cons, is it despite to use a generic type parameter? Then I'd like to open a PR for it. I think a FeatureCollection shouldn't have a generic type parameter. Cause the features could be polymorph so in many cases it would be FeatureCollection<Geometry>, which may be some overhead to define it every time.  Even on updating/edit a collection this type parameter may have to be updated, this is unhandy on consumer side.


When not to use QUIC

Hi. I've been planning to understand the protocol and contribute. I came across this  post while digging. I have a few questions

Are the numbers exaggerated as per your experience?
What are the drawbacks of using QUIC?
Is it suitable for IOT workloads where packet sizes are small (ranges from bytes to few kilo bytes)
Are any of the issues in the post solved in newer versions of the draft?

Hi, thanks for your questions!
Honestly, as far as I know we haven't done any extensive benchmarks on Quinn or QUIC. So far we've found that Quinn performance is not bad when compared to other implementations, but of course none of these implementations are very mature compared to the TCP world. Also given that the protocol lives in user space, there might be wins in moving more of the packet handling into userspace as well using something like DPDK, but we don't have experience with that either. We also haven't done any tests in that direction, although we've taken care to separate our protocol logic in a separate crate so that it would be potentially not as hard to plugin different network layers.
We do know that our Connection type takes up a relatively large amount of memory (on the other of a kB) and that doesn't even count some of the buffers yet, so memory use might be an issue on some kinds of IoT.
As far as I know QUICv1 changes haven't really optimized for these sorts of use cases even in later drafts, but I'm not very closely plugged in to the reasoning behind protocol changes. @Ralith might know more here.
Bottom line: I don't think there are any easy answers here and you'd probably want to run some benchmarks specific to the scenario you have in mind to figure out if QUIC/Quinn will serve your needs. We are generally quite responsive to PRs and issues, so happy to support you if you decide to dig in a little. We're also usually responsive in our Gitter channel if more synchronous dialogue would help.

We are generally quite responsive to PRs and issues, so happy to support you if you decide to dig in a little

Awesome. I might be able to help with numbers w.r.t a real world use case. I'm implementing an mqtt broker which supports both tcp and quic

Are the numbers exaggerated as per your experience?

I think that post is incorrect to focus specifically on syscall counts, because it's easy to reduce those under high load (i.e. the only time it matters) using sendmmsg/recvmmsg. ACK rate can also be tuned in a number of ways. However, the overall point is correct: QUIC does require substantially more CPU than TCP. There are various efforts ongoing to mitigate this, ranging from new kernel interfaces and various types of hardware offload.
That said, currently attainable performance should be more than adequate for typical internet applications. Only in cases where extremely high rates data are being exchanged with very little application-level processing should transport performance be a serious bottleneck, fixable issues in a particular QUIC implementation aside.

Is it suitable for IOT workloads where packet sizes are small (ranges from bytes to few kilo bytes)

QUIC has low bandwidth overhead in general, and is fine for low data rate applications. However, the cryptographic handshake involves a number of large packets that may pose an issue for extremely narrow (e.g. <1Kbps) links. QUIC is designed to have a pluggable cryptographic layer and Quinn exposes this, so in principle you could swap out the TLS embedding with something like the noise protocol to mitigate this. Let us know if you want to try that; there are some security implications and the interface may need refinement. Such a scheme would not strictly be standard QUIC, but it's a case we're interested in supporting.

Are any of the issues in the post solved in newer versions of the draft?

QUIC is not specifically trying to be as cheap as TCP; it is a more versatile and more secure protocol and that doesn't come for free. If you don't need to serve 90Gb/s with a 12-core Xeon-D, the difference in cost probably doesn't matter to you. Not all applications are in scope: QUIC will probably never be a protocol you want to use to ship massive amounts of data over a secure, isolated network, unless hardware offload comes a long way.
Lots of effort is being invested in finding ways to make QUIC implementations faster, the focus is in kernels, hardware, and implementation details rather than in the draft itself.

Thanks for the answers @djc and @Ralith


Add License information for use of Docker image

See https://github.com/Senzing/senzingapi-runtime/issues/26

Pull requests:

https://github.com/Senzing/senzing-poc-server/pull/107


Bug: Text repeating on badge page

There is repetition , could you remove the extra information in red red-marked box
Link: https://recodehive.github.io/awesome-github-profiles/pages/githubbadge.html

Please assign me

@sanjay-kv Can you assign this issue to me, Sir?

I want to solve this issue please assign it to me.

please assign me this issue if it is  not resolved yet @sanjay-kv


ERROR: RuntimeError: expected ResourcePool, got Folder for field "pool"

Thanks for this gem!!
The error
ERROR: RuntimeError: expected ResourcePool, got Folder for field "pool"
is given when using the "knife vsphere vm clone command". However, the --resource-pool option is not set and is not listed as required in the help listing.
I had used the --resource-pool option on my first command, misunderstanding what a resource pool was in vSphere. However, we don't use resource pools in our deployment of vSphere. So, I removed it, but this error persists.
I also tried moving the --folder and --dest-folder options around in the command order, but not change.
Here is my command with the sensitive information removed:
knife vsphere vm clone NEWVMNAME
--template OUR_TEMPLATE --datacenter OUR_DATACENTER --ssh-user root
--ssh-password PASSWORD --datastore OUR_DATASTORE
--folder _Templates --dest-folder Servers/Linux
--start STARTVM
--cspec "Ubuntu 10.04 (x64)"
--run-list 'role[base],role[mediawiki_database_master]'
I also tried the command like this, but it returned the same error.
knife vsphere vm clone NEWVMNAME --template OUR_TEMPLATE --folder _Templates
Thanks again for this gem and thanks for looking at this.
Kind regards,
Ian D. Rossi

pushed 0.1.7 w/ fix

Ezra, thanks so much! I will test again and post back.
Ian

Ezra,
I have tried to create a VM with the following command:
knife vsphere vm clone NEWVMNAME
--template OUR_TEMPLATE --datacenter OUR_DATACENTER --ssh-user root
--ssh-password PASSWORD --datastore OUR_DATASTORE
--folder _Templates --dest-folder Servers/Linux
--start STARTVM -VV \
I am receving this error:
DEBUG: Using configuration from /home/idrossi/php-quick-start/.chef/knife.rb
/usr/lib/ruby/gems/1.8/gems/knife-vsphere-0.1.7/lib/chef/knife/vsphere_vm_clone.rb:239:in generate_clone_spec': undefined method config' for #RbVmomi::VIM::Network:0x7f21bff35420 (NoMethodError)
from /usr/lib/ruby/gems/1.8/gems/knife-vsphere-0.1.7/lib/chef/knife/vsphere_vm_clone.rb:178:in run'         from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/lib/chef/knife.rb:391:in run_with_pretty_exceptions'
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/lib/chef/knife.rb:166:in run'         from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/lib/chef/application/knife.rb:128:in run'
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/knife:25
from /usr/bin/knife:19:in `load'
from /usr/bin/knife:19
The command:
knife vsphere vm list --folder Folder/SubFolder
returns a list of VMs in the folder, so the credentials in knife.rb are correct.
Thanks again.

Is there another argument that's missing? That codepath shouldn't be reached unless a custom vlan is supplied...

Ezra,
I'm sorry, yes, here is the command that produced the error:
knife vsphere vm clone NEWVMNAME
--template OUR_TEMPLATE --datacenter OUR_DATACENTER --ssh-user root
--ssh-password PASSWORD --datastore OUR_DATASTORE
--folder _Templates --dest-folder Servers/Linux
--start STARTVM --cvlan VLAN -VV
However, this command, which removes the cvlan argument:
knife vsphere vm clone USCHEFLAB004 --datacenter OUR_DATACENTER  --datastore OUR_DATASTORE  --template CHEFNODETEMPLATE --ssh-user root --ssh-password PASSWORD --folder Lab/Chef --dest-folder Lab/Chef  --start STARTVM -V -V
produces this error:
DEBUG: Using configuration from /home/idrossi/php-quick-start/.chef/knife.rb
Cloning template CHEFNODETEMPLATE to new VM USCHEFLAB004
/usr/lib/ruby/gems/1.8/gems/rbvmomi-1.2.3/lib/rbvmomi/vim/Task.rb:11:in wait_for_completion': CannotAccessVmComponent: A component of the virtual machine is not accessible on the host. (RbVmomi::Fault)         from /usr/lib/ruby/gems/1.8/gems/knife-vsphere-0.1.7/lib/chef/knife/vsphere_vm_clone.rb:186:in run'
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/lib/chef/knife.rb:391:in run_with_pretty_exceptions'         from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/lib/chef/knife.rb:166:in run'
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/lib/chef/application/knife.rb:128:in run'         from /usr/lib/ruby/gems/1.8/gems/chef-0.10.8/bin/knife:25         from /usr/bin/knife:19:in load'
from /usr/bin/knife:19

I was facing the same issue "wait_for_completion': CannotAccessVmComponent: A component of the virtual machine is not accessible on the host.".
So I created the pool and it worked for me:
$ knife vsphere vm clone test-chef --template  --datastore  --chostname  -f nimbus --dest-folder  -VV --disable-customization --resource-pool


need to warn when exceeding map key limits

This may well be an existing issue as I remember reading something from @brendangregg  on this recently in an issue. Please close this if it is a duplicate.
Currently, associative arrays are statically sized to a hard coded value ('max_entries' in map.cpp which is currently 128). When a script exceeds this number of active entries a  write to the hash appears to work and a read from that hash entry returns 0. An example with map.cpp:max_entries set to 8:
# cat broken-maps.bt
BEGIN
{
        @["1"] = nsecs;
        @["2"] = nsecs;
        @["3"] = nsecs;
        @["4"] = nsecs;
        @["5"] = nsecs;
        @["6"] = nsecs;
        @["7"] = nsecs;
        @["8"] = nsecs;
        @["9"] = nsecs;
        @["10"] = nsecs;

        printf("nsecs = %llu\n", @["10"]);
}

# ./bpftrace ./broken-maps.bt
Attaching 1 probe...
nsecs = 0
^C

@[1]:<PHONE_NUMBER>949659
@[2]:<PHONE_NUMBER>958637
@[3]:<PHONE_NUMBER>959973
@[4]:<PHONE_NUMBER>961084
@[5]:<PHONE_NUMBER>962178
@[6]:<PHONE_NUMBER>963548
@[7]:<PHONE_NUMBER>964913
@[8]:<PHONE_NUMBER>966208

Increasing the size of 'max_entries' would be good but it is just a band-aid. The silent write and a read returning 0 causes logic errors in scripts that can be extremely difficult to debug.
If the number of entries is to remain static then we must inform the user that the size has been exceeded and allow them to tune the map size accordingly. Obviously, the most preferable solution would be to have a dynamic map size.

There was another case where we increased the defaults for stack maps. I think in this case we should make that 1024 (at least) to start with, and follow up to see how to print warnings when exceeded.

Re; the "enhancement" label. Of course, any bug can be seen as an enhancement of current behaviour :-) . However, this is actually a bug and quite a nasty one at that as it leads to highly misleading script behaviour owing to the way we just silently drop the write and return 0 for a read. Really needs fixing ASAP.

changed title. At the very least, on program termination we could iterate over all maps and if any has a key count that equals max_entries then print:
WARNING: map %s has reached the BPFTRACE_MAP_KEYS_MAX limit, possible lost entries.
This check needs to happen before the END action is performed. Eg, imagine you have a @start hash for timing, which you clear(@start) in the END: we need to check its limit before END is processed. So I'd put this check at the start of END.
I'm hoping the kernel can give us this status so it is known for certain.

Good point about the END thing - I think that problem could also happen in the middle of a script, say we have a function foo which takes a very long time to return, and lots of threads calling it:
uprobe:foo
{
   @[tid] = nsecs;
}
uretprobe:foo /@[tid]/
{
  delete(@[tid])
}

We could hit the map limit but then be well below it again by the end of the bpftrace tracing session.

Right, we'll only catch that with kernel support. I'll talk to Alexei about it. Ideally we can interrogate a map and know how many keys it's dropped, and if that's non-zero, print it at the end of a bpftrace program. In the meantime we can add the END logic for a warning.

I think it's essential that we pick this condition as soon as the data is reaped from the kernel. Hitting this condition will invalidate your results so a user must know ASAP and not at the end. The fix is fine for now but we should try and do some dynamic growth in the future as static sizing is not a viable long term solution as you don't know apriori how big your keyed data is. Obviously, this may well need some kernel changes.

Adding map statistics was discussed at LSFMM: it needs to be added to the kernel, but that will let us check (at the end) and know for sure if there have been overflows, and how many.
Dynamic sizing I imagine will be tricky since we probably can't allocate in BPF context. That may require an async thread to poll the populated size of the maps (using the map statistics) and grow them if they are running out of headroom.
Right now we can add the END logic to warn when we detect maps are full (or within 1% of being full, since we may have just deleted a few keys from the full point).
Maybe we could also detect programs that will have many keys beforehand, and automatically increase the map size. For example, profile:hz: with [ku]stack as map keys. I'd add this if it was simple: I wouldn't go overboard since we ultimately want kernel solutions.

With #1276, now we can detect exceeding map key limits using -k option. For example:
% sudo BPFTRACE_MAP_KEYS_MAX=2 ./src/bpftrace -e \
  'BEGIN { @[0] = 0; @[1] = 1; @[2] = 2;} -k'
Attaching 1 probe...
stdin:1:35-36: WARNING: Failed to map_update_elem: Argument list too long (-7)
BEGIN { @[0] = 0; @[1] = 1; @[2] = 2;}
                                 ~

^C

@[0]: 0
@[1]: 1

The dynamic sizing issue is tricky b/c IIUC maps need to be pinned in memory. So it may be a tough sell for kernel folks to allow dynamic sizing. I think the best we can do for now is what @mmisono  introduced.


Distance

Came across this while working through some issues on my projects -- re you distance calculation, if you are trying to specify line of sight distance then you should use a different method.  Best is to go into ECEF and get the norm (ie sqrt (x^2 +y^2 + z^2)).  This is the true distance along the line of sight.  The great circle, haversine, and inverse distances are all on a sphere or ellipsoid.

Hi Dabenpb,
Interesting thought, I am going to read about ECEF more.  When I was thinking about getting the distance I wanted to account for the curve of the Earth but maybe that is not the right approach.

If you calculate in ECEF you will take the curvature into account.
On Sat, Aug 8, 2020 at 6:10 PM Kyle<EMAIL_ADDRESS>wrote:

Hi Dabenpb,
Interesting thought, I am going to read about ECEF more. When I was
thinking about getting the distance I wanted to account for the curve of
the Earth but maybe that is not the right approach.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/kc8/piawaredump1090wrapper/issues/1#issuecomment-670983510,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACR4BQYYRQ7NDLABODFPCBLR7XLPPANCNFSM4NIV7DSA
.


Skip operator

['1.*.3>15', ...] // triggered at tick 3, 18, 33, 48, 63, 78, 93 on beat 1, then tick 12, 27, 41 etc on beat 2

This is already possible with modulus and greaterThan:
"1.1.3%15", "1.2.12%15", "1.3.9%15", "1.4.3%15"


Translations update from Weblate

Translations update from Weblate for mattermost-languages-shipped/mattermost-mobile.
Current translation status:

Hello @weblate,
Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.

/release-note-none

So this type of PR's are no longer cherry-picksd?
How are we making sure that after we branch, the actual release includes the latests translations?

So this type of PR's are no longer cherry-picksd?
How are we making sure that after we branch, the actual release includes the latests translations?

@metanerd ^

Sorry, I got distracted a bit. I will cherry-pick the PRs tomorrow. Thanks for checking!


WIP: Update gh-page docs v21.12[skip ci]

update gh-pages branch based on 21.12 doc.
Here is the viewable gh-pages link for this change for review:
https://nvliyuan.github.io/spark-rapids/

add microk8s doc, update download docs from #4307 ,  leave some-SNAPSHOT to remove

Note that anything pointed out on this that isn't a merge problem should really be fixed on branch-21.12 and re-merged to gh-pages.  We should not fix things directly on this PR that are really bugs in branch-21.12 documentation.  If we do then we need to also fix in branch-21.12 separately.
Reviewing this PR should be as simple as git diff branch-21.12 gh-pages docs and look for any changes that are unexpected.  Some file diffs are expected, such as css, index files, etc. because of how gh-pages are setup.

put my comments in https://github.com/NVIDIA/spark-rapids/issues/4319 for 22.02, only one we may want to fix separately would be the shuffle versions but up to Sameer and should be done on base version


Token stream parsing

Didn’t you consider adding a possibility to parse streams other than of characters? In many situations, it could be useful to tokenize the input first (let’s leave it on the user’s side), and then parse it token-wise.

It would be very hard to provide parser combinators for non-character streams. Given that the parser keeps state, I don't think it could work with a generic type... but maybe it could... have you tried something like that?

Not yet, but I’ve seen some C# implementations here on Github: parseq, superpower.


How to add Snippets for Authelia like official Docs said

used IBRACORP guide for Authelia + NPM +Cloudflare , but in Official Docs of Authelia  snippets used ,is it possible to add snippets here ?
https://www.authelia.com/integration/proxies/nginx-proxy-manager/

If I understand your question correctly, you want to know if this container can work with Authelia ?
So to answer is yes, this should work.

So to answer is yes, this should work.

Sorry if not explained correctly, it's working with Authelia by guide.
But from official way of Authelia is to use snippets.
So the question is:
How to add snippets to NPM correctly?

Can you precise which part of the guide you are talking about ?
From https://www.authelia.com/integration/proxies/nginx-proxy-manager/, it is mentioned that the snippets configuration files are mapped to the container like this:
    volumes:
      - ${PWD}/data/nginx/snippets:/config/nginx/snippets:ro

Then, they are used by adding a custom configuration to NPM:
location / {
    include /snippets/proxy.conf;
    proxy_pass $forward_scheme://$server:$port;
}

You can do the same thing with this container.

I didn't find snippets dir in container exist.
But if you say I can use here they example , I will try to make it.
Thanks

It is the volume configuration that will add it.
    volumes:
      - ${PWD}/data/nginx/snippets:/config/nginx/snippets:ro

im using Unraid, so it should be ?
/mnt/user/appdata/NginxProxyManager/nginx/snippets : /config/nginx/snippets:ro

If your snippets are already under /mnt/user/appdata/NginxProxyManager/nginx/snippets, then you don't need to add another volume mapping.

No I don't have it.
I meaned to create volume like this

So where do you plan to store your snippets on the unRAID ?
Storing them under /mnt/user/appdata/NginxProxyManager/nginx/snippets seems to be the easiest way.

Storing them under /mnt/user/appdata/NginxProxyManager/nginx/snippets seems to be the easiest way

Yes, here.
Thanks


throw redirect() falsely detects infinite redirect loop

Description
Reproduction: https://stackblitz.com/github/nitedani/vike-redirect-error?file=pages%2Findex%2Findex.page.jsx
Steps:

open in new tab
go to /?redirect=true -  you will be redirected to the /about page
go to /about?redirect=true

If I comment out validate(graph); in assertNoInfiniteHttpRedirect, it works as expected.
It would be nice If I could use the following for navigation/redirect:
import { redirect as navigateServer } from "vike/abort";
import { navigate as navigateClient } from "vike/client/router";

export const navigate = (
  url: `/${string}` | `https://${string}` | `http://${string}`
) => {
  if (import.meta.env.SSR) {
    throw navigateServer(url);
  } else {
    navigateClient(url);
    return null;
  }
};

👍 I could reproduce and it's indeed a bug.

Fixed, thanks for opening the bug report 👌

Does this work if the redirect condition is not based on the url? For example, I would like to use my custom useProfile hook, that calls the backend(sending the session cookie), and either returns the profile or undefined.

Exactly, that isn't possible. That's why redirection loops are forbidden (regardless of whether they are contidional or not since Vike cannot know that).

If no profile on dashboard, redirect to login. If profile on login, redirect to dashboard

I'm realizing that's quite a common use case, and it's quite a bummer that Vike is limiting in that regard.
I guess it's either we remove the infinite loop detection, or we limit the user 🤔

I think the error should be a warning (possible redirect loop detected), shown only once.

An infinite loop of HTTP redirects is quite a bad outcome (overloads the server), that's why I'm inclined to make it an error in order to break the infinite loop.


Put latest version in cargo

There was a commit 4 years ago that made the triangle coordinates non-private, but it still seems to not be in cargo. I wonder how hard that would be to fix?

Hey, thanks for reaching out!
I just pushed a new version, 0.2.1, up to crates.io, so this should be fixed now.
I'm actually impressed the code still works with modern Rust, since I haven't touched it in a few years. It looks like there are some minor cleanups to do though, so I'll try to get those up before long too. These shouldn't affect usage though.

Great stuff, many thanks!