Erroneous Miri Undefined Behavior Error in Piecemeal Struct Drop?

Hi everybody,
I am trying to write a custom smart pointer, and I need to call the destructor of a type (T) before the rest of the struct (S) in which it is. However, that struct (S) is accessed by a NonNull pointer only.. The type T and the type O, the type which is calling the destructor of T, both have this NonNull.
Specifically, the destructor of T looks at the data in S. However, this should not raise an error in Miri because NonNull<S< is not dropped or deallocated yet - only the destructor of a member of S (T) has been called.
I have attached a minimum reproducable code - as well as the full Miri traceback.
Is this a problem with Miri or my code? Thanks!
Code:
use std::{ptr::NonNull, mem::{ManuallyDrop, MaybeUninit}};

struct Wrapper<T> {
    x: String,
    v: T,
}

struct Outer {
    i: NonNull<Wrapper<Inner>>,
}

struct Inner {
    i: NonNull<Wrapper<Inner>>,
}

impl Drop for Inner {
    fn drop(&mut self) {
        println!("{}", unsafe { self.i.as_ref() }.x);
    }
}

fn main() {
    let wrapper_uninit = NonNull::from(Box::leak(Box::from(Wrapper {
        x: String::from("HELLO"),
        v: MaybeUninit::<Inner>::uninit()
    })));
    let wrapper_ptr = wrapper_uninit.cast::<Wrapper<Inner>>();

    let inner = Inner {
        i: wrapper_ptr
    };

    let ptr = wrapper_ptr.as_ptr();
    unsafe { std::ptr::write(std::ptr::addr_of_mut!((*ptr).v), inner) };

    let mut data = NonNull::from(Box::leak(Box::from(Outer {
        i: wrapper_ptr
    })));

    unsafe { std::ptr::drop_in_place(&mut data.as_mut().i.as_mut().v as *mut _) };
    unsafe { std::ptr::drop_in_place(&mut data.as_mut().i.as_mut().x as *mut _) };

    unsafe { Box::from_raw(data.as_ref().i.as_ptr().cast::<ManuallyDrop<Outer>>()) };
    unsafe { Box::from_raw(data.as_ptr().cast::<ManuallyDrop<Outer>>()) };
}

Miri traceback:
Preparing a sysroot for Miri (target: x86_64-unknown-linux-gnu)... done
    Finished dev [unoptimized + debuginfo] target(s) in 0.00s
     Running `/home/ericbuehler/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo-miri runner target/miri/x86_64-unknown-linux-gnu/debug/miri_err`
error: Undefined Behavior: not granting access to tag <2840> because that would remove [Unique for <3026>] which is strongly protected because it is an argument of call 810
   --> /home/ericbuehler/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:376:18
    |
376 |         unsafe { &*self.as_ptr() }
    |                  ^^^^^^^^^^^^^^^ not granting access to tag <2840> because that would remove [Unique for <3026>] which is strongly protected because it is an argument of call 810
    |
    = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental
    = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information
help: <2840> was created by a SharedReadWrite retag at offsets [0x0..0x20]
   --> src/main.rs:23:26
    |
23  |       let wrapper_uninit = NonNull::from(Box::leak(Box::from(Wrapper {
    |  __________________________^
24  | |         x: String::from("HELLO"),
25  | |         v: MaybeUninit::<Inner>::uninit()
26  | |     })));
    | |________^
help: <3026> is this argument
   --> src/main.rs:40:14
    |
40  |     unsafe { std::ptr::drop_in_place(&mut data.as_mut().i.as_mut().v as *mut _) };
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: BACKTRACE (of the first span):
    = note: inside `std::ptr::NonNull::<Wrapper<Inner>>::as_ref::<'_>` at /home/ericbuehler/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:376:18: 376:33
note: inside `<Inner as std::ops::Drop>::drop`
   --> src/main.rs:18:33
    |
18  |         println!("{}", unsafe { self.i.as_ref() }.x);
    |                                 ^^^^^^^^^^^^^^^
    = note: inside `std::ptr::drop_in_place::<Inner> - shim(Some(Inner))` at /home/ericbuehler/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:497:1: 497:56
note: inside `main`
   --> src/main.rs:40:14
    |
40  |     unsafe { std::ptr::drop_in_place(&mut data.as_mut().i.as_mut().v as *mut _) };
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to previous error

To install and use Miri:
rustup +nightly component add miri
cargo +nightly miri run

Try looking at previous closed issues with similar messages. I believe others have asked this question before.
You can also try using tree borrows to see if the diagnostic is better there

Inside drop, self is an &mut reference, which is a unique reference, so you must not have any other pointers that point to the same memory. However, self.i.as_ref() returns a reference that aliases with self, making the code UB as it violates the aliasing requirements of mutable references.

Thanks! That makes sense. I tried using addr_of!:
let ptr = unsafe {&*(addr_of!(self.i) as *const Wrapper<Inner>) };
println!("{}", &ptr.x);

But it gave the same error. How should I avoid going through a reference?

This is the new traceback:
error: Undefined Behavior: dereferencing pointer failed: alloc1434 has size 32, so pointer to 32 bytes starting at offset 24 is out-of-bounds
  --> src/main.rs:18:27
   |
18 |         let ptr = unsafe {&*(addr_of!(self.i) as *const Wrapper<Inner>) };
   |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: alloc1434 has size 32, so pointer to 32 bytes starting at offset 24 is out-of-bounds
   |
   = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
   = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
   = note: BACKTRACE:
   = note: inside `<Inner as std::ops::Drop>::drop` at src/main.rs:18:27: 18:72
   = note: inside `std::ptr::drop_in_place::<Inner> - shim(Some(Inner))` at /home/ericbuehler/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:497:1: 497:56
note: inside `main`
  --> src/main.rs:41:14
   |
41 |     unsafe { std::ptr::drop_in_place(&mut data.as_mut().i.as_mut().v as *mut _) };
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to previous error

It gave a different error:

Undefined Behavior: dereferencing pointer failed: alloc1434 has size 32, so pointer to 32 bytes starting at offset 24 is out-of-bounds

This is guaranteed UB, not a miri bug (only stacked or tree borrows are unclear because we don't have a memory model yet).
Closing as it's now a different issue, and not a miri issue anymore

drop takes &mut self. You cannot avoid that reference.
If you are trying to build a self-referential data structure, that's severely limited in Rust right now. Here is a proposal that would help, but it's in a very early state.

Yes, in this case my problem is related to self-referential data. How can I tell Miri to ignore this part of thr code?
Sent from my Verizon, Samsung Galaxy smartphone
Get Outlook for Androidhttps://aka.ms/AAb9ysg

From: Ralf Jung @.>
Sent: Tuesday, July 4, 2023 2:23:39 PM
To: rust-lang/miri @.>
Cc: Eric Buehler @.>; Author @.>
Subject: Re: [rust-lang/miri] Erroneous Miri Undefined Behavior Error in Piecemeal Struct Drop? (Issue #2965)
drop takes &mut self. You cannot avoid that reference.
If you are trying to build a self-referential data structure, that's severely limited in Rust right now. Herehttps://rust-lang.zulipchat.com/#narrow/stream/136281-t-opsem/topic/UnsafeCellMut is a proposal that would help, but it's in a very early state.
—
Reply to this email directly, view it on GitHubhttps://github.com/rust-lang/miri/issues/2965#issuecomment-1620604201, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APRFUW6OZKVCUHC2JUEOHALXORNSXANCNFSM6AAAAAAZ6AC6KQ.
You are receiving this because you authored the thread.Message ID: @.***>

You don't tell miri to ignore part of the code, you write code that isnt UB. Why are you advertising in a github comment, do you have a virus?

Why are you advertising in a github comment, do you have a virus?

OP replied by email. Their mail client likely added a signature.

You cannot. Your code is doing something that is not easy to support in Rust.
Essentially (as Ralf said), you should not be accessing any of the self references in a Drop impl. All of them have become invalid, the only legal reference you can use is the &mut self one


P12 [Q4] Set up and apply moderator Formula to assess how many moderators are required for 95% accuracy based on different factors including # of views

Backlogged as discussed here https://docs.google.com/document/d/1jNw0qFMLzi_3xKLmKZDEINxY8omzXF5VedcXCeHh7aQ/edit


Add Tuple.map

Type

[ ] Refactor
[x] Feature
[ ] Bug Fix
[ ] Optimization
[ ] Documentation Update

Description
Tuple.map transforms each element of tuple using the given function, treating tuple homomorphically
import { pipe, Tuple } from "effect"

const result = pipe(
  //  ^? [string, string, string]
  ["a", 1, false] as const,
  T.map((el) => {
    //   ^? "a" | 1 | false
    return el.toString().toUppercase()
  })
)
assert.deepStrictEqual(result, ["A", "1", "FALSE"])

Related

Related Issue #
Closes #

@mikearnaldi what you think about it?


Create Imgur link

A suggestion from Facebook comments: how about uploading boxes to Imgur and providing links rather than making people download them?

This was done in v0.7.


Add installation commands to top of every example file

At the top of every example file, add the commands to:

Add the PredictMDRegistry registry
Install PredictMD.jl

Put them inside try...catch blocks.

wontfix


Input normalization overview

Thank you for developing this comprehensive toolbox of face detection and recognition models.
I am looking for an overview which model was trained with what kind of input preprocessing, so that I can apply the same input preprocessing to the face images during inference.
I have seen that the user can specify different types of input preprocessing. Let's say I want to extract facial embeddings using Facenet512d, which input preprocessing should be used?
Some of the related issues suggest that "no models are using normalization techniques", e.g., #1178. Does that mean all models expect pixel values in the range [0, 1]?

normalization argument is experimental usage only. i mean threshold values are tuned for normalization = base. if you set normalization to something different, then you shouldn't trust verified key anymore.
if you still insist to use it, you can follow the links in the license section in read me. they will redirect you to the reference repositories. you can find the adopted methods in there.

Thank you for your answer. Do I understand correctly that the FaceNet weights were ported from the original implementation?
Looking at their README and Wiki page, FaceNet 512 expects what they call fixed image standardization. Their input pipeline suggests that images should be normalized to the range [-1, +1]. Please correct me if I have a misunderstanding.

Reference repo is correct.
For the normalization question, you should find that answer from that repository.

Ok, normalization="ArcFace" matches the original input normalization. Thank you.


runtime: module loader

Loads modules and mounts it on a target object. Instantiations are lazily performed.
Introduction
Components have to be a class of which constructor must accepts one argument, a runtime object.
Example:
class Foo {
  constructor (runtime) {
    this.runtime = runtime
    this.component = runtime.component
  }
}

module.exports = Foo

Also components that needs establish connection/long time iteration, should implement init and destruct instance method to enable resource collection on testing.
class Foo {
  init () {
    this.client = new MqttClient()
  }

  destruct () {
    this.client.disconnect()
  }
}

Checklist

[x] npm test passes
[x] tests and/or benchmarks are included
[x] documentation is changed or added

Few suggestions:

a runtime method like: getComponent() might be more meaningful
call component method via url like yoda-component://lifetime/foobar may replace the current runtimeMethod in our configs.

Ok, almost LGTM and please add jsdoc comments for these new modules :)

BTW, @legendecas do you mind document the "component guideline" in PR description, thus we could make everyone knows our new Component API, even though it's back-compatible, it still is a big feature :)

@legendecas The init() is a confusion with its constructor, how about changing to ready()?

@legendecas The init() is a confusion with its constructor, how about changing to ready()?

init is designed to be similar to constructor, but not the same. Another point of init is that it is reversible by calling destruct.Yet ready doesn't comply to aligning with destruct,

init is designed to be similar to constructor, but not the same. Another point of init is that it is reversible by calling destruct. Yet ready doesn't comply to aligning with destruct,

IMHO destruct should be paired with construct, if we use init(), then deinit() should be alternative than destruct. And BTW, I still think about the developer would be confused on the difference of constructor and init.

init and deinit sounds good to me. init is designed to be part of the very initialization, the only difference with constructor is that it could be reversed. Yet constructor is part of ECMA standard.

Ok, so I'd suggest strongly to document what's the different between init() and constructor(), and tells which should be done at init(), if not, the developer might do something in anyone.

Ok, so I'd suggest strongly to document what's the different between init() and constructor(), and tells which should be done at init(), if not, the developer might do something in anyone.

What about deprecating init and renaming destruct to destructor along with contructor?

What about deprecating init and renaming destruct to destructor along with constructor?

Looks good to me if we could merge the init and constructor into one :)

Looks good to me now, please @yodaos-project/js @yodaos-project/build have a review, too.


Peer dependency conflicts

Issue type
I'm submitting a ...  (check one with "x")

[x] bug report
[ ] feature request
[ ] question about the decisions made in the repository

Issue description
Current behavior:
When following the instructions of the udemy course, I ran into a peer dependency issue. These are the exact steps I followed:

Pulled the repository
executed npm install
executed npm start
executed npm install cypress --save-dev

After step 4, I got the error messages as in the attached err.txt (peer dependency conflicts)
Was able to resolve that by using a --legacy-peer-deps and<EMAIL_ADDRESS>Expected behavior:
Should install and use cypress just like the course instructions say
Steps to reproduce:
Follow the steps as described above or in the udemy course, on system similar to mine (versions are listed below)
[err.txt](https://github.com/Postavshik/ngx-cypress-test/files/9497769/err.txt)

Other information:
npm, node, OS, IDE
node version: v16.17.0
npm version: 8.15.0
Windows 10
Webstorm 2022.2.1

In support of ghost's observation, I attempted to install this project to do some training.  There are >60 vulnerabilities with packages.  I had resolved down to six and blocked as to I do not know the importance of these packages.  I consider this project unsafe to train new developers.

Had the same issue on my end
Other information:
npm, node, OS, IDE
node version: v16.18.0
npm version: 8.19.2
MacOS 12.6
Visual Studio Code 1.72.2

@Patrick-Leeroy
you probably have a dependencies conflict.
There are two ways to overcome this:

Delete the global node_modules folder from your computer, so it will not create a dependencies conflict. Also clean node cache with "npm cache clean --force"
You can use --force flag when doing the installation. This flag will just ignore the dependencies conflicts and everything will work just fine.

@carlszen this project is completely running on the localhost and does not do any interactions over APIs or something. It's just a dummy UI. You see those npm warnings, just because this project originally created in 2019 and npm thinks that because of some packages not updated - it creates vulnerability. But as I said - it's a dummy project. Just a UI running in your browser.


Unable to resolve service for type 'Microsoft.AspNetCore.Hosting.IHostingEnvironment'

In Startup.cs, AddDBContext is added to the method ConfigureServices(IServiceCollection services)
services.AddDbContext(options =>
options.UseSqlServer(Configuration["Data:DefaultConnection:ConnectionString"]));
In ApplicationDBContext, the parameterized constructor is added:
public ApplicationDbContext(DbContextOptions options)
: base(options)
{
}
IHostingEnvironment is used to get the WebRootPath:
IHostingEnvironment hostingService = context.GetService< IHostingEnvironment>();
Issue
But while accessing the HostingEnvironment, facing the following issue:
Unable to resolve service for type 'Microsoft.AspNetCore.Hosting.IHostingEnvironment'. This is often because no database provider has been configured for this DbContext. A provider can be configured by overriding the DbContext.OnConfiguring method or by using AddDbContext on the application service provider. If AddDbContext is used, then also ensure that your DbContext type accepts a DbContextOptions object in its constructor and passes it to the base constructor for DbContext.
EF Core version: "Microsoft.EntityFrameworkCore": "1.0.0",
Visual Studio version: VS 2015

@ajcvickers : Do you have any idea what exactly I am missing?

@dpjain The context.GetServuice extension method is really intended as a back door to get at EF services. The reason it is not working here is that EF is using its own internal service provider and IHostingEnvironment is not an EF service. If you need IHostingEnvironment in your context, then you should constructor inject it like any other application service. For example:
public ApplicationDbContext(
    DbContextOptions<ApplicationDbContext> options,
    IHostingEnvironment hostingService)
        : base(options)
        {
            // Do whatever you need with hostingService here
        }


Update front with link to Apple and Google store to get app

Contact Nicolas for specs.

@zvjezdantasic
Update this page: https://arago.altme.io/?callback=https://www.arago.app
with this design :


Select Component

We need to develop a dropdown component to test the usability of the recently completed Overlay component.

DONE


An update of the lifetime parameter of a server object instance has no effect

An update of the lifetime parameter of a server object instance has no effect on the actual lifetime used for registration update.
At the start of the client, a server object is created using the values of the security object instance and server object instance provided to the client. This server object gets the lifetime value by copying the value from the server object instance ( prv_getMandatoryInfo(...) ).
This newly created server object, which has a copy of the lifetime value of the server object insatnce, is used when deciding if we need a registration update. So if we update the server object instance, it does not affect the actual lifetime value used by the client.

Seems like a fairly key piece of functionality for a client - being able to set the lifetime of the server.
One solution would be to detect if the Server Object is written to in object_write. Then find the corresponding server object from the contextP->serverList, and use prv_getMandatoryInfo to update the latter from the object that was written.

I second this feature request. I also run in to this issue where simply writing the lifetime value of the server object is insufficient, as the updated lifetime value is not processed for calculating the next timeout..
I will try your suggestion as you mentioned @JPSELC in the meantime. Thank you.


Update tasks.json for *nix

So people don't have to search through the issues while this is being done: https://github.com/TobiahZ/processing-vscode/issues/8
Maybe we should group all mac / linux / windows instructions separately?

The way this is worded is that the create task command would create the correct version of the task file for the platform. That's how it should work, but does not right now.
I haven't had the time to sit down and update the app. But as a fix the readme step, should communicate that if you are on Mac/Linux will need to manual copy/paste the contents into the task file (or just fix the output part)
Though the proper fix overall shouldn't be that hard either, as I'm thinking just have to add a second task file in the root and when loading the task file add a if statement. As discussed in #8

So you'd like the temp fix for readme to just describe the problem and not give a copy/paste-able config?


[5.8] Parse Url in Redis configuration

As it was done for url databases in #28308 and much requested on Twitter and in previouses PR, this one allows usage of an url key in Redis configuration.

It would be nice if the path can be used to configure the database (redis://localhost:6379/1). Maybe something like substr('<path..>', '/0'), 1)?

Actually, it's already the case @robinvdvleuten 😉.
I let you see the previous PR to understand what the ConfigurationUrlParser does.

@mathieutu nice! I see that's indeed the same substr() that I suggested (https://github.com/laravel/framework/pull/28308/files#diff-d04ad098283996e9fa8d69b6d0665d54R190).

We could decide to wing it and just move the class in the current release. Think that the best option for now but unfortunately it'll be a breaking change. Otherwise the only thing we can do is do the changes in the next release.

Apparently, Taylor made his choice ¯_(ツ)_/¯

https://laravel.com/docs/5.8/contributions#which-branch
I think this needs to be reverted?


"Incompatible units" compile error

I get "incompatible units" errors when compiling with Ruby Sass or node-sass (libsass). I'm following the "Bower" install in the readme, which says that it's compatible with node-sass 0.8.3+.  Am I doing something wrong or is this a bug?

Does anyone have a clue why it's doing this? Is there a way to avoid the error? It seems better practice to reassign variables that are used elsewhere than to add a new one and have to rewrite all the other styles that use it.


Various Wojak templates

This is a hub issue for all the Wojak templates.
https://knowyourmeme.com/memes/wojak
If you have a specific Wojak variant you wish to do, comment below that you're doing it (after checking no one else has done it first).
There are a lot of these, so I'll have difficulty doing them all myself.

As a subcategory of this, Soyjaks vs Chads is a high priority.

As a subcategory of this, Soyjaks vs Chads is a high priority.

taking care of soyjaks vs chads!

taking care of soyjaks vs chads!

I finished this one, though I plan to go through all the Wojaks I'm seeing on KnowYourMeme. Should I send them as I go along or just send them all at once?

progress so far:
done: sojak vs chad/gender variant soy vs chad/grug/norf fc/nujak/pink jak/poljak/pretty princess points/mommy e-thot/bloomer/boomer/consoomer/coomer/doomer/gloomer
to be ID'd: soomer/zoomer/daddy's girl/country jak/black wojaks/brainlet/classic wojak/i know that feel bro/i want to go home/gun/npc/smug/wither

Wojaks-1.0.zip

Wojaks-1.0.zip

here's a collection of 34 different Wojak IDs, separated by type. Each one has an example photo with a similar name, along with a text document that contains the actual ID. If there's any ones I forgot to include, just lmk! feel free to make any changes if some of the descriptions are off


[openwisp_users/apps.py] fixes issue #357

When the status ( is_active ) of an organization changes it now invalidates the cache of all the organizationsusers.

I added the suggested changes but the some tests are failing as the no of running queries is one more than expected
FAIL: test_organization_slug_post_custom_validation_api (openwisp_users.tests.test_api.test_api.TestUsersApi) [Expecting 6 SQL queries]
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/aryankaushik/Desktop/openwisp_users_main/env/lib/python3.9/site-packages/openwisp_utils/tests.py", line 148, in __exit__
    self.test_case.assertEqual(
AssertionError: 7 != 6 : 7 queries executed, 6 expected
Captured queries were:
1. SELECT "openwisp_users_user"."password", "openwisp_users_user"."last_login", "openwisp_users_user"."is_superuser", "openwisp_users_user"."username", "openwisp_users_user"."first_name", "openwisp_users_user"."last_name", "openwisp_users_user"."is_staff", "openwisp_users_user"."is_active", "openwisp_users_user"."date_joined", "openwisp_users_user"."id", "openwisp_users_user"."email", "openwisp_users_user"."bio", "openwisp_users_user"."url", "openwisp_users_user"."company", "openwisp_users_user"."location", "openwisp_users_user"."phone_number", "openwisp_users_user"."birth_date", "openwisp_users_user"."notes", "openwisp_users_user"."language", "openwisp_users_user"."password_updated" FROM "openwisp_users_user" WHERE "openwisp_users_user"."id" = 'dc2f49d54db24f2cb4e09102804fe994' LIMIT 21
2. SELECT "openwisp_users_organization"."name", "openwisp_users_organization"."is_active", "openwisp_users_organization"."created", "openwisp_users_organization"."modified", "openwisp_users_organization"."slug", "openwisp_users_organization"."id", "openwisp_users_organization"."description", "openwisp_users_organization"."email", "openwisp_users_organization"."url" FROM "openwisp_users_organization" WHERE "openwisp_users_organization"."slug" = 'test-org' ORDER BY "openwisp_users_organization"."name" ASC LIMIT 1
3. SELECT 1 AS "a" FROM "openwisp_users_organization" WHERE "openwisp_users_organization"."slug" = 'test-org' LIMIT 1
4. SELECT 1 AS "a" FROM "openwisp_users_organization" WHERE "openwisp_users_organization"."id" = '6854249477df4b6dbd7fb2fd49cd5d94' LIMIT 1
5. SELECT "openwisp_users_organization"."name", "openwisp_users_organization"."is_active", "openwisp_users_organization"."created", "openwisp_users_organization"."modified", "openwisp_users_organization"."slug", "openwisp_users_organization"."id", "openwisp_users_organization"."description", "openwisp_users_organization"."email", "openwisp_users_organization"."url" FROM "openwisp_users_organization" WHERE "openwisp_users_organization"."id" = '16302821e4cc46d4814f1fdc679c4059' LIMIT 21
6. SELECT "openwisp_users_organization"."name", "openwisp_users_organization"."is_active", "openwisp_users_organization"."created", "openwisp_users_organization"."modified", "openwisp_users_organization"."slug", "openwisp_users_organization"."id", "openwisp_users_organization"."description", "openwisp_users_organization"."email", "openwisp_users_organization"."url" FROM "openwisp_users_organization" WHERE (NOT ("openwisp_users_organization"."id" = '16302821e4cc46d4814f1fdc679c4059') AND "openwisp_users_organization"."slug" = 'test-org') ORDER BY "openwisp_users_organization"."name" ASC
7. INSERT INTO "openwisp_users_organization" ("name", "is_active", "created", "modified", "slug", "id", "description", "email", "url") VALUES ('test-org', 1, '2024-05-27 17:41:05.471960', '2024-05-27 17:41:05.472193', 'test-org', '16302821e4cc46d4814f1fdc679c4059', '', '', '')

======================================================================
FAIL: test_remove_organization_owner_api (openwisp_users.tests.test_api.test_api.TestUsersApi) [Expecting 11 SQL queries]
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/aryankaushik/Desktop/openwisp_users_main/env/lib/python3.9/site-packages/openwisp_utils/tests.py", line 148, in __exit__
    self.test_case.assertEqual(
AssertionError: 12 != 11 : 12 queries executed, 11 expected
Captured queries were:
1. SELECT "openwisp_users_user"."password", "openwisp_users_user"."last_login", "openwisp_users_user"."is_superuser", "openwisp_users_user"."username", "openwisp_users_user"."first_name", "openwisp_users_user"."last_name", "openwisp_users_user"."is_staff", "openwisp_users_user"."is_active", "openwisp_users_user"."date_joined", "openwisp_users_user"."id", "openwisp_users_user"."email", "openwisp_users_user"."bio", "openwisp_users_user"."url", "openwisp_users_user"."company", "openwisp_users_user"."location", "openwisp_users_user"."phone_number", "openwisp_users_user"."birth_date", "openwisp_users_user"."notes", "openwisp_users_user"."language", "openwisp_users_user"."password_updated" FROM "openwisp_users_user" WHERE "openwisp_users_user"."id" = '7d5f9551f23d457b96c0a5dfc0d32cde' LIMIT 21
2. SELECT "openwisp_users_organization"."name", "openwisp_users_organization"."is_active", "openwisp_users_organization"."created", "openwisp_users_organization"."modified", "openwisp_users_organization"."slug", "openwisp_users_organization"."id", "openwisp_users_organization"."description", "openwisp_users_organization"."email", "openwisp_users_organization"."url" FROM "openwisp_users_organization" WHERE "openwisp_users_organization"."id" = '1c1754ecbcf44722ac045f5141f33348' LIMIT 21
3. SELECT 1 AS "a" FROM "openwisp_users_organizationowner" WHERE "openwisp_users_organizationowner"."organization_id" = '1c1754ecbcf44722ac045f5141f33348' LIMIT 1
4. SELECT 1 AS "a" FROM "openwisp_users_organizationowner" WHERE "openwisp_users_organizationowner"."organization_id" = '1c1754ecbcf44722ac045f5141f33348' LIMIT 1
5. SELECT "openwisp_users_organizationowner"."created", "openwisp_users_organizationowner"."modified", "openwisp_users_organizationowner"."id", "openwisp_users_organizationowner"."organization_user_id", "openwisp_users_organizationowner"."organization_id" FROM "openwisp_users_organizationowner" WHERE "openwisp_users_organizationowner"."organization_id" = '1c1754ecbcf44722ac045f5141f33348' ORDER BY "openwisp_users_organizationowner"."id" ASC LIMIT 1
6. DELETE FROM "openwisp_users_organizationowner" WHERE "openwisp_users_organizationowner"."id" IN ('5ab96a836f684456aeb2883004219aa9')
7. SELECT "openwisp_users_organizationuser"."created", "openwisp_users_organizationuser"."modified", "openwisp_users_organizationuser"."is_admin", "openwisp_users_organizationuser"."id", "openwisp_users_organizationuser"."user_id", "openwisp_users_organizationuser"."organization_id" FROM "openwisp_users_organizationuser" WHERE "openwisp_users_organizationuser"."id" = 'af21273fe11346a69838f9b0ad14c77a' LIMIT 21
8. SELECT "openwisp_users_user"."password", "openwisp_users_user"."last_login", "openwisp_users_user"."is_superuser", "openwisp_users_user"."username", "openwisp_users_user"."first_name", "openwisp_users_user"."last_name", "openwisp_users_user"."is_staff", "openwisp_users_user"."is_active", "openwisp_users_user"."date_joined", "openwisp_users_user"."id", "openwisp_users_user"."email", "openwisp_users_user"."bio", "openwisp_users_user"."url", "openwisp_users_user"."company", "openwisp_users_user"."location", "openwisp_users_user"."phone_number", "openwisp_users_user"."birth_date", "openwisp_users_user"."notes", "openwisp_users_user"."language", "openwisp_users_user"."password_updated" FROM "openwisp_users_user" WHERE "openwisp_users_user"."id" = '243282a1f4c34e098c1956d90fb75b86' LIMIT 21
9.  SELECT "openwisp_users_organization"."name", "openwisp_users_organization"."is_active", "openwisp_users_organization"."created", "openwisp_users_organization"."modified", "openwisp_users_organization"."slug", "openwisp_users_organization"."id", "openwisp_users_organization"."description", "openwisp_users_organization"."email", "openwisp_users_organization"."url" FROM "openwisp_users_organization" WHERE "openwisp_users_organization"."id" = '1c1754ecbcf44722ac045f5141f33348' LIMIT 21
11. UPDATE "openwisp_users_organization" SET "name" = 'org1', "is_active" = 1, "created" = '2024-05-27 17:41:08.827987', "modified" = '2024-05-27 17:41:08.974391', "slug" = 'org1', "description" = '', "email" = '', "url" = '' WHERE "openwisp_users_organization"."id" = '1c1754ecbcf44722ac045f5141f33348'
12. SELECT "openwisp_users_organizationowner"."created", "openwisp_users_organizationowner"."modified", "openwisp_users_organizationowner"."id", "openwisp_users_organizationowner"."organization_user_id", "openwisp_users_organizationowner"."organization_id" FROM "openwisp_users_organizationowner" WHERE "openwisp_users_organizationowner"."organization_id" = '1c1754ecbcf44722ac045f5141f33348' LIMIT 21

And one testcase which is failing is this. I am working on this it is failing because of the line which is invalidating cache in tasks.py which I am working on but any suggestion are appreciated.
======================================================================
FAIL: test_can_change_inline_org_owner (openwisp_users.tests.test_admin.TestUsersAdmin) [owner can edit inline org owner]
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/aryankaushik/Desktop/openwisp_users_main/openwisp-users/openwisp_users/tests/test_admin.py", line 1423, in test_can_change_inline_org_owner
    self.assertEqual(org_owners.count(), 1)
AssertionError: 0 != 1

Okay I will change the query count and will follow the commit message guidelines.
About the Issue I have tried a lot of things. If you find something out let me know.

I have made a commit with those issues solved

Made the changes suggested by you. Thanks for guiding line by line. I will try to understand more about this project meanwhile.

@kaushikaryan04 come in the OpenWISP dev chat to coordinate when you can :pray:

coverage: 97.84% (-0.09%) from 97.929%
when pulling 63544b4100e1a686e33ed657ea349df321a7b127 on kaushikaryan04:issues/357-inactive-organizations-users-visible
into e85cf622f7dd612006b62db093dbf2f6df7b381b on openwisp:master.


copy all photo directories from shared drive to local repo

testing fs::dir_copy.
Idea is to change photo names only in shared drive location (onedrive for now)
of course the key inputs in .gitignore already are:
*.JPG
!crossing_all.JPG
!*_k_*

This is complete locally (ie. Al's repo) as per documentation in scripts/01_prep_inputs/01_prep_photos.Rmd and
scripts/01_prep_inputs/01_prep_photos.html.  Important - we are nuking (deleting) the entire directory
every time with fs::dir_delete('data/photos') so we need to be sure to only make changes in our shared
location.  For the record the way to do this is
fs::dir_copy(   path = dir_photos_shared,   new_path = 'data/',   overwrite = TRUE)


Update sailsDbMigrate.js

this will fix issue #36

It looks like a different pull request is open that accomplishes similar, but is more robust because of it's backwards compatibility: https://github.com/building5/sails-db-migrate/pull/36

@naveedcs I'm struggling to see what issue you're referring to.  I think #36 is another pull request, which seems more robust than your pull request here, since it is backwards compatible with 0.x.x version of sails. Perhaps you were trying to reference #35? If so, I'd recommend withdrawing this request as #36 seems better suited.


Docs: Adds details to on how to set up a secure development environment

Description
This PR adds details and corrects some erros that were occuring as one set out to install TLS certificates in the developer environment.
This adds the need to edit /etc/hosts.
This adds instructions on using django-sslserver for non-docker dev environments.
Checklist:

[x] I've updated the documentation

Fix #2664
Fix #2840

Closing in favour of #5252


Ping event can not be fired

I'm using 1.0.21. It seems WebSocketConnection.ping event does't work.
The code is simple.
var client = new WebSocketClient();
client.on('connect', function(connection) {
    connection.ping('1');
});

I expect the ping event is fired at the server side, but it doesn't.
From the doc

ping

function(cancel, data)

This event is emitted when the connection receives a ping from the peer. cancel is a function taking no arguments that when called prevents the WebSocketConnection object from automatically replying with a pong. data is the binary payload contained in the ping frame.

Code from WebSocketConnection.js
case 0x09: // WebSocketFrame.PING
            this._debug('-- Ping Frame');
            this.pong(frame.binaryPayload);
            break;

It seems once there's a ping, the server just sends back a pong, without fire the 'ping' event.
Is this a unfinished feature?

Sorry for the late response. No, this is implemented: https://github.com/theturtle32/WebSocket-Node/blob/2d228f8d13ed3cd4bbb2ef5431b802ecbd42d2e9/lib/WebSocketConnection.js#L618-L639
        case 0x09: // WebSocketFrame.PING
            this._debug('-- Ping Frame');

            if (this._pingListenerCount > 0) {
                // logic to emit the ping frame: this is only done when a listener is known to exist
                // Expose a function allowing the user to override the default ping() behavior
                var cancelled = false;
                var cancel = function() {
                  cancelled = true;
                };
                this.emit('ping', cancel, frame.binaryPayload);

                // Only send a pong if the client did not indicate that he would like to cancel
                if (!cancelled) {
                    this.pong(frame.binaryPayload);
                }
            }
            else {
                this.pong(frame.binaryPayload);
            }

            break;

At the time you filed this, it's possible that the new version containing that feature hadn't yet been published to NPM.  Sorry for the confusion!
https://github.com/theturtle32/WebSocket-Node/commit/2d228f8d13ed3cd4bbb2ef5431b802ecbd42d2e9


Investigate using Guard APIs in the runtime

There's plenty of places in the runtime that could benefit from this:
https://learn.microsoft.com/en-us/dotnet/communitytoolkit/diagnostics/guard

Full list of methods: https://learn.microsoft.com/en-us/dotnet/api/microsoft.toolkit.diagnostics.guard?view=win-comm-toolkit-dotnet-7.0

Not worth it


Add placeholders for targeted content translations

Add placeholders for targeted content translations. By default Rails injects translation missing markup, which when used in attributes results in the following:

Adding placeholders to cy.yml for now, have requested translations but imagine they will come in the new year so suggest merging this as is.

alternatively - we should have a script that compares the two files and reports any missing keys as part of CI.

I'd be up for this. Normally you can set raise_on_missing_translations in development to catch this, which would be possible if we went full engine, but couldn't get that working in our script context so a CI check would be a good safeguard.

I've updated this PR with a basic lint script which compares the keys in both locale files and should error if anything is missing

Hmm this does fail as expected but collect_task_errors seems to swallow the actual error message in CI

Closing in favour of https://github.com/citizensadvice/design-system/pull/681


[WIP][Fix] The initialization of the configuration comes before the bean is loaded

The initialization of the configuration comes before the bean is loaded
What changes were proposed in this pull request
Issue Number: close #3494

Brief change log
The initial configuration load consists of two parts:

one is the native java and scala default configuration

the other is the environment variable passed into the ApplicationContext via yaml or parameter configuration

The current streampark flushes the yaml configuration into the global configuration cache after springboot starts.
As a result, during bean initialization, if you want to use yaml or parameter configuration to pass the value,
it will fail, and the default value will be used instead.
I recommend that the initialization of the configuration cache be advanced to before the bean is loaded
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.

Does this pull request potentially affect one of the following parts

Dependencies (does it add or upgrade a dependency): no

@Al-assad If you have time, can you help me review this PR? Thank you.

@Xuxiaotuan Please fix cli

It seems that there are still some problems. You can wait for the database problem to be fixed before completing your PR. You can first add WIP to your PR title to indicate that it is in progress.
By the way, your commit message needs to be changed to English. Thank you.

@wolfboys why merage？cli fail

@wolfboys why merage？cli fail

Thanks for your feedback, the CI failure was not caused by this PR. I will fix it soon. Happy New Year! 🎉

Thank you for your reply, but this PR has a WIP tag. When we merge it, we should remove the WIP tag, and its commit message is in Chinese. I think it is unreasonable. We should pay attention to such issues in the future.
Finally, happy new year🎉

Thank you for your reply, but this PR has a WIP tag. When we merge it, we should remove the WIP tag, and its commit message is in Chinese. I think it is unreasonable. We should pay attention to such issues in the future. Finally, happy new year🎉

👌👌👌


Make npm scripts work on windows cmd

Adds cross-env package to dev so that npm scripts work on a windows command line.... but seriously use WSL... but if you can't... I got ya 😉.
Fixes: #30

This is great. I love a simple solution and this is exactly that.
Cheers, Mike.


List of accounts and log-in info

Lisa- can you please provide me a list of the different subscription accounts you have along with the log-in info so I can have John add his credit card info.

transfer to spreadsheet
reconfigure the accounts to the new login email

Lisa transfer Typeform
Lisa transfer Dasheroo
Mark transfer intercom


Descriptor type matching

Addresses #45. Some cleanup still to be done, but posting for feedback.

Run clang-format on changes.
This is flagging some errors on "tri --validate" and "cube --validate". I suspect they are valid errors. Can you check those out and include fixes to tri and cube to fix those errors as another patch in this series?

OK, will fix tri/cube's complaints.

I pulled latest commits and tested w/ tri/cube/smoke validate and they all run cleanly.
Are you ready for this to be merged yet?
I see that error messages aren't updated, but that's not a must-have.
When you're ready for me to merge this, please re-assign back to me.

Rebased again.

Rebased /again/ past upstream reformatting of all the layers code.

cherry-picked and pushed to master.
Note that I updated your commit to remove the defunct "SHADER_CHECKER_FS_MIXED_BROADCAST" case from vk_validate_layer_details.md. Otherwise a documentation error is flagged on run_all_tests.sh.
I also removed clang-format updates from vk_validate_layer_details.md as doc validation parser doesn't currently like multi-line table entries.


Where to find documentation?

Hi,
I'm trying to find documentation for jax-ws, preferably in JavaDocs format.
The issue I'm having is that the documentation link I've been given (http://jax-ws.java.net/nonav/jaxws-api/2.2/index.html) just redirects to the main page of this github repo.
I've noticed that there are some DocBook formatted files in jaxws-ri/docs. Are these useful and should I attempt to convert them to a readable format?
Thanks
Source: https://github.com/javaee/metro-jax-ws/issues/1199
Author: benjamingorman

see https://eclipse-ee4j.github.io/metro-jax-ws/


AWS Tutorial Setup Policy Instructions

Hi all,
I suspect this is outside the scope of this repo but I've been struggling to find the answer and resorting to everything I can think of. I have a cluster running (set up using eksctl), have set up nginx-ingress and cert-manager... All works well. I admit I have much more experience with GCP and GKE than with AWS.
I saw the tutorial here: https://github.com/kubernetes-incubator/external-dns/blob/master/docs/tutorials/aws.md and understand it but I am not sure how to apply that policy to my account. I was able to create the policy fine but how to I associate that with my cluster/nodes?
Or more precisely:

How do I attach that policy to the appropriate resource (cluster? Node?) and..
How do I find the necessary information about the cluster or nodes to be able to make the association (do I need the cluster arn? the node group arn?)?

Thank you for your patience. I'm trying to learn AWS by doing and this part I'm stuck in.
Thanks!

by policy, do you mean IAM Permissions?
Can you show the policy?


haskell-ng: 'amazonkaEnv' is broken

Given this minimal arrangement:
https://gist.github.com/fmap/f8bdc0c731cf9b45763a
nix-shell fails citing a collision:
% nix-shell
these derivations will be built:
  /nix/store/b1wy90qsbl77y6679fq69w9c90l2xzv5-ghc-7.8.4.drv
building path(s) ‘/nix/store/hbx5wsd7cghkycfrawc88sbmkx4b9xz8-ghc-7.8.4’
collision between `/nix/store/d2hs4w7hhf7kj9c61q78w8b0z73zm5f1-ghc-7.8.4/lib/ghc-7.8.4/directory-<IP_ADDRESS>/libHSdirectory-<IP_ADDRESS>-ghc7.8.4.so' and `/nix/store/vir49a9c5znyq42nw27nqsfs84vmbcr0-haskell-directory-<IP_ADDRESS>/lib/ghc-7.8.4/directory-<IP_ADDRESS>/libHSdirectory-<IP_ADDRESS>-ghc7.8.4.so' at /nix/store/9z6d76pz8rr7gci2n3igh5dqi7ac5xqj-builder.pl line 72.
builder for ‘/nix/store/b1wy90qsbl77y6679fq69w9c90l2xzv5-ghc-7.8.4.drv’ failed with exit code 2
error: build of ‘/nix/store/b1wy90qsbl77y6679fq69w9c90l2xzv5-ghc-7.8.4.drv’ failed
/run/current-system/sw/bin/nix-shell: failed to build all dependencies

Cc: @peti @shlevy

Given this minimal arrangement:

Or more trivially:
% nix-shell ~/root/code/nixos/nixpkgs/ -A haskellngPackages.amazonka.env
these derivations will be built:
  /nix/store/w7hsvgn7gkcv2l3bynm0h1a4sm5vab9i-ghc-7.8.4.drv
building path(s) ‘/nix/store/p07zqz3y3y3b4h1kci1471wlj2wkm12n-ghc-7.8.4’
collision between `/nix/store/d2hs4w7hhf7kj9c61q78w8b0z73zm5f1-ghc-7.8.4/lib/ghc-7.8.4/directory-<IP_ADDRESS>/libHSdirectory-<IP_ADDRESS>-ghc7.8.4.so' and `/nix/store/vir49a9c5znyq42nw27nqsfs84vmbcr0-haskell-directory-<IP_ADDRESS>/lib/ghc-7.8.4/directory-<IP_ADDRESS>/libHSdirectory-<IP_ADDRESS>-ghc7.8.4.so' at /nix/store/9z6d76pz8rr7gci2n3igh5dqi7ac5xqj-builder.pl line 72.
builder for ‘/nix/store/w7hsvgn7gkcv2l3bynm0h1a4sm5vab9i-ghc-7.8.4.drv’ failed with exit code 2
error: build of ‘/nix/store/w7hsvgn7gkcv2l3bynm0h1a4sm5vab9i-ghc-7.8.4.drv’ failed
/run/current-system/sw/bin/nix-shell: failed to build all dependencies

I don't know how to use the amazonka packages, to be honest. Those builds replace GHC core libraries, which is why those collisions occur, I suppose.
@shlevy, how do you build an environment than contains these packages? Can help us out?

I've only ever tested that they build individually, haven't yet used them in envs. It may be that for deep overrides like this the best thing to do is to define a whole new haskell package set. @peti Do you have any ideas for how we might easily create new sets with "chaining", so I can say "take the default haskell package set (including any overrides etc), add these overrides for core and other packages, and that's your amazonka set"?

Oh, hm, the env thing is a bit different actually. Probably we need some way to exclude core packages from the built env, or if not exclude let other things take priority. I don't really know the details about how envs are built, @peti do you know how this might be done easily? If not I'll take a look, please let me know.

@shlevy, when you develop code with amazonka packages, how do you use them?
One way to "remedy" the collision in the env builder is to configure
ghcEnv.override { ignoreCollisions = true; };

where ghcEnv is the ghcWithPackages environment. This gets rid of the error. I'm not sure whether the environment that comes out of this is safe to use though.

Will dig into this in detail tomorrow.

Any news on this? I wonder how you are using these amazonka packages, @shlevy?

Maybe we should remove the amazonka overrides from master? Publishing that code there comes with an implicit promise that it can be used, and it appears we cannot keep that promise as the moment?

OK, so basically we need a) to have the non-core version of the library override the core version and b) to build all packages in the env against the non-core version (that is, the package set chaining stuff I was talking about in my earlier comment). ignoreCollisions does fix a), but it fixes too much, as it won't catch cases where b) matters until run time (but it does work when no other packages in the env depend on the overridden core packages, or when all packages in the env are properly built from the same set).
I think the ideal thing to do would be to have each core package in a separate output of ghc, which would then not be part of the env unless explicitly requested. This also dovetails with the "reduce ghc closure size" investigation I did: Even with lib in a separate output, with all of the core libraries (in all of their forms, shared and static and debug etc.) together with librts there was pretty much no savings relative to single output.
@thoughtpolice not sure how involved you are in the build system of ghc, but do you know offhand if it's possible to configure the ghc installation to put different packages in different prefixes?
@edolstra Any reason to expect problems from a derivation having dozens of outputs?

@shlevy, when you develop code with amazonka packages, how do you use them?

As I said above, I've only tested that they built. @fmap is a co worker of mine who is the first to start using them in a nix context.

@shlevy, maybe we should remove the amazonka overrides from master? Publishing that code there comes with an implicit promise that it can be used, and it appears we cannot keep that promise as the moment?

I'd prefer something like meta.broken, as we do have a hacky solution that works in some cases (ignoreCollisions = true) and have an idea for what a real solution would look like, but in the end it's not a big deal I suppose.

I believe it's fine it have that code in master once a real solution is implemented. For the time being, however, I'd rather not advertise packages that seemingly replace GHC core libraries with other versions when, in fact, we have no idea how to use those packages reliably.


add simple snow autoconversion params

This adds parameters needed for simplified version of snow autoconversion rate that we currently need for TC.jl

bors r+


use api override and merging utils to get flatterned devfile

What does this PR do?
use api override and merging utils to get flatterned devfile
What issues does this PR fix or reference?
https://github.com/devfile/api/issues/198
Is your PR tested? Consider putting some instruction how to test your changes
unit test created

blocked by: https://github.com/devfile/api/issues/276


Enable self contained build - provision SBT

In order to cleanly integrate with CI can we get SBT automatically provisioned in a similar fashion as Gradle wrapper works? Does SBT has a concept of wrapper (or 'sbtw')?
@FranklinYinanDing, can you take a look at this a send a PR?

Found some documentation about this. https://www.scala-sbt.org/0.13/docs/Travis-CI-with-sbt.html
Working on it.

Great! Thank you!
Let's aim for a solution that is decoupled from the CI system. Check out this SO question: https://stackoverflow.com/questions/37295128/run-sbt-without-installing-it-first Apparently, there is a way to create completely self-contained build environment with SBT, just like we have with Gradle wrapper.
If we decouple from Travis CI, we can easily swap the CI if needed. Plus, wrapper-like SBT execution will be helpful for developers, too.

I see. For sbt, the simplest way is to include sbt-launcher.jar, which is the core of sbt, then call java <opts> -jar sbt-launcher.jar to get into the sbt.
Any general wrappers would need to download a specific version of sbt-launcher, while they do provide more friendly script.
I am somewhat not a fan of re-downloading sbt-launcher.jar (> 1MB) every time. I can create a PR to attach the sbt-launcher.jar, and we can also use that jar in Travis CI.

Thank you for looking into it!
Ideally, we have one command to run the build and we used that command on CI. In my PR, I created in a "build.sh" file, do you want to make this change into this file and commit/push to my PR?

Updated. See the last commit of #10

Merged in #10


Improxe UX for mobile use with a Qr Code

I hosted the image on one of my repo. I am not really sure where to put it in yours.
You should download it and add it in the repo.

This is not an official way to do README images but you can drag an image into most GitHub comments boxes and it will return you a URL to the image stored on their CDN:
![qrcode](https://user-images.githubusercontent.com/1457604/30773826-c254d41a-a070-11e7-8199-932cc1de0921.png)

You could update your PR to include the snippit above. It has the same result and avoids introducing an external resource dependency and means you don't want to check them in to the repo. Assuming that the GitHub CDN will be around for as long as GitHub and you don't need to version the image then this is not a bad way to go.

Good point! sorry for the delay of reaction.
Thanks for the contribution!


Fixed recursive instantiation caused by Validator Injection

ValidationServiceProvider depends on the 'translator' service of which
this package takes over. The use of the 'validator' singleton would
resolve this unintended recursion.

Sorry, I'm new to issuing PR, would somebody advise me what went wrong with the CI test please?

Following your advice, a fix was uploaded on v<IP_ADDRESS>. If you click on details you can see why the tests failed (you forgot to include the Application classpath). You may also run the tests locally with 'composer test'.
Thanks!


allow fn modifier

Having proper support for the fn-modifier would be great..
See #11.

Currently testing this in skhd, and isolating different cases where the fn modifier causes "inconsistent" behaviour.

https://github.com/koekeishiya/skhd/issues/10
https://github.com/koekeishiya/skhd/issues/1
Certain keys have the fn-flag set implicitly, which caused the "problems" that have been noticed earlier. See referenced issues above for detailed information.
Support for fn in khd will be included through #86


Menu page is leading to 404 page not found error.

Menu page is leading to 404 page not found error when clicked on the home tab on the navbar of the menu page.
https://github.com/khushi-joshi-05/Food-ordering-website/assets/143121854/b67feb81-8617-456f-a2e6-60878d4fd113
Assign this task to me and I can fix this issue.

@khushi-joshi-05 please assign this issue to me.


getBlocksByHeightWithLimit SDK Method isn't returning limit items

Even when available, the getBlocksByHeightWithLimit may return much less than the desired number of items. For example, calling on 3 different successive calls, I got:

4
25
13

Such an SDK method should return a consistent number of items, if available.

Should be closed with the new SDK methods.


new block download does sometimes stall in v0.12?

I can't produce a real test case, but I experienced this a few times now during the last days, running v0.12 classic from this git repo.
I have a datacenter internet connection and about 25 peers connected. Enough disk space and 10GB of RAM, about 40% of it free. Normally blocks show up in the printconsole log shortly before/after being visible on blockchain.info.
Block 399886 was mined at about 23:08 UTC.
It simply doesn't show up in the bitcoind console log of my node. (It got my attention because my p2pool node starts complaining thoroughly about block-stale shares.)
After some minutes of waiting I do a "getpeerinfo" and the "synced_headers" entry of some peers already show this block.
It then takes a full 20 minutes, until first a "Timeout downloading block from peer, disconnecting" occours and immediately afterwards the new block shows up.
Can anybody confirm/dismiss this problem? I'm a bit lost providing a more solid bug report for this, sorry.
Full printconsole log of my incident: http://pastebin.com/Zc47rVL9
"getpeerinfo" around 23:20 UTC does show the peer in question as:
{
"id": 722,
"addr": "<IP_ADDRESS>:48842",
"services": "0000000000000001",
"relaytxes": false,
"lastsend":<PHONE_NUMBER>,
"lastrecv":<PHONE_NUMBER>,
"bytessent": 5956,
"bytesrecv": 3964,
"conntime":<PHONE_NUMBER>,
"timeoffset": -67218,
"pingtime": 0.125517,
"minping": 0.125333,
"version": 70002,
"subver": "/Satoshi:0.11.2/",
"inbound": true,
"startingheight": 398961,
"banscore": 0,
"synced_headers": 399886,
"synced_blocks": 399885,
"inflight": [
],
"whitelisted": false
},

I can confirm.

If a peer is malicious, improperly configured, or behind a poor internet connection, it can offer to send a block but simply refuse to do so. This will tie up the download slot by marking the block as "in flight", which will prevent you from trying to download it from another peer.
One way of dealing with instances like this is to reduce the timeout, or to make the timeout more intelligent vis-a-vis blocks that are downloading, but going slowly.
Having a block download timeout should probably result in a peer ban.
Blocktorrent and dagurval's thin blocks are resistant to this type of issue, since they download from multiple peers in parallel. I don't know about XTB.
In any case, @mmouse- if you're mining, you should be running the relay network client. That will give you a second parallel path for receiving new blocks and make it less likely for issues like this (which should still be fixed!) from causing you to lose revenue.

Are you getting the same issues on Core 12? I feel like I remember them chopping down some logging. Maybe I dreamed that.
On Feb 29, 2016 17:48, Jonathan Toomim<EMAIL_ADDRESS>wrote:

@jtoomim The block wasn't marked as "in flight" in getpeerinfo...
And thanks for the hint to relay network. No serious mining here, it's more playing around. But I'll see if I give it a try, just out of curiosity.
@FinalHash I didn't use Core 12, but there is an almost identical, more verbose bugreport at https://github.com/bitcoin/bitcoin/issues/7596

Closing for now as "can't reproduce" Feel free to comment if this happens again.


Update traits.cwt

stnh fix

I want to test whether these work.

well, test away - but it has been almost a week since you commented and nothing happened.

Tested and merged. I was right, sorting priority does nothing for leader traits. So I removed that.


Fluent meshing TUI command gives error through execute_tui

🔍 Before submitting the issue

[X] I have searched among the existing issues
[X] I am using a Python virtual environment

🐞 Description of the bug
Hi,
It seems that not all TUI commands are available through TUI API. I was trying to adjust graphic views through TUI through execute_tui command. Most of them worked except the following
meshing.execute_tui("display views camera roll-camera 270")
It returns the following error in fluent console

If I use scheme_eval.string_eval(command), it works fine.
📝 Steps to reproduce
Use any meshing script or mixing elbow case and after generating the mesh, execute the following command
meshing.execute_tui("display views camera roll-camera 270")
💻 Which operating system are you using?
Windows
📀 Which ANSYS version are you using?
2023 R2
🐍 Which Python version are you using?
3.10
📦 Installed packages
ansys-api-fluent==0.3.15
ansys-api-platform-instancemanagement==1.0.0
ansys-fluent-core==0.17.0
ansys-fluent-parametric==0.7.1
ansys-fluent-visualization==0.7.1
ansys-platform-instancemanagement==1.1.2
asttokens==2.2.1
backcall==0.2.0
certifi==2023.7.22
charset-normalizer==3.2.0
colorama==0.4.6
comm==0.1.4
contourpy==1.1.0
cycler==0.11.0
debugpy==1.6.7.post1
decorator==5.1.1
docker==6.1.3
executing==1.2.0
fonttools==4.42.1
grpcio==1.57.0
grpcio-health-checking==1.48.2
h5py==3.9.0
idna==3.4
importlib-metadata==6.8.0
ipykernel==6.25.1
ipython==8.14.0
jedi==0.19.0
jupyter_client==8.3.1
jupyter_core==5.3.1
kiwisolver==1.4.5
lxml==4.9.3
matplotlib==3.7.2
matplotlib-inline==0.1.6
nest-asyncio==1.5.7
numpy==1.25.2
packaging==23.1
pandas==2.0.3
parso==0.8.3
pickleshare==0.7.5
Pillow==10.0.0
platformdirs==3.10.0
pooch==1.7.0
prompt-toolkit==3.0.39
protobuf==3.20.3
psutil==5.9.5
pure-eval==0.2.2
Pygments==2.16.1
pyparsing==3.0.9
PySide6==6.5.2
PySide6-Addons==6.5.2
PySide6-Essentials==6.5.2
python-dateutil==2.8.2
pytz==2023.3
pyvista==0.41.1
pyvistaqt==0.11.0
pywin32==306
PyYAML==6.0.1
pyzmq==25.1.1
QtPy==2.4.0
requests==2.31.0
scooby==0.7.2
shiboken6==6.5.2
six==1.16.0
stack-data==0.6.2
tornado==6.3.3
traitlets==5.9.0
tzdata==2023.3
urllib3==2.0.4
vtk==9.2.6
wcwidth==0.2.6
websocket-client==1.6.2
zipp==3.16.2

For these TUIs, the TUI hierarchy is not correctly extracted on the Fluent side. This is causing issues in Fluent's Python console also. I'll have a look into that.
The execute_tui is a separate issue, will merge a fix in PyFluent.


docker with python > 3.6.9 ?

Hi,
So i have successfully run the dustynv/ros:galactic-pytorch-l4t-r32.6.1 docker and notice that the python version is 3.6.9.
Is there a docker with new python or should i just upgrade the python version ?
thank you

Hi @an99990, simply upgrading the Python version would lose the Python packages for PyTorch, ROS, ect since those are installed for Python 3.6.   You would need to rebuild the PyTorch wheel for Python 3.9, and then rebuild the l4t-pytorch, jetson-inference, and ROS containers for Python 3.9.  So all in all, a significant effort.
Python 3.6 is used in these containers because they are based on Ubuntu 18.04 (the version of Ubuntu for JetPack 4.x) which has a default Python version of 3.6.   When JetPack 5.x comes out, the default Python version will change to Python 3.8.

If I absolutely need a Python version that is 3.7 or higher, is there somewhere I can look to so that I properly rebuild all of the items needed? Or would simply editing the galactic pytorch dockerfile to install python 3.7 and have that set as default before all of the other packages are install work?

Or would simply editing the galactic pytorch dockerfile to install python 3.7 and have that set as default before all of the other packages are install work?

Hi @JonathanNash21, assuming you are on JetPack 4.x, then yes I would install the libpython3.7-dev packages in the container first and then set python3.7 as the default, before galactic gets built.
Note that this won't work for the pytorch stuff, because the pytorch wheels are all built for Python 3.6 on JetPack 4.x.  You would need to independently rebuild the pytorch wheel for Python 3.7, and then rebuild l4t-pytorch with that wheel and Python 3.7 instead.
If you're on JetPack 5.x, the default is already Python 3.8.


Spark - CoreMap implementation

CoreMap is being used in QScriptCore.Map & QScriptCore.Filter

Ready for review.
Note that casewith //TODO or InternalError("not implemented").left are not ready and will be done in next PR. Rest is ready for review.

Current coverage is 66.22% (diff: 0.00%)

No coverage report found for master at a7322d1.

Powered by Codecov. Last update a7322d1...b254047

Needs a revision.md

What's the plan for testing? Wait until enough implementation is in place to turn on a few query integration tests?

@drostron

revision added
tests - i hope there is a global test for all connectors to test EvaluatePlan altogether, if there is non I will add tests at the end when all is done
math.pow was obvious mistake, thx for pointing that out
Eq & Neq are reimplemented the obvious way as u suggested
Your hint for BigDecimal conversion did not compile

PR ready for next round of review

👍🏽. Will merge once build passes.


Correct command to reproduce test with a failure in classMethod

Description
If a test fails due to some exception during static initialization, the logs contain message that looks like
Reproduce with: gradlew :solr:core:test --tests "org.apache.solr.response.JSONWriterTest.classMethod"

which is not a valid command to re-run the test.
This PR changes the message to be
Reproduce with: gradlew :solr:core:test --tests "org.apache.solr.response.JSONWriterTest"

Checklist
Please review the following and check all that apply:

[x] I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
[ ] I have created a Jira issue and added the issue ID to my pull request title.
[x] I have given Solr maintainers access to contribute to my PR branch. (optional but recommended)
[x] I have developed this patch against the main branch.
[ ] I have run ./gradlew check.
[ ] I have added tests for my changes.
[ ] I have added documentation for the Reference Guide

See also https://issues.apache.org/jira/browse/SOLR-15447

if we are touching this lets add a ./ on the front of the command so one can actually cut and paste it :)

Thanks @madrob - any particular reason why the patch from SOLR-15447 was never applied?

Looks like this may be superseded by https://github.com/apache/solr/pull/2487

Yes I think this should be closed as incorporated by #2487 .  Feel free to provide any further feedback there!


[5.0] Enhancing Str::snake()

Str::snake() now replaces spaces with delimiters and prevents duplication of delimiters from happening.

Please send to 5.1. This is breaking.


Cleanup

Cleanup. Marked some legacy Lua 5.1 code for future removal, removed some unused locals and deadcode

I'm not maintaing Copas and I'm unfamiliar with the code, but if nobody else is looking at this I guess it's up to me to take patches.
So, if I understand the patch, coxpcall is no longer a dependency if running Lua > 5.1? (LuaRocks does need a feature so we can express that in the rockspec...) Did you test on both Lua 5.1 and 5.2? I noticed you removed a coxpcall. from outside the if-lua-5.1 area... (and that's about the best I can do in terms of code review for this! :) )

regarding coxpcall; that functionality has moved into the Lua core as of 5.2. See https://github.com/keplerproject/coxpcall/blob/master/src/coxpcall.lua#L16-21
It remains as 5.1 legacy, but this makes it easier to remove in a future update.
The marks outside the if-lua-5.1 area will use the local pcall created at the top


Flutter firebase_auth package does not provide "refresh token" property.

I need to get refresh token from firebase auth, which I will use that "refresh token" for custom backend API. But firebase_auth plugin "getIdToken" class, I use parameter "refresh" and set as "true" it is just returning a refreshed JWT idToken, But what I want is a "refresh token". Is there an alternative solution for this issue?

Hi @KFMONGF2P
for what I can see the issue is related to a FlutterFire plugin,
please open the issue in the dedicated github.
Closing, as this isn't an issue with Flutter itself,
if you disagree please write in the comments and I will reopen it
thank you

@iapicca Noted.
Submitted at https://github.com/FirebaseExtended/flutterfire/issues.
This issue moved to https://github.com/FirebaseExtended/flutterfire/issues/2212.


fix: make gas limits smaller for all of our networks

Make gas limits smaller. For dag it will be equal to 31.5M which is equal to 1500 basic transfer transactions. And 315M for pbft block, but this is not a hard cap and actual pbft block could be larger in some situations

prnet cleaned-up successfully


[ENH] Support a "coalesce" repartitioning type hint

In SQL, it's common to work w/ large data and aggregate or filter it down to few enough rows that it could be merged into a single partition in memory.
Today you can achieve this with something like:
import pandas as pd
import dask.dataframe as dd

pdf = pd.DataFrame({'val': [0, 1, 2, 3, 4, 5]})
ddf = dd.from_pandas(pdf, npartitions=2)

c.create_table('test', ddf)
print(c.sql("select * from test").npartitions)
# 1
coalesced_ddf = c.sql("select * from test").repartition(npartitions=1)
c.create_table("test_coalesced", coalesced_ddf)
print(c.sql("select * from test_coalesced").npartitions)
# 2

It would be nice to support something like:
c.sql("""
SELECT /*+ COALESCE(1) */ * FROM test
""").npartitions
# 1

As a motivator, Dask DataFrames can use a broadcast or "map-side" join if one of the DataFrames consists of a single partition. Allowing users to specify partition coalescing hints will allow finer control over performance of Dask-SQL join performance.

I can handle this one


Add an option to uninstall Asahi or instructions in the docs

I installed Asahi on my machine just to test a few things and go back to MacOS. I gave it 70Gb to test games and such. Now I can't give the space back to my main drive. Adding an option in the installer to uninstall it would be helpful for people who need that in the future. But for me, I've messed with my partitions and such so much that whatever's added probably wouldn't help me at the moment. Here's a link to my stackoverflow question if you can help (please do as I need more space on my main drive now as I only have a base model.) @marcan

Absolutely agree. Or consider warning users the resize is rather complicated (for newer users) to reverse. Less technical users would have a pretty tough time figuring out how to get their disk back to where it was.

We're going to add an uninstall option in the future, but it'll necessarily be limited in what cases it can handle, since there's no magic way of safely handling every possible partitioning state and users can make their own changes from Linux or do completely different things using third-party installers launched from UEFI mode.
In the meantime, I wrote up a guide on how the partitioning works here. Does that help?

It will work, but you'd have to move the Asahi partitions upwards into the free space before you can resize the Asahi root partition. That can't be done while the system is booted into Linux, and diskutil won't move partitions for you, so you'd have to use some kind of live Linux recovery environment. I want to offer our users something like that for this and other reasons :)

Tracking this in #83 now.
Duplicate of #83

Duplicate of #83


Separate dp sizes from pixel sizes and only use px sizes for rendering.

Should hopefully fix issues with monitors set to different scales.

There still seems to be problems on macOS

MacOS does not seem to be responding to invalidate_rect commands, for now I added a quick fix. Will need to investigate later once I have a better way of testing on MacOS.


fixed flag-name in upgrade notes

fixed flag-name in upgrade notes: "constrainOnlyCenter" instead of "constrainCenterOnly"

fixes #10506

Thanks @fgubler !


Inscribe directly to an Opendime

[x] test should write dummy address.txt to tmp dir
[ ] add ability to send to opendime (not only inscribe)
[ ] test on mainnet
[ ] more checks and asserts
[ ] check that Opendime is sealed
[ ] ability to import unsealed Opendime and send with wallet

[ ] should run through all checks that inscription not sent in fee
[ ] should be able to add inputs if necessary
[ ] for now refuse to send if more than one output/inscription on Opendime

[ ] would also be cool to save the actual inscription on the Opendime since it is a USB drive
[ ] ability to show inscriptions on opendime (import to ord as watch-only)

There’s already a destination flag for the inscribe command (added by some handsome genius), what are you going for that isnt already covered? You can already inscribe straight to an opendime/satscard.
Is the idea to add deeper integration or something else?

I liked the UX of just plugging in a fresh Opendime and it generating the address directly instead of manually dragging files into it. Also want to add support to plug in an unsealed Opendime, importing the privkey and sending it off with the wallet.

Dope


Doesn't work install package on Laravel Fresh Install

Error
I got an error after installing the framework package.
Here's the error

Reproduce Error
First command
composer create-project --prefer-dist laravel/laravel  my-market
Second command
composer require shopper/framework
Env
PHP 8.1
Laravel v9.3.8
Mac OS 12.5.1

same here

I got similar error on Laravel 9, it because of the simple-cache dependency, try to specify the psr/simple-cache version as ^2.0 in your composer.json
composer require psr/simple-cache:^2.0 maatwebsite/excel

@kevin700523 , Thanks, it's working. It could be alternate for now.


Dnscrypt-proxy will not run on Raspian stretch on rpi

When attempting to run dnscrypt-proxy on a raspberry pi with raspian stretch I just get this error:
./dnscrypt-proxy: 1: ./dnscrypt-proxy: Syntax error: ")" unexpected
I've tried on 2.0.8, 2.0.9, and 2.0.10 all with the same problem.. I even completly reinstalled the os to see if that helped.

I swear I tried both arm versions. Thanks though.


Push ViewController to left menu cause pushing it to main view

New Issue Checklist

I have read the guidelines for contributing and I understand:

[x] My issue is happening in the latest version of SideMenu.
[x] My issue was not solved in the README.
[x] My issue can not be answered on stackoverflow.com.
[x] My issue is not a request for new functionality that I am unwilling to build and contribute with a pull request.
[ ] My issue is reproducible in the demo project.

Issue Description

On left menu I have ViewController with button which should show another ViewController inside left menu. So inside my LeftMenuViewController do:
    self.navigationController?.pushViewController(leftMenuDetailsVC, animated: true)

However it pushes VC to mainNavigationController not leftMenuNavigationController
    SideMenuManager.menuLeftNavigationController?.pushViewController(leftMenuDetailsVC, animated: true)

works the same way.
How can I push VC to left menu?

Please read the README carefully.

@szooky Curious if you managed to get it working?

@szooky @spinach
SideMenuManager.default.menuPushStyle = .subMenu

/**
The push style of the menu.

There are six modes in MenuPushStyle:

defaultBehavior: The view controller is pushed onto the stack.
popWhenPossible: If a view controller already in the stack is of the same class as the pushed view controller, the stack is instead popped back to the existing view controller. This behavior can help users from getting lost in a deep navigation stack.
preserve: If a view controller already in the stack is of the same class as the pushed view controller, the existing view controller is pushed to the end of the stack. This behavior is similar to a UITabBarController.
preserveAndHideBackButton: Same as .preserve and back buttons are automatically hidden.
replace: Any existing view controllers are released from the stack and replaced with the pushed view controller. Back buttons are automatically hidden. This behavior is ideal if view controllers require a lot of memory or their state doesn't need to be preserved.
subMenu: Unlike all other behaviors that push using the menu's presentingViewController, this behavior pushes view controllers within the menu.  Use this behavior if you want to display a sub menu.
*/
open var menuPushStyle: MenuPushStyle = .defaultBehavior


Inference

Hi! I'm trying to perform inference on Sentinel-2 imagery. I am using the esrgan_8S2.pth weights and the basic infer_example.yml for my config file. I'm obtaining my imagery from the sentinel hub, and i've combined the images to get a [number_sentinel2_images * 32, 32, 3] dimension. number_sentinel2_images in my case would be 8. I'm getting some super weird results.
Input:

lr:

Results/Hr:

This is my first github issue. Let me know if you need any additional information from me!

Hi, thanks for your interest in the project! I responded to your email with a similar question, but make sure you are running inference on 32x32 chunks of the larger Sentinel-2 images, rather than resizing them down to 32x32. The model won't expect images like that.

Hi piper, thanks for the response. I got it working, I will close this issue. Thank you very much for your support!

Hi Aiden. Can you please share how did you make it work?
I also faced the same issue. My output super resolution is like below:

Hi, this is what Piper (Code owner) sent me:
You will want to run inference over 32x32 pixel chunks of the resulting image, rather than resizing the whole image to 32x32.
So if you have 8 images from SentinelHub where each image is 1024x1024 pixels, do something like:
# your_images = tensor of shape [8, 3, 1024, 1024]
for x in range(0, 1024, 32):
   for y in range(0, 1024, 32):
      x_y_output = run_inference(your_image[:, :, x:x+32, y:y+32])

Following her method, I wrote my code to chunk the images into 8x32x32xC chunks (assuming you have the 8 image pretrained model), and stich them back together in the end
def combine_images_to_png(image_paths, output_path):
    # Initialize an empty array for the combined image
    combined_image = []

    for i, img_path in enumerate(image_paths):
        # Read each image and place it in the correct position
        # img = imageio.imread(img_path)
        # img = resample_and_convert_to_png(img_path)
        img = Image.open(img_path)

        # img = img.resize((32, 32), Image.Resampling.LANCZOS)
        img_array = np.array(img, dtype=np.uint8)
        H, W, C = img_array.shape
        sq_l = min(H, W)
        sq_l_32_m = sq_l - (sq_l % 32)
        subtract_margin = (sq_l - sq_l_32_m) // 2

        cropped_img = img.crop((subtract_margin, subtract_margin, subtract_margin + sq_l_32_m, subtract_margin + sq_l_32_m))
        img_array = np.array(cropped_img, dtype=np.uint8)
        # print(img_array.shape)
        L = img_array.shape[0]
        process_count = L // 32
        if len(combined_image) == 0:
            for j in range(process_count**2):
                combined_image.append([np.zeros((8 ,32, 32, C), dtype=np.uint8), (0,0)])

        # print(len(combined_image))

        for j in range(process_count):
            for k in range(process_count):
                # print(combined_image[0][i].shape, img_array[0:32, 0:32, :].shape)
                # print(j*process_count+k, j, k)
                combined_image[j*process_count + k][0][i] = img_array[j*32: (j+1)*32, k*32: (k+1)*32, :]
                combined_image[j*process_count + k][1] = [j,k]

        # cropped_img.save("cropped_image.png")

    for i in range(len(combined_image)):
        combined_image[i][0] = np.reshape(combined_image[i][0], (8*32, 32, 3))
        # print(combined_image[i].shape)
        # cropped_img[i].save("cropped_image.png")
        # Save the combined image as PNG
        # imageio.imwrite(f"{output_path}_{combined_image[i][1][0]}-{combined_image[i][1][1]}.png", combined_image[i][0])
        skimage.io.imsave(f"{output_path}_{combined_image[i][1][0]}-{combined_image[i][1][1]}.png", combined_image[i][0])

Stitching back:
def stich_back(new_dir, output_dir):

    sr_images = []  # List to store the image arrays
    directories = next(os.walk(new_dir))[1]
    # directories.sort()

    # Loop through each directory
    for directory in directories:

        file_path = os.path.join(new_dir, directory, 'sr.png')

        if os.path.isfile(file_path):
            img_array = imageio.imread(file_path)

            sr_images.append([img_array, file_path.split("/")[-2]])

    if len(sr_images) == 0:
        print("No images found.")
        return

    image_count = int(math.sqrt(len(sr_images)))
    if image_count**2 != len(sr_images):
        print("Error: The number of images does not form a perfect square.")
        return

    len_portion = sr_images[0][0].shape[0]
    final_img = np.zeros((len_portion*image_count, len_portion*image_count, 3), dtype=np.uint8)

    for i in range(len(sr_images)):
        j = int(sr_images[i][1].split("-")[0])
        k = int(sr_images[i][1].split("-")[1])
        block = sr_images[i][0]
        # Calculate the position in the original image where this block should be placed
        start_row, start_col = j * len_portion, k * len_portion

        # Place the block in the correct position in the reconstructed image
        final_img[start_row:start_row+len_portion, start_col:start_col+len_portion, :] = block

    # imageio.imwrite(output_dir, final_img)
    skimage.io.imsave(output_dir, final_img)

You will need to modify my code to fit your purpose. Hopefully this helps!

Thanks for your quick response. I have another query. How did you normalize the satellite data?
In my case, I downloaded the satellite raw sentinel 2 L1c data. Then extract the rgb satellite image(band2, band3, band4) from raw data. Then I normalize through dividing by 10000. Then I  test with the given model weights. But I do not get proper output. Like sometimes houses are also detected as field or anything else.
Can you share how did you normalize to get the correct output?

The code already normalizes the image. No need to perform any extra steps if you downloaded the images following the instructions

Thanks for your quick response. I have another query. How did you normalize the satellite data?
In my case, I downloaded the satellite raw sentinel 2 L1c data. Then extract the rgb satellite image(band2, band3, band4) from raw data. Then I normalize through dividing by 10000. Then I test with the given model weights. But I do not get proper output. Like sometimes houses are also detected as field or anything else.
Can you share how did you normalize to get the correct output?

In my case, I used raw L1C bands and recreated the TCI properties like this: ((img-1000)/3558)*255.

minus 1k to account for the change in dynamic range since 2022
/3558 is the factor used for the L1C TCI composition, this brings you to 0..1 range. /10000 will not do the trick, since the model expects the TCI composition. Sen2 TCI info
*255 to get to unit8 and save to .png
Then in the dataloader it just does /255,  no further normalization

With this preprocessing I got okay results.

what did you mean by raw L1c bands? Did you use only the TCI band or  (B2, B3, B4)?
Can you share data processing steps before and after normalization?

Thanks for your quick response. I have another query. How did you normalize the satellite data?
In my case, I downloaded the satellite raw sentinel 2 L1c data. Then extract the rgb satellite image(band2, band3, band4) from raw data. Then I normalize through dividing by 10000. Then I test with the given model weights. But I do not get proper output. Like sometimes houses are also detected as field or anything else.
Can you share how did you normalize to get the correct output?

In my case, I used raw L1C bands and recreated the TCI properties like this: ((img-1000)/3558)*255.

minus 1k to account for the change in dynamic range since 2022
/3558 is the factor used for the L1C TCI composition, this brings you to 0..1 range. /10000 will not do the trick, since the model expects the TCI composition. Sen2 TCI info
*255 to get to unit8 and save to .png
Then in the dataloader it just does /255,  no further normalization

With this preprocessing I got okay results.

what did you mean by raw L1c bands? Did you use only the TCI band or (B2, B3, B4)? Can you share data processing steps before and after normalization?

Thanks for your quick response. I have another query. How did you normalize the satellite data?
In my case, I downloaded the satellite raw sentinel 2 L1c data. Then extract the rgb satellite image(band2, band3, band4) from raw data. Then I normalize through dividing by 10000. Then I test with the given model weights. But I do not get proper output. Like sometimes houses are also detected as field or anything else.
Can you share how did you normalize to get the correct output?

In my case, I used raw L1C bands and recreated the TCI properties like this: ((img-1000)/3558)*255.

minus 1k to account for the change in dynamic range since 2022
/3558 is the factor used for the L1C TCI composition, this brings you to 0..1 range. /10000 will not do the trick, since the model expects the TCI composition. Sen2 TCI info
*255 to get to unit8 and save to .png
Then in the dataloader it just does /255,  no further normalization

With this preprocessing I got okay results.

The same thing you mean by raw data - using the bands diretly instead of the TCI. And the steps I described are what's needed to bring the image into the same normalization domain as TCI, ergo needed for the inference.


Fix compute in unsound null safety debug mode

After @lrhn explained in my previous pull request why he used some assertions, I realized I completely forgot about unsound null-safety.
Meaning, some of my assertions (those being suggested for removal) would in fact throw an incorrect AssertionError when the caller was calling with unsound null-safety. Of course this would only happen in debug mode. But still...
Thus, this pull request:

removes those assertions and lets ... as Type calls do all the casting / type checking,
adds some general tests in a // @dart=2.9 marked file (testing in unsound null-safety mode),
sets --enable-asserts flag when calling a file in a separate process

Additional note:
I opted to calling just a few tests in unsound null-safety mode instead of copying the full test suite and marking it with // @dart=2.9. And, I used a process to spawn the unsound null-safety mode file, instead of creating a new test suite. It made the intention clearer to me.
cc: @goderbauer
Pre-launch Checklist

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I read the Tree Hygiene wiki page, which explains my responsibilities.
[x] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
[x] I signed the CLA.
[x] I listed at least one issue that this PR fixes in the description above.
[x] I updated/added relevant documentation (doc comments with ///).
[x] I added new tests to check the change I am making, or this PR is test-exempt.
[x] All existing and new tests are passing.

Gold has detected about 1 new digest(s) on patchset 1.
View them at https://flutter-gold.skia.org/cl/github/100544

@dnfield Can you do a secondary review?


more data

How do more data, or how to control scroll.

Grid does not have a ScrollView. You can wrap it in to one like so
ScrollView {
    Grid { ... }
}

Do change data you just update the data itself and grid will redraw itself.

sorry for my bad english.
Detecting that the person has seen the last data and asking for more from the server.
So how can the new item be brought down as it goes down. I tried a lot but I couldn't solve it.

Lazy loading is not possible at the moment.


Deprecated functions used in Ramba

In particular:  module parser is not available in Python 3.10+
Ray 2.0 marks placement_group parameter as deprecated

These have been fixed.


Images not delivered as WebP

Sample image: https://cdn.statically.io/img/wpspeedmatters.com/wp-content/uploads/2019/12/chat-bubbles-1160x680.jpg
The image is not delivered as WebP even if the browser supports it.
Here is more info:

Seems to be fixed. Thanks!


Win10Pro 10.0.18362.836 all green, but not working

Hi. This morning my pc with win10pro updated and wrapper stops working.
As always, I go to https://github.com/asmtron/rdpwrap/blob/master/res/rdpwrap.ini - Page with ini, downloaded it and replaced that ini in folder.
After I restart pc config starts saying that all is OK (just standart screen with all things green).
But, when I'm trying to connect, it allows only one user to work, another one is kicked from work. Like Wrapper is not working.
Then I tried this thing - https://github.com/stascorp/rdpwrap/issues/1083 . No changes.
What can I do to it start working, so both users can work at the same time?

Just to confirm, both users have separate user accounts on the system? If
you log in remotely using the same user account as the person logged in to
the local console, it will always detach the session from the console and
connect it remotely. It is best to give different users separate user
accounts on the local system. 'Multiple sessions per user' allows 2 people
to connect remotely using the same user account, and (maybe) allows a
person to get a new session at the console without disconnecting a remote
user.
On Wed, 15 Jul 2020 at 16:27, Gh0sTG0<EMAIL_ADDRESS>wrote:

Hi. This morning my pc with win10pro updated and rdp stops working.
As always, I go to [
https://github.com/asmtron/rdpwrap/blob/master/res/rdpwrap.ini](Page with
ini), downloaded it and replaced that ini in folder.
After I restart pc config starts saying that all is OK (just standart
screen with all things green).
But, when I'm trying to connect, it allows only one user to work, another
one is kicked from work. Like Wrapper is not working.
What can I do to it start working, so both users can work at the same time?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/stascorp/rdpwrap/issues/1118, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAMCGIR4AHKL67SR6WABXRLR3VD6XANCNFSM4O2GVPCA
.

rdp

Just to confirm, both users have separate user accounts on the system? If you log in remotely using the same user account as the person logged in to the local console, it will always detach the session from the console and connect it remotely. It is best to give different users separate user accounts on the local system. 'Multiple sessions per user' allows 2 people to connect remotely using the same user account, and (maybe) allows a person to get a new session at the console without disconnecting a remote user.
…
On Wed, 15 Jul 2020 at 16:27, Gh0sTG0 @.***> wrote: Hi. This morning my pc with win10pro updated and rdp stops working. As always, I go to [ [https://github.com/asmtron/rdpwrap/blob/master/res/rdpwrap.ini](Page](https://github.com/asmtron/rdpwrap/blob/master/res/rdpwrap.ini](Page) with ini), downloaded it and replaced that ini in folder. After I restart pc config starts saying that all is OK (just standart screen with all things green). But, when I'm trying to connect, it allows only one user to work, another one is kicked from work. Like Wrapper is not working. What can I do to it start working, so both users can work at the same time? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#1118>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMCGIR4AHKL67SR6WABXRLR3VD6XANCNFSM4O2GVPCA .

Ofc we are separate users. It's not new setup. It worked for ~2 years and already had some number of updates that needed to change ini. It worked yesterday, but this morning windows updated =(
PS tried to uninstall-reboot-install-reboot-(for emergency)replace ini-reboot. It not works.

So... Some strange things and now I don't have that problem more.
I just checked windows update and there was some windows 10 update for x64... smth like that (didn't screenshoot, sry) and one 07.20 for 09.19 update.
So, what I did:
-uninstall rdp.
-update win for that updates
-reload
-use https://github.com/asmtron/rdpwrap/blob/master/binary-download.md this instruction. No original installer, only launching autoupdate.bat
...
Profit. It works for me now.


Generate SQL utility missing

System information:

Operating system (distribution) and version: Windows 10
DBeaver version: 7.1.1

Connection specification:

Database name and version: Oracle
Driver name: JDBC

Describe the problem you're observing: When right clicking a record the menu does not display the Generate sql utility https://dbeaver.com/docs/wiki/SQL-Generation/
Steps to reproduce, if exist: right click a record

thanks for the bug report

Can't reproduce

Well, this is even worse. Table editor isn't working for Oracle.

Fixed

verified

Weird, but I had the same issue and even when I refresh in the table("data" tab), the lock icon on the column name is not gone, then I go to the table's properties("properties" tab) and refresh in there, now the column name appears, and when I go back to the table, the lock icon is gone and the problem is fixed!

@aderchox , thanks for the life hack!

Still have the same issue.
Version <IP_ADDRESS>010181902

Still have the same issue.
Version <IP_ADDRESS>010181902

And datagrip has the same issue.


reified element constraints do not get handled correctly

This might fit in a wider discussion of what to do in decompose_globals and what to do in reify_rewrite. Currently global functions in a comparison do not get decomposed or normalized in decompose_globals, but it happens in reify_rewrite.
(example: (Abs(x) == iv).implies(bv) falls through decompose_globals, even when abs is not in supported_reified
this is ok since reify_rewrite turns this into abx(x) == iv1, iv == iv1.
But for Element we have a special case in reify_rewrite that is not equivalent. for example the following two sets of constraints have different solutions:
const3 = [(lis[iv[0]] == iv[1]).implies(bv[0]), (lis[iv[0]] == iv[1]).implies(bv[0]) | (~((lis[iv[0]] == iv[1]).implies(bv[0])))]
const4 = [(bv[1]).implies(bv[0]), (bv[1]).implies(bv[0]) | (~((bv[1]).implies(bv[0]))),(lis[iv[0]] == iv[1]) == bv[1]]
(const 4 is just normalized version of const3)
fix: handle reified global functions in decompose_globals, or remove special case for element in reify_rewrite.
bug found while fuzztesting with solutions counting (mutators used: or-mutator)

So the issue boils down to this: How to handle (reified) element constraints when the index is out of bounds.
When not reified, everyone agrees this should be false (= unsat)
when reified, in cpmpy we treat it like it is false (so the negation can become true)
But solvers treat it as unsat no matter the context of the element expression.


Update README.md

The link to the 7-zip version of Inkscape is out of date (the link leads to an empty directory). Updated the link.
Changed ".7Zip" to "7-Zip"

Thanks @davidbuhler !


Sort class properties in the built-in docs

Online docs are already sorted alphabetically, but the built-in help used the default order (similar to the one you see in the inspector). This made it harder to navigate the help when you were looking for specific properties, as they may be anywhere in that flat list.
We also sort pretty much every other documentation item, so it makes sense to do this here.

Thanks!


Writes in the middle of files

With a mounted disk.img I encountered a problem when I needed to write to the middle of files. For example, the second echo command is supposed to erase the entire file and does not:
$ echo<PHONE_NUMBER> > test.txt
$ echo -n KO > test.txt && cat test.txt
KO34567890

The two echo commands send SSH_FXP_OPEN then SSH_FXP_LSTAT then SSH_FXP_WRITE then SSH_FXP_CLOSE. As far as I think I can't tell the difference (from the server side) if the user's intention is to delete the file with a shell redirect or if the user just wants to update some bytes like with this program:
#include <stdio.h>
#include <assert.h>
#include <string.h>

int main()
{
	char* str = "KO";
	size_t l = strlen(str);
	FILE* fd = fopen("test.txt", "w+");

	assert(fd != NULL);
	//assert(fseek(fd, 3, SEEK_SET) != -1); // with this active we can see a SSH_FXP_READ before the WRITE
	assert(fwrite(str, sizeof(char), l, fd) == l);
	assert(fflush(fd) == 0);

	return 0;
}

There is in fact a sligh difference, my do a LSTAT before openning the file, not sure if this will be done with any shells. This trace correspond to echo -n KO > test.txt:
2021-11-02 16:30:23 +01:00: DBG [sshfs_protocol] [SSH_FXP_LSTAT 12] for '/test.txt'
2021-11-02 16:30:23 +01:00: DBG [sshfs_protocol] [SSH_FXP_OPEN 13] for '/test.txt' attrs=4
2021-11-02 16:30:23 +01:00: DBG [sshfs_protocol] [SSH_FXP_LSTAT 14] for '/test.txt'
2021-11-02 16:30:23 +01:00: DBG [sshfs_protocol] [SSH_FXP_WRITE 15] '/test.txt' @0 (2)
2021-11-02 16:30:23 +01:00: DBG [sshfs_protocol] [SSH_FXP_CLOSE 16] for /test.txt
2021-11-02 16:30:23 +01:00: DBG [sshfs_protocol] [SSH_FXP_LSTAT 17] for '/'

This one to cat test.txt:
2021-11-02 16:30:57 +01:00: DBG [sshfs_protocol] [SSH_FXP_LSTAT 18] for '/test.txt'
2021-11-02 16:30:57 +01:00: DBG [sshfs_protocol] [SSH_FXP_OPEN 19] for '/test.txt' attrs=4
2021-11-02 16:30:57 +01:00: DBG [sshfs_protocol] [SSH_FXP_LSTAT 20] for '/test.txt'
2021-11-02 16:30:57 +01:00: DBG [sshfs_protocol] [SSH_FXP_READ 21] for '/test.txt' @0 (4096)
2021-11-02 16:30:57 +01:00: DBG [sshfs_protocol] [SSH_FXP_CLOSE 22] for /test.txt
2021-11-02 16:30:57 +01:00: DBG [sshfs_protocol] [SSH_FXP_LSTAT 23] for '/'

And finaly ./testw (which is the result of the compilation of the C program):
2021-11-02 16:31:08 +01:00: DBG [sshfs_protocol] [SSH_FXP_OPEN 29] for '/test.txt' attrs=4
2021-11-02 16:31:08 +01:00: DBG [sshfs_protocol] [SSH_FXP_LSTAT 30] for '/test.txt'
2021-11-02 16:31:08 +01:00: DBG [sshfs_protocol] [SSH_FXP_WRITE 31] '/test.txt' @0 (2)
2021-11-02 16:31:08 +01:00: DBG [sshfs_protocol] [SSH_FXP_CLOSE 32] for /test.txt

Update: I was wrongly using attrs instead of pflags. The issue is solved :shame: