expect: Display expectedDiff more carefully in toBeCloseTo

Summary
Because Node 12.0.0 can display distracting precision for expectedDiff

if the default stringify value of receivedDiff is exponential notation, call toExponential
otherwise if precision is non-negative and within ECMA-262 range, call toFixed
otherwise call stringify (baseline)

Test plan
Added 3 snapshot tests
Tested locally in Node 8.12.0, 10.15.3, and 12.0.0
See also pictures for 12.0.0 in following comment

Example pictures baseline at left and improved at right
Prevent regression with toFixed:

Prevent regression with toExponential:

Same as current baseline with toExponential which is same as stringify:

Same as current baseline with stringify and illustrate negative precision:

Codecov Report

Merging #8389 into master will increase coverage by 0.03%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #8389      +/-   ##
==========================================
+ Coverage   62.34%   62.38%   +0.03%
==========================================
  Files         266      266
  Lines       10738    10747       +9
  Branches     2611     2617       +6
==========================================
+ Hits         6695     6704       +9
  Misses       3460     3460
  Partials      583      583

Impacted Files
Coverage Δ

packages/expect/src/matchers.ts
96.8% <100%> (+0.01%)
:arrow_up:

packages/expect/src/print.ts
96.29% <100%> (+0.64%)
:arrow_up:

Continue to review full report at Codecov.

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

@jeysal What do you think about follow up PR during breaking change phase before Jest 25:
Matcher error: expected precision must be an integer

The new formatting is incorrect if precision is decimal, but I cannot think of a use case for that

Let’s wait for #8382 and then I will either resolve conflicts or open a new PR

@pedrottimark could you rebase this and land it? 🙏

diff --git c/CHANGELOG.md w/CHANGELOG.md
index 51ca552dc..accab0fc7 100644
--- c/CHANGELOG.md
+++ w/CHANGELOG.md
@@ -4,6 +4,7 @@

 ### Fixes

+- `[expect]` Display expectedDiff more carefully in toBeCloseTo ([#8389](https://github.com/facebook/jest/pull/8389))
 - `[jest-fake-timers]` `getTimerCount` will not include cancelled immediates ([#8764](https://github.com/facebook/jest/pull/8764))

 ### Chore & Maintenance
diff --git c/packages/expect/src/__tests__/__snapshots__/matchers.test.js.snap w/packages/expect/src/__tests__/__snapshots__/matchers.test.js.snap
index 45aa73441..2153e90ee 100644
--- c/packages/expect/src/__tests__/__snapshots__/matchers.test.js.snap
+++ w/packages/expect/src/__tests__/__snapshots__/matchers.test.js.snap
@@ -469,233 +469,6 @@ Expected: <green>false</>
 Received: <red>true</>"
 `;

-exports[`.toBeCloseTo() {pass: false} expect(-Infinity)toBeCloseTo( -1.23) 1`] = `
-"<dim>expect(</><red>received</><dim>).</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
-
-Expected: <green>-1.23</>
-Received: <red>-Infinity</>
-
-Expected precision:    2
-Expected difference: < <green>0.005</>
-Received difference:   <red>Infinity</>"
-`;
-
-exports[`.toBeCloseTo() {pass: false} expect(Infinity)toBeCloseTo( -Infinity) 1`] = `
-"<dim>expect(</><red>received</><dim>).</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
-
-Expected: <green>-Infinity</>
-Received: <red>Infinity</>
-
-Expected precision:    2
-Expected difference: < <green>0.005</>
-Received difference:   <red>Infinity</>"
-`;
-
-exports[`.toBeCloseTo() {pass: false} expect(Infinity)toBeCloseTo( 1.23) 1`] = `
-"<dim>expect(</><red>received</><dim>).</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
-
-Expected: <green>1.23</>
-Received: <red>Infinity</>
-
-Expected precision:    2
-Expected difference: < <green>0.005</>
-Received difference:   <red>Infinity</>"
-`;
-
-exports[`.toBeCloseTo() {pass: true} expect(-Infinity)toBeCloseTo( -Infinity) 1`] = `
-"<dim>expect(</><red>received</><dim>).</>not<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
-
-Expected: not <green>-Infinity</>
-"
-`;
-
-exports[`.toBeCloseTo() {pass: true} expect(0)toBeCloseTo( 0) 1`] = `
-"<dim>expect(</><red>received</><dim>).</>not<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
-
-Expected: not <green>0</>
-"
-`;
-
-exports[`.toBeCloseTo() {pass: true} expect(0)toBeCloseTo( 0.001) 1`] = `
-"<dim>expect(</><red>received</><dim>).</>not<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
-
-Expected: not <green>0.001</>
-Received:     <red>0</>
-
-Expected precision:        2
-Expected difference: not < <green>0.005</>
-Received difference:       <red>0.001</>"
-`;
-
-exports[`.toBeCloseTo() {pass: true} expect(1.23)toBeCloseTo( 1.225) 1`] = `
-"<dim>expect(</><red>received</><dim>).</>not<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
-
-Expected: not <green>1.225</>
-Received:     <red>1.23</>
-
-Expected precision:        2
-Expected difference: not < <green>0.005</>
-Received difference:       <red>0.004999999999999893</>"
-`;
-
-exports[`.toBeCloseTo() {pass: true} expect(1.23)toBeCloseTo( 1.226) 1`] = `
-"<dim>expect(</><red>received</><dim>).</>not<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
-
-Expected: not <green>1.226</>
-Received:     <red>1.23</>
-
-Expected precision:        2
-Expected difference: not < <green>0.005</>
-Received difference:       <red>0.0040000000000000036</>"
-`;
-
-exports[`.toBeCloseTo() {pass: true} expect(1.23)toBeCloseTo( 1.229) 1`] = `
-"<dim>expect(</><red>received</><dim>).</>not<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
-
-Expected: not <green>1.229</>
-Received:     <red>1.23</>
-
-Expected precision:        2
-Expected difference: not < <green>0.005</>
-Received difference:       <red>0.0009999999999998899</>"
-`;
-
-exports[`.toBeCloseTo() {pass: true} expect(1.23)toBeCloseTo( 1.234) 1`] = `
-"<dim>expect(</><red>received</><dim>).</>not<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
-
-Expected: not <green>1.234</>
-Received:     <red>1.23</>
-
-Expected precision:        2
-Expected difference: not < <green>0.005</>
-Received difference:       <red>0.0040000000000000036</>"
-`;
-
-exports[`.toBeCloseTo() {pass: true} expect(Infinity)toBeCloseTo( Infinity) 1`] = `
-"<dim>expect(</><red>received</><dim>).</>not<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
-
-Expected: not <green>Infinity</>
-"
-`;
-
-exports[`.toBeCloseTo() accepts an optional precision argument: [0, 0.000004, 5] 1`] = `
-"<dim>expect(</><red>received</><dim>).</>not<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>, </>precision<dim>)</>
-
-Expected: not <green>0.000004</>
-Received:     <red>0</>
-
-Expected precision:        5
-Expected difference: not < <green>0.000005</>
-Received difference:       <red>0.000004</>"
-`;
-
-exports[`.toBeCloseTo() accepts an optional precision argument: [0, 0.0001, 3] 1`] = `
-"<dim>expect(</><red>received</><dim>).</>not<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>, </>precision<dim>)</>
-
-Expected: not <green>0.0001</>
-Received:     <red>0</>
-
-Expected precision:        3
-Expected difference: not < <green>0.0005</>
-Received difference:       <red>0.0001</>"
-`;
-
-exports[`.toBeCloseTo() accepts an optional precision argument: [0, 0.1, 0] 1`] = `
-"<dim>expect(</><red>received</><dim>).</>not<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>, </>precision<dim>)</>
-
-Expected: not <green>0.1</>
-Received:     <red>0</>
-
-Expected precision:        0
-Expected difference: not < <green>0.5</>
-Received difference:       <red>0.1</>"
-`;
-
-exports[`.toBeCloseTo() throws: [0, 0.01] 1`] = `
-"<dim>expect(</><red>received</><dim>).</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
-
-Expected: <green>0.01</>
-Received: <red>0</>
-
-Expected precision:    2
-Expected difference: < <green>0.005</>
-Received difference:   <red>0.01</>"
-`;
-
-exports[`.toBeCloseTo() throws: [1, 1.23] 1`] = `
-"<dim>expect(</><red>received</><dim>).</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
-
-Expected: <green>1.23</>
-Received: <red>1</>
-
-Expected precision:    2
-Expected difference: < <green>0.005</>
-Received difference:   <red>0.22999999999999998</>"
-`;
-
-exports[`.toBeCloseTo() throws: [1.23, 1.2249999] 1`] = `
-"<dim>expect(</><red>received</><dim>).</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
-
-Expected: <green>1.2249999</>
-Received: <red>1.23</>
-
-Expected precision:    2
-Expected difference: < <green>0.005</>
-Received difference:   <red>0.005000099999999952</>"
-`;
-
-exports[`.toBeCloseTo() throws: Matcher error promise empty isNot false received 1`] = `
-"<dim>expect(</><red>received</><dim>).</>toBeCloseTo<dim>(</><green>expected</><dim>, </>precision<dim>)</>
-
-<bold>Matcher error</>: <red>received</> value must be a number
-
-Received has type:  string
-Received has value: <red>\\"\\"</>"
-`;
-
-exports[`.toBeCloseTo() throws: Matcher error promise empty isNot true expected 1`] = `
-"<dim>expect(</><red>received</><dim>).</>not<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
-
-<bold>Matcher error</>: <green>expected</> value must be a number
-
-Expected has value: <green>undefined</>"
-`;
-
-exports[`.toBeCloseTo() throws: Matcher error promise rejects isNot false expected 1`] = `
-"<dim>expect(</><red>received</><dim>).</>rejects<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
-
-<bold>Matcher error</>: <green>expected</> value must be a number
-
-Expected has type:  string
-Expected has value: <green>\\"0\\"</>"
-`;
-
-exports[`.toBeCloseTo() throws: Matcher error promise rejects isNot true received 1`] = `
-"<dim>expect(</><red>received</><dim>).</>rejects<dim>.</>not<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
-
-<bold>Matcher error</>: <red>received</> value must be a number
-
-Received has type:  symbol
-Received has value: <red>Symbol(0.1)</>"
-`;
-
-exports[`.toBeCloseTo() throws: Matcher error promise resolves isNot false received 1`] = `
-"<dim>expect(</><red>received</><dim>).</>resolves<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>, </>precision<dim>)</>
-
-<bold>Matcher error</>: <red>received</> value must be a number
-
-Received has type:  boolean
-Received has value: <red>false</>"
-`;
-
-exports[`.toBeCloseTo() throws: Matcher error promise resolves isNot true expected 1`] = `
-"<dim>expect(</><red>received</><dim>).</>resolves<dim>.</>not<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>, </>precision<dim>)</>
-
-<bold>Matcher error</>: <green>expected</> value must be a number
-
-Expected has value: <green>null</>"
-`;
-
 exports[`.toBeDefined(), .toBeUndefined() '"a"' is defined 1`] = `
 "<dim>expect(</><red>received</><dim>).</>not<dim>.</>toBeDefined<dim>()</>

@@ -3609,6 +3382,266 @@ Expected: not <green>{\\"test\\": {\\"a\\": 1, \\"b\\": 2}}</>
 "
 `;

+exports[`toBeCloseTo {pass: false} expect(-Infinity).toBeCloseTo(-1.23) 1`] = `
+"<dim>expect(</><red>received</><dim>).</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
+
+Expected: <green>-1.23</>
+Received: <red>-Infinity</>
+
+Expected precision:    2
+Expected difference: < <green>0.005</>
+Received difference:   <red>Infinity</>"
+`;
+
+exports[`toBeCloseTo {pass: false} expect(0).toBeCloseTo(0.01) 1`] = `
+"<dim>expect(</><red>received</><dim>).</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
+
+Expected: <green>0.01</>
+Received: <red>0</>
+
+Expected precision:    2
+Expected difference: < <green>0.005</>
+Received difference:   <red>0.01</>"
+`;
+
+exports[`toBeCloseTo {pass: false} expect(1).toBeCloseTo(1.23) 1`] = `
+"<dim>expect(</><red>received</><dim>).</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
+
+Expected: <green>1.23</>
+Received: <red>1</>
+
+Expected precision:    2
+Expected difference: < <green>0.005</>
+Received difference:   <red>0.22999999999999998</>"
+`;
+
+exports[`toBeCloseTo {pass: false} expect(1.23).toBeCloseTo(1.2249999) 1`] = `
+"<dim>expect(</><red>received</><dim>).</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
+
+Expected: <green>1.2249999</>
+Received: <red>1.23</>
+
+Expected precision:    2
+Expected difference: < <green>0.005</>
+Received difference:   <red>0.005000099999999952</>"
+`;
+
+exports[`toBeCloseTo {pass: false} expect(3.141592e-7).toBeCloseTo(3e-7, 8) 1`] = `
+"<dim>expect(</><red>received</><dim>).</>toBeCloseTo<dim>(</><green>expected</><dim>, </>precision<dim>)</>
+
+Expected: <green>3e-7</>
+Received: <red>3.141592e-7</>
+
+Expected precision:    8
+Expected difference: < <green>5e-9</>
+Received difference:   <red>1.4159200000000025e-8</>"
+`;
+
+exports[`toBeCloseTo {pass: false} expect(56789).toBeCloseTo(51234, -4) 1`] = `
+"<dim>expect(</><red>received</><dim>).</>toBeCloseTo<dim>(</><green>expected</><dim>, </>precision<dim>)</>
+
+Expected: <green>51234</>
+Received: <red>56789</>
+
+Expected precision:    -4
+Expected difference: < <green>5000</>
+Received difference:   <red>5555</>"
+`;
+
+exports[`toBeCloseTo {pass: false} expect(Infinity).toBeCloseTo(-Infinity) 1`] = `
+"<dim>expect(</><red>received</><dim>).</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
+
+Expected: <green>-Infinity</>
+Received: <red>Infinity</>
+
+Expected precision:    2
+Expected difference: < <green>0.005</>
+Received difference:   <red>Infinity</>"
+`;
+
+exports[`toBeCloseTo {pass: false} expect(Infinity).toBeCloseTo(1.23) 1`] = `
+"<dim>expect(</><red>received</><dim>).</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
+
+Expected: <green>1.23</>
+Received: <red>Infinity</>
+
+Expected precision:    2
+Expected difference: < <green>0.005</>
+Received difference:   <red>Infinity</>"
+`;
+
+exports[`toBeCloseTo {pass: true} expect(-Infinity).toBeCloseTo(-Infinity) 1`] = `
+"<dim>expect(</><red>received</><dim>).</>not<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
+
+Expected: not <green>-Infinity</>
+"
+`;
+
+exports[`toBeCloseTo {pass: true} expect(0).toBeCloseTo(0) 1`] = `
+"<dim>expect(</><red>received</><dim>).</>not<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
+
+Expected: not <green>0</>
+"
+`;
+
+exports[`toBeCloseTo {pass: true} expect(0).toBeCloseTo(0.000004, 5) 1`] = `
+"<dim>expect(</><red>received</><dim>).</>not<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>, </>precision<dim>)</>
+
+Expected: not <green>0.000004</>
+Received:     <red>0</>
+
+Expected precision:        5
+Expected difference: not < <green>0.000005</>
+Received difference:       <red>0.000004</>"
+`;
+
+exports[`toBeCloseTo {pass: true} expect(0).toBeCloseTo(0.0001, 3) 1`] = `
+"<dim>expect(</><red>received</><dim>).</>not<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>, </>precision<dim>)</>
+
+Expected: not <green>0.0001</>
+Received:     <red>0</>
+
+Expected precision:        3
+Expected difference: not < <green>0.0005</>
+Received difference:       <red>0.0001</>"
+`;
+
+exports[`toBeCloseTo {pass: true} expect(0).toBeCloseTo(0.001) 1`] = `
+"<dim>expect(</><red>received</><dim>).</>not<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
+
+Expected: not <green>0.001</>
+Received:     <red>0</>
+
+Expected precision:        2
+Expected difference: not < <green>0.005</>
+Received difference:       <red>0.001</>"
+`;
+
+exports[`toBeCloseTo {pass: true} expect(0).toBeCloseTo(0.1, 0) 1`] = `
+"<dim>expect(</><red>received</><dim>).</>not<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>, </>precision<dim>)</>
+
+Expected: not <green>0.1</>
+Received:     <red>0</>
+
+Expected precision:        0
+Expected difference: not < <green>0.5</>
+Received difference:       <red>0.1</>"
+`;
+
+exports[`toBeCloseTo {pass: true} expect(1.23).toBeCloseTo(1.225) 1`] = `
+"<dim>expect(</><red>received</><dim>).</>not<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
+
+Expected: not <green>1.225</>
+Received:     <red>1.23</>
+
+Expected precision:        2
+Expected difference: not < <green>0.005</>
+Received difference:       <red>0.004999999999999893</>"
+`;
+
+exports[`toBeCloseTo {pass: true} expect(1.23).toBeCloseTo(1.226) 1`] = `
+"<dim>expect(</><red>received</><dim>).</>not<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
+
+Expected: not <green>1.226</>
+Received:     <red>1.23</>
+
+Expected precision:        2
+Expected difference: not < <green>0.005</>
+Received difference:       <red>0.0040000000000000036</>"
+`;
+
+exports[`toBeCloseTo {pass: true} expect(1.23).toBeCloseTo(1.229) 1`] = `
+"<dim>expect(</><red>received</><dim>).</>not<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
+
+Expected: not <green>1.229</>
+Received:     <red>1.23</>
+
+Expected precision:        2
+Expected difference: not < <green>0.005</>
+Received difference:       <red>0.0009999999999998899</>"
+`;
+
+exports[`toBeCloseTo {pass: true} expect(1.23).toBeCloseTo(1.234) 1`] = `
+"<dim>expect(</><red>received</><dim>).</>not<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
+
+Expected: not <green>1.234</>
+Received:     <red>1.23</>
+
+Expected precision:        2
+Expected difference: not < <green>0.005</>
+Received difference:       <red>0.0040000000000000036</>"
+`;
+
+exports[`toBeCloseTo {pass: true} expect(2.0000002).toBeCloseTo(2, 5) 1`] = `
+"<dim>expect(</><red>received</><dim>).</>not<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>, </>precision<dim>)</>
+
+Expected: not <green>2</>
+Received:     <red>2.0000002</>
+
+Expected precision:        5
+Expected difference: not < <green>5e-6</>
+Received difference:       <red>2.0000000011677344e-7</>"
+`;
+
+exports[`toBeCloseTo {pass: true} expect(Infinity).toBeCloseTo(Infinity) 1`] = `
+"<dim>expect(</><red>received</><dim>).</>not<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
+
+Expected: not <green>Infinity</>
+"
+`;
+
+exports[`toBeCloseTo throws: Matcher error promise empty isNot false received 1`] = `
+"<dim>expect(</><red>received</><dim>).</>toBeCloseTo<dim>(</><green>expected</><dim>, </>precision<dim>)</>
+
+<bold>Matcher error</>: <red>received</> value must be a number
+
+Received has type:  string
+Received has value: <red>\\"\\"</>"
+`;
+
+exports[`toBeCloseTo throws: Matcher error promise empty isNot true expected 1`] = `
+"<dim>expect(</><red>received</><dim>).</>not<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
+
+<bold>Matcher error</>: <green>expected</> value must be a number
+
+Expected has value: <green>undefined</>"
+`;
+
+exports[`toBeCloseTo throws: Matcher error promise rejects isNot false expected 1`] = `
+"<dim>expect(</><red>received</><dim>).</>rejects<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
+
+<bold>Matcher error</>: <green>expected</> value must be a number
+
+Expected has type:  string
+Expected has value: <green>\\"0\\"</>"
+`;
+
+exports[`toBeCloseTo throws: Matcher error promise rejects isNot true received 1`] = `
+"<dim>expect(</><red>received</><dim>).</>rejects<dim>.</>not<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>)</>
+
+<bold>Matcher error</>: <red>received</> value must be a number
+
+Received has type:  symbol
+Received has value: <red>Symbol(0.1)</>"
+`;
+
+exports[`toBeCloseTo throws: Matcher error promise resolves isNot false received 1`] = `
+"<dim>expect(</><red>received</><dim>).</>resolves<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>, </>precision<dim>)</>
+
+<bold>Matcher error</>: <red>received</> value must be a number
+
+Received has type:  boolean
+Received has value: <red>false</>"
+`;
+
+exports[`toBeCloseTo throws: Matcher error promise resolves isNot true expected 1`] = `
+"<dim>expect(</><red>received</><dim>).</>resolves<dim>.</>not<dim>.</>toBeCloseTo<dim>(</><green>expected</><dim>, </>precision<dim>)</>
+
+<bold>Matcher error</>: <green>expected</> value must be a number
+
+Expected has value: <green>null</>"
+`;
+
 exports[`toMatchObject() {pass: false} expect([0]).toMatchObject([-0]) 1`] = `
 "<dim>expect(</><red>received</><dim>).</>toMatchObject<dim>(</><green>expected</><dim>)</>

diff --git c/packages/expect/src/__tests__/matchers.test.js w/packages/expect/src/__tests__/matchers.test.js
index e7b683898..a61bdd28a 100644
--- c/packages/expect/src/__tests__/matchers.test.js
+++ w/packages/expect/src/__tests__/matchers.test.js
@@ -1110,7 +1110,7 @@ describe('.toContain(), .toContainEqual()', () => {
   });
 });

-describe('.toBeCloseTo()', () => {
+describe('toBeCloseTo', () => {
   [
     [0, 0],
     [0, 0.001],
@@ -1118,8 +1118,10 @@ describe('.toBeCloseTo()', () => {
     [1.23, 1.226],
     [1.23, 1.225],
     [1.23, 1.234],
+    [Infinity, Infinity],
+    [-Infinity, -Infinity],
   ].forEach(([n1, n2]) => {
-    it(`{pass: true} expect(${n1})toBeCloseTo( ${n2})`, () => {
+    it(`{pass: true} expect(${n1}).toBeCloseTo(${n2})`, () => {
       jestExpect(n1).toBeCloseTo(n2);

       expect(() =>
@@ -1128,48 +1130,45 @@ describe('.toBeCloseTo()', () => {
     });
   });

-  [[0, 0.01], [1, 1.23], [1.23, 1.2249999]].forEach(([n1, n2]) => {
-    it(`throws: [${n1}, ${n2}]`, () => {
+  [
+    [0, 0.01],
+    [1, 1.23],
+    [1.23, 1.2249999],
+    [Infinity, -Infinity],
+    [Infinity, 1.23],
+    [-Infinity, -1.23],
+  ].forEach(([n1, n2]) => {
+    it(`{pass: false} expect(${n1}).toBeCloseTo(${n2})`, () => {
+      jestExpect(n1).not.toBeCloseTo(n2);
+
       expect(() =>
         jestExpect(n1).toBeCloseTo(n2),
       ).toThrowErrorMatchingSnapshot();
-
-      jestExpect(n1).not.toBeCloseTo(n2);
     });
   });

-  [[Infinity, Infinity], [-Infinity, -Infinity]].forEach(([n1, n2]) => {
-    it(`{pass: true} expect(${n1})toBeCloseTo( ${n2})`, () => {
-      jestExpect(n1).toBeCloseTo(n2);
+  [[3.141592e-7, 3e-7, 8], [56789, 51234, -4]].forEach(([n1, n2, p]) => {
+    it(`{pass: false} expect(${n1}).toBeCloseTo(${n2}, ${p})`, () => {
+      jestExpect(n1).not.toBeCloseTo(n2, p);

       expect(() =>
-        jestExpect(n1).not.toBeCloseTo(n2),
+        jestExpect(n1).toBeCloseTo(n2, p),
       ).toThrowErrorMatchingSnapshot();
     });
   });

-  [[Infinity, -Infinity], [Infinity, 1.23], [-Infinity, -1.23]].forEach(
-    ([n1, n2]) => {
-      it(`{pass: false} expect(${n1})toBeCloseTo( ${n2})`, () => {
-        jestExpect(n1).not.toBeCloseTo(n2);
+  [[0, 0.1, 0], [0, 0.0001, 3], [0, 0.000004, 5], [2.0000002, 2, 5]].forEach(
+    ([n1, n2, p]) => {
+      it(`{pass: true} expect(${n1}).toBeCloseTo(${n2}, ${p})`, () => {
+        jestExpect(n1).toBeCloseTo(n2, p);

         expect(() =>
-          jestExpect(n1).toBeCloseTo(n2),
+          jestExpect(n1).not.toBeCloseTo(n2, p),
         ).toThrowErrorMatchingSnapshot();
       });
     },
   );

-  [[0, 0.1, 0], [0, 0.0001, 3], [0, 0.000004, 5]].forEach(([n1, n2, p]) => {
-    it(`accepts an optional precision argument: [${n1}, ${n2}, ${p}]`, () => {
-      jestExpect(n1).toBeCloseTo(n2, p);
-
-      expect(() =>
-        jestExpect(n1).not.toBeCloseTo(n2, p),
-      ).toThrowErrorMatchingSnapshot();
-    });
-  });
-
   describe('throws: Matcher error', () => {
     test('promise empty isNot false received', () => {
       const precision = 3;
diff --git c/packages/expect/src/matchers.ts w/packages/expect/src/matchers.ts
index c9ee95c4f..c461fee88 100644
--- c/packages/expect/src/matchers.ts
+++ w/packages/expect/src/matchers.ts
@@ -27,6 +27,7 @@ import {
 } from 'jest-matcher-utils';
 import {MatcherState, MatchersObject} from './types';
 import {
+  printCloseTo,
   printExpectedConstructorName,
   printExpectedConstructorNameNot,
   printReceivedArrayContainExpectedItem,
@@ -129,8 +130,9 @@ const matchers: MatchersObject = {
   ) {
     const matcherName = 'toBeCloseTo';
     const secondArgument = arguments.length === 3 ? 'precision' : undefined;
+    const isNot = this.isNot;
     const options: MatcherHintOptions = {
-      isNot: this.isNot,
+      isNot,
       promise: this.promise,
       secondArgument,
       secondArgumentColor: (arg: string) => arg,
@@ -160,18 +162,14 @@ const matchers: MatchersObject = {
             ? ''
             : `Received:     ${printReceived(received)}\n` +
               '\n' +
-              `Expected precision:        ${stringify(precision)}\n` +
-              `Expected difference: not < ${printExpected(expectedDiff)}\n` +
-              `Received difference:       ${printReceived(receivedDiff)}`)
+              printCloseTo(receivedDiff, expectedDiff, precision, isNot))
       : () =>
           matcherHint(matcherName, undefined, undefined, options) +
           '\n\n' +
           `Expected: ${printExpected(expected)}\n` +
           `Received: ${printReceived(received)}\n` +
           '\n' +
-          `Expected precision:    ${stringify(precision)}\n` +
-          `Expected difference: < ${printExpected(expectedDiff)}\n` +
-          `Received difference:   ${printReceived(receivedDiff)}`;
+          printCloseTo(receivedDiff, expectedDiff, precision, isNot);

     return {message, pass};
   },
diff --git c/packages/expect/src/print.ts w/packages/expect/src/print.ts
index aa0360139..4772c96c5 100644
--- c/packages/expect/src/print.ts
+++ w/packages/expect/src/print.ts
@@ -61,6 +61,36 @@ export const printReceivedArrayContainExpectedItem = (
       ']',
   );

+export const printCloseTo = (
+  receivedDiff: number,
+  expectedDiff: number,
+  precision: number,
+  isNot: boolean,
+): string => {
+  const receivedDiffString = stringify(receivedDiff);
+  const expectedDiffString = receivedDiffString.includes('e')
+    ? // toExponential arg is number of digits after the decimal point.
+      expectedDiff.toExponential(0)
+    : 0 <= precision && precision < 20
+    ? // toFixed arg is number of digits after the decimal point.
+      // It may be a value between 0 and 20 inclusive.
+      // Implementations may optionally support a larger range of values.
+      expectedDiff.toFixed(precision + 1)
+    : stringify(expectedDiff);
+
+  return (
+    `Expected precision:  ${isNot ? '    ' : ''}  ${stringify(
+      precision,
+    )}\n` +
+    `Expected difference: ${isNot ? 'not ' : ''}< ${EXPECTED_COLOR(
+      expectedDiffString,
+    )}\n` +
+    `Received difference: ${isNot ? '    ' : ''}  ${RECEIVED_COLOR(
+      receivedDiffString,
+    )}`
+  );
+};
+
 export const printExpectedConstructorName = (
   label: string,
   expected: Function,

I updated snapshots using Node 10.16.0 and then reran matcher tests locally using 12.8.1


Can't find #include <yolo.pb.h> when testing yolo camera detection independently

I was attempted to run yolo_camera_detection_test.cc to test on other camera images.
But when I was trying to compile the function using gcc in docker
Error comes:

In file included from /apollo/modules/perception/obstacle/camera/detector/yolo_camera_detector/yolo_camera_detector_test_local.cc:25:0:
/apollo/modules/perception/obstacle/camera/detector/yolo_camera_detector/yolo_camera_detector.h:27:92: fatal error: modules/perception/obstacle/camera/detector/yolo_camera_detector/proto/yolo.pb.h: No such file or directory
#include "modules/perception/obstacle/camera/detector/yolo_camera_detector/proto/yolo.pb.h"
^
compilation terminated.
make: *** [yolo_cam] Error 1

compilation terminated.

Would someone help me how to solve this problem?

Find a solution for a similar problem
ph.h file need to be build


Use camelCase notation in class names

Use camelCase ntoation in class names - you tend to use classes names without it, as for example "pageimage". It would be much more readable if you used "pageImage".

Ok


[5.2.5] [oracle] [bug] execution plan in "sessions"

related issue: #4271
The sql should be taken from V$SQL and the plan should be taken from V$SQL_PLAN
Currently, it tries to explain the sql from the connected session which is wrong.

fixed


Get lightweight tags with func (*Repository) TagObject

Running:
ref, err := r.Head()
tag, _ := r.TagObject(ref.Hash())
fmt.Println(tag)

I'd like to get lightweight tags, not just annotated tags. Ideally, this would be done via options, similar to Clone etc.

Sorry as you can see the functions is retrieving Tag objects, not Tags in general, as a very different thing.

@mcuadros I get that, but I'm asking if it's possible for a Tag object to be a lightweight tag rather than just an annotated tag. In my example, I'd like to get the lightweight tag from my latest commit.


Inconsistent behaviour when setting a header to nil

I am parsing incoming mail which sometimes contains the Sender header, sometimes not. I need to remove the header, and from what I can see the way to do that is to set it to nil.
The behaviour of m.sender = nil changes depending on whether the field is set or not. See the following irb log against the current HEAD:
irb(main):001:0> require 'mail'
=> true
irb(main):002:0> m = Mail.new
=> #<Mail::Message:70230664095220, Multipart: false, Headers: >
irb(main):003:0> m.sender = nil
=> nil
irb(main):004:0> m
=> #<Mail::Message:70230664095220, Multipart: false, Headers: <Sender: >>
irb(main):005:0> m.sender = nil
=> nil
irb(main):006:0> m
=> #<Mail::Message:70230664095220, Multipart: false, Headers: >
irb(main):007:0> m.sender = nil
=> nil
irb(main):008:0> m
=> #<Mail::Message:70230664095220, Multipart: false, Headers: <Sender: >>

The behaviour is the same regardless of how I set the header (m.sender, m[:sender], m.header[:sender])

Hi @jeremy, I'm interested in this weird flip-flop behaviour, too. You never seemed to respond to @lime's question:

Is there any reason to keep this flip-flop behaviour, or would it be agreeable to you if I change nil assignment behaviour to delete-or-remain-nil?

I'm curious, too.

I don't think there's a reason to keep the odd flip-flop. Assigning nil to a field that doesn't exist should just do nothing, IMO.


Generate command hangs

Hello! Running nxs-backup generate -T desc_files -S name=sftp hangs until keyboard interrupt.
nxs-backup version 3.8.0, also tried master branch<PHONE_NUMBER>78bd5eb31209925ca7b0d33d2f8575), same issue.
For me it looks like it hangs somewhere here.
As i can see, at the end of every other command (for example, selfUpdate.Run()) there is nil written to the done channel:
https://github.com/nixys/nxs-backup/blob/968678052978bd5eb31209925ca7b0d33d2f8575/modules/cmd_handler/self_update/self_update.go#L129
However, if generateConfig.Run() executes sucessfully, then it just returns:
https://github.com/nixys/nxs-backup/blob/968678052978bd5eb31209925ca7b0d33d2f8575/modules/cmd_handler/generate_config/generate_config.go#L371
If this was not intended, can you fix it, please?

Hi, @Elchinchel.
Thanks for your interest in nxs-backup.
This annoying bug will be fixed soon.

This has been fixed in version 3.8.1.
New ideas and suggestions are welcome.


Are alerts rules case senstive?

I'm using following alert rule
  {
                    "field": "resourceType",
                    "equals": "Microsoft.Compute/virtualMachines",
                    "containsAny": null
                },

which did not seem to fire, when looking at actual event resource type is actually all capital letter like below. Are rules case senstivie?
    "resourceType": {
        "value": "MICROSOFT.COMPUTE/VIRTUALMACHINES",
        "localizedValue": "MICROSOFT.COMPUTE/VIRTUALMACHINES"
    },

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

ID: 73f3e9c6-8cf1-6c8d-2de7-54f6d3740fc1
Version Independent ID: 42af845a-aed7-a035-33ee-66077d7efc57
Content: Configure Azure resource health alerts using Resource Manager templates
Content Source: articles/service-health/resource-health-alert-arm-template-guide.md
Service: service-health
GitHub Login: @stephbaron
Microsoft Alias: stbaron

Thanks for your comment. We are actively investigating and will get back to you shortly. Thanks for your patience.

AFAIK, they are case sensitive and should be lower case. Please make the required case change and retest. let me know if issue persists and I will gladly continue the conversation.


Cannot use the plugin on iOS, missing dependency

@EKashpersky @rroukens ,
I worked around #1 by using the Github repository URL instead of a NPM package, which allows me to do npx cap sync...
The issue is when trying to build for iOS it says FreshchatSDK pod is missing. So I tried to add it manually into Podfile:
pod 'FreshchatSDK'

So a pod install will work but when building I get multiple errors:
Command CompileSwiftSources failed with a nonzero exit code

Command EmitSwiftModule failed with a nonzero exit code

Command CompileSwiftSources failed with a nonzero exit code

...

Do you know what's missing to make things work?
Thank you,

@sneko hi
I've updated documentation, look for initialisation steps for iOS.
Cheers

@EKashpersky do I need to do this with or without adding manually:
pod 'FreshchatSDK'

?
I tried without (as specified in your updated documentation) but ...

There is nothing to add... When searching for FreshchatSDK.xcfrmework.
Did you try it from scratch? Curious to have screenshot if no step is missing in the how-to.
Thank you,

Thx for the feedback! Glad you managed to set it up


Support from Model, where: email == ...

This is based off a discussion on Twitter. Sometimes simple queries can be a bit verbose. Here's a comparison of roughly the same query in ActiveRecord and Ecto.
User.find_by(email: my_email)

where(u in User, where: u == ^my_email) |> Repo.one

Maybe there should be a syntax like: from User, where: email == ^my_email?

With ruby sequel
User.where(email: my_email).first

Possible:
where(User, email: my_email) |> Repo.one

@jeregrine's suggestion is definitely doable.

maybe have some functions that take a query and options, so that all functions kinda act like from. The biggest trick might be that joins and preloads might not quite work
where(User, email: my_email) |> limit(1) |> order_by([:name, [:created_at, :asc]]) |> Repo.all

Pretty sure MOST of that is possible :-P

I like your example, but it would be sad to lose the support for other operators in the query like > <, etc.
Is this possible/a good idea? where(User, email == ^my_email) |> limit(1)?

@paulcsmith unfortunately that is ambiguous. I mean, we could support it, but it is just too confusing. In the same way we could get rid of ^ but we leave it there for clarity.
We could possibly add Repo.get_by/2 instead of supporting the low-level keyword syntax in where. Trade-offs, trade-offs.

@josevalim That makes sense. Now that I look at it, it is pretty unclear. It could work with the syntax I proposed above, but maybe that's worse/harder to implement.

Always a trade off! I think having some handy functions is good. Maybe we just include this in a guide/blog post where we show how easy it is to extend Repo :)

@jeregrine's proposal is also ambiguous unless we decide that an atom should always refer to the first source or that we just error if :email can belong to two sources. The second alternative is impossible when we are dealing with string sources.
If we do add shorthand syntax I don't think we should add them to queries. Ecto queries are very clear and flexible today, it would be a shame to complicate them by adding more syntax to them.
I would prefer adding functions to the repo, such as Repo.find_by(User, email: "foo@bar.com").

:+1: find_by (though I think get_by is more in line with the rest of the Repo api).
Do you imagine the function would also accept limit, order, preload, etc.?

:+1: for Repo.get_by(User, email: email)


Include a full report with a breakdown of the metrics in static export

Clear and concise description of the problem
I would really like to track my progress over time when it comes to the different metrics. Having all numbers in a json would enable me to store them somewhere to achieve exactly that.
Suggested solution
Include all the data in ci-result.json. As of now it only contains the "score", which I think is the average of the four metrics for the page, it would be nice to have the breakdown as well.
Something like this:
{
    "path": ...,
    "score": 0.88,
    "details": {
        "performance": 0.99,
        "accessibility": 0.7,
        "seo": 0.88,
        "best practice": 0.88,
    }
}

Alternative
No response
Additional context
No response

Hi @mastoj, thanks for the suggestion.
When you run a static report it should save the lighthouse.json report for every scanned route, is this what you need?

(First I must say it is a really cool project :) ).
I don't see a lighthouse.json file. I have set buildStatic to true to get a report, but the only json file I find is the "ci-result.json" file. Looking in the "reports" folder does not contain any data file. Do I need to set something in my config to get the data file?

I removed the buildStatic and I can see the file now in each folder. It would however be nice to have the summary numbers in ci-result.json I think.

I created a suggesion for what I think make sense. Also, making the report an object instead of an array makes it easier to add things to the report at a later point.

I can just do as a do with the categories, and all that are available.


Add Clients in Identity Server 4 at runtime or dynamically

I am using IdentityServer4.EntityFramework. I want to add clients at run time I mean after deployment user should able to add client to DB and those clients should be functional after adding into the database.
Any option availble so that I can dynamically add clients in IdentityServer4.

The EF library loads from the database. Is that not what you want?

IdentityServer4 interfaces only tell the developer to build getters (see IClientStore, IResourceStore). If you want to create your own GUI, you would have to create your own interfaces. That way you can create clients, resources etc yourself. Or find a nuget package providing an administration module for IdentityServer. Have a look at PivotalAnimal/BlueConcord.IdentityServer.EntityFrameworkCore they add possibility to do CRUD ... there is a warning in the readme though ....


CocoaPods Specs is not updated ????

https://github.com/CocoaPods/Specs.git, on the web, I can't findout  version is 0.21.0

The name is change Files


Skywalking oap cluster

Please answer these questions before submitting your issue.

Why do you submit this issue?
[ ] Question or discussion
[ ] Bug
[ ] Requirement
[ ] Feature or performance improvement

Question

What do you want to know?
When building a skywalking OAP cluster, how to configure the routing when using the gateway, how to sense OAP expansion between UI and agent, and whether to directly configure the gateway address? Can you provide a configuration example？

Bug

Which version of SkyWalking, OS, and JRE?

Which company or project?

What happened?
If possible, provide a way to reproduce the error. e.g. demo application, component version.

Requirement or improvement

Please describe your requirements or improvement suggestions.

We expect you could find the target pods by service name in k8s directly. We don't expose anything.


Lambda@Edge regional problem

When I try to run a project locally with Lambda@Edge I get error message: Error: ENOENT: no such file or directory, copyfile<EMAIL_ADDRESS>-> '.../.build/lib/edge-function/__entrypoint__.js' My current region is eu-north-1. If I change region to us-east-1 project works again.
What could be the problem?
Here is my stack code:
import * as sst from "@serverless-stack/resources";
import * as cloudfront from "@aws-cdk/aws-cloudfront";
import * as lambda from '@aws-cdk/aws-lambda';

export default class MySiteStack extends sst.Stack {
  constructor(scope, id, props) {
    super(scope, id, props);

    const viewerRequestEdgeFunction = new cloudfront.experimental.EdgeFunction(this, "viewerRequest", {
      runtime: lambda.Runtime.NODEJS_12_X,
      handler: "viewerRequest.handler",
      code: lambda.Code.fromAsset("./src/edge"),
      stackId: `${scope.logicalPrefixedName("edge-lambda")}`
    });

    // Deploy our SolidJS app
    const site = new sst.StaticSite(this, "SolidJSSite", {
      path: "frontend",
      buildOutput: "dist",
      buildCommand: "npm run build",
      errorPage: StaticSiteErrorOptions.REDIRECT_TO_INDEX_PAGE,
      cfDistribution: {
        defaultBehavior: {
          edgeLambdas: [
            {
              functionVersion: viewerRequestEdgeFunction.currentVersion,
              eventType: cloudfront.LambdaEdgeEventType.VIEWER_REQUEST,
            }
          ],
        },
      },
    });

    // Show the URLs in the output
    this.addOutputs({
      SiteUrl: site.url
    });
  }
}

I think edge functions can only be created in the us-east-1 region. btw do you get the error with eu-north-1 in prod?
I can take a look if you could tell.

Yes, the problem also occurs when I try to deploy stage prod in other regions than us-east-1.

We are transition this repo to https://github.com/sst/v2 and are closing this issue for now. If it is still relevant please reopen it there - sorry for the trouble


Migrate to Claude 3 & messages API

This change moves to Claude 3 and the messages API and uses cosine distance rather than euclidean in the self-managed example for consistency with the created indexes.

Looks good. Merged with base branch


Add Broadcast functionality

It would be useful to also access the broadcast functionality that is within ESPNOW's libraries.  This would enable peer to peer communication and limit a device to act as either a client or a server.  It also allows 1 to N communications in a single packet send.

Any chance of progress on this?


fix(src): Fix loading error when policies is empty

 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.

@Nawbc plz sign CLA:

@nodece @Zxilly @Shivansh-yadav13 plz review


MaxRedirects exceeded should be treated as error

The lib doesn't treat 'too many redirects' as an error(I mean test with response.error). However, when using python requests library it will throw requests.exceptions.TooManyRedirects.

Well, I find below code in error.cpp.
case CURLE_TOO_MANY_REDIRECTS:
       return ErrorCode::OK;

Can anyone explain why does so?


Facing neutron-lbaas is not working

i tried allinone. Everything installed fine. but i am facing the following error in neutron-server.log
2015-07-17 00:15:03.110 29850 ERROR neutron.services.service_base [-] No providers specified for 'LOADBALANCER' service, exiting
for that i did some search and found check neutron-lbaas.conf its not existing under /etc/conf directory.
$ dpkg -l | grep lbaas
ii  neutron-lbaas-agent                      1:2015.1.0-0ubuntu1~cloud0            all          Neutron is a virtual network service for Openstack - LBaaS agent
ii  python-neutron-lbaas                     1:2015.1.0-0ubuntu1~cloud0            all          Loadbalancer-as-a-Service driver for OpenStack Neutron
After searching its related to following bug:
https://bugs.launchpad.net/ubuntu/+source/neutron-lbaas/+bug/1460228
Suggest some solution to solve this.

This is a packaging error, so I do not believe it is appropriate to try to fix it in puppet.
If we did want to fix it in puppet, it would be in the puppet-neutron module, not this module. You can file a bug for that here: https://launchpad.net/puppet-neutron

I went on Google because I had this bug. For the record and for people who'll have this bug in the future, you have to enable service_provider parameter in neutron.conf.
See https://bugs.launchpad.net/puppet-neutron/+bug/1535382/comments/1 and https://bugs.launchpad.net/puppet-neutron/+bug/1535382/comments/2 for more details.


Add no_std support

@antouhou this could be useful

@Wizdave97 There's a new version available on crates.io, 1.2.0. I've also mentioned you in the release notes. Thank you again!


ratio with histogram_count results in values over 100%

What did you do?

Query native histogram with the following format:

histogram_count(sum(rate(example_metric_name{success="true"}[5m]))) / histogram_count(sum(rate(example_metric_name{}[5m])))

notice the percentage returned is greater than 100%
Queried again to confirm the values match a the time we see the percentage greater than 100%

   histogram_count(sum(rate(example_metric_name{success="true"}[5m]))) ==
   histogram_count(sum(rate(example_metric_name{}[5m])))

What did you expect to see?
Expected the percentage to be 100% when the count from both timeseries matches
What did you see instead? Under which circumstances?
percentage greater than 100% at certain evaluation points
System information
No response
Prometheus version
2.54.1

Prometheus configuration file
No response
Alertmanager version
No response
Alertmanager configuration file
No response
Logs
No response

hey @ryswm do you need any help with this? Is there any way I can contribute as a begineer to this Repo to this issue?

How much are the results above 100%? Can it still be explained by float inaccuracies?
We need more data to debug this. Ideally enough to reproduce it locally on a developer's machine.

Thank you both for taking a look
we have done some additional testing on our side and found the issue to be caused by sources other than prometheus, so we can close this issue


Memory leak in latest foundry

Component
Forge
Have you ensured that all of these are up to date?

[X] Foundry
[X] Foundryup

What version of Foundry are you on?
forge 0.2.0 (5494c33 2024-05-30T00:18:10.251370000Z)
What command(s) is the bug in?
forge test (make test)
Operating System
macOS (Apple Silicon)
Describe the bug
With the following PR as an example https://github.com/superform-xyz/superform-core/pull/541
To reproduce
Part 1

Do foundryup (latest foundry)
forge install
Override RPCs in make file and run make ftest
Open Mac activity monitor and check memory usage. This results in a oom:

code 137 in https://github.com/superform-xyz/superform-core/actions/runs/9289996043/job/25566018918
Please note that this is a powerful dedicated Github actions runner, so the memory limits shouldn't actually be reached
Part 2

Do  foundryup -v  nightly-cafc2606a2187a42b236df4aa65f4e8cdfcea970
forge install
Override RPCs in make file and run make ftest
Open Mac activity monitor and check memory usage

A whopping difference of 36gb.

@grandizzy I wonder if this is fuzzing related
@0xTimepunk were you able to narrow this down to a specific test?

@grandizzy I wonder if this is fuzzing related
@0xTimepunk were you able to narrow this down to a specific test?

Invariants are excluded from project tests, so they're not the culprit. Going to check for regular fuzz tests

I'm not sure if the nightly I posted is the last operating nightly as I haven't tested. Memory usage increase seems independent of test type, however we do have fuzzying in some scenario files which are part of make ftest or make coverage

I'm not sure if the nightly I posted is the last well operating nightly as I haven't tested. Memory usage increase seems independent of test type, however we do have fuzzying in some scenario files which are part of make ftest or make coverage

@0xTimepunk I was under the impression you're excluding invariant tests where you hit such, but looking at make ftest target it is running all of them, is there same issue when running make test-ci ? I am yet able to try it locally as the project requires several chain rpc urls which I don't have handy

I notice 1gb is added on each fuzz test we run, when it should be stable. This is on `make test-ci` which has no invariant calls

@mattsse @grandizzy (also please read conclusions at the bottom)
Scenario 1 - the worst (with all latest versions)
Settings
On forge-std @52715a2 (latest)
latest foundry (foundryup)
Note: this checks out to a commit with latest forge-std and removed import of ds-test
git checkout 0769ff1 && make test-ci

Results: Forge hits around  11gb. More has been observed
git checkout 0769ff1 && make coverage

Results: Forge hits around +32gb. More has been observed Computer starts to freeze, 137 code sometimes both on local / ci
Scenario 2 - very bad
Settings
On forge-std @52715a2 (latest)
nightly-cafc2606a2187a42b236df4aa65f4e8cdfcea970
Note: this checks out to a commit with latest forge-std and removed import of ds-test
git checkout 0769ff1 && forge install && make test-ci

Results: Forge hits around 8gb usage. More has been observed in other runs which were not snapshoted.
git checkout 0769ff1 && forge install && make coverage

Results: Forge hits around 21gb of usage. More has been observed in other runs which were not snapshoted.
Scenario 3 - not possible
Settings
On forge-std @52715a2 (latest)
nightly-f625d0fa7c51e65b4bf1e8f7931cd1c6e2e285e9
Note: this checks out to a commit with latest forge-std and removed import of ds-test
git checkout 0769ff1 && forge install && make test-ci
Crashes (likely too old foundry version for most recent forge-std), so skipping analysis here.

Scenario 4 - not possible
Settings
On forge-std@2f11269 (6 months old, the one we had previously)
AND Using ds-test@e282159
latest foundry (foundryup)
Note: this checks out to a commit which has our previous forge-std version, the one from 6 months ago, together with ds-test, both still operational
git checkout e9826a51 && forge install && make test-ci
Crashes. Likely new forge version did something that made it stop working with forge-std (unsure why should this happen). Skipping test.

Scenario 5 - somewhat healthy ram usage
On forge-std@2f11269 (6 months old, the one we had previously)
AND Using ds-test@e282159
nightly-cafc2606a2187a42b236df4aa65f4e8cdfcea970
Note: this checks out to a commit which has our previous forge-std version, the one from 6 months ago, together with ds-test, both still operational
git checkout e9826a51 && forge install && make test-ci

Results: 2gb. looks healthy
git checkout e9826a51 && forge install && make test-coverage

Results: 15gb. Worse than scenario 6, 3 times more gb usage, definitely something started to happen with forge between version nightly-f625d0fa7c51e65b4bf1e8f7931cd1c6e2e285e9 (check below) and nightly-cafc2606a2187a42b236df4aa65f4e8cdfcea970(this one). Still better than with new forge-std in scenario 2.
Scenario 6 - the healthiest RAM usage
Settings
On forge-std@2f11269 (6 months old, the one we had previously)
AND Using ds-test@e282159
nightly-f625d0fa7c51e65b4bf1e8f7931cd1c6e2e285e9
Note: this checks out to a commit which has our previous forge-std version, the one from 6 months ago, together with ds-test, both still operational
git checkout e9826a51 && forge install && make test-ci

Results: Forge hits around 1.79gb usage
git checkout e9826a51 && forge install && make coverage

Results: Forge hits around 5gb usage

Conclusions

Pinning forge-std to an old commit together with using ds-test, plus reverting to an older foundry version is the best setup to stop the memory leak and continue operating with foundry for us for now as a temporary measure. The best scenario is 6.
Old forge-std versions work well up until nightly cafc260 forge. In newest forge it crashes
New forge-std version without ds-test import works well back to cafc260. In older forge like f625d0f it crashes
We believe new forge version should keep on supporting projects that wish to use older forge-std together with ds-test and not introduce crashes.

We only decided to update forge-std to the latest version because forge started crashing (basically scenario 4). Then we were forced to start taking the memory leak which is impeding our operations.

This issue is extra tricky to solve in a temporary fix because using latest forge allowed to overcome the problem in https://github.com/foundry-rs/foundry/issues/7852 (which was fixed this month)

Update:
While this works on our main/develop branches (scenario 6, forge-std 1.7.3 and forge f625d0f), this breaks something in an upstream branch where tests on mainnet are pinned to a more recent block compared to main/develop. In this block a USDC upgrade was already made, which only works with forge-std 1.8.0+ (see release notes of https://github.com/foundry-rs/forge-std/releases/tag/v1.8.0)
Some testing
Testing forge-std 1.8.0 with f625d0f does not work due to the crash in scenario 3 above.
Then I upgraded again foundry to cafc2606a2187a42b236df4aa65f4e8cdfcea970.
Testing once again (1.8.0 + cafc260) to see if the memory leak is there by running
git checkout xxx && forge install && make coverage

Results: 13gb, the memory leak is back
Conclusion: the memory leak seems to be definitely have been brought up by forge-std in versions >=1.8.0 crossover with forge.
for awareness @mattsse @grandizzy and tagging @mds1
There is an urgency in solving this situation as this is almost completely halting our development. We need more advice how we can short term fix this to put down the memory leak and have the USDC fix brought up by 1.8.0 in place (is there a commit we can cherry pick for this)

@0xTimepunk running with trace enabled I can see mem grows when test forks chains (there are many tests with many chains forked running at the same time so eventually OS kicks in and kills the task). What worked for me locally (and I think you can apply it for now as an workaround too to get you going) is to split the scenarios test in several steps, as in
test-scenarios :; forge test --match-path "test/fuzz/scenarios/scenarios-deposit-multiDst*/*.sol" --no-match-path "test/invariant/**/*.sol" \
&& forge test --match-path "test/fuzz/scenarios/scenarios-deposit-singleDirect*/*.sol" --no-match-path "test/invariant/**/*.sol" ...

so mem doesn't ever grow up to the point where process needs to be killed
Looking more into this issue but I think you can use such for now?

@0xTimepunk running with trace enabled I can see mem grows when test forks chains (there are many tests with many chains forked running at the same time so eventually OS kicks in and kills the task). What worked for me locally (and I think you can apply it for now as an workaround too to get you going) is to split the scenarios test in several steps, as in

test-scenarios :; forge test --match-path "test/fuzz/scenarios/scenarios-deposit-multiDst*/*.sol" --no-match-path "test/invariant/**/*.sol" \

&& forge test --match-path "test/fuzz/scenarios/scenarios-deposit-singleDirect*/*.sol" --no-match-path "test/invariant/**/*.sol" ...

so mem doesn't ever grow up to the point where process needs to be killed (this also helped me not to get rate limited by infura)
Looking more into this issue but I think you can use such for now?

Hey @grandizzy  it's super cumbersome to run a large test suite like ours like that suggested way unfortunately.
Thinking on using pre 1.8.0 forge-std plus a temporary fix to avoid dealing USDC
is there any further help we can give on this problem?
Thanks

yeah, I'm actively looking into this, just provided some thoughts while debugging

@mattsse @grandizzy requesting to re-open the issue as something got merged around 2 days ago or more into foundry that made the issue appear once again
Ci exits once again with error 137 (out of memory)
Running make coverage on https://github.com/superform-xyz/superform-core/pull/516 yield 40gb of ram

forge 0.2.0 (fb86e5d 2024-06-05T00:17:33.761343000Z) was one of the first versions which contained the initial fix to the memory issue which was working. However, given that the nightlies are removed after 3 days we can no longer access this nightly in the CI

@klkvr @grandizzy does this ring a bell?

nothing I could think at but will do some tests shortly and try figure out if something changed to affect this. @0xTimepunk to rule out the possibility of your PR 516 exposing a new issue (as it adds new code and tests), could you please check if you see same coverage problem running latest forge against your master branch?

I am not able to locally spot any difference between June 5 forge build mentioned as working OK (https://github.com/foundry-rs/foundry/commit/fb86e5d3bf41f9cef3ccc7fbd04e1a422f20c29e) and latest (https://github.com/foundry-rs/foundry/commit/fb86e5d3bf41f9cef3ccc7fbd04e1a422f20c29e)  - when running make coverage on https://github.com/superform-xyz/superform-core/commit/68320ffd7190db2abb9b32d5fdf4912bf04275be commit both runs cap around 25G of res mem and completes succcessfully
same when testing v1 branch with both forge versions so I am pretty sure there's no regression. @0xTimepunk maybe there's an issue with the RPC URLs used by your CI that could somehow slow down tests / make mem accumulate?

I'm seeing a variant of this when running forge test --debug. Though happy to create a separate issue if this is something else. Here's a small reproducer:
Foundry Version
forge 0.2.0 (c4a984fbf 2024-06-28T00:53:16.491646468Z)
Reproducer
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;

import {Test, console} from "forge-std/Test.sol";
import {Counter} from "../src/Counter.sol";

contract CounterTest is Test {
    Counter public counter;
    address addr = address(uint160(uint256(keccak256("ekans"))));

    function setUp() public {
        bytes memory buffer = new bytes(2000000);
        vm.etch(address(addr), buffer);

        counter = new Counter();
        counter.setNumber(0);
    }

    function test_Increment() public {
        counter.increment();
        assertEq(counter.number(), 1);
    }

    function testFuzz_SetNumber(uint256 x) public {
        counter.setNumber(x);
        assertEq(counter.number(), x);
    }
}

Running forge test --debug test_Increment --mc CounterTest consumes over 32 GB on my machine before the kernel kills it.
I think the critical part is this line here:
vm.etch(address(addr), buffer)

Etching a really large runtime code seems to trigger the issue. I use an empty buffer for illustrative purposes, but the run still consumes alot of memory even when a valid runtime bytecode is used. Reducing the size of the runtime code seems to work, with minimal memory usage. I'm sure there's some buffer size threshold where memory usage spikes, but I haven't narrowed it down.

@Inphi yes, please open a new issue for etch, going to use this one to optimize coverage report creation. Thank you.

@Inphi yes, please open a new issue for etch, going to use this one to optimize coverage report creation. Thank you.

Created an issue here.
Seems related to this issue based on this comment. I imagine that the Debugger inspector is also used to track coverage which would explain the memory blowup.

@0xTimepunk can we now close this issue as if I correctly remember it's not the same as original report but a forge coverage high mem usage?
Pls open a new issue for coverage if problem still exists. Thank you!

@0xTimepunk going to close this for now per above comment, please open a new one if still issues. Thank you!

View a chang comment.


How To Create Custom Error Messages

Hay, I want to set own custom error messages on validation, for example rules required i want to set error to Do Not Blank.. etc.
How i do this ?
Thanks ..

@azizgithub,
While defining model validations on field, you can define custom messages like this,
http://laravel.com/docs/4.2/validation#custom-error-messages
We are using laravel validation only and not using any other validation stuff. so above link should work.


Accessibility: change position using keyboard

It would be nice to have possibility to change position of slider cursors using keyboard.

I'm not sure how I would do that.
The component would have to render a focusable element, detect the focus and then register keyboard handlers for the duration of the focus. Not sure if that's possible.
Personally I'm using two <input type="number"/> elements with the slider that share the same values. Maybe that's a workable solution for you as well.

@cell303 but can you control the values with the arrows (left/right)? Using the slider (with two values) for displaying the price.

Well you would control the values either using the slider or the input fields, which in turn have keyboard listeners (for the up and down arrow keys though).
By using the slider and the input fields as controlled components you can keep all the values in sync:
render() {
  const [value1, value2] = this.state.value;
  return (
    <div>
      <Slider value={[value1, value2]} onChange={this.onChange}/>
      <input type="number" value={value1} onChange={v => this.onChange([v, value2])}/>
      <input type="number" value={value2} onChange={v => this.onChange([value1, v])}/>
    </div>
  )
},

onChange(value) {
  this.setState({value});
}

Hopefully a side effect of making it work with the keyboard would be that it is focusable. Right now it's skipped when tabbing, which even users who don't need accessibility features often do to work through a form.

In addition to merely making it accept focus and keyboard inputs, aria values for current value, min and max should be relatively easily added and offer that functionality to screen-readers.  The aria-role of slider offers guidance on best practices for a lot of this: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_slider_role

@qwtel your solution works very well for me! I've adapted it to:
<input
  type="number"
  min={min}
  max={max}
  value={value1}
  onChange={e => this.onChange([parseInt(e.currentTarget.value, 10), value2])}
/>
<input
  type="number"
  min={min}
  max={max}
  value={value2}
  onChange={e => this.onChange([value1, parseInt(e.currentTarget.value, 10)])}
/>

But has the downside that I now have to implement the "pearling" and min/max checks as well.
If would be awesome if this is embedded in the lib along with the right aria attributes @imbrianj mentions.

WAI-ARIA has a guide for making sliders (including ones with multiple handles, called "thumbs"): https://www.w3.org/TR/wai-aria-practices/#slidertwothumb
There are even reference implementations: http://www.oaa-accessibility.org/examplep/slider1/
tl;dr don't use an input, use tabindex="0" w/ all the other necessary aria attributes and then the JS listeners for keydown stuff.

Yeah that would be an even better solution! 👍

I've created a pull request to add some basic keyboard accessibility (#113). I'd appreciate it if we could review this PR.


Promises used to load sidecar and peaks files messing everything up

The sidecar JSON and the peaks files both are good functional solutions, but they also require us to utilize fetch(), leading to the introduction of Promises. We need to come up with a better, synchronous solution.

Fixed in commit d85fe181170853236aaa3687987b8a10078c577f


[BUG] Account Statistics - own visits added after every refresh

Description
Currently my own visits to my own profile and as well the /account/statistics page adding towards to view count in statistics.
This happens when

going to the profile/statistics via any link
on refresh

I can do it multiple times and always the view count gets up.
In my opinion at least my own views shouldn't ve counted. Especially if I'm visiting the sratistics page.
Screenshots
No response
Additional information
No response

Yes, this is confirmed. On refresh or on loading profile view count increase.
I don't known if this is meant to be this way or not.
If it is than totally fine

Can I work on this issue?

Hey, I am trying to solve this and as @eddiejaoude said this happen when API end-point is requested. I am not quite sure the endpoint responsible for this but i think it is  pages/api/users/[username]/index.js. I have a solution for this.
To check if user is authenticated in pages/api/users/[username]/index.js. If user is authenticated than we do not run the code for the increment of view count.. In this we have to update getUserApi function to have a extra parameter isAuthenticated and provide its value from handler where it is called from.
Should i continue on this solution or  is there some better way we can do this?

I am trying to fix this. @eddiejaoude Should we check this on pages/api/users/[username]/index.js as i think that is API that is incrementing the user.
From that we can check if authenticated user and profile are same and if they are same don't increment. We have update some function for that.
Also const session = await unstable_getServerSession(req, res, authOptions) is this okay to get information about user who is authenticated.

Thank you for the question 👍
Yes use the session information in the API, and like you mentioned if the authenticated user is the profile owner then don't increment the profile view counter


Kubernetes label not saved properly through Continuous Delivery -> Edit Config (Edit YAML works)

Setup
Rancher version: 2.6.3-rc1 (3 node k3s KVM setup, 2 node k3s downstream cluster v1.21.5, 2 node RKE1 downstream cluster v1.21.6)
Browser type & version: Chrome 89.0.4389.90 (Official Build)
Describe the bug
Rancher Main Menu -> Continuous Delivery -> Clusters -> [cluster] -> ... -> Edit Config -> Add Label -> [label:value] -> Save
To Reproduce
Steps above.
Result
Go back to Edit Config (or click the cluster) -> Label and value are missing, Cluster Grouping does not work.
Expected Result
Label and value should be set and saved.
With Edit YAML setting a label works.
Screenshots

Additional context

Detailed Description

Context

Duplicate of https://github.com/rancher/dashboard/issues/4310


Migration to camunda 8 ?

Thanks for the greate library.
I have question.
is it planned to release a new version of the library for camunda 8 ?

Please see #91
We (https://github.com/komsa-ag/Camunda.Api.Client) have currently no plans for supporting Camunda 8 (because there are still some features missing from the current version).
But we are open to contributions, if you would like to support.

Hi @FreeAndNil
ok, I will see what I can do :)


[Bug] exercise "en/python/arithmeticOperators/21.md" has an issue

Here it is the solution:
store = 60
sold = 50
bought = 55
store += bought - sold

you should add the bought quantity and subtract the sold quantity to the store

On Wed, 9 Nov 2022 at 11:15 AM, Alexandru Mariuti @.***>
wrote:

Here it is the solution:
store = 60sold = 50bought = 55store += bought - sold
you should add the bought quantity and subtract the sold quantity to
the store
—
Reply to this email directly, view it on GitHub
https://github.com/nank1ro/codigo-questions/issues/122#issuecomment-1308522965,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A37I7K7HRMJARRA23QWVDVTWHN2TTANCNFSM6AAAAAAR2QEDVE
.
You are receiving this because you authored the thread.Message ID:
@.***>

Yes have done it but it’s not working
How should I put it

I have tried to run it and everything works correctly.
Are you writing your code one line after the comment? # write after this line
Solution ready to copy:
store = 60
sold = 50
bought = 55
# write after this line
store += bought - sold


Is there any missing config file?

The service registered by tarsgo in the master reports an error.

There is no problem with direct addressing.

This error can be ignored, under normal circumstances xxx —config = xxx.conf, this configuration is for the tars framework.

这个错误可以不管, 正常情况下 xxx —config = xxx.conf, 这个配置是给tars框架用的。


add isRTL prop instead of using i18nManager.isRTL

hi
I think it is better to add a new prop "isRTL" for RTL support instead of using i18nManager,
in my use case, I want to disable RTL support in my tab bar but I cant and I had to fork the repo and change code directly.
if you use props, we can pass i18nManager or another flag to it and there is no difference at all but much more flexibility.

I think it is better to add a new prop "isRTL" for RTL support instead of using i18nManager

I wish it was that easy. The native components already handle RTL and our calculations become incorrect due to this, resulting in broken layout. The checks we have don't just add support for RTL mode, they are necessary not to have a broken tab bar in RTL. These bugs may not be visible if you don't have scrollEnabled set to true.

I had to fork the repo and change code directly

You don't have to fork the repo, you can copy the code for the tab bar or write a custom tab bar with the behaviour you want and use renderTabBar.


separate mocha node.js definition

fix #4701

@enlight @thasner @adidahiya can I merge this PR?

:+1:

I don't have access to a machine I can test these changes on right now, but I don't see any reason they wouldn't work for me, so :+1: from me. Looks like custom reporters aren't supported when running Mocha in a browser anyway.

:+1:

:+1:


Fixes #255

Extracting the do_variables () function and applying it to all making sense strings in Executer.gd to fix #255

This was auto-closed by mistake


Adjust types on react-csrf to match usage

Description
This PR adjust the types of @shopify/react-csrf to match it's usage.
If the token is csrfToken?: string the type will be string | undefined.
Type of change

Type change in @shopify/react-csrf
@shopify/react-csrf-universal-provider depends on it so will need to be bumped.

[X]  Major: Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

[ ] I have added a changelog entry, prefixed by the type of change noted above

Need to rethink this.


M0019: status True/False mixed up?

The status of M0019 says "False: Force input" and "True: Release input" which is confusing.

Name
Command
Type
Value
Comment

status
setInput
boolean
-False -True
False: Force input True: Release input

I don't know how the TLC's has chosen to implement this. This needs to be checked before fixing this.

i think we should change it anyways. leaving it will just cause more confusion?

The problem is if the TLC's has implemented this according to the current text (e.g. "True: Release input"). Then fixing this will make the new SXL that doesn't backwards compatiblity. Previously we have chosen to avoid breaking changes in the SXL.

we should use the validator to check how equipment actually implement this

A similar case is M0005. It says "False: Activate", which is confusing

Let's just fix this. Updated the draft


[BUG]: Bitswap spams wantlist errors

Multiple people on devnet reported this log being spammed consistently. I also have those

Currently, IDK what can cause this and this needs to be investigated.

Closing as not reproduced on latest version


add Docs

Hello @RiesBen! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

In the file docs/conf.py:

Line 44:1: E265 block comment should start with '# '
Line 44:80: E501 line too long (92 > 79 characters)
Line 72:1: E265 block comment should start with '# '


NL_17 :  dropping disa1

Do you have a condition that is defined as a disability by the Equality Act 2010*
Not applicable in Netherlands because not the same law

Apply the modification to nl_17


Better handle HTTP statuses from Connect

When Connect returns an error status, do a better job of telling the user what happened.
Initially, this is a backend change to improve our errors that we pass to the frontend.

Closing this one, and we can break down each error into a separate issue.


CharactersInterface

Just a question: why did you create an Interface for the Characters? is it supposed to have more than one implementation? Or just for encapsulation purposes?

Hi @nerdoc
I always try to follow best practices and not depend on concrete classes, it makes the code flexible and able to support use cases I might not have thought of when I write it.
In this specific case, I originally did it so that people could produce their own concrete class using their standard default control characters. However recently I've been making use of it when looking into TRADACOMS

Thanks!


Add RHTPQMap and Change CRDTElement type from class to protocol

What this PR does / why we need it:

Change Heap based on JS-SDK.
Add RHTPQMap & Test cases.
Change RHTPQMapNode to be the value of HeaNode.
Change some member variable names of RHTPQMapNode.

strKey -> rhtKey
value -> rhtValue

Change some method’s names in RHTPQMap(Fix for clear behavior of methods).
@hackerwins If it's not appropriate, I'll roll back.

delete -> remove
purge -> delete
remove -> delete
release -> delete

Change CRDTElement type from class to protocol
Change setActorID of TimeTicket to mutating and remove the return type.
Change TimeTicket/toIDString to private.
Change Swift-tools-version to 5.7.
Change the access modifier of var and functions of SplayNode.
Remove lint errors.
Modify compare method of CRDTArray.

Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:

Additional documentation:

Checklist:

[ ] Added relevant tests or not required
[ ] Didn't break anything

@humdrum Added the empty_count rule to SwiftLint. Thank you for the good suggestion.


Release Using the GitHub Action

These advantages include:

Secret Token
MacOS Supported
It is automatically created at release.

It work in process
https://github.com/black7375/tealdeer/blob/master/.github/workflows/release.yml
I'll make PR.
Now, Have upload file issue.
https://github.com/softprops/action-gh-release/issues/82

Fixed in #240.

Fixed in #240.


About the dataset

I have downloaded the preprocessed data, but the structure is a little different with the code data structure. And I download the original dataset but the structure is still different. Could you upload the link of your suitable dataset? Or is there any easy way to solve the problem? Thank you very much!

Hi @Poppy-yyz
Thanks a lot for your interest! Could you please double check the tree structure in here? If it doesn't work for you, please give me more details about which dataset you need me to help.
Cheers,
Yuyuan

I've uploaded the related datasets (excluding COCO) in this link, please feel free to download. You can found the modified COCO dataset in this repo.
Good luck.

Got it!  It helps!  Thank you!

I've uploaded the related datasets (excluding COCO) in this link, please feel free to download. You can found the modified COCO dataset in this repo.
Good luck.

Hello,
The dataset you uploaded doesn't have the COCO dataset in it, making it hard to reproduce results. Would you mind adding the COCO dataset in it too since it's tedious to obtain them? Thanks.

@raj4432 Fair enough. I've uploaded it.
Cheers


Exporting Profiles/No install

Hi, is there any easy way to export custom profiles and re-import them?
If it isn't already possible, I believe a Cmd utility would be prefered.
In the same line of thoughts, is it possible to make file-meta install free?
Obviously, the software would still make registry edits/copy its files somewhere, but wouldn't require the user to go through the install setup(or how could I setup the source code to do so?)

Right now, there is no way to export custom profiles and re-import them. However, the only storage used is in the registry, so it would be possible to extract the relevant registry keys and save them in a .reg file so that they could be applied on the same or another machine. It is a good feature idea though, I’ll add it to the list. Presumably, it would be good to have not just the profile definitions but the extensions to which they were applied preserved.
Install free is a bit trickier. If you look at what setup does (in Product.wxs), there are several COM registrations required. These could be done, however, when the Association Manager started, though I’m not clear how they would be removed on deletion. More difficult is the required installation of the right version of the C++ runtime, which as far as I know itself is only available as an installation. Another minor issue is the creation and removal of start-up menu entries. A possibility would be the use of the Windows 10 app packaging, but I doubt that’s what you’re trying to get to.
What requirements prompt your questions?
Dijji

I would love to distribute your software as part of my suite(which I would share between my friends and myself)

You can copy custom profiles from one machine to another. On a machine with the profiles setup as desired, all the definitions can be found at "\Users\AppData\Roaming\FileMeta\SavedState.xml". You can then take this file and use it with the command line tool FileMetaAssoc.exe to set up profiles on another machine, or for another user on the same machine. For example:
FileMetaAssoc.exe -a -p=.bmp -d="D:\Configs\SavedState.xml" .bmp
This is all described in the documentation.
Thinking more about installation, the sticking point that means you have to do run some sort of installation is the need to install the Visual C++ runtime. I can’t think of any simple way around it. Given this requirement, it is probably easier to take your code and add it to the File Meta installation to create a new installation of your own (the File Meta licence covers the creation of such derived works). This does present you with the learning curve needed to understand WIX, but that is not too horrible. You could also extend it to include setting up all the required profiles and file associations in the same set up.
Dijji


just one

I wish gotty-windows. can you make it?

https://github.com/creack/pty does not support Windows. If that changes, I'd be happy to build for Windows.


Add quay #160

Adding basic quay deployment.

I think I fucked up on creating the branch, there are two commits from my previous PR regarding mtv in this one here, too. probably better to accept that first PR first, and then I rebase this one here. Sorry for the nose.

What's the storage backend? Default storage-class? Or odf?

Default ObjectStorage class.  i.e. noobaa and in the current config.
Happy to change that to something else, just let me know which S3 you want to use.

What's the storage backend? Default storage-class? Or odf?

Default ObjectStorage class. i.e. noobaa and in the current config. Happy to change that to something else, just let me know which S3 you want to use.

Oh, you are right, I forgot that.
I don't have an opinion on it yet. I don't know how stable ODF is on the that cluster. Since it is deployed, it's quite stable. Comparing to MetalLB or external secret operator :-D


Interactive buttons in whatsapp

"buttons": [
{
"id": "0",
"displayText": "Sim",
"subtype": "quick_reply",
"selectionId": "sim"
},
{
"id": "1",
"displayText": "Nao",
"subtype": "quick_reply",
"selectionId": "nao"
}
]
Can anyone send buttons yet? This is the JSON that returns the buttons.
Does anyone already know how I can send this object?

nobody knows?

I think is online posible from WhatsApp oficial API
El jue., 19 mar. 2020 17:22, Mike W. Lustosa<EMAIL_ADDRESS>escribió:

nobody knows?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/mukulhase/WebWhatsapp-Wrapper/issues/849#issuecomment-601274659,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAVMMGB7ANUDN6NXDUPJEUTRIJBENANCNFSM4LFYMOXA
.

nobody more?

This solved all my problems https://green-api.com
WhatsApp API 30 days trial and only $10/month


docs: Update Azure IPAM to "legacy"

Update Azure Ipam to Legacy and add recommended ways to install cilium on AKS
Fixes: #27289

I am switching PRs related to #27289 to draft so that I have a chance to review them cohesively since they're all out at the same time and are all supposed to work together.

This PR seems to already be superseded by https://github.com/cilium/cilium/pull/28910 , should we close this one?

closing as similar PR exists https://github.com/cilium/cilium/pull/28910


Empty rl_deepracer_coach_robomaker.py file?

Hi,
There seems to be nothing in the rl_deepracer_coach_robomaker.py?
Probably an error with the init.sh that blanks the file.

Sorry about that. I need to check-in another file for it to work right. I'm currently traveling but I'll fix it when I get back. Until then you can comment out line 24 in the init file.

No worries, I simply git checked out the file :).

I checked in the missing file, thanks for pointing this out.


Chat - HotKey Search not working if receipt image open in preview modal

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: 1.4.64-0
Reproducible in staging?: Y
Reproducible in production?: Y
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team
Action Performed:

Open App
Open any chat with a receipt with image attached
Click the image to open the preview modal
Press CTRL+K or CMD+K to open the search page

Expected Result:
The preview modal is exited and the search modal is opened, the search text box is focused.
Actual Result:
The preview mode is exited. Serach modal is only opened after navigating to a different conversation or to the conversation name in the header.
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android: Native
[ ] Android: mWeb Chrome
[ ] iOS: Native
[ ] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[ ] MacOS: Desktop

Screenshots/Videos
https://github.com/Expensify/App/assets/115492554/d600bea6-d770-4896-9d89-056001740815
https://github.com/Expensify/App/assets/115492554/f421a479-d4a9-481f-819e-3c923156e893
https://github.com/Expensify/App/assets/115492554/2e56bc7a-3aee-4a94-b91b-bc42af29a45a

View all open jobs on GitHub

We think this issue might be related to the #collect project.

Dupe of https://github.com/Expensify/App/issues/37634


Support for tcp connections inside network namespaces

Read /proc//net/tcp once per netns, instead of /proc/net/tcp.

Hi Tom, thanks for the PR. I've merged it, but wouldn't it easier for you to switch over to a weaveworks repo?

Hi Harmen; we've already switched over to the weaveworks repo.  I was sending you these just in case you wanted them for anything.
I did a bunch of changes to the PR with feedback from peter so you may want to pull in those changes?


[1644] Refactor course recruitment_year to recruitment_cycle_year

Context
So we can add a belongs_to recruitment_cycle_year to Course later.
Changes proposed in this pull request

Refactor Course#recruitment_year to Course#recruitment_cycle_year

Checklist

[x] Make sure all information from the Trello card is in here
[x] Attach to Trello card
[x] Rebased master
[x] Cleaned commit history
[x] Tested by running locally

 [S] Rename 'recruitment_cycle' to 'recruitment_cycle_year' in Course


fix: add TenTraicion

resolves #1310
Checklist for profile addition

[x] Name the PR fix: add <your-username>.
[x] You've added file named TenTraicion.json in the profiles directory.
[x] You've linked the PR to the correct issue.

Other additions/changes

[ ] Changes made in this PR are mentioned below
[x] Search previous suggestions before making a new one, as yours may be a duplicate.
[x] I acknowledge that all my contributions will be made under the project's license.
[x] I've read the contributing guidelines

This PR adds/fixes

Notes

@Panquesito7 changed as your preference.


fix(MockBuilder): respects global rules as they would be chain calls #6402

closes #6402

v14.12.0 has been released and contains a fix for the issue. Feel free to reopen the issue or to submit a new one if you meet any problems.


Added Xalapa University

Add Xalapa University (Mexico)

@CarlosAguilarJaramillo First stage of verification passed, official domain is ux.edu.mx as far as I verified. This is just an informational note. Pull request is still in the review. I appreciate your patience while waiting for the final decision.

@CarlosAguilarJaramillo Thank you for your patience while waiting for a review and processing your request. Pull request merged.

@philipto I really appreciate your help and attention, thank you very much


OS Disk name for vm create is not stable -> command is not idempotent

From the vm_create function:
...
os_disk_name = os_disk_name or 'osdisk_{}'.format(random_string(10))
....

This means that if I invoke the command twice with the same parameters (with os disk name omitted), I will (with a very high probability :)) end up with two disks, one of which is orphaned. This goes against the goal of having idempotent commands.

Actually it just errors out saying you can't change OSDisk name.


add test for Min and Max

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.1%) to 15.295%

Totals

Change from base Build<PHONE_NUMBER>:
0.1%

Covered Lines:
420

Relevant Lines:
2746

💛  - Coveralls


blotMaze-Sophia

This is my Blot project, blotMaze! I used Blot to make a maze with the goal to get to the crown. This was my first time using javascript for art so I was super lost at first. But, with time I finally got the hang of it, so although it may not be the most detailed thing ever, I am super proud that I challenged myself to learn something new.

Do you think you could challenge yourself to generate a new maze on each run?

I'm going to close this for housekeeping. Feel free to resubmit when you are ready.


Smart Plug not exploiting

Hello guys. I'm trying to flash a smart plug that is sold here in Brazil.
The brand is not listed on "By manufacturer/device name" option. It's called "NovaDigital".
I've tryed several firmwares under "By firmware version and name" option, and none of them worked.
The "Smart Life" app shows me the following information.
Main Module: V1.1.15
Other type: V1.0.7
The version 1.1.15 is not listed on under "By firmware version and name".
The only thing that i know about the "inside" of the device it that is has a CB2S module.
Here is the log output for one of the firmwares that i've tryed.
Building cloudcutter docker image
[+] Building 1.1s (13/13) FINISHED                                                                                docker:default
 => [internal] load build definition from Dockerfile                                                                                0.0s
 => => transferring dockerfile: 460B                                                                                0.0s
 => [internal] load .dockerignore                                                                                0.0s
 => => transferring context: 2B                                                                                0.0s
 => [internal] load metadata for docker.io/library/python:3.9.12-slim-buster                                                                                1.1s
 => [base 1/2] FROM docker.io/library/python:3.9.12-slim-buster@sha256:830e161433edfe047a23ebc99c12ee0eb1dc0a50e6b5f1c98e869ac271786632                                                                       0.0s
 => [internal] load build context                                                                                0.0s
 => => transferring context: 3.02kB                                                                                0.0s
 => CACHED [base 2/2] RUN apt-get -qq update && apt-get install -qy --no-install-recommends git hostapd rfkill dnsmasq build-essential libssl-dev iproute2 mosquitto                                          0.0s
 => CACHED [python-deps 1/4] RUN pip install --upgrade pipenv                                                                                0.0s
 => CACHED [python-deps 2/4] COPY src/Pipfile /src/                                                                                0.0s
 => CACHED [python-deps 3/4] COPY src/Pipfile.lock /src/                                                                                0.0s
 => CACHED [python-deps 4/4] RUN cd /src && PIPENV_VENV_IN_PROJECT=1 pipenv install --deploy                                                                                0.0s
 => CACHED [cloudcutter 1/2] COPY src /src                                                                                0.0s
 => CACHED [cloudcutter 2/2] WORKDIR /src                                                                                0.0s
 => exporting to image                                                                                0.0s
 => => exporting layers                                                                                0.0s
 => => writing image sha256:efc1cdc7ceb0be2d463d774ffcab1b67cdeff4ce6b9904c68029319650b44f38                                                                                0.0s
 => => naming to docker.io/library/cloudcutter                                                                                0.0s
Successfully built docker image
1) Detach from the cloud and run Tuya firmware locally
2) Flash 3rd Party Firmware
[?] Select your desired operation [1/2]: 2
Loading options, please wait...
[?] How do you want to choose the device?: By firmware version and name
   By manufacturer/device name
 > By firmware version and name
   From device-profiles (i.e. custom profile)

[?] Select the firmware version and name: 1.1.4 - BK7231N / oem_bk7231n_plug
   1.1.2 - BK7231T / oem_bk7231s_ty_ffc_db_ldv
   1.1.2 - BK7231T / oem_bk7231t_light3_laser_nanxin
   1.1.3 - BK7231N / bk7231n-unknown
   1.1.3 - BK7231T / oem_bk7231s_double_switch_rmd
   1.1.3 - BK7231T / oem_bk7231s_irbox_mol_ty
   1.1.3 - BK7231T / oem_bk7231s_switch_curtain_rj
 > 1.1.4 - BK7231N / oem_bk7231n_plug
   1.1.4 - BK7231T / oem_bk7231s_dltj_2switch_alerc
   1.1.4 - BK7231T / oem_bk7231s_ty_ffc_db_ldv
   1.1.5 - BK7231N / oem_bk7231n_control_switch
   1.1.5 - BK7231N / oem_bk7231n_plug
   1.1.5 - BK7231N / oem_bk7231n_strip_ty
   1.1.5 - BK7231T / oem_bk7231s_4_speed_controller

Performing safety checks to make sure all required ports are available
Checking UDP port 53... Occupied by systemd-resolve with PID 25131.
Port 53 is needed to resolve DNS queries
Do you wish to terminate systemd-resolve? [y/N] y
Attempting to stop systemd-resolved.service

Checking UDP port 67... Available.
Checking TCP port 80... Available.
Checking TCP port 443... Available.
Checking TCP port 1883... Available.
Checking TCP port 8886... Available.

Safety checks complete.

[?] Select your custom firmware file for BK7231N chip: OpenBK7231N_UG_1.17.275.bin
   ESPHome-Kickstart-v23.08.29_bk7231n_app.ota.ug.bin
   OpenBeken-v1.17.262_bk7231n.ug.bin
 > OpenBK7231N_UG_1.17.275.bin

^[[5~Selected Device Slug: qiachip-smart-switch-v1.1.4
Selected Profile: oem-bk7231n-plug-1.1.4-sdk-2.3.1-40.00
Selected Firmware: OpenBK7231N_UG_1.17.275.bin

================================================================================
Place your device in AP (slow blink) mode.  This can usually be accomplished by either:
Power cycling off/on - 3 times and wait for the device to fast-blink, then repeat 3 more times.  Some devices need 4 or 5 times on each side of the pause
Long press the power/reset button on the device until it starts fast-blinking, then releasing, and then holding the power/reset button again until the device starts slow-blinking.
See https://support.tuya.com/en/help/_detail/K9hut3w10nby8 for more information.
================================================================================

Scanning for open Tuya SmartLife AP
........
Found access point name: "SmartLife-1891", trying to connect...
Device 'wlp8s0' successfully activated with 'a0549aae-d34c-43f9-9c0b-c8e5c9eb1e8e'.
Connected to access point.
Waiting 1 sec to allow device to set itself up...
Running initial exploit toolchain...
Exploit run, saved device config too!
output=/work/configured-devices/IvFP3vf43gZN.deviceconfig
Saved device config in /work/configured-devices/IvFP3vf43gZN.deviceconfig

================================================================================
Power cycle and place your device in AP (slow blink) mode again.  This can usually be accomplished by either:
Power cycling off/on - 3 times and wait for the device to fast-blink, then repeat 3 more times.  Some devices need 4 or 5 times on each side of the pause
Long press the power/reset button on the device until it starts fast-blinking, then releasing, and then holding the power/reset button again until the device starts slow-blinking.
See https://support.tuya.com/en/help/_detail/K9hut3w10nby8 for more information.
================================================================================

Scanning for open Tuya SmartLife AP
.
Found access point name: "SmartLife-1891", trying to connect...
Device 'wlp8s0' successfully activated with 'a0549aae-d34c-43f9-9c0b-c8e5c9eb1e8e'.
Connected to access point.
================================================================================
[!] The profile you selected did not result in a successful exploit.
================================================================================

If there is no 1.1.5 profile, it will not work unless you are able to dump the firmware for the device.  You can't just choose random unmatched firmware and expect it to work.

Sorry @Cossid I think it was a typo. The Smart Life app shows me V1.1.15, not 1.1.5.

I mis-read that, 1.1.15 is on the known patched firmware list.  Serial flashing will be your only option.


chore: Add hiero-sdk-cpp and hiero-sdk-tck repos to org

Description:
Adds hiero-sdk-cpp repository and hiero-sdk-tck repository through clowarden. Also adds the hiero-sdk-tck-maintainers team.

I disagree with the suggested changes by Nathan. As described at https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization# the “maintain” role is limited in some functionalities that should be available for maintainers like delete issues. Fine with giving “GitHub-maintainers” the admin group but we should do the same for the repo maintainers for now

@hendrikebbers My suggested change was to give admin to the github-maintainers group. We should give the normal <repo>-maintainers the maintain role.

Agree with the first point but disagree with the second one. But I do not want to create a blocker. I will take the issue to the TSC for discussion and defining how we will do it. For now please just merge it @rbarkerSL and we can move forward.


Allow to easily enable bitmex logs

To see more logs for bitmex:
 RUST_LOG="daemon::bitmex_price_feed=trace"

bors r+


TVM build failing saying kDLVulkan defined twice

Hi @tqchen
We are trying to build TVM fresh within a docker container by doing the following:
git clone https://github.com/dmlc/tvm.git
followed by the commands within tvm:
git submodule update --init --recursive
git submodule update --recursive --remote
Then the build fails saying that the variable "kDLVulkan" has been defined twice.
I see some inconsistencies between an older version of DLPack and the recent ones.
The build was successful till very recently. Can you suggest what the fix might be? or help us fix it.
thanks a lot in advance,
pallab
root@09d777179a12:/workspace/tvm/build# cmake ../  -DUSE_CUDA:BOOL=ON  -DUSE_LLVM:BOOL=ON -DUSE_CUDA:BOOL=ON  -DUSE_GRAPH_RUNTIME:BOOL=ON  -DUSE_METAL:BOOL=OFF -DUSE_MSVC_MT:BOOL=OFF -DUSE_OPENCL:BOOL=OFF
-DUSE_RPC:BOOL=ON
-- Build with RPC support...
-- Build with Graph runtime support...
-- Build with CUDA support
-- Link with dynamic LLVM library
-- Build with LLVM 5.0.0
-- Set TVM_LLVM_VERSION=50
-- Configuring done
-- Generating done
-- Build files have been written to: /workspace/tvm/build
root@09d777179a12:/workspace/tvm/build# make
[  0%] Building CXX object CMakeFiles/tvm.dir/src/api/api_arith.cc.o
In file included from /workspace/np-compiler/tvm/include/tvm/runtime/packed_func.h:17:0,
from /workspace/np-compiler/tvm/include/tvm/runtime/registry.h:30,
from /workspace/np-compiler/tvm/include/tvm/base.h:15,
from /workspace/np-compiler/tvm/include/tvm/expr.h:14,
from /workspace/np-compiler/tvm/src/api/api_arith.cc:6:
/workspace/tvm/include/tvm/runtime/c_runtime_api.h:65:15: error: redeclaration of \u2018kDLVulkan\u2019
kDLVulkan = 7,
^
In file included from /workspace/tvm/include/tvm/runtime/c_runtime_api.h:50:0,
from /workspace/tvm/include/tvm/runtime/packed_func.h:17,
from /workspace/tvm/include/tvm/runtime/registry.h:30,
from /workspace/tvm/include/tvm/base.h:15,
from /workspace/tvm/include/tvm/expr.h:14,
from /workspace/tvm/src/api/api_arith.cc:6:
/workspace/tvm/dlpack/include/dlpack/dlpack.h:51:3: note: previous declaration \u2018DLDeviceType kDLVulkan\u2019
kDLVulkan = 7,
^
CMakeFiles/tvm.dir/build.make:62: recipe for target 'CMakeFiles/tvm.dir/src/api/api_arith.cc.o' failed
make[2]: *** [CMakeFiles/tvm.dir/src/api/api_arith.cc.o] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/tvm.dir/all' failed
make[1]: *** [CMakeFiles/tvm.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

Please use https://discuss.tvm.ai for installation questions, this was due to a recent update in dlpack(to contain kDLVulkan) and the master has not been updated to the latest dlpack version. Fix your dlpack version to be the same as the tvm repo should resolve the problem


Is that expected behavior that updates natural color drastically?

Describe the bug
On Material theme builder on the Web and Figma plugin, the natural color changes drastically when I modify its parameter. And I can't restore the default color palette.
To Reproduce
Steps to reproduce the behavior (see screen shot below):

Go to Material theme builder on the Web
Click on "Neutral"
Change the Hue value by 1 point.
Neutral color is drastically changed.

Expected behavior
I don't know if this is expected behavior or not. But users must expect to restore the default state, at least.
Screenshots
[Default color paletto]

[After Updated 294<PHONE_NUMBER>6699426 as precise) -> 293]

Desktop (please complete the following information):

OS: macOS (12.3.1)
Browser: Firefox / Chrome
Version: [Firefox] 104.0.2 (64-bit) / [Chrome] 105.0.5195.125 (Official Build) (arm64)

Smartphone (please complete the following information):

Device: NA
OS: NA
Browser NA
Version NA

Additional context
NA

I was stuck at this as well. on the web and in Figma plugin it wrests chroma/saturation unpredictably high for most colors probably mostly when the primary is saturated. Especially enigmatic is the sudden switch to bright cyan if chroma = 0.
On a related note, it tunes the hue of the some colors +/- but I expect it can be due to some special perceptive magic. Though it looks like the mid-contrast rules are broken here as well as in WCAG 2. So I am not sure if it is intentional.

I have the exact same problem. Chroma and Tone seem to jump to an unknown locked position whenever I try to edit them.


Annotation & Attributes & Reflection

Annotations in JS would definitely make it golden. Is there a perspective? are some of for the necessary reflection methods in scope of the spec-staging groups? .. or would you say those could be applicable by some some v8 extensions?
https://en.wikipedia.org/wiki/Java_annotation#Custom_annotations

Decorators (which are dynamic, but allow static analysis for some forms) are coming, but they're still draft proposals:
See:

https://github.com/wycats/javascript-decorators/blob/master/README.md
https://docs.google.com/document/d/1ikxIP5-RVYq6d_f8lAvf3pKC00W78ueyp-xIZ6q67uU/edit#heading=h.t9k9f05noi8w

For the time being, the Babel comment plugin is probably the best way of using this, but it's also not finished yet: https://github.com/origamitower/metamagical/tree/master/babel-plugin