Custom Tooltips does not appear when using modal

Expected Behavior
Custom tooltips should display normally in a modal window
Current Behavior
Custom tooltips does not display in a modal window
Possible Solution

Steps to Reproduce (for bugs)
https://jsfiddle.net/Viseth7/Ldg32n8t/9/
Context
Using tooltip works but for tooltip with long message text these are truncated. That' why I'm using custom tooltip
Environment

*Chart.js version: master branch
*Browser name and version: Chrome  83.0.4103.61
*Link to your project: https://www.chartjs.org/docs/latest/configuration/tooltip.html#external-custom-tooltips
Thanks for you feedback,
Regards,
Viseth

modal window in your case means a div that has a z-index of 1010. The tooltip is drawn below that, because you did not set a z-index.
Adding a greater z-index to the tooltip element makes it visible:
https://jsfiddle.net/1g7f6x08/


What is the license of FoolNLTK source code , model and corpus ?

hi all ,
I want to integrate FoolNLTK into my project for personal use or may be in business product .
So , what is the license of FoolNLTK source code , model and corpus ?
Can we separate the source code , model and corpus with different license ?
Thanks in advance .

I think there is no problem.
you can read this Apache License 2.0
OR the LICENCE file in the project.
enjoy yourself!


Unable to Bypass SSL Verification when using Web Search

Bug Report

Installation Method
I installed the latest Docker container (v0.3.35). Everything else, to include directly adding websites to context via # works fine.
Environment

Open WebUI Version: v0.3.35
Operating System:  Docker is running in Ubuntu server
Browser (if applicable):  Chrome 130.0.6723.70

Confirmation:

[X] I have read and followed all the instructions provided in the README.md.
[X] I am on the latest version of both Open WebUI and Ollama.
[] I have included the browser console logs.
[X] I have included the Docker container logs.
[X] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:
When Openwebui is behind a TLS proxy, and Bypass SSL verification for Websites is On, it obtains web pages from duckduckgo, attempts to connect to them,  sees that there is a self-signed certificate in the trust chain and ignores it, reading website content despite the self-signed cert.
Actual Behavior:
Openwebui fails to read the content from the web pages returned by duckduckgo due to the SSL Verification Error.
Description
Bug Summary:
When Open Webui attempts to connect to websites based on Web Search results, it fails to ignore self-signed certificates despite  Bypass SSL verification for Websites being On. Directly adding websites to context via # works fine. It's only the RAG Web Search that cannot bypass SSL verification.
Reproduction Details
Steps to Reproduce:

Install latest Open WebUI Docker Image
Enable duckduckgo web search
Ensure that  Bypass SSL verification for Websites is On and click [Save]
Execute a prompt with Web Search Enabled

Logs and Screenshots
Docker Container Logs:
 Given the user's message and interaction history, decide if a web search is necessary. You must be concise and exclusively provide a search query if one is necessary. Refrain from verbose responses or any additional commentary. Prefer suggesting a search if uncertain to provide comprehensive or updated information. If a search isn't needed at all, respond with an empty string. Default to a search query when in doubt. Today's date is 2024-11-05.

User Message:
Who won the 2024 world series?

Interaction History:                                                                                USER: Who won the 2024 world series?
                                                                                Search Query:
INFO:     <IP_ADDRESS>:32860 - "POST /api/task/query/completions HTTP/1.1" 200 OK                       ERROR [open_webui.apps.retrieval.web.utils] Error loading https://www.mlb.com/news/dodgers-win-world-series-2024: HTTPSConnectionPool(host='www.mlb.com', port=443): Max retries exceeded with url: /news/dodgers-win-world-series-2024 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1006)')))     ERROR [open_webui.apps.retrieval.web.utils] Error loading https://abcnews.go.com/Sports/los-angeles-dodgers-win-world-series/story?id=115282153: HTTPSConnectionPool(host='abcnews.go.com', port=443): Max retries exceeded with url: /Sports/los-angeles-dodgers-win-world-series/story?id=115282153 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1006)')))
ERROR [open_webui.apps.retrieval.web.utils] Error loading https://en.wikipedia.org/wiki/2024_World_Series: HTTPSConnectionPool(host='en.wikipedia.org', port=443): Max retries exceeded with url: /wiki/2024_World_Series (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1006)')))
INFO  [open_webui.apps.retrieval.main] save_docs_to_vector_db [] 07cef926cff1fa04e42f32a29e72e986247dd6a3b2c9eeb1872040d51ee8eba
ERROR [open_webui.apps.retrieval.main] The content provided is empty. Please ensure that there is text or data present before proceeding.
Traceback (most recent call last):                                                                      File "/app/backend/open_webui/apps/retrieval/main.py", line 1168, in process_web_search                 save_docs_to_vector_db(docs, collection_name, overwrite=True)
  File "/app/backend/open_webui/apps/retrieval/main.py", line 687, in save_docs_to_vector_db
    raise ValueError(ERROR_MESSAGES.EMPTY_CONTENT)                                                    ValueError: The content provided is empty. Please ensure that there is text or data present before proceeding.

Screenshots/Screen Recordings (if applicable):

Fixed on dev


Armstrong Number | C++

Title - Armstrong Number
what will change - To check if the number is an Armstrong Number or not. Prints true if number is Armstrong Number, otherwise prints false.
Type of Issue -
Please add/delete options that are not relevant.

[x] Adding New Code

Programming Language
Please add/delete options that are not relevant.

[x] C++

Self Check

Ask for issue assignment before making Pull Request.
Add your file in the proper folder
Clean Code and Documentation for better readability
Add Title and Description of the program in the file

:star2: Star it :fork_and_knife:Fork it :handshake: Contribute to it!
Happy Coding!

Please assign this issue to me


Regarding the new Java 21 requirement for 24w14a+

Well, Mojang just dropped a new snapshot that upgrade the JRE version to 21.0.2.
I didn't had the time to test here, but i wonder if olauncher can download the appropriate JRE version and run the game (in those versions) or it will need to be worked on.

It appears to download and run the runtime just fine! :) Thanks for bringing this to my attention. Please reopen the issue of some issues arise


Issue #76 solve, custom scrollbar added

@MridulTailor Why isnt it working on the site after merge. Code looks fine though. Could you be solve this.

Maybe this...

I am on chrome its not working

@MridulTailor Its working properly Thanks for your contribution happy coding.

Thank you Elvin.


rl-2311: Minor fixes

Description of changes
Rename the "Nixpkgs Library Changes" section to just "Nixpkgs Library", matching the "NixOS" section.
Correct some formatting
Things done

[x] Checked that it builds and the formatting is fixed

Backport is already in https://github.com/NixOS/nixpkgs/pull/270990 :)


Decoration is missing in RecyclerView when I using FlexboxLayoutManager

I use FlexboxLayoutManager and FlexboxItemDecoration in my project. And there is only one RecyclerView in my activity.
It's ok when I added a item in RecyclerView if the view's height is less than screen's. But if the view's height is more than screen's, the decoration is missing in some items.
I don't know how to fix it.

Hi @Cloudpoet,
Thanks for reporting this, I tried to reproduce it on my end, but couldn't reproduce it so far even though I set   the ViewHolder's height longer than the screen height.
Is it possible to share your reproducible code?
Thanks.

OK, I'll push my code to github after some time. Now I fix this problem by using margin instead of decoration

This is the URL:
My demo.
You'll see this problem if you add enough items then the height of the recyclerview is more than screen's.

Hi @Cloudpoet,
Thanks for the demo project! Now I can reproduce the issue.
Taking a look. Thanks!

Should be fixed by #294


Broken Examples Page

The Examples page at http://spritespin.ginie.eu/samples has several 404 errors and is not loading any working examples.

thank you. It's fixed now


No Duplicating #Target5 into Left-Well?

Challenge Clone an Element Using jQuery has an issue.
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:

jQuery Playground

#left-well

#target1
#target2
#target3

#right-well

#target4
#target5
#target6

This is on the challenge "Clone and Element using jQuery - I have this and it all looks okay but it wont make a copy of #target5 in the left well

I wont make a copy of #target5 in the left well

Thank you for reporting your issue.
Your code is wrong. left-well is an id
This is a standard message notifying you that this issue seems to be a request for help. Instead of asking for help here, please click the "Help" button on the challenge on freeCodeCamp, which will take you to the help chatroom for that specific challenge. You can also view our full list of official chatrooms.
If you think I'm wrong in closing this issue, please reopen it and add further clarification.
Thank you, and happy coding.


More powerful/flexible path matching

Let's make string-based pattern matching more flexible to accommodate some of the use cases we're starting to see.
In particular, I'd like to propose we follow Sinatra's lead here and:

Allow ? to mean "match the previous thing 0 or 1 time"
Modify * to not match . since it can be excluded using ?

By just doing these two changes, we can support the following kinds of URLs:

/posts/:slug.?:format? (make the .html portion of a URL optional)
/files/*.* (get the file extension in a separate splat)
/archive/? (optional trailing slash)

I've already got this functionality in mach and it's working really well. I rarely (read: haven't yet needed to) use a regular expression to match on a URL path. I realize that this discussion will probably evolve to include supporting full-blown regular expressions, but I'd like to discuss that in a separate issue if people are interested.

is <Routes ignoreTrailingSlash={true}> supposed to work in 1.0 ? Doesn't seem so :/ What is the optimal way to achieve optional trailing slashes? /? also doesn't work...

Is ignoreTrailingSlash on by default? Seems to me like that would be the most sane default.

@commandtab doesn't look like it is, but it would be great!


[genType "xxx"] should not trigger a warning/error.

Hey @cristianoc,
I wanted to share one bug that I have been facing using genType and generating TypeScript.
Using BuckleScript 7.x and genType 3.18.0 (accordingly).
If I flag a variable with [@genType "2set"] generates invalid JS/TS. Would be a good warning/error to show to users allowing them only write valid TS. With a fast check on StackOverflow I found a good explanation (I can't find it on ECMA specs (https://www.ecma-international.org/ecma-262/#prod-VariableStatement) 😢 ).
[@genType "2set"]
let set = JsSet.fromArray([|1, 2, 3|]);

/* TypeScript file generated from Index.re by genType. */
const IndexBS = require('./Index.bs');

import {t as JsSet_t} from 'bs-js-collections/src/JsSet.gen';

export const 2set: JsSet_t<number> = IndexBS.set2;

debug info

 Project root: /Users/davesnx/dev/playgrounds/try-genType-with-TS
  Config language:typescript module: importPath: shims:0 entries bsVersion:7.3.2
  Add Index.cmt  /Users/davesnx/dev/playgrounds/try-genType-with-TS/Index.re
  Translate Structure
  Translate Value Binding set2
  fromPath path:JsSet.t typeEnv:__root__ External resolved:JsSet_t
  Dependency: JsSet_t
  Resolve Reason Module: JsSet
  Resolve Generated Module: JsSet
  Import Path: bs-js-collections/src/JsSet.gen
  Create Type Map for Index
  Code Item: ExportValue resolvedName:2set type:JsSet_t<number>
  Converter type0:JsSet_t<number> converter:id
  Replace  /Users/davesnx/dev/playgrounds/try-genType-with-TS/Index.gen.tsx

