Publish documentation on push to develop branch

Changes

add workflow to publish documentation on push to develop branch
minor changes:

make sure bash is used in docset Makefile (not needed here, but calling the Makefile in GitHub actions yielded errors, because /bin/sh was used as default shell)
bump version of plantuml-markdown package

Notes

The PlantUML version that can be installed with Ubuntu is outdated, so we needed to install a more recent version. Otherwise, warnings occur during building (no error), and the UML diagrams are broken:

The concurrency setting make sure that no two jobs of the workflow run concurrently. Jobs are waiting until previous jobs complete:

Coverage remained the same at 100.0% when pulling 77b4f6157e3e680b525d03516169a81a330f2ee8 on documentation_update into 2ac7d023d424fffa31f2150103b7851c998061f4 on develop.

make sure bash is used in docset Makefile (not needed here, but calling the Makefile in GitHub actions yielded errors, because /bin/sh was used as default shell)

FYI, /bin/sh is symlinked to dash on Ubuntu.

FYI, /bin/sh is symlinked to dash on Ubuntu.

Alright. It still did not work. I was trying to have an up-to-date docset somewhere, but the artifacts of GitHub are not too useful here.


password flow id token

it seems logout use id token to redirect to an url but id token is store only with implicit flow. Is there any reason to that ?

ok I see it's not angular redirection but redirection to oauth website. so it's mean it's expected.


Removed monitor at stonith-sdb as its not needed.

Guess it comes fromvery old doc somewhere. This removes some calculation of useless transitions cluster internally

@petersatsuse : Thanks for your contribution! The author, @saghorpa, has been notified to review your proposed change.

@saghorpa - Would you add a hash comment to show what action to take on this PR:

Merge the PR: #sign-off
Close the PR: #please-close
PR in progress: #hold-off

Thanks

#sign-off


Making bin file executable and fixing autoload path

So
bin/mgf /path/to/files/

Works

Thanks Steve!


no-identical-title and template strings

I'm just tying out a test like this:
;[
  ['BIT_STRING', BIT_STRING],
  ['CHARACTER_STRING', CHARACTER_STRING],
  ['OCTET_STRING', OCTET_STRING]
].forEach(([title, type]) => {
  test(`decodes ${title}`, t => {
    const expected = new Buffer('foo')
    t.same(decode(type, 3, expected, 0), expected)
  })
})

;[
  ['ENUMERATED', ENUMERATED],
  ['INTEGER', INTEGER]
].forEach(([title, type]) => {
  test(`decodes ${title}`, t => {
    t.is(decode(type, 1, new Buffer([42]), 0), 42)
    const expected = new Buffer(7)
    t.same(decode(type, 7, expected, 0), expected)
  })
})

The no-identical-title complains about a duplicate title in decodes ${title}. It should probably recognize the title is a template string and is most likely not a duplicate.

Same if I try 'decodes ' + title actually :wink:

Same if I try 'decodes ' + title actually

Already covered: https://github.com/sindresorhus/eslint-plugin-ava/blob/master/test/no-identical-title.js#L50

It should probably recognize the title is a template string and is most likely not a duplicate.

Yup, it should work as 'decodes ' + title.

@sindresorhus what do you mean by covered?

Already covered: https://github.com/sindresorhus/eslint-plugin-ava/blob/master/test/no-identical-title.js#L50

Except @novemberborn is suggesting that test is wrong.That should be valid. Computed titles should be accepted by the linter. (Unless we want to try to do static analysis to determine the computed values, to which I say... :-1:).
If we want to guard against computed titles, that should be done in AVA at runtime (just because it is way easier to do so).

Oops, I somehow thought it was in the valid section.

That should be valid. Computed titles should be accepted by the linter.

:+1:

Unless we want to try to do static analysis to determine the computed values

:-1:


[Publishing] [Java] Blog for Cassandra to Cloud Storage (GCS)

Publish a blog on exporting data from Cassandra to Cloud Storage (GCS) using Dataproc Serverless (Java)

Blog submitted for review https://medium.com/p/5358ef498f6b/edit

blog published , to add link in readme file


Breakpoint decorations sometimes don't disappear

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

VS Code Version: 1.63.0
OS Version: Windows 11

Steps to Reproduce:

Open a file where breakpoints can be set
Hover around the edge of the editor, in and out of the margin until the breakpoint stays even though the mouse is outside of the editor (see GIF below).

This is important to me because I am using margin decorations in Monaco and running into the same issue there.
Internally the onMouseLeave event isn't triggered, so the decorations aren't removed. It seems to be specific to decorations in the glyph margin, as without these (e.g. line decorations) it doesn't seem to reproduce.

I can reproduce when moving the mouse quickly. I find it interesting that also the scrollbars suffer form the same problem (the scrollbars listen independently to mouseout). I've also tried locally to replace mouseout with the somewhat more modern mouseleave and I could still reproduce. Basically the browser simply forgets soemtiems to send us a mouseleave or a mouseout event:


Fix deadlock in CachedValues by using more narrow locking

Problem
In our project, we are hitting an interesting deadlock scenario with Swift Dependencies. It is quite convoluted, but it roughly works like this.

Object A acquires the CachedValues.lock and runs its liveValue initializer
Inside this initializer, we access additional dependencies while creating some subscriptions
The dependencies in the subscriptions are waiting for the lock and exhaust a thread pool
The initializer for Object A cannot complete until the subscriptions are ready, so the entire project deadlocks

This is an avoidable issue without any framework changes. We could:

Avoid using @Dependency inside the thread pool
Make the subscriptions asynchronously after initialization
Try to avoid having any slow liveValue initializers

Proposed Solution
However, we'd be a bit worried about this deadlock pattern (or other priority inversion) manifesting in other ways. The issue is fixed if we make the lock for CachedValues.value use a more narrow scoping as shown in this PR.
Let me know if you have any questions!
Additional Note on CachedValues.cache
Given that CachedValues.cache should be accessed via a lock I'm not sure it should be exposed publicly since the lock is private. The deprecated reset method that accesses it could be moved to CachedValues itself, and the test that sets _current.cachedValues.cached = [:] could use the reset method instead. This would require using @testable import Dependencies though and the usage seems deprecated anyway. Let me know if you'd like these changes made though.

Hi @jtbergman, thanks for bringing this up and for investigating changes to the library! Stephen and I will discuss it soon, but one thing that would help a lot is if you could cook up a test case that deadlocks without your changes. Would it be possible to push that to this PR?

@mbrandonw Thanks for the quick response. I'll see what I can do and try to push one later today 🙏

@jtbergman Thanks!
Also, I went ahead and ran tests on this PR and it does seem like the change has caused one failure:
https://github.com/pointfreeco/swift-dependencies/blob/0ef772da095101110ad23f9720d40faed8d28cb6/Tests/DependenciesTests/DependencyValuesTests.swift#L654
This test fires up 10 tasks in a group to access an @Dependency and confirms that only one single dependency is init'd. With the changes in this PR that test failures because now code can interleave in the cache checks, causing two threads to see that no value exists in the cache and thus creates two dependencies. I believe that this test does capture the behavior we want from @Dependency and so we would want this test to pass, but we're open to discussing more about this.
I will say that the less you do in a dependency initializer, the better overall. Many people have run into issues trying to force a dependency to be created on the correct thread, or initialized in a specific manner, and it's always ended poorly. It's just the cost of having a very simple syntax like @Dependency(\.whatever) that can be used anywhere.

Hi @mbrandonw,
Thanks for the response! I initially misread the code, and thought that accessing the dependency before it's in the cache would cause a runtime warning (which I thought might be preferable to deadlock), but now I see that it causes the dependency value to be initialized multiple times.
I did, however, push some changes that show an example of the deadlock. If you run testNoDeadlock on aa1c32f you will see it fails and then passes on bf5d6d3. The example is super contrived, but the way it appeared in our codebase was more natural – essentially subscribing to a few Publishers with @Dependency inside them.
That being said, I agree that the failing test has the correct behavior, so the fix in bf5d6d3 should not land. One idea I had was that the thread should (1) create the dependency if it did not exist, (2) wait for the lock if the dependency is initializing, and (3) return the value if it is loaded. I thought a condition variable (via NSCondition) might be a good way to implement this.
I tried that approach and pushed it here. It fixes the currently broken test and actually works quite well, but it seems to cause issues in the tests named testAsyncStream.... This is unsurprising because I remember one of the Swift Concurrency WWDC talks called out:

It is unsafe to use thread-local storage, semaphores, conditions variables, and pthread_rw_lock with async/await. This is because these primitives have hidden dependencies that Swift Concurrency relies on for task scheduling.

In theory, this could probably be fixed by implementing some sort of spin lock mechanism to replace the condition variable. But given the issues that could introduce, plus the difficulty of even creating a deadlocking example for this issue, I think it's probably better to just leave the code in its current state.
Happy to close this, and we'll just fix in our codebase, but I appreciate the feedback 😄


Removed canceled events

This PR adds an unlisted flag to events. This is so we can hide events that have been canceled.

LGTM.
Should the pages for these events also have content updates mentioning that the event is now canceled, ideally with a link to the actual event page with explanation for the cancellation?

I'm okay with just pulling these without explanation.  It avoids 'burying' the events that are still planned with events that don't exist anymore.


Extension packages

Different people have the ability of making their extension packages, That package includes bunch of extension they use or useful for them and other people can rate that package this will provide help to devlopers to get the required extensions without going to the pain of installing each extension individually and turning of an on specific extension for specific projects.
Here's an idea like we must have extension packages like for example we want a project in django [python]
there should be only one extension package that we can install and all the features like DTL,coloring of text, and other features are activated . There should be a button that can enable and disable that extension for specific project .Like next i want to make a project in flutter i can disable that extension package on a single click and install enable flutter extension package and activate it in just one click.

See https://code.visualstudio.com/blogs/2017/03/07/extension-pack-roundup

/duplicate


