text:
pow(double, double) does not return a double, but a num

By doc (https://api.dart.dev/stable/2.13.4/dart-math/pow.html), pow function should return double, not num.
The following code does not compile:
import 'dart:math';

void main() {
  double a = 2.2;
  double b = 3.3;

  double c = pow(a, b);
}

Platforms:
$> dart --version
Dart SDK version: 2.13.4 (stable) (Wed Jun 23 13:08:41 2021 +0200) on "windows_x64"
Also on DartPad.dev
Thanks.

It does return a double.
The static type of the function is num Function(num, num), which is why you can call it with both doubles and integers, and get both doubles and integers as results. Since a double is a num, the typing is correct, but you can no longer simply assing something with static type num to double.
Prior to null safety, you'd get a free implicit downcast from num to double here (and it would succeed). With null safety, you have to write var c = pow(a, b) as double; to make the downcast explicit.
We have a few special cases in the language specification to make operations on numbers statically have a better type, but those special cases are only on methods and operators of int and double, not the functions of dart:math.
So, all in all, working as intended.

Thank you very much, @lrhn .

authors: gemma-gaspa lrhn


text:
Quick assist for converting a switch statement in which each case just assigns to a variable

It'd be great to offer to convert this to a Dart 3.0 switch expression.
For example:
String f(Color color) {
  String result;
  switch (color) {
    case Color.blue:
      result = 'blue';
      break;
    case Color.red:
      throw 'Unsupported';
  }
  return result;
}

could be converted to:
String f(Color color) {
  String result;
  result = switch (color) {
    case Color.blue => 'blue',
    case Color.red => throw 'Unsupported'
  }
  return result;
}

CC @bwilkerson @pq @mit-mit @stereotype441

I think this is complete as part of https://github.com/dart-lang/sdk/issues/50417?

(And improved w/ https://github.com/dart-lang/sdk/issues/51826.)

When writing these multi-token assists, there is an opportunity to eat comments. 🙁 For example:
var name = '';
/* one */
switch (color) {
  /* two */ case /* three */ Color.blue /* four */: /* five */
    name /* six */ = /* seven */ 'blue' / *eight */; / * nine */
    break; /* ten */
}

It can be excruciating to try to account for all of those, and not lose them. Many of those will be exceedingly rare, but I think /* one */, /* two */, /* five */, /* nine */, and /* ten */ should be considered. Can either work to preserve them, or not offer the assist if they are detected. If there is a tracking issue or a PR, I can comment there.
For example, in our code search I see examples like:
case foo: // Comment here.
  result = 'foo';
case bar:
  // Comment here.
  result = 'bar'; // Comment here.

(here and here and here)

source: gharchive/issue

authors: pq srawlins

repo: dart-lang/sdk

license_type: permissive

license_source: github-api


text:
dart2js throws an error for List.$index with records

I haven't found an obvious minimal reproduction for this, unfortunately. If any dart2js folks can point me towards likely culprits that may help me narrow it down. But here's the reproduction:

Install Node.js
Install the Buf CLI

$ git clone git://github.com/sass/dart-sass -b dart3
$ cd dart-sass
$ dart pub get
$ dart run grinder protobuf pkg-npm-dev
$ echo '@use "sass:math"; @debug math.sqrt(10)' > test.scss
$ node build/npm/sass.js --trace test.scss
Error: NoSuchMethodError: method not found: '$index' (type$.List_Value._as(...).$index is not a function)
  ╷
1 │ @use "sass:math"; @debug math.sqrt(10)
  │                          ^^^^^^^^^^^^^
  ╵
  test.scss 1:26  root stylesheet

build/npm/sass.dart.js 50207:53  _sqrt_closure.call$1
build/npm/sass.dart.js 73151:35  _EvaluateVisitor__runBuiltInCallable_closure0.call$0
build/npm/sass.dart.js 71669:23  _EvaluateVisitor._addExceptionSpan$1$3$addStackFrame
build/npm/sass.dart.js 71683:19  _EvaluateVisitor._addExceptionSpan$1$2
build/npm/sass.dart.js 71094:24  _EvaluateVisitor._runBuiltInCallable$3
build/npm/sass.dart.js 71016:44  _EvaluateVisitor._runFunctionCallable$3
build/npm/sass.dart.js 73030:25  _EvaluateVisitor_visitFunctionExpression_closure0.call$0
build/npm/sass.dart.js 71709:23  _EvaluateVisitor._addErrorSpan$1$2
build/npm/sass.dart.js 70979:22  _EvaluateVisitor.visitFunctionExpression$1
build/npm/sass.dart.js 41372:62  FunctionExpression.accept$1$1

This is definitely a dart2js-specific issue. It doesn't reproduce with the VM. I thought the culprit might be changing the return type of _EvaluateVisitor._evaluateArguments() to return a record instead of an object, but changing it back didn't fix the issue so now I'm stumped. Nevertheless, it was definitely triggered by our migration to Dart 3 functionality.
Tested on Dart 3.0.6.

This appears to have the same root cause as https://github.com/dart-lang/sdk/issues/52968. The issue no longer reproduces with that fix landed. We have a cherry pick request open; I'll amend it to note that it fixes this issue as well.

Is there a way we can work around this in the short term?

My guess is that this only affects uses of tuples where one of the entries in the tuple is a closure. So I believe the workaround would be to reverting to use the Tuple class in BuiltInCallable here https://github.com/sass/dart-sass/compare/main...dart3#diff-9c29d49f44f4a56fa0b07d87dcdbb2db96ffcaf666960b4eca28e8f2085e4b07R18 and other places where the tuple takes a callback.

I see, thanks for the tip!

BTW, the cherry-pick for the fix was approved, so it will be in the next patch release of Dart 3 stable.

Yeah, I think using a user-defined Tuple class instead of a record when it contains a closure is the best fix.
I wouldn't recommend it, but one other workaround is mentioned in https://github.com/dart-lang/sdk/issues/52968. Basically, type inference doesn't "see" function calls when the function is reached through a record. However, if the function is also invoked directly*, the parameter types will be inferred. The tricky thing is that the inferred parameter types are only based on the direct calls, so those need to cover the same range of possibilities as the calls through the record.
* This can be on a code path that isn't actually reachable, although if it's too obviously unreachable, dart2js might optimize it away early.

authors: fishythefish nex3 sigmundch


text:
Bs-table column does not support sorting on Number and Date basis !!!

The bs-column component does not supports sorting on number and date basis.
Its supports sorting on String .
Is it possible to add any customize method/function for sorting on number /Date basis ???

Returning data as Comparable (rather than String) helps:
Comparable getData(dynamic row, String fieldName) {
var data = fieldName.split('.').fold(row, _getDataFn);
if(data is Comparable) {
return data;
}
return data.toString();
}

authors: jheyne sandeepkumarsahoo

license: mit

license_source: bigquery


text:
Setting default location?

Hey,
Looking at the code for setting default location for the map.
var west = 122.0;
var south = 33.0;
var east = 130.0;
var north = 47.0;

var rectangle = Cesium.Rectangle.fromDegrees(west, south, east, north);

Cesium.Camera.DEFAULT_VIEW_FACTOR = 0;
Cesium.Camera.DEFAULT_VIEW_RECTANGLE = rectangle;

// NOTE: Viewer constructed after default view is set.
var viewer = new Cesium.Viewer('cesiumContainer');

Is it possible to achieve this in the current version of Resium? I cannot find references to either of these attributes. Thank you for your help!
Source: https://gis.stackexchange.com/questions/144361/how-to-set-the-coordinates-at-which-cesium-viewer-is-centered

You can achieve this using Camera and CameraFlyTo with a duration of 0 like this, where destination can be a variety of Cesium options including a Rectangle I believe.
<Camera defaultZoomAmount={0} />
<CameraFlyTo duration={0} destination={destination} />

A Cartesian3 object such as this certainly works nicely here.
Cartesian3.fromDegrees(11, 26, 40200000)

I'll give it a try, thank you @spotnape!

authors: mrlubos spotnape

repo: darwin-education/resium

license: MIT


text:
V2 Resource creation optional creation date

Why is the client allowed to submit a custom creation date when creation a resource? Wouldn't it be better if the system controlled this?
A user could create a non-original annotation that "predates" and original contribution.
Likewise: should the actual creator of a resource not automatically be the owner (unless ownership is transferred)?

I guess this could have something to do with the migration of data in Knora from an external database. I think we used it (and maybe even ask for it) for Lumières.Lausanne. Right, @gfoo ?
In this case, you might not want the history of the data creation to be erased as data is transfered to Knora.

A user could create a non-original annotation that "predates" and original contribution.

But would this annotation be displayed by the GUI? Because the actual users of the old database would want this information to be displayed. They are not interested in seing the date of the data transfer in Knora.

This was done in #1151 in response to @gfoo‘s requests in #1088 and #1089.

I think we used it (and maybe even ask for it) for Lumières.Lausanne. Right, @gfoo ?

yep

Ok, thanks for the explanation.

authors: benjamingeer gfoo mrivoal tobiasschweizer

repo: dasch-swiss/knora-api


text:
Resource Testding doesn't return a TextValueAsHtml

Can we update this resource to return a TextValueAsHtml?

Yes, will do.

@tobiasschweizer If I understand correctly, the XSL transformation to HTML has to be specified in the TextValue. If I do that, the text value will always be returned as HTML, and it will no longer be possible to return it as XML. Is that correct? If so, I can't do that, because it would break existing tests.

Or maybe I misunderstood. Is this a request to add an additional text value with an XSL transformation to Testding? Or is it a request to add a textValueAsHTML property to the existing text value?

As of right now, the ReadResource object doesn't return a TextValueAsHtml property which I would like to have if possible :)

@mdelez This isn't simple to do, because it can't be done at run time. To be able to serve a text value as HTML, you need to upload an XSL stylesheet to Sipi to do an XML-to-HTML transformation, and change the text value that is stored in the triplestore so that it refers to this stylesheet. It's not clear to me whether this is possible with our existing testing infrastructure.
@tobiasschweizer We have Knora-and-Sipi integration tests that create XSL transformations, but otherwise we don't have one in the test data at all. From the documentation, I'm having trouble seeing how to add an XSL transformation to the static anything test data.

We have Knora-and-Sipi integration tests that create XSL transformations, but otherwise we don't have one in the test data at all. From the documentation, I'm having trouble seeing how to add an XSL transformation to the static anything test data.

Tricky indeed. Could you manufacture a static case class that is turned into JSON-LD as you did for the static UUID test data?

Could you manufacture a static case class that is turned into JSON-LD as you did for the static UUID test data?

I could, but wouldn't it be better to use real Knora output? Otherwise the static case class could get out of sync with reality.

Otherwise the static case class could get out of sync with reality.

But if you generate the JSON-LD from a case class instance and it gets out of sync, then there would be a compile error, right?

But if you generate the JSON-LD from a case class instance and it gets out of sync, then there would be a compile error, right?

OK, now I see what you mean. I could make a hard-coded ReadResourceV2, containing a hard-coded TextValueContentV2, containing a hard-coded MappingXMLtoStandoff...
Do we have an existing XML-to-HTML mapping, or would I have to write one from scratch?

containing a hard-coded TextValueContentV2, containing a hard-coded MappingXMLtoStandoff...

Actually we do not care about the mapping. I think you can just invent some HTML, that's fine.

I think you can just invent some HTML, that's fine.

I can't do that if I have a hard-coded TextValueContentV2 instance, because the HTML is generated in TextValueContentV2.toJsonLDValue().
I could just use a hard-coded JSON-LD response (containing hard-coded HTML) in the test data, but then there would be no way to ensure that it stays consistent with Knora's real responses.

I think you can just invent some HTML, that's fine.

I can't do that if I have a hard-coded TextValueContentV2 instance, because the HTML is generated in TextValueContentV2.toJsonLDValue().
I could just use a hard-coded JSON-LD response (containing hard-coded HTML) in the test data, but then there would be no way to ensure that it stays consistent with Knora's real responses.

I understand. So then could you make a very simple mapping and XSLT to generate some HTML?

So then could you make a very simple mapping and XSLT to generate some HTML?

Yes, that's why I'm asking... do we have one? Was there ever a test for this?

I think I made something for this TEI route that involves some XSLT.
There is surely some tests involving letters standoff to XML, but I am not sure if there is any XSLT.

There is surely some tests involving letters standoff to XML, but I am not sure if there is any XSLT.

That's in the Knora-Sipi integration tests. In _test_data/test_route/texts/beol there's standoffToTEI.xsl and header.xsl. The integration tests first load those files into Sipi, and then use them in the tests. Hence my original question: how can my client test data route do anything with an XSL tranformation? Does it have to first load the XSL file into Sipi? Or is there a way to include the XSLT in the static data for the anything project, so it's already there when the client test data route is called?

how can my client test data route do anything with an XSL tranformation? Does it have to first load the XSL file into Sipi? Or is there a way to include the XSLT in the static data for the anything project, so it's already there when the client test data route is called?

Normally, XSLT is a file that is managed by Sipi and requested and cached by Knora (very cumbersome to test for).
But in this case I think you could just provide some static data to TextValueContentV2: https://github.com/dasch-swiss/knora-api/blob/c41bce78750f2a565b5d994763327c78bb8c5125/webapi/src/main/scala/org/knora/webapi/messages/v2/responder/valuemessages/ValueMessagesV2.scala#L1286

OK, I'll try it!

OK, I'll try it!

Good luck!

Since the standard mapping already returns HTML tags (<p>, etc.), would it be possible to use an XSL transformation that does nothing, and just returns the XML as-is?

yes, I think you can apply an identity transformation: https://en.wikipedia.org/wiki/Identity_transform#Using_XSLT
It just copies what you have.

@tobiasschweizer

But in this case I think you could just provide some static data to TextValueContentV2

I've just realised that I can't do this, because the test data generation just does an HTTP GET to a Knora route. It doesn't have access to the TextValueContentV2.
I think it might be necessary to redesign this feature so that it's possible to test it.

@tobiasschweizer

But in this case I think you could just provide some static data to TextValueContentV2

I've just realised that I can't do this, because the test data generation just does an HTTP GET to a Knora route. It doesn't have access to the TextValueContentV2.
I think it might be necessary to redesign this feature so that it's possible to test it.

I can finish https://github.com/dasch-swiss/knora-ui-ng-lib/pull/55 with some static test data and will just replace it once it's possible. So this is not a big problem for me.

So this is not a big problem for me.

I think it’s a problem to have a feature that isn’t tested and can’t be tested.

So this is not a big problem for me.

I think it’s a problem to have a feature that isn’t tested and can’t be tested.

It's a problem that there isn't JSON test data in the knora-api-js-lib so we can check for the correct deserialization, yes. But we can simulate it in the test data for knora-ui.

What I mean is that Knora has a feature which we can’t test as part of Knora’s own tests. That doesn’t seem good to me.

What I mean is that Knora has a feature which we can’t test as part of Knora’s own tests. That doesn’t seem good to me.

No, it certainly isn't. We should refactor it. I can help.

authors: benjamingeer mdelez tobiasschweizer


text:
Move images in ./assets folder to issues

This can reduce the repo size significantly!

Oh yeah, thanks for the hint! I'll use this issue for the images


text:
Fix errors in DBG when compile with ENABLE_DASH_DEBUG defined.

.

Thanks! That makes me wonder - does anyone use DBG at all? 🤔

source: gharchive/pull-request

repo: dashpay/dash


text:
fix: backport bitcoin#26909, allow for silent overwriting of inconsistent peers.dat

Additional Information
bitcoin#22762 (backported as part of dash#6043) did away with then-existing behaviour of overwriting peers.dat silently if found corrupt with the rationale of preventing situations where the wrong file is pointed at or the file is written by a higher version of Core. Alongside a change in behaviour, refactoring also took place and further changes were built on top of them.
Since then, there have been reports of an increasing number of "Corrupt data. Consistency check failed with code -5: iostream error" errors from builds based on develop. Reverting the pull request that introduced this change in behaviour is non-trivial due to the number of backports that build on top of the refactoring brought along with it.
Nor were any other error messages found except for the one mentioned above. The tendency for peers.dat to corrupt itself has also been documented upstream (bitcoin#26599), with the issue marked as closed with the merger of bitcoin#26909.
Therefore, to remedy the above problem, alongside backporting bitcoin#26909 and to avoid inconvenience, instead of reverting all progress made from backporting (as the benefits of not overwriting peers.dat for having the wrong magic altogether, for example, is something that doesn't need to be reverted), only inconsistent peers.dat files will be overwritten and the action logged with no user intervention required.
Breaking Changes
None expected.
Checklist:

[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have added or updated relevant unit/integration/functional/e2e tests
[x] I have made corresponding changes to the documentation (note: N/A)
[x] I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

Special thanks to @knst, @PastaPastaPasta and @thephez for reporting on this issue!


text:
Enable case  when syntax

Ex: case a when 0 then NULL which is equivalent to case when a=0 then NULL

cc: @jdye64

FYI - Made PR to mimic this behavior in Arrow DataFusion Python https://github.com/apache/arrow-datafusion-python/pull/388

authors: ChrisJar ayushdg jdye64

repo: dask-contrib/dask-sql


text:
Fix lstsq docstring

linalg.lstsq currently reads:
Parameters
----------
a : (M, N) array_like
    "Coefficient" matrix.
b : (M,) array_like
    Ordinate or "dependent variable" values.

Returns
-------
x : (N,) Array
    Least-squares solution. If `b` is two-dimensional,
    the solutions are in the `K` columns of `x`.
residuals : (1,) Array
    Sums of residuals; squared Euclidean 2-norm for each column in
    ``b - a*x``.
rank : Array
    Rank of matrix `a`.
s : (min(M, N),) Array
    Singular values of `a`.

however, this should be:
Parameters
----------
a : (M, N) array_like
    "Coefficient" matrix.
b : (M, K) array_like
    Ordinate or "dependent variable" values.

eturns
-------
x : (N, K) Array
    Least-squares solution. If `b` is two-dimensional,
    the solutions are in the `K` columns of `x`.
residuals : (1,) Array
    Sums of residuals; squared Euclidean 2-norm for each column in
    ``b - a*x``.
rank : Array
    Rank of matrix `a`.
s : (min(M, N),) Array
    Singular values of `a`.

Example:
import dask.array as da
x1 = da.random.random(size=(200, 100))
x2 = da.random.random(size=(200, 10))
da.linalg.lstsq(x1, x2)
(dask.array<solve-triangular, shape=(100, 10), dtype=float64, chunksize=(100, 10), chunktype=numpy.ndarray>,
 dask.array<sum-aggregate, shape=(1, 1), dtype=float64, chunksize=(1, 1), chunktype=numpy.ndarray>,
 dask.array<lstsq-rank, shape=(), dtype=int64, chunksize=(), chunktype=numpy.ndarray>,
 dask.array<lstsq-singular, shape=(100,), dtype=float64, chunksize=(100,), chunktype=numpy.ndarray>)

Would you be interested in fixing this?
On Thu, Nov 19, 2020 at 5:26 AM Eric Czech notifications@github.com wrote:

linalg.lstsq currently reads:
Parameters
a : (M, N) array_like
"Coefficient" matrix.
b : (M,) array_like
Ordinate or "dependent variable" values.
Returns
x : (N,) Array
Least-squares solution. If b is two-dimensional,
the solutions are in the K columns of x.
residuals : (1,) Array
Sums of residuals; squared Euclidean 2-norm for each column in
b - a*x.
rank : Array
Rank of matrix a.
s : (min(M, N),) Array
Singular values of a.
however, this should be:
Parameters
a : (M, N) array_like
"Coefficient" matrix.
b : (M, K) array_like
Ordinate or "dependent variable" values.
eturns
x : (N, K) Array
Least-squares solution. If b is two-dimensional,
the solutions are in the K columns of x.
residuals : (1,) Array
Sums of residuals; squared Euclidean 2-norm for each column in
b - a*x.
rank : Array
Rank of matrix a.
s : (min(M, N),) Array
Singular values of a.
Example:
import dask.array as dax1 = da.random.random(size=(200, 100))x2 = da.random.random(size=(200, 10))da.linalg.lstsq(x1, x2)
(dask.array<solve-triangular, shape=(100, 10), dtype=float64, chunksize=(100, 10), chunktype=numpy.ndarray>,
dask.array<sum-aggregate, shape=(1, 1), dtype=float64, chunksize=(1, 1), chunktype=numpy.ndarray>,
dask.array<lstsq-rank, shape=(), dtype=int64, chunksize=(), chunktype=numpy.ndarray>,
dask.array<lstsq-singular, shape=(100,), dtype=float64, chunksize=(100,), chunktype=numpy.ndarray>)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/dask/dask/issues/6858, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AACKZTHCLNS525L2LYKKHMTSQUMJBANCNFSM4T3MXZ4Q
.

It seems these docs currently match the "this should be" on the initial comment. See https://github.com/dask/dask/blob/1c4a84225d1bd26e58d716d2844190cc23ebcfec/dask/array/linalg.py#L1368-L1404 .
@eric-czech can you confirm this is the docstring you wanted to see?

Yep, looks good!

authors: eric-czech mrocklin ncclementi

repo: dask/dask


text:
Skip rechunk when rechunking to the same chunks with unknown sizes

This PR coerces NaNs to np.nan in normalize_chunks to eliminate unnecessary rechunks when using unknown dimensions.

[x] Closes #10026
[x] Tests added / passed
[x] Passes pre-commit run --all-files

This PR coerces NaNs to np.nan in normalize_chunks to eliminate unnecessary rechunks when using unknown dimensions.

I'm not very familiar with this but where/how do avoid this? I don't see any tests change other than the float -> numpy.dtype thing.
Can't this be tested by checking for ntasks of a rechunked array or smth like this. I suspect this would remove a stage / the need for rechunking entirely for some cases?

I'm not very familiar with this but where/how do avoid this? I don't see any tests change other than the float -> numpy.dtype thing.
Can't this be tested by checking for ntasks of a rechunked array or smth like this. I suspect this would remove a stage / the need for rechunking entirely for some cases?

https://github.com/dask/dask/pull/10027/files#diff-66fac17e8fc2a30ed0079d608cf9513f794c3936d700b76d3eb996d7c3b9154dR285-R301 test this. We return the input array without adding any new tasks.

authors: fjetter hendrikmakait


text:
Update deploying-python.rst

Since memory_limit is not part of the member args, I took a look at the sphinx documentation and found that :undoc-members: generates a doc for members not having docstrings (which I believe there is no docstring for memory_limit). Please let me know if I'm on the right track - the changes don't reflect when running make html however. I'm still fairly new to sphinx as well as dask but eager to work on this issue!

[ ] Closes #xxxx
[ ] Tests added / passed
[ ] Passes pre-commit run --all-files

Can one of the admins verify this patch?
Admins can comment ok to test to allow this one PR to run or add to allowlist to allow all future PRs from the same author to run.

Addresses issue #8224

Thanks for the PR @crislanarafael. I wasn't aware of undoc-members, so thanks for pointing that out. Instead of the current set of changes, I think we should add a new entry to the LocalCluster docstring for memory_limit as mentioned here #8224 (comment)

Thanks for pointing me in that direction. I will close this PR since this change won't be necessary to solve the issue.

authors: GPUtester crislanarafael


text:
Deleting environment linked team doesn't consider draft share request on that team

Describe the bug
I found out that I was able to delete a linked team on an environment which has draft share request on it. Due to this, whenever I go to the share view and filter for "Draft" share requests, I get a blank page. When I take a look at the console, the error says that the SamlAdminGroup name for a share request was not found while doing the getRequestsToMe graphql request.
How to Reproduce

Create an environment / link an environment to an org in data.all
Link another team
Create draft share request
Delete the team
Go to shares view and then filter on "Draft"

Expected behavior
Should not be able to delete the team without clearing off the shares attached to it
Your project
No response
Screenshots
No response
OS
Mac
Python version
3.9
AWS data.all version
2.6
Additional context
No response

Thank you for filing this issue @TejasRGitHub - looks like this is a bug on how we are currently counting existing shares before removing an associated env group or consumption role
I was also able to replicate the above and can see the root cause coming from count_S3_principal_shares and/or count_S3_role_principal_shares where if there are no share items we will get a count of 0 even if the share object exists
I believe a quick fix here would be to filter by S3 Dataset Type on the Share Object rather than trying to filter on the itemTypes (which may not exist on the share object itself)
I will do some evaluation and see how soon we can prioritize a fix for this bug

authors: TejasRGitHub noah-paige

repo: data-dot-all/dataall


text:
Gql schema cleanup sdkcli

Feature or Bugfix

Enhancement / Bugfix

Detail

GraphQL Class Improvements

Allow Descriptions to be passed to Arguments of GQL Field
Handle Field Args for Fields Args of Type Non Null, Array, and Thunk

After doing so had to make a bunch of changes on Frontend + Test GQL query strings to ensure we are specifying non null type if required on the backend

GQL Return Type Improvements

(For Glossary) Remove assetLink nested field for types Glossary, Category, & Term -> Not Used

(For Glossary) Remove name nested field for types Glossary, Category, & Term -> name does not exist in RDS (only label since not inheriting Resource)

(For Glossary) Remove status nested field for type Glossary -> Avoid running into errors when returning entire Glossary tree (i.e. Categories and Terms)

Error Message Found - "graphql.error.graphql_error.GraphQLError: Fields 'status' conflict because they return conflicting types 'String' and 'String!'"
Also status does not make sense for high level glossary - only for associated Glossary Terms associated/linked with particular data objects

(For Dataset) Remove isPublishedInEnvironment and projectPermissions fields from Dataset Type

Not used by frontend

Relates
N/A
Security
Please answer the questions below briefly where applicable, or write N/A. Based on
OWASP 10.

Does this PR introduce or modify any input fields or queries - this includes
fetching data from storage outside the application (e.g. a database, an S3 bucket)?

Is the input sanitized?
What precautions are you taking before deserializing the data you consume?
Is injection prevented by parametrizing queries?
Have you ensured no eval or similar functions are used?

Does this PR introduce any functionality or component that requires authorization?

How have you ensured it respects the existing AuthN/AuthZ mechanisms?
Are you logging failed auth attempts?

Are you using or adding any cryptographic features?

Do you use a standard proven implementations?
Are the used keys controlled by the customer? Where are they stored?

Are you introducing any new policies/roles/users?

Have you used the least-privilege principle? How?

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

lgtm but I just have a few questions!
* How did you figure out that we had unused fields? Did you automate it?

* Is there any chance that any user is using them in their automation?

I found the issues doing some manual tests building out GQL query strings with all possible return fields specified and seeing discrepancies / errors in some cases
For the unused fields isPublishedInEnvironment and projectPermissions for dataset these columns were used for an older iteration of dataset model but there is no concept of published to env or projects in current data.all + they values are set as query_expression() but never resovled with some with_expression SQL statement on backend
For assetLink for GlossaryNode - there are other queries to directly list term associations/links to glossary nodes so highly unlikely this assetLink nested field is used when getting glossaries


text:
Is there a way to set strings?

 const saoFolder = gui.addFolder('SAO');         saoFolder.add(saoParams, 'enabled');         saoFolder.add(saoParams, 'bias', -2, 2);         saoFolder.add(saoParams, 'intensity', 0, 1.0);
Fields that are created are named after property. Can i set them to a custom string?
I want to have string variable for different languages. I also need english string to be capitalized, Enabled, Bias, Intensity... without changing property names.

I think controller.name might be what you're looking for.
const saoFolder = gui.addFolder('SAO');
saoFolder.add(saoParams, 'enabled').name('Enabled');
saoFolder.add(saoParams, 'bias', -2, 2).name('Bias');
saoFolder.add(saoParams, 'intensity', 0, 1.0).name('Intensity');

:arrow_up:  Does not work, name stays at property

Hmm, perhaps I'm misunderstanding the question, but appears to work for me on the latest dat.gui (0.7.9). Here's a JSFiddle example where I've renamed the gui params to Foo, Bar, Baz.
https://jsfiddle.net/Bates550/v9wL7of2/4/

authors: Bates550 autonomobil donadog


text:
duplicated columns when data count greater than 10000

Version
databend_py: 0.4.2
databend_query: 1.1.45-nightly
Detail
import databend_py
conn = databend_py.Client(host='127.0.0.1',port=8000)
columns, data =  conn.execute('SELECT * FROM numbers(10001)',with_column_types=True)
print(columns)

columns:
[('number', 'UInt64'), ('number', 'UInt64')]
instead of
[('number', 'UInt64')]
When the amount of data exceeds 10000, the data will be returned by paging. function store will append columns multi times
https://github.com/databendcloud/databend-py/blob/6ebf8f11727834eb350cc52f805d815a457a508f/databend_py/result.py#LL44C10-L44C10

Thanks for your report! Have fixed in https://github.com/databendcloud/databend-py/pull/32

thanks~

repo: databendcloud/databend-py


text:
feat: [DCS-247] add count_all_space and percent_all_space functions

Fixes/Implements
Description
Validity function for count all space and percent all space
Type of change
Delete irrelevant options.

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

How Has This Been Tested?

[x] Locally Tested
[ ] Needs Testing From Production

fix: module error

repo: datachecks/dcs-core


text:
Correction for raw affiliation Department of History University of Calgary

Correction needed for raw affiliation Department of History University of Calgary
raw_affiliation_name: Department of History University of Calgary
new_rors: 03yjb2x39
previous_rors:
works_examples: W1782498001;W2120244122;W1898726309;W1875415054;W4388547968;W2141591122
contact: f31723158a173c4b0c8cdc6e39117263:3148d7b5 @ ourresearch.org

This issue was accepted and ingested by the OpenAlex team on 2024-10-09. The new affiliations should be visible within the next 7 days.

repo: dataesr/openalex-affiliations


text:
Add greek translations for Measurement provider

Some more translations, for Measurement provider this time.
Could you please annotate this PR with hacktoberfest-accepted label?

Could you add tests?
Hi @kingthorin!
Do you have something specific in mind? MeasurementTest and FakerIntegrationTest seem relevant but I could not find something that needs updating. Do I miss something?

Hi @gvrettos , thank you for your contribution. Feel free to send them, but we won't be applying hacktoberfest labels to your PRs anymore. Thank you.
Hi @bodiam! I am sorry if that got too frustrating for you. ☹
Could you please let me know what is the reason for not applying the hacktoberfest label? I would like to know if I have done something wrong here.

How about something like this?
diff --git a/src/test/java/net/datafaker/providers/base/BaseFakerTest.java b/src/test/java/net/datafaker/providers/base/BaseFakerTest.java
index 4f4a16d8..c3d438ba 100644
--- a/src/test/java/net/datafaker/providers/base/BaseFakerTest.java
+++ b/src/test/java/net/datafaker/providers/base/BaseFakerTest.java
@@ -22,7 +22,7 @@
 public class BaseFakerTest<T extends BaseFaker> {

     private static final Logger LOG = Logger.getLogger(BaseFakerTest.class.getCanonicalName());
-    protected final T faker = getFaker();
+    protected T faker = getFaker();

     @BeforeEach
     @SuppressWarnings("EmptyTryBlock")
@@ -38,6 +38,11 @@ protected T getFaker() {
         return (T) new BaseFaker();
     }

+    @SuppressWarnings("unchecked")
+    protected void setFaker(T faker) {
+        this.faker = (T) faker;
+    }
+
     protected List<String> getBaseList(String key) {
         return faker.fakeValuesService().fetchObject(key, faker.getContext());
     }
diff --git a/src/test/java/net/datafaker/providers/base/MeasurementTest.java b/src/test/java/net/datafaker/providers/base/MeasurementTest.java
index 6c759c66..e88239d0 100644
--- a/src/test/java/net/datafaker/providers/base/MeasurementTest.java
+++ b/src/test/java/net/datafaker/providers/base/MeasurementTest.java
@@ -1,6 +1,12 @@
 package net.datafaker.providers.base;

 import java.util.List;
+import java.util.Locale;
+
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Nested;
+
 import java.util.Collection;

 class MeasurementTest extends BaseFakerTest<BaseFaker> {
@@ -19,4 +25,32 @@ protected Collection<TestSpec> providerListTest() {
             TestSpec.of(measurement::metricVolume, "measurement.metric_volume"),
             TestSpec.of(measurement::metricWeight, "measurement.metric_weight"));
     }
+
+    @Nested
+    class GreekMeasurementTest extends BaseFakerTest<BaseFaker> {
+
+        @BeforeAll
+        void setup() {
+            this.setFaker(new BaseFaker(new Locale("el", "GR")));
+        }
+
+        @AfterAll
+        void reset() {
+            this.setFaker(this.getFaker());
+        }
+
+        @Override
+        protected Collection<TestSpec> providerListTest() {
+
+            Measurement measurement = faker.measurement();
+            return List.of(TestSpec.of(measurement::height, "measurement.height"),
+                TestSpec.of(measurement::length, "measurement.length"),
+                TestSpec.of(measurement::volume, "measurement.volume"),
+                TestSpec.of(measurement::weight, "measurement.weight"),
+                TestSpec.of(measurement::metricLength, "measurement.metric_length"),
+                TestSpec.of(measurement::metricHeight, "measurement.metric_height"),
+                TestSpec.of(measurement::metricVolume, "measurement.metric_volume"),
+                TestSpec.of(measurement::metricWeight, "measurement.metric_weight"));
+        }
+    }
 }

Maybe also go back and add tests for your other addition too "wink:

@kingthorin thank you very much for the boost with the tests. :+1:
I also went back to any providers I had added support for Greek in the past and I added the respective tests there, too.

authors: gvrettos kingthorin

repo: datafaker-net/datafaker


text:
Form viewer: color does not match color in the table if table was sorted

DG 1.5.1
Steps to reproduce:

Open a table FormColors.csv
Apply linear coloring to columns 'col2' and 'col4'
Sort table by col2
Add 'Form' viewer
Click through the rows and check data displayed in the Form viewer

Expected results: color in the Form viewer should be the same as color in the table.
Actual results: colors in the table and Form viewer do not match for some of the rows:

fixed in v1.6

authors: dionissqq katerina-stepanova

repo: datagrok-ai/public


text:
Is it possible to modify schemetadata and properties in Dataset?

I have found out how to modify editableSchemadata and editableProperties for Dataset via graphql. However, they don't provide the aspect of "value" and can be hardly useful. Therefore, I wish to know if it is possible to modify schemetadata and properties in Dataset.

Hi @Cascol-SCUT! This isn't currently supported but it's a great suggestion. Would you mind opening a feature request so we can gauge community interest & level of impact? I'll close this issue out in the meantime!

authors: Cascol-SCUT maggiehays

repo: datahub-project/datahub


text:
feat(observability): add actor urn to GraphQL spans

Checklist

[ ] The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
[ ] Links to related issues (if applicable)
[ ] Tests for the changes have been added/updated (if applicable)
[ ] Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
[ ] For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

Thanks!

authors: david-leifker ngamanda


text:
Decide on an official register for plugins

The current version of the documentation still has a page on registering plugins. We had some internal discussions on whether we want to keep this and - if so - if this is the best way of doing so. Due to practically unlimited flexibility of the plugin system, there are some challenges. Creating this issue to track that discussion and to make sure we make a decision before the release.
ping @maclandrol

@maclandrol This can be closed now, right?

Yes, I think it's covered.  I added issue template. Would be nice to have a PR template for plugin, but I am fine with the current workflow.

authors: cwognum maclandrol

repo: datamol-io/molfeat


text:
Cache Google Trends data in docs

Thank you so much for contributing to Datapane, please help us by filing out this PR template and ensure you have read the CONTRIBUTING.md.
It may take a few days to review your PR and merge it - please bear with us!
Thanks!
Prerequsites

[x] Has been tested locally
[ ] If a bugfix, have included a breaking test if possible

Proposed Changes
Addressing comment from our Discord https://discord.com/channels/983736148746715158/999322544895180901/1003977799662571600:

Pytrends hits Google, which is doing bot detection.
We're likely to see more 429s: https://github.com/datapane/datapane/runs/7629659533?check_suite_focus=true#step:11:130
Suggest we only use publicly available APIs

The PyTrends operations have been switched to a markdown cell. The cell now includes code to save the data to a CSV.
In the following code cell, this data is loaded into a DataFrame and used to create a report.

Thank you @antdking! I've just added the Google Trends citation too.

repo: datapane/datapane


text:
feature/se-2-type-bind

Phases
MM
MB
MR
JM
Total

ETA
10.4
0
0
0
0

Developing
6+2+6.5+8+5+10+3+1
0
0
0
0

Review
0
0
0
0
0

Total
-
-
-
-
0

ETA est.

0

ETA cust.
-
-
-
-
0

Problem description
Some input fields must be rendered in the submission forms based on the type-bind definition (submission-forms.xml). If type-definition of the input field equals to the actual submission type, the input field should be added to the submission form.
Test case:

Input fields with the type-bind definition shouldn't be rendered to the submission form on the initialization because submission type is undefined by default.
After changing the submission type, the input fields with the type-bind definition which equals to the new submission type should be rendered to the submission form.
If the fields with the type-bind definition are rendered in the submission form and the submission type has changed, update submission form input fields based on the actual type-bind definition. Some input fields should be removed or added.

Problems

When the formModel is updated by the method this.initForm(this.sectionData):
After_ changing the submission type, the chosen value is not showed in the input field, because the sectionData is not updated before updating the form by the initFormWithValues method.
When the formModel is updated by this.formModel = updatedModel, the checkbox value is not updated and not sent in the request body.
I cannot hide a field only a row, I had to remove the type-bind field and add it then.

@vidiecan I have discovered some errors which are described in the "Problems" section. I have spent more time I would like to on this issu. Then I have checked DSpace type-bind issue progress and it is done! I suggest to merge this functionality from the DSppace. Merged pull request: https://github.com/DSpace/dspace-angular/pull/1529/files

This feature was developed in the https://github.com/dataquest-dev/dspace-angular/pull/44

repo: dataquest-dev/dspace-angular


text:
Type checker

Provide a woffle.functions function to ensure that the types of any custom written function are correct to make it easier to roll your own and check that you have done it correctly.

Optional means to use mypy?
This is very low on the priority list though so will probably get implemented very late into the project.

Actually, might as well use pyre - help is here. mypy is out.

-DEPRECATED-
Development will be put on hold until there is a need for more NLP development, so this has been deprioritised for now

repo: datasciencecampus/woffle


text:
Support for tcp conntection?

Hey,
We already using TrustKit in our iOS app,  and I know it support tcp connections (datatheorem/TrustKit#76). So I wanted to ask - does the android library can also support tcp connections? We are currently using SSLSocketFactory to create the TCP\SSL socket.
Thanks,
Omer

Yes - it should work fine.

repo: datatheorem/TrustKit-Android


text:
jdk11不支持吗？

Unrecognized VM option 'PrintGCDateStamps'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

可以自行对 ./bin/tis 启动脚本进行调整，可以将参数-XX:+PrintGCDateStamps 删除或者替换
JAVA_OPTS="-Xms2G -Xmx3G -XX:MetaspaceSize=512m -XX:MaxMetaspaceSize=1024m -XX:ParallelGCThreads=4 -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=utf-8 -Dtis.launch.port=$SERVER_PORT -DnotFetchFromCenterRepository=true -Ddata.dir=${TIS_TIP}/data -Dlog.dir=$LOG_FILE -Dweb.root.dir=${TIS_TIP}/  -Xrunjdwp:transport=dt_socket,address=50000,suspend=n,server=y"

repo: datavane/tis


text:
求拉

群满了，有人可以拉下我嘛  加威 176零零一零零溜一溜

好的，好友申请发过去了，同意后拉你进群
---- 回复的原邮件 ----
| 发件人 | @.> |
| 发送日期 | 2024年12月05日 14:04 |
| 收件人 | datawhalechina/fun-transformer @.> |
| 抄送人 | Subscribed @.***> |
| 主题 | [datawhalechina/fun-transformer] 求拉 (Issue #1) |
群满了，有人可以拉下我嘛 加威 176零零一零零溜一溜
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: @.***>

repo: datawhalechina/fun-transformer


text:
Documentation ambiguities

Describe the bug
The documentation on integrating Ambassador and Istio is riddled with ambiguities. I need to use mTLS for HIPAA compliance.  I don't want to spend a week trying to figure this out. Please help. :)
Example 0
Istio's basic ingress controller is very limited, and has no support for authentication or many of the other features of Ambassador

While the sentence is factually true, it is misleading.  Istio offers a Gateway now. So, comparing Ambassador to the Istio Ingress Controller is inappropriate.
Example 1
(Note that if you are planning to use mutual TLS for communication between Ambassador and Istio/services in the future, then the order in which you deploy the ambassador-admin service and the ambassador LoadBalancer service below may need to be swapped)

Well, what does this mean in practice.  What is the order?  What should the order be?  How does one affect the order, particularly if one is implementing GitOps?
Example 2
Optionally, delete the Ingress controller from the bookinfo.yaml manifest by typing kubectl delete ingress gateway.

What ingress gateway?  Is this created by istio?  Why is this optional? What happens if you don't delete it?  Why should one delete it?
Example 3
---
apiVersion: v1
kind: Service
metadata:
  labels:
    service: ambassador
  name: ambassador
  annotations:
    getambassador.io/config: |
      ---
      apiVersion: ambassador/v1
      kind:  Mapping
      name:  httpbin_mapping
      prefix: /httpbin/
      service: httpbin.org:80
      host_rewrite: httpbin.org
      ---
      apiVersion: ambassador/v1
      kind:  Module
      name: tls
      config:
        server:
          enabled: True
          redirect_cleartext_from: 80
        client:
          enabled: False
        upstream:
          cert_chain_file: /etc/istiocerts/cert-chain.pem
          private_key_file: /etc/istiocerts/key.pem

This includes a Mapping and a Module.  Why?  Why not just include a Module?  The point is the certs, right?  How else can one provide the Module outside of a service?  Why are these combined here?
Example 4
This will define an upstream that uses the Istio certificates. We can now reuse the upstream in all Ambassador mappings to enable communication with Istio pods.

What is an upstream?  How can it be reused?  Why do I care?
Example 5
First we need to change our Ambassador Deployment to use the Prometheus StatsD Exporter as its sidecar. Do this by applying the ambassador-rbac-prometheus.yaml:

What does StatsD have to do with Prometheus?  Why is a StatsD exporter needed?

Thanks for the feedback. I addressed #0 in the docs. In general, the assumption in this guide is that reader has covered the concepts section (which covers things like upstream). Regarding 1/2/3, would be great if you could contribute learnings back to improve our docs! We are not experts on Istio, and Istio changes at a very high rate. Finally, #5 is covered in the linked monitoring docs; it doesn't make sense to duplicate it here.

authors: derrickburns richarddli

repo: datawire/ambassador


text:
Master branch and Chart version

Describe the bug
How come that version in helm repository does not match Chart.version in master branch?
To Reproduce
Steps to reproduce the behavior:
$ helm search ambassador
NAME               	CHART VERSION	APP VERSION	DESCRIPTION
datawire/ambassador	0.35.2       	0.35.2     	A Helm chart for Datawire Ambassador

and this
Expected behavior
Chart.version in master branch matches chart version in your helm repository.

The Chart.version in master is replaced during the build process via the Makefile. The 0.35.0 is just a placeholder. I can't reproduce this on my install:
helm search ambassador
NAME               	CHART VERSION	APP VERSION	DESCRIPTION
datawire/ambassador	0.38.0       	0.38.0     	A Helm chart for Datawire Ambassador

authors: kostyrev richarddli


text:
Update rustls and enable ring feature needed by UreqClient

TLDR: Update rustls to latest version and enable the ring feature on it to fix 2 build errors.
--
Hello :)
Thanks for the good work on this library. I'm a software engineer, but relatively new to Rust, so let me know if I'm missing something.
I'm trying to use this API in a hobby project. I need to use the UreqClient instead of the ReqwestClient because I'm running w/in Rocket, which causes the ReqwestClient to panic when it tries to create a blocking tokio runtime.
However, when I try to use the UreqClient, I get the following build error:
error[E0599]: no function or associated item named `builder` found for struct `ClientConfig` in the current scope
   --> /home/garrettmills/.cargo/git/checkouts/p5x-proxmox-api-979e6aed6768e1f7/7d75408/proxmox-api/src/clients/ureq.rs:200:44
    |
200 |         let config = rustls::ClientConfig::builder()
    |                                            ^^^^^^^ function or associated item not found in `ClientConfig`

For more information about this error, try `rustc --explain E0599`.
error: could not compile `proxmox-api` (lib) due to 1 previous error

I traced this down to the Cargo.toml in the proxmox-api crate not enabling the ring feature for rustls. After enabling that feature (on my fork), I got a new error:
error[E0308]: mismatched types
   --> /home/garrettmills/.cargo/git/checkouts/p5x-proxmox-api-979e6aed6768e1f7/5020441/proxmox-api/src/clients/ureq.rs:206:34
    |
206 |             .tls_config(Arc::new(config))
    |                         -------- ^^^^^^ expected `rustls::client::client_conn::ClientConfig`, found `ClientConfig`
    |                         |
    |                         arguments to this function are incorrect
    |
    = note: `ClientConfig` and `rustls::client::client_conn::ClientConfig` have similar names, but are actually distinct types

From my testing, updating rustls to the latest version (0.23.16) resolves this.

Thanks for spotting! Seems like ureq did a cross-version bump on a semver compatible version... Oh well. CI is no longer very happy, but since this is a client-side-only change, I will merge it either way.
Thanks!

Welp, okay, I messed that up: it seems to still not compile. Figured it was a small change but I was wrong.
Will fix.

authors: datdenkikniet glmdev

repo: datdenkikniet/proxmox-api


text:
Change associative array to use ID instead of name.

Allow -E option to match on either name or UUID for environment.

LGTM

authors: forana stillema

repo: daticahealth/cli


text:
Option to add social buttons in the nav bar

Config option allowing users to add social icons with links in the nav bar.

Acceptance

[ ] social config field which allows to specify popular social options

[ ] GitHub
[ ] Discord
[ ] LinkedIn
[ ] Facebook
[ ] X (Twitter)
[ ] Instagram
[ ] YouTube

Notes
social field should follow the following shape:
type Social = Array<{
	href: string;
	label: "github" | "discord" | ... other options
}>

@olayway  Can you please assign this issue to me ?

@pranay911 as i wrote on discord
Welcome and great you want to contribute 🎉
Thanks for asking and I suggest you have a look at the current source for where discord icon comes from. Usually you can find these svg icons in a bunch of open source and free icon toolkits. have a quick google 😄

FIXED

authors: olayway pranay911 rufuspollock

repo: datopian/datahub


text:
Authenticating GCP with .env var information

Relates to #23

LGTM

authors: hannelita rufuspollock

repo: datopian/giftless


text:
localStorage is not defined in universal app with Akita

I'm submitting a...

[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[x] Support request
[ ] Other... Please describe:

Current behavior

i'm using the Akita in app with universal rendering and i got error when i try to start the server.
> dist\server.js:209400     storage: localStorage,              ^ ReferenceError: localStorage is not defined     at Object.<anonymous> (dist\server.js:209400:14)     at __webpack_require__ (dist\server.js:20:30)     at Object.@datorama/akita (dist\server.js:132101:18)     at __webpack_require__ (dist\server.js:127767:30)     at Object../src/app/state/app-state.query.ts (dist\server.js:131374:15)     at __webpack_require__ (dist\server.js:127767:30)     at Object../src/app/state/index.ts (dist\server.js:131587:10)     at __webpack_require__ (dist\server.js:127767:30)     at Object../src/app/app.component.ts (dist\server.js:128687:15)     at __webpack_require__ (dist\server.js:127767:30)
I don't use localStorage and persistState. I would appreciate some tips on how to make my app work ^^
Environment

Angular version: 6.1.3

I can add protection for node env, but I don't have any way to test it. Can you collaborate?

This is my suggestion:
Add to the persist-store file the following code at the top:
const isNode =
  typeof process !== 'undefined' &&
  process.versions != null &&
  process.versions.node != null;

if(isNode) {
  (global as any).localStorage = { }
}

and inside the function itself:
export function persistState(params?: Partial<PersistStateParams>) {
  if(isNode) return;

I had the same error with universal rendering and after 1.7.0 it disappeared, but similar error appeared :)
(/** @type {?} */ (localStorage)) = {};
ReferenceError: localStorage is not defined

Let me check.

Deployed a fix in 1.7.1. Verify it with the universal seed.

authors: NetanelBasal amberpew zvnt

repo: datorama/akita


text:
Server should be root in config and default uses dat API

We should store the root server, i.e. without /api/v1/, in the config.
Also we shouldn't overwrite the server endpoints if someone specifies a server (so they can use other endpoints).

Fixed in v3

repo: datproject/dat-registry-client


text:
Feature/processing data in models

In this PR I:

Created at least one user
Created at least 4 posts written by one of the users I created
Created at least 6 posts comments for one of the posts created
My users model includes a method that returns the 3 most recent posts for a given post
My Post contains a method that updates the posts counter for a user and another method that returns the 5 most recent comments for a given post
My comments model had a method that updates the comments for a post
My Likes model has a method that updates the likes counter for a post
Created a method called current_user in my ApplicationController that returns the first user for a database

Thank you for taking the time to review my code.

Hi @daudi13 , hand
Great work on making the changes requested by a previous reviewer clap You've done well implementing some of the requested changes, but there are still some which aren't addressed yet.
Status: Required Changes

As suggested by previous reviewer, please customize your readme file to meet what you did in this project. you can follow this template from Microverse . This make your project looks more professional.

Cheers and Happy coding!clapclapclap
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, do not open a new Pull Request for re-reviews. You should use the same Pull Request submitted for the first review, either valid or invalid unless it is requested otherwise.
As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.

@uwadonat in my opinion I think that should be classified under an optional change for now because the project is still ongoing.


text:
Stereo sound with two channels (Left and Right) getting mixed

Hello,
I have used the project you helped me evolve to include it in an application I am developping. I don't experience signaling problems anymore thanks to your help but my issue is a bit more sophisticated.
I am using drachtio to return a stereo sound to a SIP codec. The sound consists of two channels left and right with some music on the left channel and some voice in the right channel. Somewhere between the generation of the stereo sound and the reception in the codec the two channels get mixed.
Here is the architecture :

I tried to eliminate all possibilities one by one. I tried to reproduce with kurento and VLC the same kurento architecture I used when making SIP calls, just replacing the SIP layer by VLC (a webrtcendpoint and a rtpendpoint). The two channels were separated as they should be.
I tried to use a professsional codec at the reception, which I am sure is capable of recepting stereo. I checked with a professional that the reception is indeed in stereo and adjusted the sdp accordingly (sprop-stereo=1 in the sdp offer and in the sdp answer). The two channels were mixed.
The only source left of this problem is the drachtio layer. Have you faced such a problem already ? Is there a parameter I should adjust to have a stereo sound with two separated channels ?
Thank you for your help,
Guillaume Prat

can you include the drachtio logs?

Hello,
Here are the logs with Linphone, a softphone I'm not sure is capable of managing stereo sounds.
logLinphone.txt
I should be able to send you the logs with a professional codec tomorrow, but for now I don't have access to it.
Thank you for your help,
Guillaume Prat

Hello,
Here are the logs with a codec from AETA.
logCodecAeta.txt
as you can see in the sdp, I'm passing the parameter sprop-stereo=1 with kurento
s=Kurento Media Server
c=IN IP4 10.196.160.34
t=0 0
m=audio 55102 RTP/AVP 96 0 97 98
a=rtpmap:96 opus/48000/2
a=rtpmap:97 AMR/8000
a=rtpmap:98 MPEG4-GENERIC/44100/2
a=fmtp:96 sprop-stereo=1
and I get a reply of the codec with sprop-stereo = 1 and stereo = 1
s=aasmedia
i=(o=IN IP4 10.196.178.11)
c=IN IP4 91.236.110.130
b=AS:2436
t=0 0
a=X-nat:1
m=audio 60544 RTP/AVP 96
c=IN IP4 91.236.110.130
b=TIAS:2304000
a=rtcp:60545 IN IP4 91.236.110.130
a=sendrecv
a=rtpmap:96 opus/48000/2
a=fmtp:96 sprop-stereo=1;stereo=1;maxaveragebitrate=192000.
Thank you for your help,
Guillaume Prat

I'm looking at that last log (logCodecAeta.txt) and I want to make sure I understand which part of the pictured call path above it relates to.  I believe it relates to the line at the lower left of the diagram above, representing audio that will be sent from Kurento to the box in the lower left labelled "SIP".  Have I got that right?
There isnt much I can tell from the SIP signaling logs: the offer appears to be accepted and I would expect that OPUS (the selected codec) audio would then be exchanged between the "SIP" element at 91.236.110.130:60544 and the Kurento media server at 10.196.160.34:55102.
And I think you are confirming that audio is being exchanged, but that you were expecting OPUS with two channels, whereas they have been mixed into one channel.
If all of that is correct, then I would make two suggestions:
1).  Get a tcpdump of the SIP, RTP, and RTCP traffic between Kurento and the "SIP" element so we can see (a) whether the audio is coming from "SIP" in mono or not and (b) see if any of the RTCP messages provide anything useful.

Get a similar tcpdump of the same scenario, except when you change out the drachtio piece for VLC (whatever that is) where you indicate you do get stereo.  By comparing the two we should be able to see what is different and what could be causing the problem.

You have understood correctly the problem. To clarify, when i'm talking of VLC I'm talking of this software : https://www.videolan.org/vlc/index.html, a free softfware used to stream audio and video. I just used Kurento to stream the audio via RTP to VLC.
As I am not used to tcpdump could you give me the commands I need to execute to get the SIP, RTP and RTCP traffic for drachtio and VLC scenarios  (knowing that kurento and drachtio are located on the same ubuntu server) ?
I don't have access to my codec right now. I should get it tomorrow morning. I'll send you the result of the tcpdump once I get it.
Thank you for your help,
Guillaume Prat

on the Kurento server, as root run
tcpdump -i any -s 0 -w capture1.pcap
then run the scenario, then Ctrl-C the command after the call is complete and gather the file.  Repeat for scenario 2

Thank you for your reply.
I'll send you the results once I get access to the codec.

I sent you the results of the tcpdump of the two scenarios by mail.
Thank you for your help.

authors: davehorton gprat

repo: davehorton/drachtio-server


text:
Unable to find config file ".//".

Error ci
Run davelosert/vitest-coverage-report-action@v2
  with:
    working-directory: ./
    github-token: ***
    json-summary-path: coverage/coverage-summary.json
    file-coverage-mode: changes
    json-final-path: coverage/coverage-final.json
Error: Failed to read vite config file".//" or any of the default locations.
Make sure you provide the vite-config-path option if you're using a non-default location or name of your config file.
Error: Error: Unable to find config file ".//".

My config
name: Main

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

permissions:
  pull-requests: write
  contents: read

on:
  push:
    branches:
      - main

  pull_request:
    branches:
      - main

jobs:
  build-test:

    name: 📚 Main
    runs-on: ${{ matrix.os }}

    strategy:
      matrix:
        os: [ubuntu-latest]

    steps:
      - uses: actions/checkout@v3

      - name: Cache turbo build setup
        uses: actions/cache@v3
        with:
          path: .turbo
          key: ${{ runner.os }}-turbo-${{ github.sha }}
          restore-keys: |
            ${{ runner.os }}-turbo-

      - run: corepack enable
      - uses: actions/setup-node@v3
        with:
          node-version: '18'
          cache: pnpm

      - name: 📦 Install dependencies
        run: pnpm install --frozen-lockfile

      - name: 🧪 Server Test
        run: pnpm test:server
        env:
          VITE_TEST_DB_URL: postgres://postgres:postgres@127.0.0.1:5432

      - name: 🧪 Server Test Coverage
        run: pnpm test:server:cov
        env:
          VITE_TEST_DB_URL: postgres://postgres:postgres@127.0.0.1:5432

      - name: 📝 Upload coverage
        if: always()
        uses: davelosert/vitest-coverage-report-action@v2
        with:
          working-directory: './'

Hi @productdevbook,
thank you for reporting this. The error message is a bit misleading - but it basically tells you that there wasn't a vite-config in the root-path of your repository. Right now, having a vite-config is required for this library to read the coverage-thresholds.
However, I realized that this action could also work fine without coverage-thresholds, and, as such, without a vite-config present. So I will change this to only be a warning and adjust the warning message to be more precise.

authors: davelosert productdevbook


text:
Test checkbox clearing

Quick question: Your demo page says, in the section about data types:
Checkbox (checkbox) Checks or unchecks the box String value
But if the expected content of the string is the value of the checkbox, how is it possible to explicitly uncheck the box? I don't want to clear the whole form first, so this actually matters in my case. Thanks!
(If you can toss me an email so I know you answered, that would be great.)

Hi, are you supporting this?
I am using your library and checkboxes didn't work, I fix them with: "element.checked = values[j];" instead of "element.checked |= element.value == values[j]"

I haven't for a long time! But I'm looking to update all my repos over the next while, so I'll take a look.

authors: davestewart nsdelgadov

repo: davestewart/jquery-populate


text:
Incompatibility with SoftwareSerial / ESP8266

Are there any known incompatibilities between TaskmanagerIO and SoftwareSerial in the arduino environment? I'm trying to run TaskManagerIO on a Wemos D1 Mini (R2). I'm seeing definitions clashing and unexpected behaviour.
NB: I should also say that I'm new to TaskManagerIO.
If I include TaskManagerIO.h before SoftwareSerial.h I get:
Processing d1_mini (platform: espressif8266; board: d1_mini; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/d1_mini.html
PLATFORM: Espressif 8266 (2.6.2) > WeMos D1 R2 and mini
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES:
 - framework-arduinoespressif8266 3.20704.0 (2.7.4)
 - tool-esptool 1.413.0 (4.13)
 - tool-esptoolpy 1.20800.0 (2.8.0)
 - tool-mklittlefs 1.203.210203 (2.3)
 - tool-mkspiffs 1.200.0 (2.0)
 - toolchain-xtensa 2.40802.200502 (4.8.2)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 30 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <TaskManagerIO> 1.1.1
|-- <EspSoftwareSerial> 6.8.5
Building in release mode
Compiling .pio/build/d1_mini/src/activeTest2.cpp.o
In file included from .pio/libdeps/d1_mini/TaskManagerIO/src/TaskPlatformDeps.h:86:0,
                 from .pio/libdeps/d1_mini/TaskManagerIO/src/TaskManagerIO.h:9,
                 from src/activeTest2.cpp:3:
/home/user/.platformio/packages/framework-arduinoespressif8266/tools/sdk/libc/xtensa-lx106-elf/include/stdatomic.h:89:0: warning: "ATOMIC_VAR_INIT" redefined [enabled by default]
 #define ATOMIC_VAR_INIT(value)  { .__val = (value) }
 ^
In file included from /home/user/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/4.8.2/atomic:41:0,
                 from /home/user/.platformio/packages/framework-arduinoespressif8266/libraries/SoftwareSerial/src/circular_queue/circular_queue.h:28,
                 from /home/user/.platformio/packages/framework-arduinoespressif8266/libraries/SoftwareSerial/src/SoftwareSerial.h:27,
                 from src/activeTest2.cpp:2:
/home/user/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/4.8.2/bits/atomic_base.h:234:0: note: this is the location of the previous definition
 #define ATOMIC_VAR_INIT(_VI) { _VI }
 ^
In file included from .pio/libdeps/d1_mini/TaskManagerIO/src/TaskPlatformDeps.h:86:0,
                 from .pio/libdeps/d1_mini/TaskManagerIO/src/TaskManagerIO.h:9,
                 from src/activeTest2.cpp:3:
/home/user/.platformio/packages/framework-arduinoespressif8266/tools/sdk/libc/xtensa-lx106-elf/include/stdatomic.h:380:0: warning: "ATOMIC_FLAG_INIT" redefined [enabled by default]
 #define ATOMIC_FLAG_INIT  { ATOMIC_VAR_INIT(0) }
 ^
In file included from /home/user/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/4.8.2/atomic:41:0,
                 from /home/user/.platformio/packages/framework-arduinoespressif8266/libraries/SoftwareSerial/src/circular_queue/circular_queue.h:28,
                 from /home/user/.platformio/packages/framework-arduinoespressif8266/libraries/SoftwareSerial/src/SoftwareSerial.h:27,
                 from src/activeTest2.cpp:2:
/home/user/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/4.8.2/bits/atomic_base.h:268:0: note: this is the location of the previous definition
 #define ATOMIC_FLAG_INIT { 0 }
 ^
Retrieving maximum program size .pio/build/d1_mini/firmware.elf
Checking size .pio/build/d1_mini/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [===       ]  34.3% (used 28076 bytes from 81920 bytes)
Flash: [===       ]  26.1% (used 272164 bytes from 1044464 bytes)

If I reverse the order and include SoftwareSerial.h before TaskManagerIO.h, the build fails:
Processing d1_mini (platform: espressif8266; board: d1_mini; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/d1_mini.html
PLATFORM: Espressif 8266 (2.6.2) > WeMos D1 R2 and mini
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES:
 - framework-arduinoespressif8266 3.20704.0 (2.7.4)
 - tool-esptool 1.413.0 (4.13)
 - tool-esptoolpy 1.20800.0 (2.8.0)
 - tool-mklittlefs 1.203.210203 (2.3)
 - tool-mkspiffs 1.200.0 (2.0)
 - toolchain-xtensa 2.40802.200502 (4.8.2)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 30 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <TaskManagerIO> 1.1.1
|-- <EspSoftwareSerial> 6.8.5
Building in release mode
Compiling .pio/build/d1_mini/src/activeTest2.cpp.o
In file included from .pio/libdeps/d1_mini/TaskManagerIO/src/TaskPlatformDeps.h:86:0,
                 from .pio/libdeps/d1_mini/TaskManagerIO/src/TaskManagerIO.h:9,
                 from src/activeTest2.cpp:2:
/home/user/.platformio/packages/framework-arduinoespressif8266/tools/sdk/libc/xtensa-lx106-elf/include/stdatomic.h:177:23: error: 'std::__atomic_is_lock_free' declared as an 'inline' variable
  __atomic_is_lock_free(sizeof((obj)->__val), &(obj)->__val)
                       ^
/home/user/.platformio/packages/framework-arduinoespressif8266/tools/sdk/libc/xtensa-lx106-elf/include/stdatomic.h:177:23: error: template declaration of 'bool std::__atomic_is_lock_free'
/home/user/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/4.8.2/atomic:804:5: error: expected primary-expression before 'const'
     atomic_is_lock_free(const atomic<_ITp>* __a) noexcept
     ^
/home/user/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/4.8.2/atomic:804:5: error: expected ')' before 'const'
In file included from /home/user/.platformio/packages/framework-arduinoespressif8266/libraries/SoftwareSerial/src/circular_queue/circular_queue.h:28:0,
                 from /home/user/.platformio/packages/framework-arduinoespressif8266/libraries/SoftwareSerial/src/SoftwareSerial.h:27,
                 from src/activeTest2.cpp:3:
/home/user/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/4.8.2/atomic:807:3: error: expected ')' before 'template'
   template<typename _ITp>
   ^
In file included from .pio/libdeps/d1_mini/TaskManagerIO/src/TaskPlatformDeps.h:86:0,
                 from .pio/libdeps/d1_mini/TaskManagerIO/src/TaskManagerIO.h:9,
                 from src/activeTest2.cpp:2:
/home/user/.platformio/packages/framework-arduinoespressif8266/tools/sdk/libc/xtensa-lx106-elf/include/stdatomic.h:90:36: error: expected unqualified-id before 'void'
 #define atomic_init(obj, value)  ((void)((obj)->__val = (value)))
                                    ^
/home/user/.platformio/packages/framework-arduinoespressif8266/tools/sdk/libc/xtensa-lx106-elf/include/stdatomic.h:90:36: error: expected ')' before 'void'
/home/user/.platformio/packages/framework-arduinoespressif8266/tools/sdk/libc/xtensa-lx106-elf/include/stdatomic.h:90:36: error: expected ')' before 'void'
/home/user/.platformio/packages/framework-arduinoespressif8266/tools/sdk/libc/xtensa-lx106-elf/include/stdatomic.h:284:18: error: variable or field '__atomic_store_n' declared void
  __atomic_store_n(&(object)->__val, desired, order)
                  ^
/home/user/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/4.8.2/atomic:822:5: error: expected primary-expression before '*' token
     atomic_store_explicit(atomic<_ITp>* __a, _ITp __i,
     ^
/home/user/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/4.8.2/atomic:822:5: error: '__a' was not declared in this scope
     atomic_store_explicit(atomic<_ITp>* __a, _ITp __i,
     ^
/home/user/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/4.8.2/atomic:822:5: error: expected primary-expression before '__i'
     atomic_store_explicit(atomic<_ITp>* __a, _ITp __i,
     ^
/home/user/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/4.8.2/atomic:822:5: error: expected primary-expression before '__m'
     atomic_store_explicit(atomic<_ITp>* __a, _ITp __i,
     ^
/home/user/.platformio/packages/framework-arduinoespressif8266/tools/sdk/libc/xtensa-lx106-elf/include/stdatomic.h:284:18: error: variable or field '__atomic_store_n' declared void
  __atomic_store_n(&(object)->__val, desired, order)
                  ^
/home/user/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/4.8.2/atomic:828:5: error: expected primary-expression before 'volatile'
     atomic_store_explicit(volatile atomic<_ITp>* __a, _ITp __i,
     ^
/home/user/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/4.8.2/atomic:828:5: error: expected ')' before 'volatile'
*** [.pio/build/d1_mini/src/activeTest2.cpp.o] Error 1

Yes it looks like software serial and task manager are using std::atomic to provide atomic access to variables.
We test every release with ESP8266, but there must be a conflict in libraries in software serial. We'll need to try this locally to see what the incompatibility is and feed back.

Thanks, that was my interpretation as well.  I'm new to TaskManagerIO and didn't dig too deep. Let me know if I can provide any other info.

recreated and fixing. We will move to the new method of using atomic, that is
#include
We'll switch to using the direct compare and exchange function too. Should be in the repo shortly once coded up and tested.

I've committed a potential fix to master, found two issues, first the include was inside a namespace, second, we were using an older way to include atomic, fixed both potentially. Tested best I could locally, could you feed back if it works for you. I'll do a test on ESP32, AVR and MKR to get more confidence and then re-release.

Tested on ESP8266, ESP32, SAMD and AVR. Releasing.

authors: davetcc rhscdn

repo: davetcc/TaskManagerIO


text:
Fix CryptOMG

https://github.com/SpiderLabs/CryptOMG

CryptOMG is added, but uses fork for mariaDB compatibility.
Challenge 2 and 4 are broken due to DB connection issues.

fixed by creating a function for db connection

repo: davevs/dvxte


text:
with redux-actions, how to set initial state?

Hi, thanks for putting this starting kit together. It is very helpful to see how the router is integrated in with the rest of Redux.
I see you recently added redux-actions. It has its own custom reducer. I'm not sure what use that project is since it is quite a bit different from the base Redux documentation, but I'm trying to understand how to add additional values to initial state besides just counter, and it is unclear how that would be done with this redux-actions wrapper if at all. The starter project doesn't seem to work like the redux-actions documentation. I'd like to be able to add more initial state values than just counter.
Redux actions project documentation shows this with counter: 0 to initialize the initial state:
const reducer = handleActions({
  INCREMENT: (state, action) => ({
    counter: state.counter + action.payload
  }),

  DECREMENT: (state, action) => ({
    counter: state.counter - action.payload
  })
}, { counter: 0 });

So I tried that in the starter kit. Also I'm not sure about the initial magic number 1 that was there as the second argument before. I changed it and it had no effect on the initial counter value. I debugged it, and it looks like the overall code throws the value.
// ------------------------------------
// Reducer
// ------------------------------------
export default handleActions({
  [COUNTER_INCREMENT]: (state, { payload }) => state + payload
}, { counter: 0 })

I get these errors:
Warning: Failed propType: Invalid prop counter of type object supplied to HomeView, expected number. Check the render method of Connect(HomeView).
Uncaught Invariant Violation: Objects are not valid as a React child (found: object with keys {counter}). If you meant to render a collection of children, use an array instead or wrap the object using createFragment(object) from the React add-ons. Check the render method of HomeView.
Is there a way to set more initial state values besides counter?
Is handleActions capable of setting more initial state values?

Ok, sorry to bother. You can close this.
I had to adjust the view and the action handler to the new object shape and declare the propType as object then it worked.

repo: davezuko/react-redux-starter-kit


text:
New plugin name requirements

Hi @davfive
Per our developer policies,
please ensure that your plugin's name does not include the word "Obsidian".
In addition, the plugin name should not include the word "Plugin", as that is unecessary duplication.
We have already modified the name of your plugin to "jTab" in our records.
To maintain compliance, take the following actions:

Modify the manifest.json file in your plugin repository.
Generate a new release for your plugin to ensure users download the updated manifest.

If you have a idea for a different plugin name, you may also submit a pull request to the obsidianmd/obsidian-releases repository.
Thank you for your cooperation.
— the Obsidian team

This issue has been fixed and is included in the v1.2.3 package release. Download or update it in Obsidian Settings under Community Plugins.

authors: davfive joethei

repo: davfive/obsidian-jtab


text:
Removed from Google Chrome Extension directory > How to install in developper mode?

Hi! As your (great) extension have been removed from Google Chrome extension directory... How to install it in dev mode?

I would really appreciate an update! Have been using it for a long time.

authors: secou stegers

repo: david-r-edgar/MapSwitcher


text:
Support for RockRadio

Hi,
RockRadio is from the same network as JazzRadio, which is supported already by the extension. Could you also add the other sister sites as well?
http://www.classicalradio.com
http://www.radiotunes.com
http://www.rockradio.com
Thanks a lot!

We don't know how to scrobble the classical music properly: #857.
Also, RadioTunes is already supported, but I didn't know they all have the same website layout. Thanks for a hint!

What about RockRadio then?

Proposed in #1155.

RockRadio will be in the next release :+1:

authors: alexesprit aqzina inverse

repo: david-sabata/web-scrobbler