Add a TodoMVC example

While it might feel dated, it actually illustrates the basic interplay between a lot of moving parts (persistence, aggregate values, view filter, etc), and is simple enough to fit in one file.

i just started working on this 😄

@devsnek give a TodoMVC example with client side routing and merge the cell, thx

@gliechtenstein should modifying cell.$components actually update the components? I'm not seeing that happen, and it is making rendering this list very difficult.

@devsnek yes it's supposed to update $components.
But there's a gotcha (maybe you're running into this) https://github.com/intercellular/cell/issues/3
Let me know the solution in that link solves the problem. Otherwise please share a minimal piece of code that can be replicated and I'll take a look. Thanks!

@gliechtenstein right now i have
  _add(item) {
    this._items.push(item);
    // this.$update();
    return true;
  },
  _delete(item) {
    const index = this._items.indexOf(item);
    if (index !== -1) {
      this._items.splice(index, 1);
      // this.$update();
      return true;
    } else {
      return false;
    }
  },
  $init() {
    this.$update();
  },
  $update() {
    this.$components = this._items.map(i => todoItem(i));
  },

$update is called, but modifying $components does nothing

@devsnek only the attributes "declared" on the gene will auto-trigger $update(). This means you need to have an _items key defined somewhere on the gene object. Otherwise it won't trigger. More on this over at https://github.com/intercellular/tutorial#important
Also here's a fiddle that may help: https://jsfiddle.net/zk6s1c3z/
Let me know if this fixes your problem!

I know Object.observe() was removed from spec and Chrome although there are
some polyfills, but I think there was a DomObserver that's widely
implemented and can be used to monitor the newly added attributes...
El 30/06/2017 22:47, "gliechtenstein"<EMAIL_ADDRESS>escribió:

@devsnek https://github.com/devsnek only the attributes "declared" on
the gene will auto-trigger $update(). This means you need to have an
_items key defined somewhere on the gene object. Otherwise it won't
trigger. More on this over at https://github.com/intercellular/tutorial#
important
Also here's a fiddle that may help: https://jsfiddle.net/zk6s1c3z/
Let me know if this fixes your problem!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/intercellular/cell/issues/28#issuecomment-312369368,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAgfvps3cq-FGL2Sh7yL4QI2H58g8E5Pks5sJV7hgaJpZM4N9kKZ
.

@piranna yup we're using something similar to Object.observe(). We use Object.defineProperty. Just to clarify, Cell doesn't update the DOM directly and that's the whole point of the library--it lets you store variables on the DOM without any side-effects such as reflows on attribute changes--I think It would be extremely inefficient if we attached all the attributes directly on each element AND monitored them via DOM observer. Plus, I don't think it's even possible to monitor full fledged objects using DOM observer, with DOM observer you can at best track attributes which are strings.
Cell maintains a proxy object using Object.defineProperty which is much more efficient and portable. We could have used ES6 proxy, but it's not supported in all browsers (not even IE11). We may transition to ES6 proxy someday in the future when all browsers support proxies (In fact, the first version of Cell used proxies, and I had to come up with a clever way to get rid of it. Also the proxy polyfills are not really polyfills because underneath they actually use Object.defineProperty). Anyway, I think we should stay away from using the web API but use pure Javascript methods as much as possible because web APIs depend on browsers.
Also the explicit definition of variables is a feature not a bug, it's like how you declare public variables when defining classes to let the outside world know how to interact with the class. Hope this makes sense!

@gliechtenstein i do have an _items object on the gene, sorry for leaving out of that snippet.

@devsnek can you share a fiddle?

@gliechtenstein https://github.com/devsnek/todomvc/blob/master/examples/cell/app.js

@devsnek this is because you're trying to call these functions on regular objects. These gene objects are nothing more than a regular javascript object. Even after they get instantiated into a Cell element, nothing changes to window.todoList, it's exactly as you have written.
This means when you call window.todoList._delete(item);, the this context inside _delete will be the window object. You should be calling the _delete function on the generated element instead.
So, what would work is if you call
document.querySelector("#todo-list")._delete(item);

instead of this line
But this brings up an interesting issue, I see what you were trying to do there, maybe we could come up with simpler ways of referencing generated cells instead of doing document.querySelector all the time.
Lastly, I didn't understand your comment about the checked attribute. If above solution doesn't fix the checked issue, please could you elaborate?

also setting style on a cell breaks HTMLElement#style, overriding it with the string.

But this brings up an interesting issue, I see what you were trying to do there, maybe we could come up with simpler ways of referencing generated cells instead of doing document.querySelector all the time.

@gliechtenstein I was thinking about this over the last few days and while I don't have a fully formed thought I do have some observations.
First is that there appears to be three options for referencing child elements.

this.querySelector:

Pros:

traverse down the DOM skipping elements which serve no special purpose but for markup.
Can be more concise.

Cons:

using strings as query lookups, easy for typos and not good for refactoring.
requires now handling null results if elements not found.
What if I remove the class or id, I've now broken application logic.
can't query on cell attributes, only on the class/id.
Also classes in my mind should be style only *imho. This could be mitigated by constants but ¯_(ツ)_/¯.

walking $node.children

Pros:

Explicit, with little magic.
View element's properties and match any value. "I want all child nodes with _completed: false and _hamsters.length > 15". More complex pattern matching. Oh Elixir how you'd do well here...

Cons:

Explicit but verbose if walking past markup elements. See above.
Require a priori knowledge of DOM structure.

Custom walk/query. Function that walks children and matches list of predicates. Maybe with depth limits.

Pros:

Skip markup nodes
Expressive queries. "I want all child nodes with _completed: false and _hamsters.length > 15"

Cons:

Expanding the cell.js codebase.

Final option (most abstract), nodes with $cell: true or with some other identifying flag are bound to variables in the most near parent element with $cell: true so like $cell.cellChilderen. In my mind, there are stateful cells and view cells. If you have reference to these child cells you can send messages to them and vise versa. I'm thinking in terms of actor model supervision trees like in Erlang/Elixir.

Pros:

Direct linking of nodes meaning you know if they exist or not instead of handling null queries.
More explicit access.

Cons:

More complex inner workings of the library.
Could be secondary library on top of cell.js?

Wanted to add another option which in some ways is better because of an inversion of control. That is using something like Redux or insert n variations of Redux.
Some of the key benefits are; having a single source of truth, subscriptions are context local to state tracking cells and there's no need to have an identification schema because it's pulling data rather than pushing. Now of course local to the component data can be pushed down or whatever there's lots of options once you get the main chunk of state you're subscribed to. This of course has the limitation listed in #118 where you need to unmount the subscription.

@kingoftheknoll wow thanks for the thorough list of options. I like the "Final option" on your first comment. I also had some ideas along the same line of thought but I haven't been able to yet think of an approach I really like, but I have a feeling we're on the right track.
I think some variation of this approach would be best since we can implement the reference while preserving the decentralized nature. Let me think about this some more and update the thread as I come up with some ideas even if they're rough. Please don't hesitate to share more ideas on this when you come up with them too.
BTW just to clarify, the $cell: true currently signifies that the object that directly contains that attribute needs to be inserted into the DOM tree, so having $cell: true somewhere down the tree should not happen. (All global objects with $cell: true are plugged in as a root node.)
As for the redux idea, I think this can be something that can be built on top of Cell but doesn't necessarily have to be a built-in feature. In fact if we make this the default, it will break the decentralized nature of Cells because redux is a very centralized approach. I'm not saying that centralized approach is bad, and actually I think it's the easiest way to implement apps like todo list because these apps by nature are centralized (the TODO database is the single source of truth), but even then I think it would be ideal if the centralized approach can be built on top of a perfect decentralized solution. Hope this makes sense :)

@devsnek I just pushed an update that fixes the style problem https://github.com/intercellular/cell/pull/138 (Related thread https://github.com/intercellular/cell/issues/136) Hope this now fixes all the problems!

@gliechtenstein I agree that Redux like state management should be optional. I'm more saying it might be the most ergonomic thing because of the inversion of control.
On the flip side, if one is to push data down the question because where does the responsibility of the mutations lie? Cell.js already has a split view on this issue. First choice using the DOM api to select and mutate elements. Second is to delegate to the $components getter/setter which from an api standpoint is not too dissimilar to the declarative nature of React. Basically "here's what I want it to look like, draw it". But that's rather heavy handed and in my mind not the best choice for say, updating the background color of an element. Rather maybe it's a good choice for redrawing a table when paginating.
Which leads me to the point I keep coming back to which is there needs to be a conceptual/api boundary, dare I say a component with an api wrapping both choices. Now as a FP guy I really like delegation to something to do the side effects but since we want to sit on the DOM (dumpster fire of mutable state) I think an actor model is probably the best interface.  I don't think you should ever from the root of the DOM tree query down and start mutating stuff willy-nilly. Rather, I think messages should be sent to the inboxes of components where their can do mutations or delegate messages/mutations to their child components. Coming from Elixir, I think about this in terms of it's OTP process supervision trees.
So from that world processes get a PID. You can explicitly send to PID's but most often you use a PID registry. So I can imagine when starting with the JSON api, you can wrap a number of JSON dom elements with a string, or tuple with unique identifier and a handle_call function that will match on message key. When that root element of the component is created, a PID is created, register to Registry and set the handle_call function on that dom element. So then from the parent nodes you can send messages through the registry to the components using whatever pattern you used to register them.

Slight correction to what I said before. You would put the mailbox on the Genotype not the DOM element. And registering an identifier would be pointing back at the Genotype's inbox.
This also tickles my memory about how React and friends efficiently do updates on lists which is to give a unique id to each element in the list for fast targeted updates. That's not too different than what I'm proposing.
Another way to think about a registry would be to not have a global registry but rather a registry local to your immediate parent registry. But that would mean you can only send messages up and down the dom tree not across it... maybe not a good idea then =)

@kingoftheknoll just realized we're on a TODOMVC thread haha, I just created a separate ticket so we can leave this ticket alone. If anyone else is interested in this "centralized structure" discussion as well, please check out: https://github.com/intercellular/cell/issues/143

Created a basic TodoMVC.
Link to repo.


chore: move transaction creator test util to starknet api

This change is

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#661  👈
#660
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @ArniStarkware and the rest of your teammates on  Graphite

Merge activity

Sep 8, 3:01 AM EDT: @ArniStarkware started a stack merge that includes this pull request via Graphite.


Gitea OAuth provider is redirecting to just the path of redirect_uri, not the entire value

Description
Confirmed with https://oauthdebugger.com/
The provider doesn't redirect to the full URL, redirecting to only the path which results in a request to the gitea instance, not the calling website
You can see in the image below where the orange redaction matches. The redirect_uri is http://localhost:5209 but the Location header Gitea sends back is itself instead of the localhost uri.

Gitea Version
1.21.9
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
https://gist.github.com/nickdevereaux/36900fd90b2e470ba4f221566281386a
Screenshots
No response
Git Version
2.37.1
Operating System
Windows
How are you running Gitea?
Windows Services with executable gitea-1.21.9-windows-4.0-386.exe
Database
MSSQL

No idea why it would happen.
Are you using some reverse proxy and it is doing some rewriting to responses?
Could you provide a reproducible setup (eg, by docker or something) with detailed steps then help to reproduce and debug?

I'd need admin privileges to register the app on try.gitea.io wouldn't I? I'm not sure that's possible?
Either way I think you've cracked it @wxiaoguang, thank you, it is indeed behind a reverse proxy. I suspect the issue lies in there.

No idea why it would happen.
Are you using some reverse proxy and it is doing some rewriting to responses?
Could you provide a reproducible setup (eg, by docker or something) with detailed steps then help to reproduce and debug?

Confirmed with https://oauthdebugger.com/
Can you reproduce the bug on the Gitea demo site? No

If it can't be reproduced on try.gitea.io, then TBH it doesn't seem to be a bug on Gitea side ....

I'm not sure if I should make this a new issue, but I was able to replicate this issue with a relatively trivial set up of Traefik and Gitea in Docker, with Traefik acting as a reverse proxy.
You find the code here.
The Gitea configuration is as follows - from gitea.yaml:
      - GITEA__service__ALLOW_ONLY_EXTERNAL_REGISTRATION=true
      - GITEA__openid__ENABLE_OPENID_SIGNIN=true
      - GITEA__openid__ENABLE_OPENID_SIGNUP=true
      - GITEA__openid__WHITELISTED_URIS=https://sso.aredherring.tech/

After starting Gitea, I create a new repo and follow the instructions I wrote in the readme:
- Authentication Type: OAuth2
- Authentication Name: keycloak
- OAuth2 Provider: OpenID Connect
- Client ID: gitea
- Client Secret: `cd terraform/keycloak && tofu output -raw gitea_client_secret`
- OpenID Connect Auto Discovery URL: https://sso.aredherring.tech/realms/homelab

Attempting to then use Keycloak to login presents me with a redirect to the following URL:

https://gitea.aredherring.tech/user/oauth2/?client_id=gitea&redirect_uri=https%3A%2F%2Fgitea.aredherring.tech%2Fuser%2Foauth2%2Fkeycloak%2Fcallback&response_type=code&scope=openid&state=315e3deb-efed-4407-a787-6bb962f7c115

I can see in the browser history that there is no redirection to https://sso.aredherring.tech/realms/homelab. I can also verify that Gitea is able to reach the discovery URL listed, that ${discovery_url}/.well-known/openid-configuration  does return the correct output (inputting the wrong URL causes Gitea to emit an error), and the only logs in the console on a fresh Gitea instance are:
2024/05/05 18:37:35 ...eb/routing/logger.go:102:func1() [I] router: completed GET /user/login?redirect_to=%2f for <IP_ADDRESS>:0, 200 OK in 2.5ms @ auth/auth.go:146(auth.SignIn)
2024/05/05 18:37:38 ...eb/routing/logger.go:102:func1() [I] router: completed GET /user/oauth2/keycloak for <IP_ADDRESS>:0, 307 Temporary Redirect in 1.4ms @ auth/oauth.go:847(auth.SignInOAuth)
2024/05/05 18:37:38 ...eb/routing/logger.go:102:func1() [I] router: completed GET /user/oauth2/?client_id=gitea&redirect_uri=https%3A%2F%2Fgitea.aredherring.tech%2Fuser%2Foauth2%2Fkeycloak%2Fcallback&response_type=code&scope=openid&state=315e3deb-efed-4407-a787-6bb962f7c115 for <IP_ADDRESS>:0, 404 Not Found in 2.2ms @ context/repo.go:425(context.RepoAssignment)

I resolved this myself. This issue occurs when you specify the root of the openid provider, i.e, https://sso.aredherring.tech/realms/homelab instead of the fully qualified path to .well-known/openid-configuration ie https://sso.aredherring.tech/realms/homelab/.well-known/openid-configuration.

I resolved this myself. This issue occurs when you specify the root of the openid provider, i.e, https://sso.aredherring.tech/realms/homelab instead of the fully qualified path to .well-known/openid-configuration ie https://sso.aredherring.tech/realms/homelab/.well-known/openid-configuration.

So I think this is not a bug but a configuration problem.

It's a configuration problem, but I received false confidence in the green check  mark that said things were ok.
A potential improvement would be to either:

Have an example value that shows the .well-known/openid-configuration (Some SDKs don't require this to be here, which is why I was confused) or
Send a request when adding the authorization source that tests that a valid openid-configuration is received from the endpoint.

I understand that Gitea does something to validate the authorization source right now, but it's clearly not checking that an openid configuration is returned.
Either of these things would help prevent this from happening in the future :)


[FLAKE] runtime.RuntimeValidatedKVStoreTest Etcd KVStore

https://jenkins.cilium.io/job/Cilium-PR-Ginkgo-Tests-Validated/1720/testReport/junit/(root)/runtime/RuntimeValidatedKVStoreTest_Etcd_KVStore/
/root/jenkins/workspace/Cilium-PR-Ginkgo-Tests-Validated/src/github.com/cilium/cilium/test/ginkgo-ext/scopes.go:270
Expected
    <*errors.errorString | 0xc4204e4470>: {
        s: "Timeout reached: Cilium is not ready",
    }
to be nil
/root/jenkins/workspace/Cilium-PR-Ginkgo-Tests-Validated/src/github.com/cilium/cilium/test/runtime/kvstore.go:96

from the logs it looks like it was not able to connect to etcd.
time="2018-03-28T21:27:47Z" level=info msg="Cilium status is false" testName=RuntimeKVStoreTest
cmd: "sudo cilium-agent --kvstore etcd --kvstore-opt etcd.address=<IP_ADDRESS>:4001" exitCode: 0
 level=info msg="     _ _ _"
level=info msg=" ___|_| |_|_ _ _____"
level=info msg="|  _| | | | | |     |"
level=info msg="|___|_|_|_|___|_|_|_|"
level=info msg="Cilium 1.0.0-rc8 c2bf27a21 2018-03-28T20:21:06+00:00 go version go1.9.3 linux/amd64"
level=info msg="cilium-envoy  version: c2bf27a213a40a2da8a361473a371ab326085063/1.7.0-dev/Modified/RELEASE"
level=info msg="clang (3.8.1) and kernel (4.9.13) versions: OK!"
level=info msg="linking environment: OK!"
level=info msg="bpf_requirements check: OK!"
level=info msg="Mounted BPF filesystem /sys/fs/bpf"
level=fatal msg="Unable to setup kvstore" address="<IP_ADDRESS>:4001" error="dial tcp <IP_ADDRESS>:4001: getsockopt: connection refused" kvstore=etcd

where is etcd container being started?

Isn't etcd started by systemd in runtime tests vm?

Never seen again


CP SAT: Add DecisionStrategyProto::DEGREE heuristic

For some problems the degree heuristic, choose variables first which are involved in the most constraints, is rather helpful. But I am not sure how to count the constraints as it might take some time, therefore it would be better to calculate them once after model creation (maybe in solve?).
Adding it afterwards to cp_model_search.cc is straight forward.
Where and how would you count the constraints?

On the cp_model proto directly. Counting time will be negligible compared
to presolve + solve time anyway.
Laurent Perron | Operations Research |<EMAIL_ADDRESS>| (33) 1 42 68 53
00
Le sam. 15 sept. 2018 à 13:14, Phibedy<EMAIL_ADDRESS>a écrit :

For some problems the degree heuristic, choose variables first which are
involved in the most constraints, is rather helpful. But I am not sure how
to count the constraints as it might take some time, therefore it would be
better to calculate them once after model creation (maybe in solve?).
Adding it afterwards to cp_model_search.cc is straight forward.
Where and how would you count the constraints?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/851, or mute the thread
https://github.com/notifications/unsubscribe-auth/AKj17fl954EiVoiVIL7pF2YnvyICP_nEks5ubOEmgaJpZM4WqUE4
.

https://github.com/google/or-tools/blob/490360f4431225f497703de588246ccf0700edcc/ortools/sat/integer_search.cc#L290
Automatic search = activity based search alternating with lp search if
possible.
I believe fixed_search is off by default. There is no randomness by
default.
Laurent Perron | Operations Research |<EMAIL_ADDRESS>| (33) 1 42 68 53
00
Le dim. 16 sept. 2018 à 00:22, Phibedy<EMAIL_ADDRESS>a écrit :

You never use search strategies? The linear relaxation based heuristics
are only used if fixed_search is set to false? I thought that it just
uses the defined search strategies and chooses a variable based on some
randomness.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/851#issuecomment-421645062,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKj17Vd7A3_01-tEVkR01oHz9TgV39Gfks5ubX2_gaJpZM4WqUE4
.

Ah I see, randomize_search is disabled by default. I got confused by fixed_search as I thought that it is the opposite of randomize_search. But those are two different things as you can have randomized fixed search. Thank you :+1:


Tip of the Week: Remove Unused Code to Avoid Software Decay

This PR adds a new tip of the week titled "Remove Unused Code to Avoid Software Decay". It depends on another PR for an example notebook which is linked from the content.
Thank you for any comments, suggestions, or feedback you may have!

Just adding my kudos! Looks fantastic!

Thank you @falquaddoomi and @seandavi !


Does Neodash have proxy for connecting neo4j server

Currently, I'm using Neo4j Community 5.5 and Neodash 2.2 both with docker and in the same network (bridge driver). I've exposed and mapped Neodash with localhost:5005 so I can reach it from localhost. But unless I map Neo4j to localhost (which I don't want to cause of privacy), I can't connect it from Neodash.
So do you have proxy for connecting through you to Neo4j server. Thanks alot.

Hi @duongphannamhung ,
Neodash is a light client application that interacts directly with the DB from the user station through a JavaScript driver connection. If the Neo4J bolt endpoint is not reachable from the client terminal, Neodash will not work. Unfortunately we don't ship (at the moment) any backend proxy that may allow this.
In the future, (not strictly near one) we would separate the connection to the db logic from the client so connections get handled by a middleware server.


Include JSON files into build

Hi all,
I'm using create-react-app to create my small React application. In my application, I'm using some JSON files as data-source and load the data from JSON files to code with the statement below:
import components from './components.json';

However, when I try to run yarn build. It doesn't include the json file into build folder. Anyone know how to fix the issue?
Thanks in advanced.

This is inlined into your JavaScript file, it doesn't create a separate resource. Are you specifically trying to get a URL?

Oh let me check, I just need to have its data loaded into my application only.
One more question, I tried to open index.html file as file:// url. Can components.json data be loaded onto the view?

If you need your JSON data just stringify it.
import components from './components.json';

const componentsText = JSON.stringify(components);


LoomProvider should use a dummy address when making static calls

Currently the LoomProvider API requires a private key to be passed into the constructor https://github.com/loomnetwork/loom-js/blob/b0dc03fc7e8f65974e526e799a4c7c67d2b827e5/src/loom-provider.ts#L150
Frequently users will be constructing a LoomProvider for use with eth-signing, in which case the private key isn't actually needed. The private key should be optional, if it's not provided a dummy address should be used.
A related problem is that if a dummy private key is specified when constructing LoomProvider and callerChainId is set (as is usually the case when doing eth-signing) then the address used for static calls has the callerChainId prefix - which is the wrong prefix since the private key is always expected to be a native ed25519 key, and therefore the chain ID should always match the client chain ID.

https://github.com/loomnetwork/loom-js/pull/307


HTML to design PDF pages

Feature Request
Able to design the pdf pages with HTML and CSS with dynamic content.
Feature description
It's hard to code the pdfs when we have a ton of dynamic data.
Creating tables is necessary and surely Pdfkit provides it.
However, it would be great if Pdfkit would support html syntax for the pdfs out of the box and no need to do any additional stuff.
We can use plain syntax of html to structure to align the page.
also adding the CSS would be cherry on top
There is a package called pdf-node which does just that. However, we don't have the option to create new page and break the content according to our will.
However, I might be incorrect and missing something while providing the information, if you are aware about this stuff, please let me know. Thanks

I'm not a maintainer but I'll chime in and note that any HTML-to-PDF library requires some form of a browser. The library you linked depends on html-pdf which depends on phantomjs. The html-pdf npm package recommends using puppeteer. Puppeteer requires a browser to power its PDF generation too.
One exception I came across recently is react-pdf. Obviously react and HTML are not interchangeable, but it might work for your purposes. react-pdf depends on pdfkit so won't require a browser installation. I failed to get react-pdf working when I tried it but I didn't try very hard.
My suspicion is that this feature request is out of scope for this project but perhaps puppeteer could work for your purposes, it is very robust and fast.

I made react-pdf-html for this purpose
https://www.npmjs.com/package/react-pdf-html

Out of scope pdfkit.


Implement override to force engine-api in the absence of TTD

Description
In order to smooth the preparations for the merge, consensus is that we want execution clients to enable the engine API even in the absence of merge parameters.  This is in essence a re-enabling of the --engine-rpc-enabled api flag removed in #3875
Acceptance Criteria

make the engine-api available in the absence of merge configs
ensure rational behavior pre-TTD calls to engine api endpoints

I just pulled the latest develop docker image and I'm getting this trying to run on mainnet. The error seems to happen every time my Lighthouse node tries to talk to it:
2022-08-01 22:04:40.021+00:00 | vert.x-eventloop-thread-1 | ERROR | ExecutionEngineJsonRpcMethod | failed to exec consensus method engine_exchangeTransitionConfigurationV1
java.util.NoSuchElementException: No value present
	at java.base/java.util.Optional.get(Optional.java:148)
	at org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.engine.EngineExchangeTransitionConfiguration.syncResponse(EngineExchangeTransitionConfiguration.java:85)
	at org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.ExecutionEngineJsonRpcMethod.lambda$response$0(ExecutionEngineJsonRpcMethod.java:67)
	at io.vertx.core.impl.ContextImpl.lambda$null$0(ContextImpl.java:159)
	at io.vertx.core.impl.AbstractContext.dispatch(AbstractContext.java:100)
	at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:157)
	at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:829)

Reopening for above bug - can re-close with investigation @garyschulte


[WIP] add Oslo middleware X-Forwarded-Proto filter to service api-paste.ini files

You'll need to define the filter in each paste file, like I did at
https://github.com/blueboxgroup/ursula/pull/1842/files#diff-4c83f400b0ce7000950bf2272cd2138cR89

Ah, I missed that part, but it's now added.


Zen Mode Fullscreen Not working on Safari

code-server version: development
OS Version: Ubuntu

Description
When toggling Zen mode (CMD K Z), an error shows in Safari when attempting fullscreen.
prefixing with webkitReqestFullscreen would likely resolve the issue:
https://www.w3schools.com/jsref/met_element_requestfullscreen.asp
Steps to Reproduce

Keyboard Command CMD+K Z in Safari

This is a upstream bug so please open this in Microsoft/vscode with [web] prefixed.


Period date change

There is a PUT on the Period resource (you call it periodic summary in the text but in the URL it’s a Period) but you can’t amend the dates on the PUT, only the financial data – is that correct?  And if so, why?

Hi Tracy,
You are correct. We decided to make period dates immutable as the date ranges for period objects have business rules that must not be broken. A collection of periods must have date ranges that:

Are contiguous (i.e. contain no gaps).
Do not overlap with one another.

If we were to allow you to change the date range of an existing period, we would no longer be able to easily guarantee these properties.
For example, if you wanted to shrink the date range of a period, we would no longer be able to guarantee that the collection of periods for that user is free from gaps. Our recommendation would be to move the financial data into an existing period, or by creating a new period with the dates you require.
Thanks,
Jacob


[nano] updating HEAD to git repo

Nano's source tree has been migrated to git.

Merged in https://github.com/Homebrew/homebrew-dupes/commit/7e4f13df8db5c01d04b96abb95c91aec884d047d. Thank you for your contribution to Homebrew @tmaone; we appreciate it! :smiley_cat:


Only display the legend when the crosshair is displayed.

Fixes #498.

:+1:

As this is a change from the designs, I think it's worth getting confirmation from a UX/product perspective, to confirm if this is something which we should be changing. I'll chase this up.
Labelling as blocked until we have a decision.

It has been confirmed that we will make this change.


Bar Chart: Bar Chart Echart X Axis and Y Axis labels not showing

Bug description
When creating a bar chart, we are able to add the x axis and y axis labels. However, upon editing the labels, the x axis and y axis labels gets removed. Besides, the x axis label rotation does not function as well.
How to reproduce the bug

Go to chart page and click on + Chart
Select a dataset and bar chart
Input the required data and generate the chart.
In the customize tab, add an x-axis and y-axis label together with the label rotation.
Save the chart, exit the page and select the saved chart from the chart list.
Edit the x-axis and y-axis label, the label will the removed.

Screenshots/recordings

Image when first time creating chart

Image after saving the chart and editing the x axis, y axis label

Superset version
master / latest-dev
Python version
3.9
Node version
16
Browser
Chrome
Additional context

This issue happens inconsistently, where sometimes only the x-axis is removed and sometimes both are removed.
Certain times, reloading the page fixes the issue.

Checklist

[X] I have searched Superset docs and Slack and didn't find a solution to my problem.
[X] I have searched the GitHub issue tracker and didn't find a similar bug report.
[X] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

@dosu the renderTrigger has already been set to true and the configuration in Echarts option are also correctly set. However, this issue is still present.

🎉 Preset Bounty Available: $150 USD 🎉
To claim this bounty, please carefully follow the steps below.

📋 Steps to Participate

Review Guidelines:
Read through the Preset Bounty Program Contribution Guide for complete details on bounty requirements.

Show Your Interest:
Complete the Preset Bounty Program Survey and comment this issue to express your interest.

Join the Slack Channel:
After completing the survey, you’ll receive an invitation to the dedicated Apache Superset Slack channel.

Get Assigned:
To officially start, ensure a Bounty Program Manager has assigned you to this issue.

Submit Your Solution:
When ready, submit your solution with the Fixes #{issue_number} notation in your Pull Request description.

Claim Your Bounty:
Sign up at GitPay.me and submit your solution via: https://gitpay.me/#/task/983

💡 Additional Notes

Only developers assigned by a Bounty Program Manager should start working on this issue to win the bounty.
Be sure to follow the guide closely to avoid any delays in payment. Please, allow a few days after your PR has been merged for the bounty to be released.

Good luck, and happy coding! 🎉

Is it related to #30370 ? I created a PR that should fix this issue.

Yes, according to my testing, it solves this issue too.


Fixups

Thanks Joshua. We don't use Change-Id here, can you remove them from your commits please?

Thanks Joshua. We don't use Change-Id here, can you remove them from your commits please?

Oops. Sorry about that. I'll remove them


NO-JIRA: chore(gha): run code-server playwright tests for pushes (and scheduled run) as well

Description
Originally the image name was different for PR check and for the other events, and I was lazy and did not want to be solving that at the moment. It was solved in the meantime and now the test can be simply run and the image will be found and all is well.
How Has This Been Tested?

https://github.com/jiridanek/notebooks/actions/runs/12399015193

Merge criteria:

[x] The commits are squashed in a cohesive manner and have meaningful messages.
[x] Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
[x] The developer has manually tested the changes and verified that the changes work

/cherrypick 2024a

/lgtm
/override ci/prow/images

/approve

/cherrypick 2024a


Moving the necessary C++ infinite loop to separate thread does not work as expected

Hello,
I am trying to port a EPICS C++ library to Node.js and encounter a problem, I am wondering if there is a solution from koffi point of view.
There is already a Python binding for the EPICS Portable Channel Access Server as follows, and I want to write a JavaScript binding with the same logic by moving most of the implementations to C++ and only keep some callbacks for customization purpose in JavaScript.
https://github.com/paulscherrerinstitute/pcaspy
https://github.com/paulscherrerinstitute/pcaspy/blob/master/pcaspy/driver.py
The simplest C++ example for Portable Channel Access Server can be found here,
https://github.com/paulscherrerinstitute/pcaspy/blob/master/test/caserver.cpp
There is a necessary infinite loop used to process requests from and post event to Channel Access clients, from which my problems originate.
while (true)
        server.process(0.2);

Problem 1:
If the infinite loop is inside test() function as follows, which is called from Node.js, the Portable Channel Access Server works properly. However, JavaScript callbacks and other JavaScript code after that can never execute. I understand.
void taskUpdate(void *arg)
{
    myPV * pPV = (myPV *) arg;
    while (true) {
        pPV->setValue((double)rand()/RAND_MAX*10);
        epicsThreadSleep(2);
    }
}

int test()
{
    myServer server;
    myPV pv;
    server.addPV("rdi", &pv);

    epicsThreadCreate("taskUpdate",
            epicsThreadPriorityMedium,
            epicsThreadGetStackSize(epicsThreadStackMedium),
            taskUpdate,
            &pv);

    while (true)
        server.process(0.2);
    return 0;
}

Problem 2:
If I move the necessary infinite loop to a separate thread as follows, JavaScript callbacks and other JavaScript code after that can execute, however the Portable Channel Access Server does not work properly and does not respond to  Channel Access clients. I do not understand why.
void taskUpdate(void *arg)
{
    myPV * pPV = (myPV *) arg;
    while (true) {
        pPV->setValue((double)rand()/RAND_MAX*10);
        epicsThreadSleep(2);
    }
}

void serverProcess(void *arg)
{
    myServer *server = myServer::getInstance();
    std::cout << server << std::endl;
    while(true) {
        std::cout << "serverProcess()" << std::endl;
        server->process(0.2);
    }
}

int test()
{
    myServer server;
    myPV pv;
    server.addPV("rdi", &pv);

    epicsThreadCreate("taskUpdate",
            epicsThreadPriorityMedium,
            epicsThreadGetStackSize(epicsThreadStackMedium),
            taskUpdate,
            &pv);

   epicsThreadCreate("serverProcess",
            epicsThreadPriorityMedium,
            epicsThreadGetStackSize(epicsThreadStackMedium),
            serverProcess,
            NULL);
    return 0;
}

Maybe the problem is complex because EPICS is complex and multi-threaded but Node.js is single-threaded.
Any idea and workaround is appreciated, Thanks.

I have found the issue. Some objects are defined as local variables instead of dynamic allocated variables, so after the test() function returns, they are not available anymore. Sorry for bothering.


MP4: Unexpected upgrade of gnre to ©gen

Reproducer
parse_ilst()
Summary
This opinionated behavior not only prevents applications from detecting and fixing/resolving those issues themselves. It causes ambiguities and mixes up metadata which is much more concerning.
Afterwards the imported Ilst contains both regular ©gen atoms side by side with implicitly migrated gnre atoms. They are indistinguishable and alter the metadata unexpectedly when written back to the file.
The only situation when such an implicit migration would be acceptable is if the original Ilst does only contain gnre but no ©gen atoms. But conditional, data-dependent behavior is harder to reason about, so better not try to be clever.
Expected behavior
This feature should either be made optional or provided as a manual, post-processing step on the imported Ilst. I would prefer the latter, because import and migration should be independent.
Assets
No response

Are you saying after parsing a tag you end up with both ©gen and gnre atoms? That shouldn't happen, all gnre atoms should be upgraded. I do agree that the user should have the choice to toggle the conversions, though.
I'm thinking about adding ParseOptions::implicit_conversions since I'm working on #62 right now and it'll support merging TYER, TDAT, and TIME into TDRC on parse. Does that sound good?
I'd rather make conversions a toggle than remove them outright, since they make it possible to get files on the same page simplifying the implementation of <Ilst as Accessor>::genre for example.

Are you saying after parsing a tag you end up with both ©gen and gnre atoms? That shouldn't happen, all gnre atoms should be upgraded. I do agree that the user should have the choice to toggle the conversions, though.

No. But you can't tell the ©gen tags apart if there are multiple of them. You end up with multi-valued genre tags that need to be resolved manually. Probably not intended and very inconvenient.
Fortunately, I didn't write any tags back with lofty yet and so I could fix the original files first by removing the legacy gnre tag.

The ambiguities only occur for files with both gnre and ©gen tags.

But you can't tell the ©gen tags apart if there are multiple of them

I'm not sure what you mean, the atoms contain no additional metadata to separate them from one another. You can iterate all values like this:
let genre_atom = ilst.get(&AtomIdent::Fourcc(*b"\xa9gen"));
for data in genre_atom.data() {
    if let AtomData::UTF8(genre) = data {
        println!("Genre: {genre}");
    }
}

Unless I'm misunderstanding what you mean?

You end up with multi-valued genre tags that need to be resolved manually. Probably not intended and very inconvenient.

With ilst, it is expected that atoms be merged. I took a look at TagLib, mutagen, and music-metadata and they all do the same thing with the gnre atom.
None of them let you toggle that though, so I'll definitely look into making that an option. It'll just have to be made very clear that it will break Accessor methods.

I am referring to this situation:
Before

gnre = [0]
©gen = ["Pop"]

After

©gen = ["Blues", "Pop"]

The value from the legacy atom should be ignored if the official genre atom is present. Otherwise you end up with multiple genres and could no longer decide which one of them is the "real" one. The legacy atom was probably just a left over that has not been removed when adding ©gen.
I decided to strip the gnre atom from all my files using AtomicParsley after noticing Lofty's warning. To avoid importing old garbage data. Unfortunately, the warning doesn't indicate which file is affected.

TagLib maps gnre to ©gen. But only the first ©gen atom wins and the content of all following atoms with the same identifier are discarded.
https://github.com/taglib/taglib/blob/f3fb4d83a469fea7e23491a1dfbac14c728ac968/taglib/mp4/mp4tag.cpp#L577

Ah, yeah that's a confusing situation. We can't really signal which genres have been converted.
I've already added ParseOptions::implicit_conversions locally. I guess if a ©gen is present, we can also just skip the conversion regardless of the toggle? I'd rather not follow in TagLib's steps and just throw away atoms.


how can i get temperature

as title.

use this: https://github.com/LibreHardwareMonitor/LibreHardwareMonitor
or this: https://github.com/openhardwaremonitor/openhardwaremonitor


如何对其他 APP 长截图

你好，请问如何对其他 APP 进行长截图？

Yes i also want to know that how can i take screenshot of other apps?


"window is not defined" (server side rendering)

Checklist

[X] I've looked at the documentation to make sure the behavior isn't documented and expected.
[X] I'm sure this is an issue with Leaflet, not with my app or other dependencies (Angular, Cordova, React, etc.).
[X] I've searched through the current issues to make sure this hasn't been reported yet.
[X] I agree to follow the Code of Conduct that this project adheres to.

Steps to reproduce

Include a leaflet map in an angular app with prerendering
try to pre-render / server-side-render

Expected behavior
leaflet should not call the window constant. It should use globalThis or check if window indeed exists, at least for code that is executed directly on import.
It is OK if leaflet uses window after import, when executed, to allow for bundling it while allowing prerendering
Current behavior
Error:

ReferenceError: window is not defined

Coming from this line:
export var requestFn = window.requestAnimationFrame || getPrefixed('RequestAnimationFrame') || timeoutDefer;

Minimal example reproducing the issue
not really possible here using the leaflet editor
Environment

Leaflet version: 1.8.0
Browser (with version): none, that's the issue :)
OS/Platform (with version): MacOS, Github Actions (Ubuntu)

Duplicate of https://github.com/Leaflet/Leaflet/issues/6331 , https://github.com/Leaflet/Leaflet/issues/3220 , https://github.com/Leaflet/Leaflet/issues/6552 .


Fix DNS error on WASM adding static IPs to every container on a new network

This change solves an error with Docker's DNS. With this, instead of relying on the DNS, we assign static IPs to every container on a new network called "Fixed" and we specify the exact DB direction on the DATABASE_URL env variable.

Hello, I am a code review bot on flows.network.
It could take a few minutes for me to analyze this PR. Relax, grab a cup of coffee and check back later. Thanks!


Add systemd analyze test

Motivation for this change
Trying to improve the NixOS test infrastructure; fixing the handling of shared dir in Python test driver, adding a copy_from_vm function, and adding a test exporting evereything systemd-analyze has to say.
Things done

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

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

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

Notify maintainers
cc @flokli

Depends on/includes #74077

       "systemd-analyze {} > {}/{} 2> {}/{}.err".format(

           " ".join(args), tgt_dir, name, tgt_dir, name

       )

This seems to be overly generic. We only call it with one argument.

True, but cheap

What about just executing machine.succeed(…) with a list of the "raw" commands:
machine.succeed(
   "systemd-analyze blame > blame.txt",
   "systemd-analyze critical-chain > critical-chain.txt",
   "systemd-analyze dot > dependencies.dot",
   "systemd-analyze plot > systemd-analyze.svg",
)

Well, not exactly; stderr from dot subcommand is actually useful in some sense. And also I do want to put stuff into a subdirectory that I can later copy as a whole.

with subtest("Prepare output dir"):

   machine.succeed("mkdir systemd-analyze")

I think we can put the equivalent of doing a mkdir -p $(dirname $dst) into thecopy_from_vm function, so we don't have to repeat ourselves.

This is in-VM directory for systemd-analyze output that will later become the original source location for copy_from_vm

Also see nixos/tests/blivet.nix, which would benefit from that too (if it wouldn't have been broken, see https://github.com/NixOS/nixpkgs/issues/33496).

with subtest("Install the resulting data"):

   machine.copy_from_vm("systemd-analyze", "")

   machine.copy_from_vm("systemd-analyze/systemd-analyze.svg", "")

Some files seem to be missing here.

No: I copy The Main Picture to the toplevel, and then the entire set of data as a subdirectory.

With #74077 merged, can this be rebased on top of master?

OK, the hard part of rebase (building the kernel from master which is ahead of Hydra) is done, the test still seems to work (of course it was always rebased on #74077 so no surprise here)

Maybe I should re-mention @flokli

Can you move the replies sent via E-Mail into the thread? GitHub doesn't properly attach these, and keeping the discussion in threads seems like a good thing to do.

Both options provided by GitHub (threaded and single-stream) are annoying in different ways, of course (which is why mailing lists, which are actually suitable for discussion, allow switching the navigation mode), but oh well… got around to starting a Firefox instance.

@GrahamcOfBorg build systemd-analyze

@GrahamcOfBorg test systemd-analyze

Thanks!

Thanks for the carefuk rereading of all that and for the explanations!

Thanks for staying through till the end, and enduring my pickyness :laughing:

I have to recognise that all of the pickyness was clearly actionable.


Incomplete socket send with fast writer and slow reader

This might be related to #493 ; I'm not sure.  It certainly feels very similar.  Reproduced under build 14376.
Open up two WSL terminals.  In the first, run the following two commands:
dd if=/dev/zero of=big.dat bs=3000000 count=1
python -m SimpleHTTPServer

Then, in the second, run the following:
curl http://localhost:8000/big.dat

Expected:

curl will successfully transfer the file

Actual:

curl emits the following error:

curl: (18) transfer closed with 509705 bytes remaining to read

The exact number of bytes remaining varies, though it's consistently in the vicinity of 500kb for me.

This issue does not reproduce for me if I run curl.exe in Windows.
It also doesn't reproduce for me if I run python -m SimpleHTTPServer in Windows, and curl in WSL.
It also doesn't reproduce for me if I redirect curl's stdout; for example, curl http://localhost:8000/big.dat | wc -c.

strace on the Python server:
...
read(5, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 16384) = 16384
sendto(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 8192, 0, NULL, 0) = 8192
sendto(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 8192, 0, NULL, 0) = 8192
read(5, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 16384) = 16384
sendto(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 8192, 0, NULL, 0) = 8192
sendto(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 8192, 0, NULL, 0) = 8192
read(5, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 16384) = 1728
read(5, "", 14336)                      = 0
sendto(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1728, 0, NULL, 0) = 1728
read(5, "", 16384)                      = 0
close(5)                                = 0
munmap(0x7fd0e7c30000, 4096)            = 0
shutdown(4, SHUT_WR)                    = 0
close(4)                                = 0
select(4, [3], [], [], {0, 500000})     = 0 (Timeout)
select(4, [3], [], [], {0, 500000})     = 0 (Timeout)
select(4, [3], [], [], {0, 500000})     = 0 (Timeout)
select(4, [3], [], [], {0, 500000})     = 0 (Timeout)
...

strace on the curl client:
clock_gettime(CLOCK_MONOTONIC, {94087, 668388000}) = 0
poll([{fd=3, events=POLLIN}], 1, 1000)  = 1 ([{fd=3, revents=POLLIN}])
clock_gettime(CLOCK_MONOTONIC, {94087, 668724000}) = 0
poll([{fd=3, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}], 1, 0) = 1 ([{fd=3, revents=POLLIN}])
recvfrom(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 16384, 0, NULL, NULL) = 16384
write(1, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096                                    ) = 4096
write(1, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 12288                                   ) = 12288
clock_gettime(CLOCK_MONOTONIC, {94087, 699670000}) = 0
clock_gettime(CLOCK_MONOTONIC, {94087, 700584000}) = 0
clock_gettime(CLOCK_MONOTONIC, {94087, 701067000}) = 0
clock_gettime(CLOCK_MONOTONIC, {94087, 701318000}) = 0
clock_gettime(CLOCK_MONOTONIC, {94087, 701434000}) = 0
poll([{fd=3, events=POLLIN}], 1, 1000)  = 1 ([{fd=3, revents=POLLIN}])
clock_gettime(CLOCK_MONOTONIC, {94087, 701848000}) = 0
poll([{fd=3, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}], 1, 0) = 1 ([{fd=3, revents=POLLIN}])
recvfrom(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 16384, 0, NULL, NULL) = 16384
write(1, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096                                    ) = 4096
write(1, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 12288                                   ) = 12288
clock_gettime(CLOCK_MONOTONIC, {94087, 732999000}) = 0
clock_gettime(CLOCK_MONOTONIC, {94087, 733974000}) = 0
clock_gettime(CLOCK_MONOTONIC, {94087, 734506000}) = 0
clock_gettime(CLOCK_MONOTONIC, {94087, 734785000}) = 0
clock_gettime(CLOCK_MONOTONIC, {94087, 734913000}) = 0
poll([{fd=3, events=POLLIN}], 1, 1000)  = 1 ([{fd=3, revents=POLLIN}])
clock_gettime(CLOCK_MONOTONIC, {94087, 735264000}) = 0
poll([{fd=3, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}], 1, 0) = 1 ([{fd=3, revents=POLLIN}])
recvfrom(3, "", 16384, 0, NULL, NULL)   = 0
clock_gettime(CLOCK_MONOTONIC, {94087, 735804000}) = 0
clock_gettime(CLOCK_MONOTONIC, {94087, 735991000}) = 0
clock_gettime(CLOCK_MONOTONIC, {94087, 736374000}) = 0
time([1467350132])                      =<PHONE_NUMBER>
close(3)                                = 0
rt_sigaction(SIGPIPE, {SIG_IGN, [PIPE], SA_RESTORER|SA_RESTART, 0x7fc270560330}, NULL, 8) = 0
write(2, "c", 1c)                        = 1
write(2, "u", 1u)                        = 1
write(2, "r", 1r)                        = 1
write(2, "l", 1l)                        = 1
write(2, ":", 1:)                        = 1

I'm mildly perturbed that curl is attempting to push its error message through the kernel one byte at a time.  But that's presumably after the actual failure has occurred.

@aseering - Thanks for reporting the issue and the repro steps. I was able to reproduce this issue and I have an understanding of the bug.

I'm not sure if the issue I am experiencing is related but I think it is.
I get constant "net::ERR_CONTENT_LENGTH_MISMATCH" errors from Chrome when I try to visit my uWSGI HTTP server. When using Flask as webserver, I get frequent "net::ERR_CONNECTION_RESET" (in the Flask stacktrace I get some Broken Pipe errors, I will attach them soon). This same app works fine on a virtual machine for both uWSGI and Flask.
If you need any more information, please do ask.

@sunilmut -- you mentioned a little while back that you have a repro for this; just wondering where it is on your priority list?
There's this ticket and there's #616; if you keep tracing there are about a dozen tickets that refer to those two; etc.  It would be great to hear something from y'all about what your plans are for this collection of issues.

FYI -- this still reproduces on build 14955 and Ubuntu 16.04.
Interestingly, during this download, CPU usage on the machine goes up a lot.  But that usage doesn't show up in top running in WSL; it's not assigned to either Python or cURL.  If I open up Task Manager, I see Console Window Host pegging a CPU core.  Neither application is writing anything to stdout when this increased CPU utilization occurs.

@aseering - Thanks for reviving this thread again. I was out for couple of weeks and so the delay in the response. I will take this up immediately, since I agree that this could be manifesting in many different forms. I will post back once I have something.

Thanks you so much for the update. Once this is fixed I can actually move my dev environment fully to WSL! Thanks to you too @aseering for your continous support for WSL, you're everywhere ;).

@aseering - So, I have root caused the problem. The way the repro is setup, the server (python) side after sending the last byte, calls shutdown and closes the socket. Watching the data transfer under the debugger, it appears that whenever the socket is being closed by python, invariably, there is pending data to be sent. When there is pending data in the socket (with linger disabled), WSL closes the socket in the background. The way the background logic works is that it will wait for the last byte to be sent or a timeout, whichever comes first. After that it will force close the socket. In this case, we are not hitting the timeout and WSL force closes the socket after sending the last byte. Force closing the socket causes an abortive disconnect, which disregards any data that has not been received so far by the peer (i.e curl in this case).
Now, when I look at the socket man page, the line that grabs my attention is When the socket is closed as part of exit(2), it always lingers in the background. And, it makes me wonder, "how long does the socket linger in the background (maybe by trying to do a graceful disconnect) after sending the last byte, before forcefully closing the connection".

@sunilmut -- hm, good question...  As a programmer, my instinctive expectation is that there would be no simple timeout.  I can't immediately find anything online that contradicts that expectation.
I would expect applications that care about such things to manage them explicitly using SO_LINGER in order to have more-granular control over the socket's exact behavior.  In that case, the kernel is given an explicit timeout and should follow it.
If the client dies or otherwise goes unresponsive while the server is trying to send data, then the connection will naturally hit TCP's built-in retry-count limit and get torn down.  That's true regardless of whether the server is still trying to send, but, given that the kernel buffer is of bounded size, it does guarantee that the socket will close in bounded (though very large in the worst case) time.
Basically, TCP itself guarantees that the send must still be making progress.  If it's making progress, why kill it?  If the answer is "because I'm worried about running out of kernel memory or ephemeral ports", then your app is dealing with high load and should be using features like SO_LINGER to carefully manage its resource usage.  If it's not -- c'mon, that's like two lines of code; just go fix it :-)  (Ah, the advantages of a mostly-open-source ecosystem on the design of the underlying platform...)

Yeah, I can't find any documentation regarding a timeout either (unless SO_LINGER is used).  I'm basically just trying to justify an educated guess.

@sunilmut This blog post has some related information regarding SO_LINGER behavior. You're probably already all over this, but I thought it worth the heads up anyway. Cross platform linger has been a bane for ages.

Regularly-scheduled ping:  This still reproduces for me on build 14971.  Though, interestingly, curl hangs for several seconds before reporting that the transfer has closed -- I thought I remembered it erroring out immediately before.
Also, a few more people appear to have hit this issue, and have filed new tickets.  (Relevant tickets are linked above.  Mentioning them in case anyone is subscribed to just this ticket, as I think github won't then send you a notification e-mail.)

Today, I have been investigating the possibility of switching to Windows from Ubuntu (since I pretty  much only use the command line anyway (apart from gvim); unfortunately, I think I'm seeing this too :
^C^C----------------------------------------
Exception happened during processing of request from ('<IP_ADDRESS>', 57104)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 295, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 321, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 651, in __init__
    self.finish()
  File "/usr/lib/python2.7/SocketServer.py", line 705, in finish
    self.wfile.flush()
  File "/usr/lib/python2.7/socket.py", line 303, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
KeyboardInterrupt
----------------------------------------

Python 2.7.6. I'm not sure how to find the versions of the Microsoft s/w, but I installed it today.

@davidmaxwaterman -- you can find the version by opening "About your PC" in System Settings.  (Cortana finds it directly for me, if I just type in "About your PC".)  You specifically want the "OS Build" field.
Unless you're running a Windows Insider build, if you're running WSL, I would expect your OS Build to be 14393.  You can get newer builds of Windows (with new features but potentially more bugs) through the Insider program.  Unfortunately, the latest Insider build doesn't yet have a fix for this issue either.

Just an update that this issue has been fixed in the dev branch and should soon hit the release branch. With the above repro steps, I was successfully able to transfer up to 3GB of data without any issues (thought it took a long time). Many thanks @aseering for being persistent and helping us stay on track. I will also ping this thread again once the fix makes it to the release branch.

So what was the answer to your pretty astute question: "how long does the socket linger in the background (maybe by trying to do a graceful disconnect) after sending the last byte, before forcefully closing the connection?"

@therealkenc - For getting maximum reliability guarantees from the TCP stack, the TCP socket should not be closed until both the ends have been fully disconnected (or without the full termination handshake  complete). To prevent server side sockets in a hanging state (from misbehaving clients that do not close their ends), there is timeout built it some systems. When the user mode socket is closed, a disconnect request (or FIN in TCP terms) is issued. When the FIN is ACK'ed, the TCP socket is in FIN_WAIT_2 state. After waiting for tcp_fin_timeout(http://man7.org/linux/man-pages/man7/tcp.7.html) seconds in the FIN_WAIT_2 state, the socket is forcibly closed. In WSL, we were not completely following the TCP guidelines, thereby leading to some data loss. The Windows networking team helped us figure it out.

Is this fix included in insider build 14986? Just wondering so I know I can upgrade and test it

@xBytez Unfortunately, no. The fix got checked in the dev branch 4-5 days ago. The release branch runs behind the dev branch on an average 2-3 weeks (this is not a hard and fast rule, but just from my experience). Just to give you an understanding of the timeline. I am also eager to get this validated.

@sunilmut Thanks for the information. Was just curious. I also found the WSL Release notes on the MSDN blog so I'll just have a look at that ;). Thanks again!

It seems that 14986 caused this problem occuring more often. I'm using gulp's http server, so this issue is more visible in the browser when loading assets (larger CSS or JS files). Any ideas on new build release date (+/-)?

Any ideas on new build release date (+/-)?

The fix has made it to the release branch. It depends on which build they snap for the Insider release (which is not in our (WSL team's) control). If not in the upcoming Insider release build, it should definitely be in the next one after that. I don't have any more insight into the timelines/dates etc. Thanks for your patience.

This should be fixed in 15002. Please validate and let us know if the issue persists. Thanks for your patience, @all and persistence, @aseering.

As for now (an hour of playing with stuff around after upgrade this morning), works perfectly ;-) Thank You!

Same here! I was able to run my Flask server just fine.

@krzysztofantczak & @xBytez - Really glad to know that things are working so far. Will keep the issue open for sometime, before closing it out.

This is also working great for me.  Thanks!

Glad to know. Thanks @aseering


need dataset

Nice work!
However,  I can not find the dataset to the work on Internet, could you please send me the dataset?
my email address is<EMAIL_ADDRESS>thanks a lot!

Thanks for following my work, the link to the dataset has been updated. You can also extract directly from the link below.
链接：https://pan.baidu.com/s/1_yFbJ6nX1ovOK0_9BZ5Lrg?pwd=1234 提取码：1234.
All images and their associated annotations in the dataset can be used for academic purposes only, but any commercial use is prohibited.
------------------ 原始邮件 ------------------
发件人:                                                                                "zhaozhen2333/iFLYTEK2021"                                                                                @.>;
发送时间: 2022年2月23日(星期三) 上午10:40
@.>;
@.***>;
主题: [zhaozhen2333/iFLYTEK2021] need dataset (Issue #1)
Nice work!
However,  I can not find the dataset to the work on Internet, could you please send me the dataset?
my email address is @.***
thanks a lot!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: @.***>

I have received the dataset
Thanks again!

Nice work!
However, I can not find the dataset to the work on Internet, could you please send me the dataset?
my email address is<EMAIL_ADDRESS>thanks a lot!


how to new data？

how to new data？

Could you explain it in more detail?

Could you explain it in more detail?


addition of getRowsAfterFilter to the api.getModel

So i added it to model so that i could get the rows that hadn't been filtered out as the array already exists.
I was using it for exporting data from the table.
Is this right?

the change is 'src/ts/rowControllers/inMemoryRowController.ts'

ah, you want to get the rows after the filter, where'as 'getVirtualRowCount' and 'getVirtualRow' show you what's displayed (so can have rows missing if your grouping and some groups are closed).

yh exactly... is adding getRowsAfterFilter the best way to do it?

am not sure . . . . as the data you get back will be grouped . . . . . might be better if i provide way that returned a flat list - like what you give the grid.

closing this as you can now achieve this with the api.forEachNodeAfterFilter() method.


Use code snippets from managed identity credential samples in identity readme doc and fix minor generation issues

Fixes https://github.com/Azure/azure-sdk-for-cpp/issues/6017

Updated the snippet generation doc to show a concrete example of the command
No more extra new lines at eof for generated readmes
No more extra indentation for code snippets, but we maintain the relative indentation for nesting within the snippet
Updated the readme to use code snippets from the managed identity credential samples
Fixed the keyvault secrets sample and updated its readme to use code snippets (looks like the keyvault secrets snippets introduced in https://github.com/Azure/azure-sdk-for-cpp/pull/5213 were overwritten in https://github.com/Azure/azure-sdk-for-cpp/pull/5574)

Waiting on code owner review from benbp, danieljurek, and/or weshaggard.

As engsys owners, @danieljurek, @weshaggard, @benbp could one of you please review and approve. Ty!


Types for type parameters

Is your feature request related to a problem?
We need different types of type parameters to set

types (e.g. List),
schemas (e.g. Table).

Desired solution

[ ] Syntax to set the type of a type parameter (identical to parameters, i.e. after a colon T: ...). The type can be any type in the grammar Additionally, the meta-types $Type (to accept a type) and $Schema (to accept a schema are allowed). These become new variants of SdsType in the grammar.
[ ] Check: $Type and $Schema must only be used as the type of type parameters.
[ ] Check: Value assigned to the type parameter must have the correct type.

Possible alternatives (optional)
No response
Screenshots (optional)
No response
Additional Context (optional)
No response

Since containers for tabular data are the only classes that might have schema type parameters, it makes no sense to specify "types" for type parameters everywhere. We'll look into a solution that introduces less noise.


Broken changelog

https://insomnia.rest/changelog/6.0.0

Hmm, works for me!

@gschier weird. I just checked again and still the same :man_shrugging:
Anything I can do to help narrowing down the problem?

It might be cached in your region from before it went live.
I just cleared the cache. Did that help for you?


Package request: Vinegar

Project description
An open-source, minimal, configurable, fast bootstrapper for running Roblox on Linux.

Modern wrapper for running Roblox in Linux.

homepage URL: https://vinegarhq.github.io/
source URL: https://github.com/vinegarhq/vinegar
license: GPL-3.0.
platforms: linux

This seems to have been fixed by #270020

Am I just missing something, or is the Studio not working by default?

@Ryoschin In that case, I think you should open a new issue


How do I use auth token?

Hi, @erdenezul
You pass it from frontend to your backend in Authorization token on each request to associate this request with particular user as described in TokenAuthentication documentation.

@BurkovBA I am using django_mongoengine and have no idea to support it.

@erdenezul You can just follow this example: https://github.com/BurkovBA/django-rest-framework-mongoengine-example.
It has a users app that implements TokenAuthentication.

@BurkovBA thanks for your help


New version: vim.vim.nightly version 9.1.0104

Pull request has been created with WinGet Releaser v2 :rocket:
Microsoft Reviewers: Open in CodeFlow

Hi @chrisbra,
The package didn't pass a Defender or similar security scan. This might be a false positive and we can rescan tomorrow.
(Automated response - build 729.)

Automatic Validation ended with:

Installation failed with exit code -1978335187 2024-02-13 00:02:38.704 [FAIL] Installer failed security check. Url: https://github.com/vim/vim-win32-installer/releases/download/v9.1.0104/gvim_9.1.0104_x86.exe Result: 0x80004005

(Automated response - build 729.)


Too many extra divs

Width: 100px
Height: 600px
Elements: 50
11 pages when 6 needed

Next button get "200" parameter instead of width. Number of divs was right.
Fixed


CPU: add torch.compile for F.double_quant and F.quantize_4bit

We didn't use torch.compile for these two functions because of some issue. These issues are now fixed in PyTorch.
Using torch.compile brings performance gain and also avoid some issues during finetuning.

Cool! Is this ready? Because it's still marked as draft.

Cool! Is this ready? Because it's still marked as draft.

Thanks. I think @jiqing-feng will collect some data before we mark it ready.

For quantize_4bit_impl, it only happens in the load model, so these are no difference with nf4/fp4 performance before and after we applied torch.compile.
For double_quant_impl, I have tested it on llama-7b inference and opt-6.7b finetune;found no difference in performance.
We plan to add torch.compile in quantization op but didn't integrate in the first version, this is because the issue in the comment:Don't use torch.compile for now due to PyTorch issue https://github.com/pytorch/pytorch/issues/124382. And now the issue has been fixed, so we can add torch.compile again. The torch.compile will be optimized constantly in pytorch :)
Thx!

Thanks @jiqing-feng for explaining. Then it's ready to merge, @Xia-Weiwen, right?

Thanks @jiqing-feng for explaining. Then it's ready to merge, @Xia-Weiwen, right?

Yes. Please. Thanks.


New heteroscedastic noise GP latent model with example notebook

PR content:

Title
Description
Minimal working example

Title
heteroscedastic noise sparse variational GP
Description
This introduces several new classes in order to provide the functionality for heteroscedastic noise modelling.
Firstly, the likelihoods.HeteroscedasticLikelihood now handles extra *args passed to all of it's functions.
This enables models to provide heteroscedastic noise evaluated at the given X  either at train or test time.
Note: The *args options is also a good idea to add to all other likelihoods, besides heteroscedastic likelihoods, because it allows more complex likelihoods to be defined (e.g. things similar to SwitchedLikelihood but more complex).
I have added a likelihoods.HeteroscedasticGaussian likelihood at the moment for example purposes.
Secondly, the latent.Latent class is a GP without the requirement of having observed information.
The separation of Model from an underlying GP latent is required for modelling hyperparameters as GPs.
Note: This separation can easily be applied to all prior existing models (see models/hgp.py for example)
Lastly, the models.hgp.HGP defines a sparse variational model that computes the a variational likelihood by sampling the heteroscedastic log-noise latent. A second KL term is also computed on inducing points of both the model latent and the noise latent.
Minimal working example
Please see doc.source.notebooks.heteroscedastic_model.py

Hi @Joshuaalbert, this looks like great work. Out of personal interest, do you have any accompanying paper for this work?
However, I don't think we can include this in GPflow per se, as it is beyond the scope of the project. We purposefully want to keep GPflow relating to single layer GPs only, and to ensure that the codebase stays manageably small and of high quality. We organise extensions by having external repositories that depend on GPflow. For example, @hughsalimbeni's deep GP code (which also has a similar feature to your Latent class). If you place this code in a personal repository, we could link to it as related work.
Let us know what you think!

Thanks Mark, I did the derivation myself, and could post a small white paper on arxiv for those curious.
That wouldn't happen until after May 21st. Yes I've seen Hugh's work and took some inspiration from his DGP class structure. I'm fine with keeping this repo in my own profile and having you link to it. Are there any requirements that you have to link to it?

No real requirements, perhaps just a one line description about what the repo is supposed to do. Are you submitting it to NIPS by any chance? If so, I'm sure I'll see it in the proceedings.

Hi @markvdw I could submit it to NIPS however I'm leaving for travel tomorrow until the 20th. I have started the paper on overleaf and will fill out the main part of it today, however I want to know if you also want to put your name on it and help correct it/add whatever you want. I will fill out the abstract, introduction, derivation, figures, and some references however I won't have internet until the 20th quite literally. I'm travelling rural madagascar. Therefore, if you would edit/submit it, it could potentially make it to NIPS. I guess it shouldn't take too long, and it wouldn't be your priority. Let me know. I'll send you the overleaf link if you agree.

Ah, that's ok, I was just asking since the date you were back seemed so close to the deadline :) I'm just curious about what you're using GPflow for!

@markvdw I've put the heteroscedastic model in a git repo. https://github.com/Joshuaalbert/heterogp

@Joshuaalbert the point of #736 was actually that you don't need to overwrite predict_mean_and_var, variational_expectations, etc. - at least not if you're willing to move the latent GP from the likelihood into the model (which is the cleaner way IMO).
Simply define logp(self, F, G, Y) and conditional_mean(self, F, G) and conditional_variance(self, F, G), then in your model's _build_predict return (meanF, meanG), (varF, varG), where F is the "actual" GP and G is your latent GP for the noise. Then in _build_likelihood you just do mean, var = self._build_predict(self.X) as before, and you have to include both GPs' KL divergences. Let me know if my explanation makes sense or not ...

Your explanation makes sense. There are other cases where passing extra arguments from the model to likelihood functions are useful, but in general I also would usually prefer keeping things with the model. The exception being that I like the idea of having a GP latent class (see heterogp.latent.Latent) be its own thing, and models may use them as attributes. Feels neater.

@st-- do you mean with quadrature? Like in this http://www.comonsens.org/documents/conferences/205_vhgpr_icml.pdf

@hughsalimbeni  I believe that paper is only for a Gaussian likelihood. In that case, yes things can be neatly integrated.


Memory consumption is way too high.

Because of the not tuned defaults of the badger databases.

Merge the badger KVs in a single KV

much better with 513a30718b6e129f8dcbbc386d42f5d55de4fae5


Prevent scrolling behind language popover

Fixes #533
This implementation uses pointer events. See browser compatibility here: http://caniuse.com/#feat=pointer-events
When the popover is moused over, it disables scrolling for the body and enables it only for the popover. When the pop over is moused out, the original settings are restored.

This does not solve the issue: when scrolling the window, the mouse is out of the popover so it is still possible.
You cannot solve this with pointer-events because we need to detect when the user clicks out of the popover to close it. Try instead to listen to the scroll event. ;-)
Thanks for contributing!

Closing since we fixed it in another branch


Less verbose log in dev mode

This is how my console looks like when starting startinamic on postcss.org

Maybe replace coonsole.log and nanoLog with debug ?

Why not :)

:+1:


Fix types for "NodeNext" module resolution

When a typescript project uses the NodeNext option for the moduleResolution in the tsconfig, the types are missing. They also have to be set for the exports, otherwise the compiler can't find the types. This probably need to be also changed for the other packages.
I've checked that it worked by creating a new project with this option and linked the package to the local version. After this, the type information reappeared and the compiler was happy again.

Thank you.


What is considered empty value for type:String ?

Hi,
I was expecting an empty string to fail validation with this Schema:
const ss = new SimpleSchema( {test: { type: String } } );

ss.namedContext().validate({test: null}); fails
ss.namedContext().validate({test: ''}); passes
I would not expect an empty string to pass
How do I set a String field as required?
I'm probably missing something but I need help
thanks

I am having the same issue. I have recently set removeEmptyStrings to false when cleaning, but required fields with empty strings are passing the validation.
I'm not sure whether this issue is related to simple schema or collection2. My call to check in the method succeeds with an empty string, but I get the following stack trace from the update method itself:
update failed: Error: project number is required
    at getErrorObject (http://localhost:3000/packages/aldeed_collection2-core.js?d232e487bdbad3334b609b3c6c0e6534c4ea1ad5:443:15)
    at doValidate (http://localhost:3000/packages/aldeed_collection2-core.js?d232e487bdbad3334b609b3c6c0e6534c4ea1ad5:426:13)
    at Mongo.Collection.(anonymous function) [as update] (http://localhost:3000/packages/aldeed_collection2-core.js?d232e487bdbad3334b609b3c6c0e6534c4ea1ad5:179:25)
    at updateProject (http://localhost:3000/app/methods/project.methods.js?8db880a8ee9ac5cfbc341725d7218d8804868e02:6:14)
    at http://localhost:3000/packages/ddp-client.js?250b63e6c919c5383a0511ee4efbf42bb70a650f:3911:25
    at _.extend.withValue (http://localhost:3000/packages/meteor.js?9730f4ff059088b3f7f14c0672d155218a1802d4:971:17)
    at _.extend.apply (http://localhost:3000/packages/ddp-client.js?250b63e6c919c5383a0511ee4efbf42bb70a650f:3902:54)
    at _.extend.call (http://localhost:3000/packages/ddp-client.js?250b63e6c919c5383a0511ee4efbf42bb70a650f:3780:17)
    at controller.save (http://localhost:3000/app/client/projects/project-edit/project-edit.component.js?b4526fc72a312fcc7043099c5930caab33576abc:52:20)
    at fn (eval at <anonymous> (http://localhost:3000/packages/angular_angular.js?6ef5b4329a79d88e8f7015b32dd7cac8f53d3237:14109:15), <anonymous>:4:260)

I am using the following versions:
aldeed:collection2              2.9.0
aldeed:simple-schema            1.5.3

Thanks

H there,
for what it's worth,
on my side empty fields were validating because I was not using the `clean' method
but if you're using collection2 this should not apply I believe
I don't think any special options are needed to make validation fail on empty strings (after cleaning)
I'm still wondering why I have to clean to enforce validation failure on empty strings with a required field though - I always thought empty strings would trigger a 'required' validation rule by default
thanks

Cleaning doesn't help me as I'm passing ss.clean(doc, {removeEmptyStrings: false}); which leaves empty strings intact. Calling check doesn't throw an error as I was expecting.
I'm using removeEmptyStrings to avoid having to create a modifier document. I was originally sending the new document to server and using $set, but this fails if you are trying to remove an existing value. I may have to replace the whole document instead, but I have to pass {validate: false} to the update method for this to work.
Thanks

I am facing something similar as I'm trying to do atomic updates on a form
I'm using clean to make sure empty strings are considered as empty values (and triggering validation)
but as cleaning seems to remove the field from the payload and that (because I'm doing atomixc updates) I only have {_id: value, field_to_be_updated: value} in the payload, I end up with a payload that only has  {_id:value}
because I'm using the ValidatedMethod pattern/package (https://github.com/meteor/validated-method) and collection2 (with attachSchema) collection2 throws an error saying the payload is now empty when calling Items.update(_id, {$set: payload}
I don't think this will help @samicemalone but I'm documenting my findings here
at the moment I ended up validating a cloned object so that my call to MyCollection.updatewill be done with the original payload (which I figure is re-validating and cleaned by collection2)
here is the ValiatedMethod:
methods.updateItem = new ValidatedMethod({

	name: 'Items.methods.updateItem',

	validate: (payload) => {

		// use Collection Schema and pick the single properties we want to validate
		let updateSchema = Items.schema.pick(Object.keys(payload))

		// clean input
		// we clean an cloned object to avoid passing an object with only an _id to the 'run' method
		// if the field is optional and value is an empty string it will be discarded by the 'clean' call
		// resulting in an unusable payload in 'run()'
		let _payload = updateSchema.clean(Object.assign({}, payload));
		updateSchema.validate(_payload);

	},

	run (payload) {

		// remove _id from payload
		_id = payload._id;
		delete payload._id;

		// update Item
		Items.update(_id, {$set: payload}, { validate: true });
	}

});

I don't think this is really related to the issues's title directly but maybe someone more experience will shed some light on what could/be improved in how I do things

Hello anyone solved this issue? I am having the same issue :( empty strings are not validated.
Here is my sample code
//Method
export const addStar = new ValidatedMethod({
    name: 'addStar',
    validate: new SimpleSchema(
        {
            description: { type: String }
        }).validator(),

    run({ description }) {

        Stars.insert({
            description: description,
            starcount: 0,
            createdAt: new Date()
        });

        return 'yey';
    }
});

//Call
addStar.call({description : text},(err,res)=>{
            if (err) {
                console.log(err);
                console.log('fail');
            }
            else
            {
                console.log('success');
                console.log(res);
                this.refs.description.value = '';
            }
        });

I am using meteor 1.3 and packages
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>

Empty strings pass. This is the expected behavior. If you want to enforce a certain minimum number of characters in the string, use the min option.

My problem is that Schema.validate() does not trigger 'is required', but when I actually trying to add object in collection, it throws 'is required'. Both receives title = ''.
Why validate() doesn't remove empty strings?
Links = new Mongo.Collection("links")
Links.attachSchema new SimpleSchema {
     title:     {type: String, max: 200}
     url:       {type: SimpleSchema.RegEx.Url, max: 200}
}

validator = Links.simpleSchema().newContext()
validator.validate {title: '', url: ''}

if I call with title = title || null, it throws 'Title is required', which I was expecting from the first place.

SOLVED IT!
There is a note in the docs: NOTE: The Collection2 package always calls clean before every insert, update, or upsert.
This is how I fixed it: validator.validate validator.clean(data, {mutate: true}), options
Thanks @aldeed! Great and useful package.


Add mex interface.

This adds the ability to call julia from matlab through a mex function.

[x] Implement basic functionality.
Test basic functionality on:

[x] Windows,
[ ] Mac OS X,
[ ] *nix.

[x] Automate the build of the mex file.
[x] Write documentation.
[ ] Add some automated tests.

This supercedes #36.

If you were to download matlab compiler runtime onto the travis vm's, that wouldn't come with the ability to create mex files would it?

@tkelman, I just checked: the matlab runtime comes with all the DLLs and headers that you would, at a minimum, need to build a MEX file. It also includes a mex exectuable for compiler/platform-independent(ish) building.

In fact, I think I've decided to put jlcall in its own repo, as it can be made to be independent of MATLAB.jl.

Might be quite interesting to submit this to the FileExchange, and see what MathWorks does with it. If you sell it as "here's a way of enhancing Matlab, by expanding the languages that Matlab can call," it just might fly :smile:.

I have decided to move all of this functionality into the jlcall project.


ivadomed input dimensions change of order compared to actual input dimensions (via nibabel)

This is potentially a bug that will be transferred to the main ivadomed repository (as an issue and/or PR) after verification.
The input dimensions of subject images read via nibabel are in a different order than the NumPy arrays inside ivadomed/transforms.py. I haven't done a full trace yet, but it is possible that during processing / loading of the data the order of axes are somehow altered with. Another alternative is that the subject images we are working with are somehow problematic.
To reproduce this error, first (i) clone this repository, (ii) clone the data, and (iii) run preprocessing as shown in the main comment of #11. Whereas basel-mp2rage-preprocessed/data_processed_lesionseg/sub-P005/anat/sub-P005_UNIT1.nii.gz has a shape of (42, 105, 28) as read via nibabel, this will be converted to (28, 42, 105) in ivadomed. This can be verified with adding a print(sample.shape) inside ivadomed/transforms.py, for example here.
Currently, we address this change of order in #11 by changing the order of the center crop, length, and stride parameters accordingly as mentioned here. The validity of this approach (and hence the suspicion for a bug) is supported by the immensely improved results shown in this week's progress report.
(Another possibility is that this expected behavior, and we can simply reshape the output --> to verify)

I suspect this issue is related to the improper usage of the slice_axis field in ivadomed.
First, let's look at the orientation of the input image:
data_basel-mp2rage_scseg_20211217_104003/data_processed_clean/sub-P001/anat $ fslhd sub-P001_UNIT1

qform_xorient	Anterior-to-Posterior
qform_yorient	Superior-to-Inferior
qform_zorient	Left-to-Right

--> The input image has the 3rd dimension oriented along L-R, meaning that the orientation is sagittal.
Next, let's look at the config file used. Especially, the field slice_axis:
https://github.com/ivadomed/model_seg_ms_mp2rage/blob/cb6708c72e26b39b9de61f72f5fd981b9e889392/config/seg_lesion.json#L33
Here, it says "axial", meaning that ivadomed is expecting an axial image, whereas in fact the orientation is sagittal.
This has likely caused the confusion about the cropping size along each dimension to produce unexpected results:
https://github.com/ivadomed/model_seg_ms_mp2rage/blob/cb6708c72e26b39b9de61f72f5fd981b9e889392/config/seg_lesion.json#L97
Given that other users might fall in the same trap, we might want to think of alternative solutions to make it less confusing for our users.

@jcohenadad There is still something that I can't comprehend about this. Taking basel-mp2rage-preprocessed/data_processed_lesionseg/sub-P005/anat/sub-P005_UNIT1.nii.gz as the current example, below is table summarizing the shapes we get with different load methods:

Load Method
Shape

nibabel
(42, 105, 28)

ivadomed, "slice_axis": "axial"
(28, 42, 105)

ivadomed, "slice_axis": "sagittal"
(105, 42, 28)

ivadomed, "slice_axis": "coronal"
(105, 28, 42)

nibabel doesn't match with any of the shapes. I am wondering what is "correct" here. For now, I will take ivadomed, "slice_axis": "sagittal"as reference and adapt the parameters accordingly.

nibabel doesn't match with any of the shapes. I am wondering what is "correct" here. For now, I will take ivadomed, "slice_axis": "sagittal" (due to image orientation) as reference and adapt the parameters accordingly.

yup, i am not surprised there could be inconsistencies. Ivadomed is only interested in the last dimension (ie: slice), so it did what you asked for: nibabel's 3rd dim is "28" and ivadomed's 3rd dim is "28". However, the X and Y dims are swapped, but that could happen as ivadomed was not designed to also account for these.
In order to solve that issue, we would need to also check for the 1st and 2nd dimensions, and instead of only asking for the slice, we should ask for the orientation, e.g. RPI, LAS, etc.
Discussion with the ivadomed's team is required here.

so it did what you asked for: nibabel's 3rd dim is "28" and ivadomed's 3rd dim is "28"

I see, thanks for the explanation! I will stick to sagittal and use (128, 64, 32) for center-crop, length, and stride params.

Discussion with the ivadomed's team is required here.

Agreed! Just to be more clear why I had an issue with this (and to correct any misconceptions I have if there are any) in the first place: When I work on a new task, I check the resolutions and shapes of the images (as seen with this QC script in this project) and use via nibabel. When nibabel gives me the shape as (X, Y, Z), I design center-crop, length, and stride parameters with this shape in mind.
Now I learn that this will not work in ivadomed. I wonder what the correct approach here is. I get this table by inserting a print line inside ivadomed, but obviously that's not ideal.

Closing this issue as

merged PRs #11 and #19 implement the discussed changes on "slice_axis" key in the ivadomed config files
an ivadomed issue #1023 is opened so that we continue the discussion about the confusion on  "slice_axis" key there


Where is owner he just disappeared

Probably on some well deserved Christmas / winter break :)

@Karatla Sorry I was on vacation! Now I'm back. I'm going to publish the new version as soon as possible 👍

OMG you are back !
Thanks for coming back !


always use remote docs when replicating integrated data

When integrated data is updated out of sequence (e.g. by an import) remotely local replication will frequently choose the local doc, as the imported doc will have a lower rev owing to its being created from scratch.
This leads to changes by etl (e.g. importing missed levels) being ignored by local databases.

[ ] replication of integrated data should always accept remote changes regardless of difference in revision number

Is this useful? http://stackoverflow.com/questions/18434686/how-to-resolve-conflicts-with-continuous-replication

if always deleting the local doc for which there is a conflict, replication will continue by writing the remote doc right?

Afaik deleting the doc locally will only create a new revision and that revision will most probably become the winning revision again and the doc will stay deleted. If we would be able to purge the local doc from the db, then the doc will have to be replicated again with the copy from the database, but that is not possible yet in PouchDB (it would also be inefficient because it requires syncing the remote copy twice).
The way to handle conflicts is to delete what we consider to be the losing revision, i.e. the local revision in this case. Explanation here, see Eventual conflicts section.
A createAt/updateAt property will make this straightforward and since we need to recreate the integrated-data database anyway, it won't make too much difference.
Actually even if we recreate the remote database and the remote revs are reset to rev 1-x, the local docs will still contain several revs, which makes the database bigger and slower. I am having a look at using auto compaction to prevent this.

Issues

CouchDB replication algorithm does not guarantee that update weekly levels are wriiten to localDBs.

Aim

ALWAYS update local weekly stock levels with remote weekly stock levels  values irrespective of versions
[] For docs with no updatedAt property,  delete losing revisions. (db.remove)
[] For docs with updatedAt property, reduce conflicting docs to one array, sort by updatedAt and pick the most recent as winner.

Test

commit docs with updatedAt property,  with same _rev level separate DBs and then sync both DBs. The doc should have values of the revision with the most recent updatedAt and no revisions conflicting with the current _rev.

Thanks Femi! Just adding a bit more detail here:
Since we're going to add an updatedAt property to all docs, the most likely case is that one of the rev has an updateAt property and the other hasn't. The one with the updatedAt property should be chosen as the winning one.

For docs with no updatedAt property, delete losing revisions. (db.remove)

Hey Femi good start, needs more specificity:

please change the test to use a  remote doc with a lower rev, meaning that it will always lose unless the fix is put in place. Otherwise your test could sometimes pass without the problem being fixed
can you also specify the null case (prior to fix, what would you expect to happen - remote doc that is more recent, but with a lower rev, will not be replicated locally)
please specify the database and doc type so that it targets the reported problem and module - locations, integrated-data
how would you commit the doc?
how would you sync both DBs?

Please write that out in the test first


Error loading the Morphable Model: Error opening given file: ./bfm2017/bfm2017-1_bfm_nomouth.bin

I follow the step in github. When I used the latest convert-bfm2017-to-eos.py(7ec85e6028dfcdf959c87ac7d926681121e55022), there is error follow:
`Traceback (most recent call last):
File "convert-bfm2017-to-eos.py", line 53, in
texture_triangle_indices=[])  # uv-coordinates can be added here
TypeError: init(): incompatible constructor arguments. The following argument types are supported:
1. eos.morphablemodel.MorphableModel(shape_model: eos.morphablemodel.PcaModel, color_model: eos.morphablemodel.PcaModel, texture_coordinates: List[List[float[2]]] = [])
2. eos.morphablemodel.MorphableModel(shape_model: eos.morphablemodel.PcaModel, expression_model: Union[eos.morphablemodel.PcaModel, List[eos.morphablemodel.Blendshape]], color_model: eos.morphablemodel.PcaModel, texture_coordinates: List[List[float[2]]] = [])
Invoked with: <eos.morphablemodel.PcaModel object at 0x000001551C1B1830>, <eos.morphablemodel.PcaModel object at 0x000001551C1328B0>, <eos.morphablemodel.PcaModel object at 0x000001551C171870>; kwargs: vertex_definitions=None, texture_coordinates=[], texture_triangle_indices=[]`

Because the the problem, I used the eos-py1.16.0, the problem is disappear. But when I used the bfm2017-1_bfm_nomouth.bin in one program, another problem come up with:
Error loading the Morphable Model: Error opening given file: ./bfm2017/bfm2017-1_bfm_nomouth.bin
That all.

I seem find the reason, maybe I should use the old version of convert-bfm2017-to-eos.py and eos-py0.16.0 together.

Hi @XIAO-RUI-RUI,
I just ran the latest version of convert-bfm2017-to-eos.py (eos 1.3.0 from the master branch), and it loaded, converted and saved the BFM2017 just fine, without any errors. I can then also successfully load the converted model using eos.morphablemodel.load_model(...).
I think you must have done something wrong locally, or modified the script in some way.
Make sure you're on the latest master branch or v1.3.0. Definitely do not use an eos version as old as 0.16 anymore.


Visualizations improvement

Hello @MorrisNein! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

In the file fedot/core/visualisation/opt_viz.py:

Line 433:121: E501 line too long (123 > 120 characters)


Virtual Machine Snapshots

I want to take a snapshot of the full virtual machine state so that I can restore it possibly even on another machine (in an external function that was called during the .wasm execution).
It seems necessary to only serialize the VirtualMachine struct for this, is this correct?

Only fields related to the runtime state (including CallStack, CurrentFrame, Globals, Memory, Yielded, NumValueSlots, Gas) need to be serialized. Other fields can be reconstructed from the same WebAssembly file.

Thank you!


Object.keys not polyfilled on Firefox < 4

Object.keys is not implemented on Firefox < 4 (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys), however its config.json doesn't mention Firefox at all.
My workaround: use //cdn.polyfill.io/v1/polyfill.min.js?features=default,Object.keys|always|gated

Same thing with Object.create (see https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/create).

Fixed in https://github.com/Financial-Times/polyfill-service/commit/47eeae66dda4759ffbdc9001c2b16a249ed07a55


Compilation issues

Trying to compile this code under Linux with g++ 4.8.2 fails, because your code uses C++ 11 features. So adding these two lines to CMakeLists.txt fixes the problem:
set_property(TARGET TrainDemo.out PROPERTY CXX_STANDARD 11)
set_property(TARGET TestDemo.out PROPERTY CXX_STANDARD 11)

Sorry, that change only works with CMake 3.1
Add this instead, but this will only work for gcc:
set(CMAKE_CXX_FLAGS "-std=c++11")

Thank you very much for the solutions. I will update it as soon as possible.

+1 for including this, I have the same problem without modifying CMakeLists.txt.

Or, add the following line in CMakeLists file
add_definitions(-std=c++11)
P.S., Both does the same job. This is just what i prefer ;)

Or:
set (CMAKE_CXX_STANDARD 11)