Get null when using generic

my json data:
{
    "resultCode": "0",
    "resultMessage": "success",
    "data": {
        "result": 5
    }
}

my base_response.dart and its part
import 'package:json_annotation/json_annotation.dart';

part 'base_response.g.dart';

@JsonSerializable()
class BaseResponse<T> extends Object with _$BaseResponseSerializerMixin {
  String resultCode;
  String resultMessage;
  @JsonKey(fromJson: _dataFromJson, toJson: _dataToJson)
  T data;

  BaseResponse(this.resultCode, this.resultMessage, this.data);

  factory BaseResponse.fromJson(Map<String, dynamic> json) => _$BaseResponseFromJson<T>(json);

}

T _dataFromJson<T>(Map<String, dynamic> input) =>
    input['value'] as T;

Map<String, dynamic> _dataToJson<T>(T input) =>
    {'value': input};

part of 'base_response.dart';

BaseResponse<T> _$BaseResponseFromJson<T>(Map<String, dynamic> json) {
  return new BaseResponse<T>(
      json['resultCode'] as String,
      json['resultMessage'] as String,
      json['data'] == null
          ? null
          : _dataFromJson(json['data'] as Map<String, dynamic>));
}

abstract class _$BaseResponseSerializerMixin<T> {
  String get resultCode;
  String get resultMessage;
  T get data;
  Map<String, dynamic> toJson() => <String, dynamic>{
        'resultCode': resultCode,
        'resultMessage': resultMessage,
        'data': data == null ? null : _dataToJson(data)
      };
}

my data class and its part
import 'package:json_annotation/json_annotation.dart';

part 'content.g.dart';

@JsonSerializable()
class Content extends Object with _$ContentSerializerMixin {
  int result;

  Content(this.result);

  factory Content.fromJson(Map<String, dynamic> json) => _$ContentFromJson(json);
}

part of 'content.dart';

Content _$ContentFromJson(Map<String, dynamic> json) {
  return new Content(json['result'] as int);
}

abstract class _$ContentSerializerMixin {
  int get result;
  Map<String, dynamic> toJson() => <String, dynamic>{'result': result};
}

then, when I use it like this:
var out = new BaseResponse<Content>.fromJson(jsonDecode(json));

print(out.resultCode);  // <---- it's 0
print(out.resultMessage);  // <---- it's success
print(out.data);  // <---- it's null

why out.data is null?  Am I missing something?

or, what I need is a version of Flutter where build_runner is running w/ --preview-dart-2. according to #202 ?

Insert a print in here to see what's happening...
factory BaseResponse.fromJson(Map<String, dynamic> json) {
print(json);
return  _$BaseResponseFromJson<T>(json);
}

Thanks for reply.
and here is the output:
{resultCode: 0, resultMessage: success, data: {result: 5}}

Ah! You're grabbing value from the map – which is null. Not result.

and, the input inside _dataFromJson is missing field 'value':
T _dataFromJson<T>(Map<String, dynamic> input) =>
    input['value'] as T;  // <-- there is no 'value' here

the input is:
Map (1 items)
  0:"result" -> 5
    key:"result"
    value:5

@pcqpcq – figure out what you're doing now?

@kevmoo sorry, I don't get it 😂 what should I do now?

Either change your data to {"value": 5} or your code to
T _dataFromJson<T>(Map<String, dynamic> input) =>
    input['result'] as T;

No, it's incorrect,  input['result'] is 5, it's not T

Right. Uh. I'm saying your data and your code does not align. Your code expects a may with a value key, but you're giving it a map with a result key.

ok, I see, thank you!

@pcqpcq
T _dataFromJson<T>(Map<String, dynamic> input) =>      input['value'] as T;
T _dataFromJson<T>(Map<String, dynamic> input) {     if (T is Content) return new Content.fromJson(input);     else if (T is ...) return ...     else throw Exception("Unknow type"); }

@jiangyu19871119  Thanks, but it's very ugly as it takes the problem to higher level code at #116
T _dataFromJson<T>(Map<String, dynamic> input) {
    if (T is Content) return new Content.fromJson(input);  /// <-- this is what I don't want
    else if (T is ...) return ...
    else throw Exception("Unknow type");
}

@pcqpcq Yes, is there any better way?

@jiangyu19871119
not yet... 😂
if you get anything useful, let me know pls.
this is what I am doing:
  @JsonKey(fromJson: _dataFromJson, toJson: _dataToJson)
  Map<String, dynamic> data;

  Map<String, dynamic> _dataFromJson<T>(Map<String, dynamic> input) =>
    input;

return a Map direct, and redo json serialize at child, in this case:
  // do this at framework layer, something like network response handler.
  class Network {

    /// ...stuf

   static Future<BaseResponse> post(...) async {

      /// ...stuff

      final response = await http.post(...);
      return new BaseResponse.fromJson(jsonDecode(response.body));
    }
  }

  // do this at business layer

  /// ...stuff

  FutureBuilder(
     future: Network.post(...),
     builder: (context, snapshot) {
        if (snapshot.hasData) {
           var data = new Content.fromJson(snapshot.data.data);
        }

      /// ...stuff

     }
  }


RTSP stream with FFMPEG gives error. In VLC ok

Hi,
I get a new camera today. This camera's stream URL is:
rtsp://user:pass@<IP_ADDRESS>:554/realmonitor?channel=0&stream=0.sdp (from onvif-device-tool)
If I try this link in VLC it works fine (in VLC is sufficent to use<EMAIL_ADDRESS>but also works with the full URL). In FFMPEG I get nothing if I use the URL without quotes.
If I use ffmpeg -i "rtsp://<IP_ADDRESS>:554/realmonitor?channel=0&stream=0.sdp" I get:
Invalid data found when processing input
Now I'm a little bit confused what to do...
My cam is this:
https://www.amazon.de/gp/product/B07QS1LLL3/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1

Ok, I use a workaround...
Since VLC playes the stream ootb, I've setup a job on my OMV server to transcode the stream in another RTSP stream. So I can use it on Homebridge. Maybe this could be useful for some other cases the camera stream could not be used in Homebridge.


