[WebSub] Fix custom notification creation in projects

Purpose
$title.
This PR also duplicates the custom subscriber test in a project.
Fixes https://github.com/ballerina-platform/ballerina-lang/issues/17788
Approach

Describe how you are implementing the solutions along with the design details.

Samples

Provide high-level details about the samples related to this feature.

Remarks

List any other known issues, related PRs, TODO items, or any other notes related to the PR.

Check List

[ ] Read the Contributing Guide
[ ] Required Balo version update
[ ] Updated Change Log
[ ] Checked Tooling Support (#)
[ ] Added necessary tests

[ ] Unit Tests
[ ] Spec Conformance Tests
[ ] Integration Tests
[ ] Ballerina By Example Tests

[ ] Increased Test Coverage
[ ] Added necessary documentation

[ ] API documentation
[ ] Module documentation in Module.md files
[ ] Ballerina By Examples

Codecov Report

Merging #17889 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master   #17889   +/-   ##
=======================================
  Coverage   15.17%   15.17%
=======================================
  Files          46       46
  Lines        1206     1206
  Branches      188      188
=======================================
  Hits          183      183
  Misses       1009     1009
  Partials       14       14

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 ddc523e...0da3931. Read the comment docs.


auto uninstall language packs

Type: Bug

2023-08-08 01:16:24.471 [info] Uninstalling extension from the profile<EMAIL_ADDRESS>vscode-userdata:/c%3A/Users/huahua/.vscode/extensions/extensions.json
2023-08-08 01:16:24.597 [info] Uninstalling the extension without including packed extension<EMAIL_ADDRESS>2023-08-08 01:16:24.598 [info] Uninstalling the extension without checking dependents<EMAIL_ADDRESS>2023-08-08 01:16:24.615 [info] Removing language packs from the extension ms-ceintl.vscode-language-pack-zh-hans
2023-08-08 01:16:24.788 [info] Marked extension as uninstalled ms-ceintl.vscode-language-pack-zh-hans-1.81.2023080209
2023-08-08 01:16:25.595 [info] Successfully uninstalled extension from the profile<EMAIL_ADDRESS>vscode-userdata:/c%3A/Users/huahua/.vscode/extensions/extensions.json

A few days ago I tried to create a profile file, but found that the new function didn't seem to be what I wanted, so I deleted the profile.
Today a dialog box reminded me to switch the language to English, and it automatically changed to English after restarting. After reinstalling the Chinese language pack, the previous dialog box was repeated after a few minutes.
 Thanks for linking that.
/duplicate https://github.com/microsoft/vscode/issues/189770

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.
Happy Coding!


WRKLDS-1297: Bump prometheus client to 1.19.1

This PR bumps prometheus client to v1.19.1.

This is not the correct move;
/close


Discuss Application Definition and Air-gapped Scenarios

At the SIG intro session at KubeCon NA 2019, there were a few questions about how air-gapped scenarios fit in or can be enabled by tooling in the landscape.
It would be good to have a discussion and maybe develop some best practices, an article or blog post that addresses these scenarios.
In the CNAB world, we’ve been considering these use cases and would be happy to share our experiments and learnings at a SIG meeting or on the mailing list!
Cc: @AloisReitbauer @radu-matei

The airgap section of the CNAB spec provides a gentle introduction for anyone who would like it.

Thanks for linking that @glyn

We could put together a doc outlining best practices.  Would be great to present in one of the upcoming meetings

@jeremyrickard  can you have a short presentation at the next meeting this Wednesday

@AloisReitbauer sure thing. Should I just go add myself to the agenda for Wednesday(4 December)?

We could put together a doc outlining best practices. Would be great to present in one of the upcoming meetings

If we want to produce some best practices, I think it might be good to solicit more examples of what people are doing today? We talked a little about CNAB, but we also heard that something in the Operator space was doing something in that vein. There was a comment on the youtube recording from the last meeting about another project that does this. Should we survey and try and find a more and extract some best practices from that survey?

There was a WG regarding Air-Gapped scenarios, which was dissolved. Therefore, this issue will also be closed.


feat: worker support

Summary
resolve #3074
checkout example/worker for example
Feature:

output.workerChunkLoading
output.workerWasmLoading
output.workerPublicPath
worker with output.module: true

Todo:

webpackEntryOptions magic comments (low priority)
https://github.com/web-infra-dev/rspack/issues/3656 (low priority, block by https://github.com/web-infra-dev/rspack/discussions/3619)
https://github.com/web-infra-dev/rspack/issues/3658 not work with tree shaking, will fix it in next PR

Test Plan
example/worker works, and some tests block by #3658, #3655, #2408, will add more tests after blockers resolved

!bench


[do not merge] noop PR for ci testing

Don't merge it. Just for a comparison with the e2e test PR

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

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

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
861

Relevant Lines:
1598

💛  - Coveralls


Add security privilege (needed for VHDX support for docker data root)

To support using VHDX for the Docker data root and the writing of image layers an additional privilege is needed.  Added "SeSecurityPrivilege" as an additional option.
Microsoft Case#120082125001494
Signed-off-by: Adam Williams<EMAIL_ADDRESS>

@dcantah It appears there was a release yesterday, any idea on the timeline for a release with this change?

@awmirantis We don't have a set release cadence, we just cut releases if they're needed for a consumer of this (which it sounds like Moby needs this so this fits the bill). I can cut a new release with the change shortly.


Access to 'device' in platform SPI function?

The platform glue currently looks like this:
extern void tmc2130_readWriteArray(uint8_t channel, uint8_t *data, size_t length);

Could it be changed to carry the device object instead of just the uint8_t? I want to support multiple SPI buses, and it's a bit awkward to need to maintain an entirely separate mapping of objects to channel numbers, just because the object is lost a single call earlier in the chain to this function.
The channel number is easily reachable from the object, so everything would work the same way; just without losing this information.
I copied the API files without any modifications to this driver: https://github.com/versioduo/V2Stepper/blob/master/src/V2Stepper.cpp#L3
Apart from this issue, I'm happy, and everything seems to work as expected. Thanks!

This was a deliberate design decision. We wanted the device object to be completely opaque to the application code. If it wasn't for memory allocation being simply done by declaring an instance of the device object struct we may have even hidden the struct members from the public interface (aka. the header files).
Since the API and therefore the device object do not hold any information regarding the SPI (or UART) implementation - e.g. a SPI bus object - there is a mapping of device objects to e.g. SPI bus objects required. There are multiple approaches to this mapping but the one we decided to (primarily) support was having arrays of both object types and using the indices as the mapping. Since the channel number is effectively a piece of user data, different implementation/usages of the channel could also be used. This has however not been documented well - sadly still a big ToDo in this project.
I see that in the application you linked you simply stored the chip select pin in the channel member. How would having the entire device object help you in that use case? From what i can tell you then would simply write digitalWrite(tmc2130->channel, LOW) instead?
I also want to note that a better name for channel would have been icNumber instead, since this is what is basically boils down to. I have so far decided against changing that but may do that parallel to getting proper documentation for the architecture of this API. This would also more strongly suggest our intention of this value being an index for arrays.

One of the biggest advantages (imo) of this approach is that it will easily scale to multi-chip applications which may even use multiple SPI busses with multiple Chip select lines used per bus:
struct SPIObject // This represents a SPI bus including the corresponding chip select
{
	struct SPIBus *bus; // SPI bus (without chip select)
	struct Pin *chipSelect;
}

// We have 6 IC and SPI objects
TMC2130Typedef tmc2130[6] = { 0 };
SPIObject SPIList[6] = {
	// 3 ICs on the first SPI bus
	{SPI0, CS0},
	{SPI0, CS1},
	{SPI0, CS2},
	// 2 ICs on the second SPI bus
	{SPI1, CS3},
	{SPI1, CS4},
	// 1 IC on the third SPI bus
	{SPI2, CS5},
}

void tmc2130_readWriteArray(uint8_t channel, uint8_t *data, size_t length)
{
	digitalWrite(SPIList[channel]->chipSelect, LOW);
	SPIList[channel]->bus->readWriteData(data, length);
	digitalWrite(SPIList[channel]->chipSelect, HIGH);
}

Sure, that's like placing a stone in the shoe in the morning, so that you can be so happy when you can get out of the shoe in the evening. :)

not sure what stone you're referring to here 🤔
Just to avoid talking in circles, what would your preferred code look like with the  device object being passed instead of the channel number?

Exactly like all the other functions look like, which call the user-provided platform function:
extern void tmc2130_readWriteArray(TMC2130TypeDef *tmc2130, uint8_t *data, size_t length);

That way, tmc2130->config->channel is accessible as before, but there is also access to the object itself.
Maintaining a separate mapping is straight-forward for monolithic code, but does not fit that well into the model of a separately maintained library. The data (bus + address) is already available in the instantiated object, and it does not need to be copied to a separate global map, possibly with a fixed number of maximum instances.

How are you getting your SPI object from tmc2130?
If we were to change this, it would be a breaking change - which is why im asking for a lot of clarification here (thanks for the patience!).
One more generalized solution might be to provide a void* to be used by the user. This could then point to whatever sibling/parent object is needed. That might actually be somewhat compatible - generating warnings but working i think? I will need to test around with that

How are you getting your SPI object from tmc2130 when using your version of the callback?

The tmc object is embedded in the parent/user object. By adding it as the first element, or by simple pointer math with offsetof(), any enclosing object can be reached from the enclosed object.
It's kind of the "C version" of what C++ inheritance does. All of  Linux kernel device driver C code uses this: There it is called container_of() https://www.kernel.org/doc/Documentation/driver-model/design-patterns.txt

One more generalized solution might be to provide a void* to be used by the user.

Sure, a userdata pointer which is passed along would work too.

Here is a clean example without any further tricks. I changed the imported TMC API files to pass the device object, and added a userdata pointer to the object. The callback looks like this now:
void tmc2130_readWriteArray(TMC2130TypeDef *tmc2130, uint8_t *data, size_t length) {
  SPIClass *spi = (SPIClass *)tmc2130->userdata;

  spi->beginTransaction(SPISettings(4000000, MSBFIRST, SPI_MODE3));
  digitalWrite(tmc2130->config->channel, LOW);
  spi->transfer(data, length);
  digitalWrite(tmc2130->config->channel, HIGH);
  spi->endTransaction();
}

The C++ constructor assigns the SPI object directly to the userdata field, and the callback can reach it (or anything else the user code would assign here):
constexpr V2Stepper(const Config &conf, SPIClass *spi, uint8_t pin_select, uint8_t pin_step) :
  config(conf),
  _pin_select(pin_select),
  _pin_step(pin_step),
  _tmc2130({.device = {.userdata = spi}}) {}

https://github.com/versioduo/V2Stepper/blob/master/src/tmc/ic/TMC2130/TMC2130.c#L13
https://github.com/versioduo/V2Stepper/blob/master/src/tmc/ic/TMC2130/TMC2130.h#L23
https://github.com/versioduo/V2Stepper/blob/master/src/V2Stepper.cpp#L5
https://github.com/versioduo/V2Stepper/blob/master/src/V2Stepper.h#L35

Thanks for the proof-of-concept.
We will test out your proposed change in a separate branch for one chip. Seeing as your code is using the TMC2130 i'd say we will use that one so you will be able to try out the changed API.
Since the changes will most likely break API compatibility we want to bundle them with other improvements that also break backwards compatibility. Alongside such an update we will get proper documentation going, so expect it to be a while before these changes are pushed to master.

(I think i should be able to get to this by next week. I'll write updates in this issue)

The suggested changes to the API are available in the API_Revision branch. The suggested changes of issue #11 will be tried out in that branch as well.

Great. Thanks a lot.
I've imported the new files and updated the code which calls the new API. It works all fine and looks good.
https://github.com/versioduo/V2Stepper/blob/master/src/Driver.cpp#L5
https://github.com/versioduo/V2Stepper/blob/master/src/V2Stepper.h#L14

I'm happy with this the outcome of this change. We will however wait with rolling this out for all boards until we have evaluated some other backwards-incompatible changes.
I'm leaving this issue open for now until the rollout starts


HTTP/2 Server Example No Response for HTTP/1.x Only Clients

Motiviation:
The HTTP/2 server example just hangs when a client is using only HTTP with no ALPN or upgrade attempts. We should still send some kind of response.
Modifications:
The HTTP/2 server example has a special handler to detect no upgrade HTTP clients and generate a response.
Result:
Clients that just use HTTP with no upgrade will no appear hung when interacting with the HTTP/2 server example.

This is to address https://github.com/netty/netty/issues/3765
@nmittler @bobymicroby - Please take a look.

@Scottmitch looks good.

LGTM

@Scottmitch please fix check style error and than cherry-pick:
http://clinker.netty.io/jenkins/job/netty-pullreqs/1080/io.netty$netty-example/console

Cherry-picked 4.1 (04c0d77, c6d61f9) master(37e6fd0)

@Scottmitch  Hi Scott.  I have noticed something. When you replace the pipeline here
     protected void channelRead0(ChannelHandlerContext ctx, HttpMessage msg) throws Exception {
                // If this handler is hit then no upgrade has been attempted and the client is just talking HTTP.
                System.err.println("Directly talking: " + msg.protocolVersion() + " (no upgrade was attempted)");
                ctx.pipeline().replace(this, "http-hello-world",
                                       new HelloWorldHttp1Handler("Direct. No Upgrade Attempted."));
                ctx.fireChannelRead(msg);
            }
        });

Shouldn't you first add HttpObjectAggregator  like
ctx.pipeline().replace(this, "http-aggregator", new HttpObjectAggregator(MAX_CONTENT_LENGTH));
                ctx.pipeline().addAfter("http-aggregator","http-hello-world",new HelloWorldHttp1Handler("Direct. No Upgrade Attempted."));

When you discard the HttpServerUpgradeHandler you lose the aggregation that the upgrade handler provides and the unaggregated http objects reach the end of the pipeline .
Regards, B.

@bobymicroby - Thanks for pointing this out. The HelloWorldHttp1Handler should be processing FullHttpRequest objects. I have a PR coming for this....

:+1:


Relative path with Typescript

Hi !
I want to modify all the relative import to import directly everything in src. I cant figure it out.
I modified the tsconfig.json with :
"baseUrl": "src",
"paths": { "*": ["*", "src/*"]},

And modified the razzle.config with that :
module.exports = {
  plugins: ['typescript'],

  modify(config, { target, dev }, webpack) {
    const appConfig = config // stay immutable here
    if (target === 'node' && !dev) {
      appConfig.externals = [];
    }

    const srcPath = path.resolve("./src")
    appConfig.resolve.modules.push(srcPath);
    return appConfig;
  }
};

Any tips ? What am I missing ?

That was it. This example works. I just was wrong on two paths.


How can I replicate the 55.0 mIoU results of HorNet-L-GF on ADE20K? The link of pretrained model seems to be valid

What is the pretrained model? The link seems to be valid: model.
I used HorNet-L (GF)* | hornet_large_gf_img384 at IN22k-384, but it seems unable to achieve 55.0, reaching only around 54.5.

Hi @Linwei-Chen, we have updated the link. You are using the correct pre-trained model. The large model might be more sensitive to hyperparameters. You may try our pre-trained segmentation model and check the environment.

Thank you for your response! I will give it a try.


ModuleNotFoundError: No module named 'fastapi_chameleon'

SORRY, my venv were mixed up between the CLI and VScode...
Also, I do not know how to delete this....
Sorry again, Mike...

Hehe, no problem. I'm not sure you can delete it but happy you got things dialed in. :)


Fix CI workflow

Codecov Report

Merging #18 (b0919ec) into master (fee5d7a) will decrease coverage by 8.19%.
The diff coverage is 1.16%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@            Coverage Diff             @@
##           master      #18      +/-   ##
==========================================
- Coverage   71.89%   63.70%   -8.19%
==========================================
  Files          10       10
  Lines        1327     1496     +169
==========================================
- Hits          954      953       -1
- Misses        373      543     +170

Impacted Files
Coverage Δ

src/Focal_Setup.f90
55.44% <1.16%> (-21.62%)
:arrow_down:

... and 1 file with indirect coverage changes


[ldd-img] Lossless as compression type

Add "Lossless" as a valid for onboard_compression_type.  For the heli I know it's lossless but don't know the specific compression type, so just generic Lossless.

updated. although "generic" Lossless is a little odd - could be anything.
@rgdeen new build here for testing:
https://github.com/pds-data-dictionaries/ldd-img/tree/master/build/development/aba304de5aa01bf848324aefbe6ab706c975bfc4/<IP_ADDRESS>

I agree, but to some extent if it's lossless it really doesn't matter by definition, since the data got perfectly reconstructed.  It matters for lossy so you know what kind of artifacts to expect.
And... thanks!


BIP 21 support in the receive screen

It would be nice to have BIP 21 support in the receive screen. Right now you are already collecting a label and an address. Please also give an option for an amount to request. Then, compile a bitcoin: URL with that information and present it as a string to copy and as a QR code (instead of just the bare address). Then, for the QR code, allow copying the QR code as PNG data to the clipboard, save the QR code as a PNG file, and allow maximizing the QR code to full screen so that one can share it locally easily and also cover up other personal information on the screen.

Keeping the Receive tab simple is important, and I'm not convinced adding this feature is worth the complication. Electrum does this, and I feel makes their UX more difficult as a result.
I want to note I feel this generally whenever someone asks from something that adds to UI to any of the wallet or transaction screens. Unless the feature is critical or can be implemented with very little additional UI, I'm inclined to wait and see if there is considerable user demand for it. I'll keep this, and other issues, open, but it's a no at this stage.

I totally understand. I figured it would be better to write a suggestion and it never get implemented than to have no discussion at all. Lots of perspectives is what makes things like Sparrow wallet great.


Detail Diff: Data

On demand, pull full data maybe?

Done via: https://github.com/jku-vds-lab/loops/pull/55


[Bug]: start_char_idx and end_char_idx removed

Bug Description
This commit https://github.com/jerryjliu/llama_index/pull/7236/commits/f887df2ee95ec693b28e6d575afe2f06bb45cd55 removed start_char_idx and end_char_idx from node_utils.py
Version
0.8.37
Steps to Reproduce
Use SimpleParser and you will always get start_char_idx and end_char_idx of None.
Relevant Logs/Tracbacks
No response

@tkreuder this is not a bug -- it was an intended change.
Those two attributes were making text splitters and node parsers both a) hard to maintain and b) hard to expand. Plus, the indexes were often incorrect anyways.
In our own SECInsights app, we used fuzzy matching to find the text location, and it worked quite well. I suggest doing something similar

@logan-markewich Thanks for the answer and all the effort you guys put into the project!  much appreciated :)
Thus it was a breaking change, which was not expected and announced, but still these two fields remain and are now always None.
For me it meant 20k documents and its resulting embeddings are now stored useless within pinecone, so it would be nice, if breaking changes are announced. I was wondering why my newest batch of documents, did not contain these indices anymore and had to find out manually, which commit was causing this.

@tkreuder this is not a bug -- it was an intended change.
Those two attributes were making text splitters and node parsers both a) hard to maintain and b) hard to expand. Plus, the indexes were often incorrect anyways.
In our own SECInsights app, we used fuzzy matching to find the text location, and it worked quite well. I suggest doing something similar

You refer to https://www.fusejs.io/ ?


password authentication failed for user  xxxx

Driver version

redshift-connector             2.1.3
Redshift version

PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3), Redshift 1.0.76230
Client Operating System

window
Python version

py 3.11
Problem description

When windos computers connected to redshift, the password error was reported, I was sure that my password was correct, and I was able to connect normally under mac, I suspected that it was special characters, but I changed the password to no special characters, only alphanumeric, and the error was still reported under windows, and the error content was:
{'S': 'FATAL', 'C': '28000', 'M': 'password authentication failed for user "ag_readonly"', 'F': '/home/ec2-user/padb/src/pg/src/backend/libpq/auth.c', 'L': '425', 'R': 'auth_failed'}

Hi @dxl568736988 , thank you for reporting this issue. Could you share the specific version of Windows you are using as well as the password hash type e.g. md5hash to assist my investigation


Stabilize volatile read and write

This stabilizes the volatile_load and volatile_store intrinsics as ptr::volatile_read and ptr::volatile_write.
Rendered

I think this RFC proposes to do an obviously right change. There’s no compatibility hazard I can think of and the functions are very useful in certain cases.
:+1:

I'd be happy to see these made stable, but are there any environments where these function can be used without requiring other unstable things? Said another way, would stabilizing these functions make it so that some project can switch from nightly to stable?
I know that doesn't need to be a requirement, and we have to start somewhere.

Seems like a good idea to me.

As a bit of a bikeshed I might prefer to rename these to read_volatile and write_volatile (to group nicely with the existing read and write), but otherwise this seems fine to me. I believe it meshes well with the rest of the functions in the std::ptr module in terms of naming and signature.
I think the biggest question in terms of stabilization is what does volatile mean, and I agree with this RFC that it's well defined in C and other languages, so I would be fine having documentation redirecting to those relevant documents as well. I would perhaps feel best if we could hash out in this RFC exactly what semantics we'd point to (e.g. what documentation we'd point to) just to be extra sure it's ok, but that's not necessarily required in my opinion.
In the long run I think we'll eventually want a wrapper like Volatile<T> or something like that, but I'm more than ok deferring that and only providing the bare bones in the standard library to start out with (e.g. these functions). I think that you're able to build up everything else on top of these functions.

I renamed the functions to read_volatile/write_volatile and added a link to the LLVM definition of volatile.

:bell: This RFC is now entering its week-long final comment period :bell:

My own personal opinion is that this is good to go!

Please do not cite the LLVM documentation as the reference for the semantics. LLVM's documentation doesn't describe standard C semantics, but rather some semantics that are stronger, AFAICT, than what ISO C requires. If Rust wants to be different from ISO C11 then it would be better for Rust to specify what semantics it wants to have, and then verify whether LLVM implements (at least) the wanted semantics. The way this RFC looks now, it will be basically impossible to implement Rust without using LLVM, without reverse engineering LLVM.

@briansmith note that this won't be the first Rust feature that is currently defined in terms of LLVM, nor are RFCs designed to be complete specifications. Of course, having existing un(der)specified features doesn't automatically imply that we should add more. That said, I would expect documentation to not link to LLVM, but rather give some vague description about approximately what the semantics are (e.g. "volatile reads/writes are never elided nor reordered with other volatile reads/writes"), at least until Rust actually has a spec.

The libs team discussed this RFC during triage yesterday and the conclusion was to merge, so I will do so! Thanks again for the RFC @Amanieu!


Update MDI

Devices like "zwave.nodename" do not display icons:
HA Client:

Desktop Chrome:

Material design icons library should be updated


On Windows 10, line ending diffs show up in commit and error out in ESLint.

Issue Description
On Windows 10, line ending diffs show up in commit and error out in ESLint.
Issue Type

[ ] New Feature
[ ] Enhancement
[x] Bug
[ ] Other

Expected Behavior
Contributors can run eslint on Windows and commit without modifications to line endings.
Current Behavior
Contributors can not run eslint on Windows and cannot commit without modifications to line endings.
Steps to Reproduce

Clone repo
Run npm install
Run npm test or npm run lint:js

Environment

Operating System and version (desktop or mobile): Windows 10

The linebreaks (new lines) used in windows operating system are usually carriage returns (CR) followed by a line feed (LF) making it a carriage return line feed (CRLF) whereas Linux and Unix use a simple line feed (LF). The corresponding control sequences are "\n" (for LF) and "\r\n" for (CRLF).

ESlint linebreak documention says versioning tools like git will convert files to CRLF for windows machines, however will convert back to LF when committing a change. To fix this we should add
*.js text eol=lf and *.jsx text eol=lf to .gitattributes.
One option to addressing this issue is to add the --fix flag before running the linter. A potential downside to this flag is it will attempt to automatically as much linter as possible, not just line-end. (I was able to change a test file to CRLF and --fix addressed the line end issues.)
Regardless, windows developers should configure the line-ending settings for the text editor being used to prevent CRLF line ends:
For Atom:

Go to Preferences
Select Packages
Under Core Packages, select Settings for line-ending-selector
Choose 'LF' for default line ending.

To fix this we should add
*.js text eol=lf and *.jsx text eol=lf to .gitattributes.

+1, lets go with this and see if it resolves the eslint errors.

I think this can be resolved now


Won't open for me

Program won't let me open it, i got it open once or twice but now it's not working

Delete de file fps_config.json and try again.

Delete de file fps_config.json and try again.

how do I do that? It's not opening for me at all after I run as administrator.

It's a hidden file created by the unlocker.
Maybe is corrupted and when its read, it makes the program to FC.


Error temp measure

The thermistor I have installed was measuring the temperature correctly when connected to the board. With the OrbitertoolO2, and using the same configuration (replacing the pin with the tool's pin), it shows a very low temperature, around 3 degrees and a bit, when the ambient temperature is about 20 degrees.

Have you configured the correct pull up resistor?

Ok, That was the problem. I had crossed that line. Thnaks


IOU - Add receipt thumbnail is grayed out in combined report but not in transaction thread

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: 1.4.59-0
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team
Action Performed:

Go to staging.new.expensify.com
Go offline
Request money from user that has no unsettled IOU
Go to combined IOU report
Note that the add receipt thumbnail is grayed out
Create another IOU request
Go to transaction thread
Note that the add receipt thumbnail is not grayed out

Expected Result:
There should be consistency in whether to gray out add receipt thumbnail in combined report and transaction thread when request is created offline
Actual Result:
Add receipt thumbnail in combined report (Steo 4) is grayed out, but it is not grayed out in transaction thread (Step 7)
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

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

Screenshots/Videos
Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/36e5a22b-6820-4dc7-b3ad-0848254b1d30
View all open jobs on GitHub

@stitesExpensify  FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

We think that this bug might be related to #wave-collect - Release 1

I think this is resolved by https://github.com/Expensify/App/pull/39433

Ok, it isn't but it's a pretty minor bug and probably doesn't need to be a blocker. The PR to resolve this is here

Ok, it isn't but it's a pretty minor bug and probably doesn't need to be a blocker. The PR to resolve this is here

@NikkiWines since that was merged is this fixed now?

Yes, I believe this is resolved - though not by that PR in the end (see here for more context) But this can be closed out


Error,  Segmentation fault (core dumped)

Error,  Segmentation fault (core dumped)

maybe you can try modify gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.95) in train.py to gpu_options = tf.GPUOptions()
It works for me


Inertial Data Register Naming: 16-bit vs 32-bit reads

In the product datasheets, such as the ADIS16497, the *_LOW registers represent the lower 16bits of the inertial data, while in the software, they seem to represent the entire 32-bit number.  Personally, I like the way that this works, but I am wondering if this could create confusion, in some customers.  I really like the idea of representing the full 32-bit number, in the data log, but am wondering if we should consider including 16-bit or 32-bit naming in what the customers will selection.

Should we consider some form of notification, when customers select the _LOW, to let them know what they can expect?  Or, should we consider listing 16-bit or 32-bit with these selections?

It would not be too cumbersome to add a second column to the register display which shows the bit width of the register.


A lot of eslint warnings due to relative imports now being banned

Might have been done by accident, but there are a bunch of failures.

Search:
^import.+'\.

In:
./src/**/*.ts

Most of these are eslint warnings, which makes merging from origin/main sometimes a confusing experience as precommit hooks run on merge.

Assigning to @alexdima since you have touched eslint rules a lot recently.

Fixed via https://github.com/microsoft/vscode/commit/54b242dcd74e16ad6bf4e7f0ab5c8292479e6805


Runtime Environment variables for iOS

Describe the solution you'd like
I'm trying to build an iOS using app center, but I could get the environment variables to work. I wonder. I just wonder in order for iOS to recognize the env vars, what should I do in the code?
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

Hi @Zhipeng-Chang, we do support environment variables for iOS already. Take a look at the documentation and let us know if you have a more specific question.

@Zhipeng-Chang

Environment variables can be consumed during the build process.

They cannot be used at runtime. I assume you're looking for device variables that can be consumed at run time. That currently doesn't exist. A potential solution would require to integrate the SDK. In case this is what you're looking for, please update the issue accordingly so it can be treated as a feature request.

Hi @derpixeldan,
Thank you for getting back! Yes, that's exactly what I'm looking for. I'm trying to set an environment variable that same with the Android environment variable listed in the app center documentation.
e.g. buildConfigField("String", "API_KEY", "\"${System.env.API_KEY}\""), so that I can use it at both runtime and build time. Another question: if the app center support environment variables during the build time, when I download the build from the app center, the app doesn't work because there are no variables I need. So what's the point that the build process can consume the Environment variables? Thank you!

Hi @derpixeldan,
I think I got what do you mean in the previous post. So what I'm trying to do is that I have some secret keys in my code and I don't want to upload them to Github, so I defined them as the environment variables in my code. In App Center, there is no problem to build the app, but when I download and install the build to my phone, it shows it doesn't have the API key in the app.
Based on my understanding of your previous posts, the reason for this problem is that the device running the app doesn't have the environment variables I need and the Env Vars didn't bind to the app when it's built in the app center.
If I understood correctly, do you any recommendations for this problem?
Thank you.

Hi, I end up using the pre-build script to add the env vars to my app. So losing the issue ...

Hey
I am getting *** instead of the value in pre-build script for environment variables in ios? please help

Hey
I am getting *** instead of the value in pre-build script for environment variables in ios? please help

because you click on the lock next to this variable in the config

Hi, I end up using the pre-build script to add the env vars to my app. So losing the issue ...

how are you using pre-build script to add envs? are you just like writing a .env file? could you share a sample script with me?

yea, writing it to .env file worked for me. had to go to settings and save then build before app center registered the prebuild script though.

can someone share a sample to achieve that ! I'm stuck with it to !


[Backend] Move run function from Compiler to Toolchain

This commit moves run function from Compiler to Toolchain class.
The run command executes their compiler tool. This command is
dependent on toolchain.
ONE-vscode-DCO-1.0-Signed-off-by: Jiyoung Yun<EMAIL_ADDRESS>Draft PR: #818
Conflict with #828

Please review this PR. I found the reason why the information message was not showing. The DebianToolchain class was different between ONE-vscode and backend codes. So below codes was not working.
    const installed =
        toolchainEnv.listInstalled().filter(value => value instanceof DebianToolchain);
    if (installed.length === 0) {
      return toolchainEnv.install(toolchain);
    } else if (installed.length === 1) {
      const answer = await vscode.window.showInformationMessage(
          'Do you want to remove the existing and re-install? Backend toolchain can be installed only once.',
          'Yes', 'No');
      if (answer === 'Yes') {
        const jobs: Array<Job> = [];
        jobs.push(new JobUninstall(installed[0].uninstall()));
        jobs.push(new JobInstall(toolchain.install()));
        return toolchainEnv.request(jobs);
      } else {
        Balloon.info('Installation is canceled.');
        return Promise.reject();
      }
    } else {
      throw Error('Installed debian toolchain must be unique.');
    }

https://user-images.githubusercontent.com/7223627/173061033-d9424a25-0d20-49c9-9bb8-c51f45e29477.gif


Provide API docs in Dash (docset) format.

If possible, please provide the API docs in Dash docset format. Information regarding the conversion can be found at https://kapeli.com/docsets.
Thank you.

You can install Realm's docs in Dash by clicking the "Install in Dash" link in the upper right corner of our API docs:

Objective-C: https://realm.io/docs/objc/latest/api/
Swift: https://realm.io/docs/swift/latest/api/


chore: Moves JS package installation to script

I'm moving npm install to the common script so that we don't need to do it separately as part of the JS frontend bundle update. This should mean less mistakes by missing a step that is needed to install the latest package updates.

🛠 Docs Preview Building...

Configuration
{
  "repoOverrides": {
    "apollographql/apollo-ios-dev@main": {
      "remote": {
        "owner": "apollographql",
        "repo": "apollo-ios-dev",
        "branch": "ci/auto-rollup-npm-install"
      }
    }
  }
}

28baa99f5264a66755d8239b7d632213c9f43482


This should not be merged into master. Deleting


Fix ru_ru.json to 1.3.0

Removed non-used keys

Okay, I will release a new version later. I will update the version after 1.20.4 when there is more content worth updating.
Thank you for the translation file.


action: add API to set current speed

This is an API that allows to temporarily set the speed of the drone, e.g. for mission mode or in goto/reposition mode.
FYI @reedev

sounds good, I will test it when it's merged


Issue with connecting to another database on a specific model

My default database collection is called "mysql". I have one model that uses a different database connection ("wordpress"). On this model, I've added this line:
protected $connection = 'wordpress';
When I use this model outside of Dingo, the model uses the "wordpress" connection as expected. However, when I use this model in my API, the model continues to use the "mysql" database.
Any help is appreciated.
edit: I'm using L5.1 and Dingo 0.10

That shouldn't happen. Quickly tested this locally and can't see it. Try updating Dingo to the latest 1.0.*@dev version and let me know if the problem is persisting.
Dingo shouldn't touch your models.

Thanks @jasonlewis, that did it. We're still on L5.1, so I was hesitant to upgrade.
Out of sheer curiosity, do you know what area of the Dingo codebase would have changed that now makes it work in 1.0?

Honestly I'm not sure. I've never heard of it happening before. I'm not sure where in the codebase Dingo would even try to touch your models. Very strange...


Consider factoring out ModuleInfo

Based on comments about ModuleInfo.h in https://github.com/saschazelzer/CppMicroServices/pull/28, consider factoring out ModuleInfo.

closing. issue is tracked in CppMicroServices/CppMicroServices


fix a test with wrong comment

fix oder of actual type and expected type.

Thanks leiiwang u2takey,
Your commit has been integrated into the MediaPipe repository upstream.


sunburst label position if off when

label position is wrong when browser tab doesn't have the focus while loading
Original issue by @bmesuere on Mon Jun 11 2012 at 14:23.
Closed by @bmesuere on Thu May 08 2014 at 17:15.

Seems like this is fixed
Original comment by @bmesuere on Thu May 08 2014 at 17:15.


Updated hard crazy box viewsnap to snap to 180 on 2nd keypress

Completed in https://github.com/p2sr/srconfigs/commit/a9f12e3cf3edec3f41be3a2b33ce2bf9cbc8cae3
tbh i forgor this pr existed and did it myself lol


Generic clause where

Hello, this Issue is more like a question for now, than improvement.
Issue:
I have to create a filter through DB with the 'where' clause, but not in the standard way such you are describing in your documentation, but in generic way:
here is an example of request:
{
     "offset": 0,
     "limit": 44,
     "filter":[
	     {
		     "field":"state",
		     "value": "LEASED"
	     }
     ]
     ,
     "sort":[
	     {
		     "field": "id",
		     "order": "DESC"
     	     },
	     {
	     	     "field": "drivenDistance",
		     "order": "DESC"
	     }
     ]
}

With sort I already Found the way, and hoped that the filter will be pretty same but unfortunately not....
Here is how I'm trying to achieve this functionality:
My custom extension for creating and adding under whereWithConditions all filters as a BinaryExpressions:
fun <E : Entity<E>> Table<E>.filterExpressions(
    sort: List<Filter.Body>,
    declaringColumn: MutableList<ColumnDeclaring<Boolean>>
) = declaringColumn.apply {
    sort.onEach { body ->
        this += BinaryExpression(
            body.operator.toDbOperatorType(),
            this@filterExpressions[body.field.toDbParamName()].asExpression(),
            DbTable[body.field.toDbParamName()].wrapArgument(body.value), // HERE IS THE ISSUE!!🤷🏽♂  body.value -> is Any
            BooleanSqlType
        )
    }
}
//----------------------------------------------------------------------------------------
//Here is the place of usage:

db.from(DbTable).select()
     .orderBy(DbTable.sortExpressions(paginationRequest.sort))
     .whereWithConditions {
           DbTable.filterExpressions(paginationRequest.filter, it)
      }
      //......

The main issue that I'm not be able to create Binary expression generically / or I did it but on the 90% and 10% I'm not be able to finish, here is the BinaryExpression example:
BinaryExpression(
       body.operator.toDbOperatorType(), // ✅
       this@filterExpressions[body.field.toDbParamName()].asExpression(), // ✅
       DbTable[body.field.toDbParamName()].wrapArgument(body.value.toString()), // ❌
       BooleanSqlType
)

When I'm trying to wrap argument on the right: ScalarExpression<*>:
 DbTable[body.field.toDbParamName()].wrapArgument(body.value.toString())

This is will not work because the wrapArgument is waiting on T which I don't have at this moment when I'm using DbTable[nameColumn] / DbTable.get(nameColumn)
In case you are able to help me, I'm opening for any ideas / maybe someone from the community already solved some of that type of issue.
Thanks in advance.

Try this:
val column = DbTable[body.field.toDbParamName()] as Column<Any>
val value = body.value as Any?
column.wrapArgument(value)

@vincentlauvlwj Thank you for your response I adjusted code, but unfortunately:
**
java.lang.ClassCastException: class java.lang.String cannot be cast to class java.lang.Enum (java.lang.String and java.lang.Enum are in module java.base of loader 'bootstrap')
**
PS> it works on the primitives, but on ENUMS....
Here is updated function:
fun <E : Entity<E>> Table<E>.filterExpressions(
    sort: List<Filter.Body>,
    declaringColumn: MutableList<ColumnDeclaring<Boolean>>
) = declaringColumn.apply {
    sort.onEach { body ->
        (DbBooking.DbTable[body.field.toDbParamName()] as? Column<Any>)?.let {
            this += BinaryExpression(
                body.operator.toDbOperatorType(),
                this@filterExpressions[body.field.toDbParamName()].asExpression(),
                it.wrapArgument(body.value),
                BooleanSqlType
            )
        }
    }
}

Hello @vincentlauvlwj , currently I found temporary solution, here is it:
inline fun <reified T : Enum<T>> List<Filter.Body>.enum(fieldName: String) = mapNotNull { body ->
   body.takeIf { it.field == fieldName }?.run {
       copy(value = enumValueOf<T>(body.value.toString()))
   }
}

This ext.function is searching via field what has to be presented as enum and replace the value: Any with enum value: Enum<T>, in that case everything is works pretty good, but personally I do not think that this is a final solution, and I will be back to this issue later, unfortunately currently I do not have time and I have to move forward, but If you will find/already know something what can be better / already exist in lib I will be more than appreciate to hear it from you 😃
Btw, here is the place of call after quickFix:
whereWithConditions {
   filterExpressions(it, paginationRequest.filter?.enum<Booking.State>(state.name))
}


DX-301 Logging

Added log files for errors and synchronization. Log files are written to the path of the executable. If a log file exists for synchronization, the products updated since the last sync will be updated as opposed to the last hour.
Added some tests for LogWriter
@melissakendall @danw-iq

bug: if syncLog.txt is not created, it fails the first time


Add methods to create and delete lambda functions.

Deletion was a little odd, since function-name has to be passed in
the body of the request, but is actually used in the url. And method
always has to be passed as :delete.
These could be wrapped in the utils namespace to make them easier to use,
but it's possibly better to alter their use in the core lambda ns.
The base64 string in the test ns was created from the test.js file in the
project here: https://github.com/lfn3/node-cljs-zip

I really appreciate you digging in and sorting this out - the existing code isn't the easiest to follow.  The only really high level suggestion I have is that perhaps testing the request mapping directly (vaguely similar to this, i.e. not issuing the requests) might be more maintainable long term - there are a lot of existing integration tests with data dependencies, which makes things a little awkward.  I can make this change if you're strapped for time.
I'll add a couple of questions as line comments.

So I've added a unit test type of deal, let me know if that's kind of in the realm of what you were expecting?

Yeah, totally - I'd be down with removing the integration test - if the unit tests demonstrate the targets you added are being transformed into correct looking requests, I don't think integration tests are worth their weight.

Ok. No problem. I've nixed the integration test.
I'm open to adding some tests to cover some of the other functionality, but I'll put those in another pr if I do.

There's some unused imports in the tests, but it's not worth holding up a merge.  I'll push the snapshot shortly.


Do not re-enable multus on configure hook

Unblock the release.
See https://github.com/ubuntu/microk8s/issues/1495

@apnar I am removing the re-enabling of multus from the configure hook so as to unblock the release process.
Looking forward to your investigation if this approach has any defect.


TODO for stabilize serde feature

There are some improvements needed for serde experimental feature to be stabilized.

[ ] Add support for SExpression
[ ] Add configuration option to allow users to choose writer
[ ] Add more document examples

Related PR: https://github.com/amazon-ion/ion-rust/pull/633

imo this should be a blocker for stabilizing as well issues#790


argocd: 1.4.2 -> 1.7.8

Motivation for this change
Version bump of argocd
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[x] macOS
[ ] other Linux distributions

[x] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

cc @shahrukh330

Looks good to me. Tested with a 1.7.8 server.


Improve caching in workflow file

Is it possible to speed up multiple runs of the workflow by adding caching

Good point, I think we can probably cache the install of packages at least.

I've attached one possible solution for caching the package installation
Another cache could be dedicated to the docker image itself. However, Github only allows for 10GB of cache in a single repository, so this may be unideal for some users

The new caching is great, the resolver starts much faster!
I think any remaining caching-related things can be tracked in issue #49, so let's close this one as finished.


Corrected Error in MemoryNetwork.py in Text_Based_Chatbot

Merge from keras.layers.core was not working so i replaced it with legacy merge.
"from keras.layers.core import Merge"    =>   "from keras.layers import Merge"

Looks now the whole Merge has been deprecated and many more changes are needed.


test

Prerequisites

[X] I am an Open Source Contributor
[X] I checked to make sure that this issue has not already been filed

Description
test
Screenshots
No response
Code of Conduct

[X] I follow Contributing Guidelines of this project.

do not claim this


Check before and after state of Istio tests

While working on tests for Istio.io, I found what looks like a test that fails because another test didn't get cleaned up properly. We should add a pre and post condition to tests such as kubectl get istio-io which will collect the before and after state of the system and compare the two. If the post-test environment is not equal, at least in Istio.io, we could mark the test a failure, since the full instructions for system cleanup were either not provided to the user or not cleaned up properly.

This is still needed


Made RedBlackTree and HashArrayMappedTrie package private

Fixes #806

Current coverage is 89.19%

Merging #807 into master will not affect coverage as of ea69f3b

@@            master    #807   diff @@
======================================
  Files           77      77
  Stmts         8076    8076
  Branches      1738    1738
  Methods          0       0
======================================
  Hit           7203    7203
  Partial        376     376
  Missed         497     497

Review entire Coverage Diff as of ea69f3b

Powered by Codecov. Updated on successful CI builds.


Class not being generated

http://pastebin.com/h0x9bSjU
Class CommercialProperty not being generated.

You have put your directly properties inside items, instead of putting a schema inside items. You need to add this inside items:
      "commercialProperty": {
          "type": "array",
          "description": "Торговые объекты",
          "items": {
              "type" : "object",           /* this */
              "properties" : {             /* this */


Generate TypeScript Client by writing C# code

Hello,
Is there any document available to write typescript client using C# code. So that during my MVC project build only I can generate apiclient.ts
Any sample code will be helpful which doesn't use nswag tool but just configuration file and nuget package.

Check out the TypeScript unit tests, e.g.
https://github.com/RSuter/NSwag/blob/master/src/NSwag.CodeGeneration.TypeScript.Tests/AxiosTests.cs#L34


Renovate the WASI example

Feature
Please renovate the WASI example in the documentation and the code, as they are using old wasi_common  and super outdated wasmtime_wasi .
Benefit
Updating the doc and example should allow newcomers find latest stable way to run WASI components, instead of prehistoric workarounds.
Implementation
I can make a PR.

I can make a PR.

This would be wonderful, thanks!


Table metadata autoload does not work on UTF-8 MySQL databses

Superset version
0.20.4
Expected results
When I add a new table from a database that uses UTF-8 encoding, columns and metrics should be auto loaded.
Actual results
Adding a table is somewhat successful. It shows up on the tables list screen (but the 2 colored info banners are missing from the top (new row added, and I should edit the table now)). When I go to edit the table the columns and metrics lists are empty.
After the table shows up on the tables list screen there are 3 rows in the logs:
2017-11-01 08:51:28,586:ERROR:root:Expecting value: line 3 column 68 (char 94)
2017-11-01 08:51:28,617:ERROR:root:Expecting value: line 3 column 68 (char 94)
2017-11-01 08:51:28,617:ERROR:root:Expecting value: line 3 column 68 (char 94)

Adding tables from non utf8 schemas are working fine.
Steps to reproduce
Install Superset
Add a new MySQL database that has a schema created like this:
CREATE DATABASE mydatabase CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
Connection string:
mysql://root:XXXXXXXXXX@mysql:3306/mydatabase?charset=utf8mb4
I have also tried to use just utf8 (for connection string), same results.

Which version of python?

3.5

Is that an issue in 3.5 only?

Any update on this? I have similar issue?


Deleting a subscription

What would you like to be added:
The dashboard should allow deleting a disabled subscription.

https://github.com/yunionio/dashboard/pull/638


Running Route Generator Optimization

To make selected points construct A Convex Hull, and it looks more reasonable and realer.

You can use these points. link
Algorithm: Convex Hull Structure. You can use the Graham scan algorithm. But sometimes, they can't compose a convex hull, you can sort them by center of gravity in their graph.

Code interface as following:
vector<pair<int, int>> sortTestPoints(vector<pair<int, int>> testPoints);

vking fix it! thx!


[Sparky-core] Steady timer instead of system timer.

In your utils/Timer.h you should use std::chrono::steady_clock instead of std::chrono::high_resolution_clock.
The high_resolution_clock depends on the systems time which means that when you change your time, the clock will behave akwardly. So you can set your systems time to the future and your game will go insane.
To fix this issue just use the std::chrono::steady_clock which is based on your systems internal time counter.
Optional:
I would call the class a StopWatch rather than a timer.
Here's the way i implemented it:
template<typename Res>
class StopWatch
{
private:
    std::chrono::steady_clock::time_point m_start;

public:
    StopWatch()
    {
        restart();
    }

    long getElapsedTime()
    {
        return (long)std::chrono::duration_cast<Res>(std::chrono::steady_clock::duration(std::chrono::steady_clock::now() - m_start)).count();
    }

    void restart()
    {
        m_start = std::chrono::steady_clock::now();
    }
};

typedef StopWatch<std::chrono::nanoseconds> StopWatchNs;
typedef StopWatch<std::chrono::microseconds> StopWatchUs;
typedef StopWatch<std::chrono::milliseconds> StopWatchMs;
typedef StopWatch<std::chrono::seconds> StopWatchS;
typedef StopWatch<std::chrono::minutes> StopWatchM;
typedef StopWatch<std::chrono::hours> StopWatchH;

The assumption up until now is that Timer is for timing/performance measurement, due to that it should use high resolution timers, but I agree it should be renamed to StopWatch. Making a variant of it which uses steady timer makes sense.
Of course, I also would advocate for using QueryPerformanceCounter/gettimeofday/mach_absolute_time as well.


Add support for playing to ALSA multi

I don’t know if this is something that can be achieved but I figured I’d ask...
I’m currently just using snapcast, one of the devices in the multi is latent as well and I don’t know if there is a way to configure latency in asound.conf
Error produced by setting --device to a multi defined in /etc/asound.conf:
2020-09-20T19:13:16Z INFO  librespot] librespot bf44c8c (2020-07-29). Built on 2020-08-24. Build ID: h5fuo7pg
[2020-09-20T19:13:19Z INFO  librespot_core::session] Connecting to AP "guc3-accesspoint-b-261t.ap.spotify.com:4070"
[2020-09-20T19:13:19Z INFO  librespot_core::session] Authenticated as "carly-d95" !
[2020-09-20T19:13:19Z INFO  librespot_playback::audio_backend::alsa] Using alsa sink
[2020-09-20T19:13:19Z INFO  librespot_core::session] Country: "US"
[2020-09-20T19:13:19Z INFO  librespot_playback::player] Loading  with Spotify URI spotify:track:4QVaVxJu5rTGqA5LFdsdqu
[2020-09-20T19:13:21Z INFO  librespot_playback::player]  (238595 ms) loaded
ALSA lib pcm.c:8424:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8424:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8424:(snd_pcm_recover) underrun occurred
...
If anyone has ideas let me know if not, snapcast it is.

This isn't a librespot problem it's a configuration issue.
It would help though if you explained you're setup and desired audio flow. Like are you trying to do librespot > snapcast server > x number of clients on different machines? Are you trying to play audio on the server too but you can't keep it sync'd with the other clients not on the same machine? In any event I would think that you'd want to output to the pipe file the snapcast server is listening to directly. If you want to listen to audio on the same machine as the server run a client on that machine and let snapcast do it's job and handle keeping everything in sync including the host device. You'll never be able to keep it sync'd if you split the audio before snapcast.
It should look like this:
Librespot > snapcast pipe file > snapcast server x number of clients one of which may be on the same device.

If that still doesn't work and everything is more or less in sync but you're still getting underruns on that one device you can raise the buffer on all devices (to keep them in sync) until the underruns stop on the crap device. The only way I know how to do that is with dmix.
Something like this should work. This will get you a 1 sec buffer which should be plenty. This ofc means that all devices will have 1 sec of latency but they should more or less be in sync.
 defaults.pcm.card 1 # replace with whatever your device is.
defaults.ctl.card 1 # replace with whatever your device is.

pcm.dmixer {
    type dmix
    ipc_key 1024
    ipc_perm 0666
    slave {
        pcm "hw:1" # replace with whatever your device is.
        rate 44100
        format S16_3LE
        period_time 125000
        buffer_time 1000000
    }
    bindings {
        0 0
        1 1
    }
}

ctl.dmixer {
    type hw
    card "hw:1" # replace with whatever your device is.
}

pcm.!default {
    type plug
    slave.pcm dmixer
}

You would also want to set snapcast to 16 bit 44.1 Khz, it defaults to 48 Khz I believe. There's no real point of upsampling to 48 Khz unless your devices don't support 44.1 Khz.

The whole reason I was trying to do this was to eradicate the need of snapcast. I will try your suggestion this afternoon. Basically I want librespot to send audio to my jbl Bluetooth speaker and to loop in (for use with MLSC)
Here is my asound.conf:
pcm.multi {
type route;
slave.pcm {
type multi;
slaves.a.pcm "jbl";
slaves.b.pcm "loopin";
slaves.a.channels 2;
slaves.b.channels 2;
bindings.0.slave a;
bindings.0.channel 0;
bindings.1.slave a;
bindings.1.channel 1;
bindings.2.slave b;
bindings.2.channel 0;
bindings.3.slave b;
bindings.3.channel 1;
}
ttable.0.0 1;
ttable.1.1 1;
ttable.0.2 1;
ttable.1.3 1;

}
pcm.both {
type plug
slave.pcm "multi"
}
#carlyd95
pcm.loopin {
type plug
slave.pcm "hw:Loopback,0,0"
}
pcm.loopout {
type plug
slave.pcm "plughw:Loopback,1,0"
}
pcm.jbl {
type plug
slave {
pcm {
type bluealsa
device 98:52:3D:BB:82:F3
profile "a2dp"
}
}
hint {
show on
description "JBL Charge 4"
}
}
pcm.sony {
type plug
slave {
pcm {
type bluealsa
device 74:45:CE:27:E3:08
profile "a2dp"
}
}
hint {
show on
description "JBL Charge 4"
}
}

I don't think you'll ever be able to match the latency of your bluetooth speaker. Even if you could get close it would probably drift up and down which would cause sort of a weird phasing effect like a guitar effects pedal. I don't think Bluetooth has any sort of latency guarante.

Thanks man, that’s what I needed to know. I’ll continue to use snapcast.
Here’s the project btw.


Why do the server cares about the connected peers?

After submitting my pull request #7 I realized that something is conceptually wrong with keeping on the server an array of connected peers:
https://github.com/t-mullen/simple-signal/blob/00a8284f38df7cc390117c355752f5ff22456d13/server/src/simple-signal-server.js#L15
As I see, the problem is that a signaling server does not have to care about "which" or "how many" peers are connected, it should only help peers connect to each other.
Conceptual problems apart, it is technically impossible to keep track of the connected peers since its impossible to detect when they disconnect, and that array will grow and grow wasting more and more memory until the node process dies (memory leak):
https://github.com/t-mullen/simple-signal/blob/00a8284f38df7cc390117c355752f5ff22456d13/server/src/simple-signal-server.js#L62
In addition, as you can see in the previous code snippet, the peers are tightly coupled to the socket ID, so if for some reason you want to know which peers are connected to the signaling server via socket (not between them), you can always ask for Object.keys(self._sockets).
Or I'm wrong and I'm not being able to see what's the real reason for keeping this array 😅

I have submitted a PR with the changes #9

Not sure. You're right that it seems to have no purpose. Merged PR 👍


Desktop: how to listen dock app icon click event

step:

click window close set window visible false

i want show window on click dock app icon (set visible true)

resolved
Desktop.getDesktop().addAppEventListener(object : AppReopenedListener {
override fun appReopened(e: AppReopenedEvent) {
}

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.


move the interface to k8sassist package - [closed]

In GitLab by @tmon546596046 on May 15, 2018, 06:18
Merges updatek8s18 -> updatek8s18

In GitLab by @wknet123 on Nov 13, 2019, 10:54
closed


Different users in the os for every vscode-live user.

When a user signs into the vscode server the vscode internal terminal will be signed in to a user with the same name as them, so that they can have different permissions to files.

Not a bad idea !
And maybe also allows people to access or not to sudo

Not a bad idea !
And maybe also allows people to access or not to sudo

Yep, and not have access to other files on the pc if your not using a vm.


Logging out of rancher server, redirected to 404 page not found

Setup

Rancher version: v2.6-head e655fd8 HA server
Browser type & version: Firefox, version: 94.0.1

Describe the bug
When I log out of my rancher server, I was redirected to 404 Page not found rather than login page.
To Reproduce
Create a rancher server on v2.6-head
Login to the rancher server
Logout of rancher server
Result
Redirected to 404 Page not found
Expected Result
Expected to be taken to login page.
Screenshots

If we select `Go Home` we are then taken to the login page.
Additional context
console logs only has 401 must authenticate:
type | "error"
status | "401"
message | "Unauthorized 401: must authenticate"

Verified on v2.6-head e655fd8
Login page works fine and no errors see on the browsers chrome, firefox and safari
Logged out and redirected to the login page
Enabled auth and verified upon logging out, redirected to login page and login thereafter works.


Add nullable type handing

This adds the missing nullable type handling in typeAttributes, which metioned in Issue #49 nullable type is not probably handled.

LGTM. Thanks!


Java Basics

Objective: Understand Java Basics
A high-level programming language used to create complete applications that may run on a single computer or be distributed among servers and clients in a network. This key competency includes using common language features in Java, class hierarchies, design patterns, among others.

Key Competencies:

Use common language features - Java comes with a clean and simple syntax, object-oriented language, is platform-independent, robust, distributed, portable, and risk known for high performance. This key competency helps explore the common features of Java.
Class Hierarchies - Explore the hierarchical structure of Java. Java provides a universal superclass called Object that is defined to be the root of the entire class hierarchy. Every class that is defined in a Java program implicitly extends the class Object.
Multiple classes - A Java program may contain any number of classes. Explore the different kinds of classes in Java. There are five kinds of classes: package-level, nested top-level, member, local, or anonymous.
Common design patterns - In the context of Java, design patterns are divided into three categories – creational, structural, and behavioral patterns. Understand the usage of design patterns, their applications, and more.

Concepts

It is recommended to understand "Object Oriented"](https://github.com/codeanit/til/issues/212) before going through Java basics as the language is primarily build based on that concept.

Iterator Inteface
An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Framework. Iterators differ from enumerations in two ways:

Iterators allow the caller to remove elements from the underlying collection during the iteration with well-defined semantics.
Method names have been improved.

Object Ordering, Comparable and Comparators
Comparable implementations provide a natural ordering for a class, which allows objects of that class to be sorted automatically. The following table summarizes some of the more important Java platform classes that implement Comparable.

Class
Natural Ordering

Byte
Signed numerical

Character
Unsigned numerical

Long
Signed numerical

Integer
Signed numerical

Short
Signed numerical

Double
Signed numerical

Float
Signed numerical

BigInteger
Signed numerical

BigDecimal
Signed numerical

Boolean
Boolean.FALSE < Boolean.TRUE

File
System-dependent lexicographic on path name

String
Lexicographic

Date
Chronological

CollationKey
Locale-specific lexicographic

What if you want to sort some objects in an order other than their natural ordering? Or what if you want to sort some objects that don't implement Comparable? To do either of these things, you'll need to provide a Comparator — an object that encapsulates an ordering. Like the Comparable interface, the Comparator interface consists of a single method.
public interface Comparator {
int compare(T o1, T o2);
}
The compare method compares its two arguments, returning a negative integer, 0, or a positive integer depending on whether the first argument is less than, equal to, or greater than the second. If either of the arguments has an inappropriate type for the Comparator, the compare method throws a ClassCastException.
Much of what was said about Comparable applies to Comparator as well. Writing a compare method is nearly identical to writing a compareTo method, except that the former gets both objects passed in as arguments. The compare method has to obey the same four technical restrictions as Comparable's compareTo method for the same reason — a Comparator must induce a total order on the objects it compares.
Autoboxing, Unboxing
Autoboxing is the automatic conversion that the Java compiler makes between the primitive types and their corresponding object wrapper classes. For example, converting an int to an Integer, a double to a Double, and so on. If the conversion goes the other way, this is called Unboxing.
Example from primitive to object conversion of integer type: https://mkyong.com/Java/java-convert-int-to-integer-example

Resources:

https://introcs.cs.princeton.edu/java/11cheatsheet
https://trello.com/c/pkMvOBLq/727-must-know-for-java-dev
https://introcs.cs.princeton.edu/java
https://docs.oracle.com/javase/tutorial/java
https://docs.oracle.com/javase/tutorial/tutorialLearningPaths.html
https://www.informit.com/articles/article.aspx?p=2180072

Variables
The Java programming language uses both "fields" and "variables" as part of its terminology. Instance variables (non-static fields) are unique to each instance of a class. Class variables (static fields) are fields declared with the static modifier; there is exactly one copy of a class variable, regardless of how many times the class has been instantiated. Local variables store temporary state inside a method. Parameters are variables that provide extra information to a method; both local variables and parameters are always classified as "variables" (not "fields"). When naming your fields or variables, there are rules and conventions that you should (or must) follow.
The Java programming language defines the following kinds of variables:

Instance Variables (Non-Static Fields) Technically speaking, objects store their individual states in "non-static fields", that is, fields declared without the static keyword. Non-static fields are also known as instance variables because their values are unique to each instance of a class (to each object, in other words); the currentSpeed of one bicycle is independent from the currentSpeed of another.
Class Variables (Static Fields) A class variable is any field declared with the static modifier; this tells the compiler that there is exactly one copy of this variable in existence, regardless of how many times the class has been instantiated. A field defining the number of gears for a particular kind of bicycle could be marked as static since conceptually the same number of gears will apply to all instances. The code static int numGears = 6; would create such a static field. Additionally, the keyword final could be added to indicate that the number of gears will never change.
Local Variables Similar to how an object stores its state in fields, a method will often store its temporary state in local variables. The syntax for declaring a local variable is similar to declaring a field (for example, int count = 0;). There is no special keyword designating a variable as local; that determination comes entirely from the location in which the variable is declared — which is between the opening and closing braces of a method. As such, local variables are only visible to the methods in which they are declared; they are not accessible from the rest of the class.
Parameters You've already seen examples of parameters, both in the Bicycle class and in the main method of the "Hello World!" application. Recall that the signature for the main method is public static void main(String[] args). Here, the args variable is the parameter to this method. The important thing to remember is that parameters are always classified as "variables" not "fields". This applies to other parameter-accepting constructs as well (such as constructors and exception handlers) that you'll learn about later in the tutorial.

The Java programming language is statically-typed, which means that all variables must first be declared before they can be used. This involves stating the variable's type and name.
int gear = 1; //This tells program that a field named "gear" exists, holds numerical data, and has an initial value of "1"

A primitive type is predefined by the language and is named by a reserved keyword. Primitive types are special data types built into the language; they are not objects created from a class. The new keyword isn't used when initializing a variable of a primitive type. Primitive values do not share state with other primitive values. The eight primitive data types are: byte, short, int, long, float, double, boolean, and char. The java.lang.String class represents character strings. The compiler will assign a reasonable default value for fields of the above types; for local variables, a default value is never assigned. float and double data types should never be used for precise values, such as currency, the java.math.BigDecimal class should be used instead.
Literals
A literal is the source code representation of a fixed value; literals are represented directly in your code without requiring computation. Binary, Decimal, and Hexadecimal systems are represented in source code. As shown below, it's possible to assign a literal to a variable of a primitive type:
boolean result = true;
char capitalC = 'C';
byte b = 100;
short s = 10000;
int i = 100000;

In addition to the eight primitive data types listed above, the Java programming language also provides special support for character strings via the java.lang.String class. Enclosing your character string within double quotes will automatically create a new String object; for example, String s = "this is a string";. String objects are immutable, which means that once created, their values cannot be changed. The String class is not technically a primitive data type, but considering the special support given to it by the language, you'll probably tend to think of it as such.
Array
An array is a container object that holds a fixed number of values of a single type. The length of an array is established when the array is created. After creation, its length is fixed. Multidimensional array(or array of arrays) can also be declared.
// Declares an array of primitive data types
int[] anArrayOfIntegers;
byte[] anArrayOfBytes;
short[] anArrayOfShorts;
long[] anArrayOfLongs;
float[] anArrayOfFloats;
double[] anArrayOfDoubles;
boolean[] anArrayOfBooleans;
char[] anArrayOfChars;
String[] anArrayOfStrings;

// Allocates memory for 10 integers
anArrayOfIntegers = new int[10];

// Alternate shortcut syntax to create and initialize an array of integers
int[] anArrayOfIntegers = {
    100, 200, 300,
    400, 500, 600,
    700, 800, 900, 1000
};

// Multi-dimensional array of integers
int[][] multiDArrInt;
multiDArrInt = new int[3][3];
// Shortcut
int[][] multiDArrInt = {
            { 1, 2 ,3 },
            { 4, 5, 6 }
        };

Java SE provides several methods for performing array manipulations (common tasks, such as copying, sorting and searching arrays) in the java.util.Arrays class. Some other useful operations provided by methods in the java.util.Arrays class, are:
Searching an array for a specific value to get the index at which it is placed (the binarySearch method).
Comparing two arrays to determine if they are equal or not (the equals method).
Filling an array to place a specific value at each index (the fill method).
Sorting an array into ascending order. This can be done either sequentially, using the sort method, or concurrently, using the parallelSort method introduced in Java SE 8. Parallel sorting of large arrays on multiprocessor systems is faster than sequential array sorting.

       Logical complement operator;
inverts the value of a boolean
Equality and Relational Operators
==      Equal to
!=      Not equal to

  Greater than

=      Greater than or equal to
<       Less than
<=      Less than or equal to

Conditional Operators
&&      Conditional-AND
||      Conditional-OR
?:      Ternary (shorthand for
if-then-else statement)
Type Comparison Operator
instanceof      Compares an object to
a specified type
Bitwise and Bit Shift Operators
~       Unary bitwise complement
<<      Signed left shift

 Signed right shift

Unsigned right shift

&       Bitwise AND
^       Bitwise exclusive OR
|       Bitwise inclusive OR

Control Flow Statements
The if-then statement is the most basic of all the control flow statements. It tells your program to execute a certain section of code only if a particular test evaluates to true. The if-then-else statement provides a secondary path of execution when an "if" clause evaluates to false. Unlike if-then and if-then-else, the switch statement allows for any number of possible execution paths. The while and do-while statements continually execute a block of statements while a particular condition is true. The difference between do-while and while is that do-while evaluates its expression at the bottom of the loop instead of the top. Therefore, the statements within the do block are always executed at least once. The for statement provides a compact way to iterate over a range of values. It has two forms, one of which was designed for looping through collections and arrays.
The break Statement
The break statement has two forms: labeled and unlabeled. Unlabeled break as used in switch statement in general but it can also be used to terminate a for, while, or do-while loop.
An unlabeled break statement terminates the innermost switch, for, while, or do-while statement.
A labeled break terminates an outer statement. The break statement terminates the labeled statement; it does not transfer the flow of control to the label. Control flow is transferred to the statement immediately following the labeled (terminated) statement.
// Example of labeled `break` statement
class BreakWithLabelDemo {
    public static void main(String[] args) {
         int searchfor = 12; // Search int
        int[][] arrayOfInts = {
            { 32, 87, 3, 589 },
            { 12, 1076, 2000, 8 },
            { 622, 127, 77, 955 }
        };
        int i;
        int j = 0;
        boolean foundIt = false;

    search:
        for (i = 0; i < arrayOfInts.length; i++) {
            for (j = 0; j < arrayOfInts[i].length;
                 j++) {
                if (arrayOfInts[i][j] == searchfor) {
                    foundIt = true;
                    break search; // Control flow goes to `if` statement
                }
            }
        }

        if (foundIt) {
            System.out.println("Found " + searchfor + " at " + i + ", " + j);
        } else {
            System.out.println(searchfor + " not in the array");
        }
    }
}
// OUTPUT:  Found 12 at 1, 0

The continue Statement
The continue statement skips the current iteration of a for, while , or do-while loop. The unlabeled form skips to the end of the innermost loop's body and evaluates the boolean expression that controls the loop, whereas a labeled continue statement skips the current iteration of an outer loop marked with the given label.
// The following example program, ContinueWithLabelDemo, uses nested loops to search for a substring within another string. Two nested loops are required: one to iterate over the substring and one to iterate over the string being searched. It uses the labeled form of continue to skip an iteration in the outer loop.
class ContinueWithLabelDemo {
    public static void main(String[] args) {

        String searchMe = "Look for a substring in me";
        String substring = "sub";
        boolean foundIt = false;

        int max = searchMe.length() -
                  substring.length();

    test:
        for (int i = 0; i <= max; i++) {
            int n = substring.length();
            int j = i;
            int k = 0;
            while (n-- != 0) {
                if (searchMe.charAt(j++) != substring.charAt(k++)) {
                    continue test;
                }
            }
            foundIt = true;
                break test;
        }
        System.out.println(foundIt ? "Found it" : "Didn't find it");
    }
}
// OUTPUT: "Found it"

Number Class
There are, however, reasons to use objects in place of primitives, and the Java platform provides wrapper classes for each of the primitive data types. These classes "wrap" the primitive in an object. Often, the wrapping is done by the compiler—if you use a primitive where an object is expected, the compiler boxes the primitive in its wrapper class for you. Similarly, if you use a number object when a primitive is expected, the compiler unboxes the object.
The Number class, and it's sub-classes are  provided by the java.lang package.

BigDecimal and BigInteger are used for high-precision calculations. AtomicInteger and AtomicLong are used for multi-threaded applications.
There are three reasons that you might use a Number object rather than a primitive:

As an argument of a method that expects an object (often used when manipulating collections of numbers).
To use constants defined by the class, such as MIN_VALUE and MAX_VALUE, that provide the upper and lower bounds of the data type.
To use class methods for converting values to and from other primitive types, for converting to and from strings, and for converting between number systems (decimal, octal, hexadecimal, binary).

You use one of the wrapper classes – Byte, Double, Float, Integer, Long, or Short – to wrap a number of primitive type in an object. The Java compiler automatically wraps (boxes) primitives for you when necessary and unboxes them, again when necessary.
The Number classes include constants and useful class methods. The MIN_VALUE and MAX_VALUE constants contain the smallest and largest values that can be contained by an object of that type. The byteValue, shortValue, and similar methods convert one numeric type to another. The valueOf method converts a string to a number, and the toString method converts a number to a string.
To format a string containing numbers for output, you can use the printf() or format() methods in the PrintStream class. Alternatively, you can use the NumberFormat class to customize numerical formats using patterns.
The Math class contains a variety of class methods for performing mathematical functions, including exponential, logarithmic, and trigonometric methods. Math also includes basic arithmetic functions, such as absolute value and rounding, and a method, random(), for generating random numbers.

Characters
The Character class is immutable, so that once it is created, a Character object cannot be changed.
Most of the time, if you are using a single character value, you will use the primitive char type. For example:
char ch = 'a';
// Unicode for uppercase Greek omega character
char uniChar = '\u03A9';
// an array of chars
char[] charArray = { 'a', 'b', 'c', 'd', 'e' };
There are times, however, when you need to use a char as an object—for example, as a method argument where an object is expected. The Java programming language provides a wrapper class that "wraps" the char in a Character object for this purpose. An object of type Character contains a single field, whose type is char. This Character class also offers a number of useful class (i.e., static) methods for manipulating characters.
You can create a Character object with the Character constructor:
Character ch = new Character('a');
The Java compiler will also create a Character object for you under some circumstances. For example, if you pass a primitive char into a method that expects an object, the compiler automatically converts the char to a Character for you. This feature is called autoboxing or unboxing, if the conversion goes the other way.

Strings
Strings are a sequence of characters and are objects. String class to create and manipulate strings. The String class has over 60 methods and 13 constructors.
`java
// String creation
String greeting = "Hello world!";
// or
char[] helloArray = { 'h', 'e', 'l', 'l', 'o', '.' };
String helloString = new String(helloArray);
> Converting Strings to Numbers, and Opposite
Each of the Number subclasses that wrap primitive numeric types also provides a `parseXXXX()` method (for example, `parseFloat()`) that can be used to convert strings to primitive numbers. Since a primitive type is returned instead of an object, the `parseFloat()` method is more direct than the `valueOf()`.

### StringBuilder Class
`StringBuilder` objects are like String objects, except that they can be modified. Internally, these objects are treated like variable-length arrays that contain a sequence of characters. At any point, the length and content of the sequence can be changed through method invocations. The principal operations on a StringBuilder that are not available in String are the append() and insert() methods, which are overloaded so as to accept data of any type. Other good function offered by StringBuilder is `reverse()`.

In general, however, the String class has a wider variety of methods and Strings should always be used unless string builders offer an advantage in terms of simpler code or better performance. For example, if you need to concatenate a large number of strings, appending to a StringBuilder object is more efficient.

There is also a `StringBuffer` class that is exactly the same as the StringBuilder class, except that it is thread-safe by virtue of having its methods synchronized. Threads will be discussed in the lesson on concurrency.
A string can be converted to a string builder using a StringBuilder constructor. A string builder can be converted to a string with the toString() method.

Annotations
Annotations, a form of metadata, provide data about a program that is not part of the program itself. Annotations have no direct effect on the operation of the code they annotate.
Annotations have a number of uses, among them:

Information for the compiler — Annotations can be used by the compiler to detect errors or suppress warnings.
Compile-time and deployment-time processing — Software tools can process annotation information to generate code, XML files, and so forth.
Runtime processing — Some annotations are available to be examined at runtime.

Where Annotations Can Be Used
Annotations can be applied to declarations: declarations of classes, fields, methods, and other program elements. When used on a declaration, each annotation often appears, by convention, on its own line.
As of the Java SE 8 release, annotations can also be applied to the use of types. Here are some examples:

Class instance creation expression: new @Interned MyObject();
Type cast: myString = (@NonNull String) str;
implements clause: class UnmodifiableList<T> implements @Readonly List<@Readonly T> {...}
Thrown exception declaration: void monitorTemperature() throws @Critical TemperatureException {...}

To make the information in @ClassPreamble appear in Javadoc-generated documentation, you must annotate the @ClassPreamble definition with the @Documented annotation.
@Documented
@ClassPreamble (
   author = "John Doe",
   date = "3/17/2002",
   currentRevision = 6,
   lastModified = "4/12/2004",
   lastModifiedBy = "Jane Doe",
   // Note array notation
   reviewers = {"Alice", "Bob", "Cindy"}
)
public class Generation3List extends Generation2List {...}

The predefined annotation types defined in java.lang are @Deprecated, @Override, and @SuppressWarnings.
Usage
Type annotations were created to support improved analysis of Java programs way of ensuring stronger type checking. The Java SE 8 release does not provide a type checking framework, but it allows you to write (or download) a type checking framework that is implemented as one or more pluggable modules that are used in conjunction with the Java compiler.
For example, you want to ensure that a particular variable in your program is never assigned to null; you want to avoid triggering a NullPointerException. You can write a custom plug-in to check for this. You would then modify your code to annotate that particular variable, indicating that it is never assigned to null. The variable declaration might look like this:
@NonNull String str;
When you compile the code, including the NonNull module at the command line, the compiler prints a warning if it detects a potential problem, allowing you to modify the code to avoid the error. After you correct the code to remove all warnings, this particular error will not occur when the program runs.
You can use multiple type-checking modules where each module checks for a different kind of error. In this way, you can build on top of the Java type system, adding specific checks when and where you want them.
With the judicious use of type annotations and the presence of pluggable type checkers, you can write code that is stronger and less prone to error.
In many cases, you do not have to write your own type checking modules. There are third parties who have done the work for you. For example, you might want to take advantage of the Checker Framework created by the University of Washington. This framework includes a NonNull module, as well as a regular expression module, and a mutex lock module. For more information, see the Checker Framework.

Generics
In any nontrivial software project, bugs are simply a fact of life. Careful planning, programming, and testing can help reduce their pervasiveness, but somehow, somewhere, they'll always find a way to creep into your code. This becomes especially apparent as new features are introduced and your code base grows in size and complexity.
Fortunately, some bugs are easier to detect than others. Compile-time bugs, for example, can be detected early on; you can use the compiler's error messages to figure out what the problem is and fix it, right then and there. Runtime bugs, however, can be much more problematic; they don't always surface immediately, and when they do, it may be at a point in the program that is far removed from the actual cause of the problem.
Generics add stability to your code by making more of your bugs detectable at compile time. Code that uses generics has many benefits over non-generic code:

Stronger type checks at compile time. A Java compiler applies strong type checking to generic code and issues errors if the code violates type safety. Fixing compile-time errors is easier than fixing runtime errors, which can be difficult to find.

Elimination of casts. The following code snippet without generics requires casting:

    List list = new ArrayList();
    list.add("hello");
    String s = (String) list.get(0);

When re-written to use generics, the code does not require casting:

    List<String> list = new ArrayList<String>();
    list.add("hello");
    String s = list.get(0);   // no cast

Enabling programmers to implement generic algorithms. By using generics, programmers can implement generic algorithms that work on collections of different types, can be customized, and are type safe and easier to read.

Collections Framework
https://docs.oracle.com/javase/tutorial/collections/index.html

Algorithms
https://docs.oracle.com/javase/tutorial/collections/algorithms/index.html

Java8 Streams https://faisalmorensya.dev/java-8-stream-foreach-filter-map-and-reduce

https://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html

Inner Class
public class A {
    private class B {}
    public class C {}
    public C getC() {
        return new C();
    }
    public B getB() {
        return new B();
    }

}
public class Tryout {
    public static void main(String[] args) {
        A a = new A();
        A.B b = a.getB(); //cannot compile
        A.C c = a.getC(); //compiles perfectly
    }
}

[ ]  https://stackoverflow.com/questions/6264657/why-make-private-inner-class-member-public-in-java

Inner Class
public class A {
    private class B {}
    public class C {}
    public C getC() {
        return new C();
    }
    public B getB() {
        return new B();
    }

}
public class Tryout {
    public static void main(String[] args) {
        A a = new A();
        A.B b = a.getB(); //cannot compile
        A.C c = a.getC(); //compiles perfectly
    }
}

[ ]  https://stackoverflow.com/questions/6264657/why-make-private-inner-class-member-public-in-java


Replace React.PropTypes by prop-types

Fix the following depreaction notice :
Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead.

Waiting for https://github.com/ericgio/react-bootstrap-typeahead/pull/181 to be released to fix React.createClass deprecation notice :
React.createClass is deprecated and will be removed in version 16. Use plain JavaScript classes instead. If you're not yet ready to migrate, create-react-class is available on npm as a drop-in replacement.

Superseded by #54


Add explicit reference to Newtonsoft.Json 13.x.

Explicitly references Newtonsoft.Json 13.0.1. Otherwise, Microsoft.NET.Test.Sdk and/or MSTest.TestAdapter wind up bringing in 10.0.3 which is vulnerable to GHSA-5crp-9r3c-p9vr. This change is intended to mitigate that risk.

I think this is fine, but reading the vulnerability I'm not sure its really relevant for tests.


Staking too low balance can cause MP to be zero.

Issue:
Due to the limitations of Solidity/EVM, which lacks floating-point arithmetic, small staking values combined with frequent MP-accruing function calls can result in zero MP generation. This occurs when accruedMP rounds down to zero, depending on the stake size and time interval between calls. The frequency of calls and the amount staked influence this bug.
As defined in:
https://github.com/vacp2p/staking-reward-streamer/blob/74522424e6e2c9ae45cc1fb8150ae33fa123f24a/src/RewardsStreamerMP.sol#L162
The function to calculate MP is:
\text{accruedMP} = \frac{\text{timeDiff} \cdot \text{totalStaked} \cdot \text{MP\_RATE\_PER\_YEAR}}{365 \, \text{days} \cdot \text{SCALE\_FACTOR}}

When the function is called too frequently, especially for small stakes, accruedMP may round down to zero.
Objective:
To address this, we need to determine the smallest values for which accruedMP = 1.
If we want to keep the minimal stake as 1, we can start by isolating timeDiff to calculate the minimal interval between calls:
\text{timeDiff} = \frac{\text{accruedMP} \cdot 365 \, \text{days} \cdot \text{SCALE\_FACTOR}}{\text{totalStaked} \cdot \text{MP\_RATE\_PER\_YEAR}}

Setting totalStaked = 1 and accruedMP = 1, we get:
x = \frac{1 \cdot 31536000 \cdot 10^{18}}{1 \cdot 10^{18}} = 31,536,000

This result suggests an unrealistic time frame for MP accrual at minimal stake, undermining the "streaming rewards" concept.
Alternative Solution:
A better approach is to calculate the minimal stake required to avoid this issue by isolating totalStaked:
\text{totalStaked} = \frac{\text{accruedMP} \cdot 365 \, \text{days} \cdot \text{SCALE\_FACTOR}}{\text{timeDiff} \cdot \text{MP\_RATE\_PER\_YEAR}}

Using the "minimal block time" of 12 seconds[1] as timeDiff and setting accruedMP = 1, we find:
x = \frac{1 \cdot 31536000 \cdot 10^{18}}{12 \cdot 10^{18}} = 2,628,000

Therefore, to avoid this bug, the minimal staking value should be 2,628,000 wei. This represents a fraction (0.000000000002628) of an 18-decimal token.
Conclusion:
While the exact impact of this bug is not fully clear, it could disrupt results in specific cases. Setting a minimal stake of 2,628,000 wei should prevent zero MP accruals. This value represents an insignificant fraction (0.000000000002628) of an 18-decimal token and would make no financial difference for users. Token standards typically use 18 decimals precisely to address such cases, ensuring that even very small values can be handled accurately without losing precision.
Additionally, the entire contract should be thoroughly reviewed to ensure similar issues don't occur wherever division operations are used.
[1]: In Ethereum, time is divided into 12-second slots. Each slot selects a validator to propose a block. Under ideal conditions, a block is produced every 12 seconds. Source

Using the "minimal block time" of 12 seconds[1] as timeDiff and setting accruedMP = 1, we find:

We need to keep in mind here that the protocol will not be deployed on mainnet but rather on some L2 where the block time might be significantly shortly, meaning we'd need a higher value for the minimum stake allowance.
However that value might be different for different networks.
One thing we can do instead, is to throttle the MP accrual update function, such that it'd only allow for accruing at some minimal time interval that is big enough such that we don't run into scenarios where MP get rounded down to 0.
Something along the lines of
uint256 public constant MIN_UPDATE_INTERVAL = 1 minutes;
mapping(address => uint256) public lastUpdateTime;

function _updateAccountMP(address accountAddress) internal {
    Account storage account = accounts[accountAddress];

    if (block.timestamp - account.lastMPUpdateTime < MIN_UPDATE_INTERVAL) {
        return;
    }
    // ... rest of the function
}```

@3esmit @gravityblast can we reach consensus on what to do here?
I think all suggested solutions to this (theoretical) problem are far from ideal.
I think the impact and likelyhood of this is fairly low.

I don't think is theoretical, users have the ability to explore edge cases, and probably someone would deposit this low amount just because it's a user. If the user deposits a low amount, what are the consequences?
And about the solutions, if it would be a theoretical problem, why would it not be ideal to require a deposit from a balance > than a certain amount?

why would it not be ideal to require a deposit from a balance > than 2,628,000 wei amount?

This amount is the result of blocks being generated every ~12 seconds.
We'll deploy on an L2 where blocks are sequenced at different intervals.
That's why we made the thought experiment of calculating with a block time of 1 second instead.
At this point I think this issue becomes theoretical. However, it would (also theoretically) break as well if blocks are generated faster.