I created a playground to show-case this bug: https://github.com/davesnx/try-gentype-with-ts
Thanks

@davesnx since genType runs as a post-processing step, it can't trigger an error that stops the build at the moment.
It could avoid generating invalid TS but then it would be harder to understand what went wrong.

Cool.
I'm not familiar with any post-process after BS but, could we print some warnings into the same stdout as BuckleScript?
The idea isn't to avoid generate invalid TS, for me it was to understand what genType does and is capable of doing. When I add a genType notation and nothing pops up to the TS file I have no guide on where the error/mistake is made.
a random question, is there any plan to change the genType to rely on post-hooks in the future of rescript?
Thanks for the response.

Btw do you get an error from TypeScript?
The idea is when there's a type mismatch, the type error will appear in TS. And this case is not a type mismatch, just an invalid identifier, but the mechanism could be the same.
Moving away from post-hook could happen in future, it would be nice.  But not in the near future.

Yes you got the compiler errors, generating TS gives the compiler errors and having untyped output it might not be the case, but if you are running ESLint in one way or another, it will pop as error as well.


perform null check before adding redirectUri and clientId query params

ExecuteActionsEmail function seems to be broken when redirectUri and clientId are not present in option argument. Adding null check before appending those params to url

This library is no longer being maintained, please use https://github.com/keycloak/keycloak-nodejs-admin-client instead


feat: Refactor Helm chart

1. Issue, if available:
This PR addresses part of #781.
2. Description of changes:
This is a breaking change.

Improve chart metadata
Make chart follow idiomatic Helm patterns
Use K8s recommended labelling to distinguish between components and improve selector logic
Use a different ServiceAccount for controller and webhook, this is more secure
Recommend creating service accounts rather than using the namespace default, this is more secure

3. How was this change tested?
The template output was compared to the pervious version.
4. Does this change impact docs?

[x] Yes, PR includes docs updates
[ ] Yes, issue opened: link to issue
[ ] No

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ellistarn sorry it took me so long to come through on this one, but with the holidays and the chart refactor I did for NTH taking longer than expected I've got quite a backlog of pending OSS commitments. I'm about to go through the issues and comment on the ones that this PR is related to.

@ellistarn have you had a chance to review this yet?

I'll take a look at this today @stevehipwell !  Looks familiar ;)

FYI related: https://github.com/aws/karpenter/pull/914/files

@bwagner5 thanks for the review, I've fixed the typo you found. Hopefully this can be merged soon.

@bwagner5 the CI is failing but I don't think it's related to any changes I made?

I pulled this down and did some manual testing. I posted a PR to your fork with a few changes: https://github.com/stevehipwell/karpenter/pull/1
We're very near a merge! I love the single karpenter pod!

@bwagner5 thanks for the review and the PR.

Nice work and also glad to see consolidating Pod too :+1:

@bwagner5 all merged and in this PR.

In the future please note that refactors like these break eksctl's Karpenter installation flow. A heads up would have been nice.

Hi! I just want to mention that this refactor also broke the values for this aws sample: https://github.com/aws-samples/karpenter-terraform/blob/main/karpenter/templates/values.yaml.tpl

@metanerd I'm just a contributor so just my opinion, but all samples SHOULD use fixed versions and all samples MUST fix the version of any pre v1.0.0 components.


Update cosign to v1.12.1 and sigstore to v1.4.2

Description
cosign v1.12.0 fixes a vuln, so might as well ensure we are using the latest version.
Updated cosign to v1.12.0 and sigstore to v1.4.2 then ran go mod tidy --compat=1.17
Checklist

[x] Investigated and inspected CI test results
~[ ] Unit test and regression tests added~
~[ ] Evaluated and added CHANGELOG entry if required~
~[ ] Determined and documented upgrade steps~
~[ ] Documented user facing changes (create PR based on openshift/openshift-docs and merge into rhacs-docs)~

Testing Performed
CI

Closing, as we'd need to bump our go.mod to 1.18 for this

latest version require go 1.18, so going to close this


Exception raised when a command is imported in setup.py

Apparently the mocking logic causes an exception if you try to import commands from setuptools.
If I have a setup.py like this:
from setuptools import setup
from setuptools.command.upload import upload

class Uploader(upload):
    def run(*args, **kwargs):
        raise Exception("Don't use setup.py upload")

setup(
    name="mypkg",
    cmdclass={
        "upload": Uploader,
    },
)

I get the following exception:
  File "path/to/setuptools-py2cfg/setuptools_py2cfg.py", line 60, in main
    setup, setuppy_dir = execsetup(Path(args.setup_py.name).resolve())
  File "path/to/setuptools-py2cfg/setuptools_py2cfg.py", line 51, in execsetup
    exec(setup_py.read_text())
  File "<string>", line 2, in <module>
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 951, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 894, in _find_spec
  File "<frozen importlib._bootstrap_external>", line 1157, in find_spec
  File "<frozen importlib._bootstrap_external>", line 1123, in _get_spec
TypeError: 'Mock' object is not iterable

I believe that the problem here is that the problem is because commands try to load some importlib hooks or something, and when you give it a Mock it doesn't work seamlessly.
I think probably restoring the original setuptools.command module is probably the best way to fix this.  Of course, getting something meaningful out of this also relies on solving #7, because you cannot translate cmdclass to a declarative equivalent.
I'd say the different levels of support, from easiest to hardest:

Try to detect this exception and throw a more descriptive exception
Support it, ignore the cmdclass parameter to setup, possibly throwing a warning.
Full support with #7.

Mock(spec) --> Mock(autospec)


updating CED script to nwb-conversion-tools v0.6.2

@bendichter This will solve Issue 15 once it's working.
@alejoe91 @luiztauffer When running this on CED_example_data/Short example/M113_C4.smrx, I get the error posted below

Any ideas what's going wrong?
Also, I'm not crazy about how the user has to manually extract and specify the rhd channels to initialize the extractor, is there a
reason why is this not handled internally like in other extractors? I remember something about the channel names not being "native" and therefore not being trustable or something?

I am actually getting another error:
---------------------------------------------------------------------------
UnboundLocalError                         Traceback (most recent call last)
<ipython-input-25-fc95255e3ec9> in <module>
      2 converter.run_conversion(
      3     nwbfile_path='out_ced.nwb',
----> 4     metadata=metadata,
      5 #     conversion_options=conversion_options
      6 )

c:\users\luiz\documents\github\nwb-conversion-tools\nwb_conversion_tools\nwbconverter.py in run_conversion(self, metadata, nwbfile_path, save_to_file, conversion_options)
    120         # If conversion_options is valid, procede to run conversions for DataInterfaces
    121         for interface_name, data_interface in self.data_interface_objects.items():
--> 122             data_interface.run_conversion(nwbfile, metadata, **conversion_options.get(interface_name, dict()))
    123
    124         # Save result to file or return object

