Default values overwrite destructured function parameter type with basic type inference

TypeScript Version:  3.2.2 and 3.3.0-dev.20181211
Search Terms: destructure, parameters, default, assignment, overload, sfc, react, tsx
Code
interface SFC
 {
  (props: P & { children?: any }): any | null;
}

interface Props {
  name: "Apollo" | "Artemis" | "Dionysus" | "Persephone";
}

const Parent: SFC<Props> = ({
  children,
  name = "Artemis",
  ...props
}) => <Child name={name} {...props} />;

const Child: SFC<Props> = ({
  children,
  name = "Artemis",
  ...props
}) =>
{name}
;

Expected behavior:
name should be type "Apollo" | "Artemis" | "Dionysus" | "Persephone".
Actual behavior:
Assigning a default value for name overwrites the type to string.
index.tsx:13:23 - error TS2322: Type 'string' is not assignable to type '"Apollo" |
"Artemis" | "Dionysus" | "Persephone"'.

13 }) => <Child name={name} {...props} />;
                ~~~~

Playground Link:
Related Issues: https://github.com/Microsoft/TypeScript/issues/27927 https://github.com/Microsoft/TypeScript/issues/28835 https://github.com/Microsoft/TypeScript/issues/18191

However, this works correctly:
interface Props {
  children?: any;
  name: "Apollo" | "Artemis" | "Dionysus" | "Persephone";
}

const Parent = ({
  children,
  name = "Artemis",
  ...props
}: Props) => <Child name={name} {...props} />;

const Child = ({
  children,
  name = "Artemis",
  ...props
}: Props) =>
{name}
;

but it is not tenable in many real-world React use cases.

Destructuring initializer contextual types should be lower priority than any other contextual type. Right now in getContextualTypeForInitializerExpression, the isBindingPattern(declaration.parent) case doesn't actually recurse into getContextualType on the .parent - it only looks for annotations.


Changes to --users and --groups

users() was failing on a bad attribute, changed code to use getattr
instead. If attribute is missing, it no longer throws exception.
extraction of domain from distinguished name was not working in all
circumstances. FOO.COM would work, but FOO.CO.UK or even FOO.BAR.CO.UK
would extract CO incorrectly. function now extracts fully qualified
domain, which then gets shortened by db_add_user() function.

I've added the changes for issue #236 as suggested.
The only thing I would say, is that in this change I have loaded the ConfigParser individually in each protocol class. I would have preferred to only change it once in context.py and passed the object, but I couldn't work out how the classes were instantiated, or how to pass the already instantiated context object to them.

@aj-cgtech Merged with some changes. Thanks again!
So the Context object is not passed to each protocol object rather it's just a placeholder object and it's passed to each module (hence the context parameter)
The ConfigParser object is actually passed individually to each object using setattr here
The Protocol classes are instantiated here, the logic behind how that works is in protocol_loader.py
Basically all I did was add a entry in the config file to customize the pwn3d label :+1:


Ctrl/Shift Click Should/Did Open a New Window from Recent

In previous versions of VSCode Shift or Ctrl Click in the File -> Recent Folders menu would open the folder in a new window. This cool feature has disappeared in recent weeks.

Version: 1.45.1 (user setup)
Commit: 5763d909d5f12fe19f215cbfdd29a91c0fa9208a
Date: 2020-05-14T08:27:35.169Z
Electron: 7.2.4
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.18363
Steps to Reproduce:

File -> Recent
Ctrl/Shift Click a recent folder
Folder should open in a new window - this USED to work

Does this issue occur when all extensions are disabled?: Yes

/duplicate of #76173
Please provide your cases to that thread if something is missing

@IllusionMH - Erm.. how can this be a duplicate of an issue filed in 2019 if it was working until a few weeks ago and we update vscode weekly??

@cawoodm I'm sorry. Apparently it actually worked worked but not in cases when I tried last time.
Looks like it is still duplicate but of #97237 which already fixed in Insiders builds.
You can check Insiders build https://code.visualstudio.com/insiders/ or wait till next week for stable 1.46 release


Bug Report

Describe the bug
2024-04-06 18:07:27.484 Uncaught app exception
Traceback (most recent call last):
File "/home/ngsevers/miniconda3/envs/dashboard/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 584, in _run_script
exec(code, module.dict)
File "/mnt/h/OneDrive/Desktop/0. Active Work/40. Crypto/dashboard/main.py", line 110, in
config['credentials'] = st.session_state.authenticator.credentials
AttributeError: 'Authenticate' object has no attribute 'credentials'
Steps to reproduce bug

attempt to log in

Issue is in main.py line 111
This line is not necessary and can be removed.
config["credentials"] = st.session_state.authenticator.credentials
line 110 elif st.session_state["authentication_status"]:
This line already authenticates. To make the code more understandable you could make it say elif st.session_state["authentication_status"] is True:

Change line 110 to:
config["credentials"] = st.session_state.authenticator.authentication_handler.credentials


[SPARK-19349][DStreams] Check resource ready to avoid multiple receivers to be scheduled on the same node.

What changes were proposed in this pull request?
remove related TODO
Currently, we can only ensure registered resource satisfy the "spark.scheduler.minRegisteredResourcesRatio". But if "spark.scheduler.minRegisteredResourcesRatio" is set too small, receivers may still be scheduled to few nodes. In fact, we can give once more chance to wait for sufficient resource to schedule receiver evenly.
How was this patch tested?
update ut

Test build #71930 has started for PR 16691 at commit 0c24291.

Test build #71930 has finished for PR 16691 at commit 0c24291.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/71930/
Test FAILed.

retest this please.

Test build #71956 has started for PR 16691 at commit 0c24291.

Test build #71956 has finished for PR 16691 at commit 0c24291.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/71956/
Test FAILed.

Working on the test failure.

Test build #71971 has started for PR 16691 at commit f7312c7.

Test build #71971 has finished for PR 16691 at commit f7312c7.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/71971/
Test PASSed.

cc @zsxwing

I don't think all cases need to wait for all resources ready. That's why spark.scheduler.minRegisteredResourcesRatio is added to allow the user changing the behavior.

@zsxwing That is right, this pr is the improvement for the previous one. There is no much performance regression, i.e. only wait for "spark.scheduler.maxRegisteredResourcesWaitingTime" for resource ready (enough executors for receivers or satisfy the "minRegisteredResourcesRatio")
Any suggestion is appreciated.

cc @tdas also

I don't like copying codes from Spark core. Maybe let's still keep using a dummy Spark job.


Documentation problems

crates.io page points to seemingly old documentation instead of usual docs.rs;
http://rust.unhandledexpression.com/nom/upgrading_to_nom_2.html http, not https? in 2017? is an empty page. No archived version on web.archive.org.
No "Migration from 2 to 3" document.

Also the fact that nom is not best fit (am I right?) for parsing large recursive data that can't fit in memory should be documented somewhere, probably in making_a_new_parser_from_scratch.html.

closing this, since the documentation link is fixed and I don't really care for the tone of your other remarks


Hide pagination when not paginated

What about making the pagination only viewable when the page is paginated?

You should make this check yourself based on the data  from your view. Apologies for late reply, closing old issues.


Enlarge a picture please?

The picture right above
Note
Blocking or limiting access on unmanaged devices relies on Azure AD conditional access policies.
is way too small for human eyes to read!

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

ID: 2f2abda5-9273-1a56-91b6-e4e77d5706b0
Version Independent ID: 6a85f2a5-b892-55f7-b49a-4ab15f1e8b73
Content: Control access from unmanaged devices - SharePoint in Microsoft 365
Content Source: SharePoint/SharePointOnline/control-access-from-unmanaged-devices.md
Service: sharepoint-online
GitHub Login: @kaarins
Microsoft Alias: kaarins

@hwkwicre Thank you for submitting feedback and contributing to the docs. We are currently investigating this.

Thanks for noticing and reporting @hwkwicre

@hwkwicre  Thank you for submitting feedback. We understand that this issue has been resolved.
Please feel free to re-open this issue if there is a specific area of the docs that we can improve or make better. Thank you.


⚠ Bofrost.de has degraded performance

In 95b6924, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 2148 ms

Resolved: Bofrost.de performance has improved in e70968d.


[Bug]: Broken pages

Is there an existing issue for this?

[X] I have searched the existing issues

What happened?
The feature page and team page broken.
This issue probably happened during the addition of cursor animation.
Add Screenshots

What browsers are you seeing the problem on?
No response
Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC contributor
[X] I want to work on this issue
[X] I'm willing to provide further clarification or assistance if needed.

Don't make a PR before assigning the issue. @poorvikaa08
Look carefully at every PR before merging @mansiruhil13 .

@mansiruhil13
I have raised the issue then requested the PR, assign me to this then you can merge it.


[incubator-kie-issues#1068] Fix gradle build output

Fixes https://github.com/apache/incubator-kie-issues/issues/1068
Needs https://github.com/apache/incubator-kie-drools/pull/5839
This PR:

expand the scope of the AppPAths.BuildTool
replace all usages of hardoded directories/paths outside it
enforce the GRADLE-related output paths

Note:
Quarkus define build/classes/java/main as classes dir (vs targer/classes), so this could be a problem with Springboot+gradle (currently untested - still in draft)

How to replicate CI configuration locally?

Build Chain tool does "simple" maven build(s), the builds are just Maven commands, but because the repositories relates and depends on each other and any change in API or class method could affect several of those repositories there is a need to use build-chain tool to handle cross repository builds and be sure that we always use latest version of the code for each repository.
build-chain tool is a build tool which can be used on command line locally or in Github Actions workflow(s), in case you need to change multiple repositories and send multiple dependent pull requests related with a change you can easily reproduce the same build by executing it on Github hosted environment or locally in your development environment. See local execution details to get more information about it.

How to retest this PR or trigger a specific build:

for pull request checks
Please add comment: Jenkins retest this

for a specific pull request check
Please add comment: Jenkins (re)run [kogito-runtimes|kogito-apps|kogito-examples] tests

for quarkus branch checks
Run checks against Quarkus current used branch
Please add comment: Jenkins run quarkus-branch

for a quarkus branch specific check
Run checks against Quarkus current used branch
Please add comment: Jenkins (re)run [kogito-runtimes|kogito-apps|kogito-examples] quarkus-branch

for quarkus main checks
Run checks against Quarkus main branch
Please add comment: Jenkins run quarkus-main

for a specific quarkus main check
Run checks against Quarkus main branch
Please add comment: Jenkins (re)run [kogito-runtimes|kogito-apps|kogito-examples] quarkus-main

for quarkus lts checks
Run checks against Quarkus lts branch
Please add comment: Jenkins run quarkus-lts

for a specific quarkus lts check
Run checks against Quarkus lts branch
Please add comment: Jenkins (re)run [kogito-runtimes|kogito-apps|kogito-examples] quarkus-lts

for native checks
Run native checks
Please add comment: Jenkins run native

for a specific native check
Run native checks
Please add comment: Jenkins (re)run [kogito-runtimes|kogito-apps|kogito-examples] native

for native lts checks
Run native checks against quarkus lts branch
Please add comment: Jenkins run native-lts

for a specific native lts check
Run native checks against quarkus lts branch
Please add comment: Jenkins (re)run [kogito-runtimes|kogito-apps|kogito-examples] native-lts

How to backport a pull request to a different branch?

In order to automatically create a backporting pull request please add one or more labels having the following format backport-<branch-name>, where <branch-name> is the name of the branch where the pull request must be backported to (e.g., backport-7.67.x to backport the original PR to the 7.67.x branch).

NOTE: backporting is an action aiming to move a change (usually a commit) from a branch (usually the main one) to another one, which is generally referring to a still maintained release branch. Keeping it simple: it is about to move a specific change or a set of them from one branch to another.

Once the original pull request is successfully merged, the automated action will create one backporting pull request per each label (with the previous format) that has been added.
If something goes wrong, the author will be notified and at this point a manual backporting is needed.

NOTE: this automated backporting is triggered whenever a pull request on main branch is labeled or closed, but both conditions must be satisfied to get the new PR created.

Quarkus-3 PR check is failing ... what to do ?

The Quarkus 3 check is applying patches from the `.ci/environments/quarkus-3/patches`.
The first patch, called 0001_before_sh.patch, is generated from Openrewrite .ci/environments/quarkus-3/quarkus3.yml recipe. The patch is created to speed up the check. But it may be that some changes in the PR broke this patch.
No panic, there is an easy way to regenerate it. You just need to comment on the PR:
jenkins rewrite quarkus-3

and it should, after some minutes (~20/30min) apply a commit on the PR with the patch regenerated.
Other patches were generated manually. If any of it fails, you will need to manually update it... and push your changes.

Jenkins retest this

Failure seems unrelated to PR itself:

the full downstream build from upstream PR succeeded
the jenkins build succeeded
I re-executed the build chain locally, and it succeeded
the failure is related to ClassNotFoundException for org.kie.kogito.codegen.core.utils.GeneratedFileWriter$Builder , but this class has been deleted by my PR and I could not find any reference to it

@rodrigonull @jstastny-cz Could you please look at that, or involve someone who could take a look? Thanks!


fixing a type error

I temporarily revised the TestExcelToHtmlConverterSuite to trigger the bug. Please revert TestExcelToHtmlConverterSuite after the bug is fixed.

trigger a bug from a PR? what do you mean?


SingleError mode should treat numbers specially

it's probably not reasonable when searching for abc1236 to match abc136 or ab1c236 or abc123.
i guess my premise here is that spelling mistakes are different than typos. if you type gorila instead of gorilla you probably wont get any valid matches for gorila. but if you type 1123, you most likely dont want to see a match for 123 or 1132, but these records are quite likely to exist while being completely irrelevent, and become noise.
i think the most straightforward way to improve here is to match numeric portions of the needle exactly as substrings and not allow mistakes in them. the can be done in the needle prep step by segmenting the alpha and numeric portions of terms and quote-enclose the numbers.
abc123 becomes abc "123" the issue with turning this into two terms is that they can now be matched out of order if that setting is enabled. maybe not a big deal.
we can instead add support for exact substrings within terms which would turn the needle abc123 into abc"123", retaining a single term but requiring an exact 123 suffix here and preventing the SingleError behavior from crossing an alpha-num boundary. this seems like the better approach.

ended up just disabling fuzziness for all runs of numbers in SingleError mode. no new options.


fix: remove console.log from tests output

Fixes #2286
Changes proposed in this pull request:

Remove the console.log and console.error outputs when running the test cases

Good job!


[DOC] Describe Pachctl system cert

Create documentation based on https://github.com/pachyderm/pachyderm/pull/4093

@kevindelgado @msteffen Can you please provide a summary of what needs to be documented?

This change modifies how pachyderm API clients are created such that if the pachd address supplied has the prefix grpcs, the client creation function knows that SSL is being used, and thus it adds system root certificates to the dial options of the grpc connection, so that they can be used to encrypt data sent via the api client to the pachd server.


fix: added margin in calendar button

Description
This PR includes a minor change to the website adding a proper margin to the Calendar button, so that it doesn't mixed up with content in the card.
Preview

Related issue(s)
Resolves #541

@mcturco Could you check that PR? Maybe it should be aligned to the left or maybe centered? What do you think?

@magicmatatjahu Calendar button will not be present in the deployed preview because eventExist object is null in the repository. But the changes will surely effect the button on website. Looking for a review from your side.

@mcturco Could you check that PR? Maybe it should be aligned to the left or maybe centered? What do you think?

I think it's the perfect position of that Calendar button. Alignment looks good to me.

@magicmatatjahu @akshatnema
Let me know if I can be of any help :) If you want to send me a screenshot to review that works also!

@magicmatatjahu @akshatnema
Hi! I think the added spacing on the top is definitely an improvement, but yes I would also align that button to the left so it lines up with "Upcoming events"

@magicmatatjahu @mcturco Should I go with this alignment of the Calendar button?

@akshatnema For me it's ok, @mcturco WDYT?

@akshatnema @magicmatatjahu looks good! The only other thing that I think we should do is remove the left padding from the events listed. That way everything will align to left edge.

Preview of the latest commit

@akshatnema @magicmatatjahu PERFECT!! Let's merge it :)

/rtm


hoverEvent

The docs mention a "hoverEvent" that can be set to true/false in Effects.
Can an action (such as opening a popup with the event details) be tied to that and if so how?

Hi there,
The Effects.hoverEvent option allows you to change the component style of an event node on the pointer type only. Therefore, it is incorrect to use this option to handle other events.
If you want to handle all event nodes with custom actions, it is best to use the "openEvent" method. Alternatively, the following approach can be considered.
$(document).on('mouseenter', '.jqtl-event-node', function(e){
  console.log('This event node is hovering now!')
})

Thank you,


Remember scrolled position with sticky

First of all I will like to thank you for such a wonderful add-on.
I am however facing this issue I believe you can help me resolve.
I have two states: 1) itemlist and 2) itemdetail.
The itemlist states shows list of items which is loaded through loadmore. when a use taps on an item it takes them to the itemdetail.
The issues is that when a user use the back button from the itemdetail page(state) it takes them back to the last scrolled position on the itemlist page (state) which is what I am expecting. However, when they tap directly on the itemlist button, it takes them back to the page, but this time the page is scrolled to the top instead of last scrolled state.
NOTE// I can confirm the sticky is working cos the dom/controller does not reload.
I will be glad if you can help resolve this, thank you.

I'll need a plunker to replicate the issue, in order to help diagnose this problem.
Can you enable debug tracing? $stickyStateProvider.enableDebug(true);


Add support to rbac-operator to reconcile static resources

We should not install static resources in rbac operator
We should add the relevant support to rbac-operator so that it can reconcile static resources.

Example of static resource is a Role that has to exist on clusters and not created by Admins.

We want to add it to rbac operator should ensure the consistence of the code over time
And refactor and and make more usable

@PrashantR31 we also probably wanna update the description here, it's somewhat opposite of what the title says

We discussed in refinement where the static resources should be reconciled.
We think that reconciling the default namespace in the same way as we do other namespaces but in a dedicated controller makes sense here.
This controller will ensure that resources in the default namespace and non namespaced resources are present.
the create action of this controller needs to be called once at startup to ensure referenced resources are present for other controllers (to avoid error on booting)


[PDI-18504] - Cassandra Input step logs error with LIMIT and ALLOW FILTERING clause

@ssamora
@smmribeiro
@moraesvc

:white_check_mark: Build finished in 2m 30s
Build command:
mvn clean verify -B -e -Daudit -amd -pl core

:ok_hand: All tests passed!
Tests run: 114, Failures: 0, Skipped: 0    Test Results

:information_source:  This is an automatic message


Separated component package

Is your feature request related to a problem? Please describe.
Separated component package like radix-ui
Describe the solution you'd like
Each primitive can be installed individually so user can adopt them incrementally. example from radix-ui
npm install @radix-ui/react-dialog
npm install @radix-ui/react-dropdown-menu
npm install @radix-ui/react-tooltip

Curious - what's the driving need for this? Is your bundler unable to tree-shake unused components out?

Hi, I will not do it for now because of versioning maintenance nightmare when having multiple packages and the reason mentioned by @marbemac.
However i've created a feature request on kobalte.canny.io. If it's very requested I will reconsider it.

I'll second this. When using kobalte with vite the performance when loading the page in development gets really bad. Maybe it's not required to split into packages, but creating multiple entrypoints so that it's possible to import just one component?

When using kobalte with vite the performance when loading the page in development gets really bad

Do you have a reproduction repo by any chance? Are you sure it is kobalte causing the slowness? It's really not a lot of code so that would be surprising. I'm using vite + kobalte (and many other libraries), and everything is super smooth w hot reloading and everything.

When I look at the network-tab, I can see lots of requests for files from @kobalte/core. Its only an issue on the page load, hot-reloading is super-quick. I'll see if its possible to create a reproduction repo, it might be I have some weird vite configuration :)

I do have the same issue.
Here is a reproduction repo : https://github.com/simbas/repro-kobalte-page-load, it's basically a fresh solid start app using the Kobalte button.
Before adding the Kobalte button:

after adding the Kobalte button:

The page loads 340 files and it takes 1 or 2 seconds.

The same thing can be observed with Astro.js. However, it's not a big problem, as others mentioned. It just adds to the start-up time.

When using the Network tab with disabled cache the wait time to load the entire library is very long. It would be nice to have separate packages. (using Astro)

I'm not sure what i'm doing different but on every change I get full page reload, making seeing changes really slow when using kobalte :(

My Project Details

Bundler: Vite
Kobalte: 0.11.0

Like others have said this does seem like a developer experience issue.  When I startup my application I can see about 3 MB of data gets downloaded worth of Kobalte files.  I have actually had it brick Firefox if I even attempt to use the debugger tab.
When I do a production build with Vite, I do see the tree shaking happening:

The first run is without Kobalte and the second includes the Button component.
I do agree with @fabien-ml  that it should not be something that is expensive to maintain.

Hi, I will not do it for now because of versioning maintenance nightmare when having multiple packages and the reason mentioned by @marbemac.
However i've created a feature request on kobalte.canny.io. If it's very requested I will reconsider it.

Since Turbo is being use to package here I am wondering if this implementation would fulfill the request here:
https://github.com/vercel/turbo/discussions/612#discussioncomment-4175095
I will pull this repo later and try it on my local and let you guys know


The same command will be added to hishtory's log file twice.

I'm using the latest GitHub version of hishtory on Ubuntu 22.04.4 LTS.
I noticed that after I issued the following command:
werner@x13dai-t:~$ hishtory config-set displayed-columns CWD Command ExitCode timestamp
There will be two duplicate entries with the same timestamp be added to the history log file of hishtory, which seems unreasonable, as shown below:

Regards,
Zhao

Ah interesting, thank you for opening this issue! Does this reproduce reliably for you? Or only sometimes? I can't seem to reproduce this, so I'm wondering if this is some sort of race condition.

It seems that I can reproduce this reliably, as shown below:

Ah perfect, thank you for that! I can now reproduce this and am working on a fix in #217. I'll keep you updated as I look into this. :)

https://github.com/ddworken/hishtory/pull/218#issuecomment-2156400014

Ah interesting, thank you for testing this and letting me know! Just to confirm, this is with the latest version of hishtory installed, right? Can you share with me:

The output of hishtory status (with your secret key redacted)
What version of bash you're using?

Ah interesting, thank you for testing this and letting me know! Just to confirm, this is with the latest version of hishtory installed, right?

Yes.

Can you share with me:
1. The output of `hishtory status` (with your secret key redacted)

$ hishtory status
hiSHtory: v0.Unknown
Enabled: true
Secret Key: xxx
Commit Hash: Unknown

2. What version of bash you're using?

$ bash --version
GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Hmm, two follow-up questions as I continue to look into this:

It seems like you installed hishtory via building it yourself (hence the v0.Unknown). Is that correct?
Have you restarted your terminal since updating hishtory, and are still running into this issue after the restart?

Yes.
Yes.

Hmm, I'm a bit stumped by this and am still struggling to reproduce this. I'm running Ubuntu 22.04 with bash 5.1.16(1)-release (the same as you) and with the latest version of hishtory I'm unable to reproduce this. My best guess is that something has gone wrong with how you're updating/installing hishtory. Can you check whether you're running with the latest shell config via declare -f __hishtory_precommand, it should show something like:
# declare -f __hishtory_precommand
__hishtory_precommand ()
{
    if [ -z "${HISHTORY_AT_PROMPT:-}" ]; then
        return;
    fi;
    unset HISHTORY_AT_PROMPT;
    HISHTORY_START_TIME=`hishtory getTimestamp`;
    CMD=`history 1`;
    if ! [ -z "CMD " ]; then
        if [[ "$CMD" != "$LAST_PRESAVED_COMMAND" ]] && [[ "$CMD" != "$LAST_SAVED_COMMAND" ]]; then
            ( hishtory presaveHistoryEntry bash "$CMD" $HISHTORY_START_TIME & );
        fi;
    fi;
    LAST_PRESAVED_COMMAND=$CMD
}

See below:
werner@x13dai-t:~$ declare -f __hishtory_precommand
__hishtory_precommand ()
{
    if [ -z "${HISHTORY_AT_PROMPT:-}" ]; then
        return;
    fi;
    unset HISHTORY_AT_PROMPT;
    HISHTORY_START_TIME=`hishtory getTimestamp`;
    CMD=`history 1`;
    if ! [ -z "CMD " ]; then
        ( hishtory presaveHistoryEntry bash "$CMD" $HISHTORY_START_TIME & );
    fi
}

Ah, that does seem to show that you don't have the latest version of hishtory install. You're missing the updated bit here.
How are you building it locally? go build; ./hishtory install should be enough to update the file at ~/.hishtory/config.sh to have the updated definition of __hishtory_precommand. As long as that is true, then restarting your terminal/shell should work fine.

This time, it does the trick:
werner@x13dai-t:~$ declare -f __hishtory_precommand
__hishtory_precommand ()
{
    if [ -z "${HISHTORY_AT_PROMPT:-}" ]; then
        return;
    fi;
    unset HISHTORY_AT_PROMPT;
    HISHTORY_START_TIME=`hishtory getTimestamp`;
    CMD=`history 1`;
    if ! [ -z "CMD " ]; then
        if [[ "$CMD" != "$LAST_PRESAVED_COMMAND" ]] && [[ "$CMD" != "$LAST_SAVED_COMMAND" ]]; then
            ( hishtory presaveHistoryEntry bash "$CMD" $HISHTORY_START_TIME & );
        fi;
    fi;
    LAST_PRESAVED_COMMAND=$CMD
}


Use WM_CLASS class instead of instance (fix #218)

Usually the second part of WM_CLASS (the actual window class, not the instance) is
expected (compare to i3wm class property) so we use this one.
This fixes #218

Finally got around fixing this, what do you think?

Done squashing

Would be nice to also be able to get the instance out of wlc.

This'd be the old functionality of the function, we'd just to add a new one, not difficult. The only question is whether to add it in here or regard it as a new feature and seperate it.

I'll merge this now. Just do new PR if you decide to add instance.


Change FD_SETSIZE to c_int

FD_SETSIZE defines an upper bound for file descriptors that can be added to fd_set. It is common to check if a file descriptor is less than FD_SETSIZE before adding it to an fd_set. See the example below:
fn main() {
    let path = std::ffi::CStr::from_bytes_with_nul(b"/dev/null\0").unwrap();
    let fd = unsafe { libc::open(path.as_ptr(), libc::O_RDONLY) };
    if fd < 0 {
        eprint!("open failed\n");
        return;
    }

    let mut set = std::mem::MaybeUninit::<libc::fd_set>::uninit();
    unsafe { libc::FD_ZERO(set.as_mut_ptr()) }
    if fd < libc::FD_SETSIZE { // <- type mismatch!
        unsafe { libc::FD_SET(fd, set.as_mut_ptr()) }
    } else {
        eprint!("too large fd\n");
    }
}

Unfortunately, this example does not compile because of a type mismatch. fd is c_int while FD_SETSIZE is usize (or size_t).
Since FD_SETSIZE represents the max file descriptor + 1, I think it should have the same type as file descriptors. This pull request modifies the type to c_int and adds casts where needed.

:umbrella: The latest upstream changes (presumably #3348) made this pull request unmergeable. Please resolve the merge conflicts.

Please also update src/unix/hurd/mod.rs, introduced in the meanwhile, thanks!

Rebased and updated my commit.
I also changed _POSIX_OPEN_MAX as well as _POSIX_FD_SETSIZE to c_int since the latter is defined as an alias of the former.

:umbrella: The latest upstream changes (presumably #3428) made this pull request unmergeable. Please resolve the merge conflicts.

Ah, sorry, my commit indeed modified a lot, up to conflicting yours.

No problem, my diff is so small that the conflict can be easily resolved 🙂

@bors r+

:pushpin: Commit 500365e197166ca7bccd060270a4dbb525ee03a5 has been approved by JohnTitor
It is now in the queue for this repository.

:hourglass: Testing commit 500365e197166ca7bccd060270a4dbb525ee03a5 with merge 7412a8b0ee585317cf4f39b1dfb13dee81a1e524...

:sunny: Test successful - checks-actions, checks-cirrus-freebsd-13, checks-cirrus-freebsd-14
Approved by: JohnTitor
Pushing 7412a8b0ee585317cf4f39b1dfb13dee81a1e524 to main...


New footer design

FIXED #478
Improved the footer Design

Is there a problem in merging this PR?
As i can see, some checks were unsuccessful.

@ayush2743 Need types as this is a typescript project. Also needs above review changes requested to be made.

@rithviknishad Can you review it once again please?


Save client-memory vertex and indices when using indexed draws.

Common_pre/postElements merged into CopyClientMemoryArrays.

Tested on glDrawElements with:
-Client vertex with IBO
-Client vertex with client indices
-VAO & VBO with client indices
-VAO & VBO with IBO


feat(plugin-chart-echarts): new sunburst echart port

💔 Breaking Changes
Need to sacrifice secondary metric
🏆 Enhancements
Shiny new Sunburst echart
Deployed at https://superset-ui-45wh5ddih-superset.vercel.app/?path=/story/chart-plugins-plugin-chart-echarts-sunburst--vaccine-sunburst

Improvements possible if required

Label control to change font size, truncation as bigger ones go outside the slice

@mayurnewase thank you so much for your contribution!! how did we miss your PR? @villebro @stephenLYZ please review 🙏

This is awesome stuff! 💯

The codebase on this repo has been moved to the main Apache Superset repo, and consequently the repo is in the process of being archived. See the Superset Improvement Proposal for details: https://github.com/apache/superset/issues/13013 . While all currently open issues and PRs will be closed, we encourage you to reopen this PR on the main repo, which should be as simple as moving over any code changes as follows:

core packages: packages/** (this repo) -> superset-frontend/packages/** (main repo)
plugins: plugins/** (this repo) -> superset-frontend/plugins/** (main repo)

If you need help with the migration, please post a message on the SIP or reach out on the community Slack.


No tests for ontology.save

There are no tests for ontology.save
There is a test that ontoconvert runs, but not if it runs correctly.¨
At least recursive save is not working at the moment.

Initial test added with #686
Additional needs are adressed in separate issues.


Execution

What is the exact command syntax to run this code and see the changes?

In order to run the script you have to insert your own API key in the source code. Then, launch the script without any arguments.
Please, if the code's not working, let me know, and I'll fix it asap.
Thanks.
-wirzka.

Just curious, how can get the API key? I opened the link from readme file, it redirect me to a IP checker site. Can you please help regarding Api generation part, how to do that exactly

The link brings you to the service's website used by netfier.
You can get the API key by creating an AbuseIPDB account. Check this page for more information: https://www.abuseipdb.com/api.
Once you got one, insert it here: https://github.com/wirzka/netfier/blob/8aea272b1b0933794eadf13b39929a60fdd106d5/netfier.py#L29.
Let me know if you need more help. In the meanwhile, I'll update the readme with the specific link to the API documentation.

Just curious, how can get the API key? I opened the link from readme file, it redirect me to a IP checker site. Can you please help regarding Api generation part, how to do that exactly

Hey, can I close your issue?

Sure


Craft Protobuf VEDA User Profile

Description
This issue's purpose is to create a Protocol Buffers (protobuf) definition for the VEDA user profile.
Tasks

[x] Protobuf Schema Definition

Create a .proto file that defines the user profile structure.
Specify the data types, field names, and any nested structures.

[x] Validation and Testing

Validate the schema against VEDA’s user profile data.
Test serialization and deserialization using sample data.

[x] Documentation

Document the purpose of each field in the schema.
Provide usage instructions for developers who will work with the protobuf definition.

Additional Notes
Collaborate with VEDA teams to ensure the schema aligns with VEDA requirements.
Follow best practices for protobuf schema design.
### Tasks
- [x] Protobuf Schema Definition

This issue has been addressed with the commits - https://github.com/NASA-IMPACT/veda-auth-central/commit/9b97229e0408b0d8d0f585749ad9e62aebb964a5 and https://github.com/NASA-IMPACT/veda-auth-central/commit/fff46919da8c8b9adf9004f0df2fff40afab518a


always protect numOpen to avoid data race

See https://app.wercker.com/getlantern/flashlight/runs/build/5daf742439029f0008da25a7?step=5daf7446f947d1000977d0fb for one case it's happening.

Merging this test only utility!


Fixed person national id for foreigners and new  function for compani…

…es' TIN (RIF in Venezuela)

Needs rebase.

bad rebase, you're embarking commits completely unrelated to your work. Please do a proper rebase on master.

Has been this PR forgotten?

no, see my previous comment

No news for too long, closing.


how to get the moving distance according to the moving track

do we have some function?

There's no specific command for this functionality.


Updating README.md formatting (preparing for the site)

Just some little edits, more readable markdown, and preparing the file to be the base for the imminent website.

I only started using markdown in my READMEs yesterday so this is great for my learning curve. Thank you so much!

Don't worry! BTW I also updated slightly the hierarchy of headings.

Yeah, its much better now!
BTW, yesterday when I was playing around with the markdown, I couldn't figure out a way to view it without deploying to Github.

Yes, edit directly in GitHub and you will be presented an Ace editor, and editing a markdown file will also show a preview action :D sweet!
PS: to see the Edit this file for the README you have to open it in the file tree.

Awesome! I'm so happy to be able to learn from a Github master ;-)


Client Readme Comments

I can't seem to install serve properly for local production runs. I've tried npm i serve and yarn global add serve. Both times, when running serve dist -p 5111, I get the error "command not found: serve". Am I doing something wrong?

Just in general, I expect that people working on this (essentially myself) will be far less familiar with JS/vue/node etc. than python. The docs here are great high-level stuff, and the function-level documentation in the files is great. I just wonder if there's something we can do between these levels. Perhaps what I'm looking for is just a tutorial on how to use vue, which I'm sure exists in abundance ;-)

You are absolutely right. Those things should be included. We should make a user story about updating the documentation in that way, or maybe just a quick PR.
What should have been in the documentation for the client is probably running npm install -g serve. Can you try that out really quick and see if the serve dist -p 5111 command works then?

Great, yeah that worked :-) I did have to run it as sudo though.
On Fri, Mar 19, 2021 at 12:52 PM Anton G. Neuhold Jr. <
@.***> wrote:

You are absolutely right. Those things should be included. We should make
a user story about updating the documentation in that way, or maybe just a
quick PR.
What should have been in the documentation for the client is probably
running npm install -g serve. Can you try that out really quick and see
if the serve dist -p 5111 command works then?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/halomod/TheHaloMod-SPA/issues/92#issuecomment-803077446,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAJWRXV6BYXFGRX3PIXAWH3TEOTOLANCNFSM4ZPLDPTA
.

A user story was added for this as well. 🚀


ci: remove "Log PR Number" step

Summary
It just removes a dangerous string interpolation from the Workflow.

Would it be possible to address by assigning these function calls to an intermediate variable per Using an intermediate environment variable?
Also, I'm not clear on why the script was set up to use find-pr-title and find-pr-number to parse data as opposed to using ${{ github.event.pull_request.title }} and ${{ github.event.pull_request.number }}. Seems like the complexity could be reduced if event is available.


fix conflict environment variables

Fix: https://github.com/wechaty/python-wechaty-puppet-service/issues/50

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.wj-Mcat seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


GH-44950: My WIP changes for Rtools

This isn't quite done yet but these changes make aws_c_common build for me.
Ref: https://github.com/apache/arrow/pull/44989

I'll keep working on this and push changes here.

Hey @raulcd, I have a working set of patches now. This PR needs at least two more things, maybe both of which I could use help on:

I think we want to guard applying the patches so they're only applied when we're doing the Rtools40 build. Maybe an environment variable?
The build step succeeds but I think the pkg step can sometimes fail, so I need to run this locally a couple more times to make sure it's solid.

I am trying to apply the patch but I am having some issues like:
D:/a/arrow/arrow/src/build-x86_64-cpp/aws_c_io_ep-prefix/src/aws_c_io_ep/source/windows/secure_channel_tls_handler.c:59:14: error: redeclaration of 'enum _SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT'
   59 | typedef enum _SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT {
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/rtools40/ucrt64/x86_64-w64-mingw32/include/security.h:40,
                 from D:/a/arrow/arrow/src/build-x86_64-cpp/aws_c_io_ep-prefix/src/aws_c_io_ep/source/windows/secure_channel_tls_handler.c:25:
C:/rtools40/ucrt64/x86_64-w64-mingw32/include/sspi.h:251:16: note: originally defined here
  251 |   typedef enum _SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT {
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:/a/arrow/arrow/src/build-x86_64-cpp/aws_c_io_ep-prefix/src/aws_c_io_ep/source/windows/secure_channel_tls_handler.c:60:5: error: redeclaration of enumerator 'SecApplicationProtocolNegotiationExt_None'
   60 |     SecApplicationProtocolNegotiationExt_None,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/rtools40/ucrt64/x86_64-w64-mingw32/include/security.h:40,
                 from D:/a/arrow/arrow/src/build-x86_64-cpp/aws_c_io_ep-prefix/src/aws_c_io_ep/source/windows/secure_channel_tls_handler.c:25:
C:/rtools40/ucrt64/x86_64-w64-mingw32/include/sspi.h:252:5: note: previous definition of 'SecApplicationProtocolNegotiationExt_None' was here
  252 |     SecApplicationProtocolNegotiationExt_None,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:/a/arrow/arrow/src/build-x86_64-cpp/aws_c_io_ep-prefix/src/aws_c_io_ep/source/windows/secure_channel_tls_handler.c:61:5: error: redeclaration of enumerator 'SecApplicationProtocolNegotiationExt_NPN'
   61 |     SecApplicationProtocolNegotiationExt_NPN,
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/rtools40/ucrt64/x86_64-w64-mingw32/include/security.h:40,

I am trying to manually fix the patch on the main repo


Remove package guide

This is no longer a feature of the public repo, to return in the future
Signed-off-by: Charlie Egan<EMAIL_ADDRESS>

/lgtm


Bentley et al. 2016 expression data

Resolves #284
Data spreadsheet: https://docs.google.com/spreadsheets/d/1kCxOOKu1wAREa9VbBiWVVHh-GEC3kJk0A3YVEipPKcc/edit#gid=0

Adds an expression_data directory in aux_data, and the expression data used in 10.1371/journal.pcbi.1005283 in a csv with the same schema as the Modified celegans db dump.csv
Adds insert_worm.upload_additional_receptors_neurotransmitters_neuropeptides_innexins(), which recursively searches the expression_data in lexicographic sort order for .csv files and adds any novel data to the network
Factors most of the insertion logic out into a separate private method, which is called by both upload_receptors_types_neurotransmitters_neuropeptides_innexins and upload_additional_receptors_neurotransmitters_neuropeptides_innexins
Tidies up some indentation in that method (sorry about the unhelpful diff)

Still todo:

[ ] Update data sources docs page
[ ] Add Data Integrity Test

I haven't been able to test this because I can't install pyopenworm through pip in either py2 or py3.
py2: I think FuXi is the problem: it requires rdflib < 3a and the the setup.py requires rdflib==4.1.2. FuXi also doesn't install its own dependencies properly (specifically ez_setup).
py3: wsgiref==0.1.2 has a py2 print statement in it.

Build failures are just due to the unit tests having the wrong expectations for the new data.

Coverage remained the same at 72.968% when pulling 0ff0bb34da04e80f8e7b3c8ce761f453371fc042 on clbarnes:issue-284-extrasynaptic-connectome-data into cdcdd814dfa66face0deae342c65e6d7201fcb90 on openworm:dev.

Coverage remained the same at 72.968% when pulling 0ff0bb34da04e80f8e7b3c8ce761f453371fc042 on clbarnes:issue-284-extrasynaptic-connectome-data into cdcdd814dfa66face0deae342c65e6d7201fcb90 on openworm:dev.

Build should be green, now, forgot a dash in a receptor name...
Paradoxically, I can't do the URLs for the docs page until the PR is merged but I've got the changes except the URLs in a local branch (accidentally pushed it but then --force undid it, which is why this history might look a bit squiffy) so they can go up as soon as this PR is merged and OpenWorm has taken ownership of the spreadsheet https://docs.google.com/spreadsheets/d/1kCxOOKu1wAREa9VbBiWVVHh-GEC3kJk0A3YVEipPKcc/edit#gid=0

Coverage remained the same at 72.968% when pulling 384b2c3e9520c9c430045a296a99a23138b09f61 on clbarnes:issue-284-extrasynaptic-connectome-data into cdcdd814dfa66face0deae342c65e6d7201fcb90 on openworm:dev.

lgtm


updated drag and drop widget

This pull request fixes the following issues:

BEFORE
AFTER

:+1:

:+1:


added buttons on Products page and home screen

I've added 'Buy Now' and 'Add to Cart' buttons to the product pages, ensuring they align with the website's theme and maintain good color contrast for accessibility.
Fixes #55
This pull request introduces 'Buy Now' and 'Add to Cart' buttons that are visually consistent with the website's design and optimized for various screen sizes.

My code follows the style guidelines of this project
I have performed a self-review of my code
I have commented my code, particularly in hard-to-understand areas
My changes generate no new warnings
New and existing unit tests pass locally with my changes

I'd say to use an icon for Add to Cart rather than the button. @Amitooo1

okay @pooranjoyb, changing that button to an icon.

@pooranjoyb how does this looks?

@Amitooo1 firstly the cart icon is not clickable and secondly,

You see there is too much space between the cart icon and the text description, just work on it and better u share a figma design file with me rather then updating the code directly

@Amitooo1 there are some changes made in the main branch I suggest you take a pull from dev so that I can preview it.

Sure @Mahitej28

@Amitooo1 firstly the cart icon is not clickable and secondly,

You see there is too much space between the cart icon and the text description, just work on it and better u share a figma design file with me rather then updating the code directly

@Amitooo1 give your updates by EOD

@Mahitej28 frontend is done and cart button is responding on clicks as shown below

for further functionality of add to cart button a lot of backend need to be develop as prior functionalities of add to cart is limited to a popup message only. For that i can raise a seperate issue.


Bump up workflow version to alpha03

Description
Bump up workflow library version to 0.1.0-alpha03
Alternative(s) considered
N/A
Type
Releases
Screenshots (if applicable)
N/A
Checklist

[ ] I have read and acknowledged the Code of conduct.
[ ] I have read the Contributing page.
[ ] I have signed the Google Individual CLA, or I am covered by my company's Corporate CLA.
[ ] I have discussed my proposed solution with code owners in the linked issue(s) and we have agreed upon the general approach.
[ ] I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the style guide of this project.
[ ] I have run ./gradlew check and ./gradlew connectedCheck to test my changes locally.
[ ] I have built and run the demo app(s) to verify my change fixes the issue and/or does not break the demo app(s).

Please do not merge this yet. I want to get PR#2095 into this release, but waiting testing from ONA to see if it breaks them

Also want to include PR #2099 to cleanup some code with the testing lib


[geo] introduce "Auto Zoom" control

On geospatial visualization, checking the "Auto Zoom" control makes it
such that the viewport is fitted to the data upon rendering the chart.
For dashboards with region filters, the map should jump to the right
position.
Eventually we should enhance this to fly and ease to the position in an
animated way.

🚢


Make request options optional

Method: list
This method takes no parameters.
But request method require options arg, so i need to pass an empty hash
@mixpanel_client.request('funnels/list', {} )
Probably if we have method which takes no parameters, options should be optional
@mixpanel_client.request('funnels/list' )

Seems like a fine idea. Thanks.


Release/7.0.0

:white_check_mark: Build TheIdServer 7.3.0.build.3094 completed (commit https://github.com/Aguafrommars/TheIdServer/commit/06bdda7ac7 by @semantic-release-bot)


Check if parsedUrl is an object [Next 2]

#2066

@timneutkens I think you can rebase the previous PR with master and do a force push.


Make Flux UIs more obvious and show images in more than one place

This a bit of a hack, and I would appreciate some help styling this more nicely.
Unfortunately can the gallery theme we use only show images which are in a page bundle, so a situation like this (or similar):
directory/
    index.md
    img1.png
    img2.png

Doing this across various places would need us

duplicate images and
potentially having to update across many places as well

I created a re-usable partial with Bootstrap's Card Group, Modal and Carousel. Unfortunately I couldn't use Carousel controls or indicators as the modal already uses the "data-target" argument.
Help or feedback is welcome!
Signed-off-by: Daniel Holbach<EMAIL_ADDRESS>

Image galleries are now shown not only at https://deploy-preview-1359--fluxcd.netlify.app/ecosystem/ as before, but also at

https://deploy-preview-1359--fluxcd.netlify.app/flux
https://deploy-preview-1359--fluxcd.netlify.app/faq

Happy to make them a bit smaller or alter in any way you see would like to.

cc @Callisto13

https://fluxcd.io/ecosystem/#flux-uis--guis is the section we had before, using the gallery theme we have been using up until now, as a comparison.

@dholbach please use only two pics for VS code and switch the order, wego first. For wego please use these two pics:

https://github.com/stefanprodan/gitops-linkerd/blob/main/docs/screens/wego-apps.png
https://github.com/stefanprodan/gitops-linkerd/blob/main/docs/screens/wego-deps.png

Thanks for the feedback, will do later.

The Weave GitOps screenshots are completely unreadable on my machine. We need to make new ones. I can try to find some time for that later this week.

The Weave GitOps screenshots are completely unreadable on my machine.

Which ones? Mine look ok, check out my repo readme

:heavy_check_mark:

Thanks @stefanprodan for the help!

@stefanprodan @dholbach

Try the screenshots in https://github.com/fluxcd/website/pull/1359#issuecomment-1403468718
They are not on https://fluxcd.io/ecosystem - are they good for you?

Try the screenshots in #1359 (comment)
They are now on https://fluxcd.io/ecosystem - are they good for you?

They look pretty much the same from a readability perspective. 🤔 Is it just my browser showing them so tiny?


A side effect relaed to opa and mdb

description:
opa = OpaPremodit uses mdb, but since the temperature setting of OpaPremodit is used within mdb (specifically in change_reference_temperature),
opacalc.py
    def apply_params(self):
        self.mdb.change_reference_temperature(self.Tref)

when invoking opa multiple times with the same mdb, the state of opa defined earlier gets altered.
potential solution:
Create a hard copy of the mdb used within opa. However, in this case, especially when using PyTables without lazy IO (vaex is fine), the memory usage will increase by the amount of mdb usage each time opa is invoked. Therefore, consider making the hard copy optional, and if not performing the hard copy, issuing a warning.

#519

removes mdb.Tref
line_strength_ref_original is line strength at T=Tref_original
self.line_strength_ref (depending on self.Tref) -> self.line_strength(Tref)

close with #515


[SPARK-29898][SQL] Support Avro Custom Logical Types

What changes were proposed in this pull request?
Extends options for the Spark Avro formatter allowing to use custom Avro logical types.
Why are the changes needed?
At the moment only timestamp and decimal logical types are supported at Spark but Avro support any conversion that you could need. This change keep the default mappings and allow to add news.
spark
    .read
    .format("avro")
    .option("logicalTypeMapper", "org.example.CustomAvroLogicalCatalystMapper")
    .load()

Only you need is register your custom Avro logical type and then implement AvroLogicalTypeCatalystMapper
Example of mapper implementation:
object ISODatetimeLogicalType extends LogicalType("datetime") {
  def register(): Unit = LogicalTypes.register(getName, new LogicalTypes.LogicalTypeFactory() {
    override def fromSchema(schema: Schema): LogicalType = ISODatetimeLogicalType.this
  })
  override def validate(schema: Schema): Unit = {
    if (schema.getType ne Schema.Type.STRING) {
      throw new IllegalArgumentException(
        "Datetime (iso8601) can only be used with an underlying string type")
    }
  }
}

class CustomAvroLogicalCatalystMapper extends AvroLogicalTypeCatalystMapper {
  override def toSqlType: PartialFunction[LogicalType, SchemaConverters.SchemaType] = {
    case ISODatetimeLogicalType => SchemaType(TimestampType, nullable = false)
  }

  override def toAvroSchema: PartialFunction[RecordInfo, Schema] = {
    case RecordInfo(TimestampType, _, _) =>
      ISODatetimeLogicalType.addToSchema(SchemaBuilder.builder().stringType())
  }

  override def deserialize
  : PartialFunction[LogicalType, DataDeserializer => Unit] = {
    case ISODatetimeLogicalType =>
      dataUpdater =>
        val datetime = dataUpdater.value match {
          case s: String => UTF8String.fromString(s)
          case s: Utf8 => val bytes = new Array[Byte](s.getByteLength)
            System.arraycopy(s.getBytes, 0, bytes, 0, s.getByteLength)
            UTF8String.fromBytes(bytes)
        }
        val timestamp = Timestamp.from(
          OffsetDateTime.parse(datetime.toString)
            .atZoneSameInstant(ZoneOffset.UTC)
            .toInstant
        )
        dataUpdater.updater
          .setLong(dataUpdater.ordinal, timestamp.toInstant.toEpochMilli * 1000L)
  }

  override def serialize: PartialFunction[LogicalType, DataSerializer => Any] = {
    case ISODatetimeLogicalType =>
      dataSerializer =>
        val datetime = OffsetDateTime.ofInstant(
          Instant.ofEpochMilli(dataSerializer
            .getter
            .getLong(dataSerializer.ordinal) / 1000),
          ZoneOffset.UTC
        ).toString

        Try(DateTimeFormatter.ISO_DATE_TIME.parse(datetime))
          .map(_ => datetime)
          .getOrElse(throw new IncompatibleSchemaException(
            s"Cannot Serialize to Avro logical type ISO8601Datetime: " +
              s"'$datetime' is not a valid datetime."))

  }
}

Does this PR introduce any user-facing change?
Yes, at the moment of use the Spark Avro formatter and to_avro & from_avro functions. now you can pass the class name of the logical types mapper as an optional parameter.
How was this patch tested?

AvroSuit: struct <=> schema types conversions test.
AvroLogicalTypeSuit: Avro formatter test.

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Hi @pradomota ,
To write Avro files with a schema different from the default mapping, you can use the option "avroSchema":
df.write.format("avro").option("avroSchema", avroSchemaAsJSONStringFormat)...
See https://spark.apache.org/docs/latest/sql-data-sources-avro.html#supported-types-for-spark-sql---avro-conversion for more details.
The function to_avro also supports customized the output schema with the last parameter "jsonFormatSchema"
To read Avro file with customized Avro schema, you can also use the option "avroSchema". To specify a customized Dataframe schema, you can use the general data source method "spark.read.schema(..)..".
If there is missing mapping for the Avro logical types to DataFrame schema(https://spark.apache.org/docs/latest/sql-data-sources-avro.html#supported-types-for-avro---spark-sql-conversion), please update it in the SchemaConverters.
Hope this helps.

Hi @gengliangwang, thanks for your response!
This is just an extension for support custom logical types from Avro to SQL. At he moment Spark only supports the following hardcoded logical-types: date,  timestamp-millis, timestamp-micros & decimal.
With this extension you can add your custom logical types and map it to the properly SQL type. For example read a string ISO date from Avro (marked as iso-date logical type) and use as DateType in Spark.

With this extension you can add your custom logical types and map it to the properly SQL type. For example; read a string ISO date from Avro (marked as iso-date logical type) and use as DateType in Spark.

Sorry I don't get it. Could you provide a reasonable scenario?

The Avro spec defines a set of logical types, but it also mentions that this is an extensibility point (so the logical types defined in the spec aren't the only possible ones). In fact, the Avro Object Model contains the necessary support to be able to build custom logical types.
This enables different scenarios. For example, in this Stackoverflow question the user is creating a new logical type that enables encryption of the data before serialization. In my team, we are using custom logical types for several reasons:

To enforce a certain syntax on some strings (e.g. phone numbers, uris)
To avoid the limitations of the built-in Avro logical types (e.g. Avro's timestamps don't have offset information)

Here's a specific example. Imagine the following Avro schema:
{
  "namespace": "org.example",
  "name": "User",
  "type": "record",
  "doc": "User Record",
  "fields": [
    {
      "name": "email",
      "type": "string",
      "doc": "User email"
    },
    {
      "name": "creationDateTime",
      "type": {
        "type": "string",
        "logicalType": "iso-date"
      },
      "doc": "User creation date in ISO format"
    }
  ]
}

The logical type iso-date encodes datetime values as ISO8601 strings. We want this logical type to map to a DateType in Spark, but the current Avro support will map this to a StringType column.
This PR contains a proposal that adds the org.example.CustomAvroLogicalCatalystMapper interface, which allows users to control how Avro fields that are marked with logical type iso-date are serialized into Spark objects, therefore allowing the user to map this logical type to the DateType SQL type.

gentle ping @gengliangwang. I am also interested in this PR

@pradomota @edrevo I think the usage of the custom logical type support is complex.
In your example, even the column for iso-date is StringType, we can always use df.map(...) to parse it correctly.
Besides, there are too many code changes for this. I am not sure whether this is a frequent user scenario.


feat: show config error linenos

What I did
When config failed to parse in Ape 0.7, you got a validation error.
in Ape 0.8, you get an AttributeError during a weird network-option callback (what?)
And the error still didn't show config line numbers.
So this PR does 2 things:

Exit early during config file parsing error... because it is too confusing otherwise!
Show the line numbers of the bad config

fixes: #1718
How to verify it
with this config:
name: {asd}

deployments:
 address: ooga

you should get this error now:
(ape08) ➜  ape-playground git:(main) ✗ ape console -v debug
'$HOME/ApeProjects/ape-playground/ape-config.yaml' is invalid!
Input should be a valid string
-->1: name: {asd}
   2:

Input should be a valid dictionary
   4: deployments:
-->5:  address: ooga

Checklist

[ ] All changes are completed
[ ] New test cases have been added
[ ] Documentation has been updated

(demo)

ima release core after this


Missing CSS

According to instructions I installed gem and ran "rails generate jquery:datatables:install". I see generated javascript and stylesheets files in respective folders. I am able to sort and search but there no sorting icons on columns and table css is missing.
I am using rails4.1.6. IS there anything else I need to show correct css ?
Thanks

I think i'm having the same issue.
I'm still on rails 3.1.x, but I see this in my console log:
GET http://localhost:3000/assets/images/sort_both.png 404 (Not Found)
jquery.dataTables.js?body=1:4246
GET http://localhost:3000/assets/images/sort_desc.png 404 (Not Found)
jquery.js?body=1:5996
GET http://localhost:3000/assets/images/sort_asc.png 404 (Not Found)
It is looking for the images in the wrong places it seems

*= require dataTables/bootstrap/2/jquery.dataTables.bootstrap
That as well doesn't actually point at anything/do anything.
It appeals the datatables:install bootstrap2 doesn't really work either

You'll need to get the latest version from github, this fix hasn't been released to RubyGems yet
gem 'jquery-datatables-rails', github: 'rweng/jquery-datatables-rails'

confirmed @MasterSlowPoke 's solution works.

Reeeeelease it to Rubygems ;)

+1

I will release soon.
Thanks @MasterSlowPoke and @tsai146  :clap:

Thanks, I released a new gem version to rubygems (3.2.0).
If the error persist, please, reopen it.


Right-to-Left Languages Support

Is it possible to make the direction of the slides and dots movement from right to left to support right to left languages?

Duplicate of #32


Add Wasm compatibility

Before the line reqwest::Client::builder().cookie_store(true).build().unwrap() would block compilation on wasm targets.
The error would be:
error[E0599]: no method named `cookie_store` found for struct `ClientBuilder` in the current scope

With this, compilation can still succeed.

Is there any reason to use this library when you cant use cookies? You would have to manually set your headers for every request.
Can you share the target you tested this on, cuz I run into:
error: the wasm*-unknown-unknown targets are not supported by default, you may need to enable the "js" feature. For more information see: https://docs.rs/getrandom/#webassembly-support
   --> /<redacted>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.2.15/src/lib.rs:342:9
    |
342 | /         compile_error!("the wasm*-unknown-unknown targets are not supported by \
343 | |                         default, you may need to enable the \"js\" feature. \
344 | |                         For more information see: \
345 | |                         https://docs.rs/getrandom/#webassembly-support");
    | |________________________________________________________________________^

error[E0433]: failed to resolve: use of undeclared crate or module `imp`
   --> /<redacted>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.2.15/src/lib.rs:398:9
    |
398 |         imp::getrandom_inner(dest)?;
    |         ^^^ use of undeclared crate or module `imp`

when i run cargo clean && cargo build --target wasm32-unknown-unknown

LGTM

This is pointless...

Can't WASM run outside a web browser? Also if you want you can proxy the VRChat API and add CORS headers but that might make VRChat mad at you if you send user credentials to it.

Can't WASM run outside a web browser?
idk. I haven't looked into it.

Also if you want you can proxy the VRChat API and add CORS headers but that might make VRChat mad at you if you send user credentials to it.

I could, but I don't want to make VRChat bonk my server's ip.
My app does need User-Auth.
Also, even if I didn't get bonked, now my server's ip has a buttload of tokens bound to it's ip, which is bound to set off some flags somwhere.
That overall just seems like a bad idea.

This or this exists.
Regarding your too many auth tokens, you can invalidate them with the logout call.

Regarding your too many auth tokens, you can invalidate them with the logout call

That'd require me to actually track which tokens I'm handing out, which seems like a no-no for me.

When I think of proxying the vrc-api I'm thinking of a simple nginx reverse-proxy. I don't even need to add a single header, because I'm now technically requesting from my own site.

only as long as all users belong to you. This would be against TOS if you do this for others iirc

only as long as all users belong to you

Which they would not.
I woudn't prevent others from using a proxied api with a simple nginx reverse proxy.
Like I mentioned before, proxying the vrc-api has multiple issues in my eyes, so I won't.
Hence this issue is staying closed, until there is a good way of doing wasm in the browser.
Wasm as a replacement for native executable formats just doesn't seen worth it to me.
Just compile to the native targets at that point.

Udon 2 is built on WASM as a compile target, which means, technically, we could compile it for Udon with a little bit of glue, for whatever reason someone would want to do that.

Not sure if you/anybody would like to enter your/there credentials into a VRChat world. Anyway, wouldn't that be against TOS too?

Not sure if you/anybody would like to enter your/there credentials into a VRChat world. Anyway, wouldn't that be against TOS too?

On a technicality, It's possible, should you? Probably not, would be kinda cool.

Well a possibility is also, that Cookies are just passed through, and you don't actually have to enter anything.
In which case that'd be quite scary.

Well a possibility is also, that Cookies are just passed through, and you don't actually have to enter anything. In which case that'd be quite scary.

They aren't, I've tried, it's not even a whitelisted origin.


[tlv]: wire tlv proposal

An implementation of https://github.com/lightningnetwork/lightning-rfc/pull/607/

Nice work in this PR. It shows careful engineering.

Reviewee bump!

Do you think it would be a good idea to include a boolean to the primitives?


Date format not supporting 'DD-MM-YYYY'

I was trying to set format to 'DD/MM/YYYY' or 'DD-MM-YYYY'
I've checked the demo site also
Nowhere in the demo it's showing the format of 'DD/MM/YYYY'
When I'm giving format 'DD/MM/YYYY', it's automatically changing to 'MM/DD/YYYY' and suppose if I'm selected '23/05/2016', it's changing to '05/23/2016' and suddenly to 'Invalid date'.

Here is the code
<DatePicker {...input} dateFormat="DD/MM/YYYY" className="form-control" fixedHeight selected={selectedDate} isClearable={true} showYearDropdown />

I cannot reproduce this with 0.34.0: http://codepen.io/jochenberger/pen/xRzRMP

Looks like this is fixed

@martijnrusschen I am still getting the same issue with the latest version as well.

@reznord have a look at http://codepen.io/jochenberger/pen/xRzRMP, it uses react 15.4.1, react-datepicker 0.37.0, and the MM/DD/YYYY format. It works fine. What are you doing differently? Can you modify the codepen to reproduce the issue?

I have the same issue while using react-datepicker inside redux-form. The issue doesn't happen when first selecting the date, but only onBlur.
react: 15.1.0
react-datepicker: 0.39.0
Here's my wrapper component to make the DatePicker work with redux-form's Field component:
`const CustomizedDatePicker = ({input, placeholder, defaultValue, meta: {touched, error} }) => (

    {touched && error && {error}}

);`
And here I pass it to the Field component:
<Field name="startDate" component={CustomizedDatePicker} />

Just wanted to flag that to use a dateFormat format that differs from the format i'm using to store the value (in redux state), i needed to override the onBlur property to ignore it's input parameter, as per http://redux-form.com/6.4.3/examples/react-widgets/.
For example (in my state I store the date in YYYY-MM-DD format):
const FilterDeliveryDateField = field => (

		<FilterDeliveryDate {...field.input} onBlur={() => field.input.onBlur()} />
		{field.meta.touched && field.meta.error &&
		{field.meta.error}}

)

AND
const parseStateToValue = state => moment(state, 'YYYY-MM-DD')
const formatValueToState = value => value.format('YYYY-MM-DD')

const FilterDeliveryDate = ({name, value, onChange, ...props}) => (
	<DatePicker
		name={name}
		className="form-control"
		dateFormat="DD/MM/YYYY"
		selected={parseStateToValue(value)}
		onChange={value => onChange(formatValueToState(value))}
		minDate={props.minDate || moment()}
		{...props}
		/>
)

Just wanted to leave a +1 here, having a similar issue:
const someDate = moment(props.someDate);
const dateFormat = "DD/MM/YYYY";

const _updateSomeDate = ( ... ) => { ... }

<DatePicker selected={someDate} onChange={updateSomeDate} dateFormat={dateFormat} />

For whatever reason the format switches back to "MM/DD/YYYY" so selecting any value above 12 for day breaks the picker with Invalid Date

This issue still exists in the latest version of ^2.2.0 too.
Please refer https://codesandbox.io/s/nnr08opmvp

This issue still exists in the latest version of ^2.2.0 too.
Please refer https://codesandbox.io/s/nnr08opmvp
In the latest there is no need of using monent.js

Update:-  Seems like there is case issue with DD-MM-YYYY, try using dd-MM-yyyy

for me dd/MM/yyyy . works fine.

I have tested with dd/MM/yyyy and it works fine.
With a format of dd MMM yyyyy however - what should happen if a user types in 05/01/2019 or (even 05 01 2019).  At the moment this is parsed as MDY - so we end up with the 1st May. Which is counter-intuitive to people in the DMY part of the world who habitually type dd/MM/yyyy.
Having dug through the code I see that the dateFormat prop can take an array of formats which it will try when parsing.  So dateFormat={['dd MMM yyyy', 'dd/MM/yyyy', 'dd MM yyyy']} which works for me. I don't think this is documented anywhere (I can't see an example for it).  So maybe adding an example will help others.

need solution still nopt working

<DatePicker
className="form-control1"
onChange={this.onChangeDate}
value={this.state.date}
onSelect={this.onChangeDate} //when day is clicked
maxDate={new Date()}
placeholderText="DD/MM/YYYY"
// dateFormat="dd - mm - yyyy"
dateFormat="dd/MM/yyyy"
readOnly={this.state.readonlyInput}
/>
this is my code

@andy-leighton
you are my today's hero: this is a great find and helps us a lot
Such an awesome feature - and not documented?

I have tested with dd/MM/yyyy and it works fine.
With a format of dd MMM yyyyy however - what should happen if a user types in 05/01/2019 or (even 05 01 2019). At the moment this is parsed as MDY - so we end up with the 1st May. Which is counter-intuitive to people in the DMY part of the world who habitually type dd/MM/yyyy.
Having dug through the code I see that the dateFormat prop can take an array of formats which it will try when parsing. So dateFormat={['dd MMM yyyy', 'dd/MM/yyyy', 'dd MM yyyy']} which works for me. I don't think this is documented anywhere (I can't see an example for it). So maybe adding an example will help others.

@andy-leighton This fixes the exact issue I was having - thanks!


Horizontal Bar Chart does not properly fit parent container width and leaves empty space at the top

This is the continuation of the not solved closed issue #647
The proposed solution does not solve the problem, actually this was my first approach and it has the follow problems:

you've got to statically define the container height. This does not happen with vertical BarCharts, as they take up the available parent component height.
If we follow your recommendation the empty space now is at the top of the element. as shown on the following image

Part of the empty space mention in number 2, it's because I need to increase the xAxisLabelsVerticalShift, so labels don't overlap the horizontal bars, and for some reason whenever I increase this number the top empty space increases too.
BTW thanks for creating and maintaining this library

Hi @buildtheui 👋
Horizontal bar charts are obtained by rotating normal bar charts. That's why the height of the chart is not working as expected. You will have to find a workaround to adjust the chart and its neighbour Views.
The documentation says that horizontal charts are still in beta.

The documentation also says-

Developers should first render the chart as a normal chart, add all the props, and then make it horizontal at the end.

I will try to fix this issue of height adjustment soon. In fact, I might have to redesign the horizontal charts form scratch instead of rotating the normal bar charts. But it will take time.
Till then try workarounds to adjust the chart and its neighbour Views.


Fix corner case happening in nested closure scenario (#2888/#2794)

https://github.com/gradle/gradle/issues/2888
As a flag to indicate the rootProject has been loaded,
DefaultGradle's rootProjectActions would be set to null after
projects are loaded, this is not clear enough. However, there's even
a bug: setting rootProjectActions to null should always happen,
no matter if rootProjectActions is empty. This PR fixes the
issue and adds a new boolean property projectsLoaded.
Context
See #2888 #2794

@oehme Could you take a look at this? It would be extremely quick.


Bot does not reconnect on server restart

I've noticed that the bot doesn't connect back to the MC server once the server restarts. The bot shows online on Discord.  'NoneType' object has no attribute 'send':

Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/minecraft/networking/connection.py", line 544, in run
    self._run()
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/minecraft/networking/connection.py", line 559, in _run
    while not self.interrupt and self.connection._pop_packet():
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/minecraft/networking/connection.py", line 297, in _pop_packet
    self._write_packet(self._outgoing_packet_queue.popleft())
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/minecraft/networking/connection.py", line 310, in _write_packet
    packet.write(self.socket)
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/minecraft/networking/packets/packet.py", line 99, in write
    self._write_buffer(socket, packet_buffer, compression_threshold)
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/minecraft/networking/packets/packet.py", line 88, in _write_buffer
    VarInt.send(len(packet_buffer.get_writable()), socket)  # Packet Size
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/minecraft/networking/types/basic.py", line 165, in send
    socket.send(out)
AttributeError: 'NoneType' object has no attribute 'send'
2019-10-14 22:05:27,753:bridge:INFO:Disconnected.

Hey, I'm actually running into this problem myself. I think that this is an issue in the upstream library pyCraft but I will continue investigating. I already have plans to temporarily fix this by restarting the bot if it fails to reconnect too many times in a row as discussed in issue #59 until I find the root cause.

I also noticed that from what I can see in your crash log, the bot has crashed because it was unable to handle the text in your player tab list header. If you'd like me to look into that, please run the bridge with the log level set to "DEBUG" and open an issue with the stack trace next time this happens so that I can see exactly what data your server is sending to the bridge.

Please try the new reconnect failsafe feature and let me know if it fixes your issue. Please note that the bot will simply exit if it exceeds its threshold of failed server joins. A process supervisor like systemd or docker should be used to restart the bridge automatically when it exits.

I tested with some of that changes. I run the service with systemd as a service. The error about the tab menu is the first issue that appears when the server restarts. But afterwards, there is an error when it tries to reconnect.
This is the error when the server first disconnects everyone on the restart:
2019-10-15 13:56:38,246:bridge:ERROR:A minecraft exception occured! 'text':
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/minecraft/networking/connection.py", line 544, in run
    self._run()
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/minecraft/networking/connection.py", line 582, in _run
    self.connection._react(packet)
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/minecraft/networking/connection.py", line 521, in _react
    listener.call_packet(packet)
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/minecraft/networking/packets/packet_listener.py", line 15, in call_packet
    self.callback(packet)
  File "/DestroyMC/DiscordBridge/minecraft-discord-bridge/minecraft_discord_bridge/minecraft_discord_bridge.py", line 709, in handle_player_list_header_and_footer_update
    self.tab_header = json.loads(header_footer_packet.header)["text"]
KeyError: 'text'
2019-10-15 13:56:38,247:bridge:INFO:Disconnected.
2019-10-15 13:56:38,247:bridge:INFO:Forced a disconnection because the connection is still connected.

This is the error that happens when it tries to reconnect with the changes:
2019-10-15 13:57:23,424:bridge:INFO:Reconnecting.
2019-10-15 13:57:23,424:bridge:ERROR:A minecraft exception occured! 'NoneType' object has no attribute 'send':
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/minecraft/networking/connection.py", line 544, in run
    self._run()
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/minecraft/networking/connection.py", line 559, in _run
    while not self.interrupt and self.connection._pop_packet():
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/minecraft/networking/connection.py", line 297, in _pop_packet
    self._write_packet(self._outgoing_packet_queue.popleft())
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/minecraft/networking/connection.py", line 310, in _write_packet
    packet.write(self.socket)
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/minecraft/networking/packets/packet.py", line 99, in write
    self._write_buffer(socket, packet_buffer, compression_threshold)
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/minecraft/networking/packets/packet.py", line 88, in _write_buffer
    VarInt.send(len(packet_buffer.get_writable()), socket)  # Packet Size
  File "/root/.local/share/virtualenvs/minecraft-discord-bridge-ODfYI37s/lib/python3.7/site-packages/minecraft/networking/types/basic.py", line 165, in send
    socket.send(out)
AttributeError: 'NoneType' object has no attribute 'send'
2019-10-15 13:57:23,425:bridge:INFO:Disconnected.
2019-10-15 13:57:23,425:bridge:INFO:Failed to join the server 3 times in a row. Exiting.
2019-10-15 13:57:23,425:bridge:INFO:Use a process supervisor if you wish to automatically restart the bridge.
2019-10-15 13:57:50,616:discord.gateway:INFO:Websocket closed with 1000 (), cannot reconnect.

This is the error when the server first disconnects everyone on the restart:

Could you please open a seperate issue for this one and provide logs with the log level set to "DEBUG"?

This is the error that happens when it tries to reconnect with the changes:

This log output looks normal, it appears that your supervisor is not restarting the service when it dies. Could you please provide me a copy of the systemd unit file you use to run the bridge?

Is it safe to post the full log with DEBUG? I do notice my bot's token is there.
Here is my chatbridge.service file. ("/DestroyMC/DiscordBridge/minecraft-discord-bridge/" is where the bot files are.)
[Unit]
Description=DestroyMC Chat Bridge
After=multi-user.target
<EMAIL_ADDRESS>
[Service]
Type=simple
WorkingDirectory=/DestroyMC/DiscordBridge/minecraft-discord-bridge/
ExecStart=/usr/bin/python3.7 -m pipenv run python -m minecraft_discord_bridge
StandardInput=tty-force
Restart=on-failure
[Install]
WantedBy=multi-user.target

Is it safe to post the full log with DEBUG? I do notice my bot's token is there.

Sorry I was unclear, I don't need the full log due to its sensitive nature. I just need a few lines before the crash, I just need to see the messages that look like Got Tablist H/F Update: header=<a bunch of json>.

Moved to #64

I've identified the root cause of the issue, it is as I expected. The bridge always exits with a return code of 0 which is defined as a successful exit in the POSIX specification. Because your systemd unit only restarts the process on-failure, it doesn't restart the bridge because its return code is successful. I will push fix to make the bridge exit with a non-successful error code if the failsafe is tripped. This successfully fixes the issue in my resting environment.

Please try running the bridge with the feature/return-codes branch and let me know if it fixes your issue.

It restarts correctly now. However, it still fails to connect 3 times. This is what triggers the service to restart now. It fails to connect from this error still:

AttributeError: 'NoneType' object has no attribute 'send'

After it fails 3 times, service restarts no problem and it connects on the first try.

I mean the bot "crashes" from my tab menu still and errors out 3 times. Then the service correctly restarts.

Perfect, that is the expected outcome at the moment. I can't really do anything about the
AttributeError: 'NoneType' object has no attribute 'send'
until this issue is resolved upstream in pyCraft.
The reconnection failsafe is meant to keep the bot alive as much as possible despite the fact that it might crash.


Custom Policy Link for Age Gating Is Not Working

Hello All,
The Age Gating Link is point to the azure ad b2c samples directory as a whole. It does not appear that this sample policy is hosted on github anymore. Please update the link.

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

ID: cdcd5bc9-a421-0d0c-d557-b437db008e9d
Version Independent ID: 204d1423-da66-363b-f0cd-7937b41b7aa6
Content: Enable age gating in Azure Active Directory B2C
Content Source: articles/active-directory-b2c/age-gating.md
Service: active-directory
Sub-service: b2c
GitHub Login: @kengaderdus
Microsoft Alias: kengaderdus

@Norrch2
Thanks for your feedback! I've assigned this issue to the author who will investigate and update as appropriate.

Hello @JamesTran-MSFT may I have an update on this?

@Norrch2
Thank you for following up on this!
From the doc commit history I see the age gating link used to be samples/tree/master/age-gating, but the new link is pointing to samples/tree/master/policies.
I'm also not able to find the repo on the Azure AD B2C community page either.
@kengaderdus  or @yoelhor, can you either of you provide any updates on this?

Hello, wanting to check in to see if there is an update to this.

Hello Again. Checking for updates. Thank you.

@kengaderdus
Can you share any updates on this?
cc: @mmacy and @CelesteDG

Good Afternoon. Checking in for another update, please.

@Norrch2
Thanks for your patience. The age gating custom policy sample is now available. Also, the document link has been updated. Please note that this GitHub issue might be closed automatically before the changes go live.


bulk iNat import

Import many Observations. For instance, users should have the option to import all their iNat Obss.
Possibly date/location limited imports
Tasks

[ ] Allow multiple listed IDs

[ ] Change form iNat observation number to numbers
[ ] Mention comma separated list
[ ] Import multiple IDs if user included multiple ids on form
[ ] Change work flow so that there's just one iNat API request (or at most one request with details). Iterate over the pages, within each page iterate over the results. - [ ] Modify new form

[ ] Add option to import all a user's Obss

[ ] Modify form

[ ] Add option to import all Obss for a date range

[ ] Modify form

[ ] Give user feedback on # of qualifying iNat Obss (those that meet checked criteria && not already imported && fungal)

iNat limits # of ids to 30 when using https://api.inaturalist.org/v1/observations/10000,10001,...

This is Erroring in MO
RestClient::UnprocessableEntity in Observations::InatImportsController#authenticate
@inat = RestClient.get("#{API_BASE}#{operation}", headers)
>> "#{API_BASE}#{operation}"
=> "https://api.inaturalist.org/v1/observations?id=&id_above=0&only_id=false&per_page=200&order=asc&order_by=id&user_login=dev189&iconic_taxa=Fungi,Protozoa"
>> headers
=> {"Authorization"=>"Bearer {\"access_token\":\"_VLnaihHahFntdN2nne_U2Clv7eJyJkpo8i-WutIdeg\",\"token_type\":\"Bearer\",\"scope\":\"write login\",\"created_at\":1722123661}"}

I've tried it in the console with the same result. Also tried it without a header. Tried it with and empty header { }.
This is working on the iNat API test page:
https://api.inaturalist.org/v1/observations?user_login=devin189&iconic_taxa=Fungi&id_above=0&per_page=200&order=asc&order_by=id&only_id=true

Are you sure headers is encoded right? I spot two different hash notations, the => and the :

thanks!  that could be it. will check tomorrow
Sent from Gmail Mobile
El El sáb, jul 27, 2024 a la(s) 17:47, andrew nimmo <
@.***> escribió:

Are you sure headers is encoded right? I spot two different hash
notations, the => and the :
—
Reply to this email directly, view it on GitHub
https://github.com/MushroomObserver/mushroom-observer/issues/2224#issuecomment-2254297371,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAALDFAWNNIBVD6YK4X32A3ZOQ5T7AVCNFSM6AAAAABKRCV6CSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJUGI4TOMZXGE
.
You are receiving this because you were assigned.Message ID:
@.***>


Fix for issue #859 - unicode rendering of deps tree

Fix issue #859 by moving utf-8 encoded strings into binaries
(see http://www.erlang.org/doc/apps/stdlib/unicode_usage.html)

@jonathn
Tested the PR #865 this is the result, all symbols now gone.
Dose not make for an easy to read listing

Closed since fixed by #867


gofmt: gofmt with go 1.17

Proposed changes
I accidentally hit format project in IDEA and well here we are
Checklist

[x] I have added tests that prove my fix is effective or that my feature works
[x] I have added any necessary documentation (if appropriate)
[x] I have updated e2e/E2E-TESTS.md (if a new command or e2e test has been added)
[x] I have run make fmt and formatted my code

@gssbzn there are multiple PRs in-flight.
To merge this, I suggest reaching out to the authors and having them apply the same formatting rules, so that they don't run into unnecessary merge issues.

To merge this, I suggest reaching out to the authors and having them apply the same formatting rules, so that they don't run into unnecessary merge issues.

Totally my bad and I should have added this to the description, go1.17 introduced //go:build as a newer way for // +build unit there should not be merge conflicts, go.1.16 will ignore it/not add it, go1.17 will translate old tags to the newer when formatting


Segmented-headers defaults to true

Adds the flag --no-segmented-headers to disable the feature.
Ignore and accept the old --segmented-headers flag.
Per https://groups.google.com/d/msg/j2objc-discuss/Db3YUD9V0TY/C4HYerpQAwAJ

passes on Travis: https://travis-ci.org/madvay/j2objc/jobs/87348237
not sure what else i should test.
ptal @kstanger

Advay, is there a way you can strip down the include file problem that prevented your using the default behavior. We may not be able to fix it (C will always have the potential for include file cycles), but it helps knowing the pattern.

I'm not having any specific problem actually.  The reason I asked about --segmented-headers being a default on the mailing list was that various open-source libraries need the option to build successfully.
If the option doesn't break anything, and for some cases it fixes things, it seems like it should be the default (even if it doesn't fix all possible include cycles).

Sorry this took so long. It's been a slow week for me.


STUFF String Function: #13

Implemented STUFF for string functions

Good work @Lilit0x, please resolve the conflicts

@AmrDeveloper , I keep trying to squash the commits, but there's still a conflict after I push from my local back here.

@Lilit0x Check Conflicts to remove related code to substring function


Adding in Typeable instances

As discussed, this addresses #52. I've left version number untouched because I prefer to update that on my own projects. Wondering if we should also do Data everywhere (I don't have a use for that, but I could imagine someone might, and I don't think it'd do any harm).

That's useful, thanks.


Deploying Bastion Developer Sku with Bicep

trying to deploy bastion dev sku using bicep
resource bastion 'Microsoft.Network/bastionHosts@2023-04-01' = {
  name: 'name'
  location: location
  sku: {
    name: 'Developer'
  }
}

but it keeps throwing up this error:
{
  "code": "BastionHostVnetIdNotProvided",
  "message": "Virtual Network Id is a mandatory field for Developer BastionHost SKU.",
  "details": []
}

so i try
resource bastion 'Microsoft.Network/bastionHosts@2023-04-01' = {
  name: '${prefix}${currentTime}'
  location: location
  sku: {
    name: 'Developer'
  }
  virtualnetwork: {
    id: vnet.id
  }

but it says:
The property "virtualNetwork" is not allowed on objects of type "Microsoft.Network/bastionHosts". Permissible properties include "asserts", "dependsOn", "properties", "tags". If this is an inaccuracy in the documentation, please report it to the Bicep Team.bicephttps://aka.ms/bicep-type-issues

@vnnyjr
Thanks for posting this. Based on that shared information we are not able to understand your query/feedback completely. Since this channel is for driving improvements towards MS Docs, could you provide the URL of the specific documentation that your feedback is applicable to? That way, we are able to make sure your feedback is addressed by the right team

@AjayBathini-MSFT
Perhaps here since it doesn't say anything about "Virtual Network Id is a mandatory field for Developer BastionHost SKU."
https://learn.microsoft.com/en-us/azure/templates/microsoft.network/bastionhosts?pivots=deployment-language-bicep

@vnnyjr
Thanks for your feedback! I've assigned this issue to the author who will investigate and update as appropriate.

Thank you for you dedication to our documentation.
Unfortunately, we have been unable to review this issue in a timely manner. We sincerely apologize for the delayed response. We will create an internal tracking work item to address this issue. For now, we are closing this issue. If you have any additional information you would like to provide, please respond to this issue with any additional details.
Please continue to provide feedback about the documentation. We appreciate your contributions to our community.
#please-close


Package registration

@JuliaRegistrator register

Registration pull request created: JuliaRegistries/General/117824
Tip: Release Notes
Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.
@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.
Tagging
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
git tag -a v0.1.0 -m "<description of version>" 37a47ba134cb07936632e6ccb515209e417ab4eb
git push origin v0.1.0

@JuliaRegistrator register


Back up ~/.zshrc on update

Backs up to ~/.oh-my-zsh/templates/zshrc-backup
Not sure if that's what we want, but it sure would have been useful 2 hours ago.

Why does updating OMZ affect your zshrc?

Thanks for the suggestion, but like @sorin-ionescu hinted at... we're not sure why this is needed. We don't modify the .zshrc ever... only during initial install when we create it (and we create a copy of your pre-existing one)


Update topologies and add IQM5q

Updates topology in all runcards to use the adjacency matrix as is required after the merge of qiboteam/qibolab#387.
Also adds the runcard and platform for IQM-5q since now the Zurich driver is on qibolab main.

The only weird thing is that you don't have all the newlines at the end of the files:

Good point, thanks. It's due to not spending time configuring my editor. I added the pre-commit config we have in the other projects to avoid such issues. In principle we could also set up the bot, but I am not sure if I can (and how) to do it.

Bot enabled, thanks.

I've uploaded here the new runcard for tii1q_b1


Object for inner schema not generated

Problem statement
I have a valid definition that generates but it seems like the inner schema object is not generated correctly.
Swagger specification
Relevant schema snippet:
"post": {
                "operationId": "invitation_invite",
                "parameters": [
                    {
                        "name": "body",
                        "in": "body",
                        "description": "Email to invite",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "uniqueItems": true,
                            "items": {
                                "type": "object",
                                "required": [
                                    "email"
                                ],
                                "properties": {
                                    "email": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    }
                ],

Steps to reproduce
When building I get the following error:
[...]/restapi/operations/invitation_invite_parameters.go:48: undefined: InvitationInviteParamsBodyItems0

duplicate of: #733

fwiw I'm actually working on a  fix for this atm

I have a few deep structure under definitions that works just fine, I've only seen this when declared directly in the operation.


Add chart of companies per nace code label_1 or outer scope

Business Analysis 🟠 Code Institute 🟠 Community Project - Pull Request 🎉🎉
Pull Request References:
- #12

PR contains:
Here the code pull the data from the database and create different lists of nace code using the nace code labels.
There are 3 labels existing in the sample data which means there are 3 levels of hierarchy. The first level has been delt with ;)
I need to do the other levels.
Note that nace code present a hierarchy, the first letter being the outer scope, and drilling down with number. At the moment we work with "J" that state for Information and Communication, but it goes from "A" to "U", more information here :fast_forward: eurostat
The code will need to be adapted if working with all the codes given by the website I share :point_up_2: (it's not the middle finger, it points up :point_up:), but this can be easily done.

[x] implement display of chart using chart.js
[x] display a chart of companies per nace code of the outer scope.
[x] need to add charts of inner groupe/scope

Breaking changes
'None'
Screenshots/Gifs/Media

@Tom-Nagy Can we close this PR without merging based on your comment reference in the Nace Labels 3 PR? If so, let us know here and we will close without merging. 🤜 Hope you had a good weekend.

Closing to suit additional PR in place as per comment in Slack group:


feat: introduce language detection function for text partitioning function

Summary
Uses langdetect to detect the languages present in the input document.
Details

Converts all language codes (whether user inputted or detected using langdetect) to a standard ISO 639-3 code.

Test
You can test the detect_languages function individually by importing the function and inputting a text sample and optionally a language:
text = "My lubimy mleko i chleb."
doc_langs = detect_languages(text)
print(doc_langs)

-> ['ces', 'pol', 'slk']

Duplicated in #1453 due to rebasing issues in this PR.


Fix RSpec color configuration.

I guess this is a change in a newer RSpec version.
And the docs for the next RSpec version (3.6) even show the color option as deprecated.

Ah, you're right, sorry about that, thanks for checking. I forgot to run bundle exec rake test so I accidentally ran the tests with RSpec 3.4.