 It seems that this is too small a number, even when the test is marked as flaky. Ideally, something like "wait until file is written" or "wait until child vim is waiting for keystrokes again" would be used instead of a hardcoded length of time, but I understand this is not always possible.
Perhaps it would be desirable to increase this delay? I understand that this has an effect on test suite speed, but if the tests are always looped due to flakiness, maybe this would help reduce that, and as a result speed the test suite up?

 It seems that this is too small a number, even when the
test is marked as flaky. Ideally, something like "wait until file is
written" or "wait until child vim is waiting for keystrokes again" would be
used instead of a hardcoded length of time, but I understand this is not
always possible.
Perhaps it would be desirable to increase this delay? I understand that
this has an effect on test suite speed, but if the tests are always looped
due to flakiness, maybe this would help reduce that, and as a result speed
the test suite up?

Can you try changing the term_wait() calls to TermWait() in
test_autocmd.vim and test_terminal3.vim
and check whether that fixes this problem?
Thanks,
Yegappan

I am currently running 10 back-to-back builds to test your suggested change. Though, the above commit only resolves this partially, right?

Hi,
On Thu, Aug 20, 2020 at 12:14 PM Jakub Kądziołka<EMAIL_ADDRESS>wrote:

It seems that replacing term_wait with TermWait does indeed fix this
issue. A quick grep suggests that term_wait is being used in some other
tests - maybe it would be worth it to phase it out entirely?

All the term_wait() calls are changed to TermWait() in 8.2.1498.

Yegappan


Going the other direction

Hi, I want to use this package to inline svgs with Webpack asset modules.
When I render them, though, I want to take the data URI and convert it back to plain SVG data so I can dangerouslySetInnerHTML. This way I can control things like the fill color with CSS.
Any suggestions on how to achieve that?

Nvm, react-inlinesvg does this for me:
<InlineSVG src={src} />

src can be literally anything, including a remote URL or a data URI. Very nice. Thanks for this nice script.

Nice to see you found a solution. If you or anyone else viewing this issue are curious how to do it vanilla, I’m pretty sure reversing the output is doable through decodeURIComponent().


[Feature]: Sorting / filtering / paging

New feature you are looking for
Add sorting / filtering / anything else
Any additional context or links?
Figure out global search

Options

React-table-library - https://react-table-library.com
Tanstack - https://tanstack.com/table/v8/docs/framework/react/guide/table-state
Rsuite - https://rsuitejs.com/en/components/table/
Data Grid - https://mui.com/x/react-data-grid/filtering/quick-filter/

More resources
https://muhimasri.com/blogs/react-editable-table/


Error

librealsense
2.40.0 RELEASE

OS
Windows

Intel RealSense Viewer / Depth Quality Tool has crashed with the following error message:
Program terminated due to an unrecoverable SEH exception:
Illegal CPU instruction!
Possibly newer CPU architecture is required

Hi @AkisouMa-Young  I hope that the link below will answer your question about this error mesage.
https://github.com/IntelRealSense/librealsense/issues/7080#issuecomment-671807292
The solution is to use the standalone Intel.RealSense.Viewer.exe version of the RealSense Viewer that can be downloaded from the Assets file list on the Releases page. Once downloaded, this file should be launched with a double-leftclick from the folder location that it was downloaded to (not with the Viewer launch shortcut on the Windows desktop).
https://github.com/IntelRealSense/librealsense/releases/tag/v2.40.0

Hi @AkisouMa-Young  I hope that the link below will answer your question about this error mesage.
https://github.com/IntelRealSense/librealsense/issues/7080#issuecomment-671807292
The solution is to use the standalone Intel.RealSense.Viewer.exe version of the RealSense Viewer that can be downloaded from the Assets file list on the Releases page. Once downloaded, this file should be launched with a double-leftclick from the folder location that it was downloaded to (not with the Viewer launch shortcut on the Windows desktop).
https://github.com/IntelRealSense/librealsense/releases/tag/v2.40.0

Case closed due to correct answer provided and no further comments received.

Case closed due to correct answer provided and no further comments received.


Is there a reason why an IpfixPacket can only be instantiated once and not be mutated afterwards in any way?

I build a IpfixPacket in several iterations from a stream of DataRecords, so it would be interesting to know this.
I considered saving all DataRecords into a Vector and build the IpfixPacket last, but I am also dependent on the len() function of IpfixPacket. If it is bigger than the MTU I would have to throw the whole Packet away and build a new one instead of just popping the last DataRecord of the Set's Vector.
Thanks very much for your help. 😊

In NetGauze, packets are immutable by default. Maybe in the future, we can add a feature to be able to build a new packet from exiting ones if that is a needed feature. Please let us if you have use cases for this feature.
As for the len, yes it's a tricky one. The RFC7011 defines different MTUs based on the transport being used (for SCTP & UDP is PMTU, for TCP it's limited by max size).
If I understood your question correctly .. you are looking for assurances that constructing a IPFIX packet will not exceed a given MTU and if does exceed the length a way to fragment it?
If yes, that's a bit more complicated problem. In IPFIX the records are defined by a template packet, and if the data records are split then two new template packets need to be generated first. When generating a template packet, you can use either fix size fields or variable size fields. For fix size fields, it's easy to compute the total size of the corresponding data packets ( (not currently implemented but maybe this could be a new feature for NetGauze as well). However, not easy for variable size fields. From experience with router vendor implementation, they usually account for the largest possible size. For instance, if they're using variable size string for interface names and their implementation allows only names up to 255 chars, then calculate for that.
please let me know if I didn't capture your questions correctly?


apache thrift dependency is broken

$subject dependency is broken and its failing the CI
go<EMAIL_ADDRESS>git fetch -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /go/pkg/mod/cache/vcs/83dba939f95a790e497d565fc4418400145a1a514f955fa052f662d56e920c3e: exit status 128:
	fatal: unable to access 'https://git.apache.org/thrift.git/': Failed connect to git.apache.org:443; Connection timed out
go: error loading module requirements

https://github.com/tektoncd/cli/commit/a0a6754f72b8f2b5845a41e2f47772e8458450d4

Thank you @chmouel :+1:

It's weird tho that cli/operator have this dep when -pipeline doesnt

Yes dont know, may be because of
go mod graph | grep apache
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>

@chmouel @hrishin this needs to be fixed upstream too right ?

@chmouel @hrishin this needs to be fixed upstream too right ?

oh i didn't realise it wasn't 👼
as a rule we should never pr on downstream except plumbing/downstream ci fixes,


Release 3.3.0 ( Planning Doc)

Describe the feature you'd like to have
The idea here is to capture the wishlist from  Ceph CSI community which they would like to see in this release. We could capture this in a google doc or in form of comments on the issue. However the format should not be a blocker for capturing this info, thus tracking it for the next release.
[update] Wish list:
https://hackmd.io/8OqCr1mrTMGtBcJ7XNdDBg
Additionally having a planning call for an upcoming release would help the users to discuss about the use case and priority for a feature.
What is the value to the end user? (why is it a priority?)
User get a chance to come up with their own wishlist for the upcoming release. It will also help the CSI community to do some planning based on the priority, owning the features , driving to the release ..etc.
We could also rotate the responsibilities among the community for various release tasks.
@ShyamsundarR @Madhu-1 @nixpanic @Yuggupta27 @phlogistonjohn @agarwal-mudit inviting you for the thoughts , suggestions..etc.

I think it would be nice to have:

Updated docs, at this moment some pieces of getting up and running with ceph-csi are not complete and might cause confusion
A helm chart maybe, that will work with external clusters while just setting clusterid, monitors, pool, and client data
A comparison of why would one opt in for ceph-csi instead of the old ceph-rbd provisioner

Speaking of documentation. A table of the meaning of the elements of values.yaml table would be ideal. Seen that in a lot of other helm charts. As well as an example of volume resizing would be helpful.
As for:

A helm chart maybe, that will work with external clusters while just setting clusterid, monitors, pool, and client data

My organization has been using ceph-csi-rbd exclusively with external clusters rather than rook.io or OCS. The only thing missing from the helm chart is the required authentication secrets from what I can tell.

Speaking of documentation. A table of the meaning of the elements of values.yaml table would be ideal. Seen that in a lot of other helm charts.

Sure. !

As well as an example of volume resizing would be helpful.

Sure. I can take an AI on it.

As for:

A helm chart maybe, that will work with external clusters while just setting clusterid, monitors, pool, and client data

My organization has been using ceph-csi-rbd exclusively with external clusters rather than rook.io or OCS. The only thing missing from the helm chart is the required authentication secrets from what I can tell.

Lets revisit this and also add missing details accordingly.
Thanks @msfrucht for the suggestions.

So far we got
# [Ceph-CSI ] v3.2.0 -  Wishlist

User: https://github.com/0x4139:

*)    Updated docs, at this moment some pieces of getting up and running with ceph-csi are not complete and might cause confusion
*)    A helm chart maybe, that will work with external clusters while just setting clusterid, monitors, pool, and client data
*)    A comparison of why would one opt in for ceph-csi instead of the old ceph-rbd provisioner

User: https://github.com/humblec

*) Adoption of CSI spec 1.3 & Kube 1.19
*) VolumeCondition support for the PV
*) Go Ceph Binding support for CephFS
*) RBD mirroring
*) Design/implementation of Controller publish and Unpublish
*) Design/framework for Backend Cluster Operation by avoiding the credential usage in each request
*) Allow volume expansion on encrypted volumes
*) Allow volume snapshotting on encrypted volumes
*) Allow Token based authentication for Vault KMS

 User: https://github.com/msfrucht
*)  A table of the meaning of the elements of values.yaml table would be ideal.
*)  Example of volume resizing would be helpful.

Planning to close the 3.2.0 items this week, so please chime in if you want to target any extra features for the release.

anything i can help with?

What's the effort for taking volume resizing from being flagged as Beta to GA?

@tux-o-matic resizing is still not supported for filesystem pvc created from clone and snapshot (the work is still in progress in upstream Kubernetes-csi)

What's the effort for taking volume resizing from being flagged as Beta to GA?

@tux-o-matic mostly we will be able to take it to GA with 1.20. As soon as upstream take it to GA, we will also move to GA. hope it helps.

anything i can help with?

@0x4139  Thanks for asking! Sure, lets triage and get back to you. May be we will tag the issues with help wanted or similar , so that we can easily fetch the items.

Will 3.2 recognize v1 snapshot objects for 1.20? If so, will it still include recognition of v1beta1 for some limited time?

Will 3.2 recognize v1 snapshot objects for 1.20? If so, will it still include recognition of v1beta1 for some limited time?

@msfrucht this is no dependency with cephcsi here. if you are using v4.x CRD and controller and the snapshotter sidecar things should work with v1 snapshots.

@Madhu-1 Thanks.
I installed the 4.x external-snapshooter and updated the snapshot CRDs.
VolumeSnapshot/v1 objects work just fine with ceph-csi-3.2.1.

@Madhu-1
I have another request.
After using IBM Virtualize, IBM Scale, and Openshift Cluster Storage CSI drivers I noticed all of them add a CSIDriver object for easy lookup of which drivers exists. The existing YAMLs and helm charts of ceph-csi do not.
And while the helm charts has them as an option, they are CSIDriver/v1beta1 in 3.2.1 when this object went v1 in 1.18. And only gets created when provisioner.attacher is set to false. So clearly this is both somewhat old and never implemented.
Can the ceph-csi-rbd and ceph-csi-cephfs had an appropriate CSIDriver object for each driver for 3.3 or a later release?

@msfrucht https://github.com/ceph/ceph-csi/pull/1945 will add CSIDriver objects for both cephfs and rbd.

as https://github.com/ceph/ceph-csi/releases/tag/v3.3.0 3.3.0 release is out. Closing this one.


add example coverage for using 1p/3p deps with types

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

@jfirebaugh are you okay with signing our CLA for your commit I've included here? I want to give credit/attribution :)


Notebook user_acquisition.ipynb gives an error

Notebooks example gives an AttributeError: 'NoneType' object has no attribute 'endswith'
I am using macbook
Reproducing: clone the repo and run through the notebook

Could you provide some more info on what environment did you use?
Based on the cloning i would assume you run something locally.
I will page @morkapronczay to help out once we have some more context available.

Yes, I did use conda-created virtual environment with python 3.10.4
I have not installed anything on the environment, I did run the commands
%pip install superlinked==9.37.1
%pip install umap-learn

and needed ipykernel packages so it can be used as a notebook kernel, that's all.
The whole traceback:

Hi @miskamet,
Can you try with the latest superlinked 10.2.2?

Unfortunately we cannot replicate the issue on our end.

Yes, I noticed that the whole structure of the repo has changed after this bug. You can probably close the issue, I'll try to run the notebook again when I have time.


can you limit memory usage?

can you limit memory usage or set max disk usage?

There's nothing built into buntdb to limit memory or disk usage.


Lua: define packages for 5.3.x; update lpeg module

Motivation for this change
Most Lua packages are only available for legacy versions of Lua despite
the 5.3 series interpreter having been out for years now. That needs to
change.
Also the lpeg package in nixpkgs is rather archaic; the most recent version
1.0.1 was released in early 2017.
Things done

Define lua53Packages.
Compile-test already defined packages and disable those that wouldn’t build.
Update lpeg to 1.0.1.
Test some existing (non-public) Lua projects (all using lpeg).

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

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Fits CONTRIBUTING.md.

Additional commit: Update the 5.3 series interpreter to version 5.3.5 that was released just this week.

@GrahamcOfBorg build lua53Packages.lpeg

Success on x86_64-linux (full log)
Attempted: lua53Packages.lpeg
Partial log (click to expand)
make[1]: Leaving directory '/build/lpeg-1.0.1'
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/afwf82mzvjdwdbm4l2n15m3p6a0al2b5-lua5.3-lpeg-1.0.1
shrinking /nix/store/afwf82mzvjdwdbm4l2n15m3p6a0al2b5-lua5.3-lpeg-1.0.1/lib/lua/5.3/lpeg.so
strip is /nix/store/90vmpr41dzsx350k5argycaf693hnl1l-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/afwf82mzvjdwdbm4l2n15m3p6a0al2b5-lua5.3-lpeg-1.0.1/lib
patching script interpreter paths in /nix/store/afwf82mzvjdwdbm4l2n15m3p6a0al2b5-lua5.3-lpeg-1.0.1
checking for references to /build in /nix/store/afwf82mzvjdwdbm4l2n15m3p6a0al2b5-lua5.3-lpeg-1.0.1...
/nix/store/afwf82mzvjdwdbm4l2n15m3p6a0al2b5-lua5.3-lpeg-1.0.1

Success on aarch64-linux (full log)
Attempted: lua53Packages.lpeg
Partial log (click to expand)
make[1]: Leaving directory '/build/lpeg-1.0.1'
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/r79lk961vwfx01dh3w21xlnr47y7vs3w-lua5.3-lpeg-1.0.1
shrinking /nix/store/r79lk961vwfx01dh3w21xlnr47y7vs3w-lua5.3-lpeg-1.0.1/lib/lua/5.3/lpeg.so
strip is /nix/store/7iyn7gn33i7xxjgmwf25k20246y6nd9d-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/r79lk961vwfx01dh3w21xlnr47y7vs3w-lua5.3-lpeg-1.0.1/lib
patching script interpreter paths in /nix/store/r79lk961vwfx01dh3w21xlnr47y7vs3w-lua5.3-lpeg-1.0.1
checking for references to /build in /nix/store/r79lk961vwfx01dh3w21xlnr47y7vs3w-lua5.3-lpeg-1.0.1...
/nix/store/r79lk961vwfx01dh3w21xlnr47y7vs3w-lua5.3-lpeg-1.0.1

Success on x86_64-darwin (full log)
Attempted: lua53Packages.lpeg
Partial log (click to expand)
clang -Wall -Wextra -pedantic -Waggregate-return -Wcast-align -Wcast-qual -Wdisabled-optimization -Wpointer-arith -Wshadow -Wsign-compare -Wundef -Wwrite-strings -Wbad-function-cast -Wdeclaration-after-statement -Wmissing-prototypes -Wnested-externs -Wstrict-prototypes  -O2 -std=c99 -I../lua/ -fPIC   -c -o lpcode.o lpcode.c
clang -Wall -Wextra -pedantic -Waggregate-return -Wcast-align -Wcast-qual -Wdisabled-optimization -Wpointer-arith -Wshadow -Wsign-compare -Wundef -Wwrite-strings -Wbad-function-cast -Wdeclaration-after-statement -Wmissing-prototypes -Wnested-externs -Wstrict-prototypes  -O2 -std=c99 -I../lua/ -fPIC   -c -o lpprint.o lpprint.c
env clang -bundle -undefined dynamic_lookup lpvm.o lpcap.o lptree.o lpcode.o lpprint.o -o lpeg.so
make[1]: Leaving directory '/private/tmp/nix-build-lua5.3-lpeg-1.0.1.drv-0/lpeg-1.0.1'
installing
post-installation fixup
strip is /nix/store/8axizw5mf6dx7wip65nbkyrmlkhmjhc5-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/ywvhsm3l4gm8jilam1xblcz1nzn11465-lua5.3-lpeg-1.0.1/lib
patching script interpreter paths in /nix/store/ywvhsm3l4gm8jilam1xblcz1nzn11465-lua5.3-lpeg-1.0.1
/nix/store/ywvhsm3l4gm8jilam1xblcz1nzn11465-lua5.3-lpeg-1.0.1

