Roadmap of ESDoc v1.0.0

The following changes are completion, and I will release ESDoc v1.0.0.
v0.5.0
Internal

[x] update to babel6 149914e84cb3bb061f2bdf2e43af00178b131a9e

Breaking

[x] require node v6 or later a5b37bd0c68304214185f765f617b1077bee81b7
[x] switch to babylon 8130a3f42b497e81f9ec6fc4cf0ef07ed5a7fa22

onHandleAST in plugin is breaking

[x] remove config.importPathPrefix a665c5d8c2c2a58cbe108ab3ecc8afc346c80ccf
[x] remove badge tag in README 6869b06e293c2471978ef96882baef6cc14c1766
[x] remove internal private tags (aka @_name, @_static, etc) https://github.com/esdoc/esdoc/pull/325

Refactoring

[x] test code https://github.com/esdoc/esdoc/pull/324
[x] eslint https://github.com/esdoc/esdoc/pull/326

ES2015

[x] enable exporting arrow function https://github.com/esdoc/esdoc/commit/964eda3d4e2da6e5d92b3a6502a4b2d01422b692

ES2016

https://github.com/tc39/proposals/blob/master/finished-proposals.md
[x] support exponentiation operator https://github.com/esdoc/esdoc/commit/29f6ccced4256016fed4ac8eb5b98320cd78c4d7

ES2017

https://github.com/tc39/proposals/blob/master/finished-proposals.md
[x] support async function 50452a1e44a1c8908da1fb377d3aa51eba220256
[x] support trailing comma https://github.com/esdoc/esdoc/commit/dc9ba0fd904adbc1519f27c15fab104f1a4414a5

Experimental Proposal

http://babeljs.io/docs/plugins/#experimental
[x] support class properties https://github.com/esdoc/esdoc/commit/c7b4d9b415812cf18c451b1a452c9725593d3891
[x] support object rest spread https://github.com/esdoc/esdoc/commit/b58aa054620e7335d7dcf8e0c81d4cb221e1fc6e
[x] support do expressions https://github.com/esdoc/esdoc/commit/33daf5a89dcdd3cd72a3d8b74829861f2c08e18e
[x] support function bind https://github.com/esdoc/esdoc/commit/5b7a7d06028e432d1e23b43963905c1a76b102b2
[x] support function sent https://github.com/esdoc/esdoc/commit/fe8a2656a93cfae51c0a541f291f3f32330aec3b
[x] support async generators https://github.com/esdoc/esdoc/commit/e6dc2f2cd00bff0e24f71a7485baedb79949ee94
[x] support decorators https://github.com/esdoc/esdoc/commit/c9419512b7dda5e8f0b906945fb2a91f0b4621b3
[x] support export extensions (parsing syntax only) https://github.com/esdoc/esdoc/commit/8803005b5927615027939ed42633bb06d060adaa
[x] support dynamic import https://github.com/esdoc/esdoc/commit/d729f5f4e6ad7d7693888b43ab5d42cb78bc15dd

Feature

[x] add new sections to manual https://github.com/esdoc/esdoc/commit/2ebb2c60e9141b4b562c0a684c21e7cfdfc94857

advanced
design

[x] manual index

card index
user index
global index

[x] variation of config https://github.com/esdoc/esdoc/commit/08fa2bc296b552168f86538561174e010a3a2f14

.esdoc.json
.esdoc.js
esdoc in package.json

[x] change structure of manual https://github.com/esdoc/esdoc/commit/73dc0cbbd877e7bf7c1719c9dc42af8d0bcf831a
[x] manual coverage in badge https://github.com/esdoc/esdoc/commit/3fe1a84aa5fd6efcaeb78a046cd097b17bc010f5
[x] adjust visual

Document

new features https://github.com/esdoc/esdoc/commit/476ce2ccdb287d53ccc4efd0ef4d9f16af05c02a

[x] logo
[x] config.experimentalProposal
[x] config.manual.globalIndex
[x] config.manual.index
[x] config.manual.design
[x] config.manual.advanced
[x] require node v6 or later
[x] ES features table ES2015/ES2016/ES2017/Experimental

usage https://github.com/esdoc/esdoc/commit/35bcfe5133251b65f570899d0d26c3389597cab5

[x] usage
[x] quick start
[x] .esdoc.json, .esdoc.js and esdoc in package.json

[x] use ESDoc manual as site https://github.com/esdoc/esdoc/commit/f377d6b454522dad69c3f4c24c8f3e94fb74fd01

Hosting

[x] update latest ESDoc
[x] update node v6

Next
Improve Export Syntax

[ ] export * from 'mod'
[ ] export {x} from "mod"
[ ] export {x as v} from "mod"
[ ] export { default as someIdentifier } from "mod"
[ ] export * as ns from 'mod' (in proposal)
[ ] export v from "mod" (in proposal)
[ ] export v, {x, y as w} from "mod" (in proposal)
[ ] export default from "mod" (in proposal)

Feature

[ ] markdown publisher (maybe)
[ ] enhance side menu bar for function based code

but I have no idea...

@h13i32maru I am glad you have updated the roadmap and are hopefully making decent progress.
Can you describe why the following is considered breaking:

require node v6 or later
switch to babylon

What is the constraint of node v6? Where does this come into play? For development or actual end user deployment?
With the later switch to babylon there should be few if any AST related ESDoc plugins, but are plugins concerns the reason this is marked "breaking"?

Other suggestions:
It would be great to split apart ESDoc into separate repos. First the web site should be separated and what would be most helpful is splitting the parsing / document DB creation from the static HTML publishing. This would create 4 repos esdoc-website, esdoc-core, esdoc-static-html and esdoc.
The reason for doing this kind of modularization potentially allows an alternate publishing mechanism based on a shared document / DB generation core. This could allow independent efforts to create a web app version for publishing versus static HTML documents. The esdoc NPM module would still function the same using the static HTML publisher module.

Could you please consider the glob proposal as indeed it works well and provides multiple source roots for main and test sources. I already have a proof of concept of this working. Please see #310

It is good to see some progress being made for v1.0.0. I'd like to find out your release strategy on NPM. In my opinion you should do multiple alpha, beta, and RC (release candidate) releases, so that bugs can be found and changes affecting existing plugins tested / documented / corrected as necessary. The alpha / beta stage would be nice to include other potential PR / features such as #310.
I see that on your feature list an added "markdown publisher" is now there marked as "maybe". As mentioned above it really makes sense to modularize the code base into separate repos / NPM releases. By doing this there would be a esdoc-publisher-markdown NPM module and esdoc-publisher-static-html. Perhaps add a publisher field in ESDoc config files that defaults to esdoc-publisher-static-html, but could accept alternate publishing modules.

@h13i32maru I see that you edited your original post in the last day above mentioning releasing 0.5.0 to test then 1.0.0. If possible providing additional comments about changes to the original roadmap post makes changes and your intentions clearer. I just happened to see this change.
Instead of a 0.5.0 release or using postfix identifiers like 1.0.0-alpha I'd like you to consider dist-tags for the v1.0.0 release. This allows everyone to try the new version via npm install esdoc@next or whatever tag you decide to use or the specific version number without it being the latest default installation. Doing the release this way those that want to test the latest ESDoc can do so and bug fixes will increment the tagged release to 1.0.1, 1.0.2, etc. This also gives ample time to include #310 or outside contributed improvements and test accordingly. When all is good switch the tagged release to latest.
A good blog article on the topic.
The video from the blog post.

Multiple source folders...please :-)

@typhonrt @bspies-work

What is the constraint of node v6? Where does this come into play? For development or actual end user deployment?

It is actual end user deployment. However if you want to use node v4 or earlier for your project, you can use node v6 for ESDoc with nvm, nodebrew or other tools.

With the later switch to babylon there should be few if any AST related ESDoc plugins, but are plugins concerns the reason this is marked "breaking"?

Yes, the swiching to babylon break onHandleAST in plugins. Please fix the plugin or use old ESDoc.

Other suggestions:

I don't have plan to split codes for now.
Because I like mono-repo style.
(However, for future, I may split codes)

Could you please consider the glob proposal as indeed it works well and provides multiple source roots for main and test sources.

I don't have plan to support glob and multi-sources.
If you want to use it, please a plugin (onHandleConfig) for it.

Would also be nice to have 'JSX' as a built-in type, i.e. {JSX}.

I don't have plan to support non-standard types.
I want to support standard types(ECMAScript, WHATWG and Node.js).

Sorry, I confued your.
I want to change puropse of this issue to v0.5.0.
And I made next-version at milestone, I move some issues to it.
https://github.com/esdoc/esdoc/issues/361
https://github.com/esdoc/esdoc/issues/362
https://github.com/esdoc/esdoc/issues/363
From now on, I think that share the progress using milestone.
And I can not promise that release time of v1.0.0.
Because I don't understand the future.
I want you to wait patiently.
Thanks for understanding.


Merge from SchedMD/slurm-gcp v5

There is a lot going on here, most of which is due to the number of Slurm releases in December with no v5 releases. We also decided mid-release to put Slurm 23.02 on v5.
Do you want to clean up the CHANGELOG at all? Are you still using it going forward?

Please rebase this branch onto the current state of GoogleCloudPlatform:v5. It should have only 1 extra commit (b96b9aa).

This rebase removes our 5.10.1 tag, which is probably okay since that is already merged into your repo. It should be done now, unless there's still anything about the CHANGELOG you want to change.


Messing up UI for Bing

Extension is breaking my BIng UI - as you can see I have a few other extensions so it might be possible that its another extension confliction with yours, but I dont hink so.

Will take a look at this! I didn't mean to release the extension this early and am working to fix up the content script for the microphone

Disabled extension for the bing website and all other websites except ChatGPT and Anthropic in #124 .
Extension is waiting for approval as we speak! Hope this helps.

In the meantime, please feel free to disable the extension 🙏 I apologize again for the breakage


DamageEntityEvent not working with armor stands

SpongeAPI version: stable-6
SpongeCommon version: stable-6
SpongeForge version: stable-6
What is the expected result?
The DamageEntityEvent should be called when a ArmorStand is hit since it's an entity.
What is the current result?
The DamageEntityEvent isn't fired for ArmorStands.
My listener code:
@Listener
public void onDeath(DamageEntityEvent event, @Getter("getTargetEntity") Entity entity) {
   Felograms.getInstance().getLogger().info(entity.getType().toString());

   if(entity.getType().equals(EntityTypes.ARMOR_STAND)) {
       logger.info("You hit an armorstand");
   }
}

When I hit a Slime it's working. Output:
[14:20:42] [Server thread/INFO] [felograms]: SpongeEntityType{id=minecraft:slime, name=slime, translation=SpongeTranslation{id=entity.Slime.name}, modid=minecraft, class=net.minecraft.entity.monster.EntitySlime}
but with an ArmorStand it isn't.

Are armor stands damageable in the classic sense? Or would this be a different type of interact entity event?

Fixed awhile ago by JBYoshi.


[docs][base-ui] Overall demos design review

[x] I have followed (at least) the PR section of the contributing guide.

Closes https://github.com/mui/material-ui/issues/39273
Doing a short design pass to improve the design and reduce the inconsistency among Base UI demos before the stable release. Mostly tweaking shadows and standardizing buttons and colors.

Hey @danilo-leal thanks so much for the detailed feedback!
Switch

There's more love to be given to them! Like with the notes below, subtle gradient shadings, borders, and box-shadows would make it pop a lot!

I tweaked the demos and I believe it looks way better now—however, I'm struggling with the Tailwind one, could you give me a hand with this?
Number inputs

Similarly here ⎯ We should standardize it to other input components as well as give some love to these arrow controls.

✅  Done
Badge

Not necessarily a tweak request, although there may be room for it, but I don't think we should use Material UI components here (the buttons + switch). It'd be better to use Base UI ones for it (customized). We can strip them away from the demo for the sake of simplicity!

I agree! It would indeed be better to use only Base UI components, but echoing you, it might add a lot of styling code to the demo. Do you know what we could to leave them out?
Modals

There's room for improvement! 😅 Improving spacing, adding a light border, improving the backdrop color, box-shadows, etc.

✅  Done

Hey @danilo-leal, thanks for the feedbacks, love your keen eye for spotting details!
I believe I've addressed almost all the points you've raised—and it indeed looks better 🙌
Just a couple of things I want to keep track of:

Really need your help with the switch Tailwind demo 😅
Still need to tweak the Buttons and TriggerButtons

@danilo-leal I've tweaked all the Buttons with the new styling, would you mind helping me with Tailwind demos?  To be clearer, I need some help adapting the changes on the switch and button/triggerbutton demos to Tailwind.
Also, it'd be great if you could pass through all the demos one more time, to reassure we're not missing anything.

We're getting there; this is looking awesome! I'll jump in shortly to see the Switch and Button Tailwind demos.
Here are some of the things I think we can tackle still:
Number input buttons
Let's standardize the up and down buttons on number inputs throughout the demos — there are several styles there.
My personal preference is definitely the 2nd! And I know that the 4th screenshot is somewhat of a different use case, but the styling should be the same, at least, even if they're separated (one on each side of the input).

1
2
3
4

Select icons
Like the above, we should standardize the icons we use for the Select components; we have at least a couple going.

1
2

Additionally, there's a demo where we can update the buttons, too!

Badge demos
I think we should limit Material UI component usage in the Base UI docs as much as possible. There's a Badge demo in which we use the Switch and Toggle Button where I believe we can use Base ones instead (probably in from a different file to keep the main demo file clean).

Secondary button styles
Don't kill me for this 😅 but I think that for components/demos where the button is not the focus, we should probably use a secondary (like, outlined) style for them, calling less attention to them and focusing on the component that will pop on the UI.

Snackbar
Menu

To-do list:

[x] ~Update Tailwind Button demos~
[x] ~Standardize NumberInput demos~
[ ] Update Tailwind NumberInput demos
[ ] Change and standardize Select icons
[ ] Badge demos (I'll probably need help from an engineer for this one)
[ ] Revert to secondary outlined button on Snackbar demos
[ ] Revert to secondary outlined button on Menu demos

@siriwatknp I just need a hand fixing the layout—mostly on mobile—after I added the NavBar. After it, I believe this is ready to be merged 🚀

Hey @mnajdova I really appreciate the review and the keen eye for the details!

Autocomplete scrollbar corner radius

I wonder if this is a bug from browsers, here it looks normal:

Base UI Button disabled style flashes - I noticed this for the first time now, could be regression done in this PR

Maybe it's because before we only used opacity for the disabled state, and now it overrides background, text color and whatnot. How might we fix it? (maybe in a separate PR would make more sense?)

Is it intentional in https://deploy-preview-38820--material-ui.netlify.app/base-ui/react-form-control/ that the Tailwind hover styles are working differently than the system & plain CSS - instead of changing the border color to the brand color, we are altering the background

Not intentional—should be fixed now :)

on the menu's page the focus state of the system button is inconsistent with both the tailwind demos as well as the button's page styles, I think we should use the same focus styling on all demos for the same components. Btw, should we also have all buttons on this page to be styled the same way?
on the modal's page, same question about the button styles as in ☝
snackbar's page buttons, same question as for the menu page ☝

I've standardized all the buttons, hopefully should be solved now

the number input's demos differs when switching styling solutions, for e.g. corder radius on the tailwind demo missing, plain CSS not having borders at all etc.

This is probably due to some regression, should be fixed now ✅

popup - inconsistent popul text color when switching between styling solutions (black vs brand color)

Fix this here and on the popper demos ✅

on the switch page, the focus when using Tailwind is on the thumb, while when using system is on the whole component, we may want to fix this inconsistency

I managed to remove the focus on the thumb, but couldn't add any focus at all to the component, @danilo-leal @mnajdova could you help me with the focus on the Tailwind Switch demo?

Base UI Button disabled style flashes - I noticed this for the first time now, could be regression done in this PR

There is an open issue & PR about this! https://github.com/mui/material-ui/pull/39212

Could you also take a look at Slider's focus ring? It doesn't conform to a11y requirements from https://www.w3.org/WAI/WCAG22/Understanding/focus-appearance-minimum ("has a contrast ratio of at least 3:1 against the same pixels in the unfocused state")


Add rouge metric evalution for llama 70B with orca datasets

Fixes # (issue)
use rouge metric to evaluate the correctness of the model, it uses openorca dataset

OH PR: https://github.com/huggingface/optimum-habana/pull/1068


Move ui notification to service layer

Extract from #22266

@lunny please fix the merge conflicts. :tea:


Should defer panel updates when refreshing Tree periodically

Philippe reported that FP Updates are not being deferred when updating the tree control.

Fixed in https://github.com/JKISoftware/JKI-State-Machine-Editor/releases/tag/2013.0.5


Align transaction with ethereum execution apis

Description
https://github.com/hashgraph/hedera-json-rpc-relay/blob/73d8244f0c811f1d74b93791f3905a67bf0c9c0b/packages/relay/src/lib/eth.ts#L1032-L1052
gas, transactionIndex, value require EthImpl.numberTo0x because they are uint (see https://github.com/ethereum/execution-apis/blob/main/src/schemas/transaction.yaml)
Steps to reproduce
eth_getBlockByNumber [17165012, true]
Additional context

Hedera network
testnet
Version
0.3.0
Operating system
Linux

All uints should be hex encoded according to schema


Authentication failed (required domain name)

I have TFS 2015 installed in network with Active Directory. When I tring to build my code on Linux machine (CentOS) I have error:
fatal: Authentication failed for 'http://username:password@tfs/tfsserver/DefaultCollection/_git/project/'
/usr/local/git/bin/git failed with return code: 128
The problem is user name: it is without domain name.
But if I specify domain name, tfs agent escapes domain name separator (@ or \) and I got error again:
fatal: Authentication failed for 'http://username%40domain_name:password@tfsserver/tfs/DefaultCollection/_git/project/'
In console command
git clone http://username@domain_name:password@tfsserver/tfs/DefaultCollection/_git/project/
works Ok.
So:

Can I tune TFS to accept only user name in the git?
Can I turn out escaping in the user name for git?

Did you follow all the on-prem instructions?
https://github.com/Microsoft/vso-agent/blob/master/docs/onprem.md

Setting the "Default domain" for the Basic Authentication settings in IIS might workaround the issue.

Yes: I followed all the on-prem instructio. And yes: I set default domain in IIS.

I have solved it:
Need to use NTLM authenfication in TFS.


Revert the isClicked property for the checkbox

This is my bad. I thought that this was the only solution since I could not add a defer in my code, but it turns out that it is possible (I cleaned up some old code) and that without removing the code here, it doesn't preventDefault or stopPropagation correctly with a onClick prop.

Codecov Report

Merging #625 into master will decrease coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #625      +/-   ##
==========================================
- Coverage   99.72%   99.72%   -0.01%
==========================================
  Files         260      260
  Lines        6599     6597       -2
  Branches     1533     1533
==========================================
- Hits         6581     6579       -2
  Misses         18       18

Impacted Files
Coverage Δ

src/components/checkbox/Checkbox.tsx
100% <100%> (ø)
:arrow_up:

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 678e19c...279ecfb. Read the comment docs.


[polycode c++] setColor does not work right

this has cropped up. but when using setColor like this:
circle01 = new ScenePrimitive(ScenePrimitive::TYPE_CIRCLE,100,100,30);
circle01->setColor(0.0, 1.0, 1.0, 1.0);
circle01->setPosition(0);
scene->addChild(circle01);

circle02 = new ScenePrimitive(ScenePrimitive::TYPE_CIRCLE,50,50,30);
circle02->setColor(1.0, 0.0, 1.0, 1.0);
circle02->setPosition(0);
circle01->addChild(circle02);

circle03 = new ScenePrimitive(ScenePrimitive::TYPE_CIRCLE,30,30,30);
circle03->setColor(0.0, 1.0, 0.0, 1.0);
circle03->setPosition(0);
circle02->addChild(circle03);

it does not make it green on the circle03. very strange. it seems fine for the first 2, but the third just doesn't go may other colors

adding something as a child with the parent having a color affects the child's color: there's a entity flag called colorAffectsChildren which you have to set to false to get the real colors (for the first 2 circles)

makes sense i guess. i just would have thought to make it less confusing that setColor would be univerasl in use.
why would it beike this though, i do know why as such, but wouldnt setColor be more efficient code wise?
cheers


Why do M$ customers have to google for the answer to the top 2 PowerShell use cases? (Setup and Update PowerShell)

Prerequisites

[X] Write a descriptive title.
[X] Make sure you are able to repro it on the latest released version
[X] Search the existing issues.
[X] Refer to the FAQ.
[X] Refer to Differences between Windows PowerShell 5.1 and PowerShell.

Steps to reproduce

Wait until M$ releases a new PowerShell release
M$ reports the new release e.g in VS Code or PowerShell
A customer decided to upgrade (or install) PowerShell
M$ does not offer the answer to the top 2 most important use cases in readme.md: upgrade / install
Even if customers have found the getting started link (probably by accident, because it is not obvious), then they do not easily get the answer to those 2 most important use cases.
As usual for modern M$ SW, it's even worse: readme.md does not even have a TOC

Expected behavior
As a customer, we expect:
1. that M$ employees understand their craft and work professionally from a to z, i.e. including documentation. it should be better than our first-year apprentices create it.
2. and very practical that there is a TOC in readme.md.
3. and in the TOC there is a section that explains how to install and update the SW
4. it is hoped that the instructions for installation and upgrade are done with one command each and that it always works, i.e. installation and upgrade are intelligent and can solve any problems by themselves.

Actual behavior
See "Steps to reproduce"

Error details
No response
Environment data
Of course, it should work with both PowerShell versions:
$PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.3.5
PSEdition                      Core
GitCommitId                    7.3.5
OS                             Microsoft Windows 10.0.19045
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

$PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.19041.3031
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.3031
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>

Visuals
No response

Adding the below from my experience from within the community as FYI to those coming to this issue but do think this is best for @sdwheeler / @michaeltlombardi to add to the below points if they think this is needed.

There docs both in this repo and in the PowerShell Docs Repo which get published to the official PowerShell Docs Pages - can these help with the points above...?
Upgrade/install processes can be maintained in so many different ways, some managed by individual admins/devs or by IT Teams & some of this is already contained in readme.md and in the official docs

It is hard to keep all dos updated across all the different places without lots of duplication & all involved are doing best as possible on keeping official docs maintained including the readme.md in here
We could amend the Get PowerShell section in readme.md` of this repo updated to clarify around upgrade processes.

Depending on how you are reading the Readme.md you can in lots of tools get an autogenerated TOC in the previewer of  any markdown file from how the headers are used.

Listing a TOC inside of these files adds more error prone work that needs additional effort to maintain.

I recommend testing out some other tooling for previewing or reading these files as this might help you going forward, there are lots out there that have this feature, especially those that publish to the official docs repo.

I hope the above helps those reading this issue.

There are a number of methods of instilling PowerShell - you can use the MS Store, any of the package managers (e.g. Chocolatey), or use the install-PowerShell.ps1 script here in this repo. Updating is also easy: you can get AU to update it or have the Store update it for installations via the store. Personally, I just use the install-powershell.ps1 script to install and update.


Two problems with @ppxCustom

Problem 1: Parse errors
@ppxCustom as now implemented assumes that parsing can always be done successfully.
Consider a schema where
type Item {
  id: ID!
  name: String!
  hasPriceRange: Boolean!
  price: Int
  minPrice: Int
  maxPrice: Int
}

and our domain knowledge tells us that if hasPriceRange is false, then price should be non-null. If hasPriceRange is true then minPrice and maxPrice should be non-null.
The ideal definitions client side don't work with @ppxCustom because that wants
module Custom = {
  type t = someType;
  let parse: raw => t;
  let serialize: t => raw;
}

and thus doesn't work if parsing could fail. One could do something like;
module Custom = {
  type t = result(someType, string);
  let parse: raw => t;
  let serialize: t => raw;
}

but making serialize accept a result is hardly ideal either.
Proposal
A new directive, e.g. @ppxParser, that accepts something like
module Custom = {
  type t;
  let parse: raw => result(t, 'error);
  let serialize: t => raw;
}

Full client-side implementation of Item
type price =
  | Price(int)
  | PriceRange(int, int);

module Item = {
  type t = {
    id: string,
    name: string,
    price,
  };
};

type raw = {
  id: string,
  name: string,
  hasPriceRange: bool,
  price: option(int),
  minPrice: option(int),
  maxPrice: option(int),
};

module ItemDecoder = {
  type t = Item.t;
  let parse: raw => result(t, 'error) =
    ({id, name, hasPriceRange, price, minPrice, maxPrice} as p) =>
      switch (hasPriceRange, price, minPrice, maxPrice) {
      | (false, Some(price), _, _) => Ok({id, name, price: Price(price)})
      | (true, _, Some(minPrice), Some(maxPrice)) =>
        Ok({id, name, price: PriceRange(minPrice, maxPrice)})
      | _ => Error({j|Error parsing price: $p|j})
      };

  let serialize: t => raw =
    ({id, name, price}) => {
      switch (price) {
      | Price(price) => {
          id,
          name,
          hasPriceRange: false,
          price: Some(price),
          minPrice: None,
          maxPrice: None,
        }
      | PriceRange(minPrice, maxPrice) => {
          id,
          name,
          hasPriceRange: true,
          price: None,
          minPrice: Some(minPrice),
          maxPrice: Some(maxPrice),
        }
      };
    };
};

Problem 2: Serialization isn't always possible or desired
@ppxCustom forces the programmer to implement serialize. That might be fine (if somewhat cumbersome) for small fragments and small queries, but for large top-level queries and more complicated types it will add a lot of extra work. The programmer knows from the application requirements whether they want to be able to serialize. @ppxCustom doesn't know, but still forces them to be able serialize.
I can even imagine cases where it's impossible to write serialize or where, to make it possible, the programmer would have to write the types so that they work for serialization, instead of what is best for the application.
Proposal
Reintroducing the old @bsDecoder directive as @ppxDecoder. It accepts a function that parses the t_whatever type into what the application needs, but which most often would be either t or result(t, 'error).
This was suggested by @jfrolich in #187 as a measure to ease upgrading to 1.0, but I now think that such a directive is generally needed

I would very much like to contribute PRs for this (and the other issues I've opened), but I need some help with getting up to speed with contributing (e.g. as detailed in #205).

@jfrolich Wrote in #208

Interesting. I wonder if you make a conversion that is not always possible if that's not better to be done in the application code.

and I think that could be right. Don't think that changes the problem that we need a directive with a parse function that's able to handle errors like in the price example. The argument is laid out very convincingly in @lexi-lambda's excellent Parse, don't validate

My two cents - for me, an invalid custom scalar is a protocol error, just as if the server had sent malformed graphql - I think it should show up to application code the same way.  By the time it gets into application code I don't want to worry that there was some protocol error in my custom fields - just like I don't have to worry about built-in fields like Float.  So, I do think that @ppxCustom should allow me to indicate that parsing failed, either through option or result.

You can parse into an option or result type, just make that part of the type that you are converting to.

BTW you don't need to implement a serialize function, this is only necessary if you make use of it. You can just return a dummy value and/or throw an exception.


Release available on GitHub points to version 0.9.1 when 0.9.2 is available on PyPI

Suggesting version bump for the GitHub release.

Done, thanks for the ping!


PDF printing does not work on 128.0.2739.42 as service

PDF-printing through msedgedriver seems to have stopped working after the last update (we think). It times out:
OpenQA.Selenium.WebDriverTimeoutException: timeout: Timed out receiving message from renderer: 10.000
How to reproduce:

Clone the minimal reproduction repo: https://github.com/rasmusrim/msedgedriver-bug-minimal-reproduction
Build the project
Download the most recent msedgedriver.exe file and put it into bin/Debug/net7.0
Create a local user account (mine is called svcft)
Add the minimal reproduction as a service:

New-Service -Name "Minimal reproduction" -BinaryPathName "D:\repos\minimal-reproduction\minimal-reproduction\bin\Debug\net7.0\minimal-reproduction.exe"

Make the service run as the local user account you created.
Start the service
See error message in log.txt:

Seems to also be a problem with Chrome. Will create issue there.

It seems as if adding no-sandbox solves the problem:
options.AddArgument("no-sandbox");


1.3.0: JS: closing an alert-message inside a modal hides modal too.

I think the title is self explanatory guys.
I'm using Bootstrap 1.3.0 and default functionality.
I know the reason of that behavior (delegation of the click event up to the body and the impossibility to stop its propagation) and because of that this is my proposal:
Enforce the use of a second class like "close-modal" in the link responsible for hiding the modal, so that when a click event fires you can check if it was originated in a link with class "close close-modal". Actually I would use the class "modal" but it has lots of CSS styles applied, that's why I chose "close-modal" (action-widget).
HTML

       ×

Javascript check in bootstrap-modal.js v1.3.0
hide: function (e) {

    e && e.preventDefault()

    if ( e && ! $(e.target).hasClass("close-modal") ) {
        return;
    }

// rest of the code

This is the patch I use in production right now and it's working beautifully.
Of course, this should be done on every plugin that uses delegation on the body element.
It's simple and the only way around this issue I'm afraid.

we're moving away from classes to data-attributes in 2.0. In the meantime you can either continue to use this - or specify a unique selector option for the alert plugin. Thanks!

Thanks!! Waiting for 2.0 to come out!!


Change parent Base for models

Related to issue #82

Closing.
When testing in a freshly generated Rails app, everything works as expected


Canvas app sharing between public cloud and China cloud

[Enter feedback here]
Customer is query about the cross tenant app sharing, between pulic cloud and China cloud.
Scenario: The canvas app is published in China cloud, but shared to user in pulic cloud.
Finding: This seems by design according to PG‘s update on ICM 336442980
Ask: Please help clarify the limitation in the document

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

ID: b5b79de9-91fd-adc9-2515-d2bb84cfd2b2
Version Independent ID: 62c9fd03-2d88-475f-c857-75647f263a81
Content: Share a canvas app with guest users (contains video) - Power Apps
Content Source: powerapps-docs/maker/canvas-apps/share-app-guests.md
Service: powerapps
Sub-service: canvas-maker
GitHub Login: @alaug
Microsoft Alias: alaug

Thanks for your comment, @xuehzhu. This issue has been assigned to the doc author for review.


Aniruddha/viewer component

[Grouping-mapping-widget] Next button on create group form should be disabled until required fields are filled.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Please update the PR title


Documentation Search Functionality Incorrectly Redirecting to Overview Page

Describe the bug
On the website documentation, using the algolia search bar to jump to different parts of the documentation leads to an incorrect redirect.
Your Example Website or App
https://tanstack.com/router/v1/docs/framework/react/overview
Steps to Reproduce the Bug or Issue

Go to the docs
Hit CMD-K (or CTRL-K) to open the search bar
search for something like Search Params
You will be redirected to the Overview page.

Expected behavior
The expected behavior is to see the Search Params Page, rather than the Overview Page.
Screenshots or Videos

Platform

OS: [macOS]
Browser: [Edge]

Additional context
No response

Seems to me either the index for Algolia needs to be updated or a proper temporary redirect needs to be set up through the docs web server. I might be stating the obvious but thought I'd chime in because it's quite annoying to use the docs when the search doesn't work and I can't tell how to send in a PR for this.
(thanks for the router looks great so far :sweat_smile:)

This issue really needs some attention. Using the docs is super annoying as it's quite big and using search is the only way to navigate it easily.
Here's an example:
Correct link: https://tanstack.com/router/v1/docs/framework/react/api/router/RouteOptionsType#pendingms-property
Link in search results: https://tanstack.com/router/v1/docs/api/router/RouteOptionsType#pendingms

@tannerlinsley looks like you've fixed it!!!


Add workload config implementation

Issues: #267

Definition of Done
The PR shall be merged only if all items mentioned in CONTRIBUTING.md have been followed. In case an item is not applicable as described, please provide a short explanation in the description.

[x] All steps in CONTRIBUTING.md have been handled

Since merging main 1 stest is failing. I can also see that the main branch verification is failing for now.

@krucod3: merged the latest main branch to include the fix for the unstable stest. Pipeline is now passing again.

Merged main into branch.


Style update: Adjust colors on error state of inputs in Dark Mode

Purpose: The color of red we're using in the error state of all inputs in dark mode is very pale and hard to quickly identify even for those who have no difficulty viewing colors. We just need to change the shades of red we're using slightly.
Figma: https://www.figma.com/design/Tr95MXTnqB7usxQz1aPKHL/Components---Feedback?m=auto&node-id=825-13558&t=HV7asUcgNyHVObLM-1

Change color of border from danger-200 to danger-300
Change icon color from danger-200 to danger 300
Keep the text of the error at danger-200 in order to maintain the necessary contrast ratio needed for a11y.
Components impacted:

Text field
Text area
Time
Number
Password
Date picker
Select
Native select
File upload (Dropzone)
Radio button
Checkboxes

Text field ✅
Text area ✅
Time ✅
Number ✅
Password ✅
Date picker ✅
Select ✅
Native select ✅
File upload (Dropzone) ✅
Radio button ✅
Checkboxes ✅
Verified in:
https://next--upbeat-sinoussi-f675aa.netlify.app/


Test enumeration support xcscheme variables

Also adding debugging support (fixes #11), and more robust file handling on the dylib, managing situations where the simulator launches the xctest application more than once

cc @justinseanmartin  @mikelikespie

Thanks, LGTM!


fix(ui): Update min and step size of autoscaling target field

Description
This PR introduces a fix to address a tiny UI bug whereby a red line appears when an autoscaling target value that is outside the configured step size (e.g. 1.003 when the step size is 1) is set:

The fix implemented is exactly the same as what has been done for Turing here: https://github.com/caraml-dev/turing/pull/380#discussion_r1595000003.
Modifications

ui/src/pages/version/components/forms/components/AutoscalingPolicyFormGroup.js - Update to some props passed to the EuiFieldNumber component

Tests

Checklist

[x] Added PR label
[ ] Added unit test, integration, and/or e2e tests
[x] Tested locally
[ ] Updated documentation
[ ] Update Swagger spec if the PR introduce API changes
[ ] Regenerated Golang and Python client if the PR introduces API changes

Release Notes
None

Thanks for the quick review @ariefrahmansyah ! Merging this now!


AMBARI-23601. NN Federation Wizard: Format NameNode fails due to stopped NameNodes

What changes were proposed in this pull request?
NameNodes are stopped in first step of the flow. This prevents Format NameNode step from getting clusterId of existing NameNodes.
NameNodes should be started, too, after JournalNodes.
How was this patch tested?
21516 passing (36s)
48 pending

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/1893/
Test FAILed.
Test FAILured.


Add missing author_id to actions and filters

@skysarwer I added the author_id to the actions and filters, so that you have the info for your buddypress needs.


Remove Guest User Limitations Powershell

How do you allow guest users to run powershell commands on VM.

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

ID: c6eb6697-4ace-adb6-c922-df8a9a485283
Version Independent ID: fd4ce34d-d55e-92af-d71a-625210ad3a63
Content: Properties of a B2B collaboration user - Azure Active Directory
Content Source: articles/active-directory/b2b/user-properties.md
Service: active-directory
GitHub Login: @msmimart
Microsoft Alias: mimart

@SamBlakeC Thank you for your feedback . We will investigate and update the thread.

@SamBlakeC Are you able to login to Azure VM using a guest user account ? As per my understanding Azure AD users won't be able to access Azure VMs unless you provision Azure AD Domain Services and join the VMs to the domain, then add the users as local administrators to the VM.

@SaurabhSharma-MSFT No, I'm referring to the Run-Command within the Azure portal. Guest's can't use the Run Command to run a custom powershell script or any powershell script for that matter despite being assigned the VM contributor role.

@SamBlakeC ok, I am able to reproduce your issue and working internally with the products team.  I will update you as soon as I hear back.

@SaurabhSharma-MSFT Any update?

@SamBlakeC Apologies for the delay but I am still working with the product group to get any updates on this.  I will update you at the earliest.

@SaurabhSharma-MSFT Any update on the progress?

@SamBlakeC The Product team is still investigating this issue. I will confirm back as soon as any updates.

@SamBlakeC Thanks for your patience. This has been identified as a product bug but unfortunately at this point we will have to wait and see when its gets prioritized.

@SamBlakeC We will now proceed to close this thread. If there are further questions regarding this matter, please reopen it and we will gladly continue the discussion.


Fix undoing copy and pasted text

Details

This PR bumps the version of react-native-live-markdown to 0.1.73. This version contains the fix for undoing copy and pasted text and also changes the input history logic on web (0.1.72). More information here
Fixed Issues

$ https://github.com/Expensify/App/issues/39255
PROPOSAL:
Tests

Paste the content in the composer.
Undo the paste via CTRL and Z.
Verify if pasted text was undone
Switch chats, and before the chat fully loads, try to paste and undo text quickly
Verify the composer state like in step 3

[X] Verify that no errors appear in the JS console

Offline tests

Same as tests
QA Steps

Same as tests

[X] Verify that no errors appear in the JS console

PR Author Checklist

[X] I linked the correct issue in the ### Fixed Issues section above
[X] I wrote clear testing steps that cover the changes made in this PR

[X] I added steps for local testing in the Tests section
[X] I added steps for the expected offline behavior in the Offline steps section
[X] I added steps for Staging and/or Production testing in the QA steps section
[X] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[X] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[X] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[X] I included screenshots or videos for tests on all platforms
[X] I ran the tests on all platforms & verified they passed on:

[X] Android: Native
[X] Android: mWeb Chrome
[X] iOS: Native
[X] iOS: mWeb Safari
[X] MacOS: Chrome / Safari
[X] MacOS: Desktop

[X] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[X] I followed proper code patterns (see Reviewing the code)

[X] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[X] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[X] I verified that comments were added to code that is not self explanatory
[X] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[X] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[X] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[X] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[X] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
[X] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[X] I verified the JSDocs style guidelines (in STYLE.md) were followed

[X] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[X] I followed the guidelines as stated in the Review Guidelines
[X] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[X] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[X] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[X] I verified that if a function's arguments changed that all usages have also been updated correctly
[X] If any new file was added I verified that:

[X] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[X] If a new CSS style is added I verified that:

[X] A similar style doesn't already exist
[X] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))

[X] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[X] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[X] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[X] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[X] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:

[X] I verified that all the inputs inside a form are aligned with each other.
[X] I added Design label and/or tagged @Expensify/design so the design team can review the changes.

[X] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[X] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native

N/A

Android: mWeb Chrome

N/A

iOS: Native

N/A

iOS: mWeb Safari

N/A

MacOS: Chrome / Safari

https://github.com/Expensify/App/assets/39538890/1afe3153-e088-439a-af39-4dd48e18edbc

MacOS: Desktop

https://github.com/Expensify/App/assets/39538890/491488f3-73c6-407c-b03e-9def67838516

@hoangzinh I can't reproduce the issue that you mentioned. have you run npm i? If yes, try removing node_modules and then run npm i
https://github.com/Expensify/App/assets/39538890/b7ebf129-f8ef-4d88-a4ef-3f0776c83a8e

It looks like this already got upgraded to 1.76 in another PR. Let's close out this one?

RIght, I'm closing this PR then


Feature Request - Support for playlists

Hello, thanks for this app. I particularly like that I can play music alongside in the background while watching videos. Couldn't find any other player to support this.
The one thing I still need - instead of adding a single file, I would like to add a playlist of songs to play consecutively. Imported from m3u file or from Android's already existing playlists. Shouldn't be hard to implement?

I know this isn't an ideal solution, but if I wanted a playlist like functionality I would just use some sort of audio joiner app to join the playlist into one audio file. Obviously this method would take up a bit more space, but unless you're dealing with lossless audio or extremely long audio files it shouldn't be too big of a deal with modern storage sizes.
The reason I'm hesitant to add this feature to the app is that it uses SAF to get permission for specific files, and I'm not sure how this would work with playlists. I think the user would have to manually give permission to read the playlist file and all of the audio files that are in it, instead of just being able to add the playlist alone. I'm also a little busy at the moment, so if I were going to add this it probably wouldn't be for a few weeks at least.

Joining audio is a good work around, but seems like too much effort in the long term. I would also like the option to play the tracks in random order if possible.
Regarding SAF: it might be enough to pick the playlist file via SAF. To access the music, there is an permission  "Allow access to media", which is used by Vanilla Music Player e.g.
Btw, this is not urgent at all, I can wait as long as it takes. I'm glad you are publishing this as free software :)

Alright, I'll look into it when I get a chance.

Sorry this ended up taking so long to finish, but I did add it as part of the 1.5.0 update. I'm not sure why but this issue didn't get closed automatically for some reason. I wasn't able to get the importing of playlist files working, so you'll have to select all of the files you want as part of the playlist in the system file picker that appears when you tap the add button. The 1.5.0 update is still working it's way through F-droid, but you can download the apk directly on the v1.5.0 release page if you want.


implements --package for pip tree

Summary
partially resolves https://github.com/astral-sh/uv/issues/4439

Test Plan
the existing tests pass + added a couple of tests to ensure --package behaves as expected.

Looks like your merge got messed up somewhere and you ended up overwriting some changes. Because this is a small PR I would suggest reapplying you changes to pip/tree.rs manually with the latest changes.

Thanks!


Add files via upload

Your checklist for this pull request
Author name
Author:
Saumil
About your game
What is your game about?

Use WASD to move 👍 (to restart just run the game again :D) Now with J added to reset!!
Code
Check off the true items.

[x] The game was made using the Sprig editor.
[x] The game is placed in the in the /games directory.
[x] The code is significantly different from all other games in the Sprig gallery (except for games labeled "demo").
[x] The game runs without errors.
[x] The name of the file/game contains only alphanumeric characters, -s, or _s.
[x] The game name is not the same as the others from gallery

Image (If an image is used)

[ ] The image is in the /games/img directory.
[ ] The name of the image matches the name of your file.

Thanks for your PR!

Hey! Nice game! There is one thing you can improve upon: the player shouldn't be able to go to the next level if they haven't collected all the grass, and right now they can do so. So pls fix that and I can ship your device!

Oh ok! Fixing now

heyo @Cosmin-Mare  im done with the requested changed!

GJ responding to @Cosmin-Mare 's feedback, @saumilthecode !  And neat game!  If you're a teen, and if you haven't already received one, you're eligible to receive a Sprig device by filling out this form!  Please feel free to join the Hack Club Slack and share your game w/ others in the #sprig channel!

yay thanks!!


Supply typical development mode configuration for Thymeleaf

This allows for "hot reloading" of uncached template files from the project source directory while in development mode.

@delitescere thanks for your contribution! I've extracted your sample into a separate project and referenced it in docs: https://ktor.io/docs/thymeleaf.html#auto-reload.


"Make a variable" item would be better as something other than a block

The "Make a Variable" block is not really a block, in that you can'd drag it into your program
So instead, it would make more sense as a button

Or at least, something else different from the blocks.

Agreed. This is a new blockly feature. We will see about skinning it.

I do not understand the issue.
On a practical point, the two pictures: the one above is the present one @ https://pxt.microbit.org/beta and shows what I believe is a button ie probably not a block so the Make a variable is somthing other than a block now?
The next point, is not a practical point:
When do I need a button or block or anything that comes out of the Variables side bar menu?
I pull out an object, perhaps throw a variable at it and then maybe change it's name when it is on the canvas.
I have never seen children preparing a variable as we would do when writing javascript ....

"Make a new variable" is not doing what is expected:
let me = "owen" makes a new string variable
Make a new variable is doing
let me

+1 for @jaustin request.

Here's a picture of how Python did it

The python screenshot is default blockly, we've already skinned it to have the same color as the other blocks in the Variables category. If we'd like we can change it back to the default color.
As for making it take up the whole space (@jaustin's initial suggestion), that'd going to be difficult as Blockly is in control of the specific coordinates and dimensions of that button.
@jaustin @pelikhan what color do you think that button should be? The default blockly grey?

The button should look like a button - same color as the current theme, same corners, etc...

Agree with Peli, looking like a button and not like the other blocks is key.


MapView in a ViewPager don't scroll horizontally

Issue Type
[x] Bug
[x] Improvement
Description
A MapView in a ViewPager can't scroll horizontally because the ViewPager intercept the scroll gesture and swipe the views. Note that vertical scrolling works fine.
After searching around a solution was found by adding two lines in the onTouchEvent() method:
@Override
public boolean onTouchEvent(MotionEvent event) {
	// Prevent  the ViewPager to swipe its views
	// See https://stackoverflow.com/questions/8594361/horizontal-scroll-view-inside-viewpager
	if (event.getAction() == MotionEvent.ACTION_MOVE && getParent() != null) {
		getParent().requestDisallowInterceptTouchEvent(true);
	}
	return false;
}

This could be enhanced by detecting (in an ACTION_DOWN) that the user initiate the scroll near the left or right border and then not calling requestDisallowInterceptTouchEvent(true) in that case.
This was suggested here
My 2 cents
Yves

Related sample
https://github.com/osmdroid/osmdroid/blob/master/OpenStreetMapViewer/src/main/java/org/osmdroid/samplefragments/layouts/MapInAViewPagerFragment.java

@ycuicui was that line of code added in map view or in the view pager?

The lines where added in the MapView

Thanks for the code. I'm a bit leary to commit this, but it's fairly simple for someone to extend MapView and just copy and paste your fix. Not everyone uses the map in a view pager and i'm unsure if there will be an unintended side effects from the code.

I think that use of ViewPager is a common pattern. However i did not notice any regression and this is so simple that you could commit it without fear!
To be complete, and for those that could be interrested in the workaround, i use the following code to allow swiping the ViewPager by touching the screen borders:
// true if we intercep MOVE events in order to prevent the view pager to swipe views
private boolean intercepMove = false;

@Override
public boolean onTouchEvent(MotionEvent event) {
	// Prevent  the ViewPager to swipe instead of scrolling
	// See https://stackoverflow.com/questions/8594361/horizontal-scroll-view-inside-viewpager
	// Touching the borders allow the view pager to swipe
	switch (event.getAction()) {
		case MotionEvent.ACTION_DOWN:
			// See if we touch the screen borders
			intercepMove = event.getX() > rightLimit && event.getX() < leftLimit;
			break;
		case MotionEvent.ACTION_MOVE:
			if (intercepMove && getParent() != null) {
				getParent().requestDisallowInterceptTouchEvent(true);
			}
	}
	return false;
}

@ycuicui what are you using for right and left limits?

I use 5% of map width for left limit and 95% for right limit
Sorry just saw i made a mistake in the above code. Should be read as:
// true if we intercep MOVE events in order to prevent the view pager to swipe views
private boolean intercepMove = false;

@Override
public boolean onTouchEvent(MotionEvent event) {
	// Prevent  the ViewPager to swipe instead of scrolling
	// See https://stackoverflow.com/questions/8594361/horizontal-scroll-view-inside-viewpager
	// Touching the borders allow the view pager to swipe
	switch (event.getAction()) {
		case MotionEvent.ACTION_DOWN:
			// See if we touch the screen borders
			intercepMove = 100 * event.getX() > 5 * getWidth() && 100 * event.getX() < 95 * getWidth();
			break;
		case MotionEvent.ACTION_MOVE:
			if (intercepMove && getParent() != null) {
				getParent().requestDisallowInterceptTouchEvent(true);
			}
	}
	return false;
}

Sorry.

i'm going to close this as it is super simple to extend the MapView in your own class and add the fix. Users (like @ycuicui ) may want to use custom values for the buffer sizes based on use cases

thanks for the contribution though!

OK
Anyway, if you want to see this in action, you can try my app https://play.google.com/store/apps/details?id=com.panaustik.geotrack
Thanks for your nice work.

looks great! i'll add it to the wiki


wrong results when simulating polyyne

Hello everyone,
I am doing an all electron calculation of polyyne (the all-electron part is essential for what I'm doing). But the results are not what I expect. I use the following code:
from pyscf import lo

import numpy as np
from pyscf.pbc import gto, scf, gw, mp, df
from pyscf.pbc.gw import krgw_ac
from pyscf import lib
from pyscf.pbc.tdscf.krhf_slow import TDRHF
from pyscf.lib import chkfile
import pywannier90 as pyw90
from pyscf.lib import logger
from pyscf.tools import cubegen

import matplotlib.pyplot as plt

import sys
import os
from datetime import datetime
import shutil

import pyscf.pbc.tools.pyscf_ase as pyscf_ase
from ase.dft.kpoints import sc_special_points as special_points, get_bandpath

cd = os.path.dirname(__file__)
sd = cd+'/{:%d_%m_%y_%H_%M_%S}'.format(datetime.now())
os.mkdir(sd)

a = 2.583

cell = gto.Cell()
cell.atom = [['C',[0.660,5,5.05]],
             ['C',[1.923,5,5.05]]]
# cell.dimension = 1
cell.a = np.eye(3) * [a, 10, 10.10]
# cell.basis = "ccpvdz"

cell.basis = 'ccpvtz'

cell.spin = 0
# cell.ke_cutoff = 600     # [Ha]
cell.build();

kmesh = [5,1,1]
kpts = cell.make_kpts(kmesh)
nkpts = kpts.shape[0]

run_scf = True

if run_scf:
    PBE = scf.KRKS(cell, kpts)
    # PBE = scf.addons.smearing_(PBE, sigma=.1, method='fermi')
    PBE.xc = 'PBE'
    PBE.verbose = 7
    PBE.init_guess_breaksym=False
    with_df = df.GDF(cell, kpts)
    with_df.auxbasis = 'def2-universal-jfit'
    with_df._cderi_to_save = sd+'/cderi.h5'
    with_df = with_df.build(j_only = False)
    PBE = PBE.density_fit(with_df=with_df)
    cell.build()
    PBE.init_guess = "1e"
    PBE.chkfile = sd+'/polyyne_PBE.chk'
    PBE.run()

else:
    PBE = scf.KRKS(cell, kpts)
    # PBE = scf.addons.smearing_(PBE, sigma=.1, method='fermi')
    PBE.__dict__.update(chkfile.load("/home/simon/PySCF/polyyne/TZ_polyyne/polyyne_PBE.chk", 'scf'))

# Dump flags
PBE.dump_flags()
PBE.dump_scf_summary()

mo_coeff = PBE.mo_coeff_kpts
for i in range(60):
    arr = np.zeros(mo_coeff[0][i].shape)
    arr[i] += 1
    cubegen.orbital(cell, sd+f"/mo_{i}.cub", mo_coeff[0][i])

and i get the following orbital for the deepest bound energy state at the gamma-point:

I would expect an s-orbital-like state on one of the carbon atoms but this is clearly not the case...

found it:
cubegen.orbital(cell, sd+f"/mo_{i}.cub", mo_coeff[0][i])
should be
cubegen.orbital(cell, sd+f"/mo_{i}.cub", mo_coeff[0][:, i])


Question about align center

Sorry about my ignorance but
Where can I disable the align center.

Any alignment would be handled by the css, so look for a text-align: center that affects the element you're trying to textillate. If you have a public page, I'd be happy to take a look.

I figured out, there was an issue with the helper class from the template I'm using.
(not related to your script).
Thanks for the great script!


Fix terminology.

This change is

I'ved decided to rename ObjectOrigin to Location.

https://reviewable.io/reviews/starkware-libs/cairo/3435#-


Require support for swift 4 and/or xCode 9

I was working on a project which I required to updated to support Swift 4. After making related changes, When I have run the application I got the similar error mentioned below. After which I have created a new and empty project to check which also encountered the same error.
What did you do?
Initially, I have created a project in xCode 9 with Swift 4 and add Alamofire in pod file and run the code without making any change in code.
What did you expect to happen?
Run the code as expected after a successful build.
What happened instead?
Instead of building successful, It shows an error:

PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/team/Library/Developer/Xcode/DerivedData/demo-hiqqhzvpypexobfigwafnyugxrfq/Build/Intermediates.noindex/demo.build/Debug-iphoneos/demo.build/Script-021F53E20265D3A40EC0B9C6.sh
cd /Users/team/user1/Development/After_Me/demo
/bin/sh -c "/Users/team/Library/Developer/Xcode/DerivedData/demo-hiqqhzvpypexobfigwafnyugxrfq/Build/Intermediates.noindex/demo.build/Debug-iphoneos/demo.build/Script-021F53E20265D3A40EC0B9C6.sh"
mkdir -p /Users/team/Library/Developer/Xcode/DerivedData/demo-hiqqhzvpypexobfigwafnyugxrfq/Build/Products/Debug-iphoneos/demo.app/Frameworks
rsync --delete -av --filter P .*.?????? --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "/Users/team/Library/Developer/Xcode/DerivedData/demo-hiqqhzvpypexobfigwafnyugxrfq/Build/Products/Debug-iphoneos/Alamofire/Alamofire.framework" "/Users/team/Library/Developer/Xcode/DerivedData/demo-hiqqhzvpypexobfigwafnyugxrfq/Build/Products/Debug-iphoneos/demo.app/Frameworks"
building file list ... done
Alamofire.framework/
Alamofire.framework/Alamofire
Alamofire.framework/Info.plist
sent 1782581 bytes  received 70 bytes  3565302.00 bytes/sec
total size is 1782127  speedup is 1.00
basename: invalid option -- 's'
Try `basename --help' for more information.
Command /bin/sh failed with exit code 1

Alamofire Environment
Alamofire version: 4.5.0
Xcode version: 9_GM(Beta)
Swift version: 4.0
Platform(s) running Alamofire: iOS 10.3.3
macOS version running Xcode: 10.12.6

My local test project that integrates Alamofire with a project builds fine. It's likely you have a local Xcode issue, so I suggest you look into that.
In the future, you should open questions like this on Stack Overflow and tag alamofire.
Cheers. 🍻

From our Contribution Guidelines
Asking Questions
We don't use GitHub as a support forum. For any usage questions that are not specific to the project itself, please ask on Stack Overflow instead. By doing so, you'll be more likely to quickly solve your problem, and you'll allow anyone else with the same question to find the answer. This also allows maintainers to focus on improving the project for others.


Add DB migration info to README

Summary
Added short description where db migrations should be placed and why.

Hello @batebobo,
Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.


use datafusion plan_to_sql function instead of expr_to_sql

Hello,
Following on #18, #99 and #102, we are thinking to use the plan_to_sql function within the SqlTable.scan() implementation, instead of generating the SQL query using the sql() function from SqlExec.
The proposed approach is:

From the scan() function -> create a new logical plan -> pass it to the plan_to_sql function -> pass the generated SQL string to SqlExec.

One concern with this approach is that we may lose the ability to implement custom logic for each engine. A possible solution would be to use the CustomDialect for engines that don't have supported dialects in DataFusion.
cc: @phillipleblanc, @backkem

This makes sense to me.

Resolved with #106


crash in v 2.6.5

there is an error happens sometimes and my app crashing:
2024-01-23 17:08:26.538  5180-5881  libc                    com.myvapp                A  Fatal signal 6 (SIGABRT), code -6 in tid 5881 (Thread-264)
2024-01-23 17:08:26.680  5890-5890  DEBUG                   pid-5890                             A  pid: 5180, tid: 5881, name: Thread-264  >>> com.myvapp <<<
2024-01-23 17:08:26.687  5890-5890  DEBUG                   pid-5890                             A      #03 pc 00042021  /data/app/com.myvapp-NmJ98TzCG94QTFCKqEedSA==/lib/x86/libhev-socks5-tunnel.so (netif_add+545)
2024-01-23 17:08:26.687  5890-5890  DEBUG                   pid-5890                             A      #04 pc 00041ded  /data/app/com.myvapp-NmJ98TzCG94QTFCKqEedSA==/lib/x86/libhev-socks5-tunnel.so (netif_add_noaddr+45)
2024-01-23 17:08:26.688  5890-5890  DEBUG                   pid-5890                             A      #05 pc 00022dcc  /data/app/com.myvapp-NmJ98TzCG94QTFCKqEedSA==/lib/x86/libhev-socks5-tunnel.so (hev_socks5_tunnel_init+92)
2024-01-23 17:08:26.688  5890-5890  DEBUG                   pid-5890                             A      #06 pc 00021a0d  /data/app/com.myvapp-NmJ98TzCG94QTFCKqEedSA==/lib/x86/libhev-socks5-tunnel.so (hev_socks5_tunnel_main+173)
2024-01-23 17:08:26.688  5890-5890  DEBUG                   pid-5890                             A      #07 pc 00021945  /data/app/com.myvapp-NmJ98TzCG94QTFCKqEedSA==/lib/x86/libhev-socks5-tunnel.so
2024-01-23 17:08:29.440  1753-1829  InputDispatcher         system_process                       E  channel '6ddbfb8 com.myvapp/com.myvapp.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
2024-01-23 17:08:29.466  1422-1470  SurfaceFlinger          surfaceflinger                       E  Failed to find layer (com.myvapp/com.myvapp.MainActivity#0) in layer parent (no-parent).

@heiher i call TProxyStopService() always before start TProxyStartService() like this:

it happens when i destroy VPN via an button and ordering  my app to connect VPN service again.
as i said it just happens sometimes.

Does this patch fix it? https://github.com/heiher/hev-socks5-tunnel/commit/f7506158dc151a97af761b36097c9e5ec87075d6

well, let me to update project to the least version and test it.

@heiher warning: the connection completely not working on this commit.
but in the old hev-jni.c version, it works fine.

i just replaced hev-jni.c with the old version  and it working fine. but in the last version that you added pthread_mutex_t parameters, the connection is not working at all.

@heiher this is my VPN code file :
package com.myvapp

class TProxyService : VpnService() {

    companion object {
        init {
            System.loadLibrary("hev-socks5-tunnel")
        }
    }

    private external fun TProxyStartService(configPath: String, fd: Int)
    private external fun TProxyStopService()

    private fun tun2socksConfig(): File = File(context.filesDir, "tun2socks.yml")

    @delegate:RequiresApi(Build.VERSION_CODES.P)
    private val defaultNetworkRequest by lazy {
        NetworkRequest.Builder().addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)
            .addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED).build()
    }

    private val connectivity by lazy { getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager }

    @delegate:RequiresApi(Build.VERSION_CODES.P)
    private val defaultNetworkCallback by lazy {
        object : ConnectivityManager.NetworkCallback() {
            override fun onAvailable(network: Network) {
                try {
                    setUnderlyingNetworks(arrayOf(network))
                } catch (_: Exception) {
                }
            }

            override fun onCapabilitiesChanged(
                network: Network,
                networkCapabilities: NetworkCapabilities
            ) {
                try {
                    setUnderlyingNetworks(arrayOf(network))
                } catch (_: Exception) {
                }
            }

            override fun onLost(network: Network) {
                try {
                    setUnderlyingNetworks(null)
                } catch (_: Exception) {
                }
            }
        }
    }

    override fun onCreate() {
        super.onCreate()
        try {

            StrictMode.setThreadPolicy(StrictMode.ThreadPolicy.Builder().permitAll().build())
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
                connectivity.requestNetwork(defaultNetworkRequest, defaultNetworkCallback)
            }
    }

    override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
        return START_NOT_STICKY
    }

    override fun onDestroy() {
        super.onDestroy()
        try {
            Thread {
                stopVPN()
            }.start()
        } catch (_: Exception) {
        }
    }

    fun startVPN() {
        try {

            val primaryDns: String = "<IP_ADDRESS>"
            val secondaryDns: String = "<IP_ADDRESS>"

            val builder = Builder()
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
                builder.setMetered(false)
            }

            builder.setMtu(1500)
            builder.setSession(tunName)

            builder.addRoute("<IP_ADDRESS>", 0)

            builder.addAddress("<IP_ADDRESS>", 30)

            builder.addDnsServer(primaryDns)

            builder.addDnsServer(secondaryDns)

            builder.addDisallowedApplication(context.packageName)

            tunDevice = builder.establish()

            reSelectServer()

        } catch (e: Exception) {
            println(e.message.toString())
        }
    }

    private fun runTun2socks() {
        try {

            val tun2socksConfig = arrayOf(
                "tunnel:",
                "  name: $tunName",
                "  mtu: 1500",
                "  multi-queue: true",
                "  ipv4:",
                "    gateway: <IP_ADDRESS>",
                "    address: <IP_ADDRESS>",
                "    prefix: 30",
                "  ipv6:",
                "    gateway: da26:2626::1",
                "    address: da26:2626::2",
                "    prefix: 30",
                "socks5:",
                "  address: <IP_ADDRESS>",
                "  port: 10808",
                "  udp: udp",
                ""
            )
            tun2socksConfig().writeText(tun2socksConfig.joinToString("\n"))

            Thread {
                try {
                    if (tunDevice != null && utils.vpnProfileActive()) {
                       TProxyStopService()
                       TProxyStartService(tun2socksConfig().absolutePath, tunDevice!!.fd)
                    }
                } catch (_: Exception) {
                    onDestroy()
                    utils.startMainActivity("serviceCrashed")
                }
            }.start()

        } catch (_: Exception) {
        }
    }

    @Suppress("DEPRECATION")
    private fun stopVPN() {
        try {

            v2RayPoint.stopLoop()

            TProxyStopService()

            context.stopForeground(true)
            context.stopForeground(STOP_FOREGROUND_REMOVE)

            stopSelf()

            tunDevice!!.close()
            tunDevice = null
        } catch (_: Exception) {
        }
    }

    private fun reSelectServer(
        title: String,
        body: String,
        setLargeIcon: Int
    ) {
        try {

            val inUseConfig = "jhquxg";
            val configIP: String = utils.parseV2rayJsonFile(inUseConfig, "SERVER_ADDRESS")
            val configPort: String = utils.parseV2rayJsonFile(inUseConfig, "SERVER_PORT")

            Thread {
                v2RayPoint.configureFileContent = inUseConfig
                v2RayPoint.domainName = "$configIP:$configPort"
                v2RayPoint.runLoop(false)
            }.start()

            runTun2socks()

        } catch (_: Exception) {
        }
    }

    private val v2RayPoint: V2RayPoint =
        Liblagshecan.newV2RayPoint(object : V2RayVPNServiceSupportsSet {
            override fun shutdown(): Long {
                try {
                    onDestroy()
                    dataProcessor.setData("serviceCrashed", "true", -1)
                } catch (_: Exception) {
                }
                return 0
            }

            override fun prepare(): Long {
                return 0
            }

            override fun protect(l: Long): Boolean {
                return true
            }

            override fun onEmitStatus(l: Long, s: String?): Long {
                return 0
            }

            override fun setup(s: String?): Long {
                return 0
            }
        }, Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1)
}

@heiher i get back to 2.6.5 version. because 2.6.6 throw some more errors.

java.lang.NoSuchMethodError: no static or non-static method

class TProxyService {
    companion object {
        @JvmStatic
        external fun TProxyGetStats(): LongArray
    }
}

@heiher thanks man. now it works and i using latest version (2.6.6) of your library.

but still there is a problem that i solved by replace this patch with the old . the tunnel not working when i use this patch.

@itsDantes I don't see any issues with this commit working with sockstun, which leaves me with no way around this issue. This is why I hope you can reproduce the problem based on sockstun.

@heiher well, i don't know then

hello everyone
i have same problem with new version
but working fine with old version
how to fix this issue

hello everyone
i have same problem with new version but working fine with old version
how to fix this issue

Is this line missing from your project?
https://github.com/heiher/sockstun/blob/master/app/src/main/java/hev/sockstun/TProxyService.java#L33

hello everyone
i have same problem with new version but working fine with old version
how to fix this issue

Is this line missing from your project?
https://github.com/heiher/sockstun/blob/master/app/src/main/java/hev/sockstun/TProxyService.java#L33

yes i have this line
and (java.lang.NoSuchMethodError: no static or non-static method) after disable "shrinkResources" and "minifyEnabled" It worked without problems
but the problem is with pthread_mutex_t after use old version (without pthread_mutex_t) working fine

Here is my trick
object TProxyService {
    init {
        System.loadLibrary("hev-socks5-tunnel")
        TProxyGetStats() // call this function here to prevent been "minifyEnabled"
    }

    external fun TProxyStartService(config_path: String, fd: Int)
    external fun TProxyStopService()

    @JvmStatic
    external fun TProxyGetStats(): LongArray?
}


Add XML data table display

see #69 and try to parse text data output as XML after CSV check to load xml data into table view

use this xml parser for now: https://github.com/NaturalIntelligence/fast-xml-parser

sample xml data table display for now:

better pic for docs:


Update Docfx Tools Consumption

Consume Docfx and other related tools using standard dotnet install.

@chidozieononiwu, leaving this tools bug assigned to you since it seems to be .NET specific.

This is an old issue.  Not sure if there is anything left to do here.  @hallipr, take a look and close or update with more details.


Feature timeline showing as a list not plan view

Describe the bug
Feature timeline showing as a list not plan view
Browser
Chrome
Version
Azure DevOps/VSTS
Screenshots

Strange ... I see there are 6 upvotes many users are experiencing it ... I am not able to repro, do one of you have time for a live debugging session?

Closing the issue, please reopen when you have time for live debugging.


League\Csv\ stream. php may have problems

Bug Report
public function seek($position)
    {
        if ($position < 0) {
            throw new Exception(sprintf('%s() can\'t seek stream to negative line %d', __METHOD__, $position));
        }

        $this->rewind();
        while ($this->key() !== $position && $this->valid()) {
            $this->current();
            $this->next();
        }

        $this->offset--;
        $this->current();
    }

