All built-in renderers always return [object Object]

Both plots and simple expressions such as (+ 1 2)  produce only [object Object] as output. Stranger still, exceptions and explicit output using print work as expected.

Looking at the WS traffic, what's coming from the server seems correct, although potentially quoted one time too many. For instance (+ 1 2) results in:
{"id":"89fa25e5-7b0a-4c54-827b-a6c3d207224d","ns":"tranquil-galaxy","session":"1b0a16ff-5747-4d87-bb76-99f8d6226ad1","value":"{\"type\":\"html\",\"content\":\""3"\",\"value\":\"\\\"3\\\"\"}"}

There are no Javascript errors. OS X. Have tried in Chrome 44 and Safari.

That is very strange ... what version on Gorilla are you using, and what command did you start it with?

0.3.4 (from Clojars)
lein gorilla (from a blank project)

Huh. The only thing I can think of is if one of the dependencies "bundled" with Leiningen has changed - what version of lein are you using? I'll try and reproduce on a fresh VM.

2.51.
I've now tried with a clean profiles.clj and it works as it should, so it must have been a conflict with one of the other plugins.

I just ran into this issue. I removed cider-nrepl and venantius/ultra from my ~/.lein/profiles.clj profile, and the problem is solved. I suspect there's simply a limit to the number of things that can mess with the (n)repl without things going awry.

Hi Sam, thanks for the details. I think Gorilla needs to be compatible with cider, as cider is so widely used. I'll look in to this and try and figure out how to work around the problem.

I'm going to hope this is fixed with the latest version, org.clojars.benfb/gorilla-repl "0.5.1". If not, please open a new issue at benfb/gorilla-repl. Thanks!


parallel-letter-frequency: steep learning curve

First of all, thanks for Exercism, it's an awesome tool to learn new programming language.
I have just ended the torture and cheated my way out of the parallel-letter-frequency exercise. It was my 33rd exercise in Go track and I find it to be the worst I had so far in terms of understanding what to do.
I'd like to illustrate my point:

Check out example solution at https://github.com/exercism/go/issues/1941#issuecomment-963046147
There is no way I'd write such a code given one line of requirements in the exercise ("Count the frequency of letters in texts using parallel computation.")
There is absolutely no way I could write anything like it without proper experience with Go and its approach to concurrency (Wait groups, concurrency patterns, ranging over channels, anonymous functions - I knew nothing of that).
There are zero hints. There's wall of text that leads you to read here and there, but after reading and watching 4 hours worth of information on concurrency and having some kind of understanding about what it is all about, I still had no idea how to approach the problem. My initial solution used worker approach, but I had no idea that iterating over opened channel never ends, so I got stuck again.
The previous exercise "the-clock" has 4492 people submitted their solutions, whereas "parallel-letter-frequency" has 2058. I don't know if it tells anything, the one before that is "grains" and it has 2786.

There's quite a bit of concepts to utilize in this exercise, and it may be better to split it into smaller assignments.
PS I'm sorry, there maybe a better way to deliver feedback, but the exercise got me too frustrated to look it up :(

@Eptarch Thanks for pointing this out. We launched v3 of Exercism a bit more than 3 month ago. v3 theoretically allows us to define which learning exercises need to be completed before a practice exercise will be unlocked. Currently, we are working on creating these learning exercises for the different concepts. The ones related to concurrency are not created yet, see our roadmap https://exercism.org/docs/tracks/go/roadmap#h-potential-future-concepts. Creating concept documentation and inventing new learning exercises is a lot of work and everyone does this on their free time so it takes quite long to progress here. Once we have the learning exercises that teach about concurrency in place, we will set parallel-letter-frequency to only unlock after those are completed. Then everyone doing the exercise should be well equipped to solve it.
In the meantime we will discuss whether we can raise the difficulty setting here so it comes up a bit later in the exercise list.
In general, please keep in mind that there is no "blocking" mechanism in v3 of Exercism anymore. You can leave aside any practice exercise you like and just do another one instead.
Opening an issue for something that doesn't work out well is fine but please keep the CoC in mind which states we try to be emphatic, kind and polite to each to other and remember that almost all the work on Exercism is done by volunteers.
@exercism/go Currently this exercise has difficulty 3 (same as e.g. anagram, acronym, beer song) which marks it as "easy" on the website. What about we raise the difficulty score for now so it shows as "medium", at least until we got all the unlocking in place?

@Eptarch Thanks for our feedback. It's always great to have the feedback of people going through the track and talk about their pain points. This allow us to make things better, that's why I appreciate the time you took to let us know about your experience.

There is absolutely no way I could write anything like it without proper experience with Go and its approach to concurrency (Wait groups, concurrency patterns, ranging over channels, anonymous functions - I knew nothing of that).

This is on us. Right now, we don't have any concept exercises teaching about this stuff, which I understand that does require someone to learn about this outside Exercism. In the future, we want to have concept exercises that cover these topics. The idea is for a new student on the track to complete the concept exercises first and then go over the practice exercises (parallel-letter-frequency is a practice exercise). Do you think that if you knew about these concepts before you would be able to figure out what the exercise intends?

My initial solution used worker approach, but I had no idea that iterating over opened channel never ends, so I got stuck again.

One of the things I love about this exercise is how different the solutions can be. In the most simple solution, you just have to know about channels and goroutines, everything else is optional to get a first solution working. In such solutions, you don't need to know about waitgroups, ranges over channels, anonymous functions or even that channels can be closed. A mentor can then help to introduce more concepts bit by bit into the solution.

The previous exercise "the-clock" has 4492 people submitted their solutions, whereas "parallel-letter-frequency" has 2058. I don't know if it tells anything, the one before that is "grains" and it has 2786.

That's an interesting stat.

Currently this exercise has difficulty 3 (same as e.g. anagram, acronym, beer song) which marks it as "easy" on the website. What about we raise the difficulty score for now so it shows as "medium", at least until we got all the unlocking in place?

I agree. I don't think the exercise itself is hard, but we should raise the difficulty just based on the amount of concepts someone must be familiar with to solve it.

Hello,
I just completed this was some mentoring from my boyfriend, and agree it was harder to work out on my own. However the bigger problem was that my first solution wasn't actually concurrent, I had incorrectly used a range loop and set the functions off sequentially - but still passed all tests.
My boyfriend pointed this out, but looking at community solutions it looks like lots of people fell into the same trap.
Note - I am a programming beginner beyond Exercism so my understanding of the concepts is very fuzzy!
L

@lburnett88 Thanks for leaving a note here.
In theory, you are supposed to use the benchmarks to check whether your solution performs better then the sequential solution. That will tell you how good you leverage concurrent execution. However, currently the test cases are not very good for this. We have a separate issue about this here: https://github.com/exercism/go/issues/1941
Unfortunately, we cannot run the benchmarks on the website currently so you have to work locally to see the benchmark results. The usual test cases cannot distinguish a sequential from a concurrent solution, they only check whether the output is correct.
I think we should clarify how to validate the solution in the instructions for the this exercise. I will leave a note about that in the other issue. Thanks again for pointing out this problem.
Please keep in mind that Exercism is not the perfect platform for programming beginners. It is designed for people that already know one programming language well and want to learn another one. That is why you will probably encounter some content that is hard to understand. Unfortunately, I don't know a good resource to learn Go for programming beginners, otherwise I would give some recommendation.

I had incorrectly used a range loop and set the functions off sequentially - but still passed all tests.
My boyfriend pointed this out, but looking at community solutions it looks like lots of people fell into the same trap.

@lburnett88  Can you share with us what such a sequential solution looks like or an example of a published solution that is sequential but passes the tests? I went through the first page of the most starred solutions (30 solutions) and all of them use goroutines. The same happens when searching for the newest solutions.

@andrerfcsantos My first solution here - it does use goroutines, but each goroutine ran one at a time as I'd used a channel to block the result, so although using goroutines it wasn't actually parallelised/concurrent.
@junedev thanks. I tried to get exercism running locally, but struggled with the instructions as I have an apple macbook with an apple silicon chip, not an intel processor and it seemed the instructions didn't work well for that. It's on my 'to do' list to revisit :)

@lburnett88 Ah, I see, thanks for sharing. However, I'm not sure if we can solve that particular mistake by adding something to the instructions. I feel like this exercise has a lot of little details that can really benefit from a mentor, and asking for a mentor review is probably the best thing to do for now while we don't have the exercises practicing these basic concepts separately.
Meanwhile, we increased the difficulty of the exercise to "medium", hopefully that works as a warning to people that the exercise might require some work.
Thanks again for the feedback.