c:\users\luiz\documents\github\nwb-conversion-tools\nwb_conversion_tools\baserecordingextractorinterface.py in run_conversion(self, nwbfile, metadata, stub_test)
     92             If True, will truncate the data to run the conversion faster and take up less memory.
     93         """
---> 94         recording_extractor = self.subset_recording(stub_test=stub_test)
     95         se.NwbRecordingExtractor.write_recording(
     96             recording_extractor,

c:\users\luiz\documents\github\nwb-conversion-tools\nwb_conversion_tools\baserecordingextractorinterface.py in subset_recording(self, stub_test)
     79                 **kwargs
     80             )
---> 81         return recording_extractor
     82
     83     def run_conversion(self, nwbfile: NWBFile, metadata: dict = None, stub_test: bool = False):

UnboundLocalError: local variable 'recording_extractor' referenced before assignment

@luiztauffer And you're running CED_example_data/Short example/M113_C4.smrx there? Still giving me the same error.
The conversion script works for the m365_pt1_590-1190secs-001.smrx file, however; minus metadata required to make the proper nwbfile.

@CodyCBakerPhD the problem is that for that file there are no Rhd channels. I'll add an assertion on the CEDRecordingExtractor side

@bendichter OK then, I understand why it didn't work on that first file; it's actually be design since it doesn't have rhd files.
Works well on the file that does have them. Should close Issue #15 when merged.


Addon stopped sending/collecting logs

Describe the bug
This might or might not be related to me going from my old RPi4 hw to a Yellow and also upgrading Homeassistant OS to 10.2. I have a hard time to pinpoint when this happened.
http://loki.mypersonaldomain.com:3100/loki/api/v1/push
To Reproduce
Steps to reproduce the behavior:

Configuring the addon with the loki url like this: http://loki.mypersonaldomain.com:3100/loki/api/v1/push. Loki instance is on another machine and confirmed working and reachable.  (This is the configuration made to the addon by me.)
Starting addon.
Addon starts normally.
No logs lines seems to be ingested or posted to loki.

Expected behavior
Add-on starts normally but no log files seems to be ingested. Nor transmitted to my Loki instance.
Logs
Debug-level logs
grpc_server_max_send_msg_size: 4194304
  grpc_server_max_concurrent_streams: 100
  grpc_server_max_connection_idle: 2562047h47m16.854775807s
  grpc_server_max_connection_age: 2562047h47m16.854775807s
  grpc_server_max_connection_age_grace: 2562047h47m16.854775807s
  grpc_server_keepalive_time: 2h0m0s
  grpc_server_keepalive_timeout: 20s
  grpc_server_min_time_between_pings: 5m0s
  grpc_server_ping_without_stream_allowed: false
  log_format: logfmt
  log_level: debug
  log_source_ips_enabled: false
  log_source_ips_header: ""
  log_source_ips_regex: ""
  log_request_at_info_level_enabled: false
  http_path_prefix: ""
  external_url: ""
  health_check_target: null
  disable: false
client:
  url: ""
  batchwait: 1s
  batchsize: 1048576
  follow_redirects: false
  backoff_config:
    min_period: 500ms
    max_period: 5m0s
    max_retries: 10
  timeout: 10s
  tenant_id: ""
  stream_lag_labels: ""
clients:
- url: http://loki.mypersonaldomain.com:3100/loki/api/v1/push
  batchwait: 1s
  batchsize: 1048576
  follow_redirects: false
  backoff_config:
    min_period: 500ms
    max_period: 5m0s
    max_retries: 10
  timeout: 10s
  tenant_id: ""
  stream_lag_labels: ""
positions:
  sync_period: 10s
  filename: /data/promtail/positions.yaml
  ignore_invalid_yaml: false
scrape_configs:
- job_name: journal
  pipeline_stages:
  - match:
      selector: '{container_name=~"homeassistant|hassio_supervisor"}'
      stages:
      - multiline:
          firstline: ^\x{001b}
  journal:
    max_age: 12h
    json: false
    labels:
      job: systemd-journal
    path: /var/log/journal
  relabel_configs:
  - source_labels: [__journal__systemd_unit]
    separator: ;
    regex: (.*)
    target_label: unit
    replacement: $1
    action: replace
  - source_labels: [__journal__hostname]
    separator: ;
    regex: (.*)
    target_label: nodename
    replacement: $1
    action: replace
  - source_labels: [__journal_syslog_identifier]
    separator: ;
    regex: (.*)
    target_label: syslog_identifier
    replacement: $1
    action: replace
  - source_labels: [__journal_container_name]
    separator: ;
    regex: (.*)
    target_label: container_name
    replacement: $1
    action: replace
  static_configs: []
target_config:
  sync_period: 10s
  stdin: false
limits_config:
  readline_rate: 10000
  readline_burst: 10000
  readline_rate_drop: true
level=info ts=2023-06-04T11:46:02.937566817Z caller=server.go:288 http=[::]:9080 grpc=[::]:45583 msg="server listening on addresses"
level=info ts=2023-06-04T11:46:02.93844613Z caller=main.go:121 msg="Starting Promtail" version="(version=2.6.1, branch=HEAD, revision=6bd05c9)"
level=debug ts=2023-06-04T11:46:04.358253927Z caller=logging.go:76 msg="GET /ready (200) 183.292µs"
level=debug ts=2023-06-04T11:48:04.36709367Z caller=logging.go:76 msg="GET /ready (200) 106.202µs"

Environment (please complete the following information):
Add-on version:  2.2.0
Home Assistant 2023.5.4
Supervisor 2023.04.1
Operating System 10.2
Frontend-version: 20230503.3
Additional context
This plugin has previously worked fine with this configuration.

Look at issue #221 this is the same issue ... systemd was upgraded to 252 in hassos 10.1 which breaks the promtail in this addon as it was build for systems <252.
I've forked the repo and "fixed" the issue.  Just need to deploy it as a local add on and remove this one till the maintainer fixes this in the way they see best

Thanks! I just realized and were in the process  of installing as I got your reply. And after finishing install... Works!
Thanks again.

Took me a while to notice that, but I'm affected by the same issue.


Move specs into an mdbook. Add CI for deploying.

I was reading through the spec today and figured I'd address this at the same time!
Closes #387.

I broke up tx_format.md a little into subchapters to make it a little easier to navigate from the sidebar. We could probably do the same for the VM Instruct Set categories in a follow-up PR.


Focus indicator for main Notebook toolbar cell focus indicator very large

It overlaps the run button next to it

dupe of #10714 10677

You opened so many guess I missed this one among the pile 😁


views (and scattermesh)

What a piece of work: Impressive examples and a real documentation!
I wanted to know if there is already a convenient way with MakiE to switch from 3D to 2D view?
Less crucial, I wonder if there is some plan to extend the possibilities of the meshscatter function. In  a call like
meshscatter(positions, color = colorsG, marker = sphere_mesh)

a set of different spheres is drawn with respect to different centers in the positions list. Would it be possible to generalize this for spheres with different radii? Analogously, it would be great to have such a possibility for attributes of different GeometryTypes: for instance Cylinders require 2 positions, etc.

I wanted to know if there is already a convenient way with MakiE to switch from 3D to 2D view?

You mean, view something with a 3D projection, and then view the same scene in orthographic projection?
meshscatter is basically just an optimization for map(a-> mesh(..., attribute = a), attributes). The optmization only works for exactly the same mesh per primitive. So you either just use multiple calls to mesh, or you're lucky and the attribute you're interested in is supported in meshscatter.
I see, that meshscatter is actually not documented yet, let me fix that!
Meanwhile, rotations, color and markersize are supported attributes for meshscatter, which all accept single values or an array of values. rotations accepts a Vec4f0 or a quaternion (Vec4f0 is just a representation of a quaternion I use for OpenGL. I think I'll refactor that pretty soon to just accept quaternions!)

Yes switching between 3D projection and orthographic projection for the same scene.
Thank you for your comments on meshscatter, I will have a more careful look to the possibilities with the attributes rotations,  color  and  markersize.

Btw, markersize can be Vector{Vec3f0}, so you can stretch it in each dimension ;)

To keep in mind: It seams that there is a problem with the stretching of the third dimension of the markersize. See the flat discs obtained by the small example
scene = Scene(resolution = (500, 500))
large_sphere = HyperSphere(Point3f0(0), 1f0)
positions = decompose(Point3f0, large_sphere)
colS = [Colors.RGBA{Float32}(rand(), rand(), rand(), 1.) for i = 1:length(positions)]
sizesS = StaticVector[Vec3f0(1., 1., 1.) for i = 1:length(positions)]
meshscatter(positions, color = colS, markersize = sizesS)
scene
![withmarkersize](https://user-images.githubusercontent.com/14992507/32666329-5ef5141a-c637-11e7-818d-9ed0de7eab45.png)

Oh, that's a bug in MakiE! I accidentally convert it to Vec2f0... Let me push a fix!

One example below of using arrays of attributes with meshscatter.
Everything is almost perfect but I am surprised by the darkness of the cylinders especially when the   perturbation factor below is high which make the directions pointing almost to the origin. It is perhaps due to a light centered at the origin ?

scene = MakiE.Scene(resolution = (900, 900))
# define points/edges
perturbfactor = 4e1
N = 3; nbfacese = 30; radius = 0.02
large_sphere = HyperSphere(Point3f0(0), 1f0)
positions = decompose(Point3f0, large_sphere, 30)
np = length(positions)
pts = [positions[k][l] for k = 1:length(positions), l = 1:3]
pts = vcat(pts, 1.1 * pts + randn(size(pts)) / perturbfactor) # light position influence ?
edges = hcat(collect(1:np), collect(1:np) + np)
ne = size(edges, 1); np = size(pts, 1)
# define markers meshes
meshC = GeometryTypes.GLNormalMesh(GeometryTypes.Cylinder{3, Float32}(
                                   GeometryTypes.Point3f0(0., 0., 0.),
                                   GeometryTypes.Point3f0(0., 0, 1.),
                                   Float32(1)), nbfacese)
meshS = GeometryTypes.GLNormalMesh(large_sphere, 20)
# define colors, markersizes and rotations
pG = [GeometryTypes.Point3f0(pts[k, 1], pts[k, 2], pts[k, 3]) for k = 1:np]
lengthsC = sqrt.(sum((pts[edges[:,1], :] .- pts[edges[:, 2], :]) .^ 2, 2))
sizesC = StaticVector[GeometryTypes.Vec3f0(radius, radius, lengthsC[i]) for i = 1:ne]
sizesC = StaticVector[Vec3f0(1., 1., 1.) for i = 1:ne]
colorsp = [Colors.RGBA{Float32}(rand(), rand(), rand(), 1.) for i = 1:np]
colorsC = [(colorsp[edges[i, 1]] + colorsp[edges[i, 2]]) / 2. for i = 1:ne]
sizesC = StaticVector[Vec3f0(radius, radius, lengthsC[i]) for i = 1:ne]
Qlist = zeros(ne, 4)
for k = 1:ne
    ct = GeometryTypes.Cylinder{3, Float32}(
                GeometryTypes.Point3f0(pts[edges[k, 1], 1], pts[edges[k, 1], 2], pts[edges[k, 1], 3]),
                GeometryTypes.Point3f0(pts[edges[k, 2], 1], pts[edges[k, 2], 2], pts[edges[k, 2], 3]),
                Float32(1))
    Q = GeometryTypes.rotation(ct)
    r = 0.5 * sqrt(1 + Q[1, 1] + Q[2, 2] + Q[3, 3]); Qlist[k, 4] = r
    Qlist[k, 1] = (Q[3, 2] - Q[2, 3]) / (4 * r)
    Qlist[k, 2] = (Q[1, 3] - Q[3, 1]) / (4 * r)
    Qlist[k, 3] = (Q[2, 1] - Q[1, 2]) / (4 * r)
end
rotationsC = AbstractVector[Vec4f0(Qlist[i, 1], Qlist[i, 2], Qlist[i, 3], Qlist[i, 4]) for i = 1:ne]
# plot
hm = MakiE.meshscatter(pG[edges[:, 1]], color = colorsC, marker = meshC,
                       markersize = sizesC,  rotations = rotationsC)
hp = MakiE.meshscatter(pG, color = colorsp, marker = meshS, markersize = radius)

r = linspace(-1.3, 1.3, 4); MakiE.axis(r, r, r)

I will try it out! Btw, StaticVector[...] is a pretty bad idea. It's not needed and just gives the array an abstract element type for no reason.

Oups, thanks. Do not hesitate to comment further..!

I do not know if this light problem may be related to this PR
Actually, the original test
using GLVisualize,GeometryTypes,ColorTypes
window = glscreen()
C = Cylinder3{Float32}([-1,-1,-1],[1,1,1],1)
_view(visualize(GLNormalMesh(C,100),color = RGBA{Float32}(1,0,0,1)))
renderloop(window)

gives me today a blalck cylinder..

Maybe, but I also think I found the issue, give me a sec.

Lol, I simply forgot the light uniforms :D Wouldn't have expected the effect to be so subtle, I guess an uninitialized variable is a pretty decent light source!

This looks pretty cool! I hope you will animate this :P

Perfect !!! Thanks again for all your work and your comments.
Just to conclude on the original subject, I wanted to mention that orthogonal projection views (by buttons or function calls)  are quite standard and very useful in many situations.
Of course, I understand that this is not a high priority but keep in mind that many naive users like me are used to such functionalities (mayavi window, view2d in matlab,  projection buttons in GLPlot ;-), etc.)

Yes I do actually have that implemented... just need to figure out how to bring it back ;)

Learning signals. So cool ! ;-)
# degine points/edges
N = 3; nbfacese = 20; radius = 0.05; randomα = false; movingc = true
randomperturb = true
baryc(a, b, t) = t * a + (1 - t) * b
tsignal = bounce(linspace(0f0, Float32(2π), 50))
psignal = bounce(linspace(0f0, Float32(2π), 50))
ttimesleep = 0.0; ptimesleep = 0.02
large_sphere = HyperSphere(Point3f0(0), 1f0)
positions = decompose(Point3f0, large_sphere, 20)
np = length(positions); ptsr = randn(np, N)

if randomperturb
    pts = map(psignal) do t
        sleep(ptimesleep)
        pts = [positions[k][l] for k = 1:length(positions), l = 1:3]
        vcat(pts, 1.4 * pts + ptsr / baryc(3, 200, abs(cos(t))))
    end
else
    pts = [positions[k][l] for k = 1:length(positions), l = 1:3]
    pts = vcat(pts, 1.2 * pts + ptsr / 200)
end
edges = hcat(collect(1:np), collect(1:np) + np)
ne = size(edges, 1); np *= 2
# define markers meshes
meshC = GeometryTypes.GLNormalMesh(GeometryTypes.Cylinder{3, Float32}(
                                   GeometryTypes.Point3f0(0., 0., 0.),
                                   GeometryTypes.Point3f0(0., 0, 1.),
                                   Float32(1)), nbfacese)
meshS = GeometryTypes.GLNormalMesh(large_sphere, 10)
# define colors, markersizes and rotations
if randomperturb
    pG = map(pts) do pts
        [GeometryTypes.Point3f0(pts[k, 1], pts[k, 2], pts[k, 3]) for k = 1:np]
    end
    lengthsC = map(pts) do pts
        sqrt.(sum((pts[edges[:,1], :] .- pts[edges[:, 2], :]) .^ 2, 2))
    end
    sizesC = map(lengthsC) do lengthsC
        [GeometryTypes.Vec3f0(radius, radius, lengthsC[i]) for i = 1:ne]
    end
else
    pG = [GeometryTypes.Point3f0(pts[k, 1], pts[k, 2], pts[k, 3]) for k = 1:np]
    lengthsC = sqrt.(sum((pts[edges[:,1], :] .- pts[edges[:, 2], :]) .^ 2, 2))
    sizesC = [GeometryTypes.Vec3f0(radius, radius, lengthsC[i]) for i = 1:ne]
end
#sizesC = [Vec3f0(1., 1., 1.) for i = 1:ne]

colr = rand(np, 3) #false
if randomα
    colorsp = map(tsignal) do t
        sleep(ttimesleep)
        [Colors.RGBA{Float32}(colr[i, 1], colr[i, 2], colr[i, 3], Float32(abs(cos(t)))) for i = 1:np]
    end
    colorsC = map(tsignal) do t
        sleep(ttimesleep)
        [Colors.RGBA{Float32}(mean(colr[edges[k, :], 1]), mean(colr[edges[k, :], 2]),
                              mean(colr[edges[k, :], 3]), Float32(abs(cos(t)))) for k = 1:ne]
    end
elseif movingc
    colr1 = rand(np, 3); colr2 = rand(np, 3); #1 .- colr1
    colorsp = map(tsignal) do t
        sleep(ttimesleep)
        [Colors.RGBA{Float32}(baryc(colr1[i, 1], colr2[i, 1], Float32(abs(cos(t)))),
                              baryc(colr1[i, 2], colr2[i, 2], Float32(abs(cos(t)))),
                              baryc(colr1[i, 3], colr2[i, 3], Float32(abs(cos(t)))),Float32(1)) for i = 1:np]
    end
    colorsC = map(tsignal) do t
        sleep(ttimesleep)
        [Colors.RGBA{Float32}(baryc(mean(colr1[edges[k, :], 1]), mean(colr2[edges[k, :], 1]), Float32(abs(cos(t)))),
                              baryc(mean(colr1[edges[k, :], 2]), mean(colr2[edges[k, :], 2]), Float32(abs(cos(t)))),
                              baryc(mean(colr1[edges[k, :], 3]), mean(colr2[edges[k, :], 3]), Float32(abs(cos(t)))),
                              Float32(1)) for k = 1:ne]
    end
else
    colorsp = [Colors.RGBA{Float32}(colr[i, 1], colr[i, 2], colr[i, 3], 1.) for i = 1:np]
    colorsC = [(colorsp[edges[i, 1]] + colorsp[edges[i, 2]]) / 2. for i = 1:ne]
end

if randomperturb
    rotationsC = map(pts) do pts
        Qlist = zeros(ne, 4)
        for k = 1:ne
            ct = GeometryTypes.Cylinder{3, Float32}(
            GeometryTypes.Point3f0(pts[edges[k, 1], 1], pts[edges[k, 1], 2], pts[edges[k, 1], 3]),
            GeometryTypes.Point3f0(pts[edges[k, 2], 1], pts[edges[k, 2], 2], pts[edges[k, 2], 3]),
            Float32(1))
            Q = GeometryTypes.rotation(ct)
            r = 0.5 * sqrt(1 + Q[1, 1] + Q[2, 2] + Q[3, 3]); Qlist[k, 4] = r
            Qlist[k, 1] = (Q[3, 2] - Q[2, 3]) / (4 * r)
            Qlist[k, 2] = (Q[1, 3] - Q[3, 1]) / (4 * r)
            Qlist[k, 3] = (Q[2, 1] - Q[1, 2]) / (4 * r)
        end
        [Vec4f0(Qlist[i, 1], Qlist[i, 2], Qlist[i, 3], Qlist[i, 4]) for i = 1:ne]
    end
else
    Qlist = zeros(ne, 4)
    for k = 1:ne
    ct = GeometryTypes.Cylinder{3, Float32}(
                GeometryTypes.Point3f0(pts[edges[k, 1], 1], pts[edges[k, 1], 2], pts[edges[k, 1], 3]),
                GeometryTypes.Point3f0(pts[edges[k, 2], 1], pts[edges[k, 2], 2], pts[edges[k, 2], 3]),
                Float32(1))
    Q = GeometryTypes.rotation(ct)
    r = 0.5 * sqrt(1 + Q[1, 1] + Q[2, 2] + Q[3, 3]); Qlist[k, 4] = r
    Qlist[k, 1] = (Q[3, 2] - Q[2, 3]) / (4 * r)
    Qlist[k, 2] = (Q[1, 3] - Q[3, 1]) / (4 * r)
    Qlist[k, 3] = (Q[2, 1] - Q[1, 2]) / (4 * r)
    end
    rotationsC = [Vec4f0(Qlist[i, 1], Qlist[i, 2], Qlist[i, 3], Qlist[i, 4]) for i = 1:ne]
end
if randomperturb
    pGG = map(pG) do pG
        pG[edges[:, 1]]
    end
else
    pGG = pG[edges[:, 1]]
end
# plot
hm = MakiE.meshscatter(pGG, color = colorsC, marker = meshC,
                       markersize = sizesC,  rotations = rotationsC)
hp = MakiE.meshscatter(pG, color = colorsp, marker = meshS, markersize = radius)
r = linspace(-1.3, 1.3, 4); MakiE.axis(r, r, r)
MakiE.center!(scene)


Feature request - internal sound source... And mixed... Mic and internal sound...

very nice and simple app... working perfectly on my redmi note 4 Chinese version android 6.0... could you add internal sound option ? either without root or using root... since my android isn't nougat... oreo... nor pie... i think it is possible... thanks in advance !

As the Play Store description and app state, that is not possible. There is no way to record internal audio.


Percentage Chart fix

Explanation About What Code Achieves:

The container for PercentageChart was appending on every resize event. Just added a line to clear the previous div similar to BaseChart.

Screenshots/GIFs:

Steps To Test:

Resize your browser window

TODOs:

None

Also, I think we should throttle the resize handler, it shouldn't be called on every resize event. Maybe we can use ResizeObserver

this fix really needs to be either marked as addressed in 1.1 or be rolled in. Super bad issue with simple fix.

So we've moved to entirely SVG rendering in v1.1, (to be specific, title, legends, and percentage charts were previously HTML elements). So this obviates the need for any specific handling in percentage charts.
Closing.


Adds more config options to .pretterrc

Closes #158
Before this PR is finished/merged, we should confirm that our editors "agree" on using the .prettierrc in the repo.  And then we should run it on all files so we're in a consistent state.  But we should do this after we settle down more ongoing development, to reduce churn.

This PR was replaced with PR #170.


Add filter for select parent class in create class dialog

Match the functionality of the interface portion and add a search/filter field when selecting the parent class

Why not, I'll add that

Added, just need to wait for the next build :-)

Great, thanks! Can't wait for this next build :)
On Mon, 17 Jun 2024, 10:29 am Mikael Holmstrom, @.***>
wrote:

image.png (view on web)
https://github.com/opengds/OpenGDS/assets/6456318/f355b982-f451-4667-9a8e-3c887b1504d7
Added, just need to wait for the next build :-)
—
Reply to this email directly, view it on GitHub
https://github.com/opengds/OpenGDS/issues/102#issuecomment-2172861363,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ANASXNDEZUQ4O455F5UMXV3ZH2UAFAVCNFSM6AAAAABIRTD3GOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZSHA3DCMZWGM
.
You are receiving this because you authored the thread.Message ID:
@.***>


Google Earth Enterprise example not working

https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=Google Earth Enterprise.html
It looks like neither the terrain or imagery are loading.   @tfili any ideas?  Is the data server not up anymore?

Duplicate of #6589 (which you also wrote :smile:)


Bluetooth: Conn: Bluetooth stack becomes unusable when communicating with both centrals and peripherals

Describe the bug
There is a specific case in which the Bluetooth stack seems to become stuck in a state where it will not accept/initiate any new connections. The following warning is printed in the console:
<wrn> bt_hci_core: opcode 0x2005 status 0x0c
I'm using an nRF52840 and NCS 2.1. The only way to get out of this state seems to be resetting the device. Below the steps I found which reproduces this state consistently using an example application.
To Reproduce

Grab two nRF52840 devkits and an iPhone that has nRFConnect for mobile installed.
Flash the "central_and_peripheral_hr" example on one devkit. Flash the "peripheral_hr" example on the other devkit.
Turn on the central_and_peripheral_hr devkit and connect to its console.
Get your phone and connect to "Nordic_HR". Make sure that the connection stays on for the following steps.
Turn on the "peripheral_hr" devkit. Make sure that it connects to the "central_and_peripheral_hr" devkit.
Once the connection has been established between the two devkits, turn off the "peripheral_hr" (important)
Close the connection with the phone through nRF Connect.
The Bluetooth stack is now in a state where it wont accept new connections (incoming/outgoing). Observe the console output in the section below.

Impact
This is not limited to the heartrate example. We initially discovered this bug in our own application and reproduced it using a sample so it would be easier to fix. Our users have to restart their gateways when configuring them to make sure that they still work properly. This feels like a pretty severe bug.
Logs and console output
*** Booting Zephyr OS build v3.1.99-ncs1-rc1  ***
Starting Bluetooth Central and Peripheral Heart Rate relay example
I: 8 Sectors of 4096 bytes
I: alloc wra: 1, fb8
I: data wra: 1, 164
I: SoftDevice Controller build revision:
I: b3 30 26 8d c5 f3 4a bd |.0&...J.
I: f4 21 f5 83 2d de 9c f2 |.!..-...
I: 5e da 68 ec             |^.h.
I: No ID address. App must call settings_load()
Scanning started
Advertising started
W: opcode 0x200a status 0x09
Connected: 48:79:82:C7:36:F1 (random).  <--- MOBILE PHONE
W: Ignoring data for unknown channel ID 0x003a
Filters matched. Address: F1:CE:C4:C1:92:BA (random) connectable: 1
Connected: F1:CE:C4:C1:92:BA (random) <--- HR PERIPHERAL
Security failed: F1:CE:C4:C1:92:BA (random) level 1 err 2
The discovery procedure succeeded
Heart Rate Sensor body location: Chest
Heart Rate Measurement notification received:

        Heart Rate Measurement Value Format: 8 - bit
        Sensor Contact detected: 1
        Sensor Contact supported: 1
        Energy Expended present: 0
        RR-Intervals present: 0

        Heart Rate Measurement Value: 92 bpm

Disconnected: F1:CE:C4:C1:92:BA (random) (reason 8) <--- HR PERIPHERAL
Disconnected: 48:79:82:C7:36:F1 (random) (reason 19). <--- MOBILE PHONE
Filters matched. Address: F1:CE:C4:C1:92:BA (random) connectable: 1 <--- HR PERIPHERAL
W: opcode 0x2005 status 0x0c
Connecting failed

Environment (please complete the following information):

OS: MacOS
Zephyr OS build v3.1.99-ncs1-rc1

can confirm I am able to reproduce it, will look into it asap

I've narrowed it down, I think it's an issue with the controller rather than the host, as bt_conn_le_create returns -EIO which is an HCI error. Still digging..

I've narrowed it down, I think it's an issue with the controller rather than the host, as bt_conn_le_create returns -EIO which is an HCI error. Still digging..

I've looked up the HCI warning in the BLE spec and it gave me these 'translations':
bt_hci_core: opcode 0x2005 status 0x0c
0x2005 for the BT_HCI_OP_LE_CREATE_CONN command, and 0x0C should mean "NOT ALLOWED". Not sure if that helps you out in any way?

Thanks, yeah I know it's not allowed (you can check out hci_err.h in zephyr it has the list).
I think this requires more digging in the softdevice controller, it looks like a bug there. I tried to make it work with the zephyr LL but there were some issues, I'll try again to double-check.
The same opcodes are sent, in the same order for both cases (scanning+connecting after boot,  scanning+connecting after both devices disconnected), but in the last case, the BT_HCI_OP_LE_CREATE_CONN command is the only one returning DISALLOWED, probably a bug in their state machine.

okay, it works with the zephyr link layer (no bug) with these changes in the prj.conf:
CONFIG_BT_LL_SOFTDEVICE=n
CONFIG_BT_LL_SW_SPLIT=y
CONFIG_BT_CTLR_RX_PRIO_STACK_SIZE=1024
CONFIG_BT_MAX_CONN=10

So this seems to be a bug in the Softdevice Controller. could you open a bug in the devzone and link it here? I'll close this issue.
I have already pinged the controller team, but they'll need the ticket number that's why.

Just as a last comment, I've used the Zephyr LL as well and the bug also seems to disappear on my end.

could you open a bug in the devzone and link it here? I'll close this issue.

https://devzone.nordicsemi.com/f/nordic-q-a/92177/bluetooth-conn-bluetooth-stack-becomes-unusable-when-communicating-with-both-centrals-and-peripherals

I've found that there actually are two issues in Host that make the incorrect behavior as described above.

Host automatically resumes advertising when peripheral role is enabled. It does not check role stored in connection object hence may starve central role. In described scenario, Host resumes advertising while an application resumes scanning. I've prepared a PR for this case: https://github.com/zephyrproject-rtos/zephyr/pull/51256.
Advertising resume in Host is limited operation in comparison to regular advertising enable operation. Limited in a way, there is no device address check/update before the advertising is resumed. When scanner is resumed and identity address is not used, Host uses NRPA address for a device when scanning. This is address is different than static random address. When connection in peripheral role is disconnected, Host resumes advertising and continues use of address set by scan resume.
Now, assume that an application starts a connection in central role. Both functions bt_le_create_conn_ext and bt_le_create_conn_legacy call bt_id_set_create_conn_own_addr. The last one mentioned function attempts to change an address to static random address: https://github.com/zephyrproject-rtos/zephyr/blob/e104e031b7d3ddacd2b90527fff438fc4056b72a/subsys/bluetooth/host/id.c#L1519-L1528. Unfortunately that will not happen, because there is an advertising running and Controller returns error BT_HCI_ERR_CMD_DISALLOWED for Host command: BT_HCI_OP_LE_SET_RANDOM_ADDRESS.

It looks to me that, to fix second issue we need to run Bluetooth address setup before advertising is resumed. Unfortunately that would require storage of some information that are provided to Host when advertising is started by bt_le_adv_start.

@jori-nordic @Thalley @alwa-nordic @sjanc what is your opinion?

Sounds like you've successfully fixed the first issue.
For the second issue, this is only an issue if BT_EXT_ADV=n, right? For BT_EXT_ADV=y BT_HCI_OP_LE_SET_RANDOM_ADDRESS can be called, even when advertising:

If the Host issues this command when any of advertising (created using legacy advertising commands), scanning, or initiating are enabled, the Controller shall return the error code Command Disallowed (0x0C).

We could for BT_EXT_ADV=n simply reject calls to bt_conn_le_create if we are advertising or scanning, or vice versa reject calls to bt_le_adv_start if we are currently scanning or connecting.

@Thalley yes, first issue is fixed.
Referring to second one and you comment.
In my humble opinion rejection of bt_conn_le_create is last option. The issue happens only when a peripheral connection is closed when scanning is in progress. In other words, when Host resumes advertising for a closed peripheral role connection.
If user re-enables advertising, there should be no problem because an address should be changed to static random before host requests Controller to start advertising again.

@carlescufi  re-openning this is not completed. There is still an issue with BT adresses when resume advertising. I've described it here: https://github.com/zephyrproject-rtos/zephyr/issues/50438#issuecomment-1277621789

It looks to me that, to fix second issue we need to run Bluetooth address setup before advertising is resumed. Unfortunately that would require storage of some information that are provided to Host when advertising is started by bt_le_adv_start.

I agree.

Related to https://github.com/zephyrproject-rtos/zephyr/issues/30699

I've found that there actually are two issues in Host that make the incorrect behavior as described above.

Host automatically resumes advertising when peripheral role is enabled. It does not check role stored in connection object hence may starve central role. In described scenario, Host resumes advertising while an application resumes scanning. I've prepared a PR for this case: Bluetooh: Host: conn: Resume adv after disconn for periph role only #51256.
Advertising resume in Host is limited operation in comparison to regular advertising enable operation. Limited in a way, there is no device address check/update before the advertising is resumed. When scanner is resumed and identity address is not used, Host uses NRPA address for a device when scanning. This is address is different than static random address. When connection in peripheral role is disconnected, Host resumes advertising and continues use of address set by scan resume.
Now, assume that an application starts a connection in central role. Both functions bt_le_create_conn_ext and bt_le_create_conn_legacy call bt_id_set_create_conn_own_addr. The last one mentioned function attempts to change an address to static random address: https://github.com/zephyrproject-rtos/zephyr/blob/e104e031b7d3ddacd2b90527fff438fc4056b72a/subsys/bluetooth/host/id.c#L1519-L1528
. Unfortunately that will not happen, because there is an advertising running and Controller returns error BT_HCI_ERR_CMD_DISALLOWED for Host command: BT_HCI_OP_LE_SET_RANDOM_ADDRESS.

It looks to me that, to fix second issue we need to run Bluetooth address setup before advertising is resumed. Unfortunately that would require storage of some information that are provided to Host when advertising is started by bt_le_adv_start.

@ppryga-nordic could you please open a new issue for this point 2., and then close this one? This present one was about something else, and it is confusing to reuse it.

@carlescufi @jori-nordic  New issue created: #52059.


ARROW-13044: [Java] Change UnionVector and DenseUnionVector to extend AbstractContainerVector

Currently UnionVector and DenseUnionVector do not extend any base class, only implement the FieldVector interface. This change makes these vectors extend AbstractContainerVector, which is a subclass of BaseValueVector. This allows a the union vectors to be used in extension types as the underlying vector storage.
The current naming of child fields in the union vector ignores the original name and generates a new name based on type (and typeid). This has been changed to respect the original Field name if given, and only if the name is empty it will generate a new name as before. Some current tests add child Fields with empty names, so this preserves the original behavior.
Included tests to verify the added methods from AbstractContainerVector.

@BryanCutler Thanks for the PR.
According our current code base, it seems that AbstractContainerVector is not a subclass of BaseValueVector.
Does it prevent UnionVector from being used in extension types?

Ah you're right @liyafan82 , I must have mixed it up with ValueVector, so probably extension types won't work for struct and union types. I still think it's right for UnionVector to extend AbstractContainerVector, but probably not BaseValueVector. Maybe the constraint for ExtensionTypeVector should be relaxed to ValueVector? What do you and @lidavidm think?
cc @emkornfield

I think that's fine, ValueVector is just the interface for BaseValueVector anyways? I admit I didn't look too closely. I don't remember why I specified the impl instead of the interface originally.

Thanks @lidavidm , I made https://issues.apache.org/jira/browse/ARROW-13076 for ExtensionTypeVector to use ValueVector.
If this PR looks ok for union vectors, I'll follow up after to change the ExtensionTypeVector. That should enable structs and unions and I'll add some tests there also.

merged to master


Can it support multi- menus, using different hot key..

Can it support multi - menus, using different hot key..
eg.
<leader>fzf:  pop  fZF menus,
<leader>vim:  pop vim menus,
<leader>xxx:  pop  xxx feature's menu
<leader>ggg: pop the global menu,
and so on.
when i use different  features, I just pop up the menus that i want.

Hi @hawkinchina,
you are describing here something I want to implement, I was just waiting for somebody to ask it, so far so good :).
Supporting sub-menus sounds the good way to address your request, so you could have the global menu opening on leader key pressure, to display FZF menu, vim menu, ... whatever you want to map. Following your example, pressing leader key would open global menu, and FZF could be accessible with f for FZF, v for Vim, just choose the right key binding.
I think you should be able to creating different calls to access directly to your sub-menus if I add a dictionary argument storing the mapping to the entry function:
nnoremap <silent> <leader>f :call leaderMapper#start(g:leaderMenu['f']) "<Space>"<CR>
vnoremap <silent> <leader>f :call leaderMapper#start(g:leaderMenu['f']) "<Space>"<CR>

I'll give a try when I'll implement this feature, likely during the week, else during the weekend. Does it address what you got in mind?

That's great....:)

Hi there,
I pushed on master the sub-menu support. Please take a look to the README and tell me if it's good to you.
I tried also different binding to call a menu, but I wasn't able to trigger the start function. Anyway now you can pass directly to the start function a menu under JSON format in this way:
let fzfMenu = {'name':  "",
             \'f': [":Files",                       "FZF file search"],
             \'b': [":Buffers",                  "FZF buffer search"],
             \'s': [":BLines",                   "FZF text search into current buffer"],
             \'S': [":Lines",                     "FZF text search across loaded buffers"],
             \'g': [":BCommits",             "FZF git commits of the current buffer"],
             \'G': [":Commits",               "FZF git commits of the repository"],
             \}

nnoremap <silent> <leader> :call leaderMapper#start(fzfMenu) "<Space>"<CR>
vnoremap <silent> <leader> :call leaderMapper#start(fzfMenu) "<Space>"<CR>

Maybe you could try to find how to bind a dedicated to another key binding. For me only space sounds to work, I don't know why 🤔.


Thank you

At first I was confused by "not totally perfect" documentation and long service name, and strange api, and not loading es6 modules, and nightmare source code.  But now, when I finally got this to work, despite that problem with es6 modules, I realise what a genius you are, the Author! Thank you, Thank you, Thank you thousand times!!!
BTW, if someone else tries to lazy-load es6 modules:
import('path/to/your/module').then( () => { $ocLazyLoad.inject('nameOfAngularModule') } )

Just to add some information to the pool here, the safest thing for us seems to be:
$ocLazyLoad.toggleWatch(true);
importModule()
  .then(() => $ocLazyLoad.inject(module))
  .then(() => {
    $ocLazyLoad.toggleWatch(false);
    deferredModule.resolve($state.get(name));
  });

Because, if you don't toggle module watch on and off, we found that new (as in not required by any modules that were loaded in the initial load) third party module dependencies aren't always instantiated correctly.


Update readme

Update README based on current project specifications

Codecov Report

Merging #49 (08201c0) into master (bb1d462) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master      #49   +/-   ##
=========================================
  Coverage     72.15%   72.15%
  Complexity      399      399
=========================================
  Files            70       70
  Lines          1232     1232
  Branches        125      125
=========================================
  Hits            889      889
  Misses          311      311
  Partials         32       32

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 bb1d462...08201c0. Read the comment docs.


.gitmodule: Hotfix jethro revision

@agherzan @floion
Signed-off-by: Theodor Gherzan<EMAIL_ADDRESS>

Reviewed 2 of 2 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from the review on Reviewable.io

Reviewed 2 of 2 files at r1.
Review status: :shipit: all files reviewed at latest revision, all discussions resolved, all commit checks successful.

Comments from the review on Reviewable.io


Imageruler revamp

As discussed in #25 and agreed on during discussion on 3/21, it would be beneficial to simplify the imageruler API and extend testing, so that e.g. automated usage becomes viable. This PR is the follow-up from that discussion.
The changes in this PR include,

update and simplify the implementation of the core imageruler algorithm, going from ~1000 LoC to ~600
adds a scheme for ignoring edges of large features only, addressing #22
adds comprehensive testing for the algorithm, including more than 200 new tests
updates the package so that it can easily be deployed as a pypi project (this has not yet been done)
adds automatic docs, which can be previewed at https://mfschubert.github.io/imageruler/readme.html. This includes two new pages demonstrating length scale measurement on actual TO-generated designs, and one demonstrating advanced usage.

With these changes, #25, #24, #23, and #22 can be considered resolved.
For #22 specifically, I created a notebook which shows how the new ignore scheme addresses the issue.
@oskooi @stevengj @mawc2019 @ianwilliamson

Nice work! Is there any way to mark the moved / renamed files as such? This would help condense the diffs.

This PR does not contain the function for computing the minimum lengthscale of void regions and the function for computing the overall minimum lengthscale. In the current main branch, the two functions are minimum_length_void() and minimum_length(). I do not think these two functions should be omitted, especially the second one, which generally has lower computational cost compared with computing both solid and void minimum lengthscales and then taking the minimum. The corresponding lengthscale violation functions are also not included in this PR.

This PR does not contain the function for computing the minimum lengthscale of void regions and the function for computing the overall minimum lengthscale. In the current main branch, the two functions are minimum_length_void() and minimum_length(). I do not think these two functions should be omitted, especially the second one, which generally has lower computational cost compared with computing both solid and void minimum lengthscales and then taking the minimum. The corresponding lengthscale violation functions are also not included in this PR.

Yes, this was a judgement call---to eliminate redundant functionality, in service of a simpler API for which consistency and correctness is easier to ensure.
The overall minimum length scale can be computed by min(minimum_length_scale(x)), and e.g. length scale violations for void can be computed by length_scale_violations_solid(~x, length_scale). We could add functions with these implementations (i.e. trivial wrappers for existing functions), but I think it is counter to the objective if we were to add new functions that have different implementations.

The overall minimum length scale can be computed by min(minimum_length_scale(x)), and e.g. length scale violations for void can be computed by length_scale_violations_solid(~x, length_scale).

Yes, I understand these two functions can be trivially implemented in this way, and I do not insist on adding this trivial wrapper for void or not, but I prefer not to add the trivial wrapper for overall minimum lengthscale as min(minimum_length_scale(x)). Instead, I still prefer a function for overall minimum lengthscale with the previous open-close approach, which has lower computational cost than computing the two lengthscales and taking the minimum. This advantage is not obvious in our test examples, which only involve design patterns with small arrays. But for design patterns with large arrays, the difference may be obvious, especially in the cases where solid and void minimum lengthscales require very different numbers of binary searches.

We could add functions with these implementations (i.e. trivial wrappers for existing functions), but I think it is counter to the objective if we were to add new functions that have different implementations.

If the overall minimum lengthscale is added as a user function, API does not depend on whether it is implemented by the trivial approach or the open-close approach. In addition, I think a new function with different implementation is not something that should be avoided if this different implementation has advantage.

I think a new function with different implementation is not something that should be avoided if this different implementation has advantage.

My philosophy here is that the additional code and complexity constitutes a disadvantage, and we have to balance the pros against the cons. I think we may have an opportunity to discuss on Thursday.
In any case, with regards to performance there are some improvements with the new code. Here is a benchmarking snippet:
def separated_circles(separation_distance: int) -> onp.ndarray:
    left_circle = imageruler.get_kernel(80)
    right_circle = imageruler.get_kernel(60)
    right_circle = onp.pad(right_circle, ((10, 10), (0, 0)))

    circles = onp.concatenate(
        [left_circle, onp.zeros((80, separation_distance)), right_circle],
        axis=1,
    )
    circles = onp.pad(circles, ((10, 10), (10, 10))).astype(bool)
    return circles

print("Using `minimum_length`")
%timeit imageruler.minimum_length(separated_circles(1))
%timeit imageruler.minimum_length(separated_circles(5))
%timeit imageruler.minimum_length(separated_circles(10))
%timeit imageruler.minimum_length(separated_circles(20))

print("Using `minimum_length_solid_void`")
%timeit imageruler.minimum_length_solid_void(separated_circles(1))
%timeit imageruler.minimum_length_solid_void(separated_circles(5))
%timeit imageruler.minimum_length_solid_void(separated_circles(10))
%timeit imageruler.minimum_length_solid_void(separated_circles(20))

print("")
for dim in [1, 5, 10, 20]:
  print(f"Separation distance = {dim}")
  print(f"  Absolute minimum length scale: {imageruler.minimum_length(separated_circles(dim))}")
  print(f"  Minimum (solid, void): {imageruler.minimum_length_solid_void(separated_circles(dim))}")

With the existing implementation, this prints
Using `minimum_length`
308 ms ± 90.4 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)
225 ms ± 4.19 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
204 ms ± 20.2 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)
319 ms ± 73.9 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
Using `minimum_length_solid_void`
408 ms ± 5.92 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
448 ms ± 8.21 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
398 ms ± 80.5 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
504 ms ± 103 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

Separation distance = 1
  Absolute minimum length scale: 3.513671875
  Minimum (solid, void): (59.974609375, 3.513671875)
Separation distance = 5
  Absolute minimum length scale: 5.447265625
  Minimum (solid, void): (59.974609375, 5.447265625)
Separation distance = 10
  Absolute minimum length scale: 10.474609375
  Minimum (solid, void): (59.974609375, 10.474609375)
Separation distance = 20
  Absolute minimum length scale: 20.529296875
  Minimum (solid, void): (59.974609375, 20.529296875)

As you said, there is some performance benefit for minimum_length (approaching 2x). However, running the same code using the new implementation, we get
Using `minimum_length_scale`
12.3 ms ± 1.16 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
7.65 ms ± 179 µs per loop (mean ± std. dev. of 7 runs, 1 loop each)
8.92 ms ± 239 µs per loop (mean ± std. dev. of 7 runs, 1 loop each)
17.8 ms ± 9.45 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

Separation distance = 1
  Minimum (solid, void): (60, 1)
Separation distance = 5
  Minimum (solid, void): (60, 5)
Separation distance = 10
  Minimum (solid, void): (60, 10)
Separation distance = 20
  Minimum (solid, void): (60, 20)

So, there is a more than 10x performance improvement with the new implementation.

there is a more than 10x performance improvement with the new implementation.

Nice test and great improvement! The new implementation indeed runs much faster than the old implementation, but the advantage of the open-close approach over the min(minimum_length_scale(x)) approach needs to be gauged within the same implementation, as you did for the old implementation. I believe that, just like their counterparts in the old implementation, if the open-close approach is added in this new implementation, it would be faster than its own min(minimum_length_scale(x)) approach.

there is a more than 10x performance improvement with the new implementation.

Nice test and great improvement! The new implementation indeed runs much faster than the old implementation, but the advantage of the open-close approach over the min(minimum_length_scale(x)) approach needs to be gauged within the same implementation, as you did for the old implementation. I believe that, just like their counterparts in the old implementation, if the open-close approach is added in this new implementation, it would be faster than its own min(minimum_length_scale(x)) approach.

Yes, I agree with this.

If performance is not too critical, then the extra code complexity of adding the open–close algorithm might not be worth it for a factor-of-two improvement, at least at the current scales where we expect to apply this code.   So, the simplicity of leaving it out might be better.
However, if we leave out this optimization, it would be worth adding a comment to the code mentioning this possibility if we want to improve performance in the future.

I just talked with Steven and now agree with removing the open-close approach.

LGTM.
I noticed that the three notebooks (to_designs.ipynb, simple_shapes.ipynb, and advanced.ipynb) do not include the outputs from actually running them. Perhaps this was intentional?

Correct, to view the output one should look at the docs page, which you can preview here: https://mfschubert.github.io/imageruler/readme.html
Docs are automatically generated when there is a push to main branch, and notebook outputs being stripped is actually enforced by one of the pre-commit rules. This way, we avoid having large (code) files as part of the repo.


ORC-1512: Drop Java 8/11 and make Java 17 by default

What changes were proposed in this pull request?
This PR aims to drop Java 8 and 11 support and make Java 17 as the default and minimum Java version for Apache ORC 2.0.0.
This PR also upgrade GitHub Action test pipelines and Dockefiles.

Update GitHub Action Java Versions to Java 17 and 21.
Change GitHub Action Java Distribution to Azul Zulu from Eclipse Temurin because temurin doesn't have Java 21 yet.
Update Dockerfiles to use Java 17 and 21
Delete CentOS7 and Debian10 which requires non-trivial Java installations.

Why are the changes needed?
Apache ORC 2.0 is aligned with Apache Spark 4.0 which dropped Java 8 and 11.

https://issues.apache.org/jira/browse/SPARK-45315 (Drop JDK 8/11 and make JDK 17 by default)

In general, there are some extended support period for Java 11. However, Oracle's Premier Support ends this month, September 2023.

https://www.oracle.com/java/technologies/java-se-support-roadmap.html

How was this patch tested?
Pass the CIs

Thank you for your review and comments, @wgtmac .
That's true, and Yes, that's intentional.
We need to recommend them to use Apache ORC 1.9.x line instead of ORC 2.0.0.
For Apache Hive community, I know that they are going to release Apache Hive 4.0.0 soon, but it's still based on Apache ORC 1.8.3, not even Apache ORC 1.8.6.

Let me merge this to proceed along with our one of the biggest downstream projects, Apache Spark project.


Godot 4.0 beta 10 .NET 6 / mono crash loading project (seems unrelated to other similar issues)

Godot version
Godot_v4.0-beta10_mono_win64
System information
Windows 10
Issue description
I can't share my project because it uses assets that I'm not legally able to share, and it's also pretty big and therefore rather unhelpful for debugging an editor crash, but I will try to make a minimal reproduction project soon over the next few days.
There are a lot of issues with titles with similar wording, but I tried to look at all of them and none of them seem to be my issue.
I have been closely following the progression of Godot 4.0 with this project.  I started it in an early beta (I think beta 2?) and have updated it with every beta update that has come out.  Beta 8 worked fine, I missed beta 9, and beta 10 crashed, so I tried beta 9 and beta 9 worked fine also.  Therefore, the issue I am facing seems to have been introduced in beta 10.
I have never built Godot from source and historically I have had extreme difficulty building C++ projects on this computer.  I plan to try because I know I will be able to find the bug if I can just figure out how to compile Godot myself, as there were only 90 commits between betas 9 and 10 and I am perfectly willing to isolate them one-by-one until I find it.
I forgot where Godot stores its logs so I just ran the version that spawns a console instead so I could see what was causing the crash, and this is the last bit of output (posted at the end of this report).  I know this is not very helpful but I plan to add more information over the next day or two as I try to debug it myself.  Like I said, hopefully I can figure out how to build Godot myself because then I can be very helpful.
It looks like at least part of the error was due to the recent merge that added a default parameter to ProjectSettings.GetSetting (which I very much appreciate having that new default parameter, so thank you!)... I will try updating my code right after I submit this report and see if the crash error changes at all.
ERROR: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.TypeInitializationException: The type initializer for 'Amy.AmysGameCollection.Character2DSV' threw an exception.
 ---> System.MissingMethodException: Method not found: 'Godot.Variant Godot.ProjectSettings.GetSetting(System.String)'.
   at Amy.AmyUtil.InitLayers(String category, Int32 layerCount)
   at Amy.AmyUtil.Init2DPhysicsLayers() in D:\Godot\Projects\AmysGameCollection\Scripts\Amy\AmyUtil.cs:line 2015
   at Amy.AmyUtil.GetPhysics2DLayerNumberByName(String name, Boolean ignoreNonexistent) in D:\Godot\Projects\AmysGameCollection\Scripts\Amy\AmyUtil.cs:line 1212
   at Amy.AmysGameCollection.Character2DSV..cctor() in D:\Godot\Projects\AmysGameCollection\Scenes\Characters\Character2DSV.cs:line 210
   --- End of inner exception stack trace ---
   at Amy.AmysGameCollection.Character2DSV.GetGodotMethodList() in D:\Godot\Projects\AmysGameCollection\Godot.SourceGenerators\Godot.SourceGenerators.ScriptMethodsGenerator\Amy.AmysGameCollection.Character2DSV_ScriptMethods.generated.cs:line 15
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Godot.Bridge.ScriptManagerBridge.GetMethodListForType(Type type) in /root/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs:line 761
   at Godot.Bridge.ScriptManagerBridge.UpdateScriptClassInfo(IntPtr scriptPtr, godot_bool* outTool, godot_array* outMethodsDest, godot_dictionary* outRpcFunctionsDest, godot_dictionary* outEventSignalsDest, godot_ref* outBaseScript) in /root/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/Bridge/ScriptManagerBridge.cs:line 593
   at: godotsharp_pusherror (modules/mono/glue/runtime_interop.cpp:1223)
Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at Godot.NativeInterop.NativeFuncs.godotsharp_internal_reload_registered_script(IntPtr)
   at Godot.Bridge.ScriptManagerBridge.CreateScriptBridgeForType(System.Type, Godot.NativeInterop.godot_ref*)
   at Godot.Bridge.ScriptManagerBridge.GetOrCreateScriptBridgeForType(System.Type, Godot.NativeInterop.godot_ref*)
   at Godot.Bridge.ScriptManagerBridge.GetOrCreateScriptBridgeForPath(Godot.NativeInterop.godot_string*, Godot.NativeInterop.godot_ref*)

Steps to reproduce
Open my project in Godot 4.0 beta 10.
Minimal reproduction project
(Coming soon, please give me a few days to try to make one)

Given the error message, the likely culprit is 5aa243f9da1c8ae425ae5b6706fe889f6e301959, which added an optional default_value argument to ProjectSettings.get_setting().
I'm not so familiar with .NET but I assume you have existing assemblies compiled with a previous version of Godot where the signature was GetSetting(System.String), when in beta 10 it should be GetSetting(System.String, Variant).
Since it crashes on start, I assume AmyUtil.cs is a [Tool] script, and since it's now invalid it raises an exception.
Deleting the .mono folder in the project folder should let you open it in beta 10, and compile with the new version of GetSetting.
@godotengine/dotnet It would be better if the editor could still be opened when a tool script is raising an exception, so that users can recompile with the new version without having to delete assemblies manually.

Thank you for your quick response!  Deleting .godot/mono (which used to be .mono) allows me to load my project in the new beta and rebuild it successfully!
I have been trying to make a minimal reproduction project anyway in order to prove the cause of the crash.  I don't want to abandon this issue just because it no longer affects me personally.  However, I have not yet been able to cause a crash intentionally in a new project.  AmyUtil is not actually a [Tool] script, but the static method from AmyUtil that calls ProjectSettings.GetSetting using the old signature is itself called from the constructor (actual C# class constructor, not _Ready) of another scene which was opened in another scene editor tab in Godot at the time I saved and built previously.  I think it being in the constructor of a scene opened in the editor is why Godot is running that code when it opens the project despite it not being a [Tool] script (to construct the open scene tree to display in the editor).
However, I have made a repro project using this information and it still won't crash... I am still trying, I just wanted to update.

You're right, I didn't notice it was a static constructor!  The offending code was this:
static Character2DSV()
{
    // ...
    LayerNumberGround = AmyUtil.GetPhysics2DLayerNumberByName("Ground");
    // ...
}

And AmyUtil.GetPhysics2DLayerNumberByName is a static method that used the old signature of ProjectSettings.GetSetting.  I will wrap static constructors in try...catch as you suggest in order to prevent future crashes as the API evolves.
Thank you both!
Would a minimal reproduction project still be helpful?

Duplicate of https://github.com/godotengine/godot/issues/45723?

Seems so.

Would a minimal reproduction project still be helpful?

I believe with what was established so far, making a reproduction project shouldn't be too hard, but as neikeq mentions this might not be solvable, it may not be needed. I do hope we can find a workaround though.
Closing to consolidate in #45723.


Does not load plugins

Any idea? (windows 7 x64 and node 0.12 if that matters)

I think I know what the problem is. I run the global karma instead of the karma I installed. Maybe that causes the problem.

Yepp, solved with these lines in the package.json:
  "scripts": {
    "test": "node ./node_modules/karma/bin/karma start",
    "node-test": "node ./node_modules/jasmine/bin/jasmine",
    "build": "node ./node_modules/gulp/bin/gulp build"
  },

So it uses local libs now. I am not sure whether there is a better solution or not. It's working, that's enough to me.

Found this issue! If you install karma globally, it will always fail to load plugins that are local since it does not have the code from karma-cli to use the local one:
resolve('karma', {basedir: process.cwd()}, function (err, pathToKarma) {
  // There is a local version, let's use it.
  if (!err) {
    return requireCliAndRun(pathToKarma.replace(/(\/|\\)lib(\/|\\)index\.js/, ''))
  }
...

Solution:
npm uninstall karma -g
npm install karma-cli -g
This extra code should maybe be added to karma too to prevent this.

@grassick I assume this is a karma issue and not a nodejs issue then. I reopened, maybe somebody fixes it.

Uninstalling karma globally and installing karma-cli globally works for me, thanks for the tip @grassick.


HTTP::Client overwrites body if it isn't read before another request is performed

If I use HTTP to perform two requests in a row and I don't do response.body.to_s on the first then the body string for the first response will be overwritten with "".
Here is a script that demonstrates the bug:
gem 'http', '2.0.3'
require 'http'

URL = Addressable::URI.parse('http://mockbin.org/bin/1dee24cd-defa-467a-9c5f-6bccaadca3ad')

puts "Running with http.rb version #{HTTP::VERSION}"

client = HTTP.headers('X-Some-Config' => 'Whatever')

puts "I'm going to make 4 requests in total. All of them are POST requests to the url you gave me."

puts "After the first and second request I'm going to print the response body immediately."

puts "I'm then going to make the third and fourth request back to back" \
     "without touching the response body of request #3"

puts "Request #1 and #3 should have the same response body but the fourth request" \
     "seems to clobber the body string"

puts

puts "Performing request #1..."
response1 = client.post(URL)
puts "request #1 response: #{response1.body.to_s.inspect}"
puts

puts "Performing request #2..."
response2 = client.post(URL)
puts "request #2 response: #{response2.body.to_s.inspect}"
puts

puts "Performing request #3..."
response3 = client.post(URL)
puts "Performing request #4..."
response4 = client.post(URL)

puts
puts "Request #3 and #4 done"

puts "Response body for request #1: #{response1.body.to_s.inspect}"
puts "Response body for request #3: #{response3.body.to_s.inspect}"

Output when I run the script:
Running with http.rb version 2.0.3 with ruby 2.3.1
I'm going to make 4 requests in total. All of them are POST requests to the url you gave me.
After the first and second request I'm going to print the response body immediately.
I'm then going to make the third and fourth request back to backwithout touching the response body of request #3
Request #1 and #3 should have the same response body but the fourth requestseems to clobber the body string

Performing request #1...
request #1 response: "Good job you made a POST request!"

Performing request #2...
request #2 response: "Good job you made a POST request!"

Performing request #3...
Performing request #4...

Request #3 and #4 done
Response body for request #1: "Good job you made a POST request!"
Response body for request #3: ""

An empty string is definitely unexpected and undesirable in this case, however I don't think it makes sense to eagerly read bodies clients aren't interested in.
I think it would make sense to raise an exception in this case.

Ok so the issue in my case was that we have an integration test like this:
# creating the resource
response1 = client.post(...)

# getting the resource
response2 = client.get(response1.headers['Content-Location'])

expect(response1.body.to_s).to eql(response2.body.to_s)

Are you saying that this shouldn't be allowed behavior or should raise an exception?

@tarcieri Ok so the issue in my case was that we have an integration test like this:
# creating the resource
response1 = client.post(...)

# getting the resource
response2 = client.get(response1.headers['Content-Location'])

expect(response1.body.to_s).to eql(response2.body.to_s)

Are you saying that this shouldn't be allowed behavior or should raise an exception?

I think if you make a request, do not consume the body, make another request with the same client, and then try to consume the body for the original request, it should raise an exception.
If you would like to consume the body for the original request, it should happen before you make a subsequent request, IMO.

@tarcieri I think that sounds surprising to me because my impression of HTTP.rb was that it aimed to provide an immutable and chainable interface for performing requests. This seems like surprising behavior. While I agree that raising an error would be better than what I've reported it seems like a bandaid. My impression was that the chaining methods were providing me new instances without shared mutable state.
Basically, just like how these two return values (ret1 and ret2) should not be able to mutate each other
client  = HTTP.accept('application/blah')

ret1 = client.accept("application/json")
ret2 = client.basic_auth(user: 'foo', password: 'bar')

it seems like these two return values should not be allowed to mutate each other:
client  = HTTP.accept('application/blah')

ret1 = client.get("https://google.com")
ret2 = client.get("https://github.com")

The usage of either of these two response objects should not alter the behavior/state of the other.

At the very least it would be nice if I could have something like response.finalize that I can call and get a simple immutable response wrapper that isn't tied to a connection object.

Calling #to_s on the body prior to making another connection will accomplish that.
Yes, I will admit this behavior is a little bit surprising even to me.

there's helper for that too:
client  = HTTP.accept('application/blah')

ret1 = client.get("https://google.com").flush
ret2 = client.get("https://github.com").flush

ret1.to_s[0..42]
# => "<HTML><HEAD><meta http-equiv=\"content-type\""

ret2.to_s[0..42]
# => " "

flush consumes body and returns response itself

Would it introduce performance implications and/or breaking changes if each response object had a separate connection object?

Also thank you @ixti that is helpful

It will be (probably) a breaking change. And yeah, I guess it will make it easier to shoot the foot for one. But in general I think it's pretty doable and might become a pretty good improvement.

I think holding on to the last pending response in HTTP::Connection could solve this problem.
The connection already tracks if a response is pending (i.e. the body is not read yet) and has enough information to release its reference to the response to avoid a memory leak (#finish_response, #close).
If @pending_response (or an additional instance variable) were to contain an actual HTTP::Response instead of a bool the connection could call #flush on it when it's asked to send a new request.


Raise warning when matching raise_error(StandardError) without a message

Same as raise_error, raise_error(StandardError) is prone to catch
NoMethodError, NameError, ArgumentError, mistakenly allowing tests to
pass without even executing wanted codepath.

I see that some tests from mocks projects are failing, but interested to hear if this does not make sense. I've recently bumped into this problem (catching NoMethodError by mistake) and was surprised that rspec does not protect me from that mistake.

Thank you! Tests only appear to be failing because we fail on warnings and this generates a warning :)
I think this probably makes sense, though I can't remember our policy for introducing new warnings. (i.e. ok to merge straight away or wait until next minor). If no one else chips in in the next couple of days I'll make an executive decision and probably just recommend merge (... after fixing mocks)

I lean against this change.  Bare raise_error() is the path of lease resistance, and people tend to use it as a first step, or when they haven't really thought about what the error should be.  Once they've passed some kind of argument to raise_error, they've made a decision about what error they want to specify, and I don't think we should nag them with a warning.
Consider also some kind like raise StandardError (with no message).  While it's a bad idea to raise a StandardError with no message, for every bit of valid ruby code I think there needs to be a way to specify it with RSpec w/o getting warnings from RSpec, and raise_error(StandardError) would be the normal way to do that.
Thoughts?

While it's a bad idea to raise a StandardError with no message, for every bit of valid ruby code I think there needs to be a way to specify it with RSpec w/o getting warnings from RSpec, and raise_error(StandardError) would be the normal way to do that.

Definitely interesting point! I am pretty new in this, but I guess the decision whether to merge it or not depends on what are warnings used for in RSpec. I think about warnings (with raising) as a strict mode in some other languages. It protects you from doing dangerous things. Of course, you can always turn it off if you think you know better than the strict mode, or really need to do something that strict mode does not allow.
Maybe we should allow turning off this specific warning (just for standard error), but have it turned on by default?

I like the idea here. But since there is some debate, perhaps this fits better in rubocop-rspec (if it doesn't already enforce this).

The more I read the following sentence, the more I think it should be done by rspec but rubocop itself:

Consider also some kind like raise StandardError (with no message). While it's a bad idea to raise a StandardError with no message, for every bit of valid ruby code I think there needs to be a way to specify it with RSpec w/o getting warnings from RSpec, and raise_error(StandardError) would be the normal way to do that.

I will take a look rubocop rules. Feel free to close this one if you find @myronmarston's sentence as strong as I do.

@mikegee thanks for pointing out to the rubocop-rspec project.

I think rubocop-rspec is a better place for this, too.  It can be much more opinionated than RSpec itself can :).
I'm going to close this since you're going that direction.


[SILCombine] Dominance check for inject_enum_addr.

If stores of empty values to the address don't dominate the inject_enum_addr, the inject_enum_addr can't be eliminated--it's the only indication of the case that's in the address.

@swift-ci please test

@swift-ci please test


Fixed iot_backend example

Issue #, if available:
#1058
Description of changes:
Updated function event properties to remove 'AwsIotSqlVersion' property. Also removed key: id from Table as it will be auto created. Updated to nodejs10.x
Description of how you validated changes:
sam validate -t template.yaml
Checklist:

[na ] Write/update tests
[ ] make pr passes
[X] Update documentation
[X] Verify transformed template deploys and application functions as expected
[X] Add/update example to examples/2016-10-31

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Codecov Report

Merging #1059 into develop will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop    #1059   +/-   ##
========================================
  Coverage    94.92%   94.92%
========================================
  Files           69       69
  Lines         3250     3250
  Branches       632      632
========================================
  Hits          3085     3085
  Misses          87       87
  Partials        78       78

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 8804733...1cfb3c2. Read the comment docs.

Updated and pushed for review


Initial Steps Towards MacOS

This PR fixes a Segfault on MacOS, and leaves a null ptr derefence in place at swapcontext -> no clue how to fix that one..

There is no imports.c but in build.rs println!("cargo:rerun-if-changed=src/imports.c");


[Bug] Deploying programs with certain set of constraints causes OOM errors on validators

https://hackerone.com/reports/2300725
Summary:
I wrote two programs, which cause client node to go offline due to memory pressure and OOM, it affected two different client nodes confirmed by Harukama.  I reported this bug earlier, but now I can reliably reproduce it.  zk_sra_encryption took the api.explorer.aleo.org client node offline and the aleo faucet client node and https://explorer.hamp.app/.  I am not sure whether validators were affected, as it was accepted after about 10 minutes.  The attack is asymmetric because my system did not struggle to broadcast the deployment expect for the latter which occasionally timed out.
A malicious user could fill up a wallet and schedule a cron to use snarkos to deploy the lesser expensive contract w/ a new name replaced by using sed or something similar in an automated fashion hypothetically.
A second program was understandably at the limit of the constraints for the network, zk_deck_shuffle_v0_0_1.aleo.  It ultimately did not get accepted by validators despite having sufficient funds for storage.  I was able to deploy it by not using u128 in my data structures, and instead substituting u128 for fields.  Regardless both programs cause multiple downtime incidents and required service restarts for node operators.
I think the attack boils down to the fact that with arrays users can make use of u128 and ternary statements of conditions to generate 10-14k aleo opcodes which the network struggles to handle with about 500k constraints eating 1GB ram.  This deck shuffle program was 24,000,000 constraints.
Both programs were valid and functionally correct.
To verify, change the name of the program and deploy it on testnet3.
Steps To Reproduce:
each repository's README.md contains example usage, not necessary to understand the issue at hand.
I keep an alias to deploy programs: alias aleo-deploy="snarkos developer deploy "$1" --path "./build" --private-key "${PRIVATE_KEY}" --query "https://api.explorer.aleo.org/v1" --broadcast "https://api.explorer.aleo.org/v1/testnet3/transaction/broadcast" --priority-fee 0"
zk_sra_encryption % aleo-deploy zk_sra_encryption_v0_0_2.aleo
📦 Creating deployment transaction for 'zk_sra_encryption_v0_0_2.aleo'...
✅ Created deployment transaction for 'zk_sra_encryption_v0_0_2.aleo'
✅ Successfully broadcast deployment at1395286dygpqqhlazadq5l2hn3x9jvtmfs78gv7jvknqwaapv5yzqmdvhk8 ('zk_sra_encryption_v0_0_2.aleo') to https://api.explorer.aleo.org/v1/testnet3/transaction/at1395286dygpqqhlazadq5l2hn3x9jvtmfs78gv7jvknqwaapv5yzqmdvhk8
And for zk_deck_shuffle_v0_0_1.aleo
zk_deck_shuffle % snarkos developer deploy "zk_deck_shuffle_v0_0_1.aleo" --path "./build" --private-key "${PRIVATE_KEY}" --query "https://api.explorer.aleo.org/v1" --broadcast "https://api.explorer.aleo.org/v1/testnet3/transaction/broadcast" --priority-fee 0
📦 Creating deployment transaction for 'zk_deck_shuffle_v0_0_1.aleo'...
✅ Created deployment transaction for 'zk_deck_shuffle_v0_0_1.aleo'
✅ Successfully broadcast deployment at1rux429axv4h0rgu4r33299gl9udwgd4fv2572klnejezdmhe7sgsgcvw39 ('zk_deck_shuffle_v0_0_1.aleo') to https://api.explorer.aleo.org/v1/testnet3/transaction/at1rux429axv4h0rgu4r33299gl9udwgd4fv2572klnejezdmhe7sgsgcvw39
The latter never got accepted from memoryPool, also when it was deployed the memoryPool API endpoint went down
Proof-of-Concept (PoC)
either of these cause the Denial of Service independently.
https://github.com/zkCohort/zk_sra_encryption/blob/5c0e86ed9b177e51d30dac978f1b1dcd29148ac7/build/main.aleo 22 credits to deploy
https://github.com/zkCohort/zk_deck_shuffle/blob/c2ddf86f68ca476c539cc47b2ae4cb35e9d954fc/build/main.aleo 450 credits to deploy
Supporting Material/References:

Impact
The attacker can cause hardship on node operators, who are attempting to keep their ledgers up to date while syncing transactions.

Hacker also requested that, when deploying, please leave the namespace available for subsequent updates (e.g. do not use the format zkbitwise_stack*.aleo)

This is a known issue, and there are pending PRs targeting it, e.g. https://github.com/AleoHQ/snarkVM/pull/2271.

We are now limiting the deployment to 1 << 20 constraints. Closing with https://github.com/AleoHQ/snarkVM/pull/2271.
Please reopen if this remains an issue even with the deployment restrictions.