[3.x] Add blend_premul_alpha support to scene shaders.

This was previously only supported by 2D shaders, but can be pretty useful in 3D as well.  For example, I'm using it for lasers where I don't want to use pure additive blending, because they lose visibility with bright backgrounds, but a normal alpha blend doesn't look good, either, so I make them mostly additive with some slight alpha to ensure visibility on brighter areas.
I'm making this pull request directly into 3.2 because the gles3 renderer was removed and I can't make the pull request in master and have it merged back to 3.2.  (Also, can't compile master due to some internal compiler error, so I'll have to figure that out and make a different pull request for master to support vulkan after I figure that out, if this goes through).
Bugsquad edit: This addresses https://github.com/godotengine/godot-proposals/issues/3431 for 3.x.

Ah, interesting, compiler settings for the checks are stricter than what was used compiling locally.  The blend modes enum is shared for the detail blend mode (which is not impacted by this).  Also, seems the  pull request took all my changes in that branch, so I need to rebase this, I guess?  Still figuring my way around git.

The 5 commits must be squashed together before this can be merged. See PR workflow for instructions :slightly_smiling_face:

Ok, I tried to do that, but now I somehow have 2 mystery changelists that ended up in this branch that I didn't make. Time to re-rebase.

This PR comes in handy for me because I'll be able to apply it to billboarded sprites, so thank you for that. But I also wanted to point out that this will create issues when used with the default spatial shader. For example:

Create a MeshInstance and assign a mesh
Assign a material with the transparent flag set and convert it to a ShaderMaterial
Reduce the alpha of the albedo color -> mesh becomes transparent :+1:
Replace blend_mix with blend_premul_alpha -> mesh becomes opaque :-1:

To solve that, I think the rgb component of https://github.com/godotengine/godot/blob/3.2/drivers/gles3/shaders/scene.glsl#L2181 at least needs to be multiplied by alpha when premultiplied blending is active, although there are still some differences in shading even with that change.

Hmm, this seems to work for me.  This is the shader code I ended up with:
shader_type spatial;
render_mode blend_premul_alpha,depth_draw_opaque,cull_back,diffuse_burley,specular_schlick_ggx;
uniform vec4 albedo : hint_color;
uniform sampler2D texture_albedo : hint_albedo;
uniform float specular;
uniform float metallic;
uniform float roughness : hint_range(0,1);
uniform float point_size : hint_range(0,128);
uniform vec3 uv1_scale;
uniform vec3 uv1_offset;
uniform vec3 uv2_scale;
uniform vec3 uv2_offset;

void vertex() {
	UV=UV*uv1_scale.xy+uv1_offset.xy;
}

void fragment() {
	vec2 base_uv = UV;
	vec4 albedo_tex = texture(texture_albedo,base_uv);
	ALBEDO = albedo.rgb * albedo_tex.rgb;
	METALLIC = metallic;
	ROUGHNESS = roughness;
	SPECULAR = specular;
	ALPHA = albedo.a * albedo_tex.a;
}

I got it a bit wrong, the premultiplied mesh doesn't stay opaque, but there's a difference in shading. Here's a test scene where the materials on each sphere only differ by blend mode:
premultiplied_test.zip

Multiplying rgb by alpha at https://github.com/godotengine/godot/blob/3.2/drivers/gles3/shaders/scene.glsl#L2181 is an approximate fix for that issue, but still leaves some differences in shading. Also, I'm not sure that 'fix' is compatible with textures with premultiplied alpha, since the rgb components would end up being multiplied twice by alpha.

On second thoughts, this is the right fix. The differences in shading would go away once it's only applied to shaders using pre-multiplied blending - doh.

But I think the albedo for textures should probably be excluded from being multiplied for the reason mentioned.

The whole point of premul alpha is that you have to premultiply the alpha so you can control the visual behavior (ex: have some sort of hybrid between additive blending and alpha blending).  You're suggesting that I multiply the alpha, which would make it just a normal alpha blend.

Agreed, but the lighting model in the default shader outputs with regular alpha. So you'll get your texture with pre-multiplied alpha rendering correctly, but with potentially weird lighting, unless you go with the unshaded flag. That might be fine for now, since working around it introduces complexity. It's probably best if someone from the engine team reviews the current PR, I'm just another user.

Ah, I see what you're saying, now.  I was using it for things like lasers, unshaded.  Wonder if there's a case where you'd want this lit in practice.  In any case, this is better than nothing.  We can iterate as needed.

Something like this is commonly used for rendering fire + smoke in one pass.
The fire is emissive and added, while the smoke is alpha blended.
This of course causes issues if the material is not unshaded.
For that, we could do the following:
The lighting that has been computed from the ALBEDO, etc. is premultiplied with ALPHA automatically. This should yield exactly the same result, as if the blend mode was blend_mix.
But then, the EMISSION output is added after the premultiplication.
This would allow us to have a material that has an alpha-blended component that is lit, and an emissive component.
A better name for that would maybe be blend_mix_add.

This was automatically switched to 3.x, so I don't need to do anything, right?

Yeah it's all good, though you might want to rebase on latest 3.x to make sure that it still builds (and possibly that it still works) since the last update  was a year ago.
@godotengine/rendering WDYT about the feature? It should be suitable for 3.4 if deemed useful.

@akien-mga I think it seems fine, I am concerned about t-mw's comments, it seems like this may cause problems with shaded shaders. I like Mortarroad's suggestion which would likely result in more expected results.
Ultimately, this needs a proposal. This is exactly the kind of PR the proposal process was made for. I can't speculate on what users need, and there hasn't been a huge demand for this PR even though it has been open for a year.

I agree that this is very useful, and it should be discussed further. (I personally work around this with 2 passes in particle systems currently.)
Although I already like my idea of adding the EMISSION (i.e. the unlit component of the material) in the end.

I kind of feel like it's a bug or incomplete feature that blend_premul_alpha exists for 2D, but not 3D, but I went ahead and created a proposal here: https://github.com/godotengine/godot-proposals/issues/3431

You probably also want
BIND_ENUM_CONSTANT(BLEND_MODE_PMALPHA); and
ADD_PROPERTY(PropertyInfo(Variant::INT, "params_blend_mode", PROPERTY_HINT_ENUM, "Mix,Add,Sub,Mul,Premul"), "set_blend_mode", "get_blend_mode");
to make it show up in Spatial Material
Do you have a test project for  3.x ? Seems to compile and the code above seems to work but I don't know exactly what to test for.

Ok, finally got around to updating this.  I've added the functionality to non-shader spatial materials as well, as suggested by @ghost.
Included a test project here:
test_premul_alpha.zip

Premul alpha is pretty much how all professional CG/VFX compositing is done, so I think it's a pretty important feature to have.  Lets you combine solid and glowy things in one pass.

Am I right in thinking that this mode requires the user to either use textures with pre-multiplied alpha or pre-multiply manually in the shader?
Correct.

