text:
SSR doesn't seem to work out of the box

Hi,
Thanks for making this starter project. I'm using it as a base for my first Inferno project and it is also the first time I use a 'react like' framework so I may be missing something obvious.
Here are my steps:

cloned the repo
$ npm install
$ npm run dev

This works fine and I can play around with the app.
Then I set SSR to true in the config file, reload, and get the following error:
TypeError: Cannot read property 'sort' of undefined
Which comes from inferno-router. Any ideas?
Many thanks.

Hi @pcole what version of Inferno are you using and also can you give some code or a repo for us to see what you are doing?

@pcole Thanks for creating an issue. I have found the bug, it should be fixed soon. In the meantime just disable SSR 👍

Thanks guys! I'm using it without SSR for now, no worries :-)

@pcole Pull the changes and npm install ;-)

@pcole Pull in the latest changes and npm install, it should work now!

All working now thanks!

authors: nightwolfz pcole trueadm

repo: nightwolfz/inferno-starter


text:
can i inject deps to observed component ?

pass props
<List model={model} />

vs di
const List = injectDeps(observer(component), {
    ...props
})

so the component will re-render whatever props has changed
something like
https://github.com/kadirahq/react-komposer
https://github.com/kadirahq/react-simple-di

You can inject the mobx stores using the following syntax
import Inferno from 'inferno'
import Component from 'inferno-component'
import { observer } from 'mobx-inferno'

@observer(['something'])
class MyComponent extends Component {
    render() {
        return <p>{this.props.something.hello}</p>
    }
}

Just make sure that you provided the stores to your main render. Ex:
import Inferno from 'inferno'
import InfernoDOM from 'inferno-dom'
import { Provider } from 'mobx-inferno'

const something = {
    hello: 'world'
}

InfernoDOM.render(<Provider something={something}>
            <MyComponent/>
        </Provider>, document.getElementById('root'))

Now whenever something is changed, your components will update.
Hope that answers your question!

source: gharchive/issue

authors: crapthings nightwolfz

repo: nightwolfz/mobx-inferno

license: MIT

license_type: permissive

license_source: github-api


text:
Training example of transformer

Hello,
I am focusing on your nice work and I wanted to know if you performed a quick example about transformer training ?
Best,
Alexis

We haven't got to the training part yet. My plan is to split the video series into 3 parts

[x] Base model development (this is done)
[ ] Dataset preparation (to-do)
[ ] Training and validation (to-do)
[ ] Model deployment and inference (to-do)

repo: nihalpasham/optimus


text:
Add GitHub token authentication via env var

The code now checks for the presence of an environment variable 'GH_PR_TOKEN' storing the GitHub token. If the variable is found, it adds an Authorization header to the HTTP request. This is required for private repos, but not for public ones.
Also includes some refactoring and tidying changes.

CRBot says:
src/ai_funcs.rs

Good practice to extract the multi-line string into a const or variable for improved readability as you've done with system_message.
You correctly replaced process::exit with a more idiomatic Err(e.into()). Exiting from deep within the code can mask problems and makes it harder to test and reuse the code.
Remember to await the flush call to ensure that the buffer is properly flushed, like this:

lock.flush().await?;

Consider having appropriate error handling for the stream.next().await. If an error occurs in the stream, you should handle or log it before returning from the function.

src/git_funcs.rs

Excellent addition of using an environment variable for the GitHub token. This improves security by avoiding hardcoded credentials in the codebase.
Good change to include status code checks after the HTTP request and to add informative error messages.
Consider refactoring error handling since you are pushing strings to an error variable. Instead, you could directly construct the Err with the message:

    if response.status() != StatusCode::OK {
        let error_message = if response.status() == StatusCode::NOT_FOUND || response.status() == StatusCode::UNAUTHORIZED {
            format!("GitHub API request failed with status: {}. \nIf this is a private repo, the 'GH_PR_TOKEN' environment variable must be set.", response.status())
        } else {
            format!("GitHub API request failed with status: {}.", response.status())
        };

        return Err(error_message.into())
    }

src/main.rs

It's a good idea to keep the messaging consistent, so changing the 'Getting PR data' message to have a consistent style is helpful.
Reducing duplicated code by removing repeated println!s for the "END OF COMMENTS" message is a good simplification.
You removed the printing of "Analysing changes...", consider keeping it or providing another status update to let the user know that analysis is starting.

src/utils.rs

You added helpful comments to the Args struct, which will improve the user's understanding of command-line arguments.
Every public item should usually be documented in Rust, although for private tools, this might be considered optional.

Overall, the changes seem to improve error handling, readability, and usability of the code. Most of the focus seems to be on error handling and ensuring that the code does not abruptly exit but rather returns an Err type which is a more idiomatic way of handling errors in Rust.
Process finished with exit code 0

source: gharchive/pull-request

repo: nihilok/cr-bot


text:
Complex example

Hi, I just love your framework (finally I don't see myself lost coming from C# and Swift worlds), but is there any complex example? I'm currently looking for these:
1] How do you create collections of class objects?
2] How to have class properties which are based on other classes? I mean:
class:Location() {
  public string x
  public string y
}

class:Vehicle() {
  public Location location
  public string name
}

Is it possible at all?
Thank you.

Maybe you could check the option class I create, it has a Options and OptionsWrapper collections:
https://github.com/niieani/bash-oo-framework/blob/d71a74aad77a1bfcdaff032b81090dfd1507e221/lib/util/option.sh
https://github.com/niieani/bash-oo-framework/blob/d71a74aad77a1bfcdaff032b81090dfd1507e221/example/option.sh

@constrict0r, that's some hefty work indeed. Pretty cool!
@rbukovansky to answer your questions:

creating collections of class instances is a bit tricky for now, but you can capture the definitions of instances (result of declare -p YOUR_VARIABLE and store them in a normal Array). The instance is sort of "serialized" that way.
second is possible and should just work as long as you initialize your type before defining the other class. If it doesn't happen, feel free to open an issue, as it's a bug.

@constrict0r Thanks, but I'm not sure, which question your answer answers. 🤷🏻♂ Could you please elaborate a little bit more? Thank you!
@niieani So, you mean I need to:

Create Class Location
Create an object of class Location
Set its properties
Create Class Vehicle
Create an object of class Vehicle

