Render waterways and their labels

Motivation: Should be obvious, but of note — the river areas as simplified by openmaptiles have large gaps at low zoom levels and the linear rivers are needed to make this look right.
The current implementation of openmaptiles also uses waterways from Natural Earth at low zoom levels, which leads to some unavoidable clashing when the waterways and river areas are rendered simultaneously — but that's going away so there's no sense in adding a zoom-specific workaround.
Desired qualities for the waterways (brainstorm harvested from slack):

Serif font? We sure have a lot of sans fonts to choose from but no serifs. This is really a question for this style as a whole, but distinguishing "natural" features with a font choice seems to be a thing.
Waterway labels appear at z12, which I'd consider fairly late. This might be a good boundary for rivers in general at the expense of not labeling large rivers.
Some way to distinguish large and small rivers.

Depend on explicit width tagging? This exists almost nowhere.
Detect the river area with a spatial join? One can dream.
Join with wikidata to get the watershed area or discharge? Could work.
Absent any of these, the label needs to look good on a small river with no accompanying water area.

A width heuristic — this is pretty much for small rivers. It can provide a nice transition for when the water area stops being mapped. If we assume that a typical river is 20 feet in width before we can expect the water area to have been mapped, then we can calculate that at z22 (at the equator) this should be 160 pixels in width, then ramp down by powers of two accordingly down to some minimum of (say) 2 or 4 pixels, then switch to a different ramp down to the minimum zoom.

Would it be possible for the style to multiply physically based widths by the cosine of the latitude?

Curviness with regards to label placement. The default text-max-angle of 45° causes very few labels to appear on smaller streams and rivers except at very high zoom levels. This is actually somewhat convenient, the straightness of a river is a proxy for its size, so we get labels on only the biggest rivers for free.

Find a reasonable text-max-angle that results in more labels without being an unreadable mess.
Another approach: Add a separate layer with aggressively simplified waterways for the purpose of labeling?

Generally speaking, make sure the labels look good embedded in a water area and against arbitrary non-water stuff.
Could have stream labels offset running next to the waterway, and river labels running along the waterway, perhaps.
Render waterway labels under bridges? Is this crazy pants or would it improve legibility.

Below are a collection of samples of water renderings in paper maps in my collection.  Some things I note as an overall analysis:

Water areas are almost universally rendered with a boundary, either blue or black.  In some cases that boundary is very subtle and in some cases more obvious.  This is a challenge to pull off nicely as @zekefarwell has discovered in some of his render sample work.
There are attractive water area labels in serif, sans-serif, all-caps, and title case, with either blue or black text.
There are no examples I was able to find of labels done with a "glow" effect -- all are simple font on a background.
There are label examples that are italic, regular, and bold.

On thing that surprised me is that there is a trend of labeling rivers along the edge of the river area.  I think that is probably not technically achievable with our technology stack, but it is interesting.
There seems to be a trend of labeling large bodies of water in all-caps and lesser bodies of water in title case, but I'm not sure there's a good data-driven way to accomplish this.
I also note (see Philadelphia example), that when the features around a river get crowded, the cartographer simply moves the label to a free spot in the river.  In the example, the words "Delaware" and "River" are, comically, dozens of miles apart.  We will never see a paper map where a river label and a road conflict, because the cartographer can simply adjust the label to a position where they don't conflict.  So either we need to figure out how to make use of MapLibre's declutter capability or else decide which labels win on the over/under and live with the overlap.
Both Rand McNally, and the more recent AAA maps, all use title-cased, italic blue font for water labels and boundaries, so my vote is to use those elements of style.  They disagree on whether water labels should be in a serif or sans-serif font.   I personally think serif looks a little nicer, but I could be convinced either way, and maybe we could throw that distinction to a slack vote to see which one comes out nicer in practice.
The width and curviness stuff is way over my head, and I'm happy to defer to those that know more about it.

In the example, the words "Delaware" and "River" are, comically, dozens of miles apart.

The generous spacing may not be purely for collision avoidance. The same effect is pervasive in USGS topographic maps: words are strategically placed so that there’s never any ambiguity as to which fork is which, but yet there’s no need to continuously label the stream and introduce more opportunities for collisions. I suspect some maps have employed a similar approach to road labeling.
For example, whether you’re following O’Bannon Creek as an orienteer or armchair mapper, you know you’ve gone down the wrong fork if you come across “Indiancamp” where you expected “Creek”. Note how the unnamed forks don’t cause the rest of the creek’s name to be labeled.

The downside to this approach is that it requires a bit more browsing to discover the full name of a stream. It may not be as good a tradeoff on an interactive map where additional labels can come in and out as the user zooms.


push not working on empty array

Taken this structure:
var tree = new Baobab({
  testUser: [ ],
});

And this cursor:
var testUserCursor = tree.select('testUser');

A push seems not working:
testUserCursor.push('something);

But when testUser is not empty like this:
var tree = new Baobab({
  testUser: [{'name': 'Test User'}],
});
testUserCursor.push('something);

leads as expected to
var tree = new Baobab({
  testUser: [{'name': 'Test User'}, 'something'],
});

Can you reproduce this?

I will test this asap.

I cannot reproduce this behaviour with baobab's latest released version:
Here is the code I used.
var Baobab = require('baobab');

var tree = new Baobab({testUser: []}),
    cursor = tree.select('testUser');

cursor.push('something');

// Committing changes so we don't bother debugging async updates
tree.commit();

// Now open your JS console
console.log(tree.get());

Ah, I actually didn't used
tree.commit();

Using it, things work well. Thanks for the hint.

However, you should only use the commit method when you want the tree's updates to resolve synchronoulsy.

Yep, makes sense.


Added velocileptors LPT bias model

This will add the velocileptors LPT bias model as an option for galaxy bias for use in calculation of cross correlations.
It will add a new requirement of the velocileptors code, which is described here:
https://github.com/sfschen/velocileptors
Merging will close #25.
This is a replacement of #53 which was merged before I made some interface changes I wanted to do.

Codecov Report

Merging #63 (5dd466e) into master (5351ca2) will decrease coverage by 3.50%.
The diff coverage is 19.23%.

:exclamation: Current head 5dd466e differs from pull request most recent head b7b53c8. Consider uploading reports for the commit b7b53c8 to get more accurate results

@@            Coverage Diff             @@
##           master      #63      +/-   ##
==========================================
- Coverage   67.34%   63.83%   -3.51%
==========================================
  Files          29       29
  Lines        1666     1792     +126
==========================================
+ Hits         1122     1144      +22
- Misses        544      648     +104

Impacted Files
Coverage Δ

soliket/bias.py
37.86% <19.23%> (-59.81%)
:arrow_down:


Plugin is deprecated, use vim-visual-multi instead

vim-visual-multi should be used instead of this plugin for the following reasons:

it is way faster
it has more features (completion support, status bar integration, creation of cursors on the fly etc)
it is being maintained

No more bugs will be fixed, no more features will be added.

@terryma @antoinemadec I use this plugin since day one. Thanks for the work.

This was a wonderful plugin - thank you so much for it @antoinemadec and @terryma ! I used it everyday as well. Take care and all the best!

I actually like your work more than the mg979/vim-visual-multi. 😢

@moskytw any reason in particular?

The selection (C-x vs. q) and mode switching (i, etc. + Esc vs. Tab) keystrokes make more sense. You work makes me feel more like vim itself.
Your highlight styles (colors) are also better than that.

Half a day of shuffling with vim-visual-multi and I came back. It just doesn't work for me, remaping my keys for some reason.


DCOS-11813: Fix edit pod interaction

⚠  #1450 needs to land first

This PR changes the service isEqual util, to only compare the service specs as everything else is status information and bound to frequent changes. Without this change we end up with unwanted updates of the service form which sometimes resulted in data loss.
Closes DCOS-11813

mesosphere-ci retest this please 🙏


[MODULE] - Spelling Correction (Generator)

Description
This module looks through the spelling errors in the text and returns the corrected text. It makes the use of nltk library and its corpora like words and brown, which when combined, contains more than a million words. This makes the execution of the module take up a few seconds.
Implementation
from collections import Counter
import nltk
from nltk.metrics.distance import jaccard_distance
from nltk.util import ngrams
from nltk.corpus import words, brown

words = words.words()
brown = brown.words()
word_list = words + brown
text = "This text contaisn some speling errors."
text_list = text.replace(',', '').replace('.','').lower().split()
text_list_original = text.replace('"', '').split()
misspelled = []
for i, _ in enumerate(text_list):
    if text_list[i] not in word_list and text_list_original[i] not in word_list:
        misspelled.append(text_list_original[i])

suggestions = []
for word in misspelled:
    temp = [(jaccard_distance(set(ngrams(word, 2)), set(ngrams(w, 2))), w) for w in word_list if w[0] == word[0]]
    suggestions.append([i[1] for i in sorted(temp, key=lambda val:val[0])[0:15]])

for i, _ in enumerate(text_list):
    for j, _ in enumerate(misspelled):
        count = Counter(suggestions[j])
        if text_list_original[i] == misspelled[j]:
            text_list_original[i] = count.most_common(1)[0][0]

text_corr = " ".join(text_list_original)

print(text_corr)

Additional context
Add any other context or screenshots about the feature request here.

The spelling correction is also currently not working. When running the module, it returns an error. Other endpoints are not affected by this, however.


Save All Keyboard shortcut

VSCode Version: 1.8.0 Insider
OS Version: Insider Build 14971
I would like to see a "Save All" shortcut button combo. I am usually editing and writing different files in the same project and I wish to edit like for example 5-6 files and then have a shortcut key combo that will Save All of the files at once. I don't know if this will be easy to implement since Ctrl-Shift-S is already "Save As". Its not a high priority, its just something that I would want as an easy way o save the whole project with my keyboard.

It's bound on OSX, the other platforms don't seem to have a good combination that we can use. You can always bind a keyboard shortcut yourself (File/Application > Preferences > Keyboard Shortcuts). Marking as duplicate of #14818


The assessment tool workflow is horizontally aligned below the column workflow

At the moment, the annotation workflow uses different layout columns and ends up being split evenly across the viewport. Instead it should be aligned with the column  annotation workflow so that:
~- [ ] the "select tool" dropdown window sits below the "pick category" table, with the same width~

[x] once a tool is selected, the "here is your tool" table sits below the dropdown, again same width
[x] The "here are the columns you said were about assessment tools" table should sit below the "column-table", same width

Unfortunately achieving all three checkboxes of this issue proved to be quite a difficult task without refactoring the category-toolgroup into two separate components.


Title Screen - Fix title

Title "The Password Saver" is cut off, need to fix label length.

Extended label length for title


Beta distribution

The beta distribution is common since it generalizes uniform, and has support 0,1, useful for normalized data.

I'm closing in favor of #467, feel free to comment there, or add any other useful distributions you can think of which are currently missing!


Please add AZ Delivery NodeMCU ESP32

The Link would be https://cdn.shopify.com/s/files/1/1509/1638/files/ESP_-_32_NodeMCU_Developmentboard_Datenblatt_AZ-Delivery_Vertriebs_GmbH_10f68f6c-a9bb-49c6-a825-07979441739f.pdf?v=1598356497
or the doc with pin line out https://cdn.shopify.com/s/files/1/1509/1638/files/ESP-32_NodeMCU_Developmentboard_Pinout.pdf?v=1609851295
Thanks for the great work!

The board is now available.

Excellent! Thanks again


Update autocomplete sorting

Autocomplete now has the ability to sort matches by the alphabet as well as the default by length. The way this is done is by adding another value to your autocomplete called sortby. If sortby: "alpha" then it sorts the matches by the alphabet. Not sure if this works 100%; modification is probably needed.

In 0.4, we've resolved this issue by allowing the user to specify the sort on options the same way they do for other UI elements. Whatever value is on the 'sort' attribute of the options will be used to determine their order at render time.


-bash: ihaskell: command not found

I am slightly confused by the installation guidelines.
Using Mac OS X, I cloned the git repo and installed from there with cabal. It appears that everything has been installed.
Installed ihaskell-widgets-<IP_ADDRESS>
Reminder: run 'ihaskell install' to install the IHaskell kernel to Jupyter.

$ ihaskell notebook

This returns
-bash: ihaskell: command not found

How can I remedy this?
Also, I believe there's a spelling error with "With MacPorts installed, run ports install zmq". This should be sudo port install zmq.

This means that the ihaskell binary is not in your $PATH. If you installed IHaskell in a sandbox, then it will be found in .cabal-sandbox/bin, if you installed normally, then it will be found in ~/.cabal/bin I think.

Thanks.
ihaskell is in ~/.cabal/bin. I edited  ~/.bash_profile to contain the following:
export PATH=~/.cabal/bin:$PATH

I still run into -bash: ihaskell: command not found. How can I set the path correctly?

Try using $HOME instead of ~, putting this in your .bash_profile:
export PATH=$HOME/.cabal/bin:$PATH

Thank you, this works.
The kernel runs without many issues using sudo ipython notebook in the command line. However, the kernel immediately shutdowns and doesn't restart using ipython notebook, apparently due to lack of permissions. Is there a quick fix to this? Perhaps this deserves a separate issue:
[I 08:30:11.254 NotebookApp] Kernel started: 70bc3f3b-4783-4ac6-9008-6ead9ac2f45f
[W 08:30:12.017 NotebookApp] 404 GET /static/components/codemirror/mode/ihaskell/ihaskell.js?v=20160118083002 (::1) 192.58ms referer=http://localhost:8888/notebooks/Untitled86.ipynb?kernel_name=haskell
ihaskell: /Users/USERNAME/.ihaskell/.kernel-profile: openFile: permission denied (Permission denied)
[I 08:30:14.257 NotebookApp] KernelRestarter: restarting kernel (1/5)
ihaskell: /Users/USERNAME/.ihaskell/.kernel-profile: openFile: permission denied (Permission denied)
[I 08:30:17.266 NotebookApp] KernelRestarter: restarting kernel (2/5)
ihaskell: /Users/USERNAME/.ihaskell/.kernel-profile: openFile: permission denied (Permission denied)
[I 08:30:20.276 NotebookApp] KernelRestarter: restarting kernel (3/5)
ihaskell: /Users/USERNAME.ihaskell/.kernel-profile: openFile: permission denied (Permission denied)
[W 08:30:21.390 NotebookApp] Timeout waiting for kernel_info reply from 70bc3f3b-4783-4ac6-9008-6ead9ac2f45f
[I 08:30:23.285 NotebookApp] KernelRestarter: restarting kernel (4/5)
WARNING:root:kernel 70bc3f3b-4783-4ac6-9008-6ead9ac2f45f restarted
ihaskell: /Users/USERNAME/.ihaskell/.kernel-profile: openFile: permission denied (Permission denied)
[W 08:30:26.295 NotebookApp] KernelRestarter: restart failed
[W 08:30:26.296 NotebookApp] Kernel 70bc3f3b-4783-4ac6-9008-6ead9ac2f45f died, removing from map.
ERROR:root:kernel 70bc3f3b-4783-4ac6-9008-6ead9ac2f45f restarted failed!
[W 08:30:26.313 NotebookApp] Kernel deleted before session
[W 08:30:26.314 NotebookApp] 410 DELETE /api/sessions/d4e8c5b7-bf37-4576-a835-192b15e6327d (::1) 2.01ms referer=http://localhost:8888/notebooks/Untitled86.ipynb?kernel_name=haskell

Issue resolved.
One must use sudo chown USERNAME for each "permission denied" subdirectory
sudo chown USERNAME /Users/USERNAME/.ihaskell/
sudo chown USERNAME /Users/USERNAME/.ihaskell/.kernel-profile
sudo chown USERNAME /Users/USERNAME/.ihaskell/.last-req-header
Feel free to close Issue. Thank you

Two points to consider:

All directories in your $HOME should be owned by you, so there should not be any reason to have to explicitly chown them.
You can use -R with chown, which makes it recursive.

It seems like you installed IHaskell as the root user, using sudo maybe?.

"It seems like you installed IHaskell as the root user, using sudo maybe?"
I suspect you're correct. Yes, the recursive flag should be used here.


Fix Issue 412

This is a fix for issue 412 that uses roughly the same logic as the list view "connecting routes" feature for the annotation views.

neat, thanks! :+1:


error - TS2345

After doing all above procedure till running code tsc
After this i have got this error.
Any way to solve it?

Fixed in #93


Log tune-ups to investigate relational links fetch

I detected the crawler with config, mentioned at #181 (the same site) seems not fetching relational urls like /en/press/news/studies/news_2011-03-29.html/
It is possible there are filters rejecting the url, but it doesn't appear at the log, even when I set REJECTED_REDIRECTED to DEBUG.
Which parameters I should set at log4j.properties to detect why relational urls aren't fetched? And how I may detect are they processing at all?

This is likely the same issue as #188.  Please refer to it for a temporary solution that works.
Please confirm it is the same issue before we close this one.

Seems it doesn't working for that case: I don't see neither urls, normalized from relative, nor messages about redirects to others in logs.

Can you please attach your config? Setting all loggers to DEBUG in the log4j.properties file will be overkill but you will for sure get all the information it is possible to get.

It is the same as for #181. I added tika url extractor to test, but doesn't plays neither for it, nor generic extractor.
Tested with the latest 2.4.0 snapshot

I just tested with your same confirm from 181, and I have relative URLs extracted properly.
For instance, the collector.referenced-urls metadata field contains several URLs matching the pattern you mention (that are relative in the page).  Like:

https://www.allianz.com/en/press/extra_new/125-years-of-allianz.html/
https://www.allianz.com/en/press/news/company/
https://www.allianz.com/en/press/press_service/calendar_events.html/

I can also see from the log that they are extracted just fine.  Like this one:
INFO  [CrawlerEventManager]            URLS_EXTRACTED: https://www.allianz.com/en/press/news/company/appointments/140927_quotes_on_daniel_ivascyn_pimco.html/

When looking at your main page source, I cannot find /en/press/news/studies/news_2011-03-29.html/ in it.  Can you specify which page/URL has that link in it?
If your concern is with the URL ending with a forward slash, know that it is like that in the page it self and that's not "invalid" for a URL.  You can always strip the trailing slash via URL normalization.

The source of page www.allianz.com/en/press/news/?oneweb:filter:date=2009to2014&page=1 contains set of relative urls looking like "/en/press/news/company/point_of_view/news_2013-06-25.html/", etc. at div."container container-listing"
I believe they should appear in the log, even if rejected by a filter.

With your config files from #181, this URL is extracted and processed as it should: /en/press/news/company/point_of_view/news_2013-06-25.html/.
If your concern is only to show in the logs all URLs that get rejected by filters, make sure you set the log level to INFO in the classes/log4j.properties file for the following:
log4j.logger.CrawlerEvent.REJECTED_FILTER=INFO

Using DEBUG sometimes prints more info (like the exact filter rules having caused the filtering):
log4j.logger.CrawlerEvent.REJECTED_FILTER=DEBUG

It will then look something like this (dummy filter I created just to show you, with INFO):
INFO  [CrawlerEventManager]           REJECTED_FILTER: https://www.allianz.com/en/press/news/financials/business_results/news_2013-05-15.html/
INFO  [CrawlerEventManager]           REJECTED_FILTER: https://www.allianz.com/en/products_solutions/
INFO  [CrawlerEventManager]           REJECTED_FILTER: https://www.allianz.com/en/press/extra_new/discovery.html/
INFO  [CrawlerEventManager]           REJECTED_FILTER: https://www.allianz.com/v_1370417655000/media/press/photo/archive/sonnenblumen_teaser.jpg
INFO  [CrawlerEventManager]           REJECTED_FILTER: https://www.allianz.com/en/press/news/financials/stakes_investments/news_2013-06-05.html/
INFO  [CrawlerEventManager]           REJECTED_FILTER: https://www.allianz.com/v_1362039300000/media/press/photo/archive/riess_291x187.jpg

Does it answer your question?

I used REJECTED_FILTER=INFO and REJECTED_FILTER=DEBUG,  but urls looking like /en/press/news/company/point_of_view/news_2013-06-25.html/ never appear in my logs, even in REJECTED list.
Let's  close the issue, thank you for your attention.

I am closing, but it's not clear if you made it work for your or not.  It is showing in the logs for me but if you feel there is something wrong, feel free to re-open.


[multi-monitor] moveMouse wont move to negative position on mac

Hey... I use getMousePos to get the mouse position, and it returns negative values sometimes (multiple monitors above my laptop monitor).
I then try and use robot.moveMouse(800, -954) for example, and it only moves to 800, 0.

@bradparks The negative mouse coordinates happen in a multi monitor setup. Basically anything left of your primary display may have negative coordinates.
As for the failing moveMouse did you try anything less than -954 ? If you had got (500 , -300) then you can go negative only on the y axis. Also you can only go till the screen max.
If you could provide more details on what you got from moveMousePos , what your arguments for moveMouse and the screen sizes , you can get a better answer.

The issue is that the code doesn't have explicit multi-monitor support, so anything that works is kind of on accident. I don't think this is an issue on Windows, but for Mac I'll need to look into it.

I think this should be made uniform across all platforms. As you said it is still a hack in Windows. Should probably get the monitor sizes before making the mouse move or throw some kind of error. That would be better.

I agree. I guess we"ll need to start with adding c functions to get the number of monitors and their sizes.

Would be nice to have this!
Wish I could help.

any update of this?

I messed around with the code enough to get getPixelColor() working on Windows 10 with 2 monitors. However, in the process of doing so, I've discovered that getting multi-monitor support for every feature would be a massive undertaking. Just about everything in the src folder makes the assumption that the user only needs to operate within their primary display.

+1

At the end I worked around this issue like this, after having done brew install cliclick (link)
const { exec } = require('child_process')
exec('cliclick c:.')

This helps ->Does not support multiple monitors #26
I install the robotjs with npm install git+https://git@github.com:Toinane/robotjs.git --save- dev and rebuild for electron. Find it support multi-screen now.
Thanks, @romanrandom.

The real work was from @jdan as you can see here : https://github.com/Toinane/robotjs/commits?author=jdan from his fork https://github.com/jdan/robotjs

@Toinane thanks you for clarifying. Also like your color picker, it inspires me to build something for the designer.
@jdan, thanks!

Hi all, i truly love this library. I'm a little late to the conversation, but I ran into mouse movement issue for multiple external displays as well. I need to support it on multiple operating systems. Are we saying this is a limitation that needs to be accepted with RobotJS?

Hi all, i truly love this library. I'm a little late to the conversation, but I ran into mouse movement issue for multiple external displays as well. I need to support it on multiple operating systems. Are we saying this is a limitation that needs to be accepted with RobotJS?

@teaxio Did you find any workarounds for the multi-monitor issue?

@jkeat Did you happen to find any workarounds for the multi-monitor issue?

@jkeat no my friend, I am suck at this point :( I was hoping that the creators/maintainers of RobotJS can add this ability :(

I have this issue every time I use this library and it's very limiting


Add SimpleMerkleTree docs

Adding docs for the SimpleMerkleTree introduced in #36

Addressed the comments. Thanks @Amxx!


WIP Adding logic to hide form data until user confirms bank creation needs

Resolves #2760
Description
First time trying to submit a PR!
Looking at the issue description I think I've covered the requirements HOWEVER I'm pretty sure I'm not following best practices in styling. I also am not sure where to put a test to ensure things are working as expected. spec/system specs seem to be failing out of the box before I make any changes on my local.
Type of change

New feature (non-breaking change which adds functionality)

How Has This Been Tested?
I have tested this works in development.
can be reviewed at /account_requests/new

Screenshots

Hey @sw4d you are awesome! We're so happy you decided to submit your first (of many) PRs :)
I'm not sure why your tests are failing locally but it looks like the test (from CI) that needs to be updated is the following:
1) Account request flow when not in staging should allow prospective users to request an account via a form. And that request form data gets used to create an organization
[575](https://github.com/rubyforgood/human-essentials/runs/5257130725?check_suite_focus=true#step:8:575)
     Failure/Error: fill_in 'Name', with: account_request_attrs[:name]
[576](https://github.com/rubyforgood/human-essentials/runs/5257130725?check_suite_focus=true#step:8:576)

[577](https://github.com/rubyforgood/human-essentials/runs/5257130725?check_suite_focus=true#step:8:577)
     Capybara::ElementNotFound:
[578](https://github.com/rubyforgood/human-essentials/runs/5257130725?check_suite_focus=true#step:8:578)
       Unable to find visible field "Name" that is not disabled
[579](https://github.com/rubyforgood/human-essentials/runs/5257130725?check_suite_focus=true#step:8:579)

[580](https://github.com/rubyforgood/human-essentials/runs/5257130725?check_suite_focus=true#step:8:580)
     [Screenshot Image]: /home/runner/work/human-essentials/human-essentials/tmp/screenshots/failures_r_spec_example_groups_account_request_flow_when_not_in_staging_should_allow_prospective_users_to_request_an_account_via_a_form__and_that_request_form_data_gets_used_to_create_an_organization_4.png
[581](https://github.com/rubyforgood/human-essentials/runs/5257130725?check_suite_focus=true#step:8:581)

[582](https://github.com/rubyforgood/human-essentials/runs/5257130725?check_suite_focus=true#step:8:582)

[583](https://github.com/rubyforgood/human-essentials/runs/5257130725?check_suite_focus=true#step:8:583)
     # ./spec/system/account_request_system_spec.rb:24:in `block (3 levels) in <top (required)>'
[584](https://github.com/rubyforgood/human-essentials/runs/5257130725?check_suite_focus=true#step:8:584)
     # ./spec/spec_helper.rb:97:in `block (2 levels) in <top (required)>'

Sorry for the cut and paste :) Basically it looks like it can't find the field to enter (because it can't see it due to the toggle you put in.)

Thanks @seanmarcia. That helps put me in the right direction.

I did some retooling locally to get specs running as expected. I added a change to get the spec/system/account_request_system_spec.rb spec passing.
I think this PR is ready for review. The UI change is very jQuery heavy. Happy to approach a different way if suggested.

Looks great, going to merge.
If the amount of jQuery is worrying you could go with the pure javascript route -- this would probably get the same result with something like:
          document.querySelector('.account_type').change(function() {
               if (this.value === 'bank') {
                   document.querySelector('#create_bank').show()
                   document.querySelector('#partner_info').hide()
               } else {
                   document.querySelector('#create_bank').hide()
                   document.querySelector('#partner_info').show()
               }
           })

           document.querySelector(document).ready(function() {
               document.querySelector('#create_bank').hide()
               document.querySelector('#partner_info').hide()
           })

That said, jquery isn't going anywhere in the app and it is very readable :)


flaky test AsyncSchedulerSuite

monix.execution.internal.AsyncSchedulerSuite is failing frequently these days without any specific reason.

AsyncSchedulerSuite, the version for Scala.js / JavaScript, has a test for ... "scheduleWithFixedRate should compensate for scheduling inaccuracy".
This fails because on top of under-powered machines, like those on Travis, big delas that are more than 30 millis can happen, as used in the test.
In #1221 I disabled it on top of CI / Travis.


Custom keybindings only activate after opening settings

Expected Behavior:
Custom keybindings applied and saved in a previous session should work at the start of a new session.

Observed Behavior:
Some custom keybindings only work after opening the settings tab in a new session.

Steps to Repeat:

Install on Ubuntu 20.04 via direct download
Move to Home directory
Hamburger Menu > Settings > Keybindings > Terminal > Reset VT
Replace keybinding with Alt+K
Restart Extraterm
echo hello
Press Alt+K
Observe nothing, open settings menu
Switch to previous tab
Press Alt+K
Observe the terminal reset as expected (keybinding worked)

Thanks for all your work on the project, I know maintaining something like this can be overwhelming. Hang in there.

Thanks for the encouragement, and the detailed report.
I've seen a few times where keybindings don't work when they should and I haven't been able to reproduce the problem on demand. I hope your steps do the trick.

I can reproduce the problem here. :ok_hand:

Fixed in the 0.71.0 release.


Implement halo regions.

Even for single-core and single-GPU simulations. This might actually speed things up as we won't have to use incmod1 and decmod1 everywhere #57.

Check out how OceanTurb.jl does boundary conditions:
# Forward Euler timestepping
function iterate!(model::AbstractModel{TS}, Δt) where TS <: ForwardEulerTimestepper

  for j in eachindex(model.solution)
    c, ∂c∂t, rhs, bcs = unpack(model, j)

    # Interior step
    for i in interior(c)
      @inbounds rhs.data[i] = ∂c∂t(model, i)
    end

    # Boundary conditions
    rhs.data[end] = ∂c∂t(model, bcs.top)
    rhs.data[1]   = ∂c∂t(model, bcs.bottom)
  end

  # Update solution
  for j in eachindex(model.solution)
    c, ∂c∂t, rhs, bcs = unpack(model, j)
    @. c.data += Δt*rhs.data
  end

  return nothing
end

The application of boundary conditions can be made even cleaner by using a function `apply boundary conditions'.
Boundary conditions are then implemented by defining a RHS (in OceanTurb as ∂c∂t) for each type of boundary condition. For example, for boundary conditions in diffusion.jl are implemented via
∇κ∇c_top(κ, c, flux)    = (     -flux      - κ∂z(κ, c, length(c)) ) / dzf(c, length(c))
∇κ∇c_bottom(κ, c, flux) = (  κ∂z(κ, c, 2)  +        flux          ) /    dzf(c, 1)

# Top and bottom flux estimates for constant (Dirichlet) boundary conditions
bottom_flux(κ, c, c_bndry, dzf) = -2*bottom(κ)*( bottom(c) - c_bndry ) / bottom(dzf) # -κ*∂c/∂z at the bottom
top_flux(κ, c, c_bndry, dzf)    = -2*  top(κ) *(  c_bndry  -  top(c) ) /   top(dzf)  # -κ*∂c/∂z at the top

# Flux Boundary conditions
∂c∂t(model, bc::FluxBC{Top})    = ∇κ∇c_top(   model.parameters.κ, model.solution.c, bc.flux(model))
∂c∂t(model, bc::FluxBC{Bottom}) = ∇κ∇c_bottom(model.parameters.κ, model.solution.c, bc.flux(model))

# Constant Boundary conditions
function ∂c∂t(model, bc::ValueBC{Bottom})
  flux = bottom_flux(model.parameters.κ, model.solution.c, bc.value(model), model.grid.dzf)
  return ∇κ∇c_bottom(model.parameters.κ, model.solution.c, flux)
end

function ∂c∂t(model, bc::ValueBC{Top})
  flux = top_flux(model.parameters.κ, model.solution.c, bc.value(model), model.grid.dzf)
  return ∇κ∇c_top(model.parameters.κ, model.solution.c, flux)
end

Other packages to be inspired by:

https://github.com/JuliaArrays/OffsetArrays.jl
https://github.com/JuliaArrays/TiledIteration.jl

Thanks for the suggestions!
@glwagner Lots of nice ideas and cool syntax! Really like the way the boundary conditions are implemented, I'll see if I can translate it to the halo regions. Interested in some of the design choices you made, hope you don't mind if I ask you about them in person.
To me resolving this issue feels like implementing ghost cells for boundary conditions. I mean this is exactly what's happening for the periodic boundary conditions but it sounds like these halo regions are strictly for implementing periodic boundary conditions (without incmod1 and decmod1) and distributed parallelization? But might be good to make sure this won't blow up in our faces when we get to implementing bathymetry and continental/land boundaries. @jm-c @christophernhill (See #92 for decision not to use ghost cells.)
@vchuravy OffsetArrays.jl would be perfect for halo regions! Do you think this stuff would work for the GPU? I assume if e.g. isbitstype(OffsetArray{Float64}) == true then it can be used in a GPU kernel right out of the box? It's actually false but I might be checking/using it incorrectly. We might need to create our own OffsetCuArray maybe?
# 1D grid with 10 cells (and 1 ghost cell on each end of the domain).
julia> y = OffsetArray{Float64}(undef, 0:11)
OffsetArray(::Array{Float64,1}, 0:11) with eltype Float64 with indices 0:11:
 0.0
 0.0
 5.0e-324
 0.0
 0.0
 0.0
 0.0
 0.0
 0.0
 0.0
 0.0
 0.0

julia> typeof(y)
OffsetArray{Float64,1,Array{Float64,1}}

julia> isbitstype(typeof(y))
false

I think it's important to implement #67 ASAP before we start changing data structures and abstractions so we know exactly when we've introduced a performance bottleneck.

then it can be used in a GPU kernel right out of the box?

Yes :) but you are missing the fact that Array{Float64, 1} is not isbitstype.  I think to make it work out of the box you need
Adapt.adapt_structure(to, x::OffsetArray) = OffsetArray(adapt(to, parent(x)), x.offsets)
Base.Broadcast.BroadcastStyle(::Type{<:OffsetArray{<:Any, <:Any, AA}}) where AA = Base.Broadcast.BroadcastStyle(AA)

https://github.com/JuliaLabs/ShallowWaterBench/blob/aa8b4add55172f0c1920d6f8cebc8eccc424f2b5/src/GPUMeshing/src/GPUMeshing.jl#L79-L80
I should probably finish https://github.com/JuliaArrays/OffsetArrays.jl/pull/57

Ah right, when broadcasting you wouldn't want the operations to act on the ghost cells or halo regions (well that's probably fine as long as they're overwritten before being used). So just use an @views maybe. Either way, don't think we use any broadcasts over CuArrayss but should probably play around in a GPU sandbox a bit before implementing anything.

Yeah, you still need the first line.

@ali-ramadhan why not broadcast over CuArrays? Is there a Performance hit?

Working on implementing halo regions with OffsetArrays.jl right now. Got a minimal working example running with GPUifyLoops so it should be a pretty straightforward upgrade from here. The performance benchmarks will be interesting. Will open a PR soon.
Some notes for myself:

The binary and NetCDF output writers will have to be modified to avoid writing out the halo regions.
We'll just need a kernel that fills in the halo regions at the end of each time step.
The "halo size" will be part of the Grid and we'll probably have to make sure that the model runs with a large enough halo, e.g. halo of size 1 is enough for second-order advection schemes, but you need a halo of size 2 for fourth-order advection schemes.
This should also make https://github.com/climate-machine/Oceananigans.jl/issues/57 redundant.

Superseded by #250 and #253.


External IP used for local IP during an active OpenVPN connection

Distro: Arch Linux (linux-zen kernel)
When I run neofetch with the option info "Local IP" localip during an active OpenVPN connection, my external IP provided by the VPN service is printed instead of my local IP. The issue does not remain if I disable the OpenVPN .service, but reappears if I enable it again.

Thanks for reporting this bug, I'm looking into other ways of getting the local IP so that this doesn't happen. I can't reproduce this myself so once I've come up with a fix I'd like you to test it out for me. :)

Does hostname -i print the correct local IP?

$ hostname -i
<IP_ADDRESS> <IP_ADDRESS>

The output is the same even without the OpenVPN connection. I can, however, get the right IP with ip addr show enp0s31f6

Alright, it looks like we'll have to first find the current interface in use and then use a command like above to get the localip. I'll work on this when I get home tonight.

Does this print the correct local IP? I did some reading and this should work through VPN connections.
ip route get <IP_ADDRESS> | awk '{print $NF; exit}'

It does not print the correct IP, no.

Is the correct IP listed in the output of this command?
ip addr | awk '/inet / {sub(/\/.*/, "", $2); print $2}'

It is, yes:
$ ip addr | awk '/inet / {sub(/\/.*/, "", $2); print $2}'
<IP_ADDRESS>
<IP_ADDRESS>
[redacted; public IP]

How about this command?
ip -4 -o addr show dev $(ip route get 1 | awk '/dev/ {printf $5}') | awk '{split($4,a,"/");print a[1]}'

Sorry to make you keep testing commands, I don't have a vpn or openvpn setup.

No worries.
That commands prints my external IP leased from the OpenVPN connection.

Here's what we need to do:

Get the current network interface used for network connections.
Get the local IP from said interface.

This is what ip route get 1 | awk '{print $NF; exit}' is supposed to do and it works extremely well except for when used with OpenVPN.

Can you show me the output of ip link on your system with OpenVPN running?
Can you show me the output of ip link on your system without OpenVPN running?

With OpenVPN running:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 30:5a:3a:5a:1c:f1 brd ff:ff:ff:ff:ff:ff
3: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 100
    link/none

Without OpenVPN running:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 30:5a:3a:5a:1c:f1 brd ff:ff:ff:ff:ff:ff

Thanks, what about ifconfig -a with OpenVPN enabled/disabled?

With OpenVPN running:
$ ifconfig -a
enp0s31f6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet <IP_ADDRESS>  netmask <IP_ADDRESS>  broadcast <IP_ADDRESS>
        inet6 fe80::9fc:d6fd:ac7b:465c  prefixlen 64  scopeid 0x20<link>
        ether 30:5a:3a:5a:1c:f1  txqueuelen 1000  (Ethernet)
        RX packets 144738  bytes 183826186 (175.3 MiB)
        RX errors 0  dropped 133  overruns 0  frame 0
        TX packets 94611  bytes 25427707 (24.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 16  memory 0xdff00000-dff20000

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet <IP_ADDRESS>  netmask <IP_ADDRESS>
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 2625  bytes 1156992 (1.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2625  bytes 1156992 (1.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500
        inet [REDACTED; public IPv4]  netmask <IP_ADDRESS>  destination <IP_ADDRESS>
        inet6 [REDACTED; public IPv6]  prefixlen 64  scopeid 0x0<global>
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 100  (UNSPEC)
        RX packets 125402  bytes 153162642 (146.0 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 73504  bytes 10022414 (9.5 MiB)
        TX errors 0  dropped 2747 overruns 0  carrier 0  collisions 0

Without OpenVPN running:
$ ifconfig -a
enp0s31f6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet <IP_ADDRESS>  netmask <IP_ADDRESS>  broadcast <IP_ADDRESS>
        inet6 fe80::9fc:d6fd:ac7b:465c  prefixlen 64  scopeid 0x20<link>
        ether 30:5a:3a:5a:1c:f1  txqueuelen 1000  (Ethernet)
        RX packets 145070  bytes 183893584 (175.3 MiB)
        RX errors 0  dropped 138  overruns 0  frame 0
        TX packets 94982  bytes 25634268 (24.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 16  memory 0xdff00000-dff20000

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet <IP_ADDRESS>  netmask <IP_ADDRESS>
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 2703  bytes 1202354 (1.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2703  bytes 1202354 (1.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

I haven't been able to find a way to fix this sadly, does anyone have any ideas?

I've just set up an OpenVPN server with DigitalOcean, and unless I'm reading this issue wrong, I cannot replicate this issue with Arch Linux (I switched today on my main PC). Local IP shows the address <IP_ADDRESS> (the one given out by the VPN), Public IP gives the public IP address of the DigitalOcean server.
ip addr gives the <IP_ADDRESS>, my two local IPs, and the VPN IP (<IP_ADDRESS>) as expected with no mention of the server's public IP address

Ah. I'm sorry for the confusion.
I too get the IP given out by the VPN if I'm connected through it. I thought it would output the regular 192.168.X.X instead, but perhaps my issue is the expected behaviour?

I think your output is the expected behavior, thanks for testing this out @iandrewt.
I think we should close this now.


cigien: Watch meeradatascience.wordpress.com

cigien requests the watch of the watch_keyword meeradatascience\.wordpress\.com. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

meeradatascience\.wordpress\.com has been seen in 1 true positive, 0 false positives, and 0 NAAs.

meeradatascience\.wordpress\.com has been seen in 1 true positive, 0 false positives, and 0 NAAs.

Approved by Spevacus in Charcoal HQ

Approved by Spevacus in Charcoal HQ


Blank Assertion Error when running ICA

Not sure if the output from running the above came out fully in the above so am pasting it again below:

copying last part of output since for some reason that is not showing up:

what version of mne are you using?
mne.sys_info()
gives what?
can you share the file?

Thanks for your response. I believe it is version .21: This is the output
from what you suggested:
Platform: Linux-4.19.104+-x86_64-with-Ubuntu-18.04-bionic Python: 3.6.9
(default, Apr 18 2020, 01:56:04) [GCC 8.4.0] Executable: /usr/bin/python3
CPU: x86_64: 2 cores Memory: 12.7 GB mne: 0.21.dev0 numpy: 1.18.4
{blas=openblas, lapack=openblas} scipy: 1.4.1 matplotlib: 3.2.1
{backend=module://ipykernel.pylab.backend_inline} sklearn: 0.22.2.post1
numba: 0.48.0 nibabel: 3.0.2 cupy: Not found pandas: 1.0.4 dipy: Not found
mayavi: Not found pyvista: Not found vtk: Not found
On Fri, Jun 5, 2020 at 4:28 PM Alexandre Gramfort<EMAIL_ADDRESS>wrote:

what version of mne are you using?
mne.sys_info()
gives what?
can you share the file?

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/mne-tools/mne-python/issues/7868#issuecomment-639789448,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOPSSYJQAT62DEM67RSYNI3RVFIPTANCNFSM4NVDVN5A
.

--
Bar Lehmann, LICSW, LCSW, BCN
Pronouns (he, him)
Better State of Mind
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.better-2Dstate-2Dof-2Dmind.com_&d=DwMFaQ&c=U0G0XJAMhEk_X0GAGzCL7Q&r=Cj9RPhU2oMWLltcCQOdyiRyEy1SYAQSCFx-DVb42LRg&m=7ee_WmUyiOPjHobDC0vMixQZZFyB0J_OXL0Iat3v7j4&s=QlhKoajey2QgZZovEHi_mTU9JFQ8pz4mKclopcug2fs&e=
Find Us On Psychology Today
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.psychologytoday.com_us_therapists_better-2Dstate-2Dof-2Dmind-2Dwashington-2Ddc_492202-3Fp-3D1&d=DwMFaQ&c=U0G0XJAMhEk_X0GAGzCL7Q&r=Cj9RPhU2oMWLltcCQOdyiRyEy1SYAQSCFx-DVb42LRg&m=7ee_WmUyiOPjHobDC0vMixQZZFyB0J_OXL0Iat3v7j4&s=REG0Ftd30CRbaVXB_m3pzAIqebNFFfiY-_IsjUkpHqc&e=
(833) 944-0692

you are using a dev version on 0.21
please upgrade to latest stable version or current master version

Thank you for the suggestion - It is now at version mne: 0.20.5, but the
same issue continues to arise.
On Fri, Jun 5, 2020 at 4:40 PM Alexandre Gramfort<EMAIL_ADDRESS>wrote:

you are using a dev version on 0.21
please upgrade to latest stable version or current master version
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/mne-tools/mne-python/issues/7868#issuecomment-639803485,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOPSSYNCA3VJBY42IZIPLK3RVFJ3RANCNFSM4NVDVN5A
.

--
Bar Lehmann, LICSW, LCSW, BCN
Pronouns (he, him)
Better State of Mind
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.better-2Dstate-2Dof-2Dmind.com_&d=DwMFaQ&c=U0G0XJAMhEk_X0GAGzCL7Q&r=Cj9RPhU2oMWLltcCQOdyiRyEy1SYAQSCFx-DVb42LRg&m=7ee_WmUyiOPjHobDC0vMixQZZFyB0J_OXL0Iat3v7j4&s=QlhKoajey2QgZZovEHi_mTU9JFQ8pz4mKclopcug2fs&e=
Find Us On Psychology Today
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.psychologytoday.com_us_therapists_better-2Dstate-2Dof-2Dmind-2Dwashington-2Ddc_492202-3Fp-3D1&d=DwMFaQ&c=U0G0XJAMhEk_X0GAGzCL7Q&r=Cj9RPhU2oMWLltcCQOdyiRyEy1SYAQSCFx-DVb42LRg&m=7ee_WmUyiOPjHobDC0vMixQZZFyB0J_OXL0Iat3v7j4&s=REG0Ftd30CRbaVXB_m3pzAIqebNFFfiY-_IsjUkpHqc&e=
(833) 944-0692

then I need to get the script and the data to replicate
dropbox or google drive or whatever works

Thank you Alexandre,
the link to the google colabs ipynb file I am sharing with you is:
https://colab.research.google.com/drive/1e8FB-KdJpFybloglXvWAaaMXsQai9meD?usp=sharing
The piece of code is the 2nd to last piece of code from the bottom with the
text (ICA) right above this section of code. The other sections needed to
be run before this are the frist two bits of code from the top of this code
sheet for installing MNE, and perhaps connecting drive.
The .edf file is being shared at:
https://drive.google.com/open?id=1l75b4f2msaCy6i-hDl-Q9Ogh6ZIa0vDZ
Let me know if you have any further questions, and I'll look forward to
hearing from you,
Bar
On Sat, Jun 6, 2020 at 6:52 AM Alexandre Gramfort<EMAIL_ADDRESS>wrote:

then I need to get the script and the data to replicate
dropbox or google drive or whatever works

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/mne-tools/mne-python/issues/7868#issuecomment-640038103,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOPSSYMRSUFDSJCWFJKVIWDRVINWBANCNFSM4NVDVN5A
.

--
Bar Lehmann, LICSW, LCSW, BCN
Pronouns (he, him)
Better State of Mind
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.better-2Dstate-2Dof-2Dmind.com_&d=DwMFaQ&c=U0G0XJAMhEk_X0GAGzCL7Q&r=Cj9RPhU2oMWLltcCQOdyiRyEy1SYAQSCFx-DVb42LRg&m=7ee_WmUyiOPjHobDC0vMixQZZFyB0J_OXL0Iat3v7j4&s=QlhKoajey2QgZZovEHi_mTU9JFQ8pz4mKclopcug2fs&e=
Find Us On Psychology Today
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.psychologytoday.com_us_therapists_better-2Dstate-2Dof-2Dmind-2Dwashington-2Ddc_492202-3Fp-3D1&d=DwMFaQ&c=U0G0XJAMhEk_X0GAGzCL7Q&r=Cj9RPhU2oMWLltcCQOdyiRyEy1SYAQSCFx-DVb42LRg&m=7ee_WmUyiOPjHobDC0vMixQZZFyB0J_OXL0Iat3v7j4&s=REG0Ftd30CRbaVXB_m3pzAIqebNFFfiY-_IsjUkpHqc&e=
(833) 944-0692

you are setting n_components = 25 while you only have 19
channels. n_components cannot exceed 19.
feel free to close if it solves the problem

That fixed it, thank you very much for your swift and on-point assistance!

Reopening as I think we should catch and raise an informative error

PR welcome


Change "Android" to "Apple"

The FAQ mentions Matched Key Count (Android), when Matched Key Count is a term used by iOS.
I would have chosen the word "iOS", but "Apple" is already used in a similar case immediately above for Provided Key Count.
Closes #304

Thanks a lot for spotting that!


WIP - Initial pass to add namespaces to DeployCache

So that different deployers can have different deploy lists or a single deployer can have multiple deploy lists (production, staging, dry-run, etc).
I was running into a need for this in my development of the GitHub add-on (wanting a dry-run feature) so I went ahead and coded up a sample implementation. At the very least this gives us a possible implementation that we can kick around and discuss.

I recognize that this causes issues with the Deploy Cache display in the wp-admin pages - would we have separate lines for each namespace?

Looks good. Doesn't block trying the individual Add-ons view I want to look at next.
DeployCache display - maybe just some links at top of page and extra param for WP-CLI commands that deal with it?


Bundling a worker in library mode results in 404 when using the library

Describe the bug
I'm working on an npm package that makes use of a web worker. The worker makes heavy use of imports, dynamic imports and wasms. Using the library results in a 404 when the worker gets instantiated because it can't be fetched at the absolute path /assets/worker-{hash}.js. So far the only option to make everything work is to inline the worker as so:
import MyWorker from './worker/worker_entrypoint?worker&inline'
But this unfortunately generates a huge bundle file (tens of MBs given that also the wasms are inlined) and essentially disables code splitting.
I've tried importing the worker differently such as:

Importing as ?worker: in the final bundle the worker ends up in /assets/worker-{hash}.js resulting in 404 when a user uses the library
Importing as ?worker&url: Same as before, using new URL(worker_as_url, import.meta.url) makes no difference
Importing as ?url: worker file gets simply encoded as base64 with wrong mime type and dependencies are not resolved
Instantiate the worker with new Worker(new URL('./worker_entrypoint', import.meta.url), { type: 'module' }): Similar problem as the first point but this time it ends up in /public/assets/worker-hash.js

Reproduction
https://stackblitz.com/edit/vitejs-vite-gkc1rq?file=lib%2Fmain.ts
Steps to reproduce
No response
System Info
System:
    OS: macOS 14.2.1
    CPU: (10) arm64 Apple M2 Pro
    Memory: 1.07 GB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.18.2 - ~/.nvm/versions/node/v18.18.2/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v18.18.2/bin/yarn
    npm: 9.8.1 - ~/.nvm/versions/node/v18.18.2/bin/npm
    pnpm: 8.9.2 - ~/.nvm/versions/node/v18.18.2/bin/pnpm
  Browsers:
    Chrome: 120.0.6099.216
    Edge: 120.0.2210.133
    Safari: 17.2.1
  npmPackages:
    @vitejs/plugin-basic-ssl: ^1.0.1 => 1.0.2
    vite: ^5.0.9 => 5.0.11

Used Package Manager
npm
Logs
No response
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

I think this is a duplicated of https://github.com/vitejs/vite/issues/11672
btw, I'm also experiencing the same problem and seems that the workaround described here works

A hack that worked for me is to run this script in the output directory after the vite build. It converts "/asset paths to "./asset paths which forces the build to resolve the file at build time as a file and then rebundle it in a way that the server can load.
import fs from "node:fs/promises";
import path from "node:path";

// Fixes the worker import paths
// See: https://github.com/vitejs/vite/issues/15618

const libPath = path.resolve(process.cwd(), "lib");
const files = await fs.readdir(libPath);

for (const file of files) {
  const filePath = path.join(libPath, file);
  if (file.endsWith(".js")) {
    let content = await fs.readFile(filePath, "utf-8");

    content = content.replaceAll(`"/assets/`, `"./assets/`);

    await fs.writeFile(filePath, content);
  }
}


Rewrite this in rust language?

I think that this is an awesome way to learn things and am impressed a lot. So I want you to offer you a suggestion, rewrite this again in rust. If you don't know about rust, I would like to quote the famous rust lang book here -

Rust is a programming language that’s focused on safety, speed, and concurrency. Its design lets you create programs that have the performance and control of a low-level language, but with the powerful abstractions of a high-level language. These properties make Rust suitable for programmers who have experience in languages like C and are looking for a safer alternative, as well as those from languages like Python who are looking for ways to write code that performs better without sacrificing expressiveness.

So I think this module will benefit a lot from a rewrite in rust lang and will improve its efficiency too while being completely safe of 99% of programming errors!

Well, Thank you for your kind words. I would definitely try the same thing in rust.


Use uuid for identify users. And remove email from users serializer

email was removed in 76cef8ae9961a64b2868fae32511f525860f8172

https://docs.djangoproject.com/en/1.9/howto/writing-migrations/#migrations-that-add-unique-fields to migrate model


Question: Isolation

What path is meant to be taken for isolating different sets of releases? Is tiller supposed to be installed in multiple namespaces and only deploy manage releases in that particular namespace?
Edit:
As the above is not the case, may I suggest using namespaces as a means of encapsulating different helm environments?
This would make life a lot easier when managing deployments from multiple teams, and without having to deal with say, nodePort for connecting to a tiller on a custom namespace through a service.
Would have been nice if one were able to do e.g. helm list --namespace=mynamespace. Is anything other than this making this not a possibility?

The design is that Tiller (the server) manages the namespace that it was installed into. So if you helm init --namespace=foo, tiller is installed into foo and then manages that namespace. Its default namespace is helm.
We're planning on adding some flags later to allow tiller to manage things in other namespaces, but that code hasn't been written yet. We imagine that it will work like this: helm install --namespace=bar mychart, which will install mychart into the namespace bar even if Tiller's namespace is foo.
The reason for:
We think that the emerging pattern with namespaces is that they are used to isolate a particular team or app. Namespaces are being used to set security constraints between an "app" (or set of resources) and the rest of the cluster. So Tiller runs in, and manages, just one namespace. You can add security constraints at the namespace level (including things like Calico firewall rules) and Helm charts won't have to be aware of those constraints.
It is inexpensive to run multiple Tiller servers, so you should be able to run separate instances of Tiller in separate namespaces, and use your .kube/config to tell helm how to talk to each of those.

Thanks.
What changes do I need to make in .kube/config to specify the tiller server that I want helm to talk to? And how can one specify this in a more "script-friendly" fashion for say, automated installs e.g. using only the helm cli?

We're discussing this. I think we may add some CLI options for this. I'll CC @adamreese, whose looking at the connection code this week.

Very well. I guess it would be quite useful for helm to be "machine friendly" so higher level third party tools (e.g. dashboard) would be able to use helm conveniently as a cli or a library.

See #838 for the current proposal, and please feel free to comment on that. It's a rough sketch of an idea.

Thanks, I appreciate it. I'll just close this then.


error ratio explanation

Hello!
Seems that i don't quite understand how error ratio works. I wrote simple script to add hashes with 4-byte fingerprint for 1-100000 intregers and then check for false-positives in range<PHONE_NUMBER>00. In my case, when filter is full (intentionally choosed lower size, rather than suggested by cf.sizeof command) i get 3% false positives. If i undestand correctly, it should be somewhat around 0.0000001%. Seems that 1-byte fingerprint is used and i miss something, can you explain me what i did wrong?
Thank you in advance. The code used for test is listed below:
import redis
import struct
import xxhash
import hashlib

def generate_hash(data):
    data=str(data)
    h=hashlib.new('sha1')
    h.update(str(i).encode("utf8"))
    sha1=h.hexdigest()
    digest=xxhash.xxh64(sha1).intdigest()
    xh=(digest & ((1 << 63) - 1)) - (digest & (1 << 63))
    fp=bytearray.fromhex(sha1[:8])
    fp=struct.unpack("<L", fp)[0]
    fp=(fp & ((1 << 31) - 1)) - (fp & (1 << 31))
    return (xh,fp)

client=redis.Redis()
client.execute_command("flushall")
client.execute_command("cf.init test 1K 4")
for i in range(0,100000):
    xhash,fp=generate_hash(i)
    try:
        client.execute_command("cf.add test {} {}".format(xhash,fp))
    except:
        break

result={"1":0,"0":0}
for i in range(100000,200000):
    xhash,fp=generate_hash(i)
    resp=client.execute_command("cf.check test {} {}".format(xhash,fp))
    result[resp.decode("utf8")]+=1
print(result["1"]/result["0"]*100)

Hi, indeed you're right, I made a mistake while wiring the library to Redis.
This commit fixed the error: https://github.com/kristoff-it/redis-cuckoofilter/commit/f8c7e3613ba47135b176bbcff428d9d85eb35aa4
I just released v1.1.0, which should solve all your problems, please try it out. I also made sure to thank you in the release notes.
I also added a last check to your script to see how many items do get recorded by the filter:
found = 0
for i in range(0,100000):
    xhash,fp=generate_hash(i)
    resp=client.execute_command("cf.check test {} {}".format(xhash,fp))
    found += int(resp.decode("utf8"))
print("found", found)

On my test it returned 225 which is expected considering that cf.capacity 1k 4 returns 256.
Let me know if the issue can be considered resolved.

That's awesome! Thank you very much for such quick fix, now everything seems to work perfect.
By the way, i have one more offtopic question. Have you heard about Morton filter (cuckoo filter modification, which intends to work faster, consume less RAM and support of database self-resize feature)? By any chance, do you plan to add its implementation to redis too?

I've heard about them but I have yet to really go through the paper and decide if I want to take the plunge or not...
...but I will probably do it sooner or later :)


Consider having get*() methods convert value to desired type

We should consider having get*() methods convert the corresponding value to the desired type if possible.
Ex:

.getInt(): "13" -> 13
.getString() : 13 -> "13"
.getFloat(): 13 -> 13.0

What do you think @kotl ?

I support this proposal.
I use an application made with Thunkable that has a Firebase extension that in my case sends everything in String i.g. :
55 ---> "55"
text --->""text"" (String of String displayed like this on firebase:""101"")
true --->"true"
5.5 ---> "5.5"

I absolutely agree. Classic C++ SDK has support for that through Variant:
https://firebase.google.com/docs/reference/cpp/class/firebase/variant#classfirebase_1_1_variant
it would be nice to use similar naming and appropriate supported types only.
(please use int64 for int types, in esp8266 it is either 'signed long long' or 'sint64', I think)


feat: manage locks from client and cli

Adds lock control from client
Adds lock control from CLI
Fixed a number of bugs in the service

Fixes #26

Codecov Report

Merging #28 (b04bdbd) into main (9133a0a) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main      #28   +/-   ##
=========================================
  Coverage     88.10%   88.10%
  Complexity      337      337
=========================================
  Files            52       52
  Lines          1437     1437
  Branches         53       53
=========================================
  Hits           1266     1266
  Misses          147      147
  Partials         24       24

Impacted Files
Coverage Δ

...i/device/pool/service/client/DeviceLabService.java
78.37% <ø> (ø)

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 9133a0a...b04bdbd. Read the comment docs.


💎 release 3.2.1

Fixed

Bump glob-parent from 5.0.0 to 5.1.2
Bump axios from 0.19.2 to 0.21.2
Bump lodash from 4.17.15 to 4.17.21

This release has been tagged and will not be merged into master because it is a patch release for the 3.2.x line.


Celery intro for job scheduling

Using celery as the scheduler for the following tuning runs:

miopen_perf_compile/eval
fin_find_compile/eval

Celery workers are automatically launched when tuning runs.
New dependency added: redis
celery folder: /tuna/celery_app
miopen celery folder: /tuna/miopen/celery_tuning

Posting different branch with updated code


Motor driver investigation

One of the motor drivers is not running motors at reasonable speeds. I think it's probably a damaged component or something physical with the driver given that Kevin kinda gave them to us from the back.
We should swap the one in question and see if both motors behave more reasonably with a replaced driver chip.

Sounds like this one is closed?


Mesh: Remove Data Order

The data order for indices arises naturally from its flattened memory layout.
This also holds true for logical access to the data.
This affects the base standard attributes:

axisLabels
gridSpacing
gridGlobalOffset
shape of constant record components

and the ED-PIC extension attributes:

fieldBoundary
particleBoundary

Implements issues: #125 and #129
Description
dataOrder is superfluous.
By defining 1D-flattened dimensions like axisLabel are ordered by fastest to slowest varying index one can omit dataOrder. Slowest to fastest varying index here only means the logical flattened memory layout that one assumes for this data format.
This is possible since one does not care how data was written but just about how to label/name indices when reading data. Naturally, one would increase from fastest to slowest dimension for all flattened descriptions over dimensions.
Let's have a C-like to Fortran-like example
A C-matrix A[i,j,k] is written with i index standing for "x", j for "y" and k for "z". The associated axisLabels is in the index order k-j-i (fastest is last) which is ("z", "y", "x").
A Fortran-reader reads this matrix as M[a,b,c] with the index order a-b-c (fastest is first). The axisLabels will assign a the label "z" , b the label "y" and the slowest varying index c an "x". Index order and index label/name as as in C - hurray! :sparkles:
Affected Components

base
EXT: ED-PIC

Logic Changes
Before one had to to write the index order of the writing code. We basically inverted C-like index orders during read when dataOrder was C to assign it to indices (in C again).
Writer Changes
How does this change affect data writers?
Yes, C-style writers (C/C++/Python/Java/...) need to invert now their order.
Fortran writers can just omit the dataOrder attribute now.
Does this pull request change the interpretation of existing data writers?

PIConGPU: https://github.com/ComputationalRadiationPhysics/picongpu/...
Warp: ...
FBPIC: ...
Smilei: https://github.com/SmileiPIC/Smilei
SIMEX Platform: https://github.com/eucall-software/simex_platform
openPMD-api (upcoming): https://github.com/openPMD/openPMD-api/...

Reader Changes
How does this change affect data readers?
Yes, all readers can now just label/name flattened dimension accesses to e.g. labels of indices in the same order as they access the indices of the mesh data (from fastest varying to slowest varying index).
What would a reader need to change? Link implementation examples!

[x] openPMD-validator: https://github.com/openPMD/openPMD-validator/pull/42
openPMD-viewer: https://github.com/openPMD/openPMD-viewer/...
postpic: https://github.com/skuschel/postpic
yt: https://github.com/yt-project/yt/...
VisIt: https://github.com/openPMD/openPMD-visit-plugin
openPMD-api (upcoming): https://github.com/openPMD/openPMD-api/...

Data Converter
Mesh records that declare dataOrder='C' need to invert the attributes mentioned above.
The unused dataOrder attribute should be removed as well.

[ ] https://github.com/openPMD/openPMD-converter/...

If I understand correctly, C-order data will not be actually modified, but only the following attributes must have the order of their elements reversed ?

axisLabels
gridSpacing
gridGlobalOffset
shape of constant record components
fieldBoundary
particleBoundary

@mccoys from a C/C++/Python writer perspective (Smilei), yes just invert the order of those attributes when writing openPMD 2.0

There is also an alternative solution to this change, ordering from slowest-to-fastest varying index.
With that the existing Fortran files would need to change their index and we would generally have everything in C-like order. Due to the dominance of Py/C++ in our code bases, one could decide for that solution and have more consistency with e.g. numpy attributes >:-)

all right, I updated the PR and PR description! :)

@RemiLehe this PR should be ready to merge. Validator and Updater are up-to-date now :)


Invalid Invitation code from a correct code

Looks like there is a problem happening to a lot of people in the last 2 days that they are receiving an invitation code on the email and when trying to activate it shows this error message: "You've entered an invalid code, or one that's already been claimed. Please check your code and try again".
I have no idea why this is happening.. If anyone can explain a little bit about the invitation system and why this problem is occurring?

Closing this as its old; please re-open if it still persists on the most recent version


Possibility to pass waypoints to external Navigation App

Hello,
I am in the process of reviewing your plugin for an app I develop. I have the requirement for the app to navigate to an start and end point over several waypoints. What I would like to do is to use the Google Maps Javascript API to optimize my waypoints before and then pass on the waypoints to the external native app for navigation. Does your plugin support to pass on more parameters to the external navigation app than "from" and "to", e.g. a list of json waypoints between "from" and "to"?
Thanks,
Best,
Christoph

I just realized that it's maybe just better to launch the external navigation with
from: currentWaypoint
to: nextWaypoint
in this way I could circumvent the problem.
Is there a way for my application to detect when the navigation has finished in the external navigation app?

ok, seems there is a way:
http://stackoverflow.com/questions/31462994/android-application-to-detect-when-google-maps-direction-is-finished


docs: construct nested document line by line

create nested documents with one-liner could break the granularity, the recommended way:

i dont see why original code does not work

i dont see why original code does not work

Because chunks are constructed before being added to the list.

i dont see why original code does not work

Because chunks are constructed before being added to the list.

So a Document A is created standalone (therefore granularity 0) and then by creating a Document B with A as chunk, B does not update A's granularity.

can you show the code and result because i believe i solved it

@hanxiao Here is the codes to show the issue
from docarray import Document
d = Document(
    id='d0',
    chunks=[Document(id='d1', chunks=Document(id='d2'))],
    matches=[Document(id='d3', matches=Document(id='d4'))],
)

for c in d.chunks:
    print(f'{c.id}: g={c.granularity}')
    for cc in c.chunks:
        print(f'{cc.id}: g={cc.granularity}')

for m in d.matches:
    print(f'{m.id}: g={m.granularity}, a={m.adjacency}')
    for mm in m.matches:
        print(f'{mm.id}: g={mm.granularity}, a={mm.adjacency}')

The outputs is as below where

d2 is expected to have granularity=2
d4 is expected to have adjacency=2

d1: g=1
d2: g=1
d3: g=0, a=1
d4: g=0, a=1

as was discussed , it works at g=1, not g>1, such as 2

reject. it overreact. single nested works so don't rewrite all just because double nested don't work

close the PR since not necessary.


Allow edge smoothing with arbitrary extent and in arbitrary directions.

This change causes the following behavior on Linux:

Nah it's all good.


Windows terminal can't locate subl file

Please guys help me fix this. My windows terminal is not locating my subl file but when I run it on cmd it works perfectly. please assist me. thanks

Hello @chuukwuemeka could you please share more info about the error, screenshots would help a lot.

Hi, I figured it out. Took me some hours of sleep. Thanks

Could you share info about how you solved it, this might be helpful for the community :D


add delay request

the ability to add a delay between commands. something like this..
  - commands:
    - ssh server
    delay: 5
    - htop

which would execute 'ssh server', then 5 sec later, issue 'htop' after its connected to "server"

you can prefix the commands with sleep  like
- commands:
  - ssh server
  - sleep 5000 && htop


Download button from data.all UI for shared folders/tables

This feature has been requested by a customer. In their organization non-technical personas are also data.all users. These users will request access to data and will need to download the particular files shared with them.
Describe the solution you'd like
At the moment in data.all users can get the files by getting AWS credentials and running AWS CLI commands against the S3 access point of the folder shared with them. But ideally, they would be provided a button "download" to get this files directly from the UI.
Describe alternatives you've considered
This can be achieved in a similar way that the "Upload" functionality in the Dataset UI for Dataset owners.

Add "download" button next to shared tables and folders (for example in the sharedItems table)
Create API call and write boto3 call in S3 handlers.

Open question: should we download one file, the complete folder content, a fix number of files?
Additional context
Add any other context or screenshots about the feature request here.
P.S. Please Don't attach files. Add code snippets directly in the message body instead.

We are also interested in this feature

@anmolsgandhi to keep in mind if there is spare-time in v2.1.0

Prioritizing for v2.2.0, if there is spare time in v2.1.0 we can triage and bump it up.

@dlpzx We would definitely not be interested in this feature for security reasons as it gives attackers a direct way to access data. I would like to ask that the permissions for this feature and the feature itself are behind a feature flag that can be enabled/disabled. This can be the default if we want to but we should release it in a state where it can be disabled.

I do think we will have interest in this feature, as despite the security concerns, it is a use case that we already regularly support with other platforms.  One thing we have done in the past is to limit the number of rows that can be downloaded at a given time, so it's not so easy for someone to just select star grab all the data from a table and walk away with it.  Ideally the CSV download would be a configurable feature, but also configurable in the maximum number of rows that can be downloaded for a query result.  The idea being, that the CSV download would be for more ad-hoc usage / reporting, as opposed to bulk data export and data transfer (which would not be desirable).
We also had another set of use cases for CSV download that could be applied with such export support.  It would be nice to be able to CSV export info about all the datasets in the catalog, or even your search result from the catalog (again, for reporting purposes, so teams can pass around the list of onboarded datasets, accounts that have been onboarded, etc.).  Same for environments and organizations, and perhaps also available shares.  This same functionality could be used in those cases as well.  And future auditing feature where we can pull activity data from RDS can also benefit from this.


Unit tests break when running together

This is a problem since the unit tests run on the same database file that the production code runs on. We need to find a way to inject a temporary directory so that the databases don't conflict.

Fixed


Decoded should support custom error states

In all of the custom decoding I've had to do with the backend I'm current developing against, I've found myself rather limited by .TypeMismatch and .MissingKey being the only Decoded error states. I've started just returning .TypeMismatch with a custom string describing the issue, since .TypeMismatch comes closest to representing a custom decoding error. For example, if a double is being returned as a string and I want to convert it to be an actual double, I do this:
let toDouble: String -> Decoded<Double> = {
    if let double = Double($0) {
        return pure(double)
    }
    else {
        return .TypeMismatch("Could not convert String \($0) to Double.")
    }
}

This gives me a little extra detail without having to examine the actual returned JSON. It'd be great if this was a supported state, like .General or .Custom. Better names are always good. :smile:
I mentioned my concern in PR #210.

So this seems easy/reasonable enough. I don't have any real problem with it. My only question is whether it should be a "fatal" error or not?
Basically, we need to consider whether a failed decoding with a custom type should be considered a failure for an optional property. Right now, this is what we do:
public extension Decoded {
  static func optional<T>(x: Decoded<T>) -> Decoded<T?> {
    switch x {
    case let .Success(value): return .Success(.Some(value))
    case .Failure(.MissingKey): return .Success(.None)
    case let .Failure(.TypeMismatch(x)): return .Failure(.TypeMismatch(x))
    }
  }

Basically, we say that a missing key is actually fine, and that a type mismatch is a real failure. My gut says that custom failures should work like type mismatch failures, and so should be treated as "fatal" for optional values.

I agree, which is why I used .TypeMismatch as my equivalent for a custom error, as it seemed closest in intent, even if it didn't really describe the issues I could see in custom transformers.
Customization of which errors are fatal is yet another, small, issue I have with Argo. It would be nice to, say, decode an array and not have the decode fail because a single element failed to decode. But I'll raise that issue if I ever run into that requirement while using Argo.

It would be nice to, say, decode an array and not have the decode fail because a single element failed to decode.

Different issue, but fwiw that can be achieved on a case by case basis by using a different decoder.
Instead of using our decoder, which is basically sequence(A.decode <^> a) where a is the array, you could just do catFailures(A.decode <^> a). That's a function that we could probably support along with our implementation of sequence, as well.

FWIW: https://github.com/thoughtbot/Argo/issues/109#issuecomment-93572717


Lightbox: Fixes bug where next/previous icon would show and hide the image (introduced in 3.1.0)

https://github.com/adobe-community/issues/issues/9900

:+1:

:+1:


ExchangeContext double free in chip-tool

Problem
Currently using chip-tool to pair a device via BLE will cause the process to crash.
Logs (Extra log lines added for debugging purpose):
$ ./out/debug/chip-tool pairing ble-wifi ChipTE chiptest123<PHONE_NUMBER>3344 291
......
CHIP:ZCL: DefaultResponse:
CHIP:ZCL:   Transaction: 0x560e43961db8
CHIP:ZCL:   status: EMBER_ZCL_STATUS_SUCCESS (0x00)
CHIP:CTL: Device confirmed that it has received the root certificate
CHIP:CTL: Operational credentials provisioned on device 0x560e43ed1dc0
CHIP:TOO: Secure Pairing Success
CHIP:CTL: CHIPDevice::Reset
CHIP:TOO: Pairing Success
CHIP:TOO: Add network for device 12344321

CHIP:DMG: ICR moving to [Initialize]
CHIP:DMG: ICR moving to [AddCommand]
CHIP:CTL: LoadSecureSessionParametersIfNeeded for 0x560e43ed1dc0, state 0
CHIP:IN: Connection from 'BLE' expired
CHIP:CTL: OnConnectionExpired was called for unknown device, ignoring it.
CHIP:EM: Close exchange context 0x560e46f8bab8
Release 0x560e46f8bacc
Release 0x560e46f8ba10
CHIP:IN: New pairing for device 0x0000000000bc5c01, key 0!!
CHIP:CTL: mState OnNewConnection SecureConnected this 0x560e43ed1dc0
Retain 0x560e46f8ba10
Retain 0x560e46f8ba74
CHIP:IN: Secure message was encrypted: Msg ID 1
CHIP:IN: Sending msg from 0x000000000001B669 to 0x0000000000BC5C01 at utc time:<PHONE_NUMBER> msec
CHIP:IN: Sending secure msg on generic transport
CHIP:IN: Secure msg send status No Error
Release 0x560e46f8ba74
CHIP:DMG: ICR moving to [   Sending]
CHIP:DMG: ICR moving to [Uninitiali]
ExchangeContext::Release 0x560e46f8bab8
Release 0x560e46f8bacc
[1]    1793885 abort (core dumped)  ./out/debug/chip-tool pairing ble-wifi ChipTE chiptest123<PHONE_NUMBER>3344 291

Root cause
This is caused by Device::Reset() called when handling the message, the stack backtrace is:
......
#0  chip::Controller::Device::Reset() (this=0x5555557ad7c0) at ../../third_party/connectedhomeip/src/controller/CHIPDevice.h:312
#1  0x00005555556588c8 in chip::Controller::DeviceController::ReleaseDevice(chip::Controller::Device*)
    (this=0x555555793d98, device=0x555555793dc0) at ../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:594
#2  0x000055555565b9cb in chip::Controller::DeviceCommissioner::ReleaseDevice(chip::Controller::Device*)
    (this=0x555555793d98, device=0x555555793dc0) at ../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1390
#3  0x000055555565891f in chip::Controller::DeviceController::ReleaseDevice(unsigned short) (this=0x555555793d98, index=0)
    at ../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:601
#4  0x000055555565a556 in chip::Controller::DeviceCommissioner::RendezvousCleanup(int) (this=0x555555793d98, status=0)
    at ../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1060
#5  0x000055555565b824 in chip::Controller::DeviceCommissioner::OnOperationalCredentialsProvisioningCompletion(chip::Controller::Device*)
    (this=0x555555793d98, device=0x555555793dc0) at ../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1368
#6  0x000055555565b653 in chip::Controller::DeviceCommissioner::OnRootCertSuccessResponse(void*) (context=0x555555793d98)
    at ../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1325
#7  0x0000555555631fc7 in IMDefaultResponseCallback(chip::app::Command const*, EmberAfStatus)
    (commandObj=0x5555556ffdb8 <chip::app::sInteractionModelEngine+1112>, status=EMBER_ZCL_STATUS_SUCCESS)
    at ../../third_party/connectedhomeip/src/controller/data_model/gen/CHIPClientCallbacks.cpp:303
#8  0x000055555565bba9 in chip::Controller::DeviceControllerInteractionModelDelegate::CommandResponseProcessed(chip::app::CommandSender const*) (this=0x55555884e830, apCommandSender=0x5555556ffdb8 <chip::app::sInteractionModelEngine+1112>)
    at ../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1504
#9  0x00005555556bdce8 in chip::app::CommandSender::OnMessageReceived(chip::Messaging::ExchangeContext*, chip::PacketHeader const&, chip::PayloadHeader const&, chip::System::PacketBufferHandle&&)
    (this=0x5555556ffdb8 <chip::app::sInteractionModelEngine+1112>, apExchangeContext=0x55555884dab8, aPacketHeader=..., aPayloadHeader=..., aPayload=...) at ../../third_party/connectedhomeip/src/app/CommandSender.cpp:108
#10 0x000055555566acf2 in chip::Messaging::ExchangeContext::HandleMessage(chip::PacketHeader const&, chip::PayloadHeader const&, chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&)
    (this=0x55555884dab8, packetHeader=..., payloadHeader=..., peerAddress=..., msgBuf=...)
    at ../../third_party/connectedhomeip/src/messaging/ExchangeContext.cpp:373
#11 0x000055555566cdb3 in chip::Messaging::ExchangeManager::<lambda(auto:3*)>::operator()<chip::Messaging::ExchangeContext>(chip::Messaging::ExchangeContext *) const (__closure=0x7ffff4f0c710, ec=0x55555884dab8)
    at ../../third_party/connectedhomeip/src/messaging/ExchangeMgr.cpp:220
#12 0x000055555566ced9 in chip::BitMapObjectPool<chip::Messaging::ExchangeContext, 8>::ForEachActiveObject<chip::Messaging::ExchangeManager::OnMessageReceived(const chip::PacketHeader&, const chip::PayloadHeader&, chip::SecureSessionHandle, const chip::Transport::PeerAddress&, chip
::System::PacketBufferHandle&&, chip::SecureSessionMgr*)::<lambda(auto:3*)> >(chip::Messaging::ExchangeManager::<lambda(auto:3*)>)
    (this=0x55555884da30, f=...) at ../../third_party/connectedhomeip/src/lib/support/Pool.h:140
#13 0x000055555566c535 in chip::Messaging::ExchangeManager::OnMessageReceived(chip::PacketHeader const&, chip::PayloadHeader const&, chip::SecureSessionHandle, chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&, chip::SecureSessionMgr*)
    (this=0x55555884d8f0, packetHeader=..., payloadHeader=..., session=..., source=..., msgBuf=..., msgLayer=0x55555884ce60)
    at ../../third_party/connectedhomeip/src/messaging/ExchangeMgr.cpp:207
#14 0x0000555555691f15 in chip::SecureSessionMgr::SecureMessageDispatch(chip::PacketHeader const&, chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) (this=0x55555884ce60, packetHeader=..., peerAddress=..., msg=...)
    at ../../third_party/connectedhomeip/src/transport/SecureSessionMgr.cpp:473
#15 0x0000555555691553 in chip::SecureSessionMgr::OnMessageReceived(chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) (this=0x55555884ce60, peerAddress=..., msg=...) at ../../third_party/connectedhomeip/src/transport/SecureSessionMgr.cpp:297
#16 0x0000555555692db5 in chip::TransportMgrBase::HandleMessageReceived(chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) (this=0x5555588486d0, peerAddress=..., msg=...) at ../../third_party/connectedhomeip/src/transport/TransportMgrBase.cpp:57
#17 0x00005555556b4443 in chip::Transport::Base::HandleMessageReceived(chip::Transport::PeerAddress const&, chip::System::PacketBufferHandle&&) (this=0x5555588486f8, source=..., buffer=...) at ../../third_party/connectedhomeip/src/transport/raw/Base.h:92
#18 0x00005555556b4e9a in chip::Transport::BLEBase::OnEndPointMessageReceived(chip::Ble::BLEEndPoint*, chip::System::PacketBufferHandle&&)
    (this=0x5555588486f8, endPoint=0x5555557014a0 <chip::Ble::BleEndPointPool::Get(unsigned long) const::sEndPointPool>, buffer=...)

Then in  PairingCommand::OnPairingComplete, we asked the reset device to re-establish the session to send network commission cluster messages. This caused the connection to expire in SecureSessionMgr::NewPairing, which in turn causes the ExchangeContext to be released.
However, the ExchangeContext::HandleMessage isn't aware of these stories and calls Release at the end of the function. This leads to a double free.
Proposed solutions
chip-device-ctrl is not affected by this issue since it sends pairing and network commissioning packets separately. However, it's natural to setup the network in the pairing callback just as chip-tool does. So I suggest to fix the message handling logic.
Possible solutions can be:

Only release the exchange context if it's not released in ExchangeContext::HandleMessage. However we don't really have an api to check the validity of an ExchangeContext.
Don't release the ExchangeContext automatically when connection expires and leave it to users. This on another hand can lead to ExchangeContext leak.

Since I'm no expert in message dispatching, I'd leave the fix to more capable engineers in this field.

Working on it #7125

Most likely, #7114 will fix this issue as well.

Yes, #7114 should address this issue. We should not close the exchange on connection close.

close this ticket with #7114


Open Folder Select Screen in User Folder

A suggestion from @leavens:

It would be useful to be able to start in the user's Pictures directory; instead of having that be found automatically (which might be hard to make portable), you could let the user set a starting directory in settings.

This has been implemented in https://github.com/adcrn/knest/commit/7bb1a2b934dd626d14549657fcaa3228dd5256e2.
From config.kv:
<LoadDialog>:
    list: copy.copy(gv.dir_paths)
    cwd: os.getcwd()
    fancy_path: Path(root.cwd)
    start_path: os.path.join(root.fancy_path.parts[0], root.fancy_path.parts[1], root.fancy_path.parts[2])

...
FileChooserIconView:
    id: filechooser
    dirselect: True
    rootpath: root.start_path

It works under the assumption that modern operating systems (e.g. macOS, Linux distros, Windows 8/10) have a root folder structure that typically has the form /Users/blah, /home/blah, or C:/Users/blah, respectively. The application will now open in the root folder of the user, where people will typically store their images.

Hi Alexander,
Great, thanks!
    Regards,

    Gary T. Leavens
    437D Harris Center (Bldg. 116)
    Computer Science, University of Central Florida
    4000 Central Florida Blvd., Orlando, FL 32816-2362 USA
    http://www.cs.ucf.edu/~leavens  phone: +1-407-823-4758
<EMAIL_ADDRESS>
On Thu, Apr 26, 2018 at 10:58 AM, Alexander<EMAIL_ADDRESS>wrote:

This has been implemented in 7bb1a2b
https://github.com/adcrn/knest/commit/7bb1a2b934dd626d14549657fcaa3228dd5256e2
.
From config.kv:
:
list: copy.copy(gv.dir_paths)
cwd: os.getcwd()
fancy_path: Path(root.cwd)
start_path: os.path.join(root.fancy_path.parts[0], root.fancy_path.parts[1], root.fancy_path.parts[2])
...
FileChooserIconView:
id: filechooser
dirselect: True
rootpath: root.start_path
It works under the assumption that modern operating systems (e.g. macOS,
Linux distros, Windows 8/10) have a root folder structure that typically
has the form /Users/blah, /home/blah, or C:/Users/blah, respectively. The
application will now open in the root folder of the user, where people will
typically store their images.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/adcrn/knest/issues/12#issuecomment-384672038, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ALu2vUpm3sLor3O6mDfIgeEEb152ATk9ks5tseCogaJpZM4TlUtF
.

Hi Alexander,
On windows, when I start this version from cygwin, I'm trapped under
cygwin's root, which is c:/cygwin64 for me. But my pictures directory is in
c:/Users/leave/Pictures, which I can't get to from c:/cygwin64 so this
doesn't work for me.   This happens even if I start from a Windows cmd
shell (not cygwin).
    Regards,

    Gary T. Leavens
    437D Harris Center (Bldg. 116)
    Computer Science, University of Central Florida
    4000 Central Florida Blvd., Orlando, FL 32816-2362 USA
    http://www.cs.ucf.edu/~leavens  phone: +1-407-823-4758
<EMAIL_ADDRESS>
On Thu, Apr 26, 2018 at 10:58 AM, Alexander<EMAIL_ADDRESS>wrote:

This has been implemented in 7bb1a2b
https://github.com/adcrn/knest/commit/7bb1a2b934dd626d14549657fcaa3228dd5256e2
.
From config.kv:
:
list: copy.copy(gv.dir_paths)
cwd: os.getcwd()
fancy_path: Path(root.cwd)
start_path: os.path.join(root.fancy_path.parts[0], root.fancy_path.parts[1], root.fancy_path.parts[2])
...
FileChooserIconView:
id: filechooser
dirselect: True
rootpath: root.start_path
It works under the assumption that modern operating systems (e.g. macOS,
Linux distros, Windows 8/10) have a root folder structure that typically
has the form /Users/blah, /home/blah, or C:/Users/blah, respectively. The
application will now open in the root folder of the user, where people will
typically store their images.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/adcrn/knest/issues/12#issuecomment-384672038, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ALu2vUpm3sLor3O6mDfIgeEEb152ATk9ks5tseCogaJpZM4TlUtF
.

@leavens Can you pull the latest master commit and try again under both Cygwin and the Windows command shell?

Hi Alexander,
Yes. On cygwin I'm still trapped below my home directory
(c:/cygwin64/home/leavens), and there is no ".." directory in the folder
selection to get out. The same thing happens with a windows cmd prompt,
probably due to some environment variables I have set to tell shells where
my home directory is.  So the new change doesn't help.
I suggest that you not use something that changes the root of the process
to a directory below the machine's root. If the process can start in a
directory without making that directory the root directory for the process
(in the sense of chroot) then that will be more flexibile.
    Regards,

    Gary T. Leavens
    437D Harris Center (Bldg. 116)
    Computer Science, University of Central Florida
    4000 Central Florida Blvd., Orlando, FL 32816-2362 USA
    http://www.cs.ucf.edu/~leavens  phone: +1-407-823-4758
<EMAIL_ADDRESS>
On Thu, Apr 26, 2018 at 12:49 PM, Alexander<EMAIL_ADDRESS>wrote:

@leavens https://github.com/leavens Can you pull the latest master
commit and try again under both Cygwin and the Windows command shell?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/adcrn/knest/issues/12#issuecomment-384711452, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ALu2vf_7wQ5NnuQNxuW3Hvb3tbAogA-Eks5tsfqAgaJpZM4TlUtF
.

It would be useful to be able to start in the user's Pictures directory; instead of having that be found automatically (which might be hard to make portable), you could let the user set a starting directory in settings.

This will be implemented in #19. Closing this issue for now.


Fix docs.rs and CI builds and convert libogc doxygen comments to rust-style

This was created on top of #91, so I'm marking it as a draft until that PR is merged.
Fixes ogc-rs failing to build documentation on docs.rs by just skipping the dependency logic in build.rs when it's building on docs.rs, which is fine since it's not actually trying to link anything. Ogc-sys will most likely not produce correct documentation consistently if it's ever exposed, since it does rely on linking to update ogc.rs, but that should be fine since it's not on crates.io (and if you're pulling from the git repo, you can and should be using a local cargo doc run). This also fixes the cargo doc generation by converting the doxygen formatted comments from libogc into rust styled docs using doxygen-rs.

side note, should we really be tracking changes to ogc-sys/ogc.rs? It's generated as part of the build process, right? Seems like tracking it in git is just extra noise.

side note, should we really be tracking changes to ogc-sys/ogc.rs? It's generated as part of the build process, right? Seems like tracking it in git is just extra noise.

Originally we didn't always do a bindgen build with the ogc.rs just when something major changed. Its hasn't been made optional again yet.

That actually can be fixed in the same way as the docs.rs build, I'll add it.

Anything else needed from this?

Not that I'm aware of. This fixes all the problems I've had with the documentaton (other than the stuff that isn't documented yet at all, but that's a topic for another PR :smile:)

Cool!! Merged.


Lark-js now uses a fix Python version of Lark (1.1.5)

@thekevinscott Can you please check that this PR solves your issue?

This works great!


CPU has been drained by PHP7.0 process

The CPU usage is about 100% when the editor is started.

VSCode Version: Code 1.9.1 (f9d0c687ff2ea7aabd85fb9a43129117c0ecf519, 2017-02-08T23:44:55.542Z)
OS Version: Linux x64 4.4.0-62-generic
Extensions:

Extension
Author
Version

format-php
Kasik96
1.1.2

material-icon-theme
PKief
1.3.3

githistory
donjayamanne
0.1.5

prettier-vscode
esbenp
0.8.0

php-intellisense
felixfbecker
1.1.1

classic-asp
ilich8086
0.0.2

php-symbols
linyang95
2.1.0

wordpress-snippet
tungvn
1.1.2

Material-theme
zhuangtongfa
1.0.3

Steps to Reproduce:

I started the editor and I ran the linux top command
The usage of CPU is close to 100% and the responsible for that is the php7.0 process
When I close the editor the php7.0 process is terminated and the CPU usage backs to normal

I do not know whether it is an editor issue or some extension.

Is this still an issue? I know php-intellisense is the most likely offender here, and it has undergone a lot of work the past few months.