I hesitate with features that require either a deep background knowledge and that don't just work when enabled. If shader changes are required I am concerned that we will get a flood of users asking why the feature doesn't just work when enabled.
This is already a feature of Godot, but it's for 2D only.  I'm simply bringing it to 3D for consistency (and it's a very useful feature for FX).

It's just another blend mode, so it should more or less "just work".  Not terribly complicated.  If people aren't using it with premul alpha textures, it'll look like additive blend mode or mix blend mode (or somewhere in between).
I'll add documentation as well.  Also, I need this in Godot 4 for explosions, so I'll probably do another PR for that...  I was going to say soon, but whenever that happens. :D

Updated PR to add documentation.  I was going to go ahead and add support for premul alpha in the detail blending, but then realized that it would consume a bit in the MaterialKey, so I opted not to do that as there are only 5 bits left, and I doubt anybody would actually use this, so better to save them for more practical features.

Here's the Godot Engine 4 version: https://github.com/godotengine/godot/pull/68548

https://github.com/godotengine/godot/pull/85609 was merged and I think @lawnjelly we can close as the pr doesn't seem to be enough interest, but it's salvageable.

I do suspect if decisions have (finally :slightly_smiling_face: ) been made and #85609 was merged in 4.x, then that means an easy port or modification of this PR is more easily justifiable, so it might be good to leave this option open imo, unless someone else on rendering has different opinion.
Usually small backports are quite easy to justify.

This will probably be difficult to backport since the file structure for rendering stuff completely changed.  I imagine it'd be easier to just tweak this CL.  Can't remember what all was different between it and the 4.x version offhand.


View User Roles & Permissions

User story
As an administrator, I can see the roles that were assigned to other users of the system.
Narrative
As an administrator, I want to see which roles were assigned to other users of the system, so I can track and manage user access to different areas of the application as well as the permissions granted to them.
Out of scope
Editing the roles and permissions of any of the users.
Acceptance criteria

#
Given
When
Then

1
I am an administrator
I try to view user roles index
The system lets me see all users, their roles and their permissions

2
I am not an administrator
I try to view user roles index
The system prevents me from viewing sensitive information

UI for this is included in #42

I think this issue is redundant ... View user roles were already tackled by #38 & PR #193!
View user permission .. is that really relevant? We want to see certain role permission (tackled by #36 ).
We did a story before for assigning permissions directly to users, but we end-up labeling it as a won't fix (#35)
What do you guys think @CSU-Booking-Platform/developers ?

Yeah good point @alecadub ok we'll close this for now.


Grammar

I have tried my best to correct all grammatical errors and have done suitable commits in multiple files to demonstrate the same. Please review them. Merging this PR successfully would solve the issue #79.

Hey there! 👋 This repository uses the Prettier code style.
You forgot to format these files in your pull request:

index.html
js/event.js
js/projects.js

The Prettier installation guide is a good place to get started with formatting your code properly. Thanks!
❤
Your friendly Prettifier bot.

Great Work @MuditWadhwa
Would you format the mentioned files! After this I will merge the PR

I have used prettifier and pushed on the same branch again. Please check if you got it.

Hey, there are a lot of new changes in here!
@MuditWadhwa
If possible create a new PR

Any specific instructions regarding the new PR? Like anything to keep in in mind so that it merges well...Shall I do it from a new branch

I am new to prettier..Hence,there were a lot of changes

Any specific instructions regarding the new PR? Like anything to keep in in mind so that it merges well...Shall I do it from a new branch

Install Prettier
Follow instructions here and you are good to go https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode

I have already installed it and formatted files using it.....Anything else that should be done to make things better!


Fix: Allow to mix html and framework examples

We have html and also React examples. This commit fixes the problem that the frameworks have overwritten the HTML example.

This PR handles the case where some examples have HTML or JSX, but not when they have both. I've expanded on your fix to also handle cases where a single example has both HTML and JSX blocks: https://github.com/nextbigsoundinc/stylemark/pull/24
Since that PR includes these your fixes, I'll close this one. Thanks for your contribution!

Fix released in v0.6.5


⚠ ClamAV has degraded performance

In 85be86a, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 166 ms

Resolved: ClamAV performance has improved in 4295d71.


Fix lexing integers on big-endian systems

Reading integers from D source files is currently broken on big-endian systems. See<EMAIL_ADDRESS>and related forum thread for more information.

Doesn't seem to work.  Can we just get rid of the 32-bit integers/tokens and always use the 64-bit version?

Yep, there are some cases where we read values which don't match the token type. I'll have a look if using 64bit values everywhere is a simpler solution.

There's a possibility this is already fixed in LDC, and the solution could be copied from there.

Good point. Seems to be indeed fixed in LDC. I'll update this pull request later.

I think the union was used for 3 reasons:
1: To save space
2: For speeding up reading, eg. only reading 32 bits might not take as long as reading 64 bit values.
3: To avoid typecasts.
If a 64-bit value is to be used always, then it needs typecasting when it's being read.
When I wrote the patch, I thought about adding #ifdef kludge around it and then keeping the one-line writing if it's a Little Endian platform; however, that would make the source code look ugly and also introduce other problems. For instance: There's no standard endian #define. If a new platform was building the compiler, it might not be recognized as big or mixed endian.

@jens-gpio correct. But the slowdown probably doesn't matter here and the values are only read in some places so we only need a few casts. I'm just waiting for the tests to finish (compiling GCC and running the dmd testsuite at the same time is not a good idea ;-)

Been there, done that. (Woops wrong use of that sentence). =)


Remove a dependency on XCTest.

This PR removes a static dependency on XCTest in swift-testing. The dependency exists because a single Swift function cannot be both an XCTest test method and a swift-testing test function, so we have a runtime check in our generated thunk that records an issue if a developer manages to produce such code.
This change removes a reference to XCTestCase on non-Darwin platforms. Instead, on those platforms we dynamically look up the XCTest.XCTestCase class by name at runtime (similar to how we find it on Darwin.)
The generic function that performs this check is now generic over AnyObject rather than XCTestCase. There is a nominal runtime cost to taking this code path for all reference types, however it is not expected to be a problem except for pathologically deep class hierarchies (which we'd expect would suffer performance issues elsewhere in Swift/the runtime anyway.)

@swift-ci please test

@swift-ci please test


Unable to take picture

Hey,
the camera is being started, but I'm unable to hit the "take that picture damnit"-button. Why? Because it's not there 💃
iOS is @ latest version, iPhone SE and iPhone 6s Plus tested. Barcodescanner version: 5.0.0.
Used plugins:
"cordovaPlugins": [
"cordova-plugin-device",
"cordova-plugin-console",
"cordova-plugin-whitelist",
"cordova-plugin-splashscreen",
"cordova-plugin-statusbar",
"ionic-plugin-keyboard",
"cordova-plugin-camera",
"phonegap-plugin-barcodescanner"
]
Thanks in advance!
And by the way: 4.1.0 and 4.0.2 aren't working, too, the camera is just switching from back to front and back again.

The scanner is not supposed to be a picture taking thingy - it'll stop showing the UI when you hit cancel or a barcode is recognized.


Series between 1-0

When I have series like 0.5, 0.2 and so on. It is converted into 5,2 and so on, thus producing a wrong graph.

For proper assistance with you issue please create a reproducible and isolated version of the issue within an online code editor like JSBIN. You can use this template to get started: http://jsbin.com/zuqejof/edit?html,js,output


Browser and Text zoom should be at 100%, but i can't pass

Challenge Change the Font Size of an Element has an issue.
User Agent is: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.
 You need to make a new CSS selector that just selects p elements.You can learn more about them here.

@allanarmstrong thanks.
@FabricioLeiteQueiroz Thanks for reporting this. Unfortunately your code is not correct.
Please consult the Help Chat Room for any assistance to Coding.
Happy Coding!

I see my error, I read today and see.
Thanks, for answer!
Enviado do Outlookhttp://aka.ms/weboutlook

De: Mrugesh Mohapatra<EMAIL_ADDRESS>Enviado: quinta-feira, 2 de junho de 2016 08:17:24
Para: FreeCodeCamp/FreeCodeCamp
Cc: Fabricio Leite Queiroz; Mention
Assunto: Re: [FreeCodeCamp/FreeCodeCamp] Browser and Text zoom should be at 100%, but i can't pass (#8909)
Closed #8909https://github.com/FreeCodeCamp/FreeCodeCamp/issues/8909.

You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/FreeCodeCamp/FreeCodeCamp/issues/8909#event-679597529, or mute the threadhttps://github.com/notifications/unsubscribe/AR4K-UJDXjF_3OOldRrkXyb83rBwhw8xks5qHq20gaJpZM4IsVJO.

getting same error .
here is the code. and the browser and text zoom are at 100 %.

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

the only error is this :
Between the style tags, give the p elements font-size of 16px. Browser and Text zoom should be at 100%.

@Shraddha99 You have an error in the position of your closing curly braces. the p selector should not be inside the .red-text selector.

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.       still error coming.

I am having the same problem

How do you give the Browser and text zoom 100%

Please consult the Help Chat Room for any assistance to Coding.

I am having the same problem on this but what I did was I just created  a new CSS selector that just selects p elements, so it goes like this:

hope this will help.

This is neat.

whats the solution for the given question....??

phatsnikky u helped me alot

It's important check if the code is attending what exactly is demanded. See each one of the three last requirements on this task:

The first p element should have the class red-text.
Do not add a class attribute to the second p element.
Between the style tags, give the p elements font-size of 16px. Browser and Text zoom should be at 100%.

If you will do this in a job, remember to respond demands of your customer,  inside or outside of you company. So pay attention to each individual issue asked.
My code:

can @delsonscoelho why there is requirement of new css directory
while my code is
p,red-text{
color:red; font-size: 16px; zoom:100%;
}
and thanks for your code


introduce message handler

There are a lot of
            messages = messages + ["ExternalPackageRef has no category."]

in this codebase..
This is not very pythonic, and does not contain much context information, which makes it difficult to understand what part of the 8MB spdx dump file generated by proprietary tool is not recognised.
This is a first simple code to start discussion on the problematic.
Will integrate in the rest of the code when we agree on the API.

hi @pombredanne  I cannot find a open source oss managment tool were you are not involved :)


ImageResource type seems to be conflicting with Xcode 15's new type, causing a compile error.

Check List

[v] I have read the wiki page and cheat sheet, but there is no information I need.
[v] I have searched in existing issues, but did not find a same one.
[v] I want to report a problem instead of asking a question. It'd better to use kingfisher tag in Stack Overflow to ask a question.

Issue Description
Kingfisher's ImageResource type name conflicts with new type name generated by Xcode 15.
This code raises an error:
let resource = ImageResource(downloadURL: URL(string: "https://www.google.com.tw")!)
KingfisherManager.shared.retrieveImage(with: resource, options: []) { [weak self] result in }

What
Xcode 15 introduces a new feature that allows developers to use Image assets without hard-coding the file name, example:
Old way:
UIImage(named: "demoAsset")

New way:
UIImage(resource: .demoAsset)

This is done by Xcode, generating the symbol for developers.
And because the type of property resource is also called ImageResource, this conflicts with Kingfisher's ImageResource symbol, causing a compile error.

Reproduce
Clone and build this project: https://github.com/JohnnyTseng/KingfisherXcode15Demo
Other Comment
Environment:

Xcode 15.0 beta (15A5160n)
macOS Ventura 13.4

Note that if you setup a new project to reproduce this issue, remember to set deployment target to < iOS 17.0
It seems like with deployment target iOS 17.0, Xcode adds an extra namespace called DeveloperToolsSupport before ImageResource, causing we can't reproduce this issue.

Simply changing the name ImageResource would be a simple solution, but it introduces a breaking change, I'm not sure how we could deal with this in a better way 🤔

This was discussed in #2090 and I pushed some commits in #2092
There is no good way to solve it without any pain. Hopefully the related changes can improve the transition experience a bit.

Ooops, I've searched Xcode 15 and related words, didn't notice this issue, sorry for the duplicated issue 😅


Question: Refactoring + Simplicity + Co maintainer ^^

Hi ;) i lately had also the need for an esbuild css modules plugin for a project which also uses css modules composes: className from "./file.module.css"
I tried all existing css modules plugins but they wouldnt work for this case - as post-css-modules has a (sorry) horrible api.
After countless hours i found parcels lightningcss which worked like a charm and has a super nice api.
So i created a fully functioning, simple and readable css modules plugin with only ~100 lines of code.
You can see my implementation here: https://github.com/neos/neos-ui/blob/a0683ed157699042aa269ea0819977efafb5be46/cssModules.js (inlined in the bespoken project)
The reason why im reaching out to you is, that yours is the only esbuild css modules plugin of around 10 others which uses lightningcss as implementation. So i though creating my own css modules plugin (with the above implementation), to have 11 competing plugins, would not be what open source is about - instead i want to ask you if we want to improve your codebase together?
Mainly im thinking about:

make the code easier to maintain / reduce complexity

remove the v1 version or extract it into an own package

that way we have less dependencies
less code to maintain here
no confusion with version switches (i dislike feature flags a bit ^^)

find out why your code is 4x that long (complex), and what can be optimized/refactored

implement css composes
do we really need caching? The mentioned big project with around 100 css module files seems to build super smooth without any cache.

I would really like to chat (or maybe have call) with you about the above points and implement them together.
What do you say?

Glad to see your points, thanks.

remove the v1 version or extract it into an own package

I'm planning to deprecate v1 as well.

find out why your code is 4x that long (complex), and what can be optimized/refactored

Maybe it's caused by the inject feature, not sure for now, I need more time to investigate.

implement css composes

I see https://lightningcss.dev/css-modules.html has already supported compose, I think it will be easy to support it in our plugin.

do we really need caching?

No I think 🤣
In total, I agree with you, but to be honest, I'm really busy on my full-time job recently, thus no detailed plan for these changes for now 😢

Hi thanks for your response ;)

Maybe it's caused by the inject feature, not sure for now, I need more time to investigate.

Ah yes i see that seems to introduce some complexity ;)
But as you said that you dont have much time currently and since i have to little knowledge of your project to refactor it myself*, i think i will just go ahead and create yet another css module plugin xD
*Plus i must say that im not looking into maintaining the complex inject feature, and removing it would require a complex migration for the user
Will let you know when i published my minimal lightning css modules plugin, and maybe you can reference it in your readme? ^^ So my plugin could profit from a bigger user base and become more stable for edge cases ;)

voila ;) https://github.com/mhsdesign/esbuild-plugin-lightningcss-modules


Botallen not responding 😒

Your Environment

Add-on name: [e.g. Jiotv]
Add-on version: [e.g. 2.0.0]
Kodi version: [e.g. Kodi 19]
Operating system version/name: [e.g. Windows 10, LibreElec 9.0, etc...]

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Debug log

The debug log can be found from this link:

Please provide more information given in the template.


Works when phpcs is installed in project but not globally in docker

I was able to get the plugin running when installed in the project, (i.e., ./vendor/bin/phpcs) but the same setup fails if I try to run it from phpcs being globally installed in docker (i.e., /usr/local/bin/phpcs).
Problems Observed

PHPCS issues don't come up in the Problems tab
When trying to use PHPCBF, it never finishes loading
When trying to use phpsab.docker to format a file, I get the message "Fixer is disable for this workspace or PHPCBF was not found for this workspace."

It's also worth noting that I'm able to see errors reported by PHPCS using the same configuration in phpsab within the VM, (by using "Attach to running container").
Could the issue be related to these libraries being installed globally outside of composer?
Is there a way I could troubleshoot or see more information about the error or what's causing it?

I just figured out where the debug logs go. Strangely, it first reports docker resolved the path but then immediately after it says the executable was not found:
["INFO" - 5:58:03 PM] DOCKER: Resolved docker path: /usr/local/bin/phpcbf
["INFO" - 5:58:03 PM] DOCKER: Resolved docker path: /usr/local/bin/phpcs
["INFO" - 5:58:03 PM] The phpcs executable was not found for sandbox
["INFO" - 5:58:03 PM] The phpcbf executable was not found for sandbox
["INFO" - 5:58:03 PM] VALIDATED
{
  "useFilepath": false,
  "containerExec": "docker",
  "fixerEnable": false,
  "fixerArguments": [],
  "workspaceRoot": "/Users/cballenar/Repositories/sandbox/sandbox",
  "executablePathCBF": "/usr/local/bin/phpcbf",
  "executablePathCS": "/usr/local/bin/phpcs",
  "composerJsonPath": "composer.json",
  "standard": null,
  "autoRulesetSearch": true,
  "allowedAutoRulesets": [
    ".phpcs.xml",
    ".phpcs.xml.dist",
    "phpcs.xml",
    "phpcs.xml.dist",
    "phpcs.ruleset.xml",
    "ruleset.xml"
  ],
  "snifferEnable": false,
  "snifferArguments": [],
  "dockerEnabled": true,
  "dockerContainer": "ddev-sandbox-web",
  "dockerWorkspaceRoot": "/var/www/html/docroot/",
  "dockerExecutablePathCBF": "/usr/local/bin/phpcbf",
  "dockerExecutablePathCS": "/usr/local/bin/phpcs"
}
["INFO" - 5:58:03 PM] CONFIGURATION
{
  "resources": [
    {
      "useFilepath": false,
      "containerExec": "docker",
      "fixerEnable": false,
      "fixerArguments": [],
      "workspaceRoot": "/Users/cballenar/Repositories/sandbox/sandbox",
      "executablePathCBF": "/usr/local/bin/phpcbf",
      "executablePathCS": "/usr/local/bin/phpcs",
      "composerJsonPath": "composer.json",
      "standard": null,
      "autoRulesetSearch": true,
      "allowedAutoRulesets": [
        ".phpcs.xml",
        ".phpcs.xml.dist",
        "phpcs.xml",
        "phpcs.xml.dist",
        "phpcs.ruleset.xml",
        "ruleset.xml"
      ],
      "snifferEnable": false,
      "snifferArguments": [],
      "dockerEnabled": true,
      "dockerContainer": "ddev-sandbox-web",
      "dockerWorkspaceRoot": "/var/www/html/docroot/",
      "dockerExecutablePathCBF": "/usr/local/bin/phpcbf",
      "dockerExecutablePathCS": "/usr/local/bin/phpcs"
    }
  ],
  "snifferMode": "onSave",
  "snifferShowSources": false,
  "snifferTypeDelay": 250,
  "debug": true
}

Hey Carlos!
This is a confusing one.
I've just given this a test locally and I was able to get this to work on my system.
Please see an example configuration below:
{
	"phpsab.docker.dockerEnabled": true,
	"phpsab.docker.dockerContainer": "phpcs-test-apache-1",
	"phpsab.docker.dockerWorkspaceRoot": "/var/www/html",
	"phpsab.docker.dockerExecutablePathCBF": "/usr/bin/phpcbf",
	"phpsab.docker.dockerExecutablePathCS": "/usr/bin/phpcs",
	"phpsab.docker.debug": true,
	"phpsab.docker.snifferMode": "onType",
	"[php]": {
	"editor.defaultFormatter": "mtbdata.vscode-phpsab-docker"
	}
}

To get the global paths I needed to run this in the container:
which phpcs

Have you confirmed phpcs and phpcbf is at /usr/local/bin in the container?
Cheers

Hey @cballenar,
Ignore the above, managed to re-create the same configuration locally - I think - and put in a fix. There was a conflict going on in the validate method of the Configuration class.
I'll put up a test branch tomorrow if you are willing to wait until then and give that a go?
Cheers

Thanks @mtbdata711 ! I was just about to send some additional notes 😄
That'll be great!  Thanks so much for looking into this so quickly.

Hey @cballenar,
I've put up a test branch with a fix here: https://github.com/mtbdata711/vscode-phpsab-docker/tree/mtbdata711/hot-fix/allow-global-phpcs
Let me know if you are able to pull it down and see if it resolves the issue.
Cheers

@mtbdata711 Thanks! The update worked great. both CS and CBF working as expected 🎉

Hey @cballenar,
Sorry - I was at a conference yesterday so slightly behind schedule!
New version - 0.0.10 - has now been released.
Let me know if it solves the issue for you!
Cheers

No prob at all! I really appreciate the work. Works like a charm 😎


Supported Breaker with Smart Electricity Meter (SMT006)

It fixes https://github.com/tuya/tuya-home-assistant/issues/495

Works fine. Waiting for approval.


Create phraseActions.yml & add self assignment on comment

/assignme or /assign me - assigns the issue to commentor

is there anyway to make the phrase trigger case-insensitive?

I think yes

GitHub ignores case when comparing strings.
Source: https://docs.github.com/en/actions/learn-github-actions/expressions#operators

random edge case i though of.
If someone types '... test/assignment ...'. This would get the issue assigned to that person who didn't actually want to be assigned.

might as well add a '/unassignme' and '/unassign me'. That way we don't have to worry about unintentional assigns lol.

You can unassign yourself from UI

mb, I didn't know.
LGTM

If someone types '... test/assignment ...'. This would get the issue assigned to that person who didn't actually want to be assigned.

tried fixing it.
Any more edge cases?

I actually don't like this approach.
At this point I think the logic should be handled inside bash.

I am saying this because I want to make it able handle things like assigning tags, stale issues, running tests, running scans, etc.

Is it possible to use a regex match

Yes, but the workflow will every time have to spin up ubuntu & do regex in bash. Right now bash only sends the POST request.

Or maybe we can go ahead & make the bot interact on GitHub too or make another bot for this.

GPT-4 suggested this. can you test this?
Prompt:
I want to build a github action that will assign an issue to a specific user on which they comment `/assignme` or `/assign me`. But it should only work when nothing else is in the message

Code:
name: 'Assign Issue'
on:
  issue_comment:
    types: [created]

jobs:
  assign_to_user:
    runs-on: ubuntu-latest
    steps:
    - name: Assign issue to user
      uses: actions/github-script@v3
      with:
        script: |
          const commentBody = context.payload.comment.body;
          const issue = context.payload.issue;
          if (commentBody.trim() === "/assignme" || commentBody.trim() === "/assign me") {
            const assignee = context.payload.comment.user.login;
            github.issues.addAssignees({
              owner: context.repo.owner,
              repo: context.repo.repo,
              issue_number: issue.number,
              assignees: [assignee]
            })
          }

This did create an Ubuntu instance.

A simpler way is to just ask the command users to add a leading & trailing space for it to work.

I think starting with \assign me will work, we dont need extra ifs

@droxtal  Thanks 👍 , looks good to me; maybe in the future, we can add more functionality
Welcome aboard ⛵


Line with link => lens will also be underlined

GitLens Version: v3.6.0
VSCode Version: 1.12.2
OS Version: Win10 Anniversary Update

Steps to Reproduce:

Open a file
Write down http://imperavi.com/kube/
Commit it.
Put your cursor on the link
Get this:

@jens1o I think this is very similar to https://github.com/Microsoft/vscode/issues/22018 -- Could you possibly open an issue for vscode? As far as I'm aware there is nothing I can do to stop this behavior -- I've tried forcing textDecoration to none and still no change..

Okay, thanks, should I leave it open?

@jens1o let's leave it open for now -- if they don't have a work-around for GitLens, then we can close this one.

Yeah, it is not fixed in last insider:

☝ don't get excited -- it doesn't work, but I wanted to leave the text-decoration resets in :)

Okay :)


Passing tool output back to model doesn't work for OllamaFunctions

Checked other resources

[X] I added a very descriptive title to this issue.
[X] I searched the LangChain documentation with the integrated search.
[X] I used the GitHub search to find a similar question and didn't find it.
[X] I am sure that this is a bug in LangChain rather than my code.
[X] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

Example Code
from langchain_core.messages import HumanMessage
from langchain_core.tools import tool
from langchain_experimental.llms.ollama_functions import OllamaFunctions

@tool
def add(a: int, b: int) -> int:
    """Adds a and b."""
    return a + b

@tool
def multiply(a: int, b: int) -> int:
    """Multiplies a and b."""
    return a * b

tools = [add, multiply]

llm_with_tools = OllamaFunctions(model="llama3:70b", format="json").bind_tools(tools=tools)

query = "What is 3 * 12?"

messages = [HumanMessage(query)]
ai_msg = llm_with_tools.invoke(messages)
messages.append(ai_msg)
for tool_call in ai_msg.tool_calls:
    selected_tool = {"add": add, "multiply": multiply}[tool_call["name"].lower()]
    tool_msg = selected_tool.invoke(tool_call)
    messages.append(tool_msg)

# passing messages with (Human, AI, Tool) back to model
ai_msg = llm_with_tools.invoke(messages)
messages.append(ai_msg)

print(messages)

Error Message and Stack Trace (if applicable)
[
HumanMessage(content='What is 3 * 12?'),
AIMessage(content='', id='run-cb967bbf-778f-49b8-80d7-a54ce8b605c1-0', tool_calls=[{'name': 'multiply', 'args': {'a': 3, 'b': 12}, 'id': 'call_739326217a574817bef06eea64439d48', 'type': 'tool_call'}]),
ToolMessage(content='36', tool_call_id='call_739326217a574817bef06eea64439d48'),
AIMessage(content='', id='run-5e04e8b2-1120-44af-bb9b-13595dd221b5-0', tool_calls=[{'name': 'multiply', 'args': {'a': 3, 'b': 12}, 'id': 'call_dcbfe846caf74b4fb4ebba1d3c660ebc', 'type': 'tool_call'}])
]