@rbukovansky , something like this?:
source "$( cd "${BASH_SOURCE[0]%/*}" && cd .. && pwd )/lib/oo-bootstrap.sh"
import util/class
class:Location() {
public string x
public string y
}
Type::Initialize Location
class:Vehicle() {
public array location
public string name
Vehicle.getter() {
string indexList=$(this location toString)
@return:value $(this location toString)
}
Vehicle.Set() {
[reference] toSet
this location push "$($var:toSet)"
}
}
Type::Initialize Vehicle
string xSample=33
string ySample=55
Location locationSample
$var:locationSample x = $xSample
$var:locationSample y = $ySample
echo '--------------'
$var:locationSample
echo '--------------'
Vehicle vehicleSample
$var:vehicleSample Set locationSample
$var:vehicleSample

authors: constrict0r niieani rbukovansky

repo: niieani/bash-oo-framework

license: mit

license_source: bigquery


text:
can't set opacity of background image to zero in 3D view

see an example here: https://niivue.github.io/niivue-ui/ and try to hide the background image in 3D mode.

The typical way would be to apply a color transfer function to the volume that sets all the alpha values of the 3D texture to 0. This is computationally costly. One easy hack would be to provide a special value for the clip plane to skip the background volume, e.g.:
vec4 applyClip (vec3 dir, inout vec4 samplePos, inout float len) {
	if  ((clipPlane.a < -1.0) return len + 1.0;
....

@cdrake , could this be related to the new way the 3D object render loop is working?

authors: hanayik neurolabusc

repo: niivue/niivue


text:
two different errors

Hi sr, thanks for your library.
im getting two different erros, first error was

and then i thought maybe i needed to add the Lumen part of your readme, then after following those steps i got:

i must be doing something wrong, im new to laravel and this api so im a little confuse.
i have set your code as a function inside a controller, like this:
http://pastebin.com/HDXkkZs7
but maybe im doing it wrong, i saw you have a class Service with this code but i actually don't understand what to do with that class, this is why i set a controller and then call it from a route (domain.com/controllerfunction) with your code.

Hello @fonko,
The SoapFault exception is not related to this libarary. You'll need to ask in in the official google-ads-php library instead (https://github.com/googleads/googleads-php-lib).
Regarding your second question I'm not quite sure on how you've implemented this. If you're using Laravel, then it doesn't make sense, that you're including the Lumen service provider?

thanks for your answer nikolaj, actually im brand new to laravel so im not sure about lumen. If i should include, or not, the Lumen part described in your steps. But without this lumen part i was getting a nice looking json

and the issue was regarding the mutate() function.
anyhow, i will try to find out whats going on with this googleads-php-lib
if you have any suggestinos i will be very thankful ! :)

@fonko You'll have to ask in the Google ads repository.

authors: fonko nikolajlovenhardt

repo: nikolajlovenhardt/laravel-google-ads


text:
Add flatten iterator

Closes #383

@cuviper and @nikomatsakis I've updated the docs, code, and examples as asked!

I forgot that I can do that just as easily.

authors: mgattozzi nikomatsakis

repo: nikomatsakis/rayon


text:
Cannot load gringotts plugin on CatServer server core (NoClassDefFoundError DatabasePlatform)

Describe the bug
On newly created server, with fresh installed plugins server console emits error when loading gringotts plugin:
[Server thread/ERROR]: Could not load 'plugins\gringotts-2.12.5.jar' in folder 'plugins'
 org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: com/avaje/ebean/config/dbplatform/DatabasePlatform
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:139) ~[forge-1.18.2-40.2.4-universal.jar%2360!/:?]
        ...
Caused by: java.lang.NoClassDefFoundError: com/avaje/ebean/config/dbplatform/DatabasePlatform
        at java.lang.Class.forName0(Native Method) ~[?:?]
        ...
Caused by: java.lang.ClassNotFoundException: com.avaje.ebean.config.dbplatform.DatabasePlatform
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:187) ~[forge-1.18.2-40.2.4-universal.jar%2360!/:?]
        ...
Caused by: java.lang.ClassNotFoundException: com.avaje.ebean.config.dbplatform.DatabasePlatform
        at jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[?:?]
        ...
[Server thread/ERROR]: Could not load 'plugins\gringotts-towny-2.12.5.jar' in folder 'plugins'
 org.bukkit.plugin.UnknownDependencyException: Unknown dependency Gringotts. Please download and install Gringotts to run this plugin.
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:268) ~[forge-1.18.2-40.2.4-universal.jar%2360!/:?]
        ...
[Server thread/ERROR]: Error occurred while enabling Vault v1.7.3-b131 (Is it up to date?)
 java.lang.NoClassDefFoundError: com/avaje/ebean/config/dbplatform/DatabasePlatform
        at java.lang.Class.forName0(Native Method) ~[?:?]
        ...

To Reproduce
Steps to reproduce the behavior:

Download and start CatServer server. Accept EULA.
Restart server to create folders.
Place all plugins into folder
Restart server
See console error

Versions:
Server Type: CatServer-1.18.2-6c3f5965
Towny: 0.99.2.0
Vault: 1.7.3-b131
Gringotts: 2.12.5
Gringotts-towny: 2.12.5
Screenshots
If applicable, add screenshots to help explain your problem.

Hello :)
We currently have no intentions to extend support to other platforms besides Spigot and Paper, mainly because of the additional complexity that involves.

authors: koenigstag nikosgram

repo: nikosgram/gringotts


text:
rework the passes and intermediate languages

Redesign large parts of the intermediate languages, fixing some mistakes made with their first iteration.
Some terminology is changed (e.g., continuation -> basic block), transformations are redistributed between passes, new passes are introduced, and the languages are simplified. The most significant simplification is the temporary removal of the SSA form and associated transformation. It results in simpler ILs, much smaller IL code sizes, and much faster passes, at the cost of a major regression in quality of the generated VM bytecode.
In addition, the following important features are now supported by the L30 IL:

alignment requirements for aggregate types
locals of scalar type can have their address taken
procedure parameter and return values can be of aggregate type

To-Do

[ ] implement the new passes
[ ] adjust the existing passes where necessary (pass0 and pass25)
[ ] change source2il to produce valid L30 code (according to the new specification)
[ ] write tests for the new passes
[ ] remove the obsolete tests and passes
[ ] write a proper commit message

Notes For Reviewers

this PR is the successor to #64

The reworked passes are not perfect and by no means final. With the second attempt, a major goal of mine was to speed up future development of the passes, hence me making simplicity a priority and removing any form of SSA transformation for now (it will most likely be reintroduced at some point in the future).
I've tested the new ILs extensively with skully (using a proof-of-concept implementation) in order to make sure that they're powerful enough to work as the target language for NimSkull's MIR and also that it's actually possible to implement the necessary passes in an efficient and reasonably simple manner (something where the previous iteration fell short) -- which they showed to be.

To facilitate the new passes - or at least make their implementation cleaner -, I've extended the ChangeSet API with "virtual trees", which finally expose the ability to create stacked changes in a reasonably ergonomic manner.
The Cursor API from the predecessor PR was an earlier attempt at this, which - while quite efficient - was made infeasible to use for some transformations (like the aggregate parameter lowering) by its requirement to process the input top-down outside-to-inside.
Another major improvement is the new buildTree macro. It took me some time to convince myself that a macro is warranted here, but in the end, I think using one is/was the right choice. The macro is used like this:
bu.buildTree:
  tree(Asgn, node(Local, ...), tree(Copy, node(Local, ...)))

allowing one to express trees using an almost S-expression-like syntax. Beyond being easier to read/write than subTree/add, it's also more efficient, as the memory for all nodes in the constructed tree can be allocated upfront and in one go.
The macro itself is quite simple, only using quote and the low-level NimNode API and leaving almost all of the input validation to the compiler, so it shouldn't cause too much trouble in the future.

The aggregate parameter lowering pass is the most complex one out of the new passes. Most of it is boilerplate however, and a lot of shortcuts are taken, resulting in rather low-quality output. Reintroduction of an SSA form plus the introduction is going to help here, and the pass could also limit hoisting to impure expression (and then only when the materialized r-value expression is impure itself).

repo: nim-works/phy


text:
WIP: Implement multivariate-t distribution

Not ready to merge, just thought I'd put up here for others to take a look.

Question: is editing NAMESPACE manually the right thing to do?

No!
We don't really have a streamlined process for this. Let me know what
you're trying to do? Just some export() lines?
On Thu, Apr 14, 2016 at 11:44 AM, Peter Sujan notifications@github.com
wrote:

Question: is editing NAMESPACE manually the right thing to do?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/nimble-dev/nimble/pull/138#issuecomment-210094446

Yeah, just trying to export dmvt_chol and rmvt_chol so they can be called from R.

I'll take care of it down the road. Feel free to modify NAMESPACE in the
interim as needed.
On Thu, Apr 14, 2016 at 12:19 PM, Peter Sujan notifications@github.com
wrote:

Yeah, just trying to export dmvt_chol and rmvt_chol so they can be called
from R.
—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/nimble-dev/nimble/pull/138#issuecomment-210108205

@peterasujan To clarify, since Chris's responses were somewhat contradictory.
Yes, it is ok to manually modify the NAMESPACE.  Until we (meaning Chris) does the automated package creation, which includes an automated generation of the NAMESPACE file, manually editing it is the only way to have it pickup your newly created functions for export, and also to remove any functions that no longer exist (if you remove functions).
Doing these manual edits to NAMESPACE is necessary for the package to build correctly -- if you've modified the functions for export -- so yes, you can and should modify it.  Just make sure the package builds correctly after you make any changes.

I prefer to think of my response as 'nuanced'.
On Thu, Apr 14, 2016 at 12:33 PM, Daniel Turek notifications@github.com
wrote:

@peterasujan https://github.com/peterasujan To clarify, since Chris's
responses were somewhat contradictory.
Yes, it is ok to manually modify the NAMESPACE. Until we (meaning Chris)
does the automated package creation, which includes an automated generation
of the NAMESPACE file, manually editing it is the only way to have it
pickup your newly created functions for export, and also to remove any
functions that no longer exist (if you remove functions).
Doing these manual edits to NAMESPACE is necessary for the package to
build correctly -- if you've modified the functions for export -- so yes,
you can and should modify it. Just make sure the package builds correctly
after you make any changes.
—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/nimble-dev/nimble/pull/138#issuecomment-210113431

in altParams, it should be
df = double(0)
not
df = double(1)
also in C_dmvt_chol, the error message refers to C_dnorm_chol:
RBREAK("Error (C_dnorm_chol): invalid input type for one of the arguments.\n")
otherwise, looks good.

Thanks for the clarification @danielturek and @paciorek, and for the fixes @paciorek.
Another clarification question: I've been writing tests, and have been looking at other files for examples. I noticed that most of the test_that calls are wrapped in try statements - what's the reason for this?

Also, why is *.R in the .gitignore? Perhaps it was meant to only ignore R files in the top-level directory?

Yes, I think so in terms of .gitignore.
In terms of the tests, without the try the test errors out and the code
does not proceed to the later tests.
On Wed, Apr 20, 2016 at 12:31 AM, Peter Sujan notifications@github.com
wrote:

Also, why is *.R in the .gitignore? Perhaps it was meant to only ignore R
files in the top-level directory?
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/nimble-dev/nimble/pull/138#issuecomment-212298794

@peterasujan is the status of this ready to merge?
I see you made the changes recommended by @paciorek in NAMESPACE and the altParams specification, but I'm not sure if there is other review or testing still to do?

@danielturek just adding in a couple more tests - I should have this pushed later today for your review.

@danielturek I added tests for random sampling and cleaned up the history a bit. I believe at this point (pending Travis' approval) this should be ready to merge.

@peterasujan The travis testing of your branch has passed.
@paciorek will do a careful review of your dmt() additions before merging them in, hopefully later this week.
Thanks for sticking with this!

merged via pulling in as peterasujan-multivariate-t local branch on CJP machine then fixing minor merge conflict involving 'initialize' in first line of genCpp_sizeProcessing.R and then merging into devel

Great, thanks for reviewing that @paciorek and resolving any conflicts.

authors: danielturek paciorek peterasujan

repo: nimble-dev/nimble


text:
chore: Update engine to support nodejs 16 and beyond

What happened 👀
As new NodeJS version 20 has been released, our ESLint packages are currently open for many versions. We need to update the supporting engines to deal with later versions.
Insight 📝
Update the engines node to support version equal or above NodeJS 16
Proof Of Work 📹

@nvminhtue can you help resolve the conflicts so we can merge this  one 🚀  Thanks 🙏

@nvminhtue can you help resolve the conflicts so we can merge this one 🚀 Thanks 🙏

#63 already covered the needed changed, closed. Thanks for pinging again @malparty 🙏

authors: malparty nvminhtue

repo: nimblehq/eslint-config-nimble


text:
MSVC 2022 17.12.1 configure.py --bootstrap fails on emhash/hash_table8.hpp

warning C4456: declaration of 'slot' hides previous local declaration:
https://github.com/ninja-build/ninja/blob/b40052cd6f3d7d801e035cd768b2462c06ff4ffd/src/third_party/emhash/hash_table8.hpp#L1329-L1340
https://github.com/ninja-build/ninja/blob/b40052cd6f3d7d801e035cd768b2462c06ff4ffd/src/third_party/emhash/hash_table8.hpp#L1364-L1375
full configure.py --bootstrap --platform msvc output:

H:\llvm\ninja>configure.py --bootstrap --platform msvc
bootstrapping ninja...
depfile_parser.cc
lexer.cc
build.cc
build_log.cc
H:\llvm\ninja\src\third_party/emhash/hash_table8.hpp(1340): error C2220: the following warning is treated as an error
H:\llvm\ninja\src\third_party/emhash/hash_table8.hpp(1340): warning C4456: declaration of 'slot' hides previous local declaration
H:\llvm\ninja\src\third_party/emhash/hash_table8.hpp(1329): note: see declaration of 'slot'
H:\llvm\ninja\src\third_party/emhash/hash_table8.hpp(1340): note: the template instantiation context (the oldest one first) is
H:\llvm\ninja\src\build_log.h(101): note: see reference to class template instantiation 'emhash8::HashMap<StringPiece,V,std::hash<StringPiece>,std::equal_to<KeyT>,std::allocator<std::pair<KeyT,ValueT>>,emhash8::DefaultPolicy>' being compiled
        with
        [
            V=BuildLog::LogEntry *,
            KeyT=StringPiece,
            ValueT=BuildLog::LogEntry *
        ]
H:\llvm\ninja\src\third_party/emhash/hash_table8.hpp(1322): note: while compiling class template member function 'emhash8::HashMap<StringPiece,V,std::hash<StringPiece>,std::equal_to<KeyT>,std::allocator<std::pair<KeyT,ValueT>>,emhash8::DefaultPolicy>::size_type emhash8::HashMap<KeyT,ValueT,std::hash<StringPiece>,std::equal_to<KeyT>,std::allocator<std::pair<KeyT,ValueT>>,emhash8::DefaultPolicy>::find_filled_bucket(const KeyT &,uint64_t) noexcept const'
        with
        [
            V=BuildLog::LogEntry *,
            KeyT=StringPiece,
            ValueT=BuildLog::LogEntry *
        ]
H:\llvm\ninja\src\third_party/emhash/hash_table8.hpp(892): note: see the first reference to 'emhash8::HashMap<StringPiece,V,std::hash<StringPiece>,std::equal_to<KeyT>,std::allocator<std::pair<KeyT,ValueT>>,emhash8::DefaultPolicy>::find_filled_bucket' in 'emhash8::HashMap<StringPiece,V,std::hash<StringPiece>,std::equal_to<KeyT>,std::allocator<std::pair<KeyT,ValueT>>,emhash8::DefaultPolicy>::erase'
        with
        [
            V=BuildLog::LogEntry *,
            KeyT=StringPiece,
            ValueT=BuildLog::LogEntry *
        ]
.\src\build_log.cc(376): note: see the first reference to 'emhash8::HashMap<StringPiece,V,std::hash<StringPiece>,std::equal_to<KeyT>,std::allocator<std::pair<KeyT,ValueT>>,emhash8::DefaultPolicy>::erase' in 'BuildLog::Recompact'
        with
        [
            V=BuildLog::LogEntry *,
            KeyT=StringPiece,
            ValueT=BuildLog::LogEntry *
        ]
H:\llvm\ninja\src\third_party/emhash/hash_table8.hpp(1375): warning C4456: declaration of 'slot' hides previous local declaration
H:\llvm\ninja\src\third_party/emhash/hash_table8.hpp(1364): note: see declaration of 'slot'
H:\llvm\ninja\src\third_party/emhash/hash_table8.hpp(1375): note: the template instantiation context (the oldest one first) is
.\src\build_log.cc(102): note: see reference to function template instantiation 'emhash8::HashMap<StringPiece,V,std::hash<StringPiece>,std::equal_to<KeyT>,std::allocator<std::pair<KeyT,ValueT>>,emhash8::DefaultPolicy>::iterator emhash8::HashMap<KeyT,ValueT,std::hash<StringPiece>,std::equal_to<KeyT>,std::allocator<std::pair<KeyT,ValueT>>,emhash8::DefaultPolicy>::find<std::string>(const K &) noexcept' being compiled
        with
        [
            V=BuildLog::LogEntry *,
            KeyT=StringPiece,
            ValueT=BuildLog::LogEntry *,
            K=std::string
        ]
.\src\build_log.cc(102): note: see the first reference to 'emhash8::HashMap<StringPiece,V,std::hash<StringPiece>,std::equal_to<KeyT>,std::allocator<std::pair<KeyT,ValueT>>,emhash8::DefaultPolicy>::find' in 'BuildLog::RecordCommand'
        with
        [
            V=BuildLog::LogEntry *,
            KeyT=StringPiece,
            ValueT=BuildLog::LogEntry *
        ]
H:\llvm\ninja\src\third_party/emhash/hash_table8.hpp(556): note: see reference to function template instantiation 'emhash8::HashMap<StringPiece,V,std::hash<StringPiece>,std::equal_to<KeyT>,std::allocator<std::pair<KeyT,ValueT>>,emhash8::DefaultPolicy>::size_type emhash8::HashMap<KeyT,ValueT,std::hash<StringPiece>,std::equal_to<KeyT>,std::allocator<std::pair<KeyT,ValueT>>,emhash8::DefaultPolicy>::find_filled_slot<K>(const K &) noexcept const' being compiled
        with
        [
            V=BuildLog::LogEntry *,
            KeyT=StringPiece,
            ValueT=BuildLog::LogEntry *,
            K=std::string
        ]
when running:  cl  /nologo /Zi /W4 /WX /wd4530 /wd4100 /wd4706 /wd4244 /wd4512 /wd4800 /wd4702 /wd4819 /wd4127 /wd4355 /wd4091 /GR- /Zc:__cplusplus /wd4267 /DNOMINMAX /D_CRT_SECURE_NO_WARNINGS /D_HAS_EXCEPTIONS=0 /DNINJA_PYTHON="python3.exe" /FS /Ox /DNDEBUG /GL -I. -c .\src\build_log.cc /Fobuild\build_log.obj /Fdbuild\ninja.pdb
Traceback (most recent call last):
  File "H:\llvm\ninja\configure.py", line 558, in <module>
    objs += cxx(name, variables=cxxvariables)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "H:\llvm\ninja\configure.py", line 297, in cxx
    return n.build(built(name + objext), 'cxx', src(name + '.cc'), **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "H:\llvm\ninja\configure.py", line 176, in build
    self._run_command(self._expand(cmd, local_vars))
  File "H:\llvm\ninja\configure.py", line 201, in _run_command
    subprocess.check_call(cmdline, shell=True)
  File "D:\Dev\Python3\Lib\subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'cl  /nologo /Zi /W4 /WX /wd4530 /wd4100 /wd4706 /wd4244 /wd4512 /wd4800 /wd4702 /wd4819 /wd4127 /wd4355 /wd4091 /GR- /Zc:__cplusplus /wd4267 /DNOMINMAX /D_CRT_SECURE_NO_WARNINGS /D_HAS_EXCEPTIONS=0 /DNINJA_PYTHON="python3.exe" /FS /Ox /DNDEBUG /GL -I. -c .\src\build_log.cc /Fobuild\build_log.obj /Fdbuild\ninja.pdb' returned non-zero exit status 2.

other warnings using LLVM clang-cl 19.1.4.
H:\llvm\ninja>configure.py --bootstrap --platform msvc
bootstrapping ninja...
.\src\disk_interface.cc(168,22): warning: cast from 'FARPROC' (aka 'long long (*)()') to 'FunctionType *' (aka 'unsigned char (*)()') converts to incompatible function type [-Wcast-function-type-mismatch]
  168 |     auto* func_ptr = reinterpret_cast<FunctionType*>(
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  169 |         ::GetProcAddress(ntdll_lib, "RtlAreLongPathsEnabled"));
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
In file included from .\src\manifest_parser.cc:15:
In file included from .\src\manifest_parser.h:20:
D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.42.34433\include\memory(3302,9): warning: delete called on non-final 'ManifestParser' that has virtual functions but non-virtual destructor
      [-Wdelete-non-abstract-non-virtual-dtor]
 3302 |         delete _Ptr;
      |         ^
D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.42.34433\include\memory(3412,13): note: in instantiation of member function 'std::default_delete<ManifestParser>::operator()' requested here
 3412 |             _Mypair._Get_first()(_Mypair._Myval2);
      |             ^
.\src\manifest_parser.cc(30,17): note: in instantiation of member function 'std::unique_ptr<ManifestParser>::~unique_ptr' requested here
   30 | ManifestParser::ManifestParser(State* state, FileReader* file_reader,
      |                 ^
1 warning generated.
.\src\minidump-win32.cc(55,7): warning: cast from 'FARPROC' (aka 'long long (*)()') to 'MiniDumpWriteDumpFunc' (aka 'int (*)(void *, unsigned long, void *, _MINIDUMP_TYPE, _MINIDUMP_EXCEPTION_INFORMATION
      *const, _MINIDUMP_USER_STREAM_INFORMATION *const, _MINIDUMP_CALLBACK_INFORMATION *const)') converts to incompatible function type [-Wcast-function-type-mismatch]
   55 |       (MiniDumpWriteDumpFunc)GetProcAddress(dbghelp, "MiniDumpWriteDump");
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
In file included from .\src\ninja.cc:39:
In file included from .\src\build.h:20:
D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.42.34433\include\memory(3302,9): warning: delete called on non-final 'ManifestParser' that has virtual functions but non-virtual destructor
      [-Wdelete-non-abstract-non-virtual-dtor]
 3302 |         delete _Ptr;
      |         ^
D:\Program Files\Microsoft Visual Studio\2022\VC\Tools\MSVC\14.42.34433\include\memory(3412,13): note: in instantiation of member function 'std::default_delete<ManifestParser>::operator()' requested here
 3412 |             _Mypair._Get_first()(_Mypair._Myval2);
      |             ^
.\src\manifest_parser.h(41,8): note: in instantiation of member function 'std::unique_ptr<ManifestParser>::~unique_ptr' requested here
   41 | struct ManifestParser : public Parser {
      |        ^
1 warning generated.

GCC 14.2 warnings:
H:\llvm\ninja>configure.py --bootstrap --platform mingw
bootstrapping ninja...
.\src\disk_interface.cc: In constructor 'RealDiskInterface::RealDiskInterface()':
.\src\disk_interface.cc:168:22: warning: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOLEAN (*)()' {aka 'unsigned char (*)()'} [-Wcast-function-type]
  168 |     auto* func_ptr = reinterpret_cast<FunctionType*>(
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  169 |         ::GetProcAddress(ntdll_lib, "RtlAreLongPathsEnabled"));
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\src\util.cc: In function 'std::string GetLastErrorString()':
.\src\util.cc:547:69: warning: format '%d' expects argument of type 'int', but argument 4 has type 'DWORD' {aka 'long unsigned int'} [-Wformat=]
  547 |     snprintf(fallback_msg, sizeof(fallback_msg), "GetLastError() = %d", err);
      |                                                                    ~^   ~~~
      |                                                                     |   |
      |                                                                     int DWORD {aka long unsigned int}
      |                                                                    %ld
wrote build.ninja.

LLVM mingw 19.1.4 warnings:
H:\llvm\ninja>set CXX=D:\Dev\llvm-mingw\bin\clang++.exe

H:\llvm\ninja>configure.py --bootstrap --platform mingw
bootstrapping ninja...
.\src\disk_interface.cc:168:22: warning: cast from 'FARPROC' (aka 'long long (*)()') to 'FunctionType *' (aka 'unsigned char (*)()') converts to incompatible function type [-Wcast-function-type-mismatch]
  168 |     auto* func_ptr = reinterpret_cast<FunctionType*>(
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  169 |         ::GetProcAddress(ntdll_lib, "RtlAreLongPathsEnabled"));
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
In file included from .\src\manifest_parser.cc:15:
In file included from .\src/manifest_parser.h:18:
In file included from .\src/parser.h:18:
In file included from D:/Dev/llvm-mingw/include/c++/v1/string:647:
In file included from D:/Dev/llvm-mingw/include/c++/v1/string_view:941:
In file included from D:/Dev/llvm-mingw/include/c++/v1/algorithm:1842:
In file included from D:/Dev/llvm-mingw/include/c++/v1/__algorithm/for_each.h:16:
In file included from D:/Dev/llvm-mingw/include/c++/v1/__ranges/movable_box.h:21:
In file included from D:/Dev/llvm-mingw/include/c++/v1/optional:1294:
In file included from D:/Dev/llvm-mingw/include/c++/v1/memory:944:
In file included from D:/Dev/llvm-mingw/include/c++/v1/__memory/inout_ptr.h:16:
In file included from D:/Dev/llvm-mingw/include/c++/v1/__memory/shared_ptr.h:32:
D:/Dev/llvm-mingw/include/c++/v1/__memory/unique_ptr.h:80:5: warning: delete called on non-final 'ManifestParser' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor]
   80 |     delete __ptr;
      |     ^
D:/Dev/llvm-mingw/include/c++/v1/__memory/unique_ptr.h:292:7: note: in instantiation of member function 'std::default_delete<ManifestParser>::operator()' requested here
  292 |       __ptr_.second()(__tmp);
      |       ^
.\src\manifest_parser.cc:425:16: note: in instantiation of member function 'std::unique_ptr<ManifestParser>::reset' requested here
  425 |     subparser_.reset(new ManifestParser(state_, file_reader_, options_));
      |                ^
1 warning generated.
.\src\util.cc:547:73: warning: format specifies type 'int' but the argument has type 'DWORD' (aka 'unsigned long') [-Wformat]
  547 |     snprintf(fallback_msg, sizeof(fallback_msg), "GetLastError() = %d", err);
      |                                                                    ~~   ^~~
      |                                                                    %lu
1 warning generated.
In file included from .\src\ninja.cc:21:
In file included from D:/Dev/llvm-mingw/include/c++/v1/algorithm:1842:
In file included from D:/Dev/llvm-mingw/include/c++/v1/__algorithm/for_each.h:16:
In file included from D:/Dev/llvm-mingw/include/c++/v1/__ranges/movable_box.h:21:
In file included from D:/Dev/llvm-mingw/include/c++/v1/optional:1294:
In file included from D:/Dev/llvm-mingw/include/c++/v1/memory:944:
In file included from D:/Dev/llvm-mingw/include/c++/v1/__memory/inout_ptr.h:16:
In file included from D:/Dev/llvm-mingw/include/c++/v1/__memory/shared_ptr.h:32:
D:/Dev/llvm-mingw/include/c++/v1/__memory/unique_ptr.h:80:5: warning: delete called on non-final 'ManifestParser' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor]
   80 |     delete __ptr;
      |     ^
D:/Dev/llvm-mingw/include/c++/v1/__memory/unique_ptr.h:292:7: note: in instantiation of member function 'std::default_delete<ManifestParser>::operator()' requested here
  292 |       __ptr_.second()(__tmp);
      |       ^
D:/Dev/llvm-mingw/include/c++/v1/__memory/unique_ptr.h:261:71: note: in instantiation of member function 'std::unique_ptr<ManifestParser>::reset' requested here
  261 |   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 ~unique_ptr() { reset(); }
      |                                                                       ^
.\src/manifest_parser.h:41:8: note: in instantiation of member function 'std::unique_ptr<ManifestParser>::~unique_ptr' requested here
   41 | struct ManifestParser : public Parser {
      |        ^
1 warning generated.
wrote build.ninja.

These are only warnings, but still we should fix them. @sesse can you have a look?
We should also think about using -Werror on CI so that we don't merge warnings to the master branch in the future.

The GetProcAddress() stuff is preexisting, right? There are the ones in hash_table8.hpp, but I guess they are just… bogus warnings that we should turn off?

The shadow warning exists when using GCC with -Wshadow or -Wshadow=local:
H:\llvm\ninja>configure.py --bootstrap --platform mingw
bootstrapping ninja...
warning: A compatible version of re2c (>= 0.15.3) was not found; changes to src/*.in.cc will not affect your build.
In file included from .\src\hash_map.h:23,
                 from .\src\build_log.h:21,
                 from .\src\build.cc:31:
.\src\third_party/emhash/hash_table8.hpp: In member function 'emhash8::HashMap<KeyT, ValueT, HashT, EqT, Allocator, Policy>::size_type emhash8::HashMap<KeyT, ValueT, HashT, EqT, Allocator, Policy>::find_filled_bucket(const KeyT&, uint64_t) const':
.\src\third_party/emhash/hash_table8.hpp:1340:28: warning: declaration of 'slot' shadows a previous local [-Wshadow=compatible-local]
 1340 |                 const auto slot = _index[next_bucket].slot & _mask;
      |                            ^~~~
.\src\third_party/emhash/hash_table8.hpp:1329:20: note: shadowed declaration is here
 1329 |         const auto slot = _index[bucket].slot & _mask;
      |                    ^~~~
.\src\third_party/emhash/hash_table8.hpp: In member function 'emhash8::HashMap<KeyT, ValueT, HashT, EqT, Allocator, Policy>::size_type emhash8::HashMap<KeyT, ValueT, HashT, EqT, Allocator, Policy>::find_filled_slot(const K&) const':
.\src\third_party/emhash/hash_table8.hpp:1375:28: warning: declaration of 'slot' shadows a previous local [-Wshadow=compatible-local]
 1375 |                 const auto slot = _index[next_bucket].slot & _mask;
      |                            ^~~~
.\src\third_party/emhash/hash_table8.hpp:1364:20: note: shadowed declaration is here
 1364 |         const auto slot = _index[bucket].slot & _mask;
      |                    ^~~~

The GetProcAddress() stuff

These [-Wcast-function-type] warings can be fixed with std::bit_cast() or memcpy().

Reported these shadow warnings to upstream at https://github.com/ktprime/emhash/issues/42

Reported these shadow warnings to upstream at ktprime/emhash#42

thanks, I have fixed the issues in latest version.

All GCC and Clang warnings were fixed, can we update emhash/hash_table8.hpp to latest version to fix MSVC shadow warning?

authors: jhasse ktprime sesse zufuliu

repo: ninja-build/ninja


text:
[RESOLVED] S100-Secundario has been restarted (uptime < 10m)

Problem started at 19:39:00 on 2023.06.24
Problem name: S100-Secundario has been restarted (uptime < 10m)
Host: S100-Secundario
Severity: Warning
Operational data: 00:05:59
Original problem ID: 29107
Event details in Zabbix: http://192.168.232.99/tr_events.php?triggerid=23497&eventid=29107

Problem has been resolved in 4m 30s at 19:43:30 on 2023.06.24
Problem name: S100-Secundario has been restarted (uptime < 10m)
Host: S100-Secundario
Severity: Warning
Original problem ID: 29107


text:
UnsatisfiedLinkError about WebPDecoderOptions.createDecoderOptions

Hello there I'm using your library on Mulesoft here
And when running the code it gives me this error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: com.luciad.imageio.webp.WebPDecoderOptions.createDecoderOptions()J 	at com.luciad.imageio.webp.WebPDecoderOptions.createDecoderOptions(Native Method) 	at com.luciad.imageio.webp.WebPDecoderOptions.<init>(WebPDecoderOptions.java:26) 	at com.luciad.imageio.webp.WebPReadParam.<init>(WebPReadParam.java:24)
I guess it's because the .dll/.so/.dylib is not suitable for my system, which is

macOS High Sierra version 10.13.6

Got the same error here (OS X Mojave)

Sorry, I don't have any OS X device to check the .dylib file now. You can compile it by yourself.
The Compilation Guide

just built it for osx 64 bit, please check out a pull request https://github.com/nintha/webp-imageio-core/pull/9

@prankstrisse Thanks for your help. I hava merged it.
@linicam  you can try the new .dylib file with building jar by yourself

Thanks. Works great now!

谢谢。现在很棒！

请问是怎么解决的

how to fix this issue?  The newest version 0.1.3 still has the problem.

com.github.nintha
webp-imageio-core
0.1.3

authors: d0nezer0 davidekholm linicam nintha prankstrisse zonghongxia

repo: nintha/webp-imageio-core


text:
OSError: [Errno 98] Address already in use

What happened?
Hi. I am unsure if this is the right place to ask my question...?
I want to use mriqc with nextflow. The idea is that nextflow runs mriqc for all subjects in parallel (or at least a subsample of the subjects). I use an apptainer-container to start mriqc and everything works fine until there is more than one CPU involved (and more than one is kind of the whole idea).
So I am not sure if the problem is with the apptainer-setup, the nextflow-setup or with mriqc. I tend to think it is a Python (3.9) problem; thats why I post it here ?!
What command did you use?
This is the command (through) nextflow:
mriqc /bids /out participant     -w /tmp --resource-monitor --no-sub     --nprocs 1 --omp-nthreads 1 -m bold --participant-label sub-122BPAF172043

So, just one proc/thread

What version of the software are you running?
23.1.0
How are you running this software?
Other
Is your data BIDS valid?
Yes
Are you reusing any previously computed results?
No
Please copy and paste any relevant log output.
ERROR ~ Error executing process > 'mriqc (27)'

Caused by:
  Process `mriqc (27)` terminated with an error exit status (1)

Command executed:

  mriqc /bids /out participant     -w /tmp --resource-monitor --no-sub     --nprocs 1 --omp-nthreads 1 -m bold --participant-label sub-122BPAF172043

Command exit status:
  1

Command output:
  (empty)

Command error:
  Process SyncManager-2:
  Traceback (most recent call last):
    File "/opt/conda/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
      self.run()
    File "/opt/conda/lib/python3.9/multiprocessing/process.py", line 108, in run
      self._target(*self._args, **self._kwargs)
    File "/opt/conda/lib/python3.9/multiprocessing/managers.py", line 583, in _run_server
      server = cls._Server(registry, address, authkey, serializer)
    File "/opt/conda/lib/python3.9/multiprocessing/managers.py", line 156, in __init__
      self.listener = Listener(address=address, backlog=16)
    File "/opt/conda/lib/python3.9/multiprocessing/connection.py", line 453, in __init__
      self._listener = SocketListener(address, family, backlog)
    File "/opt/conda/lib/python3.9/multiprocessing/connection.py", line 596, in __init__
      self._socket.bind(address)
  OSError: [Errno 98] Address already in use
  Traceback (most recent call last):
    File "/opt/conda/bin/mriqc", line 8, in <module>
      sys.exit(main())
    File "/opt/conda/lib/python3.9/site-packages/mriqc/cli/run.py", line 104, in main
      with Manager() as mgr:
    File "/opt/conda/lib/python3.9/multiprocessing/context.py", line 57, in Manager
      m.start()
    File "/opt/conda/lib/python3.9/multiprocessing/managers.py", line 558, in start
      self._address = reader.recv()
    File "/opt/conda/lib/python3.9/multiprocessing/connection.py", line 255, in recv
      buf = self._recv_bytes()
    File "/opt/conda/lib/python3.9/multiprocessing/connection.py", line 419, in _recv_bytes
      buf = self._recv(4)
    File "/opt/conda/lib/python3.9/multiprocessing/connection.py", line 388, in _recv
      raise EOFError
  EOFError

Additional information / screenshots
No response

Hey,
I have the same problem working with apptainer on my university's HPC. I have a sbatch script to process several subject in parallels:
OSError: [Errno 98] Address already in use
Traceback (most recent call last):
  File "/opt/conda/bin/mriqc", line 8, in <module>
    sys.exit(main())
  File "/opt/conda/lib/python3.9/site-packages/mriqc/cli/run.py", line 104, in main
    with Manager() as mgr:
  File "/opt/conda/lib/python3.9/multiprocessing/context.py", line 57, in Manager
    m.start()
  File "/opt/conda/lib/python3.9/multiprocessing/managers.py", line 558, in start
    self._address = reader.recv()
  File "/opt/conda/lib/python3.9/multiprocessing/connection.py", line 255, in recv
    buf = self._recv_bytes()
  File "/opt/conda/lib/python3.9/multiprocessing/connection.py", line 419, in _recv_bytes
    buf = self._recv(4)
  File "/opt/conda/lib/python3.9/multiprocessing/connection.py", line 388, in _recv
    raise EOFError
EOFError
Process SyncManager-1:
Traceback (most recent call last):
  File "/opt/conda/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/opt/conda/lib/python3.9/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/conda/lib/python3.9/multiprocessing/managers.py", line 583, in _run_server
    server = cls._Server(registry, address, authkey, serializer)
  File "/opt/conda/lib/python3.9/multiprocessing/managers.py", line 156, in __init__
    self.listener = Listener(address=address, backlog=16)
  File "/opt/conda/lib/python3.9/multiprocessing/connection.py", line 453, in __init__
    self._listener = SocketListener(address, family, backlog)
  File "/opt/conda/lib/python3.9/multiprocessing/connection.py", line 596, in __init__
    self._socket.bind(address)

It may be that nipype's multiprocessing plugin is raising errors because several mriqc runs are attempting to use the same port to communicate with subprocesses. Ideally, this issue would be addressed in the nipype plugin by allowing the multiprocessing plugin to choose a port that is not already in use.
As a workaround, I am currently trying to use the --net --network none option with the apptainer run command so that each container operates on its own local network, preventing conflicts between jobs. It appears to be working for now, and I will update you once the jobs are completed.

This has nothing to do with nipype but instead Python's multiprocessing managers: https://docs.python.org/3/library/multiprocessing.html#multiprocessing.Manager
I've never seen this issue before, and it looks like Manager() doesn't take any arguments. This doesn't look like an easy thing for us to fix, apart from stopping building the workflow in an external process.

Yes of course, I didn't mean that the problem comes from nipype per se, but it seems to be possible to tell multiprocessing.Manager() to automatically choose a free port as described in  this stackoverflow thread.
But I understand the issue is hard to test and might create other issues.
So far the --net --network none workaround seems to work but might create issue for templateflow to get templates. (In my case, templates are already on disk)

authors: effigies karl-koschutnig vferat

repo: nipreps/mriqc


text:
get realtime soundcard audio as input for shadertoy shaders

Hi,
I have tried some shadertoys examples.
It seems the audio input can be the 'output' from the sounds playing in jupylet, but is there a way to use realtime audio input from the soundcard?
Thank you

If you can read the sound card audio as an array of samples you should be able to feed it to the shadertoy.
The get_shadertoy_audio() function accepts an optional data parameter that may contain arbitrary audio samples (I believe in the range [-1,1]):
https://github.com/nir/jupylet/blob/4b9e13cc090e2e2f7cebd7a062cf2ad0d91f1fbe/jupylet/shadertoy.py#L91
You can see how it is used in the piano example:
https://github.com/nir/jupylet/blob/3d00eae1136e73ecf78cd879b67167d34f0868e3/examples/piano.py#L260
In the piano example the data parameter is not used so the function reads audio data from the jupylet audio buffer instead.

I ended up with a semi-working solution.
I added this in the piano example:
sound_input = np.zeros((512, 2))

import soundcard as sd
import _thread

def _rec():
    global sound_input
    m = None
    for m in sd.all_microphones(include_loopback=True):
        if m.isloopback:
            break
    if m is None:
        m = sd.default_microphone()
    with m.recorder(samplerate=48000) as mic:
        while True:
            sound_input = mic.record(numframes=512)

_rec_tid = _thread.start_new_thread(_rec, ())

And I call get_shadertoy_audio like this:
si = sound_input.copy()
st0.set_channel(0, *get_shadertoy_audio(amp=5, data=si, length=512))

It is kind of working, but the waveform is a bit shaky... I guess it is due to lack of synchronization between the soundcard callback and the render loop...
do you think I should call render() inside the audio capture loop?
thanks for your hints

The shakiness may be due to slight mistimings in the operation of the various moving parts (e.g. your recording thread) - I the get_shadertoy_audio() function I fix it by calling get_correlation() in: https://github.com/nir/jupylet/blob/4b9e13cc090e2e2f7cebd7a062cf2ad0d91f1fbe/jupylet/shadertoy.py#L104
It finds a subset of the input buffer that minimizes that shakiness (by maximizing correlation with a previous buffer). You can use it too on your own, on your buffer to minimize that shakiness. let me know if it works.
In the next release I will make it an option to apply it to the user supplied buffer.

Hi,
First of all, thank you for your detailed answer and for taking some time to look at this issue.
yeah you're right, it is much better when using get_correlation(). Maybe you could add it as an option in get_shadertoy_audio() too ?
But regarding capturing the audio, I think the best way would be call render() in the audio callback.
I have looked at the code to see how I could do it, but I'm not sure there is an easy way to call render() outside of the run()
Am I correct?

I don't think you can do that. render() is a callback function called by the async loop.

Added new parameter to auto-correlate user supplied audio buffers:
https://github.com/nir/jupylet/blob/538bf843c216f8c541c2a5afcb9f17ca514fac31/jupylet/shadertoy.py#L97
Thanks for this bug report!

repo: nir/jupylet


text:
excel单元格值如果是#N/A读取文件后会自动转成42.00

NPOI Version
1.2.3
File Type

[ ] XLSX
[ ] XLS

Upload the Excel File
Please attach your original Excel File to help us reproduce the issue
Issue Description
excel文件有一列单元格格式number，如果该单元格的值是#N/A的时候使用row.GetCell()读出来的值变成了42.00

I guess he is using Dotnetcore.NPOI instead of real NPOI. Please use NPOI official package instead.

authors: filedos tonyqus

repo: nissl-lab/npoi


text:
Is here a fromNodeMiddleware but for error hanfler ((err, req,res, next) => {})

Environment
latest
Reproduction
fromNodeMiddleware((error, req, res, next) => {})
Describe the bug
I think that not work h3App.use(fromNodeMiddleware((error, req, res, next) => {})) or  h3App.router.use(fromNodeMiddleware((error, req, res, next) => {}))
const bodyParser = require('body-parser')
const methodOverride = require('method-override')

app.use(bodyParser.urlencoded({
  extended: true
}))
app.use(bodyParser.json())
app.use(methodOverride())
app.use((err, req, res, next) => {
  // logic
})

Additional context
No response
Logs
No response

Hello, we tried to solve the issue.
This is what we did:
Modified the createNitroApp function to include support for fromNodeMiddleware with error handling. This change allows the use of Node.js-style middleware with error handling in Nitro applications.
You can review changes in this commit: https://github.com/wwqwq2313/nitrojs-nitro-2950/commit/4a10be3603a181ab15e33b8124742f016c9073fc.

[!CAUTION]
Disclaimer: The concept of solution was created by AI and you should never copy paste this code before you check the correctness of generated code. Solution might not be complete, you should use this code as an inspiration only.

If you no longer want Latta AI to attempt solving issues on your repository, you can block this account.

defineNitroErrorHandler

repo: nitrojs/nitro


text:
Unable to find or run nvidia-smi despite verified presence/executability of binary

Bug description
Attempting to run nvidia-smi results in zsh: command not found: nvidia-smi. I have verified through various ways that the binary exists, is in the PATH, is chmod'd to be executable by user, but cannot be found in zsh, bash or via nix-shell.
To Reproduce
Steps to reproduce the behavior:

Open new shell
run nvidia-smi

Expected behavior
nvidia-smi is found on the PATH and runs
Logs
Please excuse my formatting. I will also attach a screenshot.
    ~  nvidia-smi                                                                                 127 ✘  11:25:14  
zsh: command not found: nvidia-smi

    ~  where nvidia-smi                                                                             127 ✘  11:25:18  
/usr/lib/wsl/lib/nvidia-smi

    ~  ls -lsa `where nvidia-smi`                                                                       ✔  11:25:23  
632 -r-xr-xr-x 1 root root 644048 Apr 11 12:57 /usr/lib/wsl/lib/nvidia-smi

    ~  /usr/lib/wsl/lib/nvidia-smi                                                                      ✔  11:25:32  
zsh: no such file or directory: /usr/lib/wsl/lib/nvidia-smi

    ~  sudo !!                                                                                 127 ✘  11:25:44  

    ~  sudo /usr/lib/wsl/lib/nvidia-smi                                                             127 ✘  11:25:47  
sudo: unable to execute /usr/lib/wsl/lib/nvidia-smi: No such file or directory

Linux returns no such file or directory if the shebang or link loader of a file/binary is not available. I think /usr/lib/wsl/lib/nvidia-smi needs patching to work on NixOS or must be started in a FHS.

I'm able to at least run it. It's a foreign binary (meaning non-nixos), so it probably doesn't find ld-linux.so. You can try setting up nix-ld to run it without patching
ZSH C:\Users\nzbr> /usr/lib/wsl/lib/nvidia-smi
NVIDIA-SMI couldn't find libnvidia-ml.so library in your system. Please make sure that the NVIDIA Display Driver is properly installed and present in your system.
Please also try adding directory that contains libnvidia-ml.so to your system PATH.

I can now confirm, that it should indeed work with nix-ld, when NIX_LD_LIBRARY_PATH=/usr/lib/wsl/lib is set

Thank you for investigating; with nix-ld enabled, and export NIX_LD=/lib64/ld-linux-x86-64.so.2 and NIX_LD_LIBRARY_PATH=/usr/lib/wsl/lib, nvidia-smi is giving me:
cannot execute nvidia-smi: mmap segment of /lib64/ld-linux-x86-64.so.2 failed:
[1]    3134 segmentation fault  nvidia-smi

However if I set up a barebones shell.nix with e.g.
with import <nixpkgs> {};
mkShell {
  NIX_LD_LIBRARY_PATH = lib.makeLibraryPath [
    stdenv.cc.cc
  ];
  NIX_LD = lib.fileContents "${stdenv.cc}/nix-support/dynamic-linker";
}

Then nvidia-smi will work inside that shell, since ld-linux-x86-64.so.2 is now being sourced from the Nix store and LD_LIBRARY_PATH points to the store as well. Could you please confirm whether this was the approach you took to get it working with nix-ld? (maybe via nix-alien/autobahn)
THanks

That's what I have in regards to nix-ld in my config
{
    programs.nix-ld.enable = true;
    environment.variables = {
      NIX_LD_LIBRARY_PATH = lib.makeLibraryPath [
        pkgs.stdenv.cc.cc
      ];
      NIX_LD = "${pkgs.glibc}/lib/ld-linux-x86-64.so.2";
    };
}

I can then run nvidia-smi like this
NIX_LD_LIBRARY_PATH=/usr/lib/wsl/lib/ /usr/lib/wsl/lib/nvidia-smi

That's helpful - thanks for sharing!

authors: SuperSandro2000 harryaskham nzbr

repo: nix-community/NixOS-WSL


text:
Improved nginx options

Added support for configuration nginx vhost directly in authentic without the need to add a separate entry in the nginx service. I've also added support for using wildcard/multiple domain certificates when using useACMEHost.
Breaking Changes:

forceSSL is not automatic set anymore if enableACME is set
recommendedTlsSettings inside the nginx service is not being automatically set anymore if enableACME is set

Future PRs:

I am currently evaluating if the proxy pass is needed to happen to the https port 9443 or if 9000 on http would be sufficient
I am also willing to upgrade this to 23.11 and therefor update postgres deprecations
Improvements/cleanup regarding package builds

Hey, thanks for the PR!
Without having looked at the changes yet, just a heads-up about your mentioned "Future PRs", I'm currently reworking the packaging approach to make individual components patchable, which is currently extremely inconvenient to accomplish.

Ok, ill wait with the packaging. But I'm still going to file other PR's after this, regarding the nix module.

Ok, I hope I've tested everything. The certificate is now appearing about one hour after setup in the webui. I may goging to improve the deprecation warnings to remote the current breaking changes.

@MarcelCoding, are you talking about the removal of forceSSL and recommendedTlsSettings?
I wonder why you want to remove those, and especially why do you think this would be a better default for all users of this flake.
Do you know that you might as well force these settings by
  services.nginx = {
    recommendedTlsSettings = lib.mkForce false;
    virtualHosts."your.host" = {
      forceSSL = lib.mkForce false;
    };
  };

Okay we could leave them as they are, but to me this seemed like a side effect so nginx. Especially the tls proxy settings. The other thing is more like a beauty thing. I deploy two reverse proxies and the first one directly behind authentic is listening on a non-443 port and therefore a https redirect is not necessary. This is handled by the front facing proxy. Yes I can force this to false. But the tls settings seems to me like an evil side effect.

Hmm, depends on the use case, i guess.
For my use case, it is convenient since it runs on a single machine with no other nginx hosts configured.
I can't tell what the most likely scenario of running authentik will be, so i'd rather stick with the initial settings to not break assumptions people already using this flake might have.

and how about recommendedTlsSettings?

Do they prevent you from running the proxy unsecured? I did not check thoroughly, but my guess would be they only do have an effect when connections are secured, and do not harm otherwise. And then i think, they represent NixOS best practice for running secured nginx hosts, more knowledgeable people than me have put their thoughts into and will keep them updated over time.
So, if this side effect really should turn out to be without effect, why bother?

I mean they change the global SSL configuration of nginx. But nvm I leave it as it was.

Now everything works as expected.

Does it for you? For me, if i build the config with vhost = { enableACME = true; };, it does no longer set forceSSL = true; like it did before.

That is what i was thinking as well, but it turns out that it still does not set forceSSL = true.
Module before changes:
nix eval ./\#nixosModules.default --json --impure --apply 'authentik:
let cfg = (import "${(builtins.getFlake "'$PWD'").inputs.nixpkgs}/nixos/lib/eval-config.nix" { modules = [authentik { config.services.authentik = { enable = true; nginx = { enable = true; host = "example.org"; enableACME = true; }; }; }]; }).config;
in cfg.services.nginx.virtualHosts."example.org".forceSSL'
true

Module after changes:
nix eval ./\#nixosModules.default --json --impure --apply 'authentik:
let cfg = (import "${(builtins.getFlake "'$PWD'").inputs.nixpkgs}/nixos/lib/eval-config.nix" { modules = [authentik { config.services.authentik = { enable = true; nginx = { enable = true; host = "example.org"; vhost.enableACME = true; }; }; }]; }).config;
in cfg.services.nginx.virtualHosts."example.org".forceSSL'
false

Somehow the default value of forceSSL (https://github.com/NixOS/nixpkgs/blob/nixos-23.11/nixos/modules/services/web-servers/nginx/vhost-options.nix#L163) is conflicting with my definition of forceSSL (https://github.com/nix-community/authentik-nix/pull/4/files#diff-d08d64ddbf5f8a384c8213d871167c6f55002970d7312c302b4bd441fafb5e8dR234). If I remove my mkDefault nix failed with a conflict. But I don't know what the default value is not handled as an actual default value but rather like a manual supplied value. This is probably how I imported the part form the nginx module. I will continue to investigate this.

Ok I fixed it, the default value is not treated as the default anymore as soon as you are using mkMerge or similar things.

authors: MarcelCoding WilliButz calbrecht

repo: nix-community/authentik-nix


text:
fix: import poetry2nix properly

I think overlays are the intended way to consume poetry2nix. flake.parts recommends consuming an overlay at the pkgs point.

Thanks for your PR! I moved your changes in #406 (can't pass the tests without that).

authors: lourkeur selfuryon


text:
github/update: refactor to use create-pull-request action

Refactor the update CI workflow to update the lock file and generated files and then create the PR in a subsequent step.
I added an action summary, which will link to the created/updated PR and describe what was done on the Action summary page.
I updated the generate script with a --commit option, when used the changes are committed, using a commit message that summaries the changes.
The created/updated PR will use the commit messages in its body to match what is done by DeterminateSystems/update-flake-lock.
Instead of a Personal Access Token, an SSH Deploy Key is now used (@GaetanLepage can you add this to the repo please?).
This means the PR can be created as github-actions[bot] and on: push events will still trigger.
NOTE: on: pull_request won't trigger, but this shouldn't affect us.
Old description

I haven't tested this yet (because testing CI workflows on a fork is painful).
@GaetanLepage We should also consider using SSH Deploy Keys instead of a PAT to work-around bot account PRs not triggering CI.
See https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs
I haven't included a PR body, because creating one with details of the commits is non-trivial. This isn't that important, but I left a TODO comment anyway.
I can remove the TODO if preferred.

I've now tested this on my fork.
See https://github.com/MattSturgeon/nixvim/actions/runs/9862728221 and https://github.com/MattSturgeon/nixvim/actions/runs/9862812497 for example runs.
This PR was created/updated by those runs.

@mergifyio queue

@mergifyio queue

repo: nix-community/nixvim


text:
Added error checking to Linux in case git clone fails

Just adds an if statement to the bash script to check if the directory exists after cloning. If it does not, it emits an error message saying that the clone failed.

@soapdog @spdegabrielle - anything either of you think should be added if this is gonna be in the Racket news for September?

I’m going to test on macOS!

I think it is good to go!

authors: nixin72 soapdog spdegabrielle


text:
Full Release Integration

Any code / configuration that needs to be written to get a working release version

DONE, http://sig-track.xyz

repo: njitacm/sig-track


text:
installation problem - omp.h: No such file or directory

Hi,
I'm trying to install pysrilm using cygwin
SRILM had already been compiled.
cmd output:
running install
running build
running build_ext
skipping 'srilm.cpp' Cython extension (up-to-date)
building 'srilm' extension
C:\Users\harashm\Anaconda\Scripts\gcc.bat -DMS_WIN64 -mdll -O -Wall -IC:\Users\harashm\cygwin\srilm-1.7.1\include -IC:\Users\harashm\Anaconda\include -IC:\Users\harashm\Anaconda\PC -c srilm.cpp -o build\temp.win-amd64-2.7\Release\srilm.o -fopenmp
srilm.cpp:239:17: fatal error: omp.h: No such file or directory
compilation terminated.
error: command 'C:\Users\harashm\Anaconda\Scripts\gcc.bat' failed with exit status 1
What could be the problem?
thanks a lot !

It looks like the Anaconda compiler has broken OpenMP support.
pysrilm doesn't actually need OpenMP support, we just request it b/c other people were reporting that their SRILM was getting compiled with OpenMP by default, and then trying to build pysrilm without OpenMP caused problems b/c of the mismatch.
So the easy thing to try would be to disable OpenMP support by editing setup.py and replacing ['-fopenmp'] with []. If that works, then great! If it doesn't... well, then paste your error and more details on how you compiled SRILM, I guess.

OK, it didn't work.
I'm running Win8, anaconda installed. I've compiled SRILM with cygwin, by typing: 'make World', 'make test' (didn't change anything)
I'm trying to install pysrilm with windows cmd.
After changing the setup.py file, I got this error:
C:\Users\harashm\cygwin# wrappers\pysrilm>python setup.py install
running install
running build
running build_ext
skipping 'srilm.cpp' Cython extension (up-to-date)
building 'srilm' extension
C:\Users\harashm\Anaconda\Scripts\gcc.bat -DMS_WIN64 -mdll -O -Wall -IC:\Users\h
arashm\cygwin\srilm-1.7.1\include -IC:\Users\harashm\Anaconda\include -IC:\Users
\harashm\Anaconda\PC -c srilm.cpp -o build\temp.win-amd64-2.7\Release\srilm.o
In file included from C:\Users\harashm\cygwin\srilm-1.7.1\include/Prob.h:20:0,
from C:\Users\harashm\cygwin\srilm-1.7.1\include/LM.h:25,
from C:\Users\harashm\cygwin\srilm-1.7.1\include/Ngram.h:16,
from srilm.cpp:236:
C:\Users\harashm\cygwin\srilm-1.7.1\include/Counts.h: In function 'const char* countToString(long long unsigned int)':
C:\Users\harashm\cygwin\srilm-1.7.1\include/Counts.h:69:37: warning: unknown conversion type character 'l' in format [-Wformat]
C:\Users\harashm\cygwin\srilm-1.7.1\include/Counts.h:69:37: warning: too many arguments for format [-Wformat-extra-args]
C:\Users\harashm\cygwin\srilm-1.7.1\include/Counts.h: In function 'Boolean stringToCount(const char*, long long unsigned int&)':
C:\Users\harashm\cygwin\srilm-1.7.1\include/Counts.h:126:54: warning: unknown co
nversion type character 'l' in format [-Wformat]
C:\Users\harashm\cygwin\srilm-1.7.1\include/Counts.h:126:54: warning: too many arguments for format [-Wformat-extra-args]
srilm.cpp: In function 'void __Pyx_RaiseArgtupleInvalid(const char*, int, Py_ssize_t, Py_ssize_t, Py_ssize_t)':
srilm.cpp:3053:59: warning: unknown conversion type character 'z' in format [-Wformat]
srilm.cpp:3053:59: warning: format '%s' expects argument of type 'char*', but argument 5 has type 'Py_ssize_t {aka long long int}' [-Wformat]
srilm.cpp:3053:59: warning: unknown conversion type character 'z' in format [-Wformat]
srilm.cpp:3053:59: warning: too many arguments for format [-Wformat-extra-args]
writing build\temp.win-amd64-2.7\Release\srilm.def
C:\Users\harashm\Anaconda\Scripts\g++.bat -DMS_WIN64 -shared -s build\temp.win-a
md64-2.7\Release\srilm.o build\temp.win-amd64-2.7\Release\srilm.def -LC:\Users\h
arashm\Anaconda\libs -LC:\Users\harashm\Anaconda\PCbuild\amd64 -loolm -ldstruct
-lmisc -lpython27 -lmsvcr90 -o build\lib.win-amd64-2.7\srilm.pyd
c:/users/harashm/anaconda/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../..
/../x86_64-w64-mingw32/bin/ld.exe: cannot find -loolm
c:/users/harashm/anaconda/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../..
/../x86_64-w64-mingw32/bin/ld.exe: cannot find -ldstruct
c:/users/harashm/anaconda/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../..
/../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmisc
collect2.exe: error: ld returned 1 exit status
error: command 'C:\Users\harashm\Anaconda\Scripts\g++.bat' failed with exit status 1
I've tried different 'extra_link_args':
extra_link_args=["-L" + SRILM_LIB_DIR, "-liconv"],
and
extra_link_args=["-L" + SRILM_LIB_DIR, '-lgomp', '-lz'],
and another try without this line, didn't work :(
I feel I'm doing something wrong.
Do you have any idea?

Ah... sorry, yeah, this isn't going to work the way you're trying it.
Windows gets very cranky about mixing compilers -- generally you have to
use the same compiler for everything. And this is especially true for
Cygwin, which acts almost like a separate operating system from the rest if
windows. So I think you need to either compile srilm with anaconda's
compiler, or else switch from anaconda python to cygwin python.
On 24 Jan 2015 19:53, "harashm" notifications@github.com wrote:

OK, it didn't work.
I'm running Win8, anaconda installed. I've compiled SRILM with cygwin, by
typing: 'make World', 'make test' (didn't change anything)
I'm trying to install pysrilm with windows cmd.
After changing the setup.py file, I got this error:
C:\Users\harashm\cygwin# wrappers\pysrilm>python setup.py install
running install
running build
running build_ext
skipping 'srilm.cpp' Cython extension (up-to-date)
building 'srilm' extension
C:\Users\harashm\Anaconda\Scripts\gcc.bat -DMS_WIN64 -mdll -O -Wall
-IC:\Users\h
arashm\cygwin\srilm-1.7.1\include -IC:\Users\harashm\Anaconda\include
-IC:\Users
\harashm\Anaconda\PC -c srilm.cpp -o
build\temp.win-amd64-2.7\Release\srilm.o
In file included from
C:\Users\harashm\cygwin\srilm-1.7.1\include/Prob.h:20:0,
from C:\Users\harashm\cygwin\srilm-1.7.1\include/LM.h:25,
from C:\Users\harashm\cygwin\srilm-1.7.1\include/Ngram.h:16,
from srilm.cpp:236:
C:\Users\harashm\cygwin\srilm-1.7.1\include/Counts.h: In function 'const
char* countToString(long long unsigned int)':
C:\Users\harashm\cygwin\srilm-1.7.1\include/Counts.h:69:37: warning:
unknown conversion type character 'l' in format [-Wformat]
C:\Users\harashm\cygwin\srilm-1.7.1\include/Counts.h:69:37: warning: too
many arguments for format [-Wformat-extra-args]
C:\Users\harashm\cygwin\srilm-1.7.1\include/Counts.h: In function 'Boolean
stringToCount(const char
, long long unsigned int&)':
C:\Users\harashm\cygwin\srilm-1.7.1\include/Counts.h:126:54: warning:
unknown co nversion type character 'l' in format [-Wformat]
C:\Users\harashm\cygwin\srilm-1.7.1\include/Counts.h:126:54: warning: too
many arguments for format [-Wformat-extra-args] srilm.cpp: In function
'void __Pyx_RaiseArgtupleInvalid(const char, int, Py_ssize_t,
Py_ssize_t, Py_ssize_t)':
srilm.cpp:3053:59: warning: unknown conversion type character 'z' in
format [-Wformat]
srilm.cpp:3053:59: warning: format '%s' expects argument of type 'char*',
but argument 5 has type 'Py_ssize_t {aka long long int}' [-Wformat]
srilm.cpp:3053:59: warning: unknown conversion type character 'z' in
format [-Wformat]
srilm.cpp:3053:59: warning: too many arguments for format
[-Wformat-extra-args]
writing build\temp.win-amd64-2.7\Release\srilm.def
C:\Users\harashm\Anaconda\Scripts\g++.bat -DMS_WIN64 -shared -s
build\temp.win-a
md64-2.7\Release\srilm.o build\temp.win-amd64-2.7\Release\srilm.def
-LC:\Users\h
arashm\Anaconda\libs -LC:\Users\harashm\Anaconda\PCbuild\amd64 -loolm
-ldstruct
-lmisc -lpython27 -lmsvcr90 -o build\lib.win-amd64-2.7\srilm.pyd
c:/users/harashm/anaconda/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../..
/../x86_64-w64-mingw32/bin/ld.exe: cannot find -loolm
c:/users/harashm/anaconda/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../..
/../x86_64-w64-mingw32/bin/ld.exe: cannot find -ldstruct
c:/users/harashm/anaconda/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../..
/../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmisc
collect2.exe: error: ld returned 1 exit status
error: command 'C:\Users\harashm\Anaconda\Scripts\g++.bat' failed with
exit status 1
I've tried different 'extra_link_args':
extra_link_args=["-L" + SRILM_LIB_DIR, "-liconv"],
and
extra_link_args=["-L" + SRILM_LIB_DIR, '-lgomp', '-lz'],
and another try without this line, didn't work :(
I feel I'm doing something wrong.
Do you have any idea?
—
Reply to this email directly or view it on GitHub
https://github.com/njsmith/pysrilm/issues/5#issuecomment-71334379.

authors: harashm njsmith

repo: njsmith/pysrilm


text:
AdaDM

Sorry to disturb you. I didn't find AdaDM related modules in the code. What part of the code does AdaDM embody？

https://github.com/njulj/AdaDM/blob/7777bf000fb341720c8896acf087e5837858edc6/src/model/common.py#L65

Thank you very much

repo: njulj/AdaDM


text:
multiple servers support

Is it possible to connect to multiple servers? if yes what's the maximum number of connections?

Any other alternatives that works with arduino?

Nothing i know, but you can use esp-idf commands.

How? should I just include the esp-idf headers?

There is SimplBLE example, start with it. im guessing esp_bt.h header will be usable at beggining.
I will try to find some time and add multi-connection support to this library, but its quite a lot code to write i think (server and client part, notify/indicate etc).

Thanks a lot :)

What about this pull request?(the multiple client support part)

Like i said, there is a lot things to consider and some code needs to be re-thinked and changed. This is just example:
https://github.com/nkolban/esp32-snippets/pull/541/files#diff-6b48b04d9f9202e7dc8114b588e968baR98
Now on each connection to server service table is cleared, but it wont work with multi-connecting. This needs to be moved into disconnect part. This is not considered in that pull request and many more very important things. I have to review whole code again and make some plan first.

@mangooose I have some code ready, it was much simpler than i thought, but of course it requires some more tests in real life before can be used (i tested it with 2 esp32 servers and 1 esp32 client). Here is log:
D (28776) SampleClient_Notify: Notify callback for characteristic 00002a2b-0000-1000-8000-00805f9b34fb of data length 1
D (29089) BLEDevice: gattClientEventHandler [esp_gatt_if: 4] ... ESP_GATTC_NOTIFY_EVT
D (29090) BLEUtils: GATT Event: ESP_GATTC_NOTIFY_EVT
D (29091) BLEUtils: [conn_id: 1, remote_bda: 30:ae:a4:3f:24:4e, handle: 42 0x2a, value_len: 1, is_notify: 1]
D (29101) BLERemoteCharacteristic: Invoking callback for notification on characteristic Characteristic: uuid: 00002a2b-0000-1000-8000-00805f9b34fb, handle: 42 0x2a, props: broadcast: 0, read: 1, write_nr: 0, write: 1, notify: 1, indicate: 1, auth: 0
D (29123) SampleClient_Notify: Notify callback for characteristic 00002a2b-0000-1000-8000-00805f9b34fb of data length 1
D (29674) BLEDevice: gattClientEventHandler [esp_gatt_if: 4] ... ESP_GATTC_NOTIFY_EVT
D (29675) BLEUtils: GATT Event: ESP_GATTC_NOTIFY_EVT
D (29676) BLEUtils: [conn_id: 1, remote_bda: 30:ae:a4:3f:24:4e, handle: 42 0x2a, value_len: 1, is_notify: 1]
D (29686) BLERemoteCharacteristic: Invoking callback for notification on characteristic Characteristic: uuid: 00002a2b-0000-1000-8000-00805f9b34fb, handle: 42 0x2a, props: broadcast: 0, read: 1, write_nr: 0, write: 1, notify: 1, indicate: 1, auth: 0
D (29708) SampleClient_Notify: Notify callback for characteristic 00002a2b-0000-1000-8000-00805f9b34fb of data length 1
D (29822) BLEDevice: gattClientEventHandler [esp_gatt_if: 3] ... ESP_GATTC_NOTIFY_EVT
D (29823) BLEUtils: GATT Event: ESP_GATTC_NOTIFY_EVT
D (29824) BLEUtils: [conn_id: 0, remote_bda: 30:ae:a4:43:a1:72, handle: 42 0x2a, value_len: 1, is_notify: 1]
D (29834) BLERemoteCharacteristic: Invoking callback for notification on characteristic Characteristic: uuid: 00002a2b-0000-1000-8000-00805f9b34fb, handle: 42 0x2a, props: broadcast: 0, read: 1, write_nr: 0, write: 1, notify: 1, indicate: 1, auth: 0
D (29856) SampleClient_Notify: Notify callback for characteristic 00002a2b-0000-1000-8000-00805f9b34fb of data length 1
D (30259) BLEDevice: gattClientEventHandler [esp_gatt_if: 4] ... ESP_GATTC_NOTIFY_EVT
D (30260) BLEUtils: GATT Event: ESP_GATTC_NOTIFY_EVT
D (30261) BLEUtils: [conn_id: 1, remote_bda: 30:ae:a4:3f:24:4e, handle: 42 0x2a, value_len: 1, is_notify: 1]
D (30271) BLERemoteCharacteristic: Invoking callback for notification on characteristic Characteristic: uuid: 00002a2b-0000-1000-8000-00805f9b34fb, handle: 42 0x2a, props: broadcast: 0, read: 1, write_nr: 0, write: 1, notify: 1, indicate: 1, auth: 0
D (30293) SampleClient_Notify: Notify callback for characteristic 00002a2b-0000-1000-8000-00805f9b34fb of data length 1
D (30844) BLEDevice: gattClientEventHandler [esp_gatt_if: 4] ... ESP_GATTC_NOTIFY_EVT
D (30845) BLEUtils: GATT Event: ESP_GATTC_NOTIFY_EVT
D (30846) BLEUtils: [conn_id: 1, remote_bda: 30:ae:a4:3f:24:4e, handle: 42 0x2a, value_len: 1, is_notify: 1]
D (30856) BLERemoteCharacteristic: Invoking callback for notification on characteristic Characteristic: uuid: 00002a2b-0000-1000-8000-00805f9b34fb, handle: 42 0x2a, props: broadcast: 0, read: 1, write_nr: 0, write: 1, notify: 1, indicate: 1, auth: 0
D (30878) SampleClient_Notify: Notify callback for characteristic 00002a2b-0000-1000-8000-00805f9b34fb of data length 1
D (30917) BLEDevice: gattClientEventHandler [esp_gatt_if: 3] ... ESP_GATTC_NOTIFY_EVT
D (30918) BLEUtils: GATT Event: ESP_GATTC_NOTIFY_EVT
D (30919) BLEUtils: [conn_id: 0, remote_bda: 30:ae:a4:43:a1:72, handle: 42 0x2a, value_len: 1, is_notify: 1]
D (30929) BLERemoteCharacteristic: Invoking callback for notification on characteristic Characteristic: uuid: 00002a2b-0000-1000-8000-00805f9b34fb, handle: 42 0x2a, props: broadcast: 0, read: 1, write_nr: 0, write: 1, notify: 1, indicate: 1, auth: 0
D (30951) SampleClient_Notify: Notify callback for characteristic 00002a2b-0000-1000-8000-00805f9b34fb of data length 1
D (31429) BLEDevice: gattClientEventHandler [esp_gatt_if: 4] ... ESP_GATTC_NOTIFY_EVT
D (31430) BLEUtils: GATT Event: ESP_GATTC_NOTIFY_EVT
D (31431) BLEUtils: [conn_id: 1, remote_bda: 30:ae:a4:3f:24:4e, handle: 42 0x2a, value_len: 1, is_notify: 1]
D (31441) BLERemoteCharacteristic: Invoking callback for notification on characteristic Characteristic: uuid: 00002a2b-0000-1000-8000-00805f9b34fb, handle: 42 0x2a, props: broadcast: 0, read: 1, write_nr: 0, write: 1, notify: 1, indicate: 1, auth: 0
D (31463) SampleClient_Notify: Notify callback for characteristic 00002a2b-0000-1000-8000-00805f9b34fb of data length 1
D (31997) BLEDevice: gattClientEventHandler [esp_gatt_if: 3] ... ESP_GATTC_NOTIFY_EVT
D (31998) BLEUtils: GATT Event: ESP_GATTC_NOTIFY_EVT
D (31999) BLEUtils: [conn_id: 0, remote_bda: 30:ae:a4:43:a1:72, handle: 42 0x2a, value_len: 1, is_notify: 1]
D (32009) BLERemoteCharacteristic: Invoking callback for notification on characteristic Characteristic: uuid: 00002a2b-0000-1000-8000-00805f9b34fb, handle: 42 0x2a, props: broadcast: 0, read: 1, write_nr: 0, write: 1, notify: 1, indicate: 1, auth: 0
D (32031) SampleClient_Notify: Notify callback for characteristic 00002a2b-0000-1000-8000-00805f9b34fb of data length 1
D (32042) BLEDevice: gattClientEventHandler [esp_gatt_if: 4] ... ESP_GATTC_NOTIFY_EVT
D (32050) BLEUtils: GATT Event: ESP_GATTC_NOTIFY_EVT
D (32055) BLEUtils: [conn_id: 1, remote_bda: 30:ae:a4:3f:24:4e, handle: 42 0x2a, value_len: 1, is_notify: 1]
D (32065) BLERemoteCharacteristic: Invoking callback for notification on characteristic Characteristic: uuid: 00002a2b-0000-1000-8000-00805f9b34fb, handle: 42 0x2a, props: broadcast: 0, read: 1, write_nr: 0, write: 1, notify: 1, indicate: 1, auth: 0
D (32087) SampleClient_Notify: Notify callback for characteristic 00002a2b-0000-1000-8000-00805f9b34fb of data length 1
D (32599) BLEDevice: gattClientEventHandler [esp_gatt_if: 4] ... ESP_GATTC_NOTIFY_EVT
D (32600) BLEUtils: GATT Event: ESP_GATTC_NOTIFY_EVT
D (32601) BLEUtils: [conn_id: 1, remote_bda: 30:ae:a4:3f:24:4e, handle: 42 0x2a, value_len: 1, is_notify: 1]
D (32611) BLERemoteCharacteristic: Invoking callback for notification on characteristic Characteristic: uuid: 00002a2b-0000-1000-8000-00805f9b34fb, handle: 42 0x2a, props: broadcast: 0, read: 1, write_nr: 0, write: 1, notify: 1, indicate: 1, auth: 0
D (32633) SampleClient_Notify: Notify callback for characteristic 00002a2b-0000-1000-8000-00805f9b34fb of data length 1
D (33077) BLEDevice: gattClientEventHandler [esp_gatt_if: 3] ... ESP_GATTC_NOTIFY_EVT
D (33078) BLEUtils: GATT Event: ESP_GATTC_NOTIFY_EVT
D (33079) BLEUtils: [conn_id: 0, remote_bda: 30:ae:a4:43:a1:72, handle: 42 0x2a, value_len: 1, is_notify: 1]
D (33089) BLERemoteCharacteristic: Invoking callback for notification on characteristic Characteristic: uuid: 00002a2b-0000-1000-8000-00805f9b34fb, handle: 42 0x2a, props: broadcast: 0, read: 1, write_nr: 0, write: 1, notify: 1, indicate: 1, auth: 0
D (33111) SampleClient_Notify: Notify callback for characteristic 00002a2b-0000-1000-8000-00805f9b34fb of data length 1
D (33184) BLEDevice: gattClientEventHandler [esp_gatt_if: 4] ... ESP_GATTC_NOTIFY_EVT
D (33185) BLEUtils: GATT Event: ESP_GATTC_NOTIFY_EVT
D (33186) BLEUtils: [conn_id: 1, remote_bda: 30:ae:a4:3f:24:4e, handle: 42 0x2a, value_len: 1, is_notify: 1]
D (33196) BLERemoteCharacteristic: Invoking callback for notification on characteristic Characteristic: uuid: 00002a2b-0000-1000-8000-00805f9b34fb, handle: 42 0x2a, props: broadcast: 0, read: 1, write_nr: 0, write: 1, notify: 1, indicate: 1, auth: 0
D (33218) SampleClient_Notify: Notify callback for characteristic 00002a2b-0000-1000-8000-00805f9b34fb of data length 1
D (33769) BLEDevice: gattClientEventHandler [esp_gatt_if: 4] ... ESP_GATTC_NOTIFY_EVT
D (33770) BLEUtils: GATT Event: ESP_GATTC_NOTIFY_EVT
D (33771) BLEUtils: [conn_id: 1, remote_bda: 30:ae:a4:3f:24:4e, handle: 42 0x2a, value_len: 1, is_notify: 1]
D (33781) BLERemoteCharacteristic: Invoking callback for notification on characteristic Characteristic: uuid: 00002a2b-0000-1000-8000-00805f9b34fb, handle: 42 0x2a, props: broadcast: 0, read: 1, write_nr: 0, write: 1, notify: 1, indicate: 1, auth: 0

Explanation:

one server is sending notification every 500ms and one server is sending notification every 100ms,
here is client app i am using for testing:

/**
 * Create a sample BLE client that connects to a BLE server and then waits for server generated
 * notifications and logs them when they arrive.
 */
#include <esp_log.h>
#include <string>
#include <sstream>
#include <sys/time.h>
#include "BLEDevice.h"

#include "BLEAdvertisedDevice.h"
#include "BLEClient.h"
#include "BLEScan.h"
#include "BLEUtils.h"
#include "Task.h"

#include "sdkconfig.h"

static const char* LOG_TAG = "SampleClient_Notify";

// See the following for generating UUIDs:
// https://www.uuidgenerator.net/

BLEScan *pBLEScan;
static uint16_t connID = 0;

static void notifyCallback(
	BLERemoteCharacteristic* pBLERemoteCharacteristic,
	uint8_t* pData,
	size_t length,
	bool isNotify) {
		ESP_LOGD(LOG_TAG, "Notify callback for characteristic %s of data length %d",
				pBLERemoteCharacteristic->getUUID().toString().c_str(), length);
}

/**
 * Become a BLE client to a remote BLE server.  We are passed in the address of the BLE server
 * as the input parameter when the task is created.
 */
class MyClient: public Task {
	void run(void* data) {
		BLEAddress* pAddress = (BLEAddress*)data;
		BLEClient*  pClient  = BLEDevice::createClient(connID++);

		// Connect to the remove BLE Server.
		pClient->connect(*pAddress);

		// Obtain a reference to the service we are after in the remote BLE server.
		BLERemoteService* pRemoteService = pClient->getService(BLEUUID((uint16_t)0x1805));
		if (pRemoteService == nullptr) {
			ESP_LOGD(LOG_TAG, "Failed to find our service UUID: %s", BLEUUID((uint16_t)0x1805).toString().c_str());
			return;
		}

		// Obtain a reference to the characteristic in the service of the remote BLE server.
		BLERemoteCharacteristic* pRemoteCharacteristic = pRemoteService->getCharacteristic(BLEUUID((uint16_t)0x2a2b));
		if (pRemoteCharacteristic == nullptr) {
			ESP_LOGD(LOG_TAG, "Failed to find our characteristic UUID: %s", BLEUUID((uint16_t)0x2a2b).toString().c_str());
			return;
		}

		// Read the value of the characteristic.
		// std::string value = pRemoteCharacteristic->readValue();
		// ESP_LOGD(LOG_TAG, "The characteristic value was: %s", value.c_str());

		pRemoteCharacteristic->registerForNotify(notifyCallback);

		ESP_LOGD(LOG_TAG, "%s", pClient->toString().c_str());
		ESP_LOGD(LOG_TAG, "-- End of task");

		pBLEScan->start(3);
	} // run
}; // MyClient

/**
 * Scan for BLE servers and find the first one that advertises the service we are looking for.
 */
class MyAdvertisedDeviceCallbacks: public BLEAdvertisedDeviceCallbacks {
	/**
	 * Called for each advertising BLE server.
	 */
	void onResult(BLEAdvertisedDevice advertisedDevice) {
		ESP_LOGD(LOG_TAG, "Advertised Device: %s", advertisedDevice.toString().c_str());

		if (advertisedDevice.haveServiceUUID() && advertisedDevice.isAdvertisingService(BLEUUID((uint16_t)0x1805))) {
			advertisedDevice.getScan()->stop();

			ESP_LOGD(LOG_TAG, "Found our device!  address: %s", advertisedDevice.getAddress().toString().c_str());
			MyClient* pMyClient = new MyClient();
			pMyClient->setStackSize(20000);
			pMyClient->start(new BLEAddress(*advertisedDevice.getAddress().getNative()));
		} // Found our server
	} // onResult
}; // MyAdvertisedDeviceCallbacks

/**
 * Perform the work of a sample BLE client.
 */
void SampleClient_Notify(void) {
	ESP_LOGD(LOG_TAG, "SampleClient_Notify starting");
	BLEDevice::init("esp32");
	pBLEScan = BLEDevice::getScan();
	pBLEScan->setAdvertisedDeviceCallbacks(new MyAdvertisedDeviceCallbacks());
	pBLEScan->setActiveScan(true);
	pBLEScan->start(3);
} // SampleClient

I will push it to my github now and if will pass tests i will create PR, if you want to use it with arduino-ide then you need to prepare zip file or copy/paste modified files.

@chegewara  Thanks for your quick reply :) I will try it today and give you feedback

But i have to warn you its not finished yet, but i have no tools/examples to perform full tests and see what is missing.

@chegewara I just updated the files and made a quick sketch to test it and i'm still not able to connect to multiple servers. Here's my code:
    pClient1 = BLEDevice::createClient(0);
    pClient1->connect(*pServerAddress[0]);
    Serial.println("1 connected");
    BLERemoteCharacteristic* pRemoteCharacteristic1 =  pClient1->getService(ServiceUUID)->getCharacteristic(charUUID);

    pClient2 = BLEDevice::createClient(1);
    pClient2->connect(*pServerAddress[1]);
    Serial.println("2 connected");
    BLERemoteCharacteristic* pRemoteCharacteristic2 =  pClient2->getService(ServiceUUID)->getCharacteristic(charUUID);
    delay(1000);

    pRemoteCharacteristic1->writeValue((uint8_t*)x, 7, true);
    Serial.println("color1 changed");
    pRemoteCharacteristic2->writeValue((uint8_t*)x, 7, true);
    Serial.println("color2 changed");

last thing it shows is "2 connected"

@mangooose This looks like code stuck somewhere on semaphore.
You can try and change this line:
if (advertisedDevice.haveServiceUUID() && advertisedDevice.isAdvertisingService(BLEUUID((uint16_t)0x1805))) {
with:
if (strcmp(advertisedDevice.getAddress().toString(), "aa:aa:aa:aa:aa:aa")) {
or something like that.

Currently I don't have enough ESP32 to test with your example. On my example, I search for new BLE devices this a specific serviceUUID and then I try to connect with these devices. The first device can connect and can also change characteristics value. But when I connect to more than one device it can connect but hangs when I try to change the RemoteCharacteristic value.

Thats ok, you can change service and char uuids to match your devices.

unfortunately still doesn't work :(

Im not sure it has to be strcmp or strncmp and aa:aa:aa:aa:aa:aa is pServerAddress[0].toString().
Maybe there is some glitch in this library that your code found but my example is not finding it or maybe its some glitch with your code.

I added disconnect support on my PR. It uses the existing disconnect function which unregisters the application from GATTC. It then goes ahead and removes the entry from the map.

@chegewara any reason why you removed multiple servers support?

@mangooose just by accident, i have this on my list ToDo anyway, so it should be added shortly

@mangooose I have new, better support for multiple client to one esp32 server if you are interested.

It is on github already, but after 2 days i can say its more like sandbox or testing library. When i tested it 2 days ago it was working really nice, but since then i feel like amator. There is few bugs and few issues i cant fix.
If you want to give it a try and maybe tell me what do you think about it then you are welcome:
https://github.com/chegewara/esp32-snippets-enchancements-test/tree/multi_connect_test

Thanks for your kind gesture @chegewara, you're really hardworking person. Thanks once again for your time and efforts to keep this forum going.
I will check it out and give it a try this coming weekend.
I will also let you know my outcome as regards my testing.

I would like to say that we are ready for multi connectivity beta tests:
https://github.com/chegewara/esp32-snippets-enchancements-test/tree/multi_connect_test

@chegewara : I'm trying to use your test. Which version of esp-idf did you use? When I try to compile my project, I get this compile-errors:
CXX build/cpp_utils/BLEClient.o
/Users/user/esp/project/components/cpp_utils/BLEClient.cpp: In member function 'void BLEClient::gattClientEventHandler(esp_gattc_cb_event_t, esp_gatt_if_t, esp_ble_gattc_cb_param_t*)':
/Users/user/esp/project/components/cpp_utils/BLEClient.cpp:227:27: error: 'struct esp_ble_gattc_cb_param_t::gattc_search_cmpl_evt_param' has no member named 'searched_service_source'
    if(p_data->search_cmpl.searched_service_source == ESP_GATT_SERVICE_FROM_REMOTE_DEVICE) {
                           ^
/Users/user/esp/project/components/cpp_utils/BLEClient.cpp:227:54: error: 'ESP_GATT_SERVICE_FROM_REMOTE_DEVICE' was not declared in this scope
    if(p_data->search_cmpl.searched_service_source == ESP_GATT_SERVICE_FROM_REMOTE_DEVICE) {
                                                      ^
/Users/user/esp/project/components/cpp_utils/BLEClient.cpp:229:35: error: 'struct esp_ble_gattc_cb_param_t::gattc_search_cmpl_evt_param' has no member named 'searched_service_source'
    } else if (p_data->search_cmpl.searched_service_source == ESP_GATT_SERVICE_FROM_NVS_FLASH) {
                                   ^
/Users/user/esp/project/components/cpp_utils/BLEClient.cpp:229:62: error: 'ESP_GATT_SERVICE_FROM_NVS_FLASH' was not declared in this scope
    } else if (p_data->search_cmpl.searched_service_source == ESP_GATT_SERVICE_FROM_NVS_FLASH) {
                                                              ^
/Users/user/esp/project/components/cpp_utils/BLEClient.cpp: At global scope:
/Users/user/esp/project/components/cpp_utils/BLEClient.cpp:46:20: warning: 'LOG_TAG' defined but not used [-Wunused-variable]
 static const char* LOG_TAG = "BLEClient";
                    ^
make[1]: *** [BLEClient.o] Error 1
make: *** [component-cpp_utils-build] Error 2

Did I do something wrong?

I am always on master branch, you did nothing wrong. There is few flags to work with bluetooth data in nvs cache and you are missing those flags. You can find it in BLEClient.cpp and just comment out, its only logging.
ESP_GATT_SERVICE_FROM_REMOTE_DEVICE
ESP_GATT_SERVICE_FROM_NVS_FLASH

Thank you sir! I'll try now and give you feedback 👍

Implemented in latest version.

@chegewara Is your code (https://github.com/chegewara/esp32-snippets-enchancements-test/tree/multi_connect_test) still available?

Sorry, code has been merged to this library and is no longer available. Since then some code has been changed too, many bugfixes that still were in my repository.

@chegewara But is possible connect 2 servers with a client with this library? If not.. could you share again your solution?

As far as i know it should be possible, if you have problems let me know.

@chegewara It worked.. but not always.. I think that I did something wrong.

@epanta , @chegewara  excuse me how do you get the code  (https://github.com/chegewara/esp32-snippets-enchancements-test/tree/multi_connect_test) ?

hi @schmidtb89
this repository is no longer available, but it was merged to this master

authors: Donderda Olaclemmy chegewara epanta mangooose nsamala schmidtb89


text:
Cleaning up the translate package

Refactoring "candidate" as "hypothesis" in bleu_score.py

In the literature, it's more common to refer to machine translated sentences as hypothesis instead of candidate.
candidate vs hypothesis is a technical term difference but this should be kept consistent with the variable names used in https://github.com/nltk/nltk/blob/develop/nltk/translate/stack_decoder.py

Refactoring "test" as "hypothesis in metrics.py

Using the consistent term "hypothesis" to refer to automatic alignment or machine translation

Rearrange all the parameter orders for MT metrics to suit nltk.metrics

Reordered all the param to keep the order of func(references, hypothesis, **kwargs) consistent with functions in nltk.metrics (Note: references is a list of references and if there's only one reference, explicitly casting to list is necessary).

Another thing to clean up is to move PhraseTable class into translate.api but because of the use of namedtuple. I'm not sure what is the pythonic way to put it in api.py.
Would it be:

create a duck class for the PhraseTableEntry namedtuple?
create a proper class for  PhraseTableEntry?

I'm done with the cleaning up for some of these translate modules.
Note: The BLEU doctest and unittest is similar but I think redundancy is good for testing.

Thanks @alvations

@alvations – please note that there's a couple of housekeeping issues reported on the CI server https://nltk.ci.cloudbees.com/job/nltk/lastCompletedBuild/testReport/

authors: alvations stevenbird

repo: nltk/nltk


text:
Update ThirdPartyRelationshipAttribute nomenclature

Readiness checklist

[x] I added/updated tests.
[x] I ensured that the PR title is good enough for the changelog.
[x] I labeled the PR.

@jkoenig134 Should we also keep a deprecated function deleteThirdPartyOwnedRelationshipAttributeAndNotifyPeer in addition to the new function deleteThirdPartyRelationshipAttributeAndNotifyPeer in the AttributesFacade for backwards compatibility?

If one calls the other one, why not :)

repo: nmshd/runtime


text:
tox: Fix pylint test

The tox will try to compile pygobject which does not required for
pylint.
Remove the dependency install for pylint.

I don't know why suddenly the CI failed without changes to tox. The only moving part is the pip might install new version of something.

repo: nmstate/nmstate


text:
Chrome V49 won't update changed img src with backface-visibility: hidden

We spotted that the latest V49 version of Chrome causes any changes to an  src attribute with backface-visibility set to hidden not to render the new image (i.e. it shows it's originally set image src, even though the src is changes in the DOM). This is a change which only occurred in Chrome 49, and I'd argue it's a bug in the browser, but to fix it I have had to wrap the code which sets backface-visibility to only operate when the browser's not Chrome.
            var isChrome = !!window.chrome && !!window.chrome.webstore;
            if (!isChrome) {
                faces.find('*').css({
                    "backface-visibility": "hidden"
                });
            }

This code is clearly put in for good reason, so I've not sent this in as a pull request. Maybe the find should be something like :not(img), if it's needed for other elements only?

I ran into the same issue, but this fix didn't quite work.  The solution that worked for me was to do make the backface visible like this:
$(element).css({"backface-visibility": "visible"});
Then attach a load event to the image element, which does this after the image has loaded:
$(element).css({"backface-visibility": "hidden"});
Then change the image src.  Because the backface is visible during the load Chrome will redraw with the new image.

Can the issue please be reproduced in a jsfiddle perhaps?

Same issue on chrome 55 too

authors: JemarJones aaronberg himrocks mrtree1

repo: nnattawat/flip