Fatal error during k-NN search

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGILL (0x4) at pc=0x00007fc8997e6f89, pid=1, tid=343
#
# JRE version: OpenJDK Runtime Environment AdoptOpenJDK (14.0.1+7) (build 14.0.1+7)
# Java VM: OpenJDK 64-Bit Server VM AdoptOpenJDK (14.0.1+7, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C  [libKNNIndexV1_7_3_6.so+0x1a1f89]  float std::generate_canonical<float, 24ul, std::mersenne_twister_engine<unsigned long, 32ul, 624ul, 397ul, 31ul,<PHONE_NUMBER>ul, 11ul,<PHONE_NUMBER>ul, 7ul,<PHONE_NUMBER>ul, 15ul,<PHONE_NUMBER>ul, 18ul,<PHONE_NUMBER>ul> >(std::mersenne_twister_engine<unsigned long, 32ul, 624ul, 397ul, 31ul,<PHONE_NUMBER>ul, 11ul,<PHONE_NUMBER>ul, 7ul,<PHONE_NUMBER>ul, 15ul,<PHONE_NUMBER>ul, 18ul,<PHONE_NUMBER>ul>&)+0x1c9
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# logs/hs_err_pid1.log
#
# If you would like to submit a bug report, please visit:
#   https://github.com/AdoptOpenJDK/openjdk-support/issues
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

Docker running on macOS HighSierra
Image: amazon/opendistro-for-elasticsearch:1.9.0
Arch: x86_64
Memory: 16Gb
Disc: 100Gb available

Just ran docker run -d -p 9200:9200 -p 9600:9600 -e "discovery.type=single-node" amazon/opendistro-for-elasticsearch:1.9.0
Seems to be related to #95 and https://discuss.opendistrocommunity.dev/t/es-crashes-when-indexing-knn-vectors/3682
"settings": {
    "index.knn": True,
    "knn.space_type": "cosinesimil",
    "number_of_shards": 1,
    "number_of_replicas": 0
},
"mappings": {
    "properties": {
        "pid": {
            "type": "keyword",
            "index": True
        },
        "vec": {
            "type": "knn_vector",
            "dimension": 256
        }
    }
}

Hi @williamdias
Yes, I believe it is related to that issue.
When building the docker image, we build the library natively to the machine the docker image is being built on. That machine has support for optimized instructions. I am guessing your machine does not have that support, causing the library to crash.
In this PR we disable optimizations during library build for docker image.
However, as a work around, it is probably best to build the library from source so that it is compatible with your machine. Those steps would be as follows:
docker pull centos:7

docker run -it centos:7  /bin/bash -c "yum install git cmake gcc-c++ make -y; curl -O https://download.java.net/java/GA/jdk14/076bab302c7b4508975440c56f6cc26a/36/GPL/openjdk-14_linux-x64_bin.tar.gz; tar xvf openjdk-14_linux-x64_bin.tar.gz; export JAVA_HOME=/jdk-14; git clone https://github.com/opendistro-for-elasticsearch/k-NN.git; cd k-NN; git checkout v<IP_ADDRESS>; git submodule update --init -- jni/external/nmslib; cd jni; cmake .; make;"

docker cp <containerID>:/k-NN/jni/release/libKNNIndexV1_7_3_6.so `pwd`

docker run -d -p 9200:9200 -p 9600:9600 -e "discovery.type=single-node" -v `pwd`/libKNNIndexV1_7_3_6.so:/usr/lib/libKNNIndexV1_7_3_6.so amazon/opendistro-for-elasticsearch:1.9.0

Could you try that and let us know if it works for you?
Jack

Hi @jmazanec15
The proposed solution worked.
Thank you!


feat!: assert on dev messages

Opening this preemptively to track changes, git rebases, etc
#957

Currently tracking the breaking changes list in Linear for the 0.6.0 release, I'll update this PR's description once the subtasks are done and we're ready to merge

What makes this a breaking change?

@fubuloubu quick summary is: no behavior is changing in a breaking way (since the default raise_on_fail for get_receipt() and await_confirmations() will be False) but because of the added kwarg it breaks provider plugins
Once this PR is out of draft I'll be updating its description with a full run-down
Jules and I discussed a bit on maybe using **kwargs or similar to mitigate the breaking signature change, but we ended up deciding to hold until a v0.6.0 because of the break and how many repos this involves. The dependent pieces that will all go out for v0.6.0 are:

ape-vyper updates to add the source map (https://github.com/ApeWorX/ape-vyper/pull/51), and same for solidity I think
ape updates to add the feature (which will be supported by the aforementioned compiler plugins adding sourcemap)
The remaining provider plugins are updated to reflect the new ape core version dependency (the ones that just had those feature branches created: Hardhat, Foundry, etc.)

The changes in the open ape PR draft aren't breaking changes so far but I'll have to see where I land. I think though that those changes should remain non-breaking

Closing in favor of https://github.com/ApeWorX/ape/pull/1125


feat: change manifests folder chown grp to 0(root) - openshift friendly

Signed-off-by: Tuan Anh Tran<EMAIL_ADDRESS>
Proposed changes
Change manifests folder chown grp to 0(root) group to make it openshift friendly.
require this PR to be merged first https://github.com/litmuschaos/test-tools/pull/200
penshift run container with an arbitrary uid that in the root group. we want that arbitrary container user to have full access to /litmus so we can change the permission of the folder in /litmus to be litmus:0 (edited)
it's simmilar with what nginx-unprivileged is doing as well nginxinc/docker-nginx-unprivileged#10
Types of changes
What types of changes does your code introduce to Litmus? Put an x in the boxes that apply

[ ] New feature (non-breaking change which adds functionality)
[x] Bugfix (non-breaking change which fixes an issue)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation Update (if none of the other choices applies)

Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

[x] I have read the CONTRIBUTING doc
[ ] I have signed the commit for DCO to be passed.
[x] Lint and unit tests pass locally with my changes
[ ] I have added tests that prove my fix is effective or that my feature works (if appropriate)
[ ] I have added necessary documentation (if appropriate)

Dependency

Please add the links to the dependent PR need to be merged before this (if any).

Special notes for your reviewer:
require this PR to be merged first https://github.com/litmuschaos/test-tools/pull/200

hadolint fails but it seems to be fixed upstream https://github.com/hadolint/hadolint/issues/609

@tuananh Can you update your branch?

@rajdas98 updated :)


"Căpățânenii Pământeni" is listed in the drop-down menu

Description:
"Căpățânenii Pământeni" is listed in the drop-down menu alongside its corresponding county and commune, according to the law
Precondition:
The website is up an running.

Step 1
Type "Căpățânenii Pământeni" in the search bar.

Expected results
The location is listed in the drop-down menu as "Căpățânenii Pământeni, Argeș (Arefu)".


[stable/gocd] Bump up k8 elastic agent to latest and bump up GoCD to v19.3.0

What this PR does / why we need it:
Which issue this PR fixes
(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

Update k8's Elastic Agent Plugin, update configmap.yaml to reflect multi-cluster changes. Bumped up Elastic Profile API to v2. Added Cluster profile API and removed plugin settings API for k8's plugin

Special notes for your reviewer:
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

[x] DCO signed
[x] Chart Version bumped
[x] Variables are documented in the README.md

/ok-to-test

/lgtm

/retest

/retest


EVM on LW does not show DUSD balance

What happened:
I transferred DUSD from the DVM to the EVM on the LW. While the transaction has gone through and I can see the correct balance on mydefichain, in the LW the DUSD do not show up at all. Meaning I can't use them at the moment.
What you expected to happen:
To see the correct balance in the LW.
How to reproduce it (as minimally and precisely as possible):
Send DUSD from the DVM to EVM on LW. Apparently there are cases in which it works and in which it doesn't.
Anything else we need to know?:

Did Light Wallet happen to give any error messages, and has the correct balance eventually appeared, or is it still showing an incorrect balance?

No, no error was shown and the balance remains incorrect. If I send DFI to the address, they are updated correctly though. The error only applies to DUSD balance.

After sending a smaller amount of DUSD from DVM to EVM it eventually did show the correct balance. However this should happen immediately.

This has been fixed with the latest release. Please update and check, thanks!


Show nutrition table and nutrition per portion button if nutritional values are available

Description
If the size of nutrimentListItems is greater than 1 then only show them. By default set there visibility to gone.
Related issues
Fixes #2960
Related PRs
None
Screenshots

@VaiTon Here, also I am unable to understand why apk generation is failing. I am able to build the app. Also assembleDebug shows no errors.

@VaiTon Here, also I am unable to understand why apk generation is failing. I am able to build the app. Also assembleDebug shows no errors.


Default http client should have timeout

The default HTTP Client doesn't have a timeout and this may create problems (stuck cli's)
This PR changes the default HTTP Client to have a 30s timeout

This was done on purpose.
First, it's easier saying "if you don't pass a client, the library uses Go's default client" than "if you don't pass a client, the library uses a client that is similar to Go's default client, but with a 30s timeout".
Second, the HTTP client timeout is an option that belongs to the user of this library. If a user wants to configure a 30s timeout, the library allows it. Moreover, why 30s and not 1s or 1m? Because the library has no idea how to set up a timeout that could satisfy its user. But the user knows how to satisfy himself, so let him set his own timeout.

I still think a long timeout is better than no timeout by default.


Added Custom Music Player [GSSOC 23 : Issue #99]

Added Custom Music Player software, for GSSOC 23, Issue no.: #99
Deploy link: https://sujanrupu.github.io/MusicPlayer/
Screenshot:

Awesome!!


release: v0.8.0

Description: 概要

Changes: 変更内容

Changes

feat: add tag feature (closes #88) (394eeaa127b24b798ccda6f546679cba35790b23)
feat: add tags page (bf8aaef5e57dead6a543649d1c9080efdcc5a0c2)
feat: implement tags (261246924f4b5fb5270e4f3fd9e5191477d32b18)
feat: add tag to article page (59de775f4fca27b3d6e5eff952e3024bd6c2d614)
feat: add tags to list page (3b2a83eb5f8f54913e65f445daa99c5fe8c92af7)
fix: tags to post detail (e5f74612dbb14cff03da9d2612ed1eb36257b2c8)
fix: eslint (0652f56087b8323a67b1bd62de259abd872b42ff)
fix: display tag name (bba3106403c0488f5727b6515932b52d126e234d)
fix: type errors (a671ab644f68f0d8cfe04eb529974bb8aee75f2f)
chore: tweaks (58bfd8d3e91cb55b6089d43c3e1318f357082729, b200f873e12a193a884360d98eeb459c7bf3cc7d, dd9fee991c23001a3955d928e942b1c4fac77fa2)
chore: add tags to post entity (5f6c1911b4d244e95de4a671afc131fe03517592)
chore: add tag chip component (7595f17dda792e6bad7005cc1dbf9f30a6b26da1)
chore: update snapshots (ba00a27292b8eb32dd0f6c7ed102a75550169f4d, ca2518e8003c37cc40effbcc272bfb48b372b591)

Expected Impact: 影響範囲

Operating Requirements: 動作要件

Additional context: 補足

Codecov Report

Merging #96 (eacea39) into main (b12fb2d) will decrease coverage by 1.54%.
The diff coverage is 16.07%.

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

@@            Coverage Diff             @@
##             main      #96      +/-   ##
==========================================
- Coverage   41.27%   39.73%   -1.55%
==========================================
  Files         141      150       +9
  Lines        1141     1228      +87
  Branches      202      221      +19
==========================================
+ Hits          471      488      +17
- Misses        648      718      +70
  Partials       22       22

Impacted Files
Coverage Δ

src/components/wrap.ts
100.00% <ø> (ø)

src/config/registry.server.ts
0.00% <0.00%> (ø)

src/config/registry.shared.ts
0.00% <0.00%> (ø)

src/packages/domain/post/dto/postDetail.ts
0.00% <0.00%> (ø)

src/packages/domain/post/dto/tag.ts
0.00% <0.00%> (ø)

src/packages/domain/post/entity/post.ts
0.00% <ø> (ø)

src/packages/domain/post/entity/postDetail.ts
0.00% <0.00%> (ø)

src/packages/domain/post/entity/tag.ts
0.00% <0.00%> (ø)

src/packages/domain/post/valueObject/name.ts
0.00% <0.00%> (ø)

src/packages/domain/post/valueObject/slug.ts
0.00% <0.00%> (ø)

... and 21 more

Continue to review full report at Codecov.

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


How to open nav with screen swipe on mobile devices

Hello somewebmedia , I hope you are doing fine. The navbar would be more robust if we could add a feature to open it on mobile devices through swipe of screen as is available in native apps. I would like to contribute if you wish.
Thank you.

I'll have to think about this.

I thought about it and implemented it. It's in the latest version. :)
Haven't tested it on iPhone tho, only on Android device.

So, nice of you for adding this native app like feature.
It would be very nice if there is an option to change text color and background color of the navigation from a single place rather than editing the demo.css file at multiple places with hex code.

You should not use the demo.css file, it serves just for the repository demo purposes.
In fact you shouldn't edit any of the files from this plugin. If you want to change the look of the nav there are two ways:

Via scss, by assign your colors to predefined vars and importing the main scss into your scss:

$hc-offcanvas-nav-background-color: #0d0d0d;
$hc-offcanvas-nav-text-color: #dedede;

@import 'path-to-nav/hc-offcanvas-nav/src/scss/hc-offcanvas-nav';

Via regular css, by just overriding the styles you want in your css:

.hc-offcanvas-nav .nav-container,
.hc-offcanvas-nav .nav-wrapper,
.hc-offcanvas-nav ul {
    background-color:  #0d0d0d;
}


Sbml export

New function model2sbml to export MASS models to SBML files. Includes support for FBC extension

And with FBC -> True I get


meson: fix HAVE_INIT_ONCE declaration

meson will set the HAVE_INIT_ONCE value to 0 or 1 when using
conf.set10() so an #if defined() will always succeed.
../src/graphene-box.c:681:1: error: unknown type name 'INIT_ONCE'
../src/graphene-box.c:681:36: error: 'INIT_ONCE_STATIC_INIT' undeclared here (not in a function)
../src/graphene-box.c: In function 'init_static_box':

Thanks for your contribution!
To be quite honest, I don't really like this style. Either the meson.build should not use set10() and instead rely on the definedness of the symbol; or the preprocessor conditional should not be checking for the symbol being defined (as it it will always be) and turned into:
#if HAVE_INIT_ONCE
...

and:
...
#elif HAVE_INIT_ONCE
...


App crash

App crashes on the version below 19 KitKat but working as expected on version >19
following is the crash report
Caused by: java.lang.NoClassDefFoundError: java.nio.charset.StandardCharsets
at com.github.mertakdut.ContextHelper.encodeToUtf8(ContextHelper.java:26)
at com.github.mertakdut.Reader.mergeTocElements(Reader.java:266)
at com.github.mertakdut.Reader.fillContent(Reader.java:162)
at com.github.mertakdut.Reader.setInfoContent(Reader.java:32)
at com.github.epubparsersampleandroidapplication.MenuActivity$ListBookInfoTask.doInBackground(MenuActivity.java:67)
at com.github.epubparsersampleandroidapplication.MenuActivity$ListBookInfoTask.doInBackground(MenuActivity.java:50)
at android.os.AsyncTask$2.call(AsyncTask.java:287)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
at java.util.concurrent.FutureTask.run(FutureTask.java:137)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
at java.lang.Thread.run(Thread.java:838)

19? Which version is that? Api level?

Yes, API level 19 version name KitKat.

The problem lies in ContextHelper class where you encode text to UTF-8 with java. But the StandardCharsets class of java is not available below android KitKat version 19.

StandardCharsets is available since 1.7. Does Android KitKat use 1.6?

so what is the port to user this library below KitKat version ?

I'll check the problem myself and see if I find a reasonable solution. Thanks for the notice.

I make it work my way but I can tell you that you can make version specific check and put simple condition in ContextHelper class like this.
if(version<19)
encodedString = URLDecoder.decode(stringToEncode, "UTF_8");
else
encodedString = URLDecoder.decode(stringToEncode, StandardCharsets.UTF_8.name());

That may not be the only thing that is broken in versions below 19. Is it?

Yes, I make it work only by putting version specified checking. But you are the author of the library, it's your call to check another condition.

The problem is fixed in version 1.0.85, released in few hours. Thanks for your cooperation.


"prefix"

Could you take a look at this idea? Could you tell me if this idea is good or bad?
What if we prefix the files with "license_mit.txt", "tos_tos_facebook.txt"?

@stokebreakup Why do you want to prefix the files with license or tos?

@stokebreakup Yep, sounds fine with one suggestion. Instead of prefixing, we could just add a type identifier to other license types as a suffix before the extension. For example:
mpl-2.0.txt // already exists, leave it alone in this format
facebook.tos.txt // new type with .tos for a terms of service type


Help

Hello
I still haven't been able to implement it .. I log in and I'm not redirected to the app. can you be more direct in the documentation? so no one will use your library.
thank you.

Don't be mad with open source project or do it yourself.
iOS and Android scheme
You need to set the app Scheme (You can follow the react-native-app-auth documentation to do it)
If you use React Navigation, look at the documentation of the package, there are a props to pass to set that.

@andrejm7 @DorianMaliszewski Sorry guys, but check our Doc, I think it has every info inside about how configure the appScheme and so on. Check for iOS and Android Setup Deep Linking
For the navigation to Homepage, it depends on the navigation package you are using at the moment.
I gave you the link to the Auth Flow from React-Navigation. Did you check our Example? It work with the right Keycloak Server configuration.
If you need more help just PM me.
Just one thing, I am happy to help you, but I won't do the task for you,

I already tried to follow the step by step .. and it just stops running.
if your documentation is not clear .. take your library offline.
nobody will use it and whoever tries to go crazy.

Fine. I renovate my will to help you. Just create an example app and push in a repo and PM me, so I can help.

Fine. I renovate my will to help you. Just create an example app and push in a repo and PM me, so I can help.

https://github.com/andrejm7/testkeycloak
here i made a simple example ..
doubts:
1 - that upon login, redirect_invalid occurs
2 - that when closing the page my app is below .. if I close without logging in .. it cannot appear ..
3 - when logging in it would have to appear the screen below my login.

Ok, here is the PR
Just a quick reminder, next time again READ the Documentation; everything was well written in it. You just didn't followed it and started to go crazy again me and our work.

Just an update on the situation....RTFD!

whats is RTFD! ?


Support Option

This adds support for bridging Option<OpaqueSwiftType> in extern "Rust" functions. This fixes #268, and makes the following now possible:
#[swift_bridge::bridge]
mod ffi {
    extern "Swift" {
        type SomeSwiftType;
    }

    extern "Rust" {
        fn option_arg(arg: Option<SomeSwiftType>);
        fn returns_option() -> Option<SomeSwiftType>;
    }
}

Looks like tests are failing:
error[E0412]: cannot find type `OptTestOpaqueSwiftType` in module `super`
   --> crates/swift-integration-tests/src/option.rs:128:14
    |
128 |         type OptTestOpaqueSwiftType;
    |              ^^^^^^^^^^^^^^^^^^^^^^ help: a struct with a similar name exists: `OptTestOpaqueRustType`
...
202 | pub struct OptTestOpaqueRustType {
    | -------------------------------- similarly named struct `OptTestOpaqueRustType` defined here

For more information about this error, try `rustc --explain E0412`.
error: could not compile `swift-integration-tests` (lib) due to 1 previous error

That's embarrassing... I'd removed a use ffi::SwiftType statement and used absolute paths instead... but apparently you have to import the ffi types or it won't compile.
I commented on #270 with the output but on nightly some of the ui tests fail to run as well. Everything seems to pass now on stable though.

Hmm, not sure what happened.
Paths should work https://github.com/chinedufn/swift-bridge/blob/58f4a40f96bb050607c746376422ab3c62e0e771/crates/swift-integration-tests/src/option.rs#L326-L330
Cool. Looks good. I'll merge once tests pass.

Thanks!

Published as 0.1.54 https://crates.io/crates/swift-bridge/0.1.54

Replaced the pointer::casts with more explicit as *mut SomeType.
Explained here https://github.com/chinedufn/swift-bridge/commit/b4ba1a72a682c3917d78d6650ffb249c7109999b

When I was working on b4ba1a72a682c3917d78d6650ffb249c7109999b I noticed that when returning Swift types from Rust -> Swift we were running the Drop impl on the Rust representation of the Swift type.
https://github.com/chinedufn/swift-bridge/blob/636fa2774870c052a18f06d98ca5f6966c09bdd6/crates/swift-bridge-ir/src/codegen/codegen_tests/opaque_swift_type_codegen_tests.rs#L26-L33
This means that we are leaking memory when returning Option<SwiftType>.
My apologies for not thinking of this during review.
Fixed https://github.com/chinedufn/swift-bridge/pull/273

That makes a lot more sense... I'd assumed for some reason it wasn't automatically incrementing the retain count, and thought I was just doing it once.

Got it.

0.1.55 has been released https://crates.io/crates/swift-bridge/0.1.55


[zh] Update concepts/service-networking/dns-pod-service.md

Description

Issue

Closes: #

How to become a chinese language reviewer to make greater contributions to the community?

@tengqm 评论涉及内容已经重新修正

/approve

/lgtm


Can't attach files to the project itself, only to tasks.

It would be great to be able to attach files to the project itself so that they appear on the project summary screen. Also, can the file size limit of the all files be made configurable as an application setting?

I also just found myself wanting to do this.  Some documents span the entire project scope and best serve to be available across all tasks.  (Could even reference with a link from within a task if need-be)

:+1:

:+1:

Would be really awesome.

With the last development version of Kanboard you can attach files directly to the projects.

Thank you!


Nest svgoConfig options under plugins key

I was only able to get svgo configuration working when my options were listed under the plugins key. This follows the same format as the svgo YML file shown in the noted example.
I just wanted to make this update in case others wanted to configure svgo with options in the Gatsby plugin!

:astonished:
Thanks. This was bugging (pun intended) a lot of people.


Add script for mirroring repos with multi-arch builds

Edited from https://github.com/k3s-io/image-mirror/pull/2/files

Successfully pulled CoreDNS 1.6.9 images to dummy Docker organization arvindtestorg: https://hub.docker.com/r/arvindtestorg/coredns-coredns


Allow input types commonly used in Catlayst/MTK

I was looking into writing a short tutorial on how to use FiniteStateProjection.jl in Catalyst, and then link to the package. While I was looking through the documentation I had some thoughts:
Current workflow for simulating a model using FSP:
using FiniteStateProjection
using OrdinaryDiffEq

rn = @reaction_network begin
    σ, 0 --> A
    d, A --> 0
end

sys = FSPSystem(rn)

# Parameters for our system
ps = [ 10.0, 1.0 ]

# Initial distribution (over 1 species)
# Here we start with 0 copies of A
u0 = zeros(50)
u0[1] = 1.0

prob = convert(ODEProblem, sys, u0, (0, 10.0), ps)
sol = solve(prob, Vern7())

Comment 1:
Right now, using Catalyst and MTK, parameter values are no longer given as vectors, but rather maps from parameters to values, e.g:
ps = [:σ => 10.0, :d => 1.0]

This has the advantage that one does not need to consider the order with which the parameters are stored within the model (which, after a recent MTK update, is no longer fully reliable).
Comment 2:
Technically the same holds for initial conditions. Now, since the initial condition for a FSP simulation is a multidimensional array, this does not directly work. However, it might be possible to enable FSPSystem to take an optional argument which specifies the order with which the species occur?
(it is possible to manually check using species(rn), but something like this might make sense)
Comment 3:
Mostly we have a dispatch on ODEProblem for special system types, rather than using convert. E.g. something like
ODEProblem(sys, u0, (0, 10.0), ps)

instead of the current
prob = convert(ODEProblem, sys, u0, (0, 10.0), ps)

Good points! This should be an easy change using the MTK API, I hope to do this soon.

I've updated the package to include comments 1 and 3, although the tests fail on GitHub because of issues in SimpleNonLinearsolve.jl. I am not sure what the best way to proceed with comment 2 is, but will think about it.

Sounds great!
I haven't thought super much about it, I think the simplest might be to simply provide the species order as an additional argument somewhere? E.g. for
rn = @reaction_network begin
    (k1,k2), X + Y <--> XT
end

one would probably provide a vector [:X, :Y, :XY] (or use symbolic form [X, Y, XY]  or  [rn.X, rn.Y, rn.XY]), but one could select any order. It would also help the user be sure which part of the solution corresponds to which species.

Excellent idea! I need to update the documentation, but FSPSystem now takes such a list as an optional second argument.

Great! I am looking forward to playing around with this.
(feel free to close issue, I consider it all solved)


Moved menu

Hello,
can you help me with the following problem?
After updating EspoCRM, the small menu in the Kanban view has moved completely and is displayed somewhere on the page.
Here is the post in the EspoCRM forum:
https://forum.espocrm.com/forum/general/109818-has-anything-else-been-changed-in-kanban

I'll have a look at the issue and get back to you :)

The issue is resolved. I've updated dropdown.less to the latest version.

Thank you very much, it's much better now.


Can't execute grafana-rrd-server

Hello,
I can't execute grafana-rrd-server command on my CentOS 7...
I have :
"error while loading shared libraries: librrd.so.8: cannot open shared object file: No such file or directory"
I don't understand where this error can from.
I have never learned or used GO language :/
Thank you

I have encountered the same problem, the last version of grafana-rrd-server (currently v0.0.5?) needs a library librrd.so.8,  I have installed Stor2RRD in a Virtual Appliance running xorux (derived from Cent OS) which I cannot modify easily, but I found that on this Virtual Appliance librrd.so.4 (an older version of the rrd library)  is pre-installed AND  I found that a slightly older version of grafana-rrd-server also uses that same library  librrd.so.4.
1 + 1 = 2,  so installing this older version did the trick for me :
v0.0.1
@doublemarket doublemarket released this on Apr 2, 2017 · 17 commits to master since this release
Assets
2.14 MB grafana-rrd-server_linux_amd64.gz
Look under releases for version v0.0.1
Regards, Felix

Here's a quick workaround that worked for me :
Most likely you should have in your centos installation another librrd.so.* (librrd.so.4.2.0 for example) stored somewhere as a shared library, so :
1/ search where your .so library is
2/ create a symlink between librrd.so. & librrd.so.8 (sudo ln -s librrd.so.4.2.0 librrd.so.8)
Retry grafana-rrd-server. it should now work.


edward: init at 1.2.2

Didn't add support for tensorflow with CUDA yet.
Tests currently don't work due to tensorflow weirdness.
Didn't add all optional dependencies.
Things done

[ ] Tested using sandboxing
(nix.useSandbox on NixOS,
or option build-use-sandbox in nix.conf
on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] Linux

[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[N/A] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

Fixed ... Travis build is failing for unrelated reasons.


Download the spatial CLI as part of cargo-spatial

We currently require that the user install the spatial CLI tool separately in order to be able to use cargo-spatial. We should reasonably be able to automate this in cargo-spatial, automatically downloading the CLI and installing it to a local directory if the user doesn't have it installed already.

There's an installer which I believe has a CLI interface, so we can grab that and install using the installer (which will have reasonable defaults).


C# and C++ ?

I'm working on a project in C# that invokes c++. Is it a feasible scenario to push the development of both languages into the same docker container?

@rajesh-chawla Yes, absolutely.  An easy way to show this is to start with the C++ dev container Dockerfile and devcontainer.json from here -- or pick C++ using the Remote-Containers: Add Development Container Configuration Files... and then make some edits.

In the Dockerfile, change FROM debian:9 to FROM mcr.microsoft.com/dotnet/core/sdk:2.2

Add the C# extension into the extensions list in devcontainer.json:
"extensions": [
    "ms-vscode.cpptools",
    "ms-vscode.csharp"
]

Reopen the folder in a container (or rebuild if its already open).

For why this works, switching the FROM ensures the right .NET Core dependencies are installed, and then this "runArgs" line in devcontainer.json ensures the C++ debugger works:
"runArgs": ["--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined"]

That's pretty cool this is a supported scenario. I started with the C++ project, modified the FROM line to point to sdk:2.2 & added c# to the extensions.
I can compile the program with no issues, though when I try to debug, I get the error that 'cppdbg' is not supported (in launch.json). I'm guessing I need to change the type to coreclr to launch the c# code. Is there anything else I should look to modify?

Confirmed running -- works with .net 3.0 and g++. Excellent!!
Next step is to add cmake and get things configured for our environment.

Unfortunately, I've lost intellisense when I code in the container. How can I go about troubleshooting this?


proto: Regenerate protobuf files.

This is a follow-up fix for https://github.com/youtube/vitess/pull/2495.
We were not able to fix Yipei's workstation such that it would use the
same protobuf generator as Travis and our setups does. Therefore, I'm
re-generating the files separately on my machine.

Sugu had them in his PR too. Not sure why.

LGTM

Yipei and I spent quiet some time on this and could not reproduce it :(
The protoc binary (version 3.0.0, installed with our pinned gRPC installation) is supposed to call the protoc-gen-go binary (pinned by govendor).
The easiest solution for now is to update protoc-gen-go. But it's still worrisome that the pinning doesn't work.


Refine4cloud

Changes:

Updated openapi.yaml to provide more introduction info
Updated PUT method and added tests for it

Sorry it took me so long to review this @CunliangGeng  -- looks good!

Great, thanks!


ProgressBar setWidth and setHeight not respected

Currently component needs to use the css variables to set width and height instead of API methods:
ProgressBar bar = new ProgressBar(15, "Reactor Heating Up: {{x}}%");

//...
.setStyle("--dwc-progressbar-width", "160px")
    .setStyle("--dwc-progressbar-height", "125px")

Want to use the API methods instead for this functionality.
ProgressBar bar = new ProgressBar(15, "Reactor Heating Up: {{x}}%");

//...

bar.setWidth("160px")
        .setHeight("125px");

Seems to working correctly in 24.10


Use latest orbit-db-store

This PR will update orbit-db-store dependency to the latest version.

If you're ok with this PR and merge, could you also publish the new version in npm?

@haadcode thanks for the PR! Published 0.0.9 👍


cudaErrorIllegalAddress: an illegal memory access was encountered

Hello.
While using XGBoost, I have been encountering persistent errors.
File "/home/siwon/.local/lib/python3.10/site-packages/xgboost/core.py", line 271, in _check_call
    raise XGBoostError(py_str(_LIB.XGBGetLastError()))
xgboost.core.XGBoostError: [20:09:18] ../src/tree/updater_gpu_hist.cu:799: Exception in gpu_hist: [20:09:18] ../src/c_api/../data/../common/common.h:46: ../src/tree/gpu_hist/row_partitioner.cuh: 295: cudaErrorIllegalAddress: an illegal memory access was encountered
Stack trace:
  [bt] (0) /home/siwon/.local/lib/python3.10/site-packages/xgboost/lib/libxgboost.so(+0x738dca) [0x7f68a1d1fdca]
  [bt] (1) /home/siwon/.local/lib/python3.10/site-packages/xgboost/lib/libxgboost.so(+0x73ca89) [0x7f68a1d23a89]
  [bt] (2) /home/siwon/.local/lib/python3.10/site-packages/xgboost/lib/libxgboost.so(+0xaf6920) [0x7f68a20dd920]
  [bt] (3) /home/siwon/.local/lib/python3.10/site-packages/xgboost/lib/libxgboost.so(+0xaf74d1) [0x7f68a20de4d1]
  [bt] (4) /home/siwon/.local/lib/python3.10/site-packages/xgboost/lib/libxgboost.so(+0xafbfe1) [0x7f68a20e2fe1]
  [bt] (5) /home/siwon/.local/lib/python3.10/site-packages/xgboost/lib/libxgboost.so(+0xafcf66) [0x7f68a20e3f66]
  [bt] (6) /home/siwon/.local/lib/python3.10/site-packages/xgboost/lib/libxgboost.so(+0x41b919) [0x7f68a1a02919]
  [bt] (7) /home/siwon/.local/lib/python3.10/site-packages/xgboost/lib/libxgboost.so(+0x41c790) [0x7f68a1a03790]
  [bt] (8) /home/siwon/.local/lib/python3.10/site-packages/xgboost/lib/libxgboost.so(+0x47ee17) [0x7f68a1a65e17]

Stack trace:
  [bt] (0) /home/siwon/.local/lib/python3.10/site-packages/xgboost/lib/libxgboost.so(+0xadc86a) [0x7f68a20c386a]
  [bt] (1) /home/siwon/.local/lib/python3.10/site-packages/xgboost/lib/libxgboost.so(+0xafd1b4) [0x7f68a20e41b4]
  [bt] (2) /home/siwon/.local/lib/python3.10/site-packages/xgboost/lib/libxgboost.so(+0x41b919) [0x7f68a1a02919]
  [bt] (3) /home/siwon/.local/lib/python3.10/site-packages/xgboost/lib/libxgboost.so(+0x41c790) [0x7f68a1a03790]
  [bt] (4) /home/siwon/.local/lib/python3.10/site-packages/xgboost/lib/libxgboost.so(+0x47ee17) [0x7f68a1a65e17]
  [bt] (5) /home/siwon/.local/lib/python3.10/site-packages/xgboost/lib/libxgboost.so(XGBoosterUpdateOneIter+0x70) [0x7f68a1735e50]
  [bt] (6) /lib/x86_64-linux-gnu/libffi.so.8(+0x7e2e) [0x7f6908ad1e2e]
  [bt] (7) /lib/x86_64-linux-gnu/libffi.so.8(+0x4493) [0x7f6908ace493]
  [bt] (8) /usr/lib/python3.10/lib-dynload/_ctypes.cpython-310-x86_64-linux-gnu.so(+0xa3e9) [0x7f690b3793e9]

terminate called after throwing an instance of 'thrust::system::system_error'
  what():  device free failed: cudaErrorIllegalAddress: an illegal memory access was encountered
Aborted

I have tested it with both the stable latest version 1.7.3 and the 2.0.0 version, and the same error occurred in both (I switched to the latest version because there was a post in the issues suggesting to use the nightly version). Training intermittently stops due to an error, but when I tried to resume the training, the same error keeps occurring and the training no longer progresses.
This is hyper parameter set
{'booster': 'gbtree', 'objective': 'binary:logistic', 'eval_metric': 'logloss', 'learning_rate': 0.2017833004505858, 'n_estimators': 825, 'max_depth': 10, 'subsample': 0.95, 'colsample_bytree': 0.895082641310972, 'gamma': 0, 'min_child_weight': 1, 'lambda': 0.0065881886741868895, 'alpha': 0.21095574595537914, 'device': 'gpu', 'tree_method': 'gpu_hist', 'scale_pos_weight': 13.479705048987812}

If anyone can offer advice on this error, it would be greatly appreciated.

If the data is proprietary, would be great if you can share the shape and density of it, along with your training parameters.

This is Hyper parameter set.
I did this work with optuna, from 125 trial it doesn't progress.
{'booster': 'gbtree', 'objective': 'binary:logistic', 'eval_metric': 'logloss', 'learning_rate': 0.2017833004505858, 'n_estimators': 825, 'max_depth': 10, 'subsample': 0.95, 'colsample_bytree': 0.895082641310972, 'gamma': 0, 'min_child_weight': 1, 'lambda': 0.0065881886741868895, 'alpha': 0.21095574595537914, 'device': 'gpu', 'tree_method': 'gpu_hist', 'scale_pos_weight': 13.479705048987812}

Dataset has 10 columns (9columns are category), size is over 100,000.
Thank you. If someone need more info., please comment.

Have you enabled the categorical feature in XGBoost? Another thing, do you have sample weight and feature weight?

Yes I did it.
dtrain = xgboost.DMatrix(data=X_train, label=y_train, enable_categorical=True)

I don't have sample weight and feature weight.
I just set 'scale_pos_weight': 13.479705048987812} for data valance.

I will try to reproduce it next Monday.

One more question, what's the value of the n_jobs parameter in optuna optimize function?

I tried both: n_jobs = -1 and n_jobs = 1 .
I'm using xgboost-2.0.0.dev0%2B15ca12a77ebbaf76515291064c24d8c2268400fd-py3-none-manylinux2014_x86_64.whl now.

Hi, I haven't been able to reproduce the error with a simple script shared below, could you please help check the script is similar to the experiment being conducted by optuna, or share something that I can run?
import numpy as np
import pandas as pd
import xgboost as xgb

n_estimators = 825
params = {
    "booster": "gbtree",
    "objective": "binary:logistic",
    "eval_metric": "logloss",
    "learning_rate": 0.2017833004505858,
    "max_depth": 10,
    "subsample": 0.95,
    "colsample_bytree": 0.895082641310972,
    "gamma": 0,
    "min_child_weight": 1,
    "lambda": 0.0065881886741868895,
    "alpha": 0.21095574595537914,
    "scale_pos_weight": 13.479705048987812,
}

if xgb.__version__ < "2.0.0":
    params["tree_method"] = "hist"
else:
    params["device"] = "gpu"

def make_categorical(
    n_samples: int, n_cat_features: int, n_num_features: int, min_n_categories: int
):
    rng = np.random.default_rng(1994)
    pd_dict = {}

    for i in range(n_cat_features):
        c = rng.integers(low=0, high=min_n_categories + i, size=n_samples)
        categories = np.arange(min_n_categories + i)
        pd_dict[str(i)] = pd.Series(c, dtype=np.int64)
        pd_dict[str(i)] = pd_dict[str(i)].astype("category")
        pd_dict[str(i)].cat.set_categories(categories)

    for i in range(n_num_features):
        x = rng.normal(size=n_samples)
        pd_dict[str(i + n_cat_features)] = x

    df = pd.DataFrame(pd_dict)
    columns = list(df.columns)
    rng.shuffle(columns)
    df = df[columns]

    # small p since the issue states that scale_pos_weight is needed.
    y = rng.binomial(n=1, p=0.2, size=n_samples)
    return df, y

n_samples = 200000

X, y = make_categorical(
    n_samples=n_samples,
    n_cat_features=9,
    n_num_features=4,
    min_n_categories=13,
)

print(X.head(4))

# test with the native interface
Xy = xgb.QuantileDMatrix(X, y, enable_categorical=True)
booster = xgb.train(params, Xy, num_boost_round=n_estimators)
booster.predict(Xy)

# test the native interface with DMatrix instead of QDM
Xy = xgb.QuantileDMatrix(X, y, enable_categorical=True)
xgb.train(params, Xy, num_boost_round=n_estimators)
booster.predict(Xy)

# test with the sklearn interface
clf = xgb.XGBClassifier(**params, n_estimators=n_estimators, enable_categorical=True)
clf.fit(X, y)
clf.predict_proba(X)

Thank you so much for your help!
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.metrics import f1_score
import xgboost
import optuna

# Split Datas for train & test
X_train, X_test, y_train, y_test = train_test_split(df, labels, test_size=0.1, random_state=1225)

# Count fraud or not
num_not_fraud = np.count_nonzero(y_train == 0)
num_fraud = np.count_nonzero(y_train == 1)

scale_pos_weight = num_not_fraud / num_fraud # scale_pos_weight = number of negative instances / number of positive instances

# DMatrix
dtrain = xgboost.DMatrix(data=X_train, label=y_train, enable_categorical=True)

# Define Objective function
def Objective(trial):
    # Set Hyper-parameter bounds
    param = {
        "booster": "gbtree",
        "objective": "binary:logistic",
        "eval_metric": "logloss",

        "learning_rate": trial.suggest_float("learning_rate", 1e-3, 1.2, log=True),
        "n_estimators": trial.suggest_int("n_estimators", 500, 1500, step=25),
        "max_depth": trial.suggest_int("max_depth", 5, 15),
        "subsample": trial.suggest_float("subsample", 0.5, 1, step=0.05),
        "colsample_bytree": trial.suggest_float("colsample_bytree", 0.5, 1),
        "gamma": trial.suggest_float("gamma", 0, 10), # default
        "min_child_weight": trial.suggest_int("min_child_weight", 1, 201, step=5),
        'lambda': trial.suggest_float('lambda', 1e-3, 10.0, log=True),
        'alpha': trial.suggest_float('alpha', 1e-3, 10.0, log=True),

        "device": "cuda",
        "tree_method": "gpu_hist", #gpu_
        "scale_pos_weight": scale_pos_weight
    }

    # Note Hyperparameter set
    with open("xgboostdb/XGBoost_Hyper_2.txt", 'a') as f:
        f.write(str(param) + '\n')

    # try 3 times
    all_scores = []
    for _ in range(3):
        # Build XGBoost Classifier and Training
        model = xgboost.XGBClassifier(**param, early_stopping_rounds=100, enable_categorical=True)
        model.fit(X_train, y_train, eval_set=[(X_test, y_test)], verbose=True)

        # Predict & Validate
        y_pred = model.predict(X_test)
        model_metric = f1_score(y_test, y_pred)

        # Append Metric
        all_scores.append(model_metric)

    # Note Metric
    with open("xgboostdb/XGBoost_Hyper_2.txt", 'a') as f:
        f.write(f"F1 Score: {np.mean(all_scores)} \n\n")

    return np.mean(all_scores)

# Create Optuna sampler and study object
sampler = optuna.samplers.TPESampler(n_startup_trials=50)
study = optuna.create_study(sampler=sampler,
    study_name="xgboost_for_card_fraud_2",
    direction="maximize",
    storage="sqlite:///xgboostdb/2.db",
    load_if_exists=True)
study.optimize(Objective, n_trials=550, n_jobs=1)

# Print best hyper-parameter set
with open("xgboostdb/XGBoost_Hyper_2.txt",'a') as f:
    f.write(f"Best Hyper-parameter set: \n{study.best_params}\n")
    f.write(f"Best value: {study.best_value}")

print(f"Best Hyper-parameter set: \n{study.best_params}\n")
print(f"Best value: {study.best_value}")

This is my code, and when I tried this on another PC, I encouted same errors.
I hope this is helpful for you.

And one more, when I tried
import xgboost
print(xgboost.__version__)

I get 2.0.0-dev but device Hyper-parameter doesn't work.

Thank you for sharing! I think https://github.com/dmlc/xgboost/pull/9529 should be able to fix it.

Hello again.
I installed lastest version 2.0.0rc1.
but I still  have been encountering persistent errors.
_xgboost.py", line 120, in <module>
    study.optimize(Objective, n_trials=550, n_jobs=1)
  File "/home/siwon/.local/lib/python3.10/site-packages/optuna/study/study.py", line 442, in optimize
    _optimize(
  File "/home/siwon/.local/lib/python3.10/site-packages/optuna/study/_optimize.py", line 66, in _optimize
    _optimize_sequential(
  File "/home/siwon/.local/lib/python3.10/site-packages/optuna/study/_optimize.py", line 163, in _optimize_sequential
    frozen_trial = _run_trial(study, func, catch)
  File "/home/siwon/.local/lib/python3.10/site-packages/optuna/study/_optimize.py", line 251, in _run_trial
    raise func_err
  File "/home/siwon/.local/lib/python3.10/site-packages/optuna/study/_optimize.py", line 200, in _run_trial
    value_or_values = func(trial)
  File "/home/siwon/contest/MITSUBISHI/_xgboost.py", line 97, in Objective
    model.fit(X_train, y_train, eval_set=[(X_test, y_test)], verbose=False)
  File "/home/siwon/.local/lib/python3.10/site-packages/xgboost/core.py", line 729, in inner_f
    return func(**kwargs)
  File "/home/siwon/.local/lib/python3.10/site-packages/xgboost/sklearn.py", line 1515, in fit
    self._Booster = train(
  File "/home/siwon/.local/lib/python3.10/site-packages/xgboost/core.py", line 729, in inner_f
    return func(**kwargs)
  File "/home/siwon/.local/lib/python3.10/site-packages/xgboost/training.py", line 181, in train
    bst.update(dtrain, i, obj)
  File "/home/siwon/.local/lib/python3.10/site-packages/xgboost/core.py", line 2049, in update
    _check_call(
  File "/home/siwon/.local/lib/python3.10/site-packages/xgboost/core.py", line 281, in _check_call
    raise XGBoostError(py_str(_LIB.XGBGetLastError()))
xgboost.core.XGBoostError: [19:31:59] /workspace/src/tree/updater_gpu_hist.cu:777: Exception in gpu_hist: [19:31:59] /workspace/src/c_api/../data/../common/common.h:45: /workspace/src/tree/../collective/../common/device_helpers.cuh: 1172: cudaErrorIllegalAddress: an illegal memory access was encountered
Stack trace:
  [bt] (0) /home/siwon/.local/lib/python3.10/site-packages/xgboost/lib/libxgboost.so(+0x77c41a) [0x7fa8dfdac41a]
  [bt] (1) /home/siwon/.local/lib/python3.10/site-packages/xgboost/lib/libxgboost.so(+0x780069) [0x7fa8dfdb0069]
  [bt] (2) /home/siwon/.local/lib/python3.10/site-packages/xgboost/lib/libxgboost.so(+0xb433e2) [0x7fa8e01733e2]
  [bt] (3) /home/siwon/.local/lib/python3.10/site-packages/xgboost/lib/libxgboost.so(+0xb44321) [0x7fa8e0174321]
  [bt] (4) /home/siwon/.local/lib/python3.10/site-packages/xgboost/lib/libxgboost.so(+0xb44ec1) [0x7fa8e0174ec1]
  [bt] (5) /home/siwon/.local/lib/python3.10/site-packages/xgboost/lib/libxgboost.so(+0xb45e31) [0x7fa8e0175e31]
  [bt] (6) /home/siwon/.local/lib/python3.10/site-packages/xgboost/lib/libxgboost.so(+0x45c7f9) [0x7fa8dfa8c7f9]
  [bt] (7) /home/siwon/.local/lib/python3.10/site-packages/xgboost/lib/libxgboost.so(+0x45d712) [0x7fa8dfa8d712]
  [bt] (8) /home/siwon/.local/lib/python3.10/site-packages/xgboost/lib/libxgboost.so(+0x4c2287) [0x7fa8dfaf2287]

Stack trace:
  [bt] (0) /home/siwon/.local/lib/python3.10/site-packages/xgboost/lib/libxgboost.so(+0xb248fa) [0x7fa8e01548fa]
  [bt] (1) /home/siwon/.local/lib/python3.10/site-packages/xgboost/lib/libxgboost.so(+0xb460f9) [0x7fa8e01760f9]
  [bt] (2) /home/siwon/.local/lib/python3.10/site-packages/xgboost/lib/libxgboost.so(+0x45c7f9) [0x7fa8dfa8c7f9]
  [bt] (3) /home/siwon/.local/lib/python3.10/site-packages/xgboost/lib/libxgboost.so(+0x45d712) [0x7fa8dfa8d712]
  [bt] (4) /home/siwon/.local/lib/python3.10/site-packages/xgboost/lib/libxgboost.so(+0x4c2287) [0x7fa8dfaf2287]
  [bt] (5) /home/siwon/.local/lib/python3.10/site-packages/xgboost/lib/libxgboost.so(XGBoosterUpdateOneIter+0x70) [0x7fa8df791c90]
  [bt] (6) /lib/x86_64-linux-gnu/libffi.so.8(+0x7e2e) [0x7fa94e476e2e]
  [bt] (7) /lib/x86_64-linux-gnu/libffi.so.8(+0x4493) [0x7fa94e473493]
  [bt] (8) /usr/lib/python3.10/lib-dynload/_ctypes.cpython-310-x86_64-linux-gnu.so(+0xa3e9) [0x7fa94ec853e9]

terminate called after throwing an instance of 'thrust::system::system_error'
  what():  device free failed: cudaErrorIllegalAddress: an illegal memory access was encountered
Aborted

This is the log.

I got this warning too.
/home/siwon/.local/lib/python3.10/site-packages/xgboost/core.py:160: UserWarning: [19:23:31] WARNING: /workspace/src/gbm/gbtree.cc:94: Falling back to prediction using DMatrix due to mismatched devices. This might lead to higher memory usage and slower performance. XGBoost is running on: cuda:0, while the input data is on: cpu.
Potential solutions:
- Use a data structure that matches the device ordinal in the booster.
- Set the device for booster before call to inplace_predict.

This warning will only be shown once for each thread. Subsequent warnings made by the
current thread will be suppressed.

Sould I upload #9529 ?

Hi, I have only back ported the PR yesterday, could you confirm that the PR is included in the test binary?

I'm using the data generated by my script with your snippet running with 8 threads, so far seems to be fine

As for the warning: https://github.com/dmlc/xgboost/issues/9521#issuecomment-1698916918 , that's caused by XGBoost running prediction on GPU while the data is on CPU. This might actually make the code slower since we have the copy the data from host memory to GPU and transform it into a CSR.

So, wasn't it apply the fix (#9529)?
I'll re-install xgboost lastest version.

We have switch recently to the latest version 2.0.1 from 1.7 and we have now randomly  (approximalively 1/1000 of the times)
this error :
cudaErrorIllegalAddress: an illegal memory access was encountered
Can someone told us what is the status of the BUG ?
Thanks

@warielon Could you please provide a script that we can run? It's hard to make guesses. We run some sort of fusing on CI but so far haven't seen such an issue.

Closing due to stalled.


[AIRFLOW-3582] Adds tests for HiveStatsCollectionOperator

Make sure you have checked all steps below.
Jira

[x] My PR addresses the following Airflow Jira issues and references them in the PR title. For example, "[AIRFLOW-XXX] My Airflow PR"

https://issues.apache.org/jira/browse/AIRFLOW-3582
In case you are fixing a typo in the documentation you can prepend your commit with [AIRFLOW-XXX], code changes always need a Jira issue.

Description

[x] Here are some details about my PR, including screenshots of any UI changes:

adds tests for hive_stats_operator

removes duplicated entry in list used in get_default_exprs

refactoring

Tests

[x] My PR adds the following unit tests OR does not need testing for this extremely good reason:

Commits

[x] My commits all reference Jira issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":

Subject is separated from body by a blank line
Subject is limited to 50 characters (not including Jira issue reference)
Subject does not end with a period
Subject uses the imperative mood ("add", not "adding")
Body wraps at 72 characters
Body explains "what" and "why", not "how"

Documentation

[x] In case of new functionality, my PR adds documentation that describes how to use it.

When adding new operators/hooks/sensors, the autoclass documentation generation needs to be added.
All the public functions and the classes in the PR contain docstrings that explain what it does

Code Quality

[x] Passes flake8

Codecov Report

Merging #4398 into master will increase coverage by 0.45%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #4398      +/-   ##
==========================================
+ Coverage   78.17%   78.63%   +0.45%
==========================================
  Files         204      204
  Lines       16529    16529
==========================================
+ Hits        12921    12997      +76
+ Misses       3608     3532      -76

Impacted Files
Coverage Δ

airflow/operators/hive_stats_operator.py
100% <100%> (+100%)
:arrow_up:

Continue to review full report at Codecov.

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


How to merge meshes by meshoptimizer.js lib?

Mesh meshes of model by gltfpack cli tool is easy!
But how to merge meshes by meshoptimizer.js lib in the node.js environment?

meshoptimizer.js is a low-level library that is designed to be integrated into mesh processing pipelines. It doesn't provide end to end glTF processing and it doesn't provide basic algorithms that are easy enough to implement in JS.
If you need to merge meshes as part of glTF processing, you can use gltfpack in node.js as an executable, or use glTF-Transform as a library if you need a more algorithmic approach.
If your processing is unrelated to glTF, you'll need to implement mesh merging yourself.


5.9: [TypeLowering] Move-only types are lexical.

Description: Fix TypeLowering of move-only types to have the lexical bit set.
Whether a value gets a lexical lifetime is deterimined by a few factors, among them, whether the type is lexical--to a first level of approximation, whether the type has any non-trivial fields that aren't explicity eager-move.  Move-only types already have the non-trivial bit set.  They need also to have the lexical bit set.
Risk: Low.  The fix is very simple, two lines of code, just setting the lexical bits on move-only types.
Scope: Narrow.  This only affects move-only types.
Original PR: https://github.com/apple/swift/pull/66705
Reviewed By: Andrew Trick ( @atrick )
Testing: Added test case illustrating that a move-only type is lexical.
Resolves: rdar://110901430

@swift-ci please test

Added NFC commit from main that prints out the fields in TypeLowering that were previously omitted (and which the test here is checking).

@swift-ci please test and merge


CFFL

CFFL

Linter check found the following problems:
The following problems have been found:
ERROR: /tmp/abs_a9jo2hgsdt/clone/recipe/meta.yaml:21: missing_wheel: For pypi packages, wheel should be present in the host section
ERROR: /tmp/abs_a9jo2hgsdt/clone/recipe/meta.yaml:38: missing_pip_check: For pypi packages, pip check should be present in the test commands
WARNING: /tmp/abs_a9jo2hgsdt/clone/recipe/meta.yaml:47: missing_description: The recipe is missing a description
Errors were found


updates llama.cpp, add LoraBase and LoraAdapter

this PR updates llama.cpp to latest (which should be compatible with falcon)

Related to https://github.com/go-skynet/LocalAI/issues/919


Error: found no frames in file {}

Currently, video_utils.py errors when it can't find frames. This results in the whole (EcoAssist) process being stopped. Would it be possible to make this a warning instead of an error?
Traceback (most recent call last):
  File "C:\Users\<username>\EcoAssist_files\cameratraps\megadetector\detection\process_video.py", line 1231, in <module>
    main()
  File "C:\Users\<username>\EcoAssist_files\cameratraps\megadetector\detection\process_video.py", line 1222, in main
    process_video_folder(options)
  File "C:\Users\<username>\EcoAssist_files\cameratraps\megadetector\detection\process_video.py", line 663, in process_video_folder
    video_folder_to_frames(input_folder=options.input_video_file,
  File "C:\Users\<username>\EcoAssist_files\cameratraps\megadetector\detection\video_utils.py", line 764, in video_folder_to_frames
    _video_to_frames_for_folder(input_fn_relative,input_folder,output_folder_base,
  File "C:\Users\<username>\EcoAssist_files\cameratraps\megadetector\detection\video_utils.py", line 678, in _video_to_frames_for_folder
    frame_filenames,fs = video_to_frames(input_fn_absolute,
  File "C:\Users\<username>\EcoAssist_files\cameratraps\megadetector\detection\video_utils.py", line 647, in video_to_frames
    raise Exception('Error: found no frames in file {}'.format(input_video_file))
Exception: Error: found no frames in file <...>
[mov,mp4,m4a,3gp,3g2,mj2 @<PHONE_NUMBER>62e9c0] moov atom not found

I'm 99.7% sure that you just want to add:
--allow_empty_videos
...to your call to process_video.py.  I'm sufficiently confident that I'm going to close this issue, but LMK if that's not the behavior you want and we can re-open and find the right behavior.

Note that the reason this an error by default is that the vast majority of the time, this is legitimately an error, i.e. it's not really a video file with no frames, rather it's a missing local codec (like in the example you showed).

That must have been the quickest issue fix I've ever seen ;) Thanks! I'll run it by the user to make sure it works, but if you're 99,7% sure - I'm convinced.
https://github.com/PetervanLunteren/EcoAssist/commit/a5b28d3621bf8cf655beb5e7fccc35e5af8b32c9


Unable to debug on physical iOS device

Environment
Environment:
OS: macOS High Sierra 10.13.5
Node: 6.9.1
Yarn: 1.7.0
npm: 3.10.8
Watchman: 4.9.0
Xcode: Xcode 9.4.1 Build version 9F2000
Android Studio: Not Found
Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: 0.55.4 => 0.55.4
Description
Attempting to debug using a physical device (e.g. an iPhone) freezes the vast majority of the time and never launches. The build will succeed and the app will install correctly on the device, however most of the time it just hangs with the following message:

** BUILD SUCCEEDED **
installing and launching your app on [my device name]

Only on rare occasions does it get past this step and it then prints something like "shake the device and enable JS debugging", which will make everything work as expected. However this is exceedingly rare, the majority of the time the cli just hangs.
Reproducible Demo

Initialize a new project: react-native init TestRn
in XCode create the provisioning profile for the app
Run: react-native run-ios --device -- the majority of the time it will build and install correctly but it will almost always hang when trying to connect with the javascript debugger (at least that's what I suspect it's doing when it hangs).

Note I'm testing this on an iPhone with the following specs:

Version: 10.3.3
Model: ME553LL/A

What's more is that the app will install and launch correctly 100% of the time if it's run through XCode, however this isn't an option for me because I can't debug any of the react-native javascript in XCode (unless there is a way that I'm not aware of).

@Sean-Brown Run it in Xcode and shake your device. Press "Debug JS Remotely." From there you can debug your app, as it launches in chrome. I have personally debugged RN from Xcode and WebStorm simultaneously on 0.56.0-rc.4.
What do you mean by "hang"? Where does it stop? This bug report is quite vague, I suggest you look into this issue further yourself.

@Sean-Brown Have you tried opening the app manually?

I was able to finally get debugging working by:

running react-native start
then in VS Code choosing the "Attach to Packager" debugging option
then opening up the app on the iPhone, shaking the phone, and choosing the "Debug JS Remotely" option

I can work with this for now but I would prefer the simplicity of react-native run-ios --device (this works for android 100% of the time).

yep, I believe that's the normal build process
@facebook-github-bot close

I'll close this as an issue if the react-native run-ios --device command is "working as intended", although based on the behavior of the run-android command I'd expect that run-ios would work similarly.

Can you edit your original issue title and description to describe what you mean as working as intended?

running react-native start

react-native run-ios runs React Native in a new Terminal.app window automatically for me

then in VS Code choosing the "Attach to Packager" debugging option

React Native tooling can't do this step for you. This is editor-specific

then opening up the app on the iPhone,

I suppose opening up the app that could be automated.

shaking the phone, and choosing the "Debug JS Remotely" option

Shaking the phone and activating "Debug JS Remotely" should not be automatic. The app loads much slower for me when I don't use that option, and I often use my device to test. It's possible to add a command line option to do that upon app launch.
The React Native core team has more pressing things to think about, such as React Native's internal redesign. External contributors are typically the ones to fix bugs. If this issue is important to you, I encourage you to open a pull request. You can always install from your own fork or from a local directory.

The OP was essentially:

when I run react-native run-android --device it automatically builds and installs the application on my device, then launches the app on the device
when I run react-native run-ios --device it automatically builds and installs the application on my device, but it is unable to launch the app on the device and the CLI just hangs forever

I'm saying that the behavior of these two commands should be consistent.
Where I'm seeing this issue is in Visual Studio Code: I want to debug with the "Debug iOS" option. The "Debug Android" option works perfectly in VS Code but "Debug iOS" hangs.

Have you tried running the command on a normal shell? VS Code is unaffiliated with React Native.

Yeah I tried in the default Mac terminal as well as iTerm2 and they both were having  the same issue with the react-native run-ios --devices command.

Please edit your original issue to reflect this new information. Maintainers are more likely to implement your idea if the title and issue body are correct.

OK and thanks for taking the time to work with me on this issue.

@CrazyPython Same issue i'm also facing. If run from the Xcode its running fine. If give command from webstorm terminal or mac terminal react-native run-ios --devices its stuck for ever and ever.

If you can launch it from your phone manually after running react-native run-ios, I think this is a minor issue. If you want to fix it yourself, go ahead. But it seems like the React Native community at large has bigger things to worry about.

I am running into this issue also, it repro's consistently in multiple installations of RN from scratch.
"If you can launch it from your phone manually after running react-native run-ios, I think this is a minor issue."
The fact that it says "installing and LAUNCHING" and then hangs is not minor. There is no indication the app was deployed, no progress indicator (except the first time when previously the app didn't exist on the phone.) You're essentially sitting waiting for a sign that it's done and nothing happens.
Please revisit the severity assessment.

What do you mean by hang? I'm fairly sure react-native-cli exits after the install process is over.

There is no indication the app was deployed, no progress indicator (except the first time when previously the app didn't exist on the phone.) You're essentially sitting waiting for a sign that it's done and nothing happens.

Granted, there is certainly a documentation issue here. I can understand your frustration if you expected the app to launch itself and you waited a long time. This

Please revisit the severity assessment.

I'm not in any way a member of the React Native team- I'm simply trying to assist them in prioritizing issues. I'd say this issue is just frustrating- and it's not the only outstanding frustrating issue for the React Native community, many community libraries have similar frustrating issue.
That being said the relevant code is here. You can edit out the "and launching" part, or you could dive deeper and see why it's not launching on the simulator. Over half of React Native's monthly code changes come from contributors, so don't be afraid to send a PR.

I am experiencing this same exact issue.  At first i thought it was a problem with vscode and react-native-tools but i seem to get the same experience from the command line.  I have to start packager, attach to packager from vscode, then manually open app.  When testing things like notifications where i have to put the app in the background and then click on the notification i get strange behavior like 'packager not ready for debug' or the chrome browser debug window flying open and colliding with vscode.

@bogdant, you're right. Can you see if the issue appears in
@StevePotter could you read @bogdant's post and try to fix the bug? You were the last person you who touched the code. Y'all could check if the issue appears in v0.49.4, making sure Product Name and Scheme are the same in Xcode.

I've run into this same issue - it's worth mentioning that if you change the jsCodeLocation from the network bundle to the local pre-bundled one, the issue no longer arises. This is almost definitely a network problem.

I think this is a regression, because it used to work before.


AWS IMDS V2 Support

Is your feature request related to a problem? Please describe.
AWS has created a newer protocol to communicate with the Metadata server (context), that enables clients to use a session based request which is more secure. With the idea of deprecating the usage of the V1 protocol, we rely on the agent to no longer use that authentication method.
Feature Description
Adopt the session based authentication with the AWS metadata server.
Describe Alternatives
None that I can think of.
Additional context
https://krebsonsecurity.com/2019/08/what-we-can-learn-from-the-capital-one-hack/
Priority
Please help us better understand this feature request by choosing a priority from the following options:
Must Have

Hi @ericlarssen-wf -- thanks for the heads up. You can disable any communication with the AWS metadata server by setting the following in your newrelic.ini file:
utilization.detect_aws = false

We don't use any authentication at all when communicating with the metadata server and any communication is only to determine the region, instance size, and instance ID.
I'm trying to understand the security implications / attack vector, can you elaborate on that?

You're correct, there is no attack vector coming from the agent itself, rather the risk of leaving the protocol v1 open on your account as there are capabilities of turning it off. The solution I am suggesting is to use an authenticated method by making a PUT request to the metadata server asking for a token, then follow up subsequent requests (in this case, just the one) with the token in the header. This is done by default when using boto3 or other language aws sdks, but there is no need to use boto3 in this use case. I have a branch of what the changes might look like. https://github.com/newrelic/newrelic-python-agent/compare/main...ericlarssen-wf:use-imds-token
A followup from your suggestion: If we decide to run detect_aws off, will cardinality of the metrics be removed?

Ah, got it! I also consulted with some of the New Relic security folks about this and they reached the same conclusion. The metadata used to link the application with any hosts and host metadata that it's running on.
There wouldn't be any loss in cardinality from turning off AWS detection that I'm aware of.
Thanks for taking the time to make those edits, feel free to open a PR, we'd be happy to take a look! On cursory inspection, the token time doesn't have to be quite so long, 5 minutes is more than enough time (since it's only used on connect to New Relic).


Remove the white flash when loading page on OS X

Fix #861.

Some colors get distorted.
When you set #111 as a backgroundColor the background color of the window becomes #151515, if you set #222 it becomes #2D2D2D, but if you set #F00 the color remains the same.

In the image you can see how the background color of the window on the top has a different color even though in the code their colors are the same.


MRG, FIX: Fix single handling

Fixes errors of the form:
mne/viz/_brain/_brain.py:564: in add_data
    self.set_data_smoothing(self._data['smoothing_steps'])
mne/viz/_brain/_brain.py:1270: in set_data_smoothing
    self.set_time_point(self._data['time_idx'])
mne/viz/_brain/_brain.py:1346: in set_time_point
    grid.cell_arrays['values'][vertices] = values
../pyvista/pyvista/core/pyvista_ndarray.py:43: in __setitem__
    super().__setitem__(key, value)
E   ValueError: shape mismatch: value array of shape (150,1) could not be broadcast to indexing result of shape (150,)

All tests passed, Travis died / was terminated after successful pytest runs. Merging.

Thanks, @larsoner

@hoechenberger can you take care of the backport to 0.21?

FYI @hoechenberger don't forget to switch the label to backported once you're done backporting

Actually I guess that's on @agramfort since he merged the backport PR but didn't change the label here

@larsoner Thanks, I wasn't aware of this. Thought once it's closed, that's all good. But I understand that sometimes one might close an issue / PR without actually finalizing the backport, so adding a different label is less ambiguous.


[WIP]: Coalescing for load/store with block ptrs

WIP: Not yet fully functional.

This PR will be rebased once PR https://github.com/intel/intel-xpu-backend-for-triton/pull/2514 lands.


Set up pipeline to send source maps to sentry

To improve client side debugging, set up sourcemap forwarding to sentry:
https://docs.sentry.io/platforms/javascript/sourcemaps/?mkt_tok=Nzc2LU1KTi01MDEAAAGNx7rezqz1buqAhIwdiMOEeNarImK8TsLBD9dJg5t0fod2GbwOmx67k5Xw9Bwf17IE7466Pac0UmNjJm6QnT2qS1ZMUjmPIgp4A7LiUXWtUQI

vite default is not to export source maps: https://v3.vitejs.dev/config/build-options.html#build-sourcemap
updating client/vite.config.js to include:
 build: {
    minify: false,
    target: "esnext",
    sourcemap: true,
  },

adds callbacks/index.js.map to the bundle.
unbundle with:
zstd -d deliberation-empirica.tar.zst
tar -xvf deliberation-empirica.tar

looks like there is a vite plugin that will do the upload to sentry:
https://docs.sentry.io/platforms/javascript/sourcemaps/uploading/vite/
Update vite.config.js to include:
import { sentryVitePlugin } from "@sentry/vite-plugin";
...

sentryVitePlugin({
      org: "watts-lab",
      project: "deliberation-empirica",
      authToken: process.env.SENTRY_AUTH_TOKEN,
    }),

Auth token is saved in GH action secrets, generated using https://watts-lab.sentry.io/settings/auth-tokens/new-token/

Error in running build script:
[sentry-vite-plugin] Warning: No release name provided. Will not inject release. Please set the `release.name` option to identify your release.

releases are documented here: https://docs.sentry.io/product/releases/
The release name option is documented here: https://www.npmjs.com/package/@sentry/vite-plugin#releasename

Needed to update dockerfile to have access to the token as an env variable, using ARG keyword. result:
#19 26.30 > Adding source map references
#19 27.91 > Bundled 28 files for upload
#19 27.91 > Bundle ID: e92bd93d-c0e9-5d35-b88b-bad009a9d681
#19 28.74 > Uploaded files to Sentry
#19 28.85 > File upload complete (processing pending on server)


Connect React and Rails as one app

Features

Create the App component with react-router and render it in  static view.
Create the Greeting component that will display a greeting.
Set it up as a route in App component.
Create a store, an action, and a reducer that will connect to the API endpoint to get the random greeting.
Display the random greeting in the Greeting component.

Hello @dazehinn as specified in the project requirements please follow the proper GitFlow before submitting for a review as this will lead to invalidations

Hello @AbelG101.
Some how it didn't appear on my dashboard as invalid. I thought it was a network problem. Reason why I submitted the same thing twice. Sorry for wasting your time....twice.


understanding feature projection and .mat file

Hi,
In the 3.2 feature projection part ,compared with SSCNet ,you replaced the TSDF with feature projection right? when depth map passed by 2D view network,there was a pooling operation, after that, several neighboring features were projected into the same voxel in the projection , so there were two pooling operations in total? You used the feature maps constructed by the 2D view network as the input to the projection instead of the original depth map, am i right?
Another question,when i load the XXXX_gt_d4.mat and XXXX_vol_d4.mat, i get distance_ds,flipVol_ds,sceneVox_ds,what  are they respectively mean? it seems to me that distance_dsrepresents the tsdf values, and flipVol_dsrepresents the ftsdf values.

Sorry for the late response.
About the feature projection, your understanding is totally right. During the projection, many pixels may fall into an identity voxel. Thus, an average pooling operation is imported to handle this case.
About the content in MAT files, I don't fully understand the content as well. Fortunately, we just need to derive the surface and non-surface information. For this propose, you may refer to the analysis/statistics.py. For other proposes, ask the SSCNet author may a better choice.

thank u for your reply! i have already understood.
------------------ 原始邮件 ------------------
发件人<EMAIL_ADDRESS>发送时间: 2019年12月5日(星期四) 下午2:23
收件人<EMAIL_ADDRESS>抄送: "雤<EMAIL_ADDRESS>"State<EMAIL_ADDRESS>主题: Re: [yuxiaoguo/VVNet] understanding feature projection and .mat file (#9)
Sorry for the late response.
About the feature projection, your understanding is totally right. During the projection, many pixels may fall into an identity voxel. Thus, an average pooling operation is imported to handle this case.
About the content in MAT files, I don't fully understand the content as well. Fortunately, we just need to derive the surface and non-surface information. For this propose, you may refer to the analysis/statistics.py. For other proposes, ask the SSCNet author may a better choice.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or unsubscribe.

Hi @yuxiaoguo sorry to hijack the conversation.
In statistics.py, you have SEG_36_11 with 37 elements in the array.  When I print the array slices (i.e. 240x144x1, 240x144x2 ... 240x144x240), I noticed that there are voxels with the values of 0 - 36 and 255.
Is this value (255) representing voxels that are out of field of view?


Docs incorrectly list override-git-commit instead of override_git_commit

Describe the bug
The documentation says that override-git-commit: [hash] can be used in about.toml to override the commit used to find the license file. That's not correct; the field is called `override_git_commit.

The docs are correct, the code was not, the field is now renamed to be what it was supposed to be, thanks for raising this issue.


Admin OIDC ui doesn't handle non-root deployed instances

The bug
The OIDC connect redirect URL does not include the subfolder, such as https://mydomain.com/nhsd-test/
The result is that the apache server gives a generic 404 error

Renamed as sub folder in mdm is a different thing to urls

I suspect we need to use the site.url property to build the url

Initiated a hotfix branch to release this fix to 6.6.1.

This hotfix is now tagged in main branch under tag 6.6.1.


friendly_styles not found in JupyterLab app

Trying to pip install friendly in the new JupyterLab app does instal friendly_styles but not in a location that is found by pygments as a valid style.  I probably need to use a try/except block and monkeypatch if necessary.

The problem is that pygments does not find the styles the first time since they are not installed. This has now been fixed.


Closing laptop lid makes the virtual trackpad unusable

On GNOME and KDE (and potentially other DEs) on Wayland, when closing the laptop lid, the trackpad stops being read by the desktop process (i.e. gnome-shell). However, this also seems to happen for all trackpads, not just the physical laptop one - this includes virtual trackpads like the one fukomaster creates using uinput. (Also tested with a PS4 controller trackpad.)
Workaround: restart the fukomaster process after closing and re-opening the laptop lid
Ideal solution: the desktop fixes whatever the hell they're doing, but I can't tell which software component is actually at fault (happens on both GNOME and KDE, so maybe libinput? Wayland itself? Need to test on Xorg)
Potential solution: recreate the virtual trackpad after detecting a device change

the laptop lid close is detectable by us when its /dev/input/eventX file gets closed and we get an inotify event for it
can listen for when our virtual device's devnode is closed by a process (by the desktop) and recreate it

what if another process opens and closes our devnode?

see 0a51970 for an initial attempt at fixing this

Seems to be fixed on Fedora 41 and GNOME 47, and was likely a one-off NixOS issue.


Alternatives for null-terminated substrings

Current discussed alternatives:

Disallow raw const char* in favor of ctti::detail::string features, maybe raising it out of the detail namespace. Pros: No implementation headaches, Cons: No user direct access to compile time computed data.

Fixed size array for ctti::detail::string storage. Pros: Correct null-terminated sub strings. Cons: Compile-time performance (Strings should be copied always), maybe executable size bloat.

So http://blogs.msdn.com/b/vcblog/archive/2015/04/29/c-11-constant-expressions-in-visual-studio-2015-rc.aspx .... Fixed array approach is not valid for msvc.

If the language would allow us to have static variables in constexpr functions, this could solve the problem. But sadly, it isn't legal for us - although the compiler can do it, that is how PRETTY_FUNCTION is implemented. This is so unfair. :(

Another solution would be to wrap the string into a variadic template, i.e.:
template<char... Str>
struct string
{
    static constexpr const char value[] = {Str..., '\0'};
};

Since C++14 array subscript is considered a constexpr expression, so "hello"[0] should be a valid non-type template parameter. Sadly, constexpr function parameters are not considered to be constexpr :( I never have never understood this rule...

I wrote a horrible code which might even be UB:
#include <cstddef>

template <std::size_t N> // w/o null-terminator
struct string_storage : string_storage<N - 1>
{
    char value;

    constexpr string_storage(const char *str)
    : string_storage<N - 1>(str - 1), value(*str) {}
};

template <>
struct string_storage<0u>
{
    char value;

    constexpr string_storage(const char *str)
    : value(*str) {}
};

constexpr const char* c_str(const string_storage<0> &string)
{
    return &string.value;
}

#include <iostream>

int main()
{
    constexpr string_storage<2> string("Hi" + 2);
    std::cout << c_str(string) << '\n';
}

But it works.

Works, but the type is dependent on the string length. That's not feasible for cttti::type_id_t, unless we found a way to type erase string_storageat compile time.

Isn't there the same issue with a vanilla array?

No, I was using fixed size array for string storage. I have a erased_string_storage based on yours almost ready, just some weird MSVC errors.

Have you checked if c_str() is evaluated at compile time? My MSVC says:

'const ctti::detail::string_storage<0> &': type not allowed for constexpr function.

Arg, no. Damn.

Lambdas cannot be used in constexprexpressions :(
template<char... Chars>
struct string_storage
{
	static constexpr const char* c_str()
	{
		return &value[0];
	}

	static constexpr const char value[] = { Chars..., '\0' };
};

template<std::size_t... Is, typename F>
constexpr auto apply(F&& f, std::index_sequence<Is...>)
{
	return f(Is...);
}

#define STRING(str) apply([](auto... Is) \
{ \
	return string_storage<str[Is]...>{}; \
}, std::make_index_sequence<sizeof(str)-1>{})

const char* str = STRING("hello")).c_str();

Ok I give up. Let's use sprout::string.

But it also uses a character array internally and conditional compilation ensures that no constexpr will be used on MSVC as far as I can see.

See https://github.com/Manu343726/ctti/commit/ecb4a37e9a2244c13249ec513256ef945335a339
I have successfully implemented ctti::detail::array on MinGW GCC 5.1, and ctti::detail::string using it as storage. Since from the three (four including MinGW) compilers, VS is the last worrying me, I have thought on a solution.
The main problem here is to provide a null-terminated c_str() member for ctti::detail::string. We could split string implementation into two variants:

Current const char* based impl, with static storage string in c_str(). This drops constexpr support, but at least it's null-terminated and initialized only once during first call. This is the implementation for MSVC until they implement constexpr array initialization. I have added an #error message at top of ctti::detail::array header.

Fixed length constexpr array as that commit shows. Guaranteed constexpr null-terminated string for every string and substring.

I never liked the macro trickery needed for implementing string literal -> string template transformation, but seems like @irrequietus did the work for us :) https://github.com/irrequietus/typestring
We would need to try it with Visual Studio first, but this may be the solution to all our problems.

@Manu343726 thanks for the interest, I am doing some benchmark code right now because this is actually quite a fast way for generating the necessary boilerplate because of the hexadecimal arithmetic progression. The code is 100% C++11/14 standard compliant but I am not in front of a system with Visual Studio right now to test it. clang++ and g++ do just fine, with g++ being actually able to handle extremes I haven't even coded into typestring.hh yet. I would be honestly very interested to hear from you guys and will be glad to be of help on this should you need me.

Does your macro require a string literal as argument? Since we have static char array and so far the macro techniques for converting this I have seen require string literals.

As far I know __PRETTY__FUNCTION__ is treated as a string literal, so that shouldn't be a problem. We just have to discard all the constexpr array/string work and compute things with tmp.

No, it is a char array, sadly: https://gcc.gnu.org/onlinedocs/gcc/Function-Names.html

@foonathan @Manu343726 It will use a string literal in situ for creating the actual type parameter, essentially this code is valid:
template<typename T = typestring_is("hello")> // irqus::typestring<'h','e','l','l','o'>
struct some_class_template {};

typedef is_typestring("hello") mytype; // contains accessible static constexpr array.

Note that within the resulting type, you will also have a static constexpr array of the string literal used so it is a simple design working both ways if needed. It can also be made to work with constexpr strings in a seamless manner should there be need. The string literal is essentially converted into a char array during the transformation, in situ.

Sadly this doesn't work for us :( It was a great alternative to get rid from all the constexpr string details.

@Manu343726 @foonathan the following code works in an as-is basis, if you give me more insight as to what you want exactly to be done more, I will be happy to investigate and provide:
#include "typestring.hh"
#include <type_traits>
#include <iostream>

static constexpr char const array[] = { 'a','b','c','\0' };

int main() {
    std::cout << std::boolalpha
              << std::is_same< typestring_is("abc")
                             , typestring_is(array)>::value
              << std::endl;
    return {};
}

int main()
{
    std::cout << typestring_is(__PRETTY_FUNCTION__).data() << "\n";
}

This works on Clang, but g++ discards __PRETTY_FUNCTION__ as typestring_is() arg for not being constexpr.

I know how we can cache the string! :D Variable templates!
template <typename T>
constexpr string get_type_name() {...}

template <typename T>
constexpr string type_name = get_type_name<T>();

And type_id_t can now store a pointer to string. This is so obvious, why haven't we thought about this earlier?

Great! I have updated my VS to 2015 release and rewrote array initialization. It's finally working.

@Manu343726 @foonathan Essentially as reported in issue #5 at 5 -129167070. __PRETTY_FUNCTION__ is neither constexpr nor a string literal but it is a non-standard extension built upon the standard __func__ which is a static local const variable. If we want to be really pedantic, anything defined as such cannot be used in the context of integral constant expressions in the realm of constexpr metaprogramming or as char-typed non-type parameter types in a template parameter list for template metaprogramming purposes.
I have also seen that you are using __FUNCSIG__ for Microsoft compilers which according to their specification is actually a string literal. Thus, in implementing ctti, you are dealing with wildly different things in different compilers.
Relevant links for __func__, __PRETTY_FUNCTION__ interpretation by the implementors (I believe the last reply in the second link is yours) :

GCC-55425 - constexpr does not work in many situations (both built-in and user supplied literals)
GCC-66639 - declare __func__ , __FUNCTION__ & __PRETTY_FUNCTION__ as constexpr

What typestring_is does is to yield a type alla decltype by design, instantiating a class template with char-typed non-type arguments in its list. This means that whatever it accepts must be a true constant expression for what concerns the translation unit involved. To my surprise for clang++, this passes as ok in clang++ 3.6.1 a GNU/Linux host with even -Wall -Wextra -Wpedantic asides -std=c++14 (while g++ 5.1.0 rejects them rightfully because of the nature of __func__ ):
#include <iostream>
#include "typestring.hh"

/*
 * Please remember that typestring_is returns a type, just like decltype returns
 * one, so follow conventions stemming from that one when using :: and . for
 * calls to static member functions like data().
 *
 * The following work in clang++ 3.6.1 stable with -std=c++14, despite the non-
 * standard __PRETTY_FUNCTION__, __FUNCTION__ refer to the standard
 * __func__  variable, which is a static local const and therefore not usable as
 * constant expression for use in constexpr metaprogramming or for use as an
 * argument to non-type template parameters.
 */

void checker() {

    std::cout << typestring_is(__PRETTY_FUNCTION__)::data() << std::endl;l
    std::cout << typestring_is(__PRETTY_FUNCTION__)().data() << std::endl;

    std::cout << typestring_is(__FUNCTION__)::data() << std::endl;
    std::cout << typestring_is(__FUNCTION__)().data() << std::endl;

    std::cout << typestring_is(__func__)::data() << std::endl;
    std::cout << typestring_is(__func__)().data() << std::endl;
}

int main() {
    checker();

    std::cout << typestring_is(__PRETTY_FUNCTION__)::data() << std::endl;
    std::cout << typestring_is(__PRETTY_FUNCTION__)().data() << std::endl;

    std::cout << typestring_is(__FUNCTION__)::data() << std::endl;
    std::cout << typestring_is(__FUNCTION__)().data() << std::endl;

    std::cout << typestring_is(__func__)::data() << std::endl;
    std::cout << typestring_is(__func__)().data() << std::endl;

    return {};
}

There is however one case where even the standard __func__ will comply to what you ask in all metaprogramming context, where both g++ and clang++ implementors have consensus on the behavior of such an identifier (will work with recent compilers and -std=c++14):
#include <cstdio>

constexpr char X() {
    return __func__[0];
}

template<char C>
void check() {
    printf("%c\n",C);
}

int main() {
    check<X()>();
    return {};
}

As for storing pointers to a string defined elsewhere with proper static(/+"constexpricity") linkage in the translation unit of interest, it is obvious that you are using an integral constant expression at this point, meaning it should be usable within the context of a non-type parameter. But you are not defining them in-situ :)
In conclusion, this isn't a typestring_is issue (it works as advertised with anything that is a constexpr char array or a string literal and constexpr strings can be added if one wishes to), but one of liberal interpretation of the actual use of __func__ in compile-time expressions (regardless constexpr/template metaprogramming) by compiler implementors (in this case, clang++ since g++ makes the thing quite clear in its bug reports).

Exactly, that's why I was asking whether or not it works.

With anything that is a true integral constant expression, it does work exactly as advertised, yielding the typestring type; your use of __func__ needs workarounds to work in true constexpr/metaprogramming scenarios. It is interesting that they opted for different intepretations of the standard. The __FUNCSIG__ in VS 2015 is however a string literal according to Microsoft and you are using it in your code when compiling in Windows with it. Don't rely on VS. In conclusion, you cannot really rely on __PRETTY_FUNCTION__ either cross-compiler wise for true compile time as it is. How... nice of them. But it is not a problem related to typestring_is or constexpr strings: both are "affected" by it.

Yes, I am not blaming your library. :)
It is better then everything else I have seen in this regard. Good job.

I'm with Jonathan, I would prefer to use your lib since I'm more confident of tmp based solutions than cutter edge constexpr that is still a bit fragile. But since typestring_is() cannot handle __PRETTY_FUNCTION__ and similar, we cannot use it :( That trick is the basis of this library.
This makes me sad since the objective of this was to provide simple compile-time type information, not wasting two weeks in rolling out and testing a full featured constexpr string implementation.

Guys, your ideas guys are awesome; I am just surprised that they are letting the __func__ get such wild interpretations instead of what is being written in the standard. We could have easily had reflection if they really amended this properly. However, it is not that "constexpr string classes" can handle __PRETTY_FUNCTION__ either on-site and I wanted this to be clear, in true constant expression manner:
#include <iostream>

// there is NO doubt this is a constexpr string class
struct cxstring {
    const char * data;
    const int size;

    template<int s>
    constexpr cxstring(char const (&c)[s]) noexcept
        : data(c), size(s)
    {}

    constexpr char operator[](int n) noexcept {
        return data[n];
    }

};

// there is no doubt that this template can only accept a constant expression
template<char C>
void checker() {
    std::cout << C << std::endl;
}
// with -std=c++14
int main() {
    // anything related to __func__ should fail because it isn't constexpr!
   // so the constexpr constructor shouldn't accept it, g++ rejects!
   // DESPITE being passed to a cxstring. Works in clang++ against standard?!?!?!
    checker<cxstring("hello,world!")[0]>();
    checker<cxstring(__func__)[0]>(); // this will work only in clang++ 3.6.1!!!
    checker<cxstring(__PRETTY_FUNCTION__)[0]>(); // only in clang++ 3.6.1!!!
    checker<cxstring(__FUNCTION__)[0]>(); // only in clang++ 3.6.1!!!
    return {};
}

Whenever you are using proper linkage (static) + constexpr defined through a pointer, you can use typestring_is and whatever else. In essence, you are always going to need a proxy for this and a constexpr string isn't going to be of much help without it if you are planning to use compile-time reflection through such a venue. That's an interesting problem alright.

And many thanks for the interest, I truly appreciate it! Good luck with ctti!


Visualize points transparent

Will there be the feature to visualize points transparent?

Hola @walzimmer !
Thanks for commenting.
I think that this is an interesting feature. It is already available with backend="threejs" and it should be easy to add to backend="pythreejs" along with an iteractive slider.
The code for adding this would be quite similar to the the point_size slider but changing opacity instead of size:
https://github.com/daavoo/pyntcloud/blob/master/pyntcloud/plot/pythreejs_backend.py#L86


Fixed Left Nav Scroll Restoration Issue

gatsby-react-scroll-restoration would not work. Figured out that my expandable NavSubMenus  heights were not being added to the scrollHeight of the NavUL because they started off closed with display:none. So setting scrollTop to restore scroll bar postion on NavUl was being ignored because the browser did not think there were scroll bars even though they were there and functioning.  Fixed by having the menus expanded at first then closing them as needed during initial useLayoutEffect, which tricked the browser into recognizing the height if/when all the submenu's were visibly open.
Also fixed 2 minor head matter issues with gatsby remark TOC.

You do great work Ed!


-Point2 class added to support nano and micro seconds insert/get

-Its responsilbility of client program to calculate the timestamp

merged to develop


fasthttp support?

My project is https://github.com/valyala/fasthttp based.
It'd be nice to serve ngrok tun via fasthttp.
Thanks!

Due to the library exposing connections directly, I think it's already possible to do this!
The following code (omitting error handling etc) worked for me:
tun, _ := ngrok.Listen(ctx,
	config.HTTPEndpoint(),
	ngrok.WithAuthtokenFromEnv(),
)
log.Println("tunnel created:", tun.URL())

var serv fasthttp.Server
serv.Handler = func(ctx *fasthttp.RequestCtx) {
	fmt.Fprintf(ctx, "Hello! You're requesting %q", ctx.RequestURI())
}

for {
	conn, _ := tun.Accept()
	go serv.ServeConn(conn)
}

Complete example code
package main

import (
	"context"
	"fmt"
	"log"

	"github.com/valyala/fasthttp"
	"golang.ngrok.com/ngrok"
	"golang.ngrok.com/ngrok/config"
)

func main() {
	if err := run(context.Background()); err != nil {
		log.Fatalf("main: %v", err)
	}
}

func run(ctx context.Context) error {
	tun, err := ngrok.Listen(ctx,
		config.HTTPEndpoint(),
		ngrok.WithAuthtokenFromEnv(),
	)
	if err != nil {
		return err
	}
	log.Println("tunnel created:", tun.URL())

	var serv fasthttp.Server

	serv.Handler = func(ctx *fasthttp.RequestCtx) {
		fmt.Fprintf(ctx, "Hello! You're requesting %q", ctx.RequestURI())
	}

	for {
		conn, err := tun.Accept()
		if err != nil {
			return err
		}
		go func() {
			err := serv.ServeConn(conn)
			if err != nil {
				log.Printf("error serving connection %v: %v", conn, err)
			}
		}()
	}
}

Basically, fasthttp already has fasthttp.Server.ServeConn, which can let us plumb in the net.Conn this library's Tunnel.Accept() exposes.
This ngrok library does have some sugar for http.Handler, and we could consider adding sugar for fasthttp, but having an example showing the above might also be enough.
That said, I haven't used fasthttp much. Does using the fasthttp.Server directly have other caveats or is there something the above approach doesn't work for?

I am not sure if there is any caveats - it's something to find out.
But this is certainly promising. Theoratically it should serve ngrok requests faster.

It looks like you can also use the fasthttp.Server.Serve method to serve from a net.Listener directly, which the ngrok.Tunnel type implements.
This simplifies the example to:
package main

import (
	"context"
	"fmt"
	"log"

	"github.com/valyala/fasthttp"
	"golang.ngrok.com/ngrok"
	"golang.ngrok.com/ngrok/config"
)

func main() {
	if err := run(context.Background()); err != nil {
		log.Fatalf("main: %v", err)
	}
}

func run(ctx context.Context) error {
	tun, err := ngrok.Listen(ctx,
		config.HTTPEndpoint(),
		ngrok.WithAuthtokenFromEnv(),
	)
	if err != nil {
		return err
	}
	log.Println("tunnel created:", tun.URL())

	var serv fasthttp.Server

	serv.Handler = func(ctx *fasthttp.RequestCtx) {
		fmt.Fprintf(ctx, "Hello! You're requesting %q", ctx.RequestURI())
	}

        serv.Serve(tun)
}

Which should give you all the usual concurrency for free without having to worry about individual connections.
Going to create an issue for adding this example to the repo, but otherwise closing this as solved!