Non-daemon threads are preventing process from terminating

The SDK is creating non-daemon threads. Some of these threads are still running after the sender (proxy version in my case) has been closed. This prevents the process from exiting.

Full thread dump: https://gist.github.com/prydin/5fe7accee96c09a345843ae0bdb69ba9#file-thread-txt
Lots of threads stuck in timer tasks, for example...


SIGABRT in ActionModelFull

Hello everyone,
this is a follow up on a previous issue, in which I asked about a SIGABRT that I was facing in my custom DifferentialActionModel.
I tried following the suggestion of @cmastalli, however, without any success. Trying to reduce my problem to a minimal example, I started from this example. The full script runs without any problems in my conda environment with crocoddyl 1.8.1 on a M1 Mac. If I, however, add this snippet
actuation_data = actuation.createData()
u0 = pinocchio.utils.zero(robot_model.nv)
actuation.calc(actuation_data, q0, u0)

after line 27 (i.e. after the actuation model and q0 is defined), I receive a SIGABRT. Checking the C++ code of the ActuationModelFull
virtual void calc(const boost::shared_ptr<Data>& data,
                    const Eigen::Ref<const VectorXs>& /*x*/,
                    const Eigen::Ref<const VectorXs>& u) {
    if (static_cast<std::size_t>(u.size()) != nu_) {
      throw_pretty("Invalid argument: "
                   << "u has wrong dimension (it should be " +
                          std::to_string(nu_) + ")");
    }
    data->tau = u;
  };

I tried to provoke an exception by feeding in an actuation that is too large. More precisely, I replaced the above snippet with
actuation_data = actuation.createData()
u0 = pinocchio.utils.zero(robot_model.nv + 20)
actuation.calc(actuation_data, q0, u0)

However, the SIGABRT error still appears and no exception is thrown. Is there a possibility that the issue that I am experiencing has to do with the Python interface around croccoddyl?
Best
Pascal

Hi @psclklnk
Your test works on my M1 Mac using the latest release. Your problem s not related to Crocoddyl. Instead, it could be related to a "dirty" installation setup.
I can't tell you more than just "clean up your conda setup or try a docker".

Hi @cmastalli
you are correct it works without a problem with the newest version. Thanks for this info! The issue was probably caused by me fixing an eigenpy error after installing crocoddyl-1.8.1 via
conda install -c condo-forge crocoddyl=1.8.1

in a fresh conda environment. The error was
Symbol not found: (__ZN7eigenpy9NumpyType7getTypeEv)

and I avoided this error by running
conda install eigenpy=2.9.2

assuming that conda avoids compatibility issues. However, I can exactly reproduce the error with this"fix". Given that the project I am working on was built on 1.8.1 (and we faced some very unexpected behavior with 2.0), is there a way to keep using version 1.8.1, i.e. fix the eigenpy issue without causing the SIGABRTs?
Best
Pascal


Add supports for CentOS distribution

As far as we know, many develops use centos distribution in production. So it would be popular if we can provide the centos image and install guide.

+1

+1


feat: make all links from bio external

yeah and also add the noopener noreferrer nofollow stuff!

Was literally looking for this and saw you already did it. Hell yeah brother.


Expand-errors blames incorrect conjunct

In the attached recording, the "expand errors" report blames two failing quantified conjuncts, below. But only the second one is a problem; there's nothing wrong with the first conjunct. And indeed if you restore the commented-out part of the proof at the end of kv::lemma_volatile_matches_durable_after_create, you find that fixing the second conjunct is sufficient to fix the verification.
          |   forall |k|
          |       new_volatile_index.contains_key(k) ==>
          |           let indexed_offset = new_volatile_index.spec_index(k).0.header_addr;
          |               new_durable_state.contains_key(indexed_offset) ✘
          |               |   new_durable_state.spec_index(indexed_offset) is Some
          |               +---
          |               new_durable_state.spec_index(indexed_offset).0.key == k ✘
          |   forall |i|
          |       new_durable_state.contains_key(i) ==>
          |           new_volatile_index.contains_key(new_durable_state.spec_index(i).0.key) ✘
          |           |   new_volatile_index.spec_index(new_durable_state.spec_index(i).0.key) is Some
          |           +---
          |           new_volatile_index.spec_index(new_durable_state.spec_index(i).0.key).0.header_addr == i ✘

2024-07-11-11-44-44.zip

this may have been fixed by d56fd238ba988fed96229c161dcfc2d926c52635


libray 76 terms

New python definitions corresponding to the 76 term expression for specific volume.

@ocefpaf my intention was to continue working on this after I finished my work with Paul, but I have been quite busy with some other things and haven't had a chance to look at it again yet. I will hopefully have a little more spare time from now on, so I would be happy work on it under your guidance.

@okrzysik great to hear that you want to continue work on this.  Take your time though, slow and steady wins the race :wink:
Meanwhile I will break @efiring suggestions down to small pieces that we can tackle with small PRs.

There are errors on some of the functions here, thus inconsistent with the GSW-Matlab 3.0.5 output.

Closing this b/c we are going the c-wrapper route.


Add "Navigate to Declaration" across files

First off thanks for putting this plugin together. It's absolutely amazing and have most likely saved me hours of work already.
I do have one feature request though. It's amazing that you support "Navigate to Declaration" (CMD+Click) in GQL. However we have our schema split up into multiple files to make it easier to navigate. It would be amazing if the plugin could search across all .graphqls files in the project and not just the current file.
Don't have any experience with Intellij Plugins but might have a look around the code base to see if it's an easy fix. But would love to hear from you either way.
Thanks again,
Andreas

Hmm can't seem to find it :(

Hi Andreas.
Thanks for using a plugin.
Modules and scopes in IntelliJ are one of the more advanced features, and underpins other features such as find usages and go to declaration.
Right now, the GraphQL ecosystem is growing at an explosive rate, and with that follows a million different ways of structuring a project. So while your suggestions makes sense for your use case, it might be considered a bug for other projects. For example, Apollo very recently introduced imports in comments.
I'd like to see more of a consensus form, maybe even as part of the spec, before applying the efforts that this kind of tooling requires. But I'll keep this issue open an enhancement.
Best regards,
Jim.

Same here.
As example, apollographql and it's schemas that often combined from different files.
https://www.apollographql.com/docs/graphql-tools/schema-stitching.html

The 2.0 alpha makes it possible to have multiple schemas in a single project using IntelliJ/WebStorm "Scopes". You can configure them for the project in the IDE Settings dialog. The scopes also apply to resolving fragments. By default the entire project is searched.
See 2.0.0-alpha-2 if you'd like to try it and help test it.

The 2.0 release supports this by discovering your schema files on the fly. See https://jimkyndemeyer.github.io/js-graphql-intellij-plugin/docs/developer-guide
Best regards,
Jim.


Updated Electron to 0.35.0 and fixed deprecation warnings

loadUrl has become loadURL
ipc module has been renamed to ipcMain

Full changelog: https://github.com/atom/electron/releases/tag/v0.35.0

Good job, thank you!


Combined TPCH runs & uniformed summaries for benchmarks

Which issue does this PR close?

Closes #4127.
Rationale for this change

This PR adds support for executing TPCH benchmarks without a --query. When there is no --query, all the queries (from 1 to 22) is executed and the execution information regarding them are saved.

Summarry for tpch --query=1
Summary for tpch

Are there any user-facing changes?

The TPCH benchmark output format is different now.

While playing with this, I've also written a little Python script to function like a benchmark comparison UI (poor man's conbench): https://gist.github.com/isidentical/4e3fff1350e9d49672e15d54d9e8299f
It is quite basic, but I think it can automate a few stuff for https://github.com/datafusion-contrib/benchmark-automation/tree/main. E.g. an example comparison between
 $ ./target/release/tpch benchmark datafusion --path /opt/data-parquet --format parquet --iterations 3 -o /tmp/benchmarks --disable-statistics
 $ ./target/release/tpch benchmark datafusion --path /opt/data-parquet --format parquet --iterations 3 -o /tmp/benchmarks
 $ python t.py compare /tmp/benchmarks/file1.json /tmp/benchmarks/file2.json
┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query        ┃     Baseline ┃   Comparison ┃        Change ┃
┡━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ Q1           │     702.18ms │     687.86ms │     no change │
│ Q2           │     413.74ms │     302.22ms │ +1.37x faster │
│ Q3           │     392.94ms │     395.34ms │     no change │
│ Q4           │     111.28ms │      97.01ms │ +1.15x faster │
│ Q5           │     465.81ms │     487.92ms │     no change │
│ Q6           │     402.94ms │     402.48ms │     no change │
│ Q7           │     868.18ms │     889.51ms │     no change │
│ Q8           │     499.98ms │     468.68ms │ +1.07x faster │
│ Q9           │     827.54ms │     837.67ms │     no change │
│ Q10          │     503.22ms │     492.29ms │     no change │
│ Q11          │     221.30ms │     167.37ms │ +1.32x faster │
│ Q12          │     204.10ms │     170.99ms │ +1.19x faster │
│ Q13          │     441.50ms │     423.67ms │     no change │
│ Q14          │     373.42ms │     383.57ms │     no change │
│ Q15          │     356.24ms │     352.67ms │     no change │
│ Q16          │     115.38ms │     117.98ms │     no change │
│ Q17          │    2099.22ms │    2209.00ms │  1.05x slower │
│ Q18          │    1255.95ms │    1285.39ms │     no change │
│ Q19          │     656.93ms │     660.46ms │     no change │
│ Q20          │     640.30ms │     624.94ms │     no change │
│ Q21          │     697.55ms │     685.22ms │     no change │
│ Q22          │      84.20ms │      81.76ms │     no change │
└──────────────┴──────────────┴──────────────┴───────────────┘

I don't know how much you want to test the benchmark run code (it might be easier to just deal with any breakages than trying to prevent regressions through tests)

Yeah, I tried to take a look at it but it seems like it would take a bit too much effort for a relatively simple feature. I guess we'll probably notice if something got broken when we have an automated benchmark system 😄


Implement AtomicPointer for s390

Signed-off-by: Wang Dong<EMAIL_ADDRESS>

Hi, maintainer
I have signed the CLA. Would you please merge this patch?

@WandyLau Thank you very much for your contribution!
Can you please briefly explain (here or in a comment in code) why the __asm__ __volatile__("" : : : "memory") idiom is safe for S390?
Linux seems to use bcr 15,0 to get a memory barrier on S390. -- https://github.com/torvalds/linux/blob/master/arch/s390/include/asm/barrier.h
At the same time, Linux uses mfence for barriers on X86 -- https://github.com/torvalds/linux/blob/master/arch/x86/include/asm/barrier.h
We don't seem to need mfence because the memory model guarantees sequential consistency, so I imagine there's an explanation for S390 as well.
Thank you very much!

Skimming through http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=508100 suggests that S390 also guarantees sequential consistency (using a directory to implement cache coherence) just like X86. I'd like some confirmation that I understood this correctly, or the correct explanation.
Thank you!

 And this implementation is a standard one as intel(x86).  I don't think this will have something to do with mfence just like  your previous response.

@pwnall Hi, I wonder if this is good to merge?

@WandyLau Sorry for taking so long to get back to you!
It's neat that you have access to the S390 team! Can you please point to some public document that describes the S390 memory consistency model from a technical angle (the one I found has a heavy marketing slant) and makes it clear that your implementation is correct?
On a very related note, LevelDB will require C++11 support by the next release. If your compilers don't have that support, you won't be able to build future version of LevelDB.

@pwnall
I am not sure if there is any open document related to this.
I googled some, but without any result.
I have a mail for the guy once I got the answer I will tell you. He also said as below:
**this seems to be a standard acquire / release barrier
if you have GCC support for atomic, this should already work with the code as is
or else, you can implement the "memory barrier" variant, using the same compiler-only that is used on Intel:
asm volatile("" : : : "memory");**
Yes, we will update the gcc accordingly.

@WandyLau I've landed the changes I've mentioned in this thread. I think that you shouldn't need this PR, unless the <atomic> implementation in the S390 toolchain is worse than the memory barrier listed here.
Also, in the not-too-long term, we plan to remove the special cases in this file and assume that toolchains implement <atomic> sensibly. Would you still like to discuss this PR, or can it be closed?

@pwnall What do you mean by "landed"? I have asked the guy, but no response so far. I will ask him later again. You said you will remove special cases, I am not sure what do you mean. I hope this patch
can be merged to support s390. No discussion I think. If the proof of the this work is required, I will ask the guy later soon.

@WandyLau The changes I mentioned have been developed in an internal repository, and were committed to the open source repository recently. This is what I meant by "landed". The master branch of LevelDB currently requires a compiler with C++11 support, and is built using CMake.
If your have a C++11 toolchain, you should have the <atomic> header, and AtomicPointer can take advantage of that. You should never get the Please implement AtomicPointer for this platform. error. On the flip side, if you don't have a C++11 toolchain, you won't be able to build LevelDB.
Can you please try building the master branch of LevelDB on your system, and consider whether this PR is still needed?

yes, that works. I think this can be closed then. Thanks.

Hey guys. I'm trying to build the leveldb on IBM s390x (not the s390).
I'm getting the error: #error Please implement AtomicPointer for this platform. error even after I get the C++11 toolchain for the g++ (alias g++="g++ --std=c++11").
Can someone give me an advise?
Thank you.

Hey guys. I'm trying to build the leveldb on IBM s390x (not the s390).
I'm getting the error: #error Please implement AtomicPointer for this platform. error even after I get the C++11 toolchain for the g++ (alias g++="g++ --std=c++11").
Can someone give me an advise?
Thank you.


NLog，The scroll bar is still at the initial position when the data is gradually increasing.

This function solves the problem (这个功能解决的问题)
The scroll bar is still at the initial position when the data is gradually increasing.  How do I keep the scroll bar up to date like the log in CMD
Expected API (期望的 API)
The scroll bar is still at the initial position when the data is gradually increasing.  How do I keep the scroll bar up to date like the log in CMD

use watch and logInstRef.value.scrollTo({position: 'bottom'})
watch(()=>logRef.value,(cur)=>{
  logInstRef.value.scrollTo({position: 'bottom'})
})

I will creat a demo in docs for you later


Add documentation for Object>>#as:

This methods allows to do some kind of cast.
For example if you have 2 classes A and B with B inheriting from A, it is possible to do the following:
a := A new.
b := a as: B.

This method is a bit specific but can sometimes be useful.
I'd put it in https://github.com/pharo-open-documentation/pharo-wiki/blob/master/General/CoolSnippets.md but it feels that it should be somewhere else.
What do you think?
@jecisc

I knew #become: and #becomeForward: but not #as: :P
Maybe we could do a page about reflectivity in general?  » :D

A page about reflectivity is a good idea. But I am not sure that #as: is about reflectivity. I will ask Marcus :-).

#as: is not about reflexivity but collection convertion and it uses only polymorphism for perform its stuff

@VincentBlondeau #as: is not only about collections. Check the implementation of Object>>#as:. It's for all similar objects.


lib/encryptions/cn.ts uses Node.js class Buffer which is missed in browsers

I'm submitting a bug
[* ] bug report
[ ] feature request
[ ] question about the decisions made in the repository
[ ] question about how to use this project

Summary

There is a bug with converting counter into hex string while using generateProtectionAuth. This line uses Node.js class Buffer https://github.com/vMReal/digest-auth/blob/95bd88ebefa967e1e6bb96ae61fe826ac43635c8/src/lib/encryptions/cn.ts#L11 which is absent in browsers. Please consider replacing it with something.

Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

I used a workaround (just to test if there are another errors) by replacing js code of cn.js with this and found that everything works:
    static toHex(value) {
      var arr1 = [];
      for (var n = 0, l = value.length; n < l; n ++)
      {
        var hex = Number(value.charCodeAt(n)).toString(16);
        arr1.push(hex);
      }
      return arr1.join('');
      // if (value > INT32_MAX_VALUE)
      //       return '00000000';
      //   const buf = Buffer.allocUnsafe(4);
      //   buf.writeInt32BE(value, 0);
      //   return buf.toString('hex');
    }

Thank you. I going to fix ASAP

I have fixed https://github.com/vMReal/digest-auth/pull/6


chase colleges after one week

chase colleges after one week

I have merged this as Ash is away for a leave.


Command arguments do not work with jest, using environment variables

Coverage decreased (-0.03%) to 96.032% when pulling c722101dbcd7f31f691491056d28402531a0df7d on disable-jest into 71aa327c4b3f35dd304a5b7aefcee53cb73872c3 on master.


Status 400 ：Invalid json data when posting http request

I have successfully deployed my model but I got some problems when trying to post http request. The shape of my model  input tensor is (-1,-1-1,3). The Graph Signature information is listed below

The following code is used to post request
import cv2
import numpy as np
import json
import requests

img = cv2.imread('./Images/0001TP_008550.png')
img = cv2.resize(img,(352,288))
rows = img.shape[0]
cols = img.shape[1]
img = np.expand_dims(img,0)
dict_min  = {"images":img.tolist()}
endpoint = "http://<IP_ADDRESS>:8500"
jsr=json.dumps(dict_min)
result = requests.post(endpoint, json=jsr)
print(result.text)

I know this is a problem with my data format, but how could I solve it? Thx a lot.

The OpenCV python image object would not be submitted as json data.
You can refer to our image client which will read the image file and parse to json string for inference. Please refer to https://github.com/tobegit3hub/simple_tensorflow_serving/blob/master/clients/python_client/image_client.py .


CASMCMS-8714: Fix ReDoS CVE in cfs-ara

Summary and Scope
Snyk reported that cfs-ara is vulnerable to this CVE:
https://security.snyk.io/vuln/SNYK-PYTHON-DJANGO-5750790
This updates cfs-ara to a version where the Django module is pinned to a version with this CVE fixed.
Issues and Related PRs

Resolves CASMCMS-8714
Source PR
release/1.4 backport manifest PR
stable/1.5 backport manifest PR
release/1.6 backport manifest PR

/backport stable/1.5 release/1.6


Unable to download directory(along with files)

Want to rename the directory for which trying to download all files in directory so that they can be loaded into new directory.

The following URL can be used to download directory to Local:
GitHub Directory Download


Add macro to tolerate differing values for alternate binding count when importing

https://github.com/JujuAdams/Input/commit/3366c8e85e57be2b6646e87333bbdb9c5cb23517


Build failed on Linux Fedora 23 x86_64

VSCode Version: source HEAD
OS Version: linux Fedora 23

Steps to Reproduce:

After clone the repository run:
./scripts/npm.sh install --arch=x64

86131 silly lifecycle<EMAIL_ADDRESS>Args: [ '-c', 'node-gyp rebuild' ]
86132 silly lifecycle<EMAIL_ADDRESS>Returned: code: 1  signal: null
86133 info lifecycle<EMAIL_ADDRESS>Failed to exec install script
...

@alexandrudima this seems to fail compiling native-keymap.

@helio-frota Have you installed all the necessary prerequisites at the minimum specified versions ?
It is possible native-keymap fails because it is the first native node module encountered by npm.

@alexandrudima sorry:
python --version
Python 2.7.10
node --version
v5.11.0
npm --version
3.8.6
gcc --version
gcc (GCC) 5.3.1 20151207 (Red Hat 5.3.1-2)

@bpasero @alexandrudima thanks it worked with:
sudo dnf install libX11-devel.x86_64

@helio-frota Thank you. I have updated the wiki to make this clear:


[GSSOC'23]: adding Pythagorean triplet generator JS-project

Describe the project you want to add with tech stack
adding Pythagorean triplet generator JS-project
Expected behavior
This project creates a simple web page where users can enter a range and click the "Generate Triplets" button to find and display all the Pythagorean triplets within that range.

@MohitGupta121 @TusharKesarwani sir kindly assign me this issue


Remove return_likelihoods parameter

Unnecessary SDK "feature", just return everything we got from API

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


user-select: none

would be great to get support for this one in one of the modules :-)

Hey thanks for the suggestion - has been brought up by a number of people before.
I never add this to text elements so won't be adding it to Tachyons. I think that people should always be able to select text if they want. I understand some people don't agree with me on this :)

ah okay cool. yah i guess just for like tabs and things it can be annoying if you accidentally double click and it highlights it. maybe i should be using a different element though :-P


Problem calculating fourth-degree poly roots

Unfortunately the library fails to evaluate roots of fourth-degree equations. Take this code for example:
use rustnomial::{Polynomial};

fn main() {
    let poly = Polynomial::<f64>::new(vec![1.0, 1.0, 1.0, 1.0, 1.0]);
    let roots = poly.roots();
    match roots {
        rustnomial::Roots::OnlyRealRoots(_) => {
            println!("roots() returned `Only Real Roots`");
        },
        _ => {
            println!("roots() returned some other type.");
        }
    }
}

Running this with rustnomial = "0.2.0" prints:
roots() returned `Only Real Roots`

while in fact x^4 + x^3 + x^2 + x + 1 has no real roots. The vector V in OnlyRealRoots(V) is empty too.
Some other times, the library returns OnlyRealRoots(V) with V containing only real roots, skipping complex ones.
Maybe I'm missing something here, but my understanding was that the library should have returned ManyComplexRoots in these cases.
BTW, thanks for the nice package. I'm using it in an educational project.

The issue in this case is that I'm using the roots library to find roots, and this library is limited to strictly real roots. I do implement the algebraic solutions for cubic polynomials and below - quartic polynomials are on my todo-list, but the equations are quite long and a pain to implement. As no closed-form solutions exist for the roots of polynomials with degree 5 or above, I do not return complex roots for these.
I've fixed OnlyRealRoots(V) having an empty V on the latest master commit. Complex root finding for quartic polynomials (and root finding if the polynomial can be reduced to a quartic polynomial with roots found by the roots library) can be implemented (https://en.wikipedia.org/wiki/Quartic_function). I'd be more than happy to accept a PR for this.
Implementing general root-finding is outside the scope of this library, and a good solution requires a lot of work and time to implement properly. If you find a library that manages to do these things, I'd be happy to know and use it.

So I suggest adding a note in the README, clarifying that the root-finding functionality is limited to third/fourth degree polynomials.
About solving quartic functions, I just tried to implement it in Rust and it seems to have worked out. I also tried to port it to rustnomial but Rust is really Greek to me and I couldn't get a grasp on the existing code base, and I also had trouble trying to make my code work with generic template types instead of only f64. So I'll just copy-paste my code here. I understand that maybe it's totally worthless, but if you find it good, you could make the required changes and add it to the library. Again, maybe it's just easier to write from scratch...
#![allow(non_snake_case)]

use num::Complex;
use std::f64::consts::PI;

// Solve a x^2 + b x + c = 0
fn quadratic_roots(a: f64, b: f64, c: f64) -> [Complex<f64>; 2]
{
    let D = Complex::new(b.powf(2.0) - 4.0*a*c, 0.0);
    let x1 = (-b + D.sqrt()) / (2.0 * a);
    let x2 = (-b - D.sqrt()) / (2.0 * a);
    return [x1, x2];
}

// Solve a x^4 + b x^3 + c x^2 + d x + e = 0
fn quartic_roots(coefficients: [f64; 5]) -> [Complex<f64>; 4]
{
    let [a, b, c, d, e] = coefficients;

    let D0 = c.powf(2.0) - 3.0*b*d + 12.0*a*e;
    let D1 = 2.0*c.powf(3.0) - 9.0*b*c*d + 27.0*b.powf(2.0)*e + 27.0*a*d.powf(2.0) - 72.0*a*c*e;
    let _D = -1.0/27.0 * (D1.powf(2.0) - 4.0*D0.powf(3.0));

    if D0 == 0.0 && D1 == 0.0 // special case; three repeated roots
    {
        let x0 = quadratic_roots(6.0 * a, 3.0 * b, c)[0];
        let x1 = -b/a - 3.0*x0;
        return [x0, x0, x0, x1];

    }

    let p = (8.0*a*c - 3.0*b.powf(2.0)) / (8.0*a.powf(2.0));
    let q = (b.powf(3.0) - 4.0*a*b*c + 8.0*a.powf(2.0)*d) / (8.0*a.powf(3.0));

    let mut Q = ((
        D1 + Complex::new(D1.powf(2.0) - 4.0*D0.powf(3.0), 0.0).sqrt()
    ) / 2.0).powf(1.0 / 3.0);
    if Q == Complex::new(0.0, 0.0) // spacial case; use the other square root for D1^2-4*D0^3
    {
        Q = ((
            D1 - Complex::new(D1.powf(2.0) - 4.0*D0.powf(3.0), 0.0).sqrt()
        ) / 2.0).powf(1.0 / 3.0);
    }

    let mut S = 0.5 * (-2.0/3.0 * p + 1.0 /(3.0*a) * (Q + D0/Q)).sqrt();
    if S == Complex::new(0.0, 0.0) // spacial case; use another cube root for Q
    {
        Q = Q * Complex::from_polar(&1.0, &(2.0 * PI / 3.0));
        S = 0.5 * (-2.0/3.0 * p + 1.0 /(3.0*a) * (Q + D0/Q)).sqrt();
    }

    let x1 = -b/(4.0*a) - S + 0.5 * (-4.0*S.powf(2.0) - 2.0*p + q/S).sqrt();
    let x2 = -b/(4.0*a) - S - 0.5 * (-4.0*S.powf(2.0) - 2.0*p + q/S).sqrt();
    let x3 = -b/(4.0*a) + S + 0.5 * (-4.0*S.powf(2.0) - 2.0*p - q/S).sqrt();
    let x4 = -b/(4.0*a) + S - 0.5 * (-4.0*S.powf(2.0) - 2.0*p - q/S).sqrt();

    return [x1, x2, x3, x4];
}

fn main() {
    let X = quartic_roots([1.0, 1.0, 1.0, 1.0, 1.0]);
    for i in 0..4 {
        println!("{}", X[i]);
    }
}

#[test]
fn test_quartic_random() {
    let random_coefficients = [
        [0.548914, -0.917383, -0.693302, 0.634482, 0.153504],
        [-0.449297, 0.150007, 0.056093, 0.780327, -0.205118],
        [-0.628965, -0.280957, -0.736180, -0.432911, 0.339487],
        [-0.347198, 0.201530, 0.881887, 0.669201, -0.075353]
    ];

    for coefficients in random_coefficients {
        let roots = quartic_roots(coefficients);

        for x in roots {
            let [a, b, c, d, e] = coefficients;
            let y = a*x.powf(4.0) + b*x.powf(3.0) + c*x.powf(2.0) + d*x + e;
            assert!(y.norm() < 1e-9);
        }
    }
}

#[test]
fn test_quartic_special_case_factorable() {
    let roots = quartic_roots([1.0, 4.0, 6.0, 4.0, 1.0]);
    assert_eq!(roots, [Complex::new(-1.0, 0.0); 4]);
}


add ClientOptBuilder interface to create ClientOpt by map.

Signed-off-by: allen.wq<EMAIL_ADDRESS>
Ⅰ. Describe what this PR did
add ClientOptBuilder interface to create ClientOpt by map for protocol.
Ⅱ. Does this pull request fix one issue?

NONE.
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗？)
no need.
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews

Codecov Report

Merging #1368 into master will decrease coverage by 0.07%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #1368      +/-   ##
==========================================
- Coverage   51.80%   51.72%   -0.08%
==========================================
  Files         135      136       +1
  Lines        8803     8814      +11
==========================================
- Hits         4560     4559       -1
- Misses       3866     3877      +11
- Partials      377      378       +1

Impacted Files
Coverage Δ

pkg/protocol/http/clientopt.go
0.00% <0.00%> (ø)

pkg/protocol/http/http.go
43.39% <ø> (+12.72%)
:arrow_up:

supernode/daemon/mgr/scheduler/manager.go
21.91% <0.00%> (-0.69%)
:arrow_down:

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 e8a6514...16fc02a. Read the comment docs.

May I suggest this: https://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis?

May I suggest this: https://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis?

Good idea!  By the way,  the argument for NewProtocolClient will be more sensible and extensive.
Now I have implemented it by functional options, could you have a review again.
ping @zhouhaibing089  @lowzj

I define a register function which registers functional options of which argument is map[string]string, by the way, developer could easily  create protocol client without care about instance of protocol.
ping @zhouhaibing089 @lowzj

I have two questions, but roughly looks good to me. :)

Now, the default functional option which protocol should implement is changed from func(map[string]string) to func(map[string]interface{}) for  more general.
@zhouhaibing089 @lowzj PTAL.


Fix merge behaviour

When merging two container objects, the children merged from the other container into the target container should have the appropriate parent attribute set to reference the target.
Example:
After seg1.merge(seg2), we expect that all the AnalogSignal objects in seg1.analogsignals should have sig.segment == seg1, whether sig was originally in seg1.analogsignals or seg2.analogsignals.
After the operation, seg2 will be in an inconsistent state, but I think this is ok, as I wouldn't normally expect to continue using an object after merging it into another. The alternative is to take a copy of seg2 before merging it, but this would likely have a bad effect on the performance of merge() for little benefit.

The solution is OK for me.
If a user really want a copy then it have to be done before the merge.
I merge it.

No I wait for @JuliaSprenger comments.

Ok, then we merge this now and continue discussing in another issue.


v1.0.0

This PR aims to release the first version of ShellKit

Welcome to Codecov :tada:
Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment.
Thanks for integrating Codecov - We've got you covered :open_umbrella:


Persistent Storage for Prometheus

What is missing?
Using a PV to store metrics in Prometheus even when deployment is upgraded or deleted for a moment.
Why do we need it?
I would like to keep the metrics for a certain rather than til the next deployment.
Environment
Any Kubernetes cluster.

kube-prometheus version:
84f24095d6a057a969bae3b6f40762d2a0dbb8b4 (release-0.7)

Anything else we need to know?:
I think you got the point.
I don't know, why nobody speaks a word about storage for metrics. Maybe it is a bad idea for any reason?

This is already possible, we have this example which allows attaching PVC for long-term storage.

Ohh thanks, that all I need to know.


[BEAM-9987] added instruction for converting maven project to gradle

Added instructions for converting the example WordCount Maven project generated using the generate:archetype into a Gradle project. I've attached images of what it looks like when I run it locally. I don't have much experience writing instructions like this so please let me know if there are any suggestions on how the phrasing/formatting could be better!

Review: @angoenka

Thanks @JustineKoa !
This looks good.
Shall we also add instructions to execute the pipeline using the newly created gradle project?

Thanks @JustineKoa
This looks good to me.
Let me know if i should merge it.

@angoenka Thanks! It is ready to merge now.


Provide a ES5 version

In tsconfig.js, the target is esnext, but in real world, we need support some device in iOS 9, so we perhaps need a ES5 version.

Should be fixed in v0.1.14.

@quietshu In v0.1.15, I still see the syntax es6 in sources code build.


[jvm-packages] fix potential TaskFailedListener's callback won't be called

there is a possibility that onJobStart of TaskFailedListener won't be called, if
the job is submitted before the other thread call addSparkListener.
detail can be found at https://github.com/dmlc/xgboost/pull/6019#issuecomment-760937628

@hcho3 could you review this change ?

@hcho3 could you review this change ?

Please rebase to master.

Please rebase to master.


limit assets to trade to the ones trusted.

The long list of assets is cool cause it shows the volumes traded etc.
From my side it is a bit overwhelming for users.
If I trust EURT and XLM and BTC why do I need to see 100 other currencies...
I am not sure what the solution is but hiding information (apple style) is often good.
Thanks

This issue is being tackled in the upcoming updates to the trading and send pane and it'll likely make it through. One direction that StellarTerm is going in is that trust lines are becoming more hidden from the user. But still not exactly sure how that'll turn out. I'll keep this in mind.
I will consult you again for your input once these things are done.

i added trade buttons to user balances


RFP - Librefox

Firefox set for a better security, privacy and performances.
https://github.com/intika/privafox-firefox

seems like the project have been moved:
https://github.com/intika/Librefox-Firefox

Status: Review
https://chocolatey.org/packages/librefox-firefox

Status: Published
https://chocolatey.org/packages/librefox-firefox
Can be closed.


Release 1.8.0

Description of changes:
Update RELEASE_NOTES and versions for CWAgent and operator
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

I also see this commit - https://github.com/aws-observability/helm-charts/pull/45, lets include that as well


Update bcbio/cwl/hpc.py

add lsf default_config and fix job-id-regex

Thanks so much for these fixes; I appreciate you adding and testing this.


feature/MOB-25 : Searching Users and Art Items

Now a user can search for another user or an art item.

Reviewed, merged without conflict.


Remove commented-out lines in Docker-compose

After PR #2326 is merged, remove the following comment-out lines in docker-compose.yml
See https://github.com/LD4P/sinopia_editor/pull/2326#issuecomment-673047771

16-17
57-59
74-76

For what it is worth, I find it useful to have those lines available but commented out as it makes it easier to switch to local building during development.

Given discussion and decision made by the team, we will keep the commented-out lines for local builds as well as comment-ed out sections for the Elasticsearch and MongoDB monitoring services


Fix compilation with clang8 #1674

This PR fixes #1674 by removing the copy ctor and assignment operator of tray_client.
Copy assignment was marked as defaulted however as stated in the C++ standard:

A defaulted copy/move assignment operator for class X is defined as deleted if X has:

[…]
non-static data member of reference type, or
[…]

§ 12.8

Since a reference can't be reassigned, I just marked this operator as explicitly deleted.
The copy ctor was also defaulted and it is well-formed but the dtor unembed the window so copying that class may cause bugs, so I also marked it as explicitly deleted. Another solution if copying this class is needed is to do the "unembeding" in a custom deleter of m_xembed.

Oh, so because m_connection is of reference type, the move assignment operator is implicitly deleted?

Oh, so because m_connection is of reference type, the move assignment operator is implicitly deleted?

Yeap, the move assignment operator is also implicitly deleted. Moreover there is no move ctor because  there is a destructor declared. So this class is non-movable and non-copyable.
The move constructor can be declared and implemented without causing any problem, but it is needed to add a condition to not free the resource in the dtor.


[Bugfix] Shard embedding hooks

Description
When sharding word embedding, we use forward pre-hook to mask inputs for different devices in a TP group. Accordingly, we have to mask the invalid output using the same mask in forward post-hook. Since the input mask generated in pre-hook cannot be saved, we currently re-generate the mask in post-hook. However, at this moment the input is already masked, so we cannot re-generate a mask using the same logic.
Checklist

[x] PR's title starts with a category (e.g. [Bugfix], [Model], [Tutorial], etc)
[x] Changes are complete (i.e. I finished coding on this PR)
[x] All changes have test coverage
[x] Code is well-documented

cc @chhzh123 @zarzen

Thanks @chhzh123


chore: update sd-jwt

Updates sd-jwt to the new structure with subpackages. It also removes the resolutions and updates to newer version of SD-JWT. There are some issues currently with the versions of SD-JWT when you try to install 3.0.0.
Waiting for stable release of sd-jwt, but then it would be great if we can get a ssi-types 18.0.1 and PEX 3.0.1

Can merge already (and I'll maek a follow up pr) or we wait until a new release of ssi-types is ready (as it's pinned to @sphereon/ssi-types 0.18.0 exact)

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (4452b5e) 94.16% compared to head (4a73967) 94.16%.

:exclamation: Current head 4a73967 differs from pull request most recent head 378af15. Consider uploading reports for the commit 378af15 to get more accurate results

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #138   +/-   ##
========================================
  Coverage    94.16%   94.16%
========================================
  Files           64       64
  Lines         2364     2366    +2
  Branches       545      548    +3
========================================
+ Hits          2226     2228    +2
  Misses         133      133
  Partials         5        5

Flag
Coverage Δ

unittest
?

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

0.18.1 will be there shortly. Waiting for current CI run to release it

@TimoGlastra 0.18.1 is available

Updated


docs: Copy Zulip development community intro to Contributing guide.

Replaces somewhat awkwardly worded introduction to the Zulip development community in the Contributing to Zulip guide with an exact copy of the intro text on the /development-community landing page (through "...curated list of initial stream subscriptions."
Current page: https://zulip.readthedocs.io/en/latest/overview/contributing.html

Inspired by #23180, which should be closed when this PR is merged.

Merged, thanks @alya!


Update french translations

Editing inconsistent French translations
old translations don't make sense

Thank you for your contribution
However this is not where these files are edited, instead you edit them on the webplate, see here
Closing as this is not a valid change


Foolproof doesn't work with netstandard2.0

Hi guys!
Could you help me?
Wich version of foolproof I should install to work with netstandard2.0? I've already tryied FoolProof.Core 1.0.9 and FoolProof  0.9.4518

Hey @diogokrejci... this library code is pretty old. I don't think it'll work with netstandard2.0.
FoolProof.Core is not a different version but the core source code of the library.

Hey Leniel, thanks for answering so fast.
Do you intend to update this library code to work with netstandard2.0 ?

Nope.
There are 21 forks already. Maybe someone has done it already.


Running on unRAID

I'm trying to run this on unRAID to no success
Command:
root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='inventoryHunter' --net='bridge' -e TZ="America/New_York" -e HOST_OS="Unraid" -e 'w'='https://discord.com/api/webhooks/813312188512337961/dLgi5Eb5jFMb3R-AfMaHTFK2iGxkuG5nAD32xePeYlOwdIc2Hp4zOYlckgnm4PU940-4' -e 'a'='discord' -v '/mnt/user/appdata/inventoryHunter/config.yaml':'/mnt/user/appdata/inventoryHunter/config.yaml':'rw' 'ericjmarti/inventory-hunter' a55366d7d341191f7ff433669ec6c9624223b945b49d686bf5b75775cf04c013
Settings:

I keep getting the error run.py: error: argument -c/--config: can't open '/config.yaml': [Errno 2] No such file or directory: '/config.yaml'
I'm not sure as to why this is happening because I do have my config.yaml file exactly how I assigned it to variable c. My other variables seem to follow procedure as well.
Any ideas?

Not quite sure as it's been a while, but wouldn't unraid want a path and not a specific file as a container path? Don't specify the file in container path, just the folder.

I am successfully running this on unraid. I actually gave up on the UI and ran it in the terminal. Looks like it automatically filled up the web UI as follows:
Command i ran in terminal:
docker run -d --rm --name inventory-hunter --network host -v /mnt/user/appdata/inventory-hunter/data/config:/data -v /mnt/user/appdata/inventory-hunter/log/log.txt:/log.txt -v /mnt/user/appdata/inventory-hunter/config.yaml:/config.yaml ericjmarti/inventory-hunter:latest --alerter slack --webhook https://hooks.slack.com/services/my-hook-url

Web UI:

I've attempted what has been suggested here and I'm still getting the same error listed above. Any suggestions?


In autorender template, set canRoute.data directly instead of calling canRoute.map

Per the warning from https://github.com/canjs/can-route/blob/master/can-route.js#L542 set the canRoute.data directly in the autorender template.

I think this is done by the or from @bajix https://github.com/donejs/autorender/commit/23e7ad4f529c4b1b94f1ceb07ec36905263ab2b6#diff-5aaa80b08854707dd6d2ca8360926359


[Issue]: RocBLAS error on AMD Radeon RX 7600 XT

Rocm is showing my GPU but I get this error when trying to load an AI model:
rocBLAS error: Cannot read /home/krusie/text-generation-webui/installer_files/env/lib/python3.11/site-packages/torch/lib/rocblas/library/TensileLibrary.dat: No such file or directory
Aborted (core dumped)

Hi @SusieDreemurr,
RX 7600 XT is not officially supported by AMD.  Please refer to the System Requirement link https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html
Unofficially some people have a workaround by setting environment variable HSA_OVERRIDE_GFX_VERSION=11.0.0.  This is not supported by AMD but some have had success with it.
Thanks.

Ah, bummer. :/  Well, hopefully there will be official support but in the meantime, thanks for the workaround!

Closing this ticket as a workaround has been provided for this issue.  Thanks.


Show temperature in celsius

Hi,
saw this on /r/node. Can you add a Celsius option?

Yep, I'll add a feature/celsius branch.

I can do this if you like.

Yeah, that'd be nice. Maybe just an Object.prototype.toCels = function (val) kinda deal. This way, we can pass the Format object another parameter (a boolean, probably) that'll allow us to go like this:
// args.js
var Format = new format(json, true);

// Format.js
function Format(json, type) {
    this.celsius = type;
    ...
}

// data.js
Number.prototype.toCels = function (val) {
    if (val) {
        return this ... <convert to Celsius here>;
    } else {
        return this;
    }
}

That way we can just apply the toCels(val) method on any number we want to convert, with val = this.celsius as the parameter.
Sound good?


Include sha256 checksum on download links

Feedback:

Suggestion for the web site: it is a pretty common practice to show SHA256 checksum for the binary distribution packages you're exposing for download. Example: https://cloud.google.com/sdk/docs/quickstart-linux

Clearing milestone and owner, but keeping issue for tracking purposes.


[Bug] Inserting Sales Order via API with Dimension specified causes an error.

mockup:
send a request to https://yourBCurl/api/v2.0/companies(yourcompanyid)/salesOrders with the following body
{
    "customerNumber": "CUST001",
    "shortcutDimension1Code": "DIMVALUE01"
}

You'll get the response:
{
    "error": {
        "code": "Internal_RecordNotFound",
        "message": "The Sales Header does not exist. Identification fields and values: Document Type='Order',No.=''  CorrelationId:  2c7ecffa-1e82-4d96-a07f-6d4b8f374ca6."
    }
}

Validation of the Dimension is happening when Sales Header was not yet inserted.
table 36 "Sales Header"
{
...
    procedure ValidateShortcutDimCode(FieldNumber: Integer; var ShortcutDimCode: Code[20])
    var
        OldDimSetID: Integer;
    begin
        OnBeforeValidateShortcutDimCode(Rec, xRec, FieldNumber, ShortcutDimCode);

        OldDimSetID := "Dimension Set ID";
        DimMgt.ValidateShortcutDimValues(FieldNumber, ShortcutDimCode, "Dimension Set ID");
        if "No." <> '' then
            Modify();

        if OldDimSetID <> "Dimension Set ID" then begin
            Modify(); // <<<<<<<<<< issue here
            if SalesLinesExist() then
                UpdateAllLineDim("Dimension Set ID", OldDimSetID);
        end;

        OnAfterValidateShortcutDimCode(Rec, xRec, FieldNumber, ShortcutDimCode);
    end;
...
}

Not sure how exactly to handle this properly.

@PaulFurlet you should check ou the following thread on yammer.
https://www.yammer.com/dynamicsnavdev/threads/2253657843859456
There are similiar issues discussed and some fixes should arrive with BC22.2.
I haven't checked the preview version yet.


Reproducing "Cycles" example from readme with Azure OpenAI doesn't produce structured messages

Hi, new to langchain/langgraph so forgive me if I'm missing something obvious.
I basically copied and pasted the Cycles example from the README verbatim, swapping out the example tool for my own.  I noticed the tool wasn't being called, so I added some logging and I see that callModel gets executed, but the response from model.pipe(...).invoke(...) is a string, not an AIMessage, so it's missing all structure (including any function calls that might've been present in the response). This causes the shouldContinue to return end early since lastMessage.additional_kwargs is undefined.
I'm using AzureOpenAI exported from @langchain/openai.
Is there another package I should be using? I see that invoke is documented as returning a string so it seems like that can't be the right method for this?
Versions:
"@langchain/langgraph": "^0.0.21",
"@langchain/openai": "^0.0.33",

The issue was that I was using AzureOpenAI instead of AzureChatOpenAI...which is mildly confusing, to say the least. I'll file a ticket on the langchain repo because the docs could use some clarification


Fleet: The latest stable version for Policy Server could not be determined

To reproduce:

create k3d cluster, install rancher
install kubewarden extension
import second cluster
add extra cluster, use same network as first one k3d cluster create --network <docker network list ^^^> toimport
add fleet repository (use https://github.com/kravciak/kubewarden-ui.git, branch: fleet, path: tests/e2e/fleet/, or use fleet.yaml structure below

# == fleet/cert-manager/fleet.yaml ==
defaultNamespace: cert-manager

helm:
  releaseName: cert-manager
  chart: cert-manager
  version: 1.13.2
  repo: https://charts.jetstack.io
  values:
    installCRDs: true

labels:
  app: cert-manager

# == fleet/kubewarden/controller/fleet.yaml ==
defaultNamespace: cattle-kubewarden-system

helm:
  # version: 2.0.5
  releaseName: kubewarden-controller
  chart: kubewarden-controller
  repo: https://charts.kubewarden.io
  values:
    auditScanner:
      policyReporter: true

labels:
  app: kubewarden-controller

dependsOn:
  - selector:
      matchLabels:
        app: cert-manager
  - selector:
      matchLabels:
        app: kubewarden-crds

# == fleet/kubewarden/crds/fleet.yaml ==
defaultNamespace: cattle-kubewarden-system

helm:
  # version: 1.4.4
  releaseName: kubewarden-crds
  chart: kubewarden-crds
  repo: https://charts.kubewarden.io

labels:
  app: kubewarden-crds

# == fleet/kubewarden/defaults/fleet.yaml ==
defaultNamespace: cattle-kubewarden-system

helm:
  # version: 1.9.2
  releaseName: kubewarden-defaults
  chart: kubewarden-defaults
  repo: https://charts.kubewarden.io
  values:
    recommendedPolicies:
      enabled: true

labels:
  app: kubewarden-defaults

dependsOn:
  - selector:
      matchLabels:
        app: kubewarden-controller

The issue is due to the defaults chart not having any versions listed as this is expected here. Is this a typical situation where someone installing kubewarden with fleet will not have any versions tied to the charts?

You are probably right, I am also mixing fleet setup with manual management. I will try with versions.

I added versions to fleet.yaml, but I see no change - I still get policy-server:latest.

I see the problem now, we are only searching the catalog.cattle.io.clusterrepos resource for the kubewarden-defaults chart, when we need to also be searching the fleet.cattle.io.gitrepos. This will be an issue in many aspects where we fetch charts for the controller, defaults, metrics charts, and tracing charts.


Chess notation addition

Current coverage is 68.90%

Merging #52 into master will decrease coverage by -4.74% as of c416c6b

@@            master    #52   diff @@
=====================================
  Files           24     28     +4
  Stmts          444    492    +48
  Branches        64     71     +7
  Methods          0      0
=====================================
+ Hit            327    339    +12
- Partial          9     10     +1
- Missed         108    143    +35

Review entire Coverage Diff as of c416c6b

Powered by Codecov. Updated on successful CI builds.

Add unit tests


Missing information

Hi this page is missing some important aspects:

During the setup before you can run locally you have to create and associate a storage account.
After deploying, how do you find out the URL to make a request from a REST client?  If I just append /httpExample to the base URL of the function app it returns a 404 error. And querying the base URL returns a large XML document.

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

ID: b14560cd-c161-dfd7-671c-3ebcb931740b
Version Independent ID: aa145754-fb80-e3cb-59bf-be2b07df2730
Content: Create a JavaScript function using Visual Studio Code - Azure Functions
Content Source: articles/azure-functions/create-first-function-vs-code-node.md
Service: azure-functions
GitHub Login: @ggailey777
Microsoft Alias: glenga

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

The article has been updated to run the function from the UI. #please-close


Add configuration option to hide preview by default

Hi!
Thank you very much for this plugin. I just tried playing around with it and realised that there does not seem to be an option to disable preview by default. Would it be possible to add this simple configuration option so that the class would not be set unless "Live preview" is clicked by the user?
Thanks in advance and again, thanks for this great plugin!

Hi @Spreizu! Thanks for the input!
That sounds like a nice idea for an optional config setting. I'll look into it in the coming days.


Update icons

Update Icons
Description
Updated icons to be more consistent with each other.
Issue Board Ticket
Note: We still have to figure out how to potentially adjust size and layout of these. This should be paused until both new design and scrollbar bar bug PRs are in, since we'll have to base it off of those.
Type of change

[ ] Bug fix
[x] New feature
[ ] Documentation
[ ] Infrastucture
[ ] Other (please clarify): _

Change log

Replaced icons with new ones
Added attribution to README
Removed GitHub icon

Testing

Opened in different browsers to see they still showed

Checklist

[x] I have performed a self-review of my own code.
[ ] I have commented my code, particularly in hard-to-understand areas.
[x] My changes generate no new console warnings.
[x] I manually tested to prove my fix is effective or that my feature works.
[ ] I have assigned this PR to an owner.

I wondered whether it might make sense to switch to SVGs, then we should only need one for each social and hopefully by filling/stroking with currentColor we could handle both black and white mode, and we can scale to whatever is convenient.
Then maybe use a border to make the circle?
I think that would leave a pretty flexible situation for making changes in future.

@galactic-src If you can make these into SVGs, go for it, but otherwise, I think we're with PNGs for v1?

@galactic-src @royemosby I just got the redesign code merged into main and then into this. They look a bit big, but I think I do want them to be a pretty big call the action (and also be easily clickable)! They are at least consistent and better than the ones before with uneven circle borders inside the icon pngs themselves.


Suggested extension / improvement

How easy would it be to change the library to have versions of the encode and decode functions where the payload JSON was provided / returned just as the JSON text?
There are other good JSON generation / parsing libraries available, and some people may wish to use them to generate or process the payload, rather than the built in claim processing.

That's understandable.
I'm unsure whether that would maybe bloat this library's lightweightedness or not. But it's obviously a valid point.
It shouldn't be too hard to make some sort of l8w8jwt_decode_raw() function or something like that, that would do exactly the same things as the current decode function except just returning the raw jwt string from the payload.
Claims deserializing starts here at Line 561 - encoding would occur likewise just by passing the payload's JSON string in as parameter: users would need to absolutely ensure themselves manually that the json is actually json and valid, otherwise the JWT would be non-standard.

That's understandable.
I'm unsure whether that would maybe bloat this library's lightweightedness or not. But it's obviously a valid point.
It shouldn't be too hard to make some sort of l8w8jwt_decode_raw() function or something like that, that would do exactly the same things as the current decode function except just returning the raw jwt string from the payload.
Claims deserializing starts here at Line 561 - encoding would occur likewise just by passing the payload's JSON string in as parameter: users would need to absolutely ensure themselves manually that the json is actually json and valid, otherwise the JWT would be non-standard.

@firthmj Hi again, I hope you had a lovely, ehh, 3 years? ;D
Sorry for the insane delay.
Maybe you don't even remember this, but I never forgot about it. It was always kind of in the back of my head as an unclosed to-do item. I finally found some time to give due love to my FOSS libs on GH.
I have updated l8w8jwt's dependencies and addressed some of the other issues/feature requests that users reported, including this one. There are now two more decode functions that allow decoding and validating without the l8w8jwt claims struct (it just writes the payload JSON out into a char*, exactly as you suggested above :)
Thanks again for the ticket and recommendation.
Check out release 2.3.0 here:
https://github.com/GlitchedPolygons/l8w8jwt/releases/tag/2.3.0
:)
Cheers, and have a wonderful 2024!


Initial Startup script

@pslobo @kapz
We should create a Python startup script that will simplify something like
django-admin startproject project_name  --template=/your_path/django-project-template-yadpt/minimal/ --extension='py, yml, conf, sh' into startproject project_name --context='/path/file (maybe use a static --template pointing to github).
The extra-context could be the .env file with a mapping like DOMAIN="github.com".
The script would then read the file and pass the dictionary to a tool like https://github.com/alfredo/django-startproject-plus in order to override the need variables in the files.
The script will also create the let's encrypt certificates the first time before running anything else and call the following command:
docker run -it --rm -v https_certs:/etc/letsencrypt -p 80:80 -p 443:443 palobo/certbot:1.0 certonly -t -n --standalone -d github.com -m<EMAIL_ADDRESS>--agree-tos

@pslobo please detail here all the steps that should go into the script and the exact calls made to certbot

My initial idea for a startup script is based on the following assumptions:

The template can be hosted on github and download when the script is run the first time around;
We won't be running staging and production on the same server

Given those assumptions the steps could be something like:

Invoke the startup script with startproject --[staging|production] project_name
The script then asks for user input, namely DOMAIN, and EMAIL
Performs a git pull of the template for either staging or production
Fill in DOMAIN and EMAIL in production.env or staging.env
Generate the initial certificates by running docker run -it --rm -v {{ project_name }}_https_certs:/etc/letsencrypt -p 80:80 -p 443:443 palobo/certbot:1.0 certonly -t -n --standalone -d  {DOMAIN} -m {EMAIL} --agree-tos
Present instructions for next actions maybe.

I agree that we can remove the .env files. In that case, the startup script will have to populate ${DOMAIN} in ssl_certificate /etc/letsencrypt/live/${DOMAIN}/fullchain.pem; and ssl_certificate_key<EMAIL_ADDRESS>in nginx.conf (production of staging)

@pslobo

The git pull will be of the all project in github replacing --template=/your_path/django-project-template-yadpt/minimal/ with the github url
I dont think we need production.env or staging.env. We are already asking for the external variables we need in the script.

The rest seems fine to me.

Instead of a simple Python script, i think we should write a django management command since this project needs the user to have django installed

We either need some way to specify if we're going to run production or staging, mainly because of the https_certs volume. We either have the option to create both i.e. production_https_certs and staging_https_certs or the script needs to know which environment the user is planing on running and just create the right volume.

@pslobo --[staging|production] will tell the script the right environment and we create {{ project_name }}_https_certs


Can't open swagger.yaml (only in production - after building)

Hello! I'm using Autoswagger in development and everything is just ok.
But when I build my app for production using the node ace build and put it on an EC2 server with a reverse proxy nginx (after using the node bin/server.js command) the following error is thrown when trying to access the /docs
{
  "level": 50,
  "time":<PHONE_NUMBER>271,
  "pid": 30702,
  "hostname": "ip-172-31-38-50",
  "request_id": "u6t68ax6zs9bxm6n4parg7r2",
  "err": {
    "type": "Error",
    "message": "ENOENT: no such file or directory, open '/home/ubuntu/app/build/config/../swagger.yml'",
    "stack": "Error: ENOENT: no such file or directory, open '/home/ubuntu/app/build/config/../swagger.yml'\n    at Object.readFileSync (node:fs:448:20)\n    at AutoSwagger.readFile (/home/ubuntu/app/build/node_modules/adonis-autoswagger/dist/autoswagger.js:170:35)\n    at AutoSwagger.docs (/home/ubuntu/app/build/node_modules/adonis-autoswagger/dist/autoswagger.js:179:25)\n    at Object.handler (file:///home/ubuntu/app/build/start/routes.js:8:32)\n    at Runner.<anonymous> (file:///home/ubuntu/app/build/node_modules/@adonisjs/http-server/build/chunk-UQEGDK7Z.js:29:36)\n    at #invokeWithErrorManagement (file:///home/ubuntu/app/build/node_modules/@poppinss/middleware/build/index.js:63:32)\n    at next (file:///home/ubuntu/app/build/node_modules/@poppinss/middleware/build/index.js:11:12)\n    at InitializeAuthMiddleware.handle (file:///home/ubuntu/app/build/node_modules/@adonisjs/auth/build/src/middleware/initialize_auth_middleware.js:11:12)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)",
    "errno": -2,
    "code": "ENOENT",
    "syscall": "open",
    "path": "/home/ubuntu/app/build/config/../swagger.yml",
    "status": 500
  },
  "x-request-id": "u6t68ax6zs9bxm6n4parg7r2",
  "msg": "ENOENT: no such file or directory, open '/home/ubuntu/app/build/config/../swagger.yml'"
}

This error message is displayed on the screen:

I have no ideia what could it be...
Any help would be greatly appreciated.
Thank you!

Hey there !
Have you read and applied the production-related steps ?

Hey there !
Have you read and applied the production-related steps ?

Oh my gosh! I didn't know about these steps. Thank you, @Alaa-Ben

Following the steps and applying the changes really solved the problems! Thank you.


Improved test setup

Improved CRS_Tests.py
Removed unused fixture parameters
Completely rewrote log checker to use the new marker feature instead of parsing log timestamps
Added a bit of magic to detect the correct log to scan. This should reduce the number of times you run tests with the wrong configuration
This PR relies on two other PR's: https://github.com/coreruleset/modsecurity-crs-docker/pull/58, https://github.com/coreruleset/ftw/pull/66.

I see some util/regexp-assembly/data files changed. Is this part of this PR?

I see some util/regexp-assembly/data files changed. Is this part of this PR?

No, that was an accident (I had been working on something else originally). I've removed those changes.

Note: tests are failing because there is no version 1.3.0 of ftw yet. I need that PR to go through first.

ftw version 1.3.0 is out, this one can be tested now!

Are we ready to merge this one?

@theseion Yes, comparable: 1m 17s vs. 1m 20s.
I would say let's remove the tests matrix:
         tests: [REQUEST-911-METHOD-ENFORCEMENT,
                 REQUEST-913-SCANNER-DETECTION,
                 REQUEST-920-PROTOCOL-ENFORCEMENT,
                 REQUEST-921-PROTOCOL-ATTACK,
                 REQUEST-930-APPLICATION-ATTACK-LFI,
                 REQUEST-931-APPLICATION-ATTACK-RFI,
                 REQUEST-932-APPLICATION-ATTACK-RCE,
                 REQUEST-933-APPLICATION-ATTACK-PHP,
                 REQUEST-934-APPLICATION-ATTACK-GENERIC,
                 REQUEST-941-APPLICATION-ATTACK-XSS,
                 REQUEST-942-APPLICATION-ATTACK-SQLI,
                 REQUEST-943-APPLICATION-ATTACK-SESSION-FIXATION,
                 REQUEST-944-APPLICATION-ATTACK-JAVA,
                 RESPONSE-953-DATA-LEAKAGES-PHP]

And run it with --ruledir=./tests/regression/tests ?

Cool! I didn't have any numbers :) Yes, let's remove the matrix. I've always run all tests.

Thanks for the help!


Allow custom favicons

Added favicon  to [params], so users can specify custom favicons for their sites. Thanks.

Hi @lbv
This already possible by the design in Hugo:
Currently favicon is taken from <root>/themes/docdock/static/images/favicon.png
If you put your custom one in the <root>/static/images/favicon.png it will be used instead.
Clearly no need for such feature, maybe only mention in docs site, though for established Hugo users this should be clear 😉


Angular JS application is slow on IE 11

Note: for support questions, please use one of these channels: https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#question. This repository's issues are reserved for feature requests and bug reports.
Do you want to request a feature or report a bug?
We are not sure about the request category as of now. You can decide the appropriate request category after analyzing the issue details.
What is the current behavior?
We have made AngularJS application on Salesforce platform. AngularJS application is too much clow on IE 11 compare to Google Chrome browser.
We reached out to Microsoft Support Team for this issue and following is the analysis.
• Microsoft Support Team has found that IE 11 is taking a good amount of resources to perform getComputedStyle() and offsetHeight() computations for many nested Divs in the webpages which are expensive resource costs for these particular functions in IE 11.
o   These functions are used to calculate the CSS styles for elements and the height of those objects. The seconds that took this time was about 2.5 seconds, but afterwards the majority of the time spent in 6 seconds was styling calculations.
o   Please see the attached screenshot.
• Microsoft Team examined further to verify these elements that are costing a good amount of resources in IE 11 is ng-scope binding from AngularJS on each Div element. As well, the property of flex are being used on the div elements that will cause recalculations too. All these elements that are trying to load are being executed by the following file “DNBM/js/lib.js”.
o   All these factors together will cost resources to be consumed to load and render all these elements on the pages. AngularJS is optimized with Chrome architecture design and not with IE 11 architecture design. Therefore, there will be a performance difference between the two browsers in rendering AngularJS functionality.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://plnkr.co or similar (template: http://plnkr.co/edit/tpl:yBpEi4).
What is the expected behavior?
AngularJs application should work fine on IE 11 without any performance issues.
What is the motivation / use case for changing the behavior?
Which versions of Angular, and which browser / OS are affected by this issue? Did this work in previous versions of Angular? Please also test with the latest stable and snapshot (https://code.angularjs.org/snapshot/) versions.
Affected Browser: IE 11
Other information (e.g. stacktraces, related issues, suggestions how to fix)
Please do let us know in case if you want to re-produce this issue on your side so we can provide support for the same.

Are you adding many css properties, such as display: flex etc. via ng-style or interpolation in style attributes? I would look into reducing these.
Because angular core does not do any layouting / css setting via interpolated style or ng-style.
I assume the problem lies in your application architecture, and if IE is slow with that then there's nothing we can do.
Maybe you could give an example of a binding that makes the application slow?

I agree with @Narretz: This doesn't sound related to Angular core, but either other libraries or your application configuration code.
Regarding the ng-scope on every div issue, (although we can't be sure without more info), it sounds like you have debugInfo enabled. Debug info aid in...debugging (at the expense of a performance degradation) and it is strongly recommended to disable in production. The developer guide has section dedicated to configuring your app for running in a production environment.
Regarding the style (and especially the flex-related) issues, it sounds like another UI library/framework is the culprit. Are you using ngMaterial be any chance? Earlier versions of ngMaterial have been reported to be quite slow on IE, but I believe they have considerably improved IE performance in their recent versions.

This definitely does not sound like an Angular issue - this sounds like a user app issue with standard best practices for performance when using Angular & writing web frontends. I have not had a problem creating performant complex UIs, including for IE11, for medium to large applications.
Angular itself only calls getComputedStyle once per time when doing animations with ngAnimate I believe. I do know that more recent versions of UI Bootstrap (which I am a maintainer of) do use getComputedStyle and height offset calculations for positioning related logic (tooltips, popovers, datepicker popups, etc.), but its usage is fairly light in performance impact.
I would recommend researching best practices here, including disabling $compilerProvider.debugInfoEnabled, making use of one-way bindings (Angular 1.5), eliminating excessive bindings/watchers, making use of bind once when appropriate to dispose of unnecessary watchers after data is bound, and using constructs such as ng-if and ng-switch if there is no need to render whole swaths of templates to avoid rendering the watchers. There are many articles out there written on all these, and all of this advice is easily searchable.
Otherwise, more advice probably can be given based on the libraries used, although GitHub issues isn't really the right place for this sort of problem generally speaking.

I'm going to close this issue because we haven't got any feedback. Feel free to reopen this issue if you can provide new feedback.

I am facing exactly same problem.

@tarekahf as you can see the OP for this issue has never provided s repro of the problem so there's nothing we can do.

What if I provide you with the IE Dev Tools Performance Profiler details similar to that in the snapshot below, and provide you with the related AngularJS APIs used?
See snapshot below:

Tarek

Yes, I fully understand... this is going to be so challenging.
For now I will provide the following:

I removed this code part from the main root controller, and I saved 2 seconds when executed under IE11:

//List elements with duplicate IDs
$('[id]').each(function(){
	  var ids = $('[id="'+this.id+'"]');
	  if(ids.length>1 && ids[0]==this) {
			console.warn('Multiple IDs #'+this.id);
	  }
})

Using directives with  $compile service to compile relatively large blocks of HTML Input Elements. This is needed to dynamically add validation rules such as ng-required and ng-max which are loaded from DB. Please check this posts here. Search for directive check-if-required to give you an idea about the directive high-level structure. I am nearly certain that this directive is causing IE to freeze momentarily. I can my custome warning messages in the console (generated from the directive link function) while the red progress bar is stuck up. See animated gif below. Also, check this plunker sample which implements the basic idea of check-if-required.

I hope this will allow you to give us some feedback.
Tarek

The first code block has nothing to do with AngularJS, that's pure jquery DOM manipulation. Maybe it's simply because you have too many elements in the DOM? Older browsers have a harder time to cope with many elements at the same time.

If you are sure this directive is giving you the problems, then you should be able to create a MINIMAL plnkr that reproduces the freeze / lag. Minimal means no extra css, html, js - only the bare minimum to reproduce the problem.

Sure I understand. Did you see the plinker sample I provided above? I that OK?

@tarekahf no, the plnkr is not enough since it doesn't reproduce the problem in IE

In order to reproduce the problem, I have to develop a working sample plunker with 500+ fields? Just wondering how?

I am observing $rootScope.$Digest is taking more time when Force Async Events is called in my app. Specifically with ng-focus event. Chrome does this execution within a second but IE would take more than 10 seconds.... Any help is great full....

This is definitively an AngularJS issue. I have the same issue in an enterprise application.
Basically IE hangs while angular compiles the templates, it take up to 10 seconds in my case to compile and render 15 templates, during which the browser freezes out.

I think we need to find a solution for IE. Based on our case, it doesn't seem that we will be able to move away from IE soon.

I have to specify that I am using angularjs 1.5.8. My last effort will be to update to 1.7.2.
Then the strategy will be to leave unhappy that tiny amount if IE users, until I migrate to the new framework.

@tarekahf @albanx Did you guys figure out a solution? Our clients are municipal and forced to use IE and now our app is encountering the same bug.

Just to reiterate, we'd take a look at this if we had a reproduction that showed the difference

@Narretz Try this URLs in IE11
https://car-hire.ryanair.com/en-ie/book?clientId=643826&currency=EUR&age=30&pickupName=Dublin - Airport&returnName=Dublin - Airport&countryID=IE&&pickupDate=13&pickupMonth=01&pickupYear=2019&pickupHour=10&pickupMinute=0&returnDate=16&returnMonth=01&returnYear=2019&returnHour=10&returnMinute=0&pickupID=11&returnID=11#/vehicles
https://www.holidayautos.com/book?pickupDateTime=2018-11-22T10%3A00&returnDateTime=2018-11-25T10%3A00&age=30&clientID=463473&ct=MP&countryID=US&curr=EUR&elID=521534946633556&ln=en-gb&pickupCountryCode=US&residenceID=IE&returnCountryCode=US&pickupID=3716&pickupName=Los Angeles - Airport (California)&returnID=3716&returnName=Los Angeles - Airport (California)#/vehicles
Scroll and you will see that IE freezes.
Actually on the scroll function we compile a list of components manually, and then append them to the dom. Most of browsers is smooth, IE11 totally freezes.
You and your shinny  team can decide to take a look or not, or try to negate the evidence, or find any other justification, but the fact remains, this is a problem and a honest reply from angularjs legacy team would be "we do not care more about this and we won't make any upgrade to fix it."

It's true that we are not actively looking into this problem with IE11 and that the chances of doing something about it are slim. However, we always said that we would take a look if someone could give us a minimal reproduction. (I forgot to write minimal yesterday). We cannot debug it from a complete webpage where we don't see any code. And it also doesn't make sense when the website (like your links) contains jquery, too. Maybe it's jquery? Maybe IE11 is reaching its natural performance limit because the JS is too heavy for it? You are essentially expecting that IE11 runs the same as modern browsers, but this is simply nothing that AngularJS can do. And there are many  AngularJS websites that run well in IE.
If I were you I'd try to remove specific parts of the website one for one, and then see if the problem still exists.

Again please do not make speculation we are not juniors or ignorants
developers. If we have reported this problem is because exists. The above
links are the deploy version of the angularjs app and I can ensure you that
jquery has nothing to do it that indeed jquery performs pretty well even in
older ie. At the top of this report you have a plkr.
In any case it takes 1min to open the ie11 profiler tool and see that the
digest apply cycle hangs the browser
On Thu, 23 Aug 2018, 07:46 Martin Staffa<EMAIL_ADDRESS>wrote:

It's true that we are not actively looking into this problem with IE11 and
that the chances of doing something about it are slim. However, we always
said that we would take a look if someone could give us a minimal
reproduction. (I forgot to write minimal yesterday). We cannot debug it
from a complete webpage where we don't see any code. And it also doesn't
make sense when the website (like your links) contains jquery, too. Maybe
it's jquery? Maybe IE11 is reaching its natural performance limit because
the JS is too heavy for it? You are essentially expecting that IE11 runs
the same as modern browsers, but this is simply nothing that AngularJS can
do. And there are many AngularJS websites that run well in IE.
If I were you I'd try to remove specific parts of the website one for one,
and then see if the problem still exists.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/angular/angular.js/issues/15005#issuecomment-415309158,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABFAqAGhvrFEPArNRR23kDzeFdVCAd8Zks5uTk-6gaJpZM4Je4rW
.

@albanx - I am sorry that your app is experiencing these problems. It must be frustrating for you. We do not doubt that the browser is not performing correctly in your application and we are not suggesting that AngularJS is not at fault.
As a team we really do want to do our best to help you, and we are making no assumptions about your abilities or experience.
The simple fact is that we have limited resources to investigate issues with older browsers, so you can help us to help you by providing the simplest possible reproduction that proves that it is AngularJS that is at fault. This means removing all 3rd party libraries other than AngularJS and also cutting the application code down to an absolute minimum.


Require in AWS Lambda not working

Hi,
When I required("download") in AWS Lambda, my lambda function stop working. I have no error.
Did someone ever test it in AWS Lambda functions.
Thank you.

I've been using download on Lambda without issues. Did you try using other packages? Can you paste the portion of code in which you're using download?


do not set host service topology in test cluster

What type of PR is this?
/kind bug
What this PR does / why we need it:
When we use test cluster with more than 2 nodes, there may be no pods running on the control-plane-node, which will make the e2e tests of yurt-tunnel fail. And I think, there seems no reason to set host service topology in the test environment.
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:

Does this PR introduce a user-facing change?

other Note

/cc @lorrielau
FYI, we can run autonomy test based on this pr.

/lgtm
/approve


Add unique request part names to Content-Disposition header

When you added the batchPartRequestHeader that made it nearly possible to use your library with java/tomcat, but I had to add one more piece.  This will append a unique name for each result to the content disposition header, which is apparently required for a tomcat servlet 3.1 application.
I also updated the processing of the Content-Type header to allow for other pieces of data to be sent after the boundary and still parse out the boundary correctly.

Hi @jeremymefford! Thanks for this.  The PR looks good.  Could you just revert the changes to files in the dist folder, package and bower.json files as the build handles this.  Once that is done I'll accept the PR and do another release.

@jonsamwell I have removed those changes, thanks for your quick response!

I'll do a release of this tomorrow.  Sorry for the delay!

No worries, thanks!

Sorry for the delay this is now in the latest release v1.12.0


Handling whitespace in tag values

InfluxDB version: 1.4.3
Telegraf version: 1.5.2
I have a bash script that produces data in the following format via Telegraf exec:
backends,host=TMPERF1,service=Auth,backend="oraperfdb <IP_ADDRESS>-1521 (Oracle DB)" responsetime=1<PHONE_NUMBER>000000000
backends,host=TMPERF2,service=Auth,backend="oraperfdb <IP_ADDRESS>-1521 (Oracle DB)" responsetime=1<PHONE_NUMBER>000000000

However telegraf reports the following error:
2018-03-29T13:21:24Z E! Error in plugin [inputs.exec]:  metric parsing error, reason: [invalid field format], buffer: [backends,host=TMPERF1,service=Auth,backend="oraperfdb <IP_ADDRESS>-1521 (Oracle DB)" responsetime=1<PHONE_NUMBER>000000000], index: [73] metric parsing error, reason: [invalid field format], buffer: [backends,host=TMPERF2,service=Auth,backend="oraperfdb <IP_ADDRESS>-1521 (Oracle DB)" responsetime=1<PHONE_NUMBER>000000000], index: [73]

Not quite sure where the error could be. I have tried:

Unquoting the "backend" tag value
Escaping the whitespaces for "backend" tag value

I felt InfluxDB issues would be right to post since I suspect it to be a line protocol syntax problem.

Escape the tag value spaces with backslashes, don't quote it.
backends,host=TMPERF1,service=Auth,backend=oraperfdb\ <IP_ADDRESS>-1521\ (Oracle\ DB) responsetime=1<PHONE_NUMBER>000000000

https://docs.influxdata.com/influxdb/v1.5/write_protocols/line_protocol_reference/#special-characters


chore: Removes 84 unused variables

Summary of Changes
Tried to remove the @typescript-eslint/no-unused-vars warning, got it down by 84, still 100 outstanding issues
Tests
Ran tests, updated some
CheckList
Make sure you have checked all steps below to ensure a timely review.

[ ] PR title addresses the issue accurately and concisely. Example: "Updates the version of Flask to v1.0.2"

In case you are adding a dependency, check if the license complies with the ASF 3rd Party License Policy.

[ ] PR includes a summary of changes, including screenshots of any UI changes.
[ ] PR adds unit tests, updates existing unit tests, OR documents why no test additions or modifications are needed.
[ ] In case of new functionality, my PR adds documentation that describes how to use it.

All the public python functions and the classes in the PR contain docstrings that explain what it does

[ ] PR passes all tests documented in the developer guide

Just one small, question, otherwise everything else looks good to me


Fix/battery version

Added notes regarding the 2 fw versions of the BAT available in icub-firmware-build that can be downloaded and installed on the robots.
The 2 versions are distinguished in the generic that can be uploaded in iCub and ergoCub and the other that works with R1 only.

cc: @valegagge


Docs: Only enable coverage plugin in test env.

I updated the docs, so that it prevents the __coverage__ plugin from kicking in in development/production mode.

@dtinth awesome can't wait to write a blog post on this!

@dtinth might it be worth drawing attention to cross-env -- good way to set the test environment in npm scripts.

I like using development instead of test. Babel assumes development if not set explicitly.
Then set it to production for deploys:
{
  "scripts": {
    "build": "babel --out-dir lib src",
    "prepublish": "NODE_ENV=production npm run build"
  }
}

That seems to be what babel suggests.

@jamestalmage, if @dtinth is comfortable with this, I think this might be a good modification to the configuration, folks can avoid setting the environment variable.

I like using development instead of test. Babel assumes development if not set explicitly.

I'd recommend against this. Here's how I see it used (and do myself):

development is for running the app locally (no minification etc.)
test is for running the tests
production is for building/deploying

If you mix development and/or test, then you could wind up in a situation where you're running the app locally with coverage instrumentation. Probably not a good idea :-)

@kentcdodds @jamestalmage @dtinth perhaps compromise, and add a note about cross-env like I originally proposed?

Yes, that's great

What @kentcdodds says makes sense to me. I say we just stick with test, then.
And, yes of course - mention cross-env

PR created: #281


Simplify usage instructions to use bazel run on a top level alias

Instead of running gen_maven_deps.sh, bazel run will build the necessary deps and run parseproject as though it was a deploy jar (but not really, it's a stub script that knows where the runfiles are). This removes the need for a separate build step and a shell script runner.
I've also created a top level alias for parseproject to not have to refer a deeply nested target. I think this makes the final command simpler: bazel run //:parse -- ...args

This is really nice! Thanks!


update version

Codecov Report

Merging #12 into dev will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##               dev     #12   +/-   ##
=======================================
  Coverage     7.37%   7.37%
  Complexity      30      30
=======================================
  Files           15      15
  Lines         1315    1315
  Branches       189     189
=======================================
  Hits            97      97
  Misses        1198    1198
  Partials        20      20

Impacted Files
Coverage Δ
Complexity Δ

.../webank/wecross/console/common/ConsoleVersion.java
0% <ø> (ø)
0 <0> (ø)
:arrow_down:

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 e685f75...c8b9814. Read the comment docs.


Strange "... condition not met" lines in log

There are some mysterious "... condition not met" lines in the AGHAST log.
Often they precede a correctly forwarded Action, but they do not precede every Action.
Sometimes they seem just to be random.
About a dozen per day.

Fixed in v0.5.2


Add standalone documentation module with Antora

Summary

Adds Antora documentation module (opt-out)
Adds Make targets for local preview
Adds Make target also for easy deployment to GitHub Pages (opt-out file-wise, opt-in because first the gh-pages branch has to be created before GH Pages is active)

Note: The included playbook is for GH pages. The Antora module can also be built externally with existing VSHN's Antora playbooks.
Checklist

[x] Categorize the PR by setting a good title and adding one of the labels:
bug, enhancement, documentation, change, breaking, dependency
as they show up in the changelog
[x] Update tests.

So far K8up is the only Go-based software repo where we included Antora documentation module AFAIK.
I added this Antora scaffold to this template to help prepare specific documentation for a software component.
For example, to document upcoming Odoo-specific adapter for APPUiO Cloud


Pandas Import csv fail in within a Jupyter notebook when file does not contain a full relative path

Bug: Notebook Editor
Steps to cause the bug to occur

import the Pandas
Create a dummy csv file in the same folder where the project is
Use the read_csv fuction to import the file as pd.read_csv('./file.csv')

Actual behavior
An error is thrown saying the number of cells in the header is not correct, but further down it appears clear that this is due to the file not found.
Expected behavior
When a ./ is used the path should be automatically fully resolved.
Your Jupyter and/or Python environment
Please provide as much info as you readily know

Jupyter server running:                       Local
VS Code version:                              1.40.2
Python and/or Anaconda version:    3.7.4
OS:                                                     | Mac 10.14.6 (18G1012
Virtual environment:                         No

Hey @andreamoro . Thanks for reporting this to us. By default VS Code uses the root of the currently open workspace as the current working directory. This is different from jupyter which uses the path of the file that was open. Which is why I think that you are not seeing the file location picked up. To get around this you could either

Make your paths for loading relative to the workspace that you have open (if you have one open). OR
Change the python.dataScience.notebookFileRoot setting in VS Code to ${fileDirname}. This setting should then make notebooks use the path to the notebook file as the CWD.

Do either of those work for you?

@IanMatthewHuff how do I make changes for the second case?
I will be looking at opening the project from the same folder to see whether the file open without a fully qualified path, though I am almost sure that was the case.

@IanMatthewHuff @rchiodo Weren't we planning on making this the default behaviour? (i.e. using notebook dir as the root)

Yes it's this bug here:
https://github.com/microsoft/vscode-python/issues/7780

@andreamoro to make the changes for the second case, you can either use the Open Settings UI command (hit CTRL+SHIFT+P to bring up the command paletted) or the Open Settings JSON command.
The UI command is basically a wrapper around the settings.json. If you search for notebookFileRoot, it should leave you with something like so:

@andreamoro, we think this is fixed by #7780. Please reopen this bug if the next release doesn't address the problem.


CLI Directory Lift

"Lift" the current root directory, and have a ./cli folder which contains the monowrap CLI source code. This allows us to create new folders like:

./graph - graph generation & solving crate (as a wrapper)
./run - logic for running commands (CLI, etc)
./wrappers - helpful wrappers (ex: cli-command, yarn, docker, etc)

I agree we need refactor but honestly I am not sure how I will structure it because I want to generalize the graph solving part into its own wrapper and I know it can be useful not only here but also in other polywrap manifests like deploy, test, etc. I need to spec out more before I feel comfortable in refactoring this.


Unable to deploy prisma for existing psql database with foreign key relations

Describe the bug
I am unable to deploy prisma for an existing psql database with foreign key relations.
To Reproduce

Create a database with the following schema:

CREATE TABLE admin_users (
  id SERIAL PRIMARY KEY
);

CREATE TABLE customers (
  admin_user_id INTEGER NOT NULL REFERENCES admin_users(id),
  id SERIAL PRIMARY KEY
);

Running prisma init generates the following schema:

type AdminUser @pgTable(name: "admin_users") {
  id: Int! @unique
  customers: [Customer]
}

type Customer @pgTable(name: "customers") {
  id: Int! @unique
  admin_user_id: AdminUser!
}

Change id: Int to id: ID for both types.

Create docker container with docker-compose up -d

Running prisma deploy generates the following error:

Errors:

  Global
    ✖ Could not find the relation table _AdminUserToCustomer

This made sense to me, since that table doesn't exist in my existing database, so I instead tried using the pgRelation directive as detailed here:

type Customer @pgTable(name: "customers") {
  id: ID! @unique
  adminUser: AdminUser! @pgRelation(column: "admin_user_id")
}

However I then see the following error:
Errors:

  Global
    ✖ Could not find the model table customers in the database

Expected behavior
I'm expecting 2 things here really:

For prisma init to automatically detect that I'm using foreign keys rather than relation tables and to set up the @pgRelation directive in the generated datamodel.
For the @pgRelation directive to work and not throw the above error.

Versions (please complete the following information):

Connector: Postgres (10.5)
prisma CLI: prisma/1.30.0-alpha.1
OS: macOS Mojave 10.14.2

Additional context
Not sure it's relevant, but this is what the docker-compose.yml looks like:
version: '3'
services:
  prisma:
    image: prismagraphql/prisma:1.30-alpha
    restart: always
    ports:
    - "4469:4469"
    environment:
      PRISMA_CONFIG: |
        port: 4469
        # uncomment the next line and provide the env var PRISMA_MANAGEMENT_API_SECRET=my-secret to activate cluster security
        # managementApiSecret: my-secret
        databases:
          default:
            connector: postgres
            host: host.docker.internal
            database: ---
            user: ---
            password: ---
            rawAccess: true
            port: '5432'
            migrations: false

Hi @jwld
You are using the introspection work wrong. In this workflow every time you make a change you need to re-introspect the database using prisma introspect. The datamodel will not migrate the underlying database.
So your database structure is the source of truth here rather than the datamodel.

Not sure I follow @pantharshit00 - I thought prisma introspect was just for generating the datamodel based on an existing structure? I don't want to migrate the database at all really, since I'm trying to introduce graphql and prisma to an existing codebase, that relies on the database structure as it is.
Is this not possible? This page talks about ensuring migrations is set to false in the docker compose file, I assumed for this very reason. It also says:

The generated SDL serves as a foundation for your Prisma API, but you can easily make modifications afterwards as you see fit.

which is what I'm trying to do with @pgRelation, since I don't have the join table that the generated datamodel relies on. It doesn't mention anything about having to run prisma introspect after making those modifications.
Also running prisma introspect in this instance is giving me the following error:
 ▸    Cannot read property 'request' of undefined

Ahh I've solved it 🎉
Just had to add schema: public to my docker-compose.yml. I then also had to change my id fields back to Int (as was originally generated) before it actually worked.
Would be nice if prisma init asked for the schema to save this confusion.

I had to enter psql and delete the sequences created


Allow for overriding modules.

For some tests (eg integration), it would be useful to be able to override specific modules so that fakes or other doubles may be bound (as described in https://stackoverflow.com/questions/483087/overriding-binding-in-guice).

Is this in the context of the GovernatorJunit4ClassRunner or using InjectorBuilder directly?  Are you recommending @ModulesForTesting have an overrideModules property.  Alternatively you could have a single module passed to @ModulesForTesting and using Modules.override in that module.

+1 for single module which uses Modules.override. I consciously did not make a second attribute for @ModulesForTesting because I did not want to unnecessarily complicate that testing pattern.

For future reference, the above would look something like:
public class UnitTestingModule extends AbstractModule {
    @Override
    protected void configure() {
        install(Modules.override(new ProdModule()).with(new FakeModule()));
    }
}


Is there anyway to consume the last x messages for kafka topic?

I would like to consume the last x msgs in kafka using pykafka. can someone help me?

Hi @hamedhsn - here's some example code to get you started
client = KafkaClient(hosts="xxxxxxx")
topic = client.topics['mytopic']
consumer = topic.get_simple_consumer(
    auto_offset_reset=OffsetType.LATEST,
    reset_offset_on_start=True)
LAST_N_MESSAGES = 50
offsets = [(p, op.next_offset - LAST_N_MESSAGES) for p, op in consumer._partitions.iteritems()]
consumer.reset_offsets(offsets)
consumer.consume()

This code sets the consumer's offset to LATEST, then subtracts some arbitrary amount from each partition's offset and gives those values to the consumer. It's untested, but it gets the point across. Check out the reset_offsets and OffsetType.LATEST attributes on SimpleConsumer.

Hi @emmett9001 , as far as SimpleConsumer is now deprecated do you have any clue on how I could accomplish the same thing with the KafkaConsumer ?
I managed to use the seek method to consume from a custom offset but I cannot find a way to get the latest offset of the partition assigned to my consumer.

@alafanechere Where do you see that SimpleConsumer is deprecated? The method given above should still work fine, and pykafka has never had a KafkaConsumer class.


responsive with "percentPosition: true"

I want to have responsive layout but I tried "percentPosition: true" option without luck.
could you please provide some working sample code?

Hi @limulidae, here you have the line where the options are added https://github.com/passy/angular-masonry/blob/master/src/angular-masonry.js#L131
I've added: "percentPosition: true," and changed columnWidth line for: " columnWidth: ".grid-sizer" "
And it's working beautifully for me.
Cheers


TCP Timeout Error - node-red-contrib-tplink

Current Behavior
I am using the "node-red-contrib-tplink" node to control some kasa smart devices.  The node stops responding regularly and the following error is reported.  I am raising the issue as requested in the error report.

Unexpected Node Error

Info:
Node object is not a node-red Node
Stack:
Error: TCP Timeout after 1000ms
<IP_ADDRESS>:9999 {"smartlife.iot.common.emeter":{"get_realtime":{}}}
at Timeout._onTimeout (/home/pi/.node-red/node_modules/tplink-smarthome-api/lib/network/tcp-socket.js:59:36)
at listOnTimeout (node:internal/timers:564:17)
at process.processTimers (node:internal/timers:507:7)
Please report this issue, including the information logged above:
https://github.com/node-red/node-red/issues/

Expected Behavior
Continuous response from the kasa devices.
Steps To Reproduce
Within my flows, this error happens daily.
Example flow
[
    {
        "id": "f79ddbd6.adfea8",
        "type": "kasa",
        "z": "f3e3af2d.25add",
        "name": "Power Indicating Lamp - KL130B",
        "device": "<IP_ADDRESS>",
        "interval": "10000",
        "eventInterval": "5000",
        "payload": "getInfo",
        "payloadType": "info",
        "debug": false,
        "x": 540,
        "y": 180,
        "wires": [
            [
                "cd97f7a5.3e2078",
                "67366ad7ce20302e"
            ]
        ]
    },
    {
        "id": "cd97f7a5.3e2078",
        "type": "debug",
        "z": "f3e3af2d.25add",
        "name": "KL130 Return Message",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 870,
        "y": 180,
        "wires": []
    },
    {
        "id": "ef38489e.e4e6f8",
        "type": "inject",
        "z": "f3e3af2d.25add",
        "name": "",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "getInfo",
        "payloadType": "str",
        "x": 490,
        "y": 60,
        "wires": [
            [
                "f79ddbd6.adfea8"
            ]
        ]
    }
]

Environment

Node-RED version: 3.0.0
Node.js version: 18.6.0
npm version: 8.13.2
Platform/OS: raspberry pi / debian
Browser: chrome

Hi @Jaddache this is a problem you should report on the node-red-contrib-tplink repo.
As you can see, it has been raised several times: https://github.com/caseyjhol/node-red-contrib-tplink/issues?q=TCP+Timeout
The developer needs to catch the tcp error in its own code and if necessary, pass it on to node red via a call to node.error(...).