Fix OSX build

Summary
As the title says.
What kind of change does this PR introduce? (check at least one)

[ ] Bugfix
[ ] Feature
[ ] Code style update
[ ] Refactor
[ ] Docs
[x] Build-related changes
[ ] Other, please describe:

If changing the UI of web configuration, please provide the before/after screenshot:
Does this PR introduce a breaking change? (check one)

[ ] Yes
[x] No

If yes, please describe the impact and migration path for existing setups:
The PR fulfills these requirements:

[ ] When resolving a specific issue, it's referenced in the PR's body (e.g. Fixes: #xxx[,#xxx], where "xxx" is the issue number)

If adding a new feature, the PR's description includes:

[ ] A convincing reason for adding this feature
[ ] Related documents have been updated (docs/docs/en)
[ ] Related tests have been updated

PLEASE DON'T FORGET TO ADD YOUR CHANGES TO CHANGELOG.MD

[ ] Yes, CHANGELOG.md is also updated

To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.
Other information:

`➜  build git:(master) cmake -DPLATFORM=osx -DCMAKE_BUILD_TYPE=Debug ..
-- CMake Version: 3.18.1
CMake Deprecation Warning at CMakeLists.txt:18 (CMAKE_POLICY):
The OLD behavior for policy CMP0026 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances.  Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.

CMake Error at dependencies/CMakeLists.txt:39 (export):
export given target "flatc" which is not built by this project.
CMake Error at dependencies/CMakeLists.txt:48 (get_property):
get_property could not find TARGET flatc.  Perhaps it has not yet been
created.
-- Using flatbuffers compiler:
CMake Error at dependencies/CMakeLists.txt:99 (add_subdirectory):
The source directory
/Users/Serhan/Downloads/hyperion/osx_build/dependencies/external/protobuf

does not contain a CMakeLists.txt file.
CMake Error at dependencies/CMakeLists.txt:107 (export):
export given target "protoc_compiler" which is not built by this project.
CMake Error at dependencies/CMakeLists.txt:115 (get_property):
get_property could not find TARGET protoc_compiler.  Perhaps it has not yet
been created.
-- Using protobuf compiler:
-- Found Python3: /usr/local/Frameworks/Python.framework/Versions/3.8/bin/python3.8 (found version "3.8.5") found components: Interpreter
-- Using static mbedtls libraries (build version "2.23.0")
-- Found Python3: /usr/local/Frameworks/Python.framework/Versions/3.8/bin/python3.8 (found version "3.8.5") found components: Interpreter Development Development.Module Development.Embed
CMake Error at /usr/local/Cellar/cmake/3.18.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
Could NOT find X11 (missing: X11_X11_INCLUDE_PATH X11_X11_LIB)
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.18.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:458 (_FPHSA_FAILURE_MESSAGE)
/usr/local/Cellar/cmake/3.18.1/share/cmake/Modules/FindX11.cmake:407 (find_package_handle_standard_args)
libsrc/grabber/x11/CMakeLists.txt:6 (find_package)
-- Configuring incomplete, errors occurred!
See also "/Users/Serhan/Downloads/hyperion/osx_build/build/CMakeFiles/CMakeOutput.log".`

➜  build git:(master) cmake -DPLATFORM=osx -DCMAKE_BUILD_TYPE=Debug ..
-- CMake Version: 3.18.1
CMake Deprecation Warning at CMakeLists.txt:18 (CMAKE_POLICY):
The OLD behavior for policy CMP0026 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances.  Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
-- PLATFORM: osx
-- ENABLE_AMLOGIC = OFF
-- ENABLE_DISPMANX = OFF
-- ENABLE_FB = OFF
-- ENABLE_OSX = OFF
-- ENABLE_SPIDEV   = OFF
-- ENABLE_TINKERFORGE = OFF
-- ENABLE_V4L2 = OFF
-- ENABLE_WS281XPWM = OFF
-- ENABLE_AVAHI = ON
-- ENABLE_USB_HID = OFF
-- ENABLE_CEC = OFF
-- ENABLE_X11 = ON
-- ENABLE_XCB = ON
-- ENABLE_QT = ON
-- ENABLE_TESTS = OFF
-- ENABLE_PROFILER = OFF
-- ENABLE_EXPERIMENTAL = OFF
-- validate json file
-- Current Version: 2.0.0-alpha.7
--  - Build: master (GitHub-4b44e7a0/4099d12d-1596898283)
-- GNU gold linker is not available, falling back to default system linker
-- Found Qt Version: 5.15.0
-- Found libusb-1.0:
--  - Includes: /usr/local/include/libusb-1.0
--  - Libraries: /usr/local/lib/libusb-1.0.dylib
-- Looking for strtof_l
-- Looking for strtof_l - not found
-- Looking for strtoull_l
-- Looking for strtoull_l - not found
Proceeding with version: <IP_ADDRESS>
-- Using flatbuffers compiler: /Users/Serhan/Downloads/hyperion/osx_build/build/bin/flatc
-- Found ZLIB: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/libz.tbd (found version "1.2.11")
-- Looking for dlfcn.h
-- Looking for dlfcn.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for memory.h
-- Looking for memory.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stdlib.h
-- Looking for stdlib.h - found
-- Looking for strings.h
-- Looking for strings.h - found
-- Looking for string.h
-- Looking for string.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Protobuf: doing try-compiles for hash map/set headers
-- Protobuf: doing try-compiles for pthread test
-- Looking for stddef.h
-- Looking for stddef.h - found
CMake Deprecation Warning at dependencies/external/protobuf/src/CMakeLists.txt:329 (cmake_policy):
The OLD behavior for policy CMP0026 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances.  Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
-- Using protobuf compiler: /Users/Serhan/Downloads/hyperion/osx_build/build/bin/protoc
-- Found Python3: /usr/local/Frameworks/Python.framework/Versions/3.8/bin/python3.8 (found version "3.8.5") found components: Interpreter
-- Using static mbedtls libraries (build version "2.23.0")
-- Found Python3: /usr/local/Frameworks/Python.framework/Versions/3.8/bin/python3.8 (found version "3.8.5") found components: Interpreter Development Development.Module Development.Embed
CMake Error at /usr/local/Cellar/cmake/3.18.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
Could NOT find X11 (missing: X11_X11_INCLUDE_PATH X11_X11_LIB)
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.18.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:458 (_FPHSA_FAILURE_MESSAGE)
/usr/local/Cellar/cmake/3.18.1/share/cmake/Modules/FindX11.cmake:407 (find_package_handle_standard_args)
libsrc/grabber/x11/CMakeLists.txt:6 (find_package)
-- Configuring incomplete, errors occurred!
See also "/Users/Serhan/Downloads/hyperion/osx_build/build/CMakeFiles/CMakeOutput.log".
See also "/Users/Serhan/Downloads/hyperion/osx_build/build/CMakeFiles/CMakeError.log".

Looks like something like this is missing :
if (APPLE OR "${PLATFORM}" MATCHES "osx")
    set(ENABLE_OSX ON)
endif()

But your error happens because of something else ?

https://github.com/hyperion-project/hyperion.ng/blob/4099d12d9a8680ef0c89824d9f9af0a2f3b0a5e9/CMakeLists.txt#L115
this line should trigger it on...or?
but yep, the failure is here
Could NOT find X11 (missing: X11_X11_INCLUDE_PATH X11_X11_LIB)

You are right, interesting.


Enable using duckv1.WithPod with our webhook infra.

Today you can't use duckv1.WithPod to author webhooks because it doesn't implement the Validate or SetDefaults methods, and that makes sense since they are (by definition) a generic encapsulation of a number of types.
However, if we could infuse ctx with appropriate callbacks for Validate and SetDefaults then folks can use our types, but infuse ctx with callbacks that perform the appropriate validation.
What I have in mind is something along these lines:
return defaulting.NewAdmissionController(ctx,
	// Name of the resource webhook.
	"foo.bar.dev",

	// The path on which to serve the webhook.
	"/defaulting",

	// The resources to default.
	map[schema.GroupVersionKind]resourcesemantics.GenericCRD{
		appsv1.SchemeGroupVersion.WithKind("Deployment"):  &duckv1.WithPod{},
		appsv1.SchemeGroupVersion.WithKind("ReplicaSet"):  &duckv1.WithPod{},
		appsv1.SchemeGroupVersion.WithKind("StatefulSet"): &duckv1.WithPod{},
		appsv1.SchemeGroupVersion.WithKind("DaemonSet"):   &duckv1.WithPod{},
		batchv1.SchemeGroupVersion.WithKind("Job"):        &duckv1.WithPod{},
	},

	// A function that infuses the context passed to Validate/SetDefaults with custom metadata.
	func(ctx context.Context) context.Context{
		return duckv1.WithPodSpecDefaulter(ctx, myFancyLogic)
	},

	// Whether to disallow unknown fields.
	false,
)

It is roughly equivalent for validation.
/kind enhancement
I was looking at this through the lens of @dlorenc cosigned webhook, which currently has to futz around with a mix of concrete types and dynamic clients to achieve a similar result.  I'm hoping that with this we can just write some logic against duckv1.WithPod that captures all of these types.
Release Note

Docs

/lgtm cancel

/lgtm


ubi8-openjdk-11 S2I Image not working with Quarkus in Openshift

Given a repo with a basic untouched Quarkus app got from code.quarkus.io and committed for an example here:

https://github.com/zg-riband/testubi8jdk11s2iquarkus
(I added only .s2i directory with environment file)

When I create a new app from oc CLI with ubi8/openjdk-11 image like this:

oc import-image ubi8-openjdk-11 --from=registry.access.redhat.com/ubi8/openjdk-11 --confirm
oc new-app ubi8-openjdk-11 https://github.com/zg-riband/testubi8jdk11s2iquarkus.git --name=ubi8-openjdk-11-app

Than I got this error:
INFO Performing Maven build in /tmp/src
INFO Using MAVEN_OPTS -Xms32m -Xmx128m -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:+ExitOnOutOfMemoryError
ls: cannot access '/usr/bin/mvn': Operation not permitted
Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher
Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.classworlds.launcher.Launcher
INFO Using
INFO Running 'mvn -e -Popenshift -DskipTests -Dcom.redhat.xpaas.repo.redhatga -Dfabric8.skip=true -Djkube.skip=true --batch-mode -Djava.net.preferIPv4Stack=true -s /tmp/artifacts/configuration/settings.xml -Dmaven.repo.local=/tmp/artifacts/m2  package'
ls: cannot access '/usr/bin/mvn': Operation not permitted
Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher
Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.classworlds.launcher.Launcher
error: build error: non-zero (13) exit code from registry.access.redhat.com/ubi8/openjdk-11@sha256:e851770fd181ef49193111f7afcdbf872ad23f3a8234e0e07a742c4ca2882c3d

But when I create a new app from oc CLI with openjdk/openjdk-11-rhel7 image like this:

oc import-image openjdk-openjdk-11-rhel7 --from=registry.access.redhat.com/openjdk/openjdk-11-rhel7 --confirm
oc new-app openjdk-11-rhel7 https://github.com/zg-riband/testubi8jdk11s2iquarkus.git --name=openjdk-openjdk-11-rhel7-app

everything is ok and the app is created succesfully.

The problem also occurs with ubi8-openjdk-17, which is the real reason why I write, since there is no openjdk17rhel8 yet and I intend to use my quarkus app with java 17.

Waiting for your kind reply, thank you.

Can you confirm please the exact image versions that you have experienced this problem with (for example, registry.access.redhat.com/ubi8/openjdk-11:1.11-1 ?) and the OpenShift version you are running them on? My hunch is this is a permissions issue relating to the host, perhaps something to do with seccomp filters or selinux labels.

I tried today (unsuccessfully) with: registry.access.redhat.com/ubi8/openjdk-11:1.11-2
The server versions are:
OpenShift Master: v3.9.102
Kubernetes Master: v1.9.1+a0ce1bc657
OpenShift Web Console: v3.9.102
Thnx

You seem to be using an out-of-support version of OpenShift. The only still active version of the 3.x line is 3.11. See https://access.redhat.com/support/policy/updates/openshift_noncurrent
Can you reproduce this with a supported OpenShift version?

I tried with the following:
OpenShift Master:
v3.11.154
Kubernetes Master:
v1.11.0+d4cacc0
OpenShift Web Console:
v3.11.154
oc CLI
v3.11.633
Quarkus
2.7.1.Final
Ubi8 image
registry.access.redhat.com/ubi8/openjdk-11:1.11-2
Same results.

Hi there, did you find a solution? I'm facing the same issue.

https://github.com/carlossg/docker-maven/issues/221 points to https://github.com/docker-library/openjdk/issues/465#issuecomment-907332431 which points to this being a docker/podman (runc / security rules issue).  However I can't see / trace down how that analysis was done or what actual issue these systems have that lead to this.

Some news?

Hi there, did you find a solution? I'm facing the same issue.

No..


IA-2285: User/User roles: make permissions list scrollable

Explain what problem this PR is resolving

Make the permissions list scrollable on edit or create user and user role
Related JIRA tickets : IA-2285

Self proofreading checklist

[x] Did I use eslint and black formatters
[ ] Is my code clear enough and well documented
[ ] Are my typescript files well typed
[ ] New translations have been added or updated if new strings have been introduced in the frontend
[ ] My migrations file are included
[ ] Are there enough tests
[ ] Documentation has been included (for new feature)

Changes

wrap the table with box and apply maxHeight and OverFlow scoll style

How to test

Go to user and user role liste
Create or edit a user on a user role
The permission list should be scrollable

Print screen / video

@cypress


Introduce ios.LineEditingReader, an io.Reader wrapper with line editing mechanism

LineEditingReader implements io.Reader interface with a line editing mechanism. LineEditingReader reads data from underlying io.Reader and invokes the caller supplied edit function for each of the line (defined as []byte ending with '\n', therefore it works on both Mac/Linux and Windows, where '\r\n' is used). Note the last line before EOF will be edited as well even if it doesn't end with '\n'. Usage is highly flexible: the editing function can do in-place editing such as character replacement, prefix/suffix stripping, or word replacement, etc., as long as the line length isn't increased; or it can replace a line with a completely newly allocated and written line with no length restriction (although performance might be slower compared to in-place editing).
ios.LineEditingReader is at least as performant as ios.BytesReplacingReader:
BenchmarkLineEditingReader_RawIORead-8                          	   23300	     51319 ns/op	 1103392 B/op	      23 allocs/op
BenchmarkLineEditingReader_UseLineEditingReader-8                      	    3343	    351305 ns/op	 1104512 B/op	      25 allocs/op
BenchmarkLineEditingReader_CompareWithBytesReplacingReader-8    	     978	   1226656 ns/op	 1107648 B/op	      26 allocs/op

This PR is motivated from real usage case discussed in https://github.com/jf-tech/omniparser/pull/154
FYI @samolds

I think this looks great. This solves the issue I was having here jf-tech/omniparser#154.


DEPRECATION WARNING: serialized_attributes is deprecated without replacement, and will be removed in Rails 5.0

See https://github.com/globalize/globalize/pull/402

👏


Updated webimpress/http-middleware-compatibility to 0.1.4

This version install also composer plugin which prompt user to install http-interop/http-middleware as explicit dependency in their composer.json.
It prompts only when http-interop/http-middleware is not installed, otherwise it use version currently installed to update composer.json and message with information how to update is shown in console.
See also https://github.com/zendframework/zend-expressive/pull/517#issuecomment-335302764

Can this be merged please? This is required for working with the latest stratigility and not working with deprecated http-interop/http-middleware

Closed in favour of #529

@webimpress sorry, but why would we do this together with 7.1 requirement?

@vlakarados  PSR-15 is going to support only PHP 7.0+.  Currently http-interop/http-server-middleware also supports only PHP 7.0+.
This is decision we have made in ZF, for more information please see:
https://discourse.zendframework.com/t/psr-15-compatibility-issues-and-proposal/378/10

@webimpress yes, but why it's 7.1 then? :)

@vlakarados See post on the forum.
It's said there:

Update the minimum PHP version to 7.1 (per our next major release milestone announcement)

It has been announced in June 2017.
This PR is not gonna go live. Instead we are going to have new MAJOR release with PSR-15 (~ early 2018) and alpha 3.0.0 probably this week.

@webimpress I see, too bad, but another reason and more motivation to upgrade to 7.1 :) Thanks!


Destructuring object with default values

Hi!
I run into an issue destructuring process.env using flow 0.39.0, here is my use case:
const { PUBLIC_URL = '' } = process.env;
/* PUBLIC_URL:string */

const IMAGE_URL:string = `${PUBLIC_URL}/img`;
//                          ^^^^^^^^^^ null (This type cannot be coerced to string)

It's a bit curious because in case process.env is undefined or null, PUBLIC_URL will be set to '' so no error should be triggered here.
It seems like this line /* PUBLIC_URL:string */ is ignored by the parser and that flow ignore the default value when destructuring.
NOTE: this syntax works btw
const PUBLIC_URL:string = process.env.PUBLIC_URL || '';

If process.env.PUBLIC_URL === null, PUBLIC_URL will be null, the default value is only used for undefined values.

The "solution" works for one environment variable. But what about say 20?

hmm.. Actually I think we're a bit stuck here. Correct me if I'm wrong:
As process.env is typed as env : { [key: string] : ?string }; value of environment variable can be string or null.
So flow consider that you've got to check each process.env variable separately to ensure their type is as expected.
It's even more important as null is coerced to "null" when concatenated with a string and this could result in unwanted behavior. In my case for example, this could happen:
const { PUBLIC_URL = '' } = process.env;
const IMAGE_URL:string = `${PUBLIC_URL}/img`;
console.log(IMAGE_URL); // logs "null/img" (not really expected)

Okay. So I now do this:
type BtcVendorProps = {
  rootPath: string,
  port: number,
  network: string,
  mongoUrl: string,
  auth0Domain: string,
  auth0Audience: string,
  privateKeyWIF: string
}

const environmentMapping = {
  'MONGO_URL': 'mongoUrl',
  'ROOT_PATH': 'rootPath',
  'PORT': 'port',
  'HOSTNAME': 'hostname',
  'NETWORK': 'network',
  'AUTH0_AUDIENCE': 'auth0Audience',
  'AUTH0_DOMAIN': 'auth0Domain',
  'BTC_PRIVATE_KEY': 'privateKeyWIF'
}

const props : BtcVendorProps = Object.keys(environmentMapping).reduce((acc, val) => {
  let value = process.env[val] || ''
  if (val === 'PORT') {
    value = Number(process.env[val] || 3000)
  }
  return {
    ...acc,
    [environmentMapping[val]]: value
  }
}, {})

console.log(props)

When I then run
MONGO_URL=mongodb://mongo babel-node lib/start.js

I get
{ mongoUrl: 'mongodb://mongo',
  rootPath: '',
  port: 3000,
  hostname: '',
  network: '',
  auth0Audience: '',
  auth0Domain: '',
  privateKeyWIF: '' }

Which looks okay, but still flow is unhappy:
lib/start.js:20
 20: const props : BtcVendorProps = Object.keys(environmentMapping).reduce((acc, val) => {
                   ^^^^^^^^^^^^^^ property `auth0Audience`. Property not found in
 20: const props : BtcVendorProps = Object.keys(environmentMapping).reduce((acc, val) => {
                                    ^ object literal

lib/start.js:20
 20: const props : BtcVendorProps = Object.keys(environmentMapping).reduce((acc, val) => {
                   ^^^^^^^^^^^^^^ property `auth0Domain`. Property not found in
 20: const props : BtcVendorProps = Object.keys(environmentMapping).reduce((acc, val) => {
                                    ^ object literal

lib/start.js:20
 20: const props : BtcVendorProps = Object.keys(environmentMapping).reduce((acc, val) => {
                   ^^^^^^^^^^^^^^ property `mongoUrl`. Property not found in
 20: const props : BtcVendorProps = Object.keys(environmentMapping).reduce((acc, val) => {
                                    ^ object literal

lib/start.js:20
 20: const props : BtcVendorProps = Object.keys(environmentMapping).reduce((acc, val) => {
                   ^^^^^^^^^^^^^^ property `network`. Property not found in
 20: const props : BtcVendorProps = Object.keys(environmentMapping).reduce((acc, val) => {
                                    ^ object literal

lib/start.js:20
 20: const props : BtcVendorProps = Object.keys(environmentMapping).reduce((acc, val) => {
                   ^^^^^^^^^^^^^^ property `port`. Property not found in
 20: const props : BtcVendorProps = Object.keys(environmentMapping).reduce((acc, val) => {
                                    ^ object literal

lib/start.js:20
 20: const props : BtcVendorProps = Object.keys(environmentMapping).reduce((acc, val) => {
                   ^^^^^^^^^^^^^^ property `privateKeyWIF`. Property not found in
 20: const props : BtcVendorProps = Object.keys(environmentMapping).reduce((acc, val) => {
                                    ^ object literal

lib/start.js:20
 20: const props : BtcVendorProps = Object.keys(environmentMapping).reduce((acc, val) => {
                   ^^^^^^^^^^^^^^ property `rootPath`. Property not found in
 20: const props : BtcVendorProps = Object.keys(environmentMapping).reduce((acc, val) => {
                                    ^ object literal

lib/start.js:20
 20: const props : BtcVendorProps = Object.keys(environmentMapping).reduce((acc, val) => {
                                    ^ object literal. This type is incompatible with
 20: const props : BtcVendorProps = Object.keys(environmentMapping).reduce((acc, val) => {
                   ^^^^^^^^^^^^^^ object type
  Property `auth0Audience` is incompatible:
     27:     [environmentMapping[val]]: value
                                        ^^^^^ number. This type is incompatible with
     16:   auth0Audience: string,
                          ^^^^^^ string. See: lib/index.js:16

lib/start.js:20
 20: const props : BtcVendorProps = Object.keys(environmentMapping).reduce((acc, val) => {
                                    ^ object literal. This type is incompatible with
 20: const props : BtcVendorProps = Object.keys(environmentMapping).reduce((acc, val) => {
                   ^^^^^^^^^^^^^^ object type
  Property `auth0Domain` is incompatible:
     27:     [environmentMapping[val]]: value
                                        ^^^^^ number. This type is incompatible with
     15:   auth0Domain: string,
                        ^^^^^^ string. See: lib/index.js:15

lib/start.js:20
 20: const props : BtcVendorProps = Object.keys(environmentMapping).reduce((acc, val) => {
                                    ^ object literal. This type is incompatible with
 20: const props : BtcVendorProps = Object.keys(environmentMapping).reduce((acc, val) => {
                   ^^^^^^^^^^^^^^ object type
  Property `mongoUrl` is incompatible:
     27:     [environmentMapping[val]]: value
                                        ^^^^^ number. This type is incompatible with
     14:   mongoUrl: string,
                     ^^^^^^ string. See: lib/index.js:14

lib/start.js:20
 20: const props : BtcVendorProps = Object.keys(environmentMapping).reduce((acc, val) => {
                                    ^ object literal. This type is incompatible with
 20: const props : BtcVendorProps = Object.keys(environmentMapping).reduce((acc, val) => {
                   ^^^^^^^^^^^^^^ object type
  Property `network` is incompatible:
     27:     [environmentMapping[val]]: value
                                        ^^^^^ number. This type is incompatible with
     13:   network: string,
                    ^^^^^^ string. See: lib/index.js:13

lib/start.js:20
 20: const props : BtcVendorProps = Object.keys(environmentMapping).reduce((acc, val) => {
                                    ^ object literal. This type is incompatible with
 20: const props : BtcVendorProps = Object.keys(environmentMapping).reduce((acc, val) => {
                   ^^^^^^^^^^^^^^ object type
  Property `port` is incompatible:
     27:     [environmentMapping[val]]: value
                                        ^^^^^ string. This type is incompatible with
     12:   port: number,
                 ^^^^^^ number. See: lib/index.js:12

lib/start.js:20
 20: const props : BtcVendorProps = Object.keys(environmentMapping).reduce((acc, val) => {
                                    ^ object literal. This type is incompatible with
 20: const props : BtcVendorProps = Object.keys(environmentMapping).reduce((acc, val) => {
                   ^^^^^^^^^^^^^^ object type
  Property `privateKeyWIF` is incompatible:
     27:     [environmentMapping[val]]: value
                                        ^^^^^ number. This type is incompatible with
     17:   privateKeyWIF: string
                          ^^^^^^ string. See: lib/index.js:17

lib/start.js:20
 20: const props : BtcVendorProps = Object.keys(environmentMapping).reduce((acc, val) => {
                                    ^ object literal. This type is incompatible with
 20: const props : BtcVendorProps = Object.keys(environmentMapping).reduce((acc, val) => {
                   ^^^^^^^^^^^^^^ object type
  Property `rootPath` is incompatible:
     27:     [environmentMapping[val]]: value
                                        ^^^^^ number. This type is incompatible with
     11:   rootPath: string,
                     ^^^^^^ string. See: lib/index.js:11

Found 14 errors

Too much ECMA for flow?

So it looks like flow does not like the "Object.function()" syntax. But it likes lodash! So the following works:
import _ from 'lodash'

type Props = {
  rootPath: string,
  network: string,
  mongoUrl: string,
  hostname: string
}

const environmentMapping = {
  'MONGO_URL': 'mongoUrl',
  'ROOT_PATH': 'rootPath',
  'HOSTNAME': 'hostname',
  'NETWORK': 'network'
}

const props : Props = _.reduce(environmentMapping, (acc, value, key) => {
  value = value || ''
  return {
    ...acc,
    [environmentMapping[key]]: value
  }
}, {})

console.log(props)

Hm. But now it seems that flow just does not work any more. Flow tells me that this example has "No Errors":
// @flow
'use strict'
import _ from 'lodash'

type Props = {
  rootPath: string,
  network: string,
  mongoUrl: string,
  hostname: string,
  missingVar: string
}

const environmentMapping = {
  'MONGO_URL': 'mongoUrl',
  'ROOT_PATH': 'rootPath',
  'HOSTNAME': 'hostname',
  'NETWORK': 'network'
}

const props : Props = _.reduce(environmentMapping, (acc, ignoreValue, key) => {
  const value = process.env[key] || ''
  return {
    ...acc,
    [environmentMapping[key]]: value
  }
}, {})

console.log(props)

Which is wrong as far as I understand because missingVar is never set.

In your last case, the problem might be that _.reduce typings are not good enough, and it might return any or something like that. You could remove the const props : Props annotation, and do a flow type-at-pos on the props value (or if your editor supports flow, hover your cursor over it). You'll see what flow refines it to.

If it can help, flow-typed lodash .reduce() type definition is as follow:
reduce<T: Object, U>(object: T, iteratee?: (accumulator: U, value: any, key: string, object: T) => U, accumulator?: U): U;


BCrypt::Errors::InvalidHash (invalid hash):

Hello,
When I submit the step 2, the application crashes with this error:
`I, [2021-01-13T12:12:45.845817 #1709364]  INFO -- : [dc7baf9b-0795-499a-af81-0a24d2d21c2f]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"xxxxxxxxxxxx", "user"=>{"name"=>"xxxxxx"<EMAIL_ADDRESS>"password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "commit"=>"Next Step"}
D, [2021-01-13T12:12:45.847546 #1709364] DEBUG -- : [dc7baf9b-0795-499a-af81-0a24d2d21c2f]   ESC[1mESC[36mSite Load (0.4ms)ESC[0m  ESC[1mESC[34mSELECT  sites.* FROM sites ORDER BY sites.id ASC LIMIT 1ESC[0m
D, [2021-01-13T12:12:45.848277 #1709364] DEBUG -- : [dc7baf9b-0795-499a-af81-0a24d2d21c2f]   ESC[1mESC[36mUser Load (0.2ms)ESC[0m  ESC[1mESC[34mSELECT  users.* FROM users ORDER BY users.id ASC LIMIT 1ESC[0m
I, [2021-01-13T12:12:45.926254 #1709364]  INFO -- : [dc7baf9b-0795-499a-af81-0a24d2d21c2f] Completed 500 Internal Server Error in 80ms (ActiveRecord: 0.6ms)
F, [2021-01-13T12:12:45.927040 #1709364] FATAL -- : [dc7baf9b-0795-499a-af81-0a24d2d21c2f]
F, [2021-01-13T12:12:45.927078 #1709364] FATAL -- : [dc7baf9b-0795-499a-af81-0a24d2d21c2f] BCrypt::Errors::InvalidHash (invalid hash):
F, [2021-01-13T12:12:45.927103 #1709364] FATAL -- : [dc7baf9b-0795-499a-af81-0a24d2d21c2f]
F, [2021-01-13T12:12:45.927132 #1709364] FATAL -- : [dc7baf9b-0795-499a-af81-0a24d2d21c2f] app/controllers/setup_controller.rb:17:in step2'
Does anyone know how to fix this ?
Best,

I am experiencing the same issue with the same error.

I've worked around my copy of this issue by utilizing a docker container. I believe the issue might not fall into the scope of Adam Cooke's responsibilities here as it's either a Ruby package or OS concern from my end.

I faced the same problem today. It's because of the bcrypt gem dependency version. You can update it.

Hi. I have this exact problem on a new Debian 11 (bullseye) VM. Using mariadb Ver 15.1 Distrib 10.5.15
I'm not overly familiar with Ruby / Gem. What is the process for  updating the bcrypt dependency?

Apologies, I've just seen your note. I had to edit the Gemfile.lock and specify the correct installed version. I also then had to update bundler too once I had removed the old version (I seemed to have two versions of bcrypt installed side-by-side).


File hash check

Have clients send the file hash of the seed (the icons shown on the file select screen) to the server. If there is a mismatch among players, display the file hash of any player that's not matching your own in the player list (instead of the player name) and set the status text to “file hash mismatch”. For tournament rooms (#6), instead check against a file hash provided by the seed roller.

Implemented in 724dcfb135a525dd5d45daac0ad0948d7037ee12.


Weird "Crystal witch" error

Not sure if its the thing not letting me use the enchanting table (using Zenith mod as well) so Im putting the whole log here:
https://paste.ee/p/QsD4R

My guess would be Zenith is causing the problem with the enchanting table, since Zenith is the mod that messes with the enchanting table mechanics. AI doesn't alter the enchanting table in any way; it adds the imbuing table as a separate upgrade table.
I don't know what the error popping up in the log is; I don't have any textures called "amethyst_imbuement:crystal_witch.png" in the assets. This seems like an error in how they are parsing villager profession ids.

Ok! Thank you so much! Will consult with Zenith Dev then!


Make the OSSL_CMP manual conform with man-pages(7)

Details from man-pages(7) that are used:
Formatting conventions for manual pages describing functions

    ...
    Variable names should, like argument names, be specified in italics.
    ...

Formatting conventions (general)

    ...
    Special macros, which are usually in uppercase, are in bold.
    Exception: don't boldface NULL.
    ...

This pull request is ready to merge

This pull request is ready to merge

Merged
f5f4fbaa44af055e0658c6810b91aa8607e8383a Make the OSSL_CMP manual conform with man-pages(7)

Merged
f5f4fbaa44af055e0658c6810b91aa8607e8383a Make the OSSL_CMP manual conform with man-pages(7)


Upgrade dependecy: gRPC

Motivation
Currently using gRPC 1.8.1 for historical compatibility reasons, but we know libs build and work with gRPC 1.32.0.
Feature
Upgrade gRPC to the latest version.
Alternatives
We could at least upgrade gRPC to at least to 1.32.x, which has been proved to work in Falco.
Additional context
I know there're many caveats around this topic, but I believe the time has come to face them :)

Fixed by https://github.com/falcosecurity/libs/pull/30


Specify notary signer database encryption key secret in CR

Hello,
Currently, notary signer encryption key used to encrypt privates keys in notary signer database is auto generated here.
This key is not stored anywhere, if the secret notarysigner-encryption-key is deleted, the encryption key is lost forever and the private keys stored in notary signer databases are lost too.
Why not add the possibility to give a secret name in harborclusters/notary CR ?
WDYT ?
Thomas

notary is to be deprecated as it is not actively maintained. we will introduce cosign to sign the images in harbor 2.5.
So this feature will not be supported


Remove API key from log statement

The API key is being obscured when the polling requests are made, but still plainly visible when the suite is executed, this removes the API key from the logs.

Visual Studio Marketplace would not accept a status badge from CircleCI for the extension public page, they have a specific list of public status badge URLs that they will accept. We could certainly move the build to CircleCI, but we would lose the ability to display the status badge on the extension page.

Ah, right. Forgot about that. The TravisCI setup is fine, but we should make sure it's duplicated in CircleCI so we get alerted. In this case, TravisCI failed but Circle didn't?

Yeah, the tests are passing in Circle, still digging into Travis.

Heh, Travis doesn't like my shortcut either ;) fixing...

Fixed


Add warnings for invalid system configurations

Overview
If a core system is enabled but the service type is null or a profile object is not assigned, then the service will not be initialized by the MRTK gameobject. This happens silently without any warning or notice to users.
This change is in the MRTK configuration profile inspector that checks whether a system is enabled but not valid to be initialized. If so, then a warning message is displayed in the MRTK inspector.

Changes

Fixes: #3094

Verification

As a reviewer, it is possible to check out this change locally by using the following
commands (substituting {PR_ID} with the ID of this pull request):
git fetch origin pull/{PR_ID}/head:name_of_local_branch
git checkout name_of_local_branch

/azp run


pygeometa and WCMP2 updates

This PR provides updates for WCMP2 support against the latest draft.
Notes for release/migration

users will need to republish their discovery metadata as a result of the change/update

CI failure is intermittent.


not all scripts are getting a nonce when using the vite plugin

What version of Remix are you using?
0.0.0-nightly-8eb9621-20231114
Are all your remix dependencies & dev-dependencies using the same version?

[X] Yes

Steps to Reproduce
use the vite plugin and add a CSP with a nonce for script-src
script-src 'self' 'nonce-c8rIrQN+BNX9gkm49Qcn3A=='

see that the nonce is not applied to the following script
<script>
  window.__remixLiveReloadEnabled = true
</script>

Expected Behavior
nonce is added to the script tag
<script nonce="c8rIrQN+BNX9gkm49Qcn3A==">
  window.__remixLiveReloadEnabled = true
</script>

Actual Behavior
nonce is not added to the script tag
<script>
  window.__remixLiveReloadEnabled = true
</script>

Should be fixed by https://github.com/remix-run/remix/pull/8014. This will be in the next nightly if you want to try it out and report back.

Should be fixed by #8014. This will be in the next nightly if you want to try it out and report back.

can confirm, that fixed it 👍


GAVariant missing "quality" and "filter"

Hi,  the v0.5.1 GAVariant specification does not list the "filter" and "quality" fields,  which are part of the VCF specification.   However, variants I fetch from https://www.googleapis.com/genomics/v1beta2/variants/search do include them.   Is this a mistake in the specification,  or are these fields no longer required?

Hi, Jim.
You're correct: the GAVariant schema lacks those fields, despite the fact that the Google v1beta2 implementation returns them.  This appears to be an oversight in the specification and I'll be submitting a pull request to address this.  Thank you for pointing it out!
-John Bates

This has been dormant since January. Closing in 2 days.

There is still a PR open (#220) for this, so I don't think we should close it. Perhaps we should ping those involved and try to get the PR updated?

Thanks @jeromekelleher I've pinged @johntbates in https://github.com/ga4gh/schemas/pull/220

Closed with https://github.com/ga4gh/ga4gh-schemas/pull/826


feat: dag.resolve API

Going to merge this one, it is working in js-ipfs and it gives us a foundation to build the CLI.
@nicola you should be trying all of these out :)

@diasdavid I have been trying them in go yesterday!

@nicola does go do resolve? @whyrusleeping ?


firebase-get-to-know-flutter/step_06 needs to dispose pf the textEditingController

In this codelab, there needs to be a call to dispose of the textEditingController
https://firebase.google.com/codelabs/firebase-get-to-know-flutter#6
https://github.com/flutter/codelabs/blob/main/firebase-get-to-know-flutter/step_06/lib/main.dart
class _GuestBookState extends State {
final _formKey = GlobalKey(debugLabel: '_GuestBookState');
final _controller = TextEditingController();

PTAL @ericwindmill

PTAL @ericwindmill

PTAL @ericwindmill

Fixed by https://github.com/flutter/codelabs/pull/2256


Move react type definitions to a peer dependency

Hi,
I was hoping to make the small change of moving the @types/react into a peer dependency. I think this has two benefits. First, that people not using typescript would no longer be forced to download the definitions. Second, there is a possible issue when having multiple different versions of the definitions. This change should resolve that.
Many thanks

Absolutely. You convinced me before I woke up today :)


sign oauth2 nonce with the hmac secret

Update example for https://github.com/envoyproxy/envoy/pull/37646

Hi @phlax this PR won't pass the Verify check with the existing oauth2 filter, as the key nonce in the state parameter has been changed to csrf_token.
The CI will pass after https://github.com/envoyproxy/envoy/pull/37646 has been merged.


BUG:Hamburger and cross icons are not properly visible in dark mode.

Is there an existing issue for this?

[X] I have searched the existing issues

What happened?
The hamburger and cross icons are not properly visible in the dark mode.
Assign this task to me under and I can make the required changes and fix this issue.

Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC'24 contributor
[X] I want to work on this issue

Can u please assign me this task?

@Bliss011 this was completed 3 weeks ago.


Add AIML INSTITUTE logo to supporters

Signed-off-by: algebra2k<EMAIL_ADDRESS>

cc @RainbowMango

Thanks for your support!
By the way, what's the full name of your company in English?

Thanks for your support!
By the way, what's the full name of your company in English?

Thank you very much, the English name of our company is AIML Institute (Nanjing) Co. Ltd

/lgtm
/assign @kevin-wangzefeng

/approve

/approve


Support ElasticSearch Range data types

New Feature Request: Support ElasticSearch Range  data types
I have a use case that would benefit from efficient indexing of date ranges (trajectory histories of moving objects). I see that ElasticSearch provides this as one of its Range data types, see https://www.elastic.co/guide/en/elasticsearch/reference/5.5/range.html.
Since Cassandra does not have an equivalent type for direct mapping, would it be possible to support range types via specific Cassandra UDTs in a way similar to geo_point?

Yes, it is possible, in a similar way to geo_point.  I keep your request for a future release.

Range fields are now supported by Elassandra in release <IP_ADDRESS>.


wallet sign-message implementation

There is currently no sign-message option in jellyfish available yet. How do I integrate a sign-message feature as soon as possible? - R

In package jellyfish-crypto it contains an interface called EllipticPair. It provides the interface for an elliptic curve pair to sign and verify the hash. All implementation of jellyfish-wallet-* extends EllipticPair which provides the same sign and verify interfaces for ECC based operations regardless of HD wallet or not.
the interfaces
https://github.com/DeFiCh/jellyfish/blob/915c1c15f02d2fc081131d6636223122b0b0340a/packages/jellyfish-crypto/src/elliptic.ts#L24-L30
https://github.com/DeFiCh/jellyfish/blob/915c1c15f02d2fc081131d6636223122b0b0340a/packages/jellyfish-crypto/src/elliptic.ts#L32-L37
e.g. implementations that extend the interfaces
https://github.com/DeFiCh/jellyfish/blob/915c1c15f02d2fc081131d6636223122b0b0340a/packages/jellyfish-wallet-mnemonic/src/hd_node.ts#L77-L85
https://github.com/DeFiCh/jellyfish/blob/915c1c15f02d2fc081131d6636223122b0b0340a/packages/jellyfish-wallet-mnemonic/src/hd_node.ts#L87-L96
To follow the integrate on ain, the c++ base, you need to sign it exactly as such with the same procedure.
Since EllipticPair sign interface signatures are already DER encoded you just need to encode and generate your message hash.
Using bitcoinjs as an example:
https://github.com/bitcoinjs/bitcoinjs-message/blob/c43430f4c03c292c719e7801e425d887cbdf7464/index.js#L57-L73
function magicHash (message, messagePrefix) {
  messagePrefix = messagePrefix || '\u0018Bitcoin Signed Message:\n'
  if (!Buffer.isBuffer(messagePrefix)) {
    messagePrefix = Buffer.from(messagePrefix, 'utf8')
  }
  if (!Buffer.isBuffer(message)) {
    message = Buffer.from(message, 'utf8')
  }
  const messageVISize = varuint.encodingLength(message.length)
  const buffer = Buffer.allocUnsafe(
    messagePrefix.length + messageVISize + message.length
  )
  messagePrefix.copy(buffer, 0)
  varuint.encode(message.length, buffer, messagePrefix.length)
  message.copy(buffer, messagePrefix.length + messageVISize)
  return hash256(buffer)
}

You can get message prefix here:
https://github.com/DeFiCh/jellyfish/blob/915c1c15f02d2fc081131d6636223122b0b0340a/packages/jellyfish-network/src/index.ts#L28-L29
The "magicHash" can be passed directly into EllipticPair.sign(magicHash).

@fuxingloh: Thanks for the detailed explanation, we'll try it out!

Hey @fuxingloh,
thanks again for your help. You guys did some really nice work on all the different projects!
We were able to sign a message in the wallet and now we would like to verify the signature in our DFX backend using the jellyfish library. Can you give us a hint on how to do this?
Many thanks in advance!

To verify a signature you need 3 things.

magicHash, you should have this since you generated the message
publicKey, the public key of the address which is part of your message
signature, as above

https://github.com/DeFiCh/jellyfish/blob/732ba04ee9f0281515273afc20319cf86c4f122b/packages/jellyfish-crypto/src/elliptic.ts#L82
I guess the question at this point is how do you verify the publicKey belongs to the address?
We use jellyfish-wallet on DeFiCh/wallet hence all addresses are encoded using the Bech32 format.
https://github.com/DeFiCh/jellyfish/blob/732ba04ee9f0281515273afc20319cf86c4f122b/packages/jellyfish-wallet/src/wallet_account.ts#L25-L26
So to verify the authenticity of a signed message signature you need: publicKey + signature + magicHash.


add configuarable convey header

Note that this does NOT handle webpa-interface-used yet.  This will be a separate story and might require some small amount of refactoring because interface used most likely needs to be determined by the websocket.

Overall this is good code. I wonder if this should be something like MetadataProvider that accepts configuration for Convey as well as for WRP messages. The code below can provide for Convey & that decorator & maybe add a 2nd configuration for WRPMetaDataAdded that is basically the same list of options & a decorator that decorates the WRP metadata.
My thinking on this is if we have one place that collects the metadata (you've done that here) and it is used in both places then the data should always be consistent. ... or more consistent.


recent change setlocale in baseapi.c causes Python loaded tesseract library to fail

Ubuntu 16.04, default locale is "en_US.UTF-8". Invoke tesseract library via cffi. Now fail with following
error:
!strcmp(locale, "C"):Error:Assert failed:in file baseapi.cpp, line 192
It worked fine before  baseapi.cpp locale assertion was introduce in commit 3292484f67af8bdda23aa5e510918d0115785291 on 06/07/18.
Any suggestion to get around this issue? Thx.
C or C++ program seems to set default locale "C", however, it's not the case for python, where default is "en_US.UTF-8".

set the locale "C".
ShreeDevi

भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com
On Thu, Jun 14, 2018 at 9:24 AM jwnsu<EMAIL_ADDRESS>wrote:

Ubuntu 16.04, default locale is "en_US.UTF-8". Invoke tesseract library
via cffi. Now fail with following
error:
!strcmp(locale, "C"):Error:Assert failed:in file baseapi.cpp, line 192
baseapi.cpp locale assertion was introduce in commit 3292484
https://github.com/tesseract-ocr/tesseract/commit/3292484f67af8bdda23aa5e510918d0115785291
on 06/07/18.
Any suggestion to get around this issue? Thx.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/tesseract-ocr/tesseract/issues/1670, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AE2_o6FBzYQJa32lzFfd8uPVQQI2fxkzks5t8d6HgaJpZM4UnRbY
.

Any side effect by setting to "C"?

Sure. Setting the locale has lots of side effects. My default locale for python is de_DE.UTF-8, so the default can be different. You have to find out whether "C" works with your python code or must restore the original locale after calling the Tesseract API.

Thanks. I have added info to a new wiki page
https://github.com/tesseract-ocr/tesseract/wiki/4.0x-Common-Errors-and-Resolutions
ShreeDevi

भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com
On Thu, Jun 14, 2018 at 9:46 AM Stefan Weil<EMAIL_ADDRESS>wrote:

Sure. Setting the locale has lots of side effects. My default locale for
python is de_DE.UTF-8, so the default can be different. You have to find
out whether "C" works with your python code or must restore the original
locale after calling the Tesseract API.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/tesseract-ocr/tesseract/issues/1670#issuecomment-397165365,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AE2_ow1FgAbIMoFm3pKKJ5lxh5dUSxKhks5t8eOggaJpZM4UnRbY
.

This is going to cause huge problems for people who are running Tesseract as a library.  Setting locale="C" will probably cause various unwanted side-effects throughout the application.
Setting/resetting locale for the duration of Tesseract API calls is also problematic in multithreaded applications, for example.
I suggest that instead of requiring locale="C", to change Tesseract to use something other than sscanf() for parsing strings in a locale-independent way.

@laurikari, I agree. As soon as all *scanf code is replaced by code which does not depend on the locale, the assertions can be removed. We just had to make sure now that people don't get wrong results without any notice.

Even for C/C++ I usually call
setlocale(LC_CTYPE, "");

as the first thing in main, which sets the locale to the value specified in the environment.
Depending on "C" locale seems quite bad to me.

Here is a (potentially incomplete) list of function calls which have to be replaced to get a Tesseract library which does not depend on the locale: atoi, isspace, strtod, strtof, strtol, sscanf.

So currently there's no other solution except setting: LC_ALL=C?

I am using a pattern like below to temporary set the locale to C while initiating the engine:
char *old_ctype = strdup(setlocale(LC_ALL, NULL));
setlocale(LC_ALL, "C");
tesseract::TessBaseAPI api;
api.InitForAnalysePage();
setlocale(LC_ALL, old_ctype);
free(old_ctype);

Is this correct or does it only bypass the assertion?

It avoids the assertion, but the problem which was the reason why this assertion was added remains, so users risk to get wrong results or crashes later.

Oh that's not good. In my experiments it seemed to solve the problems in https://github.com/tesseract-ocr/tesseract/issues/1532 and I was able to OCR japanese/korean text, which I was not before. So I was hopeful that the locale-sensitive operations where done during init.
In my case, tesseract is called by the user via language bindings, so I cannot permanently change the locale of the process. The only solution is to temporary set the locale in the bindings when calling the tesseract api.
Our full bindings are pretty minimal. Where else we need to temporary set the locale to C? The OCR happens here.

@stweil
For POSIX:
https://stackoverflow.com/a/13919957
For Windows:
https://docs.microsoft.com/en-us/windows/desktop/api/winnls/nf-winnls-setthreadlocale

For Windows:
https://docs.microsoft.com/en-us/cpp/parallel/multithreading-and-locales

What about implementing jeroen code  to tesseract api init?

That would not be a save solution. See my previous answer.

IMO, the right solution is here:
https://github.com/tesseract-ocr/tesseract/issues/1670#issuecomment-412089053

Here is a (potentially incomplete) list of function calls which have to be replaced to get a Tesseract library which does not depend on the locale: atoi, isspace, strtod, strtof, strtol, sscanf.

isspace is addressed by pull request #1965.

Has anyone an idea how to set the C locale for a JNA library when calling it from Java ?
I tried to set Locale.setDefaultLocale(Locale.ROOT), but this didn't help.
We are using tess4j, a JNA wrapper to use tesseract from Java, and using tesseract4 does not work because of the assertion.

I tried to set Locale.setDefaultLocale(Locale.ROOT), but this didn't help.
And by the way, this also wouldn't work in a web environment, because this setting is done VM - wide, so it would affect everything else that is happening in parallel as well.

I found a way to set the locale to "C" from Java (using JNA). See here for a discussion:
https://github.com/nguyenq/tess4j/issues/106#issuecomment-437361950
It works, but I am not sure about any side effects of this.

Pull request #2420 replaces strtof and strtod which fixes more dependencies on the locale settings. The critical sscanf calls were already replaced by earlier commits.
I think we can now consider removing the assertion as soon as we have tested that the issues #1250 and #1532 are still fixed.

C++17 has to_chars() and from_chars().
https://en.cppreference.com/w/cpp/utility/to_chars
https://en.cppreference.com/w/cpp/utility/from_chars

After typing export LC_ALL=C in the terminal, run the python code in the same terminal. Running the python code in different terminal window won't work. If using IDE, open the IDE from the terminal where export LC_ALL=C is entered.

Tesseract 4.1 and 5.0 no longer depend on the locale settings.

Thanks. So my bindings need to compile with any current version of tesseract. So to summarize, I only need to set the locale to C for tessereract version 4.x < 4.1 and not for 3.x and also not for 4.1 +?

That's right.

Can we close this issue?

There was no recent activity and I think everything was answered, so I close it now.

Workaround for python users
import locale
locale.setlocale(locale.LC_CTYPE, 'C')  # set locale to C
import tesserocr
locale.setlocale(locale.LC_CTYPE, '')  # set locale back

@wd: which tesseract version are you using? AFAIK this problem is solved in recent tesseract version.

@zdenop I know it's solved in 4.1. But the python docker use debian stable(buster) as the base image, which only include tesseract 4.0.

Use add-apt-repository -y ppa:alex-p/tesseract-ocr before installing Tesseract in your Dockerfile to get a newer release.

@stweil I'm using debian, first I tried to add the ppa use command add-apt-repository, and run apt update, bug got 404 error.
Ign:3 http://ppa.launchpad.net/alex-p/tesseract-ocr/ubuntu focal InRelease
Err:6 http://ppa.launchpad.net/alex-p/tesseract-ocr/ubuntu focal Release
  404  Not Found [IP: <IP_ADDRESS> 80]

I checked the source list file.
deb http://ppa.launchpad.net/alex-p/tesseract-ocr/ubuntu focal main

And checked the URL http://ppa.launchpad.net/alex-p/tesseract-ocr/ubuntu/dists/, there isn't a dist named as focal.
After doing some research, I noticed Ubuntu 18.10(Cosmic) has the same version of libc6(2.28) with Debian buster. But I think there isn't an binary version for Cosmic, http://ppa.launchpad.net/alex-p/tesseract-ocr/ubuntu/dists/cosmic/main/binary-amd64/Packages.gz is an empty file.
Are there anything I missed? I still can't install tesseract-ocr 4.1 on debian buster.

ping @AlexanderP

buster:
deb https://notesalexp.org/tesseract-ocr/buster/ buster main
cosmic:
deb https://notesalexp.org/tesseract-ocr/cosmic/ cosmic main
Fetch and install the GnuPG key
sudo apt-get update -oAcquire::AllowInsecureRepositories=true
sudo apt-get install notesalexp-keyring -oAcquire::AllowInsecureRepositories=true
sudo apt-get update

https://github.com/tesseract-ocr/tesseract/wiki#tesseract-4-packages-with-lstm-engine-and-related-traineddata

Thanks, finally I have upgraded tesseract-ocr to 4.1. And I also add more notes in the wiki for user's who want to install 4.1 on stable and other versions. Previously it's just a link, I didn't realize it's has instructions about how to install it in Debian stable.


User flair notification

We need to send notifications:

To admin users when a verification request was submitted
To users when their request was accepted
To users when their request was denied

I propuse to use the in-app messages system, so we'll need to wait until #176 is merged

do you want to use websocket ? for this in-app messages like https://docs.soketi.app/

That sounds more like a "could-have" than a "should-have" or "must-have". :)
https://en.wikipedia.org/wiki/MoSCoW_method

At this point we don't need websockets :)

Fixed


#1779 set initial values for Plugin cols, colsMd and colsLg after setup

@TheHadiAhmadi the issue has resolved


setUserInfo extraInfo is not working on iOS.

We are using extraInfo to provide information such as region to datadog, to be available for all logs.
This is working fine on Android, but on iOS the information is not appearing in the log.
id is working, it is just the information in extraInfo that is missing.
Our code looks something like this:
  await DatadogFlutter.setUserInfo(
      id: identity.id.toString(),
      extraInfo: {
        'property`': value1,
        'property2': value2.toString(),
        'property3': value3.name
      });

Update
Looked into this a bit more, and have found the issue.
     case "setUserInfo":
        let attributes = encodeAttributes(args?["attributes"] as? String)
        Datadog.setUserInfo(
          id: args?["id"] as? String,
          name: args?["name"] as? String,
          email: args?["email"] as? String,
          extraInfo: attributes ?? [AttributeKey : AttributeValue]()
        )
        result(true)

Trying to get the extraInfo argument using the attributes key.
Happy to create a PR to fix this if it would help?

@dominic-cot a PR would be great, thanks

Released in 1.7.0; thanks @dominic-cot


zsh: remove Vincent Bernat from reviewers for ZSH completion

There have been some pretty invasive changes and I am not comfortable anymore to be considered as a reviewer for the current code.

@vdemeester Did we make a mistake with some past merge? I'd rather discuss this than LGTM this PR :crying_cat_face:

@icecrime you probably meant @vincentbernat, didn't you ? but yeah that's sad :sob:.

can we change it to make it better

it honestly helps us a lot to have more maintainers, the project sees over 100 pull requests per week, so I am very sorry if one got through that was not good, we are trying our hardest but we could really use your help to make sure it doesnt happen again.

It is just reflecting the reality: I don't review most changes. I am not quitting on contributing in this area and I am likely to push some PR in the future. I don't think that a contributed completion plugin is worth any kind of drama.
And, just for the record, there was no bad commit, just a messy one. Most changes in it made sense. I absolutely don't want to belittle others' work because I have different expectations.

It is just reflecting the reality: I don't review most changes.

I think this is where "we" went wrong here. Given the large number of pull-requests in this repository, we cannot expect you to check (on a daily basis) if changes are made to the zsh completion scripts. I try to ping relevant people whenever I see a PR in specific areas but, looking at the history of those file(s), I missed a number of PR's and you were not involved in the reviewing because of that.
Would you still be interested / able to assist in reviewing if we more consistently pinged/involved you in reviewing?

I will still be happy to do reviews if pinged.

Thanks :+1:

Thanks, Vincent. Sad to see this merged, but understandable!


Hierarchical reconciliation and nhits tutorials don't run in colab from the links provided

I was attempting to run some of the tutorial examples.  The first two that I tried were for n-hits and hierarchicaI and both produced errors.   All I was going was stepping through the cells.   For example augment_calendar_df was listed as not found.
Guessing someone hasn't looked at the current updates and installations.
I was really excited about this effort and totally stalled out!

Hi @jzicker,
Sorry for the inconvenience with the missing augment_calendar_df method.
The method is available in the main branch and you can install it with this line:
!pip install git+https://github.com/Nixtla/neuralforecast.git

That fixed the problem.   Posted another one for the long horizon tutorial

Thanks for reporting the issue @jzicker, I will update the tutorial with the correct installation.


Fix(load) : with "auto" chunks and type specified #181

Fixes issue #181 #184 and #183

Hy there.
I fix an issue with chunks "auto" with dtypes and fix cicd issues too (mypy and wheels error).
Can someone make a feedback ? Thanks for your work 🤗
@Kirill888 @alexgleith @robbibt

@nkarasiak thank you for the contribution, but I have to ask you to undo all the formatting changes please, and also rebase your history into a cleaner set of commits, 21 commits for fixing 3 problems is too many commits. Ideally I'd like to see only changes related to the fix present in the PR. This repo uses black for formatting, not ruff (ruff didn't exist when this was started). Please also remove version bump commit. In general please limit amount of change, especially various "cleanup" changes as they make it harder to understand what the real fix is. For example, I see you made various mypy fixes for dtype annotations, I can't tell if these were needed to fix CI/CD or just there as general improvement.
Right now we are in process of splitting odc/loader/ into a separate package, so it's really important to minimize non-essential changes to the code.

I close this pull request, too much drafts.


Add "automount:" and "sudoers:" to nsswitch.conf.

Once LDAP authentication is enabled on a client it is also beneficial to pull autofs maps and sudoes configuration from LDAP server.

It may also be a good idea to manage nsswitch.conf with one of these cookbooks:

https://github.com/sysbot/nsswitch-chef
https://github.com/jeffshantz/chef-nsswitch

@dtoubelis I think it's best to move the management of nsswitch outside this cookbook.  I'm going to look into using nsswitch-chef, which would allow you to add attributes specific to your environmental needs


Migrate all existing activators to use the BaseActivator

In the https://github.com/stargate/stargate/pull/370
we implemented a generic mechanism for managing the activator's lifecycle.
I migrated 3:ConfigStoreActivator, GraphQlActivator and HealhCheckActivator
as a point of reference.
As part of this issue, we should migrate all other existing activators.
It should be done separately because all other activators have no unit or integration tests, so migrating them will require a substantial amount of manual testing.

Thanks for doing this @tomekl007

fixed by: https://github.com/stargate/stargate/pull/436
follow up ticket: https://github.com/stargate/stargate/issues/443


Dynamic nested Routes generation ?

Hi all,
I have a question about generating nested routes on the fly.  I'm able to generate routes on the fly if it is not nested.
Let's look at the following example -
var routes = [
    {
        name: 'about',
        path: '/about',
        handler: './pages/test/index.jsx',

        // this is a nested routes
        routes: [
            {
                name: 'me',
                path: 'me',
                handler: './pages/test/me'
            },
            {
                name: 'you',
                path: 'you',
                handler: './pages/test/you'
            }
        ]
    }
];

And I try to do the followings -
var ExtraRoutes =  [];

_.each(routes, function(route) {
    ExtraRoutes.push(<Route name={route.name} path={route.path} handler={require(route.handler)} addHandlerKey={true} >);

        _.each(route.routes, function(route) {
            ExtraRoutes.push(<Route name={route.name} path={route.path} handler={require(route.handler)} addHandlerKey={true} />)
        });

        ExtraRoutes.push(</Route>);
});

But looks like my syntax is not correct ...  So how to inject those nested routes into the parent route ?
And my end goal is to generate the following
<Route name="about" handler={require('./pages/test')}>
          <Route name="me" handler={require('./pages/test/me')}/>
          <Route name="you" handler={require('./pages/test/you')}/>
</Route>

Any help would be appreciated, thanks.

in 0.13 there is an addRoutes method on your router.

Do you have an example I can reference to ?  I don't see this documented in http://rackt.github.io/react-router/

seems like there are no docs about it but you can have a look here on what to pass to the addRoutes


Feature request

Is your feature request related to a problem? Please describe.
No
Describe the solution you'd like
Is it possible to change all the icons to Flutter TablerIcons which has better UI and might be matched with current design.
Describe alternatives you've considered
If it takes you much time to do it, how can I contribute to apply this feature?
Additional context
Please give a reason if this request is not necessary.

The current icons match the Material Design which is used in the app. I think it is subjective if the "TablerIcons" are better or not.


"Current" dependency does not compile

I keep getting this error when trying to compile a simple "hello_world" using piston and the music library (Rust v1.10.0):
Compiling current v0.1.1
     Running "rustc /home/michael/.cargo/registry/src/github.com-1ecc6299db9ec823/current-0.1.1/src/lib.rs --crate-name current --crate-type lib -g -C metadata=302fdaf8a95a5bdd -C extra-filename=-302fdaf8a95a5bdd --out-dir /home/michael/Code/Rust/hello_music/target/debug/deps --emit=dep-info,link -L dependency=/home/michael/Code/Rust/hello_music/target/debug/deps -L dependency=/home/michael/Code/Rust/hello_music/target/debug/deps --cap-lints allow"
/home/michael/.cargo/registry/src/github.com-1ecc6299db9ec823/current-0.1.1/src/lib.rs:2:1: 2:29 error: #[feature] may not be used on the stable release channel
/home/michael/.cargo/registry/src/github.com-1ecc6299db9ec823/current-0.1.1/src/lib.rs:2 #![feature(core_intrinsics)]
                                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to previous error
Build failed, waiting for other jobs to finish...
error: Could not compile "current".

Caused by:
  Process didn't exit successfully: "rustc /home/michael/.cargo/registry/src/github.com-1ecc6299db9ec823/current-0.1.1/src/lib.rs --crate-name current --crate-type lib -g -C metadata=302fdaf8a95a5bdd -C extra-filename=-302fdaf8a95a5bdd --out-dir /home/michael/Code/Rust/hello_music/target/debug/deps --emit=dep-info,link -L dependency=/home/michael/Code/Rust/hello_music/target/debug/deps -L dependency=/home/michael/Code/Rust/hello_music/target/debug/deps --cap-lints allow" (exit code: 101)

My Cargo.toml file has the dependencies "piston_window" and "piston-music" set to their proper versions.
--EDIT--
I see now that the issue may be that I'm compiling this with Rust "stable". Is there a way we can get this library to work without resorting to using the "nightly" version of Rust?

Same problem trying to build on Rust 0.11.0.


drivers: clock_control: clock_stm32g4: Fix ifdef STM32_LSE_CLOCK

the macro STM32_LSE_CLOCK is always defined and therefore systems
without lse crystals hang on startup.
Used if and IS_ENABLED macro instead.

@erwango please check on a board with LSE if the IS_ENABLED macro does its job correct


Adding the Inkeep AI Chat Button

Description
Adding the Inkeep AI chat button widget per conversation with @asifkazi
Upstream PRs

3.10:
3.11:
3.12:

Not sure what is needed to get the Netlify preview to work. It works for us when running locally via Docker. Feel free to cherry-pick into your own PR if needed!

@nick-inkeep It looks like you didn't enable the option to let us push commits to your fork. Can you pull the main branch of arangodb/docs-hugo into this PR, please?

@Simran-B synced the repo. For the CLA, I'm getting a 404 Not Found. Let me know if you need anything there.

@nick-inkeep I just talked to @asifkazi and looks like the AI bot is needed for the developer hub, not docs. These are separate repos. Please coordinate with him moving forward, I guess this PR is then not relevant here?!

Got it, thanks @nerpaula . We have a version for Developer Hub as well, just don't have permission to make a PR there though (read-only). Will coordinate with Asif. Lets close this one for now.


Add VMware support

This patch adds support for VMware machines.  It's just a matter of adding the name of the IP address attribute, but I've included tests as well.

Great, thanks!


Travis can't set profiling results for pull requests

As seen in #23, all travis builds for pull requests currently fail.
Reason: A pull request could change anything, including brofiler.py. And anyone can create a pull request. Because of that, travis doesn't set secret variables when building pull requests from forks, to avoid straight up leaking the secret.
Yo @moritzuehling, please choose a solution:

somehow convince me to fix it
Use a Workaround: Just ignore it because it doesn't affect internal pull requests and copy pull requests to internal branches to test them
assign it to me and I'll close it as wontfix
assign it to yourself and fix brofiler.py, so it detects pull request builds (travis will set special envvars for that) and doesn't try to set a commit status for those (just print the link to console instead)

Meh, we don't really need this, right...?


ice ip doesn't honor args

hi @NimbleArchitect
issue one trying to find by IP addr
✗  k ice ip -m ip==<IP_ADDRESS>
NAME                                 IP
staging-psql-0               <IP_ADDRESS>
staging-psql-port-forward-0  <IP_ADDRESS>

-T
➜ k ice ip -T
NAME                                 IP
staging-psql-0               <IP_ADDRESS>
staging-psql-port-forward-0  <IP_ADDRESS>

others
➜ k ice ip --show-namespace --show-node --show-type
NAME                                 IP
staging-psql-0               <IP_ADDRESS>
staging-psql-port-forward-0  <IP_ADDRESS>

➜ k ice version
kubectl-ice kubernetes container viewer

version 0.2.11

@dmitry-mightydevops yeah it's bug, it actually appears like the match flag doesn't work for the ip or the name columns. I'll have a look soon as I probably missed something silly.
Thanks for raising it

Took me a while but the ip command has now been updated, I also added a --show-ip flag to the ports command while I was at it
see release v0.2.12: https://github.com/NimbleArchitect/kubectl-ice/releases/tag/v0.2.12

perfect, worked like a charm!
➜ k ice ip --show-namespace --show-node --show-type
T  NAMESPACE  NODE                            PODNAME                          IP
P  prod       ip-10-120-218-235.ec2.internal  backend-85b586d6cb-hq5vk         <IP_ADDRESS>
P  prod       ip-10-120-153-19.ec2.internal   backend-php-76c8587c57-qslxc     <IP_ADDRESS>
P  prod       ip-10-120-149-23.ec2.internal   calendar-54569f4567-jd8v9        <IP_ADDRESS>
P  prod       ip-10-120-149-23.ec2.internal   cms-789959fc49-b4ltn             <IP_ADDRESS>
P  prod       ip-10-120-149-23.ec2.internal   keconnect-5689c57dc4-dphtn       <IP_ADDRESS>
P  prod       ip-10-120-152-82.ec2.internal   keyword-search-76cdccc885-rf5t2  <IP_ADDRESS>
P  prod       ip-10-120-129-167.ec2.internal  webapp-internal-5b6f7bff7-pdcrh  <IP_ADDRESS>
P  prod       ip-10-120-149-23.ec2.internal   webapp-usummit-5757ccc-bx7g2     <IP_ADDRESS>


Evaluation, batch inference and inference API

I was able to fine-tune a Qlora model. When it comes to inference, I don't see any way do batch inference or APIs. Also no way to evaluation.
Am I missing something or is that part of road map?

Maybe this is of interest to you: https://github.com/OpenAccess-AI-Collective/axolotl/pull/291

This is it. I will wait for the PR


New version: Mozilla.Firefox.ESR.xh version 128.4.0

Created by 🥟 Dumplings.
Microsoft Reviewers: Open in CodeFlow

@wingetbot run

@wingetbot run


Solar - Images created in solar can't be set to Dynamic

Used 16 images to create a dynamic image.
Used solar tool to identify alt-az for each each photo's time/location.
Created dynamic image, then saved to Pictures directory in user profile.
In MacOS settings, added Pictures directory and selected dynamic image created by Equinox.
Cannot select Dynamic in settings, only Fill/Stretch/Center/etc.
Also, it appears that the primary image used for thumbnail is the same image that gets set as background when trying to select the image for a background.
Using Equinox 2.0 (5) on Ventura 13.4.1

I found that if I set 1 of the 16 images to also be a light image and another 1 of the 16 to be a dark image, then the dynamic image I generate will allow me to select Dynamic/Light/Dark when setting wallpaper in macOS settings. However, it still uses the image I select as the primary image/thumbnail. Not even changing system time changes the image.

Hi, @mrtoikka!
Looks like you've run into macOS bug. I mentioned it in the FAQ on the ReadMe.

FAQ:

Q: I set up my wallpaper, but it won't change over time. Looks like it doesn't work.

A: Due to macOS bug you need to set «Dynamic» type in your «Desktop & Screen Saver» macOS Preferences before you set the wallpaper.

Open «Desktop & Screen Saver» macOS Preferences.

Choose any «Dynamic Desktop» wallpaper and set it’s type to «Dynamic».

Right click on your wallpaper, then «Services» -> «Set Desktop Picture»

or just simply use Set option right after you create a new wallpaper in Equinox

feel free to report if its still an issue!


[ADP-2979] Remove wallet id parameter from db layer

[x] remove  WalletId parmeter from all DBLayer methods.
[x] remove tests that were reflecting on multiple wallet support in the DB

ADP-2979

bors r+


basic features

[ ] Why git: https://www.youtube.com/watch?v=4XpnKHJAok8

Basics:

[ ] How to make repo

[ ] git clone, why to avoid git init
[ ] license
[ ] gitignore

[ ] The basic steps: add, commit, push

Looking at wtf is going on:

[ ] git status
[ ] git diff
[ ] git diff --staged (or --cached in older git versions)
[ ] git log --oneline --all --graph, and making an alias for it

Working with other people:

[ ] How to invite another collaborator
[ ] What to do when the collaborators try to push conflicting changes

Pull requests:

[ ] How to decide whether you should use pull requests (to me, is the repo new or is there already a lot of code to maintain, but mention other opinions)
[ ] How to make a basic pull request: git checkout -b branchname, git push --set-upstream origin

[ ] How to fork the repo and add your fork as a new remote, in case you were not invited

[ ] How to review a pull request
[ ] How to update a pull request to be based on latest main (mention both merge and rebase)
[ ] The "squash and merge" button

@PurpleMyst I'd be interested in what you think about this plan.

I like it, but I'm not sure why git init is bad?  I use it

If you use git init with a github repo, you will also need to know how to git remote add origin https://github.com/username/repo and then tell git pull to merge the unrelated histories. It's not terribly complicated, but it's certainly more work than a single git clone command.

Makes sense. Usually, when I've git init-ed a repo locally, I make the repo remote on GitHub be empty and make any licenses/gitignores manually


Don't convert chunks to matrixes and then merges them...

...use iterators instead.
Also:

Update remote read endpoint for SeriesSet interface.
Copy the upstream heap-based merging code, and update it for chunk boundaries.
Dedupe samples coming out of the merge iterator.

Big drawback of this approach is the optimisation necessary about Seek - as we don't know the end time for any particular-seek'd iterator, we aren't technically able to filter out chunks in the future.  This has a large performance impact (basically O(n^2)), as seeks at the very beginning of the range have to include all chunks.  To avoid this I've assumed an end time of 48hrs, meaning vector queries with duration larger than 24hrs won't work correctly (ie sum(rate(foo[48h]))).  But OTOH this allows code closer to O(n log n).
Before vs after:
benchmark                     old ns/op     new ns/op     delta
BenchmarkChunkQueryable-4     364386071     44484806      -87.79%

benchmark                     old allocs     new allocs     delta
BenchmarkChunkQueryable-4     1019223        453391         -55.52%

benchmark                     old bytes     new bytes     delta
BenchmarkChunkQueryable-4     903011968     14560358      -98.39%

Thats about 8.2x speed up in ns/op and 62x less memory usage.
Part of #209, closes #81 as redundant.

Having deployed this to our dev env I didn't see the kind of speed up I was expecting.  On investigation the code is very sensitive to "chunk density" - how many chunks there are per 48 hours.  I originally modelling it at 48 (one per hour, each 3 hours long), but modelling as one every 6 mins more closely matches the performance I see in dev.
The good news is its still an improvement, but just not as much as before:
benchmark                                old ns/op     new ns/op     delta
BenchmarkChunkQueryableDoubleDelta-4     56575939      61026739      +7.87%
BenchmarkChunkQueryableVarbit-4          54786710      48974757      -10.61%

benchmark                                old allocs     new allocs     delta
BenchmarkChunkQueryableDoubleDelta-4     132677         119285         -10.09%
BenchmarkChunkQueryableVarbit-4          110284         82466          -25.22%

benchmark                                old bytes     new bytes     delta
BenchmarkChunkQueryableDoubleDelta-4     126389364     5278391       -95.82%
BenchmarkChunkQueryableVarbit-4          125695590     4220598       -96.64%

We're seeing some more issues with this in testing.  Worth reviewing, but don't merge yet.

I've resurrected this and fixed the correctness issues (by expanding the tests).  Current performance:
$ go test ./pkg/querier -benchmem -bench BenchmarkChunkQueryable
goos: darwin
goarch: amd64
pkg: github.com/weaveworks/cortex/pkg/querier
BenchmarkChunkQueryable/matrixes/DoubleDelta-4         	      20	  57487641 ns/op	144035209 B/op	  101260 allocs/op
BenchmarkChunkQueryable/matrixes/Varbit-4              	      20	  54214617 ns/op	143203628 B/op	   74548 allocs/op
BenchmarkChunkQueryable/iterators/DoubleDelta-4        	      20	  84387322 ns/op	 3114931 B/op	   94822 allocs/op
BenchmarkChunkQueryable/iterators/Varbit-4             	      20	  81035552 ns/op	 2283036 B/op	   68109 allocs/op
PASS
ok  	github.com/weaveworks/cortex/pkg/querier	10.560s

Old path (matrixes) is faster, but 60x more memory usage.  Going to see if I can improve this a bit.

Found an optimisation in the ChunksToMatrix function too, so results are now:
$ go test ./pkg/querier -benchmem -bench BenchmarkChunkQueryable
goos: darwin
goarch: amd64
pkg: github.com/weaveworks/cortex/pkg/querier
BenchmarkChunkQueryable/matrixes/DoubleDelta-4<PHONE_NUMBER>6 ns/op    42817634 B/op       23292 allocs/op
BenchmarkChunkQueryable/iterators/DoubleDelta-4                  20      76533564 ns/op      984637 B/op       16846 allocs/op
BenchmarkChunkQueryable/matrixes/Varbit-4<PHONE_NUMBER>1 ns/op    42817585 B/op       22573 allocs/op
BenchmarkChunkQueryable/iterators/Varbit-4                       20      81691003 ns/op      984516 B/op       16125 allocs/op
PASS
ok      github.com/weaveworks/cortex/pkg/querier    8.490s

I suspect it might make sense to pick the strategy (iterate or merge) based on the length of the query (or the number of chunks in the series).

Needed to update the vendored Prometheus for https://github.com/prometheus/prometheus/commit/78efdc6d

Are you thinking at some point use matrix for queries with a small number of chunks for speed, and iterator for a large number of chunks to not OOM?

Right now I'm just trying to stop the querier OOMing for high cardinality / long queries / lots of simultaneous queries.  But yeah, once I've got that working it probably makes a lot of sense to switch based on number of chunks per series - good idea!


Launchfile structure

This issue is to merge two different conversion in one. #7 & #33
As it was noted on the previous issue, the launch file structure and logic is getting really messy and some have incorrect path to other launch file since they are no longer maintain.
The new structure and logic with the launch file should be discuss here so we can propose something better.

I propose a package that contains the launch file for the different module like sara_launch.

Could you describe more your proposition @maximest-pierre. Right now I understand you do not want to change anything and propose we keep everything the same. Is it right?
The issue first come's from the fact that the teleoperation launch was also launching the drive for the wheel while teleoperation could also be used in the simulation, so an exemple was given to reverse the process that launching the simulation would launch the teleoperation and launching the drive would launch the teleoperation.

Keep the main launch file inside one package for easy use. Like start navigation, start teleoperation no sim, gmapping. We can make a subfolder for simulation launch file.

Ok I think I got it.
Because there is package installed (no source), package cloned (no modification possible), and our package, I think that it would be simpler to put every launch file in Sara_launch. But they need to be separated in main launchfile (launchfile calling launchfile) and unitary launchfile (launchfile starting one node)

Je ne sais pas encore quoi faire des remote launch file par example.. 0o Dans sara_simulation ca fait pas de sens pour quelqu'un qui ne travail jamas avec le robot.. et dans sara_commun ca fait pas de sens parce qu'il vont se retrouver sur sara..

Un autre option serrait de nous obligé a toujours spécifier le paramètre "machine" dans les launch file unitaire. De cette manière, les main launch file remote sont les même que  ceux sur sara et peuveuve être placé dans sara_commun/sara_launch


Making category an array in metadata.json & adding experimental category to it

Addresses #39

:shipit: but make sure Portal is able to consume it before getting it in (or at least that it doesn't completely blow up).

talked @alrod will merge once the portal is ready to consume the changes


Small doc fix for max-width

Was reading through the pf3 proposal and noticed a small doc typo in the buildStr funcion.

Thx


Change Redis to Postgres

Headline
Use Postgres instead Redis as database

Hi, is it any reason to change ?
As I see it's a full replacement of redis not like adding one alternative of storage. Am I correct ?

Hi, is it any reason to change ?
As I see it's a full replacement of redis not like adding one alternative of storage. Am I correct ?

The Redis is not used well.
Redis doesn't do queries, and we start to create some redundancies, and the memory did start to increase a lot.


Added Reverse StringBuilder functionality

Changes:

Added StringBuilder Reverse functionality
Added tests to verify correctness of Reverse functionality
Added tests to verify reuse of reversed string builder

This is to address the feature request discussed under https://github.com/linkdotnet/golang-stringbuilder/issues/4

Changes are looking good @varunu28
One thought we might wanna keep in mind for the future (or even v1): Right now the StringBuilder does not support Unicode characters (like emojis) - everything that consists of multiple runes.

Changes are looking good @varunu28
One thought we might wanna keep in mind for the future (or even v1): Right now the StringBuilder does not support Unicode characters (like emojis) - everything that consists of multiple runes.

Oh thanks for that callout. That will definitely require some amount of redesign for how we are currently storing contents of string builder.


DOCS Add documentation for configuring a HistoryViewerField for custom DataObjects

Issue: https://github.com/silverstripe/silverstripe-versioned-admin/issues/60

Can't approve, but looks thorough and good :)


added Show Arrow Indicator

I think same functionality can be achieved by not passing SwiperControl in control parameter.
Without controls:
Swiper(
    itemBuilder: (BuildContext context,int index){
      return Image.network("https://via.placeholder.com/350x150",fit: BoxFit.fill,);
    },
    itemCount: 3,
    pagination: SwiperPagination(),
),

With controls:
Swiper(
    itemBuilder: (BuildContext context,int index){
      return Image.network("https://via.placeholder.com/350x150",fit: BoxFit.fill,);
    },
    itemCount: 3,
    pagination: SwiperPagination(),
    control: SwiperControl(),
),

@coder-Aayush : I need more explanation to understand requirement of this change.

ya, functionality can be achieved with your code but it is confusing to others including me. If we add showArrowIndicator it will be easier to to know this will show/hide Arrow Indicator.
What's your thought on this? @TheAnkurPanchani

Providing SwiperControl object and then using this parameter to hide them is not good practice I think. If you find it confusing then improving documentation or providing FAQs seems better option than making this change according to me.

Thanks Sure, I am closing this PR :)


Cannot read property 'samples' of undefined error when use mse and fmp4

🐛 Bug Report
getSamplesInterval.js:24 Uncaught TypeError: Cannot read property 'samples' of undefined
    at getVideoSamplesInterval (getSamplesInterval.js:24)
    at MP4Probe.updateInterval (mp4Probe.js:28)
    at MP4Probe.getFragmentPosition (mp4Probe.js:51)
    at MSE.seek (controller.js:66)
    at Player._this.handlePlay (player.js:82)
    at HTMLUnknownElement.callCallback (react-dom.development.js:147)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:196)
    at invokeGuardedCallback (react-dom.development.js:250)
    at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:265)
    at executeDispatch (react-dom.development.js:571)
    at executeDispatchesInOrder (react-dom.development.js:596)
    at executeDispatchesAndRelease (react-dom.development.js:695)
    at executeDispatchesAndReleaseTopLevel (react-dom.development.js:704)
    at forEachAccumulated (react-dom.development.js:676)
    at runEventsInBatch (react-dom.development.js:844)
    at runExtractedEventsInBatch (react-dom.development.js:852)
    at handleTopLevel (react-dom.development.js:5030)
    at batchedUpdates$1 (react-dom.development.js:21437)
    at batchedUpdates (react-dom.development.js:2247)
    at dispatchEvent (react-dom.development.js:5110)
    at react-dom.development.js:21494
    at Object.unstable_runWithPriority (scheduler.development.js:255)
    at interactiveUpdates$1 (react-dom.development.js:21493)
    at interactiveUpdates (react-dom.development.js:2268)
    at dispatchInteractiveEvent (react-dom.development.js:5086)

To Reproduce
add player with fmp4 url , trun on useMSE  ,  click the player then got  error in console.
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import Player from 'griffith'

class App extends Component {
  render() {
    const sources = {
      hd:{
        play_url: 'http://localhost:9999/dog.f.mp4',
        bitrate:1522,
        duration:29,
        format:'mp4'

      }
    }
    return (
      <div className="App">
        <header className="App-header">
        <Player sources={sources} id="player"  useMSE={true} />
        </header>
      </div>
    );
  }
}

export default App;

error
getSamplesInterval.js:24 Uncaught TypeError: Cannot read property 'samples' of undefined
    at getVideoSamplesInterval (getSamplesInterval.js:24)
    at MP4Probe.updateInterval (mp4Probe.js:28)
    at MP4Probe.getFragmentPosition (mp4Probe.js:51)
    at MSE.seek (controller.js:66)
    at Player._this.handlePlay (player.js:82)
    at HTMLUnknownElement.callCallback (react-dom.development.js:147)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:196)
    at invokeGuardedCallback (react-dom.development.js:250)
    at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:265)
    at executeDispatch (react-dom.development.js:571)
    at executeDispatchesInOrder (react-dom.development.js:596)
    at executeDispatchesAndRelease (react-dom.development.js:695)
    at executeDispatchesAndReleaseTopLevel (react-dom.development.js:704)
    at forEachAccumulated (react-dom.development.js:676)
    at runEventsInBatch (react-dom.development.js:844)
    at runExtractedEventsInBatch (react-dom.development.js:852)
    at handleTopLevel (react-dom.development.js:5030)
    at batchedUpdates$1 (react-dom.development.js:21437)
    at batchedUpdates (react-dom.development.js:2247)
    at dispatchEvent (react-dom.development.js:5110)
    at react-dom.development.js:21494
    at Object.unstable_runWithPriority (scheduler.development.js:255)
    at interactiveUpdates$1 (react-dom.development.js:21493)
    at interactiveUpdates (react-dom.development.js:2268)
    at dispatchInteractiveEvent (react-dom.development.js:5086)

Expected behavior
play video without anyerror
Link to repl or repo (highly encouraged)
https://github.com/easychen/bad-player-demo
Run npx envinfo --system --binaries --npmPackages griffith --markdown --clipboard
Paste the results here:

## System:
 - OS: macOS High Sierra 10.13.6
 - CPU: (4) x64 Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
 - Memory: 88.14 MB / 10.00 GB
 - Shell: 5.3 - /bin/zsh
## Binaries:
 - Node: 11.12.0 - /usr/local/bin/node
 - Yarn: 1.12.3 - ~/.yarn/bin/yarn
 - npm: 6.7.0 - /usr/local/bin/npm
 - Watchman: 4.7.0 - /usr/local/bin/watchman
## npmPackages:
 - griffith: ^1.1.1 => 1.1.1

hi @easychen
This bug occurs mainly because griffith-mp4 converts mp4 to fmp4 and then plays it through MSE. If your video is originally in fmp4 format, this process will throw an error.
we will fix this problem as soon as possible, thank you for your report.

Hi, is this issue being actively looked it . I can take a look otherwise .

hi @skaundin
This bug has not been deployed. You can contribute to it if you want 🤗


"Failed to find any valid GLX configs" error on x11

I am on void linux
I have the proprietary nvidia 550.120_3 drivers.
All the lines in my /var/log/Xorg.0.log file that contain the word "GLX" are the following:

[ 21901.936] (II) NVIDIA GLX Module  550.120  Fri Sep 13 10:02:06 UTC 2024
[ 21902.286] (II) Initializing extension GLX
[ 21902.286] (II) Initializing extension GLX
[ 21902.286] (II) Indirect GLX disabled.
[ 21902.286] (II) GLX: Another vendor is already registered for screen 0
[ 21902.286] (II) Initializing extension NV-GLX

No similar error happens when using GLFW.
The code that I'm using is this:

package testbed

import "core:fmt"
import "core:log"
//import glfw "vendor:glfw"
import rgfw "external/RGFW-Odin/RGFW"
import mem "core:mem"

drawRect :: proc(win : ^rgfw.window, r : rgfw.rect, color: ^[3]u8) {
    for x := r.x; x < (r.x + r.w); x += 1 {
        for y := r.y; y < (r.y + r.h); y += 1 {
            //index := y * (4 * screenSize.w) + x * 4;
            index := y * (4 * 800) + x * 4; // TODO: DONT HARDCODE THE WIDTH

            mem.copy(&win.buffer[index], &color[0], 3 * size_of(u8));
        }
    }
}

icon := []u8{0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF};

Program :: struct {
    window : ^rgfw.window,
    is_running : bool,
}

init_program :: proc(program : ^Program) {
    program.window = rgfw.createWindow("Colo teroritta", { 400, 400, 800, 800 }, .CENTER)
    rgfw.window_makeCurrent(program.window)

    //gl.load_up_to(3, 3, rgfw.gl_set_proc_address)

    rgfw.window_setCPURender(program.window, 1)
    rgfw.window_setGPURender(program.window, 0)

    screen_size := rgfw.getScreenSize()
    fmt.println(screen_size)

    if program.window == nil {
        log.panic("RGFW failed to create the main window")
    }

    //rgfw.window_swapInterval(program.window, 1)
    rgfw.window_setIcon(program.window, raw_data(icon), {3, 3}, 4)

    program.is_running = true
}

teardown_program :: proc(program : ^Program) {
    program.is_running = false
    rgfw.window_close(program.window)
}

main :: proc() {
    program := Program{}
    init_program(&program)
    defer teardown_program(&program)

    for !rgfw.window_shouldClose(program.window) {

        // handle events
        for rgfw.window_checkEvent(program.window) != nil {
            if program.window.event.type == .quit {
                break
            }
        }

        do_drawing(&program)
    }

}

do_drawing :: proc(program : ^Program) {

    color1 : [3]u8 = {0, 0, 255}
    drawRect(program.window, {0, 0, program.window.r.w, program.window.r.h}, &color1)

    color2 : [3]u8 = {255, 0, 0}
    drawRect(program.window, {200, 200, 200, 200}, &color2)

    rgfw.window_swapBuffers(program.window)
}

I'm transferring the issue here because I believe the source of the issue is the original code.
Could you tell me more about your GPU? I mostly would like to know what the latest version of OpenGL it supports and if it supports Vulkan.

I have an nvidia gtx 950.
glxinfo | grep "OpenGL version" outputs this:
OpenGL version string: 4.6.0 NVIDIA 550.120
Vulkan is supported. Just yesterday I was trying to set up the vulkan sdk for development, and I ran the provided vkcube executable, which ran without issues.
You're right, the log is old. I'll get a more recent version if you need it.

@chris-montero I'll look into this issue as soon as I can. At the moment I am a bit busy. I believe the first error is caused by
this line on line 2543
XMatchVisualInfo((Display*) win->src.display, DefaultScreen((Display*) win->src.display), 32, TrueColor, vi); /*!< for RGBA backgrounds*/

@ColleagueRiley I did so, and some of them work fine with the C examples.
These examples fail, along with their error messages:
* examples/buffer/

X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  5 (X_GLXMakeCurrent)
  Serial number of failed request:  48
  Current serial number in output stream:  48

* examples/events/

X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  5 (X_GLXMakeCurrent)
  Serial number of failed request:  47
  Current serial number in output stream:  47

* examples/gl33/

X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  12 (X_ConfigureWindow)
  Value in failed request:  0x0
  Serial number of failed request:  41
  Current serial number in output stream:  44

* examples/vk10/
  `zsh: segmentation fault  ./vk10`

These first two bugs might be fixed. I'd need to know more about the last two errors to attempt to fix them.

Btw I tried running vk10 in gdb, and this is the backtrace:
#0  0x00007ffff65e12e0 in ?? () from /usr/lib/libnvidia-glcore.so.550.120
#1  0x00007ffff65ecb17 in ?? () from /usr/lib/libnvidia-glcore.so.550.120
#2  0x00007ffff651d4c5 in ?? () from /usr/lib/libnvidia-glcore.so.550.120
#3  0x00007ffff7a0cda0 in ?? () from /usr/lib/libGLX_nvidia.so.0
#4  0x00007ffff7d2dd78 in terminator_CreateDevice (physicalDevice=physicalDevice@entry=0x5555556db030, pCreateInfo=pCreateInfo@entry=0x7fffffffd970, pAllocator=pAllocator@entry=0x0,
    pDevice=pDevice@entry=0x7fffffffd928) at /home/chris/software/VulkanSDK/1.3.296.0/source/Vulkan-Loader/loader/loader.c:5975
#5  0x00007ffff7d37e65 in loader_create_device_chain (pd=pd@entry=0x5555556db030, pCreateInfo=pCreateInfo@entry=0x7fffffffdb80, pAllocator=pAllocator@entry=0x0, inst=inst@entry=0x555555592410,
    dev=dev@entry=0x555555704390, callingLayer=callingLayer@entry=0x0, layerNextGDPA=0x0) at /home/chris/software/VulkanSDK/1.3.296.0/source/Vulkan-Loader/loader/loader.c:5070
#6  0x00007ffff7d38aee in loader_layer_create_device (instance=instance@entry=0x0, physicalDevice=physicalDevice@entry=0x5555556daa10, pCreateInfo=pCreateInfo@entry=0x7fffffffdb80,
    pAllocator=pAllocator@entry=0x0, pDevice=pDevice@entry=0x555555566b50 <RGFW_vulkan_info+16>, layerGIPA=layerGIPA@entry=0x0, nextGDPA=0x0)
    at /home/chris/software/VulkanSDK/1.3.296.0/source/Vulkan-Loader/loader/loader.c:4445
#7  0x00007ffff7d3f9c6 in vkCreateDevice (physicalDevice=0x5555556daa10, pCreateInfo=0x7fffffffdb80, pAllocator=0x0, pDevice=0x555555566b50 <RGFW_vulkan_info+16>)
    at /home/chris/software/VulkanSDK/1.3.296.0/source/Vulkan-Loader/loader/trampoline.c:1017
#8  0x000055555555e9f5 in RGFW_deviceInitialization ()
#9  0x000055555555e44f in RGFW_initVulkan ()
#10 0x000055555555f8a1 in main ()

@ColleagueRiley for the gl33 example, if you can give me a patched version of the code that would produce more relevant information for you, I can run it and give you the output.

@chris-montero I'm not entirely sure why that issue is happening. The error is a bit vague. It could mean, for example, that the window is just too large. Would you mind debugging the example and finding where the issue occurs?  @chris-montero

@ColleagueRiley I tried to debug it with both gdb and lldb, but I guess that won't do much since it seems to be an x11 error, not a segfault or anything like that. I don't know what else to try. Do you have any suggestions?

https://github.com/ColleagueRiley/RGFW/commit/f93c2fd78f8241844e5788d94892f25390733ea8
Should fix your gl33 issue

This fixes the problem. You can keep this issue to keep investigating and find a more robust fix for gl33. or do whatever you want with it i dont really care

It's likely that the monitor.scaleX is being set to INFINITE because physW is == 0, then dpi_width is set to monitor.rect.x / 0.
This commit (https://github.com/ColleagueRiley/RGFW/commit/5320971f85c6d4baeacb3444037107a2bee5c965) should use the first physW value found if the second value is 0.


pkg/k8s: add client InClusterConfig option

With InClusterConfig users will not need to specify kubeconfig nor mount
a volume in cilium daemonset to export k8s certificate authority file. The InClusterConfig will be
used by default if the user does not specify k8s-api-server IP nor
kubeconfig filepath.
Signed-off-by: André Martins<EMAIL_ADDRESS>

@ianvernon I'm currently adapting the k8s runtime tests to use this ;-)