Progress on Scrubbing (Issue #47)

Presidio is not capable for Scrubbing Credit-Card numbers and Social Security Numbers (ssn), which is strange (it should do it). See Test file and the attached test session text file for reference.
Besides that, it is working for the below fields:

Email
Phone Number
Date of Birth
Address
Driving Licence
Passport
National ID
Routing Number
Bank Account Number

Excellent work @KrishPatel13 !
It looks like the scrubbing is working, and the test needs to be modified:
assert '************...n **********.' == "****'s email...n **/**/****."

My next step will be Implementing scrubbing for images

On more research, I figured out that, Presidio indeed scrubs Credit Card Numbers.
The reason it was not scrubbing the test case "my credit card number is 1234-1234-1234" is that, it is NOT a VALID Credit-card number.
Explanation: Looking at the codebase for presidio repo of Microsoft. Their code also check for IIN (Issuer Identification Numbers),
Examples of issuer identification numbers include the following: (Reference)

American Express: 34, 37
Discover Card: 6011, 622126 to 622925, 624000 to 626999, 628200 to 628899, 64, 65
Mastercard: 2221 to 2720, 51 to 55
Visa: 4

This is reason why the number in the test case 1234-1234-1234-1234 was not scrubbing.
On further testing, it successfully scurbs  the Visa Credit card numbers, that are, starting from 4.

Re-review requested for current Text based scrubbing module: scrub.py
Next-Steps:
Moving on with Image Scrubbing.

Re-review requested

@abrichr
https://github.com/MLDSAI/OpenAdapt/issues/47#issuecomment-1544041785

I am getting this error. On line 23 of test_bash_image.sh
My goal is to delete/remove the scrubbed_image.png file after the test.

@abrichr  Rereview requested

[ ] Step 1: Scrub Text
[ ] Step 2: Scrub Image Data
[ ] Step 3: write_input_event is trickier because a single input event may not contain PII (e.g. the letter "b"), but a sequence of them will (e.g. the sequence "bob smith")
InputEvents are merged in get_consecutive_keyboard_events. This logic is nontrivial and currently incomplete, and may run several times before everything is merged.

The merging process is completed after the process loop is completed in get_events. This is probably the better place to implement scrubbing of InputEvents.

[ ] Step 4: Edit record.py and call the appropriate function for scrubbing at different places. As listed down in here.

@abrichr
Should I call the scrubbing module before Only Visualization or before the replay as well ?
Alternatively, should I just save the scrubbed recording/events into the db. No matter. Which approach seems better ?

@abrichr
To scrub the text from the Window Event, I would need the text from it. I saw the Window Event class. But no where it has a field of text. how can I access it ?
Will this be available once this issue https://github.com/MLDSAI/OpenAdapt/issues/75 will be resolved! ? If yes, how would name the the new text field for the Window Event ? If you could tell me then, I can continue assuming I have the access to that field so that I can call scrub function aptly ? How does this sound ?

@abrichr
Since my record was not still working, I asked Aaron to run my code on his MacOS
The changes made before that, before visualization, I just called the scrub_image function and then displayed each screen shot.
Here is what he got! Any thoughts?
https://we.tl/t-K1e6bLjoLc[https://we.tl/t-K1e6bLjoLc](url)

@abrichr
On further inspection, I do thing we should ignore URL as well because, wherever it detect a dot '.' It scrubs that. What do you think ?
SCRUB_IGNORE_ENTITIES = [
    # 'US_PASSPORT',
    # 'US_DRIVER_LICENSE',
    # 'CRYPTO',
    # 'UK_NHS',
    # 'PERSON',
    # 'CREDIT_CARD',
    # 'US_BANK_NUMBER',
    # 'PHONE_NUMBER',
    # 'US_ITIN',
    # 'AU_ABN',
    "DATE_TIME",
    # 'NRP',
    # 'SG_NRIC_FIN',
    # 'AU_ACN',
    # 'IP_ADDRESS',
    # 'EMAIL_ADDRESS',
    # 'URL',
    # 'IBAN_CODE',
    # 'AU_TFN',
    # 'LOCATION',
    # 'AU_MEDICARE',
    # 'US_SSN',
    # 'MEDICAL_LICENSE'
]

Eg. See Before and After Scrubbing Images below
After:

Before:

@abrichr
Ready for Re-View.

Some Notes from the Sprint Retrospective Meeting:

Customized URL detection: Though we are NOT scrubbing all the URLs right now. But we want to scrub some specific URLs.
Scrubb the action events as well. The Key shown on the Screen shots eg. <M+y+ + c+r+d+i+t+ +c+a+r+d+ n+u+m+b+e+r+ +i+s+ +4+5+0+1+-+2+3+4+5+-+9+8+7+0+.>
So we would like it to scrub to something like:
<M+y+ + c+r+d+i+t+ +c+a+r+d+ n+u+m+b+e+r+ +i+s+ +*+*+*+*+*+*+*+*+*+*+*+*+*+*+*>

@abrichr Re-review is requested!
Thank you for your patience!

Thank you @KrishPatel13 ! Can you please merge the latest from main?

https://github.com/microsoft/presidio/issues/1079

microsoft/presidio#1079
I was not able to record so I finally had to investigate deep and found that after adding simplest code of Presidio of initializing the engines it gave the errors. So I had to raise the issue on their GitHub page.

Resolved:
Issue Description:
If I pressed Ctrl + C after 3 "starting". It gave errors. I even did some typing and then pressed Ctrl + C, got the error.
BUT,
when I waited for atleast 10-15sec idle after the 3 starting and then press ctrl + C, it recorded successfully.

@abrichr We can close this WITHOUT merging once the below is merged! :)
https://github.com/MLDSAI/OpenAdapt/pull/211
Ready for review! :)

Looks great @KrishPatel13 ! Can you please look into modifying configure_logging to scrub data before it is logged? If it's a lot of work we can leave it as a TODO for now.

Closing in favor of https://github.com/MLDSAI/OpenAdapt/pull/211


Support for starfiles

Clint Potter from CZII made an early request for ability to export starfiles

completed in #33


Add simplified Chinese to Season Affixes.

Add simplified Chinese to Season Affixes.

Hey! I'm happy that people are translating my mods, but unfortunatalely I can't accept such a change. Please read the details in the Translations section in my README: https://github.com/Shockah/Stardew-Valley-Mods#translations

I really hope I didn't discourage you, though, and that you will release the translation on Nexus!


docker-enter/nsenter - no such file or directory

I log into container "docker exec it xxxx bash"  and used command
But only get msg no such file or directory. What i doing wrong ??

I don't know! I would suggest that you ask on StackOverflow, or on the docker-user mailing list.
(Maybe docker exec -it xxxxx sh, but what do I know...)
Thank you!


Fix databrowser.html

Work in progress...

Fixes #30

@Vinnl where did databrowser.html go? Even if it's no longer in dist/, shouldn't it live on in an examples folder or something?

@michielbdejong The databrowser.html that was actually used resided in node-solid-server (which is why it worked despite this error). That has now been updated to load the HTML from the dist directory in mashlib, but it's generated at build time rather than being checked in. (The build will also make sure that it always refers to the correct Javascript and CSS file, and not load it from GitHub - which I also don't imagine was a desirable situation, privacy-wise.)


Joystick Addition

joystick module to return x,y coordinates based on joystick position

Cool, thank you so much!


Release tracking

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
<EMAIL_ADDRESS>Minor Changes

#634 598a2c5d Thanks @joshfarrant! - ⚠ This update contains a breaking change.
Refactored VideoPlayer component to make it more modular and customisable.

The showTitle prop has been renamed to visuallyHiddenTitle and inverted.

This prop hides the title visually, but keeps it accessible to screen readers.
Where you previously passed showTitle={false}, you should now pass visuallyHiddenTitle={true}.

The branding prop has been renamed to showBranding.
Individual video controls can be optionally hidden by setting any of the showPlayPauseButton, showSeekControl, showCCButton, showMuteButton, showVolumeControl, and showFullScreenButton props to false.
A custom play icon can be provided using the playIcon prop.

Patch Changes

#623 8727997c Thanks @rezrah! - Added fullWidth prop to Hero.Heading to remove default max-width constraint, and enabling easier placement using a parent Grid.

#623 8727997c Thanks @rezrah! - Added RiverStoryScroll component, an experimental layout component that wraps around existing River patterns.
<RiverStoryScroll>
  <River>
    <River.Visual />
    <River.Content />
  </River>
  <River>
    <River.Visual />
    <River.Content />
  </River>
  <River>
    <River.Visual />
    <River.Content />
  </River>
</RiverStoryScroll>

:link: See Storybook for more examples.

#647 39e00cfa Thanks @joshfarrant! - Added isExternal prop to SubdomainNavBar.Link component. When isExternal is true, a link-external icon is displayed next to the link.

#644 b3f1f364 Thanks @danielguillan! - Improve the layout responsiveness of SubdomainNavBar

#639 ebf92224 Thanks @stamat! - Fix cut AnchorNav action button outline due the introduced overflow auto

#646 81e983e6 Thanks @rezrah! - Adds responsive toggling of feature lists in the PricingOptions component.
PricingOptions.FeatureList can now be collapsed at regular and wide viewports.
<PricingOptions>
  <PricingOptions.Item>
    <PricingOptions.FeatureList expanded={{narrow: true, regular: true, wide: true}} />
  </PricingOptions.Item>
</PricingOptions>

#623 8727997c Thanks @rezrah! - Added --brand-CTABanner-bgColor token to CTABanner for easier customisation of the banners background color, when enabled.

<EMAIL_ADDRESS>Patch Changes

#623 8727997c Thanks @rezrah! - Added --brand-CTABanner-bgColor token to CTABanner for easier customisation of the banners background color, when enabled.

<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>

Smoke test results
- RiverStoryScroll 🟢
Works as-expected. Example of plug-and-play support on the Enterprise page
https://github.com/user-attachments/assets/c923cb77-a7ce-4b37-966d-12dd2bb4aba7
- Pricing options 🟢
Works as-expected in dotcom and githubuniverse.com. The latter required rolling back a lot of local workarounds to achieve a similar effect:
https://github.com/user-attachments/assets/be0c20a8-b2ff-4ceb-a952-98487592c618
- SubdomainNavBar isExternal prop 🟢
Works as-expected in Universe, but the site employs a number of workarounds that aren't compatible with this release. As these are user-side, and given Storybook is rendering correctly this is not a blocker for the release.. cc. @simurai

- VideoPlayer refactor 🟡
Works as expected, but noted a few minor issues that can be rectified in a future patch update

Focus outline issue:

Working on Copilot page:

- AnchorNav overflow update on narrow viewports 🟢
Works as expected, focus ring no longer obstructed

Release testing status: Ready to release 🟢


Accent characters are not rendering correctly in Word 2007

Hi,
I am trying to export some HTML (using IE11) and currently testing with Word 2007. I am seeing accent characters like  "é" displaying as "Ã©" in the exported document. If I copy/paste the exact text on my HTML page into the same document, it renders fine.
Any help would be appreciated.
Thanks,
Steven

@ferrx this can be a problem with encoding set in consumer (i.e. Word 2007 your try to open file in).
Can you attached a file with described issue?
The generated document content is encoded in utf8, so should generally work.
I tried putting mentioned letter ("é") on our demo page. Generated file has proper character (checked on Word 2010 though).

Thanks- I assumed it may be an issue with Word 2007. I will test it in another version (though my users currently require 2007 support). I am wondering if there is some setting that I could flip in Word 2007 to have this import correctly.. that could be a fix that I can offer my users temporarily.

You can check out this article.

I had the same thing with Word 2016. Turns out you need <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">` in your html.

@masterpoi Thank you!! This fixed it for me.

I had this problem too.  Adding the meta tag suggested by @masterpoi worked correctly.
If this isn't an option for whatever reason, you can also replace the offending characters with html entities which seem to work "out-of-the-box".


Heart Misalignment, need a Doctor.

The heart looks to be missing some spacing, it's too close to by.

Oof! Wonder why it renders so different for you than me. Either way, thanks for reporting! Will replace that with an SVG soon

It's a very complicated and known problem with certain emojis. You can read some threads about that for iTerm.
Glad I could help. Using MacOS.

Interesting, good to know. For the chrome extension I just use an SVG so will stick to that instead of emojis moving forward!

A heart is always a bit to the left (to the right for the audience)


Create LICENSE

Codecov Report

Merging #37 (9c9e3f0) into main (19a2d92) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #37   +/-   ##
=======================================
  Coverage   69.93%   69.93%
