[optimizer] fix wd in sgd

To be clear, the only problem with ccsgd is pickle right? I'll try to fix it.

To be clear, the only problem with ccsgd is pickle right? I'll try to fix it.

@piiswrong First is pickle, it is easy, only need to add getstate to deal with pointer. The second is we only need to do weight decay on weight, this is a little headache for ccSGD

@piiswrong First is pickle, it is easy, only need to add getstate to deal with pointer. The second is we only need to do weight decay on weight, this is a little headache for ccSGD

@antinucleon SGD is also decaying bias right? should we fix this?

@antinucleon SGD is also decaying bias right? should we fix this?

I have fixed SGD. According to Naiyan we should fix it
On Fri, Jan 1, 2016 at 3:41 PM, Eric Junyuan Xie<EMAIL_ADDRESS>wrote:

@antinucleon https://github.com/antinucleon SGD is also decaying bias
right? should we fix this?
—
Reply to this email directly or view it on GitHub
https://github.com/dmlc/mxnet/pull/1113#issuecomment-168344953.

I have fixed SGD. According to Naiyan we should fix it
On Fri, Jan 1, 2016 at 3:41 PM, Eric Junyuan Xie<EMAIL_ADDRESS>wrote:

@antinucleon https://github.com/antinucleon SGD is also decaying bias
right? should we fix this?
—
Reply to this email directly or view it on GitHub
https://github.com/dmlc/mxnet/pull/1113#issuecomment-168344953.

Relying on name still feels unreliable. Plus with this patch by default no weights will be decayed with custom model.

Relying on name still feels unreliable. Plus with this patch by default no weights will be decayed with custom model.

I made a mistake after Naiyan's review. By default if we don't pass arg_name in, there will be wd for all param. For custom model, I find a way to make pickle possible for distributed training, so maybe we can write custom sgd for custom model. I am going to fix the wd default bug now.

I made a mistake after Naiyan's review. By default if we don't pass arg_name in, there will be wd for all param. For custom model, I find a way to make pickle possible for distributed training, so maybe we can write custom sgd for custom model. I am going to fix the wd default bug now.


chore: update test_translator.py

Issue #, if available:
N/A
Description of changes:
Exclude some additional warnings from cfn-lint
Description of how you validated changes:
Tests run/pass
Checklist:

[x] Write/update tests
[x] make pr passes
[x] Update documentation

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Codecov Report

Merging #933 into develop will increase coverage by 0.06%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop     #933      +/-   ##
===========================================
+ Coverage    94.66%   94.73%   +0.06%
===========================================
  Files           69       69
  Lines         3018     3018
  Branches       562      562
===========================================
+ Hits          2857     2859       +2
+ Misses          85       84       -1
+ Partials        76       75       -1

Impacted Files
Coverage Δ

...lator/plugins/application/serverless_app_plugin.py
83.44% <0%> (+1.32%)
:arrow_up:

Continue to review full report at Codecov.

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


npm ERR<EMAIL_ADDRESS>postinstall: node lib/post_install.js

I am getting the following error when trying to install webpack on AWS EC2:

@wfgmiami Seems your have invalid permission in your, look on your first line in screenshot. Remove node_modules and try to install again.

@evilebottnawi I do not know why i get that permission denied message. I am able to install other packages like express for example. I removed node_modules, ran again but i got the same error.

@wfgmiami I see your work using root, it is not recommended (this can cause problems). But your can try to create minimum reproducible test repo, maybe it is allow to find your problem.

@evilebottnawi Thanks for your help. I did sudo apt-get install nodejs-legacy and after than I was able to npm install webpack.

please help me .how to resolve this issue

i cant get your answer @wfgmiami ,@evilebottnawi

Please don't use unmaintained<EMAIL_ADDRESS>

i have same issue


componentRestrictions

Hi all,
Any way to easily add componentRestrictions to the geocode?
I need to restrict the lookup country.
Any help appreciated.

@ajarti hi! Now it simply, just write your preferences like that
$('#mapId').locationpicker({
   location: {
      latitude: 46.15242437752303,
      longitude: 2.7470703125
   },
   inputBinding: {
      locationNameInput: $('#nameInputId')
   },
   enableAutocomplete: true,
   autocompleteOptions: {
      types: ['(cities)'],
      componentRestrictions: {country: 'fr'}
   }
});

P.S. need to wait when my commit will be merged with master branch

@Sumragen sorry for the late reply, many thanks for the feedback, much appreciated!


mvc/models/validation "Model Validation"

[ ] Show how to disable validation.
[ ] #1928 The .NET and MVC semantics for the [Required] attribute seem to confuse everyone. See the long thread at aspnet/Mvc#5115 for example.
[ ] provide code for MergeAttribute
[ ] provide sample code
[ ] DISQUS article very confusing and chaotic! I only managed to get custom validation working by visiting other resources...
[ ] PM review required, what do we need to add
[ ] remove  Creating your own custom validation attributes in MVC is easy.
[ ] remove all instances of market speak "great feature"
[ ] remove Just inherit from the ValidationAttribute, and override the IsValid method. The IsValid method accepts two parameters, the first is an object named value and the second is a ValidationContext object named validationContext. Value refers to the actual value from the field that your custom validator is validating.  After the code sample you can explain  the details here.

When using a custom validator - how do you disable validation? See this DIQUS question
How can I disable model validation in ALL the application? I'm using a custom validation framework for this task (Fluent Validator), also the validator is buggy when using Nodatime
Add instructions to https://docs.asp.net/en/latest/mvc/models/validation.html

Thanks @Rick-Anderson for creating the issue, I'm the person who asked that DIQUS question.

@dougbu @rynowak @Eilon What's our guidance on this?

Haven't tried it but I suggest placing a NullObjectModelValidator in DI, replacing the default IObjectModelValidator implementation. Might be something like:
public class NullObjectModelValidator : IObjectModelValidator
{
    public void Validate(
        ActionContext actionContext,
        ValidationStateDictionary validationState,
        string prefix,
        object model)
    {
    }
}

Alternatively, walk the model tree and mark everything as valid.

Replaced by #9315


Server cannot be started via SSH forcecommand

I wanted to automate server launching with SSH. However, I noticed that the server's process is automatically terminated when mscs start is called from authorized_keys.
So the Minecraft server didn't start.
Problem:
$ cat /opt/mscs/.ssh/authorized_keys
  command="/usr/local/bin/mscs start myworld" ssh-ed25519 AAAAC3Nz...

(ssh-client) $ ssh -i id_ed25519 -T minecraft@minecraft-server  # Start the server from SSH client
               Starting Minecraft Server: myworld.

$ mscs status myworld
  Minecraft Server Status:
    myworld: not running.  # <- The server is not running!

A workaround is to redirect stdin, stdout and stderr to /dev/null.
The catch is the SSH client cannot retreive any messages from MSCS:
$ cat /opt/mscs/.ssh/authorized_keys
  command="/usr/local/bin/mscs start myworld 2> /dev/null >&2 <&2" ssh-ed25519 AAAAC3Nz...

(ssh-client) $ ssh -i id_ed25519 -T minecraft@minecraft-server
               (Nothing displayed cause all the outputs are redirected.)

$ mscs status myworld
  Minecraft Server Status:
    myworld: running.
      Process ID: ...

A possible fix below would solve the problem:
diff --git a/mscs/msctl b/usr/local/bin/msctl
index b592192..5b51c1e 100755
--- a/mscs/msctl
+++ b/usr/local/bin/msctl
@@ -1085,7 +1085,7 @@ start() {
   # Start the server.
   sh -c "tail -f --pid=\$$ $WORLD_DIR/console.in | {
     $SERVER_COMMAND mscs-world=$1 > $WORLD_DIR/console.out 2>&1; kill \$$;
-  }" &
+  }" 2> /dev/null >&2 <&2 &
   # Verify the server is running.
   if [ $? -ne 0 ]; then
     printf "Error starting the server.\n"

Thanks!

That seems like a nice fix.  My one question is what each of the redirects mean, I'm not familiar with them all.
Obviously, 2>/dev/null is piping STDERR to /dev/null.
However, I'm confused with what >&2 and <&2 are doing.  I'd be happy to implement this patch with a little more info. Thanks!

Well I've given this a shot and I can't get your patch to work.
$ ssh -t whitney "mscs status"
[sudo] password for jwood:
Minecraft Server Status:
  alpha: running version 1.11.2 (0 of 20 users online).
    Process ID: 2217.
    Memory used: 499656 kB.
Connection to <IP_ADDRESS> closed.
$ ssh -t whitney "mscs stop alpha"
[sudo] password for jwood:
Stopping Minecraft Server: alpha.
Connection to <IP_ADDRESS> closed.
$ ssh -t whitney "mscs status"
[sudo] password for jwood:
Minecraft Server Status:
  alpha: not running.
Connection to <IP_ADDRESS> closed.
$ ssh -t whitney "mscs start alpha"
[sudo] password for jwood:
Starting Minecraft Server: alpha.
Connection to <IP_ADDRESS> closed.

So both the status and stop commands work as expected. However, the start command fails without any message as to why it fails.  This is the same result with or without your patch.  I'll keep digging and see if I can find a solution.

Good ol' nohup to the rescue.  The following does the trick for me:
diff --git a/msctl b/msctl
index b592192..715ef3b 100755
--- a/msctl
+++ b/msctl
@@ -1083,9 +1083,9 @@ start() {
     exit 1
   fi
   # Start the server.
-  sh -c "tail -f --pid=\$$ $WORLD_DIR/console.in | {
-    $SERVER_COMMAND mscs-world=$1 > $WORLD_DIR/console.out 2>&1; kill \$$;
-  }" &
+  nohup sh -c "tail -f --pid=\$$ $WORLD_DIR/console.in | {
+    echo testing; $SERVER_COMMAND mscs-world=$1 > $WORLD_DIR/console.out 2>&1; kill \$$;
+  }" > /dev/null 2>&1 &
   # Verify the server is running.
   if [ $? -ne 0 ]; then
     printf "Error starting the server.\n"

It looks like the Query handler also fails to start.  That might require a second patch that does the same thing.

This fixes the Query handler:
diff --git a/msctl b/msctl
index b592192..f6e29fb 100755
--- a/msctl
+++ b/msctl
@@ -1083,9 +1083,9 @@ start() {
     exit 1
   fi
   # Start the server.
-  sh -c "tail -f --pid=\$$ $WORLD_DIR/console.in | {
+  nohup sh -c "tail -f --pid=\$$ $WORLD_DIR/console.in | {
     $SERVER_COMMAND mscs-world=$1 > $WORLD_DIR/console.out 2>&1; kill \$$;
-  }" &
+  }" > /dev/null 2>&1 &
   # Verify the server is running.
   if [ $? -ne 0 ]; then
     printf "Error starting the server.\n"
@@ -1099,7 +1099,7 @@ start() {
   fi
   # Start the Query handler if enabled.
   if [ "$(getServerPropertiesValue $1 'enable-query')" = "true" ]; then
-    queryStart "$1" &
+    nohup queryStart "$1" > /dev/null 2>&1 &
   fi
   # Create a PID file for the world server.
   echo $PID > "$WORLDS_LOCATION/$1.pid"

I'm sorry for the late replay.
Thank you for the follow up. I confirmed that your patch worked nicely!

Does STDIN need to be redirected?

Yes, according to this Wikipedia article:
This problem can also be overcome by redirecting all three I/O streams:
  $ nohup ./myprogram > foo.out 2> foo.err < /dev/null &

So you may want to add "<&1" or simply "< /dev/null" to your patch.

Is it piping STDOUT and STDIN to STDERR? Why not use the standard > /dev/null 2>&1?

Thanks for letting me realize the very confusing syntax. I self-taught shell scripting so there may be some weirdness. All three streams are redirected to /dev/null by doing "2> /dev/null >&2 <&2". It's the same as "> /dev/null 2>&1 <&1".

I'm also assuming that the redirects are only affecting the sh command and not tail or $SERVER_COMMAND...

That's exactly right.

I'd like to change the code a little bit.
Since nohup cannot be applied to a shell function, "nohup queryStart" causes an error "nohup: failed to run command ‘queryStart’". This is because nohup is an external command, not a shell's built-in command. An external command cannot recognize shell functions.
So I'd propose using disown for queryStart. "sh -c ..." has no problem with  nohup although disown could also be used for the purpose of consistency.
diff --git a/mscs/msctl b/usr/local/bin/msctl
index b592192..c392e5d 100755
--- a/mscs/msctl
+++ b/usr/local/bin/msctl
@@ -1083,9 +1083,9 @@ start() {
     exit 1
   fi
   # Start the server.
-  sh -c "tail -f --pid=\$$ $WORLD_DIR/console.in | {
+  nohup sh -c "tail -f --pid=\$$ $WORLD_DIR/console.in | {
     $SERVER_COMMAND mscs-world=$1 > $WORLD_DIR/console.out 2>&1; kill \$$;
-  }" &
+  }" > /dev/null 2>&1 <&1 &
   # Verify the server is running.
   if [ $? -ne 0 ]; then
     printf "Error starting the server.\n"
@@ -1099,7 +1099,8 @@ start() {
   fi
   # Start the Query handler if enabled.
   if [ "$(getServerPropertiesValue $1 'enable-query')" = "true" ]; then
-    queryStart "$1" &
+    queryStart "$1" > /dev/null 2>&1 <&1 &
+    disown -h
   fi
   # Create a PID file for the world server.
   echo $PID > "$WORLDS_LOCATION/$1.pid"

By the way, I apologize for my first post being unorganized.
I don't understand how the BASH and its background job's persistence work to be honest. So I'm not sure the patches above always work as intended.
I've tried several different configurations since the first post and I've got seemingly inconsistent results everytime I tried. So I decided to consult some books including The Linux Programming Interface and read some relevant chapters ("Chapter 34: Process Groups, Sessions and Job Control",  "Chapter 62: Terminals" and "Chapter 64: pseudoterminals"). But they didn't help understand much.
First of all, nohup does work in msctl. But it doesn't in the following case. I don't get it:
(SSH client) $ ssh -t user@server 'nohup tail -f /etc/fstab > /dev/null 2>&1 <&1 &'

(SSH server) $ ps aux | grep -v grep | grep 'tail -f /etc/fstab'
               (Nothing displayed.)  # <- No process remains!

However, when you turn the option -t (lower case) to -T (upper case), it works:
(SSH client) $ ssh -T user@server 'nohup tail -f /etc/fstab > /dev/null 2>&1 <&1 &'

(SSH server) $ ps aux | grep -v grep | grep 'tail -f /etc/fstab'
               user    32731  0.0  0.0   5844   692 ?    S    12:37   0:00 tail -f /etc/fstab

Lastly, with -T (upper case) option, mscs start works perfectly without nohup as I did in the first post. I'm so confused.

If we can't use nohup on queryStart, I think we should just move the change into that subroutine.  The offending statement appears to be the call to tail in both cases.
Try this patch and let me know how it works:
diff --git a/msctl b/msctl
index b592192..4020894 100755
--- a/msctl
+++ b/msctl
@@ -1083,9 +1083,9 @@ start() {
     exit 1
   fi
   # Start the server.
-  sh -c "tail -f --pid=\$$ $WORLD_DIR/console.in | {
+  nohup sh -c "tail -f --pid=\$$ $WORLD_DIR/console.in | {
     $SERVER_COMMAND mscs-world=$1 > $WORLD_DIR/console.out 2>&1; kill \$$;
-  }" &
+  }" > /dev/null 2>&1 &
   # Verify the server is running.
   if [ $? -ne 0 ]; then
     printf "Error starting the server.\n"
@@ -1099,7 +1099,7 @@ start() {
   fi
   # Start the Query handler if enabled.
   if [ "$(getServerPropertiesValue $1 'enable-query')" = "true" ]; then
-    queryStart "$1" &
+    queryStart "$1"
   fi
   # Create a PID file for the world server.
   echo $PID > "$WORLDS_LOCATION/$1.pid"
@@ -1428,25 +1428,26 @@ overviewer() {
 # @param 1 The world server to start a Query handler for.
 # ---------------------------------------------------------------------------
 queryStart() {
-  local WORLD_DIR SERVER_IP QUERY_PORT
+  local WORLD_DIR SERVER_IP SERVER_PID QUERY_PORT
   # Grab the location of the world's directory.
   WORLD_DIR="$WORLDS_LOCATION/$1"
   # Determine the IP address and port used by the query server.
   SERVER_IP=$(getServerPropertiesValue $1 'server-ip' '<IP_ADDRESS>')
   QUERY_PORT=$(getServerPropertiesValue $1 'query.port')
+  SERVER_PID=$(getJavaPID $1)
   # Delete any old query.in or query.out buffer files.
   rm -Rf "$WORLD_DIR/query.in" "$WORLD_DIR/query.out"
-  # Give the server a moment to start before initializing the
-  # Query handler.
-  sleep 20
   # Initialize the query.in and query.out buffer files.
   printf '' > "$WORLD_DIR/query.in"
   printf '' > "$WORLD_DIR/query.out"
   # Start a tail process to watch for changes to the query.in file to pipe
   # to the Minecraft query server via socat.  The response from the query
   # server is piped into the query.out file.
-  tail -f --pid=$(getJavaPID $1) "$WORLD_DIR/query.in" | \
-    $SOCAT - UDP:$SERVER_IP:$QUERY_PORT > "$WORLD_DIR/query.out"
+  nohup sh -c "
+    sleep 20;
+    tail -f --pid=$SERVER_PID \"$WORLD_DIR/query.in\" |
+    $SOCAT - UDP:$SERVER_IP:$QUERY_PORT > \"$WORLD_DIR/query.out\"
+  " > /dev/null 2>&1 &
   # Verify the connection to the query server worked.
   if [ $? -ne 0 ]; then
     printf "Error connecting to the query server.\n"

Please forget about what I said regarding disown. I somehow thought this script used bash. sh can't use it.
I tested the queryStart patch. It worked except when I start the server as 'minecraft' user, which mscs uses. When I use another user, it worked just fine.
As 'minecraft' user:
$ ssh -i minecraft_ed25519 -t minecraft@minecraft 'mscs stop'
Stopping Minecraft Server: Fragment.
Connection to minecraft closed.

$ ssh -i minecraft_ed25519 -t minecraft@minecraft 'mscs start'
Starting Minecraft Server: Fragment.
Connection to minecraft closed.

$ sleep 20

$ ssh -i minecraft_ed25519 -t minecraft@minecraft 'mscs query Fragment'
Connection to minecraft closed.

As another user:
$ ssh -t k@minecraft 'mscs stop'
[sudo] password for k:
Stopping Minecraft Server: Fragment.
Connection to minecraft closed.

$ ssh -t k@minecraft 'mscs start'
[sudo] password for k:
Starting Minecraft Server: Fragment.
Connection to minecraft closed.

$ sleep 20

$ ssh -t k@minecraft 'mscs query Fragment'
[sudo] password for k:
0       1       splitnum        128     0       hostname        A Minecraft Server      gametype        SMP     game_id MINECRAFT       version 1.9.2   plugins               map     Fragment        numplayers      0       maxplayers      20      hostport        25565   hostip  <IP_ADDRESS>   0       1       player_       0
Connection to minecraft closed.

That's odd, I wonder why that would be the case.  I'm busy today and won't have the opportunity to look at this, but I'll try to do so soon.

I thought about this more and realized that I'm going to need to do some work to test this. I currently have the minecraft user locked down on my server -- it is a system account, it doesn't have a login shell, and it has no access to ssh. I'll either need to modify these restrictions on my server or setup a new virtual environment without those restrictions.  Either way, I probably don't have time to work on this in the immediate future.
RE your question on the -t vs -T command line option for ssh: it has to do with psudo-terminal allocation. Here are the man page entries from dash:
     -T      Disable pseudo-terminal allocation.

     -t      Force pseudo-terminal allocation.  This can be used to execute
             arbitrary screen-based programs on a remote machine, which can be
             very useful, e.g. when implementing menu services.  Multiple -t
             options force tty allocation, even if ssh has no local tty.

I don't know what this means. Hopefully using nohup will work with either option.

Starting and querying the server as 'minecraft' user succeeded when I specify the -T option as you implied:
$ ssh -i minecraft_ed25519 -T<EMAIL_ADDRESS>'mscs stop'
Stopping Minecraft Server: Fragment.

$ ssh -i minecraft_ed25519 -T<EMAIL_ADDRESS>'mscs start'
Starting Minecraft Server: Fragment.

$ sleep 20s

$ ssh -i minecraft_ed25519 -T<EMAIL_ADDRESS>'mscs query Fragment'
0       1       splitnum        128     0       hostname        A Minecraft Server      gametype        SMP     game_id MINECRAFT       version   1.9.2   plugins         map     Fragment        numplayers      0       maxplayers      20      hostport        25565   hostip  <IP_ADDRESS>     0       1       player_ 0

Another thing I found is that it worked flawlessly even with the -t option
when I inserted 'sleep 1' in start() after queryStart() returned.
Inserted 'sleep 1' in your patch:
diff --git a/mscs/msctl b/usr/local/bin/msctl
index 4020894..d26cd26 100755
--- a/mscs/msctl
+++ b/usr/local/bin/msctl
@@ -1100,6 +1100,7 @@ start() {
   # Start the Query handler if enabled.
   if [ "$(getServerPropertiesValue $1 'enable-query')" = "true" ]; then
     queryStart "$1"
+    sleep 1
   fi
   # Create a PID file for the world server.
   echo $PID > "$WORLDS_LOCATION/$1.pid"

And it worked successfully with the -t option:
$ ssh -i minecraft_ed25519 -t<EMAIL_ADDRESS>'mscs stop'
Stopping Minecraft Server: Fragment.
Connection to minecraft.gs closed.

$ ssh -i minecraft_ed25519 -t<EMAIL_ADDRESS>'mscs start'
Starting Minecraft Server: Fragment.
Connection to minecraft.gs closed.

$ sleep 20

$ ssh -i minecraft_ed25519 -t<EMAIL_ADDRESS>'mscs query Fragment'
0       1       splitnum        128     0       hostname        A Minecraft Server      gametype        SMP     game_id MINECRAFT       version   1.9.2   plugins         map     Fragment        numplayers      0       maxplayers      20      hostport        25565   hostip  <IP_ADDRESS>     0       1       player_ 0
Connection to minecraft.gs closed.

I don't know why but one thing I can say for sure is it has always worked as intended when I use the -T option.

That is interesting that adding sleep 1 fixes the issue when using -t and that it always seems to work with the -T option.  I wish I better understood what those options mean.  I'll put together another patch that combines my previous version with your change and push it to master -- unless there are other issues that need to be addressed.

Thank you for taking your time to help me with the problem. I also wish I better understood what those options and such work.

Glad I could help @mozuzu.  Thanks for your help working this out.  I just sent in commit df29679a0c2a5a359c50d4d37f247ce65c45076c that should fix this issue. Closing.


NullPointerException when running dependency-check.sh

I'm trying to run the dependency checker inside a symfony (php) project. Whenever I run the following command I get a NullPointerException:
$ /bin/dependency-check/bin/dependency-check.sh --project project --out . --scan .
I ran this command inside root folder of the project.
This was the exception:
Exception in thread "main" java.lang.NullPointerException at org.owasp.dependencycheck.Engine.writeReports(Engine.java:1114) at org.owasp.dependencycheck.Engine.writeReports(Engine.java:1134) at org.owasp.dependencycheck.App.runScan(App.java:264) at org.owasp.dependencycheck.App.run(App.java:184) at org.owasp.dependencycheck.App.main(App.java:69)
I am using: Dependency-Check Core version 3.2.1

Can you run the following and provide the log file?:
/bin/dependency-check/bin/dependency-check.sh --project project --log odc.log --out . --scan .

Seems like it suddenly works now (maybe because of a restart) but it feels like it's not scanning all my dependencies as I have 20+ dependencies in a project and says it only scanned 9...

Any chance the project is on github somewhere? Or you have a sample project that behaves the same that you could post?

This happens on every project... I tested it on the base symfony repo (https://github.com/symfony/symfony.git)
For this repo I only get 1 dependency...

@jorenvh1 for podfile.lock - there is an open PR I will be merging soon (#1324). However, until that is merged podfile.lock is not supported/analyzed.
For the package.json projects - more then one packaging system has used the file name. ATM only node.js projects are being analyzed (using NSP).
Can this issue be closed?


Collapsed cascade elements, if cascade-all

Collapsed cascade elements, if cascade-all.
(better readability for generated xml)

there is something wrong with this commit :(


[BUG] BloomFilterStatisticsReader#analyse unexpected return SkipFile

If we query with a in (1,2,3,4) condition and 2, 3, 4 not exist in the data file of a column, then BloomFilterStatisticsReader#analyse may unexpected return SKIP_INDEX status because of we use intervalArray.exists api and one of 2,3,4 may not exist in bfIndex.
The following case will reclaim the problem:
test("bloom filter bug") {
val data: Seq[(Int, String)] = (1 to 300).map { i => {
if (i % 13 == 0) {
(-1, "-1")
} else {
(i, s"this is test $i")
}
}
}.filter(item => item._1 != -1)
data.toDF("key", "value").createOrReplaceTempView("t")
sql("insert overwrite table parquet_test select * from t")
withSQLConf(OapConf.OAP_ENABLE_EXECUTOR_INDEX_SELECTION.key -> "true") {
withIndex(TestIndex("parquet_test", "index1")) {
sql("create oindex index1 on parquet_test (a)")
checkAnswer(sql("SELECT * FROM parquet_test WHERE a in (1, 13, 26, 39, 52)"),
Row(1, "this is test 1"):: Nil)
}
}
}
Now, this case will return empty result not Row(1, "this is test 1")

@linhong-intel @carsonwang

== Results ==
!== Correct Answer - 1 ==   == Spark Answer - 0 ==
![1,this is test 1]
at org.scalatest.Assertions$class.newAssertionFailedException(Assertions.scala:495)

In the past week, 10% of queries of bigsql service had been wrong due to this problem!!!

fixed. sorry about this.


Ceph Version / ansible instructions

Hello,
I modified readme file, to :

add version of ceph, reef seem to be needed on the control node for the ansible script to run. It's not default version on debian.
(had problems running "ceph mon enable-msgr2" line 317 of ceph.yaml, it would freese deployment that errors)
added a link to ceph linux package install instructions
added a few instructions to guide those who wants to run this script toward real hardware.

Hope it helps,

add version of ceph, reef seem to be needed on the control node for the ansible script to run. It's not default version on debian.
(had problems running "ceph mon enable-msgr2" line 317 of ceph.yaml, it would freese deployment that errors)

That doesn't seem to be true here, my deployment system is Debian 12 and things work fine here.
When things freeze it's most often than not because you've done two deploys in a row and didn't clean up the data in data/*/.

I took your changes and did a bit of rewording and changing the format a bit, that should cover roughly the same information but be a bit easier to maintain.


test failures for ismax/ismin on sparc solaris (0.3.19)

As in #2433 for ppc64, the same issue exists on sparc
$ uname -a
SunOS sunny 5.11 <IP_ADDRESS>.4 sun4v sparc sun4v Solaris
also big-endian.
./openblas_utest
TEST 1/34 max:smax_zero [OK]
TEST 2/34 max:dmax_positive [OK]
TEST 3/34 max:smax_negative [OK]
TEST 4/34 min:smin_zero [OK]
TEST 5/34 min:dmin_positive [OK]
TEST 6/34 min:smin_negative [OK]
TEST 7/34 amax:damax [OK]
TEST 8/34 amax:samax [OK]
TEST 9/34 ismax:negative_step_2 [FAIL]
  ERR: test_ismin.c:89  expected 9, got 50
TEST 10/34 ismax:positive_step_2 [OK]
TEST 11/34 ismin:negative_step_2 [FAIL]
  ERR: test_ismin.c:63  expected 9, got 1
TEST 12/34 ismin:positive_step_2 [OK]
TEST 13/34 drotmg:drotmg_D1_big_D2_big_flag_zero [OK]
TEST 14/34 drotmg:rotmg_D1eqD2_X1eqX2 [OK]
TEST 15/34 drotmg:rotmg_issue1452 [OK]
TEST 16/34 drotmg:rotmg [OK]
TEST 17/34 axpy:caxpy_inc_0 [OK]
TEST 18/34 axpy:saxpy_inc_0 [OK]
TEST 19/34 axpy:zaxpy_inc_0 [OK]
TEST 20/34 axpy:daxpy_inc_0 [OK]
TEST 21/34 zdotu:zdotu_offset_1 [OK]
TEST 22/34 zdotu:zdotu_n_1 [OK]
TEST 23/34 dsdot:dsdot_n_1 [OK]
TEST 24/34 swap:cswap_inc_0 [OK]
TEST 25/34 swap:sswap_inc_0 [OK]
TEST 26/34 swap:zswap_inc_0 [OK]
TEST 27/34 swap:dswap_inc_0 [OK]
TEST 28/34 rot:csrot_inc_0 [OK]
TEST 29/34 rot:srot_inc_0 [OK]
TEST 30/34 rot:zdrot_inc_0 [OK]
TEST 31/34 rot:drot_inc_0 [OK]
TEST 32/34 potrf:smoketest_trivial [OK]
TEST 33/34 potrf:bug_695 [OK]
TEST 34/34 kernel_regress:skx_avx [OK]
RESULTS: 34 tests (32 ok, 2 failed, 0 skipped) ran in 13 ms

the following 'fix' circumvents the problem
$ diff -u kernel/sparc/KERNEL ../OpenBLAS-0.3.19-fix/kernel/sparc/KERNEL
--- kernel/sparc/KERNEL 2021-12-19 14:55:57.000000000 +0000
+++ ../OpenBLAS-0.3.19-fix/kernel/sparc/KERNEL        2022-01-27 08:53:56.839970000 +0000
@@ -67,3 +67,29 @@
 CGEMM_BETA = ../generic/zgemm_beta.c
 ZGEMM_BETA = ../generic/zgemm_beta.c

+SAMAXKERNEL  = ../arm/amax.c
+DAMAXKERNEL  = ../arm/amax.c
+SAMINKERNEL  = ../arm/amin.c
+DAMINKERNEL  = ../arm/amin.c
+ISAMAXKERNEL = ../arm/iamax.c
+IDAMAXKERNEL = ../arm/iamax.c
+ISAMINKERNEL = ../arm/iamin.c
+IDAMINKERNEL = ../arm/iamin.c
+ISMAXKERNEL  = ../arm/imax.c
+IDMAXKERNEL  = ../arm/imax.c
+ISMINKERNEL  = ../arm/imin.c
+IDMINKERNEL  = ../arm/imin.c
+ICAMAXKERNEL = ../arm/izamax.c
+IZAMAXKERNEL = ../arm/izamax.c
+ICAMINKERNEL = ../arm/izamin.c
+IZAMINKERNEL = ../arm/izamin.c
+SMAXKERNEL   = ../arm/max.c
+DMAXKERNEL   = ../arm/max.c
+SMINKERNEL   = ../arm/min.c
+DMINKERNEL   = ../arm/min.c
+CAMAXKERNEL  = ../arm/zamax.c
+ZAMAXKERNEL  = ../arm/zamax.c
+CAMINKERNEL  = ../arm/zamin.c
+ZAMINKERNEL  = ../arm/zamin.c

let me know if I can provide further information.
 Wolfgang

Oops, thought I had caught all of them the last time round... however this looks to be a slightly different problem from #2433, I suspect the (ancient) bug is only that kernel/sparc/KERNEL errpneously defines ISMINKERNEL and IDMINKERNEL to i_a_max.S instead of imax.S (so taking the absolute value, like ISAMIN would - probably a copy/paste error in the KERNEL file).
Or do you have any additional evidence that makes it necessary to replace all min/max kernels with their generic implementation ?

Oops, thought I had caught all of them the last time round... however this looks to be a slightly different problem from #2433, I suspect the (ancient) bug is only that kernel/sparc/KERNEL errpneously defines ISMINKERNEL and IDMINKERNEL to i_a_max.S instead of imax.S (so taking the absolute value, like ISAMIN would - probably a copy/paste error in the KERNEL file).
Or do you have any additional evidence that makes it necessary to replace all min/max kernels with their generic implementation ?

No - I was just lazy (overly careful). I can read C code, but no sparc assembly, but granted, I could have thought a bit more...
With the fix below
> diff -u kernel/sparc/KERNEL{,.orig}
--- kernel/sparc/KERNEL 2022-01-27 11:04:48.735554515 -0500
+++ kernel/sparc/KERNEL.orig    2022-01-27 11:04:40.531654409 -0500
@@ -39,11 +39,11 @@
 endif

 ifndef ISMINKERNEL
-ISMINKERNEL = imax.S
+ISMINKERNEL = iamax.S
 endif

 ifndef IDMINKERNEL
-IDMINKERNEL = imax.S
+IDMINKERNEL = iamax.S
 endif

 ifndef SNRM2KERNEL

the ismin tests pass now, the ismax still fails.
TEST 9/34 ismax:negative_step_2 [FAIL]
  ERR: test_ismin.c:89  expected 9, got 50

I tried setting also ISMAXKERNEL to imax.S but that didn't help...
Thanks for your quick response!
 Wolfgang


feat: create paste controller interface & implementation

related to #6, create paste controller interface and implementation on business/controller. Interface make it possible to implement dependency injection by simply depend on the interface instead of actual object / struct. The dependent then can receive any object that comply to that interface.

i just updated paste controller implementation to private so it's gonna ensure that the function will be used. that function now also serve as an abstraction for the struct that implement paste controller interface so we can change the return type to another implementation if we need it in the future and not breaking existing code.

already remove new paste controller function and squash some commits

updated. make Dependency struct depend to PasteController interface so we can just initialize it once. i also make some method that require sqlx.Conn to receive it as an argument since we get sqlx.Conn from handler method.


RFC: Shared non-graphQL schema for REST endpoints and sync webhooks

Problem
While graphQL solves problems with strict contracts between Saleors and their clients, not everything can be achieved with graphQL
There are several cases where API contract is fragile and error-prone.
1. AppManifest
AppManifest is a glue between App and Saleor. Manifest is consumed by RESTful GET call.
Manifest is declared in several places:

Partially saved in the App model in Saleor
Defined in app-sdk
Defined in docs

Both SDK and docs are maintained manually and can get out of sync.
AppManifest is the target of development - it receives new fields, it requires specific validation (like the requiresSaleorVersion field, which is validated against semver syntax)
There is no single source of truth for this contract
2. Sync Webhooks responses
Sync webhook is a "command" that requires the app to return a specific response to complete the transaction.
The main scenarios for these webhooks are:

Shipping
Taxes
Payment methods and processing

Similar to AppManifest, there is no single source of truth and contract is distributed between inline validation in Saleor, app-sdk that decalres Typescript schema and manually written docs
All three are critical for e-commerce flow, and the connection must be very solid
Proposed solutions
Main proposal is to create a schema, that will be:

Accessible by all consumers (Saleor, App/app-sdk, docs and others)
Written in common, generic format, not specific to any language
Easy to compile to language specific or framework specific code (Markdown docs, Python class, Typescript interface, Java interface etc)

Pros:

Extracting declarative format out of source code allows to accessible lookup by everyone.
Single source of truth
Less human mistakes due to lack of manual implementation in several places due to automation
Easily parsable by other systems/interop
Inside Saleor, CODEOWNERS can be assigned to track schema changes (via PRs) across teams
Can be used as a validation

Cons:
???
Schema format
json-schema
json-schema is a popular format that can be used as a source of truth for REST payloads
It can be compiled to other syntaxes:

typescript
python
java
swagger/openAPI

There is a huge ecosystem of validators that can use json-schema as a source
https://json-schema.org/implementations.html
json-schema can work as a 1st layer of validation in Saleor controller, but also in app-sdk to verify if response is correct, before it gets send.
Others...?
Where to keep schema
Schema file can be possibly implemented in saleor/saleor repo or in separate, dedicated repository
Keep schema in Saleor repo
Use a root level directory, eg. /schema to store schema files.
Questions:

Single file or multpile files?

Pros:

Keeping file in saleor/saleor makes sense, because its a "core" of the ecosystem, same as graphql.schema is stored in this repo, not outside
Saleor can import file directly, without fetching it
Validation can be easily implemented. 2nd line of validation (rules that can't be represented in schema) will be in Saleor anyway. If schema is stored in the separate repository, there will be distributed validation rules
Fetching schema in App or other clients can be done in similar way as graphql schema ("fetch-schema": "curl https://raw.githubusercontent.com/saleor/saleor/${npm_package_saleor_schemaVersion}/saleor/graphql/schema.graphql > graphql/schema.graphql")

Cons:
???
Keep schema in separate repository
Separate repository can be created just for keeping schema.
Pros

Easier to set up tooling, json-schema on every merge can generate all artifacts. This can be achievable in Saleor too.

Cons

If used for validation, schema and custom validation rules will be separated
Another repository to maintain

When to compile
Schema as a source file can be used directly by e.g. validators, but very likely it will need to be compiled to code specific to language or framework.
For example, app-sdk that is Typescript tooling, requires typescript interface, likely a *.d.ts file.
While runtime javascript code could use schema (assuming json-schema) to validate code, it will not help with static typing, allowing great DX due to type completion. To achieve that, typescript artifact is required.
Artifacts can be generated in several ways:
In Saleor
Github workflow can be prepared to build all artifacts in the same repository/folder
Pros

Everything is prepared ahead of time
Artifacts can be previewed easily if someone prefers another syntax

Cons

Possible problems with syntax/versioning, for example app can use older Typescript than compiler on workflow, so artifact may not be compatible. In this scenario, app could still use source schema and compile on its own side

On the client
Schema can be also fetched on any client, like app or app-sdk and compile it to only-required field there
Props:

Less to maintain on the source repository
No need to figure out how to configure compiler/versions/syntax

Cons:

Worse DX / contributors need this setup
Duplicated work on any client

Somewhere else?

Would love if the OpenAPI would be chosen:

Docs could generate automatically
could generate types for the SDK
a lot of tools that could be used to test both the core implementation and consumers

For the file location: not a fan of the current location of gql schema, not quite clear when to find it when browsing code the first time. /schema directory for gql and sync hooks would IMO improved (but require a migration period for all the old scripts to update the path)

I'm convinced we should use JSON schema. As a matter of fact, that's what we've started using in saleor-app-payment template:
https://github.com/saleor/saleor-app-payment-template/tree/canary/src/schemas

JSON schemas
A script that compiles them to .d.ts files (using json-schema-to-typescript)
A script that compiles them to .mjs files (using ajv/dist/standalone)

Dropping idea from @patrys
Instead of building artifacts inside workflow and committing them, build them and upload to Github storage. They should be tracked per release and connected to the release, like assets here: https://github.com/saleor/saleor/releases/tag/3.12.2
All schemas should be clearly versioned

+1 to json-schema this is actually the most common approach and as was mentioned it's already been used in our projects.
One point: transformation to other languages/syntax - Please test them before any wider usage, at least for our common cases, I remember that I had some problems with it. It was years ago so probably it has significantly changed, but worth checking.

Before we introduced the subscription webhooks I was checking the possibility to add the schema for the webhooks with pydantic. Finally, we moved with the subscription webhooks as it was a lot of more benefits than adding typing to old payloads. But it sounds like a perfect thing for this RFC. Personally, I would keep this with core, as we could use pydantic models to handle the response from App, and generate the schema based on the models. Below you can find a sample for one webhook.
from __future__ import annotations

from typing import Any, Dict, List, Optional

from enum import Enum
from pydantic import BaseModel, Field
from decimal import Decimal

class Result(str, Enum):
    CHARGE_SUCCESS = 'CHARGE_SUCCESS'
    CHARGE_FAILURE = 'CHARGE_FAILURE'

class TransactionInitializeSession(BaseModel):
    pspReference: str
    time: Optional[str]
    externalUrl: Optional[str]
    data: Dict[Any, Any] = Field(None)
    message: Optional[str] = Field(None, description="Message related to the action.")
    result: Result = Field(..., description="The final result of the transaction intialize webhook.")
    amount: Decimal = Field(..., gte=Decimal(0))

print(TransactionInitializeSession.schema_json(indent=2))

As a respone we will get:
{
  "title": "TransactionInitializeSession",
  "type": "object",
  "properties": {
    "pspReference": {
      "title": "Pspreference",
      "type": "string"
    },
    "time": {
      "title": "Time",
      "type": "string"
    },
    "externalUrl": {
      "title": "Externalurl",
      "type": "string"
    },
    "data": {
      "title": "Data",
      "type": "object"
    },
    "message": {
      "title": "Message",
      "description": "Message related to the action.",
      "type": "string"
    },
    "result": {
      "description": "The final result of the transaction intialize webhook.",
      "allOf": [
        {
          "$ref": "#/definitions/Result"
        }
      ]
    },
    "amount": {
      "title": "Amount",
      "gte": 0,
      "type": "number"
    }
  },
  "required": [
    "pspReference",
    "result",
    "amount"
  ],
  "definitions": {
    "Result": {
      "title": "Result",
      "description": "An enumeration.",
      "enum": [
        "CHARGE_SUCCESS",
        "CHARGE_FAILURE"
      ],
      "type": "string"
    }
  }
}

Accodring to pydantic docs:

The generated schemas are compliant with the specifications: JSON Schema Core, JSON Schema Validation and OpenAPI.

@korycins do you suggest to build json-schema from pydantic?
This is important decision, because json-schema is not a source anymore. Im afraid that it will cause some problems.
My proposal is to have these scenarios:

pydantic loads json-schema to validate (extra rules can be added on top of that, as a 2nd line of validation)
JS/TS code can load json-schema to tools like ajv to achieve the same in js/ts
compiles can generate json-schema -> *.d.ts

If we start with pydantic classes, we will have:

pydantic -> json-schema -> ajv
pydantic ->json-schema -> .d.ts

json-schema as an artifact no longer can be controlled "by hand", so if there is need to any manual improvement (syntax, description), we can be limited (unless pydantic to json-schema is super well done and covers everything)
I can't prove these problems will appear, its a general feeling that we will have 2 layers of auto-generation and its sound dangerous

@lkostrowski I suggest adopting the same approach for building a JSON schema as we have for building a GraphQL schema. We already have a data class within Saleor's code that stores the details of the response that a webhook can return. Therefore, it should be feasible to convert these classes to Pydantic models and provide a command or endpoint to share them with you.
Personally, I believe it is crucial to ensure that the generated JSON schema is always related to the response models defined on the Saleor side. This way, we can guarantee that the schema is a valid contract. I am not certain if Pydantic can be customized to meet our specific requirements. Although I tested it with some old async payloads a year or two ago and had no issues, we will likely need to try it with two or three sync webhooks to confirm that it can handle all of the improvements we would like to add.

I agree with @korycins to start with a test. It seems that Pydantic provides ways to configure and customize JSON schema generated from its models: https://docs.pydantic.dev/usage/schema/

@mmiszy @przlada please handover this topic from Appstore to DEX team

In @saleor/dex we don't have any competencies related to the core and/or Python. What are the exact requirements on our side once this issue is handed to us? @przlada @lkostrowski

I don't think there is anything related to core. Its purely about tooling and DX. AFAIK @przlada already created feature that builds json-schema from Python validators/model.
To finish this, we need to take json-schema and attach additional tooling, like conversion to .d.ts, attaching it to the Saleor release artifacts etc
@przlada can pass the details

So the outstanding work will be in the CLI, correct?

@mmiszy I think the MVP should be to attach json-schema + .d.ts to each Saleor release artifact.
Then we can connect it to app-templates and SDK to fetch it, just like we fetch schema.
If we see any CLI usages, we can add it later


set cache_control with none type

cache_control properties that had a None type weren't checking that before attempting to cast the value while setting. Another type issue came up in #2364, need to transition to using bool type for bool attributes.
fixes #2379

Glad it showed up.
Can I make the change mentioned in the pull request? I'm talking about "... transition to using bool type for bool attributes."

I need to think about how to do the deprecation.

Clear. Thanks


Add a Pyscript Tutorial  python notebook

I would like to work on this issue

I would like to work on this issue

go for it

I would like to work on this issue. Please assign it to me if it is still open.

Hi @Niketkumardheeryan , i would like to work on this issue . my linkedin profile : https://www.linkedin.com/in/rimjhim-singh-182876216/

Hello I am a GsSOC'24 contributor and I would like to work on this issue. Can you please assign it to me?

If this issue is still pending, I can take this up under GSSoC'24. Lemme know. :)

Hi @Niketkumardheeryan
I’d like to take on the issue of adding a PyScript tutorial in a Python notebook.

I’m excited about the opportunity to contribute to the project by adding a PyScript tutorial in a Python notebook! This tutorial could help users understand how to effectively use PyScript for their web applications, covering key concepts and practical examples.
I plan to include:
An overview of PyScript and its features.
Step-by-step instructions on setting up a PyScript environment.
Example projects showcasing how to integrate Python with HTML and JavaScript using PyScript.
Tips and best practices for building interactive web applications.
Could you please assign this issue to me? I look forward to contributing!


server: check hostId when attach disk to a Stopped vm with local storage

Description
This fixes #7834
Steps to reproduce the issue

create service offering and disk offering with local storage
create a vm with local storage, and stop it
create volume with local storage
attach volume to vm

sometimes the volume is allocated to other host than root disk in the attach process, and an exception is thrown
com.cloud.utils.exception.CloudRuntimeException: Failed to attach local data volume data-001 to VM local-001 as migration of local data volume is not allowed
    at com.cloud.storage.VolumeApiServiceImpl.orchestrateAttachVolumeToVM(VolumeApiServiceImpl.java:2234)
    at com.cloud.storage.VolumeApiServiceImpl.orchestrateAttachVolumeToVM(VolumeApiServiceImpl.java:4697)

Types of changes

[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] New feature (non-breaking change which adds functionality)
[x] Bug fix (non-breaking change which fixes an issue)
[ ] Enhancement (improves an existing feature and functionality)
[ ] Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale

[ ] Major
[ ] Minor

Bug Severity

[ ] BLOCKER
[ ] Critical
[ ] Major
[ ] Minor
[ ] Trivial

Screenshots (if appropriate):
How Has This Been Tested?

@blueorangutan package

@weizhouapache a [SF] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

Packaging result [SF]: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: el9 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 6840

@blueorangutan test

[SF] Trillian test result (tid-7489)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 43709 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7886-t7489-kvm-centos7.zip
Smoke tests completed. 108 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test
Result
Time (s)
Test File


BZ-1265725 - The /rest/query/task operation is returning lists with duplicate TaskSummary's

@baldimir Could you check if this is correct?
Unfortunately, I can't think of a good unit test for this (that doesn't not involve DB2 or Oracle). If you have any ideas, please let me know.
Thanks!

Sometimes the code orders by columns not returned in the select, which invalidates using distinct.
Back to the drawing board for a solution to this one..

The main problem here is that order by is applied at last in SQL. So it is applied also after distinct, which is an aggregate function. (Please correct me if I'm wrong with this)
I think we have three options here:

Not order by column that is not in select clause. I think maybe we should go with this option, if it is possible, because I don't know if all production DB systems, that we use, support using column that is not part of select clause in order by clause.
Order by with an aggregate function, if the column is not in select clause.  E.g. "order by min(Task.id)". This should help, because it states, which value of unaggregated column should it use for ordering.
Order by in a subquery and then use distinct. This will do the ordering before distinct. This is the second most preferred option for me.

What do you think?

@baldimir Fixed by using distinct, after all, see https://github.com/droolsjbpm/jbpm/commit/0987f9564285cc279b0801eb7a43686e7b0e1714


Fix menu entry icon on linux

Fixes #2189
Tested by installing this branch on my system. Works correctly.

So I guess I can close this now that the locations with sizes are working. 🙂


How to release memory space which occupied by segment-anything？

I run this code in jupyterlab：
import cv2
import matplotlib.pyplot as plt
from segment_anything import SamAutomaticMaskGenerator, sam_model_registry
import numpy as np
import gc

def show_anns(anns):
    if len(anns) == 0:
        return
    sorted_anns = sorted(anns, key=(lambda x: x['area']), reverse=True)
    ax = plt.gca()
    ax.set_autoscale_on(False)
    polygons = []
    color = []
    for ann in sorted_anns:
        m = ann['segmentation']
        img = np.ones((m.shape[0], m.shape[1], 3))
        color_mask = np.random.random((1, 3)).tolist()[0]
        for i in range(3):
            img[:,:,i] = color_mask[i]
        ax.imshow(np.dstack((img, m*0.35)))

sam = sam_model_registry["default"](checkpoint="VIT_H SAM Model/sam_vit_h_4b8939.pth")
mask_generator = SamAutomaticMaskGenerator(sam)
image = cv2.imread('Untitled Folder/292282 sample.jpg')
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
sam.to(device='cuda')
masks = mask_generator.generate(image)
print(len(masks))
print(masks[0].keys())
plt.figure(figsize=(20,20))
plt.imshow(image)
show_anns(masks)
plt.axis('off')
plt.show()
del(masks)
gc.collect()

Before I run it, memory cost is about 200MB, and when it completes, memory cost is about 3.4GB, even if I close the notebook or re-run this program, those memory won't be released.
So how to solve the problem?

try it out:
torch.cuda.empty_cache()

try it out: torch.cuda.empty_cache()

It has no effect.

If you have enough RAM try changing device="cpu". It takes a bit more time but it works for me on both h and l models.

try halving the input image resolution:
# Resize the image to a smaller resolution
scale_factor = 0.5
new_width = int(img.shape[1] * scale_factor)
new_height = int(img.shape[0] * scale_factor)
image = cv2.resize(img, (new_width, new_height), interpolation=cv2.INTER_AREA)

# Convert the image from BGR to RGB color space
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)

and/or running on CPU if you have more than 12gb+ ram, when I tested it rn on the CPU to see the time it would take it consumed roughly 12.5Gb on average.

try halving the input image resolution:
# Resize the image to a smaller resolution
scale_factor = 0.5
new_width = int(img.shape[1] * scale_factor)
new_height = int(img.shape[0] * scale_factor)
image = cv2.resize(img, (new_width, new_height), interpolation=cv2.INTER_AREA)

# Convert the image from BGR to RGB color space
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)

and/or running on CPU if you have more than 12gb+ ram, when I tested it rn on the CPU to see the time it would take it consumed roughly 12.5Gb on average.

What I want to talk is not "the program costs too much memory", is "the program can't release memory completely", but your advice is still useful.

I'm currently encountering this problem as well. Do you have any good solutions?

Yeah, same problem. Please help to solve this issue!

The solution is to use a multiprocessing approach, so you should move the image processing task to a separate process. By doing so, you isolate the memory usage of the task from the main process. This ensures that any memory consumed during processing is released back to the system when the process terminates, effectively preventing the memory leak


Does not load on https://cookieclicker.eu/cookieclicker

Bug description
Script fails to load at all on the alternate website, which I have to use because of the icons not loading issue currently on the main site.
To reproduce
Attempt to load the script, through console, bookmarklet, tampermonkey, or CCMM.
Screenshot
https://i.imgur.com/yR0kGja.png
Save file
https://pastebin.com/UgJC06WU
Browser / Steam / Version
Browser, most recent version. Dev version also does not work.

Attempting to load as a userscript causes this to occur instead.
https://i.imgur.com/BqoqR0Y.jpeg

Loading as a userscript and changing the references to the favicon to use "https://cookieclicker.eu/cookieclicker/favicon.ico" instead works.


Fixed #27218 -- Returned LogEntry instances from log_addition, log_change, log_deletion

Ticket: https://code.djangoproject.com/ticket/27218
This change makes it easier to alter a LogEntry in a custom ModelAdmin subclass overriding log_addition, log_change or log_deletion.

merged in aa9569fce1b308819039450e3d2b852c37128209, thanks!


Instancing a preloaded C# class from GDScript fails when the preload is done top level

Godot version
3.5.1.stable.mono
System information
Arch Linux, .NET 7.0.102
Issue description
When preloading a C# script from GDScript at top level, the instantiation of the former fails with the following error :
 Parser Error: Too many arguments for "_init()" call. Expected at most 0.
When the preload is done inside _init() (for example), it works as expected.
Steps to reproduce

Create a simple C# script with a class that extends Godot.Object
Preload the C# script at the top-level of a GDScript script.
Call new(...) on the preloaded C# script

Minimal reproduction project
Test.cs
using Godot;
using System;

class Test : Godot.Object
{
    public string Data;

    public Test(string data)
    {
        this.Data = data;
    }

    public Test()
    {
    }
}

test.gd
extends Node
const Test = preload("res://Test.cs")

func _ready():
    var test = Test.new("test")
    print(test)`

Does this occur in Godot 4.0?

This seems like an gdscript issue, where the analyzer assumes that everything is either an gdscript and the constructor arguments can be determined statically, or a native class that does not have constructor arguments.
Notably (for 4.0) the issues only goes away when the preload is switched to load and the static analysis no longer can take place.
Also for 4.0 this patch fixes c# constructors at the cost of breaking instantiating native classes:
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp
index a2cab25ce8a..dcc501d1e3f 100644
--- a/modules/gdscript/gdscript_analyzer.cpp
+++ b/modules/gdscript/gdscript_analyzer.cpp
@@ -4631,7 +4631,7 @@ bool GDScriptAnalyzer::get_function_signature(GDScriptParser::Node *p_source, bo
 	}

 	if (p_is_constructor) {
-		function_name = "_init";
+		// function_name = "_init";
 		r_static = true;
 	}

@@ -4690,7 +4690,7 @@ bool GDScriptAnalyzer::get_function_signature(GDScriptParser::Node *p_source, bo
 		}
 	}

-	if (p_is_constructor) {
+	if (p_is_constructor && false) {
 		// Native types always have a default constructor.
 		r_return_type = p_base_type;
 		r_return_type.type_source = GDScriptParser::DataType::ANNOTATED_EXPLICIT;

This is making it impossible for me to define an @export in GDScript with the type of a C# class.


Fixed NPE and Added a New Unit Test

Critical Changes
Changes
Fixed Null Pointer Exception caused when an account's record type which is an affiliation is changed to a record type which does not have an affiliation mapping set in "EDA Settings" tab.
Issues Closed
Fixes 820
New Metadata
Deleted Metadata
Testing Notes

Create a Contact
Create an Account with Department record type - this record type should exist in the Affiliation Mappings in the EDA Settings
Create a Primary Affiliation between Account and Contact
Update Account record type to Business Organization - this record type should NOT exist in the Affiliation Mappings in the EDA Settings
System should not throw an exception

@skosgi1 Can you help Julie by supplying an initial description of the issue that was fixed here under "Changes"?

@robertbwatson @juliesnow Added description of the fix in "Changes"

@skosgi1 FYI for future - I noticed you did a force-push here (https://github.com/SalesforceFoundation/EDA/compare/113ea78589f57b06fc5ee3af29390ea0fca77373..c942327f3fda4e6d24b6de4a667468244efc6014) - be sure to always make sure to pull down the latest from the remote branch, otherwise you might overwrite others commits. We have an automatic process that commits the latest changes from master into each feature branch every time we merge a new feature.

@skosgi1 Additionally, we realized during our release review meeting today that you need the # in the issue number in order for it to be automatically picked up in the release notes. So the "Issues Closed" section should actually read: "Fixes #820"

@robertbwatson @lifewithryan Updated the logic to reflect contact update and updated the test class.

@juliesnow Another suggestion for release notes to add some more detail : "Previously, if an Account had a Primary Affiliation with a Contact, and that affiliated Account’s record type was updated from one that had an affiliation mapping in EDA Settings to a record type without an affiliation mapping in EDA Settings, a null pointer exception was thrown. That NPE has been fixed in this release.” (I realize this is passive voice which isn't always ideal, but I thought it could help give you a little more insight into the issue that was fixed to wordsmith it for our customers.) Please let us know when the text is approved so we can merge & close. Thanks!!!


Clean up dead code

I occasionally come across bits of dead code. This branch removes some of the more obvious instances.

:+1: when travis is happy. I don't know the history of all the code being deleted though.

:+1: I don't really know much about the Django stuff but the rest looks fine to me

:+1:


Add trussed-core crate

This PR adds the trussed-core crate (https://github.com/trussed-dev/trussed/issues/177) and moves the relevant modules fully or partially to it:

api
client (only *Client and mechanism traits as well as error and result types)
config (only relevant constants)
error
interrupt
serde_extensions (only client traits and error and result types)
types (only those types used by other modules)

All moved types are re-exported from their old locations, so this is a compatible change for Trussed’s dependents.  As the extension request and reply serialization and deserialization is now split between trussed-core and trussed, I’ve added serialization and deserialization methods to the Extension trait so that trussed does not need to make assumptions about the serialization mechanism used by trussed-core. (Edit: now done in https://github.com/trussed-dev/trussed/pull/179)
We will probably want to make some more adjustments before releasing.  This PR only intends to perform the split with minimal modifications.

A shame that because the original files are trimmed and not fully deleted, it doesn't show as a rename in the diff.
I'm trusting the line count that nothing is missing.

I’ve also tested this against nitrokey-3-firmware so I’m pretty sure that nothing is missing.  But every rebase risks losing something. :(  I’ll merge it now – updating the other PRs is hopefully trivial because store is not touched by this change.

Yes, updating these PRs will be much easier than rebasing this one.


The job mailing list should be set to False as default for Onlinemembers

As the job mailing list is not directly connected to Online, and easily can be considered spam, it should not be set to True by default for new (or old) users which matches the criteria is_member.
This issue includes changing this line to false:
https://github.com/dotKom/onlineweb4/blob/028bc046998545114bd2e96b3d79ef5e13cb1036/apps/authentication/views.py#L144
And running a set to False on all existing members in the Django shell.
An alternative solution can be to offer the opt IN field while the user is registering as this may make the option more visible.

I don't think that it is up to us to decide how that should work, though?

If that's the case I think we should notify signed up users who get automatically subscribed, with an email, telling them that they are now subscribed and can unsubscribe at any time.
I would like to give users the option to opt out upon registering/verifying their account.

I find some interesting reading regarding this question in this document. Especially "§ 15. Begrensninger i bruk av visse kommunikasjonsmetoder" and the deeper elaboration about this in chapter 2.6.1. Apart from this, I think Online should handle this like every serious webpage on the Internet, and have this as a checkbox during registration of a user account.

Nice find @hakloev, definitely something to take into consideration.
We've already notified everyone about the mailing list when it was first published, and people know they are on it or they have unsubscribed from it. If we now force everyone off it (set to False for all users) people who want to stay on it but did not opt out will have to manually opt in again.

Hmm, that document had some interesting points that affects how this should be handled.
Section 2.6.1 states:
"Henvendelser som inneholder en kombinasjon av nyheter/brukerinformasjon
og markedsføring, omfattes også av ordlyden i § 15. Det kreves derfor
på samme måte som for andre markedsføringshenvendelser, at forbrukerne
på forhånd må ha gitt samtykke til å motta denne typen henvendelser. "
Section 2.7.1 regarding consent states quite clearly what is considered an informed consent:
Frivillig:
Samtykket må avgis frivillig. Forbrukeren skal kunne kalle samtykket tilbake når som helst.

Uttrykkelig:
Samtykket må avgis ved at det foretas en aktiv handling. Forbrukeren kan
ikke bindes ved passivitet. Dette medfører at et forhåndsavkrysset felt eller
et vilkår i en kontrakt ikke er tilstrekkelig til at skal kunne sies å foreligge et
gyldig samtykke. Den næringsdrivende må legge det opp slik at forbrukeren
må huke av i en egen boks eller lignende for å bekrefte at samtykket
gis.

Informert:
Når den næringsdrivende henter inn samtykke fra forbrukeren, for
eksempel ved registrering på en internettside, må forbrukeren i direkte
tilknytning til spørsmålet om han vil gi samtykke, gis informasjon om hva
vedkommende samtykker til (samtykkeerklæring). Forbrukeren må i denne
forbindelse informeres om hva det innebærer å avgi et samtykke, blant
annet om hvor ofte vedkommende vil motta markedsføring og om hvilke
typer produkter som vil bli markedsført

Well, first and foremost, this should probably not be discussed here as it is of very little technical interest, but all right.
The discussion is about whether this should be opt in or opt out. We decided to do this opt out as it is something new that we want to reach our users with and as everyone knows: it's much harder to get users to actively do something than the other way around. We did however make it easy to opt out, and intend to inform about this in all correspondence. I know that not everyone agrees with this reasoning, but we weighted the benefits of reaching a wider audience more, than the minor inconvenience it is to unsubscribe for the few that are not interested. I should also note that I have been campaigning hard to not make this list a "shitlist" where we throw everything and nothing in. We do screening for information we feel our users will find useful, and as can be seen by the fact that nothing has been sent out the last couple of weeks, most things do not pass.
Now, since you did bring up legalities of the practice I have to address that as well First of all we are in a special position with regards to "Markedsføringsloven" as our users are not simply customers in the traditional sense where we try to sell them a product or service. Sometimes they are, but other times they are simply members attending our events or enjoying other benefits. Anyway, I did some digging around and I'm going to take you through the steps that brought me to my conclusion. Pardon the mix of language here, but it is needed to get the point out.
mfl §1

Loven gjelder kontroll med markedsføring, handelspraksis og avtalevilkår i forbrukerforhold og stiller krav til god forretningsskikk mellom næringsdrivende.

§ 5 punkt d

handelspraksis: enhver handling, utelatelse, atferd eller framstilling, kommersiell kommunikasjon, herunder reklame og markedsføring, fra en næringsdrivendes side, som er direkte knyttet til å fremme salget av, selge eller levere en ytelse til forbrukerne,
The question here is whether it can be argued that the sending out these mails is regarded as "markedsføring" related to "levere en ytelse". My argument is that we will not use these messages to promote any product or service we (or others) intend to sell you. We want to inform about minor jobs, conferences or otherwise useful information. There is no commercial intention behind this. That is a key point as is argued in the laws "forarbeider" that I find to support my argument quite well.

Forarbeider til mfl. <IP_ADDRESS>

Til utformingen av definisjonen har enkelte høringsinstanser tatt opp spørsmålet om lovens virkeområde blir for vidt dersom definisjonen ikke inneholder presiseringen av at praksisen er « direkte knyttet til å fremme salget (…) til forbrukere». Departementet er etter en ny vurdering kommet til at det kan være klargjørende med et tilknytningskrav i definisjonen. Det vil for eksempel gå en grense mot fremstillinger der en næringsdrivende ikke har som formål å påvirke forbrukernes økonomiske valg.

I hope this clears things up and that you can all sleep well at night now.
--
Pedandisk Nils, out!

Would an acceptable solution be to have users agree to join the mailing list upon registration? If so, we should do this upon solving #866

On 18 Nov 2015, at 23:45, Nils Herde<EMAIL_ADDRESS>wrote:
Would an acceptable solution be to have users agree to join the mailing list upon registration? If so, we should do this upon solving #866 https://github.com/dotKom/onlineweb4/issues/866

To have a opt-in checkbox at registration would solve this issue. But it will not solve the problem with all the users that has been forced to the list.


bugfix prevent no function clause in MapSet.union/2

The MapSet.union/2 expected two MapSet data type, but receiving an List
data type. To prevent this error, passing both data to MapSet.new/1.
Elixir 1.13.2 (compiled with Erlang/OTP 24)
Erlang 24.2

The issue:
I was working with Surface.Catalogue, and I was creating some Surface.Components, when I open the catalogue on my browser, I received this error here:
** (exit) an exception was raised:
    ** (FunctionClauseError) no function clause matching in MapSet.union/2
        (elixir 1.13.2) lib/map_set.ex:372: MapSet.union([], [])
        (earmark_parser 1.4.19) lib/earmark_parser/context.ex:66: EarmarkParser.Context._merge_messages/2
        (earmark_parser 1.4.19) lib/earmark_parser/context.ex:55: EarmarkParser.Context._merge_contexts/2
        (earmark_parser 1.4.19) lib/earmark_parser/context.ex:47: EarmarkParser.Context.prepend/3
        (earmark_parser 1.4.19) lib/earmark_parser/ast_renderer.ex:23: EarmarkParser.AstRenderer._render/3
        (earmark_parser 1.4.19) lib/earmark_parser.ex:494: EarmarkParser.as_ast/2
        (earmark 1.4.19) lib/earmark/internal.ex:42: Earmark.Internal.as_html/2
        (surface_catalogue 0.3.0) lib/surface/catalogue/markdown.ex:20: Surface.Catalogue.Markdown.to_html/2

I put the IO.inspect/2 inside the EarmarkParser.Context._merge_messages/2 to see the context and the message:
context: %EarmarkParser.Context{
  footnotes: %{},
  links: %{},
  options: %EarmarkParser.Options{
    annotations: nil,
    breaks: false,
    code_class_prefix: "language-",
    file: nil,
    footnote_offset: 1,
    footnotes: false,
    gfm: true,
    gfm_tables: false,
    line: 1,
    messages: [],
    parse_inline: true,
    pedantic: false,
    pure_links: true,
    renderer: EarmarkParser.HtmlRenderer,
    smartypants: false,
    timeout: nil,
    wikilinks: false
  },
  referenced_footnote_ids: #MapSet<[]>,
  rules: %{
    br: ~r/^ {2,}\n(?!\s*$)/,
    escape: ~r/^\\([\\`*\{}\[\]()\#+\-.!_>~|])/,
    footnote: ~r/\z\A/,
    strikethrough: ~r/^~~(?=\S)([\s\S]*?\S)~~/,
    text: ~r/^[\s\S]+?(?=[\\<!\[_*`~]|https?:\/\/| \{2,}\n|$)/,
    url: ~r/^(https?:\/\/[^\s<]+[^<.,:;\"\')\]\s])/
  },
  value: []
}
messages: []

To prevent this error, when I try to pass both data as a List, it was necessarily too passing into MapSet.new/1 first, before passing to MapSet.union/2.

Pull Request Test Coverage Report for Build 5ec4581af0b77964c4f324aeb9a724fff5ce1ab8-PR-85

4 of 4 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.6%) to 95.903%

Totals

Change from base Build 8a6e51cd27ef0f51b0ae3636439fd0adaecc87b6:
0.6%

Covered Lines:
749

Relevant Lines:
781

💛  - Coveralls

Pull Request Test Coverage Report for Build 5ec4581af0b77964c4f324aeb9a724fff5ce1ab8-PR-85

4 of 4 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.6%) to 95.903%

Totals

Change from base Build 8a6e51cd27ef0f51b0ae3636439fd0adaecc87b6:
0.6%

Covered Lines:
749

Relevant Lines:
781

💛  - Coveralls

Muito obrigado o Herminio
actually you discovered a design flaw here :clap:
Howeve the fix is too late IMHO the message field of the struct should not be exposed at all in the as_ast and we really want to contain this fields always a MapSet
Would you care to modify your PR in that way or shall I take care of it?
Thanx again
Até logo

to be more specific
when an option with anything else than an empty MapSet  is passed into as_ast  let us return {:error, ...}
or do you have a use case against it?

Hi @herminiotorres no worries, your input is appreciated, I will have a look and study what you wrote and then come back to you...

Oh you need to update to Earmark 1.4.20 it seems, I will make a PR in surface, and then I will release a version of EarmarkParser that does not crash to avoid this
EarmarkParser.Options
iex(3)> as_ast("- a", %Options{messages: []})
** (FunctionClauseError) no function clause matching in MapSet.union/2

    The following arguments were given to MapSet.union/2:

        # 1
        []

        # 2
        []

    Attempted function clauses (showing 2 out of 2):

        def union(%MapSet{map: map1, version: version} = map_set, %MapSet{map: map2, version: version})
        def union(%MapSet{map: map1}, %MapSet{map: map2})

    (elixir 1.13.0) lib/map_set.ex:372: MapSet.union/2
    (earmark_parser 1.5.0) lib/earmark_parser/context.ex:64: EarmarkParser.Context._merge_messages/2
    (earmark_parser 1.5.0) lib/earmark_parser/context.ex:55: EarmarkParser.Context._merge_contexts/2
    (earmark_parser 1.5.0) lib/earmark_parser/context.ex:36: EarmarkParser.Context.prepend/3
    (earmark_parser 1.5.0) lib/earmark_parser/ast_renderer.ex:24: EarmarkParser.AstRenderer._render/3
    (earmark_parser 1.5.0) lib/earmark_parser/ast_renderer.ex:189: EarmarkParser.AstRenderer.render_block/3
    (earmark_parser 1.5.0) lib/earmark_parser/ast_renderer.ex:23: EarmarkParser.AstRenderer._render/3
    (earmark_parser 1.5.0) lib/earmark_parser/ast_renderer.ex:167: EarmarkParser.AstRenderer.render_block/3
iex(3)>

but rather as described in #86 and #87
Is this ok for you @herminiotorres ?

https://github.com/surface-ui/surface_catalogue/pull/29

Well, IMHO, I think you have broken the contract in your public API for each project using the EarmarkParser as their dependency. Before you change your private implementation on Context, to prepend messages when was passing as a List, and now it is MapSet. Even if I update to use the Earmark 1.4.20, it keeps continuing throwing the same error, because Earmark, has an Options struct implementation and there are messages which is a List data type, look here, and when Earmark send lines and options arguments to EarmarkParser it will throw an error. When you change the private implementation to change List for MapSet, IMHO, the EarmarkParser should take care of it and pipe through the data was received as options to the Options struct and for lines/markdown as the first argument, called the MapSet.new.
You can keep your public API contract for who is calling yet, and you should sanitize/parser for the proper data type internally. Also, I think MapSet, even coming built-in data type with Elixir Language, is a complex data type, and I think you shouldn't be expected in your public API this MapSet datatype.
If you want, I can move around my quick fix, and treat to parsing those on the as_ast function for MapSet for lines/markdown and options. And write tests for Context.prepend, and for as_ast function.
WDYT? It is looking good to you? @RobertDober

I test locally the surface_site which those versions you open the PR on Surface, and for many markdowns, codes were are using the Earmark and EarmarkParser, they are failure.

@herminiotorres ok sorry about that I just could not reproduce the error but anyway I will fix it with #86 or you if you adapt your PR. Just to be sure that we are on the same wavelength

EarmarkParser.as_ast assures that options.messages is converted to a MapSet and issues a deprecation warning if anything was passed in.
Can you please reproduce the failing call to Earmark.as_html in the console and copy paste it here

Muito obrigado, que pena que temos fallar ingles ;)

@herminiotorres just to explain

Well, IMHO, I think you have broken the contract in your public API for each project using the EarmarkParser as their dependency.

Yes because it never should have been in the public API, it leaked out, so sorry about that

Please use Earmark v1.4.20 it uses EarmarkParser 1.4.18 which does not use the MapSet yet
I cannot imagine how you got this error? Did you update your hex packages?

Fixed with #86, however I cannot release in the 1.4.* branch anymore so if the usage of Earmark 1.4.20 does not solve your issue you need to wait for Earmark 1.5.0 (coming soon I hope)


Can't delete postgres polygon record via GUI

DBeaver Version <IP_ADDRESS>002292132, Postgres 11, Debian 9.
I have a postgres table that has an integer id column and a column of postgres data type polygons. If I attempt to delete a record using the GUI, I get this error:
SQL Error [42883]: ERROR: operator does not exist: polygon = polygon
Hint: No operator matches the given name and argument types. You might need to add explicit type casts.
I am able to truncate the table via SQL.
I am able to delete individual records via SQL : "DELETE FROM table-name WHERE id = blah..."
However, selecting a row, clicking the 'delete' icon at the bottom of the page, then the 'save' icon brings up the above error and the record is not deleted.
CREATE TABLE v5facility.location_polygons (
location_id int8 NULL,
cad_handle text NULL,
polygon polygon NULL,
CONSTRAINT location_polygons_un UNIQUE (location_id)
);

@mickeyjf: Show your create table script

@mickeyjf could you provide some insert statement with example of data you use?

cannot reproduce an issue. if it is still actual for you - feel free to reopen the ticket


IOHandler handleSocketException leaks memory

Release memory to prevent memory leak.

Test PASSed.

I applied the patch, that fixed the memory leak. Thanks for the quick fix!


While building, local CSS in components getting overridden with Global CSS

Version
2.5.13
Reproduction link
https://jsfiddle.net/1pc2e9yj/2/
Steps to reproduce

Added Global CSS  in main.js ( say Bootstrap.min.css)
Adding  a  CSS class in component level scope
3  Build a production build

What is expected?
Priority for component level CSS.
What is actually happening?
Priority for global CSS.

Make sure to include the CSS from libraries first:
// main.js
import Vue from 'vue'
import 'bootstrap/css/bootstrap.css' // I don't know where it is
import App from './App'

// rest of the code

Please, next time consider using the forum, the Discord server or StackOverflow for questions first. But feel free to come back and open an issue in the relevant repository (template or vue-loader in this case) if it turns out to be a bug 🙂

Thanks for the comment
I have fixed it in this way already if I used to write my CSS in the component scope then why it is overridden by global CSS? component level CSS have the priority right? if I am wrong please correct me.

It also depends on the css rule specificity but that a completely different topic unrelated to Vue 🙂


Add link to ApacheCon 2016 followup blog post

Linking<EMAIL_ADDRESS>in.

\cc @leemoonsoo @sejunra for review

Looks great!


as it is, SCB::set_fpu_access_mode() is a footgun

Let's say FPU is disabled at entry in main() as it usually is, and you want to do some FP operations. Presto!
fn main() {
    cortex_m::interrupt::free(|cs| {
        let scb = tm4c129x::SCB.borrow(cs);
        scb.enable_fpu();

        // some FP-using code
    });
}

... or something like that. Well, not so easy. Since the code below enable_fpu changes callee-save FP registers, LLVM will try to stack those at the top of main... using the vpush instruction. Which is not available until FPU is enabled. Oops.
I don't know how to fix this.

The TI Tiva ROM enables FPU before entering main(). This seems like an awkward choice but maybe the cortex-m-rt crate should do the same; the FPU is not a massive power hog and power-conscious users will surely discover the option of turning it off on their own with no effort.

Is there any reason that enabling the FPU before entering main couldn't be a Cargo feature flag?

It would be a really confusing feature flag.

cc @oli-obk

I don't think there can be any workarounds other than moving it before main, because the floating types are available everywhere and the moment they are used this issue occurs. A quick solution would be a lint that detects such situations, but it won't help much in the presence of optimizations.
A feature flag would not really work, since any crate also depending on the crate can forget the feature flag, thus breaking your code. This means that there's no way to write the feature in an additive way.

A feature flag would not really work, since any crate also depending on the crate can forget the feature flag, thus breaking your code. This means that there's no way to write the feature in an additive way.

Thanks, you've articulated my concern far better than myself.

That makes sense. Is there some kind of #[cfg(hard_fp)] that could gate it based on whether hard FP is enabled in the target definition?

Not sure. See https://github.com/rust-lang/rust/pull/32651.

Seems fine to make it a conditional feature of the cortex-m-rt crate. As per the cortex-m-quickstart model the rt crate is always a direct dependency of the application / top crate and doesn't appear anywhere else in the dependency graph (*) so the application writer always has full control over which Cargo feature of the rt is enabled / disabled.
(*) not that I can actually stop anyone from making a library depend on the rt crate but it doesn't make sense to do so since that crate has no API.

Is there some kind of #[cfg(hard_fp)] that could gate it based on whether hard FP is enabled in the target definition?

Note that there are use cases where the target has a FPU but one would prefer to keep the FPU disabled if they are not using it in the application. Always enabling the FPU if the target has a FPU would prevent that use case.

Note that there are use cases where the target has a FPU but one would prefer to keep the FPU disabled if they are not using it in the application. Always enabling the FPU if the target has a FPU would prevent that use case.

I strongly feel that the FPU should be always enabled if any f32/f64 parameters are passed in FP registers, because having to debug this is a horrible thing to do to your users.
I also feel that a feature of cortex-m-rt crate is not the right solution here because, so long as it's additive, it is easy to accidentally forget to activate it when setting no-default-features = true for some unrelated reason, and, see above. A subtractive feature is of course out of question.
I think that disabling the FPU right away in main(), or (more likely) fiddling with FPU somewhere within interrupt handlers is perfectly acceptable for the tiny minority of cases that truly care about the static power consumption of the FPU.

it is easy to accidentally forget to activate it when setting no-default-features = true

 #[cfg((not(no_hard_fp))]

@a-shafir That's a subtractive feature and is not a correct use of the system.

Note that there are use cases where the target has a FPU but one would prefer to keep the FPU disabled if they are not using it in the application.

In that case, maybe they can disable it when entering main (and we have it fully enabled by default)?

it is easy to accidentally forget to activate it when setting no-default-features = true

I wasn't thinking of making the "fpu" feature enabled by default so would always have to enable it (regardless of whether you set default-features to true or false) if you need it. "Pay for what you use".

I strongly feel that the FPU should be always enabled if any f32/f64 parameters are passed in FP registers in the Rust ABI

Hmm, that sounds reasonable. I suppose if you are not going to use the FPU at all in your application you could just use the thumbv7em-none-eabi target which doesn't emit FPU instructions and won't have the implicit enable_fpu instruction executed before main.
That also made me realize that probably the whole Fpu register block shouldn't be exposed in the API for targets that don't have a FPU (e.g. thumbv6m-none-eabi).

Agreed on both counts.

cortex-m-rt v0.3.0 has been released and it enables the FPU before main (on targets that have a FPU). That doesn't change the fact that set_fpu_access_mode is still a footgun if you disable the FPU and then enable it again or don't use cortex-m-rt. Anyone wants to document the proper way to use this method? I think then we can mark this as fixed.

Any function that runs fully or partly with the FPU disabled must not take any floating-point arguments or have any floating-point local variables. Because the compiler might inline such a function into a caller that does have floating-point arguments or variables, any such function must be also marked #[inline(never)].


SOL Claim Rewards - Transaction too large error

Describe the bug
After unstaking SOL from 5+ validators, when you click "Claim Rewards" an error is thrown due to the app trying to claim from all validators at once and creating a transaction larger than allowed.
Error: encoded solana_sdk::transaction::versioned::Versioned-Transaction too large: 1734 bytes (max: encoded/raw 1683/1232)
To Reproduce
Steps to reproduce the behavior:

Unstake SOL from 5+ validators and wait for the epoch end
Once SOL is unstaked go to SOL wallet -> Stake -> Claim Rewards -> Confirm
Error: encoded solana_sdk::transaction::versioned::Versioned-Transaction too large: 1734 bytes (max: encoded/raw 1683/1232) - this results in funds being stuck on the app - not staked, not transferable

Expected behavior

Unstake SOL from 5+ validators and wait for the epoch end
Once SOL is unstaked go to SOL wallet -> Stake -> Claim Rewards -> Confirm
SOL available in SOL wallet

Screenshots

Additional context
The app offers no way of claiming individually from each validator, so the unstaked SOL is now stuck on the app.
OS: iOS 15.6.1
App version: 7.21
Network fee for transaction: 0.000005 SOL (available SOL in wallet ~ 0.05)

Hello, our team is working on-it, not related to wallet-core - closing for now.

Hello, our team is working on-it, not related to wallet-core - closing for now.

Thank you!
Is there a place where I can track the issue?

Hello, our team is working on-it, not related to wallet-core - closing for now.

Thank you! Is there a place where I can track the issue?

Will be fix in next iOS release

Hello, our team is working on-it, not related to wallet-core - closing for now.

Thank you! Is there a place where I can track the issue?

Will be fix in next iOS release

Awesome, thanks!


Cannot pair with an URI - Sample Application basic flows are not working.

Validator.validateWCURI is throwing null, causing an exception while "pairing" with a URI.
URI from "example.walletconnet.com"
wc:1a1b83b4-226b-4bc8-b5d8-d18b313a9cb7@1?bridge=https%3A%2F%2Fv.bridge.walletconnect.org&key=414a1205200041715511be1d2368decd8c266d512b5cd2d749376dbbe70fd592
Is the kotlin SDK ready or WIP?

Oh my bad, the example.walletconnet.com is v1 IG, is there a v2 version deployed?


Animate side menu dismiss when pushing views non animated

It should be possible to have the menu slide out even if pushing the new view is not animated itself (animating both can look a bit weird when relying on 'animated' only)

Thanks for your contribution, @alghanor. Your changes have been merged with some additional changes/renames.

cool!


[DOC] index.rst contains a broken link

Report incorrect documentation
Line 54:
(see :ref:`outside-of-a-container`).

Should be a link to the Build in a Conda Environment section of CONTRIBUTING.md
Location of incorrect documentation
docs/source/index.rst

Looks like @mdemoret-nv  already fixed this.


lso 1609 get travis ci working with atmire maven repository

This is completely the wrong approach, sorry. Travis-CI support just contacted me to point out that the encryption key I used is specific to umlso/DSpace, and will never work for my own repository, hardyoyo/DSpace. They said that there is no way to use Travis-CI-based encryption for the pull request use case. So... I'll be looking into using Maven encryption instead. Closing this.


epg not working

iptv-org.github.io/epg/guides/us-local/tvtv.us.epg.xml.gz not loading for several days now

Duplicate #1106


style the toctree

Fix #553
This one has been left for a long time and the css proposed by @choldgraf was super nice. As I was in a PR mood tonight I've copy/pasted your suggested css into a dedicated _toctree.scss file.
I hope you don't mind

Thanks! A few quick thoughts:
I think this is somehow also impacting the header navigation bar:

Because the selector is for the l1 level, it means that deeper toctree levels dont have these rules applied to them, can we generalize it so that they do?
e.g., from: https://pydata-sphinx-theme--693.org.readthedocs.build/en/693/demo/index.html

2 birds one stone:

I only edit the css for the toctree in toctree-wrapper (excluding the primary sidebar and header navbar)
Apply this modification for every level from 1 to 6


Added vt100, a file with highly compressable data.

vt100 is a file with very compressable data. It causes the density codec to produce extremely bad results and crashes gipfeli.

I'm working on a new corpus, perhaps you could file an issue there, and explain the use case for this data?  Also, if you propose a specific file instead of just a type of data, I'll need to know where it came from, and it has to be licensed for redistribution.
Tracking the gipfeli issue at quixdb/squash#84


ConsecutiveIndex constraint fail when using multiple Apply methods on save entity

Current behavior:
When using multiple Apply methods EFCore provider doesn't preserve their order on insert.
My code that fails
        Apply(new CompetitionCreatedEvent());
        Apply(new CompetitionNameSetEvent(name));
        Apply(new CompetitionLogoSetEvent(logo));

EF then try to sort entities alphabetically on insert thus getting into constraint violation
You can check issue here https://github.com/dotnet/efcore/issues/11686
This issue lead me to PR https://github.com/dotnet/efcore/pull/25874 where inserted entities are ordered using StringComparer.Ordinal
After digging source code found the piece of code that cause this
	case AddEventsAction(var events):
    	_store.Context.AddRange(events);
        break;

Proposed solution:
As a solution I can only think of Bulk insert wrapped in transaction. Maybe you'll find a better way

Hey,
Thanks for your very well written issue!
We were able to reproduce the issue in our tests and saw that EF Core indeed does not preserve insertion order, leading to a violated ConsecutiveIndex constraint while using Postgres. For reasons unknown to me, the same error does not occur in SQL Server.
I've linked a proposed solution PR, but we might investigate alternative solutions before merging the PR.

This issue has been fixed in version 0.3.1


WHID not showing at WIFI nor USB

My hardware: MacBook Pro 2012, MacOS 10.15.7
I just got WHID which I ordered. When I plug it into USB it did not show on WIFI nor USB by system. I tried to open it by Arduino  IDE using this https://github.com/exploitagency/ESPloitV2, but even then it's not working.
I notice that under USB is small place which I suspect is for microSD card. Should be something there?
What should I do?

You can close this issue. I opened it and find out, that I have been scamed. It gas Wifi module but no microprocessor. Im buying new from certified seller.


Add and wire up swagger file for admin API

Description
This PR adds and wires up a swagger file for the admin API.
Reviewer Notes
Note that I have a placeholder endpoint with no implementation currently in the admin.yaml swagger file.  Without any endpoints, go-swagger will throw an error.  This will be removed as we add actual admin endpoints.
Setup

make server_run
make admin_client_run
Try the following local URLs:

http://adminlocal:3000/admin/v1/docs -- the swagger UI
http://adminlocal:3000/admin/v1/swagger.yaml -- the swagger file

There's also a login page in place for admin right now like our other apps, found at http://adminlocal:3000/ .  This login process may change some once we wire in auth for React Admin, but having the login allows us to test login.gov integration and other wiring that goes along with that.  Note that in development right now we're getting back different UUIDs (which we store in the users table) from login.gov for each of our apps, so you will have to do some database manipulation to test a successful login:

Try to login to admin.  You should get an Unauthorized response after authentication.  This is because there's no users record with the UUID that came back from login.gov.
In authentication/auth.go, either set a breakpoint on the call to FetchUserIdentity and examine the UserID UUID there, or turn on pop debugging around that call to see the SQL locally.  Note the UUID that it's looking for.
Create a users record with login_gov_uuid set to the UUID noted in step 2.  Use your login.gov email for the login_gov_email column.  Make sure you set is_superuser to true.  The id for the record can be any UUID you generate.
Try logging in again -- you should get a page saying React admin is properly configured.

We plan to address the multiple UUIDs from login.gov in a later story -- it may affect more than just the admin app.
Code Review Verification Steps

[ ] Code follows the guidelines for Logging
[ ] This works in Supported Browsers (Chrome, Firefox, IE, Edge).
[ ] Tested in the Experimental environment (for changes to containers, app startup, or connection to data stores)
[ ] Request review from a member of a different team.
[ ] Have the Pivotal acceptance criteria been met for this change?

References

Pivotal story for this change
Blocking infra story

This looks good. I had a branch that did the routing slightly differently. I didn't merge because I didn't want to cause more conflicts with this one, but I might revisit. I'm thinking this works just fine and maybe my potential refactor would be superfluous. I'll run it by you if I think it might be worthwhile to update. Shouldn't hold up this PR, though. Ship it!


Feedling stopped working on windows 10

Anyway to get this nifty program to work on windows 10 Home-64bit?
Thanks!

I'll take a look when I get back near some Windows. What's the issue?

It just doesn't load. Installation is fine but then nothing happens.
Thanks a lot for agreeing to look at it. I used it regularly and I genuinely miss it!
-------- Original Message --------
From: Andrew Rowson<EMAIL_ADDRESS>Sent: Saturday, January 9, 2016 06:22 PM
To: growse/Feedling<EMAIL_ADDRESS>Subject: Re: [Feedling] Feedling stopped working on windows 10 (#2)
CC: rainymonday<EMAIL_ADDRESS>
I'll take a look when I get back near some Windows. What's the issue?

Reply to this email directly or view it on GitHub:
https://github.com/growse/Feedling/issues/2#issuecomment-170237615


Support for HTML files in Elixir-Phoenix

Description
Supporting beautification for HTML files in Elixir-Phoenix.
File extension is ".eex", the code is generally HTML mixed with Elixir Code.
filename.html.eex

A massive +1 for this!


Fix memLayout and diskLayout result object documentation

Pull Request
Changes proposed:

[x] Fix
[ ] Add
[ ] Remove
[ ] Update

Description (what is this PR about)
The memLayout and diskLayout return an array of objects.

Thank you! Absolutely right. Just pushed the updated docs (version 3.37.6)


Word wrapping for RadioButton and CheckBox

When the text exceeds the screen width it gets clipped instead of being wrapped. I wasn't able to get it working.

When I was browsing the code in InputKit I found this remark which suggests there is a workaround needed but the text should wrap. Is that not the case? Am I doing something incorrectly?
Secondly, this comment proposes to use a two-column Grid to achieve the appropriate wrapping behavior. Reading the linked issue suggests that the HorizontalStackLayout behavior is desired and it won't be changed.
I'm using the controls from the Uranium.Material package so I posted in this repo instead of the InputKit one.

Yeah, It's an MAUI Stacklayout issue and the issue (https://github.com/dotnet/maui/issues/8873#issuecomment-1287768160) is still open.
I'll try to overcome this issue according to this comment

I tested the Grid solution and it seems to work without a problem.

This issue should be fixed with a workaround with v2.3.3 release.
I'll refactor completely CheckBox in further feature releases

There is still an issue with the width of the Label. I submitted an issue in the other repo with a PR proposal that would fix the issue and add further enhancements. So whenever you have time we can continue there :)

@enisn would you have a second to take a look at https://github.com/enisn/Xamarin.Forms.InputKit/issues/348?

Closed by https://github.com/enisn/Xamarin.Forms.InputKit/pull/350
It'll be released in the next patch release of UraniumUI 2.4


I have added a very basic moving car animation

Issue reference:
Proposed changes:
Type of change:
Please delete options that are not relevant.

[x] New feature (non-breaking change which adds functionality)

Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings

Additional info (if any):

Great work @Nikhil-Patil-Web 🙌


Add RESPECT Token

Add RESPECT SPL Coin

[x] I will not ping the Discord about this pull request.

Please provide the following information for your token.
Please include change to the src/lib/.json and in the PR
At minimum each entry should have

Token Address:  AfFMw89qdmUEHAyaPN6CEztp6z1c5LHmboiiaTn3giZc
Token Name:  RESPECT
Token Symbol: RESP
Logo https://i.imgur.com/gXQrEgO.png
Link to the official homepage of token: https://respect.cash
Coingecko ID if available (https://www.coingecko.com/api/documentations/v3#/coins/get_coins__id_):

@bartosz-lipinski everything is fine?

@bartosz-lipinski please let me know what I can do for pulling out