Calling *CompiledFunction from Go

I'm trying to load a script and then call a tengo function by name. I'm currently doing something like this:
script := tengo.NewScript(source)
compiled, err := script.RunContext(ctx)
fn := compiled.Get("someFunction")
fn.Call( ... )

It looks like fn is a *CompiledFunction. Its CanCall method returns true, but it doesn't appear to actually implement the Call function, only via its embedding of ObjectImpl.
Is it possible to call into a *CompiledFunction from Go?

Hi, it is not possible to call *CompiledFunction from Go for v2. CanCall() and Call() methods are used in VM and let you provide callable to scripts from any type implementing them. See this page
Let me know your use case so I may suggest some workarounds.

Hey, thanks for the reply. What I'm trying to do is essentially use Tengo functions as callbacks. So the user provides a script with a few named functions, which the Go code will call into when certain things happen.

Here is a simple snippet for you I hope it helps;
package main

import (
	"log"

	"github.com/d5/tengo/v2"
	"github.com/d5/tengo/v2/stdlib"
)

func main() {
	src := `
text := import("text")

m := {
	contains: func(args) {
		return text.contains(args.str, args.substr)
	}
}
out := undefined
if f := m[argsMap.function]; !is_undefined(f) {
	out = f(argsMap)
} else {
	out = error("unknown function")
}
`
	script := tengo.NewScript([]byte(src))
	script.SetImports(stdlib.GetModuleMap("text"))
	argsMap := map[string]interface{}{
		"function": "contains", "str": "foo bar", "substr": "bar"}
	if err := script.Add("argsMap", argsMap); err != nil {
		log.Fatal(err)
	}
	c, err := script.Run()
	if err != nil {
		log.Fatal(err)
	}
	out := c.Get("out")
	if err := out.Error(); err != nil {
		log.Fatal(err)
	}
	// If it returns a dynamic type use type switch using out.Value()
	log.Println("result =", out.Bool())
}

Thanks Ozan, that looks like a decent solution. My only concern is that I'm planning to have lots of these scripts, and this extra boilerplate around each of them would harm readability.
I've hacked together a solution which pokes the correct sequence of instructions into a *VM and pulls the return value back out at the end. It seems to work for some trivial test cases, and I'm planning to try it out in practice for a little while to solve my current problem.
I'd be fine with keeping this code on a private branch for my purposes (assuming it works in practice), but I wonder if you have any thoughts on this approach and if something similar may be accepted in a PR?

Hi Tom, thank you for sharing your work. It will be hard for you to keep sync with upstream repository, I guess. I studied Bytecode today and created an example, which has some code from your hack and my Go love :). Code is not tested!
Here is the gist link to call *CompiledFunction from Go easily. As it is an example, no module support is added.
I used main script to define functions not source module. Return value of called function is set to a global variable instead of accessing VM.stack.
What do you think?
This is preview;
const mathFunctions = `
mul := func(a, b) {
	return a * b
}
square := func(a) {
	return mul(a, a)
}
add := func(a, b) {
	return a + b
}
`
func main() {
	s := NewScript()
	if err := s.Compile([]byte(mathFunctions)); err != nil {
		panic(err)
	}
	v, err := s.Call("add", 1, 2)
	if err != nil {
		panic(err)
	}
	fmt.Println(v)
	v, err = s.Call("square", 11)
	if err != nil {
		panic(err)
	}
	fmt.Println(v)
	v, err = s.Call("mul", 6, 6)
	if err != nil {
		panic(err)
	}
	fmt.Println(v)
}

Nice! That looks perfect. I'll pull this into my local branch and have a play around with it tomorrow, thank you.
Perhaps this could be extended to support functions passed into Go from Tengo as well?  I believe the first operand to OpCall can be any object which is callable, perhaps in addition to call by name we could expose another function with the signature Call(fn Object, args ...interface{})? Unsure if this would work correctly with closures though.

I just revised the gist (rev3), I forgot to use only new instructions instead of adding to original bytecode.
I will check Call(fn Object, args ...interface{}) later but as you said, probably closures do not work. Currently, only CompiledFunction run.
Please see my old example

Thanks again Ozan, I've integrated that with my code and it seems to work perfectly.
I've extended it a bit to support modules, and to pull in the Set, Get, SetImports etc. functions from tengo's Script type. I've also added a Callback type which wraps up a callable tengo.Object and a Script into one struct with a Call method, as I wanted to pass handles to these tengo functions around.
It seems to work fine with closures too, at least in my trivial test case.
Here's my final code: https://gist.github.com/tgascoigne/f8d6c6538a5841bcb5f135668279b93b
Many thanks for all your help!

Thanks Tom, it is excellent. Everything works as expected with all features, why not. We only run new instructions with current constants and globals which looks harmless. Tengo functions can easily be called. It would be better if it did not run script once to get compiled functions from globals but anyway it works, may be later we can figure out how to get them easily from constants. If you allow me, I will create a new open source repo for this module and try to improve it in time using the final draft.

It would be better if it did not run script once to get compiled functions from globals but anyway it works, may be later we can figure out how to get them easily from constants.

I think compiling and running the script ahead of time is the right thing to do - without it, I think things like non-constant globals would not be initialized correctly when referred to by functions. In my case, the overhead from doing so is not an issue as I'm storing the compiled result and reusing it multiple times.

If you allow me, I will create a new open source repo for this module and try to improve it in time using the final draft.

Please do :)

I think compiling and running the script ahead of time is the right thing to do - without it, I think things like non-constant globals would not be initialized correctly when referred to by functions. In my case, the overhead from doing so is not an issue as I'm storing the compiled result and reusing it multiple times.

Yes you are right keeping as it is is only solution. After adding context support, interface{} conversion wrappers and documentation, couple of days later it will be released :). Finally, I can call tengo functions from my rule engine!

Sounds like there were some meaningful outcomes here! Sorry that I missed the discussions, but please let me know if there's anything else I can do.

@d5 I created a repo for calling Tengo functions from Go with @tgascoigne . Code is mostly ported from Tengo script.go file. Please have a look at https://github.com/ozanh/tengox. We need your expertise. Docs and examples are still missing, but tests look good.

tengox is brilliant! 😄 Good job!
One thing I'd suggest is that you make them more portable or detached. A similar example would be the relationship between tengo.Script and tengo.Compiled. tengo.Script creates a new instance tengo.Compiled instance for each compilation. Then each tengo.Compiled instance can be used independently without affecting its parent tengo.Script.
Another thing we can consider is to bring that concept back to tengo.Script. Maybe we can add Script.CompileFunc(funcName) that returns CompiledFunc, which can be used in a similar way that Callback in tengox is used.
Just a thought.

I'd love to see this included in Tengo, as there's a good chunk of code that had to be duplicated to make this work. If we were to change the API, there's a few qualities of Ozan's implementation I'd like to preserve:

The ability to have a single handle which contains all of the information needed to invoke a function (*Callback). This is useful for storing functions and passing them around.
The option to work with both named functions and tengo.Objects. This means we're not just limited to calling top level function definitions, but function literals and closures too.
As we're currently executing the whole script as a prerequisite, we're able to make use of non-constant globals which get initialized along the way.

@tgascoigne we need some time to integrate it in tengo, library must be mature enough to propose any changes. Although we can easily integrate this implementation to tengo passing callbacks to interfere compilation and run processes to change current behavior, we need some time.
We can change the tengox Script type to make it similar to tengo's. Separation as Script and Compiled enables to get rid of source code []byte by garbage collection if not required any more by user and makes maintenance easier. I can change signature of Script.CompileRun() error to Script.CompileRun() (*Compiled, error) this is trivial.
*Callback usage may bite some users by letting them to run them in Go side before VM finished and it can cause lock and lock the VM loop. For example;
        scr.Add("pass", &tengo.UserFunction{
		Value: func(args ...tengo.Object) (tengo.Object, error) {
			_, _, = scr.MakeCallback(args[0]).Call()
			return tengo.UndefinedValue, nil
		},
	})

Above usage looks idiomatic but pauses VM indefinitely due to mutex. We can return a promise object or a channel I don't know may be I am missing something but Murphy's law, it can happen. Please guide me.

Any advance on this issue? Would love to be able to execute Tengo functions from Go.

PoC (I don't know any bugs, down-sides - didn't test in production, event not on sandbox) here: https://github.com/d5/tengo/pull/372

I'm playing around to implement games with go and I really feel in love with allowing to attach tengo scripts to the game objects. I also have a event system, which I want to be able to be used from within a tengo script.
I was think something like this:
init := func(node) {
  node.bind("myevent", func(e) {
        fmt.println(e)
  })
  node.x = ...
}

update := func(node) {
    ....
}

draw := func(node) {
    node.image.fillRect(...)
}

I realize this ticket is quite old, but was anything done to the tengo core to make it possible to work with callbacks?
Or is the example here (https://github.com/ozanh/tengox) still the way to go?
great work!


Request: Support for k3s import

Hi,
hope you could support k3s in the future. k3s comes with its own containerd.
ctr needs to be called with k3s in order to import the images, e.g. k3s ctr image import
Since k3s also supports an Air-Gapped installation, this would make a perfect duo 🙌
Kind regards

Sounds great! Perhaps we can just check if k3s in PATH and run that when we do import? Fancy pushing a pr?

Sorry for my late reply. I moved away from mindthegap because I noticed other incompatibilities that may come from using specific helm charts in our Harbor at my company. Since mindthegap does not export the repository, image name and tag information (or at least I was not able to configure mtg to do so), k3s reports an "ImagePullBackOff" because it is looking in containerd for this information to build the pod.
I created a bash script with a combination of "helm show" and "helm template" to extract this information and pipe it to "docker pull" and then to "docker save" to create tar balls for "k3s ctr image import". The downside to this are redundant fragments, but at least it works.
If you are interested in my solution, I could try to share it with you.
Regards


About for classcification

Thank you for you tutorial and implementation of triplet loss. I have one questions about how to use the triplet loss for classification. If we need to do the classification, we could use the "embeddings" and then take the "embeddings" as feature then train model like SVM,GBDT to classify? This way the triplet-loss works like a feature extractor. Do you have any other suggestions for classification? Thanks.

how to use the triplet loss for classification.Do you have any code to share?

You can just run a kNN algorithm here. For instance, in the embedding space, you could run a 3-NN search. Then, you will get the labels of the 3-NN's results. And just take the majority.

Since estimator.predict can only return the embeddings but not the labels, I have to use the following codes to get the labels of the training data to do 3-nn search. However, I got the following error:
GraphDef cannot be larger than 2GB. Is there any better way for classification?
dataset = cifar_dataset.train()
dataset = dataset.map(lambda img, lab: lab)
dataset = dataset.batch(train_length)
labels_tensor = dataset.make_one_shot_iterator().get_next()
train_labels = sess.run(labels_tensor)

@omoindrot  We can learn embeddings through triplet loss, but we can not get the label at once. Therefore, I wonder if you can add some FC layers with a softmax  layer after triplet loss so that the softmax layer could learn a classification plane and output the score at once.

You could for instance train a good embedding with triplet loss, then freeze this network and add one or more fully connected with a final softmax.
image --> frozen network --> embedding --> FC --> FC --> softmax

However this is in the case where you know in advance the number of classes you have.
Triplet loss is often used in projects where you don't know the number of classes, such as in face recognition.
With a triplet loss trained embedding, you can easily check if two faces are close together or not, and have a threshold to indicate whether they belong to the same person or not.

What threshold should you use to compare two embeddings? Is it the margin hyperparameter you used in training?

@justasbieliauskas : yes the margin parameter can be used as a threshold to classify two images as belonging to the same class or not.

@omoindrot @justasbieliauskas I do not agree that you can treat the margin as the threshold, because margin defines the target difference of distances between positive and negative pairs (Dap - Dan) not the distance intself. Experimenting with few different NN architectures I found that there are different optimal thresholds for different architectures. This can especially vary if you normalise the output embeddings vector and/or if you use relu at the last (embeddings) layer (which you should not do)

Good point @bartoszpawlowicz


Update f5-big-ip-forms-advanced.md

Few tweaks. Link to Monitoring tutorial to be added.

@Rainier-MSFT : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Hi @Rainier-MSFT - This pull request was opened in the public repo. PMs should work in the private repo, per the Microsoft Docs contributor guide. We can keep this PR open for review and merge, but would you make future content updates in the private repo? Thank you!


Add support for LNCS

This PR adds support for LNCS. Based on the Simplified LNCS Template.

[x] Solve " issue -- details: https://tex.stackexchange.com/a/150958/9075

I merged, because LNCS works. Next steps will be to get the main template fixed


[OSB] Buying multiple spoils of war brings a "busy" message

🐛 Bug Report
Trying to buy 2 or more Spoils of war gives the message "[Minion] is busy.". Buying a singular spoil of war works as intended. Attached image shows bug

Looks like not buying multiple at a time is intended for now. No bug here!


Add support to Visual Studio 2022

Visual Studio 2022 is now a 64-bit application, and will not install any extensions packaged for previous versions, even with open-ended versioning.
According to Microsoft's documentation, it's now required to specify 2 installation targets like this:
<Installation>
   <InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[16.0,17.0)">
      <ProductArchitecture>x86</ProductArchitecture>
   </InstallationTarget>
   <InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[17.0,)">
      <ProductArchitecture>amd64</ProductArchitecture>
   </InstallationTarget>
</Installation>

Also I have tested this change by manually replacing the vsixmanifest with 7-zip and was able to install the extension. But there are still some erros in the execution (I see the log messages of solution building, but no dialog appears). Maybe I can debug these errors later, when I get some time.
Btw, this project is really awesome! I'm surprised there are no forks or any other open issues. This thing really deserves more attention.

Hi @BlinD-HuNTeR :)
Thank you for your interest and your feedback. I took a bit of a pause on SubSolution but I will come back on it soon to release the extension on the Visual Studio Marketplace.
About the Visual Studio 2022 compatibility, it seems there are more changes to do to build it for 64 bits (see Extensions WITH running code). I finally installed VS 2022 and I will try to make some tests soon.

Visual Studio extensions are now available for both VS 2019 & 2022 on the Visual Studio Marketplace.


Datepicker-panel getting created outside overlay component

Datepicker-panel getting created outside overlay component.

This issue is present in the npm package. When updated the contents from github, this issue was resolved.


Internal exception when a breadcrumb has data with url: null

Do you want to request a feature or report a bug?
bug
What is the current behavior?
If you have a null data property called 'url', the library has internal errors.
Just try this:
Raven.captureMessage('Installation referral url received.', {
  level: 'info',
  tags: { installationReferralUrl: true },
  extra: { url: null },
})

The exception comes from:
https://github.com/getsentry/raven-js/blob/master/src/raven.js#L1609
Just put a check for a null value or modify truncate to return empty string for null values
What is the expected behavior?
It will not have said error.
React Native, raven-js v3.13.1

Can you provide an actual error?
Code you pointed already guards for situations like the one above (simplified example):
var urlProp = 'url';
var data = {
  url: null
}
if (data.hasOwnProperty(urlProp) && data[urlProp]) {
  throw new Error('Look ma, no url prop')
}

// this will not throw, as data[urlProp] returns null, and if statement won't trigger the code inside it

@kamilogorek you are right.  Our version was slightly out of date and didn't have the guard code.  We just need to upgrade.  Thanks!


rockpi4: Add Rock Pi 4 support

@wlozano0collabora Can you make sure this is in sync with https://gitlab.collabora.com/rockpi/rockpi4 please ?

Unfortunately I prepare this MR long time ago, when I had a RockPi 4 to test this. Since I don't have the hardware any more I can't confirm that the recipe is still valid.


Dynamic path

Hi dear contributors,
Dynamic paths such as "/user/:id" are supported ?
I looked for this feature for 2 hours but I didn't achieve...
Thanks in advance !
EDIT: I'm reoping this issue because I found a solution but acutally the all page is reloading, maybe you know another way
I added this code  :
gatsby-node.js
exports.onCreatePage = ({ page, actions }) => {
  const { createPage } = actions;

  if (['/login/', '/register/', '/forgotten-password/', '/reset-password/'].includes(page.path)) {
    page.context.layout = 'auth';
    createPage(page);
  }
  if (page.path.match(/^\/user\/medical-file\//)) {
    page.matchPath = '/user/medical-file/*';
    page.path = '/user/medical-file';
    page.context.isDynamicPath = true;
    createPage(page);
  }
};

Layouts/index.tsx
<LayoutColumns>
    <LayoutColumn className="main-content">
      {pageContext.isDynamicPath ? (
        <Router>
          <MedicalFile path="/user/medical-file/:reference" />
        </Router>
      ) : (
        children
      )}
    </LayoutColumn>
  </LayoutColumns>

Hi @milinkovitch,
Our project is a UI library. It contains components you can use.
What you look for here is not our options. It depends on your use framework if it GatsbyJS or NextJS or a regular react project with any route package


No documentation for formatting requests

I'm trying to get a request with a secret to work, however no matter what I do webhook claims that the signature is incorrect.
At first I got and error message about Content-Type, but that I fixed by looking at source code.

Please provide more details such a sample config.


Xiaomi Wall Switch - State does not change but click is registerd

Home Assistant release with the issue:
80.0
Last working Home Assistant release (if known):
-/-
Operating environment (Hass.io/Docker/Windows/etc.):
Rasbian
Component/platform:
https://www.home-assistant.io/components/xiaomi_aqara/
Description of problem:
an Xiaomi wall switch, it is paird and works normally with the Mi Home app. but in HA the state of the binary_sensor.wall_switch_xxxxxxxxx is not chaning when I press the buttons.
My other xiaomi devices (motion sensors) work fine.
in the log a click is registered but the state is not changing:
log entries generated after click::
2018-10-17 21:44:10 DEBUG (MainThread) [homeassistant.components.xiaomi_aqara] PUSH >> <Entity Wall Switch (Left)_158d00026baa9a: off>: {'channel_0': 'click'}
2018-10-17 21:44:10 DEBUG (MainThread) [homeassistant.components.xiaomi_aqara] PUSH >> <Entity Wall Switch (Right)_158d00026baa9a: off>: {'channel_0': 'click'}
2018-10-17 21:44:10 DEBUG (MainThread) [homeassistant.components.xiaomi_aqara] PUSH >> <Entity Wall Switch (Both)_158d00026baa9a: off>: {'channel_0': 'click'}

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
xiaomi_aqara:
  discovery_retry: 5
  gateways:
    - key: xxxxxxxxxx

This is by design. An event is published when the switch is pressed and you need to use the event as a trigger instead of a state change.  See an example here: https://www.home-assistant.io/components/xiaomi_aqara/

thankss for your info, but with with wallswitches there is only the click type "click".


Feature request: proper control over filter order with ordinals

Is your feature request related to a problem? Please describe.
Currently the only way to influence the order of ClusterFilters (and namespaced filters) is to put them in alphabetical order.
Also we cannot have some clusterfilters run after the evaluation of namespaced filters. The order is fixed, first clusterfilters, then namespaced filters.
This makes it difficult to perform some final clusterfilters after all other filters are done and right before sending off to an output.
Describe the solution you'd like
Introduce an ordinal attribute to ClusterFilter and Filter CRD-s.
Ordinal should not be mandatory (for backward compatibility) and the default should be 0.
ClusterFilters should be sorted primarily by ordinal, and secondarily alphabetically.
Filters (namespaced) should be sorted primarily by ordinal and secondarily alphabetically.
Example:
ClusterFilter A: no ordinal specified
ClusterFilter B: ordinal=0
ClusterFilter C: ordinal=-10
ClusterFilter D: ordinal=10
filter chain then looks like:
C-> A -> B -> D

An additional annoyance that I think I will put in a different Issue is allowing some clusterfilters to be applied AFTER namespace filters have already been applied.


automock doesn't work when unmockedModulePathPatterns is set to []

🐛 Bug Report
Automock doesn't work when the unmockedModulePathPatterns is set to []. An empty array as doc says should be a default value. Setting unmockedModulePathPatterns to non empty array  or removing this param from config start automocking working again.
To Reproduce
Steps to reproduce the behavior:

Set unmockedModulePathPatterns: [] and automock: true in your config
Test if the module that should has been automocked (it won't)
Add whatever non-empty string item to unmockedModulePathPatterns, e.g. unmockedModulePathPatterns: ['mock']
The automock will start working

Expected behavior
The automock should work for unmockedModulePathPatterns: [] or if it should not work for some reason the docs should be updated.
Link to repl or repo (highly encouraged)
https://repl.it/repls/SinfulSilentDirectories
Run npx envinfo --preset jest
Paste the results here:
  System:
    OS: macOS High Sierra 10.13.6
    CPU: x64 Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
  Binaries:
    Node: 8.7.0 - /usr/local/bin/node
    Yarn: 1.2.1 - /usr/local/bin/yarn
    npm: 5.5.1 - /usr/local/bin/npm
  npmPackages:
    @types/jest: 22.2.0 => 22.2.0
    jest: 22.4.2 => 22.4.2

I just had the issue and at least I found this issue to fix it. Will it be fixed?


Don't buffer requests if there won't be a retry

Description
Updates RetryPolicy and RequestRetryPolicy to not buffer the request if a retry won't be performed.
There were also a few other fixes:

RetryPolicy didn't buffer the request body.
RequestRetryPolicy is no longer turning the request body into a Flux<ByteBuffer> in the async case.
RequestRetryPolicy's synchronous implementation put the delay in the wrong location, it should happen before processSync is called.

All SDK Contribution checklist:

[x] The pull request does not introduce [breaking changes]
[x] CHANGELOG is updated for new features, bug fixes or other significant changes.
[x] I have read the contribution guidelines.

General Guidelines and Best Practices

[x] Title of the pull request is clear and informative.
[x] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

[x] Pull request includes test coverage for the included changes.

API change check
API changes are not detected in this pull request.


error in python demo.py

Hi
thank you your great paper.
here is my error when i run demo.py.
Could you give me some help plz.

Please turn off the CUDA option to check other dependencies. There may be something wrong with your CuDNN environment. I can run the demo with PyTorch 0.3, CuDNN 7.

thanks for your attention, turn out my Graphics card didnt have enough memory.


Adding waiting (-w) in iptables for wg-iptables service

At one point I overloaded the server and Wireguard was not working on it. I began to understand and found out that the wg-iptables service did not start. The logs were:
May 19 17:50:27 server.domain iptables[714]: Another app is currently holding the xtables lock. Perhaps you want to use the -w option?
May 19 17:50:27 server.domain systemd[1]: wg-iptables.service: Main process exited, code=exited, status=4/NOPERMISSION
May 19 17:50:27 server.domain systemd[1]: wg-iptables.service: Failed with result 'exit-code'.
May 19 17:50:27 server.domain systemd[1]: Failed to start wg-iptables.service.

Then I started googling this problem and found out that the problem is that your startup commands do not specify to wait in case of blocking. This patch fixes the problem.

@Nyr I would love to see that merged!


Error in built-in script will stay in the debugger and spam console

Godot version:

3.2.2
Steps to reproduce:

Create a scene with built-in script which has an error (e.g. call("noexist"))
Run this scene, so the error appears in the debugger
Close the scene
Run another scene
Notice that with each run, there's an error in the console about a resource not found (referring the faulty script)
With
Each
Run
And there's no way to clear it
(unless another error appears and replaces it)

Fixed on master :/


Request permissions when opening the app

When opening the app, the app should ask the user for all permissions to function properly, eg "set phone app as default", "contacts permission", "show above other apps", "call log", " microphone ”,“ sms ”….
Currently you have to go into the settings and manually set it as the default phone and give all the various permissions

Im in process of this. I have also updated app to androidx fragments still need to update preference fragments

Added

Thanks


RID Spam and Broken Temp Normal Map Generation

Recreate issue:

Add albedo and normal map for it
Add a second surface without a normal map

When creating a new blank surfarce the terrain in the viewport suddenly shifts and gains more contrast. Also there are many RID errors in the console. Both are visible in GamesFromScratch's video and people noted "bruh 29,000 errors".
Through debugging I found that the invalid RID is in the generated normal texture. This error persists anytime you do anything with that map all the way to complaints while freeing.
The cause is here:
https://github.com/outobugi/Terrain3D/blob/2e2457f2c0e489cbbc86d59265b56cc275dcc5dd/src/terrain_3d_storage.cpp#L165-L167
20 lines above, the albedo generation is nearly identical. The albedo image is Color(1.0f, 0.0f, 1.0f, 1.0f). After compression the resulting image is format 19: DXT5.
The only different to the code here is the image, which is filled with Color(0.5f, 0.5f, 1.0f, 1.0f). After compression the resulting image is format 17: DXT1!!??
Then the rendering server complains about the different formats, the normal map RID is invalid, and we get error spam.
Terrain3D::create: 0: <Image#-9223370263553314751>, empty: false, size: (1024, 1024), format: 19
Terrain3D::create: 1: <Image#-9223370263536537530>, empty: false, size: (1024, 1024), format: 19
Terrain3D::create: 2: <Image#-9223370263519760315>, empty: false, size: (1024, 1024), format: 17
Terrain3D::create: RenderingServer texture_2d_layered_create
ERROR: Condition "p_layers[i]->get_format() != valid_format" is true.
   at: texture_2d_layered_initialize (servers/rendering/renderer_rd/storage_rd/texture_storage.cpp:884)

The solution is to change the line to this, which forces it to use alpha.
img->compress_from_channels(Image::COMPRESS_S3TC, Image::USED_CHANNELS_RGBA);

Just in case, I changed it for both albedo and normal. Now we can add a blank surface and there are no errors, no visual change to the terrain, and we can paint with a null texture, which comes out as fuscia.


[IMPROVEMENT] Automatically remount read-only RWO volume to read-write

Is your improvement request related to a feature? Please describe (👍 if you like this request)
In the current system, if a read-write volume was accidentally changed to a read-only state when there are IO errors, user must scale down the workload using the volume and then scale up to make the volume to a read-write state.
To address this issue, we have implemented RWX volume state monitoring and automatic remount functionality in https://github.com/longhorn/longhorn/issues/5961. We can introduce a similar logic for RWO volumes. This logic will periodically monitor the state of the volume, and if it gets stuck in a read-only state, the mechanism will automatically request a remount and restart the workload that uses the volume.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
cc @james-munson @PhanLe1010 @shuo-wu  @innobead

Hi @ChanYiLin ,
Following steps, I can see the volume read only related infromation below , but the workload can not write data to volume, and did not observe remount after the read only happen.
According to the ticket title, the volume should remount and will be in read-write mode, could  your help to confirm if I misunderstand something? thank you.
(I set auto-delete-pod-when-volume-detached-unexpectedly to false when test with deployment. Tested on both true and false value when test with pod, the test result were all the same)

deploymentr pod

root@test-deployment-754dd9fc66-lkn6d:/# echo 123123 >> /mnt/data/1
bash: /mnt/data/1: Read-only file system

longhorn-manager log

time="2024-01-02T01:52:12Z" level=info msg="Volume request remount at 2024-01-02T01:52:12Z due to engine detected read-only filesystem" func="controller.(*VolumeController).requestRemountIfFileSystemReadOnly" file="volume_controller.go:1417" accessMode=rwo controller=longhorn-volume frontend=blockdev migratable=false node=ip-172-31-40-139 owner=ip-172-31-40-139 state=attached volume=pvc-431e5599-d52d-4e82-b6b2-4f4d1d0c5617

engine.longhorn.io

> k get engine.longhorn.io -A -o yaml  | grep FilesystemReadOnly -C 1
    status: "True"
    type: FilesystemReadOnly
  currentImage: longhornio/longhorn-engine:master-head

supportbundle_cd6bef97-097e-4094-bac7-ce29913f2d8a_2024-01-02T02-24-32Z.zip

Note: By crashing the engine, longhorn will request remount already
so when testing we need to use another way to make volume into Read Only state.

Verified pass on longhorn master(longhorn-manager b63565)

Set auto-delete-pod-when-volume-detached-unexpectedly  = true
Create pvc with worklad, wait volume healthy, writet data into mount point
Make the volume read only, in my case(k3s), I use below command

mount -o remount,ro /var/lib/kubelet/pods/92a1c306-8a6f-4147-a5db-44f4dee9db02/volumes/kubernetes.io~csi/${volume name}/mount

Write data into mount point, can see bash: /mnt/data/file: Read-only file system in pod
engines.longhorn.io can see status FilesystemReadOnly=true
Workload remout to volume, after volume healthy, data intact and can write data into mount point.

@ChanYiLin
Do you think if it is worth writing a doc Recover Volume in Read-Only State in the chapter https://longhorn.io/docs/1.6.0/high-availability/ for the mitigation?

Sure I can add a doc for it.


Need to clarify the meaning of terminologies "reduce" and "diff"; need to restructure the materialstore packages.

As #235 noted, com.kazurayam.materialstore.reduce.MProductGroupBuilder class is named badly. I looked at the classes in the package com.kazurayam.materialstore.reduce and felt I am confused.
The terminology "reduce" --- what does it mean?
The terminology "diff" --- what does it mean?
The meaning is not clear at all. Vague and confusing.

What "reduce" mean?
The typical code is this.
MProductGroup prepared =
	MProductGroupBuilder.twins(store,
		leftMaterialList, rightMaterialList, func)

Here I have 2 instances of MaterialList (left and right). And the call to twins() reduces 2 objects into 1 object of type MProductGroup.

Then what the following code in https://github.com/kazurayam/VisualInspectionInKatalonStudio_Reborn/blob/master/Scripts/0.7.2/MyAdmin/reduceTwins/Script1650172701922.groovy actually does?
Inspector inspector = Inspector.newInstance(store)
MProductGroup reduced = inspector.reduce(prepared)

https://github.com/kazurayam/materialstore/blob/0.8.0/src/main/java/com/kazurayam/materialstore/reduce/DifferDriverImpl.java has the following code:
    // implements Reducer
    @Override
    public MProductGroup reduce(MProductGroup input) throws MaterialstoreException {
        return differentiate(input);
    }

This does not make sense.

restructured the "reduce" package and relateds at v0.8.3-SHAPSHOT


NIFI-5871 ignore UUID attribute when copying flow file attributes

Thank you for submitting a contribution to Apache NiFi.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:

[x] Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?

[x] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.

[x] Has your PR been rebased against the latest commit within the target branch (typically master)?

[x] Is your initial contribution a single, squashed commit?

For code changes:

[x] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
[x] Have you written or updated unit tests to verify your changes?
[x] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
[x] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
[x] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
[ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?

For documentation related changes:

[x] Have you ensured that format looks appropriate for the output in which it is rendered?

Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.

@patricker I've incorporated your feedback

Approval still stands. Will wait to see what Travis does.

Now this is strange - is there a remote chance that this behavior (copying UUID) is expected and it's not a bug? Or is this just an unit test with incorrect assumptions?

@SavtechSolutions Yes, this is a bug in the tests I think.
I can see they manually provide a custom UUID instead of letting NiFi generate it.

@patricker Yes, I'm inclined to agree - the enqueue() call with attributes uses the same putAllAttributes call under the hood, so there's no way it should be able to retain the UUID attribute. I'll get to fix the tests, thanks.

@MikeThomsen I think the test is showing that this isn't a parent/child scenario, but showing that it's the same FlowFile from start to finish.
If there were a way to inject content into MockFlowFile, then we could build one, pass that in to enqueue and the test would actually work.


Add rewirte https rule and use only http host.

Fix apache vhosts settings:

enable https rewrite if use https
enable only http

Done.

thanks


.NET Core 3: Remove hand-rolled reconnect

.NET Core 3 SignalR implemented automatic reconnect.

https://docs.microsoft.com/en-us/aspnet/core/signalr/javascript-client?view=aspnetcore-5.0#reconnect-clients

Won't do this considering it doesn't support the initial connect.


TOC should ignore covers

Introduction to the issue
The table of contents snippet tracks down headers to be created, this is the desired effect, but not every header should be tracked.
As in the PHB, the Cover page, the inside cover, and the back cover should not figure in the table of contents.
Furthermore, from the Part covers, only the number of the part should be copied:

As you can see, only Part 1 figures, but not Creating a character, which its the name part.
This Table of contents will have to be modified again if other snippets require so.

I somehow forgot that the actual PART X text should not be ingored by the TOC, no one else caught that, so the newest version will be flawed. Reopening until we fix it, with a more complex way of sorting.

Can we add a way to choose Wich header we want to add to TOC ? I almost always don't want H4 or h5 in tocs

There has ben talk about making it a widget(see #2905) and be able to edit what you want after output, but that is currently not being worked on.
I could try and make different options for the ToC snippet for different headers. Let me have a look at it and edit this comment afterwards.

Idea: Asking to insert TOC should pop a widget which asks for some options. Options which includes a list of class names which should be excluded if found to be applied to a heading (e.g. exclude .monster, .frontCover, .myBespokeThemeThing, etc).
Here's a function that will produce a list of the selectors that were applied to an element:
function getAppliedCSSRules(element) {
  const styleSheets = document.styleSheets;
  const appliedRules = [];

  for (let i = 0; i < styleSheets.length; i++) {
    const styleSheet = styleSheets[i];

    try {
      const rules = styleSheet.rules || styleSheet.cssRules;

      for (let j = 0; j < rules.length; j++) {
        const rule = rules[j];

        // Skip @font-face, @page, and @keyframes rules
        if (
          rule.type === CSSRule.FONT_FACE_RULE ||
          rule.type === CSSRule.PAGE_RULE ||
          rule.type === CSSRule.MEDIA_RULE ||
          rule.type === CSSRule.KEYFRAMES_RULE
        ) {
          continue;
        }

        // Check if the rule has a non-empty selector
        if (rule.selectorText) {
          if (element.matches(rule.selectorText)) {
            appliedRules.push(rule);
          }
        } else {
          // Log a warning for rules with empty selectors
          console.warn('Found a rule with an empty selector:', rule);
        }
      }
    } catch (error) {
      // Handle possible cross-origin access restrictions
      if (error.name !== 'SecurityError') {
        console.error('Error accessing stylesheet:', error);
      }
    }
  }
  return appliedRules;
}

This looks intense, given it will need to scan and compare every rule in every stylesheet for every heading. Blech.
An alternative is to instead set up a css rule (with multiple selectors) that applies a custom css property, and looking at getComputedStyle(element).getPropertyValue("--TOC")
.page:has(.frontCover),
.page:has(.backCover),
.page:has(.insideCover),
.page:has(.partCover),
.monster h3,
.monster h4 {
  --TOC: exclude;
}

Idea: Asking to insert TOC should pop a widget which asks for some options. Options which includes a list of class names which should be excluded if found to be applied to a heading (e.g. exclude .monster, .frontCover, .myBespokeThemeThing, etc).
Here's a function that will produce a list of the selectors that were applied to an element:
function getAppliedCSSRules(element) {
  const styleSheets = document.styleSheets;
  const appliedRules = [];

  for (let i = 0; i < styleSheets.length; i++) {
    const styleSheet = styleSheets[i];

    try {
      const rules = styleSheet.rules || styleSheet.cssRules;

      for (let j = 0; j < rules.length; j++) {
        const rule = rules[j];

        // Skip @font-face, @page, and @keyframes rules
        if (
          rule.type === CSSRule.FONT_FACE_RULE ||
          rule.type === CSSRule.PAGE_RULE ||
          rule.type === CSSRule.MEDIA_RULE ||
          rule.type === CSSRule.KEYFRAMES_RULE
        ) {
          continue;
        }

        // Check if the rule has a non-empty selector
        if (rule.selectorText) {
          if (element.matches(rule.selectorText)) {
            appliedRules.push(rule);
          }
        } else {
          // Log a warning for rules with empty selectors
          console.warn('Found a rule with an empty selector:', rule);
        }
      }
    } catch (error) {
      // Handle possible cross-origin access restrictions
      if (error.name !== 'SecurityError') {
        console.error('Error accessing stylesheet:', error);
      }
    }
  }
  return appliedRules;
}

This looks intense, given it will need to scan and compare every rule in every stylesheet for every heading. Blech.
An alternative is to instead set up a css rule (with multiple selectors) that applies a custom css property, and looking at getComputedStyle(element).getPropertyValue("--TOC"), and filter based on that:
.page:has(.frontCover),
.page:has(.backCover),
.page:has(.insideCover),
.page:has(.partCover),
.monster h3,
.monster h4 {
  --TOC: exclude;
}

My thinking here was to put a bullet in this Issue based on the fact that the issue is done and everything we're talking about is spinning off into tangents.
The CSS-based solution seems the best match for intents and userbase. The way it is constructed, if we come to a point where we think users need a widget we can have either it insert flag classes into the mustache or create a #id CSS block in the user CSS for this.
If the tangents need to live on, we should create new issues for them and close this.

Yup, the root issue is some headings get included in the ToC when they really shouldn't. What we have here is a duplicate of that base issue.

I dont understand why closing this issue as it's still an issue... ?


Prevent iNat from importing taxa with unauthorized ranks from EOL

Taxa with unauthorized ranks have no rank_level which creates problems with things like CID
Currently, all taxa with the unauthroized ranks / null rank_level  in iNat come from EOL.
bad_ranks = Taxon.where(is_active: true).pluck(:rank).uniq - Taxon::RANKS - ["stateofmatter"]
 => ["varietas", "unrankedclade"]
Taxon.where("is_active = true AND  rank IN (?)",bad_ranks).pluck(:source_id).uniq
 => [127]
Taxon.where("is_active = true AND rank_level IS NULL AND rank != 'stateofmatter'").pluck(:source_id).uniq
 => [127]
Source.find(127)
 => #<Source id: 127, in_text: "EOL", citation: "Encyclopedia of Life. Available from http://www.eo...", url: "http://www.eol.org", created_at: "2012-08-01 05:00:40", updated_at: "2012-08-01 05:00:40", title: "Encyclopedia of Life", user_id: nil>

It would be great to prevent EOL from creating taxa with unauthorized ranks so these don't keep getting introduced

This has been released. Please close if you can't replicate these problems anymore.

thanks will keep an eye on it and reopen if there's any more weird ranks showing up


Added user status in user profile screen #219

Kept the placeholders as per https://github.com/project-travel-mate/server/pull/77/files this PR.

Add a screenshot also.

Some enhacements:

Move the status line to the top.
Add three dots after yourself...
Can we have a different pencil icon? (something without the square filled & just the pencil icon)
API is also ready : https://github.com/project-travel-mate/server/issues/71

Add status info here also : https://github.com/project-travel-mate/Travel-Mate/blob/966c2a257f5244fd4f366056c9104a95baa2d850/Android/app/src/main/java/io/github/project_travel_mate/MainActivity.java#L291


feat: NedbClient

This feature mostly already exists in v0.4.4. This issue is for tracking progress for this feature in the TypeScript rewrite of this package.
Tests to confirm this feature should be:
Golden Path Tests

[x] A NedbClient instance exists in the SuperCamo static client list, when connected.
[x] A NedbClient instance can be retrieved using a SuperCamo static method, when connected.

[x] A NedbClient instance retrieved from the SuperCamo static class has a valid database folder path.
[x] A NedbClient instance retrieved from the SuperCamo static class has a valid database name.

[x] A NedbClient instance should be able to perform database document Create operations. (Note: this section needs more tests!)

[x] insertOne (returns object)

[x] valid data leads to a successful document creation
[x] passes along any errors from document creation as-is

[x] insertMany (returns object array)

[x] valid data leads to a successful document creation
[x] passes along any errors from document creation as-is

[x] createOne (returns document)

[x] valid data leads to a successful document creation
[x] passes along any errors from document creation as-is

[x] createMany (returns document array)

[x] valid data leads to a successful document creation
[x] passes along any errors from document creation as-is

[x] A NedbClient instance should be able to perform database document Read operations.

[x] findOneDocument

[x] empty query returns a random document in the specified database collection
[x] query for top-level data keys in a document returns appropriately
[x] query for nested-level data keys in a document returns appropriately
[x] query for data keys that do not exist in the document returns nothing
[x] throws an error if the collection to be queried does not exist in the database

[x] findOneObject

[x] empty query returns a random object in the specified database collection
[x] query for top-level data keys in a object returns appropriately
[x] query for nested-level data keys in a object returns appropriately
[x] query for data keys that do not exist in the object returns nothing
[x] query given an option with a projection object returns an object containing appropriate keys per the projection
[x] throws an error if the collection to be queried does not exist in the database

[x] findManyDocuments

[x] empty query returns ALL documents in the database
[x] query for top-level data keys in a document returns appropriately
[x] query for nested-level data keys in a document returns appropriately
[x] query for data keys that do not exist in the document returns an empty array
[x] if a limit option is provided, the returned array of documents should be no larger than the specified limit
[x] throws an error if the collection to be queried does not exist in the database

[x] findManyObjects

[x] empty query returns ALL documents in the database
[x] query for top-level data keys in a document returns appropriately
[x] query for nested-level data keys in a document returns appropriately
[x] query for data keys that do not exist in the document returns an empty array
[x] if a limit option is provided, the returned array of documents should be no larger than the specified limit
[x] query given an option with a projection object returns an object containing appropriate keys per the projection
[x] throws an error if the collection to be queried does not exist in the database

[x] A NedbClient instance should be able to perform database document Update operations.

[x] findAndUpdateOneDocument

[x] returns null when given a query returns no documents
[x] returns an appropriately-modified document when given a valid query for top-level document properties and valid new document data
[x] returns an appropriately-modified document when given a valid query for nested-level document properties and valid new document data
[x] upsert option causes a new record to be created in the database if no existing document matches the query, with a document returned
[x] when the upsert option is used, no document matches, and invalid data is provided, then the function passes along any errors from document creation as-is

[x] findAndUpdateManyDocuments

[x] returns an empty array when given a query returns no documents
[x] returns an array of appropriately-modified document when given a valid query for top-level document properties and valid new document data
[x] returns an array of appropriately-modified document when given a valid query for nested-level document properties and valid new document data
[x] if a limit option is provided, the returned array of modified documents should be no larger than the specified limit
[x] if an upsert option is provided alongside valid data and a query with no matches, an array containing one new database entry is returned
[x] invalid update data causes the function to throw an error
[x] data that is invalid for some documents but not all will throw an error, but successfully apply to some documents

eg. unique property on a document should work for one document, but not two

[x] findAndUpdateOneObject

[x] returns null when given a query returns no documents
[x] returns an appropriately-modified document object when given a valid query for top-level document properties and valid new document data
[x] returns an appropriately-modified document object when given a valid query for nested-level document properties and valid new document data
[x] upsert option causes a new record to be created in the database if no existing document matches the query, with an object returned
[x] when the upsert option is used, no document matches, and invalid data is provided, then the function passes along any errors from document creation as-is

[x] findAndUpdateManyObjects

[x] returns an empty array when given a query returns no documents
[x] returns an array of appropriately-modified document when given a valid query for top-level document properties and valid new document data
[x] returns an array of appropriately-modified document when given a valid query for nested-level document properties and valid new document data
[x] if a limit option is provided, the returned array of modified documents should be no larger than the specified limit
[x] if an upsert option is provided alongside valid data and a query with no matches, an array containing one new database entry is returned
[x] invalid update data causes the function to throw an error
[x] data that is invalid for some documents but not all will throw an error, but successfully apply to some documents

eg. unique property on a document should work for one document, but not two

[x] A NedbClient instance should be able to perform database document Delete operations.

[x] findAndDeleteOne

[x] returns 0 when given a query returns no documents
[x] returns the number of documents deleted when given a valid query that matches a document

[x] findAndDeleteMany

[x] returns 0 when given a query returns no documents
[x] returns the number of documents deleted when given a valid query that matches a document

[x] A NedbClient instance method can count the occurrences of Documents that match a given query.

[x] empty query counts all docs in collection
[x] query for top-level properties works appropriately
[x] query for nested-level properties works appropriately

And this is a simplified task list. Gonna handle document and embedded document validation tests separately, as documents can exist separately from the NedbClient.
Otherwise there would've been many, many, many more tests to write in this feature.


[Project Addition] AI Generated vs Real Images Classification using DL

Pull Request for DL-Simplified 💡
Issue Title : #662 [Project Addition] AI Generated vs Real Images Classification using DL

Info about the related issue (Aim of the project) : To classify images into AI generated or real images, which had some contact from humans like paintings or images.
Name: Arihant Bhandari
GitHub ID: https://github.com/Arihant-Bhandari
Email ID<EMAIL_ADDRESS>Idenitfy yourself: GSSoC 2024 Contributor

Closes: #662 [Project Addition] AI Generated vs Real Images Classification using DL
Describe the add-ons or changes you've made 📃
Wrote code for preprocessing and loading images, created models including custom as well as pre-trained models, like ResNet-50, VGG16 and so on.
Type of change ☑
What sort of change have you made:

[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[x] Code style update (formatting, local variables)
[x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[x] This change requires a documentation update

How Has This Been Tested? ⚙

Models
Accuracy
Loss

ResNet-50
60.96%
0.6848

inception
76.71%
0.4543

CNN
67.81%
0.6443

CNN with Attention
69.86%
0.6037

Xception
75.34%
0.5466

VGG16
78.77%
0.5400

Checklist: ☑

[x] My code follows the guidelines of this project.
[x] I have performed a self-review of my own code.
[x] I have commented my code, particularly wherever it was hard to understand.
[x] I have made corresponding changes to the documentation.
[x] My changes generate no new warnings.
[x] I have added things that prove my fix is effective or that my feature works.
[x] Any dependent changes have been merged and published in downstream modules.

hi @abhisheks008 , this is the preliminary work. i have sent in all the models i worked on, let me know any changes to be made, i will be glad to makew them, thank you for your time and patience.

Did you complete the whole project? @Arihant-Bhandari

yup the project is complete, i have 8 models with me but i was thinking to trim them down to just 4-5, future contris can come in that way like improvements and so on. i will update this completely later today, just wanted to let the codebase be under review.


Can't use CLI to migrate and create composite primary key table

Setup
This is my up.sql:
create table vehicle_movements (
  vehicle_id varchar not null,
  stop_id varchar not null,
  arrived_at int,
  departed_at int,
  primary key (vehicle_id, stop_id)
)

This is what happens when I try to migrate:
➜  hawkeye git:(master) ✗ diesel migration run
Diesel only supports tables with primary keys. Table vehicle_movements has no primary key

But I do have a primary key - a composite one, specified at the end of the create table. I see from #450 that supposedly there is support for composite primary keys, so I don't know if I'm doing something wrong or not.
Versions

Rust: 1.27.0
Diesel: crate - 1.3.2, CLI - 1.3.1
Database: Postgres 10
Operating System OS X

Feature Flags

diesel: --without-default-features --feature postgres

Checklist

[x] I have already looked over the issue tracker for similar issues.
[x] This issue can be reproduced on Rust's stable channel. (Your issue will be
closed if this is not the case)

I had this problem as well, here's how to reproduce:

try to run migration on table without primary key:

create table vehicle_movements (
  vehicle_id varchar not null,
  stop_id varchar not null,
  arrived_at int,
  departed_at int
)

get error message
edit up.sql to include composite key:

create table vehicle_movements (
  vehicle_id varchar not null,
  stop_id varchar not null,
  arrived_at int,
  departed_at int,
  primary key (vehicle_id, stop_id)
)

diesel migration run then fails with the same error

I fixed it by running diesel migration revert which dropped the tables, and then re-running diesel migration run

The above comment is likely correct. It sounds like you edited a migration without re-running it, or your schema for some other reason does not match what you expect it to be.


Cancelling one monitor via transactionID disables second monitor.

I am trying to cancel monitorCharacteristicForDevice using bleManager.cancelTransaction(transactionId).
I wrap monitorCharacteristicForDevice in a promise and resolve that promise with either success or false(on error) string.
When promise resolves I try to cancel transaction with bleManager.cancelTransaction(transactionId) and it gets canceled.
When trying to setup new monitorCharacteristicForDevice, callback is not executed and therefore I cannot get values from second characteristic.
If i cancel both transaction in the end, flow is ok, but it is not expected behaviour.
await this.listenForChar1(deviceId) // This returns ok result
this.bleManager.cancelTransaction(TRANSACTION1) // This gets canceled
await this.listenForChar2(deviceId) // It enters method but subscription is not setup.
this.bleManager.cancelTransaction(TRANSACTION2) //Is redundant beacuse transaction gets cancelled in promise due to time taken to execute callback.

Developing on macos.
Problem on all devices.
Using the latest version of the library.

Hello,
Thank you for using the library.
Your post seems to be a bug report but it lacks some crucial information. Could you edit to contain information according to the issue template?
It is extremely important to enter as much info as possible or else I cannot help you.
Best Regards

I'm closing the issue. Problem was solved by not canceling transactions at all. I canceled them when both where recieved or timer went out.


Flatten and impl std::error::Error for EnvmntError

Closes #28

@lweberk i published the fsio with your changes.
did few on top

moved result to types - i know we don't agree on this one, but i don't think its a major change.
changed all internal Result<something, error> to fsioResult

so i think we are good to go with chaining it as well in this PR.
don't forget to bump the fsio to 0.2 to make it compile.
and thanks again for all the work


Unity sample.

Hey,
Are there any examples for Unity 3D? What projects are really needed for Unity? And to generate navmesh use unity itself to generate?
Cheers!

I am in the process of making it usable within Unity3D.
Check out https://github.com/ikpil/UniRecast


files to copy

in which directory of bitcoin core i have to copy the files ;
which commands i have to use

Run "BitcoinDatabaseGenerator /?" and read carefully the output. Or visit: https://github.com/ladimolnar/BitcoinDatabaseGenerator/wiki/Usage

hi, I don't find bitcoindatabasegenerator.exe in the file i've download.
2017-04-24 4:48 GMT+02:00 Ladislau Molnar<EMAIL_ADDRESS>
Closed #11
https://github.com/ladimolnar/BitcoinDatabaseGenerator/issues/11.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ladimolnar/BitcoinDatabaseGenerator/issues/11#event-1054012061,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AaW9jVv_oc4llFcp-lm7G8RSCcbS6MZzks5rzA1ugaJpZM4M-svW
.

Which file you downloaded exactly. Are you referring to BitcoinDatabaseGenerator_1_8.zip from https://github.com/ladimolnar/BitcoinDatabaseGenerator/releases? That is the file that contains the last release and inside the folder BitcoinDatabaseGenerator_1_8 it does contain the file bitcoindatabasegenerator.exe.
Sometimes antiviruses may decide to delete files when extracted from ZIP because of a "low reputation score" - that means that although they do not detect a specific threat there are not enough people that use these files hence the antivirus does not trust it. If that happens you will have to manually instruct your antivirus to restore those files.

i have find the file thank's
http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
Garanti
sans virus. www.avg.com
http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
2017-04-25 9:06 GMT+02:00 Ladislau Molnar<EMAIL_ADDRESS>
Which file you downloaded exactly. Are you referring to
BitcoinDatabaseGenerator_1_8.zip from https://github.com/ladimolnar/
BitcoinDatabaseGenerator/releases? That is the file that contains the
last release and inside the folder BitcoinDatabaseGenerator_1_8 it does
contain the file bitcoindatabasegenerator.exe.
Sometimes antiviruses may decide to delete files when extracted from ZIP
because of a "low reputation score" - that means that although they do not
detect a specific threat there are not enough people that use these files
hence the antivirus does not trust it. If that happens you will have to
manually instruct your antivirus to restore those files.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ladimolnar/BitcoinDatabaseGenerator/issues/11#issuecomment-296935826,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AaW9jasZJfZcccudujbv_I3MRW-LXjA_ks5rzZt_gaJpZM4M-svW
.


Add more tests to the splitter

Purpose
Verify that the splitter will always yield the same content as the input
Noticed that if you set the overlap percent to 0 you get a DBZ error
Does this introduce a breaking change?
When developers merge from main and run the server, azd up, or azd deploy, will this produce an error?
If you're not sure, try it out on an old environment.
[ ] Yes
[ ] No

Does this require changes to learn.microsoft.com docs?
This repository is referenced by this tutorial
which includes deployment, settings and usage instructions. If text or screenshot need to change in the tutorial,
check the box below and notify the tutorial author. A Microsoft employee can do this for you if you're an external contributor.
[ ] Yes
[ ] No

Type of change
[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

Code quality checklist
See CONTRIBUTING.md for more details.

[ ] The current tests all pass (python -m pytest).
[ ] I added tests that prove my fix is effective or that my feature works
[ ] I ran python -m pytest --cov to verify 100% coverage of added lines
[ ] I ran python -m mypy to check for type errors
[ ] I either used the pre-commit hooks or ran ruff and black manually on my code.

There is some logic here which isn't configurable to overlap sentences, so the diffs don't match perfectly, so I'm going to test that the split diffs aren't **missing** any content from the original text


Audio not respecting silent phone

When playing audio on an iOS device, Flame does not respect the phone's silent mode and plays the audio regardless. The plugin has a field to handle this, but it is not exposed through Flame.

It should be, as an optional parameter...

I was going to start developing exactly that @luanpotter, but then I realised that it is not necessary.
You can just do Flame.audio.audioCache.respectSilence = true
Should this be enough @ddonze ?

Yes, that solves the problem! Thanks.

Yup, this solves it! Thanks!


Updating to PureScript 13, Halogen 5.

Not ready to review yet - just want Hydra's opinion at this stage. ;-)

BTW, I suspect your buildkite issue will be similar to https://github.com/input-output-hk/plutus/pull/1160/files, you probably need to use nativePkgs for fetching your sources. (Why fetchFromGitHub and friends don't use native dependencies I don't know).

Thanks @michaelpj. :-)

(Actually, now that I look, it's probably because we're missing nixpkgs commit 3d59b4d285fa3207af8fc9378da87c1dd8c42d0d, which is in a newer nixpkgs than ours... At least we can maybe fix that when we upgrade.)

@michaelpj everything seems to be using nativePkgs. What is the error?

ok, buildkite failing for a super weird reason. I have commented out the bad code since it only breaks something that is already broken (the update script). We need to fix this update script but we will have another PR to do that as this PR is getting too large and old. Everything works and it is only the update script that is broken which was already broken.

@michaelpj everything seems to be using nativePkgs. What is the error?

This was a an absolute pain to debug last time, so I don't know exactly. Let me have a look.

What was the fix?

spago2nix has some requirement on darwin hidden somewhere in it's dependencies. Since we don't use it in the script at the moment I just commented it out. This will need to be fixed in order to get the script working again.

spago2nix has some requirement on darwin hidden somewhere in it's dependencies.

:boggle:

:muscle:

It is accomplished. 😅


feat(clerk-js): Scroll the card into view when opening in UP/OP

Description

Checklist

[ ] npm test runs as expected.
[ ] npm run build runs as expected.
[ ] (If applicable) JSDoc comments have been added or updated for any package exports
[ ] (If applicable) Documentation has been updated

Type of change

[ ] 🐛 Bug fix
[ ] 🌟 New feature
[ ] 🔨 Breaking change
[ ] 📖 Refactoring / dependency upgrade / documentation
[ ] other:

Packages affected

[ ] @clerk/backend
[ ] @clerk/chrome-extension
[ ] @clerk/clerk-js
[ ] @clerk/clerk-expo
[ ] @clerk/fastify
[ ] gatsby-plugin-clerk
[ ] @clerk/localizations
[ ] @clerk/nextjs
[ ] @clerk/clerk-react
[ ] @clerk/remix
[ ] @clerk/clerk-sdk-node
[ ] @clerk/shared
[ ] @clerk/themes
[ ] @clerk/types
[ ] build/tooling/chore

!preview

!preview

!preview

Hey @octoper, your preview is currently deploying and should be available shortly.

Status
Preview
Updated (UTC)

:cook: Deploying...
Inspect
Feb 07, 2024 02:23 PM

!preview


New CSV Reader

This (Draft) PR implements a non-arrow CSV reader, using the CSV reader that duckdb developed. The code taken from duckdb is in csv_reader.h and csv_reader.cpp classes, with some changes done to make it work with our data types.
Overall, the design won't change so Semih can take a look. However, there are still issues:
Things that aren't working right now: (Guodong take a look please, maybe there's some things that are easy to help me out with)

VAR_LIST and FIXED_LIST aren't working, I think I am reading them into the ValueVector incorrectly.
Something with ValueVectors and memory. Could you take a look at how I'm defining the ValueVector and DataChunks, and how I'm setting the values in csv_reader 's AddValue ? I fear that I am doing something very wrong here that I only found out once I went to run the benchmark. I am getting a segfault that is either coming from
(i) the way I am initializing or using DataChunks/ValueVectors, or
(ii) My system running out of memory.
Both of these aren't good - since the benchmark runs on a previous commit on master without any issue, even if the problem is (ii). this means that the csv reader is using too much memory compared to Arrow's csv reader. This likely isn't a problem with duckdb's code but rather inside the data copying I wrote in Flush, but I'm not sure how to fix it as of yet. Any tips appreciated.

@aziz-mu : For your PR comment: (i) the way I am initializing or using DataChunks/ValueVectors, or (ii) My system running out of memory. => First I think it's likely this is because of you not initializing the ValueVectors inside your DataChunk as I mentioned. But I was just curious: Why do you think your system is running out of memory? Segfault does not necessarily mean you're running out of memory? Are you observing a high memory usage?


Datatypes are not preserved when a pandas dataframe partitioned and saved as parquet file using pyarrow

Datatypes are not preserved when a pandas data frame is partitioned and saved as parquet file using pyarrow but that's not the case when the dataframe is not partitioned.
Case 1: Saving a partitioned dataset - Data Types are NOT preserved
# Saving a Pandas Dataframe to Local as a partioned parquet file using pyarrow
import pandas as pd
df = pd.DataFrame({'age': [77,32,234],'name':['agan','bbobby','test'] })
path = 'test'
partition_cols=['age']
print('Datatypes before saving the dataset')
print(df.dtypes)
table = pa.Table.from_pandas(df)
pq.write_to_dataset(table, path, partition_cols=partition_cols, preserve_index=False)

# Loading a dataset partioned parquet dataset from local
df1 = pq.ParquetDataset(path, filesystem=None).read_pandas().to_pandas()
print('\nDatatypes after loading the dataset')
print(df1.dtypes)

Output:
Datatypes before saving the dataset
age      int64
name    object
dtype: object

Datatypes after loading the dataset
name      object
age     category
dtype: object

From the above output, we could see that the data type for age is int64 in the original pandas data frame but it got changed to category when we saved to local and loaded back.

Case 2: Non-partitioned dataset - Data types are preserved
import pandas as pd
print('Saving a Pandas Dataframe to Local as a parquet file without partitioning using pyarrow')
df = pd.DataFrame({'age': [77,32,234],'name':['agan','bbobby','test'] })
path = 'test_without_partition'
print('Datatypes before saving the dataset')
print(df.dtypes)
table = pa.Table.from_pandas(df)
pq.write_to_dataset(table, path, preserve_index=False)

# Loading a non-partioned parquet file from local
df1 = pq.ParquetDataset(path, filesystem=None).read_pandas().to_pandas()
print('\nDatatypes after loading the dataset')
print(df1.dtypes)

Output:
Saving a Pandas Dataframe to Local as a parquet file without partitioning using pyarrow
Datatypes before saving the dataset
age      int64
name    object
dtype: object

Datatypes after loading the dataset
age      int64
name    object
dtype: object

Versions
Python 3.7.3
pyarrow 0.14.1

Can you please open a JIRA issue?

Sure

@bnriiitb Thanks for opening the issue on JIRA. You can close this issue then.

@jorisvandenbossche closing the issue.


feat: Add Trilogy Auto Instrumentation

Provides auto instrumentation for the trilogy database driver

just ack'ing this, will try to give this a thorough review otw.

Thanks @ericmustin although I think that I'm the case of the UDS the host name will be nil and I don't want to trigger and error so I'm going to set a default there.
Although not as common, I think that we need some additional coverage for those cases for all of the drivers.


feat(job): add eligible tunable

This commit has following features:

eligible check to enable or disable a job
thinkTimeInSeconds to delay start of a Job
failFast to stop retrying in case of specific errors
ignoreError to mark a task as warning & job to completed

Signed-off-by: AmitKumarDas<EMAIL_ADDRESS>

:tada: This PR is included in version 1.2.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Implement basic work form (Blocked by #32)

Create a tabbed work form UI implementing minimal metadata fields for a work. This does not include file uploads, which will be ticketed separately. Also does not include persistence to SDR.
See designs: https://www.figma.com/design/g46Nfl5EHG7DfwqupK3G4X/H2-2024?node-id=1116-3727&node-type=frame&t=PxX5OoyBCdCnZZYB-0
Done: when a work form exists

Blocked by https://github.com/sul-dlss/hungry-hungry-hippo/issues/32

work form is already well underway via smaller tickets, so closing.


[Question] how to make a disabled object and enable later

Hi Davide, all,
Thanks once again for your kind support. I will ask my questions here in git repo from now on as you have advices, rather than reddit.
I am trying to build a web-based GUI with Remi, similar to this dummy one that I have built with “QT for WebAssembly": http://petra.phys.yorku.ca:5000

I need some objects to be initially grayed out, and upon the user's action, get enabled. I tried attributes['disabled'] = 'True' for the object I want to disable but it did not work. Perhaps I am doing something incorrectly.
A simple example of a disabled button which gets enabled / disabled with a checkbox object would be very much helpful.

As you can see, there are two tabs at the top in my dummy QT example. What is the easiest way to make something similar with remi?

Thanks,

Hello @m-kareem , here is an example for you
# -*- coding: utf-8 -*-

from remi.gui import *
from remi import start, App

class untitled(App):
    def __init__(self, *args, **kwargs):
        #DON'T MAKE CHANGES HERE, THIS METHOD GETS OVERWRITTEN WHEN SAVING IN THE EDITOR
        if not 'editing_mode' in kwargs.keys():
            super(untitled, self).__init__(*args, static_file_path={'my_res':'./res/'})

    def idle(self):
        #idle function called every update cycle
        pass

    def main(self):
        return untitled.construct_ui(self)

    @staticmethod
    def construct_ui(self):
        #DON'T MAKE CHANGES HERE, THIS METHOD GETS OVERWRITTEN WHEN SAVING IN THE EDITOR
        container0 = Container()
        container0.attr_editor_newclass = False
        container0.css_height = "90.0px"
        container0.css_left = "20px"
        container0.css_position = "absolute"
        container0.css_top = "20px"
        container0.css_width = "300.0px"
        container0.variable_name = "container0"
        checkbox0 = CheckBox()
        checkbox0.attr_editor_newclass = False
        checkbox0.css_height = "30px"
        checkbox0.css_left = "30.0px"
        checkbox0.css_position = "absolute"
        checkbox0.css_top = "30.0px"
        checkbox0.css_width = "30px"
        checkbox0.variable_name = "checkbox0"
        container0.append(checkbox0,'checkbox0')
        self.button0 = Button()
        self.button0.attr_editor_newclass = False
        self.button0.css_height = "30px"
        self.button0.css_left = "120.0px"
        self.button0.css_position = "absolute"
        self.button0.css_top = "30.0px"
        self.button0.css_width = "100px"
        self.button0.text = "button"
        self.button0.variable_name = "button0"
        container0.append(self.button0,'button0')
        container0.children['checkbox0'].onchange.do(self.onchange_checkbox0)

        self.container0 = container0
        return self.container0

    def onchange_checkbox0(self, emitter, value):
        self.button0.set_enabled(value)

#Configuration
configuration = {'config_project_name': 'untitled', 'config_address': '<IP_ADDRESS>', 'config_port': 8081, 'config_multiple_instance': True, 'config_enable_file_cache': True, 'config_start_browser': True, 'config_resourcepath': './res/'}

if __name__ == "__main__":
    # start(MyApp,address='<IP_ADDRESS>', port=8081, multiple_instance=False,enable_file_cache=True, update_interval=0.1, start_browser=True)
    start(untitled, address=configuration['config_address'], port=configuration['config_port'],
                        multiple_instance=configuration['config_multiple_instance'],
                        enable_file_cache=configuration['config_enable_file_cache'],
                        start_browser=configuration['config_start_browser'])

For the tabs, use the TabBox widget.
Regards ;-)

Thanks a lot Davide for your prompt response.
When I disable a dropdown object, it is not getting grayed out, but it is correctly bing disabled. Is it a known issue?
One more quick question. How do I make a solid line border around a container. I guess it should be via style when defining the container like:
gui.Container(width=400, layout_orientation=gui.Container.LAYOUT_HORIZONTAL, style={'display': 'block', 'overflow': 'auto', 'text-align': 'left'})
But I don't know the keyword. Is it documented somewhere?
Thanks

Hi @dddomodossola ,
I also found out that the checkbox object is not getting disabled. Is there any other method for disabling it, or it is not supported yet in remi?
Thanks,

In order to disable a Checkbox:
mycheckbox.set_enabled(False)
In order to disable a CheckboxLabel:
mycheckboxlabel._checkbox.set_enabled(False)
In order to disable a container:
mycontainer.style['pointer-events'] = 'none'
mycontainer.style['opacity'] = '0.4' #this is to give a disabled apparence
Regards ;-)

Thanks @dddomodossola  for your kind support.
In order to re-enable the container, shall I do:
del subContainerMiddle_2.style['pointer-events']
or there is a more proper way to do this.
And by the way, where all these things are documented? I could not find it in the "Remi Documentation Release 1.0.0". Is there any more up-to-date one?
Best,

Hello @m-kareem that's the right way. However unfortunately there is no documentation about this. There is only the readme file and the example. And of course you can ask me for help. ;-)


Embark test: Exception thrown in utils.js line 394

Using embark version 3.2.3 or 3.2.4 (haven't tested others) on Linux Mint 19, I get the following error immediately after running the command embark test "pathToFile":

/home/sea212/.nvm/versions/node/v10.14.1/lib/node_modules/embark/lib/utils/utils.js:394
protocol: matches[1],
^
TypeError: Cannot read property '1' of null
at Object.deconstructUrl (/home/sea212/.nvm/versions/node/v10.14.1/lib/node_modules/embark/lib/utils/utils.js:394:22)
at Test.initWeb3Provider (/home/sea212/.nvm/versions/node/v10.14.1/lib/node_modules/embark/lib/tests/test.js:64:25)
at Test.checkDeploymentOptions (/home/sea212/.nvm/versions/node/v10.14.1/lib/node_modules/embark/lib/tests/test.js:269:10)
at checkDeploymentOpts (/home/sea212/.nvm/versions/node/v10.14.1/lib/node_modules/embark/lib/tests/test.js:297:14)
at nextTask (/home/sea212/.nvm/versions/node/v10.14.1/lib/node_modules/embark/node_modules/async/dist/async.js:5324:14)
at Object.waterfall (/home/sea212/.nvm/versions/node/v10.14.1/lib/node_modules/embark/node_modules/async/dist/async.js:5334:5)
at Test.config (/home/sea212/.nvm/versions/node/v10.14.1/lib/node_modules/embark/lib/tests/test.js:295:11)
at Object. (/home/sea212/Dokumente/git/edifact-mvp/embark/test/TestSemantics.js:6:1)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Module.require (internal/modules/cjs/loader.js:636:17)
at Module.require (/home/sea212/.nvm/versions/node/v10.14.1/lib/node_modules/embark/lib/tests/run_tests.js:86:34)
at require (internal/modules/cjs/helpers.js:20:18)
at /home/sea212/.nvm/versions/node/v10.14.1/lib/node_modules/embark/node_modules/mocha/lib/mocha.js:250:27
at Array.forEach ()
at Mocha.loadFiles (/home/sea212/.nvm/versions/node/v10.14.1/lib/node_modules/embark/node_modules/mocha/lib/mocha.js:247:14)
at Mocha.run (/home/sea212/.nvm/versions/node/v10.14.1/lib/node_modules/embark/node_modules/mocha/lib/mocha.js:576:10)
at async.eachLimit (/home/sea212/.nvm/versions/node/v10.14.1/lib/node_modules/embark/lib/tests/run_tests.js:121:17)
at /home/sea212/.nvm/versions/node/v10.14.1/lib/node_modules/embark/node_modules/async/dist/async.js:3110:16

somehow embark seems not to be able to retrieve the protocol, address, port and the connection type, even though they are properly defined in the config files:

host: 'localhost',
port: 8545,
type: 'rpc'

Hi @sea212, the tests don't really use the configuration files. Those files are mostly for Dapps.
The tests are more sandboxed. You can choose in the test which contracts to deploy as well as on which connection.
By default, the tests will use a Ganache VM to run the tests in, but if you want them to use the same node as Embark, it is quite simple. Just start Embark in one terminal and in another, run embark test pathToFile --node=embark
This will connect to the Embark instance via IPC so it will share the node, compiler, etc.
As for why you have that specific error. I cannot tell with only what you gave. Could you also post the file you are trying to run or just the config(); part.

Hello @jrainville ,
the tests use our parity development node. It is strange that the same tests once did work, without having changed anything in the tests suddenly those parsing errors happened. It's a mystery to me when and what happened. Using embark run and calling the smart contracts methods in question, everything is working fine.
The following block contains one test which fails, throwing the error which you can find in my initial post. I had to change contract names and remove the actual tests, but they can be executed for sure, because I already executed them successfully and the files did not change since then.
config({
  deployment: {
    accounts: [
      {
        'privateKey': '0xd159cabe512bd514f1e786438886cd22fcc1eba1474e765b1b11d11f5f223d8'
      }
    ],
    host: 'localhost',
    port: 8545,
    type: 'rpc'
  },
  contracts: {
    DateUtil: {
      args: []
    },
    Contract1: {
      args: []
    },
    Contract2: {
      args: []
    },
    Contract3: {
      args: []
    },
    Contract4: {
      args: []
    },
    Contract5: {
      args: []
    },
    Contract6: {
      args: []
    },
    Contract7: {
      args: []
    },
    Contract8: {
      args: []
    },
    Contract9: {
      args: []
    },
    Contract10: {
      args: []
    },
    Contract11: {
      args: []
    },
    Contract12: {
      args: []
    },
    Contract13: {
      args: []
    },
    Contract14: {
      args: []
    },
    Contract15: {
      args: []
    },
    Contract16: {
      args: []
    },
    Contract17: {
      args: []
    },
    Contract18: {
      args: []
    },
    Contract19: {
      args: []
    },
    Ucontract: {
      args: [
        [
          '$Contract1',
          '$Contract2',
          '$Contract3',
          '$Contract4',
          '$Contract5',
          '$Contract6',
          '$Contract7',
          '$Contract8',
          '$Contract9',
          '$Contract10',
          '$Contract11',
          '$Contract12',
          '$Contract13',
          '$Contract14',
          '$Contract15',
          '$Contract16',
          '$Contract17',
          '$Contract18',
          '$Contract19'
        ]
      ]
    }
  }
}, (err, theAccounts) => {
  if (err) {
    console.log(err)
  }
})

// ...

contract('UContract', function () {
  // ...
}

You say they used to work, was it with an older version of Embark? Maybe something broke with 3.2.4

I just tested with 3.2 and I have the same error. Seems like you found a small regression. I'll try to fix quickly and push a patch

@sea212 Just published Embark v3.2.7
Your problem is fixed in it. It is also faster than Embark 3.2.4 so have fun 🙂


Error after update to 0.7.12

Just updated to 0.7.12 and I am receiving this error:
 TypeError: undefined is not a function
    at schema-form.js:293

It is coming from a form element with a condition on it.
At first I thought it was because of a leftover "conditional" type element, so I took out the conditional and put the condition on each of its items, but I still receive the error.

The .each method was only available with jQuery, 0.7.13 fixes the issue.

Thanks dudes :)
sorry for the dupe of #263


Unique compiler warning for libraries without type information

TypeScript Version:  2.0.2 && 2.1.0-dev.20160922
Code
Import a npm sourced module which you haven't installed an @type/ definition for.
Expected behavior:
Compiler warning that it couldn't find typing information for the module.
Actual behavior:
Compiler warning saying that it can't find the module:

error TS2307: Cannot find module 'express-session'.

2.0.0 didn't have this behaviour, then which I upgraded to 2.0.2 I started getting errors about modules which I knew I had npm installed not existing. It took a while to realise that the issue was tsc didn't have the @type definitions for those modules.
It would be really useful to have the compiler's warning change for such a case - for example:

Cannot find type information for module 'express-session'

This isn't a bug report as such, as its all working, but rather a request that the information emitted by the compiler be clearer.

2.0.0 didn't have this behaviour,

This has been the same message since 0.9.*. Looks like there was a file that 1.8 picked up that is not picked up now. where was your module declared without installing @types? if you run tsc --listFiles do you see that file? is the containing file in an exclude list?

It would be really useful to have the compiler's warning change for such a case - for example:
Cannot find type information for module 'express-session'

The thing is the compiler is only looking for the type information all the time. it looks for a .ts file if one is available, if not then a .d.ts if not looks for a global declaration of the shape declare module "mod" { ... }. so really this is what the error is all about.

where was your module declared without installing @types?

I had npm installed it, but without the type information (either an @type module, or a .d.ts file). I was simply doing an import * as from 'module-name' which resulted in no errors with 2.0.0.

The thing is the compiler is only looking for the type information all the time.

Its probably my understanding of how TypeScript works (still finding my feet), but if I have a typo in my import module name I get the same error (this is with 2.0.2):

error TS2307: Cannot find module 'express-hand'.

That seems like the right error for that kind of issue to me - it can't find that module in the node_modules directory (and wherever else it scans).
What confused me is that the compiler is emitting the same error for the case where the module isn't present as when there is no typing information for that module. Perhaps internally they are the same thing, but externally its two different npm modules to install and the compiler doesn't offer any indication as to which one is missing.
Kudos on the 2.0 release btw - I'm loving TypeScript :-)

Its probably my understanding of how TypeScript works (still finding my feet), but if I have a typo in my import module name I get the same error (this is with 2.0.2):

from the compiler perspective it does not make a difference. it only looks for a module "foo". It needs to know the "shape" of "foo" be it in a file or not. it does not know if you missspelled it and meant "foobar" or just did not write the definition for it yet.
Module resoluton documentation might be helpful here: http://www.typescriptlang.org/docs/handbook/module-resolution.html

What confused me is that the compiler is emitting the same error for the case where the module isn't

I suppose we can do one pass after we find the error to see if a .js file exists somewhere, and issue a follow up message if only the declaration file is missing.

https://github.com/Microsoft/TypeScript/issues/11106 seems to have a proposal for solving this issue that we can implement. closing in favor of https://github.com/Microsoft/TypeScript/issues/11106


Usage in Unity

Hello. I would like some help on how to integrate this lib with Unity 3D (as this repository is marked with the unity3d tag)
My use case: I have a bunch of statechart scxml files that I need to read into a state machine inside Unity and fire events, it's very simple.
I cloned the repository and it is a big Visual Studio solution with no release. I tried building it on the latest Visual Studio Community 2019 but there were errors, so I removed the UWP and the Analyzers.Test projects (and also comment a namespace not found in StatechartAnalyzer). After that, the build succeeded and generated a lot on output on the bin/Release folders and I have no ideia what is necessary. I presume the Statecharts.NET.Core is the one I want as the others seem to be testing stuff but I couldn't find any documentation or guide whatsoever. Exploring the Statecharts.NET.Core namespace also didn't ring any bells.
Can you provide information on what dlls are needed to import on Unity and how to read the scxml into a state machine?
EDIT: is this repository dead?

Nevermind.


Merge pull request #1 from IBM-Security/master

Pull recent version from ibm

pull

I am not seeing any changes to merge - previous merge pulled all the changes. Could we close this if that is really the case please?

It’s probably something I did wrong, so , yes, close it .
Tom Bosmans - Using Verse on iOS
On 20 Apr 2019, 13:34:34<EMAIL_ADDRESS>wrote:
From<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Cc<EMAIL_ADDRESS><EMAIL_ADDRESS>Date: 20 Apr 2019, 13:34:34
Subject: Re: [IBM-Security/isam-ansible-roles] Merge pull request #1 from IBM-Security/master (#119)
I am not seeing any changes to merge - previous merge pulled all the changes. Could we close this if that is really the case please?
—You are receiving this because you modified the open/close state.Reply to this email directly, view it on GitHub, or mute the thread.
Tenzij hierboven anders aangegeven: / Sauf indication contraire ci-dessus: / Unless otherwise stated above:
International Business Machines of Belgium sprl / bvba
Siège social / Maatschappelijke zetel: Avenue du Bourget 42 Bourgetlaan, B-1130 Bruxelles/Brussel
N° d'entreprise / Ondernemingsnr: TVA / BTW BE 0405 912 336
RPM Bruxelles / RPR Brussel


Fix type export with Typescripts bundler module resolution

This just adds the types property to the root export so that Typescript can properly resolve the types with the moduleResolution: bundler
Addresses: https://github.com/getsentry/sentry-javascript-bundler-plugins/issues/183

Sorry... I wasn't paying attention and I assumed that patch-package was going to create a PR


Upgraded 'core.wcm.components' version from 2.7.0 to 2.11.0

Updating version of Core Components from 2.7.0 to 2.11.0
Reason for the change:

To be in sync with the core components update
Based on this https://helpx.adobe.com/support/programs/eol-matrix.html , the support for AEM 6.3 ended 4/30/2020 , we can update the version of Core components from 2.7.0 (since this has support to AEM 6.5, 6.4 and 6.3)

Can any admin help fix these build/acsess issues?
Error:  Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:<IP_ADDRESS>6:sonar (default-cli) on project spa.project.core: You're not authorized to run analysis. Please contact the project administrator. -> [Help 1]

`snyk` requires an authenticated account. Please run `snyk auth` and try again.

core.wcm.components has been updated to 2.11.1


fix: fixed issue #5

Issue #, if available:
https://github.com/aws-samples/aws-mobile-react-native-notes-tutorial/issues/5
Description of changes:
This PR is to fix issue regarding the error we get while deleting after setup in appsync demo.
I have used rest operator to fix the issue. I have tested it locally and it seems to work file.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@adrianhall  this PR is open for sometime now. May I know the reason why is it not getting merged ?
please let me know if there are any issue with this PR.

Sorry - I don't actually get notified of pull requests, so these only happen when I go and look at the repo, which isn't often in this case since I'm not doing much work on React Native any more.  I'll look at it this week and validate.

Thanks @adrianhall for accepting this pull request. This marks begining for my open source journey 🙂


chore(deps): update dependency lerna to v3.22.1

This PR contains the following updates:

Package
Type
Update
Change

lerna
devDependencies
patch
3.22.0 -> 3.22.1

Release Notes

lerna/lerna
v3.22.1
Compare Source
Bug Fixes

Move #2445 behind --no-granular-pathspec option (b3da937), closes #2598

Renovate configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.

[ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

Codecov Report

Merging #49 into master will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##            master       #49   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           22        22
  Lines          480       480
  Branches        92        92
=========================================
  Hits           480       480

Continue to review full report at Codecov.

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


Add support of Origin head on CORS requests

As per #651
I've followed the pattern of using the header! macro as this header seems relatively simple.  Happy to adjust if you think it's not the correct approach.

Thanks for contributing! Unfortunately, I'm here to tell you there were the following style issues with your Pull Request:

Commit: 308bf9b64c3b270d09b51ccbfa992b90c3faf491
Commits must be in the following format: %{type}(%{scope}): %{description}

Guidelines are available at https://github.com/hyperium/hyper/blob/master/CONTRIBUTING.md

This message was auto-generated by https://gitcop.com


"_rp2" module is not being merged correctly with docstrings

The rp2 module is split into two - rp2.py which is manually written and _rp2.py which is generated (I think) on the firmware board).
When running get-dosctubs, the docstubs are bring applied to rp2.py, not _rp2.py. rp2.py is later overwritten by frozen modules.
Frozen module pulls rp2.py from here: https://github.com/micropython/micropython/blob/master/ports/rp2/modules/rp2.py
Docstubs are generated from https://github.com/micropython/micropython/blob/master/docs/library/rp2.rst and https://raw.githubusercontent.com/micropython/micropython/master/docs/library/rp2.PIO.rst etc. In the latter you can see there is an attempt to associate it with _rp2.py but it doesn't seem to be working:
.. currentmodule:: rp2
.. _rp2.PIO:

I'm not sure therefore whether this is a bug of the stubber or whether the rst files should be fixed.
We can see though, that the docs never make it through to the published stubs: https://github.com/Josverl/micropython-stubs/blob/main/publish/micropython-latest-rp2-stubs/_rp2.pyi
But do make it through to docstubs: https://github.com/Josverl/micropython-stubs/blob/main/stubs/micropython-v1_21_0-docstubs/rp2.pyi albeit in the wrong file! (no _rp2.py file is generated)

I've attampted a fix for this here:
https://github.com/markb139/micropython/pull/1

I do not think that changing the micropython docs this way is the correct approach
Some of the  micropython modules are implemented partly in C and partly in Python, while the documentation does not always detail the implementation.
To compensate for this I've been writing some updates to stubber to apply the documentation for a module, also to its _variant.
That avoids needing to change the documentation, and also works for a few  other modules that have been implemented using the same approach.

That sounds like a good plan! Appreciate the effort to do this 'the right
way'😃
On Sun, 12 Nov 2023, 13:56 Jos Verlinde, @.***> wrote:

I do not think that changing the micropython docs this way is the correct
approach
Some of the micropython modules are implemented partly in C and partly in
Python, while the documentation does not always detail the implementation.
To compensate for this I've been writing some updates to stubber to apply
the documentation for a module, also to its _variant.
That avoids needing to change the documentation, and also works for a few
other modules that have been implemented using the same approach.
—
Reply to this email directly, view it on GitHub
https://github.com/Josverl/micropython-stubs/issues/727#issuecomment-1807136858,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAJWOWYF2ANI4LIHWPAFQWDYEDIPDAVCNFSM6AAAAAA6YARPSKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBXGEZTMOBVHA
.
You are receiving this because you authored the thread.Message ID:
@.***>

To be honest a lot of the changes in the PR are showing changes from master. Changes I have made are just here: https://github.com/markb139/micropython/pull/1/files/a4a9b682a3ce754ea1384b3332a62a6c857f5ccb..1006bc5e5015208d1e3dd89497a4bb3a48199d23

@samskiter,
I have updated the stubber tool and used that to update the typestubs, and the _rp2.pyi stub should now include the documentation where that could be matched.
I just release and published the updated stubs ( including the _rp2.pyi module) to PyPI,
so you can install / update as usual.
Please let me know if this works for you, and if there is anything missing.

Micropython Version
Published Packages
Post Version

v1.21.0

micropython-rp2-stubs
1.21.0.post1

micropython-rp2-rpi_pico-stubs
1.21.0.post2

micropython-rp2-rpi_pico_w-stubs
1.21.0.post2

Fab thanks! Having a bit micropython day tomorrow so will try and report back!