=======================================
  Files          29       29
  Lines         602      602
  Branches       70       70
=======================================
  Hits          421      421
  Misses        181      181

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 19a2d92...9c9e3f0. Read the comment docs.


Support project directories with spaces

Fixes #869
Aside: https://matklad.github.io/2022/10/24/actions-permissions.html

Thanks Ricky.
CI is failing because we have secrets so forked repos such as yours cannot access them. I'll run your pr locally and merge if we're good.

Eugh, I've just seen the rockstars have congregated in the issue. I'll take a read to fully understand the issue instead of winging it.

Let's go the full anthrotype route and use shlex.

Passes locally for me so merging.


-Wextra-semi

This is part 2 of if the following changes regarding the -Wextra-semi (semi = semicolon) warning of clang can be done throughout the repository. https://github.com/InsightSoftwareConsortium/ITK/pull/4679
COMP: Remove ; from itkBooleanMacro
COMP: Remove ; from other itk macros
COMP: Updated itkLegacyMacro Definition. We decided to change the definition of itkLegacyMacro to not have two ; if the if defined(ITK_LEGACY_REMOVE) branch is hit.
COMP: Remove ITK_ASSOCIATE ; or struct;
Should we remove the semicolon from the struct or from ITK_ASSOCIATE?
COMP: Remove ; to function cases
COMP: Remove cases with ; to override cases
COMP: Remove ; IPL cases

Closing.  I think this work is superceeded with updates made in the master branch that elminiates the need to remove the ";" from macros.

Some of the commits here are still good, but we'll make a new PR.


@typescript-eslint/prefer-readonly-parameter-types

https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md
I like the concept but I'm not sure about the checkParameterProperties option, because I rarely write any classes.

Woha 😮 it's so cool what lining we can do when we have the full power of the type system!
Although, I have to say, I think that this one might just be too strict. It's really enforcing a particular style of programming, one that I personally use most of the time, but still.
I was actually thinking about the other day, that it would be nice if people added readonly to every React prop since in practice the components never modify them. Right now if you try to pass a readonly array as a prop to a React component that doesn't specifically declare it as readonly the compiler won't let you...

Hmm, another example where I think this will be quite annoying, you won't be able to create this function:
// Element is not a readonly type
function getElementText (el: Element) {
  return el.textContent
}

getElementText(document.querySelector('.foo'))

Why would that function fail linting, please?
On Thu, 5 Mar 2020, 22:24 Linus Unnebäck<EMAIL_ADDRESS>wrote:

Hmm, another example where I think this will be quite annoying, you won't
be able to create this function:
// Element is not a readonly typefunction getElementText (el: Element) {
return el.textContent
}
getElementText(document.querySelector('.foo'))
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/standard/eslint-config-standard-with-typescript/issues/244?email_source=notifications&email_token=AAE3FR2BHX4Z4N7RMH7NQZDRF673ZA5CNFSM4LCL2CGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEN5V2SY#issuecomment-595287371,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAE3FR7VORYF4ATDWCOUY3LRF673ZANCNFSM4LCL2CGA
.

Element has properties which are not readonly, which means that my function could modify the element. (e.g. by modifying .textContent instead of just retrieving it)

In that case, while this is in interesting rule, it is not suitable for an entire code base. Perhaps only for some specific modules on some architecture paradigms.


[WIP] Clear environment variables for docker

dealing with #609 and the issue based on #611.
I think CommandExecutor interface should be modified to have digdag host environment variables and digdag workflow variables separately.

Sorry for very late response, but a file conflict. If you continue it please fix it.
In addition docker related functionality has been changed, we should rethink this PR is required or not in current version.

Close because no progress for long time.


php version needed for this lib to work ?

what is the php version needed for this lib to work ? thank you

worked well on 5.6. Maybe will work on 5.4

Thank you sir. :)


intelisense support stopped

Issue Type: Bug
From 2 days vs code has stopped working proeprly . No intellisense support for Angular , typescript, and HTML side. Every time it gives an error host provider stopped unexpectadaly
VS Code version: Code - Insiders 1.45.0-insider (4f05de82a75569601bc2dc894023383b4ce1c2c0, 2020-04-13T17:53:50.995Z)
OS version: Windows_NT x64 10.0.18363

System Info

Item
Value

CPUs
Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz (4 x 3600)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: disabled_offprotected_video_decode: enabledrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledviz_display_compositor: enabled_onviz_hit_test_surface_layer: disabled_off_okwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
15.87GB (2.61GB free)

Process Argv
--folder-uri file:///d%3A/Torakami/Projects/idea-expander/ideaexpender-web

Screen Reader
no

VM
0%

Extensions: none

@Nileshdcool Can you ckeck if it's this: https://github.com/microsoft/vscode/issues/94858

This is a duplicate. Unfortunately, I don't recall the exact issue number nor its title :flushed: Anyways, searching for issues with the same labels will likely help you :point_right:
https://github.com/microsoft/vscode/issues?utf8=✓&q=is%3Aopen+label%3Aneeds more info


chore: tokio-multi-thread-flavor

Why

use the multi-thread flavor of tokio

What

Change most bins to use the multi thread flavor

Checklist

[x] I have made corresponding changes to the tests
[x] I have made corresponding changes to the documentation
[x] I have run the app using my feature and ensured that no functionality is broken

doesnt the tokio::main macro use multi thread by default?

The docs say to just use tokio::main for multi thread runtime: https://docs.rs/tokio/latest/tokio/attr.main.html#using-the-multi-thread-
runtime


refactor(AlgebraicGeometry): Use Scheme.Hom.app as simp normal form

!bench

!bench

Thanks!
bors merge


Compatibility for Odoo 9.0

Hey @lukebranch,
Hopefully this what you meant! I've just double-checked, and everything is working well under Odoo v9. I also changed the folder structure slightly, I think having __opererp__ and __init__ in the root folder makes the module much easier to handle for both developers and end-users.
Let me know what you think!

@MGinshe ,
Thanks! I'll pull and review it now and get back to you with my comments.

Hey @lukebranch,
I was just wondering where you're at with the PR?

@MGinshe ,
Sorry, I still have not yet had the chance to review it. I'm planning to review and merge on Sunday (Hong Kong Time) if I don't discover any issues.

@MGinshe ,
I've taken a look and it all seems to be fine. I have only one comment at the moment after a quick review, there seem to be some typos here:

these should be 'multi' not 'mutli'. If you get the chance it would be great if you could update the README.md file for the 9.0 branch as well (clone instructions, etc.).
Once i've heard back from you i'll merge. Thanks for the PR!

@MGinshe ,
I'll merge this for now and we can make improvements later, thanks for the PR!


Attaching My custom Frame Element to the Navigation Service.

Hi, I've been working with T10 v1.1.12 and I had a quick fix solution to doing the subject. I shifted to T10 v1.1.13 and the issue I am facing is that the navigation is no longer happening from my Frame Control. How do I fix it? My code:
In the app.xaml.cs
  `
   //I set it to "this" in the constructor
   public static App Instance;

   public override UIElement CreateRootElement(IActivatedEventArgs e)
   {
        var service = NavigationServiceFactory(BackButton.Attach, ExistingContent.Exclude);
        return new ModalDialog
        {
            DisableBackButtonWhenModal = true,
            Content = new Views.BaseViews.Shell(service),
            ModalContent = new Views.Busy(),
        };
    }

`
    public override async Task OnStartAsync(StartKind startKind, IActivatedEventArgs args)
    {
        var initializer = new SDKInitializer();
        initializer.InitializeSDK(new APIKeysModel(), PluggedIntoPlatform.UniversalWindows);

        await NavigationService.NavigateAsync(typeof(Views.BaseViews.ViewCore));
    }

    /// <summary>
    /// My Hacky way of setting the Frame Componenet Control attached to the Navigation Service.
    /// </summary>
    /// <param name="newNavigationFrame"></param>
    /// <returns></returns>
    public UIElement SetFrameElement(Windows.UI.Xaml.Controls.Frame newNavigationFrame)
    {
        var service = NavigationServiceFactory(BackButton.Attach, ExistingContent.Exclude, newNavigationFrame);
        return new ModalDialog
        {
            DisableBackButtonWhenModal = true,
            Content = new Views.BaseViews.Shell(service),
            ModalContent = new Views.Busy(),
        };
    }`

and on shell Loaded I just call  App.Instance.SetFrameElement(AppRootFrame); . I am using the Hamburger Template with T10 v1.1.13 now. It used to surprisingly work before I upgraded to the v1.1.13.
Can someone please guide me as to how can I do it?

As an aside, do you like the Modal Dialog as the root?

I am not sure how would the modal dialog help, I'll share what I am trying to do,
I have a HomeView where I put down a map control and over the map control I put a Frame Control (with null background for the user tap to pass to the Map). Now all my subsequent page navigations I want to take place over the Frame Control and not the main Modal Dialog over which the T10 Navigation Service works (such that, at all times, the Map is always there in the background). Now what I want to do is use the navigation service in a way that when I do NavigationService.Navigate, it navigates over the Frame control on the HomeView instead of the Root Modal Dialog.
Keeping the issue aside, I do like the Modal Dialog as the root especially with the flexibility it provides including the overlay extensibilities (like the busy screen) and the best part is it does contain the current  Frame in it so I have accessibility to the frame as well. The only drawback (almost negligible weightage) is that when I was trying to create a UWP library project (leveraging T10 as well) and yet wanting to be able to support the projects that do not use T10, I had to do an additional check if the currentWindow.Content was a ModalDialog or a Frame and if it was a Modal Dialog then go to the ModalDialog.Content. But then it's too small as compared it to the possibilities that Modal Dialog Offers. Bottom Line: I love the Modal Dialog


inifinite loop not expected trying to count reloads

Describe the bug
I was trying to get an indicator of how many times the main function was evaluated, and I ran into the app_runner.run limit of 20, expecting only a single call.
I see now how hyperdiv is looking for changes and the "state.x += 1" is always producing one. I guess you could special case a "only state changes" but of course that would not be helpful.
Perhaps this is something that should be documented? I understand I'm doing something that is not helpful (except for maybe screen savers).
I expect I would run into the same issue with "state.x = time()" or any random source.
To Reproduce
Run this
import hyperdiv as hd

def main():
    state = hd.state(x=0)
    state.x += 1
    hd.text(f"{state.x}")

hd.run(main)

Context
Trying to learn about hyperdiv, came here from hackernews reading about the http braid extension, and having played with marimo.io for a similar use case I thought I'd checkout hyperdiv :) Seems really cool so far, just wanted to report this.

Hi. Yes this is expected behavior. It should probably be documented more explicitly. It is hinted at here: https://docs.hyperdiv.io/guide/state#change-detection

Hyperdiv re-runs the app when a prop's value is mutated to a different value.

In this case the app is mutated to a new value every time and re-runs indefinitely so Hyperdiv stops what would otherwise be an infinite loop.
You could do a hacky/for fun thing and use a global Python variable to count runs.
runs = 0

def main():
    global runs

    runs += 1

    s = hd.state(count=0)
    if hd.button("Click!").clicked:
        s.count += 1

    hd.text(f"Runs: {runs}")

hd.run(main)

This counts runs across all connections.
You can also print/log stuff in the main function, of course.


added db migration files for changelog item

Please review and merge

lgtm, thanks @zikolach !
putting this on hold to make sure that we integrate the flyway-improvements at the same time as this PR

closing from #46


translate so slow, a batch composed of 64 instances will cost 13s+ to translate?

I found that beam_decode_step will cost 8s+, it's the most time consuming step. Is there any place to optimize?

I meet the same problem, the translation is very slow.

Hello @BinWone and @huangnengCSU Thanks for pointing out!
Please take a look on the newest code.
Although in the new version, the code only support translating sentence by sentences, I make it more concise and avoid using for loop as possible as i can.
Hope it helps. Thanks.


[ENH] Distance module cleanup

Describe the issue
The distance module has now got quite a lot of distances. Having all the distances as a flat directory makes it quite hard to manage and navigate.
Suggest a potential alternative/fix
We should split the distance module into sub directories based on the distances type. To begin I think we should have a directory for 'elastic' distances and the rest can be at the root level.
In addition while doing this I want to clean up the utility functions in _distance.py and organise the tests based on this new structure.
Additional context
No response

finished by #2178


resolved link broken

@ashiscs thanks. I think there's some confusion as to what a 404 error and a custom 404 page is. Read this article - https://support.google.com/webmasters/answer/93641?hl=en (or search for others) to better understand why we have this custom 404 page and we wouldn't want to change it's title. I think that including links to prominent resources can be helpful and that we may want to include some in our current 404, so there may be something to do here, but we wouldn't want to holistically change our 404 page into one that assumes that people were looking for the installation doc as they may have been looking for any number of other pages.

@ashiscs you may want to tackle this issue instead - #345

@ashiscs, will you confer with @gunjanmimo in terms of whether to close this PR? I think he was able to knock out this issue.

Yes sir,this issue is fixed.


Update icons to proper brand colors

Snapchat isn't correct but that requires a black stroke around the ghost to be accurate

Thanks for these. I've manually added most of them (in upper-case).
It looks like some brands have multiple style guides - so there's not always a definitive answer.
Really appreciate you taking the time to contribute to this. The beer's on me :-)

Nice, although I recommend updating Reddit to orange, which is their primary color:
https://about.reddit.com/
(see their logo, etc)

Also, for the "Phone" icon, it seems to be modeling something similar to the iPhone call icon, so I picked Apple's official green color for their call button
https://developer.apple.com/ios/human-interface-guidelines/visual-design/color/
It's not exactly the same icon in iOS though so take it or leave it. The current green just seems quite garish.

Good shout - thanks!


Add restaurant badges

added in https://github.com/inttter/md-badges/commit/9d3b9a71a51a82a077afa8548732520ee3450672


Null pointer exception when accessing external url pdfs

Hi i am trying to access some random url pdfs ... now i see i cannot dot this...
Maybe returning exception for example:
only file:/// links are allowed

which os? what do you mean with random urls pdfs?


Implement parquet page-level skipping with column index, using min/ma…

…x stats
Signed-off-by: yangjiang<EMAIL_ADDRESS>Which issue does this PR close?

Related #847.
Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

I run the tpch-q1  modify the filter  ">=" to  "<=" for skipping more pages
yangjiang@LM-SHC-15009782 datafusion-cli % cargo run --release --bin datafusion-cli
    Finished release [optimized] target(s) in 1.14s
     Running `target/release/datafusion-cli`
DataFusion CLI v13.0.0
❯ create external table lineitem stored as parquet location '/Users/yangjiang/test-data/1g_tpch_pageIndex/lineitem_order';
0 rows in set. Query took 0.004 seconds.
❯ select
    l_returnflag,
    l_linestatus,
    sum(l_quantity) as sum_qty,
    sum(l_extendedprice) as sum_base_price,
    sum(l_extendedprice * (1 - l_discount)) as sum_disc_price,
    sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) as sum_charge,
    avg(l_quantity) as avg_qty,
    avg(l_extendedprice) as avg_price,
    avg(l_discount) as avg_disc,
    count(*) as count_order
from
    lineitem
where
        l_shipdate <= date '1996-09-02'
group by
    l_returnflag,
    l_linestatus
order by
    l_returnflag,
    l_linestatus;
+--------------+--------------+----------+--------------------+--------------------+--------------------+--------------------+--------------------+---------------------+-------------+
| l_returnflag | l_linestatus | sum_qty  | sum_base_price     | sum_disc_price     | sum_charge         | avg_qty            | avg_price          | avg_disc            | count_order |
+--------------+--------------+----------+--------------------+--------------------+--------------------+--------------------+--------------------+---------------------+-------------+
| A            | F            | 37734107 |<PHONE_NUMBER>0.729996 |<PHONE_NUMBER>4.87001  |<PHONE_NUMBER>2.8277   | 25.522005853257337 | 38273.12973462167  | 0.04998529583839799 | 1478493     |
| N            | F            | 991417   |<PHONE_NUMBER>.379999  |<PHONE_NUMBER>.0540993 |<PHONE_NUMBER>.194375  | 25.516471920522985 | 38284.467760848274 | 0.05009342667421619 | 38854       |
| N            | O            | 28196030 |<PHONE_NUMBER>6.47     |<PHONE_NUMBER>9.9758   |<PHONE_NUMBER>7.953186 | 25.51279800791189  | 38271.75327140934  | 0.050005284245347   | 1105172     |
| R            | F            | 37719753 |<PHONE_NUMBER>0.90001  |<PHONE_NUMBER>4.604    |<PHONE_NUMBER>9.831924 | 25.50579361269077  | 38250.854626099666 | 0.05000940583012741 | 1478870     |
+--------------+--------------+----------+--------------------+--------------------+--------------------+--------------------+--------------------+---------------------+-------------+
4 rows in set. Query took 0.245 seconds.

then set with_page_index
select
    l_returnflag,
    l_linestatus,
    sum(l_quantity) as sum_qty,
    sum(l_extendedprice) as sum_base_price,
    sum(l_extendedprice * (1 - l_discount)) as sum_disc_price,
    sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) as sum_charge,
    avg(l_quantity) as avg_qty,
    avg(l_extendedprice) as avg_price,
    avg(l_discount) as avg_disc,
    count(*) as count_order
from
    lineitem
where
        l_shipdate <= date '1996-09-02'
group by
    l_returnflag,
    l_linestatus
order by
    l_returnflag,
    l_linestatus;
+--------------+--------------+----------+--------------------+--------------------+--------------------+--------------------+--------------------+----------------------+-------------+
| l_returnflag | l_linestatus | sum_qty  | sum_base_price     | sum_disc_price     | sum_charge         | avg_qty            | avg_price          | avg_disc             | count_order |
+--------------+--------------+----------+--------------------+--------------------+--------------------+--------------------+--------------------+----------------------+-------------+
| A            | F            | 37734107 |<PHONE_NUMBER>0.73     |<PHONE_NUMBER>4.869995 |<PHONE_NUMBER>2.82769  | 25.522005853257337 | 38273.129734621674 | 0.04998529583839799  | 1478493     |
| N            | F            | 991417   |<PHONE_NUMBER>.3799992 |<PHONE_NUMBER>.0540993 |<PHONE_NUMBER>.1943748 | 25.516471920522985 | 38284.46776084828  | 0.05009342667421619  | 38854       |
| N            | O            | 28196030 |<PHONE_NUMBER>6.47002  |<PHONE_NUMBER>9.97579  |<PHONE_NUMBER>7.95318  | 25.51279800791189  | 38271.753271409354 | 0.050005284245347004 | 1105172     |
| R            | F            | 37719753 |<PHONE_NUMBER>0.9      |<PHONE_NUMBER>4.604004 |<PHONE_NUMBER>9.831924 | 25.50579361269077  | 38250.85462609966  | 0.05000940583012743  | 1478870     |
+--------------+--------------+----------+--------------------+--------------------+--------------------+--------------------+--------------------+----------------------+-------------+
4 rows in set. Query took 0.174 seconds.

And with log=debug got
[2022-10-11T11:35:38Z DEBUG datafusion::physical_plan::file_format::parquet]
Use filter and page index create RowSelection
 [[RowSelector { row_count: 3820000, skip: false }],
[RowSelector { row_count: 300000, skip: false },
RowSelector { row_count: 1900000, skip: true }]]

Seems get ~1.4x Performance gain.

Seems get ~1.4x Performance gain.

Nice!

I ran out of time to day -- will do tomorrow

Thanks @Ted-Jiang -- this is looking quite good.
I left some comments about how to handle multiple columns
I would like to see some more tests. Specifically:

Test that combines column metadata pruning with row filtering
More targeted tests of prune_pages_in_one_row_group (specifically setting up various scenarios (including multiple Indexes) and validating that the output RowSelectors were good

Given this feature is turned off by default, I also think we could merge this PR as is and iterate on master if you prefer and thus I am approving it.

@alamb  Thanks for your kindly review!  👍👍
i prefer iterate it on master. I have file the following issue:
https://github.com/apache/arrow-datafusion/issues/3834 , https://github.com/apache/arrow-datafusion/issues/3833 and add more tests 💪
As the split the filter-expr (base on AND) plan to do it in logical plan, is this ok ?

i prefer iterate it on master. I have file the following issue:

Sounds good -- thanks @Ted-Jiang

Thanks again @Ted-Jiang


upgrade amalgamation code

Coverage remained the same at 58.344% when pulling e82a8a68b95fc1b7a3aae31fa341cc40ba45e7bb on sqlite-amalgamation-3250100 into 6de94b0b99071c779a0a8d4072b65d95c42c12d6 on master.


Can you load gif image in the contentViewController?

I saw the second screenshot in the README has an animation, so just wonder how does it implement?

Use a .mp4 instead, it's smaller and works way better (it will loop
automatically)
On Thu, Aug 27, 2015 at 12:26 PM, Wei<EMAIL_ADDRESS>wrote:

I saw the second screenshot in the README has an animation, so just wonder
how does it implement?
—
Reply to this email directly or view it on GitHub
https://github.com/mamaral/Onboard/issues/78.

+1 to what @chrisballinger said.

So I need to load mp4 as background in the OnboardingViewController ? OnboardingContentViewController is not able to load mp4 yet?

@willthink could you find any solution to this?

@willthink I misread your initial question - if you want a gif/video that is currently not supported for the content pages, only the primary onboarding background.
@FabKremer The only solution I can think of currently is to customize the internals of OnboardingContentViewController to support it.

Hi
I saw this issue open and wanted to give a hand, I added video support to OnboardingContentViewController, just need to create the instance with a video url and it will be loaded in the background similar to OnboardingViewController. There is also an example and some test for this.
The only catch is that MPMoviePlayerController doesn't support multiple videos at the same time, so I added a thumbnail to show when the video is stopped but it also has to wait until the video is loaded to be visible
I have a fork with the changes (https://github.com/estebansotoara/Onboard/tree/ContentViewControllerVideoSupport), you can check it out and if you like it I can make a PR

Thanks @estebansotoara!

Another solution is to try using SDWebImage, AFAIK their UIImageView category supports GIFs?

Yes, SDWebImage supports GIF, I actually had to remove it as a requirement for a project I'm working on, but I think we'll have to add SDWebImage as a dependency.
I just did the PR #95 and let me see what can I do for the actual GIF this week.

Hello @mamaral I added GIF support using FLAnimatedImage as SDWebImage would be an unnecessary overkill, check it out https://github.com/estebansotoara/Onboard/tree/ContentViewControllerGifSupport
Also had to change back to [[NSNotificationCenter defaultCenter] removeObserver:] as the [[NSNotificationCenter defaultCenter] removeObserver: keyPath:] version is not very friendly with XCTestExpectation and as long it is on the dealloc it is not actually really harmful.


Added inshorts scraper

@ATB00ker what about replacing all print statements with logging in pipelines.py??

I am planning to shift to logging as well! Great idea! :+1:


Check to see if USB sync has low latency

If we can, using the time that the init arrives at the BattOr for time sync would much simplify time syncing BattOr.

Added the CONTROL_TYPE_GET_SAMPLE_COUNT for sync. The firmware will reply with the current sample that was being collected when the message was received. This is used now by the Chromium implementation.


Change wrapper to tanukisoft version

Description
Wrapper is moved to tanukisoft. There is a FOSSA license issue and it will be fixed from this change.
Related Issue

https://github.com/wso2-enterprise/asgardeo-product/issues/18415

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/5817807279

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/5817807279
Status: success

Closing since this is no longer needed.


[Bug]: Sync on Remote running before sync complete

What happened?
On sync the metadata is uploaded first, but if it is a large sync then the other device will detect it and try to sync before the first device is done syncing.
Additionally there is another small bug where sync on remote will try to run without auth causing an error.
What OS are you using?
Windows
What remote cloud services are you using?
Dropbox
Version of the plugin
No response
Version of Obsidian
No response
Using password or not

[X] Yes.

Ensure no sensitive information

[X] I ensure that no sensitive information is submitted in the issue.

Is there any reason metadata is uploaded before syncing? If not it's probably best to change it to after for the Sync History as well.

Not that I'm aware of, we should upload after sync so this doesn't occur.

Fixed in 37b2c97

Fixed in 0.4.36

Thank you!

(author or remotely save here)
actually the plugin doesn’t provide a lock or a transaction which the real problem behind scene. moving meta data upload sequence doesn’t solve the problem at all i am afraid.

Sorry but what do you mean by lock and transaction?
Thanks for commenting by the way. I want to get this feature properly working as soon as possible.

moving meta data upload sequence doesn’t solve the problem at all i am afraid.

It doesn't fix the race condition present with multiple clients syncing, but it does mitigate a bug with with "Sync on Remote Changes" (an update to Remotely Sync) which resulted in clients scanning the metadata file to see if it changed since last sync; this resulted in multiple clients quickly checking this metadata file resulting in unnecessary (endless?) syncing. Agreed the main race condition is not mitigated but that wasn't the goal for this issue.
Thankfully that race condition should only occur if multiple clients have changes they need to sync, which for my usage at least is an edge case.

Sorry but what do you mean by lock and transaction?

fyears@ is talking about something like mutual exclusion (mutex) or other forms of locking. Like we could check if a .lock file exists in the remote location and abort sync if so. At start of sync: create a .lock file when starting sync, etc.
Even this naive implementation has a race condition, because in theory two sync clients could check the file exists, think it doesn't, then both create it, like below:
Ideal (happy path):
Client A: Does lock exist? -> No
Client A: Create lock file -> Done
Client B: Does lock exist? -> Yes, abort sync.
Race condition (unhappy path):
Client A: Does lock exist? -> No
Client B: Does lock exist? -> No
[both clients start syncing, same problem]
Not all providers (including s3) support mechanisms to solve this like conditional write ("create this file only if it doesn't exist- if it exists, error") so we can't implement this (at least easily) for all providers. Some providers like webdav do support locking, but this is probably implementation dependent.

Ohhh thanks for the explanation. I hadn't thought about that before. Maybe when we fix the current sync issues (deletions, file hashes, etc) this could be implemented. If it's possible?

Not all providers (including s3) support mechanisms to solve this like conditional write ("create this file only if it doesn't exist- if it exists, error")

Can't we check that ourselves, then upload the file?

No worries!

Can't the plugin check if the file exists, then upload the file?

That's the problem - these operations are not guaranteed to happen in any particular order. Because the read and write are separate operations and could occur for two clients at the same time it's rare but possible that the unhappy path I described above happens - broken down more clearly:
Client A: Does lock exist? [takes time]
Client B: Does lock exist? [takes time]
Client A: Lock does not exist.
Client B: Lock does not exist.
Client A: Create lock file
Client B: Create lock file  <--- start of the problem.
Both clients think they created the lock file because they did not see a lock file, but unfortunately they checked at the same time (when a lock file didn't exist).
There are some workarounds but I don't think it's super reliable as a server-supported option. Like writing a number to the lock file, then reading it back to see if the number changed (like another client is trying to get a lock). It's possible this still results in a race condition, but less likely.
Worth discussing in a new (separate) issue! This is not super likely to happen compared to this issue because of how Sync on Remote [changes] was implemented.

Oh I see, thanks again. Makes more sense now.
A new issue sounds good, at least for further down the line. I assume this wouldn't be a priority right now, but might be an improvement later?

Yeah! I agree. It would only happen if two clients have to sync at the same time - which should happen less often with a proper "Sync on Remote Changes" type feature, if it's working as intended. Worth opening as a nice to have but shouldn't be an issue in practice with out of the box obsidian (maybe some plugin that auto updates a file, and syncing config dirs... there are cases but for most people it should be fine).


Re: packaging

refactor おじさん

Pull Request Test Coverage Report for Build 433

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 92.249%

Totals

Change from base Build 430:
0.0%

Covered Lines:
607

Relevant Lines:
658

💛  - Coveralls


Fix the headers mapping

Hi @SerafimArts!
At this moment we have a potential DDoS vulnerability for all applications, that use the current package. This PR fixes one interesting (not) case.
Details
The common worker code looks like this (as described in the readme file):
while ($request = $psr7->waitRequest()) {
    try {
        // Reply by the 200 OK response
        $psr7->respond(new Response(200, [], 'Hello RoadRunner!'));
    } catch (\Throwable $e) {
        // Reply by the 500 Internal Server Error response
        $psr7->respond(new Response(500, [], 'Something Went Wrong!'));

        // Report error to RoadRunner (optional)
        $worker->error((string)$e);
    }
}

As you can see, if the exception occurs in the $psr7->waitRequest() method call - the worker will be crashed (developers trust the waitRequest method). Now, let's take a look at the following code (Nyholm/psr7):
https://github.com/Nyholm/psr7/blob/fafc2faf8d49b979f922fe416dc8805462dc1fe8/src/MessageTrait.php#L91-L95
    public function withAddedHeader($header, $value): self
    {
        if (!\is_string($header) || '' === $header) {
            throw new \InvalidArgumentException('Header name must be an RFC 7230 compatible string.');
        }
    // ...

How to exploit this "feature"?
$ curl -H "0:foo" "https://roadrunner.dev"
worker error: EOF%

The worker has been crashed and restarted and restarted by the rr daemon. This is a very expensive operation, and if we run something like:
$ while true; do curl -H "0:foo" "https://roadrunner.dev"; done

In 10..15 threads - after a few seconds host will be down. After this PR merging and releasing the fixed version - "wrong" headers will be simply ignored.

@tarampampam
I have the same problem
And this is the text I see in the logs when I pass "0" as a key for the  header key:
In MessageTrait.php line 179:

  Header name must be an RFC 7230 compatible string.

start [--laravel-path [LARAVEL-PATH]] [--relay-dsn RELAY-DSN] [--refresh-app]
error_encoder: Network:
	sync_worker_exec_worker_with_timeout:
	sync_worker_exec_payload:
	goridge_frame_receive: EOF
worker_watcher_wait: signal: killed; process_wait: signal: killed

link: https://github.com/spiral/roadrunner-docs/pull/73

0 is valid header name.
See https://datatracker.ietf.org/doc/html/rfc7230#section-3.2 Where:
header-field   = field-name ":" OWS field-value OWS

field-name     = token
// ... etc

And https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.6 Where:
token          = 1*tchar

tchar          = "!" / "#" / "$" / "%" / "&" / "'" / "*"
                / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
                / DIGIT / ALPHA
                ; any VCHAR, except delimiters

Please note that tchar can be digit.
In case of an error, the client should send an error 400 in response.
That is, this fix solves one of the problems, but is in violation of the spec.

P.S. This is not a vulnerability, but a bug in the code caused by not entirely correct documentation. The correct version should look like this:
while (true) {
    try {
        $request = $psr7->waitRequest();
    } catch (\Throwable) {
        $psr7->respond(new Response(400)); // Bad Request
        continue;
    }

    try {
        $psr7->respond(new Response(200, [], 'Hello RoadRunner!'));
    } catch (\Throwable) {
        $psr7->respond(new Response(500, [], 'Something Went Wrong!'));
    }
}

@eldario, updated doc: https://github.com/spiral/roadrunner-docs/blob/master/php/worker.md

P.S. This is not a vulnerability, but a bug in the code caused by not entirely correct documentation

Bug in the documentation or in the unmarshalling headers data on the PHP side? It looks like the second one

Bug in the documentation or in the headers data unmarshalling on the PHP side? It looks like the second one

In the PSR factory, headers always come as string. This was fixed almost ~3 weeks ago: https://github.com/spiral/roadrunner-http/issues/7

Good job @tarampampam and @wolfy-j , I loosed my patience from discord discussion and gh discussion to the infinite loop in poor argumentation to state DDos or bug or not ... whereas 10 requests are enough to shut down any services based on RR at the moment... endless discussion

In the PSR factory, headers always come as string. This was fixed almost ~3 weeks ago: #7
Without this PR, nothing forces us to get this version regarding other dependencies requirements. The only solution is to force the strict minimum in composer, but you can't force a specific psr7 implementation from composer.


Resizing on up/down it resizes (slightly) on left/right

Hyprland Version
Hyprland, built from branch  at commit 1b48642fd15c433c53876f1b933dcd46265caf8f dirty (). Tag: v0.30.0
Bug or Regression?
Bug
Description
Hyprland keybindings (submap) resizes wrong, kindly see the video
How to reproduce
add this in the default config
# resize submap
bind=$mainMod SHIFT_L,R,submap,resize

submap=resize

binde=,l,resizeactive,10 0
binde=,h,resizeactive,-10 0
binde=,k,resizeactive,0 -10
binde=,j,resizeactive,0 10

bind=,escape,submap,reset

submap=reset

do as i did in the video

open two windows
resize one window to right side
goto resize mode
now press resize keys for up/down

Crash reports, logs, images, videos
https://github.com/hyprwm/Hyprland/assets/63696279/5a95bd84-9908-4d22-b832-d1de4cce4a31

Not occurring on the latest version on the same machine...


Feat: Apply prettier

fixes #2
Tested with test.js

I removed some redundant commits.
I will merge this branch if you are OK.

@hmes98318
All good 👌🏼


feat: improve push speed of large JSON files

Proposed changes
Even after limiting the number of concurrent promises with an iterator, documents from the same JSON files are still consumed serially. Which can cause the source:push:add command to be significantly slow for JSON files with large amounts of documents.
Here is an example to illustrate the change.
Let’s say we want to push a folder containing 3 JSON files using --maxConcurrent 3.
The 2 first files only contain only 1 document while the 3rd one has 4:
JSON file A contains 1 document (■)
JSON file B contains 1 document (□)
JSON file C contains 4 documents (▤ ▥ ▧ ▩)
To simplify, let’s assume that each uploaded batch contains only one document (because they are large documents).
With the previous solution (using an iterator), we would have consumed the 6 documents in the following way:
worker 1: ■
worker 2: □
worker 3: ▤   ▥   ▧   ▩
          t1  t2  t3  t4
       ---------------> Time

The first document from different files is always consumed in parallel. However, the workers are not used in an efficient way to consume JSON file C.
With the recursive generator approach we now consume the documents more efficiently without clogging the memory.
worker 1: ■   ▥
worker 2: □   ▧
worker 3: ▤   ▩
          t1  t2
       ---------------> Time

TL;DR
Using generator recursion to consume in parallel chunks from the same JSON file.

Testing

[x] Unit Tests:

[ ] Functionnal Tests:

[ ] Manual Tests:

That "simple" push command is starting to get complicated :D But, I understand it's needed.
Should this have been added as some kind of feature in https://github.com/coveo/push-api-client.js though ?
That way it would also benefit people using the client not through the CLI.

I agree that it's starting to get more and more complex... And it won't stop there since we also have to support the Stream API.
I don't know if moving that logic to the push-api-client would not complex things instead. For example, if the push-api-client has a method that accepts an array of docBuilders, we would have to store that array in memory, which could lead to a javascript out of memory error. To prevent this issue, the push-api-client should instead receive an array of files so it can build its own iterator.

That "simple" push command is starting to get complicated :D But, I understand it's needed.
Should this have been added as some kind of feature in https://github.com/coveo/push-api-client.js though?
That way it would also benefit people using the client, not through the CLI.

I agree that it's starting to get more and more complex. I don't know if moving that logic to the push-api-client would not be complex things instead. For example, if the push-api-client has a method that accepts an array of docBuilders, we would have to store that array in memory, which could lead to a javascript out of memory error. To prevent this issue, the push-api-client should instead receive an array of files so it can build its own iterator.

I think that what you did here is quite neat really and that it might be profitable for users outside of the CLI.
I would maybe shift all the business logic into the push-api-client.js package, which would be a big ol' grunt worker. The CLI will then only own the presentation layer.
This would allow us to keep things tidy, facilitate testing, and increase the reusability of the work you have done here.

That "simple" push command is starting to get complicated :D But, I understand it's needed.
Should this have been added as some kind of feature in https://github.com/coveo/push-api-client.js though?
That way it would also benefit people using the client, not through the CLI.

I agree that it's starting to get more and more complex. I don't know if moving that logic to the push-api-client would not be complex things instead. For example, if the push-api-client has a method that accepts an array of docBuilders, we would have to store that array in memory, which could lead to a javascript out of memory error. To prevent this issue, the push-api-client should instead receive an array of files so it can build its own iterator.

I think that what you did here is quite neat really and that it might be profitable for users outside of the CLI. I would maybe shift all the business logic into the push-api-client.js package, which would be a big ol' grunt worker. The CLI will then only own the presentation layer. This would allow us to keep things tidy, facilitate testing, and increase the reusability of the work you have done here.

In that case, I would need to add a new method to the push-api-client.js that would accept a list of JSON files (or folder).
Are you fine with That?

Will be done in coveo/push-api-client.js


Add generic for event dispatcher dispatch method

cc @seferov, this is similar to the phpstan stub https://github.com/phpstan/phpstan-symfony/blob/1.2.x/stubs/Symfony/Component/EventDispatcher/EventDispatcherInterface.stub

Friendly ping @seferov ; do you have time to take a look ?


DAT-16175

Impact

[ ] Bug fix (non-breaking change which fixes expected existing functionality)
[ ] Enhancement/New feature (adds functionality without impacting existing logic)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Description

Things to be aware of

Things to worry about

Additional Context

PR not needed, so I will create a PR when GH Action https://github.com/liquibase/liquibase/actions/workflows/build-azure-uber-jar.yml runs successfully


Fixes https://github.com/pixie-io/docs.px.dev/issues/186

Signed-off-by: Cristian Postescu<EMAIL_ADDRESS>

Closing this PR because it appears our blog site already supports keyboard navigation.


API Docs

Edited by Catherine in February 2020:
After a discussion with Vince, we're going to do this in a slightly different order.
Part 1 - Basics

Use the API in the browser
Get API Keys
Make requests - say actions are POSTs
Levels of scope - describe scopes of API
Show where types and schemas are

Part 2 - Document operations that have a global scope
Focus on showing how to use the Rancher API for manipulating things outside the scope of a cluster, because the kubectl CLI can be used to manipulate resources within clusters.
We will show how to:

Initially set up a Rancher server
Change settings
Create a custom cluster (custom clusters use an RKE config type, and other configs are used for other clusters)
Create an imported cluster
RBAC
Authentication, adding users and groups
Node templates
Cloud credentials

Long term goals for API docs

The Rancher API view should eventually be documented with a similar format and similar process used in the Kubernetes API reference: https://kubernetes.cn/docs/reference/generated/kubernetes-api/v1.13/
Automated API doc generation, starting with types, which are currently listed under ‘schemas’ in the Rancher API at [Rancher server URL]/v3/schemas
Create JSON or YAML schema generated from the Rancher API view in order to make Swagger docs
Add more human-readable descriptions to types and other API resources
Pipelines and custom catalogs with the Rancher API

Edit October 20 2020:
The requirements for a fully documented API reference will be:

Must document all types
Must list all of the fields, options, actions, sortings, etc
Must describe the fields, what type they are, what kind of values are allowed, or which ones are required
Any examples must be tested
The API reference must be organized by the scope of the resources, with global scoped, cluster scoped, and project scoped resources

Consolidating into https://github.com/rancher/rancher-docs/issues/583.


Error: failed to create file caches from configuration: file exists？

这里面的file在什么地方?
$ hugo server
Error: failed to create file caches from configuration: file exists

Seems to be a bug of hugo under Windows environment gohugoio/hugo#5497

thankyou！


linux-raspberrypi_6.1.bb: Update to 6.1.61 release

kirkstone doesn't even have a 6.X version, and changing a major kernel version in a stable branch is not something that I would jump onto without some deep considerations on regressions. Is mixin layer something we could work with as a workaround here?
I can't speak of other branches as this needs to be dealt with on a case-by-case basis.

Kirkstone being the LTS release supported until 2026 I think it would make sense to have kernel updates on that branch, especially since we'd need a kernel update to support the Pi 5.
What do you mean about mixing layers?

I was thinking of something like: https://docs.yoctoproject.org/ref-manual/terms.html#term-Mixin
Here is an example: https://git.yoctoproject.org/meta-lts-mixins
I could create a meta-raspberrypi-mixin where we could backport (community driven) this kind of changes.

If you never plan on updating the kernel version in a LTS release then I guess we could try mixins.

@agherzan you can hold on that for the moment, I don't think we'll go the mixin path after all.

Can this PR instead be ported to nanbield? Or mickledore if nanbield is not supported by meta-raspberrypi outside of master?

I am okay with a backport on supported Yocto versions as long as it is a patch update as this MR.


[Tree Details - Design] C02 Section to have icons per section

the c02 calcs have the same information twice so it should be condensed to two sections the pounds and kilos can be in the same row with just a dash to indicate that there two different calcs.

combined the weights to be in the same row and reduce the total rows to two rows for year and "general" not sure what the first one is doing if both have the same calcs. but here is the new design.


chore(docs): Update README.md

Reason for this PR

as title
What changes are included in this PR?

Update  README.md
Are these changes tested?

yes
Are there any user-facing changes?

no

Hi @yuhaoran1214
Thanks for your PR!
Can you replace other links as well?
https://github.com/apache/incubator-graphar/blob/cc57c560a1baba40e667a46da91892e75aeb85c4/maven-projects/pom.xml#L68-L69

ok


tried to enable ALSA but its not working..

I am executing freeRDP on mac OS 10.11 and Xcode 7.3
I am tring to enable ALSA feature to be ON but its not working?
FreeRDP-master macmini$ cmake -DCMAKE_TOOLCHAIN_FILE=cmake/iOSToolchain.cmake -GXcode -DIOS_PLATFORM=SIMULATOR -DWITH_MBEDTLS=ON -DWITH_ALSA=ON
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
-- FreeRDP GIT
-- Git Revision n/a
-- Skipping recommended feature libsystemd for systemd journal appender (allows to export wLog to systemd journal)
-- Skipping disabled feature X11 for X11 (X11 client and server)
-- Skipping disabled feature Wayland for Wayland (Wayland client)
-- Skipping disabled feature DirectFB for DirectFB (DirectFB client)
-- Finding required feature ZLIB for compression (data compression)
-- Finding required feature OpenSSL for cryptography (encryption, certificate validation, hashing functions)
-- Finding optional feature MbedTLS for cryptography (encryption, certificate validation, hashing functions)
-- Skipping disabled feature OpenSLES for multimedia (OpenSLES audio / video)
-- Skipping disabled feature OSS for sound (audio input, audio output and multimedia redirection)
-- Skipping disabled feature ALSA for sound (audio input, audio output and multimedia redirection)
-- Skipping disabled feature Pulse for sound (audio input, audio output and multimedia redirection)
-- Skipping disabled feature Cups for printing (printer device redirection)
-- Skipping disabled feature PCSC for smart card (smart card device redirection)
-- Skipping optional feature FFmpeg for multimedia (multimedia redirection, audio and video playback)
--     Enable feature FFmpeg using "-DWITH_FFMPEG=ON"
-- Skipping disabled feature GStreamer_0_10 for multimedia (multimedia redirection, audio and video playback, gstreamer 0.10 version)
-- Skipping disabled feature GStreamer_1_0 for multimedia (multimedia redirection, audio and video playback)
-- Skipping optional feature JPEG for codec (use JPEG library)
--     Enable feature JPEG using "-DWITH_JPEG=ON"
-- Skipping optional feature x264 for codec (use x264 library)
--     Enable feature x264 using "-DWITH_X264=ON"
-- Skipping optional feature OpenH264 for codec (use OpenH264 library)
--     Enable feature OpenH264 using "-DWITH_OPENH264=ON"
-- Skipping optional feature GSM for codec (GSM audio codec library)
--     Enable feature GSM using "-DWITH_GSM=ON"
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
-- FreeRDP GIT
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
-- FreeRDP GIT
-- Adding dynamic channel client server "audin": Audio Input Redirection Virtual Channel Extension
-- Adding static channel client server "cliprdr": Clipboard Virtual Channel Extension
-- Adding dynamic channel client "disp": Display Update Virtual Channel Extension
-- Adding static channel client server "drdynvc": Dynamic Virtual Channel Extension
-- Adding device channel client "drive": Drive Redirection Virtual Channel Extension
-- Adding dynamic channel client server "echo": Echo Virtual Channel Extension
-- Adding static channel client server "encomsp": Multiparty Virtual Channel Extension
-- Adding device channel client "parallel": Parallel Port Virtual Channel Extension
-- Adding static channel client "rail": Remote Programs Virtual Channel Extension
-- Adding static channel client server "rdpdr": Device Redirection Virtual Channel Extension
-- Adding dynamic channel client "rdpei": Input Virtual Channel Extension
-- Adding dynamic channel client "rdpgfx": Graphics Pipeline Extension
-- Adding static channel client server "rdpsnd": Audio Output Virtual Channel Extension
-- Adding static channel client server "remdesk": Remote Assistance Virtual Channel Extension
-- Adding device channel client "serial": Serial Port Virtual Channel Extension
-- Adding device channel client "smartcard": Smart Card Virtual Channel Extension
-- Adding dynamic channel client "tsmf": Video Redirection Virtual Channel Extension
-- Adding iOS client
-- Configuring done
-- Generating done

If somebody have idea how to enable sound/audio and printer redirection then help me.
Thanks

@DieselV alsa is the LINUX sound backend, you will not have much luck on OS X with that ;)

@DieselV Use ccmake or the GUI edition of cmake to find configuration options available to you. Sound (CHANNEL_RDPSND) and microphone (CHANNEL_AUDIN) redirection are what you are looking for.


High cpu usage when up to about 500 connections.

This is a really strange problem which happened only in a specific computer.
Computer: Dell Latitude E5520, 4G memory, Windows 7 32bit.
netty-version: 5.0.0.Alpha1, 5.0.0.Alpha2
When the connection to the netty server up to about 500 (there is a threshold value, but not certainly).  A new connection will cause one thread use cpu 25%, and always print the following message. And another new connection will increase to 50% cpu usage. If i close the above two connections, the cpu usage will become normal and not print the abnormal message immediately.  If i close other unrelated connections, amounts may be 10 or 12, not ceratinly, but cpu usage will be normal finally.
2016-05-19 11:19:01 [nioEventLoopGroup-11-1] [WARN]-[Slf4JLogger.java:136] - Selector.select() returned prematurely 1024 times in a row; rebuilding selector. 2016-05-19 11:19:01 [nioEventLoopGroup-11-1] [INFO]-[Slf4JLogger.java:101] - Migrated 64 channel(s) to the new Selector. 2016-05-19 11:19:01 [nioEventLoopGroup-11-1] [WARN]-[Slf4JLogger.java:136] - Selector.select() returned prematurely 1024 times in a row; rebuilding selector. 2016-05-19 11:19:01 [nioEventLoopGroup-11-1] [INFO]-[Slf4JLogger.java:101] - Migrated 64 channel(s) to the new Selector. 2016-05-19 11:19:01 [nioEventLoopGroup-11-1] [WARN]-[Slf4JLogger.java:136] - Selector.select() returned prematurely 1024 times in a row; rebuilding selector. 2016-05-19 11:19:01 [nioEventLoopGroup-11-1] [INFO]-[Slf4JLogger.java:101] - Migrated 64 channel(s) to the new Selector. 2016-05-19 11:19:01 [nioEventLoopGroup-11-1] [WARN]-[Slf4JLogger.java:136] - Selector.select() returned prematurely 1024 times in a row; rebuilding selector. 2016-05-19 11:19:01 [nioEventLoopGroup-11-1] [INFO]-[Slf4JLogger.java:101] - Migrated 64 channel(s) to the new Selector. 2016-05-19 11:19:01 [Thread-1] [DEBUG]-[EapBootstrap.java:415] - send heartbeat... 2016-05-19 11:19:01 [nioEventLoopGroup-11-1] [WARN]-[Slf4JLogger.java:136] - Selector.select() returned prematurely 1024 times in a row; rebuilding selector. 2016-05-19 11:19:01 [nioEventLoopGroup-11-1] [INFO]-[Slf4JLogger.java:101] - Migrated 64 channel(s) to the new Selector.

After the test, i found that the threshold value of the problem (high cpu usage) is related to the threads number directly, which can be set by '-Dio.netty.eventLoopThreads'.
If -Dio.netty.eventLoopThreads=8, then threshold value is about 500 ~~ 864;
If -Dio.netty.eventLoopThreads=8, then threshold value is about 250 ~~ 464;
So, I guess the problem happens only when most of the threads is up to 64 connections.
However, why does only one computer will happen ???  What is the real reason to the problem ?

@alvin-xu Netty 5 has been deprecated (See #4466). Could you try 4.1.0.CR7 and see if the bug is still there?

+1 @windie - Also great to see you are a Netty contributor now! Welcome aboard!!

@Scottmitch - Thanks :)

@windie There is also the same problem with 4.1.0.CR7 in the aforementioned computer.  It's really difficult for me to make sure what in the computer causes the bug. Do you have any idea?

@alvin-xu what JDK? are you able to take a cpu snapshot with VisualVM or another profiling tool?

@alvin-xu I cannot reproduce it. Do you have a simple reproducer?

I've had this problem too.  The problem will disappear if I use netty-transport-native-epoll instead.

JDK version is as following: @johnou

java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) Client VM (build 24.79-b02, mixed mode, sharing)

This is the VisualVM Snapshot， you should change the suffix to “nps”，then you can read it.
snapshot-1464934821453-cpu-calltree.txt

In the above result, I just start a common server received connection and do nothing, with the init configuration,  -Dio.netty.eventLoopThreads==2.
I think the code is not the reason, but the specific platform.  @windie
`
private EventLoopGroup bossGroup;
private EventLoopGroup  workerGroup;
private ServerBootstrap bootstrap;
private int             port;
public EapManageServer(int port) {
    bossGroup = new NioEventLoopGroup();
    workerGroup = new NioEventLoopGroup();
    bootstrap = new ServerBootstrap();
    this.port = port;

    bootstrap.group(bossGroup, workerGroup).channel(NioServerSocketChannel.class)
            .option(ChannelOption.SO_BACKLOG, 100).option(ChannelOption.TCP_NODELAY, true)
            .childOption(ChannelOption.SO_KEEPALIVE, true)
            .childHandler(new ChannelInitializer<SocketChannel>() {
                @Override
                protected void initChannel(SocketChannel socketChannel) throws Exception {
                    System.out.println("connected");
                    socketChannel.pipeline().addLast(new DiscardServerHandler());
                }
            });
}

