Use 7z compression as well as 7z self-extracting archive

7-Zip provides a very efficient compression algorithm (LZMA) which improves further database file compression.
It also provides self-extracting archive capabilities which avoid installing unzip and gzip.
Finally, decompression can use multiple threads for even faster start time!

Implemented and released. Thanks a lot for this ER, @loiclefevre! :)


Link "Deploy to Azure" button to the correct URL and not the label image

Module: 11
Lab/Demo: 11b
Once the Markdown has been rendered to HTML, the "Deploy to Azure" button links to the label image and not the intended URL in the Azure portal - see https://microsoftlearning.github.io/AZ400-DesigningandImplementingMicrosoftDevOpsSolutions/Instructions/Labs/AZ400_M11_Setting_Up_and_Running_Functional_Tests.html for the results.
The problem is a limitation in Markdown described at https://meta.stackexchange.com/questions/2133/whats-the-recommended-syntax-for-an-image-with-a-link .
This fixes the problem.
Thanks @Elamark for help with this.

Thanks @LuizMacedo !


Create DB schema and Models

Firebase Firestore Database Structure
Collections and Documents
Users Collection

Document: User ID (automatically generated by Firestore)

username: String
email: String
avatar: String
password: String (Note: Storing passwords in plaintext is not recommended, consider using Firebase Authentication)

Games Collection

Document: Game ID (automatically generated by Firestore)

name: String
description: String
artwork: String
rating: Double
genre: String
launch_date: Timestamp
is_top_rated: Boolean (You would manage the logic in your application to ensure only one game is set as top rated)

SavedGames Collection

Document: SavedGame ID (automatically generated by Firestore)

game_id: Reference (References a Game document)
game_details_url: String

Reviews Collection

Document: Review ID (automatically generated by Firestore)

user_id: Reference (References a User document)
title: String
content: String

Notes

References are used to link documents across collections.
It is important to secure your user passwords. Firebase Authentication can handle authentication securely without storing plaintext passwords.
For the is_top_rated flag in the Games collection, you would need to ensure application logic that when one game's is_top_rated is set to true, the others are set to false.
Firestore automatically creates unique IDs for documents, but if you want to use your own integer IDs, you can specify them as the document IDs.
Firestore does not support unique fields directly; uniqueness will need to be enforced by the application logic.


⚠ Adacta-fintech.com has degraded performance

In 8ca767e, Adacta-fintech.com (https://www.adacta-fintech.com) experienced degraded performance:

HTTP code: 200
Response time: 1574 ms

Resolved: Adacta-fintech.com performance has improved in ea71a78.


Referencing XAML resources

When I you reference to MahApps.Metro.Resources
Paket add following code into project file
    <Content Include="Resources\Icons.xaml">
      <Paket>True</Paket>
    </Content>

In the same time NuGet add it like
    <Page Include="Resources\Icons.xaml">
      <Generator>MSBuild:Compile</Generator>
      <SubType>Designer</SubType>
    </Page>

As a result when MSBuild does not compile xaml file and application crashes in the runtime when tries to load resources.

One more note, project previously used NuGet, it contains <Page> node, so Paket added duplicate files with <Content> nodes.
As well as Paket adds
<Content Include="Resources\Entypo.ttf">
      <Paket>True</Paket>
</Content>

even if NuGet already added this as
<Resource Include="Resources\Entypo.ttf" />

(leads to duplication in file explorer)

I assume our xaml support is pretty poor (read as non-existent). We could
need some help here.
On Nov 26, 2015 11:09, "Sergey Tihon"<EMAIL_ADDRESS>wrote:

One more note, project previously used NuGet, it contains  node, so
Paket added duplicate files with  nodes.
As well as Paket adds

True

even if NuGet already added this as

(leads to duplication in file explorer)
—
Reply to this email directly or view it on GitHub
https://github.com/fsprojects/Paket/issues/1260#issuecomment-159866906.

Not sure that I know how to support all cases...

Migration from NuGet
Install dependencies correctly
Track/Update such dependencies

Could please mark this issues and up-for-grabs and mention some files that should be changed according to you feelings :smirk:

I assume the fix is needed in https://github.com/fsprojects/Paket/blob/master/src/Paket.Core/ProjectFile.fs#L447

ping


Restarted Android app hangs with white screen when switching channels even on demo server

Summary
Restarted Android app hangs with white screen when switching channels even on demo server
Environment Information

Device Name: OnePlus 3T (ONEPLUS A3000)
OS Version: Android 9, OxygenOS 9.0.6
Mattermost App Version: 1.26.0 (Updated on 12/16/29, did not experience issue before update)
Mattermost Server Version: 5.7.0 (demo.mattermost.com)

Steps to reproduce
How can we reproduce the issue?

Using desktop browser: create account on demo.mattermost.com.
On phone, uninstall Android Mattermost app and install 1.26.0.
Using app, sign in to demo.mattermost.com server. Town Square channel displays fine.
Run the Development demo. Switching between the Development channel and Town Square works fine at this point.
Close the app either by restarting the phone or swiping the app away from within the app manager.
Restart the app.
Try to switch to the Development channel.

Expected behavior
The Development channel should display.
Observed behavior
A white screen is displayed and the app is hung. I can't switch channels. Restarting the app, force stopping the app, and/or clearing the app's cache all fail to resolve the issue. If I reinstall the app, it will start me in Town Square which displays properly, but if I try to switch to the Development channel, I still get the white screen.
Possible fixes
None at this time.

I got the exact same issue with Samsung S6 on Android 7

I hear that the issue is with the server version. The latest version of the apps require server version 5.9 or higher. We'll be upgrading our local server this weekend to see if that resolves the problem for us. Someone should probably upgrade demo.mattermost.com.

Thanks both for your report. Given this impacts an older mobile version and an older server version, I'll close this issue.
If anyone else stumbles upon this issue, please review the changelog to review the compatible server versions for the mobile app you are running: https://docs.mattermost.com/deploy/mobile-app-changelog.html


Can not run with Carpet

Mod Name
Carpet
Mod Homepage
https://modrinth.com/mod/carpet
Minecraft version
1.21.1
Describe the bug
The farbic loader:The mod "carpet" Injection Failed
Steps to reproduce
No response
Logs
https://gist.github.com/zlink2010/6a88cf7d7be6323521da4e4fd0feb7c9
Additional context
No response

Duplicate of #296


Added program to check palindrome number and find the factorial of a number

Thanks for your great contribution @BAKA-470


GlobalWorkerOptions of undefined

I'm trying to use pdfjs-dist's example: https://github.com/mozilla/pdf.js/blob/master/examples/webpack/main.js for a Typescript-React-Electron app
import pdfjsLib from 'pdfjs-dist';

pdfjsLib.GlobalWorkerOptions.workerSrc = 'src/node_modules/pdfjs-
dist/build/pdf.worker.js';

I get "GlobalWorkerOptions of undefined".
Based on what I found here: https://github.com/wojtekmaj/react-pdf/blob/master/src/entry.js
in package.json I've put:
"source": "src/app/components/pdfHandling/entry/entry.js",

where src/app/components/pdfHandling/entry/entry.js :
import * as pdfjs from 'pdfjs-dist';

pdfjs.GlobalWorkerOptions.workerSrc = 'pdf.worker.js';

export {
 pdfjs,
};

Any ideas about how to make pdfjs.GlobalWorkerOptions working?
OS: Ubuntu 18.04.4 Desktop
pdfjs-dist installed: 2.5.207
node version:  v14.5.0

I'm trying to use pdfjs-dist's example: https://github.com/mozilla/pdf.js/blob/master/examples/webpack/main.js for a Typescript-React-Electron app

Unfortunately the core PDF.js contributors probably don't know much (if anything) about either TypeScript, React and/or Electron hence it's somewhat difficult for us to provide support for those kind of frameworks.
Furthermore, please see https://github.com/mozilla/pdf.js/blob/master/.github/CONTRIBUTING.md (emphasis mine):

If you are developing a custom solution, first check the examples at https://github.com/mozilla/pdf.js#learning and search existing issues. If this does not help, please prepare a short well-documented example that demonstrates the problem and make it accessible online on your website, JS Bin, GitHub, etc. before opening a new issue or contacting us in the Matrix room -- keep in mind that just code snippets won't help us troubleshoot the problem.

@Snuffleupagus  Thank you Jonas for promptly replying to my request of help.
I've searched documented solutions, for example in StackOverflow, but the ones offered, didn't solve the problem.
Here you can find the complete code: https://github.com/raphael10-collab/OnlyPdf
To run the app, once downloaded the code:

cd OnlyPdf
yarn
yarn start

Looking forward to your kind help

The standalone examples in our repository work, so this must be some integration issue with React/Electron, for which we cannot provide assistance since we're not familiar with them. I would suggest to ask on StackOverflow or other React/Electron-specific forums instead.


fix(docs): update Sentry integration link

What does this PR do?
This pull request updates a dead link in the documentation for Sentry integration within our FastAPI project. The previous link was outdated and no longer accessible. The updated link points to the correct and current Sentry documentation, ensuring that users can easily follow the integration instructions.

📝 Docs preview for commit 718f79922dc4c3aee3889c4c9a2650828fe49644 at: https://35942e11.fastapitiangolo.pages.dev

📝 Docs preview for commit b6ff5c196e1506244eee55ed9a96817301acc958 at: https://e0a8df83.fastapitiangolo.pages.dev

Hi @suganthsolamanraja
This link was removed from here (#12031). The integration will be added later in another section. But thanks for your interest :rocket:


Battery informations section

Looks like #61 is dead.
So, reworked on battery section to fetch battery information using pmset,upower and acpi.  By default battery information is displayed when battery level is below SPACESHIP_BATTERY_THRESHOLD (default: 10%) or completely charged. But user can opt to  always display battery information by setting SPACESHIP_BATTERY_SHOW_ALWAYS=true.
Different colors and indicators are used to represent battery level and battery status.

Battery level
Color

100% or fully charged
Green

Below THRESHOLD (default: 10%)
Red

Between 10% and 100%
Yellow

Battery status
Indicator

Charging
⇡

Discharging
⇣

Fully Charged
•

🔋  is used as PREFIX, But it doesn't change color based on the battery level. If anyone have a better alternative, let me know.
Read about using multiple batteries on laptops, I'm not familiar with such configuration. In that case with `upower, Only the first battery listed will be considered.
Samples with BATTERY_ALWAYS_SHOW=true
In ubuntu using upower

In macOS using pmset

PS : I haven't updated the docs, Will do as review is finished.
Close #61.

Time to introduce abandoned label :(

Looks like a part of the previous section. Needs some kind of separator. Wondering about the word which may fit before this section 🤔

What about placing this section before char, like other system section (jobs, exit_code)?

May be we could swap the status symbols with descriptions. Like , ⇡ -> charging and move them to section prefix and describing the status of battery.

What about placing this section before char

That's also a good choice.

⇡ -> charging and move them to section prefix and describing the status of battery.

Sounds good, but I'm afraid it would take too much space of single line.

I've noticed strange behavior: it's 9% of battery ramaining, but battery section isn't shown:

I tested it with below 10% and it was working at the time of submitting PR. I will test it again once my batter drains 😊

What about placing this section before char, like other system section (jobs, exit_code)?

This looks better than I expected, we could do this.

I'm playing with other icons. I wanna make it clean. Which one is better?

(Personally, I like the first one)

I had tried with the options and decided against it before. The reason I chose a symbol was to separate it from other sections.
If we're going to move battery section before char, I'm good with any option.

Merged without an icon. A little bit reassembled.


Save user name and password

There should be a way to save your user name or password so when you reopen the application from a closed state you done need to re-auth yourself.

actually working with google auth but can't tell for PTC

The latest version adds this.


Localization uses culture from DefaultThread

System Details

FluentValidation version: 7 & 8
ASP.Net MVC 5, .NET 4.7.2

Issue Description
We have a multitenant app and different tenants have a different UI culture. Everything worked out pretty well until today, but now we have a problem. The validation messages are not using the culture from the current thread. I suspect it uses the culture from the DefaultThreadCurrentUICulture.
On my dev box I can easily start with a tenant of my choosing. If I start with a spanish one the validation messages are spanish, when I navigate away and then switch to english and submit the form again the validation still is in spanish. I think this is because the app is started with a certain culture and the DefaultThread cultures are set to spanish.
I set the culture in my TenantController, and every tenant specific controller is derived from that, the code is:
namespace MyProject.Web.Controllers
{
    public class TenantController : Controller
    {
        protected override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            //Some logic to determine the language to use
            Thread.CurrentThread.CurrentUICulture = new CultureInfo(_site.Language);
            Thread.CurrentThread.CurrentCulture = new CultureInfo(_site.Language);
            ViewBag.Language = _site.Language;
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                _db.Dispose();
            }
            base.Dispose(disposing);
        }
    }

    public class ProfileValidator : AbstractValidator<Profile>
    {
        public ProfileValidator()
        {
            RuleFor(x => x.CountryId)
                .NotEmpty()
                .WithMessage(Strings.SelectCountry);
        }
    }
}

Hi there, error messages are always generated using the culture of the current thread  by using CultureInfo.CurrentUICulture (unless a specific culture has been specified).
If you're you're seeing messages coming back in the wrong language I wonder if there might be some caching issue in your application?
As a first step I'd stick a breakpoint in your validator's Validate method and check in there what if CultureInfo.CurrentUICulture is coming back as you expect (you can also directly call ValidatorOptions.LanguageManager.GetString("NotNullValidator") to see what the language manager is coming back with).

Its getting more interesting now. My object that I'm trying to validate has a child object. Validation for the parent is in dutch, and the child in english. I know its supposed to use the culture of the current thread, but could thread switching/swapping occur?

No that shouldn’t happen, validators are intentionally designed to be thread safe. That being said, if you’re using an ioc container, make sure your validators are transient and not cached as singletons.

I'm not using ioc. This occurs immediately on starting my app from visual studio with the dutch tenant.

How are you handling instantiation and lifetime of validator instanced?

Its MVC 5, so I just do FluentValidationModelValidatorProvider.Configure() in Application_Start and then I make my validators with AbstractValidator

Right, but how are you wiring up the validators and controlling instantiation? Are you using the [Validator] attribute? I’m assuming so if you’re not using an ioc container....I’m wondering if this is the issue as this uses a static cache internally.
If you are using the validator attribute, then i think it’d be worth swapping this out for a container instead to see if this makes a difference (see https://fluentvalidation.net/mvc5#using-an-inversion-of-control-container )
If you’re not able to get that to work then please put together a small sample project that reproduces the problem and I’ll try and look into it further.

Will try that. I'm have used all versions since v4 and never seen this, so I suspect we do something weird that triggers this. Will look into it tommorrow (night time here).
And thanks for the awesome support, this is incredible!


Minor modifications and improvements.

Make the code more Toit like.

I tried to give as much feedback as possible.
Many changes aren't needed, and are subjective. So don't feel obligated to accept all of them.

Thanks for cleaning up the code, much more Tiot-like now.
have to learn, only worked with perl and python before :-)


Site Settings '_config.yml'

Modify "_config.yml" file for site settings.

title
description
organization

Add google-analytics-id


Serializing std::vector vs std::vector const different sizes

OS: windows
Compiler: Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.10.2
Hi, is this behavior expected?
I've been reading through the section on serializing standard library types but I can't find anything anything about whether the vector being const affecting the sizes. What I understand is the size should always be serialized using 4 bytes (by default).
#include <external/zpp_full.hpp>
#include <cassert>

using U8Buffer = std::vector<std::uint8_t>;
using U8Writer = zpp::bits::out<U8Buffer>;

int main(int, char**)
{
  U8Buffer b0;
  U8Buffer b1;
  {
    U8Writer writer{b0};
    std::vector<int> const data;
    assert(std::errc{} == writer(data));
  }
  {
    U8Writer writer{b1};
    std::vector<int> data;
    assert(std::errc{} == writer(data));
  }
  assert(b0 == b1); // FAIL, std::size(b0)==0, and std::size(b1)==4
  return 0;
}

Here's a link using gcc:
https://godbolt.org/z/h9es5KbYf

To anyone else who runs into this for now I'm just casting away the const from my reference that I'm serializing.

It's most likely an MSVC bug, if I change this code:

To this:

It resolves - this means that msvc finds the wrong "container" variable despite the nearest variable is the one declared in the requires clause.

Hi @eyalz800 ,
Thanks for looking into this. Unfortunately the issue seems to happen in gcc/clang as well:
https://github.com/eyalz800/zpp_bits/issues/164#issuecomment-2168793777
I hope this helps. If it helps I noticed the issue also seems to occur with std::variant I'm using.

@bjadamson but in GCC and clang both are size 4 no?

But in GCC and clang is says 4 for both in your links:

Wow your right I'm so sorry. My brain was swapping the b0 with the value for some reason.

@bjadamson at least you seem to have found some bug in MSVC, I didn't submit a patch because my entire code is written with name hiding from requires expressions so fixing just this piece is not gonna cut it - want to submit an MSVC bug and link it here?

Sure -- if you have suggestions on going through the process I'd love to hear them. This will be my first bug report with those folks.

Always a good day to learn something new

Hi, I couldn't find an issue opened with Microsoft regarding this and went ahead with submitting a ticket.
https://developercommunity.visualstudio.com/t/C-requires-expression-name-shadowing-i/10726925

Updating that this issue has been resolved in MSVC release version 17.12.

Thank you for the update


wine{Unstable,Staging}: 6.17 -> 6.18

Motivation for this change
Upstream update, includes bump to mono version.
Things done
The Windows software I use still works with staging.
$ NIXPKGS_ALLOW_UNFREE=1 nixpkgs-review rev wine-6.18
[...]
14 packages updated:
grapejuice lutris lutris lutris-original pipelight wineUnstable (6.17 → 6.18) winePackages.unstable (6.17 → 6.18) winePackages.staging (6.17-staging → 6.18-staging) wineStaging (6.17-staging → 6.18-staging) wine-staging (6.17-staging → 6.18-staging) wineWowPackages.unstable (6.17 → 6.18) wineWowPackages.staging (6.17-staging → 6.18-staging) yabridge yabridgectl
[...]
12 packages built:
grapejuice lutris lutris-free lutris-unwrapped pipelight wineStaging winePackages.staging wineUnstable wineWowPackages.staging wineWowPackages.unstable yabridge yabridgectl

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Superseded by #141111


Add Sprava Hromad public organization

This is one of the largest organizations in Ukraine that helps the army in multiple areas.

@vshymanskyy, @webknjaz could someone process the recent PRs and look into https://github.com/vshymanskyy/StandWithUkraine/issues/219?
Thank you!

With this http://en.kremlin.ru/


Error registering vuex module without preserveState prop

Version
v2.2.0
Reproduction link
https://codesandbox.io/s/4z2v7poop0
Steps to reproduce

Register the father module dynamically.
this.$store.registerModule('moduleA', {});

Register the nested module dynamically.
this.$store.registerModule(['moduleA', 'moduleAB'], storeObject); // It fails.

What is expected ?
Whenever I register a nested module it should be registered without the preserveState option.
What is actually happening?
The nested module is not being registered.
Additional comments?
It was working in the version 1.4.2 of Nuxt.

This bug report is available on Nuxt community (#c8093)

What prevent you from passing preserveState false if u need it?

I don't need the preserveState effect so I don't want to pass it as option.
The problem is that in the previous version of nuxt I used to register many modules in this way and now I have to refactor all these occurrences.

Well, that was intended change because thats the usual way its expected to work with SSR
https://github.com/nuxt/nuxt.js/pull/3909


Type inference fails for picked object as function param where picked keys are generic

TypeScript Version:  3.0.3

Search Terms: pick object keys generic type inference
Code
type MyComponentProps = { render: (props: { file: File }) => any };

declare const createDefaultProps: <K extends keyof MyComponentProps>(
    defaultProps: Pick<MyComponentProps, K>,
) => Pick<MyComponentProps, K>;
// `defaultProps` has type ` Pick<MyComponentProps, "render">`, as expected :-)
const defaultProps = createDefaultProps({
    // `props` type is inferred as `any`, but expected `{ file: File }` :-(
    render: props => 'foo',
});

A workaround for now is to explicitly specify the type argument createDefaultProps<"render">.

Thanks @andy-ms. Unfortunately the purpose of this function is to infer the keys, so that's not a suitable workaround. Otherwise we would just use a type annotation on a variable with the explicit keys.

A better workaround as seen in the React typings:
declare const createDefaultProps: <K extends keyof MyComponentProps>(
    defaultProps: Pick<MyComponentProps, K> | MyComponentProps,
) => Pick<MyComponentProps, K>;

@mattmccutchen I don't see that in the link you provided?

It's the Pick<S, K> | S in the state parameter.

This started to work in 3.4 or 3.5 (3.4 isn't available in the playground so I can't quickly verify this). The issue can be closed


newly forked repository, submitting my ex1 and ex2 work

Alright hopefully this will work!
I attempted your git reset/revert suggestion, but then my "branch and 'origin/master' have diverged" and a git pull made things messier. So to simplify everything, I decided to just delete my original repository, and fork a new one.
So now my repository appropriately includes my work and everyone else's work, and hopefully this pull request is now suitable!

Yes, looks fine now, will merge it.


[Packager] Support for jsx filenames in React Native

It seems that files with the extension .js can be required, but .jsx files cannot.
The following works fine:
var HelloPage = require("./src/views/screens/hello.js")
But when I rename the file and the code to .jsx, it gives the exception "Requiring unknown module "./src/views/screens/hello.jsx". If you are sure the module is there, try restarting the packager."
Restarting didn't seem to help. Is this a problem with something in React Native?
I want to name the files with JSX so that my editor uses the right syntax highlighter.

Which editor are you using? It works for us when we use,  for instance, Component.jsx.js on WebStorm. So, WebStorm suggest the right syntax highlighter.

This is correct, the react native packager only searches for files with a .js or .json extension (See here and here). I'm using a babel syntax highlighter for sublime and it works with JSX syntax in .js files just fine.

I suppose I'll just name the files .jsx.js
It'd also be reasonable to add it to the list in the watchRootConfigs. If for some reason you guys don't want to add it to the watchRootConfigs, just close this issue.
By the way, if either of you is pretty good with React, I'm looking to hire someone for a few hours to help me ramp up quickly with React Native: https://discuss.reactjs.org/t/react-native-trainer-wanted-in-sf-bay-area/1764/1
Just email me if you're interested.

It'd also be reasonable to add it to the list in the watchRootConfigs.

Agreed. If you want to see this happen the best way is to submit a PR.

I actually prefer the extension to be .jsx :-/

Alright, I'll make a PR for it later tonight.

I decided to just do it now: https://github.com/facebook/react-native/pull/2305

If you are using Sublime Text 3 with the Babel-Sublime extension, click on the lower-right section, (there you can select the syntax for the file,) and go to Babel -> JavaScript (Babel).

@brentvatne @ide This can be closed now.

Hi,
Is this included in any stable release?

Hi @shprink, .jsx will not be included in React Native, see https://github.com/facebook/react-native/pull/5233#discussion_r49682279 for reasons.

Dammit! Any way to format jsx with .js extensions on Atom?

at the moment I have the same problem @shprink. I'm manually setting the extension with ctrl + shift + L

yup I'm stuck..... on webstorm same problem

In webstorm, It works associating the .js extension as JS harmony file type.

After reading the comments on this issue, my opinion of the react-native team has changed drastically.
The only reason stated for not supporting .jsx is that it would raise a conflict between index.ios.js and index.ios.jsx. Have you heard of priority?
And do you realize that this basically means that ReactNative does not support React and Facebook does not support something invented by Facebook?
I have a native project that uses some code from a react web project and now I have to change file extensions in order accomplish this for no valid reason.
Like it or not, JSX is not vanilla JS and tools/editors/developers need to know what a file contains without parsing the entire content. Otherwise we might as well support only 1 file name as well.

I agree with the above that have a preference order is a good/safer solution.
We are trying to support components in web/iOS/android, and because of this opinion to not support JSX extensions we end up having to drop jsx in our web naming to get a middle ground. The webpack order priority works fine for developers and is flexible, and while that is difficult to support platform selection without possibly defining two order priorities (eg [.ios.jsx,

thanks , i think  'jsx' will not supported forever

This doesn't make any sense... As said before, Facebook invented jsx so why not stick to this decision?
I have a React project with lots of components using the jsx extension. Recently we started experimenting with React Native but we realized that the only way to share code would be renaming every single jsx file to js. Worse than that is that Node.js is introducing the mjs extension. For that reason, we have lots of mjs files because we want to be ready for when Node releases mjs and because we want to be able to share ES modules between the frontend and the backend. However, once again React Native also does not support mjs so the solution is to duplicate mjs files as js files...
The nice thing about having different extensions is that when I look at a file I can deduce the following from its extension:

js: it is a JavaScript script with no imports / exports which can be used across platforms;
mjs: it is a JavaScript module in strict mode which can be used across platforms;
jsx: it is a JSX module in strict mode which can only be used for the frontend and requires transpilation.

When it comes to mjs, Node already confirmed that this is happening and Babel 7 and Webpack 4 added support to it. So why not React Native? And where is the question about mjs different from the question about jsx?


Upgrade to v<IP_ADDRESS>93

Please amend the commit message to include the name of the updated cask.

Something I have messed up. I will close this and make a new pull request.


Fix PROTO definition

This PR fixes the PROTO definition that didn't get merged from #318.

👍

👍


Add Product Type Unit Tests

Please use the following example at  as a template:
https://github.com/DefectDojo/django-DefectDojo/blob/dev/tests/Product_unit_test_example.py
Implement the following tests:

Add
Edit

Master List and Overview: https://docs.google.com/document/d/1dSS7tWuQukAX3VWtzPAlOfFNoqLQh-mBHBfmsu2WlU0/edit?usp=sharing

@devGregA, have the use of django-webtest been considerated/evaluated?
For smoke/integration tests, it is a very light (i.e. fast to execute) approach for testing models and views, and being the integration for Django of the awesome Pylons WebTest, best in class for testing WSGI applications, it goes straight to the point (i.e. very fast to write tests).
For example, opening the index page, clicking on a button and checking the resulting page contains a given string is a 2 lines job:
    def test_products_link(self):
        # Load the index, pretending to be logged in as user `devGregA`
        index = self.app.get('/', user='devGregA')

        # Click on the on the 'Products' link, check that it works
        # (no exception is raised and code 200) that the result page contains 'My Products'
        assert 'My Products' in index.click('Products')

Same for submitting a form, very simple, as shown in the example from django-webtest page:
class AuthTest(WebTest):
    fixtures = ['users.json']

    def test_login(self)
        form = self.app.get(reverse('auth_login')).form
        form['username'] = 'foo'
        form['password'] = 'bar'
        response = form.submit().follow()
        self.assertEqual(response.context['user'].username, 'foo')

Generally speaking, all form-related operations (checkbox, radio, ...) are very simple to use (WebTest doc).
Last point, django-webtest integrates perfectly with pytest-django, which is the integration for Django of pytest. The Why would I use this instead of Django’s manage.py test command? section explains it pretty well.
Besides the reduced boilerplate and increased test runner speed, fixtures and parametrization are for me the biggest game-changers. Fixtures for example can provide you whatever external resource (SMTP server, HTTP server, LDAP server, ...) is needed, but without hitting the actual resource. As for parametrization, it allows for example to rerun the same test several times but with different input values, allowing a huge factorization of the test suite code.
As I've been using WebTest for 10+ years now, with pytest for 6+ years, I can hardly go back to the vanilla Selenium + unittest approach :wink:.
I still keep using Selenium with a headless chromedriver, through pytest-selenium, for automating screenshots when visual validation is required.

Start working on it.

Merged under PR#1153


Got rid of extra LBFGS/BFGS function calls

In the no-linesearch case, as was noted by this comment, L-BFGS was doing an extra computation of function value and gradient.
Same for BFGS.
It turns out that, normally (for now I have a bug so there might be something more to it), this extra call can also be gotten rid of in the linesearch cases.
This PR also adds a test to check the number of calls in the no linesearch case.
https://github.com/google/jaxopt/pull/367 needs to be merged before.

Currently tests fail because of projection_test. Indeed under the hood, this uses LBFGS which is affected by our changes.
From my debugging it seems that the main reason for this change of behaviour is that we are not recomputing the gradient after the call to zoom linesearch.
Indeed, in some cases we have the gradient taken directly from the linesearch is not the one that you can compute from the new parameters. This happens when the linesearch fails, and that the failure is not handled.
I will solve this in a separate PR.

Since the fix on the linesearch failed state was also applicable to nonlinear CG I implemented it in this case as well.
@mblondel all tests passing in local (although for the nonlinear CG one I did observe the arbitrary_pytree test go red at some point, certainly because the randomness is not well fixed, but green for all other runs I did).
This is ready for review once https://github.com/google/jaxopt/pull/367 is merged.


android-studio: Fix the license (unfree)

Motivation for this change
I just noticed that Android Studio states that it contains proprietary code so this obviously requires an update to the licensing situation.
Screenshot:

Things done

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

[ ] NixOS
[ ] macOS
[ ] other Linux distributions

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

Hmm, are we certain that applies to the things distributed in the derivation and not just the things that are downloaded after accepting the license? (IIRC the build is fairly significant, so if it's to keep the core build free that would be optimal).

Hmm, are we certain that applies to the things distributed in the derivation and not just the things that are downloaded after accepting the license?

I'm not that familiar with the Android Studio licencing, but that's definitely what NOTICE.txt tells us.
The additional downloads are covered by the (also unfree) Android SDK license.

IIRC the build is fairly significant, so if it's to keep the core build free that would be optimal

We don't build Android Studio from source (if we did this the result would most likely be open-source without the proprietary extras). Therefore this shouldn't really affect build times at all (apart from possibly differing server bandwidths, but this shouldn't make a noticeable difference).

I've had another look:

Most/all other distributions only use the Apache-2.0 license
But:

Android Studio requires one to download the Android SDK (I could neither skip this step on a new installation nor deselect core components) which is under a proprietary license (as linked above)
NOTICE.txt is included in the distribution from Google that we ship: at $(nix-build --no-out-link -A android-studio.unwrapped)/NOTICE.txt (i.e. not from any additional downloads)
There are some CLion references (which is proprietary) and the Android Studio NDK plugin (which is based on CLion) might be bundled by default (see e.g. https://twitter.com/clion_ide/status/603993226400399360?lang=en).

So the licensing situation isn't really clear but IMO it would be best to assume an unfree license (proprietary parts) as that would be way less problematic than the other way around (and since the Android SDK is unfree it's not possible to use Android Studio under a free license anyway as those extra downloads are required by default).

We don't build Android Studio from source

Right, I could've sworn I had to do large build at some point after modifying the android studio derivation, but must've confused it with something else.
Disregard me then, not a big deal marking it as unfree then.


[RTM] fix the order of reports, remove silent try catch

This looks fine to me, though the fact that this loop is populating a dictionary suggests that the order shouldn't matter at all.
@rwblair was there any particular reason for reverse-ordering elements?

From @rwblair  "Not positive why it was done that way. If going through the elements fixes the issue there shouldn't be any problem with the changes that I can see."


CLI command "algobattle package problem" throws empty error

The named cli command behaves a bit curiously, and I have trouble understanding why. If I take the circlecover problem from the algobattle-problems repository, descend into the corresponding folder, and run algobattle package problem on it, the cli behaves as expected, and packages the problem.
I do however have trouble packing other problems, where the cli is not very helpful in its feedback:
~ algobattle package problem
Couldn't load the problem file
Error:
Aborted.

An example of this is the longestpathboundedfvs problem from the algobattle-problems repository, as well as problems that we currently build ourselves. Since the error message is empty and the structure of the problem files looks virtually identical, I cannot identify what exactly is causing these issues.

I cannot reproduce this behaviour locally, the longestpathboundedfvs is packaged without issues for me. Can you confirm your algobattle version and provide me with the full contents of the folder you're working in. It looks like algobattle is having problems executing the problem python file, though there should be an error message printed after the Error:  output.

Algobattle version 4.1.0
Python version 3.11.6
Full contents of the folder: Main branch of the algobattle-problems repository, folder is algobattle_problems/longestpathboundedfvs without any changes
I am also irritated by there being an empty error message, but this is reproducible for me across different devices and base systems (Arch and Fedora).

Just to make sure, this problem uses networkx as a dependency, do you have it installed in the environment you're trying to package the problem with?
The error message is terrible rn because the full traceback is being swallowed if the problem file cannot be executed properly, but with every combination I'm testing this is the only way to get the package command to crash.

Indeed, after installing networkx, which is the dependency of the problem, packaging works as expected. Can this explicitly be checked for and an appropriate error message be returned?

fixed in #149


Regex and backreferences in StripBetweenTransformer

Hi,
I'm attempting to use regex and a backreference in the StripBetweenTransformer but it doesn't seem to be working.
I'm wanting to strip any html content contained within a tag that has a class containing visually-hidden
E.g.   <a href="#main-content" class="visually-hidden focusable skip-link">     Skip to main content   </a>
The relavent part of my config is:
<transformer class="com.norconex.importer.handler.transformer.impl.StripBetweenTransformer" inclusive="true" caseSensitive="false">
<stripBetween>
<start><![CDATA[<(\w+)[\s\w"=\-#]+?visually-hidden[\s\w"=\-#]+?>]]></start>
<end><![CDATA[</]]>$1<![CDATA[>]]></end>
</stripBetween>
<restrictTo field="document.contentType">text/html</restrictTo>
</transformer>
</preParseHandlers>```

However this doesn't seem to be working.  Is this even possible?

Georgina.

You cannot use back-references with StripBetweenTransformer since the "start" and "end" are executed separately from each other.
To do what you want, you have to perform a "search and replace" in one swoop.   For this, you can use the ReplaceTransformer, like this:
    <transformer class="com.norconex.importer.handler.transformer.impl.ReplaceTransformer">
      <replace>
        <fromValue><![CDATA[<(\w+)[\s\w"=\-#]+?visually-hidden[\s\w"=\-#]+?>.*?</\1>]]></fromValue>
        <toValue></toValue>
      </replace>
    </transformer>

Hi @essiembre,
Thanks for your response, I have tried what your code and it works beautifully.
Performing a "search and replace" in one swoop using the ReplaceTransformer is a neat trick.
Georgina


Adding  Notification hubs

New module

Closing this PR as it is missing a few attributes and not active for a couple of weeks. Please feel free to update and reopen, or create an issue so that the community might take over.


Way to change type of "this" on return type.

🔍 Search Terms
optinally controlled or dynamically change this shape in class and object
✅ Viability Checklist

[X] This wouldn't be a breaking change in existing TypeScript/JavaScript code
[X] This wouldn't change the runtime behavior of existing JavaScript code
[X] This could be implemented without emitting different JS based on the types of the expressions
[X] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
[X] This isn't a request to add a new utility type: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types
[X] This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals

⭐ Suggestion
I think currently class/object "this" does not really change without using typeguard again (enfoce type to basetype).
So I would be nice that if we can control "this" in cases when we actually change shape of this.
This also might give more control like in array cases [T, ...T[]] to change as T[] on some methods or push to change T[] => [T, ...T[]]
📃 Motivating Example
// quick and dirty idea how this might work, or have something like ThisIs<T> or ReturnThis<T> type.
interface IOption {
  isSome: boolean;
  take: () => this is INone & IOption;
}
interface ISome {
  isSome: true;
  take: () => this is INone & ISome;
}
interface INone {
  isSome: false;
  take: () => this is INone & INone;
}
class OptionBuild implements IOption {
  #isSome: boolean;
  constructor(isSome: boolean) {
    this.#isSome = isSome;
  }
  get isSome() {
    return this.#isSome;
  }
  take(): this is INone & IOption {
    const newOption = new OptionBuild(this.isSome);
    this.#isSome = false;
    return newOption;
  }
}
function Ok(): ISome {
  return new OptionBuild(true) as ISome;
}
function Err(): INone {
  return new OptionBuild(false) as INone;
}

function test() {
  const ok = Ok();
  const isSome1: ISome = ok;
  const taken = ok.take();
  const isSome2: INone = ok;
}

💻 Use Cases

Easier to control shape types when internally type/shape acually changes.
In easiest form we don't need to copy & change types and verify those again.
Copy as new base type and make new type guard check to get shape again validated.

Duplicate of #41339.


New Docsearch

Description
Will the new docs-searchbar what is currently implemented in the new meilisearch docs be available in the future to use for e.g. Docusaurus?

Many thanks and keep up the awesome work!
Ma4m0

Hey @Mat4m0 !
This is a home made search bar. It's not currently planned but we will try to provide one asap.
Meanwhile this one is more advanced: https://github.com/tauri-apps/meilisearch-docsearch

Thanks! Exactly what I was looking for 😊

I'm closing the issue if it's resolved for you :)


Fix Google signin on some devices

Google signin fails on my device with GetCredentialResponse returned from framework:
CredManProvService      dev.johnoreilly.confetti             I  GetCredentialResponse returned from framework
System.out              dev.johnoreilly.confetti             I  NoCredentialException

and on @emartynov one with:
CredManProvService      dev.johnoreilly.confetti             I  GetCredentialResponse returned from framework
System.out              dev.johnoreilly.confetti             I  Unknown auth v2.g0@5d1613b

It's not 100% clear what's happening under the hood but changing from GetGoogleIdOption to GetSignInWithGoogleOption fixes the issue, at least on my device:
https://github.com/joreilly/Confetti/assets/3974977/ec3dabe0-612c-4ac8-815a-2dde6733568e

are we ok to merge this?

Sorry, people, I haven't checked my issue with this fix. But at least it fixes one from Martin.

Oke, this also works for me!

Can't approve my own PR but LGTM :)


[Gateway] Design Feedback from Yoonhee

boba_gateway_ edits.pdf

@this-dave let's do that one.

@sk-enya Are these changes all correct? Or should I leave some out, e.g. the "bridge" page because of the other issues being discussed?

Design changes were implemented in #662 - ready for merge


OutOfMemoryError in NativeStore with large values.hash files on 32-bit platforms

(Migrated from https://openrdf.atlassian.net/browse/SES-724)
Due to http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6822107 the HashFile used by Sesame's NativeStore can run into an OutOfMemoryError when it needs to grow. This happens when there's insufficient memory address space to store the hash file's overflow buckets. This problem has been seen on 32-bit platforms where a considerable part of the ~2GB of address space is used for the java heap. The relevant part of the stack trace looks like this: java.io.IOException: Map failed at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:761) at sun.nio.ch.FileChannelImpl.transferToTrustedChannel(FileChannelImpl.java:450) at sun.nio.ch.FileChannelImpl.transferTo(FileChannelImpl.java:523) at org.openrdf.sail.nativerdf.datastore.HashFile.increaseHashTable(HashFile.java:405) at org.openrdf.sail.nativerdf.datastore.HashFile.storeID(HashFile.java:201) at org.openrdf.sail.nativerdf.datastore.DataStore.storeData(DataStore.java:158) at org.openrdf.sail.nativerdf.ValueStore.storeValue(ValueStore.java:319) at org.openrdf.sail.nativerdf.NativeStoreConnection.addStatement(NativeStoreConnection.java:381) ... 24 common frames omitted Caused by: java.lang.OutOfMemoryError: Map failed at sun.nio.ch.FileChannelImpl.map0(Native Method) at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:758) ... 31 common frames omitted

Since the bug only occurs in Java 6 SDK (it was fixed in Java 7), this particular issue is no longer relevant.


Conditional dashboards

Description
Fixes #913
Dependencies

Ex. Other PRs.

Breaking Change

[ ] Yes
[X] No

Testing Notes
What I did:
What did you do to validate this PR?
How you can replicate my testing:
How can the reviewer validate this PR?
Links
Issues links or other related resources

merged into https://github.com/flanksource/karina/pull/938


"Requirements" section for install guide

This lets people quickly check that they have what they need to run the HaaS at all

This is addressed in the README.


predis cluster problem when migrate server

Hi, basically I have a redis cluster setup. For example:
$conn = array(
'0' => array('host' => localhost, 'port' => 6379),
'1' => array('host' => localhost, 'port' => 6378),
'2' => array('host' => localhost, 'port' => 6377),
);
I'm moving one of the node to a bigger server with a different IP. So i moved the data using redis replication, so in this example it would be <IP_ADDRESS> will be slaveof localhost. And the new config once replication completes becomes:
$conn = array(
'0' => array('host' => '<IP_ADDRESS>', 'port' => 6379),
'1' => array('host' => localhost, 'port' => 6378),
'2' => array('host' => localhost, 'port' => 6377),
);
However, the problem now is that predis doesn't seems to get the data it got previously from <IP_ADDRESS>, but instead from other server. It seems like the whole cluster distribution got changed.
Any idea?

This is not a bug, that's how client-side sharding using consistent hashing works, you would incur in such behaviour with any library that uses this technique. Consistent hashing does not eliminate the need to rehash the keys affected by a change in the configuration of your cluster but it only alleviates it by keeping the rehashing to a minimum, so you should take care of migrating all the keys affected by the rehashing to the new target server based on the new configuration of your cluster.
Someone proposed to adopt the same approach used by Craigslist to mitigate such changes in a client-side cluster configuration, you can find more info on this other issue but while it is already possible to use aliases instead of the ip:port pairs to calculate the distribution (see the snippet in that issue), it still has to find its way into Predis.
The actual solution will be to use redis-cluster once it will be available in Redis 3.0, but I guess it is still a long way away.

Thank you nrk for the prompt reply. So redis is different with memcache right? Because with memcache I'm able to swap the ips as long as I don't swap the order of the servers and the weight.

As long as the approach and algorithm being used are the same, the result won't change since consistent hashing is applied on the client side and it's server agnostic.
That said, I'm not familiar with both the existing memcache extensions for PHP so I don't know how they implemented this, but I find it hard that changing the IP of one server in your configuration with memcache does not trigger any rehashing (unless they used the same approach as Craigslist). A quick lookup with Google pretty much confirms my guess, see here for example.

I'm using memcache standard hashing (not consistent, http://www.php.net/manual/en/memcache.ini.php#ini.memcache.hash-strategy), and changing the ips doesn't change result as long as I don't change the order of the servers. Is there anyway to do that for predis? If not, what do we have to do whenone of the predis servers got full and we need to move it to other server?


add Dockerfile generation

Feature:

Dockerfile generation with structure

:tada: This PR is included in version 1.0.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Provide Simplified Way to Define Nested Related Fields

Carved from #2806
For example location on ProviderFilterSet, instead of having to do:
class ProviderFilterSet(NautobotFilterSet):
    location = TreeNodeMultipleChoiceFilter(
        field_name="circuits__circuit_terminations__location",
        queryset=Location.objects.all(),
        label="Location (slug or ID)",
    )

You could do something like:
class CircuitFilterSet:
    class Meta:
        location_filter_field = "circuits__circuit_terminations__location"

All other aspects should be inferrable.

[ ] We should consider a pattern to map certain pk/slug related fields that are common such as site/site_id, region/region_id etc. Consider CircuitFilterSet as an example.

[ ] Let's get this as an issue but not required and may not even be doable. At least not for 2.0
It does not have a site field and instead derives site from terminations__site__slug
Region similiarly is derived from terminations__site__region

So  a "foo_lookup_field" pattern in the filterset meta would be useful here to help reduce boiler plate e.g.:

class CircuitFilterSet:
    class Meta:
        site_lookup_field = "terminations__site__slug"
        region_lookup_field = "terminations__site__region"

Then if these meta options are defined, the filterset automatically gets site and region filters without having to explicitly define them.

I'm not convinced that there are enough "common" indirect filter fields out there to justify the development time of introducing this pattern, personally.

I'm not convinced that there are enough "common" indirect filter fields out there to justify the development time of introducing this pattern, personally.

I don't think it's required for 2.0 and I would be inclined to agree, but it's a feature none the less.
Since we can infer the field type of circuits__circuit_terminations__location I think we could render the field but yeah, you're not saving much code if it's only going to be used in a few places.


Couldn't find meshgrid()

Or may be there is just a different way of doing this in Multik?

No, there is no way to do this out of the box in Multik

Hi, @devcrocod. I need this function too!


Swipe with mouse doesn't work on firefox

Client,
Firefox Nightly V119.0a1 (2023-09-11)
Firefox Beta V118.0b7
On Debian Linux
Server,
Home Assistant 2023.9.1
Supervisor 2023.08.3
Operating System 10.5
Frontend 20230908.0 - latest

Uncaught ReferenceError: TouchEvent is not defined

Ah, thought I was doing wrong...same issue here in Firefox. Works as a charm in Chrome 👍🏻

A fix is coming. Sorry for the inconvenience.

This is what you get when you think
"Well, it's just a small feature, I don't need a test. What could ever happen?"
Well, Firefox. Firefox happened. 😂

Thank you all for spotting the issue.
Can you test the new pre-release v1.13.1? Everything should be working.

Yep, 1.13.1 fixed it.


 IF YOU DO NOT FOLLOW THE FORMAT OR MAKE A GENERIC TOKEN REQUEST YOUR ISSUE WILL BE DELETED WITHOUT COMMENT
YOUR JUSTLIST MUST FOLLOW THE JSON SPECIFICATION
https://github.com/justswaporg/justlists/blob/main/example.justlists.ts
Checklist

[x] I understand that this is not the place to request a token listing.
[x] I have tested that my JustList is compatible by pasting the URL into the add a list UI at justswap.org.
[x] I understand that filing an issue or adding liquidity does not guarantee addition to the justlists website.

Please provide the following information for your token.
JustList URL must be HTTPS.
JustList URL:
JustList Name:
Link to the official homepage of the JustList manager:

Jndnf

Please submit the correct information, invalid information will cause the issue to close


Not working to set SMTP in fish shell

Hi,
Just wanted to try this out for some bulk emails and wanted to connect to gmail over smtp.
When I use SMTP_SERVER=smtp.gmail.com I get this error: fish: Unsupported use of '='. In fish, please use 'set SMTP_SERVER smtp.gmail.com'.
I then use that command, aka set SMTP_something something for server username and password but when I go to pigeon connect smtp I get this error
Error: Missing environment variable 'SMTP_SERVER'

Caused by:
    environment variable not found

My guess is that it is caused by me using fish for some reason.
And yes I did run set -a && source .env && set +a and yes the variables are set in the verbose output.

Tested with bash now and that works so the problem is when using fish.

Thanks, for your bug report. Could you try the following commands?

set -x SMTP_SERVER smtp.gmail.com instead of SMTP_SERVER=smtp.gmail.com in the .env file, and
source .env instead of set -a && source .env && set +a


Feature: Table Resizing

The current behaviour is: upon resizing the last column (dragging the right table border), it reflows the column widths preserving the width of the table to 100%, rather than actually shrinking the table to take less width overall. It would be great if it actually resized the table to take less space.

@ivailop7 thanks for reporting this issue! It seems like this behavior isn't native to lexical table resizing (table plugin). It could be easily customizable by providing a different theme via the initialConfig of the editor. Here's a quick fix for it #4775

I can't believe the fix was that simple! Thank you for fixing this!


Bug Fix: Caching Issue

There is a reported issue with caching in AWS and Surge. Ask @austintgriffith for details.

@austintgriffith ^^


Show available balance at NFTs for BUY

Thank you for your contribution to the KodaDot NFT gallery.
👇 _ Let's make a quick check before the contribution.
PR type

[ ] Bugfix
[ ] Feature
[x] Refactoring

What's new?

[x] PR closes #2282
[x] Added balance info and disabled buy button in case of insufficient balance.

Before submitting Pull Request, please make sure:

[x] My contribution builds clean without any errors or warnings
[x] I've merged recent default branch -- main and I've no conflicts
[x] I've tried to respect high code quality standards
[x] I've didn't break any original functionality
[ ] I've posted a screenshot of demonstrated change in this PR

Optional

[ ] I've tested it at </rmrk/collection/26902bc2f7c20c546a-1FVG7>
[ ] I've tested PR on mobile and everything seems works
[ ] I found edge cases
[ ] I've written some unit tests 🧪

Had issue bounty label?

[x] Fill up your KSM address: Payout

Community participation

[x] Are you at KodaDot Discord?

Screenshot

[ ] My fix has changed something on UI; a screenshot is best to understand changes for others.

IMO, in the futur, it would be better to have userBalance accessible throught Vuex store

IMO, in the futur, it would be better to have userBalance accessible throught Vuex store

yes, @chandradot99 let's do it within this issue, I'll raise bounty :)

@chandradot99 any eta to close on this? :)

@chandradot99 any eta to close on this? :)

yes @yangwao I will try to close it today.

I would move loadBalance outside navbar component, you could put it in store/identity.ts and try to fetch balance when we fetch identity or create a new action to fetchBalance. It still show my locked balance, maybe this & this from polkadot.js app could help

@roiLeo when the user is already logged in and if we reload the page, then we have to fetch the user balance and I think since we don't have any root component, so we have to make a call to fetch balance inside the navbar component, since this is the only component which renders on initial app load. I also tried to move the fetchBalance api call in store/identity.ts but for the first time api instance is undefined.

lala
Plugin is your friend
https://nuxtjs.org/docs/directory-structure/plugins/

since this is the only component which renders on initial app load.

Plugin is your friend

I also tried to move the fetchBalance api call in store/identity.ts but for the first time api instance is undefined.

Api is a singleton instance, I recommend to wait for 'connect' event
const { getInstance: Api } = Connector

Api().once('connect', api => console.log('api defined here'))

But yeah also you need to reflect the fact that logged user can be changed

Yes, I was also thinking to add it as a plugin.

@roiLeo @yangwao I have done the required changes.

@chandradot99 resolve conflicts and less push it :)

@yangwao all conflicts resolved and pushed.

Hello,
I wrote you a component which should be very easy to use for you

Hello, I wrote you a component which should be very easy to use for you

ok @vikiival

#2373 is merged tho! Let's close this one :D

Yes @yangwao working on the changes

nice seems working for me.

@vikiival

yes there is no need for both fetch and subscription, I just verified now only subscription will also work.
First I also thought to make it as constant in auth, but I think it will be good to create separate store, because in future we can have multiple subscriptions and it will be easy to maintain.

we can have multiple subscriptions

it's called subscribe mixin.
for now I would keep the implementation as simple as possible

we can have multiple subscriptions

it's called subscribe mixin. for now I would keep the implementation as simple as possible

@vikiival I have done the suggested changes.

@yangwao let's merge this PR if everything looks good.

@yangwao let's merge this PR if everything looks good.

I've merged main and let's wait for @vikiival review to merge it as noticed there was lots of changes so want to be sure :)

works, let's merge it 😇
pay 200 usd

😍 Perfect, I’ve sent the payout
💵 $200 @ 163.18 USD/KSM ~ 1.226 $KSM
🧗 CeBWgisygADqqxGk7ju8aMNEKz1K2WkxMKC3G8HsMnm119n
🔗 0xa60c8eda47807651d47079645ac2a23241e38ec6f5f434b229eebbcdd1fa4c10
🪅 Let’s grab another issue and get rewarded!
🪄 github.com/kodadot/nft-gallery/issues


Other host for image

Hi Lee :smile:
Is there a easy way to point all image source to a specified URL if we are hosting our own image? I thought about using updating grunt replace.js, but wasn't sure if that's the best way to go about it?
Any thoughts would be appreciated :)

Sure thing. Few ways you could do it.
One way would be to use the replace task and replace the source path with your URL.


Pairing thread devices failed

I attempted to pair a eve energy smart plug. The plug is currently paired with HomeKit, I copied the setup code from the Apple Home app, then attempted to pair with the Home Assistant iOS app. The pairing only fails with thread, WiFi devices work as expected.
python-matter-server 3.4.0
iOS 16.4.1(a)
Matter server logs:
2023-05-22 18:59:33 raspberrypi matter_server.server.helpers.paa_certificates[1] INFO Fetching the latest PAA root certificates from DCL.
2023-05-22 18:59:34 raspberrypi matter_server.server.helpers.paa_certificates[1] INFO Fetched 0 PAA root certificates from DCL.
2023-05-22 18:59:34 raspberrypi matter_server.server.helpers.paa_certificates[1] INFO Fetching the latest PAA root certificates from Git.
2023-05-22 18:59:34 raspberrypi matter_server.server.helpers.paa_certificates[1] INFO Fetched 0 PAA root certificates from Git.
/usr/local/lib/python3.10/asyncio/events.py:73: RuntimeWarning: coroutine 'StorageController.async_save' was never awaited
  self._args = None
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
2023-05-22 18:59:34 raspberrypi chip.CTL[1] INFO Setting attestation nonce to random value
2023-05-22 18:59:34 raspberrypi chip.CTL[1] INFO Setting CSR nonce to random value
2023-05-22 18:59:34 raspberrypi chip.CTL[1] INFO Starting commissioning discovery over BLE
2023-05-22 18:59:34 raspberrypi chip.CTL[1] INFO Starting commissioning discovery over DNS-SD
2023-05-22 18:59:34 raspberrypi chip.BLE[1] INFO BLE removing known devices.
2023-05-22 18:59:34 raspberrypi chip.BLE[1] INFO BLE initiating scan.
2023-05-22 18:59:34 raspberrypi chip.DL[1] ERROR Long dispatch time: 623 ms, for event type 2
2023-05-22 18:59:35 raspberrypi chip.CTL[1] INFO Discovered device to be commissioned over DNS-SD
2023-05-22 18:59:35 raspberrypi chip.CTL[1] INFO Attempting PASE connection to UDP:[replaced]:5540
2023-05-22 18:59:35 raspberrypi chip.EM[1] INFO <<< [E:36348i S:0 M:94836065] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:20 (SecureChannel:PBKDFParamRequest)
2023-05-22 18:59:35 raspberrypi chip.IN[1] INFO (U) Sending msg 94836065 to IP address 'UDP:[replaced]:5540'
2023-05-22 18:59:35 raspberrypi chip.CTL[1] INFO Commission called for node ID 0x0000000000000001
2023-05-22 18:59:36 raspberrypi chip.IN[1] INFO (U) Sending msg 94836065 to IP address 'UDP:[replaced]:5540'
2023-05-22 18:59:36 raspberrypi chip.CTL[1] INFO Discovered device to be commissioned over DNS-SD
2023-05-22 18:59:37 raspberrypi chip.IN[1] INFO (U) Sending msg 94836065 to IP address 'UDP:[replaced]:5540'
2023-05-22 18:59:38 raspberrypi chip.CTL[1] INFO Discovered device to be commissioned over DNS-SD
2023-05-22 18:59:38 raspberrypi chip.IN[1] INFO (U) Sending msg 94836065 to IP address 'UDP:[replaced]:5540'
2023-05-22 18:59:41 raspberrypi chip.IN[1] INFO (U) Sending msg 94836065 to IP address 'UDP:[replaced]:5540'
2023-05-22 18:59:42 raspberrypi chip.CTL[1] INFO Discovered device to be commissioned over DNS-SD
2023-05-22 18:59:44 raspberrypi chip.BLE[1] ERROR BLE scan error: src/platform/Linux/bluez/ChipDeviceScanner.cpp:154: CHIP Error 0x00000032: Timeout
2023-05-22 18:59:44 raspberrypi chip.BLE[1] INFO Scan complete. No matching device found.
2023-05-22 18:59:45 raspberrypi chip.EM[1] ERROR Failed to Send CHIP MessageCounter:94836065 on exchange 36348i sendCount: 4 max retries: 4
2023-05-22 18:59:48 raspberrypi chip.SC[1] ERROR PASESession timed out while waiting for a response from the peer. Expected message type was 33
2023-05-22 18:59:48 raspberrypi chip.CTL[1] INFO Ignoring SecurePairingFailed status for now; we have more discovered devices to try
2023-05-22 18:59:48 raspberrypi chip.CTL[1] INFO Attempting PASE connection to UDP:[replaced]:5540
2023-05-22 18:59:48 raspberrypi chip.EM[1] INFO <<< [E:36349i S:0 M:94836066] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:20 (SecureChannel:PBKDFParamRequest)
2023-05-22 18:59:48 raspberrypi chip.IN[1] INFO (U) Sending msg 94836066 to IP address 'UDP:[replaced]:5540'
2023-05-22 18:59:48 raspberrypi chip.CTL[1] INFO Commission called for node ID 0x0000000000000001
2023-05-22 18:59:48 raspberrypi chip.CTL[1] INFO Trying connection to commissionee over different transport
2023-05-22 18:59:49 raspberrypi chip.IN[1] INFO (U) Sending msg 94836066 to IP address 'UDP:[replaced]:5540'
2023-05-22 18:59:50 raspberrypi chip.IN[1] INFO (U) Sending msg 94836066 to IP address 'UDP:[replaced]:5540'
2023-05-22 18:59:52 raspberrypi chip.IN[1] INFO (U) Sending msg 94836066 to IP address 'UDP:[replaced]:5540'
2023-05-22 18:59:54 raspberrypi chip.IN[1] INFO (U) Sending msg 94836066 to IP address 'UDP:[replaced]:5540'
2023-05-22 18:59:58 raspberrypi chip.EM[1] ERROR Failed to Send CHIP MessageCounter:94836066 on exchange 36349i sendCount: 4 max retries: 4
2023-05-22 19:00:01 raspberrypi chip.SC[1] ERROR PASESession timed out while waiting for a response from the peer. Expected message type was 33
2023-05-22 19:00:01 raspberrypi chip.CTL[1] INFO Ignoring SecurePairingFailed status for now; we have more discovered devices to try
2023-05-22 19:00:01 raspberrypi chip.CTL[1] INFO Attempting PASE connection to UDP:[replaced]:5540
2023-05-22 19:00:01 raspberrypi chip.EM[1] INFO <<< [E:36350i S:0 M:94836067] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:20 (SecureChannel:PBKDFParamRequest)
2023-05-22 19:00:01 raspberrypi chip.IN[1] INFO (U) Sending msg 94836067 to IP address 'UDP:[replaced]:5540'
2023-05-22 19:00:01 raspberrypi chip.CTL[1] INFO Commission called for node ID 0x0000000000000001
2023-05-22 19:00:01 raspberrypi chip.CTL[1] INFO Trying connection to commissionee over different transport
2023-05-22 19:00:02 raspberrypi chip.IN[1] INFO (U) Sending msg 94836067 to IP address 'UDP:[replaced]:5540'
2023-05-22 19:00:03 raspberrypi chip.IN[1] INFO (U) Sending msg 94836067 to IP address 'UDP:[replaced]:5540'
2023-05-22 19:00:04 raspberrypi chip.CTL[1] ERROR Discovery timed out
2023-05-22 19:00:04 raspberrypi chip.BLE[1] ERROR BleConnectionDelegate::CancelConnection is not implemented.
2023-05-22 19:00:04 raspberrypi chip.-[1] ERROR src/platform/Linux/BLEManagerImpl.cpp:732: CHIP Error 0x0000002D: Not Implemented at src/controller/SetUpCodePairer.cpp:551
2023-05-22 19:00:05 raspberrypi chip.IN[1] INFO (U) Sending msg 94836067 to IP address 'UDP:[replaced]:5540'
2023-05-22 19:00:08 raspberrypi chip.IN[1] INFO (U) Sending msg 94836067 to IP address 'UDP:[replaced]:5540'
2023-05-22 19:00:12 raspberrypi chip.EM[1] ERROR Failed to Send CHIP MessageCounter:94836067 on exchange 36350i sendCount: 4 max retries: 4
2023-05-22 19:00:14 raspberrypi chip.SC[1] ERROR PASESession timed out while waiting for a response from the peer. Expected message type was 33
2023-05-22 19:00:14 raspberrypi chip.CTL[1] INFO Ignoring SecurePairingFailed status for now; we have more discovered devices to try
2023-05-22 19:00:14 raspberrypi chip.CTL[1] INFO Attempting PASE connection to UDP:[replaced]:5540
2023-05-22 19:00:14 raspberrypi chip.EM[1] INFO <<< [E:36351i S:0 M:94836068] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:20 (SecureChannel:PBKDFParamRequest)
2023-05-22 19:00:14 raspberrypi chip.IN[1] INFO (U) Sending msg 94836068 to IP address 'UDP:[replaced]:5540'
2023-05-22 19:00:15 raspberrypi chip.CTL[1] INFO Commission called for node ID 0x0000000000000001
2023-05-22 19:00:15 raspberrypi chip.CTL[1] INFO Trying connection to commissionee over different transport
2023-05-22 19:00:16 raspberrypi chip.IN[1] INFO (U) Sending msg 94836068 to IP address 'UDP:[replaced]:5540'
2023-05-22 19:00:17 raspberrypi chip.IN[1] INFO (U) Sending msg 94836068 to IP address 'UDP:[replaced]:5540'
2023-05-22 19:00:18 raspberrypi chip.IN[1] INFO (U) Sending msg 94836068 to IP address 'UDP:[replaced]:5540'
2023-05-22 19:00:21 raspberrypi chip.IN[1] INFO (U) Sending msg 94836068 to IP address 'UDP:[replaced]:5540'
2023-05-22 19:00:25 raspberrypi chip.EM[1] ERROR Failed to Send CHIP MessageCounter:94836068 on exchange 36351i sendCount: 4 max retries: 4
2023-05-22 19:00:28 raspberrypi chip.SC[1] ERROR PASESession timed out while waiting for a response from the peer. Expected message type was 33
2023-05-22 19:00:28 raspberrypi chip.ZCL[1] ERROR Secure Pairing Failed
2023-05-22 19:00:28 raspberrypi matter_server.server.client_handler[1] ERROR [548225869344] Error handling message: CommandMessage(message_id='cf6ba4b65f3e41d686a3a4a30a51cd55', command='commission_with_code', args={'code': 'replaced'})
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/matter_server/server/client_handler.py", line 188, in _run_handler
    result = await result
  File "/usr/local/lib/python3.10/site-packages/matter_server/server/device_controller.py", line 154, in commission_with_code
    raise NodeCommissionFailed(
matter_server.common.errors.NodeCommissionFailed: Commission with code failed for node 1

is everything under the same VLAN? and have you tried pinging the device's ip from within HA?

It's all under the same VLAN. Ping from HA/raspberry doesn't work. But if i ping from my MacBook in the same network i will reach the device.

do you have a ipv6 enabled on your network and if you do how are you acquiring an ipv6 address on HA?

Is your HAOS running virtualized perhaps ? In that case somebody reported that enabling promiscuous might fix it. If ping(6) is not working, communicating with the matter devices will not work.

Is your HAOS running virtualized perhaps ? In that case somebody reported that enabling promiscuous might fix it. If ping(6) is not working, communicating with the matter devices will not work.

Yes it's running in docker. Does i need something like "ip link set eth0 promisc on" or docker MACVLAN?

Running the matter server yourself (so without HAOS) is officially not supported but yeah you could give that a try, as well as making sure you have latest kernel patches etc. for the routing issues in the network manager.

Thanks for the tip! I got it working. Apparently raspbian does not create the ipv6 route correctly.
sudo ip route add *1::/64 via *2 dev eth0
Replace:
*1: thread ipv6 network address (see matter-server log)
*2: unique local address from border router

I'm having the same problem and was able to resolve by adding a route to the border router - however this solution seems fragile, what happens when the network topology changes? How are these routes normally configured automatically? Is there some component missing?

I found an even better solution.
Check if "accept router advertisements" is on (1 or 2 in case IP forwarding is enabled):
sysctl -n net.ipv6.conf.eth0.accept_ra
If not, append below commands to /etc/sysctl.conf
net.ipv6.conf.eth0.accept_ra=1
net.ipv6.conf.eth0.accept_ra_rt_info_max_plen = 64

And add noipv6 to /etc/dhcpcd.conf
Note: Remember to replace eth0 with your specific Wi-Fi/Ethernet interface.
@marcelveldt
Can you please add this requirement to the documentation?

@Leonater nice find! Thanks for finding this all out, I think this will be appreciated by other users that want to run the docker image theirselves.

I think I found a different way to get it working - I tried updating the sysctl config, but it wasn't working for me. I updated the systemd-networkd config with a file in /etc/systemd/network/01-accept-ra.network
[Match]
Name=eth*

[Network]
DHCP=yes
IPv6AcceptRA=true

then systemctl enable systemd-networkd
I made various other changes while debugging this, so I guess to validate I would have to start over from scratch and see if it works on a clean OS install.
My route table now has routes to what I assume are all my thread border routers for the thread network subnet.

yeah, that basically does the same as the previous one, most distros have it enabled by default as long as you have ipv6 enabled.
@marcelveldt we should probably add something to the readme saying something along the lines that RA should be enabled on the matter interface

I found an even better solution. Check if "accept router advertisements" is on (1 or 2 in case IP forwarding is enabled): sysctl -n net.ipv6.conf.eth0.accept_ra
If not, append below commands to /etc/sysctl.conf
net.ipv6.conf.eth0.accept_ra=1
net.ipv6.conf.eth0.accept_ra_rt_info_max_plen = 64

And add noipv6 to /etc/dhcpcd.conf
Note: Remember to replace eth0 with your specific Wi-Fi/Ethernet interface.
@marcelveldt Can you please add this requirement to the documentation?

I have been pulling my hair out for over 3 days trying to get matter over thread working with a Nanoleaf Essentials downlight. I have researched and tried everything I can. Came across this GitHub topic.
My environment is a QNAP, HA container and Python-Matter-Server container - both on network "host". I used both Container Station and Portainer, hoping the latter provided me more options. To the best of my knowledge, ipv6 is working (ie. I can see an FE80 address in HA Settings/System/Network/Network Adapter).
The only setting I don't have is --security-opt apparmor=unconfined because I don't know how to do this within the Portainer GUI. I also don't have the D-Bus parameter as it appears for Bluetooth commissioning and I don't think I would require this.
I have an Echo 4th Gen thread network and a Samsung Smartthings thread network (via a Q990C). I can connect to both via their respective apps, the Nanoleaf tends to prefer the Echo and also connects to the device whilst on the thread network, so everything works - except for Home Assistant being able to connect to the downlight.

Trying the suggestions in this post, I can't find /etc/sysctl.conf exists.
However, a sysctl -n net.ipv6.conf.eth1.accept_ra returns 1, so I assume the configuration file is "somewhere".
Trying sysctl -n net.ipv6.conf.eth0.accept_ra_rt_info_max_plen returns "unknown key".
I don't have /etc/dhcpcd.conf either.
In short, I have no idea where to insert these settings.

I don't know if there's a better error log, but the only errors I have been working off is:

If anyone can help how I can try these settings on a QNAP environment, would be appreciated!


Add link to git-extra-commands collection

The git-extra-commands collection adds a lot of useful git commands, if I say so myself.

@k4m4 I fixed the merge conflict.


root: 6.28.08 -> 6.28.10

Description of changes
Security update for webgui
https://root.cern/releases/release-62810/
we would be affected after #272723

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

@GrahamcOfBorg eval

@ofborg build root


[red-knot] Fallback to attributes on types.ModuleType if a symbol can't be found in locals or globals

Summary
This PR is stacked on top of #13908; review that first.
All modules in Python are instances of types.ModuleType. Various attributes on types.ModuleType in typeshed represent "implicit globals" that are part of the namespace of every module in Python, even if not explicitly defined. As such, before declaring that a symbol is unbound (and in fact, before looking the symbol up in the builtins scope) we should look the symbol up as an attribute on types.ModuleType. The only attributes on types.ModuleType that are not present as implicit globals are __dict__, __getattr__ and __init__.
Test Plan
Markdown test added as crates/red_knot_python_semantic/resources/mdtest/scopes/moduletype_attrs.md. We also get to remove a false-positive error from the tomllib benchmark 🎉

Okay, I've switched from the hardcoded allowlist to a Salsa-cached generated allowlist! Locally I'm consistently seeing a regression of 1-2% on the incremental benchmark, but Codspeed reports the benchmarks are neutral on this PR, so maybe it's just noise.
In order to obtain a list of symbols that typeshed declares in the body of types.ModuleType, I had to add a new SymbolsFlag member, IS_DECLARED. We had ways of querying whether symbols in a SymbolTable had been defined in that scope, but no way of querying whether symbols in a SymbolTable had been declared in that scope -- and for a stub file, the latter is what's important.
I've also fixed several edge cases regarding accessing members as attributes on imported modules. In some cases, whether a module "defines" a member can vary depending on whether you access the member as a global variable from inside the module or as an attribute on the module object after it's been imported elsewhere.
TL;DR: ready for re-review!

It seems unfortunate to me that we now have to track DECLARED for all symbols just for this one use case.

I would wager that this information will come in useful in other contexts in the future (though I can't right now say what -- it's just an intuition I have).
However, one alternative way of tackling this would be to write a Python script that inspects the AST of the typeshed stub for types.ModuleType and generates a Rust file that contains a function that returns true if a given symbol is declared in the body of types.ModuleType. (This would be similar to the approach we take in https://github.com/astral-sh/ruff/blob/main/scripts/generate_known_standard_library.py.) We could run the script as part of every typeshed sync, to make sure that the generated function is always up to date with the typeshed stubs.
This would be a more complicated than the current solution. But it would have the following advantages:

We could probably use the typeshed_client library in the Python script, which means that the script itself probably wouldn't be that complicated
The generated Rust function would likely be more performant than the current solution that uses a Salsa query, because we wouldn't have to look anything up in the cache: the specific symbols that are declared on types.ModuleType would just be hardcoded into the generated Rust function.
We wouldn't have to track DECLARED for all symbols just for this one use case

I'm not sure whether this would be better or worse on net than the solution I currently have in this PR -- but it's an alternative to consider, anyway!

I would wager that this information will come in useful in other contexts in the future (though I can't right now say what -- it's just an intuition I have).

Yeah. I'm not a fan of it but I don't consider it blocking. I guess an alternative to this would be to look at the class type and iterate over its members. I don't think we support it today, but I suspect that's a capability we want long-term.


The error sending comments to Superhero UI via Android app

I tested Android App and found that the first comment on the superhero UI was signed via the app, the second via the web wallet. This is strange since I checked the box - remember my choice (choose the application) when I sent the first comment.
Both comments in the picture were sent by me, one via the application, the second via the web wallet:

Superhero 366bffd/v.0.4.2

Current version of wallet doesn't have such problems. Feel free to reopen this issue, if it will pop up again.


/mv info command doesn't show animals that spawn value properly

Title, /mvi 4 will always show none, it's related to monsters.

Closing, this was properly fixed in https://github.com/Multiverse/Multiverse-Core/commit/b9330275233b0ed6ae2a72cb001bb1f291ea626c


table creation script is broken

I tried running the table creation script and it fails, complaining about the api version.
I tried some of the recommended api versions but none of them worked (I didn't try every one and it wasn't clear which ones I should try per region).
Please fix the script and let us know know when it's working.
Thanks!

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

ID: fad5ecda-20b1-597c-81c8-f1347901b4fe
Version Independent ID: 707a9ca0-6800-0fd4-2a0b-c1aa28db622d
Content: Collect logs from a text or JSON file with Azure Monitor Agent - Azure Monitor
Content Source: articles/azure-monitor/agents/data-collection-text-log.md
Service: azure-monitor
Sub-service: agents
GitHub Login: @guywi-ms
Microsoft Alias: guywild

@bobsyourmom
Thanks for your feedback! We will investigate and update as appropriate.

@JeffreyWolford please advise.


stager/api: Add support for returning the exit code on run calls

This updates the container stager to properly return the exit code from
the process it was executing. Previously, the caller was always getting
a zero exit code rather than the actual one.
This also adds support for returning the exit code on container enter
requests over the API/CLI. This way, the CLI will exit with the same
code as the process it was running in the container.
An integration test has been added to test the exit code handling
propagating.
@alextoombs @wallyqs @jpoler

LGTM


manual test card_collection.dart fails

Scrolling doesn't stop at the end of the list.  It appears to be a problem with LazyBlock.
This may be the same bug as #3593

Fixed by #3594


Split /scale command to /scalex /scaley?

Maybe it would make sense to have /scale split into /scalex and /scaley (or /scale/x or /scaleX).  Then we could remap /scale with a def:
def /scale s
    /scalex $s
    /scaley $s

I was going to do it, but I didn't want to screw up the cool tweening option.  What do you think?

What's the main reason? If it's to allow uniform scaling with a single number, why not have the existing /scale with one argument mean "same for X and Y"? Otherwise, how useful is it to set just x or y (without specifying the other)?
(Actually, I was going to do this, but of course the problem is then if you have two arguments, we don't know whether it's uniform scale + duration, or scale X + scale Y...)

That's exacly what I was thinking.  Uniform scaling with just one number is what I tend to go for when typing,  and chances are that we'll be scaling uniformly more often than scaling x or y independently.  But it's a feature I think it has to have.  How about having /scale for uniform scaling with one argument + dur, and /scalex//scaley for independent scaling?

Yes to uniform scaling for /scale, and maybe /scale/xy? For both components?

ok.  I don't see the advantages over /scale/x /scale/y except it's just  one method instead of two :), but no big deal.  Go for it.

After discussion, we agreed on:
/scale actor scale [dur]

Where scale can be a float (uniform x/y scaling) or a comma-separated string "0.5,2" for separate x/y scaling.

Resolved by:
Change /scale to only take two arguments; /create at centre of view 43f3e43


Move schema definitions into subdirectory

:notebook_with_decorative_cover: Description
The schema definitions now live in the schema/types/ subdirectory.
I verified that no changes to the installation process are necessary in our CMake.
:memo: Checklist

[x] All user-facing changes have changelog entries.
[x] The changes are reflected on docs.tenzir.com/vast, if necessary.
[x] The PR description contains instructions for the reviewer, if necessary.

:dart: Review Instructions
n/t

This is also ready for review again.


Re-Use Connections When Publishing to the Aggregator

This should reduce the overhead per request.

The "Everything curl" docs on connection reuse:
https://everything.curl.dev/libcurl/connectionreuse

https://curl.se/libcurl/c/threadsafe.html

You must never share the same handle in multiple threads. You can pass the handles around among threads, but you must never use a single handle from more than one thread at any given time.

On the MacOS platform (apple-clang-15), we see two different ASAN errors:
container-overflow (related to Poco admin server, maybe false positive).
stack-use-after-scope (related to thread_local in CurlHandle).
On the Ubuntu Jammy platform:
g++-11 compiler does not report any ASAN errors.
clang-14 compiler reports stack-use-after-scope (related to thread_local in CurlHandle).
clang-14 compiler DOES NOT report a container-overflow error in the AdminServer tests.


Wrong Naming for Dimension Id in rftoolsdim-1.12-5.04 ?

I'm running the FTB Unstable Pack on a dedicated server. Dimension are created, dialer works, analyzer shows green light, but actually teleporting to a dimension crashes the server with following logs:
Crashlog: https://pastebin.com/RfahpYcb
Minecraft Log; https://pastebin.com/EhRNxYz1
Tells me that I'm trying to teleport to a non-existing DIM. Which is true as DIM4 does not exist, RFtools created a folder named "RFTOOLS4" to store the dimension data in. Maybe I'm not understanding something here, but it seems RFtools is creating the dimension data in a wrong folder, because even using the /rftdim safedel 4 command, answers me that the dimension got deleted, the player lost in that dimension gets relocated to Worldspawn, but the folder "RFTOOLS4" does not get deleted. And yes, I've enabled the option to delete dimension data with the /rtfdim safedel command.
I created several random dimensions using the digit dims to alter the Id, the problem persists...whatever the Id is.

Does this happen with every dimension or just with dimension 4? The folder name is right. That's how it is supposed to be

Like I said....I created several random dimensions using the digit dimlet to alter the dimension id....happens always, so far id3 to id9 tested...
Update: Using the /rfdim safedel command sometimes does delete the corresponding dimension folder and its data, the crash trying to enter the dimension still occurs everytime though...I'll try some higher ids now.

Can You try updating to latest and see if the problem remains?

I'll brake the pack for my users that way, but I'll do a quick test right away...

Updated rftools and rfdim to latest available on curseforge, ctrl was still on same version.
Still server crash on trying to reach the dimension:
Crashlog

Yes that dimension is probably broken  the question is if new dimensions are ok


Print Hive installer logs if failure occurs during e2e

Which issue this PR addresses:

Fixes
What this PR does / why we need it:

Test plan for issue:

Is there any documentation that needs to be updated for this PR?


Different results from max pooling layer when using theano and tensorflow

I'm working with the SSD model (https://github.com/rykov8/ssd_keras) and it works fine in tensorflow. I've converted all the tensorflow parts to theano, including the conv kernels (as described here: https://github.com/fchollet/keras/wiki/Converting-convolution-kernels-from-Theano-to-TensorFlow-and-vice-versa) and the model works almost perfectly.
However, I've run into an issue where the output from the max pooling layer when running tensorflow is different from the output in theano. It is a very small difference, but it moves the bounding boxes slightly.
For example, the outputs from conv1_1 and conv1_2 are identical, but the outputs from pool1 in tensorflow give (just a small sample of the output):
 [  7.90634384e+01   0.00000000e+00   0.00000000e+00 ...,
      7.58856506e+01   2.82682953e+02   4.01717926e+02]
   [  9.10728989e+01   0.00000000e+00   0.00000000e+00 ...,
      8.20418091e+01   3.42485565e+02   3.65100067e+02]
   [  1.60205139e+02   0.00000000e+00   0.00000000e+00 ...,
      7.80331039e+01   4.03439850e+02   3.21558014e+02]

while the outputs in theano give
[  6.89849014e+01   1.28302107e+01   0.00000000e+00 ...,
      7.81133041e+01   3.79435974e+02   4.01718109e+02]
   [  8.10280304e+01   2.65449944e+01   0.00000000e+00 ...,
      7.58856430e+01   3.21112823e+02   3.87413025e+02]
   [  2.77083099e+02   0.00000000e+00   0.00000000e+00 ...,
      8.20418396e+01   3.40778381e+02   3.30199341e+02]

Is there some difference in the way keras, theano or tensorflow handle 2D max pooling? I would expect the results to be identical, but they are not.
Here is the model I'm using to test this:
from keras.layers import Activation
from keras.layers import Convolution2D
from keras.layers import Input
from keras.layers import MaxPooling2D
from keras.models import Model

def TestModel(input_shape, num_classes=21):
    net = {}
    # Block 1
    input_tensor = input_tensor = Input(shape=input_shape)
    img_size = (input_shape[1], input_shape[0])
    net['input'] = input_tensor
    net['conv1_1'] = Convolution2D(64, 3, 3,
                                   activation='relu',
                                   border_mode='same',
                                   name='conv1_1')(net['input'])
    net['conv1_2'] = Convolution2D(64, 3, 3,
                                   activation='relu',
                                   border_mode='same',
                                   name='conv1_2')(net['conv1_1'])
    net['pool1'] = MaxPooling2D((2, 2), strides=(2, 2), border_mode='same',
                                name='pool1')(net['conv1_2'])

The weights I downloaded from here.

I found the problem, I changed the lines 1749-1750 in the theano_backend file from
    if border_mode == 'same':
        expected_width = (x.shape[2] + strides[0] - 1) // strides[0]
        expected_height = (x.shape[3] + strides[1] - 1) // strides[1]

        pool_out = pool_out[:, :,
                            : expected_width,
                            : expected_height]

to:
    if border_mode == 'same':
        expected_width = (x.shape[2] + strides[0] - 1) // strides[0]
        expected_height = (x.shape[3] + strides[1] - 1) // strides[1]
        height = pooled_out.shape[3]
        width = pooled_out.shape[2]

        pool_out = pool_out[:, :,
                            width - expected_width :,
                            height - expected_height :]

I'm not sure why that works, and it would probably break many existing models, but it seems like pool2d with 'SAME' padding in tensorflow implements it this way.

Thanks, that's good to know.
On 19 January 2017 at 14:19, AJ Piergiovanni<EMAIL_ADDRESS>wrote:

I found the problem, I changed the lines 1749-1750
https://github.com/fchollet/keras/blob/master/keras/backend/theano_backend.py#L1749-L1755
in the theano_backend file from
if border_mode == 'same':
    expected_width = (x.shape[2] + strides[0] - 1) // strides[0]
    expected_height = (x.shape[3] + strides[1] - 1) // strides[1]

    pool_out = pool_out[:, :,
                        : expected_width,
                        : expected_height]

to:
if border_mode == 'same':
    expected_width = (x.shape[2] + strides[0] - 1) // strides[0]
    expected_height = (x.shape[3] + strides[1] - 1) // strides[1]
    height = pooled_out.shape[3]
    width = pooled_out.shape[2]

    pool_out = pool_out[:, :,
                        width - expected_width :,
                        height - expected_height :]

I'm not sure why that works, and it would probably break many existing
models, but it seems like pool2d with 'SAME' padding in tensorflow
implements it this way.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/fchollet/keras/issues/5090#issuecomment-273916880,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AArWb69CELyxjs0jG8-NvPa0LgpcvheMks5rT-FugaJpZM4LoeRB
.

Would this seem reasonable to fix, @fchollet? (Not rushing to make a PR as I don't really use theano anymore but this confused the heck out of me when running a short test on a theano-based machine.)
Simple way to reproduce - the script http://paste.debian.net/914226/ returns the matrix shown in the script with theano, rather than the correct matrix:
[[ 17.  18.  19.  20.  21.  21.  21.]
 [ 24.  25.  26.  27.  28.  28.  28.]
 [ 31.  32.  33.  34.  35.  35.  35.]
 [ 38.  39.  40.  41.  42.  42.  42.]
 [ 45.  46.  47.  48.  49.  49.  49.]
 [ 45.  46.  47.  48.  49.  49.  49.]
 [ 45.  46.  47.  48.  49.  49.  49.]]

I don't actually understand the magic w_pad calculation in the code referenced in previous comment, why isn't it just w_pad = pool_size[0] // 2 ?  If I ZeroPadding2D manually like that and use border_mode='valid', I get the correct matrix with both backends.
So that's the workaround right now.  But esp. for people doing pyramid pooling and other scenarios with huge pool sizes, pooling is broken for them with theano without them probably even aware of it.

I don't know if it should be changed, as it may break existing trained theano models that learned using this (possibly) incorrect pooling, which is why I didn't submit a pull request, but simply left the solution here for others who encounter this problem.
I've also used the ZeroPadding and 'valid' border mode with both back ends sucessfully, but the SSD model I was converting used 'same' border mode, with led to this error.
The reason it isn't simply pool_size // 2 is because this allows strided pooling. So if the stride is 1, there is no reduction in size, or larger strides lead to more reduction in size. That equation follows the same as the convolution output sizing. The difference I found is that the current theano removes excess numbers from the bottom right of the "image" while tensorflow removes from the top left. Not sure why without looking into the implementations, but this fixed it.

I further tested this today, converting a caffe model to theano directly. Interestingly, the way caffe pooling with the same/half border mode works is
        expected_width = (x.shape[2] + strides[0] - 1) // strides[0]
        expected_height = (x.shape[3] + strides[1] - 1) // strides[1]

        pool_out = pool_out[:, :,
                            : expected_width,
                            : expected_height]

which is opposite of tensorflow pooling. I don't know the best way to handle this, as theano, tensorflow and caffe all seem to have slightly different ways to do pooling.

Just in case this is useful to anybody, the behaviour of a TF MaxPooling2D with 'SAME' padding can be achieved using a theano backend:

Place a ZeroPadding layer with the necessary padding (probably something like padding=((0, 1), (0, 1)) ) before the MaxPooling2D layer.
Set the MaxPooling2D layer padding to 'VALID'.


rule: no-require-esmodule?

Report CommonJS require, but only for modules.
Could be a mode of no-commonjs.
Given:
// ./foo.js
export const foo = "bar"

// ./x.js
module.exports  = { x: "y" }

then:
const foo = require('./foo') // this should be reported
    , x = require('./x') // this should not

What should happen if ./foo.js

has both export and module.exports/exports?
has no export at all?

I think both would be reported, and neither would not.
No exports case is arguably covered by no-commonjs already.
This certainly hearkens back to the ongoing discussion in Node core about how to determine if a file should be a module. 😅

This could still be useful to push developers to import ES Modules correctly as they become available and make future migrations to no-commonjs seem less daunting (because all ES Modules will already be imported via import)


Update readme, package name, version and meta files

I think we don't need .idea files insite node_modules
So, we need to add .idea to the .npmignore file


angular-style in coffeescript?

Since CoffeeScript doesn't support function declaration  (https://github.com/jashkenas/coffeescript/issues/1640)
how to implement some patterns use function declaration in angular-styleguide?

@kcliu I'd suggest looking into using ng-classify
It does not adhere to these guidelines perfectly, but the base principle is to keep the code tidy and readable, which I most definitely think is achieved. The big drawback is perhaps using anonymous functions in callbacks, but as you say it simply does not support it.

when using TS or CS or anything beyond ES5 the syntax and styles may change. At that point you need to adjust. Perhaps you can develop your own offshoot.

@jimlei @johnpapa thanks for the reply


Make sure EFS is being used for file storage

#67 seems to indicate that the EFS is not properly used. We would expect the file system to increase in size as needed so we should not run into problems due to insufficient storage space.

 Either we could symlink /var/lib/docker/overlay2 (where images are stored) to somewhere on the EFS, or just keep the larger root block device on the Container Service server?

Yeah, putting the images on EFS might be more future proof, if at some point we would ever need even more space.


fix distinct without alias bug

What problem does this PR solve?
close https://github.com/pingcap/tispark/issues/1039
What is changed and how it works?
Check List
Tests

Integration test

/run-all-tests tikv=v3.0.2 tidb=v3.0.2 pd=v3.0.2 mode=full