feat: check the el is not empty

Please describe the changes this PR makes and why it should be merged:
if el is null, the diff algorithm gets into trouble
Status

[ ] Code changes have been tested against prettier, or there are no code changes
[x] I know how to update typings and have done so, or typings don't need updating

Semantic versioning classification:

[ ] This PR changes the codebase

[ ] This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
[x] This PR changes the internal workings with no modifications to the external API (bug fixes, performance improvements)

[ ] This PR only includes non-code changes, like changes to documentation, README, etc.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 1 (0.0%)  changed or added relevant line in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 63.593%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/million/render.ts
0
1
0.0%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
1285

Relevant Lines:
2094

💛  - Coveralls

@aidenybai CR pls.

LGTM, thank you


any way can export excel to pdf or jpeg in QT?

any way can export excel to pdf or jpeg in QT? Thanks!

Dear @juneleung
QXlsx itself doesn't have that feature.
It seems possible if it is configured by combining it with other projects on github.


git apply does not work with VFS for Git repositories

Git apply fails, because git is trying to compare stat call result from disk with stat information, that is supposed to be in the .git/index. GVFS fills those fields with zeroes though, so they never match and git apply fails with:
error: <file in patch>: does not match index
Either GVFS client needs to be modified to write matching data to index (and then keep it up to date), or git needs to be patched to take this into account, when working with virtualized repositories.

This only applies when --index is specified.

we'll use #1108 for tracking as it has clearer repro steps.


[2.1] Update dotnet-ef to netcoreapp2.1

Arbitrary constraints must be satisfied.

@ryanbrandenburg Why is this failing in dev, but not 2.1 release?

Because dev took a new SDK.

It's probably best -- for the sake of consistency -- that dotnet-ef target netcoreapp2.1, but I don't know if this is essential to shipping 2.1. It all depends on how the CLI builds.
@wli3 - when you consume dotnet-ef to produce the BundledTools folder in the CLI, does it matter which TFM the tools package target?

@natemcmaster Agree that we should take this for RTM. Do we think there is any chance RC is broken without this fix?

Discussed in person. Whether it works in RC or not depends on how well rollforward from .NET Core 2.0 to 2.1 works. There are known issues in that feature at the moment, but I'm not sure if they will affect dotnet-ef.

Technically it doesn't matter now. But I do think it should be automatically inline with the TFM and runtime shipped with SDK (or just the latest) . Say if there is breaking runtime version in the future we don't have to manually update it.


Doc feature request: best practice for api build failure

My react static front end builds successfully but my TS/Node.js api doesn't build successfully but the app still deploys and the github action still shows as green.
I must be doing something wrong.
How do I get the github action to report the failure and the deployment to not happen?

@dfberry  Can you share the repo? What was the failure?

The repo  has the following action run.  Both the React client and Function API are TypeScript. When the client tsc fails, deploy fails. I thought the same would happen with the api which was generated with the VSCode Function extension. But instead the following partial log of the build in the action shows the error but the build/deploy continues.
Build Operation ID: |RIZP66NYKCI=.aa5ca22e_
Repository Commit : 907dd6e5bc4730b260a3850884b4aee1056207e9

Detecting platforms...
Detected following platforms:
  nodejs: 12.22.6

Source directory     : /github/workspace/api
Destination directory: /bin/staticsites/ss-oryx/api

Removing existing manifest file
Creating directory for command manifest file if it doesnot exist
Creating a manifest file...
Node Build Command Manifest file created.

Using Node version:
v12.22.6

Using Npm version:
6.14.15

Installing production dependencies in '/github/workspace/api/.oryx_prod_node_modules'...

Running 'npm install --unsafe-perm --production'...

npm WARN<EMAIL_ADDRESS>No description
npm WARN<EMAIL_ADDRESS>No repository field.
npm WARN<EMAIL_ADDRESS>No license field.

added 54 packages from 140 contributors and audited 56 packages in 2.009s
found 0 vulnerabilities

Copying production dependencies from '/github/workspace/api/.oryx_prod_node_modules' to '/github/workspace/api/node_modules'...
Done in 0 sec(s).

Running 'npm install --unsafe-perm'...

npm WARN<EMAIL_ADDRESS>No description
npm WARN<EMAIL_ADDRESS>No repository field.
npm WARN<EMAIL_ADDRESS>No license field.

added 2 packages from 2 contributors and audited 56 packages in 1.515s
found 0 vulnerabilities

><EMAIL_ADDRESS>build /github/workspace/api
> tsc

oauth-token/index.ts(11,53): error TS1005: ';' expected.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR<EMAIL_ADDRESS>build: `tsc`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /github/home/.npm/_logs/2021-12-20T18_43_18_879Z-debug.log

---End of Oryx build logs---
Oryx was unable to determine the build steps. Continuing assuming the assets in this folder are already built. If this is an unexpected behavior please contact support.
[WARNING] The function language could not be detected. The language will be defaulted to node.
Function Runtime Information. OS: linux, Functions Runtime: ~3, node version: 12
Finished building function app with Oryx
Zipping Api Artifacts
Done Zipping Api Artifacts
Zipping App Artifacts
Done Zipping App Artifacts
Uploading build artifacts.
Finished Upload. Polling on deployment.
Status: InProgress. Time: 0.2776699(s)
Status: InProgress. Time: 15.5458206(s)
Status: Succeeded. Time: 30.7427006(s)
Deployment Complete :)
Visit your site at: https://thankful-glacier-0c994031e.azurestaticapps.net
Thanks for using Azure Static Web Apps!
Exiting

Thanks. Agree that an Oryx build failure should fail the action and the deployment should not proceed. @miwebst can you please take a look?

I'd suggest creating an issue on Oryx for this, they will need to make a fix for this. Thanks for reporting!


Revert "Revert "Restore link to api manifest.yml on rack repo""

This reverts commit 8cab48b9b4081bdd91e5f5879a8155022a20f051.
Important: This isn't working for me locally, but I'm not sure why. It seems the OPTIONS request for https://raw.githubusercontent.com/convox/rack/master/api/manifest.yml is returning a 400 invalid request, reproducible via curl:
$ curl -I -X OPTIONS https://raw.githubusercontent.com/convox/rack/master/api/manifest.yml
HTTP/1.1 400 Bad Request

Release Playbook

[ ] Rebase against master
[ ] Code review
[ ] Merge into master
[ ] Verify changes at http://site-staging.convox.com
[ ] Promote release on site-production in the convox/production Rack

 Move manifest.yml back to Rack repo

Not sure if something changed on GitHub's side or what, but abandoning for now.


[BUG] Test 4.2.12 in CIS scan fails on RKE cluster

Rancher Server Setup

Rancher version: 	v2.7-58aede67b99fd5002cc44c2b36583834595acad2-head
Installation option (Docker install/Helm Chart): Helm Chart

If Helm Chart, Kubernetes Cluster and version (RKE1, RKE2, k3s, EKS, etc): RKE1

Information about the Cluster

Kubernetes version:  1.25.11, 1.26.6
Cluster Type (Local/Downstream): Downstream

If downstream, what type of cluster? (Custom/Imported or specify provider for Hosted/Infrastructure Provider): Node driver provisioned, Custom

User Information

What is the role of the user logged in? (Admin/Cluster Owner/Cluster Member/Project Owner/Project Member/Custom) Admin

Describe the bug
Test 4.2.12 in CIS scan fails on RKE cluster
To Reproduce

Create a downstream non-hardened RKE cluster
Install the "rancher-cis-benchmark" on the downstream cluster (Chart version "4.2.0-rc2" and security tag "v0.2.13-rc3")
Run CIS scan with profile "rke-profile-permissive-1.7"

Result
Test 4.2.12 in CIS scan fails
Expected Result
All tests pass
Screenshots

Additional context
ID 4.2.12 is set to 2 checks in the node yaml
- id: 4.2.12         text: "Verify that the RotateKubeletServerCertificate argument is set to true (Manual)"
- id: 4.2.12         text: "Ensure that the Kubelet only makes use of Strong Cryptographic Ciphers (Automated)"
Note: This issue is seen on both permissive and hardened profiles for RKE cluster.
CC @andypitcher @JonCrowther

This issue can be closed now, https://github.com/rancher/security-scan/pull/144 was merged.


Figure out project standards for code linting, formatting and import order

Probably the best choice is black, which is used by lots of the official Python projects. There's also ruff which is supposedly faster, but I doubt it will matter for the handful of Python files we'll have. Not sure if either of these provide import formatting, I know about isort for that.
Also as far as enforcing these, we can just trust everyone to install the formatters in their VSCode or other editors, or we can create git "hooks" that enforce it every time you commit (but that requires setting up a library like pre-commit which can be bypassed), or we can set up a GitHub action that tries to do the formatting and fails if there are any changes. The GitHub action would be configured as a "check" so that PRs that violate it (aren't formatted) wouldn't be able to be checked in.
Discuss your ideas and opinions here.

I offer this as an example of hooks that work quite well in practice. The DX education aspect to it is we should demonstrate a "failing" commit, e.g. deliberately adding trailing whitespace to a file or adding out-of-lexical-order deps to requirements.txt. And tell students that if there was a Red message, then it is like "the commit never happened". So we can git diff to see what the auto-fix was. And hit up-arrow or !! to repeat the commit and this time it will have effect, it will succeed.
In several industrial settings I have used a variety of linters, as part of a team of colleagues having diverse abilities. I find some linters are entirely too strict, and not worth educating developers about when to obey or ignore a given diagnostic. I find that ruff is on the permissive side and should always be obeyed at PR time, even if only to shut it up. Ignoring its complaint about e.g. "unused import" is perfectly fine for frequent WIP commits that precede a PR submission. It is always fine to run $ black *.py and to run $ isort *.py. It usually takes just under 1 second to run them along with $ ruff check *.py on a codebase of modest size, so it's a good fit for a rapid edit-debug cycle.
Isort performs a distinct task from black -- it is necessary to run both together, perhaps running black on every edit and isort on every sixth edit or so. Isort creates the three groups specified by PEP-8, and yes, it really is easier for a reviewer to read code which has been formatted in that way.
The first time we run black on a new codebase it can be helpful to specify black -S ., so single-quote strings don't arbitrarily get converted to double-quote. It's just a matter of minimizing diffs. After folks get used to it, no one will care. A project that adopts black should definitely specify black . with no options. Interestingly, main currently has no text literals which would be affected by that.
You may find that engineers change how they code in two ways when using black:

To get something to layout as desired, we might choose to introduce a named temporary expression, so the final function call fits within a line.
Tacking on an "extra" trailing , comma will sometimes make formatted args or a list more aesthetically pleasing.

I recommend adding something like this to pyproject.toml:
[tool.black]
line-length = 100

[tool.isort]
float_to_top =            true
include_trailing_comma =  true
multi_line_output =       "VERTICAL_HANGING_INDENT"
line_length =             100

As an orthogonal aspect, I recommend not requiring that PRs must do type annotation which passes $ mypy --strict *.py. However, you might possibly choose to produce "cleanup PRs" which add type annotation after-the-fact. It will have the effect of encouraging committers to at least consider adding the optional type annotation.
Such practice carries a few benefits:

Static type safety analysis can prove that certain failure modes are impossible, such as calling .lower() on a putative string which might actually be None.
Function docstrings tend to be more concise, when the signature has already explained that an input arg is e.g. s: str or s: str | None.

The gold standard here is mypy. I find that if I can get some code past that, in strict mode, then I can nearly always get it past Microsoft's pyright, as well. I find that Meta's pyre check and Google's pytype are kind of a pain-in-the-neck to integrate into such a development flow. I'm sure running each of them alone works well for those respective organizations. But the whole business of different tools noticing different sets of symptoms and needing different "ignore" comments gets to be a bit nightmarish, especially when they complain about an "ignore" which "wasn't needed" since that tool doesn't notice details which another tool does. Recommend you rely on mypy plus maybe pyright, and ignore the other two contenders. Recommend that you not make "type safe" a requirement for merging a PR down to main.

Thank you for the interesting insights and sample configurations.
What are your thoughts on the alternatives discussed in the OP? Specifically

Trust developers to do formatting in VSCode or on the command line
Install pre-commit in the git repo, with the caveat that developers can just fail to install it and bypass the checks
Create PR "checks" that enforce formatting before a PR can be checked in

It seems to me that 3) is the only way to conclusively ensure that the code is always formatted correctly in the repo. As you pointed out, 2) can be cumbersome when trying to check in WIP.
It seems we need some combination of the above?
Additionally, I've never discussed type checking in any of the Python classes, not sure if it's a good idea to introduce it now or if it will cause too much friction.

After discussing tonight, we're going to go with #3: Use a GitHub action/check to enforce formatting before code can be checked in. I'll work on it in the next week.

Decided to use ruff with 4 space indentation. Will work on creating a config.

Closing issue since it looks like the PR didn't automatically do it (prob b/c branch was merged into another branch?)


highlight.js theme import doesn't work for some reason

Current behaviour
I'm importing the highlightjs css library:
import "highlight.js/styles/base16/material-darker.css";
But it doesn't seem to work for some reason. It works when I don't use react-simple-code-editor
Expected behaviour
highlight.js theme works with the Editor
Code sample
import hljs from "highlight.js/lib/core";
import Editor from "react-simple-code-editor";
import { useState } from "react";
import "highlight.js/styles/base16/material-darker.css";

function CodeInput() {
    const [userCode, setUserCode] = useState("");

    return (
        <>
            <Editor
                value={userCode}
                onValueChange={(userCode) => setUserCode(userCode)}
                highlight={(userCode) => hljs.highlightAuto(userCode).value}
                padding={10}
                tabSize={4}
            />
        </>
    );
}

export default CodeInput;

Screenshots (if applicable)

What have you tried
Tried importing other themes to see if they work or not, they don't:/
Your Environment

software
version

react-simple-code-editor
0.13.1

react
18.2.0

npm
10.4.0

highlight.js
11.9.0

firefox
122.0.1

Same problem


unhelpful KeyError raised when mismatch on calls

from unittest import TestCase

from mock import Mock, call
from mockextras import stub

class Appender:

    def __init__(self):
        self.appended = []

    def append(self, message):
        self.appended.append(message)
        return True

class AppenderTest(TestCase):

    def test_this_one_works(self):

        foo = Mock()
        appended = "a"
        foo.append.side_effect = stub((call(appended), True))
        foo.append("a")
        self.assertEquals(foo.mock_calls, [call.append(appended)])

    def test_this_one_barfs_with_KeyError_but_should_really_be_more_helpful(self):

        foo = Mock()
        appended = "a a"
        foo.append.side_effect = stub((call(appended), True))
        foo.append("a")
        self.assertEquals(foo.mock_calls, [call.append(appended)])

Help could be calls that were close but not exact. In this case the intended and actual call were (re a string param) different by a couple of chars. It'd be a huge help for a string diff to be shown.  Sure that's if the param in question is diffable. Even if not, there's a kinder way of raising an error:
append("a") called, yet there were no stubs to match that. Instead, these were available for matching:
append("a a")

thx for working on this :)

Any chance of a release of this?

Released :)


Add preprocessor unit test

Fix https://github.com/Azure/autorest.java/issues/1256

You will need a surefire plug to run the test in mvn verify
https://github.com/Azure/autorest.java/blob/main/fluentgen/pom.xml#L95-L111


SuperKoch for morserino 32

A idea and suggestions for a program that uses German psychologist Ludwig Koch's method to learn you how to receive and send morse code, for Morserino 32 .
Platform Compatibility: Linux Ubuntu and variants,Windows and Mac OS.
Inputs: iambic,paddles, straight key. Standard inputs like a keyboard and mouse  if a Morserino 32 is not available.
Some basic information for those unfamiliar with morse keys:
Example of a straight key: https://en.m.wikipedia.org/wiki/File:J38TelegraphKey.jpg
A straight key is the common telegraph key as seen in various movies. It is a simple bar with a knob on top and a contact underneath. When the bar is depressed against spring tension, it forms a circuit and allows electricity to flow.
Keys having two separate levers, one for dits and the other for dahs are called dual or dual-lever paddles. With a dual paddle both contacts may be closed simultaneously, enabling the "iambic" functions of an electronic keyer that is designed to support them. The operator can create a series of alternating dits and dahs . A single-paddle also utilizes separate contacts for dits and dahs. A example of a dual lever paddle: http://www.morsex.com/bencher/by1.jpg
More on morse keys: https://en.m.wikipedia.org/wiki/Telegraph_key
How the wpm or morse code speed are calculated: The basic element of Morse code is the dot and all elements can be defined in terms of multiples of the dot length. The word PARIS is used because this is the length of a typical word in English plain text, it has a total length of 50 dot lengths. If the word PARIS can be sent ten times in a minute using normal Morse code timing then the code speed is 10 WPM. The character speed is related to dot length in seconds by the following formula: Speed (WPM) = 2.4 * (Dots per second)
Here are the ratios for the other code elements: Dash length=Dot length x 3 Pause between elements=Dot length Pause between characters=Dot length x 3 Pause between words=Dot length x 7
The Koch method:
What is the koch method? The Koch method, named after German psychologist Ludwig Koch, which uses the full target speed from the outset but begins with just two characters. Once strings containing those two characters can be copied with 90% accuracy, an additional character is added, and so on until the full character set is mastered. It's based on learned reflexes, and is arguably the best and fastest method available!
Learning at speeds below 15 WPM is strongly discouraged because building reflexes does not work at slow speeds. More info about Koch's method here: https://www.qsl.net/n1irz/finley.morse.html
How morse code sounds at 15 wpm: https://youtu.be/EewFLTsHlFg https://youtu.be/JskAldoROMM
A graphical representation of what is possible at different speeds. These speed "limits" are approximated, it's easy for someone who handles 30 wpm to go slower. https://github.com/Supermagnum/SuperKoch/blob/master/Screenshot_20210102-035710__01__01__01__01__01.jpg Something interesting happens when one can handle speeds above 30 wpm, you will start to hear the complete word!
But, there is a thing..
NO ONE HAS USED THIS METHOD TO TRAIN A PERSON HOW TO RECEIVE AND SEND!
It should work for both as it will teach muscle memory.
There are NO software that can teach both, only receive!
Koch himself, with hand-picked students, got a group to master receiving 12 wpm code in a mere 13.5 hours!
That's much faster than any other method in the psychological literature.
How the software should work,and it's modes:
Automatic progression mode:
First the program sends a series of K's in CW for 30 seconds while the character K is displayed. Then it repeats the procedure with the character M.
When that is complete it sends a four characters group using K and M in random places without displaying the signs.
It then waits for a four characters input using the keyboard or the morse device, shows the characters you have gotten correct in green, the wrong ones in red.
That continues until the user has gotten 90 % correct of a number of groups, then a new letter is introduced ( for example X ), it is sent for 30 seconds while the character is displayed.
Then the lesson continues using the new character until 90% of groups is correct, a new character or prosign is introduced and the lessons continues until all characters are learned.
It may also be possible to display the character K and send the character in morse 5 times and wait for 4~10 around seconds for the answer using the morse key or keyboard.
Options and statistics:
It could also display statistics of a users progress and time used. The slowest permitted speed should be 15 WPM. Any speed below this is wasted time. Some of it may be posted to https://lcwo.net/ if an API is available.
Multiple users in the program, but only one at a time.
It should also be possible to adjust the mininum and maximum number of characters in the groups and if they are of random size.
It should support Farnsworth timing, characters are sent at the same speed as at higher speeds, while extra spacing is inserted between characters and words to "slow" the transmission down.
The advantage of this is that you get used to recognising characters at a higher speed,the characters does not "blend together" as easily and thus it will be easier to increase the speed later on.
Morse alphabets that should be used : Primarly International, but the possibility to add regional extras like the Norwegian Æ Ø and Å. Those extras should be possible to add to the characters learned with a option in settings.
The international Morse code table:
https://en.m.wikipedia.org/wiki/File:International_Morse_Code.svg
There are codes for Letters, numbers, punctuation, prosigns for Morse code and non-English variants, those can be found here under "Letters, numbers, punctuation, prosigns for Morse code and non-Latin variants": https://en.m.wikipedia.org/wiki/Morse_code
Possible future options:
Compatibility with a Murmur client that can connect to a murmur server, that enables chatting in morse code with other users.
That makes it necessary to be able to adjust the pitch of the sent CW tone.
The client is available at: https://www.mumble.info/ Similar low latency open source free software solutions could also be used.
Suggestion for a plugin for mumble: QRN and signal fading. What QRN is : https://www.amateur-radio-wiki.net/qrn/
A existing murmur server already exists: http://internetcw.weebly.com/
Compatible with Hamsphere: http://hamsphere.com/
There is a API, but the developers of hamsphere may have to be contacted.
Documentation for Morserino 32 can be found here:
https://github.com/oe1wkl/Morserino-32/tree/master/Documentation

import random
import time
Morse code dictionary
MORSE_CODE = {
'A': '.-', 'B': '-...', 'C': '-.-.', 'D': '-..', 'E': '.', 'F': '..-.',
'G': '--.', 'H': '....', 'I': '..', 'J': '.---', 'K': '-.-', 'L': '.-..',
'M': '--', 'N': '-.', 'O': '---', 'P': '.--.', 'Q': '--.-', 'R': '.-.',
'S': '...', 'T': '-', 'U': '..-', 'V': '...-', 'W': '.--', 'X': '-..-',
'Y': '-.--', 'Z': '--..', '0': '-----', '1': '.----', '2': '..---',
'3': '...--', '4': '....-', '5': '.....', '6': '-....', '7': '--...',
'8': '---..', '9': '----.'
}
Reverse the morse code dictionary
REVERSE_MORSE_CODE = {v: k for k, v in MORSE_CODE.items()}
List of all characters
ALL_CHARS = list(MORSE_CODE.keys())
Prosigns
PROSIGNS = ['AR', 'BT', 'CT', 'HH', 'KA', 'KM', 'KN', 'KN', 'SK', 'SN']
Set the minimum and maximum number of characters in the groups
MIN_GROUP_SIZE = 4
MAX_GROUP_SIZE = 10
Set the target accuracy for progressing to the next character
TARGET_ACCURACY = 0.9
Set the slowest permitted speed in WPM
MIN_SPEED = 15
Set the Farnsworth speed in WPM
FARNSWORTH_SPEED = 15
Set the character spacing in seconds for Farnsworth timing
FARNSWORTH_SPACING = 1.2 / FARNSWORTH_SPEED
def send_morse_character(char):
"""Send a single character in morse code"""
code = MORSE_CODE[char]
for symbol in code:
if symbol == '.':
print('dit', end=' ')
else:
print('dah', end=' ')
print()
def send_morse_string(string, speed=MIN_SPEED, use_farnsworth=False):
"""Send a string in morse code"""
# Calculate the inter-symbol and inter-character spacing
symbol_spacing = 1.2 / speed
char_spacing = 3 / speed
word_spacing = 7 / speed
for char in string:
    send_morse_character(char)
    time.sleep(char_spacing)

# Add extra spacing for Farnsworth timing
if use_farnsworth:
    time.sleep(FARNSWORTH_SPACING - char_spacing)

Set the initial characters to learn
chars_to_learn = ['K', 'M']
Set the current character index
char_index = 0
Set the initial group size
group_size = MIN_GROUP_SIZE
Set the initial accuracy
accuracy = 0
Set the initial speed
speed = MIN_SPEED
Set whether to use Farnsworth timing
use_farnsworth = False
while char_index < len(chars_to_learn):
# Send the current character for 30 seconds
char = chars_to_learn[char_index]
print(f'Sending character {char} for 30 seconds...')
for i in range(30):
send_morse_string(char, speed=speed, use_farnsworth=use_farnsworth)
time.sleep(1)
# Repeat the procedure with a random group of characters
group = []
for i in range(group_size):
    group.append(random.choice(chars_to_learn))
print(f'Sending group {group} without displaying the signs...')
for char in group:
    send_morse_string(char, speed=speed, use_farnsworth=use_farnsworth)
    time.sleep(1)

# Wait for user input
print('Enter the group using the keyboard or morse device:')
user_input = input()

# Check the user's accuracy
correct = 0
for i in range(len(group)):
    if group[i] == user_input[i]:
        correct += 1
        print(f'{user_input[i]} is correct')
    else:
        print(f'{user_input[i]} is incorrect')
accuracy = correct / len(group)
print(f'Accuracy: {accuracy}')

# If the user's accuracy is at or above the target, move on to the next character
if accuracy >= TARGET_ACCURACY:
    char_index += 1
    group_size = random.randint(MIN_GROUP_SIZE, MAX_GROUP_SIZE)
    accuracy = 0

print('Congratulations, you have learned all the characters!')

import random import time
Morse code dictionary
MORSE_CODE = { 'A': '.-', 'B': '-...', 'C': '-.-.', 'D': '-..', 'E': '.', 'F': '..-.', 'G': '--.', 'H': '....', 'I': '..', 'J': '.---', 'K': '-.-', 'L': '.-..', 'M': '--', 'N': '-.', 'O': '---', 'P': '.--.', 'Q': '--.-', 'R': '.-.', 'S': '...', 'T': '-', 'U': '..-', 'V': '...-', 'W': '.--', 'X': '-..-', 'Y': '-.--', 'Z': '--..', '0': '-----', '1': '.----', '2': '..---', '3': '...--', '4': '....-', '5': '.....', '6': '-....', '7': '--...', '8': '---..', '9': '----.' }
Reverse the morse code dictionary
REVERSE_MORSE_CODE = {v: k for k, v in MORSE_CODE.items()}
List of all characters
ALL_CHARS = list(MORSE_CODE.keys())
Prosigns
PROSIGNS = ['AR', 'BT', 'CT', 'HH', 'KA', 'KM', 'KN', 'KN', 'SK', 'SN']
Set the minimum and maximum number of characters in the groups
MIN_GROUP_SIZE = 4 MAX_GROUP_SIZE = 10
Set the target accuracy for progressing to the next character
TARGET_ACCURACY = 0.9
Set the slowest permitted speed in WPM
MIN_SPEED = 15
Set the Farnsworth speed in WPM
FARNSWORTH_SPEED = 15
Set the character spacing in seconds for Farnsworth timing
FARNSWORTH_SPACING = 1.2 / FARNSWORTH_SPEED
def send_morse_character(char): """Send a single character in morse code""" code = MORSE_CODE[char] for symbol in code: if symbol == '.': print('dit', end=' ') else: print('dah', end=' ') print()
def send_morse_string(string, speed=MIN_SPEED, use_farnsworth=False): """Send a string in morse code""" # Calculate the inter-symbol and inter-character spacing symbol_spacing = 1.2 / speed char_spacing = 3 / speed word_spacing = 7 / speed
for char in string:
    send_morse_character(char)
    time.sleep(char_spacing)

# Add extra spacing for Farnsworth timing
if use_farnsworth:
    time.sleep(FARNSWORTH_SPACING - char_spacing)

Set the initial characters to learn
chars_to_learn = ['K', 'M']
Set the current character index
char_index = 0
Set the initial group size
group_size = MIN_GROUP_SIZE
Set the initial accuracy
accuracy = 0
Set the initial speed
speed = MIN_SPEED
Set whether to use Farnsworth timing
use_farnsworth = False
while char_index < len(chars_to_learn): # Send the current character for 30 seconds char = chars_to_learn[char_index] print(f'Sending character {char} for 30 seconds...') for i in range(30): send_morse_string(char, speed=speed, use_farnsworth=use_farnsworth) time.sleep(1)
# Repeat the procedure with a random group of characters
group = []
for i in range(group_size):
    group.append(random.choice(chars_to_learn))
print(f'Sending group {group} without displaying the signs...')
for char in group:
    send_morse_string(char, speed=speed, use_farnsworth=use_farnsworth)
    time.sleep(1)

# Wait for user input
print('Enter the group using the keyboard or morse device:')
user_input = input()

# Check the user's accuracy
correct = 0
for i in range(len(group)):
    if group[i] == user_input[i]:
        correct += 1
        print(f'{user_input[i]} is correct')
    else:
        print(f'{user_input[i]} is incorrect')
accuracy = correct / len(group)
print(f'Accuracy: {accuracy}')

# If the user's accuracy is at or above the target, move on to the next character
if accuracy >= TARGET_ACCURACY:
    char_index += 1
    group_size = random.randint(MIN_GROUP_SIZE, MAX_GROUP_SIZE)
    accuracy = 0

print('Congratulations, you have learned all the characters!')

It's not compatible with morserino.
It does not have a GUI.
Those are priority 1.

Please read the entire document here:
https://github.com/Supermagnum/SuperKoch/blob/master/README.md


In RTK Rccord/Replay mode , how to record a rosbag ? And where the rosbags is saved?

In the record mode, a rosbag/record will be automatically generated.


python setup.py install error

when i run "python setup.py install" command in in my company's internal network, i got the issue that "distutils.DistutilsError：could not find suitable distribution for requirement.parse('pytest-runner'), is any offline way to setup the mmdetection?

You may try removing the line.

Have u installed mmcv ?


Spurious build failures

Builds are spuriously failing.
Commit: 2c7dce409105889249877a2fc91833f9b2a7c936
Error:
running 1 test

test tests::providers ... FAILED

failures:

---- tests::providers stdout ----

	thread 'tests::providers' panicked at 'assertion failed: us.generate(url, provider).is_ok()', src/lib.rs:158

note: Run with `RUST_BACKTRACE=1` for a backtrace.

The error obviously wasn't the doc changes, so that leads me to believe it's either:
a. the 3 second timeout on the hyper request is not enough time to generate a URL for some services; or
b. the service simply did not respond
So this leads me to suggest one of three courses of action:

Create a check in the test, where if the result of a generate call is a "Service is unavailable" error, then to either:
a. skip the provider for the build and assume it works;
b. re-try the provider up to 3 times;

Increase the maximum time per request to a 5 second timeout;

ignore provider errors (this essentially invalidates the tests). Instead, we test against sample stored outputs of each of these services, and simply check that decoding them works.

Personally, I prefer option 1A. I think that allowing over 3 seconds for a provider is too long (using try_generate would fix this, as it'd simply attempt the next provider), and re-trying probably wouldn't matter, because the service likely would still be slower than usual within a 1-minute window.

The problem is that on a my development machine the tests are good. It seems travis's connection is bad for this kind of testing.


WebUI: log login attempts, HTTP error codes, to be able to make it secure using fail2ban

I'm using fail2ban to protect myself from SSH bruteforce, and SSH DDOS attacks - this was my only service I used over WAN, and it could be easily changed with Flexget's new WebUI!
The WebUI should log to an other file, like ~/.flexget/webui.log. Later I'll create a full regexp to the possible failures, in this format filter.d/apache-auth.conf.
Thanks @stevezau!

hmm, i thinking we store the web access logs in a different log file?? maybe ~/.flexget/flexget-access.log
Storing it within flexget.log might get messy?

Yes, it would be better, but the point is, that let the fail2ban find that regexp in a file, and then it will do its job.

Relevant to #1419

Is it still not working with Fail2Ban or it has been changed?


Change jaggery docs app copyright year and remove download button

@thusithathilina Please mention the JIRA in the commits and the PR comment


Interest Measures missing

Only one of three supported interest measures should be required (support, confidence or lift). It is an invalid task without any specified interest measure.

Now if support and confidence is not specified these variables will be filled by default values (support = 0.001 and confidence 0.1).

This is a new issue regarding interest measures. So support and confidence should be required for each mining within input task pmml otherwise it throws an exception


Rework Create Folder

Quick fix #93973
Quick because the Project Dialog needs refactoring. I did what I could, but it needs testing whether creating and importing project work as they should in all cases.
https://github.com/user-attachments/assets/0c0f0f66-a32f-44c8-b53f-cf653635c7aa
I briefly tested that it works, but there are probably milion edge cases.

Perhaps the folder text field should be enabled so the user can edit its name? I don't think there is any reason to have it disabled, and I could imagine it being a minor workflow improvement.

Project folder is a Label, it can't be edited. You can "edit" it by changing project name or naming scheme, or by disabling Create Folder and picking the folder yourself (you can create folders in file dialog).

Then I suppose the question is whether to use a LineEdit instead.
My intuition is that it would be strictly an upgrade from a usability standpoint and that it might not be too terribly hard to implement, though I'm less experienced with the UI controls so this may be false.

I made it a Label to simplify the code. If you change project directory, you expect that it won't change when you rename the folder. The old code was handling such case, but it was overly complex. Now the project folder name is always auto-generated when you want to auto-create one. If you want a different name, create the folder manually.

Definitely agree with keeping it simple, all I'm suggesting is a drop-in replacement in order to make the text editable.
This is approximately what I mean:
editor/project_manager/project_dialog.h lines 82-83:
LineEdit *project_name_suffix = nullptr;
LineEdit *install_name_suffix = nullptr;

editor/project_manager/project_dialog.cpp lines 820-824:
project_name_suffix = memnew(LineEdit);
...
install_name_suffix = memnew(LineEdit);

Maybe some layout would be needed as well, I'm not sure.
I'm away from my main computer right now but in my head this should work almost identically.

I tested your changes and the LineEdit is unusable due to small size:

Also / should not be part of the editable suffix.
So this would need some more changes. I think it's better to do it in a follow up, as the code won't be much different.

I tested your changes and the LineEdit is unusable due to small size:  Also / should not be part of the editable suffix.
So this would need some more changes. I think it's better to do it in a follow up, as the code won't be much different.

Hmm, on my machine the LineEdit resizes correctly:

Could you confirm that you've included these changes to project_dialog.cpp at lines 823 and 828:
project_name_suffix->set_expand_to_text_length_enabled(true);
...
install_name_suffix->set_expand_to_text_length_enabled(true);

If it's still an issue this may be a bug with LineEdit.
Moving the leading slash is a minor change as well, I can add those changes to the suggestion.
For such a small revision so central to the PR, I'm not sure if it's worth the overhead, but I could open a follow up for these changes if needed.


RNG-140: Add LongSampler interface and UniformLongSampler

This is replacement for RandomUtils.nextLong(long lo, long hi) from
Commons Math.

Coverage increased (+0.006%) to 99.577% when pulling fffcf4c1664aa7a4db66686db29312346d5a7ace on aherbert:feature-RNG-140 into 897bbc93399105d1856d71400255fb40f910e864 on apache:master.


Refactor or replace sprintf.h

What has to be done
We have our own sprintf authored by @sglow in sprintf.h and cpp. The reason we rolled our own instead of the standard one is that we want it to be malloc-free.
This is several hundred lines of complex string formatting code and it doesn't have unit tests.
How do you know it has to be done
Without extensive unit tests, the library is not safe to include in the product. String formatting is notorious for producing buffer overflow bugs. Extensive unit testing is one of the ways this risk could be reduced.
We of course have the option of just not including the library in production builds at all, but then we lose the ability to debug something happening in a production build.
Code pointers
Add unit tests in a new file controller/lib/debug/sprintf_test.cpp.
I think we should, at least, borrow this test suite (if not borrow the whole library - which appears to be of comparable complexity to ours).
CC @jlebar

The code is badly out of date with modern compilers. Any use of long, long long and so on should be replaced with std types such as int32_t and int64_t. As it is now, it is not passing clang-tidy checks.

Actually, I second @jkff 's suggestion that this be replaced with the suggested library.

The mpaland/printf library appears to work, but needed some modifications, because it is geared at C++11, for example some type conversions are implicit.
Instead of committing the proof-of-concept code, I have gone forward with forking the original library as:
https://github.com/RespiraWorks/printf
We will update it there and ensure it is well tested. It will also be easier to maintain separately in case the original library gets updated and we need to rebase. Once this fork is in reasonably good shape, we will import the library into Ventilator as either a git submodule or just copy a specific snapshot.

Looks like sprintf is not actually being used by in the controller. It appears that it was there only for printing out traces. The debug interface has a mode for dumping this "trace buffer" over serial, but there is nothing that actually fills it up. Since it is not actually used and no one has actually felt inspired to use it recently, we propose to actually drop this from our code base. We may leave a stub pointing to the mpaland library noted above, so that in case someone does need it they are welcome to go and bring in this well-tested code.

sprintf has been removed by #1064, since we no longer use debug.Print anywhere in the code.
In case we want to resurrect it, codebase after #1063 has it in a form that is compatible with the current debug library architecture.


fix: addinvoice api should check for amt: int

closes #18
also added a more verbose error message

Shoutout to @dni from Satoshi Engineering 🎉 work's and we are happy 🤟


Kubernetes failed to pull image from docker registry

Problem
I am not able to pull an image from docker registry to upgrade my kubernetes cluster version to v1.28.10 in my production server. This is the error message when it's trying to pull the image:
Failed to pull image "rancher/kubectl:v1.28.2": rpc error: code = Unknown desc = failed to pull and unpack image "docker.io/rancher/kubectl:v1.28.2": failed to resolve reference "docker.io/rancher/kubectl:v1.28.2": failed to do request: Head "https://registry-1.docker.io/v2/rancher/kubectl/manifests/v1.28.2": read tcp <IP_ADDRESS>:54336-><IP_ADDRESS>:443: read: connection reset by peer
1. Manual Pull
When I try to login to the server and do a manual pull with the command "docker pull rancher/kubectl:v1.28.2" I get the following error:
"Error response from daemon: Get "https://registry-1.docker.io/v2/": read tcp <IP_ADDRESS>:54336-><IP_ADDRESS>:443: read: connection reset by peer"
This only happens in the Dalian/China site , hence I checked with firewall team but the traffic is already allowed on their end according to their firewall logs.
2. Firewall
Upon checking with the site firewall team, the connectivity and traffic is working with telnet but when pulling the image it shows a connection reset by the destination(docker registry), I already requested the firewall team to allow any to any rule for connectivity between source and destination and vice versa but it still doesn't work.
3. Differences
The image pull works on other sites: West Europe, East US, South East Asia etc
However it doesn't work in China/Dalian site. The last successful image pull and kubernetes upgrade for this site in Dalian city was on the last week of August. (26th - 30th August 2024)
Aside from that the set up and steps to pull the image and upgrade the kubernetes cluster version is the same as the other sites.
Question

Have there been any changes by docker community in September that blocks the request/connection to the docker registry from China/Dalian(It was last working at 26th - 30th August 2024) ?

Did anyone face similar issues(connection reset at peer) trying to pull the image from docker registry in a server/VM at China/Dalian?

If this is a docker registry issue, how can I reach out to the docker registry team to check further on why the connection is resetting on docker registry end?

Thank You.
Any other ideas or suggestions aside from the above questions are also greatly appreciated.

This is the wrong repo to ask this question. This repo manages the registry image.
If your question is related to Docker Hub registry Open an issue in https://github.com/docker/hub-feedback


requeue pods failed scheduling

a new state count inside appwrapper is added for preemption of pods which fails due to scheduling errors.
Status:
  Canrun:  true
  Conditions:
    Last Transition Micro Time:  2022-08-18T22:54:47.768165Z
    Last Update Micro Time:      2022-08-18T22:54:47.768165Z
    Status:                      True
    Type:                        Init
    Last Transition Micro Time:  2022-08-18T22:54:47.768457Z
    Last Update Micro Time:      2022-08-18T22:54:47.768457Z
    Reason:                      AwaitingHeadOfLine
    Status:                      True
    Type:                        Queueing
    Last Transition Micro Time:  2022-08-18T22:54:47.782720Z
    Last Update Micro Time:      2022-08-18T22:54:47.782720Z
    Reason:                      FrontOfQueue.
    Status:                      True
    Type:                        HeadOfLine
    Last Transition Micro Time:  2022-08-18T22:54:47.869967Z
    Last Update Micro Time:      2022-08-18T22:54:47.869967Z
    Reason:                      AppWrapperRunnable
    Status:                      True
    Type:                        Dispatched
    Last Transition Micro Time:  2022-08-18T22:56:32.847695Z
    Last Update Micro Time:      2022-08-18T22:56:32.847695Z
    Message:                     Insufficient number of Running pods, minimum=1, running=0.
    Reason:                      MinPodsNotRunning
    Status:                      True
    Type:                        PreemptCandidate
    Last Transition Micro Time:  2022-08-18T22:56:32.858016Z
    Last Update Micro Time:      2022-08-18T22:56:32.858016Z
    Reason:                      AwaitingHeadOfLine
    Status:                      True
    Type:                        Queueing
    Last Transition Micro Time:  2022-08-18T22:56:32.951572Z
    Last Update Micro Time:      2022-08-18T22:56:32.951572Z
    Reason:                      AppWrapperRunnable
    Status:                      True
    Type:                        Dispatched
    Last Transition Micro Time:  2022-08-18T22:58:32.859641Z
    Last Update Micro Time:      2022-08-18T22:58:32.859641Z
    Message:                     Insufficient number of Running pods, minimum=1, running=0.
    Reason:                      MinPodsNotRunning
    Status:                      True
    Type:                        PreemptCandidate
    Last Transition Micro Time:  2022-08-18T22:58:32.867296Z
    Last Update Micro Time:      2022-08-18T22:58:32.867295Z
    Reason:                      AwaitingHeadOfLine
    Status:                      True
    Type:                        Queueing
    Last Transition Micro Time:  2022-08-18T22:58:32.954668Z
    Last Update Micro Time:      2022-08-18T22:58:32.954668Z
    Reason:                      AppWrapperRunnable
    Status:                      True
    Type:                        Dispatched
  Controllerfirsttimestamp:      2022-08-18T22:54:47.767787Z
  Filterignore:                  true
  Queuejobstate:                 Dispatched
  Sender:                        before manageQueueJob - podPhaseChanges
  State:                         Running
Events:                          <none>

We do see AW running as it is the only one running in the system, the retry interval is very small as seen.

Status block looks as below for pods that fail to schedule:
Status:
  Canrun:  true
  Conditions:
    Last Transition Micro Time:  2022-08-21T12:26:57.994674Z
    Last Update Micro Time:      2022-08-21T12:26:57.994674Z
    Status:                      True
    Type:                        Init
    Last Transition Micro Time:  2022-08-21T12:26:57.994990Z
    Last Update Micro Time:      2022-08-21T12:26:57.994990Z
    Reason:                      AwaitingHeadOfLine
    Status:                      True
    Type:                        Queueing
    Last Transition Micro Time:  2022-08-21T12:26:58.010825Z
    Last Update Micro Time:      2022-08-21T12:26:58.010823Z
    Reason:                      FrontOfQueue.
    Status:                      True
    Type:                        HeadOfLine
    Last Transition Micro Time:  2022-08-21T12:26:58.065137Z
    Last Update Micro Time:      2022-08-21T12:26:58.065134Z
    Reason:                      AppWrapperRunnable
    Status:                      True
    Type:                        Dispatched
    Last Transition Micro Time:  2022-08-21T12:27:21.534845Z
    Last Update Micro Time:      2022-08-21T12:27:21.534845Z
    Message:                     Pods failed scheduling failed=0, running=1.
    Reason:                      PodsFailedScheduling
    Status:                      True
    Type:                        PreemptCandidate
    Last Transition Micro Time:  2022-08-21T12:27:21.542699Z
    Last Update Micro Time:      2022-08-21T12:27:21.542699Z
    Reason:                      AwaitingHeadOfLine
    Status:                      True
    Type:                        Queueing
    Last Transition Micro Time:  2022-08-21T12:27:21.633240Z
    Last Update Micro Time:      2022-08-21T12:27:21.633239Z
    Reason:                      AppWrapperRunnable
    Status:                      True
    Type:                        Dispatched
  Controllerfirsttimestamp:      2022-08-21T12:26:57.994454Z
  Filterignore:                  true
  Pending:                       1
  Queuejobstate:                 Dispatched
  Sender:                        before manageQueueJob - podPhaseChanges
  State:                         Running
Events:                          <none>

The message is off: Pods failed scheduling failed=0, running=1.  it should be Pods failed scheduling failed=1, running=1

The message is off: Pods failed scheduling failed=0, running=1. it should be Pods failed scheduling failed=1, running=1

Fixed

FYI, the current status string:
Status:
  Canrun:  true
  Conditions:
    Last Transition Micro Time:  2022-08-24T01:29:05.643634Z
    Last Update Micro Time:      2022-08-24T01:29:05.643634Z
    Status:                      True
    Type:                        Init
    Last Transition Micro Time:  2022-08-24T01:29:05.643871Z
    Last Update Micro Time:      2022-08-24T01:29:05.643871Z
    Reason:                      AwaitingHeadOfLine
    Status:                      True
    Type:                        Queueing
    Last Transition Micro Time:  2022-08-24T01:29:05.663872Z
    Last Update Micro Time:      2022-08-24T01:29:05.663872Z
    Reason:                      FrontOfQueue.
    Status:                      True
    Type:                        HeadOfLine
    Last Transition Micro Time:  2022-08-24T01:29:09.295458Z
    Last Update Micro Time:      2022-08-24T01:29:09.295458Z
    Reason:                      AppWrapperRunnable
    Status:                      True
    Type:                        Dispatched
    Last Transition Micro Time:  2022-08-24T01:29:34.757891Z
    Last Update Micro Time:      2022-08-24T01:29:34.757888Z
    Message:                     Pods failed scheduling failed=8, running=0.
    Reason:                      PodsFailedScheduling
    Status:                      True
    Type:                        PreemptCandidate
    Last Transition Micro Time:  2022-08-24T01:29:34.773229Z
    Last Update Micro Time:      2022-08-24T01:29:34.773228Z
    Reason:                      AwaitingHeadOfLine
    Status:                      True
    Type:                        Queueing
    Last Transition Micro Time:  2022-08-24T01:29:38.420623Z
    Last Update Micro Time:      2022-08-24T01:29:38.420623Z
    Reason:                      AppWrapperRunnable
    Status:                      True
    Type:                        Dispatched
  Controllerfirsttimestamp:      2022-08-24T01:29:05.643269Z
  Failedschedulingreason:        map[ray-head-urm-exp-grxkg:{PodScheduled False 0001-01-01 00:00:00 +0000 UTC 2022-08-24 01:29:05 +0000 UTC Unschedulable 0/1 nodes are available: 1 node(s) had taint {key1: value1}, that the pod didn't tolerate.} ray-worker-427bl:{PodScheduled False 0001-01-01 00:00:00 +0000 UTC 2022-08-24 01:29:06 +0000 UTC Unschedulable 0/1 nodes are available: 1 node(s) had taint {key1: value1}, that the pod didn't tolerate.} ray-worker-5w99w:{PodScheduled False 0001-01-01 00:00:00 +0000 UTC 2022-08-24 01:29:06 +0000 UTC Unschedulable 0/1 nodes are available: 1 node(s) had taint {key1: value1}, that the pod didn't tolerate.} ray-worker-cg5kc:{PodScheduled False 0001-01-01 00:00:00 +0000 UTC 2022-08-24 01:29:06 +0000 UTC Unschedulable 0/1 nodes are available: 1 node(s) had taint {key1: value1}, that the pod didn't tolerate.} ray-worker-ch4dd:{PodScheduled False 0001-01-01 00:00:00 +0000 UTC 2022-08-24 01:29:06 +0000 UTC Unschedulable 0/1 nodes are available: 1 node(s) had taint {key1: value1}, that the pod didn't tolerate.} ray-worker-fn25l:{PodScheduled False 0001-01-01 00:00:00 +0000 UTC 2022-08-24 01:29:06 +0000 UTC Unschedulable 0/1 nodes are available: 1 node(s) had taint {key1: value1}, that the pod didn't tolerate.} ray-worker-gcwpv:{PodScheduled False 0001-01-01 00:00:00 +0000 UTC 2022-08-24 01:29:06 +0000 UTC Unschedulable 0/1 nodes are available: 1 node(s) had taint {key1: value1}, that the pod didn't tolerate.} ray-worker-xbw8c:{PodScheduled False 0001-01-01 00:00:00 +0000 UTC 2022-08-24 01:29:06 +0000 UTC Unschedulable 0/1 nodes are available: 1 node(s) had taint {key1: value1}, that the pod didn't tolerate.}]
  Filterignore:                  true
  Pending:                       8
  Queuejobstate:                 Dispatched
  Sender:                        before manageQueueJob - podPhaseChanges
  State:                         Running
Events:                          <none>


ReferenceError: requestAnimationFrame is not defined

Where exactly do you put
if(!Highcharts){
  global.highcharts = require('react-highcharts/src/fakeHighcharts.js');
}

for node rendering? I have tried several different ways but I am not having any luck. Is there a complete example of this? Thanks in advanced.

The example is a bit outdated, but should still work.
You should put it at the point where highcharts has to be required.
Better alternative would be to provide fake highcharts as highcharts dependency during in your build system.
Regarding the error you're getting, try creating requestAnimationFrame in fakeHighcharts.js:
var requestAnimationFrame = function(){};

If it works, please create a PR, or let me know, and I'll add it manually.

This is what my component currently looks like. I tried adding var requestAnimationFrame = function(){};
to fakehighcharts.js but I still got the error. Maybe I am doing it wrong.

import React from 'react'
import Highcharts from 'highcharts'
if (!Highcharts) {
  global.highcharts = require('react-highcharts/src/fakeHighcharts.js')
}
import ReactHighcharts from 'react-highcharts'
import { performanceScoreByMatch, performanceScoreCumulative } from '../../temp/guardado'

const date = performanceScoreByMatch.attacking.map(data => data.date)

const performanceScoreByMatchAttackingScore = performanceScoreCumulative.attacking.map(data => JSON.parse(data.score))
const performanceScoreByMatchDefensiveScore = performanceScoreCumulative.defensive.map(data => JSON.parse(data.score))
const performanceScoreByMatchOverallScore = performanceScoreCumulative.overall.map(data => JSON.parse(data.score))
const performanceScoreByMatchPossesionScore = performanceScoreCumulative.possesion.map(data => JSON.parse(data.score))

// const performanceScoreCumulativeAttackingScore = performanceScoreCumulative.attacking.map(data => data.score)
// const performanceScoreCumulativeDefensiveScore = performanceScoreCumulative.defensive.map(data => data.score)
// const performanceScoreCumulativeOverallScore = performanceScoreCumulative.overall.map(data => data.score)
// const performanceScoreCumulativePossesionScore = performanceScoreCumulative.possesion.map(data => data.score)

const config = {
  chart: {
    backgroundColor: '#0e0e13',
    type: 'areaspline'
  },
  title: {
    text: 'Performance Score By Match'
  },
  xAxis: {
    categories: date
  },
  plotOptions: {
         areaspline: {
             fillOpacity: 0.1
         }
     },
  series: [
    { name: 'Attacking', data: performanceScoreByMatchAttackingScore, color: 'green' },
    { name: 'Defensive', data: performanceScoreByMatchDefensiveScore, color: 'red' },
    { name: 'Possesion', data: performanceScoreByMatchPossesionScore, color: 'yellow' },
    { name: 'Overall', data: performanceScoreByMatchOverallScore, color: 'blue' }
  ]
}

const Chart = React.createClass({
  render () {
    return (
      <div>
        <ReactHighcharts config={config} />
      </div>
    )
  }
})

export default Chart

how about global.requestAnimationFrame = function(){};?

Nothing seems to be making it work. The chart gets rendered but it gets that error
bundle.js:33065 Uncaught TypeError: Cannot read property 'requestAnimationFrame' of undefinedrenderChart @ bundle.js:33065HighchartsChart_componentDidMount @ bundle.js:33073notifyAll @ bundle.js:6436close @ bundle.js:16224closeAll @ bundle.js:6797perform @ bundle.js:6744batchedMountComponentIntoNode @ bundle.js:2637perform @ bundle.js:6731batchedUpdates @ bundle.js:10781batchedUpdates @ bundle.js:6236_renderNewRootComponent @ bundle.js:2831ReactMount__renderNewRootComponent @ bundle.js:1425_renderSubtreeIntoContainer @ bundle.js:2905render @ bundle.js:2925React_render @ bundle.js:1425(anonymous function) @ bundle.js:63__webpack_require__ @ bundle.js:20(anonymous function) @ bundle.js:40(anonymous function) @ bundle.js:43

Here is the Repo if you would like to check it out https://github.com/freddiecabrera/ullibol-client

I got this to work by removing any mention about requestAnimationFrame. I am doing server rendering and I did not have to do
 if (!Highcharts) {
  global.highcharts = require('react-highcharts/src/fakeHighcharts.js')
}

I just did import ReactHighcharts from 'react-highcharts'. Is there a way I can get a version without requestAnimationFrame?

I encounter the same problem as ahead, when I require('react-highcharts/dist/ReactHighcharts'), the console shows ReferenceError: requestAnimationFrame is not defined

Let me know if you still need help with it, I'll ping you on IM and we'll figure it out.

I just completely removed anything having to do with requestAnimationFrame and I got it to work.

Which version of node did you use?

I've also encountered this problem when I package my application, and react-highcharts is packaged with webpack.

Same problem for me as @jontore:

I've also encountered this problem when I package my application, and react-highcharts is packaged with webpack.

I was using node 4.3.0
@jontore @chevin99 if you guys would like to get passed it just go through all the files and manually remove anything having to do with requestAnimationFrame. I am sure that is not the best way to do it but it worked for me.

Can somebody help me reproduce that?

@kirjs here you go:
app.js -
let React = require('react')
let ReactDOM = require('react-dom')
let ReactHighcharts = require('react-highcharts')

let Chart = React.createClass({
  render: function () {
    let config = {
      series: [{
        name: 'A',
        data: [1, 2, 3, 4]
      }, {
        name: 'B',
        data: [5, 4, 3, 2]
      }]
    }

    return <ReactHighcharts config={config}/>
  }
})

ReactDOM.render(<Chart/>, document.getElementById('app'))

In my webpack config I use the babel loader:
module: {
    loaders: [
      {
        test: /\.js?$/,
        loader: 'babel',
        query: {
          presets: ['es2015', 'react', 'stage-0']
        }
      }
    ]
  }

Hope that helps.  Thanks.

I tried to reproduce again, but couldn't.
Which browser/environment? which react-highcharts version? What's the exact error message?

Browser: Chrome Version 51.0.2704.103 (64-bit)
react-highcharts version 8.3.3
There error is just Uncaught TypeError: Cannot read property 'requestAnimationFrame' of undefined
I believe the problem is line 33 in chartsFactory.jsx:
global.requestAnimationFrame && requestAnimationFrame(()=>{
global isn't defined in the browser.  If I update the code to have global default to window the error goes away.

Should be fixed in 8.4.1, feel free to reopen if not


Rounded corners are not clipped

When a UI node with border radius >0 is partially off-screen, the rounded corners are applied after clipping.
Bevy version
0.14-dev

BTW, at first I thought that this might be difficult to fix because clipping happens earlier in the pipeline. However, if the UV coordinates are correct for background images, then they should also be correct for rounded corners. So it might not be that difficult.

Just encountered this issue as well

Actually after testing, it seems it doesn't matter if a border radius is added or not. It's like the border of the overflowing child is overlapping the border of the parent.
See screenshot:


mac osx 10.11.16 build fail.

libchromiumcontent git:master ❯ script/build -t x64
ninja: Entering directory `src/out/Release'
[1200/11575] LINK mksnapshot, POSTBUILDS
ld: warning: direct access in v8::base::LazyInstanceImpl<v8::sampler::SamplerManager, v8::base::StaticallyAllocatedInstanceTrait<v8::sampler::SamplerManager>, v8::base::DefaultConstructTrait<v8::sampler::SamplerManager>, v8::base::ThreadSafeInitOnceTrait, v8::base::LeakyInstanceTrait<v8::sampler::SamplerManager> >::InitInstance(v8::base::StaticallyAllocatedInstanceTrait<v8::sampler::SamplerManager>::StorageType*) to global weak symbol v8::base::TemplateHashMapImpl<v8::base::DefaultAllocationPolicy>::PointersMatch(void*, void*) means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
[7862/11575] CXX obj/third_party/WebKit/Source/platform/blob/blink_platform.BlobData.o
FAILED: ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/WebKit/Source/platform/blob/blink_platform.BlobData.o.d -DU_COMBINED_IMPLEMENTATION -DUNISTR_FROM_CHAR_EXPLICIT= -DUNISTR_FROM_STRING_EXPLICIT= -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=0 -DV8_DEPRECATION_WARNINGS -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DDISABLE_NACL -DCHROMIUM_BUILD -DCR_CLANG_REVISION=274142-1 -DUSE_LIBJPEG_TURBO=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DUSE_PROPRIETARY_CODECS -DENABLE_PEPPER_CDMS -DENABLE_NOTIFICATIONS -DUSE_EXTERNAL_POPUP_MENU -DFIELDTRIAL_TESTING_ENABLED -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PDF=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DUSE_BROWSER_SPELLCHECKER=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DBLINK_PLATFORM_IMPLEMENTATION=1 -DINSIDE_BLINK -DENABLE_LAYOUT_UNIT_IN_INLINE_BOXES=0 -DENABLE_OILPAN=1 -DWTF_USE_CONCATENATED_IMPULSE_RESPONSES=1 -DWTF_USE_ICCJPEG=1 -DWTF_USE_QCMSLIB=1 -DSK_SUPPORT_GPU=1 -DSK_IGNORE_DW_GRAY_FIX -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_NOEXCEPT= -DUSE_LIBPCI=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -D_FORTIFY_SOURCE=2 -Igen -I../../third_party/angle/include -Igen/blink -I../.. -I../../skia/config -I../../third_party/WebKit/Source -I../../third_party/khronos -I../../gpu -Igen/angle -I../../third_party/WebKit -Igen/third_party/WebKit -I../../third_party/boringssl/src/include -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/pdf -I../../third_party/skia/include/gpu -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/skia/include/utils/mac -I../../skia/ext -I../../third_party/harfbuzz-ng/src -I../../third_party/iccjpeg -I../../third_party/icu/source/i18n -I../../third_party/icu/source/common -I../../third_party/libpng -I../../third_party/zlib -I../../third_party/libwebp -I../../third_party/ots/include -I../../third_party/qcms/src -I../../v8/include -I../../third_party/libjpeg_turbo -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -O2 -gdwarf-2 -fvisibility=hidden -Werror -mmacosx-version-min=10.8 -arch x86_64 -Wno-deprecated-declarations -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-selector-type-mismatch -Wpartial-availability -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-undefined-var-template -Wno-nonportable-include-path -Wglobal-constructors -std=c++11 -stdlib=libc++ -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -fno-threadsafe-statics -fcolor-diagnostics -Xclang -load -Xclang /Users/amitavaghosh/dev/js/libchromiumcontent/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-templates -Xclang -plugin-arg-find-bad-constructs -Xclang follow-macro-expansion -Xclang -plugin-arg-find-bad-constructs -Xclang check-implicit-copy-ctors -fno-strict-aliasing -Xclang -load -Xclang /Users/amitavaghosh/dev/js/libchromiumcontent/src/third_party/llvm-build/Release+Asserts/lib/libBlinkGCPlugin.dylib -Xclang -add-plugin -Xclang blink-gc-plugin -include obj/third_party/WebKit/Source/build/mac/blink_platform.Prefix.h-cc -c ../../third_party/WebKit/Source/platform/blob/BlobData.cpp -o obj/third_party/WebKit/Source/platform/blob/blink_platform.BlobData.o
Invalid predicate in ICmp instruction!
  %cmp.i.i.i.i.i.i.i.i.i.i.i.i = icmp unknown %"struct.blink::BlobDataItem"* %lsr.iv.next3, null, !dbg !7912
fatal error: error in backend: Broken function found, compilation aborted!
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 3.9.0 (trunk 274142)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Users/amitavaghosh/dev/js/libchromiumcontent/src/out/Release/../../third_party/llvm-build/Release+Asserts/bin
clang: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /var/folders/r8/px3gd_997vggvw57s80cbdqh0000gq/T/BlobData-ba7378.cpp
clang: note: diagnostic msg: /var/folders/r8/px3gd_997vggvw57s80cbdqh0000gq/T/BlobData-ba7378.sh
clang: note: diagnostic msg:

********************
[7862/11575] CXX obj/third_party/WebKit/Source/platform/exported/blink_platform.Platform.o
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "script/build", line 52, in <module>
    sys.exit(main())
  File "script/build", line 38, in main
    subprocess.check_call([NINJA, '-C', config_dir, target])
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Users/haha/dev/js/libchromiumcontent/vendor/depot_tools/ninja', '-C', 'src/out/Release', 'chromiumcontent_all']' returned non-zero exit status 1

the cpp and sh files are here: https://gist.github.com/argentum47/8b1b0fff1db0ed6a9ead01c5f32cde28

Hey there,
It's been a long time coming but the libchromiumcontent repository is being archived as it is no longer used in the Electron build system (🎉 this is a good thing).
If your issue is still relevant to Electron in it's current build system (please verify first) then you should probably raise a similar issue on electron/electron.
Thanks 😄


#124 - Show zazu window centered on the desktop where the mouse pointer is located

Zazu will open at the 'center' (centers the maxHeight (400) ui) of the screen where the mouse pointer is located.
The custom position (user drag) for Zazu will be saved per screen.
ISSUES

summary: I noticed a problem with centering Zazu if a display is removed while Zazu is running (not necessarily toggled). Zazu may end up on one screen even when the cursor is on another after the user removes a display while Zazu is running. reproduce: Reproduce by using 3 displays, set a custom position for each screen somewhere close to the edge of the screen, remove a display, try toggling Zazu on different screens. fix: Electron's Screen emits the 'display-removed' and 'display-added' events when those events take place. Might reset any saved screen / browser-window data (having to do with custom positioning) when one of those events are caught.
summary: probably has to do directly with the previous issue, but positioning zazu between screens will save Zazu's position for that screen, but if most of Zazu is on a different screen, Electron will automatically render it in whole on the screen with the majority of the UI saved. reproduce: Reposition Zazu to be mostly off the screen where you toggled it. Re-toggle it on the same screen, Zazu should render on the other screen where most of it was. fix: don't save custom position if Zazu isn't fully within the screen.
 Not sure where to attach this stuff. fix: Thought about creating a screenHelper, or adding a positioning object to mainWindow, ex: mainWindow.position.setCustom(x, y, display) / mainWindow.position.setCenter(display) , in helpers/window.js/

I'll take a look [:

Might create a main display centering functionality to handle https://github.com/tinytacoteam/zazu/issues/92 in case the user has primaryMonitor set to true

woops ^ rebase mishap

Moved the positioning logic out of background.js and into lib/screens

I've been using this for a couple days straight now and it's awesome, especially when you need to reload Zazu.
The way it sometimes centers Zazu slightly above the middle seems to be related to the size of the Zazu search results.
More results = higher on the screen. For example:
http://cld.wthms.co/OJ1s
Chrome and Stardew have results list of 7 items. Firefox only has 3. Launching Zazu after Chrome and Stardew puts it noticeably higher on the screen. While after Firefox it only bumps a bit.
Can't wait for this to be the default. Thanks!

@cecoates Thanks for the feedback! I appreciate the video as well. I'm going to take a look at this today.

@cecoates Would you mind pulling the latest commit of my fork (master) and seeing if the different search results end up changing the position of Zazu still? I'm unable to reproduce this issue, but I'm also on a Macbook until later tonight, so I can't be too sure.

@cecoates Here's what happens when I try:

Fixed positioning bugs that happen when user removes, adds, or changes a display. On any changes, positioning data is reset.

I've been using it for a few days, but I won't be around dual monitors until Monday at work. Sorry it's taking so long ]:

@eldinoyev still happens. Maybe Linux/Gnome specific? Haven't tried it on windows.
http://cld.wthms.co/mz3g
It fixes itself the next time you launch, so it's not much of a hinderance!

@cecoates that's so strange, I'll need to try to reproduce on my Ubuntu machine. What distro and version are you running exactly?

@eldinoyev
Debian Stretch, Gnome 3.22.

I built it following the compile locally instructions. Forked the current Zazu to my account, then merged the latest changes from your fork into that.

Might have to do with Electron on Linux. In background.js:134 I'm using Browser Window's getSize() and getMaximumSize() to get Zazu's dimensions to figure out the center of the screen. On linux, for whatever reason, getMaximumSize() returns the same value as getSize(), while on Mac getMaximumSize() returns the originally set value of 400.
This is on Ubuntu 14.04. Watch the left console, getSize() is supposed to change while getMaximumSize() is supposed to stay the same. But for both, [x, y], y changes.

@eldinoyev I'm not sure if I'm doing something wrong, but after merging the new changes the centering isn't functioning for me anymore.

@cecoates Ahh that's strange. The centering function isn't working meaning that Zazu doesn't pop up on the display where the mouse pointer is?

@eldinoyev Right! It doesn't center, follow the mouse, etc. Same behavior as in vanilla Zazu.

@cecoates Okay, I'll take a look on my ubuntu machine tonight. Your .zazurc is 100% configured to open zazu on the mouse screen, and this latest pull broke it?

@eldinoyev Yup! I even try recloning it with you pull and starting from scratch.

@cecoates Weird thing just happened. I'm pretty sure I managed to reproduce your issue on my ubuntu machine. I checked out the commit before the latest and reloaded the config and starting testing it, then when I switched back to master, the centering functionality starting working again on the secondary screen. So I'm either crazy or reloading this thing somehow fixed the problem.

@cecoates I started writing that I managed to reproduce your issue, but then I realized Electron was just bugging out on my machine. I can't see this on Ubuntu after restarting electron and reloading Zazu's config on my latest commit.

Is anyone else experiencing issues with the latest commit on Linux? I can't reproduce.

@cecoates I had to delete 2 comments in like 5 minutes. So I managed to reproduce this. I noticed that when I Open Zazu and then Hide Zazu while my mouse is on a different screen from the one Zazu is currently open on, Zazu will get stuck and open on the original screen from then on. I can reproduce this even after opening Zazu several times and it working just fine, if I then close Zazu while my mouse is on a different screen, it gets stuck.

@cecoates Figured out the problem has to do with a weird window event bug where 'move' is emitted when toggling Zazu. Will work on fix tomorrow.

@cecoates Can you see if this pops up for you when you hide the Zazu window while your mouse is on a different screen? That's how I was able to replicate it. Won't get to work on this until tomorrow or friday.

@eldinoyev I couldn't get my screencast to record both monitors at once, but this still gives an idea of what's happening:
http://cld.wthms.co/Vuh2

@eldinoyev do you need any help? I can screenhero or something if you like :D

@blainesch I think I'm good for now. Just haven't had a moment to look into that 'move' event issue on Ubuntu. If my linux fix doesn't work for @cecoates, then yeah I could use some help.
For some reason in Ubuntu, the 'move' event is fired two times every time the window is closed, and on the first one the window position is always { x: 0, y: 0 }. Might have to come up with an ugly linux fix by checking that the last 'save' event didn't take place in the last second, can't find any other nice way to know when the window is being

Hey @cecoates, could you once again pull from this fork and see if this fixed the issue for you? The last commit fixes it completely for me on Ubuntu, but that's assuming that the same electron issue was the source of both of our problems. If you still experience this problem, I might have to download Gnome.

hey @blainesch, It's working for me on Linux and Mac. If you cant find any issues, I think https://github.com/tinytacoteam/zazu/issues/124 is done. Also waiting to see if this fixes https://github.com/tinytacoteam/zazu/issues/92.
We could also change the option for it from primaryMonitor to something else if you'd prefer before merging.

Perfect, I'll test this out tomorrow then :D thanks for sticking with it!

@blainesch happy to contribute!

@eldinoyev this is amazing!! 🎉
I rebased it into master, but you are still the author of the commit. I also changed the option to displayOn!!
https://github.com/tinytacoteam/zazu/commits/master

@blainesch super glad to hear you like it!
Sounds great, thank you.


Proposal: Adding SegRNN Code to the Library

Hi, thank you for your efforts in contributing to the advancement of the community, and I have been following your work for quite some time. I noticed that your repository does not include any baseline methods based on RNNs, which is understandable given that traditional RNNs struggle to model very long sequences.
To address this, we have introduced SegRNN (repository link: https://github.com/lss-1138/SegRNN), which significantly improves the performance of RNN methods in long time series prediction tasks and currently stands as the state-of-the-art RNN-based method. It demonstrates outstanding performance regardless of the length of the look-back length, whether it be longer (720) or shorter (96).
The performance of SegRNN on the Weather dataset with a look-back length of 720：

The performance of SegRNN on the Weather dataset with a look-back length of 96：

We would greatly appreciate it if you could consider incorporating SegRNN into your repository. Once again, thank you for your efforts.

Hi, many thanks for your recommendation.
Due to the time limitation, we recently mainly focus on fixing bug. Would you please kindly propose a pull request?

Ok. We have proposed a pull request. Thank you for your efforts. @wuhaixu2016


Fix compilation errors with latest ORM snapshot

Superseded by https://github.com/hibernate/hibernate-reactive/issues/1718


Improve the current auto-allocation mechanism of globalCIDR in subctl

Currently, subctl tries to automatically allocate a globalCIDR chunk from the un-allocated globalnet-cidr-range to a cluster during join operation. Inorder to do this, it depends on the submariner clusterCRD on the Broker. However, for the clusterCRD to be populated by the respective cluster on the Broker usually takes sometime. Because of this, we are unable to execute "subctl join ...." commands in parallel.
This issue is to enhance the current implementation to use an appropriate mechanism like a  ConfigMap that stores the [clusterName: globalCIDR] on the Broker cluster and use this info instead of depending on clusterCRD.

@Jaanki since you will be going on vacation, shall I look into this issue?

Sure @sridhargaddam. I have half of the logic implemented at PR #475.

In addition to having auto-generated CIDRs, please also alert the user if trying to use same globalnet-cidr for two clusters. (i.e. subctl join command should fail for such case.)

@Noam, the current implementation does that.
On Wed, Jun 17, 2020, 19:48 Noam Manos<EMAIL_ADDRESS>wrote:

In addition to having auto-generated CIDRs, please also alert the user if
trying to use same globalnet-cidr for two clusters. (i.e. subctl join
command should fail for such case.)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/submariner-io/submariner-operator/issues/299#issuecomment-645402704,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACBJBQXVO2KM3DSQGMATNFLRXDGEHANCNFSM4MCPV7HA
.

Sure @sridhargaddam. I have half of the logic implemented at PR #475.

Done, I pushed a PR which addresses this issue along with some other use-cases.
Added you as co-author.
https://github.com/submariner-io/submariner-operator/pull/501

In addition to having auto-generated CIDRs, please also alert the user if trying to use same globalnet-cidr for two clusters. (i.e. subctl join command should fail for such case.)

Yes @manosnoam, it's handled. Please let us know if you find any issues.

@sridhargaddam Now that it is closed, can I remove the static "wait" of 30 seconds - before joining another cluster (when using globalnet) ?
@nyechiel, @mangelajo
Since this is kind of feature to be tested by QE, I re-open it, and assign to myself.
(as we discussed, it's important to move finished features to test, before closing)

@sridhargaddam Now that it is closed, can I remove the static "wait" of 30 seconds - before joining another cluster (when using globalnet) ?

Yes @manosnoam . You can remove any sleep as well as remove the globalnet-cidr as part of subctl join command. The CIDRs will be auto-allocated.

@nyechiel, @mangelajo
Since this is kind of feature to be tested by QE, I re-open it, and assign to myself.
(as we discussed, it's important to move finished features to test, before closing)

Ack

This works well on 0.5.0.
Thanks @sridhargaddam


Suggestion: reversed syntax for importing symbols from a module

So instead of having to type:
import {} from "whatever";

and then go back to fill in the {} with IntelliSense, a LINQ-like syntax would be easier to use like this:
from "whatever" import {Something};

I would love to have this!

Yes! Had the same thought during @ahejlsberg 's Build talk. It's practically the same rationale than for the reversed LINQ syntax in C#.

I think everyone would love that! I'm sure even the TS team (i think Anders even pointed it out during the build talk), but the design goals of TS is to follow the ES specs as much as possible (it makes everything so much easier for them -- and us) [Spec-Goal-6]. If it wasn't for that rule, im sure 100s of things would be different, but it's that goal (and others) that makes it oh so very awesome!
One thing that could be suggested is that we could type it as
from "whatever" import {Something};

and it get generated as
import {Something} from "whatever" ;

but at the same type also support the ES6 spec of typing import first then from second...., but that's too cumbersome and not worth it i guess.
Another suggestion could be to create a VS snippet for typescript so that when you type "import[TabKey]" the following line is emitted with the cursor ($c) inside the from "", as follows:
import {} from "$c" ;

then another tab would take you within the {}
.... maybe?

@AbubakerB that would be a very good solution to this problem. I think those who sit in TC39 should have thought about this problem. :angry:

@tinganho yea, but I'm sure they had their reasons though (or maybe they just did it for the laughs!)

Good point about ES compatibility... Indeed, it would be a limited but for part of the audience still awesome thing to at least add better support in tooling to make the experience like it would be with the reversed syntax. And if this could be built directly into the TS compiler maybe this tooling support could be accessible for other editor plugins easily?

Much as it would be nice to have from come before import this is already a done deal and alignment with ES6 trumps here. However, I agree it would be nice to have snippet support so you could easily tab between the fields.

Also see:
https://github.com/Microsoft/TypeScript/issues/2370#issuecomment-81664304
https://github.com/Microsoft/TypeScript/issues/2371#issuecomment-81905846


renderBackButton not working

Version

react-native-router-flux v4.0.0 (v3 is not supported)
react-native v0.44.0

Previously there was renderBackButton so that I can hide the back button using Actions.refresh({renderBackButton: () => null}). But it seems like this thing is not supported in v4. So, are there any ways to do this?

Could you try to set init prop ?


Correct typo

Small typo. And I'm trying out pull requests to become more familiar with them :)

:smiley: