cmd/compile: noop functions are not compiled away in certain cases

What version of Go are you using (go version)?
go version go1.9.2 linux/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
linux/amd64
What did you do?
I'm using the following file (noop.go):
package main

import "fmt"

func debug(data ...interface{}) {}

func op() {
  fmt.Println("Op")
}

func main() {
  debug("123")
  op()
}

I compile the file using: go tool compile noop.go.
Then I inspect the object file using: go tool objdump noop.o.
What did you expect to see?
Ideally I expect to see no traces of the debug function.
In a non-ideal, but a good outcome I expect to see no calls to the debug function.
What did you see instead?
A call to the debug function.
noop.go:12 0x569 e800000000 CALL 0x56e [1:5]R_CALL:%22%22.debug
noop.go:13 0x56e e800000000 CALL 0x573 [1:5]R_CALL:%22%22.op

Additional information
If I replace signature of the debug function to:
func debug(data string) {}

I get the "good" scenarion:

the debug function is present
no calls to the debug function exist

I suspect "certain cases" == "when the function is not inlined". Variadic functions (... arguments) are currently not inlined in the default configuration. This looks like a bad interaction between the inliner and the dead-code-elimination pass. We have a few issues about this.

@ALTree I'm not familiar with inline expansion rules of the Go compiler.
Here's what I did, to see if inline expansion mechanism worked on the code above.
I've changed the debug function to be:
func debug(data string) {
  fmt.Println(string)
}

I expected to see the call to the debug function to be inlined after compilation, but looking at objdump output it does not seem to be the case on my environment.
noop.go:14 0x640 e800000000 CALL 0x645 [1:5]R_CALL:%22%22.debug
noop.go:15 0x645 e800000000 CALL 0x64a [1:5]R_CALL:%22%22.op

Then debug won’t be a leaf function as it calls the complex fmt.Println. This is being worked ok, search for mid stack inlining, but afaik is not enabled at the moment.

On 3 Dec 2017, at 04:30, pavel<EMAIL_ADDRESS>wrote:
@ALTree I'm not familiar with inline expansion rules of the Go compiler.
Here's what I did, to see if inline expansion mechanism worked on the code above.
I've changed the debug function to be:
func debug(data string) {
fmt.Println(string)
}
I expected to see the call to the debug function to be inlined after compilation, but looking at objdump output it does not seem to be the case on my environment.
noop.go:14 0x640 e800000000 CALL 0x645 [1:5]R_CALL:%22%22.debug
noop.go:15 0x645 e800000000 CALL 0x64a [1:5]R_CALL:%22%22.op
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@pavel as Dave pointed out, it's a different issue.
func debug(data ...interface{}) {}

vs
func debug(data string) {
  fmt.Println(string)
}

The former function is variadic, the latter isn't. The former has an empty body, the latter doesn't.
It's still not clear to me what issue are you reporting here. Is that we don't inline variadic functions? That we don't inline nonleaf functions? We already have issues open for those things, and work has been done to fix them. Or is this just about you wanting to understand the inlining rules?

@ALTree Sorry, I've deviated from my original issue with this inline expansion comments of mine.
The original issue is that calls to and "empty" functions (i.e. functions with empty body) are not getting removed during compilation.
Discard all my comments regarding inline expansion. My issue is described in my first comment for this issue (i.e. compiler does not remove calls to and functions with empty body).

(i.e. compiler does not remove functions with empty body and calls to them).

FTR: Empty function body is not a sufficient condition for eliminating the call.

At tip, the no-op function now is indeed elided:
"".main STEXT size=48 args=0x0 locals=0x8
	0x0000 00000 (x.go:11)	TEXT	"".main(SB), $8-0
	0x0000 00000 (x.go:11)	MOVQ	(TLS), CX
	0x0009 00009 (x.go:11)	CMPQ	SP, 16(CX)
	0x000d 00013 (x.go:11)	JLS	41
	0x000f 00015 (x.go:11)	SUBQ	$8, SP
	0x0013 00019 (x.go:11)	MOVQ	BP, (SP)
	0x0017 00023 (x.go:11)	LEAQ	(SP), BP
	0x001b 00027 (x.go:11)	FUNCDATA	$0, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
	0x001b 00027 (x.go:11)	FUNCDATA	$1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
	0x001b 00027 (x.go:11)	FUNCDATA	$3, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
	0x001b 00027 (x.go:13)	PCDATA	$2, $0
	0x001b 00027 (x.go:13)	PCDATA	$0, $0
	0x001b 00027 (x.go:13)	CALL	"".op(SB)
	0x0020 00032 (x.go:14)	MOVQ	(SP), BP
	0x0024 00036 (x.go:14)	ADDQ	$8, SP
	0x0028 00040 (x.go:14)	RET
	0x0029 00041 (x.go:14)	NOP
	0x0029 00041 (x.go:11)	PCDATA	$0, $-1
	0x0029 00041 (x.go:11)	PCDATA	$2, $-1
	0x0029 00041 (x.go:11)	CALL	runtime.morestack_noctxt(SB)
	0x002e 00046 (x.go:11)	JMP	0

There is no call to debug.
So this is fixed?

https://go-review.googlesource.com/100456 is the fix.

I wonder if this is working as expected. When I add a couple of more arguments to the call to debug I see calls to convT2E. i would have expected those to be gone if the function call is elided:
"".main STEXT size=144 args=0x0 locals=0x50
	0x0000 00000 (/tmp/x.go:11)	TEXT	"".main(SB), $80-0
	0x0000 00000 (/tmp/x.go:11)	MOVQ	(TLS), CX
	0x0009 00009 (/tmp/x.go:11)	CMPQ	SP, 16(CX)
	0x000d 00013 (/tmp/x.go:11)	JLS	134
	0x000f 00015 (/tmp/x.go:11)	SUBQ	$80, SP
	0x0013 00019 (/tmp/x.go:11)	MOVQ	BP, 72(SP)
	0x0018 00024 (/tmp/x.go:11)	LEAQ	72(SP), BP
	0x001d 00029 (/tmp/x.go:11)	FUNCDATA	$0, gclocals·69c1753bd5f81501d95132d08af04464(SB)
	0x001d 00029 (/tmp/x.go:11)	FUNCDATA	$1, gclocals·713abd6cdf5e052e4dcd3eb297c82601(SB)
	0x001d 00029 (/tmp/x.go:11)	FUNCDATA	$3, gclocals·1cf923758aae2e428391d1783fe59973(SB)
	0x001d 00029 (/tmp/x.go:12)	PCDATA	$2, $0
	0x001d 00029 (/tmp/x.go:12)	PCDATA	$0, $0
	0x001d 00029 (/tmp/x.go:12)	MOVQ	$0, (SP)
	0x0025 00037 (/tmp/x.go:12)	PCDATA	$2, $1
	0x0025 00037 (/tmp/x.go:12)	LEAQ	go.string."xyzzy"(SB), AX
	0x002c 00044 (/tmp/x.go:12)	PCDATA	$2, $0
	0x002c 00044 (/tmp/x.go:12)	MOVQ	AX, 8(SP)
	0x0031 00049 (/tmp/x.go:12)	MOVQ	$5, 16(SP)
	0x003a 00058 (/tmp/x.go:12)	CALL	runtime.stringtoslicebyte(SB)
	0x003f 00063 (/tmp/x.go:12)	MOVQ	32(SP), AX
	0x0044 00068 (/tmp/x.go:12)	PCDATA	$2, $2
	0x0044 00068 (/tmp/x.go:12)	MOVQ	24(SP), CX
	0x0049 00073 (/tmp/x.go:12)	MOVQ	40(SP), DX
	0x004e 00078 (/tmp/x.go:12)	PCDATA	$2, $0
	0x004e 00078 (/tmp/x.go:12)	PCDATA	$0, $1
	0x004e 00078 (/tmp/x.go:12)	MOVQ	CX, ""..autotmp_4+48(SP)
	0x0053 00083 (/tmp/x.go:12)	MOVQ	AX, ""..autotmp_4+56(SP)
	0x0058 00088 (/tmp/x.go:12)	MOVQ	DX, ""..autotmp_4+64(SP)
	0x005d 00093 (/tmp/x.go:12)	PCDATA	$2, $1
	0x005d 00093 (/tmp/x.go:12)	LEAQ	type.[]uint8(SB), AX
	0x0064 00100 (/tmp/x.go:12)	PCDATA	$2, $0
	0x0064 00100 (/tmp/x.go:12)	MOVQ	AX, (SP)
	0x0068 00104 (/tmp/x.go:12)	PCDATA	$2, $1
	0x0068 00104 (/tmp/x.go:12)	LEAQ	""..autotmp_4+48(SP), AX
	0x006d 00109 (/tmp/x.go:12)	PCDATA	$2, $0
	0x006d 00109 (/tmp/x.go:12)	MOVQ	AX, 8(SP)
	0x0072 00114 (/tmp/x.go:12)	CALL	runtime.convT2Eslice(SB)
	0x0077 00119 (/tmp/x.go:13)	PCDATA	$0, $0
	0x0077 00119 (/tmp/x.go:13)	CALL	"".op(SB)
	0x007c 00124 (/tmp/x.go:14)	MOVQ	72(SP), BP
	0x0081 00129 (/tmp/x.go:14)	ADDQ	$80, SP
	0x0085 00133 (/tmp/x.go:14)	RET
	0x0086 00134 (/tmp/x.go:14)	NOP
	0x0086 00134 (/tmp/x.go:11)	PCDATA	$0, $-1
	0x0086 00134 (/tmp/x.go:11)	PCDATA	$2, $-1
	0x0086 00134 (/tmp/x.go:11)	CALL	runtime.morestack_noctxt(SB)
	0x008b 00139 (/tmp/x.go:11)	JMP	0

here's my modified code:
package main

import "fmt"

func debug(data ...interface{}) {}

func op() {
	fmt.Println("Op")
}

func main() {
	debug("123", 1, []byte("xyzzy"))
	op()
}

How hard would it be to do purity optimizations for known-pure runtime functions like conv*? (Not necessarily deriving what functions are pure; just using a hand-coded list.) It seems like that should be easy, but maybe we first need a higher-level SSA call representation? /cc @dr2chase since he's been thinking about purity analysis.

@aclements I suspect it could be done pretty easily in this special case with a generic rewrite rule that checks for conv functions with unused results and eliminates them. The rewrite rule will be awkward, but that's nothing new.

Punting to 1.13, too late for anything major in 1.12.

This bug, as currently specified, was actually fixed when @mdempsky enabled his new escape analysis algorithm.  The reason that the runtime.conv* calls were created in the first place was because (I think) the old escape analysis algorithm was not proving that the arguments to debug() were not escaping, probably related to the variadic function call.  With the new escape analysis in place, the runtime.conv* routines are not generated.  All the args are created on the stack, and therefore all operations related to the debug function call can be and are dead-coded.
I think we probably just want to close this bug.  We could create a new bug or proposal for the more general case of understanding when functions (like runtime.conv* or user functions) have no side effects, and optimizing/removing when their results are not used.
Here's an example of a function where the compiler could get rid of the purefunc() call, after inlining inlinedfunc() and doing constant propagation, etc, but currently purefunc() remains in the code (of course, since the compiler doesn't record that purefunc has no side effects):
package main

func main() {
	mytest("abc", 1)
}

//go:noinline
func mytest(s string, n int) int {
	var r int
	a := purefunc(s)
	if inlinedfunc() < 4 {
		r = a
	} else {
		r = 3
	}
	return r
}

//go:noinline
func purefunc(s string) int {
	return 18
}

func inlinedfunc() int {
	return 5
}


Make -c clip all the secret, not first line

If you create a multiline secret using e.g. gopass edit and then show
it, you see all of the lines.
If you copy it to the clipboard via -c, only the first line gets
copied to the clipboard.
This makes with and without -c behave identically.

That -c only copies the first line of a secret is a feature not a bug. That behavior is identical to the one in the original pass and needs to be kept this way.
What we can talk about might be another flag that copies the whole secret and not the first line.

https://github.com/justwatchcom/gopass/pull/21


Change output name of nb::object to Any

The typing.Any seems better for the output type names of nb::object and nb::handle.
The type checker may complain to the user's code if the return type is annotated with the object. This is because the object is the base class of all objects in Python, and only operations that are valid for all types are allowed on the object type.
ref: https://mypy.readthedocs.io/en/latest/dynamic_typing.html#any-vs-object

I'm not so sure about this change. Even the typing documentation says that one should prefer object if in doubt.

If you’re not sure whether you need to use object or Any, use object – only switch to using Any if you get a type checker complaint.

You can use different type narrowing techniques to narrow object to a more specific type (subtype) such as int. Type narrowing is not needed with dynamically typed values (values with type Any).

What about adding a type nb::any that is equivalent to nb::object but renders differently in type signatures?

I thought that returning a (pure) nb::object in nanobind effectively abandons the type annotation so that the equivalent would be Any for that situation. Adding nb::any_ seems flexible. This leads Any can be annotated for the arguments, too.
I can create a new PR about this. Can I ask you what name is good since nb::any is already defined in nb_ndarray.h. Implementation is like:
class any_ : public object {
public:
    using object::object;
    using object::operator=;
    static constexpr auto Name = detail::const_name("typing.Any");
};

Great. I think in this case it's more important the Any type to be associated with nb::any than the ndarray size tag. The 2.0.0 release is the perfect opportunity for such a compatibility-breaking change.  I made a commit to a new remove_any branch. Could I ask you to make the change on top and then create a new commit combining everything? Please mention the new wrapper in the documentation and add a testcase that checks that it's rendered as expected in function signatures.

Closing this in favor of #460.


Lock 10 Fix for Single Log Out

Following the same pattern here to include a compatible Lock 10 version of auth0-singlelogout-handler-lock10.php when Lock 10 is enabled in the Auth0 Wordpress plugin settings. Please see support ticket #19829

It needs to be handled a little bit different.
Since new versions of Lock does not exposes auth0.js, we need to inject that js instead of using the lock one.
I will try to do the change this week and let you know

@codyayers if you can give a try to this PR https://github.com/auth0/wp-auth0/pull/294 I can release it tomorrow

Closing this PR because it was taken care of by @glena with PR #294


Add schema endpoint to be able to download graphql schema

**Is your feature request related to a problem?
I am using latest preview of HotChocolate.AspNetCore (12.0.0-preview.19) and there seems to be no endpoint exposed for downloading of graphql schema.
Describe the solution you'd like
Add default middleware that will build and and returns graphql schema.
Additional context
I have found some old documentation that states that this functionality existed, but I am unable to find this in current 11+ release.

You should be able to download the schema as described here: https://chillicream.com/docs/hotchocolate/api-reference/aspnetcore/#graphql-schema-request
I'm closing this issue for now. If what's described above doesn't work for you, feel free to re-open this issue. :)

Thank you, it works :)


Not working..?

[x] This issue isn't duplicated - you can check if it is by using the search bar located at the top left hand corner and select "Issues" on the left.
[x] This issue includes appropriate markdown for sections - e.g. code blocks for crash dumps.
[x] This issue is understandable - feel free to use your native language to write issues if you are not comfortable with English.

Issue description
It doesnt works

Reproducing the issue

Borders Plugin not working, this is the console error

Client information
PocketMine-MP Version: 3.7.0
Plugin Version: 1.5.0-pre
PHP version: 7.2.1 (default)

Optional information
ErrorException: "Undefined offset: 1" (EXCEPTION) in "plugins/MyPlotBorders/src/jasonwynn10/MyPlotBorders/Main" at line 89

Put a console error here, but please make sure you have your debug level set to 2 in your pocketmine.yml

Borders Plugin is not MyPlot. Please do not spam this repo with issues from other plugins


Error downloading models

I get either 404 not found, a corrupted file or a failed download can you please provide a new link?
Thank you in advance this work is looking great!

So I still got errors trying to unzip but here's why (I am in Ubuntu):
Link to Stack Exchange


installing tool fails

I'm finding the readme a bit unhelpful in how I would use the tool (eg I don't care about data/packages/), so figured I'd try to install the tool and run the binary. Installing fails:
cargo install --path . --locked

error[E0658]: use of unstable library feature 'once_cell'
   --> /home/d/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-0.72.2/src/cargo/util/mod.rs:215:9
    |
215 |     use std::sync::OnceLock;
    |         ^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #74465 <https://github.com/rust-lang/rust/issues/74465> for more information

error[E0658]: use of unstable library feature 'once_cell'
   --> /home/d/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-0.72.2/src/cargo/util/mod.rs:216:19
    |
216 |     static UMASK: OnceLock<libc::mode_t> = OnceLock::new();
    |                   ^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #74465 <https://github.com/rust-lang/rust/issues/74465> for more information

error[E0658]: use of unstable library feature 'once_cell'
   --> /home/d/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-0.72.2/src/cargo/util/mod.rs:216:44
    |
216 |     static UMASK: OnceLock<libc::mode_t> = OnceLock::new();
    |                                            ^^^^^^^^
    |
    = note: see issue #74465 <https://github.com/rust-lang/rust/issues/74465> for more information

error[E0658]: use of unstable library feature 'once_cell'
   --> /home/d/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-0.72.2/src/cargo/util/mod.rs:216:44
    |
216 |     static UMASK: OnceLock<libc::mode_t> = OnceLock::new();
    |                                            ^^^^^^^^^^^^^
    |
    = note: see issue #74465 <https://github.com/rust-lang/rust/issues/74465> for more information

error[E0658]: use of unstable library feature 'once_cell'
   --> /home/d/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-0.72.2/src/cargo/util/mod.rs:221:12
    |
221 |     *UMASK.get_or_init(|| unsafe {
    |            ^^^^^^^^^^^
    |
    = note: see issue #74465 <https://github.com/rust-lang/rust/issues/74465> for more information

For more information about this error, try `rustc --explain E0658`.
error: could not compile `cargo` due to 5 previous errors
error: failed to compile `cargo-scan v0.1.0 (/home/d/hack/cargo-scan)`, intermediate artifacts can be found at `/home/d/hack/cargo-scan/target`

For the install error, you'll probably just have to update your version of cargo.

@deian ran into this as well a few weeks ago. Run rustup update and this should solve the problem (Latest build has been tested on elk + mac)
And thanks -- I updated the README instructions with this fix and to clean up some of the out of date mentions, e.g. data/test-packages. Scan/auditing should work well, for transitive auditing infrastructure (--chain binary) see the AUDITING.md file for instructions, let us know if you have feedback!


Update recipe/conda_build_config.yaml

Checklist

[ ] Used a personal fork of the feedstock to propose changes
[ ] Bumped the build number (if the version is unchanged)
[ ] Reset the build number to 0 (if the version changed)
[ ] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[ ] Ensured the license file is being packaged.

add version r 4.0 and 3.6

@conda-forge-admin please rerender

@conda-forge-admin please rerender


Fix broken headings in Markdown files

GitHub changed the way Markdown headings are parsed, so this change fixes it.
See bryant1410/readmesfix for more information.
Tackles bryant1410/readmesfix#1

Thanks for the PR :D


:four_leaf_clover: Proposal: Supports DTM version switching

What Would You Like to Add? Why Is This Needed?
Supports DTM version switching

Please download every update
New MAC downloads require permission

[ ] Support upgrade to latest
[ ] support downgrade order with downgrade or other similar
Design

in 0.6.0
dtm upgrade

show it is now 0.6.1

in 0.6.1
dtm downgrade

show it is now 0.6.0

Anything else

/cc @devstream-io/devstream More detailed design required.

Will implement it soon. Probably will release in the next minor version. @hxcGit

I see that #840 has been merged. If this issue has been resolved, please close it~

@iyear  Please hold! This feature need further enhancements and feedback from users. I'll submit some PRs to improve the reliability of this feature. Maybe after the release of v0.8.0, we 'll find some bugs.


garbage collection of non verified users

there should be a process to cleanup signed up but not verified (confirmed) users.

We need a more global garbage collector to delete for instance running stacks of a deleted user/org/team


Converting an especific column to number

I have a workbook and I need to convert it to JSON. However, I need the column value as a number.
I'm using the following function:
    public to_json(workbook: any): {} {
        const result: any = {};
        workbook.SheetNames.forEach((sheetName: any) => {
            const roa = XLSX.utils.sheet_to_json<MyType>(workbook.Sheets[sheetName]);
            if (roa.length > 0) {
                result[sheetName] = roa;
            }
        });
        return result;
    }

The interface is:
interface MyType {
    Code?: string;
    Group?: string;
    Description?: string;
    Value?: number;
    proceduresGroupID?: number;
}

How can I convert the column Value to Number instead String which is the actual result?

Call sheet_to_json with the raw:true option:
            const roa = XLSX.utils.sheet_to_json<MyType>(workbook.Sheets[sheetName], {raw:true});

Thank you so much! That's works really well.


selectively show refuel option

only show refuel option, when it's supported.
the useEffect in Refuel component will still get triggered even if null is rendered, ensuring that this is only a display change.
storybook demo:

Hey @junhohong, thanks for the PR. This looks good, but would be good to introduce a parameter to enable/disable this. Let's set it to false by default so that the default behaviour stays as is.
Let me know if you have any doubts.

@salil-naik addressed!


Increase timeouts when uploading huge files

nginx has a default timeout of 60 seconds. No more. Fix #68

Task linked: QF-1649 Timeout errors in QFieldSync when uploading large files


srelay: init at 0.4.8b5

Adds srelay, a neat tool for proxying.

LGTM, but any reason why you packaged 0.4.8b5 instead of the newer 0.4.8b6?

I don't think so. I'll see if I can package 0.4.8b6.

Updated to 0.4.8.b6

Thanks! :beers:


Arrow keys || Backspace key does not work randomly (rare)

Issue Type: Bug
After the recent update(s), rarely, the arrow keys OR the backspace key stops working. This has happened around 3 times in the last week. 2x in office and 1x just now on my machine. I don't know how to reproduce it. Automatically, gets fixed if I change the cursor position by clicking somewhere else.
VS Code version: Code 1.50.0 (93c2f0fbf16c5a4b10e4d5f89737d9c2c25488a3, 2020-10-07T06:10:52.432Z)
OS version: Windows_NT x64 10.0.18363

System Info

Item
Value

CPUs
Intel(R) Core(TM) i5-3470S CPU @ 2.90GHz (4 x 2893)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: disabled_offopengl: enabled_onprotected_video_decode: unavailable_offrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
15.97GB (8.02GB free)

Process Argv
[redacted] --crash-reporter-id 992e8aa5-f144-4f45-83a7-45b0c7e43aad

Screen Reader
no

VM
0%

Extensions (11)

Extension
Author (truncated)
Version

vscode-markdownlint
Dav
0.37.1

vscode-eslint
dba
2.1.10

gitlens
eam
10.2.2

prettier-vscode
esb
5.7.1

graphql-for-vscode
kum
1.15.3

rainbow-csv
mec
1.7.1

dotenv
mik
1.0.1

vscode-docker
ms-
1.6.0

LiveServer
rit
5.6.1

sort-lines
Tyr
1.9.0

material-theme
zhu
3.9.3

(2 theme extensions excluded)

Please let me know if you manage to find any steps. Otherwise, perhaps you have some customizations in keybindings.json or perhaps some of these extensions "steal" some of the keybindings in certain conditions?

I have not installed any extensions recently. So probably VSCode or extensions compatibility. Have not faced this issue again yet.

@alexdima , just faced the issue again. And I have more details.
I typed p- and the autocomplete showed me some suggestions, such as p-0. I hit the Enter key and instead of autocompleting the suggestion. It inserted a new line and then the bug occurs. Backspace, Arrow keys, Delete key stopped working. I was able to use the characters keys.
I had to re-open the file to fix the issue.

@mfaheemakhtar are you using some special input method? Or are you using the standard US keyboard layout?

I am using the standard US keyboard layout. I will update this thread when it happens again, probably with more details.

I'm having this issue as well, on two separate Windows 10 machines. It happens to at least to the Home/End keys as well, and possibly others. I will pay more attention next time it happens and provide more info then.
If I recall correctly, if I click out of the editor (say, focus the terminal), and back again, key functions return to normal. Here is a link to a gist containing my keybindings.json, for what it's worth.
This seems to be a regression related to #24107?

@blakeNaccarato #24107 is unrelated, that one is about linux which uses a different keyboard dispatching mechanism (based on scan codes and not on key codes). When you see this again, can you please try the following:

Run the command Developer: Toggle Keyboard Shortcuts Troubleshooting

This will activate logging of dispatched keyboard shortcuts and will open an output panel with the corresponding log file.

You can then press your desired keybinding and check what keyboard shortcut VS Code detects and what command is invoked.


Use REST for measurement collections exceeding the mqtt-limit of 16K

For measurement collection below 16K its perfect to send via mqtt to use less data traffic.
For measurement collections above 16K thats not possible, the mqtt of c8y is limited to 16K messages.
It would be great that thin-edge.io transfers measurement collections larger than 16K automatically via REST.

I really want to avoid adding this feature - at least for now.
The reason is that this introduces a lot of internal complexity. Not because one has then to deal with two protocols (MQTT and HTTP) but because these protocols are not using the same communication pattern (pub/sub vs req/res). We experienced many issues because of this for events.
However, we are starting a refactoring that will help. So this could be reconsidered - say in 3 months.
Meantime, it would be good to understand the true need here. Why sending several messages would not work? What about having thin-edge cutting large inputs to fit Cumulocity constraints?

Good point.
In my optionon, a better solution would be to split the large collection of measurements into several parts, so that we wouldn't lose the buffer function (in case of connection loss) of mosquitto.
Either way, in cumulocity the costs for measured values are settled in 4k blocks.


[BUG] ¿Shadow? when draw chart

I'm using Opera, and when draw or hover chart, somethings appears a shadow, from x=0 y=0 to the point it draw.
I tested same chart on chrome and firefox and don't appears the shadow.
i attach a image

@markvm15 can you please create a jsfiddle that reproduces this issue?

For the bug to appear, pass the mouse hover the elements, switching between them.
I test on:
Chrome  70.0.3538.67 (Build oficial) (64 bits) -- have bug
Firefox Quantum -- don't have bug
Opera 56.0.3051.36 -- have bug
https://jsfiddle.net/markvm15/wLt3mru4/11


getArcGISCSVURL without the server name

Gets the full manifest and finds the data source based on
widget name.  From the data source, you can get the server.
** This code has not been run.  Please validate if you merge it **

The key insight is that you can get a full manifest by looking at /data.
From there, you have to find the widget and get the data source,
then pull the meta-data for the source which contains the services
URL.
It is not 100% clear if we'd be better searching on name or caption.
to find the widget.  Caption is the HTML title for widget.  Name is
internal and not present in rendered UI.  I choose name because
Texas uses an image.

Closing the request and replacing it.

Okay -- I fixed the lint errors but hit a conflict on README.md caused by adding a note that you need to install node.
I have to admit that I really don't like the modern javascript world.  It looks cleaner thanks to async but it is still such a weak foundation.  Typescript makes it bearable.  I'm going to head back to Python.  Can you finish it from here?

Fixed the merge issues, but when I pushed, github closed the PR. Odd.


Dalton seems to not recognize IPv6 packets as having a session

I uploaded the attached PCAP which has a session (including a TCP SYN packet), and it gives me the following error:
As Dalton says, "pain don't hurt." But an incomplete pcap sure can.

The pcap file 'alert_file_IPv6.pcap' contains TCP traffic but does not contain any TCP packets with the SYN flag set.

Almost all IDS rules that look for TCP traffic require an established connection.
You will need to provide a more complete pcap if you want accurate results.

If you need help crafting a pcap, Flowsynth may be able to help --
https://github.com/secureworks/flowsynth

And, "there's always barber college...."

alert_file_IPv6.pcap.zip

Good catch, thanks for the feedback.
Dalton uses a tcpdump pcap filter to see if there are any TCP packets in the pcap and if so, verify that there is at least one TCP packet with the SYN flag set:
https://github.com/secureworks/dalton/blob/53e8c905fc4ac56a3dfaa18c964f0cef1517ea42/dalton-agent/dalton-agent.py#L534
Turns out that this syntax isn't supported with IPv6; from https://www.tcpdump.org/manpages/pcap-filter.7.html:

To access data inside the packet, use the following syntax:
proto [ expr : size ]
Proto is one of ether, fddi, tr, wlan, ppp, slip, link, ip, arp, rarp, tcp, udp, icmp, ip6 or radio, and indicates the protocol layer for the index operation. (ether, fddi, wlan, tr, ppp, slip and link all refer to the link layer. radio refers to the "radio header" added to some 802.11 captures.) Note that tcp, udp and other upper-layer protocol types only apply to IPv4, not IPv6 (this will be fixed in the future)....

I can address in a future update but for now you can just ignore that warning; it's a check that runs after the job has finished and doesn't affect the results.

Good catch, thanks for the feedback.
Dalton uses a tcpdump pcap filter to see if there are any TCP packets in the pcap and if so, verify that there is at least one TCP packet with the SYN flag set:
https://github.com/secureworks/dalton/blob/53e8c905fc4ac56a3dfaa18c964f0cef1517ea42/dalton-agent/dalton-agent.py#L534
Turns out that this syntax isn't supported with IPv6; from https://www.tcpdump.org/manpages/pcap-filter.7.html:

To access data inside the packet, use the following syntax:
proto [ expr : size ]
Proto is one of ether, fddi, tr, wlan, ppp, slip, link, ip, arp, rarp, tcp, udp, icmp, ip6 or radio, and indicates the protocol layer for the index operation. (ether, fddi, wlan, tr, ppp, slip and link all refer to the link layer. radio refers to the "radio header" added to some 802.11 captures.) Note that tcp, udp and other upper-layer protocol types only apply to IPv4, not IPv6 (this will be fixed in the future)....

I can address in a future update but for now you can just ignore that warning; it's a check that runs after the job has finished and doesn't affect the results.


[SCHEMA] Insist .nii.gz be as reproducible as possible

By removing extraneous metadata, pipelines generating BIDS datasets can avoid making unnecessary changes.
We are motivated to this since we are working on combining BIDS with datalad in our workflows, and if a pipeline regenerates hundreds of images with no real change, then we rapidly bloat our storage costs and obscures real changes in git log. datalad (thanks to its dependency git-annex) avoids the bandwidth/storage costs of downstream users, since most of our users download once only, or are always downloading fresh HEAD copies to processing nodes, but our internal storage costs are a big factor for us.
This can be implemented with gzip -n in most environments, or equally by running strip-nondeterminism over a BIDS dataset before publishing.

I don't think we can make this a requirement as it will invalidate many existing datasets. I would support making it a recommendation, which would produce validation warnings, assuming there is a straightforward way to check for this metadata in Javascript.

Cool :). I thought you might say something like that. That would be okay, but I wanted to start out as strong as possible.
Before totally giving up on the "MUST", let me point out that strip-nondeterminism should be able to rapidly re-validate all those datasets. We've had to deal with breaking BIDS changes in our lab already that involved more complicated fixes than that.

Agreed that the fix is easy, and some labs will be willing to apply it. Apart from concern about making BIDS a moving target and generally annoying people who've done their bit, my perspective here is the OpenNeuro one, where we host data archives (so reproducibility of the archive isn't a concern) but don't generally have permission to update datasets on the user's behalf.
It is true that there've been breaks in the past; most breaking changes in the validator involved rules that were previously unenforced. There are some others where an ambiguity had to be resolved in one direction or another. We do honestly try to keep these to a minimum, and will generally try to accommodate existing practice except when it makes interpretation of the dataset ambiguous or incoherent.
For your lab/center's use case, the validator allows warnings to be promoted to errors, so internally you could have more strict validation. OpenNeuro does this for missing authors, as we can't generate DOIs without this metadata.
So my vote remains for a backwards-compatible SHOULD, though I would support moving to MUST in a BIDS 2.0.
xref https://github.com/bids-standard/bids-validator/issues/1400

the validator allows warnings to be promoted to errors

Oh okay! I hadn't noticed that yet. Thank you. That's good enough for me :)

Rebase changed apparent commit time, but it was authored on Nov 4, so this has passed the 5 day review period. Merging.


Support specifying chunk sizes using labels (e.g. frequency string)

Is your feature request related to a problem?
dask.dataframe supports repartitioning or rechunking using a frequency string (freq kwarg).
I think this would be a useful addition to .chunk. It would help with some groupby problems (as suggested in this comment) and generally make a few problems amenable to blockwise/map_blocks solutions.
Describe the solution you'd like

One solution is to allow .chunk(lon=5, time="MS"). There is some ugliness in that this syntax mixes up integer index values (lon=5) and a label-based frequency string time="MS"
So perhaps a second method chunk_by_labels would be useful where chunk_by_labels(lon=5, time="MS") would rechunk the data so that a single chunk contains 5° of longitude points and a month of time. Alternative this could be .chunk(lon=5, time="MS", by="labels")

Describe alternatives you've considered
Have the user do this manually but that's kind of annoying, and a bit advanced.
Additional context
No response

The chunk_by_labels functionality seems quite useful even when not talking about times, so I would be :+1: for that kind of option.
On the API question is there anywhere else in xarray where we have made some choice about how to let the user choose between specifying via indexes or labels? Apart from just .isel vs .sel I mean

coarsen vs groupby/groupby_bins/resample.
I explored this idea in this tutorial
I think it may be a fundamental concept for labelled array analysis. You need to pick whether you're working in "index space" like unlabelled arrays, or in "label space".  This also came up in this issue where shift (and roll) operate in "index space".
Another example: Alignment is in "label space", broadcasting seems like "index space" (you just change shapes, but it does use dimension names to do that so maybe 50/50).

Now I think the way to generalize is to eventually support Resampler objects.
I think overloading the existing .chunk is nicer that a new chunk_by method, but could be convinced otherwise.
I put up #9109 which allows specifying frequency strings.

Responding to @shoyer's comment:
The table here doesn't seem to overlap with MB, KB etc. but clearly this behaviour isn't tested. I'll fix that.
I see at least two ways to proceed with more explicit API:

A more explicit opt-in could be using Resampler objects, which we are pretty close to making public.
Alternatively we could add the more explicit chunk_by(time="5ME").

A more explicit opt-in could be using Resampler objects, which we are pretty close to making public.

I like this option.


[#1260] Group previews now have the same height.

Also: [#1260] The entire group image is now displayed, instead of a zoomed in version of it.

@hyi Can you review the small PR?

@hyi, I have applied the suggested changes now.


Recent Follower Reviews Unimplemented

Due to our time estimate for implementing user following being a bit optimistic, we ran out of time and were unable to implement the frontend for recent follower reviews. The backend code and tests are implemented however.

Implemented in Iteration 3


Captcha protected faucet

Just a draft showcasing how we can use a new (unreleased) external faucet endpoint inside the docs.
Of course would need some more styling to make it nicer.

Awesome, thanks for picking up the work on this, @rzadp !

If you're getting this when trying it out locally:

You can do the following:
sudo bash -c 'echo "<IP_ADDRESS> dev.use.ink" >> /etc/hosts'

And then open http://dev.use.ink:8080/ instead of http://localhost:8080/ in the browser and then it should work.

It works perfectly, thank you so much!


Option to use original title

Please add a option to use the original webpage title (tab title) as the bookmark name

Please add a option to use the original webpage title (tab title) as the bookmark name

Just a Tip: You can delete the Name text box, and Add/Write your own any text there.

You can delete the Name text box, and Add/Write your own any text there

Note: You can not edit the given text. You need to delete and add/write again.
I know this is not that functionality you expect, and asked for.
For that functionality I suggest - better it would be fill the Name automatically with both {page_url_domain}-{page_title} to be specific.

Ideal is use by default the same name used for common bookmarks, so, the original page title, this behavior can be a optional setting.


Move "Why Volunteer" into a separate button/menu item

Should be the rightmost button

Got it.  Can you let me know when the updated page is ready as well?  For now, I'll link to the google doc


Type-references from generated code in another package

Consider the following code:
typeRef := TypeReferenceFromInstance(bytes.Buffer{})
actual := typeRef.GetName()

actual will be assigned bytes.Buffer as the name, which contains the package qualifier as expected.
However, the TypeReference for generated specs (such as a StructSpec or InterfaceSpec) will not have a package qualifier because we don't know the package it belongs to until it is added to a FileSpec:
strSpec := NewStructSpec("Foo")
// strSpec.GetName() would return "Foo"

file := NewFileSpec("mypackage").CodeBlock(strSpec)

Consider the use case of getting a TypeReference to strSpec from another package. In this example, Foo belongs to package mypackage, and it is used in a function myFunc in package main:
strSpec := NewStructSpec("Foo")
mypackageFile := NewFileSpec("mypackage").CodeBlock(strSpec)

// we pass in strSpec as a TypeReference to use it as a result parameter
func := NewFuncSpec("myFunc").ResultParameter("", strSpec)
mainFile := NewFileSpec("main").CodeBlock(func)

Currently, the TypeReference for strSpec would only include its unqualified name, 'Foo'. I propose adding a method to a FileSpec that wraps a TypeReference with the File's package name:
strSpec := NewStructSpec("Foo")
mypackageFile := NewFileSpec("mypackage").CodeBlock(strSpec)
wrappedStrSpec := mypackageFile.WrapTypeReference(strSpec)

func := NewFuncSpec("myFunc").ResultParameter("", wrappedStrSpec)
mainFile := NewFileSpec("main").CodeBlock(func)

When wrappedStrSpec.GetName() is called, it returns mypackage.Foo.
Any suggestions / alternative approaches for using generated TypeReferences in other packages?
@kdeenanauth Would love to hear your thoughts on this!

It seems like a good idea. Especially as a stop gap to a bigger refactor @bmoylan outlined we would need to consistently resolve all of the issues.


feat: add @UseSerializer for user-definable serializers

The Special Willpower And Techniques (SWAT) team has arrived on scene to handle a high-complexity situation and made a previously unfeasible merge possible. (I'm joking, but it makes for a heck of an introduction, right? :laughing:)
This PR resolves #6 by:

Rebasing the feat/use-serializer branch on top of master, which entailed resolving conflicts due to divergences and modifying commit 2802703.

Addressing the exception described in #6 by defining custom serializers in their own files. This is necessary to work around a Kotlin Reflect limitation on local classes that has been known for years and ended up causing the described exception. The investigation that led to this conclusion is described in the report below.
To the best of my knowledge, this is the best possible workaround, as it does not require redesigning or dropping the whole custom serializer feature. Moreover, given proper documentation, I believe that most users won't find it very unpleasant.

Introducing several minor refactors and performance improvements to the existing code on separate atomic commits. They can be cherry-picked if necessary.

These changes do not modify the documentation because I'm not sure what would be the most appropriate way to do it. Apart from that, I think that there may be room for additional refactors and changes on this feature. But at least its tests pass now (./gradlew test completes successfully), which is an important step forward.

Investigation report (detailed description of what I've found about the issue and how)
Firstly, the issue was deemed feasible to fix because classes are explicitly supported as annotation parameter types. People usually write documentation with some understanding of the system being documented, and the writer would likely have noticed if it didn't work at all. Moreover, if a system is complex enough to break in strange ways, it usually means it is complex enough for workarounds to exist (this is something I learned through experience :wink:).
After deciding to give the issue a shot, I attempted to reproduce the exception in a debugger, which I managed to do:

Examining the stack frame and surrounding code, it stood to reason that the annotation interface instance is a dynamic proxy (remember that annotations are interfaces, so they must be instantiated somehow to be used). This proxy is created so that some hardcoded methods are always supported. Any additional methods, and in particular property getter methods, are only supported if they are present in the values parameter of the createAnnotationInstance method. In this case, the values map is empty, so values.containsKey(name) returns false, and the exception is thrown.
Naturally, this fact prompts the question: what's going on with the values map? It should "support" that method, but somehow it doesn't, and querying a search engine about the problem does not help much. Moreover, the stack trace does not say who instantiated the proxy and passed the values map because the proxy methods are called after the map is captured from the stack frame.
Here I had some insight: if a breakpoint is set at the return result as T line, where the proxy instance is returned, the stack trace would contain information about the method that called createAnnotationInstance and passed an empty values map. And indeed it did:

AnnotationDescriptor.toAnnotationInstance() is closer to the source of the problem! The values map is generated from the AnnotationDescriptor.allValuesArgument property, which has a simple implementation that looks correct. Moreover, the KClassValue class implements ConstantValue with no flaws for this purpose, meaning that Kotlin classes should have first-class support for being used in annotation descriptors. Most likely, what's wreaking havoc is the value.toRuntimeValue return value: that method can return a null value, and nulls are filtered out.
Things start getting ugly when looking at the toRuntimeValue method implementation, with has a fair share of TODO comments:

As I've asserted before, Kotlin class annotation values are represented by instances of KClassValue, which are explicitly handled by toRuntimeValue. Unluckily for us, however, KClassValues are further classified into values that represent "normal classes" and "local classes" (i.e., classes that are local to another class, like IntPairStringSerializerClass was to the test code at UseSerializerTest). And local classes are affected by a blatant TODO comment stating that "this doesn't work", referring to KT-30013, a four year old issue that nobody seems interested on.
I don't know why someone thought that adding such a TODO comment was better than throwing an exception, as the latter would motivate a fix and facilitate debugging: the stack trace of the resulting exception would be more meaningful and have a better message. But the root cause is clear now: ConstantValue<*>.toRuntimeValue returns null for local classes in annotation descriptors, so local classes can't be used there. Fortunately, refactoring a local class into a "normal class" is easy to do.

Thank you for the PR. The tests passed just fine, but there was one issue, so I pushed the commit and will close this PR.
You removed KtConfigSerializer#type but it's what you need for non-JavaBean types such as UByte. I confirmed that refactoring was incorrect by adding the following test.
class UByteUByteSerializer : KtConfigSerializer {
    override val type = typeOf<UByte>()

    override fun deserialize(value: Any?): Any? {
        return value as? UByte
    }

    override fun serialize(value: Any?): Any? {
        return value as? UByte
    }
}

    // UByte is supported by ktConfig and is not JavaBean.
    @Test
    fun ubyte_ubyte() {
        data class Data(val data: @UseSerializer(UByteUByteSerializer::class) UByte)

        assertEquals("data: 1\n", saveKtConfigString(Data(1U)))
        assertEquals(Data(2U), ktConfigString("data: 2"))
    }

Anyway, thanks to you #6 is solved.

Good catch, thank you! :+1:
I wasn't aware of why that type parameter was necessary, so I decided to remove it for simplicity.


CCL cannot find local version of fftw

I have been testing fresh installs of CCL, and it appears that running python setup.py install fails to find FFTW when it is already install. When running this command, I see that the libfftw files appear in CCL/build/extern/lib, and fftw3.h appears in CCL/build/extern/include.
The problem is that these files already exist where one would expect. Right now I have /usr/local/lib/libfftw3.a, and /usr/local/include/fftw3.h.
I think this is a bug, unless we are specifying a particular fftw version? Fixing this would make the installation script a bit lighter.

@tmcclintock is this problem still there in v2?

I installed using pip but it's difficult to see what steps were taken during installation. I looked in /anaconda3/lib/python3.7/site-packages/pyccl-2.0.1.dist-info/ as well as /anaconda3/lib/python3.7/site-packages/pyccl/ for any information but wasn't able to see if it found my local FFTW.
Since it appears nobody else has had this problem, I'll just go ahead and close it.


Remove tarball.MultiTar

This does not seem to be used by anything. We can revert this if we need, but currently the tests just make changing other code harder.

I don't see it used in melange or apko either.


Create DB Script

Add script in package.json to simulate db

this is done with yesterday's merge!


Updated summary view

Despite looking okay on screen the alignments were breaking
the DOM.  Pulled all sections back to the left margin to fix
the weird outdenting.

Looks fine


Contacts Technologies

Are you still doing this page?
I've assigned this 1 week ago.
Best regards

Yes, I'm working on it, my estimation is 4 days plus

Hello.
Your Estimation ends tomorrow.
Hopefully we will close the issue tomorrow.
Best Regards


api should also use yarn workspace system

The api service is currently not using the yarn workspace system, therefore during building the api Dockerimage we download already downloaded packages, which slows down the process of building.
On order to do that we probably need (just on top of my head though)

[ ] move dependencies and devDependencies from https://github.com/amazeeio/lagoon/blob/master/services/api/package.json into https://github.com/amazeeio/lagoon/blob/master/package.json
[ ] Adapt [api Dockerfile] (https://github.com/amazeeio/lagoon/blob/master/services/api/Dockerfile) to also use Docker Multi Stage build with lagoon-packages-builder build image, see example here https://github.com/amazeeio/lagoon/blob/master/services/openshiftdeploy/Dockerfile

this is done


Bug fixing DeepSource Analsyis

Description

Fixing unnecessary import
fixed arrow function call back issue in dashboard.js
fixed debug mode and URL pattern  in settings and urls.py
Added local storage of jwt tokens in dashboard.js with copy and delete methods

GSSoC 24 has been completed Finally'
It was a great experience working with you all
Thanks💗 for your valuable contributions!
PA nomination has been started, Do fill out the forms soon. Share your experiences and let's connect on socials


Added Lottie animations

Description
Successfully added lottie animations
Issue Resolved
Fixes #33
Screenshots
https://user-images.githubusercontent.com/81604986/197453601-2c409559-4632-499b-8226-a6862a3aea0e.mp4
https://user-images.githubusercontent.com/81604986/197453697-0b13be1b-6c3b-481d-ba83-218edddc5ad6.mp4
Checklist
Please make sure to review the following before submitting your PR:

[x] I have read the contribution guidelines.
[x] I have read the code of conduct.
[x] I have reviewed my submission in detail.

Lgtm, it's perfect 👍 , thanks for your contribution 😄

Wishing u a very Happy Diwali :)


Add Copywrites

What type of PR is this?
/kind cleanup
Does this PR introduce a user-facing change?
NONE

/assign @tenzen-y

@gabesaba: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:
Test name	Commit	Details	Required	Rerun command
pull-kueue-test-integration-main	49cd816 link	true	/test pull-kueue-test-integration-main
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

opened #2901
/retest


Add release notes

Inspiration:

k8s release page: https://kubernetes.io/releases/
https://docs.docker.com/release-notes/
https://docs.docker.com/engine/release-notes/

This is the PR containing the latest operator versions: https://github.com/stackabletech/release/issues/7


Update to mpris-service 2.0.0

Update the mpris-service dependency to the latest version. This update
should fix many of the outstanding issues with the GPMDP mpris
implementation.
fixes #2741

Hello,
Many of my users on Playerctl have been having problems with players that use mpris-service for their implementation of mpris for desktop integration.

https://github.com/acrisci/playerctl/issues/40
https://github.com/acrisci/playerctl/issues/81
https://github.com/acrisci/playerctl/issues/35

To fix this error, I have rewritten the mpris-service library using a dbus library that I wrote for this purpose that is a fork of dbus-native with added features required for implementing mpris.
I have tested this branch with Playerctl and things work as expected.
There is a bit more feature work required to be fully compatible which I plan to do such as implementing the shuffle and loop status features.
Thanks.

Testing...

Getting an error with the dbus interface name:
error: Uncaught Exception. Error: Invalid interface name: org.mpris.MediaPlayer2.google-play-music-desktop-player

Appears that - is not allowed in the interface name, so we should probably switch to _ for that as well.

False alarm, I forgot to build.

Thanks for the quick reply.
I've taken another look at it and implemented that position stuff in a force push.
Ready for another look.


[BUG] longhorn-ui has a warning message in the browser's console

Describe the bug
There is a warning message in the browser's console. as shown

To Reproduce
Steps to reproduce the behavior:

Create a volume
Check the browser console

Expected behavior
The time format returned by the back-end should be converted at the front-end to eliminate warning messages.

Validated on Longhorn-v1.2.x-head df6ad60 and Longhorn master-head - d250d9c - 11/15/2021
Validation - Pass
No warning in observed on console. Validated on the Longhorn UI using ingress and Rancher proxy.

@smallteeths let's backport this to 1.1.3.

@khushboo-rancher 1.1.3 merged.

Thanks, working on v1.1.3-head as well now.


Questions regarding the code

Hi,
3 questions i have regarding the code:

In the paper that presented the 'LRU' at section D.2. in the appendix (page 22 in the paper) the authors don't mention a second optimizer 'Adam' as you sued inside 'create_train_state' funtion at train_helpers.py .

Regarding the 'linear_warmup' function at 'train_helpers.py' - are you sure this is a linear warmup? According to the authors, we need to start with lr=1e-7 and linearly increase it.
It looks like you decrease the learning rate since you multiply it by  (step + 1) / end_step   which is a fraction ( end_step >> step).

In 'train_epch' function at 'train_helpers.py' why do you call 'update_learning_rate_per_step' after every batch and not only after every epoch (common when using CosineAnnealing scheduler) ?

Hello, sorry for the late reply! Regarding your questions:

The second optimizer is there to remove weight decay for recurrent parameters. This choice is for example done in the S5 code base. We found this setting to work in this regime but we didn't ablate it.
The learning rate increases as # steps / # total number of warm-up steps, so it does not start at 10^-7 but at 0.
The learning rate is updated after each iteration. The default optax CosineAnnealing scheduler should do the same thing.

Closing the issue for now


openfga: 1.5.6 -> 1.5.8

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/openfga/openfga/releases.
meta.description for openfga is: High performance and flexible authorization/permission engine built for developers and inspired by Google Zanzibar
meta.homepage for openfga is: https://openfga.dev/
Updates performed

Golang update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 1.5.7 with grep in /nix/store/6ijxsi0wc77rw3d79sjxr2ackxn23l9g-openfga-1.5.7
found 1.5.7 in filename of file in /nix/store/6ijxsi0wc77rw3d79sjxr2ackxn23l9g-openfga-1.5.7

Rebuild report (if merged into master) (click to expand)

2 total rebuild path(s)

2 package rebuild(s)

First fifty rebuilds by attrpath

openfga

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/6ijxsi0wc77rw3d79sjxr2ackxn23l9g-openfga-1.5.7 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A openfga https://github.com/r-ryantm/nixpkgs/archive/576a6918391f9daea10ef1ed5c27bfa200803c49.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/576a6918391f9daea10ef1ed5c27bfa200803c49#openfga

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/6ijxsi0wc77rw3d79sjxr2ackxn23l9g-openfga-1.5.7
ls -la /nix/store/6ijxsi0wc77rw3d79sjxr2ackxn23l9g-openfga-1.5.7/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

openfga

Maintainer pings
cc @jlesquembre for testing.

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/openfga/openfga/releases.
meta.description for openfga is: High performance and flexible authorization/permission engine built for developers and inspired by Google Zanzibar
meta.homepage for openfga is: https://openfga.dev/
Updates performed

Golang update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 1.5.8 with grep in /nix/store/2v8h119ynk3c7vq99dlapr6jwcslzajy-openfga-1.5.8
found 1.5.8 in filename of file in /nix/store/2v8h119ynk3c7vq99dlapr6jwcslzajy-openfga-1.5.8

Rebuild report (if merged into master) (click to expand)

2 total rebuild path(s)

2 package rebuild(s)

First fifty rebuilds by attrpath

openfga

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/2v8h119ynk3c7vq99dlapr6jwcslzajy-openfga-1.5.8 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A openfga https://github.com/r-ryantm/nixpkgs/archive/bd6ed9fd77c128d932deb80cd702172b18a1c772.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/bd6ed9fd77c128d932deb80cd702172b18a1c772#openfga

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/2v8h119ynk3c7vq99dlapr6jwcslzajy-openfga-1.5.8
ls -la /nix/store/2v8h119ynk3c7vq99dlapr6jwcslzajy-openfga-1.5.8/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

openfga

Maintainer pings
cc @jlesquembre for testing.

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


⚠ Bofrost.be has degraded performance

In 56b20c6, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 1681 ms

Resolved: Bofrost.be performance has improved in fb6e6b1 after 9 minutes.


footprints_to_shapes.py and pickpoint failure

Hello,
we are trying to use the footprints_to_shapes.py script, but generated footprints are not correct.
The main case where corners are unproject from model fails for many pictures (we are using a model generated from a very sparse point cloud ~ 75 m step with a bounding box that is much wider than the project bouding box as we just need rough footprints, so we would expect that pickpoint is always able to return a ray intersection.)
The fallover case were corners are unprojected from point_cloud do not fai (always return a value)l, but results seems wrong and the resulting footprints do not macth reality at all.
Do you have more details about the pickPont API for both model and dense_cloud ?
Regards

Hello,
pickPoint from model returns the first intersection from all ray intersections with triangles of model. So if ray (corresponding to corner of photo) doesn't intersect model - pickPoint resturns None.
pickPoint from points cloud projects all tie points on ray (corresponding to corner of photo) and returns from them the first one (i.e. the projection closest to ray origin, i.e. closest to camera position).
So on outskirts of the dataset where corners of photo doesn't have tie points nearly - far tie point will be used - it will be projected on ray (corresponding to the corner) and the projection can be far from real surface.

Thank you for additionnal details.
The background of our request is that we try to generate footprints from only the a priori orientations, and a model generated from a sparse (county scale) point cloud.
So we have a first script that "force" the orientation of the pictures without actually aligning them (no tie points generated) and the second script to generate the footprints from this repo.
If i understand correctly, as we have no tie points, the fall case to pointcloud pickPoint basically returns "non sense" values.
Still when generating a model from this sparse point cloud (actually a DSM), I don't understand why the model pickpoint would fail as the model is much wider than what is actually needed.

Yes, if the model is big enough and all rays intersect it - tie points cloud shouldn't be used.
Can you please provide the dataset (not necessary full - you can try to minimize the project such that problem still will be easy to reproduce, and send it as .psz project) to<EMAIL_ADDRESS>for internal testing?

We sent you some data, but this picture is to further illustrate a very light fake project.
I just took 4 images (actually 4 time the same image) with 0 0 0 orientations and position 20m one from each other, above a flat ground ~200m below.
The obtained footprint obvioulsy have an issue and I have no clue where it comes from

Can you please send this light fake project and tell how you created these four cameras (if with python script - please provide it)?
In your big project footprints seems to work (model created from tie points cloud):

Hola yo he intentado usar el script footprints_to_shapes.py con buenos resultados con pocas fotos, pero cuando intento hacerlo en un proyecto con 15000 imágenes el programa no responde y se cuelga.


code for downstream tasks

Dear authors,
Thanks for sharing your great work. I'm trying to find the code for downstream tasks presented in your manuscript but could not succeed. Could you please advise if such code has been released in this repository? If not, would you mind explaining more on the implementation details of the task "binding affinity prediction"? Any suggestions and comments would be much appreciated.
Many thanks and wish you all the best.

Dear authors, Thanks for sharing your great work. I'm trying to find the code for downstream tasks presented in your manuscript but could not succeed. Could you please advise if such code has been released in this repository? If not, would you mind explaining more on the implementation details of the task "binding affinity prediction"? Any suggestions and comments would be much appreciated. Many thanks and wish you all the best.

Hi, thank you for your interest in this project. I will update the code for predicting downstream tasks using the pretrained model as soon as possible.

Dear authors, Thanks for sharing your great work. I'm trying to find the code for downstream tasks presented in your manuscript but could not succeed. Could you please advise if such code has been released in this repository? If not, would you mind explaining more on the implementation details of the task "binding affinity prediction"? Any suggestions and comments would be much appreciated. Many thanks and wish you all the best.

Hi, thank you for your interest in this project. I will update the code for predicting downstream tasks using the pretrained model as soon as possible.

Thanks for your prompt reply. Looking forward to your update.

Dear authors, Thanks for sharing your great work. I'm trying to find the code for downstream tasks presented in your manuscript but could not succeed. Could you please advise if such code has been released in this repository? If not, would you mind explaining more on the implementation details of the task "binding affinity prediction"? Any suggestions and comments would be much appreciated. Many thanks and wish you all the best.

Hi, thank you for your interest in this project. I will update the code for predicting downstream tasks using the pretrained model as soon as possible.

Thanks for your prompt reply. Looking forward to your update.

Hello, I apologize for the delayed response. I have been busy with my graduation defense for the past few weeks.
I have added an examples folder. Specifically, in examples/models/pepland/inference.py, I have encapsulated two models:

FeatureExtractor: utilizing a pre-trained PepLand as the feature extractor.
PepLandPredictor: employing PepLand as the feature extractor, followed by an MLP as the predictor. This serves as an example of how to fine-tune PepLand as a property predictor on a specific dataset.

You can utilize examples/main.py to test these two types of models.
If you want to fine-tune the PepLand, simply train PepLandPredictor using a standardized training process. I will also provide a complete fine-tuning example as soon as possible.


Random failures regarding SegmentNotFoundException in multithreaded application

I am facing a problem in a multithreaded application where the dynamodb calls randomly fails to create a subsegment resulting in error message "Suppressing AWS X-Ray context missing exception (SegmentNotFoundException): Failed to begin subsegment named 'AmazonDynamoDBv2': segment cannot be found."
I am following the procedure in X-Ray documentation for passing segment context between threads as stated here - https://docs.aws.amazon.com/xray/latest/devguide/xray-sdk-java-multithreading.html and how its implemented in this example - https://docs.aws.amazon.com/xray/latest/devguide/scorekeep-workerthreads.html. In almost 70% cases the instrumentation is successful but the rest fails to find the segment when creating the subsegment.
In terms of implementation I am using custom fork join pool along with Java parallel stream.
forkJoinPool
              .submit(
                  () ->
                      filters.parallelStream()
                          .map(traceableFetcher)
                          .flatMap(Collection::stream)
                          .collect(Collectors.toList()))
              .get();

traceableFetcher gets passed the segment using awsXRayRecorder.getTraceEntity() and the implementation of the traceable class is the following
public class TraceableFunction<T, R> implements Function<T, R> {

  private final Function<T, R> target;

  private final Entity segment;

  @Getter private final MdcSnapshot mdcSnapshot;

  public TraceableFunction(Function<T, R> target, final Entity segment) {
    this.target = target;
    this.segment = segment;
    this.mdcSnapshot = new MdcSnapshot();
  }

  @Override
  public R apply(T t) {
    mdcSnapshot.populateMdc();
    var resultReference = new AtomicReference<R>();

    segment.run(() -> resultReference.set(target.apply(t)));

    mdcSnapshot.cleanMdc();
    return resultReference.get();
  }
}

It seems like in certain cases the ThreadLocalStorage doesn't have the segment or at least it has been cleared. Are you folks aware of any such issues or have any pointers? I am using com.amazonaws:aws-xray-recorder-sdk-core:2.9.1

|---parent segment---|
------|--- child subsegment ---|
That solution only woks if child subsegment is generated before parent segment close. If the sub thread starts later than main thread close, will get SegmentNotFoundException issue.
Please try to use SegmentContextExecutors


Wrong name or cuda version in cuda11.8.0-ubuntu22.04-oneclick/Dockerfile

Hey, thanks for you amazing work!
Yesterday I played around with your oneclick image and noticed that the CUDA_VERSION in the Dockerfile does not match the name of the image.
I'm not sure what combination you desired to create so i created the issue.
ARG CUDA_VERSION="12.1.1"
ARG CUDNN_VERSION="8"
ARG UBUNTU_VERSION="22.04"
ARG DOCKER_FROM=thebloke/cuda$CUDA_VERSION-ubuntu$UBUNTU_VERSION-textgen:latest
...

As far as i tested the image works well with cuda 12.1.1 installed. So this is large issue.
Kind regards
Michael

Yes I know. This is because changing the name of the container will require getting Runpod to update their template, and I've not had time to coordinate that.
It's mentioned in the README:

:man_facepalming: Sorry - didn't check the README, just dropped right into the sub-directory.
my fault :bowing_man:


Feature Convert all jquery code to vanilla JavaScript

Is your feature request related to a problem? Please describe
Now CircuitVerse is not using jquery and shifting to vanilla Javascript
Describe the solution you'd like
convert all jquery files to vanilla JavaScript
Task(files) to be done(converted):

app/assets/
[ ] app/assets/javascripts/restrictElements.js
[ ] app/assets/javascripts/scroll.js
[ ] app/assets/javascripts/webpush.js.erb
app/javascript
[ ] app/javascript/controllers/assignment_controller.js
[ ] app/javascript/controllers/groups_controller.js

Additional context
Note : Additional files will be appended to this issue.
Are you working on this?
Yes

@tanmoysrt @vedant-jain03 @VaibhavUpreti  Please assign this issue to me !

@tanmoysrt @vedant-jain03 @VaibhavUpreti Please assign this issue to me!

If you want to work on this, I guess We need to split it into smaller parts and sub-issues.
@vedant-jain03 @tachyons can say better on it.

@tanmoysrt @shauryag2002 I would also like to work on these tasks.

i can also contribute in this converting jquery to js as jquery is quiet old

can help as well

Hey there I would also like to work on this project . Thank you!

This is beyond the scope for now


Can't import the named export 'jsonRequest' from non EcmaScript module (only default export is available)

Hello i am receiving this error:

<EMAIL_ADDRESS>Can't import the named export 'jsonRequest' from non EcmaScript module (only default export is available)

here is my client.js:

import SanityClient from '@sanity/client';
import imageUrlBuilder from '@sanity/image-url';

export const client = SanityClient({
    projectId: process.env.REACT_APP_SANITY_PROJECT_ID,
    dataset: 'production',
    apiVersion:'2021-10-21',
    useCdn: false,
    token: process.env.NEXT_PUBLIC_SANITY_TOKEN,
});

const builder = imageUrlBuilder(client);

export const urlFor = (source) => builder.image(source);

whenever this export is imported in any file i get this error.
import {client} from '../client'

i have tried sanityClient, SanityClient and createClient all resulting in the same issue.
finally here is my package.json and a screenshot of the manager on sanity:
{
  "name": "excuse_frontend",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@react-oauth/google": "^0.7.0",
    "@sanity/client": "^4.0.1",
    "@sanity/image-url": "^1.0.2",
    "@testing-library/jest-dom": "^5.16.5",
    "@testing-library/react": "^13.4.0",
    "@testing-library/user-event": "^13.5.0",
    "axios": "^1.3.3",
    "jwt-decode": "^3.1.2",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-icons": "^4.7.1",
    "react-loader-spinner": "^5.3.4",
    "react-masonry-css": "^1.0.16",
    "react-router-dom": "^6.8.1",
    "react-scripts": "^2.1.3",
    "uuid": "^9.0.0",
    "web-vitals": "^2.1.4"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "devDependencies": {
    "tailwindcss": "^3.2.6"
  }
}

Any solutions? I can't find any proper solutions online.
Much appreciated.

Hi, could you try v5?
npm i<EMAIL_ADDRESS>


API Generator: Add support for filtering many-to-many-relations by id

@nsams the lint workflow fails


Support launch arguments

I've found that GloSC works as a mostly painless solution to problems with Steam link <--> emulators in terms of properly exposing controllers. However, there isn't any way I can pass the command line arguments needed to properly launch game titles.
I've peeked around and this didn't look too hard to add, so support for this soon would be very nice.
P.S. I've been trying to build this myself, but I'm getting
The procedure entry point vigem_target_set_vid could not be located in the dynamic link library C:\Program Files\GloSC\...

when I run a SteamTarget.exe copy. Any help there?

Regarding your ViGEm Problem:
Install the newest available version of ViGEm
And use the correct version ViGEmUM.dll out of GloSCs dependencies folder (x86 / x64) for your build type.
I haven't played with 32bit builds all too much, although they should work.
I'd recommend building x64 and using x64 libs
Also, link to the correct version, but that should already be setup properly in the project files.
Regarding launch arguments:
"I've peeked around and this didn't look too hard to add, so support for this soon would be very nice."
Feel free to submit a PR ;)
I'll look into it if I get the time for it, though

By the way, I got it built fine, thanks :). I had to get the VS Qt plugin and it modified some project files when I set the version, is that normal?
Also, I'm guilty of this too with small solo projects like these, but I wish some things were commented/documented a bit better. In particular I was curious of what the rationale behind the existence of GloSC_GameLauncher was? I could only make out that it's just polling a block of shared memory for a program name to launch, it seems like most of its functionality could be easily included inside SteamTarget?
I was curious since ideally I'd prefer if the spawned process closed when a launched SteamTarget instance exits (which typically happens through "Exit shortcut" in the overlay). Since a SteamTarget instance has basically no idea how to reach the program it launched through GloSC_GameLauncher, implementing this doesn't seem trivial.
Sorry for all the questions, but I just want to make sure I know what's going on before I start making significant changes!

Setting up the Qt version, and getting the Qt plugin, yes, totally normal business when using Qt and VS.
Setting Qt version even is included in the build guide. The Qt-Plugin, however, is not. I'll fix that
It has two purposes mainly.

If you launch a game, from a child process of Steam (the SteamTarget), Steam also injects the overlay in the then launched process.
(In case you're interested: Dynamic process forking the hacky Win32 way doesn't work...)
I could get around this by more hooking of Steam, but I want to keep this to a minimum or ideally get rid of that completely.

It acts as a safeguard for ejecting my .dll and unhooking Steam in case the Target process gets killed unexpectedly.

Reason 1 is somewhat briefly stated in the Readme and reason 2 a but in the build and installation guide.
It is totally possible to close the launched game from SteamTarget, though.
However, if the SteamTarget gets closed unexpectedly, you may or may not receive the close or similar event callbacks from the OS.
The way to go would be to implement this in the GloSC_GameLauncher too, or at least provide a second "safeguard", as it can easily provide that functionality since it's an "external" program, in which Steam doesn't have its fingers in.
In any case, I agree that there are some documentation needs for when other developers wanna chime in, although it really is a pretty small and mostly straightforward project, at least once you actually play with it. On the not so straight-forward stuff like the Steam hook, overlay messages, and so on, I hope I did enough in the comments and in this blogpost
I think that's enough OT for now, you can directly shoot me a mail or find me someplace else on the Internet if there are any more questions.


feat(extras): flutter/dart support

added flutter/dart support

Just added this to the contributing doc:

You should be familiar with the language you are adding.
You should have experience with the language's ecosystem, including formatters,
linters, and LSP servers.

I don't think the current extra is up to standard.
It also doesn't install the needed dartls lsp server.
But since I don't use dart/flutter myself, I can't really fully review this PR.
So do you have extensive experience in setting up dart/flutter in Neovim?

i currently do flutter and laravel so thats the main pr's i had in mind because it was a mess maintaining fragments in so many files in nvim directory

Just added this to the contributing doc:
* You should be familiar with the language you are adding.

* You should have experience with the language's ecosystem, including formatters,
  linters, and LSP servers.

I don't think the current extra is up to standard. It also doesn't install the needed dartls lsp server. But since I don't use dart/flutter myself, I can't really fully review this PR.
So do you have extensive experience in setting up dart/flutter in Neovim?

this doesnt install dartls because it is available in the dart-sdk , it isnt available in mason registry because it requires whole sdk to work, i mentioned in a comment in start that this requires dart/flutter sdk to work

@folke It seems that flutter-tools kind of works like rustaceanvim (or maybe more like old typescript.nvim). See this in their README

flutter tools does not depend on nvim-lspconfig. The two can co-exist but please ensure you do NOT configure dartls using lspconfig. It will be automatically set up by this plugin instead.

Now I don't do flutter at all, but I'm guessing if this is the case as with rustaceanvim it would be better to let users install the LSP server via the framework itself (like with Rust toolchain) and not install it via nvim-lspconfig.
I'm saying this with every bit of caution one can say, as I've 0 experience with flutter.

i currently do flutter and laravel so thats the main pr's i had in mind because it was a mess maintaining fragments in so many files in nvim directory, fyi flutter is a framwork on dart and this lsp works both with dart and flutter, i tested in a cli app in dart and a flutter app too

ok, thank you for the clarification

dart lsp sucks really bad, both in manual configiration and in flutter-tools.nvim, idk if it is buggy for only me or not , but i will close this pr as the lsp has really bad completion,linting,formatting times, it analyzies a empty project for like 10 seconds then starts giving completions,  not really worth creating and maintaining, i will do flutter in vscode with neovim extension


Schema definitions for repeating data reports

Validation is now recursive = one jsonschema can mention another using the regular
"$ref" : "http://example.org/other-schema#/definitions/foobar"

and as long as the schema with URI http://example.org/other-schema is in the DB it will fetch it and use for validation.
CC @willr3
Not sure if that is the goal of this issue?


Update README to add the FIREWATCH_REPORT_SUCCESS variable from OpenShfit CI ref

Forgot to add this documentation in a previous PR.

/verified


Fixed wrapping for long words to avoid horizontal scroll

Here's an example of the issue (in Num#Dec docs):

And the result of applied fix:

I've signed my commit, so it can be merged successfully.

Looks like this got stuck on CI machines. Just kicked it along.


Creating subquery while get count from relation with orderBy

When in relation use orderBy and next get count from \yii\db\ActiveQuery, it will be use subquery to select count, as fix may be rewrite orderBy by set empty array.
What steps will reproduce the problem?
class Category {
...
    public function getItems()
    {
        return $this->hasMany(Item::className(), ['category_id' => 'id'])
                ->orderBy(['date' => SORT_DESC]);
    }
...
}

$category->getItems()->count()
What is the expected result?
SELECT COUNT(*) FROM itemsWHEREcategory_id= ? ORDER BYdate DESC
What do you get instead?
SELECT COUNT(*) FROM (SELECT * FROM itemsWHEREcategory_id= ? ORDER BY dateDESC)c``
Additional info

Q
A

Yii version
<IP_ADDRESS>

PHP version
7.1.4

Operating system
centos 7

what is the problem? There should be no difference in the result as far as I see.

related to #13846

Hi there, I'm having a problem with the count and subquery too.
In my database, I have 2 lists, a subscriber can subscribe to 2 lists. so there is a junction table. And in the query I use the code like this.
$subquery = (new Query())->select([             new \yii\db\Expression('1')         ])             ->from("subscriber_list")             ->where([             'list_id' => $id         ])             ->andWhere("subscribers.id = subscriber_list.subscriber_id");         $subscribers = (new Query())->select("subscribers.*, subscriber_list.subscribed_at, group_concat(subscriber_list.list_id) as lists")             ->from("subscribers")             ->innerJoin("subscriber_list", "subscriber_list.subscriber_id = subscribers.id")             ->where([             'exists',             $subquery         ])             ->andFilterWhere([             'or',             [                 'like',                 'name',                 $query             ],             [                 'like',                 'email',                 $query             ]         ]);
Expected Pagination-total count : 1
Result : 2.

@lebedevsky this should have been fixed in #13846

I think the fix may be problematic. I'll illustrate my point with the following scenario :

I have a table with more than 3 million rows.
Among these rows , some users may have 10 records, others , say 700,000 records.
the goal is to display the most recent records for a particular user . Since some users may have very HIGH number of records, i've decided to max number of records to be displayed to 1000 (using LIMIT)  (and the result set will be paginated) .
Here comes the problem . Suppose that userA has 700+ k records.
If I run this query  (example) :
SELECT COUNT(*) FROM items WHERE user=userA_Id   ORDER BY date DESC LIMIT 1000
Then , the COUNT will have to count up to 700+ k records for userA which , in my cases , takes more than 2000ms.
Note here that the LIMIT 1000 has not impact to the COUNT since COUNT will still perform a full scan for UserA_ID

However, this command :
SELECT COUNT(*) FROM (SELECT * FROM items WHERE userId= userA_Id  ORDER BY date DESC LIMIT 1000 ) as T
takes about ~2ms.
As you can see, there's are differences in SQL syntax and potential performance consequences between the aforementioned commands.
Therefore I think that the previous change should be reverted or at least that there should be a function for COUNT to count the result of a subquery (which may be small subset as dictated by the LIMIT option
instead of making COUNT count ALL records .
I've been struggling to find a Clean way of using subqueries (as per example #2) to no avail.
How can I achieve the second scenario using Yii2 ?
Would appreciate your feedback on this matter.

Yii version : <IP_ADDRESS>

Thanks

TLDR: There is not silver bullet. The change you suggest will improve your query performance, but will slow down other queries. You should fix it on your side.

Sometimes a query performance can be improved (or worsen) by changing something really not obvious in SQL. It happens because the SQL is only an abstract language. SQL optimizer of your DBMS builds an execution plan and the magic that happens there sometimes is not predictable.
I know a good example from my daily life with PgSQL.
-- Find requests for clients of seller
SELECT * FROM requests WHERE client_id IN (SELECT id FROM client WHERE seller_id = 8418243);
-- Find clients that have requests
SELECT * FROM client WHERE id IN (SELECT DISTINCT client_id FROM requests);

vs
-- Find requests for clients of seller
SELECT * FROM requests WHERE client_id = ANY(array(SELECT id FROM client WHERE seller_id = 8418243));
-- Find clients that have requests
SELECT * FROM client WHERE id = ANY(array(SELECT DISTINCT client_id FROM requests));

Which one should be faster, considering every column included in this query is indexed? :) Think before reading the answer.
 :boom: Answer
The correct answer is "it depends". It depends on how many records will be returned in subquery (how many clients of the seller exist), on how many records are now in the `requests` table, how spread are they between clients. And with every single set of "it depends" the execution plan got changed and performance as well.


Fix serialization of black_hole to_yaml

Fixes #66  See there for details

I may also open this as a bug in ruby/psych that it only rescues a NoMethodError, not TypeError.. we'll see

failures are rubocop..

Coverage increased (+0.01%) to 97.53% when pulling 10e9a8a659531bb1737fb0ca767f7ec05c04624a on bf4:bf/fix_black_hole into ee4c8b412e65224401aee15d901bbb7d0f0821e4 on avdi:master.

Coverage increased (+0.01%) to 97.53% when pulling c9895a2af1e27ab818d97e422fd2d1e8a17fbca5 on bf4:bf/fix_black_hole into ee4c8b412e65224401aee15d901bbb7d0f0821e4 on avdi:master.

If you rebase from master, the RuboCop failures should be fixed. While you’re rebasing, would you mind doing an interactive rebasing and squashing these changes into a single commit? Ideally, the tests and related code changes would be in a single, atomic commit, in case they need to be reverted.
I have mixed feelings about the content of this change.  I’ll leave it up to @avdi as to whether this should be merged or not. Perhaps this problem is better addressed in the twitter gem directly than at the library level?

@sferik in the meantime, would you like a PR to add to_int to the Twitter::NullObject? That was my original patch before I dug down into it.

I would like @avdi to weigh-in first. If it’s an urgent issue for you, feel free to monkey patch your application.

@sferik not urgent at all, in fact my Gemfile is now
# until https://github.com/avdi/naught/pull/67 is merged
gem 'naught', github: 'bf4/naught', branch: 'bf/fix_black_hole'
gem 'twitter'

Coverage increased (+0.18%) to 97.7% when pulling eb3b33f27c2fbd3893a4071fe89b13d7bbc00c1e on bf4:bf/fix_black_hole into a73c0250afd0314e5ecc1ccad829f6760bb572b9 on avdi:master.

Fixed in https://github.com/avdi/naught/commit/d32d4ea32a9a847bffd6cf18f480bdfaaf7a3641.

@sferik Thanks for taking care of this.  I guess it couldn't be merged anymore?

I took a different approach to solving this problem, defining to_int as an implicit conversion.

:smile:

Released in version 1.1.0.


Adding course topics

What are the relevant tickets?
Fix https://github.com/mitodl/hq/issues/4110
Description (What does it do?)
Adding topics in MITx Online.
The ability to create delete topics through the cms, and add them to courses.
Populates topics with existing department names. I don't think it is necessary, but this is how it was done in mitxpro. And I think it is nice to have some topics to begin with.
Screenshots (if appropriate):

How can this be tested?
Run migrations
Run the app, go to the cms and make sure you can see Course Topics.
Click on it and try to add or delete a course topic.
Go to Course page add topic to a course page.

@annagav hey, my fault, but I think you will need to update this branch from main in order for the application to properly load.  Related to: https://github.com/mitodl/mitxonline/pull/2213

Can we pre-populate the topics with the ones from this spreadsheet: https://docs.google.com/spreadsheets/d/1Euu4ezPKeYkiTThvmxB5vFONFNG4fOULNW42F6qLuFI/edit?pli=1#gid=431773359

Can we pre-populate the topics with the ones from this spreadsheet: https://docs.google.com/spreadsheets/d/1Euu4ezPKeYkiTThvmxB5vFONFNG4fOULNW42F6qLuFI/edit?pli=1#gid=431773359

Should the first row be included?

Yeah, it's a hierarchy. The first row are the top-level topics. The other ones are children.

@collinpreston make sure reverse all three migrations before checking out the changes:
./manage.py migrate cms 0035
./manage.py migrate courses 0050

Looks good. I would just check whether Programs should also have Topics.

Following the example in xpro, no programs don't have topics.


Fix usage of inflect() in README

The usage of the string interpolation method inflect() was not
updated with the change in 8b164396, and thus none of the examples
worked as intended:
>>> import inflect
>>> p = inflect.engine()
>>> word = 'leaf'
>>>
>>> print(p.inflect("The plural of {0} is plural({0})".format(word)))
Traceback (most recent call last):
  ...
  File "/app/inflect/inflect.py", line 2132, in _get_value_from_ast
    raise NameError("name '%s' is not defined" % obj.id)
NameError: name 'leaf' is not defined
>>>
>>> print(p.inflect("The plural of {0} is plural('{0}')".format(word)))
The plural of leaf is leaves

This change adds single quotes (for readability) on all examples of
infect() in README.

Pull Request Test Coverage Report for Build 110

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

Totals

Change from base Build 107:
0.0%

Covered Lines:
1145

Relevant Lines:
1155

💛  - Coveralls


ERC721 unnecessarily emits an Approval event on transfers

🎉 Description

[x] 🐛 This is a bug report.
[ ] 📈 This is a feature request.

Currently, an Approval event is unnecessarily emitted when a transfer that resets an approval occurs. See comments towards the end of https://github.com/ethereum/EIPs/pull/841 clarifying that an Approval event should not be emitted in this scenario.

The 841 thread can't be used for identifying the standard's requirements, since they've been outdated by various updates to the primary spec at http://eips.ethereum.org/EIPS/eip-721
The text of 721:
    /// @dev This emits when ownership of any NFT changes by any mechanism.
    ///  This event emits when NFTs are created (`from` == 0) and destroyed
    ///  (`to` == 0). Exception: during contract creation, any number of NFTs
    ///  may be created and assigned without emitting Transfer. At the time of
    ///  any transfer, the approved address for that NFT (if any) is reset to none.
    event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId);

    /// @dev This emits when the approved address for an NFT is changed or
    ///  reaffirmed. The zero address indicates there is no approved address.
    ///  When a Transfer event emits, this also indicates that the approved
    ///  address for that NFT (if any) is reset to none.
    event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId);

Specifically, At the time of any transfer, the approved address for that NFT (if any) is reset to none. followed by This emits when the approved address for an NFT is changed or reaffirmed. doesn't provide any special case for approval changes as a side effect of transfers.
Let me know if you interpret that differently

@abandeali1 ah, sorry for not checking the thread directly. didn't realize it was fulldecent that had commented on the distinction. I do think my interpretation makes much more sense than the special case for transfer-initiated approval resets, but I'm not sure how flexible the standard is, now that it's been finalized. What are the pros towards not emitting the Approval event? An indexer trying to ascertain the full approval log of a token must also understand the implicit side effects of a Transfer event if they are to build an accurate history.
Anyway, the spec is confusing in this case, and the language should be updated to very clearly state the intention. I've reached out to @fulldecent in the ETH-NFt chat to get his understanding.

I just find it to be redundant - you're not gaining any extra information that you don't already get from the Transfer event (and of course, this costs gas). ERC20 doesn't emit an Approval event every time transferFrom is called either.

I can understand that, yeah. Looks like fulldecent has already approved and pushed the oxcert change, so I'll take that as the intent of the spec. It would be nice to get the wording clearer in the future.

Hello all, I'm dropping by from a note in NFT/Lobby. I can see that a specific word in the spec is ambiguous and has lead to two different interpretations:
/// @dev This emits when the approved address for an NFT is changed or
///  reaffirmed. The zero address indicates there is no approved address.
///  When a Transfer event emits, this also indicates that the approved
///  address for that NFT (if any) is reset to none.
event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId);

It would have been more clear to say "It is unnecessary to emit Approval when a transfer occurs," and that is the intention of these words in the standard.
I can see the problem is my poor choice of "this also indicates" -- where "this" is the Transfer.
To be clear, an implementation that emits a redundant Approval event is compliant with the standard.

If OZ will accept this interpretation of the standard and make the change, then I would appreciate if anybody can propose an errata for 721 to clarify this.


Already have fits index files

I already had the fits index files I need from ansvr. I didn't select to install any. Where do I place these fits files for Astrometry-api-lite to work?
I see this in the docs: /indexes.
So I'm assuming mine would be C:\astrometry-api-lite\indexes?
Thanks!

Yes and no;
By default the installer will download them to /indexes. However if you do not download them the installer will not configure the download path to astrometry.net either (because it assumes you have it all set up by yourself already) - which means that in order to use your pre-downloaded indexes you'll need to edit the configuration manually.
Astrometry.net configuration is installed by default to /etc/astrometry.cfg in the Windows Subsystem for Linux (Ubuntu). That's the file you'll need to edit and add the path there. The path is a Linux path, so if your Windows indexes dir is C:\astrometry-api-lite\indexes, then the path to use is /mnt/c/astrometry-api-lite/indexes.
You can do this with one command:
echo "/mnt/c/astrometry-api-lite/indexes" | sudo tee -a /etc/astrometry.cfg > /dev/null


⚠ Samsung has degraded performance

In 1639521, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2503 ms

Resolved: Samsung performance has improved in 36333ea.


add test_type to TestDesc to compile on nightly rust

Not sure if this should be more complicated, e.g.:

use if_rust_version to do what the unimplemented cfgs would do and
enable test_type for those 6-day-old nightlies
add macro syntax for changing the test type? (probably not necessary)
update docs to reflect {usability with stable rust} not being itself stable?

Also obviously this is going to fail most tests

Ok, so:

the new parse_opts location also needs papering over in the post_v139 feature
CI needs the feature enabled

It seems like a lot of work to paper over all the libtest API we use to keep the stable guarantee... what other changes is libtest undergoing? Are there going to be changes that will break the ability to provide the facade?

Yeah... I've been waiting for https://github.com/rust-lang/rust/issues/50297 to happen, which would, hopefully, solve these woes.

I think, clippy runs on stable so maybe it doesn't need that feature set?

No, the clippy task is running on nightly.

Thanks for doing the work!


Use name is glTF image

Now when name in the glTF image is defined, it is not used in the model image


Add ability to turn off the transparent background grid

It would be great to have the ability to turn off the grid of the transparent background. It would also be great to have the ability to override the white background color with a custom color.

Thanks for report
#15


Updated note section as below as it was not clear enough for customers

If you failed to configure client-side SCP on your AD FS servers, the source for device identities would be considered as on-premises, and if you have device writeback, AD FS would start deleting device objects from on-premises registered device container after a stipulated period.

@NagaCSC : Thanks for your contribution! The author(s) have been notified to review your proposed change.


fix issue #18

Offering a fix for issue #18. Add all claims in raw format, but exclude the 3 predefined one to prevent dups.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: rabadiw sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.


[MM-17215] Show different channel not found message for guest

Summary
This PR replaces the text that the channel not found page shows for a guest user not to refer to a Town Square channel that they could not be part of.
Ticket Link
https://mattermost.atlassian.net/browse/MM-17215

@mgdelacroix i18ncheck doesn't like it though.

The changes looks good, however it cannot be tested unless it's pushed to the master instance. Once it's tested, the QA Review label will be removed.


SyncLBMap() kvstore access may block for a significant periods

It's possible for SyncLBMap() to block for a significant time upon the KVstore if many nodes are doing the same thing at the same time:
https://github.com/cilium/cilium/blob/f3376543097590d6cbb1b1488e486ce10fe5de41/daemon/loadbalancer.go#L439-L443
https://github.com/cilium/cilium/blob/f3376543097590d6cbb1b1488e486ce10fe5de41/daemon/loadbalancer.go#L569-L571
https://github.com/cilium/cilium/blob/f3376543097590d6cbb1b1488e486ce10fe5de41/daemon/services.go#L57-L58
https://github.com/cilium/cilium/blob/f3376543097590d6cbb1b1488e486ce10fe5de41/daemon/services.go#L78
https://github.com/cilium/cilium/blob/f3376543097590d6cbb1b1488e486ce10fe5de41/pkg/kvstore/etcd.go#L424

Fixing this can be coupled with the refactoring of the service-kvstore interaction to use the updated key-value store code which is used by the identity allocator.

Fixed by #3535

Ah, @ianvernon I was thinking the issue behind this is effectively solved by #3535. If you'd rather leave this open as the issue to refactor the service<->kvstore interaction then feel free to reopen.


ARROW-15452: [FlightRPC][Java] JDBC driver for Flight SQL

12830

 Quality gate: Failed
262 Issues

 31 Vulnerabilities
 231 Code issues

Details

 Quality gate: Failed
285 Issues

 30 Vulnerabilities
 196 Code issues
 59 Anti-patterns

Details