Update main.py

Pull Request: Enhance Efficiency, Display Calculations, and Add Theory Link
Summary of Changes
This pull request enhances the Projectile Motion Simulator application by making the code more efficient, displaying critical trajectory calculations (maximum height and range), and adding a theory reference button. These improvements aim to provide a smoother simulation experience and make the results more informative for users.
Key Changes and Additions
###1. Efficiency Improvement

Objective: Optimize the real motion simulation (with air resistance) to prevent unnecessary calculations.
Original Code: The loop simulating projectile motion with air resistance iterated for the entire time array t, even when y_real (the vertical position of the projectile) fell below zero. This redundancy slowed down execution without contributing to the final result.
Modified Code: The loop now terminates as soon as y_real falls below zero. This early stopping condition enhances performance, especially for high drag coefficient values.

Code Snippet:
# Original:
for _ in t:
    # Update loop
    if y_real[-1] < 0:
        break

# Modified:
while y_real[-1] >= 0:
    # Update loop

2. Displaying Maximum Height and Range on Plot

Objective:  Improve the informational output of the simulation by displaying maximum height and range for both ideal and real motion directly on the plot.
Original Code: Only plotted the trajectories with and without air resistance.
Modified Code: Calculated the maximum height and range for both cases, displaying them as text annotations on the graph. This provides users with quantitative insights into the effects of air resistance on projectile motion.

Code Snippet:
# Ideal case calculations
max_height_ideal = (v0y**2) / (2 * g)
range_ideal = (v0**2) * math.sin(2 * angle) / g

# Display text annotations on plot
plt.text(range_ideal * 0.5, max_height_ideal, f"Max Height (Ideal): {max_height_ideal:.2f} m\nRange (Ideal): {range_ideal:.2f} m", color="blue", ha="center")

# Real case calculations
max_height_real = max(y_real)
range_real = x_real[-1]

# Display text annotations on plot
plt.text(range_real * 0.5, max_height_real, f"Max Height (Real): {max_height_real:.2f} m\nRange (Real): {range_real:.2f} m", color="orange", ha="center")

3. Adding a "Theory" Button with Link to Projectile Motion Theory

Objective: Provide users with a resource link to understand projectile motion theory, especially helpful for students.
Original Code: The GUI only contained "Simulate," "Reset," and "Exit" buttons.
Modified Code: Added a "Theory" button that links to a page containing relevant theoretical background on projectile motion. The button opens the page in the default web browser, making it easy for users to access additional learning resources.

Code Snippet:
# Theory Button
theory_button = ttk.Button(button_frame, text="Theory", command=open_theory)
theory_button.grid(row=0, column=3, padx=10)

def open_theory():
    """Open theory page in the web browser."""
    webbrowser.open("https://farside.ph.utexas.edu/teaching/336k/Newton/node29.html")

Summary of Changes
-Suggested Enhancements: Consider adding user-customizable options for time granularity or calculation accuracy. Currently, time array t is generated with np.linspace(0, t_max, 500) , which could be made adjustable based on user preference for simulation smoothness.
-Further Optimizations: Additional mathematical methods, like solving differential equations directly, might make the real motion simulation even more accurate.
Testing and Verification
All changes were tested locally. The simulation performance improved with the early loop termination, and the added annotations correctly display maximum height and range for both cases. The "Theory" button opens the provided link as intended, enhancing the educational aspect of the tool.
Thank you for reviewing this pull request! Looking forward to feedback and suggestions.

Pull Request: Integrating graph and Real Time Visualization
Summary of Changes
Overview
This update introduces real-time visualization of projectile motion in the Projectile Motion Simulator by utilizing Matplotlib's embedding capabilities within the Tkinter GUI. The modifications enhance user experience by providing immediate feedback during the simulation process.
Key Changes

Real-Time Visualization:

The simulation now updates the plot in real time as the motion progresses. This provides a dynamic view of the projectile's trajectory both with and without air resistance.

Code Snippet:
# Clear any previous plot
ax.clear()
ax.set_title("Projectile Motion Simulation")
ax.set_xlabel("Distance (m)")
ax.set_ylabel("Height (m)")

Graph Setup:

Integrated Figure and FigureCanvasTkAgg from Matplotlib to allow for smooth updates to the graph within the Tkinter interface.
The figure is initialized in the GUI setup and cleared before each simulation, ensuring that previous data does not clutter the display.

Code Snippet:
fig = Figure(figsize=(6, 4))
ax = fig.add_subplot(111)
canvas = FigureCanvasTkAgg(fig, master=root)
canvas.get_tk_widget().pack(side=tk.TOP, fill=tk.BOTH, expand=True)

Animation Logic:

Implemented a loop that continuously updates the position of the projectile based on the current velocities and accelerations, providing an animated effect.
Ideal and real trajectories are calculated and plotted in parallel, with conditions to halt the updates when both trajectories hit the ground.

Code Snippet:
while y_real[-1] >= 0 or y_ideal[-1] >= 0:
    # Update ideal motion (no air resistance)
    ...
    # Update real motion (with air resistance)
    ...
    # Plot real-time update
    ax.plot(x_ideal, y_ideal, color="blue", label="No Air Resistance" if len(x_ideal) == 2 else "")
    ax.plot(x_real, y_real, color="orange", label="With Air Resistance" if len(x_real) == 2 else "")
    canvas.draw()
    root.update_idletasks()

Input Validation:

Maintained robust input validation for user inputs, ensuring that valid numerical values are entered before running the simulation.

Code Snippet:
try:
    v0 = float(entry_velocity.get())
    angle = math.radians(float(entry_angle.get()))
    ...
except ValueError:
    messagebox.showerror("Invalid Input", "Please enter valid numerical values.")
    return

Enhanced User Interface:

Improved the window size for a better layout and increased visual space for the graph.
Retained the original styling with a black background and orange accents to maintain aesthetic consistency.

Code Snippet:
root.geometry("1000x900")

Code Structure:

The overall structure of the code was refined to enhance readability, with clear separation of functionalities, including simulation, resetting fields, and theory page navigation.

Conclusion
These enhancements aim to make the simulation more interactive and visually appealing, allowing users to better understand the effects of air resistance on projectile motion through immediate graphical feedback.

Feel free to adjust any part of this summary or the code snippets to match your preferences!


how to check balance , send and receive ?

Can you please let me know how can I check balance and send , receive funcationality ?

@parthindia47 this is not a wallet app, it is wallet generator tool. You can generate wallet and then import it in many wallet apps out there.


fix(gulp): build task uses babel-preset-es2015

instead of the babel-preset-es2015-loose
https://github.com/SpoonX/swan-example-client/issues/44

Deploy preview processing.
Built with commit b93859fe8d34d7ff23ff18160e186fa0377a6ac2
https://app.netlify.com/sites/swan-example/deploys/5857de4fd6865d34340c1e62

Already fixed, can be closed.


A few questions

Hi @AlbertPun,
This project looks awesome, and it's related to some stuff we're doing for whole brain image registration, cell detection, standard space analysis and visualisation (e.g. cellfinder). What we don't have however is a good way to segment axons in these datasets.
I have a couple of questions:

Have you tried applying trailmap to other imaging modalities? I particularly want to try with some of our serial two-photon data.
Do you have any plans for releasing trailmap as e.g. a package on PyPI? If possible I would love to make our tools interoperable with trailmap, and move towards an integrated toolset for the analysis of whole-brain images.

I couldn't find your email, but if you want to carry on this conversation via email, my address is<EMAIL_ADDRESS>Thanks!
Adam

Hi Adam-
It does indeed work with other imaging modalities as well as other biological structures (eg. small diameter vasculature). Our revised manuscript includes some of these examples and I'll get in touch with you over email to see if there are any particular considerations or concerns for your data type.
--Drew


List available named queries while in query mode

 Issue by carlos.garcia
Wednesday Nov 02, 2016 at 13:42 GMT
Originally opened as https://git.tk.informatik.tu-darmstadt.de/SPIN/ID2T-toolkit/issues/4

A command should be available to list all possible named queries while in query mode.

 Comment by patrick.jattke
Friday Nov 04, 2016 at 11:13 GMT

Supplement: This new command should be documented in README.md or a suitable wiki page.

 Comment by aidmar.wainakh
Tuesday Feb 20, 2018 at 10:39 GMT

A help command was added, listing available commands and providing examples and additional information by typing "help [KEYWORD];"

 Comment by aidmar.wainakh
Tuesday Feb 20, 2018 at 10:39 GMT


Runtime error

Hello, this is a great project!
I have some questions to ask you, I am download your code, and then implement the following problems, may I ask what be the reason?
D{'Nmax': 40, 'tau': 0.8, 'mbsize': 10.0, 'infSeed': 1, 'dataset': 'nipsD', 'alpha': 1.0, 'kappa_sgd': 0.6, 'gamma': 2.0}
Traceback (most recent call last):
File "./runner.py", line 225, in
HDPRunner(args)
File "./runner.py", line 41, in HDPRunner
temp_file = open(project_path+'data/'+datasetname+'/texts.pk', 'rb')
IOError: [Errno 2] No such file or directory: 'data/nipsD/texts.pk'

Hi there,
Thank you! Glad you are enjoying it :)
I just tried the code again and it seems that it's working. Can you try
cloning the code in a clean directory and then running the following
command:
./runner.py -is 1 -alpha 1 -gamma 2 -Nmax 40 -kappa_sgd 0.6 -tau 0.8
-mbsize 10 -dataset nips
Let me know if this works and if not what is the error.
Thank you,
Ardavan
On Sun, May 28, 2017 at 2:27 AM, Tien-Hong, Lo<EMAIL_ADDRESS>wrote:

Hello, this is a great project!
I have some questions to ask you, I am download your code, and then
implement the following problems, may I ask what be the reason?
D{'Nmax': 40, 'tau': 0.8, 'mbsize': 10.0, 'infSeed': 1, 'dataset':
'nipsD', 'alpha': 1.0, 'kappa_sgd': 0.6, 'gamma': 2.0}
Traceback (most recent call last):
File "./runner.py", line 225, in
HDPRunner(args)
File "./runner.py", line 41, in HDPRunner
temp_file = open(project_path+'data/'+datasetname+'/texts.pk', 'rb')
IOError: [Errno 2] No such file or directory: 'data/nipsD/texts.pk'
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/Ardavans/sHDP/issues/5, or mute the thread
https://github.com/notifications/unsubscribe-auth/ACkD5Tp7d3Wawbncnv-bBG4GeNVDUziqks5r-RPPgaJpZM4NokEZ
.


Added v2 AWS API signer

Hi,
There some discussion on Signer types in https://github.com/elastic/elasticsearch-cloud-aws/issues/155#issuecomment-102975211
If we want to use AWS v2 compatibile service then we need to use S3Signer. Right now this is not possible as this type is not registered. However, if we register it then it starts working.
This was tested on 1.6 branch with google cloud storage.
Thanks,
Igor

w00t! I was not aware that Google storage is compatible with S3 API! :)
Sounds like you did not sign the CLA so far. Could you do it?
Also, would you mind opening such a PR against https://github.com/elastic/elasticsearch/tree/master/plugins/cloud-aws instead? We will maintain this plugin there from 2.0 and we most likely only fix bugs here.
Thanks a lot!

Hi,
It is if you enable interoperability https://cloud.google.com/storage/docs/migrating?hl=en  :-)
Sure, I'll sign the CLA and open the new PR tomorrow. Closing this for now
Thanks,
Igor


Could you add support/docs for how to integrate into docusaurus

I would ❤ to replace the broken search options in docusaurus with pagefind 😁

🙏

👋 Hey @blacktop — sorry that I missed this!
Off the top of my head I don't have an answer for you, but I can have a wee dig into a good answer 🙂
As a JavaScript/React based SSG, I imagine some of the writeups people have made for related tools would be of use:

Next.js

Add search to your Next.js static site with Pagefind

Astro

Pagefind Astro integration
Add Searching To Your Astro Static Site
How to add client-side search with PageFind to your Astro blog static website
Adding search to static sites with pagefind

The main step I don't have expertise on would be replacing any of the default search components in Docusaurus with Pagefind ones — hopefully someone in the community has some thoughts on that!


Some configuration is still compiled into the contract

            -DEDEN_ATOMIC_ASSETS_ACCOUNT=${EDEN_ATOMIC_ASSETS_ACCOUNT}
            -DEDEN_ATOMIC_MARKET_ACCOUNT=${EDEN_ATOMIC_MARKET_ACCOUNT}
            -DEDEN_SCHEMA_NAME=${EDEN_SCHEMA_NAME}

These should move to the genesis action

I'm closing this for now...until we encounter this as a pain point.


Include files

I'd like to include a file in the built wheel. How about packaging anything in a project's Cargo.toml include array?

You can get a list of files with cargo package --list, so packaging them is definitely possible. One problem is that different types of files need to go into different subdirectories of the wheel and it's not clear which one is correct for include. The other is that a crate might be publish to crates.io and to pypi (like e.g. pyo3-pack itself) and you'd get conflict around that.

But how can I add python files that are using my rust lib to the package? Is there somewhere an example for that. :vulcan_salute:

There's currently no way to add python files. The main problem is that afaik python has no conventions on how combine native and python files. It is not clear where the native module (the .so/.pyd) goes relative to the python files. The big projects with c extensions such as numpy or pandas just define locations somewhere in the source tree in their custom build system and gitignore .so and .pyd, but this breaks ide support. Not solving this properly will lead also lead to the weird kind of behaviour setuptools-rust sometimes shows.
For now I recommend to make a package for the rust crate (e.g. by add _backend or _native to your package's name) and another one for the python part, which depends on the rust crate. Using the module-name-is-source-folder-name convention it should be possible to have both in a single git repository without any conflicts.


The operation is insecure

Hi, I try to convert to pdf a google map and I have this problem with Safari 11, when the plugin call the toDataURL method.
const options = {
          imageTimeout: 30000,
          html2canvas: {
            scale: 2,
            useCORS: true
          }
};
 this.$pdf().set(options).from(element).save();

Hi
I'm having the same issue. I haven't used allowTaint and there is no cross-origin content. Upon searching i found it may be related to local storage access in safari. Is this something you can add support for or fix.
https://github.com/i18next/i18next-browser-languageDetector/issues/132
https://forums.developer.apple.com/thread/87778


[FLINK-19158][e2e] Increase download timeouts

What is the purpose of the change
Increase build stability: some Java e2e tests were failing due to timeout errors.
With this PR, we are more generous with the timeouts.

Thanks a lot for your review. Merging!


chore: delete unused backend config in workspace

What type of PR is this?

What this PR does / why we need it:
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?

Additional documentation e.g., design docs, usage docs, etc.:

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
13 unchanged lines in 5 files lost coverage.
Overall coverage increased (+0.4%) to 72.84%

Files with Coverage Reduction
New Missed Lines
%

pkg/engine/operation/watch.go
1
85.93%

pkg/workspace/util.go
1
79.82%

pkg/workspace/validation.go
1
83.52%

pkg/engine/operation/parser/spec_parser.go
4
56.1%

pkg/engine/operation/parser/parser.go
6
75.61%

Totals

Change from base Build<PHONE_NUMBER>:
0.4%

Covered Lines:
7209

Relevant Lines:
9897

💛  - Coveralls


speex: add mingw support

Description of changes
speex: add mingw support
Part of a larger effort to provide mingw support for qtmultimedia
Relevant for https://github.com/NixOS/nixpkgs/issues/274274

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

@ofborg build pkgs.pkgsCross.mingw32.speex

@ofborg build pkgs.pkgsCross.mingwW64.speex

@wegank @Artturin @bjornfor

@ofborg build pkgs.pkgsCross.mingw32.speex

@ofborg build pkgs.pkgsCross.mingwW64.speex

Result of nixpkgs-review pr 289986 run on x86_64-linux 1

Thanks!


Please check this source string: "For example, eth0 and enP30832p0s0 a single-NIC configuration:"

Hello,
Please check this source string: "For example, eth0 and enP30832p0s0 a single-NIC configuration:"
It seem to be missing something before "a single-NIC configuration", or there is a typo or something. As it is currently, it is not grammatically correct.
Kind regards,
Anne

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

ID: 495543de-bab2-6e65-ad21-8908be79fcd7
Version Independent ID: c1d37b25-c279-b5c6-57ea-1540a15c5f52
Content: Linux VMs with Azure MANA
Content Source: articles/virtual-network/accelerated-networking-mana-linux.md
Service: virtual-network
GitHub Login: @mattmcinnes
Microsoft Alias: mattmcinnes

@QueryCoordinator
Thank you for your feedback! We have assigned this issue to the author to review further and take the next course of action.

Thanks for your dedication to our documentation. We have created an internal work item in our backlog to resolve this issue. If you determine another possible update to our documentation, please don't hesitate to reach out again.
#please-close


'path' must be None or a list, not <class '_frozen_importlib_external._NamespacePath'

Description
Hi , I commented this section of the code in sitecustomize.py
Still its not working.Could you please help me proceed with this.I am new to Python and still learning stuff
What steps will reproduce the problem?

Hi , I commented this section of the code in sitecustomize.py
Still its not working.Could you please help me proceed with this.I am new to Python and still learning stuff
#if HAS_PYXIMPORT:

#if HAS_PYXIMPORT:
Add Numpy include dir to pyximport/distutils
try:
import numpy
pyx_setup_args['include_dirs'] = numpy.get_include()
except:
pass
Setup pyximport and enable Cython files reload
pyximport.install(setup_args=pyx_setup_args, reload_support=True)
#try:
Import cython_inline for runfile function
from Cython.Build.Inline import cython_inline
HAS_CYTHON = True
#except:
HAS_CYTHON = False
2.
3.
What is the expected output? What do you see instead?
Please provide any additional information below
I already referred #5299#5299,
Please help me resolve this
Version and main components

Spyder Version: 3.2.6
Python Version: 3.6.4
Qt Versions: 5.6.2, PyQt5 5.6 on Windows

Dependencies
IPython >=4.0    :  6.2.1 (OK)
cython >=0.21    :  0.27.3 (OK)
jedi >=0.9.0     :  0.11.1 (OK)
nbconvert >=4.0  :  5.3.1 (OK)
numpy >=1.7      :  1.14.0 (OK)
pandas >=0.13.1  :  0.22.0 (OK)
pycodestyle >=2.3:  2.3.1 (OK)
pyflakes >=0.6.0 :  1.6.0 (OK)
pygments >=2.0   :  2.2.0 (OK)
pylint >=0.25    :  1.8.2 (OK)
qtconsole >=4.2.0:  4.3.1 (OK)
rope >=0.9.4     :  0.10.7 (OK)
sphinx >=0.6.6   :  1.6.6 (OK)
sympy >=0.7.3    :  1.1.1 (OK)

Sorry you're having difficulties, but you already created an issue about this as you mentioned just a few days ago, and as you state this is a duplicate of that (#6568 ) which is in turn, a duplicate of #5299 . Please do not create new duplicate issues, as this is a bug tracker, not a help forum, and posting multiple duplicate reports makes it more difficult for us to help you and keep track of everything. Instead, post there or be patient for a response. Thanks.

Also, you should enclose your blocks of code in triple backticks, as I've edited your post above to include. Otherwise, crazy and almost unreadible formatting results as you can clearly see in all your posts, which not only makes it much harder for us to read them but makes it impossible to copy and paste the code into Python and have it run. Thanks.


Course Assistant should be able to refresh course assignment

just like a course instructor

Just checked - I'm able to see these buttons as instructor. Could you show ids of user and course?

@Brainenjii I was viewing it in the wrong account. Thanks for pointing it out.


Is there any document or explanation for bbox_overlaps?

Hello,
I'm studying this code if I want to re-implement faster rcnn by myself. But when I read this script https://github.com/jwyang/faster-rcnn.pytorch/blob/master/lib/model/rpn/bbox_transform.py. I can't understand clearly the  bbox_overlaps function. Does anyone have the document or explanation for that?
Thanks.

At first glace the function seems to calculate the IoU (intersection over union) between the ground truth and the anchor boxes.
I haven't really read into the RPN of the Faster R-CNN, but I can only assume this function is used during training of the RPN, to improve the selection of anchor boxes or something similar.
This link might help you:
http://www.telesens.co/2018/03/11/object-detection-and-classification-using-r-cnns/


Dataset files get written to the wrong directory

Looking at the documentation here:
https://github.com/dotnet/TorchSharp/blob/fbb4b558e916a0771560b7159517539eddfdb62f/src/TorchVision/dsets/MNIST.cs#L17-L29
The expected behavior is that if I pass foobar/ as the value for root, the dataset should be downloaded to foobar/mnist/some-archive-name.tar.gz. The actual behavior is that the dataset archive gets downloaded into the current working directory, then the method throws an exception because it fails to find the archive file at foobar/mnist/some-archive-name.tar.gz.
The bug is due to a small typo in the DownloadFile() method, found here:
https://github.com/dotnet/TorchSharp/blob/fbb4b558e916a0771560b7159517539eddfdb62f/src/TorchVision/dsets/CIFAR.cs#L86-L99
On line 95, DownloadFile() writes to the path stored in file, whereas it should be writing to the path stored in filePath.
DownloadFile() is called here:
https://github.com/dotnet/TorchSharp/blob/fbb4b558e916a0771560b7159517539eddfdb62f/src/TorchVision/dsets/MNIST.cs#L174
Assuming Download() was called with root = "foobar" and dataset = "mnist":

Download() sets datasetPath = "foobar/mnist" and sourceDir = datasetPath
DownloadFile() will be called with file = "train-images-idx3-ubyte.gz" and target = sourceDir = "foobar/mnist"
Because of the typo, DownloadFile() writes to train-images-idx3-ubyte.gz instead of foobar/mnist/train-images-idx3-ubyte.gz
DecompressFile() is later called with file = "train-images-idx3-ubyte" and sourceDir = "foobar/mnist"
DecompressFile() expects the target file to be at foobar/mnist/train-images-idx3-ubyte.gz, but the file is actually at $(pwd)/train-images-idx3-ubyte.gz

I do not have a CLA signed with Microsoft, the .NET Foundation, or the TorchSharp repository, so I'm reporting this issue as-is rather than with a pull request. From what I've found, I believe this bug can be fixed with a 4 letter change that replaces file with filePath in the DownloadFile() method.

@zkWildfire -- thanks for reporting this. I'll try to reproduce it and get a fix in place ASAP.


Refactor ambient CNI informer

This improves a few things:

Bug: when a new ztunnel spins up, we mark it as active. Then the old one spins down, and we mark ztunnelReady=false, ignoring the new one. Now, we reconcile the state to get the "active" ztunnel reliably
Performance: tune informers to only watch things on our node, rather than everything
Style: use a single Reconcile() function instead of 1 queue and 1 pod handler

Unfortunately, there are no unit tests for this; the code here to configuer ipset, etc is not abstracted in a testable way currently. I did manually test and the e2e tests pass, however. Long term we should improve this, but this code may be going away soon anyways
Please provide a description of this PR:

@howardjohn: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

integ-cni_istio_exp
92635aad0f3477240f27deae296cb85c4832e798
link
true
/test integ-cni

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/test integ-cni

I think its a real bug, not sure what though. looking into it

@howardjohn: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

integ-cni_istio_exp
92635aad0f3477240f27deae296cb85c4832e798
link
true
/test integ-cni

lint_istio_exp
8619219143b4331058f7d74e586dfd4439d8a4aa
link
true
/test lint

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.


What exactly did callLater do？

I read the asynchronous part (callLater), but couldn’t understand the mechanism. Can you explain it a bit more?
Bug
the code by Promise:
console.log(1)
Promise.resolve(2).then(v=>console.log(v))
console.log(3)
# or
console.log(1)
new Promise(resolve=>resolve(2)).then(v=>console.log(v))
console.log(3)

will console 1 3 2
but the code by Nancy
console.log(1)
Nancy.resolve(2).then(v=>console.log(v))
console.log(3)
# or
console.log(1)
new Nancy(resolve=>resolve(2)).then(v=>console.log(v))
console.log(3)

will console 1 2 3

https://jakearchibald.com/2015/tasks-microtasks-queues-and-schedules/
The implementation is not microtask, hence the behavior you're seeing, see below comment and my response:
https://medium.com/@zouguo/there-is-one-problem-resolve-and-reject-should-execute-asynchronously-after-the-event-loop-turn-77aded454878
FMI on how callLater works:
<EMAIL_ADDRESS>


Update Jenkinsfile-online

ewdewdede

just do it

This is a public repo for all developer, the pull request is not necessary. you can fork this repo and update this for yourself.


feat:Allow manipulation of Urls read from service binding

Context

https://github.wdf.sap.corp/MA/sdk/issues/8706
With the above support issue we discovered that BtpServicePropertySuppliers  supplies urls provided in the service binding directly without any pre-processing for the Destination to be built from the binding.
Although, this works in most cases, most notably in the Business logging service, this causes issues as the service binding seems to have some path appended to the urls, which gets appended later on while making calls from clients generated for this service.
for e.g. in the given binding
"endpoints": {
  "configservice": "https://business-logging.config_api.example.com/buslogs/configs",
  "readservice": "https://business-logging.read_api.example.com/odata/v2/com.sap.bs.businesslogging.DisplayMessage",
  "textresourceservice": "https://business-logging.text_api.example.com/buslogs/configs/textresource",
  "writeservice": "https://business-logging.write_api.example.com.cfapps.sap.hana.ondemand.com/buslogs/log"
}

For e.g Ideally the Destination created for writeservice should only have https://business-logging.write_api.example.com.cfapps.sap.hana.ondemand.com and not include the additional path "/buslogs/log".
This PR aims at removing such known redundant paths from the service binding URLs obtained.
Feature scope:

[x] Add logic to remove redundant path from URL
[ ] Add tests

Definition of Done

[x] Functionality scope stated & covered
[ ] Tests cover the scope above
[ ] ~Error handling created / updated & covered by the tests above~
[ ] ~Documentation updated~
[ ] ~Release notes updated~

We discussed with Business logging colleagues, where we pitched the idea of them contributing to our repo directly.


Support __nullable arguments in Objective-C blocks

When compiling my project I get lots of errors like these:
In file included from /Users/../SomeClass.m:12:
/Users/../SomeOtherClass.h:32:55: error: expected ')'
- (void)someMethod:(void (^)(NSError* __nullable error))block;
                                                      ^
/Users/../SomeOtherClass.h:32:34: note: to match this '('
- (void)someMethod:(void (^)(NSError* __nullable error))block;

See https://developer.apple.com/swift/blog/?id=25 for more about the __nullable

Thanks @rist for reporting this issue!
We are currently investigating it, the problem should be fixed soon.

Also getting this in @property attributes and return types, like:
warning: unknown warning option '-Wno-nullable-to-nonnull-conversion'; did you mean '-Wno-non-literal-null-conversion'? [-Wunknown-warning-option]
@property (nonatomic, copy, nullable) NSString *s;
                            ^
error: expected ')'
- (UIViewController * __nullable)XXVC;
                      ^
note: to match this '('
- (UIViewController * __nullable) XXVC;
  ^

Note also that within method declarations the nullable is not expected and thus infer fails as with an expected type error.
In file included from AppNavigation.m:9:
AppNavigation.h:19:4: error: expected a type
+ (nullable UIViewController *)getTopViewController;
   ^
AppNavigation.h:20:4: error: expected a type
+ (nullable ViewController *)getChatViewIfTopViewController; // Get any ViewController on Top
   ^
AppNavigation.h:21:4: error: expected a type
+ (nullable ViewController *)getViewController;      // Get the ViewController with Bot
   ^
3 errors generated.
Command /Downloads/infer-osx-v0.1.1/infer/infer/bin/../lib/capture/clang failed with exit code 1

Yep, hitting the same issues with properties and method declarations.

We believe the issue has been fixed in master (e17308f4d57d0b867f777785bc67424b6efeebb7). The fix will make it into the next release of Infer later this week.

I compiled from master and this now works as expected. Thanks!

I'm seeing the same issue for nonnull.  Not sure if they fix in e17308f addresses?

@altyus: yes, the patched version of clang we use now supports __nullable, __nonnull and __null_unspecified.


Extract 'init' command to separate executable

init command has to initialize empty git repo in current folder and configure location git setting as in #4.

@extsoft the puzzle #118 is still not solved.


[Bug] JUnit Reporter produces a wrong number of total test methods

TestNG Version
6.10
Expected behavior
Attribute tests inside <testsuite> element should also count ignored methods in the current class.

Actual behavior
Now, in JUnit xml report file, attribute tests doesn't reflect the true amount of <testcase > elements in the file. Because I think number of disabled tests is not included.
Is the issue reproducible on runner?

[ x] Maven

Test case sample
 @Test
 public void should_pass() {
     assertEquals("abc", "abc");
 }

 @Test(enabled = false)
 public void should_be_ignored() {
     assertEquals("abcd", "abc");
 }

should result in:
<testsuite name="SomeTest" tests="2"  skipped="1" errors="0" ...

but now is:
<testsuite name="SomeTest" tests="1" ignored="1"  skipped="0" errors="0" ...

Moreover: there should NOT be any ignored= parameter. JUnit already has a parameter for this purpose and it is called skipped. So please remove the ignored attribute from the <testsuite> element and use a skipped attribute instead.
Regards

@gdemecki
I used the same example that you shared. Here's how the xml would look like (the one that resides under here) after my fix.
 ➭ tree junitreports/
junitreports/
└── TEST-org.rationale.emotions.junit.MyTestcase.xml

<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated by org.testng.reporters.JUnitReportReporter -->
<testsuite skipped="1" hostname="MacBook-Pro.local" name="org.rationale.emotions.junit.MyTestcase" tests="2" failures="0" timestamp="08 Dec 2016 13:36:41 GMT" time="0.007" errors="0">
  <testcase name="should_pass" time="0.007" classname="org.rationale.emotions.junit.MyTestcase"/>
  <testcase name="should_be_ignored" classname="org.rationale.emotions.junit.MyTestcase">
    <skipped/>
  </testcase> <!-- should_be_ignored -->
</testsuite> <!-- org.rationale.emotions.junit.MyTestcase -->

@krmahadevan thanks, the above xml looks fine.


Cannot install

I tried install it on MacOS.
When I run docker run I got the following message.
WARNING: The requested image's platform (linux/386) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
root@8ad7b1565a1d:/data#

This is a known problem at the moment, the issue is at the docker level with https://github.com/hhslepicka/docker-poisson-superfish-nobin


OrientGraph.query() does not leverage indices.

Version: Orient 2.0M3
OrientGraph.query() does not leverage indices.
DefaultGraphQueryIterable.getElementIterable checks the HasContainers against the key indices. The key indicates are retrieved using getIndexedKeys(elementClass) which calls getIndexedKeys(elementClass) on OrientGraphQueryIterable. This call is as follows: ((OrientBaseGraph) graph).getIndexedKeys(elementClass, true);
The 'true' indicates the classname should be returned as part of the key. These keys are matches against the HasContainers.key which does not have the classname as part of the key, so there's never a match which results in a graph.getVertices() instead of return graph.getVertices(container.key, container.value).

Hi,
this seems to be broken in 2.0.4 again - the fix for this issue was reverted. Can we have an update please?


Fix Bug after restart of Modbus-flex-server with active modbus-tcp connection Update modbus-flex-server.js

Fix Bug after restart of Modbus-flex-server with active modbus-tcp connection
Issues Detail
https://github.com/BiancoRoyal/node-red-contrib-modbus/issues/224

Hi @AimeeQiu, have you found any solutions to this problems yet without the need to wait for a new software version?

Hi @AimeeQiu, have you found any solutions to this problems yet without the need to wait for a new software version?

Hi @LarsBressers ,you can change modbus-flex-server.js close function.This close function will destroy all the open sockets.
node.on('close', function.. is replaced by:
node.on('close', function () {
mbBasics.setNodeStatusTo('closed', node)
if (node.modbusServer._server) {
node.modbusServer._server.close()
}
if(node.modbusServer){
node.modbusServer.close();
}
node.modbusServer = null
})
the problem is solved.
I have pull request, you can also wait for a new software version.

released with 5.14.1


french setup

what does this PR  do ?
This PR adds the French Setup for the chapter 0

Thank you for this contribution @abdouaziz!
Would you mind adding the the table of contents file (_toctree.yml) for this section? You can take a look at how I did this for Spanish here: https://github.com/huggingface/course/blob/main/chapters/es/_toctree.yml
Just make sure this file is stored under chapters/fr/ and it should be good to go!

Hi @lewtun  now you can check if it's good

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.


Upgrade http to version 1.0.2

Libraries.io has found that there is a newer version of http that this project depends on.
More info: https://libraries.io/rubygems/http/1.0.2

Blocked by twitter gem - see Gemfile.lock file.


Router always forwards to HTTP, even if connected via HTTPS

Describe the bug
The router always forwards the requests to port 80 of the web-container.
To Reproduce
e.g. define some rewrite-rules just just for SSL, they will be ignored.
Expected behavior
I guess this can be seen as feature, not a bug, because the current solution is a bit faster.
But if you have special directives (e.g. rewrite-rules) for the ssl-version of your site (which is not that uncommon), this behaviour breaks the site.
Version and configuration information (please complete the following information):

Host computer OS and Version: macOS Catalina
Docker Desktop version: <IP_ADDRESS>
ddev version: 1.15.3
config.yaml contents for the misbehaving project: nothing special
custom apache vhost, with rewrite-rules just for SSL

Hi @mkrauser - This is by design. The https web-container configuration is only for direct access to the container, for people who need that for some reason. I actually am not sure I've ever known anybody to need it.
But this design, a reverse proxy (ddev-router) terminating https and forwarding requests via http is super standard in server environments, and I don't see any particular reason to change it.
Can we talk about the problem you're actually trying to solve?

Happy to continue the conversation, but this was always the design of the system, with http being used behind a reverse proxy that did TLS termination. Direct https was added to the direct-bound port as a convenience for certain types of testing.

Sorry, I overlooked your first message. I encountered this problem while working on a legacy project. I worked my way around that.
You are right, terminating SSL at the LB is standard and I guess this is not a very common requirement.


Test my trained model

Hi ,  I got an IOError [Errno 32] Broken pipe when I use dense_cap_test.sh .
It looks like a multithread error or not ?
Could you help me ?

"Broken pipe issue" from meteor.py #10


Allow user to delete a subscription via slash command

Currently there is no way to Delete or deactivate a subscription once you've created it in the channel.
Since this functionality does not exist, and space/page IDs can't be edited the only way to stop the events is to remove all events from the existing subscription.
We should be able to delete subscriptions via a slash command.

Disregard this issue. I forgot about the unsubscribe.

@DHaussermann Had me worried for a sec... ;)

@aaronrothschild same! I was baffled. I knew there was a way to remove them during the first round of testing but I couldn't see it anymore :)


merge in flask-session2

A few clean up things need done to this pr:

readme links
readme name

This should close out the following issues:
#134
#128
#44
#36
#29
#26
#11
#46
#66
#53
#56
#85
#89
#67
#150
#158
#157
This pr also includes most fixes from the other community forks. The readme is updated with a list of contributors to those changes.

changed to merge into a dev branch where it can be further modified before going into master. I was using commizen and semantic release to handle the versioning, which you may want to drop if you will be handling that manually...

@christopherpickering can you join our Discord server https://discord.gg/pallets #flask-session channel, the other new maintainers and I are discussing things there.


FR: Translate into Chinese

Is Your Feature Request Related to a Problem? Please Describe.
I don't know if anyone is involved in this contribution, if not I can help translate it into Chinese.
I can translate the language of the ui interface into Chinese, which can help Chinese people to use the plugin better, I don't know what your requirements are. I don't intend to translate the documentation, because the workload for this may be rather large.
Describe the Solution You'd Like
You specify where I need to translate (in addition to the documentation) and I will PR after translation

So if you wanted to translate all keys for zh-cn you would clone the repo, and either manually copy the structure of en.ts to zh-cn.ts and fill out the strings from there or do so via the script that helps setup the actual structure of the language without any need to directly update an existing file.
To use the script:

Clone this repo
Then run npm ci
Once that finishes, run npm run translate
You will see the following and want to specify T as that allows translation of all keys in a specific language.

  =========================================================================
  Select a translation mode to use:
  [A]dd a translation value for a specific language.
  [L]ist untranslated keys in the specified language.
  [R]eplace translated value with a new value for the specified key.
  [T]ranslate all untranslated keys in a language one at a time.
  =========================================================================

It should then prompt you for the language to translate which would be zh-cn.
From there it should allow you to translate as many keys as you choose.

I believe this was taken care of by #688 . As such I will close this FR as it should go out this release. I still need to look into potential issues with the translation helper and show that code some love. But that is a separate issue (#689 ).


raise Codegen and NamedService is not implemented on different version of tonic and prost

Bug Report
I tested this code in different version of tonic and prost like (tonic,prost) => (5, 8) and (6, 9)
but raise this errors:

he trait Service<tonic::codegen::http::Request<tonic::transport::Body>> is not implemented for Jerry

the trait NamedService is not implemented for Jerry

.serve(addr)
|              ^^^^^ method cannot be called on Router<Jerry, tonic::transport::server::Unimplemented> due to unsatisfied trait bounds

Version

edition = "2021"
[dependencies]
tonic = "0.6.1"
prost = "0.9.0"
tokio = { version = "1.13.0", features = ["macros", "rt-multi-thread"] }
[build-dependencies]
tonic-build = "0.6.0"
Platform
Linux 64bit

Sorry, this error occurred because I forgot to make new add_service(EngineServer::new(jerry))) and I wrote instead:  add_service(jerry))
Server::builder()             .add_service(EngineServer::new(jerry))             .serve(addr)             .await.unwrap();


Regex error when adjusting configuration after installing 0.1.1

After installing version 0.1.1 of the add-on, I'm not able to save the configuration: I tried updating the configuration both from UI and from YAML, but same outcome.
I get the following REGEX error:
Ocorreu um erro ao guardar a configuração do add-on, does not match regular expression ^([0-9A-Fa-f]{2}(:[0-9A-Fa-f]{2}){5})(\|[0-9A-Fa-f]{2}(:[0-9A-Fa-f]{2}){5})*$. Got {'vin_list': 'XP7YGCEK5PB153946', 'ble_mac_list': 'SDA39A3EE5E6B4B0DC', 'mqtt_server': '<IP_ADDRESS>', 'mqtt_port': '1883', 'mqtt_username': 'mqtt', 'mqtt_password': 'MYSECRETPASSWORD', 'presence_detection_ttl': 240, 'presence_detection_loop_delay': 120, 'ble_cmd_retry_delay': 5}

Hi, This is due to the config you have provided for the MAC Address.
It should be in the format AA:BB:CC:DD:EE:FF.
 The MAC is 12 characters (numbers or capital letters from A to F), separated by ":"
What did you use to get "SDA39A3EE5E6B4B0DC" ?

This is planned to be fixed in the next release (0.1.2 soon)

Hi, This is due to the config you have provided for the MAC Address. It should be in the format AA:BB:CC:DD:EE:FF.
 The MAC is 12 characters (numbers or capital letters from A to F), separated by ":"
What did you use to get "SDA39A3EE5E6B4B0DC" ?

Thanks for prompt reply
I got it from here: https://github.com/tesla-local-control/tesla_ble_mqtt_docker/issues/23
I have tried with:

Sda39a3ee5e6b4b0dC
SDA39A3EE5E6B4B0DC
SD:A3:9A:3E:E5:E6:B4:B0:DC
Same result

I understand your issue then
You have used what is called the "BLE Local Name" which for a Tesla looks like this: Sda39a3ee5e6b4b0dC
This is a not the MAC address...
I suggest you do the following:

Edit your current addon configuration and provide a "dummy" MAC address, like this one: FF:FF:FF:FF:FF:FF. Keep all your settings as they are
Start the addon
Once started, you can, Press the "Scan bluetooth" button in device "Tesla_BLE_XP7YGCEK5PB153946"

Then go to the addon logs, and you should see an output telling you if the MAC address has been detected or not:

* SD:A3:9A:3E:E5:E6:B4:B0:DC

Just to make it clear, what you have above is not a BLE MAC address. The MAC address format is
AA:BB:CC:DD:EE:FF - no more than 6 consecutive "2 letters" separated w/ a :
Like @raphmur mentioned, press the "Scan Bluetooth" button and then check the add-on's log. The MAC address of your car will show up.

Thanks, this worked!


Deprecate trlinkin/nsswitch

Use Case
Hi, https://forge.puppet.com/modules/trlinkin/nsswitch/readme isn't maintained anymore. Please deprecate it and move the approved badge to https://forge.puppet.com/modules/puppet/nsswitch/readme.

Deprecated https://forge.puppet.com/modules/trlinkin/nsswitch/readme against https://forge.puppet.com/modules/puppet/nsswitch/readme and added approved badge.
Hence closing the same.


ja: Make docs/home/_index.md follow v1.19 of the original text

This is a Feature Request

What would you like to be added
Update docs/home/_index.md to follow v1.19 of the original (English) text.
Why is this needed
content/ja/docs/home/_index.md is outdated.
Comments
/language ja
/good-first-issue
File to update
https://github.com/kubernetes/website/tree/dev-1.19-ja.2/content/ja/docs/home/_index.md
Original
https://github.com/kubernetes/website/tree/release-1.19/content/en/docs/home/_index.md
diff between translated and v1.19
https://gist.github.com/09057450d5959d36a69efbeeda3bbfd3
Note
Currently, we use dev-1.19-ja.2 branch. Please open a PR targeting the branch.
ref
https://kubernetes.io/ja/docs/contribute/localization/
If you have a question, feel free to ask us at slack.k8s.io #kubernetes-docs-ja channel

/triage accepted

/close


Wally version does not work

It appears that the default.project.json refers to src-build while only src gets uploaded to wally.
So when you install from wally, Rojo gets confused because it cannot find src-build
Looks like replacing src with src-build in the wally.toml should fix it

Fixed in v0.4.1

Correction, v0.4.2. Didnt merge PR for 0.4.1


client: sort types before generating CRUD schema

fixes #3102

@timsuchanek can you give me your feedback ?


Open docs in documentation browser

The C-j C-d shortcut opens the documentation as an overlay, but usually I'd rather see the docs in the documentation browser.

90% of the time I type ?somefunc it's to get a list of the methods or see the argument names/order. So 👍 for number 1 from me.

:+1: to seeing methods of the function. Option 2 seems like what I'd expect to see if it was doing on-the-fly filtering of the list as I typed things into the search box above (which could be cool), but I wouldn't want to lose the list of methods.

It's in:

I'll also make this the default, since that'll increase exposure for the docpane.


Invalid REST API URL

I am using this interactive speech API with WebSocket. I am not able to connect as it gives 401 error.
https://speech.platform.bing.com/speech/recognition/interactive/cognitiveservices/v1?language=pt-BR
Can you confirm If the URL is the same? Because all the other URL's(issueToken and conversation) are changed and has region name as a prefix. Please share the updated URL if that's the case.
Thanks.

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

ID: 8c7a966c-0838-de9a-0b7f-ecc36eefb7f6
Version Independent ID: 4555dcf7-5f02-01e9-29de-b96c07f56766
Content: Get started with the Bing Speech Recognition API by using REST
Content Source: articles/cognitive-services/Speech/GetStarted/GetStartedREST.md
Service: cognitive-services
Sub-service: bing-speech
GitHub Login: @zhouwangzw
Microsoft Alias: zhouwang

@unscramblrahul Thanks for the comment! We will investigate on this issue and get back to you soon.

Test

The URL you are referring is the Bing Speech API which has been deprecated. Please use the new Speech Service , and find more information about migration here.
Thanks,
Zhou

@unscramblrahul We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.


Add argument randomization

This PR adds support for randomizing the command line arguments of the js engines.
The command line of fuzzilli now takes an additional optional argument --argumentRandomization= which is either none (default), initial (the instances to randomize the arguments once when starting fuzzilli) or periodic (periodic re-randomization of command line arguments).
Currently, randomization is supported for v8, spidermonkey and jsc only. Adding support for randomizing command line args of additional engines should be relatively straightforwards.
Any feedback on the PR is welcome, its plenty of changes.

Reducing the engine-specific parts in the serialized programs/protobufs is certainly feasible but I'm not sure whether we can avoid changing the protobuf entirely. The workers need to communicate the arguments to the master instance which executes the test case again to decide whether it is flaky or not. Adding an array of strings to the protobuf (containing the additional args) should be sufficient and the serialized format wouldn't be engine specific. However, the command line args make no sense for other engines and trying to import them will result in sub-optimal results.
Regarding the configuration options for randomization: right now the possible values are none/initial/periodic. I could change it to none, periodic=timeInSeconds so the interval you proposed as one hour would be configurable; the initial setting would be mood as one can just set a really large value.

So I'd like to try and reduce this down to a minimal set of changes (I'm in general currently trying to somewhat aggressively trim down Fuzzilli since there's too much logic that's essentially unmaintained...), so sorry for the additional effort :/ and please let me know if you disagree!
I'm wondering if something as simple as this is good enough:

Only regenerate random arguments initially (this may go well with the new "swarm testing" mode)
For any crashing sample, add a comment to the footer that contains the process arguments as string

If a crash only reproduces with the custom flags, it'll be marked as flaky by the parent. But maybe that's fine? The crash message will state what kind of crash it was (e.g. the debug assertion failure message and stack trace), and that it used custom flags, so maybe that's good enough (unless we expects hundreds of new crashes). Alternatively, it probably wouldn't be too much effort to spawn a new REPRL instance with the custom command line options for reproing crashes, but I'm not convinced it's worth it, at least not initially.
When sharing interesting samples between instances, it's not clear to me what the optimal behaviour would be anyway. If we include the original flags, and from that point on only execute any derived sample with the same flags, then we'll end up constantly restarting the REPRL instance for pretty much every mutation. So we probably don't want that. Also I guess executions that used to be interesting in the past may no longer be relevant once we change flags (e.g. JIT compilation thresholds)? For that reason, I think it's probably easiest if every instance just has a fixed set of random flags that it keeps throughout its lifetime. With distributed fuzzing, we may anyway restart worker instances ever 24h (if they are preemtible instances), so then we'd automatically reshuffle the engine arguments. WDYT?

Your observations are correct; the implementation with the least complexity just adds the command line arguments as comment into the sample (which the PR is doing already, even though the code for placing the comments could be placed better).
Going this route would render reproducing some of the crashes on master instances harder but since they're kept as flaky this is probably fine. If this turns out too much of an issue in practice we can extend the protobuf format down the line.
To summarize, I'll change the code such that:

--argumentRandomization= is either none or initial
the arguments are added as comment into the samples
update the PR so you can have a look

Does this work for you?

That sounds great, thanks a lot! So that means we won't need any protobuf changes for this feature then in the end?
Also if --argumentRandomization is now either none or initial, I guess we could instead just make it a boolean flag --randomizeEngineArguments or so? But I'm fine either way!

I just pushed a simpler version of the changes

Perfect, yeah that looks good and should be easy to maintain. Thanks a lot!


Chunked HTTP length decoding should account for whitespaces/ctrl chars (Fixes #13273)

Motivation:
#12321 introduces the assumption that whitespaces/ctrl chars are already stripped out hex chars of HTTP chunk length. It was a wrong assumption.
Modifications:
Correctly check for whitespace and ctrl chars and re-introduce whitespace (leading) trim
Result:
Fixes #13273

@normanmaurer I've already verified that the previous decoder implementation (before #13273) can run the additional tests without problems, but...creating tons of Strings, hence this version is now correct and faster/less memory hungry.
Sorry for the introduced bug; hope the additional tests will help for the future!

@franz1981 do we need a PR for main as well ?

Nope because for @normanmaurer I haven't yet ported the speedup of HTTP 1.1: both decoding/encoding are still WIP in my mind, but probably it's time I can do it for the decoding part at least


Feature request: Command line option to output default configuration

Could we add a command line option to output the default configuration similar to how pylint does (to get a config file containing the default config with e.g. pylint --generate-rcfile > .pylintrc)?
pylint -h
    --generate-rcfile   Generate a sample configuration file according to the
                        current configuration. You can put other options
                        before this one to get them in the generated
                        configuration.

Sounds like a great idea! PRs welcome.

One interesting pylint commit for reference is --generate-rcfile generates by default human readable symbols for the…

WIthout recalling exactly which files pydocstyle checks for config, can I suggest merely printing out the config section given the number of config options supported by pydocstyle is probably less than a fifth of what pylint supports


Add additional experiment metadata to Fetch Treatment response

What this PR does / why we need it:
This PR adds additional metadata information to the Fetch Treatment response.
{
    "data": {
        "experiment_id": 2,
        "experiment_name": "expertiment-2-sw",
        "metadata": { // Newly added field
            "experiment_type": "Switchback",
            "experiment_version": 2,
            "switchback_window_id": 1 // Only set for switchback experiments, starts from 0.
        },
        "treatment": {
            "configuration": {
                "test": "val"
            },
            "name": "treatment-b",
            "traffic": 0
        }
    }
}

The version field is now added to the database model for experiments, to reliably store the version of the experiment. Consequently, this field is also added to the Experiment Details view.
Summary of Changes
The main changes are summarised below.
Schema

api/proto/experiment.proto - Add experiment version info in the Pubsub message
api/schema.yaml - Add experiment version info in the Experiment structure, SelectedTreatmentMetadata into the treatment response structure

Management Service

management-service/database/db-migrations/000003_experiment_version.*.sql - Migrations for the version column in the experiments table. The experiment_history table already has this field.
management-service/models/experiment.go - Include the version info when converting the DB model to other formats
management-service/services/experiment_history_service.go - When creating the history record, we can now just copy the version from the current experiment record.

Treatment Service

treatment-service/controller/treatment.go - Return additional experiment metadata in the final response when an experiment is matched
treatment-service/services/treatment_service.go - Return the switchback window Id (where applicable) from the GetTreatment method
treatment-service/models/typeconverter.go - Cater to the newly added version field in the experiment data

UI

ui/src/components/version_badge/VersionBadge.js - Add new component for use in experiment / experiment history details view
ui/src/experiments/details/ExperimentDetailsView.js, ui/src/experiments/history/details/ExperimentHistoryDetailsView.js - Include version info as a badge

Miscellaneous Bugfix
A recent PR (https://github.com/caraml-dev/xp/pull/33) refactored the segmenter card layout in the Edit Project Settings form. This caused a small regression - when a segmenter has multiple options for variable mappings, it should be expanded by default, in the Selected Segmenters column. If not, when a new card is dragged to the Selected Segmenters column, there is no visual feedback to the users that some info must be filled (the form submit will be blocked by the yup validation but we can't see where the error is either). This is addressed by adding back the initialIsOpen prop in ui/src/settings/components/form/components/segmenter_section/SegmenterCard.js.

Thanks for the review @terryyylim! Will merge this once the CI passes.


ERROR: Import URDF from ROS

[ ] I am at the right place and my issue is directly related to ROS#. General technical questions I would post e.g. at ROS Answers or Stack Overflow. For library-specific questions I would look for help in the corresponding library forums.
[ ] I have thoroughly read the Contributing Guideline and writing this issue is the right thing to do in my case.

I have a question!

[ ] I searched the Wiki, open and closed issues for an answer. I tried my best to find the answer by myself without success. I believe that the discussion we will have in this issue, and the solutions we might find, will help me, and likely other community members who have a similar problem.

Here is my question:

My OS is: Windows 7 64bit
My Unity Version is: 2018 3.11f1
My ROS Distribution is: ROS Kinetic
My Build Target Platform is: Windows
Unity is run in Windows while ROS run in another machine with ubuntu system. There is some errors when I follows the tutorial 2.1.
$ roslaunch file_server publish_description_turtlebot2.launch
... logging to /home/zhenglong/.ros/log/e4123a80-5487-11e9-a987-8ca982cd582f/roslaunch-MobileStation-32636.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://MobileStation:45709/

SUMMARY
========

PARAMETERS
* /robot/name: Turtlebot2
* /robot_description: <?xml version="1....
* /rosapi/params_glob: [*]
* /rosapi/services_glob: [*]
* /rosapi/topics_glob: [*]
* /rosbridge_websocket/address:
* /rosbridge_websocket/authenticate: False
* /rosbridge_websocket/bson_only_mode: False
* /rosbridge_websocket/delay_between_messages: 0
* /rosbridge_websocket/fragment_timeout: 600
* /rosbridge_websocket/max_message_size: None
* /rosbridge_websocket/params_glob: [*]
* /rosbridge_websocket/port: 9090
* /rosbridge_websocket/retry_startup_delay: 5
* /rosbridge_websocket/services_glob: [*]
* /rosbridge_websocket/topics_glob: [*]
* /rosbridge_websocket/unregister_timeout: 10
* /rosbridge_websocket/use_compression: False
* /rosdistro: kinetic
* /rosversion: 1.12.14

NODES
/
    file_server (file_server/file_server)
    rosapi (rosapi/rosapi_node)
    rosbridge_websocket (rosbridge_server/rosbridge_websocket)

auto-starting new master
process[master]: started with pid [32652]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to e4123a80-5487-11e9-a987-8ca982cd582f
process[rosout-1]: started with pid [32665]
started core service [/rosout]
process[rosbridge_websocket-2]: started with pid [32682]
process[rosapi-3]: started with pid [32683]
process[file_server-4]: started with pid [32684]
[ INFO] [1554127824.695614255]: ROSbridge File Server initialized.
registered capabilities (classes):
- rosbridge_library.capabilities.call_service.CallService
- rosbridge_library.capabilities.advertise.Advertise
- rosbridge_library.capabilities.publish.Publish
- rosbridge_library.capabilities.subscribe.Subscribe
- <class 'rosbridge_library.capabilities.defragmentation.Defragment'>
- rosbridge_library.capabilities.advertise_service.AdvertiseService
- rosbridge_library.capabilities.service_response.ServiceResponse
- rosbridge_library.capabilities.unadvertise_service.UnadvertiseService
[INFO] [1554127825.081890]: Rosbridge WebSocket server started on port 9090
[INFO] [1554127870.814823]: Client connected.  1 clients total.
[ERROR] [1554127871.075123]: Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbridge_server/websocket_handler.py", line 168, in prewrite_message
    yield self.write_message(message, binary)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 870, in run
    value = future.result()
File "/usr/lib/python2.7/dist-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 956, in handle_yield
    self.future = convert_yielded(yielded)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 1026, in convert_yielded
    raise BadYieldError("yielded unknown object %r" % (yielded,))
BadYieldError: yielded unknown object None

[ERROR] [1554127871.078397]: Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbridge_server/websocket_handler.py", line 168, in prewrite_message
    yield self.write_message(message, binary)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 870, in run
    value = future.result()
File "/usr/lib/python2.7/dist-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 956, in handle_yield
    self.future = convert_yielded(yielded)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 1026, in convert_yielded
    raise BadYieldError("yielded unknown object %r" % (yielded,))
BadYieldError: yielded unknown object None

[ INFO] [1554127871.313102573]: get_file request: package://create_description/meshes/create_body.dae

[ INFO] [1554127871.322749138]: get_file request: package://turtlebot_description/meshes/stacks/circles/68-02403-125_Spacer.dae

[ERROR] [1554127871.328545]: Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbridge_server/websocket_handler.py", line 168, in prewrite_message
    yield self.write_message(message, binary)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 870, in run
    value = future.result()
File "/usr/lib/python2.7/dist-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 956, in handle_yield
    self.future = convert_yielded(yielded)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 1026, in convert_yielded
    raise BadYieldError("yielded unknown object %r" % (yielded,))
BadYieldError: yielded unknown object None

[ERROR] [1554127871.329062]: Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbridge_server/websocket_handler.py", line 168, in prewrite_message
    yield self.write_message(message, binary)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 870, in run
    value = future.result()
File "/usr/lib/python2.7/dist-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 956, in handle_yield
    self.future = convert_yielded(yielded)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 1026, in convert_yielded
    raise BadYieldError("yielded unknown object %r" % (yielded,))
BadYieldError: yielded unknown object None

[ INFO] [1554127871.329531957]: get_file request: package://turtlebot_description/meshes/stacks/circles/plate_0_logo.dae

[ERROR] [1554127871.330464]: Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbridge_server/websocket_handler.py", line 168, in prewrite_message
    yield self.write_message(message, binary)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 870, in run
    value = future.result()
File "/usr/lib/python2.7/dist-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 956, in handle_yield
    self.future = convert_yielded(yielded)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 1026, in convert_yielded
    raise BadYieldError("yielded unknown object %r" % (yielded,))
BadYieldError: yielded unknown object None

[ INFO] [1554127871.366172449]: get_file request: package://turtlebot_description/meshes/stacks/circles/68-04552-2000-RA_Turtlebot_M-F_Standoff.dae

[ INFO] [1554127871.368231738]: get_file request: package://turtlebot_description/meshes/stacks/circles/plate_1_logo.dae

[ERROR] [1554127871.370863]: Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbridge_server/websocket_handler.py", line 168, in prewrite_message
    yield self.write_message(message, binary)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 870, in run
    value = future.result()
File "/usr/lib/python2.7/dist-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 956, in handle_yield
    self.future = convert_yielded(yielded)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 1026, in convert_yielded
    raise BadYieldError("yielded unknown object %r" % (yielded,))
BadYieldError: yielded unknown object None

[ERROR] [1554127871.371526]: Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbridge_server/websocket_handler.py", line 168, in prewrite_message
    yield self.write_message(message, binary)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 870, in run
    value = future.result()
File "/usr/lib/python2.7/dist-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 956, in handle_yield
    self.future = convert_yielded(yielded)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 1026, in convert_yielded
    raise BadYieldError("yielded unknown object %r" % (yielded,))
BadYieldError: yielded unknown object None

[ INFO] [1554127871.407662877]: get_file request: package://turtlebot_description/meshes/stacks/circles/68-04556-RA_Kinect_Standoff_Assy.dae

[ERROR] [1554127871.411927]: Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbridge_server/websocket_handler.py", line 168, in prewrite_message
    yield self.write_message(message, binary)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 870, in run
    value = future.result()
File "/usr/lib/python2.7/dist-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 956, in handle_yield
    self.future = convert_yielded(yielded)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 1026, in convert_yielded
    raise BadYieldError("yielded unknown object %r" % (yielded,))
BadYieldError: yielded unknown object None

[ INFO] [1554127871.438983124]: get_file request: package://turtlebot_description/meshes/stacks/circles/68-02421-8000-RA_Turtlebot_F-F_Standoff.dae

[ERROR] [1554127871.442600]: Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbridge_server/websocket_handler.py", line 168, in prewrite_message
    yield self.write_message(message, binary)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 870, in run
    value = future.result()
File "/usr/lib/python2.7/dist-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 956, in handle_yield
    self.future = convert_yielded(yielded)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 1026, in convert_yielded
    raise BadYieldError("yielded unknown object %r" % (yielded,))
BadYieldError: yielded unknown object None

[ INFO] [1554127871.443752298]: get_file request: package://turtlebot_description/meshes/stacks/circles/plate_2_logo.dae

[ERROR] [1554127871.444728]: Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbridge_server/websocket_handler.py", line 168, in prewrite_message
    yield self.write_message(message, binary)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 870, in run
    value = future.result()
File "/usr/lib/python2.7/dist-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 956, in handle_yield
    self.future = convert_yielded(yielded)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 1026, in convert_yielded
    raise BadYieldError("yielded unknown object %r" % (yielded,))
BadYieldError: yielded unknown object None

[ INFO] [1554127871.491384926]: get_file request: package://turtlebot_description/meshes/sensors/kinect.dae

[ERROR] [1554127871.496354]: Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbridge_server/websocket_handler.py", line 168, in prewrite_message
    yield self.write_message(message, binary)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 870, in run
    value = future.result()
File "/usr/lib/python2.7/dist-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 956, in handle_yield
    self.future = convert_yielded(yielded)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 1026, in convert_yielded
    raise BadYieldError("yielded unknown object %r" % (yielded,))
BadYieldError: yielded unknown object None

[ INFO] [1554127872.233619343]: get_file request: package://turtlebot_description/meshes/stacks/circles/plate_0_logo.tga

[ERROR] [1554127872.236926]: Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbridge_server/websocket_handler.py", line 168, in prewrite_message
    yield self.write_message(message, binary)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 870, in run
    value = future.result()
File "/usr/lib/python2.7/dist-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 956, in handle_yield
    self.future = convert_yielded(yielded)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 1026, in convert_yielded
    raise BadYieldError("yielded unknown object %r" % (yielded,))
BadYieldError: yielded unknown object None

[ INFO] [1554127872.247435640]: get_file request: package://create_description/meshes/create_body.tga

[ERROR] [1554127872.248998]: Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbridge_server/websocket_handler.py", line 168, in prewrite_message
    yield self.write_message(message, binary)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 870, in run
    value = future.result()
File "/usr/lib/python2.7/dist-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 956, in handle_yield
    self.future = convert_yielded(yielded)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 1026, in convert_yielded
    raise BadYieldError("yielded unknown object %r" % (yielded,))
BadYieldError: yielded unknown object None

[ INFO] [1554127872.403980930]: get_file request: package://turtlebot_description/meshes/stacks/circles/plate_1_logo.tga

[ERROR] [1554127872.407669]: Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbridge_server/websocket_handler.py", line 168, in prewrite_message
    yield self.write_message(message, binary)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 870, in run
    value = future.result()
File "/usr/lib/python2.7/dist-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 956, in handle_yield
    self.future = convert_yielded(yielded)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 1026, in convert_yielded
    raise BadYieldError("yielded unknown object %r" % (yielded,))
BadYieldError: yielded unknown object None

[ INFO] [1554127872.421803627]: get_file request: package://turtlebot_description/meshes/stacks/circles/68-04552-2000-RA_Turtlebot_M-F_Standoff_color.png

[ERROR] [1554127872.423558]: Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbridge_server/websocket_handler.py", line 168, in prewrite_message
    yield self.write_message(message, binary)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 870, in run
    value = future.result()
File "/usr/lib/python2.7/dist-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 956, in handle_yield
    self.future = convert_yielded(yielded)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 1026, in convert_yielded
    raise BadYieldError("yielded unknown object %r" % (yielded,))
BadYieldError: yielded unknown object None

[ INFO] [1554127872.642574066]: get_file request: package://turtlebot_description/meshes/stacks/circles/68-04552-1000-RA_Turtlebot_M-F_Standoff_color.png

[ERROR] [1554127872.645089]: Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbridge_server/websocket_handler.py", line 168, in prewrite_message
    yield self.write_message(message, binary)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 870, in run
    value = future.result()
File "/usr/lib/python2.7/dist-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 956, in handle_yield
    self.future = convert_yielded(yielded)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 1026, in convert_yielded
    raise BadYieldError("yielded unknown object %r" % (yielded,))
BadYieldError: yielded unknown object None

[ INFO] [1554127872.788032782]: get_file request: package://turtlebot_description/meshes/stacks/circles/plate_2_logo.tga

[ERROR] [1554127872.790495]: Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbridge_server/websocket_handler.py", line 168, in prewrite_message
    yield self.write_message(message, binary)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 870, in run
    value = future.result()
File "/usr/lib/python2.7/dist-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 956, in handle_yield
    self.future = convert_yielded(yielded)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 1026, in convert_yielded
    raise BadYieldError("yielded unknown object %r" % (yielded,))
BadYieldError: yielded unknown object None

[ INFO] [1554127872.800476787]: get_file request: package://turtlebot_description/meshes/stacks/circles/68-02421-8000-RA_Turtlebot_F-F_Standoff_color.png

[ERROR] [1554127872.802074]: Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbridge_server/websocket_handler.py", line 168, in prewrite_message
    yield self.write_message(message, binary)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 870, in run
    value = future.result()
File "/usr/lib/python2.7/dist-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 956, in handle_yield
    self.future = convert_yielded(yielded)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 1026, in convert_yielded
    raise BadYieldError("yielded unknown object %r" % (yielded,))
BadYieldError: yielded unknown object None

[ INFO] [1554127873.048645914]: get_file request: package://turtlebot_description/meshes/sensors/kinect.jpg

[ERROR] [1554127873.051248]: Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosbridge_server/websocket_handler.py", line 168, in prewrite_message
    yield self.write_message(message, binary)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 870, in run
    value = future.result()
File "/usr/lib/python2.7/dist-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 956, in handle_yield
    self.future = convert_yielded(yielded)
File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 1026, in convert_yielded
    raise BadYieldError("yielded unknown object %r" % (yielded,))
BadYieldError: yielded unknown object None

[INFO] [1554127873.348038]: Client disconnected. 0 clients total.

Hi @DengMark,
I ran into the same error when running my simulation. I think it's an issue in the rosbridge_suite and - at least for me - it seems to be not influencing the functionality. There is an issue describing this in the github repo of the rosbriduge_suite (https://github.com/RobotWebTools/rosbridge_suite/issues/394). Seems like it has been fixed and will be synced soon.

Hi @DengMark,
I ran into the same error when running my simulation. I think it's an issue in the rosbridge_suite and - at least for me - it seems to be not influencing the functionality. There is an issue describing this in the github repo of the rosbriduge_suite (RobotWebTools/rosbridge_suite#394). Seems like it has been fixed and will be synced soon.

Thank you for your reply. The error has been solved after updating the rosbridge_suite (newly update to v-0.11.0).


Connection info now available to services, fixiing initialization

Two main things in here:

There's a new ConnectionInfo trait that contains a bunch of low-level read-only values which is now exposed to all layers of a server connection handler.  There was already a ConnectionInfo class, which I renamed to ConnectionSnapshotwhich is more descriptive of what it is.

Fixed a bug where basically the connection handler initialization in the service DSL was occurring before the connection handler actually was fully connected.  So if someone tried to grab the connection info it would have come back as None.  So now the initializer is invoked through the handler's connected method.

:+1:


Search input: focus state style (desktop)

The search input focus state style on desktop has a thin black border. It’s different from the standard focus state styles. Is there any reason for that?

If not, I'd like to suggest these changes:
https://github.com/nhsuk/nhsuk-frontend/blob/5ecf5c953c023f20f020a99206159248b432966b/packages/components/header/_header.scss#L355
      border: 4px solid $nhsuk-focus-text-color;

https://github.com/nhsuk/nhsuk-frontend/blob/5ecf5c953c023f20f020a99206159248b432966b/packages/components/header/_header.scss#L359
      padding: 0 9px;

So the final result is:

Hey @idiosyn I will look into this and see if theres a reason it is this way. I may need to check with a Designer about it.

Seems to work as expected in mobile breakpoints, but not on desktop. Will take a closer look.

@chrimesdev I've had a look around at this and can find absolutely nothing stating that this was done for a reason, so please can we set it up as a bug to be fixed as suggested by @idiosyn above?
Or @idiosyn if you'd like to make pull request of the changes?


Video has autoplay attribute without muted attribute

Hey David.
A lot of browsers block autoplayed video's if the video is not muted. I think you can guess why ;).
Suggested change:
<video controls autoplay muted loop>
        <source src="img/homepage/brandstov_showreel.mp4" type="video/mp4">
        Your browser does not support the video tag.
</video>

Added the muted inside the HTML tag and it's running perfectly now. Thanks @InjuMichorius Inju! 🥳


Trunk Doesn't Compile SCSS Properly

I'm on Trunk 0.19.1, and I'm seeing strange behavior where trunk does not appear to fully compile SCSS to CSS.
index.html:
<!doctype html>
<html lang="en" data-theme="light">
<head>
    <meta charset="utf-8"/>
    <link rel="shortcut icon" type="image/x-icon" href="data:image/x-icon;,">
    <link data-trunk rel="scss" href="styles/index.scss"/>
    <title>Yew App</title>
</head>
<body>loading...</body>
</html>

styles/index.scss:
$black: #1a1a1a;
$white: #f2f2f2;

@property --text-color {
  syntax: "<color>";
  inherits: true;
  initial-value: $black;
}

@property --background-color {
  syntax: "<color>";
  inherits: true;
  initial-value: $white;
}

:root {
  font-family: sans-serif;
}

html[data-theme="light"] body {
  --text-color: $white;
  --background-color: $black;
}

html[data-theme="dark"] body {
  --text-color: $black;
  --background-color: $white;
}

It's a fairly simple example: define Sass variables (i.e. constants, $black and $white) for colors white and black, define CSS variables (i.e. runtime variables) and their default values, and then change the text/background colors depending on the value of html[data-theme].
Trunk compiles the above SCSS into the following CSS:
@property --text-color {
  syntax: "<color>";
  inherits: true;
  initial-value: #1a1a1a;
}
@property --background-color {
  syntax: "<color>";
  inherits: true;
  initial-value: #f2f2f2;
}
:root {
  font-family: sans-serif;
}

html[data-theme=light] body {
  --text-color: $white;
  --background-color: $black;
}

html[data-theme=dark] body {
  --text-color: $black;
  --background-color: $white;
}

body {
  color: var(--text-color);
  background-color: var(--background-color);
  margin: 3rem;
}

Inside of the html[data-theme] sections, note that it did not replace the values of $black or $white, rather it includes them verbatim, which is invalid CSS, so my stylesheet does not work. Note also that interpolation does work in the @property definitions. As per the docs, I am including rel="scss" in the <link> tag for the stylesheet, and some compilation is occurring but not all.

Trunk itself doesn't compile SASS/SCSS, but only calls sass on the command line. Of course, there may be an issue with calling it. As there was a recent change in 0.19.1 calling sass, I would ask you to try again with 0.19.0 and see if that fixes things.
If that leads to the same result, I would expect this to be caused by the local version of sass you have installed. You can run trunk tools to see what are the detected, local versions.

First, I had no idea that I needed to install sass directly, so I went about taking care of that first. I haven't ever seen trunk warn or error that it couldn't find sass, and since compilation kind of works, I assumed that there was something else going on.
I downgraded to 0.19.0 and attempted trunk serve both with sass on my PATH and without, verified via trunk tools, and in both cases, I get the same miscompilation. However, I'm closing the issue because I get a miscompilation even on Sass's hosted playground, so clearly this isn't a problem in trunk.


Marker

Jeffrey,
It must be that I'm doing something wrong, but I cannot get the marker to show.
Furthermore, I'd like to:

add some info to the marker
prevent zooming / clicking etc.

My application is here:
http://dapex50.smart4apex.nl/ords/f?p=132
regards,
Richard

Hi Richard,
The first issue I can see with your map is that somehow you have set the "syncItem" to a lat,long pair (e.g. "36.169,-115.1") whereas this should be an apex item name (e.g. "P1_LAT_LONG") with which the map should be synchronized. You set the value of the item to the lat, long value and the map will pick that up.
This simple map is designed to allow data-entry for a single marker position; to show info on the map I would use the ReportMap plugin instead.
However, if you want to use the SimpleMap you can add a bit of javascript in a Dynamic Action on the mapLoaded event to show an InfoWindow to the marker, e.g.:
opt_map.iw = new google.maps.InfoWindow();
opt_map.iw.setOptions({
    content: $v("P2_INFO")
});
opt_map.iw.open(this.data.map, opt_map.marker);

I've put a demo up here:
https://apex.oracle.com/pls/apex/f?p=76577:2

To disable zoom, add this code to the mapLoaded event:
this.data.map.setOptions({draggable: false, zoomControl: false, scrollwheel: false, disableDoubleClickZoom: true});

To stop the user clicking on the map and changing the marker position, I think I'll need to make a change to the plugin. Stay tuned.

The next release (0.4) will have a "Read-only" attribute which will disable zoom/pan, and stop the user clicking the map and changing the marker position.


Problem with torchmeta.datasets in c3lr: cannot import name '_get_confirm_token' from 'torchvision.datasets.utils' (/usr/local/lib/python3.8/site-packages/torchvision/datasets/utils.py)

The github instruction for c3lr is ran on a conda environment but I do want to try running it on colab. I have tried installing the necessary packages, library and requirements based on the list as set out in the environment.yml on the c3lr github but I still got the error as listed above. I have traced the syntax of '_get_confirm_token' to the following torchmeta github code page: https://github.com/tristandeleu/pytorch-meta/blob/master/torchmeta/datasets/utils.py

in which the module '_get_confirm_token' should be able to be tracable to the vision/utils,py github page: https://github.com/pytorch/vision/blob/main/torchvision/datasets/utils.py.
But the problem is that I cant find the '_get_confirm_token' module anywhere in utils.py.
Is this due to some update/compatibility issue in the torchvision module? Cause I have successfully imported the torchvision and the torchmeta library (even cloning from the latest torchmeta github) but the problem still persists.
Thanks and appreciated for the great help!

Hi @GreedYLearner1146, thanks for bringing this up! Indeed we discovered this issue as well, this is due to torchmeta no longer being maintained. Unfortunately, we made the choice of using torchmeta before it became clear that it is a dead project. And, it does appear to be a version mismatch issue between torchmeta and torchvision.
However, please refer to the instructions in our newer work on how to still make it work by manually downloading the datasets and placing them in a directory: https://github.com/ojss/SAMPTransfer/#running-experiments.
Thanks again for taking interest in our work!
-Ojas

Hi Ojas, Thanks very much for your assistance again! I will try it out!


Is it possible change trait Service to be a async trait?

I'm using tokio modbus in several embedded applications. But i'm facing some hangins due to tokio mutex. The "call function" in the Service trait is not an async function. So, i can not use the tokio mutex to manage data concurrency in that function. In order to do that i'm using a second futures runtime with "futures::executor::block_on". However, sometimes the application hangs. Is it possible to change the Service trait to be a async trait in a way that the call function becames a async fn?
Thanks in advance

The Service trait is already asynchronous by returning a Future.

The Service trait is already asynchronous by returning a Future.
Reference:
https://github.com/slowtec/tokio-modbus/blob/91c9f8dd9ea3eab289c57e966ce08b7ab4f166a7/src/server/service.rs#L32

But how can i use a tokio mutex in the call function? I can't use any function with .await in that function.

But how can i use a tokio mutex in the call function? I can't use any function with .await in that function.

I think this is not a  tokio-modbus specific question, but a more general one.
Apart from that, it is difficult to answer your question without a specific code.

But how can i use a tokio mutex in the call function? I can't use any function with .await in that function.

I think this is not a tokio-modbus specific question, but a more general one. Apart from that, it is difficult to answer your question without a specific code.

I believe it is a tokio-modbus question, cause if you implement a gateway for modbus RTU to modbus TCP/TLS using tokio-modbus, a tokio mutex is needed. If you use tokio mutex, you should use .await to lock the mutex in the call function of the Service trait. It is not possible to use this .await call in the same tokio runtime thread.
Code example:
struct Service {     data: Arc<Mutex<Models>>, }
impl Service {     fn new(init_data: Arc<Mutex<Models>>) -> Self {         Self {             data: init_data,         }     } }
impl tokio_modbus::server::Service for Service {     type Request = SlaveRequest<'static>;     type Response = Response;     type Exception = Exception;     type Future = future::Ready<Result<Self::Response, Self::Exception>>;
`fn call(&self, req: Self::Request) -> Self::Future
{
    let res = match req.request.clone() {
        Request::ReadHoldingRegisters(addr, cnt) => {
                let models = self.data.lock().await;
                ...

`

https://rust-lang.github.io/async-book/03_async_await/01_chapter.html

The example has everything you need: https://rust-lang.github.io/async-book/03_async_await/01_chapter.html#async-move

The example has everything you need: https://rust-lang.github.io/async-book/03_async_await/01_chapter.html#async-move

I don't beleive it has, but ok. I will try to understand how. I know the basics of async/await. I solved the problem with another executor. Support for async traits is something new in Rust. And the problem of using an asynchronous mutex across multiple executors is widely discussed as something that can cause a deadlock. So this is not a trivial issue. But I will try to understand how that code can help me.

fn move_block() -> impl Future<Output = ()> {
    async move {
    }
}

I can't figure out how to use this approach, because Rust keeps telling me that this future won't be executed.
The best way that I found to execute a tokio Mutex inside the call function of the Service trait is:
            tokio::task::block_in_place(|| {
                tokio::runtime::Handle::current().block_on(async {
                     // Run the async code
                })
              });

I can not use the "async move" cause I need to use some variables outside this async block.
The idea is something like this:
struct Service {
data: Arc<Mutex>
}
impl Service {
fn new(init_data: Arc<Mutex>) -> Self {
Self {
data: init_data
}
}
}
impl tokio_modbus::server::Service for Service {
type Request = SlaveRequest<'static>;
type Response = Response;
type Exception = Exception;
type Future = future::Ready<Result<Self::Response, Self::Exception>>;
fn call(&self, req: Self::Request) -> Self::Future
{
    let res = match req.request.clone() {
        Request::ReadHoldingRegisters(addr, cnt) => {
            let mut start_addr = 0;
            let mut registers: Vec<u16> = Vec::new();
            let mut end_addr = 0;

            tokio::task::block_in_place(|| {
                tokio::runtime::Handle::current().block_on(async {
                    let models = self.data.lock().await;
                    if (SUNSPEC_INIT_ADDR..SUNSPEC_INIT_ADDR + 2).contains(&addr) {
                        registers = models.id.into();
                        start_addr = SUNSPEC_INIT_ADDR;
                    }else {
                        for model in models.models.iter() {
                            if (addr >= model.start_addr) && (addr < model.end_addr) {
                                let model_tmp = model.clone();
                                registers = Vec::<u16>::from(model_tmp);
                                start_addr = model.start_addr;
                            }
                        }
                    }
                    end_addr = models.models[models.models.len()-1].end_addr;
                    drop(models);
                })
            });

            if addr >= SUNSPEC_INIT_ADDR && (addr + cnt) <= end_addr {
                let registers = &registers[(addr-start_addr) as usize..(cnt+(addr-start_addr)) as usize];
                Ok(Response::ReadHoldingRegisters(registers.to_vec()))
            }else {
                Err(Exception::IllegalDataAddress)
            }
        },
        _ => Err(Exception::IllegalFunction)
    };
    future::ready(res)
}

}
I follow the tokio documentation to implement that way.


archive/zip: Writer should validate file validity

The ZIP format uses uint16 to contain the length of the file name and the length of the Extra section. We should verify that that the length of these fields fits in an uint16 prior to writing the ZIP file.
See https://github.com/golang/go/blob/4c79ed5f4483f1de065ba2b409de58ae2b6907d2/src/archive/zip/writer.go#L271-L279

\cc @audreylim


Adds C header to make install for amalgamation build

Re https://github.com/cwida/duckdb/issues/446#issuecomment-757116018

Thanks for the PR, I think this can be merged.

Thanks for the PR, I think this can be merged.

Thanks @Mytherin!

Thanks @Mytherin!


Cannot drag view when Developer Tools open

When opening Developer Tools via: Top Bar -> View -> Toggle Developer Tools
Cannot drag view around screen when clicking and holding <header>.
Works when Developer Tools are not open.

Looks like it's related to https://github.com/electron/electron/issues/3647

Yes, unfortunately, this is upstream.


Closing, Reopening Warning

Hi,

I am using "io.monix" %% "shade" % "1.10.0" in build.sbt and receiving following warning message:

Closing, and reopening {QA sa=memcachedOnAWS, #Rops=0, #Wops=1, #iq=2, topRop=null, topWop=Cmd: 1 Opaque: 59 Key: myKey Cas: 0 Exp: 0 Flags: 0 Data Length: 12406131, toWrite=0, interested=4}, attempt 0.

The the size of the data I am trying to insert is ~12MB (Data Length: 12406131 in bytes) and I have increased the memcached maxValue size to accommodate for this, however still receive the above warning.

As a result of the warning, the value is never inserted into memcached.

Similar issue was resolved here: https://github.com/memcached/memcached/issues/333 but increasing maxSize is not working for me.

In terms of stack trace, I get a NPE at same line as above issue

Can you please help.

If this is configurable on the underlying Spymemcached client (I haven't checked), it might be worth trying to do it in a similar fashion https://github.com/monix/shade/pull/54. Do you want to take on this @rohantandon96 ?

sure i will give it a shot @lloydmeta and report back with results. Thanks.

sorry mate @lloydmeta, no luck with adding a timeOut threshold. Get the same error
Closing, and reopening {QA sa=memcachedOnAWS, #Rops=0, #Wops=1, #iq=2, topRop=null, topWop=Cmd: 1 Opaque: 59 Key: myKey Cas: 0 Exp: 0 Flags: 0 Data Length: 12406131, toWrite=0, interested=4}, attempt 0.

Err, no I think you misunderstood me. I meant trying to do something similar to #54 in terms of trying to add the ability to configure maxValue on the underlying Spymemcached client in a similar way, not try to solve it by configuring timeout :)