Description

When using the experimental OllamaFunctions, passing Tool output back as described in the documentation does not work
The model ignores/doesn't revive the tool related messages and thus just regenerates the first call

System Info
System Information

OS:  Linux
OS Version:  #1-NixOS SMP PREEMPT_DYNAMIC Thu Jun 27 11:49:15 UTC 2024
Python Version:  3.11.9 (main, Apr  2 2024, 08:25:04) [GCC 13.2.0]

Package Information

langchain_core: 0.2.18
langchain: 0.2.7
langchain_community: 0.2.7
langsmith: 0.1.85
langchain_experimental: 0.0.62
langchain_openai: 0.1.16
langchain_text_splitters: 0.2.2
langchainhub: 0.1.20

Packages not installed (Not Necessarily a Problem)
The following packages were not found:

langgraph
langserve

Fixed by updating the Ollama server to 0.2.7


abstract SHA256 implementaiton differences behind a single implementation

motivation: reduce boilerplate on call sites
changes:

rename the internal implementation of SHA256 to InternalSHA256 and make it internal
rename the CryptoKit implementation of SHA256 to _CryptoKitSHA256 and make it internal
create a public SHA256 that delegates to CryptoKit / Internal based on platform availability
mark CryptoKitSHA256 as deprecated encouraging users to move to the SHA256 abstraction
adjust and add tests

@swift-ci test

Besides the other advantages it seems that this could be good for performance, assuming that the system implementation is heavily optimized.  Nice!

@swift-ci test

@swift-ci test Linux


How to update List in one time

I am using kundera mongoDb, I want to update list of objects.Example code is below.
@Entity
@Table(name = "plan_usage", schema = "xxx@xxx")
public class PlanUsage implements Serializable{
    @Id
    @Column(name = "usage_id")
    private UUID usage_id;

    @Column(name = "restaurant_plan_id")
    private UUID restaurant_plan_id;

    @Column(name = "restaurant_name")
    private String restaurant_name;

@Column(name = "params")
    private Map<String,String> values;
}

Now i want to update List object.
Help me.

@sreekanth0041
Will you please provide further details about which List are you referring to in this example code and what fields you want to update? Is it List of PlanUsage?

I want to update List at a time.

@sreekanth0041
If you want to update any non-collection field say "restaurant_name", you can use below mentioned query:
String query= "Update PlanUsage p SET p.restaurant_name='abc' where p.restaurant_name = 'xyz'";
int updatedDocuments = em.createQuery(query).executeUpdate();

In the case of collection fields, suppose params has a Key-value pair  "key1"-"value1". You want to update "value1" of params to "value2".You need to query in Native way:
String script=  "db.plan_usage.update({'params.key1':'value1'},{$set:{'params.key1':'value2'}},{multi:true})";
Object result = (client).executeScript(script);

If you want to perform bulk update operation, you can use Batch update. Please refer this test case:
https://github.com/impetus-opensource/Kundera/blob/c6101f21cd8f079fb4cc44e85de49261bf5fef7e/src/kundera-mongo/src/test/java/com/impetus/client/crud/MongoBatchProcessorTest.java#L74
You can set Batch size in Persistence Unit using property (say Batch size is 5):
<property name="kundera.batch.size" value="5" />

Sample is shown below:
https://github.com/impetus-opensource/Kundera/blob/c6101f21cd8f079fb4cc44e85de49261bf5fef7e/src/kundera-mongo/src/test/resources/META-INF/persistence.xml#L99

Hi @sreekanth0041
Did above solution work for you?

@sreekanth0041
Any updates?
Chhavi

@sreekanth0041
Are you using Kundera in any of your projects? It would be very nice if you can find some time to share about your project and use case.


Prototype in-progress for ACR Client API

This is an experimental branch for the ACR prototype API.  It is not intended to be checked in to master because it is largely unimplemented.  Creating a draft PR to share the samples files in-progress with the feature crew more easily than in a private branch.
The first commitable PR for the ACR Client will include:

Test project
README
Changelog
An appropriate swagger reference
A minimal set of operations on repositories for the Beta-1 client library
A passing CI

This is now in a different private branch.


Precaching bug with adapter-static and load() functions

The main problem
There's a specific bug when using load() functions along with prerendering and the static-adapter that I spent
hours trying to fix, it occurs primarily due to @vite-pwa/sveltekit not being able to figure out how to cache
the returned data from the load(), typically stored in:
.svelte-kit/output/prerendered/dependencies/{page-route}/__data.json

This causes the app to break when offline and navigating to a page that depends on that data.
The hacky fix

To fix this, you need to manipulate the PWA config in vite.config.ts and the custom service-worker file.
After setting up the basic PWA, I added the following to your vite.config.ts:

export default defineConfig({
  plugins: [
    sveltekit(),
    SvelteKitPWA({
      /* other config */
      injectManifest: {
        globPatterns: [
          'client/**/*.{js,css,ico,png,svg,webp,webmanifest,ttf,woff,woff2}',
          'prerendered/**/*.{html,json}'
        ],
      }
    })
  ],
});

Notice the prerendered/**/*.{html,json} in the globPatterns array, this tells vite-plugin-pwa to cache the
prerendered data (typically in the form of __data.json files) so that the app can work offline. This should have
been enough, but for some reason you need this weird hack in your service-worker.ts:

/// <reference lib="WebWorker" />
/// <reference types="@sveltejs/kit" />

import { cleanupOutdatedCaches, precacheAndRoute } from 'workbox-precaching';
import { registerRoute } from 'workbox-routing';
import { StaleWhileRevalidate } from 'workbox-strategies';
declare let self: ServiceWorkerGlobalScope;

const manifest = self.__WB_MANIFEST;

manifest.forEach((entry) => {
	if (typeof entry === 'object' && entry.url.endsWith('__data.json')) {
		entry.url = entry.url.replace(/^prerendered\/dependencies\//, '');
	}
});

cleanupOutdatedCaches();
precacheAndRoute(manifest, { ignoreURLParametersMatching: [/.*/] });

self.addEventListener('message', (event) => {
	if (event.data && event.data.type === 'SKIP_WAITING') self.skipWaiting();
});

registerRoute(/.*/, new StaleWhileRevalidate());

This hack is necessary because the __data.json files are stored in the prerendered/dependencies/ folder, and the
service worker's default behaviour incorrectly configures their URLs. This hack manually alters the URLs so that the
service worker can cache them correctly.

can you provide a minimal reproduction and so I can check the kit folder? Right now I'm fixing similar problem for Kit SPA mode...
Or just updload an screenshot like this one (this is for SPA using static adatper):

I'm going to update the buildGlobPatterns function to include json and js files and removing also 'prerendered/dependencies/' prefix in the manifest transform:
function buildGlobPatterns(globPatterns?: string[]) {
  if (globPatterns) {
    if (!globPatterns.some(g => g.startsWith('prerendered/')))
      globPatterns.push('prerendered/**/*.{html,json,js}')

    if (!globPatterns.some(g => g.startsWith('client/')))
      globPatterns.push('client/**/*.{js,css,ico,png,svg,webp,webmanifest}')

    if (!globPatterns.some(g => g.includes('webmanifest')))
      globPatterns.push('client/*.webmanifest')

    return globPatterns
  }

  return ['client/**/*.{js,css,ico,png,svg,webp,webmanifest}', 'prerendered/**/*.{html,json,js}']
}

Yep, that should fix it

Also, I had another doubt. When using this strategy, the $offlineReady store returned from the useRegisterSW() function is never true.
Am I misunderstanding something? How would I know if all the assets have been precached on the frontend?

$offlineReady will be called/activated only once, when the service worker is installed and activated first time.
Uhmmm, looks like the .svelte-kit/output/prerendered/dependencies/_app/env.js file is added after PWA plugin builds the service worker, and so there is no way to fix this: I'm going to update https://github.com/vite-pwa/sveltekit/pull/97 with previous fix, can you test it in your local with this dependency https://pkg.pr.new/@vite-pwa/sveltekit@488aa8c ?

sure, I'll let you know

@WhyAsh5114 are you using SPA https://svelte.dev/docs/kit/single-page-apps?

not really, I'm using adapter-static, with export const prerender = true in root layout.ts

Am I misunderstanding something? How would I know if all the assets have been precached on the frontend?

You need to check it in the browser devtools: Application > Cache Storage

not really, I'm using adapter-static, with export const prerender = true in root layout.ts

Can you provide a minimal reproduction?

Uhmmm, looks like the .svelte-kit/output/prerendered/dependencies/_app/env.js file
Also, the env.js file isn't really of interest, the __data.json files are though IMO, since when I navigate using button clicks on the app, the SW tries to fetch that page's __data.json if it has a load() (or maybe $props()/export let data).

Ohkk, I'll make a minimal repro and link it here.

Since you're using static adapter (SPA requires it), maybe moving the buildEnd  hook from pre to post works, I need to do some tests.
I have no idea why kit not applying adapter logic like normal build, looks like prerendered/dependencies files built without awaiting... (maybe a bug => missing await somewhere).

Minimal repro: https://github.com/WhyAsh5114/prerendered-pwa

Thx, looks like we need to move the kit pwa build plugin from 'pre' to 'post' (register it after kit), this way we've now prerendered/dependencies/_app/env.js in the sw precache manifest.

There is a problem, now the service worker being generated in the kit output folder, but the adapter will not copy the service worker since it is being generated after the adapter runs (the adapter will copy the client folder without the sw).

hmm, but again, why would we need the env.js file? does it work if we just get __data.json?
Or are those files also generated after the PWA plugin builds?

I'm not even sure it contains anything useful, in my minimal repro it's just this:
export const env={}

I'm going to check your reproduction, looks like the $service-worker not including the _app/env.js file in the build/files.

Yes, my globPattern doesn't include JS from the prerendered/client dir, only html,json
                                globPatterns: [
					'client/**/*.{js,css,ico,png,svg,webp,webmanifest,ttf,woff,woff2}',
					'prerendered/**/*.{html,json}'
				]

ok, the fix will work for __data.json files, kit is generating them since we've the entries in the sw precache manifest.

And working offline:

Yep, perfect. I expected this by default, maybe we should also update the docs for this, let me know if I can help!

I'm going to release a patch version, in the meantime you can check it in your local with this dependency: https://pkg.pr.new/@vite-pwa/sveltekit@a7c0605 (I guess once PR merged the pkg.pr.new is removed)

Yep, perfect. I expected this by default, maybe we should also update the docs for this, let me know if I can help!

Checking the docs...

https://github.com/vite-pwa/docs/pull/172

I'm going to release a patch version, in the meantime you can check it in your local with this dependency: https://pkg.pr.new/@vite-pwa/sveltekit@a7c0605 (I guess once PR merged the pkg.pr.new is removed)

Umm, I installed this and remove my custom URL manipulation. It doesn't seem to work, did you push the patch?

And the docs change looks good.

Remove the storage including the service worker and reload the page, you may have old sw (you should use a virtual, vanillajs or sveltekit for page reload)

Yes, I did try that, clear storage, empty cache and hard reload. I was still getting this error

Try adding includeVersionFile: true  to kit pwa options

Still the same, it only happens when I go offline. The cache entry is there though

Check if you have checked Disable cache in network tab, uncheck it:

And working offline:

Try doing it in this way:

npm run bulid && npm run preview
go to localhost:4173
now go offline and try to click on the link

Check if you have checked Disable cache in network tab, uncheck it:

it is unchecked

You are getting that after removing the url manipulation from the service worker?
If so, I'm messing something up on my side, this package was the one I was supposed to install right?
		"@vite-pwa/sveltekit": "https://pkg.pr.new/@vite-pwa/sveltekit@a7c0605",

wait, I'm using local tgz file, checking changes...

In the meantime add the pwa icons...

Use this link https://pkg.pr.new/@vite-pwa/sveltekit@97

Ohk, need to head out for a bit, will get back in an hour or two and add the icons

Oh, we need font  files (ttf,woff*), don't remove first globPattern.

@WhyAsh5114 kit pwa v0.6.7 released

Hey, it works!
I forgot to use registerRoute() on the paths so the sw wasn't participating in the fetch at all. My bad.
Once I added that, with v0.6.7, it works properly. Thank you very much!

Okay, maybe its not fully done yet. There's still some weird behavior. I've update the repro to include it. Steps to create an error:

npm run build && npm run preview
In a new private tab, cleared everything, empty cache and hard reload
Go offline
Stay on the root page, don't go to /dependent at all (important)
Hover on the link to go to /dependent, there'll be errors in the console

Even though the __data.json is cached, you'll still get this. But for some reason, manually changing the URL to localhost:4173/dependent will work without errors, and you can then go back and forth.
But starting from root (localhost:4173), and immediately going offline, and then trying to go to /dependent with the URL breaks it

For some reason, hovering (and clicking) on the link element, the request doesn't go through the service-worker.

Check https://github.com/WhyAsh5114/prerendered-pwa/pull/1 (about prefetching when hovering the links no idea what's happening).
The PR including pwa icons (from kit pwa example) and removed manifest.webamanifest t¡from static folder addding the content to pwa manifest option).

@userquin, I did merge it and tried to run it again. It still errors out when doing the steps mentioned above. But yeah, this issue has been fixed, its something I need to figure out on my own with workbox docs and all.

@WhyAsh5114 can you replace /./ with /.*/ in the sw?

yep, tried that, still issues
I'll look into the mentioned issue tomorrow, a bit tired rn


[0.6.1]: small fixes

Work

[x] Show local plugins when offline
[x] Remove analytics ➡ fix #512
[x] Fix CI
[x] fix #358
Added ctrl+alt+i for main window and ctrl+alt+b for background
[x] fix #201
[x] fix #447
Removed an error when term is empty. Now cerebro closes after copying to clipboard (if not default prevented). BTW term is copied when highlighted result not provides clipoard field.
[x] Added more unit tests
[x] fix #468

Included PRs

#566
#568
#569

Hi @oguhpereira when you have some time take a look at this PR
It solves some bugs and fixes the CI, se we can release executables

I think it would be more interesting to approach in several pr's than to go up just one that updates many places.
I'll wait for the new pr's and then we'll send it to master. I will close, but I wait for the new updates


Horizontal scroll bar not fixed at bottom of main panel

Expected Behaviour (for problems)
If a data table is wider than the screen size, display a horizontal scroll bar anchored to the bottom of the screen. The scroll bar should not be covered by any other panels when they are opened.
Current Behaviour
At the top of the table a "slot" for the scroll bar appears at the bottom of the main panel

When you scroll to the bottom of the table, another "slot" with a scroll bar appears

If you open a properties panel, the scroll bar is covered, rather than "pushed" into a smaller space.

If you open the About panel, the scroll bar is "pushed" across

Steps to Reproduce

Open Data Curator using the icon
Add some data wider and taller than the screen size
Scroll to the top / bottom
Open Column Properties
Open About Data Curator

Your Environment

Data Curator version 0.3.4
Operating System macOS High Sierra 10.13

Issue remains in Windows 7 Data Curator 0.3.5

Problem remains in 0.4.0

Not convinced this is solved. When Data Curator is sized large on the screen I get

and when I scroll up


find last BG from before a meal, and interpolate any gaps

This should fix the issue where a CGM restart or other data gap overlaps a meal entry, thereby causing carb absorption for that time period to be missed/ignored.
I've simulated that scenario by deleting CGM values out of glucose.json, but we'll also need to test it with real receiver data where the receiver was off, calibrating, or out of range around the meal time.

TODO: once testing is completed, remove extra debug statements.

Worked GREAT!  Ate 23 g carbs right before sensor session stopped. Started up new session about three hours later and cob was zero. Perfect!  So nice!!

We'll also want to test the scenario where the carb entry occurs after the sensor data stops, as that is the part that I changed in the code.

We haven't seen any regressions with this, and it seems to help with COB calculations, so I'm going to merge this to dev for further testing there.  If anyone testing this still wants to compare this to the old behavior, you can check out the zombie-carbs branch.


docker-compose failed randomly without healthcheck of elasticsearch.

Is your feature request related to a problem? Please describe.
Current docker-compose.yaml only do health check on Backend Database Mysql / Postgres.
https://github.com/open-metadata/OpenMetadata/blob/main/docker/docker-compose-quickstart/docker-compose-postgres.yml
However, sometime it takes a long time to start elasticsearch in a small test environment.
When we try to start the environment using docker it will failed randomly since the container execute-migrate-all may timeout when trying to access elasticsearch.
Describe alternatives you've considered
I think the health check on elasticsearch should be add in order to make sure that the setup process can be stable.
Current yaml
execute-migrate-all:
    container_name: execute_migrate_all
    image: docker.getcollate.io/openmetadata/server:1.2.4
    command: "./bootstrap/bootstrap_storage.sh migrate-all"
    environment:
      ...skip
    depends_on:
      elasticsearch:
        condition: service_started
      postgresql:
        condition: service_healthy
    networks:
      - app_net

  openmetadata-server:
    depends_on:
      elasticsearch:
        condition: service_started
      postgresql:
        condition: service_healthy
      execute-migrate-all:
        condition: service_completed_successfully

Expected yaml
  elasticsearch:
    ...skip
    healthcheck:
      test: curl http://localhost:9200
      interval: 15s
      timeout: 10s
      retries: 10

execute-migrate-all:
    container_name: execute_migrate_all
    image: docker.getcollate.io/openmetadata/server:1.2.4
    command: "./bootstrap/bootstrap_storage.sh migrate-all"
    environment:
      ...skip
    depends_on:
      elasticsearch:
        condition: service_healthy
      postgresql:
        condition: service_healthy
    networks:
      - app_net

  openmetadata-server:
    depends_on:
      elasticsearch:
        condition: service_healthy
      postgresql:
        condition: service_healthy
      execute-migrate-all:
        condition: service_completed_successfully

Additional context

@akash-jain-10 needs this to be fixed for 1.3.0

Hello @kenyyh . Can you help us with steps to reproduce this scenario locally (hardware specs, commands to run, docker versions) ?

Hi @akash-jain-10
We start testing in a VM environment using docker.
Sometimes we find out that the container may all start successfully.
However when we open the UI shows that index is not found and created on elasticsearch.
We dig into the migrate-all container and will find out that it timeout when trying to access Elasticsearch.
After we add healthcheck to Elasticsearch we can create successfully everytime.
Environment Information：

CPU 4core Memory 8GB (Proxmox VM Rhel 8)
Docker version 23.0.6, build ef23cbc
(Start Command)docker-compose up -d


By default, Casanovo should do precursor filtering

According to Melih, Casanovo still does not do precursor filtering by default.  I think we should always do precursor filtering and never allow the user to get results that do not have the filter applied (i.e., 1 should be subtracted from the confidence score if the predicted m/z is outside the user-specified precursor m/z tolerance).

Predictions that are not within the precursor m/z tolerance are in fact always penalized.

Could Melih be referring to isotope errors?

I raised this point earlier when Bo said he had fewer peptide predictions than the number of spectra he was putting into the model, which made me suspect if we weren't returning a peptide prediction for a spectrum if predicted peptide was outside of the precursor mass range. In the meantime, I've spent more time with the code and this doesn't seem to be the case, a penalty of 1 is subtracted as Wout pointed out.
That being said, my current beam search implementation doesn't return any predictions if no peptides within the mass range are predicted for a spectrum, should I change that to be inline with our current "keep the peptide, subtract from confidence score"?

I think that we should always return n peptides for each spectra (with n=1 default). If Casanovo doesn't find any peptides that match the precursor m/z, the scores will be penalized but the predictions might still be useful (unknown modification, contaminants, ...).

I agree with Wout.

Ok, I will modify my implementation accordingly.


[ic-side-navigation] escape doesn't close the menu on mobile top bar

Summary of the bug
When you view side nav on a small device and open up the menu, pressing escape doesn't close the menu.
You can currently close the menu by hitting enter/space or clicking close, but I feel this should also be added in as another method of closing the menu.
🪜 How to reproduce
Tell us the steps to reproduce the problem:

Go to any side nav example
Reduce screen size so that the top bar behaviour shows
Open up the menu
Try to escape and see the error

🧐 Expected behaviour
Pressing escape should close the menu.

Good practice, not a violation

Is there a complication if you press escape when focused on another element e.g. a form, we wouldn't want it to close the side navigation?


fix(Datagrid): fix how RowSizeDropdown open state value is set (v11)

Contributes to #2856
When using row height settings with customize columns the open value for the RowSizeDropdown component does not update (see this code sandbox), this prevents the overflow menu from opening at all. I think setting it with a function that gives us a reliable previous state value will help to fix this.
What did you change?
packages/cloud-cognitive/src/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js

How did you test and verify your work?
Storybook

Can we change the icon location of this and customize column they display on the left

This one is a bit more complex than it appears, because RowSizeDropdown uses Popover. But internally the icon button that is also used also uses Popover and because of the nested Popovers changing the align prop to bottom introduces some layout issues. Ok if we open a separate issue for this @AlexanderMelox?

Okay sounds good, will approve and made a new issue for this
https://github.com/carbon-design-system/ibm-cloud-cognitive/issues/2868


Call of Duty 2 → crash at launch

I can't run Call of Duty 2, World at War and Modern Warfare. When I want to run it, it crashes and I have this message (for CoD2):

Tested with Lutris + retail CD and I have the same issue and the same log.
System information

GPU: Nvidia GT 730M
Driver: 430.34
Wine version: Proton 4.2
DXVK version: #725 (jobs)

Log files
CoD2SP_s_d3d9.log

With #759 the games still crashes at launch but with no error message this time.

This is what I have with World at War:

Again, an error about "out of video memory".
I have the same issue with Dead or Alive 5:

And probably other games that crash without an error.

err:   D3D9: Cannot create texture:
err:     Type:    3
err:     Format:  D3D9Format::D24S8
err:     Extent:  400x300x1
err:     Samples: 4
err:     Layers:  1
err:     Levels:  1
err:     Usage:   2
err:     Pool:    0

That's the issue. D24S8 should be supported though. Not sure whats going on here.

Now, I can launch the game! :tada:
Unfortunately, it hangs after the video when I launch a chapter.

Fixed by disabling "esync".


Update to New Level System

Change level system so instead of a room manager, there is a level manager with each loaded level

Finished on 2b348660b5253be4fb4dac74c1ce6a364e6cdf21


App and pipeline updates

Updates the Gradio app to use Whisper large-v3, and the pipeline to default to the Whisper fast tokenizer when available.

this is awesome and I was actively working on doing this on a fork! thank you for saving me time @sanchit-gandhi !!


Changed the design of the extension's popup

Added the design suggestions given by @killergerbah -including the middle vertical align of the text-

Thank you!


⚠ ClamAV has degraded performance

In 7c1752d, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 72 ms

Resolved: ClamAV performance has improved in 2a7ed61.


fix(application) wait for application to be destroyed

Description
Wait for an application to actually be destroyed when calling Destroy(). This is an issue where terraform is calling Destroy() then Create() when the former completes.  Juju may not have had time to fully destroy the application before we try to recreate it.
A bit of refactoring to put errors in the same place and use errors.Join() rather than a home grown version.
Stop using 2 versions of the juju/names package, only one should be.
Fixes: 521
Type of change

Bug fix (non-breaking change which fixes an issue)
Other (please describe)

QA steps
Manual QA steps should be done to test this PR.
provider juju {}
resource "juju_model" "this" {
  name = "unit-test"
}

resource "juju_application" "githubrunner-29" {
  name  = "github-runner"
  model = juju_model.this.name

  charm {
    name     = "github-runner"
    channel  = "latest/edge"
    base =<EMAIL_ADDRESS>  }
  units = 1

  storage_directives = {
    runner = "2G"
  }
}

Use juju status to see the application running. Then edit the plan to change storage_directive from 2G to 1G and re-run the plan.
Additional notes
JUJU-6348

Linking to the referenced bug which the original comment doesn't seem to be doing - https://github.com/juju/terraform-provider-juju/issues/521


src/mime: Use os-generated mimetypes on unix systems

Related to bug on Solus bugtracker: https://dev.getsol.us/T9394
Mimetypes was incorrectly being looked up from custom mime.types files that were not generated by the systems.
This changes the mimetype loading and parsing on unix systems (except for darwin, see note below) to use the os-generated mimetypes instead. It makes mimetype lookup work on systems that do not have those custom files (such as Solus mentioned above) and allows us to drop the workarounds for FreeBSD, DragonflyBSD and OpenBSD.
The old lookup is used only for darwin, where the globs file is not present in later releases.

@googlebot I signed it!


Created Concurrency of Triangle Calculator

Issue Id you have worked upon - #276
Briefly explain your program logic -
Created a calculator to check whether the two triangles are congruent or not.
Screenshots(Attach 2 screenshots of your own input and output) -

By raising this PR I affirm that -

[x] My code follows the guidelines of this project.

[x] I have performed a self-review of my own code.

[x] I have commented my code.

[x] My code gives the correct output.

[x] I affirm that I strictly follow contributing guidelines and code of conduct.

Congratulations 🎉 @syash7202 on your contribution.
Thanks for adding value to this repository. 😊
Let's celebrate this fest 😃 by providing more developers 👨💻👩💻 an opportunity to contribute. Help us make this repository reach far and more by sharing this to your friends and colleagues.
Your efforts can make difference.

Hey 👋, may you also encourage us by clicking the star icon on the repository main page. ⭐


Org Create fails with Unrecognized option: cookiesAllowAllPaths

Summary
As of 30 min ago, all attempts at org creation are failing with the error ERROR running force:org:create: Unrecognized option: cookiesAllowAllPaths in CI
Steps To Reproduce:

Do a fresh install of SFDX
Create a scratch org using the Org:create command

Expected result
Org created successfully
Actual result
Creation fails with the error ERROR running force:org:create: Unrecognized option: cookiesAllowAllPaths
System Information
sfdx-cli/7.108.0 linux-x64 node-v14.16.1
@oclif/plugin-autocomplete 0.3.0 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-help 3.2.17 (core)
@oclif/plugin-not-found 1.2.6 (core)
@oclif/plugin-plugins 1.10.10 (core)
@oclif/plugin-update 1.4.0-3 (core)
@oclif/plugin-warn-if-update-available 1.7.3 (core)
@oclif/plugin-which 1.0.4 (core)
@salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
@salesforce/sfdx-trust 3.6.0 (core)
alias 1.1.10 (core)
apex 0.2.2 (core)
auth 1.7.0 (core)
config 1.2.9 (core)
custom-metadata 1.0.12 (core)
data 0.4.12 (core)
generator 1.2.1 (core)
limits 1.2.1 (core)
org 1.6.7 (core)
salesforce-alm 52.0.2 (core)
schema 1.0.7 (core)
sfdx-cli 7.108.0 (core)
telemetry 1.2.2 (core)
templates 52.0.0 (core)
user 1.3.0 (core)

7.108.0 is definitely not a "fresh install" of the CLI.  That's from about 5 months ago.
Does it happen on a recent CLI (I'm guessing not since we removed all that awful streamingClient stuff https://github.com/forcedotcom/cli/blob/main/releasenotes/sfdx/README.md#71200-sept-30-2021)

@mshanemc It is a fresh install in that we are installing it from nothing. It is a CI environment which means it is built and installed on demand.
I am trying to use newer versions but hitting other errors. We are using the sfdx orb for CircleCI<EMAIL_ADDRESS>and specifying our cli version of 7.108.0. If I try a newer version, then the SFDX CLI itself fails to install with the error:
npm ERR! syscall mkdir npm ERR! path /root/.npm/_cacache/tmp npm ERR! errno EACCES npm ERR!  npm ERR! Your cache folder contains root-owned files, due to a bug in npm ERR! previous versions of npm which has since been addressed.

yeah, we've seen CI systems where the way we bundled sf doesn't allow install via npm.  And since you're using that orb (not from us) there's not an easy way to make it not-an-npm-install.
Can you try version 7.131.0 where we've removed sf from npm based installs?

with 7.131.0 the CLI appears to install but SFDMU plugin install fails with TypeError: HelpClass is not a constructor

So it appears that the sfdmu plugin is installing just fine. But any calls to --help (or we were doing sfdx just to verify our install) breaks with the typeerror.
That type error is happening even on 7.130.1 and means we cannot use --help for any command anymore.

FYI, this is happening when we tried to do a build through Jenkins calling the SF DX org create. This did not happen two days ago with the same versions. Here are more details.
Create scratch org events
[Pipeline] echo
Script sfdx force:org:create --definitionfile config/project-scratch-def.events.json --json --setdefaultusername --durationdays 1 --setalias "master/crm-events/PR-12" --wait 10
[Pipeline] sh

sfdx force:org:create --definitionfile config/project-scratch-def.events.json --json --setdefaultusername --durationdays 1 --setalias master/crm-events/PR-12 --wait 10
›   Warning: sfdx-cli update available from 7.110.0 to 7.123.1.
{
"status": 1,
"name": "Error",
"message": "Unrecognized option: cookiesAllowAllPaths",
"exitCode": 1,
"commandName": "OrgCreateCommand",
"stack": "Error: Unrecognized option: cookiesAllowAllPaths\n    at module.exports (/usr/local/lib/node_modules/sfdx-cli/node_modules/faye/src/util/validate_options.js:8:13)\n    at klass.initialize (/usr/local/lib/node_modules/sfdx-cli/node_modules/faye/src/protocol/client.js:40:5)\n    at new klass (/usr/local/lib/node_modules/sfdx-cli/node_modules/faye/src/util/class.js:13:28)\n    at Object.getCometClient (/usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/core/lib/status/streamingClient.js:363:28)\n    at new StreamingClient (/usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/core/lib/status/streamingClient.js:127:55)\n    at Function.create (/usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/kit/lib/creatable.js:56:26)\n    at OrgCreateCommand.signupOrgWithStreaming (/usr/local/lib/node_modules/sfdx-cli/node_modules/salesforce-alm/dist/lib/org/scratchOrgCreateCommand.js:208:68)\n    at async OrgCreateCommand.execute (/usr/local/lib/node_modules/sfdx-cli/node_modules/salesforce-alm/dist/lib/org/scratchOrgCreateCommand.js:315:32)\n    at async OrgCreateCommand.execLegacyCommand (/usr/local/lib/node_modules/sfdx-cli/node_modules/salesforce-alm/dist/ToolbeltCommand.js:149:29)\n    at async OrgCreateCommand._run (/usr/local/lib/node_modules/sfdx-cli/node_modules/salesforce-alm/node_modules/@salesforce/command/lib/sfdxCommand.js:81:40)\n    at async Config.runCommand (/usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/config/lib/config.js:173:24)\n    at async SfdxMain.run (/usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/command/lib/main.js:27:9)\n    at async SfdxMain._run (/usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/command/lib/command.js:43:20)\n    at async Object.run (/usr/local/lib/node_modules/sfdx-cli/dist/cli.js:162:47)\nOuter stack:\n    at Function.wrap (/usr/local/lib/node_modules/sfdx-cli/node_modules/@salesforce/core/lib/sfdxError.js:171:27)\n    at OrgCreateCommand.catch (/usr/local/lib/node_modules/sfdx-cli/node_modules/salesforce-alm/dist/ToolbeltCommand.js:253:46)\n    at async OrgCreateCommand._run (/usr/local/lib/node_modules/sfdx-cli/node_modules/salesforce-alm/node_modules/@salesforce/command/lib/sfdxCommand.js:85:13)\n    at async Config.runCommand (/usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/config/lib/config.js:173:24)\n    at async SfdxMain.run (/usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/command/lib/main.js:27:9)\n    at async SfdxMain._run (/usr/local/lib/node_modules/sfdx-cli/node_modules/@oclif/command/lib/command.js:43:20)\n    at async Object.run (/usr/local/lib/node_modules/sfdx-cli/dist/cli.js:162:47)",
"warnings": []
}


Fixup example runner

Updates the example runner to handle blank or missing arguments.
Also some whitespace adjustment and removing some print statements
that accidentally made it through.

Current coverage is 65.66% (diff: 100%)

Merging #10 into master will decrease coverage by 0.03%

@@             master        #10   diff @@
==========================================
  Files            51         51
  Lines          1901       1899     -2
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
- Hits           1249       1247     -2
  Misses          652        652
  Partials          0          0

Powered by Codecov. Last update 75617f7...a05478d

Landscape messed up again and has apparently been this way for a bit.


[FEATURE] Add OPENSEARCH_JAVA_HOME env to override JAVA_HOME

Signed-off-by: Andriy Redko<EMAIL_ADDRESS>Description
Add OPENSEARCH_JAVA_HOME environment variable to override JAVA_HOME variable. The OPENSEARCH_JAVA_HOME takes the precedence of JAVA_HOME, which in turn takes the precedence over bundled JDK.
Issues Resolved
Closes https://github.com/opensearch-project/OpenSearch/issues/1872
Check List

[X] New functionality includes testing.

[X] All tests pass

[ ] New functionality has been documented.

[ ] New functionality has javadoc added

[X] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@stockholmux you're cool with this?

Is this wrong documentation being codified or wrong documentation being a good idea? 😂
My only issue is that #1872 should really be fixed in documentation.
At a higher level: if @reta has a specific use case and it doesn't cause other problems, it seems reasonable. The specific use case in this comment is a little vague to me - maybe it could be a little more concrete and put into an issue so this PR does fix or enhance something real (not bad docs).
@jcgraybill might have thoughts here too.

Is this wrong documentation being codified or wrong documentation being a good idea? joy

Thank @stockholmux , yeah we could treat it both ways :D but I think is is actually missed feature

My only issue is that #1872 should really be fixed in documentation.

Sure, we could do that and drop the feature

At a higher level: if @reta has a specific use case and it doesn't cause other problems, it seems reasonable. The specific use case in this comment is a little vague to me - maybe it could be a little more concrete and put into an issue so this PR does fix or enhance something real (not bad docs).

I think the use case is very concrete, will try to flesh it out into the sub components:

Assume the user has an application which requires JDK-17 and connects to local Opensearch instance
The local Opensearch instance requires JDK-8 (to use CMS collector)
In this case, there are no way but to have 2 JDK distributions available on the host: JDK-8 and JDK-17. Setting JAVA_HOME to either of those will break one of the components.
By introducing OPENSEARCH_JAVA_HOME we are detaching any application / host specific concerns from the Opensearch by providing the way to configure dedicated JVM.

Hope it makes it more concreted, I have run into that many times with Elasticsearch deployments.

@jcgraybill might have thoughts here too.

:+1:

It might require the user to create a wrapper script or something similar but it might be simpler overall rather than adding additional logic into OpenSearch itself.

Exactly, thanks @andrross , so we either off-load it to every current or/and future user which runs into that or do it once in the  OpenSearch, I am fine with any of those.

My default opinion would be to avoid building this into OpenSearch, but having a drop-in replacement for ES_JAVA_HOME to make migration easier seems pretty compelling!

I went ahead and merged it. Please open issues for/document this.

Hey @dblock this is still being discussed and wasn't ready to merge.
OpenSearch isn't the only software that's included in the distribution or the project that uses JAVA_HOME. If we're going to consider this change, it really should be a project-wide standard behavior, for both the java and node runtimes, and we should ensure it gets properly documented before rolling out. I can see @reta's point about how this makes migrations easier, but a new configuration knob should behave the same across the whole suite of software to not become an ease-of-use challenge.

@jcgraybill the funny fact (my apologies if this is something you already know), the feature request / bug came out of properly documented feature (citing official docs here) which turns out to be not implemented.

OpenSearch isn't the only software that's included in the distribution or the project that uses JAVA_HOME. If we're going to consider this change, it really should be a project-wide standard behavior, for both the java and node runtimes,

For JVM runtime it is clear, it would make sense to make it a project-wide standard behavior. If there is a need to replicate similar deployment model for node runtimes - please create an issue so we could discuss and work on it (sadly I am just not aware of this part of the project).

... but a new configuration knob should behave the same across the whole suite of software

The JVM settings are irrelevant to node fe, so extrapolating them to the whole suite would not be useful. But there are standalone JVM components like performance analyzer which would make sense to  consider (I will create an issue for that). If you have other components in mind, please add them or just create an issue, so we could make it " ... a project-wide standard behavior ... " 👍
Thank you.

Haha, yes, I do remember that. @davidlago can you check, I think some of the security configuration scripts use JAVA_HOME.
OpenSearch Dashboards has different behavior to specify its node.js runtime: it looks like it tries the bundled binary then falls back to any that it can find in the user's path. There were mixed signals in the Kibana documentation about the extent to which this was supported. If we're going to support it at all, I'd love to see us introduce an OSD_NODE_HOME environment variable so that this affordance is similar across the project.

Since this got merged into 1.x we should decide quickly whether we want to roll it back.
@julesg Are you saying we should not have this feature at all, or are you saying we should add support for OPENSEARCH_JAVA_HOME anywhere it's missing?

In security I see 3 trivial references in https://github.com/opensearch-project/security/search?q=JAVA_HOME in tools that we can fix quickly, https://github.com/opensearch-project/security/blob/4c182a216954b441cb698fe3f4d07f34a88b6d2f/tools/audit_config_migrater.sh, https://github.com/opensearch-project/security/blob/4c182a216954b441cb698fe3f4d07f34a88b6d2f/tools/hash.sh and https://github.com/opensearch-project/security/blob/4c182a216954b441cb698fe3f4d07f34a88b6d2f/tools/securityadmin.sh
I see one in https://github.com/opensearch-project/performance-analyzer/blob/747dbe98812d6e83eeea303f074f9a98d420e721/pa_bin/performance-analyzer-agent

@dblock I am about to look at performance-analyzer, not sure why we would need to revert instead of making it " ... a project-wide standard behavior ...  " as @jcgraybill suggested?

@dblock I am about to look at performance-analyzer, not sure why we would need to revert instead of making it " ... a project-wide standard behavior ... " as @jcgraybill suggested?

Right. I only wanted to hear a confirmation that we don't need to discuss whether this will become project-wide behavior beyond here/now.

Is there a better place to track this effort since it's spanning multiple repos?
(I'm guessing opensearch-project/project-website#628 is dependent upon not only this but the project wide action(s)?)

I see how they can be related, but I don't think we should lump OpenSearch Java home and OpenSearch Dashboards node home in the same feature.
I'm reopening this one and making it into a meta issue.

The project's default approach should be that the same action should produce the same behavior in all the software a single user is likely to use: that's a design principle that reduces complexity and makes things easier to use. So we should take a project-wide perspective for things like this, and I do think configuring the runtime should be treated as a single behavior.

I opened https://github.com/opensearch-project/OpenSearch-Dashboards/issues/1219.


Buy and Sell Stock series in Java

Hey, I want to add the buy and sell stock series. The questions are :
https://leetcode.com/problems/best-time-to-buy-and-sell-stock/
https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/
https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/
https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv/
https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/
https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-transaction-fee/
I would provide a well-explanatory solution to each problem with examples.
Please assign me this issue.
Thanks

Sure Diyya, please go ahead

Hello , If this issue is still not resolved can you assign it to me

@ShadyResurrected you can submit respective PRs

hey , is this issue still open? if yes can u assign it to me


cssh by instance and some typo fixes

Adds a new option to cssh to allow connections by instance id in addition to names.
Along the way, fix some language mistakes in the man page and help texts.

Codecov Report

Merging #123 into master will not change coverage.
The diff coverage is 0%.

@@           Coverage Diff           @@
##           master     #123   +/-   ##
=======================================
  Coverage   14.78%   14.78%
=======================================
  Files          46       46
  Lines        3564     3564
=======================================
  Hits          527      527
  Misses       3037     3037

Impacted Files
Coverage Δ

src/modules/centerdevice/upload.rs
0% <0%> (ø)
:arrow_up:

Continue to review full report at Codecov.

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


Initial implementation of table aliasing

This work is very incomplete, but I think I've poked this from enough
directions to be confident that the problem is well understood, and what
the design tradeoffs and implementation hurdles will be. So I'm pushing
up what I've got so far in order to have a discussion about the
potential design choices.
Any version of this feature that we go with must handle these use cases:

Joining to the same table multiple times
Joining to a subselect
Self referential subselects

I'm not sure we actually need this one. Can anyone come up with a
query that uses a subselect which can't be replaced by a join to
that same subselect?

Ultimately the main questions around design are:

How do we define the alias?
How do we reference columns from the alias?

In terms of actual aliasing, I think there's basically only one design
that makes sense. You create an aliased table by doing let aliased = table_or_query.aliased(your_alias), which generates table alias for
tables, and (SUBSELECT) alias for subselects. You can then join to
this by doing whatever.inner_join(aliased.on(...)). These seem
straightforward and don't have many alternatives.
Even when this is fully implemented, this feature has to cover enough
use cases, and is complex enough that I'd like to have at least one full
version with this feature available before we commit to stability on
this. For that reason I've hidden it behind a cfg gate. This is
specifically not a feature, so that the end user has to explicitly opt
into the use of the unstable feature, similar to the requirements around
nightly.
Defining an alias
The design I've gone with requires forward declaring aliases before they
can be used. In the test case I've declared it in the function, but I
expect that the majority of people will define them all in schema.rs
and then add them to their allow_tables_to_appear_in_same_query! line.
The defining macro creates a unit struct with similar properties to
tables.
Pros
This form is flexible and consistent with how we handle tables. It fits
into our type system in the same way, and has the same benefits
(ensuring an alias appears in the from clause no more than once,
disallows referencing columns from that alias unless it's inside the
from clause). It also follows the same "rules" with regards to joins.
Though allow_tables_to_appear_in_same_query! is a total hack, but it's
not going away any time soon, and I think keeping the rules simple and
consistent is valuable.
Cons
This requires a lot of ceremony to ever alias a table. It requires two
lines that are likely going to be in a completely different file before
you can ever even use it. Additionally, the resulting type for an alias
does not have an identical structure to a table module. Because of
that, we have to introduce a new macro
allow_types_to_appear_in_same_query, which takes a type instead of an
ident. We'll probably need to change diesel print-schema to use the
more verbose form.
The fact that we're using unit structs means that you can't use the same
name in the let binding. let users2 = users.aliased(users2) would feel
more natural.
Alternatives

Avoid unit structs

We'd basically stick a single field on the struct with type () to
allow let bindings with the same name. This would change the
invocation to users::table.aliased::<users2>(). This feels
inconsistent and weird to me.

Inline declarations let users2 = users::table.aliased(diesel_alias!(users2))

This is what I had originally envisioned, and would be my preferred
form if it is possible. However, we need the enumerated
AppearsInFromClause impls in order for this to work at all. We can
theoretically generate them specifically for tables, but this still
wouldn't allow multiple aliases to appear together. Perhaps I'm
missing something, but if so it's not clear to me.

Remove the need for allow_types_to_appear_in_same_query!

Right now our convention is that in schema.rs you have a single
allow_tables_to_appear_in_same_query! invocation that contains all
your tables. We could decide to make this convention actually
required for this feature. We could define a macro from inside that
macro which you use to define your aliases. You'd have to define
them all in a single macro call, but it'd just be a single
diesel_define_aliases! after your table declarations. This
requires a bit too much specific ordering of things, and I think
it's too much hard to understand magic.

Strings for aliases

If we don't actually try to enforce type safety, we don't have
problems that arise from proving a query is type safe. This one is a
non-starter for me personally, but I figured I'd mention it here. In
addition to losing type safety, we would also no longer be able to store
these queries in the prepared statement cache.

Unresolved Questions

allow_types_to_appear_in_same_query! basically obsoletes
allow_tables_to_appear_in_same_query!. Should we deprecate it?
If we expect folks to be putting this in schema.rs anyway, should we
add support for it in diesel.toml and generate this code for them?

Accessing the aliased columns
The current design has you call .selection() to get back the resulting
aliased columns as a tuple.
Pros
This is the simplest design, and pretty much the only possible design
for aliased subselects, which have an unknown structure and also require
generating labels for each expression (the unique labels will be
required, even if the expression is just a normal column. We have no way
of knowing if there would be a name conflict otherwise). This means that
what you write is the same, regardless of what's being aliased is a
table or a subselect.
Cons
The main issue here is that this is a bit cumbersome, especially if you
want to join on the 17th column in the expression. We can work around
this for specifically tables with an alternate design if we want (see
below), but this restriction is basically always going to exist for
subselects. In the general case this can be worked around by explicitly
calling .select with the bits that you want first.
Alternatives

Stick this on the table instead

So the idea here is basically that we turn tables into structs
containing all columns as fields, and then make both tables and
columns generic over the alias. This means that you can do let u2 = users.aliased(users2) and then access users.id, etc. There
are two main reasons I haven't done this. First is just for
consistency, I'd like to have the same thing work for both tables
and subselects. Secondly, this will make our type errors way
worse. Every appearance of a table would change from
schema::foo::table to schema::foo::table<schema::foo::__NoAlias>.
Same for columns. Not to mention the implementation is substantially
more complicated.
One big upside here is that it would be possible to write code
generic over a table and that table when it's aliased. I suspect
this is niche enough to ignore.

Forward declare the fields as well

This would look something like named_alias! { foo { bar, baz, qux } } etc. It's more or less the same thing, but it makes you state the
names far more up front so you can access them with dot syntax. We
could potentially bake the select clause in here as well. I feel
like I actually had a more fleshed out design for this a while back,
but it was in the private channel which doesn't have search. I
remember we all liked the tuple version better though.

It's worth noting that the current design doesn't preclude doing the
others in the future, both of those can be built on the current
structure.
Unresolved Questions

The selection method probably will always just be calling
.default_selection() -- Should we codify that in the code?

So that's basically it. The actual code included here is just a minimal
skeleton for table aliases, it does not allow subselects. It for sure
needs more tests added, and especially compile tests. I've been writing
this commit message for like an hour now so I'm going to stop.

@diesel-rs/reviewers This could still use review. I'd like feedback on this overall design before continuing further on this.

I gave a try for this branch yesterday as I had a piece of code which required joining same table multiple times. I'm not very experienced diesel programmer, virtually my first week with it.

I was perfectly fine with defining aliases in schema.rs and replacing allow_tables_in_the_same_query with allow_types_in_the_same_query. Of course I feel bad that this will get overwritten when I write a new migration, so would be really cool to include aliases into diesel.toml.

Why can't the diesel_define_alias macro specify the aliased table straight away? I understand that aliasing isn't exclusively for tables, but it's one of the main use cases. Could we have a diesel_define_aliased_table!(alias, something::table) macro to avoid calling something::table.aliased(alias) later then?

The selection() function was the most painful and kinda breaks the code flow. Would be much better to use just alias::column_name, but I understand the argument about worse type check errors...

I also noticed that you can't join two aliased tables users::table.inner_join(users2.inner_join(users3)) (where users2 and users3 are aliases of users::table, also the real code included valid .on statements for all joins) didn't work for me. Was this intended design or just an early implementation bug?

Anyway, it's a very much needed feature, even this early implementation helped me a lot :) Thanks for your work.

I feel there are two main use cases that are being solved here:

Sub-selection (which requires an alias). I strongly feel that define_diesel_alias! is overkill here. Can we not have like query.as_selectable() (name obviously terrible) which returns a unique "aliased" reference to the query selection?

// "Finish" returns a complete query that can now be selected from
// "Finish" computes a unique aliased name `_diesel_1`, `_diesel_2`, etc. or something
let a = users::table.select((users::id, users::name, users::score)).finish();
let b = a.select(sum(a[2])); // Array syntax to select the pieces of the selection

Multiple references to the same table.

// A) This would be equivalent to B
table! {
    #[alias(users2)]
    users (id) {
        id -> Uuid,
        created_at -> Timestamptz,
        name -> Text,
    }
}

// B) This is possible today (if a bit verbose) and satisfies many users needs for aliasing.
table! {
    #[sql_name = "users"]
    users (id) {
        id -> Uuid,
        created_at -> Timestamptz,
        name -> Text,
    }
}

table! {
    #[sql_name = "users"]
    users2 (id) {
        id -> Uuid,
        created_at -> Timestamptz,
        name -> Text,
    }
}

let sean = find_user_by_name("Sean", &connection);
let tess = find_user_by_name("Tess", &connection);

let all_users_twice = users::table
    .inner_join(users2::table.on(true.into_sql::<Bool>()))
    .order((users::id, users2::id))
    .load::<(User, User)>(&connection);

@sgrif Tried out the branch for awhile and gave the design some thought. I really like how #[alias] feels. We could allow this to be defined in diesel.toml as well:
# A)
[print_schema.alias]
users = ["users2", "users3"]

# B)
[print_schema.alias]
users2 = "users"
users3 = "users"


Added awscli upgrade command

Issue #, if available:
https://github.com/awslabs/aws-control-tower-customizations/issues/34
Description of changes:
botocore 1.18.0 removed AWS CLI specific doc files. Those were already migrated to the CLI in version 1.18.140.
install_stage_dependencies upgrades botocore but not awscli which makes them incompatible
This is failing codebuild stage.
Added following awscli upgrade command in install_stage_dependencies.sh
pip install --upgrade pip
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Hello @ahmei0,
We are testing the fix and plan to publish a new version as soon as possible.

Issue the same on my end. Need update ASAP.


[iOS] Crash on iOS 9.3.2 because of missing didReceiveRemoteNotification method

In the installation instructions, it says to add:
// Required for the notification event.
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)notification {
    [RCTOneSignal didReceiveRemoteNotification:notification];
}

to the AppDelegate. This line is causing a crash anytime we receive a push notification, but only on devices that aren't iOS 10. This is using the latest (3.0.4) react-native-onesignal library.
Removing this method still allows the device (and OneSignal) to receive push notifications, but the crash now does not occur.
It looks like this method was removed in this commit: https://github.com/geektimecoil/react-native-onesignal/commit/4b2c55da780cff9bc82c227c052b416681dfdb27#diff-53b840050097cad618dd73cd2ebd59f2L81 and the previous comment makes it seem like it's no longer required.
Unfortunately, it's still in the header file (https://github.com/geektimecoil/react-native-onesignal/blob/master/ios/RCTOneSignal/RCTOneSignal.h#L17) so our app compiled and then caused a runtime error when it could not find the selector :(
Couple of questions:

Is it okay to remove this method? Are we missing functionality by removing it?
If it is okay to remove, should the method definition in the header be removed and the readme updated? If so, I would love to submit a PR for that.

I have the exact same problem.

@negativetwelve I removed the
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)notification {
    [RCTOneSignal didReceiveRemoteNotification:notification];
}

and everything works just fine. It wasn't necessary to do anything else but I am also interested in this question:

Are we missing functionality by removing it?

@zakster12 sorry for the late reply. I haven't worked on purely native in a while so I was unsure if that hook was necessary for anything. I think I remember seeing that the native OneSignal SDK is now hooking into this method on its own which means that theneed to add it manual is no longer required (hence why they removed it)

it's been working fine for us on iOS 9 with that method removed and we're indeed still receiving push notifications with the proper OneSignal JS hooks!

@negativetwelve did you receive notification when the app is killed/closed? Because I do not receive them: I have content available set to true,
onReceived = (receivedNotif) => {
}

but I receive them only the app is not closed. Can you help here?

hi @zakster12, we currently do not take advantage of the content-available for notifications but our devices are all receiving push notifications when the app has been force closed (not in memory)

@negativetwelve does it work when the app is active, mine didn't work when it is active ( it works while the app is in background)

@jemmyphan sorry, this all happened a while ago and we've since updated versions of the OneSignal SDK

@negativetwelve nvm, thanks anyway.


make webpack ready

add dependency entries as there are for jspm

and webpack: https://github.com/aurelia/webpack-plugin#configuration-options

fixed with https://github.com/SpoonX/aurelia-orm/pull/67

ah, for webpack needs component special treatment still

some hints here https://github.com/fopsdev/rabbitfox/blob/master/README.md

that's all basically done. but only did test with very basic orm. should make another with more complete orm (since multiple files need extra entires in webpack config)

i did that i think


GPIO Pinout reference

I recently acquired a T-Embed, but when trying to add an RC522 module, I came across this doubt: how do I reference the GPIO pins? Which numbering corresponds to the MISO, CLK, and SDA pins? I searched the manual, but the numbering doesn't seem to be correct. Thank you very much for your attention and time in advance!

If you need to use this SPI, then there is a problem. This hardware design does not reserve an extra free CS pin. You need to connect CS to GPIO 44 or 43.
Regarding which MISO MOSI and SCK are SPI, you can see here.
https://github.com/Xinyuan-LilyGO/T-Embed/blob/606694fd07a5bf377caef45fe7fd5685549bc3e1/examples/CC1101_Receive/TFTHelper.h#L46


[silx view] Use a common colormap for all the views

Using the fact colormap object is now interactive (get/set/events) we can provide a convenient unique colormap for all the views. It avoid the user to custom everytime the same thing, with many popups.
This PR

provides a unique default color maps from the DefaultView class
Any view can use it
Most of the views have been patched to use it (2d, stack, NX)
[x] ComplexView is not yet patched, maybe we can? But it is maybe a little more complex for this one? I dont try. Does it make sens? @t20100 ?

Close #1425
Close #1424

After talking with @kif @t20100, this feature is maybe not a good idea. While the range is auto, which is the default value, the result should be fine. Else, it can be really boring.