[cloud_firestore] retainWhere broken for List

Describe the bug
Upon receiving the QuerySnapshots from a collection query, I want to drop those results that don't match certain filter criteria. Previously I did this with retainWhere (pre version 0.13.1) however upon updating to 0.13.4 I've found that this no longer works.
To Reproduce
Consider the following code snippet:
return StreamBuilder(
        stream: Firestore.instance
            .collection('...')
            .snapshots(),
        builder: (BuildContext context, AsyncSnapshot<QuerySnapshot> snapshot) {
          if (snapshot.hasData || snapshot.data != null) {

            print('pre-processing doc count: ${snapshot.data.documents.length}');

            // filter documents
            snapshot.data.documents.retainWhere((DocumentSnapshot snap) {
                // some condition under which we want to keep docs
                if (...) {
                   print('keeping this one...');
                   return true;
                }
                // some condition under which we want to discard
                if (...) {
                   print('dropping this one...');
                   return false;
                }
            });

            print('post-processing doc count: ${snapshot.data.documents.length}');
          }

Expected behaviour
Debug & print statements validate that we are hitting both cases (keep and drop) and returning the respective boolean values, however the pre and post processing doc count in the returned collection is always  the same (all are retained).

Hi @leetworx
could you please provide a sample of your implementation of retainWhere
together with your flutter doctor -v ,
your flutter run --verbose
and your pubspec.yaml
Thank you

Hi @iapicca - the implementation is in comment #1. Note specifically the use case where 'retainWhere' is being used on a list of documents having been turned from a query on a collection - i.e.
// filter documents
snapshot.data.documents.retainWhere((DocumentSnapshot snap) {
...
run.log
});
flutter doctor -v
[✓] Flutter (Channel stable, v1.12.13+hotfix.7, on Mac OS X 10.14.5 18F132, locale en-CA)
• Flutter version 1.12.13+hotfix.7 at /Users/leet/development/flutter
• Framework revision 9f5ff2306b (6 weeks ago), 2020-01-26 22:38:26 -0800
• Engine revision a67792536c
• Dart version 2.7.0
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/leet/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 28.0.3
• ANDROID_HOME = /Users/leet/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.3.1, Build version 11C504
• CocoaPods version 1.7.4
[✓] Android Studio (version 3.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 31.3.1
• Dart plugin version 181.5656
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
[!] VS Code (version 1.41.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
✗ Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (1 available)
• Todd’s iPhone • ecd4a0dcdaacabca34d6d580f6e8a10de6ebeaca • ios • iOS 10.3.3
! Doctor found issues in 1 category.
Flutter/firebase related info from pubspec.yaml
environment:
sdk: ">=2.3.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cloud_firestore: ^0.13.4
firebase_analytics: ^5.0.11
firebase_auth: ^0.15.4
firebase_core: ^0.4.3+3
firebase_dynamic_links: ^0.5.0+9
firebase_performance: ^0.3.1+5
firebase_remote_config: ^0.3.0+1
firebase_messaging: ^6.0.9

My understanding is that you can't define the stream inside StreamBuilder.
I tend to use a StreamController.
Often initState will trigger a query subscription, then a processor will send updates to the StreamController using add.
The StreamBuilder uses the stream from the StreamController, like:
For example:
  final _statusController = StreamController<Payload>();
...
  Widget build(BuildContext context) {
    return StreamBuilder(
          stream: _statusController.stream,
          builder: (BuildContext context, AsyncSnapshot<Payload> snapshot) {

@awhitford - not sure what you're referring to w.r.t the restriction on where/how the stream is defined. Is the behaviour you're describing documented somewhere? If so, any pointers would be most helpful as I know that the implementation that I outlined in the initial comment worked perfectly pre version 0.13.1 (so presumably this would be a new limitation?)

It is well documented for FutureBuilder:

The future must have been obtained earlier, e.g. during State.initState, State.didUpdateConfig, or State.didChangeDependencies. It must not be created during the State.build or StatelessWidget.build method call when constructing the FutureBuilder. If the future is created at the same time as the FutureBuilder, then every time the FutureBuilder's parent is rebuilt, the asynchronous task will be restarted.

I tried finding the same advice/guidance for StreamBuilder, but it admittedly does not seem to be well documented.  However, if you look at StreamBuilder examples all over, you can see that the Stream lifecycle is independent of the StreamBuilder.  I recommend applying the FutureBuilder advice to StreamBuilder.
Hope this helps!

Hey @leetworx I'm reviewing issues, does @awhitford's solution work for you for now?

Closing - retainWhere modifies the existing List, which you shouldn't be doing. Try iterating over the data and adding your own items to a list if they match your use-case.


Fix #810

Signed-off-by: Utkarsh Mishra<EMAIL_ADDRESS>Description
While looking at the Meshery website I saw a typo under the heading Operate with configuration best practices i.e Operational is misspelled (oprational)
This PR fixes   #810
Notes for Reviewers
Please have a look  @warunicorn19
Signed commits

[x] Yes, I signed my commits.

@UtkarshMishra12 DCO failing


UX interviews

@marek-kultys has built a prototype demo of our idea and we're going to solicit feedback on it with three people who are physically located at the eLife sprint.
The UX interview template is at: https://hackmd.io/7_LQF3cbTIe-gBv18JX51Q

For posterity, the hackmd file:

Project Trackbook UX Interviews
User interviews and prototype demo feedback
Administered at: eLife Innovation Sprint
On: 11th May 2018

INTERVIEW 1
Hi, thank you for taking part in our Project Trackbook interviews!!
We're going to ask you a few questions about yourself, and then show you a prototype we've developed for our idea. We're really interested in any feedback you can give - positive or negative!
We're asking for your feedback early so that we can build something you would actually use :smile:
Let's start by asking a few questions about you:

What is your name. Do you consent to us using this information publicly?

Delwyn - yes.

What is your job? Please interpret this very broadly - you can define yourself however you want.

Researcher - neurobiology. Electrophysiology, Ca++ imaging. Wet lab - patch clamping.

What we want to achieve for the Project Trackbook is a lab book for the modern age. Our two priorities are 1) secure and easy file sharing with collaborators, and 2) version control.
As a key side effect of these priorities we want to also facilitate sharing of all the information a re-user would need to understand your project without you being there. Therefore we want to prioritise data management and metadata capture alongside the original and processed data files.

What does useful data sharing meant to you? Would you value this sort of tool? Which aspects of our description resonate most strongly with you?

Any tool that makes data sharing more easy would be VERY valuable.

Integrating the raw file with the parameters - temperature, time, date, etc. Also integrating your own comments on top - annotations - your thoughts. Putting those together in a central place would be really valuable.

what is being recorded, all the other notes, your insights.

What tools do you currently use to achieve those goals?

Non electronic lab book - written everything down.
Very difficult to share.

An electronic one would be really useful - easier to search, easier to edit, easier to filter the data you've collected. Can be linked directly to the analysis, being able to back up.

Traditional one completely out of date.

Data I use are images and timeseries - around a few MB per file - not too big.

What tools do you currently use to share files with collaborators?

University hosted cloud based system. Able to share outside of university too.
Not easy to sync updates - would have to do individually. Would have been great to be able to have synced changes from different computers.

Not allowed to use Dropbox.
Had a server to backup. Technically would be allowed to give access but not all that helpful to outside collaborators.

How do you manage data within your research group?

Indidivual researchers would back up their individual projects to the institutional server.
Rare to share raw data.
Working on different projects. No standards in the research group.
Towards the end of the project I was working on building up some better practises.

What improvements or changes would you make to your current workflow? What limitations or bloskers do you encounter and/or what do you want to be able to do.

Want better integration of everything you're recording and the metadata. In ONE place. In digital form. Automatically backed up. Don't want to have to worry about all these data management steps - protect the researcher's time to do "actual research".
Would be really nice to be able to take notes WHILE doing the experiment - so mobile friendly or ipad friendly so you can add quick notes would be great.
Let me show you the prototype we've developed.
As we go through the demo, please speak out loud what you're thinking (if you can!) and let us know what makes sense and what questions you have.
The scenario we're imagining: A PhD student wants to share a figure they've created with their supervisor.
This file can not be shared through a cloud service because there is sensitive data involved in the figure. The student wants to keep track of the versions of the file as it develops.
[INSERT PROTOTYPE DEMO HERE!]
We're using the Beaker Browser and we're going to navigate to the project we've made.

Can you add a button to make it easier to access?
A: Maybe could be shared to favourites so you have it bookmarked for future use.

Peer to peer network - NOTE: need to explain this

Project overview pages looks great!

On the right are your files for a project and on the left are your metadata notes.

Really nice to START a project this way - document your goals, ideas, hypotheses

Is this the raw data or the analysis files?
Looks like you are linking up all the different files that you've put in the folder - raw and analysis together.

When you change a file in the analysis folder, there is a prompt to change the description for the associated metadata.

Really neat - very nice.
If I don't interact with the prompt to update the metadata then I can disregard it.
For example if I don't have to change what I've written.

I'd like the flexibility of adding my own sections on the left hand side - would be nice to be able to set up my own structure.

We're going to change the file and summarise what has happened, then commit that files.

Looks really easy - feels very intuitive.

You can share this now by sending the hash, or by adding their emails to a box.

Woah, Charles Darwin is interested! NICE!
I'd expect that THE RECEIVER would now be able to interact with these files in exactly the same way that I can.

Can I communicate with the collaborators?
I'm hesitant on whether we'd want that - the version control will anotate what my thought process is/was. But maybe there could be a discussion board - kinda like a private messaging section - to be able to send comments/thoughts/updates back and forth.
Called something like discussion - near the box for who you've shared everything with.
Like a slack integration but it doesn't have to be SLACK per se - could be something else!

You'd be able to remove the files, right?

Do you have any other hopes & dreams?

Would it be possible to link it up to GitHub?

You can have a .git folder in one of the folders - that can sync up super easily.

Would be great to have a raw data folder in here, and separate folders for processed data, or analyses, or figures, or code, or notes etc.
Important to be able to pull all these possible data types into the same folder structure to keep it all together.

I'd love to be able to link up files together - focusing on the provenance of the processing - could you click on a processed image and have it highlight which

Really valuable to have some standards - not a fan of forcing everyone to fit in the same box. But SOME standards from the beginning is really helpful!

This idea looks great for a non-confident command line user - there's a lot of things to learn when you're a new PhD student and helping people to do version control without adding too much onboarding

INTERVIEW 2
User interviews and prototype demo feedback
Administered at: eLife Innovation Sprint
On: 11th May 2018

Hi, thank you for taking part in our Project Trackbook interviews!!
We're going to ask you a few questions about yourself, and then show you a prototype we've developed for our idea. We're really interested in any feedback you can give - positive or negative!
We're asking for your feedback early so that we can build something you would actually use :smile:
Let's start by asking a few questions about you:

What is your name. Do you consent to us using this information publicly?

Daniela - yes!

What is your job? Please interpret this very broadly - you can define yourself however you want.

PhD student in neuroscience. Set up experiments using electrophysiology to study the auditory system - these last 6-7 hours. There's also some data that we'd collect that will be analysed that evening - spike sorting etc.

Other days are analysis or prepwork.

What we want to achieve for the Project Trackbook is a lab book for the modern age. Our two priorities are 1) secure and easy file sharing with collaborators, and 2) version control.
As a key side effect of these priorities we want to also facilitate sharing of all the information a re-user would need to understand your project without you being there. Therefore we want to prioritise data management and metadata capture alongside the original and processed data files.

What does useful data sharing meant to you? Would you value this sort of tool? Which aspects of our description resonate most strongly with you?

I really like the capture of the metadata & comments.

I can imagine that for a human lab it's really really important to stay super secure. It needs to be secure. There are quite a few tools that we're not allowed to use because they're hosted by 3rd party servers (eg: google docs, dropbox etc).

What tools do you currently use to share files with collaborators?

Code - git & bitbucket. Open source projects are in github and the closed projects are on bitbucket. Many of these "closed" projects are old scripts that are very specfic for work in the lab.

To share files we use slack within the lab. For example in specific project channels.

How do you manage data within your research group?

My PI is quite tech savy - we have a local server with a database and we log in and track the ID of the experiment and the time and date. Then there are prompts to ensure that we write down the important things that we need to record.

I also take notes on paper - I personally like to be able to draw some of the concepts. Not everyone does it. I also like to have a history of everything that I've been doing. To be honest, I think it's partly because this was how I was trained. I just find it easier to flick through the pages of the lab book to be able to easily go through the

The main database captures really valuable metadata in a standard form. It is possible to upload images that I've taken from the experiment etc.

What improvements or changes would you make to your current workflow? What limitations or bloskers do you encounter and/or what do you want to be able to do.

I think it would be great to be able to customise the main database. I'd like to be able to set it up the way that I would like to interact with it.

Let me show you the prototype we've developed.
As we go through the demo, please speak out loud what you're thinking (if you can!) and let us know what makes sense and what questions you have.
The scenario we're imagining: A PhD student wants to share a figure they've created with their supervisor.
This file can not be shared through a cloud service because there is sensitive data involved in the figure. The student wants to keep track of the versions of the file as it develops.
[INSERT PROTOTYPE DEMO HERE!]
We'll open the Beaker Browser and navigate to the specific hash link for your project.
You can see on the left the

This looks like a scaffold for a paper. Get all your framing for a project set up from the beginning.
I think it would be really valuable to have that scaffold from the

DANIELLE: integrate with the eLife reproducible paper stack

\project space - information about project, files in folders organized by the user, plus version information
\these are files related to this project, \daniela wants high level info on the left and low level on the right
\adding a file
adding a file, not tracked yet,
what does it mean?
she doesn't know what 'not tracked' means - it's not being assigned an id for version control?
yes, she does know what it means
\the warning in the descriptions section, updates in that section, user can edit this section to address new the files
committing the changes added here, committing to version history
Sumarize what has been changed
is it required to add a comment? it should many people are being required, must have required comments
commit changes
total revisions - is this a revision by everyone who has access or by you? all revisions done by anyone. \unless it it only you who has shared the project
\now to add new users to share your file, send them an email with the hash or add email addresses to send the key
make revisions and changes?
\do they need to accept in order to become a collaborator? Yes, she wants them to confirm their addition
\once they have been added they know the hash key and can access the data. two days later.... you access the project again and see a revision
\now this thing you collaborator adds is tracked by the version history
This can be any type of files? any files in any folder straucture that you want, if it was a funky file type, an illustrator file type, it would ask how you want to open it
every project has the same layout, but you can add as many panels as you want. these panels would be long, so first few displayed plus click to expand


Update the description of Dockerhub repositories

Feature Request
Update the description/overview of our Dockerhub repositories.
Description of Problem:
Our DockerHub repositories do not have any description/overview. It will be helpful to users to include some
description/overview as to what the repository is about.
The Golang and OpenJDK repositories are good examples :

https://hub.docker.com/_/golang/?tab=tags&page=1&ordering=last_updated
https://hub.docker.com/_/openjdk

Potential Solutions:
This can be automation like https://github.com/peter-evans/dockerhub-description .
Even a one time update will be good first start.

This issue is stale because it has been open for 30 days with no activity. Please remove stale label or add any comment to keep this open. Otherwise this will be closed in 5 days.

This issue was closed because it has been inactive for 35 days. Please re-open if this issue is still relevant.


Rounding errors in the positional encodings

Hi, many thanks for your efforts.
I investigated the rounding errors a bit and to me it seems like they mostly accumulate in the gamma positional encodings. With same inputs (rate, concentration, x are torch.allclose), I get different results after the xlogy for tensorflow and pytorch, and because these are rather large deviations/values, this then seems to propagate. Unsure where TF and pytorch differ for xlogy here...
So as a "dirty" fix, I precomputed the gammas in TF, saved and loaded them in your pytorch implementation and I manage to get the same results (up to some numerical issues) with enformer-pytorch as if I compute it for some test sequences with the TF reference implementation.
For instance, for this  test_sequence.npy.zip: the maximum of the output of the current pytorch implementation is 474.7, with the precomputed gammas 555.6, and the reference implementation has 555.5.
Feel free to have a look at my fork for all of this, where I integrated the precomputed gammas in your implementation.

wow, thank you for spending all this effort tracking down where the error was! could I possibly get a copy of your revised model so I can upload it to huggingface?

@johahi i decided to compute the gamma positions in float64. that reduced the error between the xlogy for torch and tensorflow from ~1e-6 down to 1e-14. if that doesn't help, we can resort to your solution!

@lucidrains thanks for the quick reponse, cool!
I just ran the numbers for the example sequence above using your newest version, and unfortunately this does not seem to fix it. With float64, I get 454.9 as max, just to be comparable to what I report above (474.7). You can see however, how the errors accrue just from this little change. I actually suspect there is something more fundamentally incorrect about xlogy, but have not (yet?) looked further into it.
I am a bit unsure about how to best integrate the precomputed gammas, maybe in the state dict, probably much nicer than explicitly loading them from disk - what do you think? I had to rewrite the positional encs a bit.
I reimplemented the enformer "successor" (borzoi) in pytorch which only uses central mask pos encodings. When I ported the weights there, things kinda just worked (it produces the same results as the TF model) and I thought why not revisit enformer-pytorch briefly...

@johahi oh bummer ok
i quite like your solution and think we should just make it official (with some minor changes). let me try to get this done in the next hour
i didn't know enformer had a successor! i'll have to read the borzoi paper when i get some time

Amazing, works now for me and hits the same numbers I reported up there for my fork, thanks

@johahi thank you for sharing your solution!


Add retry logic to GetOffset() just like Leader()

Which is: refresh the metadata and retry once, in case e.g. our connection or
metadata is stale.
Also add a test for it.
@Shopify/kafka

This is a nice improvement :+1:


Fix consistency between arg_to_s and arg_to_html, expose args_html

While working on a doc generator, I was checking out linkification and syntax of type restrictions, like this one
https://crystal-lang.org/api/0.35.1/Array.html#each_product(arrays:Array(Array),reuse=false,&)-class-method
def self.each_product(arrays : Array(Array), reuse = false, &)

Crystal's doc generator only puts this into JSON output:
"args_string": "(arrays : Array(Array), reuse = false, &)",

It's a really weird mix because I'm pretty sure that code is trying to avoid putting HTML into the output, but instead omits it only selectively.
I am changing it to put this:
"args_string": "(arrays : Array(Array), reuse = false, &)",
"args_html": "(arrays : Array(Array), reuse = false, &)",

The former is a fix (one that is likely to pop up in in some other places, not just the JSON output),
while the latter is an addition that I need for my doc generator, as I need to detect where Crystal decides to linkify the types and such.
One could argue that the generator should instead output some semantically defined structure to convey this information, not just HTML that it happens to have on hand, but really the HTML works just as well, and it will definitely unblock me.
Besides, the generator was already outputting HTML, just not in a useful way.
I am not developing any new code, just clearing up the mixup in conditionals between the "string" and "HTML" outputs that already exist (except for macro.cr, but that's also just an omission that I'm fixing).
I recommend to view the diffs commit-by-commit.

That CI failure is super puzzling... Compiler bug! https://github.com/crystal-lang/crystal/runs/1583314384

Can't find why test_alpine fails. This PR can't possibly be related. But the failure seems consistent and also there's no such failure currently on master.

Mm this causes a bad diff (regression) in the actual doc generator. Should've checked earlier.
This needs more work.
--- docs1/ArgumentError.html    2021-01-02 13:11:51.594019625 +0100
+++ docs2/ArgumentError.html    2021-01-02 13:10:46.851950583 +0100
@@ -3718,7 +3718,7 @@

-        .new(message = "Argument error")
+        .new(message = "Argument error")

@@ -3782,7 +3782,7 @@

-      new(message : String? = nil, cause : Exception? = nil)
+      new(message : String? = nil, cause : Exception? = nil)
     new

Mm this causes a bad diff (regression) in the actual doc generator. Should've checked earlier.
This needs more work.
--- docs1/ArgumentError.html    2021-01-02 13:11:51.594019625 +0100
+++ docs2/ArgumentError.html    2021-01-02 13:10:46.851950583 +0100
@@ -3718,7 +3718,7 @@

-        .new(message = "Argument error")
+        .new(message = "Argument error")

@@ -3782,7 +3782,7 @@

-      new(message : String? = nil, cause : Exception? = nil)
+      new(message : String? = nil, cause : Exception? = nil)
     new

Now all good. I had to pivot this PR to also fix some issues with wrong escaping of HTML ids.
Current doc diff (all changes are improvements): https://gist.github.com/a2abcf4f67179643a75d691d9af62352
One particularly interesting improvement

Now all good. I had to pivot this PR to also fix some issues with wrong escaping of HTML ids.
Current doc diff (all changes are improvements): https://gist.github.com/a2abcf4f67179643a75d691d9af62352
One particularly interesting improvement

@jhass, may I request your review

@jhass, may I request your review

I'm not convinced by the configuration enum in c359f8f10a83ff14c07579e9b264de4e1a57e813.
I would propose to replace html with two independent bool args highlight and links. It's more explicit because I don't have to look up the enum definition to learn that :all actually means highlight and links.

I'm not convinced by the configuration enum in c359f8f10a83ff14c07579e9b264de4e1a57e813.
I would propose to replace html with two independent bool args highlight and links. It's more explicit because I don't have to look up the enum definition to learn that :all actually means highlight and links.

There are actually 3 bool args then: escape, highlight, links.
Implementing 23 possibilities when actually there are only 3 is of dubious value. The implementation becomes more complicated (with many more edge cases) but those options are never used.
We could assume that no-highlight-no-links means no-escape (which is dirty enough already), but that still leaves the no-highlight-with-links branch which is kinda undefined but would need to be implemented.
I actually tried this first, btw.
As implemented now, we have tiers.

Tier
Escaping
Highlighting
Links

None

Highlight
✓
✓

Links
✓
✓
✓

There are actually 3 bool args then: escape, highlight, links.
Implementing 23 possibilities when actually there are only 3 is of dubious value. The implementation becomes more complicated (with many more edge cases) but those options are never used.
We could assume that no-highlight-no-links means no-escape (which is dirty enough already), but that still leaves the no-highlight-with-links branch which is kinda undefined but would need to be implemented.
I actually tried this first, btw.
As implemented now, we have tiers.

Tier
Escaping
Highlighting
Links

None

Highlight
✓
✓

Links
✓
✓
✓

Diff for the latest added commit aabdf28 (#10109) - basically ends up fixing IDs of <=> method

Diff for the latest added commit aabdf28 (#10109) - basically ends up fixing IDs of <=> method

Reworked the description of the pull request to this:

This pull request revolves around the args_to_html method. In Crystal doc generator it is used to convert a method's arg signature into HTML that is syntax-highlighted, and with cross-links inserted -- all escaped as appropriate.
E.g.
def pretty_inspect(width = 79, newline = "\n", indent = 0) : String
(width = 79, newline = "\n", indent = 0) : String

Because docs also have "method summary" entries without links (but still with syntax highlighting), that method has an escape hatch links: false. The call with this arg is aliased as args_to_s.
But there are also several places where non-highlighted and non-escaped original text is wanted. Unfortunately, currently that is achieved by just deleting everything in angle brackets <...> in that args_to_s. That has some issues, but the biggest one is that this escaping is not being undone!
This args_to_s is then used to produce HTML heading IDs, and links to them, and currently they are malformed in many situations.
So, this pull request implements the missing third mode - to just not produce any HTML, and then args_to_s is changed to use that mode.
args_to_html
Tier      |Escaping|Highlighting|Links
---------------|--------|------------|-----
None         |        |            |
Highlight    | +      | +          |
All          | +      | +          | +
On this table the top row is the new one. args_to_s used to be like Highlight, but is fixed now. And several workarounds that "post-processed" args_to_s are removed.

This args_to_s is also directly put into the JSON produced by the doc generator, presumably with the intention of being a plain string. But actually HTML ended up in it!
"args_string": "(width = 79, newline = "\\n", indent = 0) : String",

So (actually as my original motivation for this PR) I am changing it to put this:
"args_string": "(width = 79, newline = \"\\n\", indent = 0) : String",
"args_html": "(width = 79, newline = "\\n", indent = 0) : String",

In addition to a proper text mode, I am keeping a full HTML mode (even with links), because I actually need it for my own doc generator, to detect where Crystal decides to linkify the types and such.

Reworked the description of the pull request to this:

This pull request revolves around the args_to_html method. In Crystal doc generator it is used to convert a method's arg signature into HTML that is syntax-highlighted, and with cross-links inserted -- all escaped as appropriate.
E.g.
def pretty_inspect(width = 79, newline = "\n", indent = 0) : String
(width = 79, newline = "\n", indent = 0) : String

Because docs also have "method summary" entries without links (but still with syntax highlighting), that method has an escape hatch links: false. The call with this arg is aliased as args_to_s.
But there are also several places where non-highlighted and non-escaped original text is wanted. Unfortunately, currently that is achieved by just deleting everything in angle brackets <...> in that args_to_s. That has some issues, but the biggest one is that this escaping is not being undone!
This args_to_s is then used to produce HTML heading IDs, and links to them, and currently they are malformed in many situations.
So, this pull request implements the missing third mode - to just not produce any HTML, and then args_to_s is changed to use that mode.
args_to_html
Tier      |Escaping|Highlighting|Links
---------------|--------|------------|-----
None         |        |            |
Highlight    | +      | +          |
All          | +      | +          | +
On this table the top row is the new one. args_to_s used to be like Highlight, but is fixed now. And several workarounds that "post-processed" args_to_s are removed.

This args_to_s is also directly put into the JSON produced by the doc generator, presumably with the intention of being a plain string. But actually HTML ended up in it!
"args_string": "(width = 79, newline = "\\n", indent = 0) : String",

So (actually as my original motivation for this PR) I am changing it to put this:
"args_string": "(width = 79, newline = \"\\n\", indent = 0) : String",
"args_html": "(width = 79, newline = "\\n", indent = 0) : String",

In addition to a proper text mode, I am keeping a full HTML mode (even with links), because I actually need it for my own doc generator, to detect where Crystal decides to linkify the types and such.

@straight-shoota Did my reply convince you or not?

@straight-shoota Did my reply convince you or not?

Not totally yet. I'm a bit undecided. Maybe either way is okay. W

Not totally yet. I'm a bit undecided. Maybe either way is okay. W

Oof the merge conflict with #10389 is tough

Ping

master is broken by this PR.
In src/compiler/crystal/tools/doc/type.cr:511:46

 511 | node_to_html entry.value, io, links: links
                                            ^----
Error: undefined local variable or method 'links' for Crystal::Doc::Type


fold the extensions in the expansion pack

TreeView for  extensions .
Why not fold the extensions in the expansion pack
There are some extensions.

A: AA, AB, ZZ;
B: BA, YY, ZZ;
C;

Folded like this. It's more concise.

A
|__ AA
|__ AB
|__ ZZ
B
|__ BA
|__ YY
|__ ZZ
C

Unfolded like this.

A
AA
AB
B
BA
YY
ZZ
C

Both of two have their own advantages, and I hope there can be a button to switch between them.
by the way.
I installed [ YY, A, B, C ] manually.
when I uninstalled B, the YY should not be uninstalled.
when I uninstalled YY, I should get a warnning that B depend on YY.

Awesome idea. ✅

Is this a feature request for the extensions view, or an editor?
Please add a screenshot.

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!

Is this a feature request for the extensions view, or an editor? Please add a screenshot.

It's a feature request for the extensions view.
Like Python is an extension pack which includes Pylance.
Instead of

Python
Pylance

It should be

Python

Pylance


[#169127957] added profile info in central header

added user name and role in central header
added user profile management in dashboard and default container
added new translations and mock services

Affected stories

🌟 #169127957: Gestione informazioni topbar

  Generated by :no_entry_sign: dangerJS against e3d2372b9aa4e0dc206c3471cb1fc5039bf7afb3


Not receiving all e-mail from POP3 account

Expected behavior
Every e-mal on the server should appear in the Inbox.
Actual behavior
At random, messages do not show up in the Inbox.  I have been using K9 on my Fire tablet for maybe a year or more now; and, for the past several months, I have been using it to screen my e-mail, since Windows Mail takes so much resources and occasionally crashes.  If I see something I want to reply to or click a link on, I go to WLM to open it.  However, recently, I was sent a 911 from someone wondering why I hadn't replied.  The reason: the e-mail didn't was never in my K9 Inbox, Trash, nor any other folder!  Yesterday, I received a notice that my on-line work wouldn't start till Friday at 8 a.m.  When I went in to start, I saw a message saying work had started Thursday at noon.  I opened WLM, waited for it to download dozens of e-mails, searched for the company name, and a notice telling me I could start work at noon Thursday was there.  I went back to the Fire, searched Inbox and Trash, and the message was not there.  That makes K9 mail totally useless for me.
I don't think this has always been the case; k9 mail has been working slower and slower since one of the past couple of updates, but not downloading mail that can be found by another e-mail client is totally unacceptable.
Steps to reproduce

Check mail.
Discover one way or another that an e-mail was never received.
Go to WLM and download e-mails to find it.

Environment
K-9 Mail version: 5.000
Android version: Fire OS 5
Account type (IMAP, POP3, WebDAV/Exchange): POP3

Is there a reason you're running a version of K-9 from September - we release 5.001 in October and have done several releases since then?

I thought I had seen it update once or twice on its own, but maybe I was mistaken on that.  I don't see a way to update it on the app, and the store just says Open.  I am guessing when you tell me how I should be updating it, I will be replying, Duh, but I have to ask, anyhow.  ??
Also, is it possible it's been skipping e-mails since 2014?  Or just since Fire updated its OS?  Or it somehow backtracked to its previous version?

I may have figured out the answer to my initial question.  See if this makes sense:
I had my account to load 25 e-mails.  I frequently get 60 to 100 a day.  I let the polling (every minute) load new e-mails, or I pulled down the screen to set the circle rotating, or I clicked on the circle to load more.  But I never used the "Load up to 25 more" link at the bottom of the list.  Is it possible that the "missing" e-mails would have shown up if I had clicked the "Load up to 25 more" link, but the polling and refresh polls just got the next 25 after the last poll time?  That is, maybe there were 30 e-mails available for the first poll, and it loaded 25 of them.  If I had clicked the load-more link, it would have loaded the other 5.  But, since it or I just started the next poll, it downloaded up to 25 new since the last poll.
Does that make sense, and do you think that was the problem?  I changed the account to "download all," and the two known "missing" e-mails were loaded — but so were several hundred older ones I know K9 had seen before!  (When I saw that happening, I shut down the Fire, and deleted all the older e-mails on the server other than the two I knew the Fire hadn't seen before.)
If that is actually what caused some e-mails not to show up, then the only other question is how to update K9 on my Fire.  My Galaxy 3 phone and Acer Android tablet have version 5.010.  I don't know what the latest version is supposed to be.  ??

Does that make sense, and do you think that was the problem? I changed the account to "download all," and the two known "missing" e-mails were loaded — but so were several hundred older ones I know K9 had seen before! (When I saw that happening, I shut down the Fire, and deleted all the older e-mails on the server other than the two I knew the Fire hadn't seen before.)

Yes.
The latest stable version of K-9 is 5.010.
@cketti - do we still have the ability to deploy to the Kindle app store: https://www.amazon.com/K-9-Dog-Walkers-Mail/dp/B004JK61K0/ seems to be still 5.000

Sorry for the long span before reply here.  Does that mean Amazon Fire users are stuck with 5.000?  I haven't noticed any missing e-mails since I set the account to download all of them.  But I have also been having a lot of trouble getting e-mails to delete!  I'll select all, deselect the ones I want to read, mark the selected ones read, and then delete them.  Sometimes (after a long wait) they delete; sometimes they don't.  Even when they do, I'll come back to the Inbox and find them all or many of them back, marked as read.  Then trying to find the unread ones I wanted to read is close to impossible.  (I often get over 100 e-mails a day, most of them asking me for money!)
I can even go to the Trash folder and select all there and delete (again waiting a long time), but they will still pop up back in the Inbox as read.  Is that something 5.0.10 might have fixed?
And getting an e-mail to display can take a long time, too; but I don't know if that's the Fire being slow or the mail app.  ??


[webos, tizen] --hosted opens web session twice (in two seperate tabs)

Describe the bug
Platforms with --hosted open web session twice (in two seperate tabs)
To Reproduce

go to template-starter package
run rnv run -p webos --hosted

Expected behavior
One tab opens
Desktop (please complete the following information):

OS: Ventura 13.5.2 (Intel)
Node Version 18.16.0
RNV Version 1.0.0-feat-pin-cli.2
rnv/template-starter Version 1.0.0-feat-pin-cli.2

Can't reproduce

@ElenaDiachenko one browser tab opens with <IP_ADDRESS>:port and other with <IP_ADDRESS>:port


Reset Item Link when set empty

In this way you don't have to set Link=04fffffff when you want to remove a link from an item.
You just do Link=

I like it!!


Search Result Styling

Added styling for color for search result heading, when using quartz I noticed that my search results heading was discolored.

Can you attach a screenshot of your fix? I can't reproduce the issue you mentioned

For some reason I can't reproduce the issue anymore either, it's been so long I'm not sure what changed. Sorry for wasting your time, I spent a long time finding this fix and thought it would be helpful but it might've just been user error.


Trim all additional spaces from parsed data

This only took about 20 minutes of looking up different ways to remove white space in front of and after a string in JS and then just using the .trim() method. Really easy fix and works great. Was originally looking at using a regex in some way.


Added disko-rd.com, alphabetized

We got https : //disko-rd.com/freenitrom1 linked on our Discord server today, so I'm adding it to the list. I added the spaces so that it's not clickable.

It's also added to this list already.


Improvement: Offset for Breakeven

Hi!
I suggest to add a new variable: Breakeven Offset
This offset could work as a "buffer". A trader could have in mind commission, spread and slippage. To compensate this I set the SL manually a couple of points after the entry.
Currently the Breakeven places the SL on the exact same position of the entry price. With the offset the placement would be entry + XX points on buy orders or entry - XX on sell orders.
Example:
Entry: 1.5010
Offset: 10
On BUY position - Breakeven would be placed at: 1.5020
On SELL position - Breakeven would be placed at: 1.5000

If you set the UseCommissionToSetTPDistance input parameter to true, it will start taking into account the commission when setting BE. If you would like a more advanced BE mechanism, you'd have to use a separate EA for that.

If you set the UseCommissionToSetTPDistance input parameter to true, it will start taking into account the commission when setting BE.

Yeah! That's exactly what I looking for! Thanks! :)

If you set the UseCommissionToSetTPDistance input parameter to true, it will start taking into account the commission when setting BE.

Yeah! That's exactly what I looking for! Thanks! :)


ResourcePreview authors now defaults to empty list if not supplied or None/null

ResourcePreview authors field is now forced to default to an empty list ([]), if field is not supplied or None / null is supplied as value.  These changes follow @sblack-usu's proposed solution to #23,

updating the default from None to an empty list makes sense to me.

A unit test is also added to verify the desired behavior.
fixes #23

requests in the tests are timing out against hydroshare.  I need to get mocking setup until hydroshare can handle these requests better.


Added database for plugins

Added database, cookie manager for plugins
Added copying from webview localstorage, sessionStorage
Depends on https://github.com/LNReader/lnreader/pull/986

plugins

ranobelib rewritten for the new version of the site
author.today added authorization support
bookriver, novelTl, ranobehub optimized (cheerio replaced by match, replace)

multiplugins

updated readwn domains

icons

updated icons (now all icons are compressed and their sizes are 96x96 or smaller)
added script to update icons of all plugins (it will also remove all unused icons)


Update to ungoogled-chromium 105.0.5195.127-1

No patch updates required.

@Nifury Publishing the release on winget has failed. Could you please have a look?

wym fail, its here: https://github.com/microsoft/winget-pkgs/pull/79942

oh that was a rerun, my bad

Yeah turns out I need to keep my winget repo synced.

Is everything okay? Should I wait for @Nifury's approval first?

@PF4Public Everything is fine. I'll submit a PR to sync the winget-pkgs repository automatically.


sc-4131 GDS UI Refresh : Assemble user admin component

Codecov Report

Merging #429 (fcb7e96) into main (1b861d0) will decrease coverage by 9.43%.
The diff coverage is n/a.

:exclamation: Current head fcb7e96 differs from pull request most recent head 22bf2c7. Consider uploading reports for the commit 22bf2c7 to get more accurate results

@@            Coverage Diff             @@
##             main     #429      +/-   ##
==========================================
- Coverage   47.11%   37.68%   -9.44%
==========================================
  Files         232      151      -81
  Lines       11609     2367    -9242
  Branches      606      606
==========================================
- Hits         5470      892    -4578
+ Misses       5178     1302    -3876
+ Partials      961      173     -788

Impacted Files
Coverage Δ

directory/pkg/gds/gds.go

directory/pkg/gds/store/trtl/iterator.go

directory/pkg/bff/status.go

directory/pkg/gds/store/trtl/connect.go

directory/pkg/trtl/replica/sync.go

directory/pkg/gds/client/credentials.go

directory/pkg/gds/admin/v2/csurf.go

directory/pkg/bff/gds.go

directory/pkg/gds/models/v1/models.pb.go

directory/pkg/utils/logger/logger.go

... and 71 more

Continue to review full report at Codecov.

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


Field Trait: Consider adding static linear combination operation

SNARK Protocols (in particular verifiers) often have expensive linear combinations they have to evaluate. The most expensive term in a field multiplication is the modular reduction. However, if we're doing a linear combination, we should be able to batch the modular reductions by adding all of the products in their un-reduced forms.
e.g. if we have an M limb field, and we want to compute c = sum_{i in 0..N} a_i * b_i, we can compute this as (pseudocode ignoring montgomery reductions):
let mut unreduced_c: 2M + 1 limb bigint;
for i in 0..N {
    let term: 2M limb bigint = unreduced_product(a_i, b_i);
    unreduced_c += term;
}
let c = modular_reduce(c);
c

We're guaranteed unreduced_c won't overflow if N < 2^64, since it has one extra limb.
To handle that we're in montgomery form, as a first method, we could make modular_reduce just reduce by p and then multiply by R' at the end. I think its possible to adapt REDC to combine the final multiplication by R' into the reduction, but the speedup of that should be marginal, and likely has much higher code complexity.
This could potentially be a significant speedup.

I imagine this is more useful for something like Aurora or Fractal? Because I don't think it's a bottleneck in EC-based protocols

oh that might be the case. This was what the bottleneck was in Aurora's verifier. (And anything thats bottlenecked by lagrange interpolation) I wonder how important it is in witness generation

I wonder if this would also be helpful as a sub-routine within making a batch addition formulae for elliptic curve points. (Not sure where that would be costly within a SNARK outside of a protocol engineered to use binary MSMs)

BLST's implementation reports a 15% speedup in their sqrt code by using unreduced squarings: https://github.com/supranational/blst/blob/194c2623799416c76edf6e62fcabdc59aa1e9f80/src/sqrt.c#L23

Oh that's quite a good improvement, seems like this API is definitely justified. I presume we can add a linear_combination method on PrimeField that has a default implementation which just does the sum_i(a_i * b_i), and then we can add separate optimized impls later.

We have further evidence from #80 that actually a more extreme version of this is an efficiency gain. The more extreme version namely being returning the unreduced form directly. There it was shown that the fp12 arithmetic was half the time as what we currently have, despite having same if not slightly more performant base field arithmetic. Similarly, fp2 arithmetic was ~25% faster.

I'm very much in favour of this. Reducing the number of reduce operations in montgomery mul can make huge savings, possible on the order of 1/3 - 1/2, which is about how much we are lagging right now.
Unfortunately, the number of additions/subtractions one can perform before reducing is field dependent. However, we can count leading zeroes and use a constant branch into the right impl. While messy, I think it could be very promising.

This can have an impact in our elliptic curve formulae as well, as there are a number of places where we compute a chain of additions. I'm thinking of two APIs:
fn linear_combination(&[(Self, Self)]) -> Self;

pub enum Op {
	Add,
	Sub,
}

impl Sum<(Op, Self)> for Fp {
// compute a running sum while avoiding reductions.
}

Is Sum the right trait? Seems to require queuing an iterator which will take much more memory (unless I misunderstand the trait https://doc.rust-lang.org/std/iter/trait.Sum.html )

You can construct the iterator lazily via a closure, so it depends entirely on how the iterator is constructed.

Will be closed by #418


Make loop in BinanceSocketManager optional

Coverage remained the same at 48.163% when pulling def4547c8348dedfa049691f0088b4ea7c14799c on eddwardo:optional-loop-manager into 00dc9a978590e79d4aa02e6c75106a3632990e8d on sammchardy:feature/asyncio.

Have included this in the feature/asyncio branch which will be released as v1.0.0


Detect and throw exception in get_json_object if the input has nesting depth exceed the maximum allowed value

Currently, in get_json_object, when the maximum nesting depth has been exceeded, the evaluation process may either  return a null or just crash without any clear message. This PR adds the ability to detect such situation and  throw a better error message.
In addition, this also synchronizes between MAX_JSON_PATH_DEPTH in C++ JNI and MAX_PATH_DEPTH Java code, avoiding the possibility that they are set at different values.

build

build

It would be nice to have a few tests that verify that we get the exceptions we expect.

Thanks. I've added the tests for doing so.


⚠ Bofrost.fr has degraded performance

In c2431b5, Bofrost.fr (https://www.bofrost.fr) experienced degraded performance:

HTTP code: 200
Response time: 1477 ms

Resolved: Bofrost.fr performance has improved in 021ef9a after 1 hour, 2 minutes.


added unit, integration and end to end test to backend

did this with rafid. github action test will not work - unfortunately did not have enough time to implement correctly. All other tests work perfectly locally given the database connects (only whitelisted certain IPs)

Test Coverage (backend):
Unit tests - tests to see if dummy endpoint create_exercise properly checks the type of input received (both correct and incorrect inputs checked).
Integration test - tests to see if developed endpoint get_exercise properly checks if the inputs are correct - then successfully sends back result from database.
Test Execution Automation - modified github workflow folder now runs the tests in the backend - however there is an issue where jest does not execute the tests properly and causes all tests to fail.
End-To-End Test - unfortunately this test was not implemented due to the lack of development of the front-end. We did manually test a button on the UI that accesses the get_exercise endpoint - but were not able to setup test software to accomplish this at this time.


MSD-ATP/Deployment: improve grammar & readability

Description:
As pointed out in issue ticket #5949 (Typos in the Adoption section), this document needs some proofreading for grammar & semantics.
Thanks to @chhatley for opening the issue ticket.
Changes proposed:

add some commas for grammar & readability
rearrange a couple of sentences for readability
add the missing newline at the end of the document

issue ticket closure or reference:
Closes #5949
Additional notes:
This PR is currently a draft PR to allow more time for additional improvement suggestions to this page.

Thanks for marking this PR as ready. Looks like there is no more feedback to gain, even after nearly a fortnight.

#sign-off

The PR that has been approved by the document author can be merged. Thanks.


v1.7.10 group_by_time empty result

Connected to http://localhost:8086 version 1.7.10
InfluxDB shell version: 1.7.10
> show databases;
name: databases
name
----
_internal
sentinel_db
> create database test;
> use test;
Using database test
> insert test,name=a age=10<PHONE_NUMBER>000000000
> insert test,name=a age=10<PHONE_NUMBER>000000000
> insert test,name=a age=10<PHONE_NUMBER>000000000
> insert test,name=a age=10<PHONE_NUMBER>000000000
> insert test,name=a age=10<PHONE_NUMBER>000000000
> select * from test;
name: test
time                age name
----                --- ----
1583015236000000000 10  a
1583015237000000000 10  a
1583015238000000000 10  a
1583015239000000000 10  a
1583015240000000000 10  a
> select mean(age) from test group by "name";
name: test
tags: name=a
time mean
---- ----
0    10
> select mean(age) from test group by time(1s);
>
when i use v1.7.5 everything is ok. please help.
thanks```

sorry, when group by time, the database must have a retention policy, am i right?


Packages appearing out of date after command line upgrade

Checklist

[X] I have verified this is the correct repository for opening this issue.
[X] I have verified no other issues exist related to my problem.
[X] I have verified this is not an issue for a specific package.
[X] I have verified this issue is not security related.

What You Are Seeing?
I did choco upgrade -y all and now Chocolatey GUI shows all these upgraded packages as out of date (shows old versions).
I tried "Check for outdated packages (forced)" but it didn't help.
What is Expected?
Chocolatey GUI is in sync with choco outdated.
How Did You Get This To Happen?

choco upgrade -y all as admin
start Chocolatey Gui as admin

System Details

Operating System: Windows 11
Windows PowerShell version:
Chocolatey CLI Version: 1.2.1
Chocolatey Licensed Extension version:
Chocolatey License type:
Terminal/Emulator:

Installed Packages
N/A

Output Log
Not a CLI problem

Additional Context
No response

Chocolatey GUI uses a local cache of package information that its refreshes periodically (every 30 minutes by default). If you need to refresh is before that time, use the Check for outdated packages (forced) button in the top right-hand corner.

Note that I had run Chocolatey GUI, which created the local index, closed it, ran choco upgrade 7zip which upgraded to version 23.1.0, and then opened Chocolatey GUI again. You can see both packages are outdated.
After clicking the Check for outdated packages (forced) the package list shows the installed, updated, packages. By they are still marked as 'Out Of Date' which is incorrect.


Reland #27275

https://github.com/grpc/grpc/pull/27275 was rolled back due to a buildifier warning present in google3, but not in OSS. This PR fixes the buildifier warning.
CC @mbeards

I'm working on a separate PR to enable strict mode for buildifier so that this doesn't happen again.

As promised: https://github.com/grpc/grpc/pull/27807


Moves Compaction Properties to accumulo.properties file

Removes the compaction properties from the code and moves them to the accumulo.properties file to simplify the encoded accumulo configuration.
closes #3981
Moves deprecated rate limit property under the new compaction service prefix.
Also adds the functionality of "example" properties to Property.java. This allows properties to be defined in the code, referenced by tests, included in the automated property documentation generation, while not being able to be picked up by a user and accidentally referenced in the system.
Enabling these properties is  a two-step action to allow that property to influence the system.
The property's @Example annotation must be removed, and the defaultValue must be updated with the correct value.
Example of the property documentation changes:

Agree with closing this and moving the example property generation out to a separate PR.
#4273 has gone through at least two revisions since its been open and the original intent of internalizing the compaction properties will be accomplished with that change


Update JWT with custom claims using management API

related to https://github.com/descope/etc/issues/1002

We need to add to example no?

We need to add to example no?

TBH not sure what will be in the example
There is will be a lot of setup code
And nothing to really show on the output

Why not example of login, than using the email to add to custom claims ?
On Thu, 1 Dec 2022, 8:15 Aviad Lichtenstadt, @.***>
wrote:

We need to add to example no?
TBH not sure what will be in the example
There is will be a lot of setup code
And nothing to really show on the output
—
Reply to this email directly, view it on GitHub
https://github.com/descope/go-sdk/pull/178#issuecomment-1333266757, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ABOHJSYTNYW5P4OCOIARMB3WLA7A5ANCNFSM6AAAAAASQBHHBQ
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Why not example of login, than using the email to add to custom claims ?
…
On Thu, 1 Dec 2022, 8:15 Aviad Lichtenstadt, @.> wrote: We need to add to example no? TBH not sure what will be in the example There is will be a lot of setup code And nothing to really show on the output — Reply to this email directly, view it on GitHub <#178 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOHJSYTNYW5P4OCOIARMB3WLA7A5ANCNFSM6AAAAAASQBHHBQ . You are receiving this because you are subscribed to this thread.Message ID: @.>

Because the user will need to create a management api key for this to work
So t will make the example of login much more complex, and may mislead users to create an api key for nothing


fix(autocad): CNX-318 better color inheritance for blocks

Because block definition object colors can inherit their colors by layer or by block, and block instance colors can also be by layer or by block, this pr is setting the color for block definition objects as if they are by color in both conditions, to simulate the correct colors in the viewer (and hopefully when receiving in other apps).
NOTE: if viewer logic can be changed to set definition object colors to be their layer color (instead of overriding with instance color) when they do not have a color directly set, then the layer logic can be dramatically simplified in this pr!
includes a refactor for speckle application ids by adding extension methods for layers, entities, materials, colors, etc to guarantee we are always using the same app id.
Original autocad file:

Received (old): https://app.speckle.systems/projects/b53a53697a/models/66aca735ab@0836579d97

Received (new): https://app.speckle.systems/projects/b53a53697a/models/66aca735ab@8e74530e07

includes a refactor for speckle application ids by adding extension methods for layers, entities, materials, colors, etc to guarantee we are always using the same app id.

finally! this is super nice to have!

I suggest to use another proxy class for ColorSource. By this way, viewer also can know which source it will apply to each object, layer? block? etc.. And I believe this is the clearest approach. Otherwise we're not telling anything to viewer render any geometry from what source. WDYT @didimitrie ?
{
  "colorSourceProxies": [
    {
      "speckle_type": "ColorSourceProxy",
      "name": "ByLayer",
      "objects": ["12345", "12346", "12347", "12348"]
    },
    {
      "speckle_type": "ColorSourceProxy",
      "name": "ByBlock",
      "objects": ["22345", "22346", "22347", "22348"]
    }
  ]
}

I suggest to use another proxy class for ColorSource. By this way, viewer also can know which source it will apply to each object, layer? block? etc.. And I believe this is the clearest approach. Otherwise we're not telling anything to viewer render any geometry from what source.

Currently I'm attaching the source dynamically to the colorproxy:

I think this is fine for now, source can have three values (block, layer, object) and is factored into the color proxy id, and this should also render properly in the current viewer logic


Question: Can I redefine the Page.loadEventFired event after it's been fired?

I want to submit a login form, then redefine Page.loadEventFired again and do something else when the new page loads. Something like this:
  Page.loadEventFired(() => {
    Promise.resolve()
    .then(function() {
      return Runtime.evaluate(/* expression here will submit login form */)
    })
    .then(function (response) {
      // probably not necessary once things are working
      console.log('response:', response);
    })
    .then(/* redefine Page.loadEventFired here */)
    .then(function() {
      return Page.navigate({
        url: 'second link after login',
      });
    })

// I'm not sure where we should finish logic so we can handle a load event again but
// something happens in between here and I take a screenshot after:

... Page.loadEventFired...
    .then(Page.captureScreenshot)
    .then(screenshot)
    .then(function() {
      client.close();
    });
  });

Looked around for an example and couldn't find one.

You can manage events as explained in #93 or use a single listener but keep a state variable. Assuming that the login form redirects to another page (thus triggering a third Page.loadEventFired), you'll need something like:
async function doStuff(client) {
    const {Page} = client;
    let state = 0;

    Page.loadEventFired(() => {
        switch (state) {
        case 0:
            console.log('login page loaded, now submit the form');
            state++;
            break;
        case 1:
            console.log('login performed, now load the screenshot page');
            state++;
            break;
        case 2:
            console.log('take the screenshot then close');
            break;
        }
    });

    await Page.navigate({url: loginUrl});
}

Probably the former approach will result in a more elegant code, it really depends.

@cyrus-and thanks, I'll try this out when I get off from work today and close the issue if no other questions.

I went with the switch-case method because removing the listeners required me to unbind within Page.loadEventFired, and re-define it within the parent Page.loadEventFired. After a few of these, you'd be nested in pretty deep. Let me know if I'm doing this wrong
Page.loadEventFired(() => {
  // do something
  client.removeListener('Page.loadEventFired');
  Page.loadEventFired(() => {
    // do something else
      client.removeListener('Page.loadEventFired');
      Page.loadEventFired(() => {
        // do something else again
      })
      Page.navigate('third page')
  })
  Page.navigate('second page)
});
Page.navigate('first page')

You can flatten the code like this:
const CDP = require('chrome-remote-interface');

CDP(async (client) => {
    const {Network, Page} = client;

    const start = () => {
        console.log('stage 0');
        client.once('Page.loadEventFired', stage1);
        Page.navigate({url: 'https://example.com'});
    };

    const stage1 = () => {
        console.log('stage 1');
        client.once('Page.loadEventFired', stage2);
        Page.navigate({url: 'https://example.com/1'});
    };

    const stage2 = () => {
        console.log('stage 2');
        client.once('Page.loadEventFired', stage3);
        Page.navigate({url: 'https://example.com/2'});
    };

    const stage3 = () => {
        console.log('stage 3');
        client.once('Page.loadEventFired', end);
        Page.navigate({url: 'https://example.com/3'});
    };

    const end = () => {
        client.close();
    };

    Page.enable().then(start);
}).on('error', (err) => {
    console.error(err);
});

Notice the use of once, which is equivalent to use on then removeListener.
I plan to add a Promise interface for once events which should allow to cope with these use cases in a more elegant way. I'll write here when it's done.

Here we go, since v0.20.0 you can also write:
const CDP = require('chrome-remote-interface');

CDP(async (client) => {
    const {Network, Page} = client;

    try {
        await Page.enable();

        console.log('stage 0');
        await Page.navigate({url: 'https://example.com'});
        await Page.loadEventFired();

        console.log('stage 1');
        await Page.navigate({url: 'https://example.com/1'});
        await Page.loadEventFired();

        console.log('stage 2');
        await Page.navigate({url: 'https://example.com/2'});
        await Page.loadEventFired();

        console.log('stage 3');
        await Page.navigate({url: 'https://example.com/3'});
        await Page.loadEventFired();

        console.log('done');
    } catch (err) {
        console.error(err);
    }

    client.close();
}).on('error', (err) => {
    console.error(err);
});

Any feedback is welcome.

That's a lot more elegant than the switch-case method. Thanks.

I know this is closed and all but I found it plenty useful. After trying some of the approaches mentioned here, I went with using a function hoisted as a state variable. In doing so I can await multiple page loads in a single function by resolving a Promise by the page load.
const CDP = require('chrome-remote-interface');
let pageLoad = clickSomeActionThenSubmitForm;

function clickSomeActionThenSubmitForm(Runtime) {
    const clickSomeAction = 'document.querySelector(\'a[href="#someAction"]\').click()';
    const setSomeInfo = 'document.querySelector("input#someinfo").value = "info"';
    const submit = 'document.querySelector(\'form[action*="/smilesAndJoy"] button\').click()';

    return Runtime
        .evaluate({ expression: clickSomeAction })
        .then(() => { return new Promise(resolve => { pageLoad = resolve; }) })
        .then(() => { return Runtime.evaluate({expression: setSomeInfo })})
        .then(() => { return Runtime.evaluate({expression: submit })})
        .then(() => { return new Promise(resolve => { pageLoad = resolve; }) });
}
 ...
Page.loadEventFired(() => { pageLoad(Runtime) });

@jmrnilsson this is good information, thanks.

Got a question related to this one, hope you can find the time to answer.
I was implementing something similar to this to handle pages that trigger a reload the first time a user visits a website thus has no cookies for it. That's the case of behance for example, where they trigger a page reload with JavaScript (so there's no 301, just a 200 and after some time I guess some JS code triggers a reload).
I was wondering if you know of a way to keep the cookies between the first request and the other. I still get a "Promise was collected" in the first request but I can ignore that and try to execute the same promise in the second request if only I could tell Chrome not to reset everything.
Thanks!

I was wondering if you know of a way to keep the cookies between the first request and the other.

@fracasula that should be the default behavior, cookies are not dropped between subsequent requests. Anyway this is the recommended version.
The "Promise was collected" error is discussed in #116 and this FAQ entry.

I see. Maybe I'm not getting any cookie because the first request fails with a "Promise was collected" error. Can't think of a way of making Chrome just wait till the website triggers the JS reload itself though 🤔
Anyway thanks for your help, much appreciated.

@fracasula if you are able to come up with a minimal example feel free to file a new issue. Requests don't fail with a "Promise was collected" error; Runtime.evaluate does.

@cyrus-and I reproduced this in a simple script and opened a new issue here https://github.com/cyrus-and/chrome-remote-interface/issues/231


add todo files from react tutorials

add linter setup
Use JavaScript events
Use React life cycle methods
Implement CSS in react app.js

thanks


Problem in reloading other Pc's

Hello, I have 2 computers connected by Wifi & a local server in 1 of them.
I can navigate my website in the 2 computers using 192.168 ip adress.
I can also livereload my files in my main computer but it doesnt work in the other computer.
When I try to press enable livereload in the other computer it says "could not connect to livereload server ....." Can I have some help please

I think I found from where is the issue, when we click the extension of livereload It adds script tag with 127.0. u should change it to 192.168 ...


Test for partial message sending in simulation

After introducing the network throughput, simulation fails to advance beyond the first round of consensus. I failed to notice this issue as I was focused on capturing the report for one consensus round.
Do debug this issue I've added a testcase for partial message send correctness.

The macos build failed because of parallel runs for waku and libp2p features, the updated jenkinsfile for PRs is in #285, I believe it's safe to merge this as linux build succeeded and the new jenkinsfile will eventually be merged to master.


Allow multiple mappings

Fixes #89 using the same method as the relative hybrid topology method to select the first mapping.

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

In the file feflow/protocols/nonequilibrium_cycling.py:

Line 991:80: E501 line too long (82 > 79 characters)
Line 1000:80: E501 line too long (86 > 79 characters)

@ijpulidos were you ok with the changes in this PR?
@jthorton we hadn't communicated this (we need to document it) but because FEFlow aims to contain different Protocols by different folks, we aim to have the Protocol code owner (in this case Ivan), be the true approver if we can. Probably doesn't matter in this case, but something to try to strive for where possible.

Ah sorry about that I thought the green tick was enough feel free to revert @ijpulidos!


HHH-9928 Pending put leaks when the entity is not found in DB

Backport to 4.3.x

Merged. Thanks!


Voice chat

This would be super duper handy. Ideally you could do it in PMs with other people, and hopefully do it in Teams. Maybe in the form of voice channels, or maybe an option to turn a channel into a hybrid text/voice channel?

Realized this is the wrong repo, oops.


Mistakes in documentation

[Enter feedback here]
Documentation has couple writing mistakes.
In script last } is missing.
Incorrect port number. Instead of 3389 in one place it is written 2289

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: eae3b395-faa5-a31f-6442-75fcf8439da3
Version Independent ID: 34ea4455-36ad-6f22-5813-17b7eafb6024
Content: App Service on Azure Stack Hub 2302 release notes - Azure Stack Hub
Content Source: azure-stack/operator/app-service-release-notes-2302.md
Service: azure-stack
Sub-service: azure-stack-hub
GitHub Login: @apwestgarth
Microsoft Alias: anwestg

@Dionisas
Thanks for your feedback! We will investigate and update as appropriate.

@Dionisas
Thanks for reporting this! We have created a PR for this issue and the changes should go live soon.

I still see same issue in the documentation.
On Mon, Aug 7, 2023 at 1:39 PM Saibaba Balapur Hireka <
@.***> wrote:

@Dionisas https://github.com/Dionisas
Thanks for reporting this! We have created a PR for this issue and the
changes should go live soon.
—
Reply to this email directly, view it on GitHub
https://github.com/MicrosoftDocs/azure-stack-docs/issues/2522#issuecomment-1667617701,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOMOGHQJ344HFGK3YTYQO63XUDAX7ANCNFSM6AAAAAA3D65LXE
.
You are receiving this because you were mentioned.Message ID:
@.***>

Hi @Dionisas Thanks for taking your time, we have already raised change request to author, Once Document author approval, the document changes will be gone alive soon.


Twetch Wallet Adapter - Tracker

Tracking issue for adding Twetch Wallet.
Docs: https://wallet-docs.twetch.app/home.html
Adapter completion checklist.

[x] isAuthenticated()
[x] authenticate()
[ ] encrypt()
[ ] decrypt()
[x] sign()
[ ] verify()
[ ] sendToBitcoinAddress()
[ ] getBitcoinAddress()
[ ] getPaymail()

Not adding encrypt()/decrypt() as they don't support that yet.


Android Studio: Gradle update wrecks Android app

Motivation
A brand-new Flutter app breaks when doing the suggested Gradle update in Android Studio — you can't run the Android app anymore afterward.
I see at least four solutions:

Flutter somehow prevents Android Studio from suggesting the Gradle update.
A future Flutter release updates Gradle in the generated Android app so that Android Studio doesn't suggest a Gradle update anymore.
A future Flutter release changes Gradle in the generated Android app in such a way that that it survives the Android Studio Gradle update intact.
No changes are made in Flutter, but a big fat warning to not do the Gradle update in Android Studio is passed on to all Flutter developers.

Steps to Reproduce
My Flutter version is v1.9.1+hotfix.4 on macOS 10.14.6, and I use Android Studio 3.5.1.

Create a new Flutter project from the terminal with flutter create --org "com.betterprojectsfaster.blog.flutter.intro" --androidx flutter_intro_3
Change into the flutter_intro_3 directory.
Start app on Android emulator in the terminal: flutter run -d "Android SDK built for x86"
The app works.
Open the Android project in the android project folder in Android Studio.
Run the app in the Android emulator with the green Run app button in the toolbar.
The app works.
Check out the notification in the bottom right that urges you to update Gradle:

Click on the update link in the notice to see the full message:

Push the Update button.
The update process runs but fails with an error:

Run the app in the Android emulator again with the green "Run app" button in the toolbar again.
The app doesn't work, and a configuration window with an error shows instead:

Run the Android app again in the terminal: flutter run -d "Android SDK built for x86"
The app fails to start with this error message:

Using hardware rendering with device Android SDK built for x86. If you get graphics artifacts, consider enabling software rendering with "--enable-software-rendering".
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...                                              0.6s
Resolving dependencies...
* Error running Gradle:
ProcessException: Process "/Users/karsten/workspaces/me/services/better-projects-faster/test/flutter_intro_3/android/gradlew" exited abnormally:

> Configure project :app
WARNING: API 'variant.getJavaCompile()' is obsolete and has been replaced with 'variant.getJavaCompileProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
To determine what is calling variant.getJavaCompile(), use -Pandroid.debug.obsoleteApi=true on the command line to display more information.
WARNING: API 'variant.getMergeAssets()' is obsolete and has been replaced with 'variant.getMergeAssetsProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
To determine what is calling variant.getMergeAssets(), use -Pandroid.debug.obsoleteApi=true on the command line to display more information.
WARNING: API 'variantOutput.getProcessResources()' is obsolete and has been replaced with 'variantOutput.getProcessResourcesProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
To determine what is calling variantOutput.getProcessResources(), use -Pandroid.debug.obsoleteApi=true on the command line to display more information.
  Command: /Users/karsten/workspaces/me/services/better-projects-faster/test/flutter_intro_3/android/gradlew app:properties

Please review your Gradle project setup in the android/ folder.

Here's my Flutter Doctor output:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.9.1+hotfix.4, on Mac OS X 10.14.6 18G103, locale en-DE)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
    ✗ Android license status unknown.
      Try re-installing or updating your Android SDK Manager.
      See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed instructions.
[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
[✓] Android Studio (version 3.5)
[✓] IntelliJ IDEA Ultimate Edition (version 2019.2.3)
[✓] VS Code (version 1.38.1)
[✓] Connected device (2 available)

! Doctor found issues in 1 category.

Look at your error message in Android Studio and read it carefully, because it says exactly what to do.  In hindsight it is obvious, but when I read "plug-ins", I thought of IDE plug-ins.
So for my understanding:

The Flutter-generated code uses both old Gradle and Kotlin versions.
The Gradle update process in Android Studio updates Gradle first, but not Kotlin, and makes that fatal pitstop which threw me off.

Correct?

First, flutter uses the newest version when the flutter version was tested. So yes now their can be a newer one.
Second, Android Studio use the gradle plugin you define or the newest one when no version is defined and show you a suggestion to update kotlin-gradle plugin, the gradle version and the kotlin version.
But you have to manually update the depencenies which placed in android/build.gradle


Absolute vs relative paths.

Hi, I think jekyll build or jekyll serve is adding absolute paths to the template.
I am trying to host _site folder on a computer and on opening it in the browser, it looks plain html. Clearly, stylesheets and other stuff are not getting included.

I think it's because browser's security configuration. When I open this file with chrome,js and css files cann't be loaded along with the index page,but when I start a simple http server,like python -m SimpleHTTPServer in directory _site,the index page is right.
I read index.html file ,js and css files are relative path and the path is right.
Do you mean this? Thanks for your question.🙂

Hi, yes it was an issue with file permissions in the css and js folders. Thanks.


Update Put File Functions [SMB, MSSQL, FTP]

This update checks if the file exist on remote target, then asking to user if want to overwrite it.

Interesting 👍


Runtime configuration wizard: existing runtime configuration information is "lost"

Follow-up to https://github.com/elyra-ai/elyra/pull/847
I had created a runtime configuration with an earlier version of Elyra. Opening the configuration using the dev build that includes above PR the name and description in that configuration is not displayed:

The existing metadata file content (with confidential information manually changed)
$ cat kfp_dev_instance.json
{
  "display_name": "KFP dev instance",
  "metadata": {
    "api_endpoint": "http:/myhost.mydomain.com:31380/pipeline",
    "cos_endpoint": "http://myhost.mydomain.com:31671",
    "cos_username": "minio",
    "cos_password": "minio999",
    "cos_bucket": "bucketname"
  },
  "schema_name": "kfp"
}

So I kinda tracked down the source of this issue. After I noticed it also existed on older (previously working) commits I tried installing an older version of lab and that fixed it. So some change between lab 2.2.4 and 2.2.5 broke that specific part of elyra for some reason.

I tracked down what I believe to be the issue. The most recent lab release (v2.2.5) updated it's yarn.lock and @blueprintjs/core was set to the latest release (v3.31.0). This cause use problems because any lab dependency version will override elyra's version (afaik that's just a side effect of how node modules are handled in lab). The new release of @blueprintjs/core included a fix https://github.com/palantir/blueprint/pull/4266 that added support for async to InputGroup, this new async support broke our async update that occurs after we fetch the metadata from the api. Though I'm unsure of why it broke, I do know that the issue was that we created that field of the form prior to the api call returning, and when updating it was using the previous value rather than the new one from the api. This can be "solved" by waiting to add them field until after the async call. I'll have a PR shortly


Remome init timezone, display errors and error reporting. Than must be configured by application.

…e configured by application.

I thought this will not fixed, whether you disabled Error reporting, then you are not able to track the crash.

I thought this will not fixed, whether you disabled Error reporting, then you are not able to track the crash.

It is strange to customize the application settings in the library.

this is for debug , you can disable it when you finish your development.
but tbh , these warning/error messages are useful during your program is running.
you can quick track to the error and find out where is wrong.
I strongly suggest do not turn it off.

I believe this has been answered, so I'm closing this for now.


SQLite3: add ability to set compile flags; add more versions

Per #803, here is an updated version of the SQLite3 package. The only substantive change I made from our discussion in the ticket was to drop support for "valueless" arguments like -DSQLITE_ENABLE_COLUMN_METADATA. In practice, this is equivalent to the ...=1 form and valueless args are not supported by hunter_cmake_args(..., CMAKE_ARGS FOO="") anyway (the value ends up being a single semicolon instead of the empty string and CMake complains about missing whitespace separators)

Closing inactive pull request.


[TESTS] Integration and validation tests don't use session scoped fixtures properly

The intended behavior of session scoped pytest fixtures (ie @pytest.fixture(scope='session')) is for the fixture to be ran once for the entire test suite and the result cached and reused.
This is not working correctly. Session scopde fixtures are being ran once per module.
To get session scope to work properly, fixtures need to be in a file named conftest.py.
The solution may be as simple as renaming common_fixtures.py to conftest.py, but it needs tested out.

This is worth fixing because the fixtures can be expensive to execute and running them once may decrease test run time.


Modify List template

There are some restrictions using List Template.
Better to alert errors in advance.
For more info see [1]
[1] https://developers.facebook.com/docs/messenger-platform/send-messages/template/list

Coverage increased (+0.1%) to 88.478% when pulling 42b324f392462acbd1390fb3770b7613580083c7 on hollalll726:ListTemplate into bc103e37126c86fa7968b9a124797623e215b9f6 on conbus:master.


Flatten exposed login data and add DataBinding to Login

Why was this merged? It's still failing. https://circleci.com/gh/nickbutcher/plaid/679


P2PSession is not polling the Player reciever

P2PSession is not polling the Player reciever, which means that the queues of network events are not being forwarded to the top level. This usually ends in a prediction limit hit.

This might have been addressed as of ee49cfec0e600cbecc71228d51482a6c1c723d33. Pending actual local test to confirm that this has been fixed.


option to remove "generated" date from output

Could you add an flag to prevent the date from displaying in the footer?  For version control reasons, I would like to be able to run the generator repeatedly(like on each commit) and not have the output file update unless the corresponding yaml has changed.  Generated Monday, Mar 6, 2017, 12:15 PM by pretty-swag

no prob

rolled out


Feature Request: Add Base URL ENV

Feature Request: Add Base URL Environment variable so that it can be used with NGINX via a sub folder rather than a sub domain.

Duplicate of #21


Added table support

What this PR is all about?

Opened more tickets I'll not do now: #19 , #18 , #17
I have sass lint error there, can't seem to understand where I got wrong the BEM stuff. @OmriAharon - PTAL at it

Additional information for the reviewer
The lyrics to Elton John's 'Rocket Man' were meant to be taken literally and it is about a Mars bound astronaut leaving his family to do his job.
Issue
Github issue: #16
Making sure I did my homework
Please check all the notes you took care of. You should have them all checked.
As a reviewer, if you see something not checked, please do not P-LGTM or LGTM the PR.

[X] Cross browser - I checked that my code works on: FF, Safari (>=10.0) & Chrome.
[X] Mobile responsiveness - I checked that my code works on the above browser also in mobile view.

__percentChange24h is invalid because numbers are not allowed. you can change to
percentChangeTwentyFourH or something similar

By the way, that wasn't the only issue.. No capital letters are allowed after the __

@OmriAharon - I added isInitialized to the Site component, should probably be used when you're loading the website


Beginner Questions

Why is React imported in some files but not used?
Why does core/components/newpost.jsx use React.createClass but core/components/postlist and core/components/post do not?
In the Meteor tutorial, the App gets rendered with React.render(<App />, document.getElementById("render-target"));, but in Mantra, this code is nowhere. So I would assume it gets replaced by app.init(). But in mantra-core, there is no React.render. So how is it being rendered?

In core/components/postlist we use React's stateless components. With that, even though we don't use React on the code, it'll add when converting this code to normal JS.
That's why we need it.

Rendering
It's rendered in routes. See: https://github.com/mantrajs/mantra-sample-blog-app/blob/master/client/modules/core/routes.jsx
(We use react-mounter for that)

Thanks @arunoda!


cant make custom convex objective function work

Need to minimize Variance*k -  E(return)
what am i doing wrong?
def kelly_objective(w,e_returns,cov_matrix, k=3):
    variance = np.dot(w.T, np.dot(cov_matrix, w))
    objective = variance*0.5*k - np.dot(w, e_returns)
    return objective

mu = expected_returns.mean_historical_return(df, frequency = 1)
S = risk_models.sample_cov(df, frequency = 1 )
ef = EfficientFrontier(mu, S, weight_bounds = ( bound_lower, bound_upper ) )

wts = ef.convex_objective(kelly_objective,e_returns = mu, cov_matrix=S, k = 3)

I get an error.
5 frames
/usr/local/lib/python3.6/dist-packages/cvxpy/interface/numpy_interface/ndarray_interface.py in const_to_matrix(self, value, convert_scalars)
     48             return result
     49         else:
---> 50             return result.astype(numpy.float64)
     51
     52     # Return an identity matrix.

ValueError: setting an array element with a sequence.

What do i need to do ? used to work just fine when you had custom objective function

Hi @dao72,
Thanks for reaching out! There are a few options to make this work. Since your objective is convex, you are correct that the best method is ef.convex_objective(). However, the objective function must be built with cvxpy functions:
def kelly_objective(w, e_returns, cov_matrix, k=3):
    variance = cp.quad_form(w, cov_matrix)

    objective = variance * 0.5 * k - w @ e_returns
    return objective

weights = ef.convex_objective(
    kelly_objective, e_returns=ef.expected_returns, cov_matrix=ef.cov_matrix
)

However, in this case, I'd encourage you to use the built in ef.max_quadratic_utility() (documented here), since it is very similar to your objective, just with slightly different scaling.
Alternatively, if you weren't sure that your objective were convex, you could use ef.nonconvex_objective():
def kelly_objective(w, e_returns, cov_matrix, k=3):
    variance = np.dot(w.T, np.dot(cov_matrix, w))
    objective = variance * 0.5 * k - np.dot(w, e_returns)
    return objective

lower_bounds, upper_bounds = 0.01, 0.3
weights = ef.nonconvex_objective(
    kelly_objective,
    objective_args=(ef.expected_returns, ef.cov_matrix, 3),
    constraints=[
        {"type": "eq", "fun": lambda w: np.sum(w) - 1},  # weights sum to one
        {"type": "ineq", "fun": lambda w: w - lower_bounds},  # w >= lower bound
        {"type": "ineq", "fun": lambda w: upper_bounds - w},  # w <= upper bound
    ],
)

Though as I said, in your case it's best to use the convex_objective.
Hope this helps! Please let me know if you're having any other issues :)
Best,
Robert

Hi Robert
Thanks a lot for your reply.
I actually figured it out by going through your code on GitHub
I will try out non convert approach as well as you outlined below.
I really love your package!  Its awesome.
On Fri, Apr 17, 2020 at 5:35 AM Robert Martin<EMAIL_ADDRESS>wrote:

Hi @dao72 https://github.com/dao72,
Thanks for reaching out! There are a few options to make this work. Since
your objective is convex, you are correct that the best method is
ef.convex_objective(). However, the objective function must be built with
cvxpy functions:
def kelly_objective(w, e_returns, cov_matrix, k=3):
variance = cp.quad_form(w, cov_matrix)
objective = variance * 0.5 * k - w @ e_returns
return objective

weights = ef.convex_objective(
kelly_objective, e_returns=ef.expected_returns, cov_matrix=ef.cov_matrix
)
However, in this case, I'd encourage you to use the built in
ef.max_quadratic_utility() (documented here
https://pyportfolioopt.readthedocs.io/en/latest/EfficientFrontier.html#pypfopt.efficient_frontier.EfficientFrontier.max_quadratic_utility),
since it is very similar to your objective, just with slightly different
scaling.
Alternatively, if you weren't sure that your objective were convex, you
could use ef.nonconvex_objective():
def kelly_objective(w, e_returns, cov_matrix, k=3):
variance = np.dot(w.T, np.dot(cov_matrix, w))
objective = variance * 0.5 * k - np.dot(w, e_returns)
return objective
lower_bounds, upper_bounds = 0.01, 0.3
weights = ef.nonconvex_objective(
kelly_objective,
objective_args=(ef.expected_returns, ef.cov_matrix, 3),
constraints=[
{"type": "eq", "fun": lambda w: np.sum(w) - 1},  # weights sum to one
{"type": "ineq", "fun": lambda w: w - lower_bounds},  # w >= lower bound
{"type": "ineq", "fun": lambda w: upper_bounds - w},  # w <= upper bound
],
)
Though as I said, in your case it's best to use the convex_objective.
Hope this helps! Please let me know if you're having any other issues :)
Best,
Robert
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/robertmartin8/PyPortfolioOpt/issues/90#issuecomment-615004990,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOMRAC5QR24WAJ66H3PDCKTRM656DANCNFSM4MJZI2GQ
.

@dao72
I'm glad you managed to resolve the issue! Do leave a star if you're finding the package useful :)
Cheers,
Robert


Add pubmed knowledge via PMCID

Can use pubmed API, e.g.
https://www.ncbi.nlm.nih.gov/pmc/tools/textmining/

Hey, I like that idea! Would you like to work on that?


[Pomodoro] Clock is not updating until you click

Extension
http://www.raycast.com/asubbotin/pomodoro
Description
I initiated a 25-minute cycle, and the time remains fixed at 25:00 until I click on it, at which point it updates to display the current time.
Rec: https://share.cleanshot.com/CqzXlWYd
Steps To Reproduce

Start timer
Wait few secs
Click on it and time will be updated

Current Behaviour
Time is not being updated
Expected Behaviour
Time updates in real time

https://github.com/raycast/extensions/issues/9877

I have the same issue on macOS Sonoma 14.2.1

same. Sonoma 14.2.1 (23C71)


cmake: fix code section ordering

Order the code sections according to their numbering in the table of
contents.
Signed-off-by: Henrik Brix Andersen<EMAIL_ADDRESS>

Codecov Report

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

@@           Coverage Diff           @@
##           master   #11073   +/-   ##
=======================================
  Coverage   53.22%   53.22%
=======================================
  Files         217      217
  Lines       26733    26733
  Branches     5926     5926
=======================================
  Hits        14228    14228
  Misses      10086    10086
  Partials     2419     2419

Continue to review full report at Codecov.

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


Dark mode causes the color of images within tables to be inverted.

I'm not familiar enough with HTML and CSS to know what exactly is happening, but I'm guessing that for whatever reason the attributes/class tied to images within tables is different than when they're by themselves and it's causing the Doxygen Awesome theming to incorrectly pickup the images as elements to change when dark mode is enabled.
Inverted Images:

The images are correctly displayed when the toggle is switched to light mode (see attachment).
Doxygen Version: Release v1.9.3
Doxygen Awsome Version: a5efba07a3d4fd6317d95657b3095b97e134b791
The following is an MRE for this issue:
(deleted link to zip file)
(Ignore the strings of the first column in the tables, they're leftovers from the project I reduced into the example)

Thanks for reporting this problem and for providing information on how to reproduce it! But please share a link to the MRE instead of posting a zip file. I doubt that the zip is malicious but I'd like to avoid opening a zip from an untrusted source. I'll delete the link in your comment, sorry for the inconvenience!

I would have just used a gist but some files were in subfolders (didn't have to be, but meh) and its also convenient to include the images even though you could have just substituted your own. So:
https://github.com/oblivioncth/doxygen-awesome_issue_72

For now, workaround
@media (prefers-color-scheme: dark) {
    html:not(.light-mode) div.contents div.dyncontent img,
    html:not(.light-mode) div.contents center img,
    /* html:not(.light-mode) div.contents table img, */
    html:not(.light-mode) div.contents div.dyncontent iframe,
    html:not(.light-mode) div.contents center iframe,
    html:not(.light-mode) div.contents table iframe {
        filter: hue-rotate(180deg) invert();
    }
}

html.dark-mode div.contents div.dyncontent img,
html.dark-mode div.contents center img,
/* html.dark-mode div.contents table img, */
html.dark-mode div.contents div.dyncontent iframe,
html.dark-mode div.contents center iframe,
html.dark-mode div.contents table iframe {
    filter: hue-rotate(180deg) invert();
}

Not sure why table img is color-inverted though.

I don't have money anymore to go out to the workshop, I want to eat, let alone me

That one took me a moment... The line in question is supposed to invert the graphical class hierarchy when it is rendered as png. Commit https://github.com/jothepro/doxygen-awesome-css/commit/afc4868752f4a886cfbca70bb546ddba55579def should have fixed the issue.
Also, based on the screenshot provided by you I realized that doxygen tables are not yet supported by the theme. https://github.com/jothepro/doxygen-awesome-css/commit/9e466391d8367485bd64cd14b252991167740c70 now makes beautiful doxygen tables possible, with all the nice features that markdown tables already offered: rounded corners and scrolling support if the content gets too wide!

Never got to trying the workaround, but now I don't have to :)
Nice work, thanks for tackling this, and yea I originally was going to use the Doxy style tables but noticed they didn't work right so that's nice there's support now.


Update layers/meta-balena digest to 5bf3a7b

This PR contains the following updates:

Package
Update
Change

layers/meta-balena
digest
0d43fec -> 5bf3a7b

Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.

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

This PR has been generated by Renovate Bot.

@resin-jenkins test this please

@resin-jenkins test this please

@resin-jenkins test this please

@resin-jenkins test this please


bugfix: @Path("/") in handler throws error

connected to #40
thanks @poornachandra
I change maxPathParts  + 1 to maxPathParts  + 2 because of checking the number of parts in line 74

LGTM


[Function Request] EmailItem Table - GetBodyText > GetBodyTextFromMemory (OnPrem)

Trying to remove any remaining CodeCop warning.
Following #5003 ...
[Obsolete('Function scope will be changed to OnPrem')]
    procedure GetBodyText() Value: Text

AL0432 warning
Method 'GetBodyText' is marked for removal. Reason: Function scope will be changed to OnPrem.
Since my extension targets OnPrem only (app.json) this warning seems redundant (I can't disable an individual warning and need to get rid of any warning for my build pipelines to work )...
Wouldn't it be better to simply move / copy the entire GetBodyText procedure / content (including existing Publishers) to a new OnPrem GetBodyTextFromMemory function instead and replace with
[Obsolete('Function not supported in SaaS. Use GetBodyTextFromMemory if you target OnPrem only')]
    procedure GetBodyText() Value: Text

You've got a very valid point here. Changing the scope of a function isn't really a deprecation - it's a partial deprecation. In your case, the warning makes no sense. We should try to find a better way to notify the developers - your suggestion would do the trick, but would require unnecessary code churn from you, which also wouldn't be perfect.
We are working on mechanisms to suppress/remove warnings, which do not apply to you. The situation will improve soon :-)
But thanks for letting us know! It's good to know, that what we're working on will be useful!

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.


fix: resolve ambiguity std::pair vs. std::tuple. Fixes ticket #9540

Seen with multiple compilers which support C++11's newly introduced std::tuple. Rather than pulling just the required entities from namespace 'std', the full namespace was pulled in instead.
Signed-off-by: Daniela Engert<EMAIL_ADDRESS>

Hi,
I am facing the same issue while working with "tuple". Getting ambiguity error while compiling. Ambiguity is between pulling std::tuple and boost::tuple. Need to use Boost's tuple.
Any pointer or lead or solution is welcome. Exact help is expected due to urgency.