python client causes fluentkvs to segfault

i am trying to run fluentkvs and perform a query on it using the included python client it crashes on all get and put queries
# ./build/kvs/src/kvs/flkvs
No server type specified. The default behavior is to start the server in memory mode.
terminating with uncaught exception of type std::invalid_argument: stoi: no conversion
Aborted (core dumped)

#!bin/env python

from  anna.client import AnnaClient

anna_client = AnnaClient("localhost",ip="<IP_ADDRESS>")

anna_client.get("a")
anna_client.put("1","2")
print("hello there")

Hi @mogorman, currently the Python client is only set to run against an AWS cluster. The ports it's set to run against are the ports the Elastic Load Balancer listens on. I'll have a PR to fix this soon. In the meantime, if you want to use the Python client, please do the following:

In the Python client, change the ELB_PORTS list to be ELB_PORTS = [6450,].
Run ./scripts/start-kvs-local.sh.

That should let you use the client locally. Sorry for the confusion, and thanks for pointing this out!

thanks @vsreekanti that solved my problem I will make a port parameter for the python library. one thing that surprised me was that variables i put in via the flkvs-cli aren't visible to python code, and vice versa.

https://github.com/fluent-project/fluent/pull/52

Thanks for the PR, @mogorman! I didn't understand the second part of your previous message:
one thing that surprised me was that variables i put in via the flkvs-cli aren't visible to python code, and vice versa.
Is this still a problem you're facing? If so, would you mind expanding?


The example of tensorlayer.nlp.moses_multi_bleu() doesn't work

In [11]: hypotheses = ["a bird is flying on the sky"]

In [12]: references = ["two birds are flying on the sky", "a bird is on the top of the tree", "an airplane is on the sk
    ...: y",]

In [13]: score = tl.nlp.moses_multi_bleu(hypotheses, references)
---------------------------------------------------------------------------
PermissionError                           Traceback (most recent call last)
<ipython-input-13-f27687c6afa3> in <module>()
----> 1 score = tl.nlp.moses_multi_bleu(hypotheses, references)

D:\program\work\Anaconda\VirtualEnvs\envs\tf\lib\site-packages\tensorlayer\nlp.py in moses_multi_bleu(hypotheses, references, lowercase)
    998
    999   # Calculate BLEU using multi-bleu script
-> 1000   with open(hypothesis_file.name, "r") as read_pred:
   1001     bleu_cmd = [multi_bleu_path]
   1002     if lowercase:

PermissionError: [Errno 13] Permission denied: 'C:\\Users\\huay\\AppData\\Local\\Temp\\tmpz4jdjc4x'

As the error show, you don’t have permission to create or open file, I suggest to run your script as administrator in windows, or use sudo in Linux


Add support for all user-notification API's in all relevant use cases

[ ] This is a small change
[x] This change has been discussed in issue #1192 and the solution has been agreed upon with maintainers.

Description:
Resolves #1192. Details will follow.

Pull Request Test Coverage Report for Build 2311

25 of 68 (36.76%)  changed or added relevant lines in 4 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage decreased (-0.07%) to 62.784%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

detox/src/devices/drivers/DeviceDriverBase.js
2
4
50.0%

detox/src/devices/Device.js
12
16
75.0%

detox/src/devices/drivers/android/AndroidDriver.js
7
25
28.0%

detox/src/android/espressoapi/Detox.js
4
23
17.39%

Files with Coverage Reduction
New Missed Lines
%

detox/src/devices/drivers/android/AndroidDriver.js
1
63.13%

Totals

Change from base Build 1236:
-0.07%

Covered Lines:
7872

Relevant Lines:
13067

💛  - Coveralls


Documentation: add fullnameOverride

What this PR does / why we need it:
Add fullnameOverride parameter
Which issue this PR fixes

fixes #159

Special notes for your reviewer:
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

[x ] Variables are documented in the README.md

Pending CI, happy for this to come in without chart version update.


net/url: no Parse error with invalid port in IPv4 addresses (revert)

What version of Go are you using (go version)?
go version go1.6 linux/amd64

What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"

What did you do?
Passed URLs containing invalid port for IPv4 and IPv6 addresses.  (Ran into this while digging into #14836)
Playground link: http://play.golang.org/p/EG38tnEGjn

What did you expect to see?
Parse errors in both cases.  Or consistent behavior.

What did you see instead?
Parse error for IPv6 address; no error for IPv4 address.

I've taken a stab at this with CL https://go-review.googlesource.com/20903.

It appears that an existing test would break if this were to be fixed so as to cause Parse error with invalid ports in IPv4 addresses and would possibly need to be changed to:
--- a/src/net/url/url_test.go
+++ b/src/net/url/url_test.go
@@ -418,10 +418,10 @@ var urltests = []URLTest{
        },
        // worst case host, still round trips
        {
-               "scheme://!$&'()*+,;=hello!:port/path",
+               "scheme://!$&'()*+,;=hello!:8080/path",
                &URL{
                        Scheme: "scheme",
-                       Host:   "!$&'()*+,;=hello!:port",
+                       Host:   "!$&'()*+,;=hello!:8080",
                        Path:   "/path",
                },
                "",

This is wrong and should be reverted. It is perfectly fine to have non-numeric ports, except in the case of IPv6 literals because they are special in very many ways.

This is wrong and should be reverted.

@rsc, why is it wrong?
https://tools.ietf.org/html/rfc3986#section-3.2.3 says:
3.2.3.  Port

   The port subcomponent of authority is designated by an optional port
   number in decimal following the host and delimited from it by a
   single colon (":") character.

      port        = *DIGIT

   A scheme may define a default port.  For example, the "http" scheme
   defines a default port of "80", corresponding to its reserved TCP
   port number.  The type of port designated by the port number (e.g.,
   TCP, UDP, SCTP) is defined by the URI scheme.  URI producers and
   normalizers should omit the port component and its ":" delimiter if
   port is empty or if its value would be the same as that of the
   scheme's default.

except in the case of IPv6 literals because they are special in very many ways

What are those ways?
You think IPv4 and IPv6 should have different rules now how ports are parsed in Go? That seems very ... surprising.

In general package url does not impose structural restrictions on the authority part, because there might be things like fooscheme://whatever:baz/ at some point. The claim is that this new code is for "IPv4" but it's really for everything that's not IPv6, including plain names or other text. I've seen people using things like mysql://various(stuff:here) and that should continue working too. (We broke and reverted stuff like that once already.) It had a test (reverted in the CL) to make clear that this kind of thing was supported.
IPv6 literals are special in URLs: they introduce the special case that % can appear and does not mean the usual "introduce a %xx escape sequence", and so they need special handling. (See the big comment. The way IPv6 zone scopes were hacked into URLs is just awful.) But other structural checks are incompatible with the history here and should not be added. That's why the test was there.
Rejecting previously valid inputs is not something we should do lightly, and the CL that did it doesn't seem to understand the full scope of what the existing code did (the mistaken claims about "IPv4").

because there might be things like fooscheme://whatever:baz/ at some point >  It had a test (reverted in the CL) to make clear that this kind of thing was supported.

I did see it was reverted, but the test didn't exactly make it clear what it was caring about.  All it said was:
// worst case host, still round trips

... with no reference to a bug giving any backstory.
git blame points to e8be9a170c3044d7460a6b2c8349a723b1a21dd2 which says:

This allows mysql://a,b,c/path to continue to parse, as it did in Go 1.4 and earlier.

So if this is about breaking mysql

The fact is, there are many Go programs (mysql was just one public example) that use URLs that do not strictly conform to the host:numbers form. I really don't want to start breaking these programs in Go 1.7. There's no good reason to do so. Revert in https://go-review.googlesource.com/#/c/22861.

I explained above why IPv6 is special: it's a special case in the RFCs too.
This is now working as intended, I believe.


Rename ChunkManager to ComputeManager

What is your issue?
In https://github.com/pydata/xarray/issues/8733#issuecomment-2251861380 and https://github.com/pydata/xarray/pull/9286#discussion_r1694656560 it's become fairly clear that the ChunkManager abstraction isn't quite right - it's "too greedy" as @dcherian said. #9286 will fix this by removing .chunks and .rechunk from the ChunkManager's responsibilities, but the result will be a "ChunkManager" that doesn't explicitly handle chunks!
I think a better name to describe the new interface is a "ComputeManager", as it still handles the creation of lazily-computed parallel arrays, distribution of computation over parts of those arrays, and triggering the materialization of the arrays.
JAX is also an interesting potential use case because there you don't have chunks, but you do still have to manage dividing computation up over multiple devices. See https://github.com/pydata/xarray/pull/9286#discussion_r1694656560
Renaming ChunkManagerEntrypoint to ComputeManagerEntrypoint will be a breaking change but:
a) this is a very advanced feature,
b) the docs for it have a fat "experimental" warning on them,
c) I'm only aware of 2 libraries using this outside of xarray itself: cubed (tagging @tomwhite), and @hmaarrfk's chunked data structure. The dask ChunkManager ships with xarray, so there is no breaking change there. (Users may have to pip install again to re-register entrypoints if upgrading a development version of xarray inside existing environments though.)
I'm separating this out from #9286 because that PR shouldn't be a breaking change, and the follow-up that closes this issue will be the minimal possible breaking change (i.e. just renaming ChunkManagerEntrypoint -> ComputeManagerEntrypoint).