2018-07-21 (Saturday<EMAIL_ADDRESS>(Matthew Bauer):

Merged #43141.

Great, thank you all!


Specify behaviour for Principal when nobody is logged in

I recently had a customer ask why we have CDI inject a Principal containing saying unauthenticated when HttpServletRequest.getUserPrincipal() will give a null in that context.
I think that unauthenticated is the correct choice for CDI, since we cannot inject a null and hope for it to remain up to date as the context changes, but I think it would be useful to clarify the spec on this point as the current behaviour is undefined.

This belongs to an EE integration part of the specification which is being moved into the umbrella spec (see https://github.com/jakartaee/platform/pull/838).
We should probably keep track of it there instead.

What seems a bit weird to me is that the specification doesn't define the scope of the Principal bean. I guess it should be @RequestScoped, and that itself actually precludes a null value.

Closing as this has been moved to https://github.com/jakartaee/platform/issues/841


mvn build is not a standard maven lifecycle phase

mvn build is not a standard maven lifecycle phase, do you mean mvn package?
If the idea is to build the package, mvn package should do that.

@fbushman Thank you for the feedback.
Please include a reference to the documentation and we can address this issue.


Lift a silly precondition

The cost of this test in the default implementation of distance ought to be minimal.  Benchmarks will tell for sure.

@swift-ci Please benchmark

@swift-ci please test

Build failed
Swift Test Linux Platform
Git Sha - df891a0b38f5f11cc5cc0ec0df283407c8274a4e

Build failed
Swift Test OS X Platform
Git Sha - df891a0b38f5f11cc5cc0ec0df283407c8274a4e


Allow Nullable types

We often have configuration settings that are optional (have a blank setting value), however ConfigInjector fails when trying to cast from a string to a nullable.
For example:
<add key="NullableIntSetting" value=""/>
<add key="NullableGuidSetting" value=""/>

public class NullableGuidSetting : ConfigurationSetting<Guid?>
{
}

public class NullableIntSetting : ConfigurationSetting<int?>
{
}

Resolved by d5be011d084b7bca436a82acc175869fa773a608. Thank you :)


When ActiveSupport Tries to Load Missing Constants in Padrino::Application, .parent Conflicts With ActiveSupport's Module.parent

When a missing constant is encountered inside the Padrino::Application, ActiveSupport tries to load it by calling Module.parent (amongst other things). This conflicts with Padrino::Application.parent and results in an ArgumentError: ArgumentError: wrong number of arguments (given 0, expected 1..2).

Fixed by 0caff744ab8a545bd25615bc354135d39f0d1a88
Ref: #1814

Yeah, that's on the 0.12 branch, but does not exist in 0.12.6.

Yeah, that's on the 0.12 branch, but does not exist in 0.12.6.

Or in any 0.12 release

Pushed 0.12.7 to rubygems.


Imagery does not load in iD

When using Open in iD, iD loads http://oam-tiles.s3.amazonaws.com/854fbc70-4f5f-4154-b484-fb0edfe69c8e/{z}/{x}/{y}.png instead of http://tiles.openaerialmap.org/588b75db2be03d001038e380/0/92c680e6-91e9-4456-8478-c204b33e91a6/{z}/{x}/{y}.png.
Copy to Clipboard works correctly. So need to look at the tiles url that is passed to the link: https://github.com/hotosm/oam-browser/blob/develop/app/assets/scripts/components/results_item.js#L160-L205
Tested with this image: https://map.openaerialmap.org/#/169.30068969726562,-19.377207018733444,15/31113220011023002/588b77a8b0eae7f3b143b4e4?_k=k8uv3e

Seems that it wasn't an imagery URL issue. Problem was that when I was attempting to open iD, it was only loading my previously loaded tiles -- oam-tiles-- url. The issue is fixed in #199. URL was not being properly read to open up with iD editor and custom TMS loaded.


Replace GeoIP Legacy by GeoIP2

The GeoIP module, nowadays called "GeoIP Legacy", alongside the old-style databases (.dat files) are deprecated, and have been for some time. The free-as-in-beer databases in that format (GeoLite Legacy) were discontinued in January 2019, and the paid GeoIP Legacy versions are being retired in May 2022.
The replacement stack exists since 2014, and is by the same author (MaxMind), and fairly mature. These comprise the MMDB file format (an openly licensed, well-documented format), alongside the MaxMindDB libraries, in C, Python etc. In Python, the MaxMindDB library is an abstraction for reading the databases on disk (like the old GeoIP module was), while the GeoIP2 module is one level of abstraction further, allowing one to use either the on-disk databases or their web services instead.
I was wondering if dnstwist could be adapted to use GeoIP2. Thank you for your efforts!

Wondering that myself!  Tried just changing the script to import geoip2 but that didn't work. Seems like it's possible but I haven't figured it out yet either

Wondering that myself!  Tried just changing the script to import geoip2 but that didn't work. Seems like it's possible but I haven't figured it out yet either

Preliminary support for MaxMind GeoIP2 Lite has been just added. The tool should switch to GeoIP2 if geoip2 module is installed and GeoLite2-Country.mmdb database file can be found in the main directory. Otherwise, it will fallback to the GeoIP Legacy. Obviously, due to MaxMind GeoIP2 license, the database file can't be shipped with the tool and has to be provided manually by the user.

Preliminary support for MaxMind GeoIP2 Lite has been just added. The tool should switch to GeoIP2 if geoip2 module is installed and GeoLite2-Country.mmdb database file can be found in the main directory. Otherwise, it will fallback to the GeoIP Legacy. Obviously, due to MaxMind GeoIP2 license, the database file can't be shipped with the tool and has to be provided manually by the user.


Custom tokenizer layer

Hi,
I would like to incorporate the tokenization process into a model which is using bert layer.
Here is my custom layer:
class TokenizationLayer(tf.keras.layers.Layer):
    def __init__(self, vocab_path, max_length, **kwargs):
        self.vocab_path = vocab_path
        self.length = max_length
        self.tokenizer = bert.bert_tokenization.FullTokenizer(vocab_path, do_lower_case=False)
        super(TokenizationLayer, self).__init__(**kwargs)

    def call(self,inputs):
        tokens = self.tokenizer.tokenize(inputs)
        ids = self.tokenizer.convert_tokens_to_ids(tokens)
        ids += [self.tokenizer.vocab['[PAD]']] * (self.length-len(ids))
        return ids

And here is my code to test the custom layer within a dummy model:
inputs = tf.keras.layers.Input(shape=(), dtype='string')
tokenization_layer = TokenizationLayer(vocab_path, 10, dtype=tf.string)
outputs = tokenization_layer(inputs)
model = tf.keras.models.Model(inputs=inputs, outputs=outputs)

I get the following traceback:
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-68-8df4885e5c7a> in <module>
      1 inputs = tf.keras.layers.Input(shape=(), dtype='string')
      2 tokenization_layer = TokenizationLayer(vocab_path, 10, dtype=tf.string)
----> 3 outputs = tokenization_layer(inputs)
      4 model = tf.keras.models.Model(inputs=inputs, outputs=outputs)

/s/Demo/venv/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py in __call__(self, *args, **kwargs)
    924     if _in_functional_construction_mode(self, inputs, args, kwargs, input_list):
    925       return self._functional_construction_call(inputs, args, kwargs,
--> 926                                                 input_list)
    927
    928     # Maintains info about the `Layer.call` stack.

/s/Demo/venv/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py in _functional_construction_call(self, inputs, args, kwargs, input_list)
   1115           try:
   1116             with ops.enable_auto_cast_variables(self._compute_dtype_object):
-> 1117               outputs = call_fn(cast_inputs, *args, **kwargs)
   1118
   1119           except errors.OperatorNotAllowedInGraphError as e:

/s/Demo/venv/lib/python3.7/site-packages/tensorflow/python/autograph/impl/api.py in wrapper(*args, **kwargs)
    256       except Exception as e:  # pylint:disable=broad-except
    257         if hasattr(e, 'ag_error_metadata'):
--> 258           raise e.ag_error_metadata.to_exception(e)
    259         else:
    260           raise

ValueError: in user code:

    <ipython-input-60-d6c12f7d1b14>:17 call  *
        tokens = self.tokenizer.tokenize(inputs)
    /s/Demo/venv/lib/python3.7/site-packages/bert/tokenization/bert_tokenization.py:172 tokenize  *
        for token in self.basic_tokenizer.tokenize(text):
    /s/Demo/venv/lib/python3.7/site-packages/bert/tokenization/bert_tokenization.py:198 tokenize  *
        text = convert_to_unicode(text)
    /s/Demo/venv/lib/python3.7/site-packages/bert/tokenization/bert_tokenization.py:86 convert_to_unicode  *
        raise ValueError("Unsupported string type: %s" % (type(text)))

    ValueError: Unsupported string type: <class 'tensorflow.python.framework.ops.Tensor'>

Can you lease help how to solve this issue?
I think the problem is that the tokenizer gets tensors not string and that is why it can't tokenize it.
But if that is the case how should I mkae this work?
Thanks

@ptamas88  Did you succeed to make it works ? I have the same question

yes, usually the tokenizer is not part of the graph. For this you'll need a tokenizer that has a TF implementation, like sentencepiece when using albert. For BERT you might try the tf.text BertTokenizer (https://github.com/tensorflow/text/blob/master/docs/api_docs/python/text/BertTokenizer.md) - I haven't used it myself, but it should work.

hope that helps:
pip install tensorflow-text

and then try something along those lines:
import tensorflow_text as text

tokenizer = text.BertTokenizer(os.path.join(ckpt_dir, 'vocab.txt'))
tok_ids = tokenizer.tokenize(["hello, cruel world!", "abcccccccd"]).merge_dims(-2,-1).to_tensor(shape=(2, max_seq_len))

@ptamas88 Did you succeed to make it works ? I have the same question

haven't tried since, but i will check out the solution @kpe mentioned

it didn't work， still throw OperatorNotAllowedInGraphError

it didn't work， still throw OperatorNotAllowedInGraphError


web/static/main.css: fix typo.

Fixes #805.

are there any mispellings in the HTML too?

@sym3tri there's a mismatch between the spelling in the css and the HTML
$ grep -r 'separator' web/
web/templates/approval.html:

web/templates/approval.html:

$ grep -r 'seperator' web/
web/static/main.css:.dex-seperator {

looks like the HTML used the correct class names, so the classes were simply not being applied earlier :/


Add a table listing the configuration fields (summary) suggesting range values

Just a friendly suggestion and request about documentation from the source for this excellent software.
Could be added a special section of documentation about best settings about configuration?
Because you are the creator of this software I am assuming you have some formulas or math rules to apply special settings according some ranges or scenario, it for production or for yourself to apply your own tests . Of course it for each possible 'field' that expects a number value.  Thus what could be the best or recomended value for minimumIdle according some N scenario, perhaps number of possible connections in production or anything else, same thought for maximumPoolSize for example it has a page to About Pool Sizing. Thus a table listing all these fields and suggested range values would be nice.
Thus when a developer try to configure Hikari for a first time, he has already available a suggested range valid range of possible values according other factors.
I know is very relative because even hardware (memory ram) and other factors are involved.
Note: I am not saying the current documentation is useless.

As you stated there are many factors to consider here which would make a generic formula next to impossible.

Hardware of the database
Do you have read replicas
How is the database configured
Is the load read / write heavy
How many app servers do you have connected to a single database
What is the hardware of the app servers
What is the expected query throughput
How long does a query take to run on average
Do you have a mix of fast running queries and long running queries (OLAP / OLTP)
Is there anything sitting between your app server and the database (Timeouts need to be configured based on that as well)
How fast do you need to fail over

You should monitor the pool usage and consider using multiple pools if you have various types of queries OLAP vs OLTP.
If you are low scale you will probably not gain a whole lot from tweaking pool settings. Other than that you really have to test it yourself. Every application is different.

Yes, I understand and are valid your points.
But the general point is that should exists something (a 'pattern') to apply the following quickly:

How edit and tune the settings prior to release the software to production, it for Hikari of course

I know it is very hard, because it depends hardware, db configuration etc... but I think should exists a 'reach point' in someway.
Testing could help in some way. I mean, how create 'fake' user connections to apply stress testing to all the environment about persistence in Java, and here working or playing around with the Hikari settings
I hope you see my point.

how create 'fake' user connections to apply stress testing to all the environment about persistence in Java

This is a very difficult problem but the answer is make it as similar to production as possible.
Playing around with the settings should be pretty straight forward. Just measure and test.
That sounds like a job for a performance / load testing framework which still requires intimate application knowledge to be useful. What is the distribution of different queries that are run, how many run concurrently, what is the usage pattern?
I believe all the recommendations are listed.

If you have a very high throughput app don't use minimum idle at all and let the pool always stay at the max size.
Connection lifetimes should be slightly shorter than the minimum connection timeout of anything between your application and the database.
The about pool sizing lists an approximate formula for number of connections with the caveat that if you have a mixed use pool (short and long running connections) you probably want multiple pools configured individually for their use case.

All of the above apply to any JDBC connection pool you use.

Thanks for the points.
BTW about:

If you have a very high throughput app don't use minimum idle at all and let the pool always stay at the max size.

I had this experience:

Improve documentation about: HikariConfig.setMaximumPoolSize best value #920

Thus not always the obvious is the correct.
I am assuming that the author (and team) have a table with values about these settings for his own testing prior to release a new version of HikariCP

Still, there may be 'something' we can come up with.

Sounds great, some extra information is valuable for the audience
Thanks to both.


Adds Various Icons

Added File-Text (#23)
Added Code (#24)
Added Gender/Identity/Sexuality (#27)
Added Language (#36)
Added Package Lock (for NPM 5+)

Not sure how to add a new category to the site, so identity icons currently don't show.
https://deploy-preview-46--feather.netlify.com/

@kurisubrooks add category to _includes/icons.html

Perfect! Thanks @alexantr

Thanks for doing this @kurisubrooks! I'm going to wait until I finish the contribution instructions before I merge anything.

@kurisubrooks How did you find that link to the Netlify deploy preview?

@colebemis It's linked to the Netlify GitHub statuses.

Oh, wow. That's cool!

#171 @kurisubrooks @andrewda

@kurisubrooks Can you remove the code, file and gender nonbinary icon from the PR? There is already one in feather icons

Code
File
Gender Nonbinary

Gender female icon

Icon
Suggestion

Gender male icon
Can you increase the size of the icon?

All these icons need to have a minimum of 2px of spacing around the icon

Gender transgender
Sexuality gay
Sexuality lesbian
Sexuality straight

All these icons need to have a minimum of 2px of spacing around the icon

No. It can be broken case-by-case as say #171, and it's 1px at least for around the icon.

it's 1px at least for around the icon.

Yes, all 4 icons which I have mentioned inside the table have different spacing.

They only need at least 1px.

Why did you close, @kurisubrooks ?

Made this a long time ago, and have no interest in updating it. If you'd like, please feel free to take the contents of this PR, fix it up as per the suggestions and resubmit :)

Can we also add them to @featherity as well? :)
@jletey

@locness3 Haha I'm @johnletey now. We should definitely look into it!
@ericfennis ;)


Retry handlers don't work in Azure Functions

The discussion here made me realize that work hadn't been completed to enable structured error handling in the Azure Functions host. As a result, this documented sample doesn't work.
Here's a screenshot showing that the exception information was not correctly deserialized by the Durable Task SDK.

I suspect the problem was missed because the sidecar we use for integration tests is configured differently from the Azure Functions host.

FYI @kaibocai, we may need to double check this for Java as well.

Is there any estimate for the fix? Or, is there a workaround for it?

code, policy.ToDurableTaskCoreRetryOptions() converts the input into a DurableTask.Core.RetryOptions, but doesn't look at the HandleAsync at all. My best guess is that it was somehow missed.

Referencing kylepope-ge, is there a fix in the works for missing HandleAsync?

Is there n ETA for the fix?

Can we get an ETA for a fix for this bug. It causes function apps to unnecessarily consume more compute cycles (extra $$$)?

+1
Is this still the case with Isolated Worker?

Unfortunately, it looks like this still hasn't been fixed. I did a quick check on the latest on the main branch and found the same issues exist with the retry handling. See TaskOrchestrationContextWrapper.cs:116 for the code flow I mentioned back in August.

I'm no longer able to reproduce this. When using the latest release, I'm able to confirm that:

The custom retry handler is correctly invoked
The error information is correctly surfaced to retryContext.LastFailure


Release in AppStore

[ ] Add more icon size
[ ] provide i18n

"This app is currently not available in your country or region."


Describe forward trajectory data in README

[x] Upload data
[x] Title
[x] Introduction
[x] Description
[x] Data link
[x] License
[x] Contact

@hvangasteren, can you review the text at https://github.com/enram/case-study/blob/master/data/forward-trajectory/README.md?
Notes:

[ ] Is the methodology OK (adapted from blog post)
[ ] Is the license (CC0) OK?
[ ] Can you give me the coordinates of the two radars?

The radar locations can't be shared, but the names in the descriptions should be precise enough.

No problem. Is the rest of the text OK?

Jazeker
Van: Peter Desmet<EMAIL_ADDRESS>Verzonden: dinsdag 23 juni 2015 20:40
Aan: enram/case-study
CC: Hans van Gasteren
Onderwerp: Re: [case-study] Describe forward trajectory data in README (#24)
No problem. Is the rest of the text OK?
—
Reply to this email directly or view it on GitHub https://github.com/enram/case-study/issues/24#issuecomment-114602990 .  https://github.com/notifications/beacon/AHU5kD3VWqbVN98DKLfeE_1OnXVVdfNjks5oWZ9rgaJpZM4E8Egn.gif


Restoring hardlinked files fails

Same setup as in #834 , using a version from "head", so with the absolute path fix.
I have a daily "-x / /boot" backup from my rp3, it contains (among other files) /bin/uncompress and /bin/gunzip which are hardlinked to each other. To test if this works I wanted to restore them, so I ran:
$ mkdir z
$ restic -r ... restore --include /bin/uncompress --include /bin/gunzip -t z

And when the z is empty, it works as expect.
However, doing it a second time gives a rather ugly error:
$ mkdir z
$ sudo ./restic -r rest:http://qnap.ch.polyware.nl:8000 restore 0eb7a75d -i /bin/uncompress -i /bin/ungzip -t z
enter password for repository:
restoring <Snapshot 0eb7a75d of [/ /boot] at 2017-03-02 03:49:02.056313104 +0100 CET by<EMAIL_ADDRESS>to z
$ sudo ls -lR z/bin
z/bin:
total 8
-rwxr-xr-x. 2 root root 2301 Oct  7  2014 gunzip
-rwxr-xr-x. 2 root root 2301 Oct  7  2014 uncompress

$ sudo ./restic -r rest:http://qnap.ch.polyware.nl:8000 restore 0eb7a75d -i /bin/uncompress -i /bin/gunzip -t z
enter password for repository:
restoring <Snapshot 0eb7a75d of [/ /boot] at 2017-03-02 03:49:02.056313104 +0100 CET by<EMAIL_ADDRESS>to z
error for z/bin/uncompress: link z/bin/gunzip z/bin/uncompress: file exists
CreateHardlink
restic.Node.createFileAt
	/tmp/restic-build-047519380/src/restic/node.go:232
restic.(*Node).CreateAt
	/tmp/restic-build-047519380/src/restic/node.go:127
restic.(*Restorer).restoreNodeTo
	/tmp/restic-build-047519380/src/restic/restorer.go:90
restic.(*Restorer).restoreTo
	/tmp/restic-build-047519380/src/restic/restorer.go:53
restic.(*Restorer).restoreTo
	/tmp/restic-build-047519380/src/restic/restorer.go:65
restic.(*Restorer).RestoreTo
	/tmp/restic-build-047519380/src/restic/restorer.go:123
main.runRestore
	/tmp/restic-build-047519380/src/cmds/restic/cmd_restore.go:138
main.glob..func13
	/tmp/restic-build-047519380/src/cmds/restic/cmd_restore.go:23
github.com/spf13/cobra.(*Command).execute
	/tmp/restic-build-047519380/src/github.com/spf13/cobra/command.go:599
github.com/spf13/cobra.(*Command).ExecuteC
	/tmp/restic-build-047519380/src/github.com/spf13/cobra/command.go:689
github.com/spf13/cobra.(*Command).Execute
	/tmp/restic-build-047519380/src/github.com/spf13/cobra/command.go:648
main.main
	/tmp/restic-build-047519380/src/cmds/restic/main.go:37
runtime.main
	/usr/local/go/src/runtime/proc.go:185
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:2197
  Interrupt received, cleaning up

Output of restic version
 ./restic version
restic 0.4.0 (v0.4.0-79-g1d64a1d-dirty)
compiled with go1.8 on linux/amd64

Expected behavior
no error, it ought to discover the file is there and needs to be unlinked before linking.
Actual behavior
stack trace.
Steps to reproduce the behavior
see above.

That seems to be another bug, thanks for taking the time to report it.


The video_player plugin not initializing with "flutter run --release" or "flutter build apk --release".

I am using video_player plugin to play some videos in my app. It is working very fine with the debug build. When i tried to run in release the video player is not working. After some debugging i found that the "video_player" plugin is not initializing.
Here is my working code with debug build :
 VideoPlayerController _channel1Controller;
 _disposeWidget =true;

  Future _initVideoController(dynamic channel) async {
    _channel1Controller = VideoPlayerController.network(channel['video'])
      ..initialize().then((_) {

          print('initialized ...');
          setState(() {
          _disposeWidget = false;
        });

      })
      ..play()
      ..setLooping(true).catchError((dynamic e) {
        print(e);
      });
  }

Platform: Android
Video_player version : "0.10.5"
IDE : vscode
Flutter v: latest
Tested on : Physical device (OnePlus 5 & Redmi note 5 pro)

Hi @anil-sookshum
I believe you are right, thank you for pointing it out.

code sample

import 'package:flutter/material.dart';
import 'package:video_player/video_player.dart';
// from https://pub.dev/packages/video_player

void main() => runApp(MaterialApp(home: MyApp()));

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  static VideoPlayerController _controller;
  static const String _url = 'https://flutter.github.io/assets-for-api-docs/assets/videos/butterfly.mp4';
  static String _state = 'not initialized';
  @override
  void initState() {
    super.initState();
    _controller = VideoPlayerController
      .network(_url)
        ..initialize()
          .then((_)=>setState(() {
            _state = 'initialized';
          }),);
  }
  @override
  void dispose() {
    super.dispose();
    _controller?.dispose();
    _controller = null;
  }

  @override
  Widget build(BuildContext context) => Scaffold(
    appBar: AppBar(title: Text(_state),),
    body: Center(
        child: GestureDetector(
          onTap: ()=> _controller.value.isPlaying
            ? _controller.pause()
            : _controller.play(),
          child:  _controller.value.initialized
        ? AspectRatio(
            aspectRatio: _controller.value.aspectRatio,
            child: VideoPlayer(_controller),
          )
        : CircularProgressIndicator(),
  ),),);
}

apk
flutter build --apk --verbose.txt
[√] Flutter (Channel beta, v1.12.13+hotfix.6, on Microsoft Windows [Version 10.0.19013.1122], locale en-US)
    • Flutter version 1.12.13+hotfix.6 at C:\src\flutter
    • Framework revision 18cd7a3601 (8 days ago), 2019-12-11 06:35:39 -0800
    • Engine revision 2994f7e1e6
    • Dart version 2.7.0

[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at C:\Users\iapic\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 28.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 3.5)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 41.1.2
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[√] VS Code, 64-bit edition (version 1.41.0)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 3.7.1

[√] Connected device (3 available)
    • Pixel 3a   • 965AY0WP5C • android-arm64  • Android 10 (API 29)
    • Chrome     • chrome     • web-javascript • Google Chrome 79.0.3945.88
    • Web Server • web-server • web-javascript • Flutter Tools

• No issues found!

Same here! on iOS my app is crashing and I can't see any logs! And on Android + Web everything is fine

Any news? In IOS  still doesn't work

i had the same issue - it worked in debug but would not finish initializing on release.
so i tried some other plugins and had the same issue.
and then i added

(which i thought i had - but didn't)
maybe...

Hi, I am still having this issue. Video is not playing in release run.

Hi @anil-sookshum,
Thanks for filing the issue, I tested it on Android K20 Pro with the latest version of flutter with video_player^2.1.6, I am not able to replicate this issue and I can see the video getting initialized and playing in the release version of the app.
I would request you to upgrade to latest version of flutter and use the upgraded plugin and confirm the issue.
Anyone still facing this issue with latest versions feel free to write back.

flutter doctor -v
[✓] Flutter (Channel stable, 2.2.2, on macOS 11.4 20F71 darwin-arm, locale en-IN)
    • Flutter version 2.2.2 at /Users/mahesh/Documents/flutter
    • Framework revision d79295af24 (2 weeks ago), 2021-06-11 08:56:01 -0700
    • Engine revision 91c9fc8fe0
    • Dart version 2.13.3

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/mahesh/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.4, Build version 12D4e
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] IntelliJ IDEA Community Edition (version 2021.1.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 57.0.5
    • Dart plugin version 211.7233

[✓] VS Code (version 1.57.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.23.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 11.4 20F71 darwin-arm
    • Chrome (web)    • chrome • web-javascript • Google Chrome 91.0.4472.114

• No issues found!

Thank you

Without additional information, we are unfortunately not sure how to resolve this issue.
We are therefore reluctantly going to close this bug for now.
Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.
Could everyone who still has this problem please file a new issue with the exact description of what happens, logs, and the output of flutter doctor -v.
All system setups can be slightly different, so it's always better to open new issues and reference related issues.


onActivityResult don't return extras which I put in Intent

I start picker with sending my data that I will need later
startActivityForResult(ImagePicker.create(this)
                        .theme(R.style.ImagePickerTheme)
                        .limit(10)
                        .getIntent(requireContext())
                        .putExtra(IMAGE_CATEGORY, categoryPosition)
                        .putExtra(IMAGE_POSITION, imagePosition),
                CropImage.IMAGE_ACTIVITY_REQUEST_CODE);

I expect to catch them in onActivityResult
@Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        if (requestCode == CropImage.IMAGE_ACTIVITY_REQUEST_CODE && resultCode == RESULT_OK && null != data) {
            List<Image> images = ImagePicker.getImages(data);
            int categoryPosition = data.getIntExtra(IMAGE_CATEGORY, 42);
            int imagePosition = data.getIntExtra(IMAGE_POSITION, 42);

but extras are lost

There's other way you can achieve this, but i think this is not library responsibility to do this. Sorry.


Error Cannot read property 'setTabletopOptions' of undefined

Hi,
I keep on getting this error
Error Cannot read property 'setTabletopOptions' of undefined
Code;
'use strict';
angular.module('adf.widget.charts')
.service('chartService', function(){
return {
getUrl: function init(path, TabletopProvider) {
TabletopProvider.setTabletopOptions(
{ key: path,
simpleSheet: true } )
}
}
});

@heenaI Is this all your code? You're missing a few key things if so.

Add Tabletop as a dependency in your angular.module call
You're trying to configure TabletopProvider in a service. You need to configure it in [angular.config](https://docs.angularjs.org/guide/module#configuration-blocks), which sets up configuration at runtime. TabletopProvider isn't available after that (i.e., in a service).
You need to inject the provider into .config. See https://docs.angularjs.org/guide/di.

Closing as not an issue; please let me know if you try all the above and are still having issues. Thanks!

Thank you for your answer I am actually trying to make a widget with angular dashboard framework that reads googlespreadsheets. The problem is that I cannot get to data outside callback function here is my whole code
angular.module('adf.widget.charts', ['adf.provider', 'highcharts-ng'])
  .config(function(dashboardProvider){
    var widget = {
      templateUrl: '{widgetsPath}/charts/src/view.html',
      reload: true,
      resolve: {
        /* @ngInject */
        urls: function(chartService, config){
          if (config.path){
            return chartService.getSpreadsheet(config.path);
          }
        }
      },
      edit: {
        templateUrl: '{widgetsPath}/charts/src/edit.html'
      }
  };

  dashboardProvider
      .widget('piechart', angular.extend({
        title: 'Custom Piechart',
        description: 'Creates custom Piechart with Google Sheets',
        controller: 'piechartCtrl'
        }, widget));
  });

//controller and service

angular.module('adf.widget.charts')
   .service('chartService', function ($q){
    return {
      getSpreadsheet: function init(path){
        var deferred = $q.defer();
        Tabletop.init({
          key: path,
          callback: function(data, Tabletop) {
            deferred.resolve([data, Tabletop]);
      },
          simpleSheet: true,
          debug: true
        });
      }
    }

  })

  .controller('piechartCtrl', function ($scope, urls) {
   $scope.urls = urls;

});

view.html

    Please insert a repository path in the widget configuration

    <highchart id="chart1" config="chartConfig"></highchart>
    {{urls}}

edit.html
<form role="form">

    Google Spreadsheet URL
    <input type="text" class="form-control" id="path" ng-model="config.path" placeholder="Enter URL">

</form>

what I get in the console is just
You passed a new Google Spreadsheets url as the key! Attempting to parse.
tabletop.js:400 Initializing with key 1voPzG2Sha-BN34bTK2eTe-yPtaAW2JZ16lZ3kaDWxCs

Oh! I see what you're doing! You're really close!
Simply have getSpreadsheet return deferred — that way you get a Promise in your resolve handler, right now everything resolves without anything being returned anywhere.

Even if I return deferred I cannot get anything
'use strict';

angular.module('adf.widget.charts')
   .factory('chartService', function ($q, $rootScope){
    return {
      getSpreadsheet: function init(path){
        var deferred = $q.defer();
        Tabletop.init({
          key: path,
          callback: function(data, Tabletop) {
            deferred.resolve([data, Tabletop]);
      },
          simpleSheet: true,
          debug: true
        });

        return deferred.promise;
      }
    }

  })

  .controller('piechartCtrl', ['$scope', 'chartService', function($scope, chartService, urls) {
    $scope.getSheet = function() {
      chartService.getSpreadsheet(path).then(function(data) {
        console.log(data)
      })
    }

  }]);

@heenaI This is honestly more of an issue with Tabletop or Angular than it is with angular-tabletop — you're not even loading the library. Might be worth asking somewhere like #angular on Freenode, you'd probably get a faster response than asking me here.
That said, do you call $scope.getSheet anywhere? I can't see anything wrong with what you're doing, you're using Tabletop pretty much identically to how I use it in angular-tabletop. That said, the console.log call will never run if $scope.getSheet() isn't called anywhere (e.g., in a template).


Consider interaction commands for "locking" and "opening" interface

It would be possible to do little "in-game cutscenes", for instance when shooting a bear with an arrow, it would growl with npc_dialogue and have a timeout for remove_object. The problem of using remove_object with a timeout is that the player can click on the stage, drag items etc before the delayed command is enacted. So you could examine the dying bear, which will remove the dying growl and be quite weird narrative-wise.
Therefore, it might be a good idea to be able to "lock" the interface - it could e.g. gray out the inventory, and not respond to clicks or dragging until it is opened. The shift to non-interactivity needs to be communicated well to the user.

One way of communicating non-interactive state could be removing the inventory layer until control is back to the player.


Dynamically set password after ZipFile creation

Hey @srikanth-lingala,
thanks for maintaining such a top notch library. I wanted to upgrade from 1.3.2 to 2.1.2, but have a question concerning the API change.
Use case:
I have to process incoming zip files. They can be encrypyed or not, I do not know upfront. If they are encrypted i know how to generate the password from the file name.
With the old API, I could create a ZipFile and check its encryption status, and if true I could set the password:
Zipfile zip = new ZipFile(filename);
if( zip.isEncrypted() ){
  String password = generatePassword(filename);
  zip.setPassword(password);
}
// ... process zip

AFAIK, with the new API, I can only set the password when creating the ZipFile. I cannot set it afterwards. Also not via the ZipParameters, which was  also possible with the old API.
Question:
How can i handle this use case with the new API?
Or in other term, what happens when I proactively/preventively supply a password, but the zip is not actually encrypted. Does extraction still work correctly?
String meaninglessPassword = generatePassword(nonEncryptedFilename);
Zipfile zip = new ZipFile(nonEncryptedFilename, meaninglessPassword);
// ... process zip correctly?

Thanks for looking into this.

You have a very valid point here. The idea behind removing ZipFile.setPassword() is that a zip file is either encrypted or not*. And if it is encrypted, then the password can already be set in the constructor, which will save any additional line of code. But this obviously took away the flexibility to pass in password later on, as in your case.

what happens when I proactively/preventively supply a password, but the zip is not actually encrypted. Does extraction still work correctly?

Yes, it will still extract correctly. The password is only used if the zip file is encrypted. I know that this is not the most cleanest way to code, but unfortunately, at the moment in v2.x, this is the only possibility.
I will re-introduce ZipFile.setPassword() in the next release. But unfortunately, I do not have a date planned for next release. I would suggest you to use the fallback (to pass in a password as discussed above) in the meanwhile, and I will update this issue once this feature is ready to be used again.
Please let me know if you face any issues or passing in a password even if it is not encrypted does not work. I will prioritise the next release in this case and include a fix for it.

Technically speaking a zip file can also be both encrypted and non-encrypted at the same time. In other words, it is possible that some files in the same zip file are encrypted and some are not. But this is a very rare scenario. But zip specification allows such use cases.

Thanks for the quick response and looking into this matter. No hurry with the new release.
Since you are looking into tweaking the API, here is another observation when comparing the old and new API that might be useful:
Supplying the password and setting the parameters to use encryption are logically coupled, but are set on different objects now.
Before, setting the password and encryption parameters were coupled and centralized in the ZipParameters:
outStream = new ZipOutputStream(new FileOutputStream(file));

ZipParameters params = createParameterSet(getPassWord());
params.setFileNameInZip(fileName);
lOutputStream.putNextEntry(null, params);

outStream.write(data);

with
private ZipParameters createParameterSet(String password)
{
	ZipParameters params = new ZipParameters();

	// ... setting other params

	if (password != null && !password.isEmpty())
	{
		params.setEncryptFiles(true);
		params.setEncryptionMethod(Zip4jConstants.ENC_METHOD_AES);
		params.setAesKeyStrength(Zip4jConstants.AES_STRENGTH_256);
		params.setPassword(password);
	}
	return params;
}

Now this logical coupling is less obvious as you set the password on the stream
ZipOutputStream outStream = new ZipOutputStream(new FileOutputStream(file), getPassPhrase())

and must simultaneously know to handle another object, the ZipParameters, right via params.setEncryptionFiles(true).
So I think it makes sense to either allow to set the password on the params separately (and not on the ZipFile/Stream) or, if you do initialize ZipFile/Stream with a password, automatically set the params to encrption=true or even more, provide a default set of encryptionFiles/Method/Keystrength settings in this case.
But this is overall a minor issue and just my two cents. Thanks again.

The reasoning I made when moving the password from the ZipParameters level to the ZipInputStream level is, as mentioned above, a password belongs to the zip level and therefore belongs to the ZipInputStream instead of passing in each time with zip parameters and hence avoiding duplication of data. But I see your point. This might also lead to unclean code. You probably have to do something like this now:
ZipOutputStream zipOutputStream;

if (isEncrypted) {
  zipOutputStream = new ZipOutputStream(outputstream, password);
} else {
  zipOutputStream = new ZipOutputStream(outputstream);
}

And pass in the isEncrypted flag to createParameterSet() method in your case. One tip is that you can always set the password to null if zip stream is not encrypted. This way you can avoid if...else block.
When I redesigned the API, this felt right to me, because the password was on the ZipFile object (with a setter) and also on the ZipParameters object which lead to confusion and also inconsistency. I could not just include it on the ZipParameters object because this is only used for zipping and not used when unzipping, and therefore the only choice left was to have it on ZipFile object. One more reason is that with ZipFile api it was one additional line of code which can be passed in with a constructor.

Hey guys. I'm working on this issue. As zip4j is well designed, I don't want to mess it up. Fixing this issue may introduce a new API, so please let me make it clear. Please let me know if I have any misunderstandings.
Basicly I think re-introducing the ZipFile.setPassword() would solve this problem. I think the setPassword should be limited in ZipFile only, not in ZipOutputStream or ZipParameters, just as @srikanth-lingala noticed:

I could not just include it on the ZipParameters object because this is only used for zipping and not used when unzipping, and therefore the only choice left was to have it on ZipFile object.

But for this suggestion as @frankMilde mentioned:

if you do initialize ZipFile/Stream with a password, automatically set the params to encrption=true or even more, provide a default set of encryptionFiles/Method/Keystrength settings in this case

I'm not sure if this is a good idea. Currently the password in ZipFile is already used in unzipping files(e.g. extractFile, extractFile), but not in zipping(e.g. addFile, addFiles, addFolder, addStream). They will create a new ZipParameters if it's not specified. The new created ZipParameters is default to set encryptFiles=false, even if password is specified in ZipFile. I think @frankMilde would like us to provide a default set of settings when password is specified in ZipFile, for example:
encryptFiles = true
encryptionMethod = EncryptionMethod.ZIP_STANDARD

Therefore the user do not need to create a new ZipParameters and set these settings. Am I right @frankMilde ?
But I think this may mislead the users. They will not know what the encryption method then. Maybe the default encryption method could not meet their need, and they may not even know this setting if we provide the default settings. I'm not sure about this. What do you think @srikanth-lingala ?

I just think up a new case :
If we re-introduce the setPassword in ZipFile, then the password may mutate between several file adding actions. For example :
ZipFile zipFile = new ZipFile(filename);
ZipParameters parameters = initZipParametersWithEncrypt();
zipFile.setPassword("Password_ONE".toCharArray());

zipFile.addFiles(someFilesToAdd, parameters);

// mutate the password here
zipFile.setPassword("Password_TWO".toCharArray());

zipFile.addFiles(someOtherFilesToAdd, parameters);

This may cause that some files are encrypted with Password_ONE and some other files are encrypted with Password_TWO. I think this is a terriable case and I think we should avoid this case.
I think we should not let users reset the password by ZipFile.setPassword if the password is not null and not empty. What do you guys think about this?

@LeeYoung624 We only had to add a setPassword(char[]) to the ZipFile object. Actually, I had the fixes already on my machine. Thanks for looking into it, and I apologise that I did not update the thread about my fix. I just pushed the code changes for this issue.

Feature added in v2.1.3


Retry on Intermittent S3 Errors

Recently hit an error here:
https://github.com/civisanalytics/civis-python/blob/7a08b8c238ba1a6f447ddee68e4ddfc78a4ea560/civis/io/_tables.py#L346
where S3 returned an intermittent 500 on our GET to retrieve an object, causing the read_civis_sql call to raise an exception.
It'd be nice if we had a retry loop for S3 interactions to avoid these intermittent failures.

@stephen-hoover, did you run into this before?

Should we do something like this, except without the Civis API-specific header and maybe just the regular Retry class?

Oh, it looks like we already have a decorator for this.

There's a couple of functions in parallel which handle retries for files; see https://github.com/civisanalytics/civis-python/blob/c220a5244573e37f5687138059029f8c0bc7b957/civis/parallel.py#L470L574 . I'm not sure why the download retries weren't built into the get file functionality itself. I think that file uploads and downloads have gone through some changes since we put in the code in parallel.


Unable to pull from chat_server.

Hi, chat_server is running well but it appears there is no respond and hence the GUI is unable to connect. Is there some settings problem?

Hello zodiacRP,
In a terminal, can you call
$ curl ?
There is a check that is called when chainlit_interface.app.py is started, to make sure that the service is running.
If curl is not installed, this check will fail. I realize this error message is misleading. I will correct this.
In the meantime, if curl is not installed on your system, install it and I believe it should fix your problem.

I changed the code. The check is now performed with a call to requests.get() instead of curl.
Do:
$ git pull origin main

Hi Sebastien,
The curl is ok now. However, when I rerun the chat_server.py, it does appear the cache of the LLM seems to disappear and the size of the entire VM I am running is reduced. Errors on python also occurred. I thin k there is some issue with the code on reruns. Perhaps you can check it.
Best,
zodiacRP


Fix TabNav scrollbar always being present

change the overflow-x value to auto as opposed to scroll. With the intention of having the scrollbar only be present if it is necessary, and also not to create/add padding onto the page.

Reported at https://wellcome.slack.com/archives/CUA669WHH/p1668436398678739


error-cache: count how often a panic is send and do not send any more…

… errors after 20, reset after an hour

@tobstarr please review. Was an idea of @docstun to limit how often we send errors. If somebody wants to be evil, they will be. This is for accidental cases.

I would rather not merge this yet as we might run into issues e.g. on windows.
I would probably merge the version caching and this functionality into something using a single cache file. For the location I would recommend using https://golang.org/pkg/os/#TempDir


python27Packages.flask_login: 0.4.1 -> 0.5.0

Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/python2.7-Flask-Login/versions.
meta.description for python27Packages.flask_login is: '"User session management for Flask"'.
meta.homepage for python27Packages.flask_login is: '"https://github.com/maxcountryman/flask-login"

Checks done (click to expand)

built on NixOS

Warning: a test defined in passthru.tests did not pass

0 of 0 passed binary check by having a zero exit code.

0 of 0 passed binary check by having the new version present in output.

found 0.5.0 with grep in /nix/store/yhwj9rkrfyddjli902d0248axnd45q17-python2.7-Flask-Login-0.5.0

directory tree listing: https://gist.github.com/ee9037940bbc1dae9f98ad678f360a41

du listing: https://gist.github.com/6d8a9b67a025f6ab6e3406e5557285bb

Rebuild report (if merged into master) (click to expand)

36 total rebuild path(s)
9 package rebuild(s)
9 x86_64-linux rebuild(s)
9 i686-linux rebuild(s)
9 x86_64-darwin rebuild(s)
9 aarch64-linux rebuild(s)
First fifty rebuilds by attrpath
apache-airflow
flexget
python27Packages.flask_login
python37Packages.apache-airflow
python37Packages.flask-appbuilder
python37Packages.flask_login
python38Packages.apache-airflow
python38Packages.flask-appbuilder
python38Packages.flask_login

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/yhwj9rkrfyddjli902d0248axnd45q17-python2.7-Flask-Login-0.5.0 \
  --option binary-caches 'https://cache.nixos.org/ https://r-ryantm.cachix.org/' \
  --option trusted-public-keys '
  r-ryantm.cachix.org-1:gkUbLkouDAyvBdpBX0JOdIiD2/DP1ldF3Z3Y6Gqcc4c=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(r-ryantm's Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A python27Packages.flask_login https://github.com/r-ryantm/nixpkgs/archive/d739794bfe67db65e5a7ccb7fd1bbb43f60dbd17.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/yhwj9rkrfyddjli902d0248axnd45q17-python2.7-Flask-Login-0.5.0
ls -la /nix/store/yhwj9rkrfyddjli902d0248axnd45q17-python2.7-Flask-Login-0.5.0/bin

cc @abbradar for testing.

closing for staleness, bot can open a new PR if needed


http://opensanctions.org

Using my DNS, I cannot access http://opensanctions.org (as linked in header of project), only http://www.opensanctions.org

I can't seem to reproduce this. Can anyone else?

Ok, good :)


[chore] Configure UpdateSchools job to run via Sidekiq

Trello card URL:
https://trello.com/c/fAjSz0bt/537-configure-updateschoolsdatafromsourcejob-to-run-via-sidekiq
Changes in this PR:
UpdateSchools job is now executed via Sidekiq

 Configure UpdateSchoolsDataFromSourceJob to run via Sidekiq


JUnitBenchmarks upgrade [HPPC-44]

Dep. update: JUnitBenchmarks, 0.2.1

Issue: HPPC-44 (migrated from JIRA), created by Dawid Weiss (@dweiss), resolved Jan 25 2011

Comment by Dawid Weiss (@dweiss) (migrated from JIRA)
In trunk and on the branch.


Documentations and Video Tutorial for Laravel 5

It seeems like the documentation provided is only for laravel version 3, in video used version 3, could you please update content and show us its working with laravel 5 along with a detailed documentation.
thanks

+1

i would also like to see this.

Ditto. It's pretty hard to understand what to do in L5 with the new namespaces philosophy and all.

http://administrator.frozennode.com/docs/introduction is up to date and works for L5

I would also appreciate updates for Laravel 5.1.
Quite a bit has changed. From L4 to L5 and from 5 to 5.1

It works on L5.1 we are using the current v5.0.7 currently on L5.1 so @king724 whats the issue?


Expiration API as proposed imposes significant latency/size cost

A significant set of uses cases do not use cache expiration. This can be indicated in the API by setting Duration.ETERNAL.
The current API allows for dynamic changing of the expiration. To cater for this an implementation must keep modification/access times for all entries, even if the cache was created with Duration.ETERNAL. This imposes non trivial cost in time and space.
There are 2 possible solutions to this.

make Duration non dynamic (settable only at create time)
special case Duration.ETERNAL at create time to dissallow future changes (e.g. throw InvalidArgument if an attempt is made to change)

Personally I prefer (1)

Agree. Implemented option 1.


Strange behavioral of writeCharacteristic(BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] data)  method;

Summary
Method writeCharacteristic(BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] data); always trows an exception.(Write error: java.lang.NullPointerException: Attempt to get length of null array)
Preconditions
My problem is very strange i can use method writeCharacteristic(UUID characteristicUuid,  byte[] data); without any problems but if i switch to different constructor that receives in a first argument BluetoothGattCharacteristic  instead UUID  i get an exception.
Steps to reproduce actual result
A).  works perfect -
    .flatMap(rxBleConnection -> rxBleConnection.writeCharacteristic(bluetoothGattCharacteristic.getUuid(), b))
    .observeOn(AndroidSchedulers.mainThread())
    .subscribe(bytes -> {
        onWriteSuccess(bytes);
    }, this::onWriteFailure);

B). calls onWriteFailure with (Write error: java.lang.NullPointerException: Attempt to get length of null array)-
connectionObservable
    .flatMap(rxBleConnection -> rxBleConnection.writeCharacteristic(bluetoothGattCharacteristic, b))
    .observeOn(AndroidSchedulers.mainThread())
    .subscribe(bytes -> {
        onWriteSuccess(bytes);
    }, this::onWriteFailure);

C). bluetoothGattCharacteristic is the same object.

Hello,
Can you confirm that bluetoothGattCharacteristic that you use is obtained during the connection on which you are trying to use it?

Hi. Yes sure. I am obtaining it from:
     bleDevice.establishConnection(this, false)                 .flatMap(RxBleConnection::discoverServices)                 .first()                  .compose(bindUntilEvent(PAUSE))                 .observeOn(AndroidSchedulers.mainThread())                 .doOnUnsubscribe(this::updateUI)                 .subscribe(adapter::swapScanResult, this::onConnectionFailure);

Tell me what will happen if you do:
bleDevice.establishConnection(this, false)
    .flatMap(connection -> {
        connection.discoverServices()
            .flatMap(services -> /* get your bluetoothGattCharacteristic */)
            .flatMap(bluetoothGattCharacteristic -> connection.writeCharacteristic(bluetoothGattCharacteristic, bytes))
    })
    .observeOn(AndroidSchedulers.mainThread())
    .subscribe(
        this::onWriteSuccess,
        this::onWriteFailure
    )

Looks like there is a mistake in your example:
       bleDevice.establishConnection(this, false)                        .flatMap(connection -> {                          connection.discoverServices()                              .flatMap(services -> services.getCharacteristic(uid))                                   .flatMap(bluetoothGattCharacteristic ->                            connection.writeCharacteristic(bluetoothGattCharacteristic,  getInputBytes155Increment()));                 })//HERE IS MISSING RETURN STATEMENT                 .observeOn(AndroidSchedulers.mainThread())                 .subscribe(                         this::onWriteSuccess,                         this::onWriteFailure                 );

I haven't seen the whole of your code but I think you're trying to use a bluetoothGattCharacteristic that was obtained during some previous connection.
1. first connection starts
2. obtained bluetoothGattCharacteristic
3. first connection ends
4. first connection is cleaned up by the library
5. second connection starts
6. writing characteristic obtained on the first connection with the second connection
7. error

Lifecycle of items that are emitted from the RxBleConnection are bound to the lifecycle of it. They shouldn't be persisted and used across connections.

Ok thanks foa an answer. And GREAT thanks for a RxAndroidBle!!!


Run whole test/Base_Tests with NI

Pull Request Description
Fixes #10126 by various changes to make more test/Base_Tests pass in the Enso mode.
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:

[x] All code follows the
Java,
Rust
style guides.
[x] Test whole test/Base_Tests via ./runner in CI

We can run whole ./runner --run test/Base_Tests and not crash now. That's marks the first milestone:

416 failed tests

With cae2521faa the conversion failure:
  - [FAILED] should format correctly [2ms]
               Reason: '123,456,789.87654' did not equal '123.456.789,87654' (at /runner/_work/enso/enso/test/Base_Tests/src/Data/Decimal_Spec.enso:714:13-75).

should go away.

we have problems converting EnsoInputStream to hosted java.io.InputStream),

This is a particularly interesting problem.
We want to create something that looks like java.io.InputStream in the engine builtin (that's the engine level Java), we want to let Enso programs access that object as it has all InputStream methods - that's done by EnsoInputStream which extends TruffleObject, implements InteropLibrary and exposes invokeMember message for read & co. This works as well.
However then we want to pass this object into libraries Java level (the parser API expects an InputStream). However that's not the same Java level as the engine! Moreover, in the NI mode those can even be different JVMs - one native image compiled and one hotspot JVM or Espresso! In such a setup: What looks like InputStream on the engine level is just an opaque reference on the libraries level.
PS: It worked so far (as implemented by @hubertp) with asGuestObject because both engine and libraries were running in the same JVM - e.g. the InputStream reference was not opaque. But with NI+JVM mode (as outlined in the 3rd party libraries section) we cannot get the parsing working this way.

With 0695d1b the XML InputStream issue is fixed and we are down to

56 failures - lowest number seen so far

Another day and the test fight goes on:

down to 30 failures with ec0918f

This is a huge step forward. Congratulations on making all the tests pass in such a short time. Will there be a follow-up PR enabling test/Table_Tests as well?

The next step is to implement

#5298

-e.g. work on support for --jvm option, detection of compiled & 3rd party libraries as described in the #10121 discussion. From a perspective of that task, it is important to have some "3rd party library" (not compiled by NI). Standard.Table can play such a role.


How to add folder to autoload paths?

Hello!
I try to load with ffi.Library() some library located at the certain directory (for example lib/myLib.dll). But this library is linked to another library (for example core.dll). I thought myLib.dll would search for core library at the same folder (lib/core.dll), but it searches core library at the application's root folder (I know this because I tried to move core.dll to the root application folder and loading works).
So how can I add lib/ path to the autoload paths? I mean, paths which are traversed when one dll tries to load another it depens on?

DLL load paths are described for Windows here: https://msdn.microsoft.com/en-us/library/windows/desktop/ms682586(v=vs.85).aspx#standard_search_order_for_desktop_applications
I believe you're going to want to call the SetDllDirectory() function to add some more paths.

thanks, @TooTallNate ! How can I call this function from node.js in most simple way? Can I call it from node-ffi? Sorry, I can't understand in which system library SetDllDirectory() is located. Or maybe do there exist some other ways to achieve similar results?

Yes, use node-ffi for this.

I'm facing the same issue, ffi can't find the FreeImage.dll (which my DLL depends on) if its not in my project root folder. The problem is I want to put all my DLL's in a ./lib folder not in the project root. Some example?

@rsfernandes, didn't solve it too, I just place dlls at the project root

Thanks to share it. We are doing the same.

@insightcoder
In some of machine after setting path to system variable then also this is not working .To make work i have to put all the dlls to root directory .
do you have any idea ?

@BONDbATIF Are you on Windows/Linux/Mac?  If on mac/linux the above code may not work exactly since it hard-coded path separator ";".  I probably should have used path.delimiter to be cross-platform.  Another issue I have run into in the past, particularly on Windows, was some max-path limitations.  If this is the problem you could try prepending the dllPath to the system path instead of appending.

Well I am working in Windows.I tested in both scenario.In both case for me its not working.
Below path i pretended to system path .
C:\SVNWorkSpace\UI\SpotProClient\server\spotpro_bin;
No idea whats going on, for some of my team mates this approach is working fine .I checked in dependency walker .there also i did not got any clue .We are in dilemma ,safe side is to put dll in root directory, that work every time.

@BONDbATIF Can you post your code that does the path-setting?  I just tested again and could not get it NOT to work.  Is the windows path getting loaded correctly? (ie. double backslashes, or forward slashes)

var ffi = require('ffi'),
ref = require("ref"),
serverConnWrapperPath,
longPtr = ref.refType('long'),
async = require('async'),
stringPtr = ref.refType(ref.types.CString);
var fs = require('fs');
console.log("Loading SpotProList Module...");
if (process.platform == "win32") {
serverConnWrapperPath = __dirname + "\..\server\spotpro_bin\SCMuiWrapper";
} else {
// for MAC
serverConnWrapperPath = __dirname + "/../server/spotpro_bin/libSCMuiWrapper";
}
console.log("serverConnWrapperPath :" + serverConnWrapperPath);
//Creating Node wrapper library for native methods
var wrapperLibrary = ffi.Library(serverConnWrapperPath, {
"connectToServer": ["bool", ["string", "string", "string", "string"]],
"disconnectFromServer": ["void", []],
"GetSpotColorGroupsJson": ["char *", ["string"]],
});
spotpro_bin PATH  is pretended in system path .
And below are my folder structure .
SpotProClient\server\spotpro_bin- dlls
SpotProClient\electron-electron launching js file(index.js) and ffi node script file(here i am trying to load dlls).
please find the image

@BONDbATIF
Try something like this:
var libPath = path.join(__dirname, '..', 'spotpro_bin'); var libName = process.platform === "win32" ? 'SCMuiWrapper' : 'libSCMuiWrapper'; process.env.PATH =${process.env.PATH}${path.delimiter}${libPath}`;
var wrapperLibrary = ffi.Library(libName, {...})
`

@BONDbATIF
You got Win32 error 127, means dll can be found, but got error during load dll. check you definition, like this:
var wrapperLibrary = ffi.Library(serverConnWrapperPath, {
"connectToServer": ["bool", ["string", "string", "string", "string"]],  // <-------- maybe wrong params or param type
"disconnectFromServer": ["void", []], // <-------- maybe wrong params or param type
"GetSpotColorGroupsJson": ["char *", ["string"]], // <-------- maybe wrong params or param type
});

@waitingsong @TooTallNate @insightcoder @d9k @rsfernandes
checked all things ,The problem is same code working in some machine .Is something depends on OS ?
Dont know, in production whats is going to happen .
Could anybody tell me ,Which place i should put dll , so it will safe (All time it should work) .

dll and node env both are in 32 bit .this problem is coming in sometime machine .
Same dll is working in another machine .we tried in more the 3-4 machine .out of 5 machine 4 machine ,it is working file .5 machine few days back also working .

@BONDbATIF  Hi, Has this problem been solved ? 🙏


Upgrade to Hasql 19

Let the code review begin! There are elements of code style and of broken functionality that need help.
Note that this compiles but that all client requests fail with the error message, "another command is already in progress."

@nikita-volkov I'm having trouble understanding the database client error I keep receiving, "another command is already in progress." Am I not allowed to have more than one sql function per Session or to mix sql and query in a Session?

Do you use concurrency anywhere there? If not, then I suspect it's a bug in Hasql's implementation of sql.

I don't think there's concurrency. When the server starts up it creates a pool (from the resource-pool package) like this
  pool <- createPool (H.acquire pgSettings)
            (either (const $ return ()) H.release) 1 1 (configPool conf)

Then when a new request comes in it tries to grab a connection out of the pool and run the handler which is in a Session (Request -> H.Session Response). The handler ends up calling some functions that call sql and query a few times. I'm seeing the command-in-progress error right away on the first request.
One thing to note is that before serving requests postgrest runs a one-time query to determine the database structure. It does this within another withResource so that connection should be properly released and not interfere with the subsequent connection.
I can produce SQL logs if it helps. Thank you for helping to look into this.

Okay. I'll test it out on the Hasql side this weekend and post back here.
BTW, I maintain a Hasql-specialized wrapper over "resource-pool" for convenience: "hasql-pool". I must advise you against using the "Hasql.Pool.Handle" module there though, since it's experimental and I'll probably remove it in the next release.

@nikita-volkov I created a simplified program which illustrates the problem https://gist.github.com/begriffs/8eeb25597064fdfe6363

@begriffs looked over the code, look's good, the logic stayed the same, you changed the types to accommodate the new version of hasql.  The use of Text.InterpolatedString.Perl6 looks good.
:+1:

@begriffs Thanks for the reproduction - it's part of the testsuite now. The thing should be fixed in the latest release.

Thanks for the super fast Hasql fix!
The app appears to work well when I manually send requests. But the tests are still a problem. The first test works but subsequent ones cause the already-in-progress error. However here we might have real concurrency if each test is starting a web server which listens for a request on a new thread. All the specs are sharing the same connection.

You can't issue multiple requests on a single connection concurrently. Consider using a pool in this case.

Here's where we are now.

The tests work when I run each individually!
Still have that already-in-progress error

Interestingly, one of the tests raises this same error when run singly
Maybe it's a clue into the conditions causing the error

Continuous integration fails long before running the tests

It has a cabal dependency conflict (even when I rebuild without cache)
I'm wrestling with the question: should we use Stack in CI like this?
The advantage is a consistent build with what we do in development
The disadvantage is it could lead to poorer support for people who do not use Stack and who want to use PostgREST as a library in their projects

I should switch to hasql-pool as Nikita suggests

@nikita-volkov I found another situation that causes the in-progress error and I made a gist out of it. https://gist.github.com/begriffs/c632b5e3abe0984d2483
Basically If an error happens during a connection then attempting to run any future commands on that connection will cause the in-progress bug.

@begriffs Thanks again for the reproduction. It's fixed in the latest release.

OK it's rebased on master and passing the tests. Maybe give it one last look and I'll merge tomorrow. One source of errors that kept popping up was that I use decoders which expect values to not be null and they could become null. It's conceivable that I missed dealing with some cases like this and that they were not exercised by the tests. The way I dealt with the ones I fixed was to wrap sql terms in
coalesce(NULLABLE_VALUE, '')

Another approach would be to change the decoders for these kind of values to allow nulls and handle the resulting Maybe values in our Haskell code.


Define Haptic service

Thoughts on how we should present a haptic service on the bus?
As a Buzzer perhaps? Or shall we have a haptics service?

[ ] define haptics service

We can try to use https://microsoft.github.io/jacdac-docs/services/vibration/


why haven't we published an npm module in the last 2 years?

Intentional or are we waiting for a specific fix to land?

Yes, this has been on my mind as well. I've been focused on getting some of the bugfix PRs closed. But, now is probably a good time to do a release.

3.6.0 is out! Thank you for creating this issue.


Add grape instrumentation

I'm closing this PR and opening a new one so I can add the comments on a clean slate


Shallow clones not supported properly in VC commands

When I run M-x straight-freeze-versions, for example, I get a "Git failed" error if one of my repos is a shallow clone. The VC commands need a complete overhaul at some point.

just a heads up for whoever takes this issue on, there are some nasty interactions lurking here. for example, in the org-mode repository, release_9.4 is a tag object with sha1 50fd89cb9379c8dc64552146116273c23bcc7331. that tag object points to a commit, fbccf09c740a298e39daa9170bceaa92684f2fe0. however, you can't actually fetch the commit object from the repo because it's an unadvertised ref (git fetch --depth=1 fbccf09c740a298e39daa9170bceaa92684f2fe0 will fail). so you have to use the tag's sha1 in your lockfile. but then when you freeze the lockfile, it'll get changed to the commit sha1 instead (since the actual HEAD commit is fbccf09, not 50fd89c). then if you commit that change to your lockfile and you try to clone from scratch, you'll get the unadvertised ref error because you're on the commit sha1 again. honestly i don't even know what the correct behavior would be here

The reason for this is because Org is not hosted on GitHub, so their repository settings are different. In particular GitHub allows fetching unadvertised refs, but Org doesn't. If you try your experiment again with the Org mirror (https://github.com/emacs-straight/org-mode) then you should find that you can fetch the commit ref fbccf09c740a298e39daa9170bceaa92684f2fe0 just fine.
What should happen is straight.el will attempt to do a shallow clone, have it fail, and fall back to the full clone. (Does that happen?) I don't think there's anything better to do, other than report a bug to the Org repo maintainers to please allow us to fetch unadvertised refs.
Hacking around with tag refs is I think not a good path to start down. We should do it on the commit level, or not at all.

What should happen is straight.el will attempt to do a shallow clone, have it fail, and fall back to the full clone. (Does that happen?)

yep this fallback happens (with #616). but it is possible to have the shallow clone succeed, if you put 50fd89c in your lockfile. if you do that, then you get into the weirdness i described. i agree there's probably nothing better for straight.el to do in that situation


Anyone can explain how the factors are bined?

Problem Description
I'm working through some examples that come from the book from Stefan Jansen. I want to understand how the factors are attributed to bins and what's the meaning of zero_aware.
quantize_factor is the function that makes the attribution
code from quantile_calc inside quantize_factor
if _quantiles is not None and _bins is None and not _zero_aware:
return pd.qcut(x, _quantiles, labels=False) + 1
factor_quantile = factor_data.groupby(grouper)['factor'] \
    .apply(quantile_calc, quantiles, bins, zero_aware, no_raise)

called with the below code (call it "normal call")
lr_factor_data = get_clean_factor_and_forward_returns(factor=lr_factor,
prices=trade_prices,
quantiles=5,
periods=(1, 5, 10, 21))
I was expecting that the assignment should be "direct". But is not. Below code
pd.qcut(lr_factor_data['factor'], q=5, labels=False)
Does not attribute the same quintiles that "normal call" attributes.
Also, I do not understand what "zero aware" is doing. It puts on the same quintile positive and negative factor values, I do not grasp well what's the intention.
Versions

Alphalens version: 0.36
Python version: 3.8
Pandas version: 1.1.3

You can control the binning function with the quantiles and bins arguments. When quantiles is used the factors bins are built using the notion of quantile: so the factor values distribution will be split in equally sized  quantiles, each split of this distribution is a quantile. When  bins is used, then the factor values distribution will be split in equal value ranges. In this case you might have different number of entries per bin.
You might want to have a look here for more information: https://github.com/quantopian/alphalens/blob/master/alphalens/examples/alphalens_tutorial_on_quantopian.ipynb

You can control the binning function with the quantiles and bins arguments. When quantiles is used the factors bins are built using the notion of quantile: so the factor values distribution will be split in equally sized  quantiles, each split of this distribution is a quantile. When  bins is used, then the factor values distribution will be split in equal value ranges. In this case you might have different number of entries per bin.
You might want to have a look here for more information: https://github.com/quantopian/alphalens/blob/master/alphalens/examples/alphalens_tutorial_on_quantopian.ipynb

found the answer in the end, binning is done by date and then on factor:
Since financial market data are extremely noisy, it would be very hard to find a correlation between a specific factor value and future returns. For this reason Alphalens computes the statistics on factor quantiles instead on the factor values themselves. Quantiles are created taking the daily factor values distribution and split it into equal-sized buckets based on their values. This operation is done on a daily basis. The idea behind quantiles is that grouping stocks helps to increase the signal-to-noise ratio.
https://github.com/quantopian/alphalens/blob/master/alphalens/examples/alphalens_tutorial_on_quantopian.ipynb

found the answer in the end, binning is done by date and then on factor:
Since financial market data are extremely noisy, it would be very hard to find a correlation between a specific factor value and future returns. For this reason Alphalens computes the statistics on factor quantiles instead on the factor values themselves. Quantiles are created taking the daily factor values distribution and split it into equal-sized buckets based on their values. This operation is done on a daily basis. The idea behind quantiles is that grouping stocks helps to increase the signal-to-noise ratio.
https://github.com/quantopian/alphalens/blob/master/alphalens/examples/alphalens_tutorial_on_quantopian.ipynb


HttpRequest Params or indexer throws InvalidOperationException when request has content type other than form.

PR Title
HttpRequest Params or indexer throws InvalidOperationException when request has content type other than form.
PR Description
In the Params or indexer on HttpRequest, do not try to access Form property when request has content type other than form, because this throws an InvalidOperationException
Fixes #309

Thanks @sdekock! This looks great and thanks for adding the tests.
Should this check also be on the Form indexer? Do we have similar behavior if the content type is not form?

Test results
ASP.NET
GET / HTTP/1.1

Request.Files is empty HttpFileCollection or HttpFileCollectionWrapper
Request.Form is empty HttpValueCollection
Request.Form["test"] is null
Request.Params["test"] is null
Request["test"] is null
POST /?test=a HTTP/1.1
Content-Type: application/json

{ test: 'b' }

Request.Files is empty HttpFileCollection or HttpFileCollectionWrapper
Request.Form is empty HttpValueCollection
Request.Form["test"] is null
Request.Params["test"] is "a"
Request["test"] is "a"
POST /?test=a HTTP/1.1
Content-Type: application/x-www-form-urlencoded

test=b

Request.Files is empty HttpFileCollection or HttpFileCollectionWrapper
Request.Form is HttpValueCollection with entry test = "b"
Request.Form["test"] is "b"
Request.Params["test"] is "a,b"
Request["test"] is "a"
ASP.NET Core (without changes in this PR)
GET / HTTP/1.1

Request.Files throws InvalidOperationException: 'Incorrect Content-Type: '
Request.Form throws InvalidOperationException: 'Incorrect Content-Type: '
Request.Form["test"] throws InvalidOperationException: 'Incorrect Content-Type: '
Request.Params["test"] throws InvalidOperationException: 'Incorrect Content-Type: '
Request["test"] throws InvalidOperationException: 'Incorrect Content-Type: '
POST /?test=a HTTP/1.1
Content-Type: application/json

{ test: 'b' }

Request.Files throws InvalidOperationException: 'Incorrect Content-Type: application/json'
Request.Form throws InvalidOperationException: 'Incorrect Content-Type: application/json'
Request.Form["test"] throws InvalidOperationException: 'Incorrect Content-Type: application/json'
Request.Params["test"] is "a"
Request["test"] is "a"
POST /?test=a HTTP/1.1
Content-Type: application/x-www-form-urlencoded

test=b

Request.Files is empty HttpFileCollection or HttpFileCollectionWrapper
Request.Form is StringValuesReadOnlyDictionaryNameValueCollection with entry test = "b"
Request.Form["test"] is "b"
Request.Params["test"] is "a"
Request["test"] is "a"

@twsouthwick I added the content-type check to the Files and Form properties and I have added the missing Form property to HttpRequestBase/Wrapper.
The only incompatibility still now is that Params apparently returns a combined collection of QueryString, Form, Cookies, and ServerVariables items. Unlike the indexer, which returns the first item found from those collections.
I'm unsure how I can accomplish that in an efficient way.

The only incompatibility still now is that Params apparently returns a combined collection of QueryString, Form, Cookies, and ServerVariables items. Unlike the indexer, which returns the first item found from those collections.
I'm unsure how I can accomplish that in an efficient way.

Maybe we'll need to do what was done on framework. We tried to be efficient without copying things, but for this behavior we may need to. At least it won't be worse than framework :) See https://referencesource.microsoft.com/#System.Web/HttpRequest.cs,794 for how that was done.

Do you want to update the params for the indexer in this PR? Otherwise, it LGTM and we can merge it in.

Ok - seems like we should create an issue to track it and not block this fix from going in.

Thanks @sdekock for the fix here. I created #312 to track the issue with params - if you come up with a good solution there happy to take another PR :)


Remove a user if state=='absent'

We need a way to remove admin accounts if they leave or change role.

Could you also the state field into the example entry in the defaults file?

Yes, I'll do it now

Thanks for the PR!