If  $opsition is equal to 0, then $this->offset is equal to minus 1

if $position is equal to 0 then your code $this->offset is equal at 1 in the loop and end up being equal to 0 after the loop 😉

If $position is equal to 0, then it won't enter the loop, so $offset-- after $this->offset is -1.

why won't it enter the loop ???

$this->rewind() result return $this->offset = 0, so $this->key() === $position,so won't enter the loop.😝

yes but we don't really care because the current() method does not use the offset property which will be incremented to 0 when next() is used. I'll look into it after work but yeah there should not be any issue in how the Stream class is used in the package. Since the class is marked as @internal  we are safe but I can look into it to see if some use cases may end up in error. If you could provide such example It would be easier to investigate/fix but I don't see an instance where this could come up 🤔

seems to be easy to fix... I'm in the process of releasing 9.2.0... I'll create a small branch with the fix and add it to the release. The way the Stream class is used in the package is not impacted by this bug but fixing it is still possible and will be addressed. If you prefer to submit a PR you are welcomed to do it also in the meantime 😉

Yes, this problem has no impact on the use of the basic, but if the user use key() may cause a little ambiguity, so, I submitted a PR , 😝


Transform Feedforward-Network + solver into a Recurrent-Network

Hello Patrick,
let me first quickly motivate my feature request.
As a side-project i am currently working on Model-based optimal control. For e.g. a only partially-observable environment stateful agents are useful. So, suppose the action selection of an agent is given by the following method
def select_action(params, state, observation, time):
    apply = neural_network.apply
    state, action = apply(params, state, observation, time)
    return state, action

while True:
    action = select_action(..., observation, env.time)
    observation = env.step(action)

Typically, the apply-function is some recurrent neural network. Suppose the environment env is differentiable, because it is just some model of the environment (maybe another network). Now, i would like to replace the recurrent neural network with a feedforward network + solver without changing the API of the agent.
I was wondering if constructing the following is possible and sensible? I.e. i would like to transform a choice of Feedforward-Network + Solver into a Recurrent-Network.
def select_action(params, ode_state, observation, time):
    rhs = lambda x,u: neural_network.apply(params, x, u)
    solution, ode_state = odeint(ode_state, rhs, t1=time, u=(observation, time))
    return ode_state, solution.x(time)

I would like to emphasis that this select_action must remain differentiable: The x-output w.r.t the network parameters.
I would love to hear your input :) Anyways thank you in advance.

Yep, this is definitely possible. Diffrax is intrinsically differentiable so no special care is needed. Untested, but perhaps something like the following:
import equinox as eqx
import diffrax as dfx
import jax.numpy as jnp

# wraps an MLP to concatenate state and observation together
class Func(eqx.Module):
   mlp: eqx.nn.MLP

   def __init__(self,  state_size, observation_size, width_size, depth, key):
       in_size = 1 + state_size + observation_size
       self.mlp = eqx.nn.MLP(in_size, state_size, width_size, depth, key=key)

   def __call__(self, t, state, observation):
       in_ = jnp.concatenate([t[None], state, observation])
       return self.mlp(in_)

func =  Func(...)
get_action = eqx.nn.MLP(...)

def select_action(model, state, observation, time):
   func, get_action = model
   prev_time, state = state
   term = dfx.ODETerm(func)
   # specify solver, dt0, stepsize_controller in whatever way you think appropriate
   solver = ...
   dt0 = ...
   stepsize_controller = ...
   sol = dfx.diffeqsolve(term, solver, prev_time, time, dt0, state, args=observation,
                                    stepsize_controller=stepsize_controller)
   (state,) = sol.ys
   action = get_action(state)
   state = (time, state)
   return state, action

It's not critical, but as a nice-to-have this uses Equinox as a convenient neural network library.

Thank you! Hopefully i will try to find some time the next days to try to implement this, but will definitely report back!
Maybe i am just getting too excited by access to a new, powerful tool without rewriting any old code. But i feel like offering a transform that does exactly that, so that given the feedforward-network, the solver, (and stepsize-controller), the measurement/action-mapping constructs a new differentiable function with the call-signature of your typical recurrent network is super nice.
It not only is conceptually easier (imo?) but also enables plug-and-play integration of neural ODEs in other domains where recurrent neural networks are often already well established (and especially from an API-standpoint).

Doesn't it make more sense to also include the solver state as part of the state of the differential equation?
So, i.e. in your example something like this?
stepsize_controller = ...
solver = ...
dt0 = ...
sampling_rate = 100 # Hz

def select_action(model, state, observation):
   func, get_action = model
   term = dfx.ODETerm(func)
   prev_time, state, solver_state, controller_state = state
   time = prev_time + 1/sampling_rate
   sol = dfx.diffeqsolve(term, solver, prev_time, time, dt0, state, args=observation,
                         stepsize_controller=stepsize_controller, controller_state=controller_state, solver_state=solver_state)
   # update controller / solver state
   solver_state, controller_state = ...
   (state,) = sol.ys
   action = get_action(state)
   state = (time, state, solver_state, controller_state)
   return state, action

For completeness let me post my minimal working example.
import diffrax as dfx
import jax.numpy as jnp
from acme.jax import utils
from functools import partial
import haiku as hk
import jax

sampling_rate = 100 # Hz
stepsize_controller = dfx.ConstantStepSize()
dt0 = 1/sampling_rate
solver = dfx.Euler()

action_size = 2
obs_size = 2
u_dummy = jnp.ones((action_size))

latent_state_size = 20
hidden_layers = [50,50]
@hk.without_apply_rng
@hk.transform_with_state
def rhs(t, u):
   t = jnp.atleast_1d(t)
   x = hk.get_state("x", shape=(latent_state_size,), init=jnp.zeros, dtype=jnp.float32)
   txu = utils.batch_concat((t,x,u), num_batch_dims=0)
   X = hk.nets.MLP(hidden_layers + [latent_state_size])(txu)
   return {"~": {"x": X}}

def haiku2dfx_rhs(rhs):
   def __rhs(params):
      def _rhs(t, x, u):
         # x is simply passed through
         dxdt, x = rhs(params, x, t, u)
         del x
         return dxdt
      return _rhs
   return __rhs

# this is not great / quite confusing
dxdt = haiku2dfx_rhs(rhs.apply)

@hk.without_apply_rng
@hk.transform
def measurement_function(x):
   x = utils.batch_concat(x, num_batch_dims=0)
   C = hk.get_parameter("C", shape=(action_size,x.shape[-1]), dtype=jnp.float32, init=lambda shape, dtype: jax.random.normal(hk.next_rng_key(), shape, dtype=dtype))
   return jnp.matmul(C, x)

def gen_init_solver_state(solver: dfx.AbstractSolver, params_rhs, x0):
   term = dfx.ODETerm(dxdt(params_rhs))
   t0=0.0
   return solver.init(term, t0=t0, t1=t0+dt0, y0=x0, args=u_dummy)

def gen_init_controller_state():
   return dt0

saveat = dfx.SaveAt(t1=True,solver_state=True,controller_state=True,made_jump=True)

def step_fun_dynamics_to_time(params, state, u, time):
   prev_time, x, solver_state, controller_state, made_jump = state
   term = dfx.ODETerm(dxdt(params["rhs"]))

   sol = dfx.diffeqsolve(term, solver, prev_time, time, dt0, x, args=u,
                         stepsize_controller=stepsize_controller, saveat=saveat,
                         solver_state=solver_state, controller_state=controller_state,
                         made_jump=made_jump
                         )
   x = sol.ys
   x = utils.squeeze_batch_dim(x)
   state = (time, x, sol.solver_state, sol.controller_state, sol.made_jump)
   obs = measurement_function.apply(params["C"], x)
   return state, obs

def step_fun_dynamics(params, state, u):
   prev_time = state[0]
   return step_fun_dynamics_to_time(params, state, u, prev_time + dt0)

@jax.jit
@partial(jax.vmap, in_axes=(None, None, 0))
def unrolled_step_fun_dynamics(params, state, us):
   step_fun_dynamics_constraint = lambda state, u: step_fun_dynamics(params, state, u)
   state, obss = jax.lax.scan(step_fun_dynamics_constraint, init=state, xs=us)
   return obss

# initialise parameters
params_rhs, x0 = rhs.init(jax.random.PRNGKey(1), 0.0, u_dummy)
C = measurement_function.init(jax.random.PRNGKey(1), jnp.ones((latent_state_size,)))

params = {
    "rhs": params_rhs,
    "C": C
}

# initialise step functions state
# (t0, x0, solver_state0, controller_state0, made_jump0)
made_jump0 = False
init_state = (0.0, x0, gen_init_solver_state(solver, params_rhs, x0), gen_init_controller_state(), made_jump0)

# make prediction
bs=32
T=5.0
uss = jnp.ones((bs, int(T*sampling_rate), action_size))
obsss = unrolled_step_fun_dynamics(params, init_state, uss)

Thanks Patrick for your help. It works perfectly.


favicon.png

Current Behavior
favicon.png is used for display of tab icon and for display on UI.
Although using the same name for two different purposes in two different sub directories is already quite tricky, I face a strange issue that is tied to interoperability I guess.
Under Ubuntu 22.04 LTS, here is what I get from file command line file favicon.png
favicon.png: MS Windows icon resource - 3 icons, 48x48, 32 bits/pixel, 32x32, 32 bits/pixel
When trying to open this file under some other tools, like Gimp, answer is corrupted file.
Expected Behavior
Main issue I faced, is replacing favicon.png with an equivalent file.
When I build a pure png (1 icon only) file, it brings a 500 internal error related to animation.
I would suggest either
a.  split the file in order to get individual image files, to ease customization and change for everyone
b. or provide a way to build the format file from  a set of images to comply with expected hidden requirements . I guess this is trickier and less reliable indeed.
Steps To Reproduce
use same command line as above
Link to Reproduction / Stackblitz
No response
More Information
No response

I have to admit that I am confused by this issue. Skeleton is a UI Library. Yes we have our own favicon for the Skeleton docs ( Skully ), but apart from that, we have no impact on your favicon or how you handle it.
Favicons are a web/browser feature: https://developer.mozilla.org/en-US/docs/Glossary/Favicon

The only thing I can add to this is the location in which the favicon lives in a SvelteKit project:
https://kit.svelte.dev/docs/configuration#files
And this is configured in the /src/index.html (in the head of the page)


jni detected error in application: jni getobjectclass called with pending exception java.lang.noclassdeffounderror: com.google.mediapipe.formats.proto.landmarkproto$normalizedlandmarklist

OS Platform and Distribution
Android
Compiler version
No response
Programming Language and version
Java
Installed using virtualenv? pip? Conda?(if python)
No
MediaPipe version
No response
Bazel version
No response
XCode and Tulsi versions (if iOS)
No response
Android SDK and NDK versions (if android)
SDK 33, NDK 23.1
Android AAR (if android)
Yes
OpenCV version (if running on desktop)
No response
Describe the problem
Hello guys, I'm having a problem with integrating Face Mesh into an app. Initially I made a prototype with the same specifications of SDK, NDK etc. But I'm getting a JNI Error (I've already switched from Protobuflite to Protobuf). Could someone help me where to proceed?

Complete Logs
Abort message: 'JNI DETECTED ERROR IN APPLICATION: JNI GetObjectClass called with pending exception java.lang.NoClassDefFoundError: com.google.mediapipe.formats.proto.LandmarkProto$NormalizedLandmarkList
        at void net.osmand.plus.activities.MapActivity.lambda$onCreate$5$net-osmand-plus-activities-MapActivity(com.google.mediapipe.framework.Packet) (MapActivity.java:811)
        at void net.osmand.plus.activities.MapActivity$$ExternalSyntheticLambda13.process(com.google.mediapipe.framework.Packet) (D8$$SyntheticClass:-1)
     Caused by: java.lang.NoSuchMethodError: No static method emptyProtobufList()Lcom/google/protobuf/Internal$ProtobufList; in class Lcom/google/mediapipe/formats/proto/LandmarkProto$NormalizedLandmarkList; or its super classes (declaration of 'com.google.mediapipe.formats.proto.LandmarkProto$NormalizedLandmarkList' appears in /data/app/~~HDpRMbZFIXSLVwd4kbAi6Q==/br.com.crearesistemas.driverhero-OCtl1-4e1NuBfyADh-YIdQ==/base.apk!classes31.dex)
        at void com.google.mediapipe.formats.proto.LandmarkProto$NormalizedLandmarkList.<init>() (LandmarkProto.java:2220)
        at void com.google.mediapipe.formats.proto.LandmarkProto$NormalizedLandmarkList.<clinit>() (LandmarkProto.java:2573)
        at com.google.protobuf.Parser com.google.mediapipe.formats.proto.LandmarkProto$NormalizedLandmarkList.parser() (LandmarkProto.java:2588)
        at void net.osmand.plus.activities.MapActivity.lambda$onCreate$5$net-osmand-plus-activities-MapActivity(com.google.mediapipe.framework.Packet) (MapActivity.java:811)
        at void net.osmand.plus.activities.MapActivity$$ExternalSyntheticLambda13.process(com.google.mediapipe.framework.Packet) (D8$$SyntheticClass:-1)

Hello @KauaOrtiz,
Would you let us know the complete details about the issues such as operating system using, steps you have followed to reproduce the issue from our end and share the possible solution on error you are getting. Thank you

Hey @kuaashish,
First of all I installed Mediapipe in Windows using the WSL tutorial and implemented the AAR Archive of Face Mesh from Android tutorial.
I created some classes and function to start the camera, calculate euclidean distance and of course to process the frames. The application starts running OK, even turn on the camera, but when i show up in the image the face mesh recognize my face and drawings the points the app crash with jni detected error in application: jni getobjectclass called with pending exception java.lang.noclassdeffounderror: com.google.mediapipe.formats.proto.landmarkproto$normalizedlandmarklist.
Logcat it returns me that the error is in this part of code:
processor.addPacketCallback(                     OUTPUT_LANDMARKS_STREAM_NAME,                     (packet) -> {                         android.util.Log.v("TAG", "Received multi face landmarks packet.");                         List<LandmarkProto.NormalizedLandmarkList> multiFaceLandmarks =                                 PacketGetter.getProtoVector(packet, LandmarkProto.NormalizedLandmarkList.parser());
To call processor using this code:
eglManager = new EglManager(null);         processor =                 new FrameProcessor(                         this,                         eglManager.getNativeContext(),                         "face_mesh_mobile_gpu.binarypb",                         "input_video",                         "output_video");         processor.getVideoSurfaceOutput().setFlipY(FLIP_FRAMES_VERTICALLY);         AndroidPacketCreator packetCreator = processor.getPacketCreator();         Map<String, Packet> inputSidePackets = new HashMap<>();         inputSidePackets.put(INPUT_NUM_FACES_SIDE_PACKET_NAME, packetCreator.createInt32(NUM_FACES));         processor.setInputSidePackets(inputSidePackets);
From what I understand of the error, it is in the part of returning the list of face mesh points, when i was looking from solution i found a issue closed in MediaPipe Repository #443 (Comment) to change protobuflite to protobuf but the error persists.
I don't know if I've given you all the information you need but I'm here to answer anything you need! And again thanks a lot for the help!

@KauaOrtiz,
Sorry for the delayed response, This issue is already known to us, And We are working towards the fix. We will let you know once any update becomes available. Thank you

Hi @KauaOrtiz,
We are no longer maintaining the legacy facemesh solution, as it has been integrated into the new Face Landmarker task API, as explained in our documentation. We intend to explore and implement our upgraded Face Landmarker in Android, following the steps outlined in our documentation. Additionally, we kindly request you to inform us of any errors encountered during the exploration process.
Thank you


User Feedback: Make Bhen Lang

Describe what you are trying to do and why it is not optimal.
No response
Describe the solution you'd like.
No response
Describe alternatives you've considered.
No response
Additional context.
No response

Are bhai bhai bhai bhai


fix: eager exiting to prevent hung state

Possible fix for #1089. I know it's a hacky solution, so not exactly hoping to get merged, but just to show where the problem exists.
It parses the data (on(data)) and exists eagerly without having to wait for the exit event - which is what's causing #1089
fixes #1089

@FedericoCarboni Thanks for the reply!
I haven't found the root cause.
Another solution (than this fix) that works for me is if I use a retry function (with a timeout).
I've been using ffmpeg and this library in a project for a long time and this has only occurred on a particular setup - a large set of video files (150k files, 2.7TB) on a USB HDD. I should add that there were also bad sectors on this HDD that I repaired (chkdsk) earlier. My project involves ffprobe-ing a lot of those files and a lot of them have been failing seemingly randomly. I'm suspecting this whole particular setup (the HDD and/or act of probing a lot of files) might have something to do with it. Since I can't even seem to reproduce the issue on same files that failed when I try again.

@laggingreflex
Does stdout emit the close event even when it gets stuck? If it does, a cleaner solution would just be to move the code that's currently running on exit into stdout's close, and since we already have ffprobe's output on close we can just kill ffprobe if it hasn't exited already.
The issue is difficult to reproduce so I just added my best guess.
CI tests seem to be failing because mocha was updated and it no longer supports Node.js 8, which is a test target for this project.

Does stdout emit the close event even when it gets stuck?

It doesn't. Just "data" event. Here's what console.log(ffmpegProcess) looks like: https://gist.github.com/laggingreflex/252585944ea4369efadc37076aed6fdc
  _eventsCount: 2,
  _maxListeners: undefined,
  _closesNeeded: 3,
  _closesGot: 0, << if this is a counter for close events, none received
  connected: false,
  signalCode: null,

(it's after a 5000ms timeout)

The issue is difficult to reproduce so I just added my best guess.

Definitely. Please feel free to give any other debugging pointers, I'll try them out.
Or I'll update if I come across anything more useful.


Unable to build Ghidra

Hi, I tried to build the Ghidra Development Environment using gradle buildGhidra but i received the following error:

Task :createJavadocs FAILED
FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':createJavadocs'.
Javadoc generation failed. Generated Javadoc options file (useful for troubleshooting): '/home/intern/Desktop/git/ghidra/build/tmp/createJavadocs/javadoc.options'

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.8.2/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 25s
95 actionable tasks: 1 executed, 94 up-to-date

Here is the information of my installed Gradle:

When I execute echo $JAVA_HOME, I get the following output:

/usr/lib/jvm/java-11-openjdk-amd64

I installed Java OpenJDK 11 using sudo apt install default-jre
I'm not sure why Javadoc is not generated? I even made sure that my Eclipse is aware of the location of the installed JDK. Is my Gradle too new? I would appreciate any help i can get! Thank you!

I just built fine without error using the latest master.
What is your output of the command:
javac -version

Ahh, silly me. I only installed JRE and didn't install JDK (missed out a segment while following online tutorial). Let me install JDK and try out the building again!

Yes! It worked! Thank you @ryanmkurtz for pointing out that silly mistake of mine!