public void run() throws InterruptedException {
    bootstrap.bind(port).sync().channel().closeFuture().sync();
}

public void stop() {
    bossGroup.shutdownGracefully();
    workerGroup.shutdownGracefully();
}`

And then start  a number of clients to connect the server. When the client amount reach 120+, then cpu usage will rise to 50% ( I only start with 2 threads, and the computer has 4 cpu center).
`
public static void client(String host, int port) throws InterruptedException {
EventLoopGroup workerGroup = new NioEventLoopGroup();
    try {
        Bootstrap b = new Bootstrap();
        b.group(workerGroup);
        b.channel(NioSocketChannel.class);
        b.option(ChannelOption.SO_KEEPALIVE, true);
        b.handler(new ChannelInitializer<SocketChannel>() {
            @Override
            public void initChannel(SocketChannel ch) throws Exception {
                ch.pipeline().addLast(new TimeClientHandler());
            }
        });

        // Start the client.
        ChannelFuture f = b.connect(host, port).sync();

        // Wait until the connection is closed.
        f.channel().closeFuture().sync();
    } finally {
        workerGroup.shutdownGracefully();
    }

}
public static void main(String[] args) throws Exception {
    ExecutorService es = Executors.newCachedThreadPool();
    for(int i=0;i<120; i++) {
        es.execute(new Runnable() {
            @Override
            public void run() {
                try {
                    client("<IP_ADDRESS>", 8080);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        });
        System.out.println(i);
    }
}

`

can you provide a few stack traces while in this condition (use jstack)?

There are three files with jstack.  Jstack_0 is captured when server started up and no connections, jstack_124 is up to 124 connections but normal, the last one is the error one up to 128 connections, CPU usage is up to 50% by the netty server at this time.
However, I can't find any problem, May be you could. : )  @Scottmitch
jstack_0.txt
jstack_124.txt
jstack_128_error.txt

@chenxiuheng The “netty-transport-native-epoll”  is only supported in Linux, but my problem is occured in windows. Thank you for you help anyway.

@alvin-xu - Thanks for the stack dumps. It would be useful if you could provide a few stack traces while in the CPU is at a persistent elevated usage. IIUC only the last stack trace was at elevated CPU usage. I would like to compare the stack traces to see if there is any interesting pattern. Lets start with 4 stack traces while CPU is elevated.

I'm sorry for that I can't understand your intent clearly. I used jstack barely. I think the following stack dumps may what you want. @Scottmitch . They are all captured while CPU is elevated.
jstackl_1.txt
jstackl_2.txt
jstackl_3.txt
jstackl_4.txt
jstackl_5.txt
jstackl_6.txt
jstackl_7.txt
jstackl_8.txt
jstackl_9.txt

@alvin-xu - Thanks for the info. It appears that you are using Netty 5.x? Can you provide the same information running with Netty 4.1.0.Final (5.x has been deprecated as @windie mentioned https://github.com/netty/netty/issues/5278#issuecomment-220868964).

@Scottmitch  I used 4.1.0.Final, and also has the same problem on that computer. The following is stack trace.  I closed  the last 2 connections in "jstackl_4.1.0_10_normal.txt" and "jstackl_4.1.0_11_normal.txt", which will make cpu usage normal. Then, I opened another 2 connections in the latter tester and problem show again.
jstackl_4.1.0_1.txt
jstackl_4.1.0_2.txt
jstackl_4.1.0_3.txt
jstackl_4.1.0_4.txt
jstackl_4.1.0_5.txt
jstackl_4.1.0_6.txt
jstackl_4.1.0_7.txt
jstackl_4.1.0_8.txt
jstackl_4.1.0_9.txt
jstackl_4.1.0_10_normal.txt
jstackl_4.1.0_11_normal.txt
jstackl_4.1.0_12.txt
jstackl_4.1.0_13.txt

@alvin-xu - Thanks again for the stack traces. Most of the stack traces look like we are waiting on the poll mechanism.  However the 12th stack trace shows an interesting sign that we are being interrupted [1]. It is possible that the polling mechanism is behaving in a way we don't expect and we are just spinning calling poll ... can you verify which threads are consuming unusually high amount of CPU via a profiler (visualvm should work)?  Can you also verify if you are seeing log statements like [2]:
[1]
"nioEventLoopGroup-3-2" prio=10 tid=0x0412ec00 nid=0x1e94 runnable [0x04d6f000]
   java.lang.Thread.State: RUNNABLE
	at java.lang.Thread.isInterrupted(Native Method)
	at java.lang.Thread.interrupted(Thread.java:983)
	at io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:675)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:325)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:742)
	at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:145)
	at java.lang.Thread.run(Thread.java:745)

   Locked ownable synchronizers:
	- None

[2]
11:33:55.997 [test-1-1] WARN  io.netty.channel.nio.NioEventLoop - Selector.select() returned prematurely 512 times in a row; rebuilding selector.
11:33:55.997 [test-1-1] INFO  io.netty.channel.nio.NioEventLoop - Migrated 1 channel(s) to the new Selector.

@Scottmitch I took 3 snapshot with cpu profiler as following:

normal state:

cpu usage up to 50%:

after closed last 2 connections, cpu was normal, I restarted profiler again :

I try to restart profiler again, bug it never show a result for a really long time.

Can you also verify if you are seeing log statements like [2]

The log i captured is as following. I think it much like what you said.
六月 12, 2016 9:24:05 上午 io.netty.channel.nio.NioEventLoop select 警告: Selector.select() returned prematurely 512 times in a row; rebuilding selector. 六月 12, 2016 9:24:05 上午 io.netty.channel.nio.NioEventLoop rebuildSelector 信息: Migrated 64 channel(s) to the new Selector.

Yes it is...
Can you tell us what 'SelectorProvider.provider()' returns on this system?

Am 12.06.2016 um 04:02 schrieb Alvin Xu<EMAIL_ADDRESS>@Scottmitch I took 3 snapshot with cpu profiler as following:
normal state:
cpu usage up to 50%:
after closed last 2 connections, cpu was normal, I restarted profiler again :
I try to restart profiler again, bug it never show a result for a really long time.
Can you also verify if you are seeing log statements like [2]
The log i captured is as following. I think it much like what you said.
六月 12, 2016 9:24:05 上午 io.netty.channel.nio.NioEventLoop select
警告: Selector.select() returned prematurely 512 times in a row; rebuilding selector.
六月 12, 2016 9:24:05 上午 io.netty.channel.nio.NioEventLoop rebuildSelector
信息: Migrated 64 channel(s) to the new Selector.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@normanmaurer  It's  sun.nio.ch.WindowsSelectorProvider which has no difference with other computer.
I used
SelectorProvider provider = SelectorProvider.provider();
System.out.println(provider.toString());

Is the other computer running 1.7.0_79 too?

No, It's 1.8.0_60 .

So it not happens on 1.8.0_60? If so can you uprade on the system where you see the problem and check again?

Am 12.06.2016 um 08:38 schrieb Alvin Xu<EMAIL_ADDRESS>No, It's 1.8.0_60 .
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Are you able to upgrade to 1.8 to rule out a bug in 1.7 JRE?

It seems the problem has no direct relation with JDK.  I have uninstalled JDK1.7 and installed JDK1.8, however, the problem still there.
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b15)
Java HotSpot(TM) Client VM (build 25.91-b15, mixed mode)

I try to debug the library.  And I found that the select function [1] does not block for the specify timeoutMillis . In another word, the function [1] block in a very short time then return,  which will cause the following problem [2] think that something is wrong and it has to rebuild the selector to fix the problem. Unfortunately, rebuild selectors can not fix the problem, so it will always  rebuilding selectors when the repeat times up to 512 by default. And this is what cause the cpu elevated.
So, the focus is why the select function [1] does not block ?  And the above actions which you suggested to do could rule out the factor of JDK。 Are there any other reasons which could cause the problem? such as Network Interface Card。
private void select(boolean oldWakenUp) throws IOException {
        Selector selector = this.selector;

        try {
            int e = 0;
            long currentTimeNanos = System.nanoTime();
            long selectDeadLineNanos = currentTimeNanos + this.delayNanos(currentTimeNanos);

            while(true) {
                long timeoutMillis = (selectDeadLineNanos - currentTimeNanos + 500000L) / 1000000L;
                if(timeoutMillis <= 0L) {
                    if(e == 0) {
                        selector.selectNow();
                        e = 1;
                    }
                    break;
                }

                if(this.hasTasks() && this.wakenUp.compareAndSet(false, true)) {
                    selector.selectNow();
                    e = 1;
                    break;
                }

                int selectedKeys = selector.select(timeoutMillis);     [1]
                ++e;
                if(selectedKeys != 0 || oldWakenUp || this.wakenUp.get() || this.hasTasks() || this.hasScheduledTasks()) {
                    break;
                }

                if(Thread.interrupted()) {
                    if(logger.isDebugEnabled()) {
                        logger.debug("Selector.select() returned prematurely because Thread.currentThread().interrupt() was called. Use NioEventLoop.shutdownGracefully() to shutdown the NioEventLoop.");
                    }

                    e = 1;
                    break;
                }

                long time = System.nanoTime();
                if(time - TimeUnit.MILLISECONDS.toNanos(timeoutMillis) >= currentTimeNanos) {
                    e = 1;
                } else if(SELECTOR_AUTO_REBUILD_THRESHOLD > 0 && e >= SELECTOR_AUTO_REBUILD_THRESHOLD) {
                    [2]
                    logger.warn("Selector.select() returned prematurely {} times in a row; rebuilding selector.", Integer.valueOf(e));
                    this.rebuildSelector();
                    selector = this.selector;
                    selector.selectNow();
                    e = 1;
                    break;
                }

                currentTimeNanos = time;
            }

            if(e > 3 && logger.isDebugEnabled()) {
                logger.debug("Selector.select() returned prematurely {} times in a row.", Integer.valueOf(e - 1));
            }
        } catch (CancelledKeyException var13) {
            if(logger.isDebugEnabled()) {
                logger.debug(CancelledKeyException.class.getSimpleName() + " raised by a Selector - JDK bug?", var13);
            }
        }

    }

It soubds like either a OS or JDK bug

Am 12.06.2016 um 10:58 schrieb Alvin Xu<EMAIL_ADDRESS>I try to debug the library. And I found that the select function [1] does not block for the specify timeoutMillis . In another word, the function [1] block in a very short time then return, which will cause the following problem [2] think that something is wrong and it has to rebuild the selector to fix the problem. Unfortunately, rebuild selectors can not fix the problem, so it will always rebuilding selectors when the repeat times up to 512 by default. And this is what cause the cpu elevated.
So, the focus is why the select function [1] does not block ? And the above actions which you suggested to do could rule out the factor of JDK。 Are there any other reasons which could cause the problem? such as Network Interface Card。
private void select(boolean oldWakenUp) throws IOException {
Selector selector = this.selector;
    try {
        int e = 0;
        long currentTimeNanos = System.nanoTime();
        long selectDeadLineNanos = currentTimeNanos + this.delayNanos(currentTimeNanos);

        while(true) {
            long timeoutMillis = (selectDeadLineNanos - currentTimeNanos + 500000L) / 1000000L;
            if(timeoutMillis <= 0L) {
                if(e == 0) {
                    selector.selectNow();
                    e = 1;
                }
                break;
            }

            if(this.hasTasks() && this.wakenUp.compareAndSet(false, true)) {
                selector.selectNow();
                e = 1;
                break;
            }

            int selectedKeys = selector.select(timeoutMillis);     [1]
            ++e;
            if(selectedKeys != 0 || oldWakenUp || this.wakenUp.get() || this.hasTasks() || this.hasScheduledTasks()) {
                break;
            }

            if(Thread.interrupted()) {
                if(logger.isDebugEnabled()) {
                    logger.debug("Selector.select() returned prematurely because Thread.currentThread().interrupt() was called. Use NioEventLoop.shutdownGracefully() to shutdown the NioEventLoop.");
                }

                e = 1;
                break;
            }

            long time = System.nanoTime();
            if(time - TimeUnit.MILLISECONDS.toNanos(timeoutMillis) >= currentTimeNanos) {
                e = 1;
            } else if(SELECTOR_AUTO_REBUILD_THRESHOLD > 0 && e >= SELECTOR_AUTO_REBUILD_THRESHOLD) {
                [2]
                logger.warn("Selector.select() returned prematurely {} times in a row; rebuilding selector.", Integer.valueOf(e));
                this.rebuildSelector();
                selector = this.selector;
                selector.selectNow();
                e = 1;
                break;
            }

            currentTimeNanos = time;
        }

        if(e > 3 && logger.isDebugEnabled()) {
            logger.debug("Selector.select() returned prematurely {} times in a row.", Integer.valueOf(e - 1));
        }
    } catch (CancelledKeyException var13) {
        if(logger.isDebugEnabled()) {
            logger.debug(CancelledKeyException.class.getSimpleName() + " raised by a Selector - JDK bug?", var13);
        }
    }

}

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@normanmaurer I only found the problem with one computer I mentioned at beginning. This is also really strange.  So I doubt that some hardware of the computer cause the problem ...

@alvin-xu Rarely meet Chinese player...

Haha, does my Chinese English sells me out? @freevest

I have recently encountered the same problem. I didn't use the Netty framework, but I have referred Netty's approach to solving this problem, that is, the rebuildSelector method.
It seems that this method does not work. Selector.select() function does not block and returns immediately. Also, rebuild the selector can not fix the problem.
After I restart the application, this problem may be hidden for a few days, and then it will appear again on a dead night.
I want to know how Netty will solve this problem. Here are some relevant information:

openjdk version "1.8.0_121"
OpenJDK Runtime Environment (build 1.8.0_121-8u121-b13-0ubuntu<IP_ADDRESS>-b13)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)

Linux iZuf6htp7ngpcb9u8jn3cmZ 4.4.0-63-generic #84-Ubuntu SMP Wed Feb 1 17:20:32 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

[2017-06-07 23:02:22,990] [DEBUG] [Reactor-0] [Reactor:79] - Selector.select() returns 0: cost 0ms
[2017-06-07 23:02:22,991] [ERROR] [Reactor-0] [Reactor:176] - SelectionKey count in oldSelector: 194
[2017-06-07 23:02:22,991] [ERROR] [Reactor-0] [Reactor:177] - RE-register channels done, SelectionKey count in newSelector: 194
[2017-06-07 23:02:22,991] [ERROR] [Reactor-0] [Reactor:186] - Clazz - oldSelector: sun.nio.ch.EPollSelectorImpl@205318ed, newSelector: sun.nio.ch.EPollSelectorImpl@47d4ba60
[2017-06-07 23:02:22,991] [ERROR] [Reactor-0] [Reactor:187] - Recreated Selector because of possible jdk epoll(..) bug.
[2017-06-07 23:02:22,991] [DEBUG] [Reactor-0] [Reactor:79] - Selector.select() returns 0: cost 0ms
[2017-06-07 23:02:22,992] [ERROR] [Reactor-0] [Reactor:176] - SelectionKey count in oldSelector: 194
[2017-06-07 23:02:22,992] [ERROR] [Reactor-0] [Reactor:177] - RE-register channels done, SelectionKey count in newSelector: 194
[2017-06-07 23:02:22,992] [ERROR] [Reactor-0] [Reactor:186] - Clazz - oldSelector: sun.nio.ch.EPollSelectorImpl@47d4ba60, newSelector: sun.nio.ch.EPollSelectorImpl@1cd553d5
[2017-06-07 23:02:22,992] [ERROR] [Reactor-0] [Reactor:187] - Recreated Selector because of possible jdk epoll(..) bug.

Let me close this as its very old and there was no more followup.

Let me close this as its very old and there was no more followup.


feat: Improve UI of EventDetailsFragment

Fixes #221 #227
*Added Organizer name and logo in Organizer section
*Resolved invisible attendee fragment issue
*Improved UI of EventDetailsFragment

Screenshots after update

PR Updated :+1: