Add experimental CoreCLR support

Adds experimental support for building gRPC C# under CoreCLR (https://dotnet.github.io/).
Also enables support for running tests with run_tests.py:
tools/run_tests/run_tests.py -l csharp --compiler coreclr [--use_docker]

Cool, I like this a lot!

I'll try to rebase this PR soon, so that it's usable by others.

Missing pieces here:
-- signing the assemblies that get packaged (should be easy enough)
-- VersionInfo.cs should file should be link-included in multiple projects (to provide version number)
-- (support compilation in x86 mode - that's that default for .NET 4.5)
-- some files are generated using templates (like VersionInfo.cs) and this hasn't been reflected in this PR yet.
-- NativeDeps.targets is used to copy prebuilt native libraries to the output directory when in development mode (working with gRPC repo itself). This PR doesn't support that yet (mostly because project.json has limited support for such things).

About that last bit, NuGet v3 and dotnet cli now have good support for prebuilt native libraries. No need for special steps anymore, they just need to be in a special folder structure to get picked up.
See https://www.nuget.org/packages/libuv and https://github.com/aspnet/libuv-package.

@ah-  thanks for the tip. I was aware that libuv does some interesting tricks (and what we do I inspired by that to some extent), but we also need to make things work properly on .NET 4.5 and with mono.

Also, project.json seems to be getting deprecated, so we might need to approach things differently (I think eventually, the XML-based projects will make things simpler to us, but currently it's unclear what exactly needs to be done).

rebased.

If there's anything outstanding on this that needs to be done, let me know!

@bobbytables  see above "missing pieces".
Also, we need to figure out how to address the problem with project.json files getting deprecated.

Do we need to do anything about project.json? Once the nuget package is built it doesn't matter if it came from a project.json project or an old-school msbuild one. The files are the same. So grpc could build with project.json for now until the replacement is in place.
Not sure what to do about VersionInfo.cs though.

Updated this PR with a bunch of improvements:

Grpc.Core.Tests and Grpc.Examples.Tests are now passing with dotnet5.4
make old style and new style project files not collide when using VS2015 (used projectname.project.json trick from https://github.com/Microsoft/msbuild/issues/394).
make code build under dotnet5.4 again
use the new "copyToOutput" mappings setting to copy native libraries to the right folder when building (currently only for windows, but good as a proof of concept)

Grpc.InteropTesting project is still not compatible with dotnet5.4, the biggest problem being that
some of the dependencies don't support dotnet5.4:
-- CommandLineParser
-- Moq
-- (Google.Apis.Auth might be problematic as well, as the GetApplicationDefaultCredentials code is currently only available for .NET 4.5)

After reading up a little bit, I realized the right platform to target is netstandard1.X. I was able to make things work with netstandard1.5 (lower standards don't support  Assembly.Location property).
the `Moq' dependency wasn't used much, so eliminated it when compling for CoreCLR.
We still depend on CommandLineParser (might have netstandard support soon) and Google.Apis.Auth. I was able to make things compile (by using conditional compilation and marking some tests as TODO).
Currently all the tests are passing (including Grpc.IntergrationTesting), but all command line apps that are parsing the commandline (interop client, server and qpsworker) compile with netstandard1.5, but don't work.
I also made several improvements to the project.json files. Articles that turned out to be pretty useful:
https://dotnet.github.io/docs/core-concepts/libraries/libraries-with-cli.html
https://dotnet.github.io/docs/project-model/project-json-reference.html#dependencies

@jskeet   @chrisdunelm @ivannaranjo,  would any of you have a moment to review my project.json files (to check the general direction)? I think this PR is close to being mergeable (the actual coreCLR projects currently aren't used anywhere nor is the "new" nuget package, but everything builds and the unit tests are passing, which seems like significant progress).
I will then have the rest of the PR reviewed by my team members, but it's hard to find someone with sufficient CoreCLR expertise these days (mostly because it's very new and a moving target).

Will try to have a look this afternoon.

I started skimming for the later project.json files, as basically once you've got one right for each "type" of project (core library, tests, sample) the rest will be the same. Hope it's useful.

I addressed the comments from Jon (thanks!) and added templates for generating the project.json files.
Currently, all the tests are passing under CoreCLR under linux, windows and mac (except the few tests that are disabled using conditional compilation when compiling under netstandard1.5).
At this stage, it seems the PR is worth integrating.

LGTM

tests.tools/buildgen/generate_projects.sh failure in sanity tests is unrelated (seen and fixed on master).


PlanToEndEffectorPose fails the standard PrPy test

In https://github.com/personalrobotics/prpy/pull/213, @lgw903 reported that or_trajopt fails the standard test_PlanToEndEffectorPose_GoalIsFeasible_FindsSolution test in PrPy:
Traceback (most recent call last):
  File "/home/mkoval/herb-ws/src/prpy/tests/planning/methods/PlanToEndEffectorPose.py", line 16, in test_PlanToEndEffectorPose_GoalIsFeasible_FindsSolution
    path = self.planner.PlanToEndEffectorPose(self.robot, goal_ik)
  File "/home/mkoval/herb-ws/src/prpy/src/prpy/planning/base.py", line 153, in __call__
    return call_planner()
  File "/home/mkoval/herb-ws/src/prpy/src/prpy/planning/base.py", line 133, in call_planner
    *args, **kw_args)
  File "/home/mkoval/herb-ws/src/or_trajopt/src/or_trajopt/planning.py", line 380, in PlanToEndEffectorPose
    return self._PlanToIK(robot, pose, **kwargs)
  File "/home/mkoval/herb-ws/src/or_trajopt/src/or_trajopt/planning.py", line 460, in _PlanToIK
    return self._Plan(robot, request, **kwargs)
  File "/home/mkoval/herb-ws/src/or_trajopt/src/or_trajopt/planning.py", line 286, in _Plan
    raise PlanningError("Result was in collision.")
PlanningError: Result was in collision.

It's possible that the optimizer got stuck in a local minimum that was in collision. However, I would be surprised if this was the case - this is a very easy problem.
@psigen Could you look into this? Is it possible that we're not handling goal sets correctly?

This was due to an offset in the local tool transform which is resolved by https://github.com/personalrobotics/or_trajopt/pull/16.


IsCollinear: detect and handle integer multiplication wrapping (version 2)

This is similar to #832, but tries to avoid branching and division.
@here-abarany, what do you think?

Looks good to me.
Do note that the C# and Pascal implementations very likely suffer from the same issues.

Do note that the C# and Pascal implementations very likely suffer from the same issues.

Yes. Hopefully easier to port this than the more complicated implementation.

@AngusJohnson, what do you think of this alternative?

@AngusJohnson, what do you think of this alternative?

Juha, I definitely think we're getting much closer, and I really appreciate the effort you've made.
I was a little concerned that these changes would affect performance, but in my testing so far, it doesn't seem to have done so 👍.
And I was wondering if it would be better to avoid calling ProductIsEqual when none of the upper 32bits in a,b,c,d are set (which I believe would be likely for most users). But given that calling ProductIsEqual has negligible impact on performance, that additional check probably wouldn't be necessary.
So really the only (temporary) reservation I have is getting my head around the logic in CalculateCarry(). Thanks for the link there which is helping a little 😜.

And I was wondering if it would be better to avoid calling ProductIsEqual when none of the upper 32bits in a,b,c,d are set (which I believe would be likely for most users). But given that calling ProductIsEqual has negligible impact on performance, that additional check probably wouldn't be necessary.

Yeah, and as pointed out by @here-abarany, that kind of branching may very well be more detrimental to performance than the additional instructions.

So really the only (temporary) reservation I have is getting my head around the logic in CalculateCarry(). Thanks for the link there which is helping a little 😜.

There are also alternative implementations out there, some of which are perhaps a bit clearer. I could try and find you some?

I could try and find you some?

I hope that won't be necessary 🤞. I just need a bit of time (and a clear head) to work it out 😁.
(I'm very reluctant to use code that I don't fully understand.)

I'm very reluctant to use code that I don't fully understand.

I very much appreciate this and

Oops, accidentally closed this... 🙈

I'll probably rewrite CalculateCarry so that I can understand what's happening there😁.
I just hope this doesn't break things again🤞.
inline uint64_t CalculateCarry(uint64_t a, uint64_t b)
{
  const uint64_t aHi = a & 0xFFFFFFFF00000000;
  const uint64_t aLo = a & 0xFFFFFFFF;
  const uint64_t bHi = b & 0xFFFFFFFF00000000;
  const uint64_t bLO = b & 0xFFFFFFFF;
  // a * b == (aHi + aLo) * (bHi + bLo)
  // a * b == (aHi * bHi) + (aHi * bLo) + (aLo * bHi) + (aLo * bLo)
  uint64_t carry = (aHi >> 32) * (bHi >> 32);
  // but since (aHi * bLo) + (aLo * bHi) + (aLo * bLo) may also (just) overflow
  // do safely ... if ((aHi * bLo) + (aLo * bHi) + (aLo * bLo) > MAX_INT64) ++carry
  if ((aLo * bHi) + (aLo * bLO) > (std::numeric_limits<uint64_t>::max() - (aHi * bLO))) ++carry;
  return carry;
}

I just hope this doesn't break things again🤞.

For what it's worth: I noticed that there's already some serious test automation coverage – in the sense that whenever I made a mistake doing this, it was flagged by at least some (and often multiple) test cases. Which is great! 💪
Of course doesn't mean one should blindly rely on the tests only, but at least simple mistakes will probably be detected right away.

// do safely ... if ((aHi * bLo) + (aLo * bHi) + (aLo * bLo) > MAX_INT64) ++carry

Just a nitpick: that should be MAX_UINT64, right?

And yes, your version is very readable, now I think I understand this too 😅
You use redundant parentheses more than I would, but that's a matter of taste I guess.

You use redundant parentheses more than I would, but that's a matter of taste I guess.

I was deliberately heavy handed with parentheses so they would parallel the commented code logic above.

I'll probably rewrite CalculateCarry so that I can understand what's happening there😁. I just hope this doesn't break things again🤞.
inline uint64_t CalculateCarry(uint64_t a, uint64_t b)
{
  const uint64_t aHi = a & 0xFFFFFFFF00000000;
  const uint64_t aLo = a & 0xFFFFFFFF;
  const uint64_t bHi = b & 0xFFFFFFFF00000000;
  const uint64_t bLo = b & 0xFFFFFFFF;
  // a * b == (aHi + aLo) * (bHi + bLo)
  // a * b == (aHi * bHi) + (aHi * bLo) + (aLo * bHi) + (aLo * bLo)
  uint64_t carry = (aHi >> 32) * (bHi >> 32);
  // but since (aHi * bLo) + (aLo * bHi) + (aLo * bLo) may also (just) overflow
  // do this (but safely) ... if ((aHi * bLo) + (aLo * bHi) + (aLo * bLo) > MAX_UINT64) ++carry
  if ((aLo * bHi) + (aLo * bLo) > (std::numeric_limits<uint64_t>::max() - (aHi * bLo))) ++carry;
  return carry;
}

Actually, looking again more closely, I don't think the code above is correct.
And if it is wrong then I believe I was somewhat mislead by the StackOverflow link provided.
I think the following code is correct (or almost correct), but it's bedtime again so I may not be thinking straight ...
  inline uint64_t CalcOverflowCarry(uint64_t a, uint64_t b)
  {
    const uint64_t aHi = a & 0xFFFFFFFF00000000;
    const uint64_t aLo = a & 0xFFFFFFFF;
    const uint64_t bHi = b & 0xFFFFFFFF00000000;
    const uint64_t bLo = b & 0xFFFFFFFF;
    // a * b == (aHi + aLo) * (bHi + bLo)
    // a * b == (aHi * bHi) + (aHi * bLo) + (aLo * bHi) + (aLo * bLo)
    return (aHi >> 32) * (bHi >> 32) +
      (((aHi >> 32) * bLo) >> 32) + (((bHi >> 32) * aLo) >> 32);
  }

return (aHi >> 32) * (bHi >> 32) + ((aHi * bLo) >> 32) + ((bHi * aLo) >> 32);

Hmm but won't aHi * bLo and bHi * aLo possibly wrap here?

return (aHi >> 32) * (bHi >> 32) + ((aHi * bLo) >> 32) + ((bHi * aLo) >> 32);

Hmm but won't aHi * bLo and bHi * aLo possibly wrap here?

You just missed my edit. (See above.)

Just in case, this one (Emulate64x64to128) looks quite simple too.

Thanks Tom. You've just reminded me of my own Int128Mul and Int128 class in Clipper1.

Hi all, following the discussion and throwing in my two cents...
This one https://stackoverflow.com/a/1815371/1158913 seems to behave correctly for me, returning the expected carry.
I've checked against a naive implementation (carry128()) using uint_128 (to ensure correct results - also tested in Python) and an adaptation of the solution in the link:
typedef unsigned __int128 uint128_t;
uint64_t carry128(uint64_t a, uint64_t b) {
    uint128_t a_128 = a;
    uint128_t res_128 = a_128 * b;
    uint64_t carry = (uint64_t) (res_128 >> 64);

    return carry;
}

uint64_t hi(uint64_t x) {
    return x >> 32;
}

uint64_t lo(uint64_t x) {
    return ((1ULL << 32) - 1) & x;
}

// https://stackoverflow.com/a/1815371/1158913
uint64_t multiply_carry(uint64_t a, uint64_t b) {
    // actually uint32_t would do, but the casting is annoying
    uint64_t s0, s1, s2, s3;

    uint64_t x = lo(a) * lo(b);
    s0 = lo(x);

    x = hi(a) * lo(b) + hi(x);
    s1 = lo(x);
    s2 = hi(x);

    x = s1 + lo(a) * hi(b);
    s1 = lo(x);

    x = s2 + hi(a) * hi(b) + hi(x);
    s2 = lo(x);
    s3 = hi(x);

    uint64_t result = s1 << 32 | s0;
    uint64_t carry = s3 << 32 | s2;

    return carry;
}

Examples of testing multiplication with random numbers:
TEST: 0x51eaed81157de061 * 0x3a271fb2745b6fe9
BASELINE carry128: 0x129bbebdfae0464e
CalculateCarry   : 0x129bbebdd0c2c2b2 WRONG
CalcOverflowCarry: 0x129bbebdfae0464e OK
multiply_carry   : 0x129bbebdfae0464e OK

TEST: 0xc2055706a62883fa * 0x26c78bc79c2322cc
BASELINE carry128: 0x1d640701d192519b
CalculateCarry   : 0x1d6407014210e7ab WRONG
CalcOverflowCarry: 0x1d640701d1925199 WRONG
multiply_carry   : 0x1d640701d192519b OK

More...

TEST: 0x874ddae32094b0de * 0x9b1559a06fdf83e0
BASELINE carry128: 0x51f76c49563e5bfe
CalculateCarry   : 0x51f76c490760b8e0 WRONG
CalcOverflowCarry: 0x51f76c49563e5bfd WRONG
multiply_carry   : 0x51f76c49563e5bfe OK

TEST: 0x81fb3ad3636ca900 * 0x239c000a982a8da4
BASELINE carry128: 0x12148e28207b83a3
CalculateCarry   : 0x12148e27c5644c3e WRONG
CalcOverflowCarry: 0x12148e28207b83a2 WRONG
multiply_carry   : 0x12148e28207b83a3 OK

TEST: 0x4be0b4c5d2725c44 * 0x990cd6db34a04c30
BASELINE carry128: 0x2d5d1a4183fd6165
CalculateCarry   : 0x2d5d1a40f6935288 WRONG
CalcOverflowCarry: 0x2d5d1a4183fd6164 WRONG
multiply_carry   : 0x2d5d1a4183fd6165 OK

TEST: 0x978ec0c0433c01f6 * 0x2df03d097966b536
BASELINE carry128: 0x1b3251d91fe272a5
CalculateCarry   : 0x1b3251d8cbf286c1 WRONG
CalcOverflowCarry: 0x1b3251d91fe272a4 WRONG
multiply_carry   : 0x1b3251d91fe272a5 OK

TEST: 0x49c5cbbcfd716344 * 0xc489e3b34b007ad3
BASELINE carry128: 0x38a32c74c8c191a4
CalculateCarry   : 0x38a32c73f0912874 WRONG
CalcOverflowCarry: 0x38a32c74c8c191a3 WRONG
multiply_carry   : 0x38a32c74c8c191a4 OK

TEST: 0xd3361cdbeed655d5 * 0x1240da41e324953a
BASELINE carry128: 0x0f0f4fa11e7e8f2a
CalculateCarry   : 0x0f0f4fa0520fd19c WRONG
CalcOverflowCarry: 0x0f0f4fa11e7e8f28 WRONG
multiply_carry   : 0x0f0f4fa11e7e8f2a OK

TEST: 0x51b854f8e71b0ae0 * 0x6f8d438aae530af5
BASELINE carry128: 0x239c04ee3c8cc248
CalculateCarry   : 0x239c04eda032b5b0 WRONG
CalcOverflowCarry: 0x239c04ee3c8cc247 WRONG
multiply_carry   : 0x239c04ee3c8cc248 OK

TEST: 0xbbecf7dbc6147480 * 0xbb0f73d0f82e2236
BASELINE carry128: 0x895170f4e9a216a7
CalculateCarry   : 0x895170f3a2b5c2f1 WRONG
CalcOverflowCarry: 0x895170f4e9a216a5 WRONG
multiply_carry   : 0x895170f4e9a216a7 OK

WRONG (of 10 tries):
  CalculateCarry   : 10
  CalcOverflowCarry: 9
  multiply_carry   : 0

Hope it's helpful.

Thanks Giuseppe.
StackOverflow is a fantastic resource, but the code there isn't always reliable (even from contrubutors with very high reputations).
Anyhow, I've just updated clipper.core.h again with a revised CalcOverflowCarry function.


Fixed #26341 -- Fixed makemessages breaking location comments for HTML files

It seems that this solution, unfortunately, doesn't cover another common case: same string in the same file twice.
We've devised this case with @veranika-sab while discussing next iteration of the patch for #6404.
Here's a simple test:
import re
old_path = 'index.html.py'
new_path = 'index.html'
msgs = """
#: about.html.py:7 index.html.py:3 index.html.py:22 products.html.py:12
msgid "Cancel"
msgstr "Cancel"
"""
msgs = re.sub(
    r'^(#: .*)(' + re.escape(old_path) + r')',
    r'\1' + new_path,
    msgs,
    flags=re.MULTILINE
)
print(msgs)

It makes only a single replacement, thus leaving one of index.html.py unchanged:
#: about.html.py:7 index.html.py:3 index.html:22 products.html.py:12
msgid "Cancel"
msgstr "Cancel"

I believe there's no elegant solution with multiline regexp.

Good catch, and sorry for not following your discussion. What about #6540?


app doesnt start

Hey, I dont have any errors but for some reason if I start the  App no window will open up.. I dont have any clue why
what I see: https://youtu.be/m6mFGUO7_7Q

Have you used files from the Templates directory? They are for plug WPF UI Visual Studio 2022 Templates.


Fix copy/paste typo

Presumably, core.local_sudo only runs commands on localhost, and not any remote host(s). The cmd parameter description should reflect that.

Hat tip to @NetDevLazg for noticing and pointing it out to me.


Fix TSL popup issue on transcript table.

Requirements

Filling out the template is required. Any pull request that does not include enough information to be efficiently reviewed may be rejected.
Please consider which branch this is to be submitted against. This is usually obvious, however if it is to be applied to both a release branch nn and master then please submit it against postreleasefix/nn and let us merge it into to the two branches.

Description
@ens-ma7 's explained the cause of this issue in the related Jira ticket:
Since we moved the help system to using the EBI glossary (https://www.ebi.ac.uk/ols/api/ontologies/ensemblglossary/terms?size=500 ), the key for retrieving the help content for TSL has changed. Instead of TSL:1 it is now "TSL 1" and for TSL it is "Transcript support level".
Views affected
Transcript table TSL popup:
http://www.ensembl.org/Homo_sapiens/Gene/Summary?g=ENSG00000139618;r=13:32315086-32400268
Possible complications
_
Merge conflicts
_
Related JIRA Issues (EBI developers only)
_ Sandbox link is added to the following ticket:
https://www.ebi.ac.uk/panda/jira/browse/ENSWEB-5684

Hi @Mehrnaz-Charkhchi code change is fine but you made the PR against the branch postreleasefix/101, is that correct? We only made a PR against a postreleasefix branch if we want to push live.  Looking at the Jira ticket, it says for release 102.
The other thing that i will advise is to add some description in the PR and the Jira ticket about the cause of the problem and what was the fix. I have added a description to the Jira ticket, might be good to add something in the PR as well for future reference.

Thanks @ens-ma7, You're right it's a 102 fix.
Should I wait for 102 branches?
Thanks for adding description to the ticket. I'll add details to PR as well.

@Mehrnaz-Charkhchi you can do the PR against master.  It will get push to the release branch when we create it later in the release cycle.

@ens-ma7, Done!


Can't collect a configuration when the username is 'root' on Junos Routers.

When I try the tool with a inventory file which has some Junos routers with 'root' user, the collected configuration is not valid as below.
$ cat inventory.json
[
    {
        "hostname" : "host1",
        "username" : "user",
        "password" : "pass123",
        "ipv4"     : "<IP_ADDRESS>",
        "os"       : "JUNOS"
    },
    {
        "hostname" : "host2",
        "username" : "root",
        "password" : "rootpass123",
        "ipv4"     : "<IP_ADDRESS>",
        "os"       : "JUNOS"
    }
]

$ cat host1.txt
show configuration | no-more
## Last commit: 2015-08-31 07:46:05 JST by root
version 12.3R9-S1;
...(snip)...

$ cat host2.txt
show configuration | no-more
show: Command not found.
no-more: Command not found.

I recommend you to use the following command when the username is 'root' because the login shell of 'root' user is not Junos CLI but csh.
ssh root@ipaddr "cli show configuration \| no-more"
Thanks,
Kazuki Shimizu

Supported JUNOS root mode. https://github.com/taijiji/ConfigCollector/commit/4a743c17633470a9c74667b963dbd30ea0b509d9
Thank you for Issue and truly sorry for delay.


Typecast $rows as an array

Laravel decided that $rows needs to be typecast as an array.
Fixes #8

Yea, this is a change that keeps getting made back and forth as people use 5.0 or 5.1 or 5.2. We have to create new packages in the organization to handle this. However, I'm a bit full up this week. =(

Sorry, I want to merge this but I can't without breaking things. I've made this change myself and had to revert it once already. =(

Annoying that it even has to be changed, but what can we do? No worries on closing it!

Right now we have laravel 4 and laravel 5 specific classes. We need a laravel 5.2(i THINK that's where the api change occured, maybe 5.1) set.. Something like.
Laravel4/
Laravel50/
Laravel51/
Where Laravel51/ is the current API.
Of course to do this, we have to have another Laravel install set up for testing. Ideally, we can verify that it works in Laravel 4 (I use it all the time), Laravel 5.2 (I use it all the time) and 5.0 / 5.1 (I never use them).
If the package drivers can work on all of those, no matter how it's done (more or less) then we can call it a success.

Of course, first thing would be to determine where the BC break occurred. =)


Fails for simple type inference

TypeScript Version: 3.6.0-dev.20190726

Search Terms:
type inference
Code
declare function f(x: string | undefined): string;
declare function id<T>(x: T): T;

let state: undefined | string = undefined;
while (true) {
  const x = id(f(state));
  state = x;
}

// A *self-contained* demonstration of the problem follows...
// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc.

Expected behavior:
x: string
Actual behavior:
 'x' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
Playground Link:
https://www.typescriptlang.org/play/#code/CYUwxgNghgTiAEAzArgOzAFwJYHtVIAoAPALngGcMYtUBzeAH3jVERpGAEozLq6BuAFChIsBCnTY88LMAA8AFQB8xMgu7wFQwRBAYKGKBhBkWINqg6MDfegF5mqVu2BCA7gAssu+ASrIQTngAb0F4eDA8SngieAdZAkQCSiNAziFwlOM4mKEAX0EgA
Related Issues:

This is a design limitation in the control flow analyzer. Ideally the analyzer would realize that id(f(state)) always has type string regardless of the type of state. However, the analyzer attempts to resolve the type of the expression, which entails resolving the type of state, which entails resolving the type of x (because of the state = x assignment and the back edge of the loop), which leads to a circularity and therefore an implicit any.


[AMD-AIE] Add support for C++ Pack pipeline

This PR consists of 3 commits.
Commit 1:
-- Modifies --iree-amdaie-tile-and-fuse to fetch linalg.matmul as the root op, by passing the others.
Signed-off-by: Vivian Zhang<EMAIL_ADDRESS>Commit 2:
-- Adds the C++ pack based pipeline and adds LinalgExt dependency in AIETarget.
Signed-off-by: Vivian Zhang<EMAIL_ADDRESS>Commit 3:
-- Adds support for switching between Pad and Pack based approaches.
Signed-off-by: Abhishek Varma<EMAIL_ADDRESS>

Hi all.
I tried rebasing it over Update mlir-aie PR but it doesn't generate .vmfbs.
Leads to :-
iree/runtime/src/iree/base/internal/file_io.c:199: NOT_FOUND; failed to open file 'test_pad_cpp.vmfb'; loading bytecode module at 'test_pad_cpp.vmfb'; loading modules and dependencies; creating run context

Without that commit I've tested this branch and it successfully generates vmfbs with correct results for :-

Transform Pad.
Pad.
Pack.

Pack based pipeline is going to be the default case and if we want to test for Pad based approach we need to add --iree-amdaie-pad-pipeline flag and it'd work by setting the appropriate TranslationInfo and choosing the corresponding pipeline.

This is good. Left one comment. Another thing is to try to reconcile this with #106 . That PR is how things should be structured. If it helps we can try to land that, and rebase this on top of that.

Oh okay, Vivian mentioned that too - I see that the only reconciliation involved would be to add the usePadPipeline as a pass option in .td instead of the C++.
I can do that and retest, sure.

This is good. Left one comment. Another thing is to try to reconcile this with #106 . That PR is how things should be structured. If it helps we can try to land that, and rebase this on top of that.

Oh okay, Vivian mentioned that too - I see that the only reconciliation involved would be to add the usePadPipeline as a pass option in .td instead of the C++.
I can do that and retest, sure.

Not really....  It is introducing a new strategy selection pass..

Oh okay, Vivian mentioned that too - I see that the only reconciliation involved would be to add the usePadPipeline as a pass option in .td instead of the C++.
I can do that and retest, sure.

Not really.... It is introducing a new strategy selection pass..

Oh yes, I meant just as a delta since that PR is taking care of most of the base constructs. I guess it'd be nice to have that PR in - I can then rebase and work with that.

cc @yzhang93 , @Abhishek-Varma  and @jtuyls
Vivian and Jorn, I left the PackPipeline as a placeholder for you to add the peeling and the double buffering transformations.

Thanks for this @MaheshRavishankar !
All tests passes - landing it.


FunctionInvoker with FunctionalSpringApplication does not work with AWS lambda events

Describe the bug
I'm using Spring Cloud Function and its AWS adapter to develop my AWS Lambda function.
I'm using my lambda function as API Gateway lambda proxy integration, thus I expect APIGatewayProxyRequestEvent as input and APIGatewayProxyResponseEvent as output (from aws-lambda-java-events dependency).
Using this setup with Functional Bean Definitions leads to java.lang.ClassCastException exception.
Sample
pom.xml (only partially):
<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.7.4</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

<properties>
    <java.version>11</java.version>
    <spring-boot.version>2.7.4</spring-boot.version>
    <spring-cloud-function.version>3.2.7</spring-cloud-function.version>
    <aws-lambda-java-core.version>1.2.1</aws-lambda-java-core.version>
    <aws-lambda-events.version>3.11.0</aws-lambda-events.version>
</properties>
<dependencies>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-function-adapter-aws</artifactId>
    </dependency>
    <dependency>
        <groupId>com.amazonaws</groupId>
        <artifactId>aws-lambda-java-core</artifactId>
        <version>${aws-lambda-java-core.version}</version>
    </dependency>
    <dependency>
        <groupId>com.amazonaws</groupId>
        <artifactId>aws-lambda-java-events</artifactId>
        <version>${aws-lambda-events.version}</version>
    </dependency>

    <dependency>
        <groupId>com.amazonaws</groupId>
        <artifactId>aws-lambda-java-serialization</artifactId>
        <version>1.0.0</version>
    </dependency>
</dependencies>

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-function-dependencies</artifactId>
            <version>${spring-cloud-function.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

TestFunction (java.util.function itself):
package com.company;

import com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent;
import com.amazonaws.services.lambda.runtime.events.APIGatewayProxyResponseEvent;
import org.springframework.stereotype.Component;

import java.util.function.Function;

@Component
public class TestFunction implements Function<APIGatewayProxyRequestEvent, APIGatewayProxyResponseEvent> {
    @Override
    public APIGatewayProxyResponseEvent apply(APIGatewayProxyRequestEvent apiGatewayProxyRequestEvent) {
        return new APIGatewayProxyResponseEvent().withStatusCode(200).withBody("ok");
    }
}

First config option with functional bean definitions:
package com.company;

import com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent;
import com.amazonaws.services.lambda.runtime.events.APIGatewayProxyResponseEvent;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.cloud.function.context.FunctionRegistration;
import org.springframework.cloud.function.context.FunctionType;
import org.springframework.context.ApplicationContextInitializer;
import org.springframework.context.support.GenericApplicationContext;

@SpringBootConfiguration(proxyBeanMethods = false)
public class FunctionalApplication implements ApplicationContextInitializer<GenericApplicationContext> {

    @Override
    public void initialize(GenericApplicationContext ctx) {
        ctx.registerBean("testFunction", FunctionRegistration.class, () -> new FunctionRegistration<>(new TestFunction())
                .type(FunctionType.from(APIGatewayProxyRequestEvent.class).to(APIGatewayProxyResponseEvent.class)));
    }
}

Second config option with regular spring boot application:
package com.company;

import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class RegularApplication {

}

Runner class which should be executed to reproduce observed behavior:
package com.company;

import org.springframework.cloud.function.adapter.aws.FunctionInvoker;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class Runner {
    public static void main(String[] args) throws IOException {
        final String request = "{\"resource\":\"/my/path\",\"path\":\"/my/path\",\"httpMethod\":\"GET\",\"headers\":{\"header1\":\"value1\",\"header2\":\"value2\"},\"multiValueHeaders\":{\"header1\":[\"value1\"],\"header2\":[\"value1\",\"value2\"]},\"queryStringParameters\":{\"parameter1\":\"value1\",\"parameter2\":\"value\"},\"multiValueQueryStringParameters\":{\"parameter1\":[\"value1\",\"value2\"],\"parameter2\":[\"value\"]},\"requestContext\":{\"accountId\":\"123456789012\",\"apiId\":\"id\",\"authorizer\":{\"claims\":null,\"scopes\":null},\"domainName\":\"id.execute-api.us-east-1.amazonaws.com\",\"domainPrefix\":\"id\",\"extendedRequestId\":\"request-id\",\"httpMethod\":\"GET\",\"identity\":{\"accessKey\":null,\"accountId\":null,\"caller\":null,\"cognitoAuthenticationProvider\":null,\"cognitoAuthenticationType\":null,\"cognitoIdentityId\":null,\"cognitoIdentityPoolId\":null,\"principalOrgId\":null,\"sourceIp\":\"IP\",\"user\":null,\"userAgent\":\"user-agent\",\"userArn\":null,\"clientCert\":{\"clientCertPem\":\"CERT_CONTENT\",\"subjectDN\":\"www.example.com\",\"issuerDN\":\"Example issuer\",\"serialNumber\":\"a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1\",\"validity\":{\"notBefore\":\"May 28 12:30:02 2019 GMT\",\"notAfter\":\"Aug  5 09:36:04 2021 GMT\"}}},\"path\":\"/my/path\",\"protocol\":\"HTTP/1.1\",\"requestId\":\"id=\",\"requestTime\":\"04/Mar/2020:19:15:17 +0000\",\"requestTimeEpoch\":1583349317135,\"resourceId\":null,\"resourcePath\":\"/my/path\",\"stage\":\"$default\"},\"pathParameters\":null,\"stageVariables\":null,\"body\":\"Hello from Lambda!\",\"isBase64Encoded\":false}";
        final ByteArrayInputStream bais = new ByteArrayInputStream(request.getBytes(StandardCharsets.UTF_8));
        final ByteArrayOutputStream baos = new ByteArrayOutputStream();

        new FunctionInvoker().handleRequest(bais, baos, null);

        System.out.println(new String(baos.toByteArray(), StandardCharsets.UTF_8));
    }
}

Running Runner.main with MAIN_CLASS=com.company.RegularApplication environment variable I'm getting:
2022-10-05 22:12:31.969  INFO 27272 --- [           main] o.s.c.f.adapter.aws.FunctionInvoker      : Locating function: 'null'
2022-10-05 22:12:31.977  INFO 27272 --- [           main] o.s.c.f.adapter.aws.FunctionInvoker      : Located function: 'testFunction'
2022-10-05 22:12:31.978  INFO 27272 --- [           main] o.s.c.f.adapter.aws.AWSLambdaUtils       : Received: <omitting>
{"statusCode":200,"headers":null,"multiValueHeaders":null,"body":"ok","isBase64Encoded":null}

Running Runner.main with MAIN_CLASS=com.company.FunctionalApplication environment variable I'm getting:
2022-10-05 22:31:40.070  INFO 23484 --- [           main] o.s.c.f.adapter.aws.FunctionInvoker      : Locating function: 'null'
2022-10-05 22:31:40.078  INFO 23484 --- [           main] o.s.c.f.adapter.aws.FunctionInvoker      : Located function: 'testFunction'
2022-10-05 22:31:40.080  INFO 23484 --- [           main] o.s.c.f.adapter.aws.AWSLambdaUtils       : Received: <omitting>
Exception in thread "main" java.lang.ClassCastException: class [B cannot be cast to class com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent ([B is in module java.base of loader 'bootstrap'; com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent is in unnamed module of loader 'app')
	at com.company.TestFunction.apply(TestFunction.java:9)
	at org.springframework.cloud.function.context.catalog.SimpleFunctionRegistry$FunctionInvocationWrapper.invokeFunctionAndEnrichResultIfNecessary(SimpleFunctionRegistry.java:928)
	at org.springframework.cloud.function.context.catalog.SimpleFunctionRegistry$FunctionInvocationWrapper.invokeFunction(SimpleFunctionRegistry.java:884)
	at org.springframework.cloud.function.context.catalog.SimpleFunctionRegistry$FunctionInvocationWrapper.doApply(SimpleFunctionRegistry.java:745)
	at org.springframework.cloud.function.context.catalog.SimpleFunctionRegistry$FunctionInvocationWrapper.apply(SimpleFunctionRegistry.java:588)
	at org.springframework.cloud.function.adapter.aws.FunctionInvoker.handleRequest(FunctionInvoker.java:85)
	at com.company.Runner.main(Runner.java:16)

My understanding that this is a bug, but please confirm what should be an expected result in functional bean definitions case.
Some notes
I've tried to find out exact issue for functional bean definitions case and found the following:

When spring boot application is used (this case), AWSTypesMessageConverter MessageConverter from AWSCompanionAutoConfiguration is registered and picked up by ContextFunctionCatalogAutoConfiguration and its FunctionRegistry (here). That's why everything works fine in that case.
When functional bean definitions is used (this case), AWSCompanionAutoConfiguration is used as "source", but not parsed since for functional case we do not load sources. Additionally, ContextFunctionCatalogAutoConfiguration is not used and FunctionRegistry is being registered by ContextFunctionCatalogInitializer (here), where AWSTypesMessageConverter is not used at all. As I understand, that's the reason why AWS event can't be converted.

Thank you in advance for taking a look at this.

What made you use FunctionInvoker as such:
 new FunctionInvoker().handleRequest(bais, baos, null);

You have missed the whole lifecycle and initialization part .
In any event, it was never meant to be used programmatically as some utility class. Was never designed for that.
It was meant to only execute inside of AWS container as an invocation adapter between java functions and AWS handlers as described here - https://docs.spring.io/spring-cloud-function/docs/current/reference/html/aws.html#_getting_started

Hi @olegz, thanks for your reply.
new FunctionInvoker().handleRequest(bais, baos, null);

It was just a fastest and easiest way to reproduce observed behavior, that's not how I write lambdas with Spring Cloud Function.
Let me then provide another example how to come across this issue:
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.7.4</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.company</groupId>
    <artifactId>test-lambda</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>test-lambda</name>
    <description>test-lambda</description>
    <properties>
        <java.version>11</java.version>
        <spring-boot.version>2.7.4</spring-boot.version>
        <spring-cloud-function.version>3.2.7</spring-cloud-function.version>
        <aws-lambda-java-core.version>1.2.1</aws-lambda-java-core.version>
        <aws-lambda-events.version>3.11.0</aws-lambda-events.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-function-adapter-aws</artifactId>
        </dependency>
        <dependency>
            <groupId>com.amazonaws</groupId>
            <artifactId>aws-lambda-java-core</artifactId>
            <version>${aws-lambda-java-core.version}</version>
        </dependency>
        <dependency>
            <groupId>com.amazonaws</groupId>
            <artifactId>aws-lambda-java-events</artifactId>
            <version>${aws-lambda-events.version}</version>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>
    </dependencies>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-function-dependencies</artifactId>
                <version>${spring-cloud-function.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>org.springframework.boot.experimental</groupId>
                        <artifactId>spring-boot-thin-layout</artifactId>
                        <version>1.0.28.RELEASE</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <excludes>
                        <exclude>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                        </exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <configuration>
                    <createDependencyReducedPom>false</createDependencyReducedPom>
                    <shadedArtifactAttached>true</shadedArtifactAttached>
                    <shadedClassifierName>aws</shadedClassifierName>
                    <artifactSet>
                        <excludes>
                            <exclude>org.projectlombok:lombok:*</exclude>
                        </excludes>
                    </artifactSet>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>

TestFunction.java and FunctionalApplication.java should be the same as in example above.
Now we should build project and run it with docker-lambda:
#Windows 10, git bash
./mvnw clean package

unzip -o -q -d ./target/docker ./target/test-lambda-0.0.1-SNAPSHOT-aws.jar

docker run --rm \
  -e MAIN_CLASS=com.company.FunctionalApplication \
  -v "/${PWD}/target/docker":/var/task \
  lambci/lambda:java11 \
  org.springframework.cloud.function.adapter.aws.FunctionInvoker \
  '{"resource":"/my/path","path":"/my/path","httpMethod":"GET","headers":{"header1":"value1","header2":"value2"},"multiValueHeaders":{"header1":["value1"],"header2":["value1","value2"]},"queryStringParameters":{"parameter1":"value1","parameter2":"value"},"multiValueQueryStringParameters":{"parameter1":["value1","value2"],"parameter2":["value"]},"requestContext":{"accountId":"123456789012","apiId":"id","authorizer":{"claims":null,"scopes":null},"domainName":"id.execute-api.us-east-1.amazonaws.com","domainPrefix":"id","extendedRequestId":"request-id","httpMethod":"GET","identity":{"accessKey":null,"accountId":null,"caller":null,"cognitoAuthenticationProvider":null,"cognitoAuthenticationType":null,"cognitoIdentityId":null,"cognitoIdentityPoolId":null,"principalOrgId":null,"sourceIp":"IP","user":null,"userAgent":"user-agent","userArn":null,"clientCert":{"clientCertPem":"CERT_CONTENT","subjectDN":"www.example.com","issuerDN":"Example issuer","serialNumber":"a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1","validity":{"notBefore":"May 28 12:30:02 2019 GMT","notAfter":"Aug  5 09:36:04 2021 GMT"}}},"path":"/my/path","protocol":"HTTP/1.1","requestId":"id=","requestTime":"04/Mar/2020:19:15:17 +0000","requestTimeEpoch":1583349317135,"resourceId":null,"resourcePath":"/my/path","stage":"$default"},"pathParameters":null,"stageVariables":null,"body":"Hello from Lambda!","isBase64Encoded":false}'

Result is the same - class [B cannot be cast to class com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent

Can you please try with s-c-function 3.2.8. I can't seem to reproduce it.

Actually reproduced

Hi @olegz
First of all, thanks for your efforts and great work.
I am facing the same issue as described above and after trying around for some hours now I hoped that the fix here should solve it. However, I am using 4.0.5 and the changes are not visible there. So after looking at the git history I realised that some of the changes were undone i the scope of GH-966.
Could it be that GH-932 is now broken again?
Your help would be very much appreciated.

To sum up what I am experiencing:
I implemented a functional bean and deployed it to AWS Lambda. It gets triggered by a putObject on an S3 bucket.
In CloudWatch I see that it detects the companion:
SOURCE: class org.springframework.cloud.function.adapter.aws.AWSCompanionAutoConfiguration
However, it seems that it never uses it and so AWSTypesMessageConverter is never called.
And that would mean, that LambdaEventSerializers.serializerFor is not called either.
IMHO this could be the reason for getting
23:44:29.099 [main] DEBUG o.s.c.f.c.c.JsonMessageConverter - Failed to convert value: {
    "Records": [
        {
            "eventVersion": "2.1",
            "eventSource": "aws:s3",
            "awsRegion": "eu-central-1",
            "eventTime": "2023-11-04T23:44:23.905Z",
            "eventName": "ObjectCreated:Put",
            "userIdentity": {
                "principalId": "AWS:xxxxxxxxxxxxxxxxxxx"
            },
            "requestParameters": {
                "sourceIPAddress": "x.x.x.x"
            },
            "responseElements": {
                "x-amz-request-id": "xxxxxxxxxxxxxxxx",
                "x-amz-id-2": "xxxxxxxxxxxxxxxxxxxx"
            },
            "s3": {
                "s3SchemaVersion": "1.0",
                "configurationId": "xxxxxxxxxxxxxxxxxxxxxxxx",
                "bucket": {
                    "name": "xxxxxxxxxxxxxxx",
                    "ownerIdentity": {
                        "principalId": "xxxxxxxxxxxxxxxxxx"
                    },
                    "arn": "arn:aws:s3:::xxxxxxxxxxxxxxxxx"
                },
                "object": {
                    "key": "xxxxxxxxxxxxxxxx",
                    "size": 6064,
                    "eTag": "xxxxxxxxxxxxx",
                    "sequencer": "xxxxxxxxxxxxxx"
                }
            }
        }
    ]
} to: class com.amazonaws.services.lambda.runtime.events.S3Event

and next
java.lang.IllegalStateException: Failed to convert. Possible bug as the conversion probably shouldn't have been attempted here
and
Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of com.amazonaws.services.lambda.runtime.events.models.s3.S3EventNotification$S3EventNotificationRecord (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
I also see
Failed to convert input '[B@5adb0db3' to type class com.amazonaws.services.lambda.runtime.events.S3Event. Will use it as is.


🐛 Hierarchy migrations only ever update the SpatialOS position of the root Actor

How doesn't this break everything

this is an excellent change

very pog

Nice - this should go straight into the rc though


Inline CSS / JS Support

Hi,
I know that this plugin was originally intended to be used for latex but I also use it (a lot) for web development languages, HTML, CSS and JavaScript.
Would it be possible to make it use CSS shortcuts when inside style tags and JS shortcuts when inside Script tags?
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title></title>
	<style>
		test{
			 <CSS Shortcuts should work here>
		}
	</style>
	<script type="text/javascript">
		<javssscript shortcuts should work here>
	</script>
</head>
<body>

</body>
</html>

Okay, I've created a new git branch called modes for implementing this functionality. It should be working already, though it's experimental for the time being. To create the "modes" that you want, you can simply add the following lines to your .vimrc
let g:quicktex_modes = [
    \['js', ['<script'], ['<\script>']]
    \['css', ['<style>'], ['<\style>']]
\]

The syntax for an entry in g:quicktex_modes is [NameOfDictionary, ListOfStartingDelimiters, ListOfEndingDelimiters]. This way, you can set the dictionaries g:quicktex_js and g:quicktex_css and you should have the functionality that you wish.

That is very helpful.  Thank you.  Will this now work in any file type? I think it would be useful to be able to specify that these delimiters should only work in HTML mode.  Just a suggestion.
I originally suggested this for html but I can see it also being useful for markdown code snippet.  I might add something like the following:
let g:quicktex_modes = [
    \['js', ['```js'], ['```']]
    \['css', ['```css'], ['```']]
\]

Yes, I think this could have a lot of potential. Though, it could mean having to rebrand the plugin to make it more general, which would be a pain. I'm actually surprised how fast it still is, though.
In any case, I've just sent a commit to make the modes filetype-specific. The format of g:quicktex_modes should now be [FileType, NameOfDictionary, ListOfStartingDelimiters, ListOfEndingDelimiters]. Also, I'm not sure if I mentioned this, by the order of g:quicktex_modes matters. Earlier entries have priority over latter entries.


Check web accessibilities

In the sixth milestone of Sattar’s portfolio website, we have done pair programming and evaluated the following accessibilities best practices, and implemented necessary changes :
Page titles- Need to change and have made changes. (Abdus Sattar)
Image text alternatives- Alt text modified to give it a more specific name in alt attribute in index.html (Baqar Abbas)
Text headings-Changed text headings from h3 to h2 (Shu Richmond)
Color contrast- It has 39 color contrast, If we modify color contrast that changes the Figma design color combination. That's why we use the same color combination as the Figma design.(Abdus Sattar)
Resize- Modify Desktop Card paragraph font size and line height for better visibility. (Baqar Abbas)
Interaction- No issues found(Abdus Sattar)
Moving content-No issues found(Abdus Sattar)
Multimedia- There is no multimedia file so No issues found(Abdus Sattar)
The basic structure of the page- The layout of the page is according to the figma Desgin (Baqar Abbas)
So we would like to merge this branch.

Hello @Felix45, thanks for your review and give suggestions. We are not understanding If we change the color of the buttons it ignored Figma design. Please explain to us how to change the button background or text foreground color.

Hi, I joined a call with @AbdusSattar-70 and @baqar-abbas  to help them fix the color contrast ratio on the buttons, the color contrast improved when we used a background of #ff5880 from Figma template and #000 for the foreground color. Please review their project.


SyntaxError: Unexpected identifier 'assert' during Grunt buld

Error:
Running "exec:rollup" (exec) task
>> [!] SyntaxError: Unexpected identifier 'assert'
>>     at compileSourceTextModule (node:internal/modules/esm/utils:337:16)
>>     at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:163:18)
>>     at callTranslator (node:internal/modules/esm/loader:429:14)
>>     at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:435:30)
>>     at async ModuleJob._link (node:internal/modules/esm/module_job:106:19)
>> Exited with code: 1.
>> Error executing child process: Error: Process exited with code 1.
Warning: Task "exec:rollup" failed. Use --force to continue.

Fix: Edit rollup.config.mjs
Change:
import pkg from './package.json' assert { type: 'json' };
To:
 import pkg from './package.json' with { type: 'json' };

Aha - it took me a while to figure out why this worked on my machine but not yours, but it must be that you're on Node v22, which has dropped support for "import assertions" (the assert { type: 'json' }; syntax) in favour of "import attributes" (the with { type: 'json' } syntax). I'll make the change. (I might also write up a self-answered Stack Overflow question about this; there's bound to be a bajillion projects caught by the same issue when they upgrade to Node 22.)

For the record, I asked and self-answered a Stack Overflow question about this error: https://stackoverflow.com/q/78876691/1709587


Add an option to go back to home page in the meet our team page

Is your feature request related to a problem? Please describe.
When we navigate to the "Meet Our team" page, there is no option to go back to the home page
Describe the solution you'd like
I was considering adding a button to go back to the home page or perhaps the website logo itself
Describe alternatives you've considered
Another alternative I considered was adding the navbar with all the fields, making it easy for the user to navigate any where from this page itself.
Additional context

I could do something the above. or add the complete navbar from the home page.
Please so review it and let me know. It would be great if you could assign it to me under gssoc-ext and hacktoberfest-accepted and also the appropriate labels

Hii https://github.com/
I’d like to take up this task: Add an option to go back to home page in the meet our team page #248
I’m confident I can complete it and contribute to the project.
Could you please assign it to me? I’ll make sure to deliver by the deadline and follow the project’s guidelines closely. If there are any specific requirements or preferences, feel free to let me know.
Looking forward to your approval!
Thanks,
@naitikhoriya1


Is it possible to login via a cookie, i.e. c_user and xs values only, rather than having to login everytime and produce notifications?

Please see api.getAppState in DOCS.md
Sorry this should have been linked from the readme as well.


Accessibility improvements

Ionic version:  (check one with "x")
[X] 3.x
I would like to try to contribute some accessibility improvements to ionic. So far I've identified a few issues that I intend to work on:

The focus management for certain elements such as toasts, loading elements and alerts seems to make it impossible for screen readers to deal with these properly. Even if focus is manually directed to the element, focus is immediately shifted to the body element interrupting the reading of the element
There should be an option to change the role of these items from dialog to alert depending on what they are used for. Alert should be alert by default
Alerts should be focus traps while active
Icons in the menu should be aria-hidden
If there is a menu button, it should perhaps have aria ownership of the menu it opens

#11309 #9808

Hello! This sounds awesome, cant wait for the PR's!

wave tool also complains about buttons without a text like hambuger button and back button

@awebdeveloper Noted, thanks.
I've spent some time playing around with some of the components while using a screen reader and I wanted to share my thoughts here, in case anyone has some input.
Toast
I can see three possible scenarios of how people would want to use it:

Without it being read by screen readers, in this case it should have no role and potentially be aria-hidden. Note that in this case it CANNOT have a close button
Being read, no close button. The role should be alert.
Being read, close button. Role should be alertdialog

In cases 1&2, the toast controller should not touch focus at all, in case 3, focus needs to go to the close button. I am currently not certain whether in this case, after closing, focus should return to the previously focused element or the document root.
Alert
The alert always needs to be read as interaction is required. Hence role should always be alertdialog. Focus goes to the first interactive element in the alert. Same question as above regarding focus after close. Since the alert is a modal, focus needs to be trapped within it while it is active.
At least on android (I haven't tested on iOS yet) there are two strange issues that I find rather frustrating:

The entire contents are read twice, once because of aria-labelledby and aria-describedby and a second time because of the actual contents of what they are referring to.
If the alert content contains line breaks, the second time the contents are read, they are read line by line with the exclusion of what comes after the last line break. Then the entire contents are read AGAIN line by line...

It seems to me that both of these are issues with the screenreader and I am hesitant to try and implement workarounds. For example, the actual content divs could be set aria-hidden, in which case they would only be read from aria-labelledby and aria-describedby, but in that case it would be impossible to go through the contents one by one manually.
Loading
Since it is a blocking element, it should always be read: role="alert". The spinner should be aria-hidden. It should not touch focus.
Menu
I haven't had a chance to look at it more closely yet, but I'm thinking it should probably trap focus while it is overlayed. (Will need to think about this more carefully, especially considering the case of tablets where we may want the side menu always displayed.
BTW: I haven't found anything about icons in menus in the docs themselves, only in the conference app. Though there, the icons should be set aria-hidden.

@awebdeveloper Under what circumstances have you seen the warnings about buttons? It seems to me that ion-icons automatically get an aria-label corresponding to the name of the icon.

Alright, I think I'm mostly done with what I had set out to do. Still doing a little more testing and then I'll make a pull request. Here's an overview of what I've done.
General
Focus Traps
I've added three functions to platform.ts:
trapFocus(HTMLElement) will trap keyboard focus within an element by identifying the first and last tab-able element in the element and looping around. Since it attached an eventlistener to the element, it is undone automatically when the element is destroyed and doesn't require cleanup
trapVirtualCursor(HTMLElement) will prevent a screen reader's virtual cursor from moving away from the element. It identifies all sibling elements of the element and sets those that are not aria-hidden to aria-hidden and additionally sets a data-traphide attribute to true (so we don't accidentally remove aria-hidden from an element during cleanup that had it before). The function could easily be extended to recursively walk up the DOM hierarchy, but given where menus and overlays appear in the DOM, I don't think it's necessary. There is a small inconvenience in that the virtual focus can still reach all parent elements of the current element but I think that is inevitable.
untrapVirtualCursor(HTMLElement) releases the above virtual cursor trap
Note that once a focus trap is destroyed, focus should always return to the element that had focus before, as long as it still exists.
Roles
Three of the roles specified by WAI-ARIA seem to be relevant for the overlays I have been looking at. Some parts of what I'm writing below are somewhat subjective.
alert elements will be read out immediately when they are created / become visible and should not require any interaction.
alertdialog elements are also read out immediately but do require interaction. This interaction should however be fairly minimal (typically one, perhaps two buttons, it's a slightly fuzzy boundary). Focus should be directed to an active element inside the alertdialog and confined to within the element while it is active.
dialog elements are not read out automatically when they appear. As I understand, labels of the dialog should technically be read out as soon as a child element receives focus, but in practice this does not happen. The most elegant solution I have found after looking at many implementation examples was to give initial focus to the element itself (-> it needs to have tabindex="-1"). Focus should be confined within the dialog while it is active.
I had to make a slightly heavier modification than expected to the markup most of the overlays, because in the current implementation, the "role" attribute sits on the outermost element of the modal (e.g. ), which contains as its first child the backdrop. If we set the focus to this element, as is required for role="dialog", a rather awkward situation arises. At least on android, TalkBack will announce the element followed by "double tap to activate". If a user follows the instruction, this is executed as a click on the backdrop which dismisses the element... So I have instead moved the relevant attributes on element in - to the -wrapper div which has the backdrop as a sibling rather than a child.
Hardware Back Button
This is only relevant for android and windows, but I added back button functionality to dismiss the modals. Tapping the back button is in this case equivalent to tapping the backdrop, so it will only dismiss the modal if enableBackDropDismiss is not set to false.
Components
Action-Sheet
The action sheet only required the mentioned general modifications (moving role attribute etc. inside by one element, storing and restoring the previously active element, trapping focus, and enabling the back button). Role remains as "dialog". The action-sheet interface for the ion-select required no further modifications.
Alert
Aside from the general modifications, the alert has an additional parameter "alertDialogRole" which defaults to "alertdialog". It can be set to dialog instead, in which case it will behave as described for dialog above instead. Since as mentioned above the line between simple and more complicated action is somewhat fuzzy, I felt that this should be user-configurable rather than automatic, with the exception of the alert ion-select interface which will always have several buttons and automatically uses the "dialog" role.
Loading
The loading element required very little modification. The role is set to alert and the spinner (if present) to aria-hidden="true". While no interaction is required, focus is still confined to the element while it was active because a) there should be no interaction with the rest of the page during that time and b) the restoring of focus to the previously active element (or the body element if the previously active one doesn't exist anymore) serves as a notice that loading has completed.
Modal
The modal is complicated because there are no limits to what it can contain. I have given it a "dialog" role. I have added an additional optional parameter "ariaLabel" that will be read out once the modal receives focus. What happens if that has not been specified depends on the page structure but for a well-formatted page should be the page title.
Popover
The popover was the most awkward one to implement. It comes with the same issues as the modal, but has the additional complication that it does not necessarily have to implement a back button. Initiating a backdrop dismiss on a popover while using a screen reader was already very difficult before, but the focus trap makes it even harder. I ended up implementing an invisible button as the first child of the wrapper which will dismiss the element. The button will only be there if enableBackdropDismiss = "true" and has a default label of "Tap to dismiss" which can be changed via the "dismissLabel" parameter I have added. Activating the button wasn't possible if it was moved off screen or covered by another element, so it is now 1x1px and transparent.
As for the modal, there is also a new "ariaLabel" parameter.
The popover interface of the ion-select works fairly well with these changes, the only additional modification I have made is to set the ion-label of each radio to aria-hidden="true", so that on each swipe, the next radio incl. label is focused, otherwise screen readers will read the label, and then the label with the radio,
Toast
For toast there are three scenarios:

If the toast has a close button, the role is always "alertdialog", this overrides the "silent" setting (below). Focus is set to the close button and trapped. I had to implement a workaround, because somehow the button wasn't tap-able on initial focus. So now the focus is first set to the wrapper and then immediately to the close button, which is not noticeable to the user but fixes the problem.
Default behaviour for the toast in the absence of a close button is the "alert" role. Focus is left untouched as the toast should not impact what the user is doing at the moment, the toast text is simply read out.
If the new optional parameter silent is set to true, the toast will instead have no role and will be unnoticeable to a blind user. This can be used for notifications that are not important enough to interrupt what the user is doing and where not noticing them would not be an issue. Should probably be used very sparingly.

Menu
I haven't yet quite figured out the exact mechanisms for the menu, maybe someone else can have a look at this after my focus helper functions are pulled. I tried calling the virtual cursor functions in menu.ts:setOpen() but the function isn't called when the menu is opened/closed by swiping. This can be very problematic if the menu is opened with a button but closed with a swipe because at that point no part of the dom is accessible to the virtual cursor (and the only way to make things work again is to swipe open the menu). Obviously I had to remove that again.
Page Title
This is a note for future modifications. Since src/index.html supplies the HTML framework for all the pages, every page in the app will have the same  tag. Usually, this wouldn't even be noticeable unless the app is opened in a browser, but when using a screen reader, it becomes a nuisance: Every time the page is changed, the title of the app is read. It's trivial for a developer to change this by adding a document.title = "..." to one of the life cycle events, but it would be nice to have something working out-of-the-box (though where to take the string for the title from may require some thought.

Also relevant:
#10168

@janrg plz run your sample code via wave. And notice the errors

@awebdeveloper Ah, I see. So what wave seems to be complaining about is that the button has no label or text inside even though the icon inside has an aria-label. I would think having an element with an aria-label should be equivalent to having text inside, and the chrome accessibility developer toolbar seems to agree with me as it's not complaining about the button. I've also tested it on Android, iOS, and ChromeVox and in each case I hear "Menu - Button". So I think this may be a case of wave either being overzealous or not picking up on the rule being fulfilled in an arguably somewhat roundabout way.

May be the issue is with  older version of safari or chrome. Why don't you report a bug with them and see

@janrg have you committed your changes.

@ankushgoyal27 yes I did 5 months ago. The pull request is here:
#11543

@janrg for Toast, can I set the focus to toast message instead of close button. Please respond to this

@sapradhan1
If there is no close button, focus is on the text, otherwise it's on the button but the text is still read since the role is alertdialogue. Why would you want the focus on the text in that case?

@janrg after giving role="alertdialog" its not reading the toast message. Its reading only close button. So, what I was thinking that, if we can shift the focus to toast message it will read out the message and on right swipe the focus will shift to close button.

That's strange. What platform are you on? Can't test it right now because I have just moved and haven't set everything up again yet. The problem is that what you describe would be against the alertdialog specification which states that "focus must be moved to that control when the alert dialog appears"

I'm still waiting to hear anything regarding my pull request. There seem to be some merge conflicts now, but unless I hear anything suggesting that a merge would be considered anytime soon, I don't think there'd be much point trying to resolve them as it doesn't seem unlikely that new conflicts would pop up before something happens regarding the merge...

@janrg - at this point, I would wait until the release of v4 is complete and then refactor the PR as necessary. The changes for v4 are substantial enough that I would not suggest doing further work against v3.

This reply is not really taking responsibility. I do appreciate ionic team support for newer version but v4 is in beta and it does not mean people should not use any v3 because of that.
Actually ionic accessibility borders us as well. We are building business apps based on ionic framework but accessibility is so weak. It did not pass most of major accessibility test. Our team has spent two weeks so far to update a lot of handy code to pass the test. For example, ion-input does not really did well on aria-, it was using ng- related on ion-input field which is not a standard data entry element. Pure angular did all validation on input field directly but ionic team use it wrong or did not fully use it. So ion-input kind of failed most of accessibility test.
What I am saying is not complaining but to say ionic team should allow this merge in at least to support v3 first. Then think about how to migrate it to v4.
Thanks,


Error: Could not create the Java Virtual Machine

Hi @jacekschae ! Thank you for helping the community out by putting a shadow-cljs starter out for us. I've worked with lein and chesnut in the past with mixed results, so I'm giving shadow a go. I've cloned your project and followed your readme, but get this when running yarn dev:
λ yarn dev
yarn dev v0.22.0
$ shadow-cljs watch app;
shadow-cljs - config: C:\Users\surface\Projects\clojure\cljs\keechma\shadow-reagent\shadow-cljs.edn version: 2.3.19
shadow-cljs - starting ...
Unrecognized option: --add-modules
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
error Command failed with exit code 1.

Any pointers?

Hey @loganpowell,
Which version of java are you running?
You can run in your terminal java --version
most probably it's the line number 3 in shadow-cljs.edn
:jvm-opts ["--add-modules" "java.xml.bind"]

λ java -version
java version "1.8.0_162"
Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)

What might I change line 3 to?

Thank you :)

np
for more info why this --add-modules is required check out this blog post: https://www.deps.co/blog/how-to-upgrade-clojure-projects-to-use-java-9/

--add-modules should not be required anymore even with Java9.
The CLJS 1.10.238 release shadow-cljs uses fixed that.


Automatically reload files modified outside of Emacs

When you do a lot of git-ing, the files you have open in Emacs tend to get marked as "modified outside of Emacs". What you usually want is for these files to reload from disk automatically, unless the buffer is modified. This should be done in the background, rather than when the buffer is open, so that files you have in open windows will be reloaded.

Resolved in 2a20118f8840ab35177d0d57434765e853410727. Note that this will be much less of a problem anyway, when using Magit as per #4.


GoogleMaps SPM integration: "MTLDebugDevice newLibraryWithFile:error:"

Environment details

Xcode 15.2
iPhone Simulator with iOS 17.2 and 17.4
GoogleMaps 8.4.0 using SPM

Our project had GoogleMaps 6.0.1 using Carthage, but we decided to migrate to SPM.
binary "https://dl.google.com/geosdk/GoogleMaps.json" == 6.0.1-beta

Steps to reproduce

Remove old Carthage XCFrameworks
Follow official guide for SPM integration
Run project
It happens a run time error and app crashes with the message

-[MTLDebugDevice newLibraryWithFile:error:]:1860: failed assertion `filepath must not be nil.'

We also tried disabling Metal Renderer with the code below. Using the old renderer, the crash does not happen but the Maps in the app just become blank.
GMSServices.setMetalRendererEnabled(false)

If you would like to upvote the priority of this issue, please comment below or react on the original post above with :+1: so we can see what is popular when we triage.
@NicolasEymael Thank you for opening this issue. 🙏
Please check out these other resources that might help you get to a resolution in the meantime:

Check the issue tracker - bugs and feature requests for Google Maps Platform APIs and SDKs
Open a support case - Get 1:1 support in Cloud Console.
Discord - chat with other developers
StackOverflow - use the google-maps tag

This is an automated message, feel free to ignore.

In addition to removing the xcframeworks that you already did, try following the instruction at the bottom of the Swift Package Manager tab for removing the GoogleMaps bundle from the top level directory of your project.

@wangela thanks for the help, i missed this instruction in the guide
now the app stopped crashing but it is not working yet
all of the maps are blank, it looks like the GMSMapView is not loading correctly
there is no error message and it just stays like this

do you have any clue?


Highlighting the entire line including wraps

@leixingyu thanks for you code
There are at least two ways for highlighting the current line in programmer editors in the case of "word wrap" ("soft-wrap"):

As in the case of your editor and, for example, VS Code: highlighting the current line under the cursor:

Highlighting the entire line, including visual wraps, for example in Notepad2:

The latter case is convenient when, for example, you need to highlight the entire line in case of error checking.
Please add a this highlighting mode as an option.

thanks for your input, marking it as a feature as I don't have the capacity to work on it


style the invite-list page

I'm keeping this PR focused on just one page, I'll make other PRs for each other page. I'm not entirely confident about the layout I made here, when we find a potentially better layout, we can change it.

PS @cryptix some ideas I stumbled upon while making this: (1) it would be useful to have a field "CreationDate" on the Invite model, so moderators on this page can know which invites are old (and probably could be revoked) and which are young, (2) I noticed that the alias suggestion doesn't have to be unique, maybe we could attach this invite logic to the alias database so that you cannot suggest an alias that is already taken (either by an actual alias registration, or taken in another invite as an alias suggestion). Ideas for others issues/PRs.

Yup, those are both good suggestions. The created time is a total no brainer and oversight.
Re alias suggestion: I thought of that but wanted to have the alias system in place first before doing this.

Re the layout: do we show the IDs on the other pages? I don't think users need to see those.
Other then that, it fits the vibe of the rest.
I think on the members list the add/create thing is under the heading?
These are the only inconsistencies I noticed.

Re alias suggestion: I thought of that but wanted to have the alias system in place first before doing this.

Oh right

Re the layout: do we show the IDs on the other pages? I don't think users need to see those.

It's useful just to disambiguate the invite codes in case you created N invites with no aliases. If we have the CreationDate, we could remove the IDs.

I think on the members list the add/create thing is under the heading?

I know, it's a different design here, it's a bit different concepts. Members list is about including known IDs, this one is about creation (where design references I've seen on Dribbble typically put outside of the table itself).

👍
looks great :) does it work nicely on phones as well? i don't speak tailwind :~

oh and this updates #68, too :smile_cat:

+1
looks great :) does it work nicely on phones as well? i don't speak tailwind :~

I'll check! Good reminder

Ok, it's all broken on mobile screen sizes. I'll fix that

Ok, now it's like this:

Mobile
Desktop

Can haz merge? :cat2:

Very nice! Go ahead!


[5.1.5] Fix | Enable reading AE date as DateOnly (#2275)

Backports PR #2275  to 5.1.5
fixes #2274
cc: @ErikEJ

LGTM


Update README.md with build instructions.

Release artifact getting flagged on my work Macbook(Apple silicon M1 Max). Added detailed instructions to build locally.

Thank you. I've updated README with more general build instructions along with some other updates. Please let me know if you have further suggestions!
Also, about your encountered error, it turns out that macOS requires proper code signing for binaries to work, which is not present in current release build. I will investigate that in the future.


Release MambaOut-Kobe model with 24 Gated CNN blocks

As #5 's suggestion, we released MambaOut-Kobe model, a Kobe Memorial version with 24 Gated CNN blocks. MambaOut-Kobe achieves really competitive performance, surpassing ResNet-50 and ViT-S with much fewer parameters and FLOPs. For example, MambaOut-Kobe outperforms ViT-S by 0.2% accuracy with only 41% parameters and 33% FLOPs.

Model
Resolution
Params
MACs
Top1 Acc

ResNet-50(ResNet strikes back)
224
25.5M
4.1G
79.8

ViT-S
224
22.1M
4.6G
79.8

MambaOut-Kobe
224
9.1M
1.5G
80.0

大家都在整活就你来玩真的 XD

孩子，你无敌了！

好笑，这并不孩子


[Improve][Connector-V2][Http] Add e2e testcase

Purpose of this pull request

Check list

[x] Code changed are covered with tests, or it does not need tests for reason:
[ ] If any new Jar binary package adding in your PR, please add License Notice according
New License Guide
[ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/incubator-seatunnel/tree/dev/docs
[ ] If you are contributing the connector code, please check that the following files are updated:

Update change log that in connector document. For more details you can refer to connector-v2
Update plugin-mapping.properties and add new connector information in it
Update the pom file of seatunnel-dist

@EricJoy2048 @Hisoka-X @TyrantLucifer thx. PTAL


#420 breaks the mesh reply list function that need to reuse the dns answer.

Sorry for my previous change causes another issue.
My previous change that clears the c->buffer in the comm_point_send_reply does resolve the "can't fit qbuffer in c->buffer" issue, but it breaks the mesh reply list function that need to reuse the answer. Since the c->buffer is cleared in the comm_point_send_reply, it cannot be resued again. it means that it is not inappropriate to clear c->buffer in the comm_point_send_reply.
After some investigation, i found it is appropriate to clear c->buffer before use in the http2_query_read_done.

Thanks for the fixup, merged it into the code repository.


Functional animation

Calculation of pixel color calculated by a function that accepts 4d space+time coordinates of current LED and current time.
Animation is stateless - no state is kept between calls to the animation function or between animation loops. Animation rate and form are determined only by the color function.
The color functions also uses parameters extensively so many aspects of the animation can be set without re-writing the math.
Several samples are provided, starting from a simple blink to a few more complex ones.
Visualization using matplotlib - many thanks to @DutChen18 !  #5
Intended to fix #18

Improved accuracy: added support for gravitational time dilation since tree tip is at lower gravity.
Also, running with "--sim" will activate simulation. Otherwise should light the actual tree.

Hey @qt1! As mentioned - love the addition of a much needed extra dimension (and some gravitational time dilation too 👀 ).
I've decided to create an examples folder where we can add contributions like this one - you can find some more information in the README.
Would you be up for updating your PR, to move your effect sequence in to a single file in the examples folder? If you want to share some of the extra work, linking to your repository in the "Further Work" section of this repo's README may be a good option.

Hey @qt1! As mentioned - love the addition of a much needed extra dimension (and some gravitational time dilation too 👀 ).
I've decided to create an examples folder where we can add contributions like this one - you can find some more information in the README.
Would you be up for updating your PR, to move your effect sequence in to a single file in the examples folder? If you want to share some of the extra work, linking to your repository in the "Further Work" section of this repo's README may be a good option.

This is super cool

This is super cool


Simple text change

look and see are redundant

look-see is an actual word. https://en.wiktionary.org/wiki/look-see


Warning: module '' not found and following crash

Hi szagoruyko,
Thank you so mush making such a good code.
I tested this code with VGG_CNN_S and this works very well.
But when I tried it with AlexNex_SalObjSub, it returns below warning and crash.
And it similar errors are occurred in some of other caffe models.
Would you check this issue?
code
require 'loadcaffe'
require 'xlua'
require 'optim'
require 'nn'
require 'cunn'
require 'cudnn'

-- to train lenet network please follow the steps
-- provided in CAFFE_DIR/examples/mnist
prototxt = './AlexNet/deploy.prototxt'
binary   = './AlexNet/AlexNet_SalObjSub.caffemodel'
-- this will load the network and print it's structure
net = loadcaffe.load(prototxt, binary)

-- generate random image
images = torch.Tensor(10,3,227,227):uniform(256):float()
net:float()

for i=1,images:size(1) do
  _,y = net:forward(images[i]):max(1)
  print(y[1])
end

and error

root@~/loadcaffe/test# th run_alexnet.lua
Successfully loaded ./AlexNet/AlexNet_SalObjSub.caffemodel
MODULE data UNDEFINED
**warning: module 'data [type 5]' not found**
nn supports no groups!
**warning: module 'conv2 [type 4]' not found**
nn supports no groups!
**warning: module 'conv4 [type 4]' not found**
nn supports no groups!
**warning: module 'conv5 [type 4]' not found**
conv1: 96 3 11 11
conv3: 384 256 3 3
fc6: 1 1 9216 4096
fc7: 1 1 4096 4096
fc8_sbt: 1 1 4096 5
/root/torch/install/bin/luajit: /root/torch/install/share/lua/5.1/nn/THNN.lua:804: **Wrong number of input channels! Input has 96 channels, expected 256** at /tmp/luarocks_nn-scm-1-8182/nn/lib/THNN/generic/SpatialConvolutionMM.c:60
stack traceback:
        [C]: in function 'v'
        /root/torch/install/share/lua/5.1/nn/THNN.lua:804: in function 'SpatialConvolutionMM_updateOutput'
        /root/torch/install/share/lua/5.1/nn/SpatialConvolution.lua:100: in function 'updateOutput'
        /root/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'forward'
        run_alexnet.lua:29: in main chunk
        [C]: in function 'dofile'
        /root/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
        [C]: at 0x00406670
root@~/loadcaffe/test#

Thanks.

nn doesn't support groups, use cudnn backend

Thanks for quick response.
I changed my code and it seems working.
Thanks.
changed code
prototxt = './AlexNet/deploy.prototxt'
binary   = './AlexNet/AlexNet_SalObjSub.caffemodel'
-- this will load the network and print it's structure
net = loadcaffe.load(prototxt, binary, 'cudnn')

-- generate random image
images = torch.Tensor(10,3,227,227):uniform(256):float()
net:cuda()
images = images:cuda()

for i=1,images:size(1) do
  _,y = net:forward(images[i]):max(1)
  print(y[1])
end

And result was like below
root@/loadcaffe/test# th run_alexnet.lua cuda
Successfully loaded ./AlexNet/AlexNet_SalObjSub.caffemodel
MODULE data UNDEFINED
warning: module 'data [type 5]' not found
conv1: 96 3 11 11
conv2: 256 48 5 5
conv3: 384 256 3 3
conv4: 384 192 3 3
conv5: 256 192 3 3
fc6: 1 1 9216 4096
fc7: 1 1 4096 4096
fc8_sbt: 1 1 4096 5
1
1
1
1
1
1
1
1
1
1
root@/loadcaffe/test#

It seems working but I need to find out why all results are '1'
Can you tell me what the warning message is saying about?
MODULE data UNDEFINED
warning: module 'data [type 5]' not found

For the record, the deploy.prototxt is starting with below lines
name: "CaffeNet"
input: "data"
input_dim: 1
input_dim: 3
input_dim: 227
input_dim: 227
layers {
  name: "conv1"
  type: CONVOLUTION
  bottom: "data"
  top: "conv1"
...


Create webpack.yml

I have little idea what I'm doing.

It appears merge builds can't use secrets for security reasons, so hopefully when this merges and runs, because it's from master it will have access to the secret and just work.
This looks to address #9.


Indexing and search

Hey how you doing?
what's the current situation regarding search? just filtering the complete array for example?

Hey how you doing?
what's the current situation regarding search? just filtering the complete array for example?

Hey Can, good to hear from you!
yes! But we're starting to have adopters with "lots of data" so we'll probably prioritise indexing soon

Sounds great, I have a (mobile) app in mind that would need good full-text and potentially vector search, when and if I get the time for it 🤓


⚠ SceneTime has degraded performance

In c64e2d4, SceneTime ($ST) experienced degraded performance:

HTTP code: 200
Response time: 1560 ms

Resolved: SceneTime performance has improved in af2bcbb after 6 minutes.


on_item_on_npc not working

Tried using on_item_on_npc with the Alter client https://AlterRSPS/Runelite and it looks like the server does not receive the request or the client doesn't respond.
Unsure how to actually debug further.
The method on_item_on_object works as intended. My next approach is going to be debugging this to see how it works, but asking here for some insight.

Fixed on #1750dac


PDF Files

Having a single PDF file for all the problems would be nice.
I'm thinking of giving jekyll-pdf a shot. If that doesn't work out, I'll try pandoc on the markdowns. I've used pandoc before to convert geeksforgeeks to PDF, so I'm sure that would work.
If someone has any other way, please let me know.

Sounds like a good idea. The PDF on https://github.com/dufferzafar/geeks-pdf/ looks great.
I'm used to pandoc, so I'll go ahead and try that first. I'm not used to latex, but since your template looks so great, I'm going to steal that and see if I can use it.
Unrelated: I'm trying to do something similar for the HN-Classics Project at https://git.captnemo.in/nemo/hn-classics, and comments are welcome (tech is jekyll/ruby/php/python so far for the download/cleanup/staticgen parts, might use pandoc there as well for the final book.

I looked into jekyll-pdf. Couldn't install it because of some gem issue. But as it turns out it doesn't create a single PDF anyway. So I guess, we're on our own.
If you're looking into Pandoc, I could look into using wkhtmltopdf directly on all URLs to get a PDF per problem, and then merging them all into one big PDF. I wonder what would happen to the document outline in that case.
Thanks for mentioning HN-Classics, I wasn't aware of it and it looks really cool. What criteria will you use to sort these articles? No. of votes or their (year)?
While we're talking about unrelated projects, I wrote a script to convert source code into PDF - which I read (and annotate) on my iPad. I'm trying it out with Bitcoin's source, and it's going well.

I don't think I'd like the wkhtmltopdf approach, it would be slow and cumbersome compared to just pandoc. Let me do a first attempt and we'll see if it works.
I'm planning to split it into "decades" as books. So (1850-1930), (1930-1940), and so on. Planning to keep roughly 20-30 articles per book so it makes for a nice digest sized reading. There might be copyright issues with recent articles, so starting from the safe side.
src2tex looks nice. Only suggestion would be to link the filename header on each page to the index. Not all readers (esp on tables and readers like Kindle) make it easy to access the outline, and it would be helpful.

@dufferzafar Take a look at https://github.com/captn3m0/codechef/pull/8 when you get time. I wanted to try straight HTML (extracted from JSON) -> PDF but facing issues with latex.
The EPUB generation seems okay, needs a little more work though.


Unable to login on new alpine Node-red

I've added USERNAME and PASSWORD in "DEVICE ENVIRONMENT VARIABLES", encoding my password with "node-red-admin hash-pw" since brcyptjs is not available, but I can't login ("login failed").
What can I do to debug this ?
Here are my USERNAME and encoded PASSWORD :
USERNAME : admin
PASSWORD : $2a$08$p7SNNZKTCvepTYQRxzwG0O5cVpWgoiILViIaFd7XW7FbWVcGacqMu (hash for "linc123" without quotes)
I've try to restart app and even reboot device but with no success.
I had no problem with your Node-red on debian image.

I am having the same issue.  Can not login in the node-red console to deploy flows

Well apparently curcuz is not maintaining this project, or at a very low priority and it's now in an unusable state.
Just take an old commit and it will work fine on a debian image : https://github.com/resin-io-projects/resin-node-red/tree/5a0674aa8008f961bf24c35d2654c7302e50b918

@TristanCP @Niko-La will revert back to Debian if I confirm the issue is Alpine here.

what do you mean by "since brcyptjs is not available" ?

the issue is related on how the env vars are parsed within the alpine container userspace. Harccoding the same values in the setting.js file works. Now to discover what's the issue with alpine base images and env vars.

I think the reason for this problem is how our init script handles env vars. I opened an issue here https://github.com/resin-io-library/base-images/issues/317
In the meantime disabling INITSYSTEM or switching to debian should fix the problem


Placement of Search bar - Buy Page

With a limit on the time constrain, I've moved Dor's search bar into the pages since it was easier to pass the states and perform the functions. I know this is a bit inefficient, but maybe at the end, we can remove all the code duplications once everything is done.


bug: show white screen while fast scrolling

Bug Report
Ionic version:
Ionic:
Ionic CLI                     : 6.0.1 (/usr/lib/node_modules/@ionic/cli)
Ionic Framework               : @ionic/angular 4.11.10
Current behavior:
while fast scrolling it shows white screen! and data appears after 1 or two sec it works fine on slow scrolling
Expected behavior:
should not show white screen while fast scrolling!not even for short period of time
Steps to reproduce:
put some data for scrolling --> on scrolling fast the white screen appears and data comes after a delay
I dont think it is an UI Issue
Other information:

Ionic info:
Ionic:
Ionic CLI                     : 6.0.1 (/usr/lib/node_modules/@ionic/cli)
Ionic Framework               : @ionic/angular 4.11.10
@angular-devkit/build-angular : 0.13.9
@angular-devkit/schematics    : 7.2.4
@angular/cli                  : 7.3.9
@ionic/angular-toolkit        : 1.4.1
Cordova:
Cordova CLI       : 9.0.0<EMAIL_ADDRESS>Cordova Platforms : android 8.1.0
Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 3.1.2, (and 41 other plugins)
Utility:
cordova-res                          : not installed
native-run (update available: 1.0.0) : 0.3.0
System:
Android SDK Tools : 26.1.1 (/home/bsetec/Android/Sdk)
NodeJS            : v10.14.0 (/usr/bin/node)
npm               : 6.4.1
OS                : Linux 3.13
insert the output from ionic info here

Thanks for the issue. Can you provide a repo with the code required to reproduce this issue?

@08Thug, This will happen when you will have large list of data in dom even with infinite scroll. In iOS, You will have lag in scrolling. This is happening since ionic 3.

@08Thug, This will happen when you will have large list of data in dom even with infinite scroll. In iOS, You will have lag in scrolling. This is happening since ionic 3.

is there is no solution for this!?

Thanks for the issue. Can you provide a repo with the code required to reproduce this issue?

just put a huge list of data in ion-infinite scrolling on fast scrolling you will see the result i am inheriting the list of data from database so can't produce a repo

Thanks for the follow up. I am still unable to reproduce the issue after following the steps you provided. Can you reproduce the issue in a blank Ionic starter application?

It might not be an ion issue but a browser issue, try lazyloading/offloading your list entries to keep a smaller chunk. Also what's the length of your huge list?


Wrong keycode for focusing the search (I can prepare a PR)

In two places, there is a check if a certain keydown event was triggered by the 191 key code to e.g. focus on the input search bar. Even though I think this is wrong or at least might not work on every machine.
At least on my (Ubuntu) Machine, using Brave Browser typing / doesn't result in the key code 191 but in 55 which is the keyCode for 7.
So instead of checking for the keyCode in the two places mentioned further down, but also in the other places I would suggest to use the event.key property instead.
So I would replace e.keyCode === 191 with  e.key === '/'.
I verified with the following snippet, that it works accordingly. Also you can see that I type in / but the keyCode 55 is printed to the console.
Also after changing this locally the focus on the search input worked again.
document.addEventListener('keydown', function(e){
    console.log(e.keyCode);
    console.log(e.key);
});

The two places:
https://github.com/aaranxu/adidoks/blob/6887e4e27144ac7f9bef6fe4287d8dbb2ceca87f/static/index.js#L8
https://github.com/aaranxu/adidoks/blob/e03e8a5098660b9fcf7ea9ad136024cc98723a1f/static/js/search.js#L8
I don't mind preparing a PR/fix for the 191 case, but can also do so for the other ones.

I'm looking in to using an updated version of this theme. @mr-pascal Are there similar issues with other keyCodes? Or do you just mean switch up all e.keyCodes to be e.key so it's easier to read and there is no character or encoding issues?


styled-components config siteData functional call fix

Wrong function called in static.config.js for styled-components demo to get site data, changed from withSiteData to getSiteData

Thanks!


Suspected bug in openshift_add_etcd for removal

If the etcd servers does not include the first master, an error is thrown.
I believe the code for removal (and add) should run on the first etcd server, not the cert server/first master.

I'm putting this ticket down as a forget-me-not. We're still working out these issues in our env.

Our ops team confirm that 'leaving the first master in as an etcd server allows us to remove etcd nodes'. Then when all gone, the first master can be removed.
I suspect they'll be unable to remove or add any after that though.


why the memory usage will increase sharply in loading

Hi mkkellogg,
I found on Iphone13 with 4G GPU memory，the demo fails to load (but it happens to be successful!).
If i change the ply model to smaller size, the demo works well.
My question is, why the memory usage will increase sharply in loading? It may be the block reason to open bigger size models.
I've also tried upgrading to v0.4.5, but there hasn't been much improvement compared with v0.4.2
Here is my config to open *.ply file in release v0.4.5:
'gpuAcceleratedSort': true,
'antialiased': false,
'sharedMemoryForWorkers':false,
'sceneRevealMode': GaussianSplats3D.SceneRevealMode.Instant,
'freeIntermediateSplatData': true,
'plyInMemoryCompressionLevel': 0,
'optimizeSplatData': false,
'sphericalHarmonicsDegree': 2
'progressiveLoad': false
Is there any thing I'm missing?
Thanks very much in advance~

And besides
'sphericalHarmonicsDegree': 0，
'splatAlphaRemovalThreshold': 30,
is there other config settings to decrease the peak value?
Thanks ~

Do you intend to use .ply files for production purposes? .ksplat is heavily optimized...

@mkkellogg Hello, I also encountered this problem.
First of all, in the demo web page, I opened a scene, everything was fine at the beginning, but suddenly the memory usage of the GPU suddenly rose rapidly, and then slowly returned to stable, this makes me very puzzled, why is there this phenomenon?
Second, I noticed that by adding the variable 'freeIntermediateSplatData', I traced down the code, but I also can't understand why  this can  optimize memory?
https://github.com/user-attachments/assets/28bdd693-e7fa-4d3f-aa3d-d315ae9b598b
As you can see in this video, the memory footprint of the GPU process jumps from ~43W KB to ~77W KB.
Thanks for your reply

Do you intend to use .ply files for production purposes? .ksplat is heavily optimized.

I think .ksplat files have same issue.


basic ecdf checked in

I have the power to merge my own pull requests.  That is probably not very wise...


Fix Const-Cast warnings

fixing warnings when compiling LIBXSMM with -Wcast-qual:
- fixed dropping of const qual where it could be avoided without perf
loss
- selectively disabling the warning when calling into JIT'ed ASM code

You still have some warnings on the clang build. Without -Werror you will have to dig them out every build...

Though now I see this PR only fixes const casts. The warnings on the build are across different types (the worse kind), so fair. I'll let @egeor approve.


Fixes Android error "illegal start of type"

Fixes Android compilation error:
:react-native-android-statusbar:compileReleaseJavaWithJavac
/path/to/project/node_modules/react-native-android-statusbar/src/main/java/me/neo/react/StatusBarPackage.java:27: illegal start of type
        List<NativeModule> modules = new ArrayList<>();
                                                   ^
1 error
:react-native-android-statusbar:compileReleaseJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-android-statusbar:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

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

BUILD FAILED

For some reason this is irrelevant for React Native 0.14+


Switching to original apache 2 license text

Please wait before accepting in
Switching back to the original apache license text but also added a new section for Ensembl.

un-merged again


Language and code: id: court question

Create 3 radio button choices from the new court locator. No map.
Language will be changed to show that the choice can be changed.

id: court question
Language change to: What court is hearing your case?
This is not a basic question.

Closed by #142


os.getlogin Errno 6

I use md2pptx, hence, this felt like the right templating tool, if that an appropriate classification, to use. Great work!
Unfortunately, running mdpre on a Ubuntu terminal resulted in the following error:
mdpre < presentation.mdp > presentation.md

Error
mdpre Markdown Preprocessor v0.6.8 (8 March, 2024)
==================================================
- opened <stdout> for writing
Traceback (most recent call last):
  File "~/usr/bin/mdpre", line 1432, in <module>
    setupStandardVariables()
  File "~/usr/bin/mdpre", line 1190, in setupStandardVariables
    input_file.insert(0, "=def userid " + os.getlogin() + " ")

The solution was to use os.getenv('LOGNAME'), as os.getlogin() seems to have documented issue:
https://github.com/dblossom-marist/PerfMon/issues/20

Thank you for this. Running on Mac I would never have seen it. Do you know if this solution works outside of Linux? I'd like to code a general solution, rather than a Linux-specific one. (But branching code, based on platform is a possibility. Yeuch!)
One tip: I always use the -v for "verbose" on the command line. It doesn't affect this bug, though.

Candidate fix - using username = os.getenv('USER') or os.getenv('LOGNAME') or os.getenv('USERNAME') - coded. Have one other (minor) issue to fix before shipping v0.6.9.

Shipped in v0.6.9.
Keeping issue open for a few days.

Great! Will leave open for a few days in case any Windows user has a problem.


Backspace doesn't work on LG Stylo 3

User reports:

When i highlight a letter to remove it, it gives me all the previous letters I have chosen one at a time for each highlight/back button sequence.
I have an LG Stylo 3 and it is the default keyboard.
I use the back arrow button.

Closing this as Cryptogram now prioritizes the built-in keyboard for some time now.