I'm happy to constrain version or add compatibility shims in my code. Let me know

This all sounds fine to me.
On a semi-related note, it would be nice to consider separating the concept of triggering computation from returning a computed result. Dask calls these .persist() and .compute(). In Tensorstore, the former is obtained via .read() and the later via .result().

I would personally appreciate a resolution to https://github.com/pydata/xarray/pull/9403 so that we can start to test our codebase with numpy "2" series. I'm just trying to isolate breaking changes in our changes and I feel like #9403 is the last thing holding us up! (apart from tensorflow that is).


"pyscf.scf.jk.get_jk" in GPU?

Hi all,
In PySCF for CPU, scf.jk.get_jk is very time consuming.
Thus, I'd like to try scf.jk.get_jk in GPU framework. But, I can't find jk.py in gpu4pyscf.scf.
Is it possible to improve jk.get_jk in GPU?
Thank you!

@yskim123 This function (https://github.com/pyscf/gpu4pyscf/blob/master/gpu4pyscf/scf/hf.py#L45) in GPU4PySCF probably can provide similar functionalities. A generic function like scf.jk.get_jk will need more efforts. Could you please let us know your use case?


Cannot unbind service form some apps if service bound to more than 50 apps

I have a service bound to more than 50 apps in a space.  In this case if I attempt to unbind the service from an app not in the first 50 results of the /v2/service_instances/{service instance guid}/service_bindings then I get an error saying the service isn't bound to the app when it actually is.

Command
cf unbind-service app service
What occurred, incl. error and/or stack trace
I get a message saying "Binding did not exist"
What you expected to occur
Unbind service
CLI Version
6.21.1
CC API Endpoint Version
2.58.0
CF Trace, if issue relates to HTTP requests or strange behavior
run the command with -v and paste or attach the trace output

If you really need this I can do it but it will be very long and take a long time to scrub.

Platform & Shell Details
Duplicated on MacOS and Ubuntu 64

This issue has now been resolved in cf CLI 6.23.0.
https://github.com/cloudfoundry/cli#downloads
Regards,
Dies Koper
CF CLI PM


Mac OS X MariaDB 10.3.13 binaries status unclear - working or not? If NOK, how to fix?

So in #235 for #230, @srbala contributed MariaDB 10.3.13 binaries (before we had 10.2.11). For Linux, the new 10.3.13 binaries clearly work (given that the Travis CI for #235 passed!), for Windows I'm guessing it also does (I've not personally tested it; no Windows here).
For Mac the status isn't super clear, to me... @jtmuhone, of #229 fame, during review of #235 provided some feedback which makes me think that it as-is currently (just after merging #229) it may not just work out of the box on Mac? I've not personally tested it (no Mac)... would someone else like to test this, and provide some feedback here? Or perhaps @srbala and/or @jtmuhone you can chime in here? (Again, I'm so sorry for the delay in processing this.)

The Mac related problems actually aren't new to the MariaDB binary 10.3.13 (or 10.3.17 coming up in #292), issue #278 illustrates a problem a Mac user had even before #235 already..

sudo mkdir -p /usr/local/opt/openssl/lib
sudo ln -s /usr/lib/libssl.dylib /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
sudo ln -s /usr/lib/libcrypto.dylib opt/openssl/lib/libcrypto.1.0.0.dylib
It's icky but it works for me on Mojave and avoids installing Homebrew. Suspect it won't work in Catalina due to the read-only root filesystem (and rightly so)! For my project, we'll probably disable local tests on macOS for the MySQL dialect until this fixed. Or until someone really, really wants to test against MySQL on a shiny new MacBook ;-)

@martin-traverse Just wanted to check if you tried your hack in Catalina? I am running into the same issue and currently the only option seems to be to downgrade openssl to 1.0.2t which breaks a bunch of other things.

Yes I did, and to my surprise it worked!

On 9 Jan 2020, at 06:39, Venki Balakrishnan<EMAIL_ADDRESS>wrote:
@martin-traverse https://github.com/martin-traverse Just wanted to check if you tried your hack in Catalina? I am running into the same issue and currently the only option seems to be to downgrade openssl to 1.0.2t which breaks a bunch of other things.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/vorburger/MariaDB4j/issues/288?email_source=notifications&email_token=AAPSBSEWGLAMESNFYYOQEETQ43BDDA5CNFSM4ISYETH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIPFSZY#issuecomment-572414311, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPSBSC2WHC23TU4ISP24S3Q43BDDANCNFSM4ISYETHQ.

Manual workaround - upgrade to mariadb locally that has openssl 1.1 support
<EMAIL_ADDRESS>Notice - Depends On:
<EMAIL_ADDRESS>| 1.1.1i | Cryptography and SSL/TLS Toolkit
brew install<EMAIL_ADDRESS>Use spring config to point to local maria db
# Bypass issues with bundled version depends on openssl 1.0
<EMAIL_ADDRESS>#mariaDB4j.libDir=
mariaDB4j.unpack=false

Integration tests seem to work fine

Manual workaround - upgrade to mariadb locally that has openssl 1.1 support
<EMAIL_ADDRESS>Notice - Depends On:
<EMAIL_ADDRESS>| 1.1.1i | Cryptography and SSL/TLS Toolkit
brew install<EMAIL_ADDRESS>Use spring config to point to local maria db
# Bypass issues with bundled version depends on openssl 1.0
<EMAIL_ADDRESS>#mariaDB4j.libDir=
mariaDB4j.unpack=false

Integration tests seem to work fine

Am I missing something, or is this the same issue as #48 ? Both of these issues are resolved by symlinking the openssl binaries.
The reason this issue, 288, was ever raised is because a user received an issue with the PR: https://github.com/vorburger/MariaDB4j/pull/235#issuecomment-474375215 . However, the error reported seems to be nearly the same error as with #48 . And @martin-traverse has described the solution to this issue, which is the same solution to #48 , assuming the omission of /usr/local/ is insignificant.
Past MariaDB4j versions have been released in spite of this issue. I am on a Mac myself (unfortunately), and while the situation is not perfect, it is fixable with a couple of symlinks.

@A248 the symlink fix is global right? So if i have different tools which require different versions of openssl then i can't use both tools at the same time. Right?

@slangeberg I'm not really sure what will happen. There are several things to note.
Users in #48 report that this problem occurs because Mac uses openssl 1.1.0. The solution is to symlink the 1.1.x version to the 1.0.x version, that way MariaDB4j can use the file named as if it was a 1.0.x binary even though it is really a 1.1.x binary. That has apparently worked for many people and it also worked for me. I suspected this was due to semantic versioning - 1.1.x should be compatible with 1.0.x, right?
Well, it turns out openssl does not follow semantic versioning, and 1.1.x is not strictly compatible with 1.0.x. (ref1 and ref2). That would suggest the symlinking solution only nominally works, and allows MariaDB to start up. Perhaps it has been "working" because MariaDB, when launched from MariaDB4j, does not ever need to call into the openssl binary - MariaDB4j is most commonly used for integration tests, in which case, there's no point to using TLS/SSL for a localhost connection.
If MariaDB4j is not the one causing you to use multiple versions of openssl, then you will need something to manage these multiple openssl versions, regardless of whether you use MariaDB4j. In this regard, symlinking to /usr/.../libssl.1.0.0.dylib is only an afterthought. Only programs which need openssl 1.0.0 will look for it in /usr/.../libssl.1.0.0.dylib, so you cannot cause any harm by creating the symlink: to be precise, you cannot break anything which was previously working. Just to be clear in case you are not familiar with symlinks: the second argument is the target file which is created, meaning ln -s /usr/lib/libssl.dylib /usr/.../libssl.1.0.0.dylib does not affect the first file but it does create the second file.
If MariaDB4j is the one causing you to use multiple versions of openssl, then you are in the same boat as I and all the other users in #48 . This is the bottom line, and it is the big question. Is symlinking openssl 1.1.x to openssl 1.0.0 a safe maneuver? Practical experience suggests it does not matter in the case of MariaDB4j. Considering that the most common use of MariaDB4j, integration tests, rarely need to use SSL, it may be that no issues are encountered due to this fact. It would be useful to have someone who simultaneously uses MariaDB4j, SSL with their MariaDB connection, and Mac OS describe their experience.

#484 and other issues related to packaging later MariaDB versions are the best solution.


Cards of experimental view don't open in Firefox

Version of HACS
0.15.0 experimantal view
Describe the bug
Clicking on a card of the experimental view in Firefox does nothing, Chrome works.
Debug log

TypeError: t.path is undefined3 main.js:177:142
    ShowRepository http://<IP_ADDRESS>:8123/hacs_experimental/main.js:177
    handleEvent http://<IP_ADDRESS>:8123/hacs_experimental/main.js:1
    __boundHandleEvent http://<IP_ADDRESS>:8123/hacs_experimental/main.js:1

It looks like it's more than just the cards :/

https://github.com/custom-components/hacs/commit/de4cdc9988849445c6afa9e877886371bd36879d
Will release a new version with a fix for this and translations when Lokalise are back up https://lokalise.statuspage.io/

https://github.com/custom-components/hacs/releases/tag/0.15.1


Fix/161/loading-animation-dynamic-loading

🐛Dynamic Loading Animation Fix #161
🔍 What's Included

Replaced hardcoded delay for loading animation with dynamic loading based on the load event.
Optimized loading behavior to eliminate stuttering issue.

📁 Files Affected:

src/pages/Landing.tsx

that's neat!


Teach flutter to run from a relative path

Previously we were trying to run pub from the wrong working directory.

@eseidelGoogle

@jamesr

lgtm


Object map already 😒

who isn't sick of Object.keys(objThing).map( key => objThing[key] )
why isn't thing.map( (key, val) => ) a thing yet

Object.values() and Object.entries() already exist.
JS is generally loathe to add new things to Object.prototype, since it then shows up on every single object in the entire world (unless someone goes out of their way to null out the prototype).
It's then confusing when other types of objects define a different map operation, because you can't rely on the "default" map operation working everywhere.  For example, Array.prototype.map takes a (value, index, collection)=>{...} callback, rather than the (key, val)=>{...} callback you list.
It probably would have been nice if "plain old objects" had a class of their own, a la Array, rather than being the root of the entire type hierarchy, but that's a ship long since sailed.

Object.values, Object.entries, and Object.fromEntries (stage 3) all exist.
Adding a new method to Object.prototype is highly unlikely to ever be web compatible, and with Object.fromEntries(Object.entries(source).map(([key, value]) => […])) it remains to be seen if object mapping needs additional language support.

nothing is needed
this would dramatically reduce complexity and unnecessary bugs
but okay

@StoneCypher you can always use lodash's map

While @tabatkins and @ljharb are right to point out that we almost certainly couldn't add something to Object.prototype, we could provide a function with this behavior which took an object as an argument rather than a method which took the object as its receiver. I'm hesitant to do so, though: objects are pretty weird, what with accessors and non-enumerability and prototypes and proxies and so on. A ruby-style map makes sense for bare records, but less for JS's rich objects.
As such, I think there's advantage in making you say exactly what you mean. And with the addition of Object.fromEntries, that's gotten a lot easier. I'd like to let Object.fromEntries be out in the world for a while before deciding it's not sufficient.

I mean mostly I just want something short
I end up writing byId and feMap in most of my code shrug


Question: What is the difference between Choices/Choice and Labels/Label?

I set up the same text classification task, once using Choices/Choice in the config and another time with Labels/Label (everything else being the same) and it seems this gets presented in exactly the same way to the annotator. Is there any difference between those?
Hmm after trying to modify the config in the GUI, when I try to save I get the error message
{"label_config":["'int' object is not iterable"]} but I have no idea what that means.
This is what the complete config looks like:
<View>

  <Text name="text" value="$text"></Text>
  <View style="box-shadow: 2px 2px 5px #999;                padding: 20px; margin-top: 2em;                border-radius: 5px;">

    <Labels name="label" toName="text" choice="single" showInLine="true">

    </Labels>
    Confidence:
    <Rating name="rating" toName="text" maxRating="10" icon="star" size="medium" />
    Remark (optional)
    <TextArea name="remark" toName="text"></TextArea>
  </View>
</View>

@johann-petrak Hello, sorry for a long answer. We've released a new version on LS 0.7.0. I've checked your config in it, it works well.
Choice is a checkbox.

Label is a region.


Additional option to print decimal coordinates with N|S & E|W

I know this is a weird question, because decimal coordinates are just negative for S & W, but some programs like sunwait need input as decimal, but with N|S and E|W, i.e. in the format 52.516667N 13.388889E instead of 52.516667 13.388889 for Berlin, and 40.7127N 74.0059W instead of 40.7127 -74.0059 for NYC, et cetera. (Same for N vs. S.) I guess I can always parse CoreLocationCLI's output and change it myself, but maybe it isn't too complicated to add an option for an alternate output, e.g. CoreLocationCLI -orientation or CoreLocationCLI -o.

Thanks for sharing. Generally I prefer to use documented standards for output formats. Is there any documentation (ISO/IETF/etc.) where this is a preferred format?

Can't say, I just stumbled across sunwait today, and it seems to accept only this non-standard format.

It's easy to convert, though:
loc=$(CoreLocationCLI)
lat=$(echo "$loc" | awk '{print $1}')
long=$(echo "$loc" | awk '{print $2}')
[[ $lat == "-"* ]] && lat="$lat"S || lat="$lat"N
[[ $long == "-"* ]] && long="$long"W || long="$long"E
echo "$lat $long" | sed -e 's/-//g'

Thanks for reporting this. For now I believe non-standard GPS representations should be outside the scope of this project. But you do have a nice workaround.
And of course, awk can do all kinds of stuff, and even more golfing can be done on the below
echo '-45.356 -15' | awk '{print ($1>0) ? $1"N" : -$1"S"}'
echo '-45.356 -15' | awk '{print ($2>0) ? $2"E" : -$2"W"}'


Roll Flutter Engine from 496ef6a9c277 to 4519acd50345 (8 revisions)

https://github.com/flutter/engine/compare/496ef6a9c277...4519acd50345
2023-09-12<EMAIL_ADDRESS>Roll Skia from 211d63b1e1f5 to 2d295711337c (7 revisions) (flutter/engine#45729)
2023-09-12<EMAIL_ADDRESS>Use a single OffscreenCanvas for rendering in CanvasKit (flutter/engine#42672)
2023-09-12<EMAIL_ADDRESS>Manual roll Dart SDK from 43d4b1373788 to 1ee7ef8bbc65 (6 revisions) (flutter/engine#45726)
2023-09-12<EMAIL_ADDRESS>Reland "Build iOS unittest target in unopt builds" (#44356)"" (#45346)" (flutter/engine#45519)
2023-09-12<EMAIL_ADDRESS>Roll Skia from a4f8f5177c8b to 211d63b1e1f5 (2 revisions) (flutter/engine#45724)
2023-09-12<EMAIL_ADDRESS>Fix JS interop signatures to use only JS types. (flutter/engine#45668)
2023-09-12<EMAIL_ADDRESS>[ios] Fix testDeallocated failing locally.  (flutter/engine#45663)
2023-09-12<EMAIL_ADDRESS>[iOS] move arm64 builds to arm machines (flutter/engine#45721)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC bdero@google.com,rmistry<EMAIL_ADDRESS>on the revert to ensure that a human
is aware of the problem.
To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

AutoRoller is stopped; closing the active roll.


Missing Cordova plugins

After installing all required Cordova plugins from the package.json when doing ionic platform add ios, in actuality some of them are missing from the build.
By checking in Xcode -> Build Phases -> Compile sources there are some that are missing. Similarly, in the /Plugins directory the same ones are missing.
Doing a cordova plugins ls however, does list all plugins as if they were installed properly.
Any help would be appreciated!

I believe this is an ongoing issue with Cordova's CLI, which ionic is calling from their CLI.
Check this link to see if this sounds familiar.
https://issues.apache.org/jira/browse/CB-4971

Cordova plugin ls just lists the directories in the plugins directory.
Try out ionic state reset to get a fresh start, or remove platforms/plugins and re-adding them.


Help

Hey, it's possible that you make one for capsolver.com, they have the cheapest and fastest captcha solution of the whole market.
They can solve hcaptcha, recaptcha, amazon waf captcha, turnstile, kasada, akamai, funcaptcha, datadome captcha, geetest etc...
Also you can check their documentation here: https://docs.capsolver.com/

Hello, already checked the docs, please have a look into CustomServiceUrl.


Provide list or dashboard of Dependabot findings per team

Is there an existing issue for this?

[X] I have searched the existing issues

Feature description
Hi,
I know Dependabot currently provides an option to see open Security Advisories for a particular GitHub repository. I also know it's possible to group them per ecosystem (for example Ruby bundler, javascript, etc.)
For us however, it would be super beneficial to group open Security Advisories per teams within Github.
For context - we are currently looking into improving our Operational Excellence and want to have a generic dashboard within DataDog, that includes open security vulnerabilities. We want to have those operational excellence dashboards per team, with their own business metrics but also having some generic bits all teams should have - like open Security Advisories being one of them.
Having a link for example like this, that we could put into our DataDog dashboard:
https://github.com/[organisation]/[team]/security/dependabot
with a list of open Dependabot issues grouped per team in Github, would be greatly beneficial!
I hope what I wrote and described makes sense, please let me know if further clarification is needed!

Great feedback, but this is the wrong place to post this request... this shows the better place to request it: https://github.com/dependabot/dependabot-core?tab=readme-ov-file#dont-file-issues-about-security-alerts-or-dependency-graph
See also the one exception we've made so folks have a centralized place to discuss:

https://github.com/dependabot/dependabot-core/issues/2936


Added OCaml Support

Added support for the OCaml language, image can be found here: https://andrewshitov.com/wp-content/uploads/2019/12/OCaml.png

@adityaxdiwakar could you provide an image with a minimum size of 512x512 ?

Mention me when you can provide one

@hugolgst found one: https://github.com/ocaml/ocaml-logo/blob/master/Colour/PNG/colour-icon.png


78: check HAXM

@omen273 could you please provide an example of how better to add a timeout to the test classes?

@omen273 could you please provide an example of how better to add a timeout to the test classes?

See BadCrosswordDataTest and retryTestRule. So add rule to existing base class if it is possible

moved to succesor PR https://github.com/omen273/crosswordApp/pull/180


heterotachy.py error

Hello, I have been trying to use the heterotachy.py script (phylofisher v1.2.14):
heterotachy.py -tr matrix_FULL.fa.treefile -m matrix_FULL.fa -s 2216
*.treefile is the output tree from iqtree2
matrix_FULL.fa is the original matrix constructed at the end of the phylofisher workflow
However, here is what happens when I try to run it:
Traceback (most recent call last):
  File "/opt/Anaconda3/envs/fisher_1.2.14/lib/python3.7/site-packages/ete3/coretype/tree.py", line 235, in __and__
    first_match = next(self.iter_search_nodes(name=value))
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/Anaconda3/envs/fisher_1.2.14/bin/heterotachy.py", line 289, in <module>
    series, size = get_branch_lens()
  File "/opt/Anaconda3/envs/fisher_1.2.14/bin/heterotachy.py", line 93, in get_branch_lens
    node2 = tree & taxon2
  File "/opt/Anaconda3/envs/fisher_1.2.14/lib/python3.7/site-packages/ete3/coretype/tree.py", line 238, in __and__
    raise TreeError("Node not found")
ete3.coretype.tree.TreeError: 'Node not found'

I have used the same data for the fast_site_removal.py script, and that one worked perfectly.
Any idea why this happens? Thanks

Hi @thesamuanels,
I suspect there may be an issue with your tree file. Do you mind sharing your tree file and matrix so I can try to reproduce the error?
Best,
Robert


Typescript withStyles Drawer issue

Not sure if a issue or something I am not understanding. Trying to get a simple Typescript drawer withstyles example to work when trying to added variant and classes props to drawer. Receiving ts errors

[x] I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Current Behavior

Property 'variant' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Drawer> & Readonly<{ children?: ReactNode; }> & Re...'.
Property 'classes' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Drawer> & Readonly<{ children?: ReactNode; }> & Re...'.

Steps to Reproduce (for bugs)

import * as React from 'react';
import withStyles, { WithStyles } from 'material-ui/styles/withStyles';
import AppBar from 'material-ui/AppBar';
import Toolbar from 'material-ui/Toolbar';
import Typography from 'material-ui/Typography';
import Drawer from 'material-ui/Drawer';
import Divider from 'material-ui/Divider';

const drawerWidth = 240;

const decorate = withStyles(() => ({
  root: {
    flexGrow: 1,
  },
  drawerPaper: {
    position: 'relative' as 'relative',
    width: drawerWidth,
  },
}));

const DecoratedNoProps = decorate<{}>(
  class extends React.Component<WithStyles<'root' | 'drawerPaper'>, {}> {
    constructor(props: WithStyles<'root' | 'drawerPaper'>) {
      super(props);
    }

    render() {

      const { classes } = this.props;

      return (
        <div className={classes.root}>
          <AppBar style={{ position: "static", color: "default" }}>
            <Toolbar>
              <Typography variant="title" color="inherit" >
                Title
          </Typography>
            </Toolbar>
          </AppBar>
          <Drawer
           variant="permanent"
            classes={{ paper: classes.drawerPaper }}
          >
            <Divider />
          </Drawer>

        </div >
      );
    }
  }
);

export default DecoratedNoProps;

Context

Your Environment

Tech
Version

Material-UI
"^0.21.1

React
^16.2.

typescript
^2.7.2

@KevinKuntz Can you check the installed version of Material-UI?
This version doesn't exist. You most likely want to rely on v1.0.0-beta.37.

Thanks it appears that updating my Material-UI appears to have solved isse


Transparently handle essential boundary conditions in PetscSolver and give the user a callback to construct preconditioners [handle-essbc-and-preconditioners]

Allows the user to create an helper object to handle essential boundary conditions, without the burden to zero rows and columns, change the rhs and so on. This is consistently handled by the private routines that create the Jacobian and evaluate the current residual. I have a student already using this branch. We will commit an example later in a different branch.
The helper object needs to provide the Eval method to compute the values of the boundary conditions at a given time (returned in a Vector of size tdofs); an internal caching mechanism is in place to prevent calling the method if not needed.
The user can also handle the creation of a preconditioner inside a time-dependent or nonlinear simulation.

@stefanozampini, is this similar to how boundary conditions are handled on Operator level in https://github.com/mfem/mfem/blob/master/linalg/operator.hpp#L100?

It's similar, but it is done at the level of the nonlinear and ODE solvers (I can add it to the linear solver class too). I have tested the implementation with a time-domain maxwell solver (with time-dependent bc), not yet with a nonlinear one.
basically, you sample jacobians and residuals strongly imposing the correct values of the boundary conditions. Below is my source of inspiration ...you may know the author...  This is a trick that I have always used, even with ODE solvers, since it is quite natural from within the PETSc framework (TS)
https://scicomp.stackexchange.com/questions/3298/appropriate-space-for-weak-solutions-to-an-elliptical-pde-with-mixed-inhomogeneo

I decided to add this new feature of PetscPreconditionerFactory on top of the essential-bc work.
This branch will require some more days of testing from me before it could be merged.

I merged to next. Should be ready to be merged to master

@stefanozampini, the workflow is to wait for all approvals before merging into next :)

@tzanio sorry for that. Won't happen again :-(

no worries... our fault for not having CONTRIBUTING.md to clarify this


WIP: Making incoming webhook docs easier to follow

Closing this PR as the Incoming Webhooks documentation has been improved in the past year or so: https://docs.mattermost.com/developer/webhooks-incoming.html?highlight=incoming webhook


doc: customcluster kube-vip HA mode

What type of PR is this?
/kind documentation
-->
What this PR does / why we need it:
doc of #
Which issue(s) this PR fixes:
Fixes #224
Special notes for your reviewer:
Does this PR introduce a user-facing change?:

/lgtm


new piRNA terms

After various meetings within the miRNA working group, we now have the following terms:

miRNA-mediated gene silencing
siRNA-mediated gene silencing
sRNA-mediated gene silencing

It would be good to have a "piRNA-mediated gene silencing" as well, and since they seem to have an important role in flies, it would make sense for us to request that term (and corresponding child terms).
This ticket is in place to collect info for this task, and discuss potential new terms and definitions.
Useful literature to start with:
PMID: 20080197, "piRNA-mediated silencing in Drosophila germlines", 2010 (https://pubmed.ncbi.nlm.nih.gov/20080197/)
PMID: 28964526, "piRNA Biogenesis in Drosophila Melanogaster", 2017 (https://pubmed.ncbi.nlm.nih.gov/28964526/)

piRNA- and siRNA-mediated transcriptional repression in Drosophila, mice, and yeast: new insights and biodiversity. https://pubmed.ncbi.nlm.nih.gov/34347367/

See https://github.com/FlyBase/GO-curation/issues/23


wireframe

Learners, PR Template
Self checklist

[ ] I have committed my files one by one, on purpose, and for a reason
[ ] I have titled my PR with COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK
[ ] I have tested my changes
[ ] My changes follow the style guide
[ ] My changes meet the requirements of this task

Changelist
Briefly explain your PR.
Questions
Ask any questions you have for your reviewer.

WM_5_MAZAFER_UL_RAQIB_WIREFRAME_WEEK1

Checklist item #2 I have titled my PR with COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK


Integrated terminal mouse reporting not working

VSCode 1.44.2
macOS 10.14.6

Steps to Reproduce:

Open a file in vim by running vim <file> in the integrated terminal
Type :set mouse=a and press enter, to enable mouse reporting
Now, selecting text in the file you opened does not work

This apparently does not affect tmux.

Does this issue occur when all extensions are disabled?: Yes

tmux mouse events are working fine for me:

Version info:
Version: 1.45.0-insider
Commit: a250df703de955a38aed427a917bce8278ab3331
Date: 2020-04-24T20:46:59.782Z
Electron: 7.2.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 19.0.0

@Tyriar My bad, I haven't tested this on tmux or emacs. I thought mouse reporting just wasn't supported at all, but that's clearly not the case. Updated the issue description.
Were you able to reproduce the issue in vim?

@Tyriar My bad, I haven't tested this on tmux or emacs. I thought mouse reporting just wasn't supported at all, but that's clearly not the case. Updated the issue description.
Were you able to reproduce the issue in vim?

You're right it doesn't seem to be working for vim only. @jerch maybe a bug with the mouse protocol changes? 🤔
When entering vim:
xterm.js: Binding to mouse events: {down: true, up: true, drag: true, move: false, wheel: true}

Some clicks that don't seem to do anything:
xterm.js: sending binary " #"" (6) [27, 91, 77, 32, 35, 34]
xterm.js: sending binary "##"" (6) [27, 91, 77, 35, 35, 34]

xterm.js: sending binary " */" (6) [27, 91, 77, 32, 42, 47]
xterm.js: sending binary "#*/" (6) [27, 91, 77, 35, 42, 47]

tmux which works fine:
xterm.js: Binding to mouse events: {down: true, up: true, drag: true, move: false, wheel: true}

xterm.js: sending data "[<0;31;8M" (10) [27, 91, 60, 48, 59, 51, 49, 59, 56, 77]
xterm.js: parsing data │││││││││││││││││││││││││(B
xterm.js: sending data "[<0;31;8m" (10) [27, 91, 60, 48, 59, 51, 49, 59, 56, 109]

@Tyriar  vim works fine for me in xterm.js demo. Does vscode forward binary event data from onBinary?

@jerch that must be it, onBinary was never adopted.

htop mouse click also doesn' t work. Is it the same problem?

@xgdgsc Well for me (Ubuntu 18 LTS) htop reports with the old mouse encoding, so yes. Imho it is built with ncurses, its terminfo states SGR mouse for vscode terminal. So sure when this was added, is it might be an issue with an older ncurses version on your and my system.
@Tyriar Guess we should fix the DA responses soon, and maybe reach out to @ThomasDickey about a better fitting terminfo entry?

@jerch oh would removing the termName reports for https://github.com/xtermjs/xterm.js/issues/2894 move it back to the older encoding?

Well it seems apps and libs like ncurses have a hard time to figure out what terminal xterm.js is, it seems they go for "safe denominator" which switches off SGR mouse reports for us currently (thats what happens in vim above). This is also the reason why I wrote the DA issues after inspecting the vim source.
About a valid terminfo entry - that would help ncurses and similar libs alot to get along with xterm.js. The current entry looks abit like a stub: https://invisible-island.net/ncurses/terminfo.src.html#toc-_Visual__Studio. Also it points to some issues we had in the past, some of them are already fixed.

I recall that there was a Debian bug report where the Debian developer decided to disable SGR-mouse to simplify use on older systems.  This report appears to be a result of that. If you'd like your program to be portable, it has to handle either mode.

@ThomasDickey The terminal supports X11 reports up to the upper bound (beyaond that will stop reporting anything) and SGR. We removed "UTF-8" and "rxvt" support after some discussions about app usage and decided to go with SGR only for higher coords. So yes, the terminal support X11 and SGR mouse encoding.
Care to explain the downvote?

Your comments might have been constructive if they had been part of a regular bug report.  In this context, they weren't constructive.

Actually, I took a quick look with the current Visual Studio Code, and the any-event report in normal (non-1006) did not appear to work.  So I added a to-do item to review that version, and add notes as they apply to that terminal description.

@ThomasDickey Ah sorry, my note about the terminfo wasnt meant to offend your hard work on it (I only can imagine how awful it is to test against all those lousy emulators popping up) -  it was meant as an idea idea to help to keep the entry up to date. The terminal is still subject of man shifts, which makes it hard to pin it down. Same does for my DA notion, the emulator does some weird things internally we had a discussion about before. All I am saying - we  should fixate that to some reliable values. From my perspective this is well ontopic, because the initial report was about vim, which delies on DA reports (while htop relies on ncurses).

I see.  Will update later, if I find something that helps with this report.

The terminal in Visual Studio Code 1.45.0 does nothing when the xterm mouse-mode is set to the default (the original mode).  I see this using vttest, which shows me that mouse-mode is only sending events when the "Mode" is set to "SGR coordinates".
While ncurses 6.1 changed the description for xterm-256color to use "SGR coordinates" (1006), older versions of the terminal database (such as that bundled with MacOS) do not have this change, because they have not been updated for a long time.
Debian (and Ubuntu) do not, for a different reason: the packagers modify the terminal database distributed with ncurses by pasting in other entries (including replacing the xterm entries with the source from xterm).  None of those modifications improves the terminal database, but the replacement of xterm-entries further delays by a year or so the availability of the 1006 mouse mode. I modified xterm's source later, to incorporate changes I'd made for ncurses 6.1, which won't help with problems using bionic (Ubuntu 18).

@Tyriar is the onBinary hookup for mouse support something I can do without a ton of hand holding? Would really love to get mouse support in vscode terminal. It would open up gateway to build truly interactive terminal apps.

@Tyriar is the onBinary hookup for mouse support something I can do without a ton of hand holding? Would really love to get mouse support in vscode terminal. It would open up gateway to build truly interactive terminal apps.

@Tyriar For my own sanity, what is the difference between onData and onBinary? I'd assume the onData would be the raw binary data stream. For my own deeper understanding, is there an architecture page that describes how xterm <-> vscode architecture works? If not that is fine too. The topic interests me that's all.

@Tyriar For my own sanity, what is the difference between onData and onBinary? I'd assume the onData would be the raw binary data stream. For my own deeper understanding, is there an architecture page that describes how xterm <-> vscode architecture works? If not that is fine too. The topic interests me that's all.

@nojvek some data is not extra expressible via JS strings because of how they are encoded, some mouse events include that. I think the introduction of onBinary fixed some obscure bugs with certain mouse events not working, but now they use onBinary and actual bytes are passed around.

@nojvek some data is not extra expressible via JS strings because of how they are encoded, some mouse events include that. I think the introduction of onBinary fixed some obscure bugs with certain mouse events not working, but now they use onBinary and actual bytes are passed around.


⚠ NCAA has degraded performance

In 1f674d6, NCAA (https://www.ncaa.com) experienced degraded performance:

HTTP code: 200
Response time: 805 ms

Resolved: NCAA performance has improved in ebf83dd.