@lburnett88: Just a note on the solution: The goroutines are not running one at a time. Only the results are sent back one at a time. If the Frequency function would do a lot of work (like a few seconds of work, and there'd be not too many of them), that would distribute the work to all available CPUs just fine :)


Fixed iterator types of xcontainer

o.O these were wrong?!

Strictly speaking yes; when you have an adaptor or a view on a const container, the storage_iterator type should be the const_iterator type of the underlying container. I've been hit by the problem when I started refactoring the flat_expression_adaptor


Improve concepts section: more experiment types with clearer / more elaborate descriptions (especially, on when to use what)

Includes document winner definition

Includes clarifying experiment types

Done. Latest version handles concepts.


Initial implementation of GitLab OIDC trusted publisher

Description
This PR includes the initial implementation of the GitLab trusted publisher. It's mostly based on the existing GitHub implementation, with a few modifications (mentioned below). Unit tests have been included, and a separate PR for the docs is available here. This is part of Trusted publishing: support for GitLab CI.
The corresponding GitLab feature (along with all the claims provided in the token) is documented here.
Differences with GitHub OIDC

GitLab uses the term "project" for a repository.
While GitHub uses the term "username" or "organization" for the org part of github.com/org/repo, GitLab uses the term "namespace". A namespace can be either a username or a group. Groups can be nested, and so for https://gitlab.com/my_org/my_suborg/my_repo, the namespace would be my_org/my_suborg.
For GitHub publishers, PyPI checks that the username/organization provided exists. For GitLab we don't do this, since namespaces can be private and therefore we can't check if they exist or not. See private groups.
The above makes this provider less secure that GitHub's, in the sense that it doesn't protect against account resurrection attacks. This is mentioned in the security-model.md doc.
Environments are case insensitive in GitHub, but are case sensitive in GitLab.
Workflow files (e.g: workflow.yml) can be anywhere in the GitLab repo. Since the OIDC claims include the path of the workflow relative to the root of the repo, when setting up a GitLab publisher we also ask for this path (as opposed to GitHub, where we only ask for the file name).

TODO

[ ] Once final changes are made, add the screenshots missing to the docs

Screenshot

For GitHub publishers, PyPI checks that the username/organization provided exists. For GitLab we don't do this, since namespaces can be private and therefore we can't check if they exist or not.

I suppose it would not be an impossible requirement to say only public users/orgs can be Trusted Publishers.
This would however have a practical problem when an existing Trusted Publisher decides to make their org private. Dealing with this might not be worth the trouble.

Most of the ActiveState provider has landed, so this will probably need a decent bit of deconflicting 🙂

Most of the ActiveState provider has landed, so this will probably need a decent bit of deconflicting 🙂

Fixed!

For GitLab we don't do this, since namespaces can be private and therefore we can't check if they exist or not.

Am I correct in assuming that we can do this for public namespaces? If so, we should probably attempt to do this, determine if the namespace is public or not, and verify this only for public namespaces.

Am I correct in assuming that we can do this for public namespaces? If so, we should probably attempt to do this, determine if the namespace is public or not, and verify this only for public namespaces.

Yeah, I think so (@facutuesca can confirm) -- we should be able to do this for public namespaces.

We could also do this in a TOFU-ish manner for private namespaces, since the OIDC claim set includes the namespace_id: when the namespace is a private one, we can populate the ID on first sight from the claim set.
(I'm not sure if this is worth doing, however, since it complicates the relationship between the publisher model and token consumption.)


[Documentation] Document examples for filtering Alerts

Is your feature request related to a problem?
I encountered some issues attempting to filter alert results using the URI in the developer tools and, when looking at the Alerting dashboard API, it appears to take parameters for: from, size, search, start_time, sortDirection, severityLevel, alertState
What solution would you like?
Examples showing how to filter alerts discovered with the endpoint GET _plugins/_alerting/monitors/alerts in the documentation
https://opensearch.org/docs/latest/monitoring-plugins/alerting/api/
What options are available, and how can these parameters be applied to filter the endpoint:
GET _plugins/_alerting/monitors/alerts

I just moved this issue into documentation-website.

@vagimeli - can we please see this updated soon?

@ryn9 Updated documentation for this issue is part of the 2.8 documentation release cycle.


Reenable clippy on travis [ECR-1538].

Overview
clippy lints was reenabled with the workaround:
cargo check allows us to skip checking of jni-rs with clippy.
clippy version was updated.

See: https://jira.bf.local/browse/ECR-1538
Definition of Done

[x] There are no TODOs left in the code
[x] Change is covered by automated tests
[ ] The continuous integration build passes

Reopened in https://github.com/exonum/exonum-java-binding/pull/319

1 more commit


Failed to create a Python Dev container

Steps to Reproduce:

New VS Code window
New Dev Container
Pick Python

Version: 1.88.0-insider (user setup)
Commit: 5d8491d7130d25aae121eeaa1633603ef8faa39e
Date: 2024-03-26T05:49:49.370Z
Electron: 28.2.6
ElectronBuildId: 27476517
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Windows_NT x64 10.0.22635

Please append the Dev Containers log from when this happens. (F1 > Dev Containers: Show Container Log)


0.2.0 Crashes on startup

I start up the game, but each of the times I start it up, I get this.

Same issue here, I've linked the crash report
Crash report
crash-2024-02-09_16.43.01-fml.txt

It seems I am unable to replicate this issue. Could you give me the list of mods you are currently using (and their versions aswell)?

I came up with a potential fix, but since I can't replicate the issue, I'm unable to test it. Could you try it out and let me know if the crash still persists?
createutilities-0.2.0+1.20.1.zip

I am running 1.19.2 because I am planning on running a server.

That's the one I am having issues with.

I made some changes that might fix your problem. Could you try it out and let me know if the issue still persists?

Try out this version and let me know if it's solved:
createutilities-0.2.0+1.20.1.zip

Thank you! It's fixed now

Great! I'm happy to hear it!


Plotting iris data in Ch02 assumes that the data is in a particular order

In chapter 2, where the iris data is plotted on a scatterplot,
# extract sepal length and petal length
X = df.iloc[0:100, [0, 2]].values

# plot data
plt.scatter(X[:50, 0], X[:50, 1],
            color='red', marker='o', label='setosa')
plt.scatter(X[50:100, 0], X[50:100, 1],
            color='blue', marker='x', label='versicolor')

it is simply assumed that the first 50 rows belong to the label setosa, and the next 50 to versicolor. The scatterplot should be generated using the labels(which are in the 5th column of the dataset)

Oops, I hadn't got to the part of the book where you had defined the plot_decision_regions function. Sorry.
Closing.


contributing docs are not actionable enough

Development environment does not contain exact instruction on how to set it up, e.g.:
git clone git@github.com:<username>/dvc.org.git
cd dvc.org

# The next two lines are only obvious to someone who used node before
npm install
npm install -g yarn  # Instead of going to yarn website as we say now
yarn dev

Also it is far from obvious that git pre-commit hook is installed inside npm install, unless you look at its output closely.

Have simplified and changed the doc a little bit, @Suor PTAL. I'm not sure why do we need npm install before installing yarn?

Hmmm, now it reads

Make sure you have the latest version of Node.js and Yarn are installed:

It's the right intention but that sentence is wrong. I'll remove "are" in my regular doc updates PR. Otherwise seems complete now. git clone and cd, install Node and Yarn, and run yarn and yarn dev. But I will separate the last 2 commands as they do different things.

What's the point making people read ads about yarn instead of simply providing them with a command npm install -g yarn?

@Suor it's already here, right - https://dvc.org/doc/user-guide/contributing/docs :)

@Suor my question was about npm install itself (comes before npm install -g yarn in your description)

Oh, I see. Much better now)

This might be closed unless you guys have something more in mind.

@shcheklein I used npm install because this is what you usually do with a Node.js project. yarn replaces that.

so, closing this as it fixed and even improved by @jorgeorpinel it the most recent WIP regular updates PR


Responsive Teardown / Rebuild

Hexaflip works flawlessly in a Sencha Touch 2.4.2 app I regularly maintain.  Do you have recommendations on how to destroy and recreate the hexaflip object on when a size breakpoint has been "noticed" by a resize listener?  I would like to dynamically replace images with their larger and smaller counterparts based on the horizontal width of the browser.
Thanks,
Dan

My best advice if you're looking to simply replace it is to empty the containing element using .innerHTML = '' (or a similar approach in Sencha) and then create a new instance of HexaFlip using the same container.
You could also try using HexaFlip's setValue method on breakpoints, which accepts a content configuration object the same as when you create a new instance.

Yes, removing all child elements from div.hexaflip and then nullifying the existing instance and just creating a new one worked without issue.  Did not try setValue, but will follow - up with more info on using setValue when I have a chance.


karma_webpack/scripts.js giving Uncaught Reference Error

How can I add code to _karma_webpack_/scripts.js without touching my non-test code? Im getting an Uncaught Reference error because I have a .js file that's loaded into my angular code (set as a src) and a variable is added to the js code from inside the Angular code. The whole .js file is included in _karma_webpack_/scripts.js but the one variable that is created in Angular then added to the script is not present.
If I could just add let myVar = 'value' to _karma_webpack_/scripts.js then Jasmine would run fine. All my tests are passing this erorr is showing in the logs and the Chrome window that pops up.
Example code that demonstrates the problem
s = document.createElement("s")
s.text = "let myVar = 'ok'" //myVar is not included in _karma_webpack_/scripts.js
element.appendChild(s)

s = document.createElement("s")
s.src = "./myFile.js" //myFile is included in _karma_webpack_/scripts.js
element.appendChild(s)

this script was in angular.json, so was able to add another script to angular.json test section.


Changing the API Manager Analytics credential in APIM

Description:
If the API Manager Analytics has been configured, when changing the super admin credentials in APIM it is not needed to change the credentials in <API-M_HOME>/repository/conf/log4j.properties file.
So the following entries are not needed in <API-M_HOME>/repository/conf/log4j.properties file as those are deprecated.
_log4j.appender.DAS_AGENT.userName=admin
log4j.appender.DAS_AGENT.password=admin
log4j.appender.LOGEVENT.userName=admin
log4j.appender.LOGEVENT.password=admin_
Suggested Labels:
APIM 2.6.0, APIM-Analytics
Affected Product Version:
APIM 2.6.0

Not applicable with choreo analytics in the latest APIM version. It uses token to connect with choreo


Trustless and convenient secret sharing, via new DT template via (a) Sapphire OR (b) threshold cryptography

This is a possible future feature. Not planned yet.
Use cases
There are many possible applications where the user just wants to share a (small) secret. Including:

Web2-style data sharing, where the secret = Oauth2 tokens, that combines with a public url. Like we see with all REST APIs
sharing passwords, LastPass style
Predict-ETH / challenge DF results sharing . Right now we need to use data NFTs & encrypting with judges' public keys. It's sloppy
small AI models
sharing urls, Ocean-style. Caveat: only for applications where DDOS is not a problem. Currently Ocean solves this by using Provider to stream.

Status quo
Right now Ocean offers either trustless, or convenient, but not both

convenient: Provider run by 3rd party (OPF or other) using DT template 1 or 2.  Inconvenient because you have to run it.

What we want

trustless and convenient
but for many possible use cases, not just sharing urls
bonus: shouldn't need Provider at all. This makes it more reliable / web3-native (and that counts for a lot!)

How

A new DT template
That uses either (a) Sapphire , (b) threshold cryptography via Lit Protocol or Keep Network, or (c) Emblem Vault or maybe EIP6551
With appropriate support in ocean.py, then ocean.js. Putting it in ocean.py first (this github issue) because we can prototype it here

Not going to happen here. deltaDAO is building this by working with Oasis. They have their own tracking.


Feature Request: Sync namespace with private

Hi! Your plugin looks promising. Could you add these rules to help us keep the namespace and private in sync?

"private"property must be either true or false. (Rule name could be explicitly-decide-private)
If "private": true but package name starts with "@": Namespaced package probably should be public! (Rule name could be namespaced-requires-public)
If "private": false but package name doesn't start with "@": Packages must be published in a namespace! (Rule name could be public-requires-namespaced)

They should not be auto-fixable, since it's not eslint's job to decide which property is the mistaken one.

Sorry, I'm very late to this one! If this would still be useful to you, I can make it. The rules are mutually exclusive, so I'd do the usual thing where it errors out informatively if there's a conflict. How does that sound?

It would indeed be very helpful still. I do not see how these rules might conflict with each other. Could you give an example for that?

@mk-pmb I made one small change: instead of having a specific explicitly-decide-private rule, I made a required-properties rule that takes an array, to which you can supply private along with any other properties you want to require to be explicitly declared. Let me know if #3 works for you!

Could you make it a dict instead? That would provide a nice upgrade path for even stricter requirements, like a whitelist of accepted values. (In my case with private, the booleans.)

I agree that it'd be great to validate properties against more complex rules, but I think your latter suggestion is also right that that can be a valid-properties rule or something like that.

"private" property must be either true or false. (Rule name could be explicitly-decide-private)

Heh, I would personally want the opposite: not explicitly listing any fields if they're given the default value. Larger config files are harder for contributors to read and can be daunting to newcomers.
Seems like a good idea for a rule, but IMO should be configurable to enforce one way or the other.

Namespaced package probably should be public!

Not so. It's common for companies/teams to org-scope their packages and then publish them either on the global npm registry or a private/self-hosted registry.

If "private": false but package name doesn't start with "@": Packages must be published in a namespace! (Rule name could be public-requires-namespaced)

What's the root user need here? Is it that a team might want all their packages to always be namespaced?

Taking a step back: I think I can imagine scenarios where these privacy rules would be useful, but it's hard to conceptualize. Are there particular reasons you see to use them @mk-pmb / anybody else?
I'm wondering if the potential use cases are so wide that it might make sense to have one or two unified rules that can be configured? That way if other folks have different use cases, they can be captured too. Like how ESLint's no-restricted-syntax rule is universally useful.

@JoshuaKGoldberg

Not so. It's common for companies/teams to org-scope their packages and then publish them

I'm confused: You seem to start with a contradiction and follow it up with confirmation. I guess it's about the suboptimal word choice of "publish" for that npm action.

What's the root user need here? Is it that a team might want all their packages to always be namespaced?

Yes, that was the requirement.

Are there particular reasons you see to use them

Back in the days my reason was company policy.

It's common for companies/teams to org-scope their packages and then publish them

I'm also confused now 😄. What are the two statements you see me as having put forward? If it helps, here is a rephrasing what I'm trying to say:

Scoped and unscoped packages might reasonably be public or private.

Some dev groups will intentionally publish public scoped packages. Examples: @codecademy/gamut, @sentry/node.
Some dev groups will intentionally publish scoped packages as private. (I'd post an example, but they're all private!)

Scoped and unscoped packages might be published to any registry
I don't think there's any single best practice that a built-in rule should always enforce. All of the following possibilities are things different dev groups might want to configure:

Whether packages are scoped: some groups always want a scope; some groups want to be un-scoped
Whether scoped packages are private: as they might be intentionally publicly available

The only built-in restriction I see as needing to be respected is that "Private packages always have a scope".

What's the root user need here? Is it that a team might want all their packages to always be namespaced?
Yes, that was the requirement, at least for the packages that we would publish.

Maybe there's an opportunity here for additional configuration in this rule, or a separate one: enforcing not just whether a scope exists, but what string(s) it must be if it does?

publish scoped packages as private

That was the feature I wasn't aware of. I thought that npm would NEVER "publish" a package with private: true. Now I read your sentence as plain contradiction to my idea that…

Namespaced package probably should be public

… and I accept your argument. I'll strike that part in the opening post.

I don't think there's any single best practice that a built-in rule should always enforce.

I agree. None of my suggested rules are meant to be enabled by default.

enforcing not just whether a scope exists, but what string(s) it must be if it does?

Yes, good idea. However, that would open the barrel of how complex a set of rules we want to support for what names are allowed.

Coming back to this: it's been >12 months and I haven't seen any more requests around this area. I think these rules could be useful but don't think they're common enough to justify adding to eslint-plugin-package-json right now. I think for now they'd make more sense as a separate dedicated plugin around package & namespace privacy syncing.
Thanks for filing though - this was an interesting discussion! 🙂


Multiple select with placeholder is not working very well in IE11

Hey,
Using IE11, go to the examples webpage: https://select2.github.io/examples.html
Under the "Placeholders" section, the second example is a Multiselect box. If you select 1 state, then the "selection list" with states remains on top/focused until you select a second state. As soon as you select a second state everything works fine.
This issue seems to be related to the placeholders, because the "Multiselect" example above without a placeholder works just fine. Also in my own project, if I remove the "placeholder" option on the select2 initialization function, then everything works fine.
Thanks,
Joachim

Duplicate of https://github.com/select2/select2/issues/3300.


fix autoplay when video is not muted

In order to autoplay the video must be muted. Here I set that option if autoplay is enabled.

Sorry! I just noticed your PR. Merged. Thank you for your contribution 😊


Some images do not appear until scroll

First of all, thank you for the great framework. My app is loading assets from S3, which seem to load most of the time, but often when opening the app, the images are not loaded and do not load until I scroll even just slightly. It appears that something is either blocking the main thread for images loading, not sure what (advice on debugging this as a possible issue is appreciated), or SDWebImageSwiftUI is running into its own threading entanglement issues.
Please let me know, and thank you in advance. Here is the code:
            WebImage(url: listing.imageURLs?.first)
                .renderingMode(.original)
                .resizable()
                .placeholder {
                    Rectangle()
                        .foregroundColor(.gray)
                        .opacity(0.3)
                }
                .indicator(.progress)
                .transition(.fade)
                .frame(width: 155, height: 155)
                .cornerRadius(6)

I'm, also facing the issue

I have similar problem.
I update an array with list of urls, however, then I run a loop to create image views for each link. The images does not appear unless I scroll or move between views.
ForEach(0..<self.imagesLinks.count) {                                  WebImage(url: URL(string: self.imagesLinks[$0]))                                  .resizable()                                  .placeholder(Image("logo"))                                  .frame(width: 150, height: 150, alignment: .center)                              }

Some internal logic changed (using a prefetch from memory cache) from v1.2.1.
Can you two have to try with v1.2.0 or earily to see what happended ?

@dreampiggy, I have installed the latest version using Cocoa, where and how can I install 1.2
I tried pod 'SDWebImageSwiftUI', '~> 1.2', but still I am getting 1.3.3

@dreampiggy, I have installed the latest version using Cocoa, where and how can I install 1.2
I tried pod 'SDWebImageSwiftUI', '~> 1.2', but still I am getting 1.3.3

Use
pod 'SDWebImageSwiftUI', '1.2.0'
~>1.2 means any version from >= 1.2.0 ~ < 2.0.0. Learn more in CocoaPods’s tutorial and semversion standard.

Still the same problem, I have tried 1.1.0 as well still I can produce the same problem. Either to scroll or I have to move between views (Tab).

I'll have a check for this today and find a workaround. Please have a wait. (busy on daily job yesterday)

The onAppear does not get called when you click button, this cause the issue.

We query the image in onAppear, not when WebImage.init(). This is because of bugs from user reply #76 .
I guess there are un-resolvable conflict for you and #76 's user. I have to choose a proper solution.

Decide to revert changes about performance introduced in #92.
Same root case in #105

@alahdal @walidhossain @Cyclic Please have a try again with v1.3.4

@dreampiggy sorry for the question, how to add this version to my project. I have downloaded, but could not figure which one to take. From Cocoa, it is not available.

You should use pod install --repo-update, or pod update to update the Spec repo.
CocoaPods host a central Spec repo to find which of version available, not using any git tag.
I can ensure this v1.3.4 version is available on Spec repo.
➜  SDWebImageSwiftUI git:(master) pod trunk info SDWebImageSwiftUI

SDWebImageSwiftUI
    - Versions:
      - 0.1.0 (2019-08-09 10:23:37 UTC)
      - 0.10.0 (2019-12-06 14:46:29 UTC)
      - 0.10.1 (2020-01-26 10:23:32 UTC)
      - 0.10.2 (2020-01-26 12:19:12 UTC)
      - 0.10.3 (2020-02-01 10:15:50 UTC)
      - 0.1.1 (2019-09-24 19:14:35 UTC)
      - 0.1.2 (2019-10-01 08:35:16 UTC)
      - 0.2.0 (2019-10-03 10:26:34 UTC)
      - 0.3.0 (2019-10-05 08:53:39 UTC)
      - 0.3.1 (2019-10-05 12:31:36 UTC)
      - 0.3.2 (2019-10-10 10:24:03 UTC)
      - 0.3.3 (2019-10-20 08:26:46 UTC)
      - 0.4.0 (2019-10-21 17:44:28 UTC)
      - 0.4.1 (2019-10-22 15:25:42 UTC)
      - 0.4.2 (2019-10-24 04:50:12 UTC)
      - 0.5.0 (2019-10-25 21:14:54 UTC)
      - 0.5.1 (2019-10-26 11:14:23 UTC)
      - 0.5.2 (2019-10-26 21:12:36 UTC)
      - 0.6.0 (2019-10-27 12:22:13 UTC)
      - 0.6.2 (2019-10-29 07:32:55 UTC)
      - 0.6.3 (2019-10-29 18:16:02 UTC)
      - 0.6.4 (2019-11-01 21:39:56 UTC)
      - 0.6.5 (2019-11-02 04:02:29 UTC)
      - 0.7.0 (2019-11-02 11:21:20 UTC)
      - 0.8.0 (2019-11-09 08:04:25 UTC)
      - 0.8.1 (2019-11-09 09:19:15 UTC)
      - 0.8.2 (2019-11-09 22:40:09 UTC)
      - 0.8.3 (2019-11-10 11:14:46 UTC)
      - 0.8.4 (2019-11-14 14:05:21 UTC)
      - 0.8.5 (2019-11-16 08:02:45 UTC)
      - 0.8.6 (2019-11-23 03:31:20 UTC)
      - 0.9.0 (2019-11-29 18:24:44 UTC)
      - 1.0.0 (2020-03-03 14:02:55 UTC)
      - 1.0.0-beta (2020-01-28 11:30:28 UTC)
      - 1.0.0-beta2 (2020-02-01 16:24:11 UTC)
      - 1.0.0-beta3 (2020-02-25 10:53:12 UTC)
      - 1.1.0 (2020-03-24 12:18:07 UTC)
      - 1.2.0 (2020-03-29 13:37:51 UTC)
      - 1.3.0 (2020-04-05 07:32:02 UTC)
      - 1.3.1 (2020-04-10 15:45:33 UTC)
      - 1.3.2 (2020-04-14 14:41:24 UTC)
      - 1.3.3 (2020-04-15 12:17:19 UTC)
      - 1.3.4 (2020-04-30 08:03:13 UTC)

My bad, I was using pod install.
I updated, still the same problem.

I’m unsure that I can reproduce this issue after updating to 1.3.4. I’m going to owe testing, but so far the images appear immediately.

I’m unsure that I can reproduce this issue after updating to 1.3.4. I’m going to keep testing, but so far the images appear immediately.
Update 1: So far, after testing multiple passes, the images appear immediately without any scrolling. I also noticed that they don't load again after app launch, which means that I'm seeing caching that I didn't see before.

Isn’t this the designed behavior ?

Just to clarify more about my example, the imagesLinks array is updated when the user add photos from his gallery.
I noticed that if I add the if condition before the ForEach, it works only for the first image.
if self.imagesLinks.count > 0 {
                                    ForEach(0..<self.imagesLinks.count) {
                                        WebImage(url: URL(string: self.imagesLinks[$0]))
                                            .resizable()
                                            .placeholder(Image("logo"))
                                            .indicator(.activity)
                                            .frame(width: 150, height: 150, alignment: .center)
                                    }
                                }

Which means the WebImage refreshes when the link is added to the list. Now, I am trying to figure out how I can make the view refreshes with every link added to the list.

@alahdal I had the same problem. I ended up storing a list of images on the parent entity. I realized that I was lazy loading the images, but they were not always there. You will need to make the imageLinks type an observable and maybe use didSet or willSet to get the WebImage type to load the newly added items. That's just what I gathered. I opted to keep it simple and store an array of the image links on my list item so I didn't have to worry about the links reloading.

Does anyone have a solution for this problem?

Should be solved by v2.0.0

Appeared again in 2.0.2 for some reason.

It's happening for me inside the picker.


Enzyme 2 to 3 upgrade: shallow() with numeric child literal gives unexpected results

Current behavior
After upgrading my project's environment from Enzyme 2 to 3, running the following code:
      it.only('does a sanity check', function() {
        const component = shallow(
{2}
);
        console.log(component.debug());
      });

produces this output:
LOG LOG: '

  0
  0

'

Increasing the numeric literal value to 10 results in hundreds of 0's. If I set the numeric literal to be above 50 or so, the test server actually times out. To be clear, the timeout occurs whether console.log() is included in the code or not. The shallow render is what causes it.
Also, running the test with mount() instead of shallow() produces expected results.
Expected behavior
I should get the following output from the aforementioned console.log():
LOG LOG: '

  2

'

Additionally, using larger literal values that roughly 50 should not cause a timeout of the test runner.
Your environment
OSX v10.11.6
Node v8.12.0
NPM v6.4.1
Test runner: Karma with Mocha, v1.3.0 (using PhantomJS)
API

[X ] shallow
[ ] mount
[ ] render

Version

library
version

enzyme
3.8.0

react
15.6.2

react-dom
15.6.2

react-test-renderer
15.6.1

adapter (below)

Adapter

[ ] enzyme-adapter-react-16
[ ] enzyme-adapter-react-16.3
[ ] enzyme-adapter-react-16.2
[ ] enzyme-adapter-react-16.1
[X] enzyme-adapter-react-15
[ ] enzyme-adapter-react-15.4
[ ] enzyme-adapter-react-14
[ ] enzyme-adapter-react-13
[ ] enzyme-adapter-react-helper
[ ] others ( )

So, the div shouldn't be logged, because in shallow, the wrapper is what the component renders - in other words, it should be a wrapper around 2. However, the repeated zeroes are an issue - looking into it.

hmm, oddly enough i'm getting the div, and the child, in my test. I'll keep looking.

My similar test is passing; is there any mocha setup you're doing, or any packages that might be modifying enzyme?

I'm using React 15 Adapter v1.3.0. I'm not doing anything with Mocha other than pointing to it in my Karma config.
Main karma.config looks like this:
/* eslint-disable import/no-commonjs */
const webpackTestConfig = require('./webpack.config.test.babel.js');
const wrapWebpackWithEnzymeConfig = require('./karma.webpack.enyzme.js');
module.exports = function(config) {
  config.set({
    basePath: '',

    frameworks: ['mocha'],

    browsers: ['PhantomJS'],

    reporters: ['spec'],

    autoWatch: true,

    singleRun: false,

    port: 3002,

    files: [
      // Polyfill PhantomJS
      'node_modules/sinon/pkg/sinon.js',
      'node_modules/phantomjs-polyfill/bind-polyfill.js',
      'node_modules/phantomjs-polyfill/bind-polyfill.js',
      'node_modules/core-js/client/core.min.js',
      // Test bootstrap (e.g. chai.use(sinon-chai))
      'tests/index.js',
      'tests/tests.context.js',
      'tests/enzyme.js'
    ],

    preprocessors: {
      'tests/index.js': ['webpack'],
      'tests/enzyme.js': ['webpack'],
      'tests/tests.context.js': ['webpack']
    },

    client: {
      captureConsole: true,
      mocha: {
        ui: 'bdd',
        reporter: 'html'
      }
    },
    // karma watches the test entry points
    // (you don't need to specify the entry option)
    // webpack watches dependencies
    webpack: wrapWebpackWithEnzymeConfig(webpackTestConfig),
    webpackMiddleware: {
      noInfo: true
    }
  });
};

tests.index.js content:
const root = window;
import chai from 'chai';
chai.config.includeStack = true;
chai.config.truncateThreshold = 1000; // Lenient truncation
import sinonChai from 'sinon-chai';

// Exports
root.expect = chai.expect;

// Plugins
chai.use(sinonChai);

// Flag to work around dependency issues in tests.
root.isTestSuite = true;

before(() => {
  sinon.stub(console, 'error', warning => {
    throw new Error(warning);
  });
});

tests/enzyme.js looks like this:
/* eslint-disable */
import Enzyme from 'enzyme';
import Adapter from 'enzyme-adapter-react-15';

// Configure Enzyme for the appropriate React adapter
// Enzyme.configure({ adapter: new Adapter() });
Enzyme.configure({ adapter: new Adapter() });

// Re-export all enzyme exports
export * from 'enzyme';

...and then I'm importing this module into individual modules.
tests.context.js just sets the files to test against:
import moment from 'moment-timezone';
moment.tz.setDefault('UTC');

// Pointers to spec files, used by Karma
const context = require.context('.', true, /.+\.spec\.jsx?$/);
const keys = context.keys();
keys.forEach(key => {
  context(key);
});

hmm - it's possible there's issues with karma, specifically. Have you read through https://github.com/airbnb/enzyme/blob/master/docs/guides/karma.md ?

Yeah. I think I've set it up properly, but could have messed something up. I'll post any updates.

The problem turned out to be caused by having this file in my files karma.conf.js files array: 'node_modules/core-js/client/core.min.js'. The version in question is ^2.5.5. It wasn't being used in the current incarnation of the app, so I got rid of it and the problem went away. Closing this issue. Thanks for the quick help!

That's very troubling, since that's used in babel-polyfill :-/ but at least you figured it out!


Switch to GitHub Actions

This removes the Travis CI configuration and runs tests on GitHub Actions instead. For now I've just removed Codecov, but this at least gets the tests running again. Also supercedes #18.

Strange. Tests on Python 3.7 passed on my own fork.

Thanks so much for this!
Two comments:

I would suggest just removing python 3.7 support (so removing it from the matrix), as Python 3.7 was EOL in 2023.
The package currently specifies its dependencies in setup.py.  Why does this PR introduce a requirements.txt file as well?  If the requirements.txt file is desirable for a particular use case, then it should be read and used in setup.py as well. I am not against having it, I would just prefer to reduce redundant dependency specifications that can easily get out of date.

Agreed that Python 3.7 should just be removed. I would also suggest adding 3.11 and maybe 3.12. requirements.txt was added because it's necessary for caching support in GitHub Actions. Agreed that the duplication is bad and reading that in setup.py seems like a good solution.

I will say however that the two are intended for different purposes and arguably should be kept separate.

Also, apparently specifying a single . in the requirements.txt will cause it to read from setup.py, which I think would be a better alternative.

Okay, I've updated the PR to test against Python 3.8-3.12 and removed the duplication in requirements.txt.

Merged!
Thanks!


Enable plugin metadata setting from manifest's initialize block

Why: Sub of #761
What: Add metadata to all builtins and enable metadata overwriting from initialize
Context
Instead of defining parameters in params.ts, we can make use of the metadata field we already expose in our plugin interface and move the parameter definitions into the plugins themselves. The plugin interface should looks as follows:
export const MyPlugin = (globalConfig: Config): Plugin => {
  const metadata = {
    kind: 'execute',
    inputs: [
      example: {
          description:' example description'
          unit: 'dimensionless'
        }
      ]
    outputs: [
      energy: {
        description: 'amount of energy utilised by the component',
        unit: 'kWh'
        },
      ]
    };

    . . .

    return execute, metadata; }

This ticket covers entering each builtin in the IF repository and adding the necessary parameter metadata. There should be an object inside outputs: for each value output by the plugin, and the same for inputs.
note that these should be optional in the sense that we don't break existing plugins that don't provide plugin metadata here. We will update all our code and our documentation, best practise guides and templates to use this feature, but old plugins should still run - the downstream impact will just be that the explainer feature won't work for them.
The parameter metadata should be updateable by passing in inputs and outputs arrays in the initialize block in the manifest. If no parameter metadata is passed from the manifest, the plugin should use the default hardcoded into the plugin source code (which may be none).
For example, an instance of the Sum plugin might be configured as follows:
    "sum":
      path: "builtin"
      method: Sum
      global-config:
        input-parameters:
          - cpu/energy
          - network/energy
        output-parameter: energy-sum
      parameter-metadata:
        inputs:
          - cpu/energy
            description: energy consumed by the cpu
            unit: kWh
          - network/energy
            description: energy consumed by data ingress and egress
            unit: kWh
        outputs:
          - energy-sum
            description: sum of energy components
            unit: kWh

In this case, the plugin metadata gets updated with the values in parameter-metadata during the initialization. If the parameter-metadata is missing, then the hardcoded defaults for the plugin are used. The same is true if an individual parameter's metadata is missing - just use the hardcoided default. If there is no hardcoded default, don't error out, just ignore (we'll handle reporting these issues later when we built the explainer feature.
SoW

[ ] Add feature that updates plugin metadata according to the parameter-metadata provided in the manifest's initialize block.

[ ] For builtins that have known inputs/outputs, add them to the hardcoded defaults in the plugin code

Acceptance criteria:

[ ] Plugin interface accepts parameter metadata, with arrays for inputs and outputs
The plugin metadata definition in the plugin source code should look roughly as follows:

type ParameterMetadata = {
    description: string;
    unit: string
    };

export const Exponent = (globalConfig: ExponentConfig): ExecutePlugin => {
  const metadata = {
    inputs: ParameterMetadata [] | undefined,
    outputs: ParameterMetadata []| undefined,
    kind: 'execute',
  };

[ ] Plugin metadata is updated using values passed from parameter-metadata feature in manifest's initialize block
GIVEN the feature is implemented
WHEN the following metadata is provided in the manifest file

intiialize:
  plugins:
    "sum":
       path: "builtin"
       method: Sum
       global-config:
         input-parameters:
           - cpu/energy
           - network/energy
         output-parameter: energy-sum
         parameter-metadata:
           inputs:
             - cpu/energy
               description: energy consumed by the CPU
               unit: 'kWh'
             - network/energy
               description: energy consumed by network data ingress/egress
               unit: 'kWh'
    "coefficient":
       path: "builtin"
       method: Coefficient
       global-config:
         input-parameter: energy
         coefficient: 2
         output-parameter: energy-doubled
      parameter-metadata:
        inputs:
          - energy
            description: energy consumed by the CPU
            unit: 'kWh'
          - coefficient
            description: coefficient applied to energy to yield energy-doubled
            unit: 'dimensionless'
         outputs:
           - energy-doubled
             description: energy multiplied by coefficient
             unit: 'kWh'

THEN the plugin instance is initialized with the values from the plugin-metadata field from its initialize block loaded into its metadata object.

[ ] Feature ignores missing metadata in parameter-metadata config
GIVEN the feature is implemented
WHEN I run a manifest with the following initialize block

initialize:
  plugins:
    "sum":
       path: "builtin"
       method: Sum
       global-config:
         input-parameters:
           - cpu/energy
           - network/energy
         output-parameter: energy-sum

OR the initialize block loois as follows:
initialize:
  plugins:
    "sum":
       path: "builtin"
       method: Sum
       global-config:
         input-parameters:
           - cpu/energy
           - network/energy
         output-parameter: energy-sum
         parameter-metadata:
           inputs:
           outputs:

THEN: The manifest runs without throwing an error, the plugin's metadata object just looks as follows:
{
  inputs: undefined
  outputs: undefined
}

@manushak @narekhovhannisyan please review AC to see if it all looks good

@jmcook1186 there is an inconsistency  between the parameter-metadata yaml structure and the type
if we want the yaml to look like this:
outputs:
  - energy-sum:
    description: sum of energy components
    unit: kWh

the data will be:
outputs: [
    {
      "energy-sum": null,
      "description": "sum of energy components",
      "unit": "kWh"
    }
  ]

if we want the type to be an array, the yaml will be:
inputs:
  - cpu/energy:
      description: energy consumed by the cpu
      unit: kWh
  - network/energy:
      description: energy consumed by data ingress and egress
      unit: kWh

the description and unit should have an extra tab
There is another version
inputs:
  cpu/energy:
    description: energy consumed by the cpu
    unit: kWh
  network/energy:
    description: energy consumed by data ingress and egress
    unit: kWh

and in this case, the data will be an object
inputs: {
    "cpu/energy": {
      "description": "energy consumed by the cpu",
      "unit": "kWh"
    },
    "network/energy": {
      "description": "energy consumed by data ingress and egress",
      "unit": "kWh"
    }
  },

Which version do you prefer?

@manushak are there any knock on effects on the plugin side? Assuming not, I prefer the middle option where the yaml is consistent with the other elements in the manifest, i.e. yaml like this:
inputs:
  cpu/energy:
    description: energy consumed by the cpu
    unit: kWh
  network/energy:
    description: energy consumed by data ingress and egress
    unit: kWh

@narekhovhannisyan please review the linked PR 🙏

@narekhovhannisyan the PR i if-core was merged.  Could you please release it?

@narekhovhannisyan please change the version locally to review the pr 🙏


No Outline for Ruby files

code-server version: 2.1692-vsc1.39.2
OS Version: Debian 9

Description
For .rb files :

Steps to Reproduce

Install ruby extension
Open a .rb file

Did you try it on VSO and VSCode to see if they're similar? AFAIK by default VSCode doesn't know how to make up an outline of the code unless an extension is provided to allow it to represent the AST in a outline.

@sr229 Yes it's working well with others. It's seems that Ruby extension has a dependency on https://marketplace.visualstudio.com/items?itemName=wingrunr21.vscode-ruby wich is not available on code-server markerplace

No success with solargraph extension too. It seems that language server is not starting


SImilarities computed using motion and text embeddings are incorrect

Like CLIP, where we compute the image and text embeddings and compute the similarities to retrieve the best matching text, I tried the same using motion and text, but it does not work.
Eg. Using the AMASS dataset and bs = 2; texts: 'jump', 'dancing',
emb = enc.encode_motions(batch['x']).to(device)
emb /= emb.norm(dim=-1, keepdim=True)

text_inputs = torch.cat([clip.tokenize(c) for c in batch["clip_text"]]).to(device)
text_features = clip_model.encode_text(text_inputs).float()
text_features /= text_features.norm(dim=-1, keepdim=True)

logit_scale = clip_model.logit_scale.exp()
similarity = (logit_scale * emb @ text_features.float().T).softmax(dim=-1)

values, indices = similarity[0].topk(len(batch["clip_text"]))

# Print the result
print("\nTop predictions:\n")
for value, index in zip(values, indices):
    print(f"{batch['clip_text'][index]:>16s}: {100 * value.item():.2f}%")

Expected output for similarity[0] -> high "jump" probability
But I get a high "dance" probability output. I have tested this with multiple batches and the correct text does not get the highest similarity a majority of the times. Am I inferencing it wrong?

That's weird. Your code looks good to me, but we do know that the cosine similarity should work to some extent according to the action classification experiment. Did you try using it as a reference?

I ran the script using the general model. I was getting:
Top-5 Acc. : 29.86%  (637/2133)
Top-1 Acc. : 13.41%  (286/2133)

Using the finetuned model:
Top-5 Acc. : 63.72%  (1354/2125)
Top-1 Acc. : 44.99%  (956/2125)

I assumed the zero-shot nature of CLIP would at least provide some generalizability. But that does not seem to be the case.


Gif is not seen in screenshot

Check List
Thanks for considering to open an issue. Before you submit your issue, please confirm these boxes are checked.

[ x] I have read the wiki page and cheat sheet, but there is no information I need.
[ x] I have searched in existing issues, but did not find a same one.
[ x] I want to reoprt a problem instead of asking a question. It'd better to use kingfisher tag in Stack Overflow to ask a question.

I use this code to take a screenshot:
UIGraphicsBeginImageContextWithOptions(UIScreen.main.bounds.size,true,0)
view.layer.render(in: UIGraphicsGetCurrentContext()!)
let image = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
and the last frame does not appear as if it were an image, it looks white.
What
[Tell us about the issue]
Reproduce
[The steps to reproduce this issue. What is the url you were trying to load, where did you put your code, etc.]
Other Comment
[Add anything else here]

Can't reproduce, here are some suggestions:

If you use render(in:) to take screenshots, you need to ensure use imageView.layer not other parent layer.
You can try drawHierarchy(in:afterScreenUpdates:).


Readme files updated

I used my Spanish and English as a base to translate into French, please review the changes.
I tried to improve the english readme.
Updated spanish readme with the latest changes
I thought of adding the English Readme directly to the main readme to get a quick idea of the project.
We just need to remove the English language link from the readme.md and add the other information from readme-en.md.

Regards!

Will have to take a look at the French README when i'll have time, since there's a few formulation issues, though I appreciate the effort.


How to call Python method and get String?

I am trying to instantiate an object in Python, access it in Scala and call a method there that returns a String. I have tried several ways but keep getting this error:
me.shadaj.scalapy.py.PythonException: <class 'TypeError'> bad argument type for built-in operation

Please note that I am using Scala 3 and the this example works fine (when I change trait to class).
Here are the facades I have:
package py

import me.shadaj.scalapy.py

@py.native class PyString extends py.Object {
  def count(subsequence: String): Int = py.native
}

// @py.native class PyState extends py.Object {
@py.native class PyState extends py.Any {
  // val i: String = py.native
  def f(): PyString = py.native
}

Her is my Python:

class State:
    """A simple example class"""
    i = 12345

    def f(self):
        return 'hello world'

def new_state():
    return State()

And here is my Scala client:
    val sim = py.module("sim")
    val stateT = sim.new_state()
    println(stateT)
    val state = stateT.as[ppy.PyState]
    val stateF = state.f()
    println(stateF)
    println(stateF.as[String])

which prints:
<sim.State object at 0x7fce442bc6a0>
<bound method State.f of <sim.State object at 0x7fce442bc6a0>>

The line println(stateF.as[String]) is causing the exception. Originally I had no PyString and returned a String directly. But I got the same TypeError. I also tried a val in the facade but that failed with another error.
Can anyone tell me what I am doing wrong?
TIA

This looks like a bug with how we handle facades in Scala 3, it seems that the the definition def f() is being treated the same as def f (we don't support defining facades as val/var), even though the former should correspond to calling f().
I see two paths from here: either we distinguish empty-parens functions from functions without any parentheses (as in Scala 2), or make all facade methods correspond to a function call and introduce a new annotation to mark methods that are facades for attributes. I'm currently leaning towards the latter, but this would be a fairly large breaking change.

@shadaj Thanks for taking the time to look at this. Thanks also for developing this project.

the definition def f() is being treated the same as def f (we don't support defining facades as val/var), even though the former should correspond to calling f().

Scala 3 differentiates between these two cases (no conversion between the 2). Here is a scastie example. However, it does seem that a val might be treated as a def with no parenthesis. Maybe vals can also be supported?

I see two paths from here: either we distinguish empty-parens functions from functions without any parentheses (as in Scala 2),

Personally I think your first solution is better because it is simpler from the client's perspective.  It also seems to be more in line with Scala 3'd compiler behavior.
As for anyone that has this issue, as a hack, one can declare the function to take in a dummy parameter with a  default such as:
@py.native class PyState extends py.Any {
  def p(s:Int = -1): String = py.native
}

And this "works":
    val sim = py.module("sim")
    val stateT = sim.new_state()
    val stateG = state.p(0)
    println(s"stateG(0) = $stateG")
    val stateG2 = state.p()
    println(s"stateG2(0) = $stateG2")


Mac Adress is  NULL

Mac Adress retruns null in andorid 10

Yup this is a security update by android, this library cannot work around that


update buildHTML to output HAST

Hi,
We're doing a markdown engine using remark with the rehype-katex plugin.
The thing is, rehype-katex is using KaTeX's renderToString function, and parses the output using rehype-parse (which uses parse5 to parse the HTML string into HAST, rehype's AST).
This is really inefficient (haven't done benchmarks, but it adds ~250Kb to the bundle), and could be improved by allowing to render to a hyperscript like function. By doing this, it would allow to render far more efficiently KaTeX into frameworks like React or Vue.js.
I'll write a proof of concept today ; I might not have the time to write the doc nor tests though.
I know there's a lot of links up here because of our use case, but TL;DR: it would be nice to be able to render KaTeX directly through a hyperscript like function.

@sandhose in https://github.com/Khan/react-components/blob/master/js/tex.jsx we use dangerouslySetInnerHTML to side step this issue in React.  I'm not sure if Vue.js has a similar mechanism or not.

I'm not using Vue.js in this case, but the issue is quite the same. You could avoid using dangerouslySetInnerHTML by using React.createElement (with a small wrapper) as an hyperscript function to the renderer. By doing this, you're creating real React elements, and you take advantage of React's virtual dom.
In my case, the output of the markdown engine is in one stage represented by a HAST node (HAST is a HTML AST).
The way the plugin that parses the math elements in the markdown works, is that it passes the raw math input to KaTeX through the renderToString function, and then uses rehype-parse to parse the HTML string to a HAST node.
This parse is heavy, and the parser itself adds ~250Kb to the bundle.
It could be avoided by directly transforming the KaTeX tree to an HAST tree, but buildTree doesn't seem to be publicly exported, and thus has no stability guarantee.
I'm proposing here to provide a renderHyperscript function that renders using the provided hyperscript function. This would totally cover my case (because there's hastscript that provides a hyperscript function to create a HAST node), and would be beneficial in frameworks with some kind of virtual dom like React or Vue.js (they all provide a hyperscript-like API, either officially or by the community)

@sandhose I think you should be able to use the output of buildHTML and use that to generate a HAST tree.  I had a look at https://github.com/syntax-tree/hast and it may make sense to modify buildHTML to produce a HAST tree.  I don't see any reason for us to have our own HTML tree structure when there a more standard one exists.

It might be a good idea (and @wooorm would be pleased). I'll try to do something.
FYI I have a branch that implements hyperscript rendering, with a react example here (built version here)

Well, it just got a lot harder with #807 because it means I have to re-parse the innerHTML in spans to render them (and it is expensive).

@sandhose could we not add a innerHTML property which is a string?  https://github.com/syntax-tree/hast#properties seems to indicate that both attributes and properties.

it just got a lot harder with #807

Would it help if we wrapped every <svg> with a span with a descriptive class, as in:
<svg>...</svg>

Or perhaps write the class into the SVG?
<svg class="rightarrow">...</svg>

@sandhose if you're not modifying the nodes within the SVG is there really any benefit from the SVG being described as virtual DOM nodes as opposed to a string?

@kevinbarabash Hi! 👋

could we not add a innerHTML property which is a string? https://github.com/syntax-tree/hast#properties seems to indicate that both attributes and properties.

HAST is for HTML, so think of it as only “attributes” being supported, not DOM properties like the innerHTML setter.
I suggest against using raw HTML inside a virtual DOM, for the same reasons that React uses the name dangerouslySetInnerHTML — it’s dangerous and slow.
I know it’s not always possible, but using an object structure (like HAST, or your own) instead of building strings makes things great for non-server-side rendering!

@wooorm good point about perf during client-side renders.  @ronkok what are your thoughts on build an AST for the inline SVG bits and then using createElement and appendChild to render them?
I'd want to try HAST format for the non-SVG parts of the tree first and see how that goes before putting in the effort convert the SVG parts.

@kevinbarabash I'm all in favor of what you suggest. I may not be the best person to implement it. Let me look into it and get back to you.

@sandhose some of our nodes output document fragments.  Is there a way to model that with HAST?  Would it just be an array of HAST nodes?

@kevinbarabash Yup! You can opt for an array of nodes.
Or if you’d like, returning a root node ({type: 'root', children: [...]}) is also fine, but root nodes shouldn’t be inserted somewhere else in a tree (only the top node may be a root)

It would be awesome to have some kind of public API to build vnode trees. Right now I'm doing:
Katex tostring => fast HTML parser => build vnode tree in MithrilJS with hyperscript calls (recursively walk the three).
Is there a way I could skip the parsing? Should I look internally for buildTree and modify the katex source or is this feature coming soon?

@cjh9 If you don't need MathML, you could probably call buildHTML directly; if you want both, buildTree would be good.  If you can successfully import them (#954 might get in your way, but we'd appreciate a fix to that), then they should just work, and return the existing internal node tree data structures.
If they're helpful, I don't see any reason not to expose buildTree, buildHTML, and buildMathML in katex.js's module.exports, presumably prefixed with __ to make it just as scary/unsupported as __parse (though these methods are currently probably more stable than __parse).  Any objections?

@edemaine Sorry for late response, yes that would be awesome if they could be exposed in the distribution! In what format would  __buildHTML return the tree, in real HTML-nodes or more light-weight Json format?  Only the later seem to integrate well with webworkers..

@cjh9 This is now available in the master branch, thanks to #1017. The nodes are returned in a custom nested Javascript data structure (objects containing children array fields). Hope that helps!

@edemaine Super great! 🎉  And it is also serializable to JSON :) Would it also be possible to expose __bulidTreeHTML if I don't need MathML? Not super important though I can work around It :)

@cjh9 I'm guessing you already know this, but you should be able to leverage buildTreeHTML via the buildTree. Would that work? Exposing just the HTML would probably require extracting some of the default options (i.e. https://github.com/Khan/KaTeX/blob/master/src/buildTree.js#L19)

I think pure HTML export makes sense when you're rendering it in a custom way (e.g. SVG), as you're unlikely to also be able to include MathML in that setting.  I could see either

factoring out the Settings to Options conversion in buildTree so that we can write a new buildHTMLTree, or
adding an option in Settings to prevent MathML creation.

Thoughts?

Hmm, I think #1 sounds good. My concern with #2 is how that would affect items downstream (i.e. the buildTree). Perhaps I don't understand it well enough though.

@cjh9 The master branch now has (via #1022) __renderToHTMLTree that outputs just the HTML part. Also, we renamed the method you were using to __renderToDomTree for more consistent naming. Hope this helps!

After investigating the hast format some more I've concluded that it's not appropriate for our use case, in particular:

there is no fragment node
it stores class and style as simple string attributes

I would like to simplify our current in memory HTML objects to be plain objects instead of classes, but I think that storing classes as an array and styles as an object is a superior especially for checking for the presence of particular styles or CSS classes or for modifying those.
After we refactor those objects (and extract non-HTML props into an intermediate representation) they should be stable enough (and simple enough) that writing a translator from our HTML objects to hast should be trivial.

This is not entirely true: fragments can be stored in a root too, and className is an array! Finally, style could be discussed. It used to be an object in fact, and could be mapped to that again, pending further discussion.

@wooorm thanks for pointing out className.  I should've read the section on "Property values" more closely.

There’s no special format for style.

What does that mean?  Is it a string or an object?
Are there any examples of how fragments are dealt with?  We'll never return a fragment so fragment support isn't a deal breaker.

There’s no special format for style.

What does that mean? Is it a string or an object?

It used to be under discussion, but removed in 2016.
There are downsides to doing style as an object, because you need to parse styles in some cases, which includes quite the library. In other cases, you need to stringify it, which is less of a problem.

Are there any examples of how fragments are dealt with? We'll never return a fragment so fragment support isn't a deal breaker.

Any document, whether it’s a complete one or a fragment, is stored in a root node. There’s no other handling for it. To be honest, now I’m not entirely sure what your use case is!

@kevinbarabash Is there still interest in doing this? Are there reservations?
If so, I may be able to work on it the coming weeks.
Could you estimate the time involved with changing the underlying objects to a different format?


Specification of initial UAV position and GPS coordinate origin for the MRS system

Hello mrs-team,
I am currently having trouble with identifying the files that are required and used to change the x,y,z coordinates of the drone spawn. I am mainly interested in changing the z value of the drones. This is to help me with another project that requires me to navigate through a series of varying ground terrains- eg. mountains. I also need some guidance on how to integrate the world files coordinate to respond to the changing altitudes of the ground since the default world file configurations and mrs_launch files interact independently from one another.

Hi, you can specify the initial position of drone in simulation using --pos_file parameter. See this session.yml as an example. The initial position can be loaded from csv or yaml file (see pos.yaml).
For changing of GPS coordinate origin for our system, you have to update this file to be in match with origin of your world. Or do it in opposite way and modify origin in your world file to match the one in the our setting. See https://github.com/ctu-mrs/mrs_uav_system/issues/22

@Wizzya  Have you managed to run it as you wanted?

I can run default simulations thanks for your help. But cuurrently still having trouble with launching custom worlds


conflict with the floating toc plugin??

It happens on start up. see here for more info: https://github.com/PKM-er/obsidian-floating-toc-plugin/issues/115#issue-2528856464


Disable short option alternatives in command-line options

Reference: http://www.ibm.com/developerworks/aix/library/au-unix-getopt.html

This is already done when refactoring ArgsParser.


Add dashboard slug path in the config file

Description of changes:

Add dashboard slug path in the config file

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the met-public license (Apache 2.0).

Codecov Report

Merging #1801 (40c037e) into main (c823361) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1801      +/-   ##
==========================================
- Coverage   70.84%   70.82%   -0.03%
==========================================
  Files         386      387       +1
  Lines       11721    11706      -15
  Branches      891      889       -2
==========================================
- Hits         8304     8291      -13
+ Misses       3264     3262       -2
  Partials      153      153

Flag
Coverage Δ

metapi
79.21% <100.00%> (+<0.01%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

met-api/src/met_api/config.py
99.24% <100.00%> (+<0.01%)
:arrow_up:

... and 8 files with indirect coverage changes


Define Native & JS API and packaging for custom widgets

We should define the minimal API that is necessary to implement a custom widget which is part of our widget tree. The API will be provisional for now and may change at any time. Custom widgets are packaaged as Cordova plugins.
iOS already defines a set of public header files that have been used successfully to implement custom widgets.  Those headers can serve as a starting point.

For all platforms, we need to

Implement some kind of hook to register custom widgets. Consumers of a custom widget should only need to include the widget, not add any build hooks or write application code to register the custom widget.
Agree on a minimal subset of interfaces, extract and publish them.
Provide some documentation on how to write a custom widget.

For iOS, we should also ensure that the interfaces are Swift compatible (eclipsesource/tabris-ios#761).

As @jonek commented in issue #469, it would be nice to use the CardView widget as an example of a custom widget.

We have developed a solution on how to register custom widgets inside the native infrastructure on Android. We use the AndroidManifest.xml supporsts a meta-data entry. In this entry we let the plugin developer provide a fully qualified name to its IOperator (the class that handles protocol messages.
The following snippets shows how a meta-data can be added from the plugin.xml file of a cordova plugin without requiring any intervention from the consumer of the plugin:
<config-file target="AndroidManifest.xml" parent="/manifest/application">
  <meta-data
    android:name="com.eclipsesource.tabris.android.OPERATOR.com.domain.app.myplugin"
    android:value="com.domain.app.MyPluginOperator" />
</config-file>

Since each meta-data name has to be unique in the manifest we have to prefix the name with com.eclipsesource.tabris.android.OPERATOR followed by a plugin specific identifier. We highly recommend to use a fully qualified name as show above.

We already did some API improvents on the JS, and pretty much worked out how the final API should looke like. Here is what still missing:

Instead of prefixing special configurion parameters in registerType with "_", extract the non-configuration parameters (which will be put on the prototype) into a "members" object parameter.
Revise the property "type" syntax to replace the current array notation with strings.
Instead of giving an object with set/get functions, let "access" consume string similar to "type". Examples would be "cached", "uncached", "cached readonly", "cached static", etc.
Automatically give the wiget as the first parameter to event listener so that there is no need to implement custom trigger functions.
Optional: Combine the property type configuration keys into a single string that can be given instead of the object, e.g. "cached int 5".


Disable CORS

I want to disable cors in slim 3 . I have also tried below link
https://www.slimframework.com/docs/cookbook/enable-cors.html
But it appeares as *,http://mysite
I want only request http://mysite will be processed and for others , there will be response messages will be returned.
Thanks in Advance

Slim doesn't have CORS enabled by default.


Update production

Mainly:

Workflow with new deploy strategy that maps branches to app instances somewhat differently; also schematic has been pinned to latest real pypi release, which seems stable enough (though I've only tested generation and submission with one template on staging). We disable the default shiny-deploy.yml as seen in https://github.com/nf-osi/NF_data_curator/actions/workflows/shinyapps_deploy.yml, and custom-deploy-shiny.yml has been running fine as seen with develop and edge in latest Action runs. Note that tagged releases are no longer required (ignored) for deployment to production -- if this is desired, can update wf again.
Workflow handling releases by data model repo explicitly pinned to 20.04 (because GitHub updated ubuntu-latest runner to mean 22.04, which broke stuff as seen here).
Surface new templates and terms in production.

@anngvu, thanks for doing this!
I am noticing one bug; the annotations are submitted with capitalized keys (see, for example, CellType vs cellType, which I just added to this file using the staging app: https://www.synapse.org/#!Synapse:syn30595914).
I think this is a schematic config. It's quite possible I messed this up when I last updated the app...

The issues I mentioned earlier seem to have been fixed with this new config!

However, I am loathe to merge stuff that will cause a Friday afternoon deployment, so let's wait till monday. :)

With this latest update to address https://github.com/nf-osi/nf-metadata-dictionary/issues/230, should we deprecate PdxGenomicsAssay, since the xenograft info is now available in the metadata manifest for the other genomics assay types? Should we also pull in the other xenograft-relevant terms transplantationType transplantationRecipientSpecies 1transplantationRecipientTissue`? https://github.com/nf-osi/nf-metadata-dictionary/blob/main/modules/Experiment/annotationProperty.csv

Also, selecting pdxGenomicsAssay breaks the app - here's the error message:
2023-01-10T22:58:13.555917+00:00 shinyapps[5711947]: [WARNING] /srv/connect/apps/NF_data_curator-staging/.venv/lib/python3.8/site-packages/synapseclient/table.py:596: DtypeWarning: Columns (10,11,22,23,53,56) have mixed types. Specify dtype option on import or set low_memory=False.
2023-01-10T22:58:13.555971+00:00 shinyapps[5711947]:   df = pd.read_csv(filepath,
2023-01-10T22:58:13.555983+00:00 shinyapps[5711947]: WARNING: [2023-01-10 22:58:13] py.warnings - /srv/connect/apps/NF_data_curator-staging/.venv/lib/python3.8/site-packages/synapseclient/table.py:596: DtypeWarning: Columns (10,11,22,23,53,56) have mixed types. Specify dtype option on import or set low_memory=False.
2023-01-10T22:58:13.555987+00:00 shinyapps[5711947]:   df = pd.read_csv(filepath,
2023-01-10T23:03:28.991359+00:00 shinyapps[5711947]: warning: The `use_annotations` option is currently only supported when there is no manifest file for the dataset in question.
2023-01-10T23:03:29.018219+00:00 shinyapps[5711947]: Warning: Error in py_call_impl: KeyError: 'PdxGenomicsAssayTemplate'
2023-01-10T23:03:29.018265+00:00 shinyapps[5711947]: Detailed traceback:
2023-01-10T23:03:29.018273+00:00 shinyapps[5711947]:   File "/srv/connect/apps/NF_data_curator-staging/.venv/lib/python3.8/site-packages/schematic/models/metadata.py", line 141, in getModelManifest
2023-01-10T23:03:29.018278+00:00 shinyapps[5711947]:     mg = ManifestGenerator(
2023-01-10T23:03:29.018283+00:00 shinyapps[5711947]:   File "/srv/connect/apps/NF_data_curator-staging/.venv/lib/python3.8/site-packages/schematic/manifest/generator.py", line 92, in __init__
2023-01-10T23:03:29.018288+00:00 shinyapps[5711947]:     is_file_based = "Filename" in self.sg.get_node_dependencies(self.root)
2023-01-10T23:03:29.018299+00:00 shinyapps[5711947]:   File "/srv/connect/apps/NF_data_curator-staging/.venv/lib/python3.8/site-packages/schematic/schemas/generator.py", line 211, in get_node_dependencies
2023-01-10T23:03:29.018304+00:00 shinyapps[5711947]:     required_dependencies = self.se.explore_class(source_node)["dependencies"]
2023-01-10T23:03:29.018311+00:00 shinyapps[5711947]:   File "/srv/connect/apps/NF_data_curator-staging/.venv/lib/python3.8/site-packages/schematic/schemas/explorer.py", line 332, in explore_class
2023-01-10T23:03:29.018316+00:00 shinyapps[5711947]:     if "subClassOf" in self.schema_nx.nodes[schema_class]:
2023-01-10T23:03:29.018321+00:00 shinyapps[5711947]:   File "/srv/connect/apps/NF_data_curator-staging/.venv/lib/python3.8/site-packages/networkx/classe [... truncated]
2023-01-10T23:03:29.029619+00:00 shinyapps[5711947]:   15: <Anonymous>
2023-01-10T23:03:29.029655+00:00 shinyapps[5711947]:   13: fn
2023-01-10T23:03:29.029676+00:00 shinyapps[5711947]:    8: retry
2023-01-10T23:03:29.029682+00:00 shinyapps[5711947]:    7: connect$retryingStartServer
2023-01-10T23:03:29.029687+00:00 shinyapps[5711947]:    6: eval
2023-01-10T23:03:29.029692+00:00 shinyapps[5711947]:    5: eval
2023-01-10T23:03:29.029696+00:00 shinyapps[5711947]:    4: eval
2023-01-10T23:03:29.029705+00:00 shinyapps[5711947]:    3: eval
2023-01-10T23:03:29.029710+00:00 shinyapps[5711947]:    2: eval.parent
2023-01-10T23:03:29.029720+00:00 shinyapps[5711947]:    1: local

so perhaps another reason to deprecate it.

Yeah, I think we can remove it from the selection currently -- will make proposed change.


Make VirtualizedScrollPane FXML ready

The current design of this class has a no-args constructor which hinders the ability to use VirtualizedScrollPane inside an FXML file.

has a no-args constructor

I suppose you mean "has no no-args constructor".
Taking the content node as a constructor parameter ensures that any instance of VirtualizedScrollPane is properly initialized. Splitting this initialization between a no-args constructor and, say, setContent, opens room for initialization bugs. I don't like when tools, in this case FXML, force us to write less robust code. (Not to mention that a multi-step initialization complicates both the implementation and use.) Isn't it time to fix FXML?

I completely agree with you. I rather have a bullet-proof design rather than opening it up for the sake of convenience of a tool. Unfortunately we can't extend FXML and can't tweak FXMLLoader (it's riddled with lost of private API usages). So the current options are to support FXML or not.
I guess for now the only way to create instances of VirtualizedScrollPane is through programmatic means

Could constructor be updated to leverage javafx.beans.NamedArg?

javafx.beans.DefaultProperty class annotation is also worthy of consideration. Would make FXML cleaner.


Support py 3.7

Looks like the build for Python 3.4 is now failing. I think we can remove support for that and add a build for Python 3.7 and make sure it works in that version.

when the version of python version is 3.7 in travis, python 3.6 tests are failing with Interpreter not found error. Do you think I can remove py3.6 as well..? But the tox tests are passing for py3.6 locally.

I think we should be able to get tests to run for both py3.6 and 3.7 in Travis. You had them both working for django-edtf I think; did you look at what is different from that repo?

I think, there I have added the python interpreters separately for every testing env. I can do the same here. Umm...what about django 1.10? Do you think I can get rid of testing it since it isn't supported by django anymore?

Yeah, we could get rid of testing Django 1.10

Done in https://github.com/unt-libraries/django-citeit/pull/13.


App does not load all assets sometimes and has to be refreshed #2114

https://github.com/webaverse/app/issues/2114

Related  https://github.com/webaverse/app/issues/2793


az resource invoke-action fails for Log Analytics Purge

Related command
az resource invoke-action
Describe the bug
Using invoke-action to purge data from a log anlaytics workspace results in an error:

Deployment failed. Correlation ID: 2580c410-7196-4208-a9dc-25b1547621e5. Location header is missing from long running operation.

To Reproduce
 az resource invoke-action `
     --name WORKSPACE NAME `
     --resource-group RESOURCE-GROUP `
     --subscription SUBSCRIPTION `
     --resource-type 'microsoft.operationalinsights/workspaces' `
     --action purge `
     --request-body @file.json

Expected behavior
The operation to complete, showing the operation id of the puge.
Environment summary
Initially installed via Windows MSI, upgraded to latest via az upgrade
azure-cli                         2.43.0

core                              2.43.0
telemetry                          1.0.8

Extensions:
application-insights              0.1.15
azure-devops                      0.25.0

Dependencies:
msal                              1.20.0
azure-mgmt-resource             21.1.0b1

Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\REDACTED\.azure\cliextensions'

Python (Windows) 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:37:59) [MSC v.1933 32 bit (Intel)]

Additional context

@zhoxing-ms for awareness


GeoDjango support.

A lot of spacial concepts can wind up benefiting from having polymorphism as an 'escape hatch' to avoid overly complex code dealing with the nearly infinite variety of things that can be at locations or occupy a space.
Would be very nice to have GeoDjango supported out of the box.

Wouldn't it be possible to add the GeoDjango fields on a standard Django model/polymorphic model? I'm not sure what you're looking for here.


Added SSR feature in rust-analyzer getting started.

without this rust-analyzer won't give suggestions for any crates in the ssr feature due to the optional flag being true.
Had this issue my self and took a while to figure out.

I'd also recommend setting rust-analyzer to check all features on all projects (rust-analyzer.cargo.allFeatures)


chore(calling-ui-siderbar): make it look like figma

current:

screenshot of desired:

figma link: https://www.figma.com/file/vYKm91y1PjZPW0NRuzj0u9/Video%2F-Voice-Chat?type=design&node-id=0-1&mode=design&t=2el4JshSVnT0WvPU-0

there is a cogwheel in the call ui. what is it for? do we need that?


release badge displays incorrect version.

Describe the bug
While doing the release, noticed that the badge (which should've been 0.22 or .23 was still showing 18.8)
https://github.com/knative-sandbox/eventing-ceph
Clicking on it takes to proper place and shows the latest release as 0.23
https://github.com/knative-sandbox/eventing-ceph/releases
Expected behavior
The badge to show the latest release
To Reproduce
Click on the main page, look at the badges and see that it's not showing the latest version.
Knative release version
0.23
Additional context
Add any other context about the problem here such as proposed priority

/remove-lifecycle stale


Add CFI instructions for save_context

Tested with GDB:

[x] x86_64
[x] x86
[ ] aarch64
[ ] riscv32
[ ] riscv64

Fix #35

@bjorn3 it'll be helpful if you can review the code or test on additional platforms

Can confirm it works on aarch64 too after this change and results in "Backtrace stopped: previous frame identical to this frame (corrupt stack?)" before this change.


Update addon selector for bootstrap 4

Q
A

Bug fix?
yes

New feature?
no

BC breaks?
no

Related tickets
fixes #2343

License
MIT

See also #1574

Could that be merged somehow in the recent feature? Thank you for the work!

Thanks @jpknoll!

Thank you!


Exception handler also throws

In case the AntiForgeryToken cannot be decrypted the antiforgery infrastructure throws an exception which is handled (in my ASP.NET Core pipeline) using app.UseExceptionHandler("/Error"). However, the Error page cannot be rendered as the antiforgery infrastructure again throws - although the request is no longer really a POST request now...is there a workaround?

Hm, I needed to put [IgnoreAntiforgeryToken] on my error action.


Veracruz should be able to set the IP:Port to open locally that is different from the policy

Requested feature
In the cloud, NAT is essential to operation and that means that the IP and sometimes ports that are externally visible are not the same as the process open. Requiring both to be the same makes using it on the cloud difficult or impossible.

Is this issue for veracruz-server or proxy-attestation-server? Does it apply to the libraries or the CLI only?

Veracruz-server. If the library uses the policy to open the socket (IP:Port) it is related to the libraries otherwise it affects only the CLI. The proxy-attestation-server also suffer from the same problem but it is more manageable since I assume it is not externally visible and only its certificate is required.

@geky can you take a look at this in conjunction with your other work on veracruz-server?


Any advice for an ARM porting?

Good morning everybody.
I found your cpp porting very useful. However, I am looking for lighter implementation since I must embed it into an STM32 MCU.
I come across to this project:
https://github.com/tachcard/arm-barcode-scanner
Interesting indeed but based on an old cpp porting of zxing. I also explored the Zbar approach in pure C but it has the same memory issues, so I am seriously thinking if would be a good idea to try an arm porting myself...
Do you think it is a good idea? Am I reinventing the wheel? If not, do you have any advice to tailor your library into an MCU?
As you can imagine I need to optimize memory allocation and possibly avoid threading computation since using an OS is another layer of complexity involving more computational resources.
I know I am asking a lot. But any advice on a starting point would be very appreciated.
Thanks a lot, and work well.

I see no reason why this code could not be made to run on your ARM platform. To answer whether or not the current approach is generally feasible with your memory limitations, I'd need to know your memory limitations :).

what kind of barcodes do you want to detect (there is a substantial difference between the individual formats, especially between 1D and 2D codes)?
how big is your input in pixels?
how much spare heap memory do you have?

Note: there is (basically) no threading/concurrency code present at the moment.

I believe the questions of axxel above are very important. Current code is already running on ARM (for both Android and Windows UWP builds), and from our experiences, the memory consumption of the readers themselves are far behind the memory buffers used to manipulate input images. The CPU time used to parsing barcodes is significant or not depends all on how many barcodes to expect to scan, and can easily optimized. Thus, IMHO, you are not going get a lot by going to the vanilla C. There are also options to turnoff RTTI and Exceptions, which are sometimes not available for size limited implementations of STL.

Thanks a lot for your quick answers. Here are my constrains:

Well for now we could start from just 1D barcode
RGB888 640*360 px
at last 3 Mb
Answering your note:
Sorry I found the "once_flag" inside the binarizers which can be implemented with mutex inside the OS, if I am right, so I thought to the multithreading.
Concerning the Huycn comment if I understand well I can exclude these functionalities with the right parameters during the compilation process?
Thanks a lot for your help

Very good, if you could additionally limit yourself to not use the "tryRotate" hint, then the code needs no copy of your binarized image.
if you could make sure to convert that to grayscale (potentially in-place) before handing it over, then current code does not copy your image buffer at all.
that is indeed not a lot of memory but should be sufficient. That said, I have no hard measurements of how much memory is currently being used. It is likely a good idea to add some more fine-grained "enable format_x" build options to at least get rid of the 2D codes.

As for the "once_flag" that is present but can easily be defined out. Actually, I cannot tell right now why @huycn added that in the first place. Having one LuminanceSouce and then start multiple threads accessing that through multiple MultiFormatReaders in parallel?

1 Well I would prefer to maintain the “try rotate” feature, it is very useful for me
2 Agree with you with grayscale conversion in place (just one byte per pixel would be sufficient, right?)
3 ok thanks I will add only the 1D formats in my build
I will wait for @huycn  answer and I have already defined out the once_flag, hoping not to breake the code.
Thanks again

@axxel's guess was right. The "once_flag" was to share same LuminanceSource instance in multiple readers running in parallels for real-time detection. Thus, if you are not running multiple threads, just can just defined out as he suggested. Or if you know if are going to need to whole matrix anyway (for 2D readers), you can also remove the line call_once and call InitBlackMatrix() in constructor. The "cache" (and hence once_flag) was there is to make sure we pay only for what it's used.

Ok thanks a lot!
I will try with this approach and let you know.

Any progress/success you'd like to share? We'd gladly improve the out-of-the-box experience for embedded systems if possible and useful.

Well, I am trying, but for now I got no progress. I will let you know hopefully by the end of this week. Thanks for your interest.

Hi there!
So, I finally found time to focus on this problem.
I followed your advice: now I am using an Image of type Lum and giving it to the readbarcode function, but I got a memory problem since it makes a copy and I am running out of heap.
I am not using tryrotate nor tryharder.
Is this copy necessary if I choose to look for just one type of barcode at time?
Any advice to exclude it without braking everything?
I think that if I am able to overcome this memory problem maybe the binarizer will work since it is not using so much heap, am I right?
Thanks for your kind help

You are right, contrary to my earlier claim, even when passed a Lum buffer with no rotation the code makes a copy of the complete frame (which it would not really have to). That said, a 640x350 frame uses 224kB. You wrote you had 3MB spare, so if you can not store two of those frames at one time, something does not add up. If you use the 2D decoders you'll need another copy for the binarized output. (Or at least an 8th but that code path might not fully work at the moment).
I could make sure the one copy in the GenericLuminanceSource goes away but if it would then just fail in the binarizer anyway, it would not make a difference, right?

Thanks @axxel.
To be honest I have 3 Mb RAM of free space but it is in an external  8 Mb SRAM. My total heap works inside a 512 KB RAM. So I got my RGB (640x360x3) frame than process it to grayscale (640x360) on external SRAM.
So with 372 KB of free heap when the code makes a copy I am pretty out of resources (yes there is other stuff running and I have already tried to reduce memory consumption).
The only way, in my opinion, is storing the various copies on external SRAM or try to allocate part of the heap outside it but I think that will be a huge effort changing everything inside you library.
What do you think? Thanks again

I see 2 options at the moment:

get rid of the unnecessary copy and make sure the (slower/old) packed BitMatrix code still works and it might barely fit. But as I said, I don't have a clean picture of where and how much memory is allocated. Maybe there is another bottle-neck.
provide a hack to make the code get it's 'huge' allocations via a custom malloc.

You could experiment with 2) by coming up with your own std::allocator implementation and hack that into the std::vector inside ByteArray and BitMatrix. That might actually be not too invasive and do the trick.

Ok I will try both options starting from the second one since I would like to mantain a forward compatibility.
I'll let you know. Thanks a lot!

Any update on your efforts?

Closed for lack of feedback. We'll reopen in case this should get picked up again by the OP.

Any update on your efforts?

Sorry I did not see your question. For now, the project is in stand-by. Maybe I found a way to resolve this issue but I have no time now to work on it, I will let you know.


[feature] embed images

As a user
I want to use images in my presentation
So that I can have more than only text in the presentation
As a user
I want to use images that are stored in oCIS in my presentation
So that I don't have to upload them or base64 encode them in the presentation
As a public viewer of the presentation
I want to see embedded images in the presentation
So that the presentation looks the same when viewed through a public like like if viewed as logged in user
As a user
I don't want a public viewer to see images that are not publicly shared
So that no private data is leaked
To fulfill the requirements I suggest:

allow to embed images that are stored in the same folder or its subfolders by using the markdown image syntax
not allowing to embed files from a folder of higher levels
require the whole folder be publicly shared if the public viewer should see the images
if only the markdown file is publicly share the viewer should not be able to access the images

A benefit of this feature request is to reduce file size of the presentation .md file. Plus, if I use an image (e.g. a diagram) multiple times in the presentation and notice an error, I only need to update the source and it should update all instances where this image is used

I have done some work on it and these are the findings:

There's a way to convert image path to full url with revealjs and marked:
./cool.png -> https://localhost:9200/dav/spaces/<id>/cool.png

:x: needs authorized request

Sign the image urls: (working) :heavy_check_mark:
Requires:

Unwrap Presentation component
Manually add header, sidebar, and other components
Modify img elements' src rendered by revealjs

Limitations:

only files at .md file level can be read

I will try to implement option 2 for the first iteration.

Unwrap Presentation component
Manually add header, sidebar, and other components

I was wrong here. works without removing AppWrapper
import {  useAppDefaults } from '@ownclouders/web-pkg'

const appDefaults = useAppDefaults({ applicationId: '<app-id>' })

// mounted
// this loads the files
await appDefaults.loadFolderForFileContext(unref(currentFileContext))