Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 16 2020 16:44
    devoncarew closed #1200
  • Mar 16 2020 09:25
    mit-mit opened #1200
  • Oct 29 2019 20:17
    dependabot[bot] labeled #1197
  • Oct 29 2019 20:17
    dependabot[bot] opened #1197
  • Sep 05 2019 17:06
    devoncarew closed #1194
  • Sep 05 2019 16:31
    DanTup edited #1194
  • Sep 05 2019 16:31
    DanTup edited #1194
  • Sep 05 2019 16:29
    DanTup opened #1194
  • Jan 15 2019 16:41
    devoncarew closed #1182
  • Jan 15 2019 16:28
    devoncarew opened #1182
  • Dec 19 2018 17:44
    devoncarew closed #1179
  • Dec 19 2018 16:43
    devoncarew opened #1179
  • Dec 19 2018 16:37
    devoncarew closed #1178
  • Dec 19 2018 16:32
    devoncarew synchronize #1178
  • Dec 19 2018 16:28
  • Dec 19 2018 16:25
    devoncarew opened #1178
  • Sep 05 2018 20:14
    Travis dart-atom/dart (master) errored (1382)
  • Sep 05 2018 20:13
    devoncarew closed #1173
  • Sep 05 2018 20:12
  • Sep 05 2018 20:11
    devoncarew opened #1173
Randal L. Schwartz
@RandalSchwartz
@ankush3375 ^^
Oh, and yeah, this is the dart-atom channel. definitely wrong. :)
Bhanuka Isuru
@bhanuka96
@bhanuka96
Anyone can explain this code
final listCount = values.map<double>((m) => m.p).reduce((a, b) => max(a, b)).floor();
and this code
final items = values .where((m) => i + 1 <= m.p && m.p < i + 2) .toList(growable: false) ..sort((a, b) => a.p.compareTo(b.p));
Sumanth Ratna
@sumanthratna
for the first one: listCount is a List of objects where each object has a certain property p.
  1. from the list, extract p from each object and discard all the other info stored in the objects.
  2. find the maximum element in the list of ps
  3. apply the floor function to the max
the most confusing part about that is probably https://api.dartlang.org/stable/2.2.0/dart-core/Iterable/reduce.html
Randal L. Schwartz
@RandalSchwartz
this isn’t really a question about dart-atom
@bhanuka96 ^^
Scott
@ScottS2017
Hello all.
Does Dart use Tail Call Optimization?
Bhanuka Isuru
@bhanuka96
what is BLoC pattern and Why we use it? can to explain very simple language..because I need to sent it my boss. he doesn't understand technical language
@RandalSchwartz what is dart-atom sir
Randal L. Schwartz
@RandalSchwartz
@bhanuka96 I would presume it’s this, although I don’t use it: https://atom.io/packages/dart
I use VSCode
Please don’t cross-post. It annoys people who answer, because we can’t see if you already got an answer somewhere else, so we waste our time.
and this question is also something you could answer with a few good googles
Bhanuka Isuru
@bhanuka96
okay sir I wont ask cross-post
can to answer my oop question? it's my homework problem
Randal L. Schwartz
@RandalSchwartz
I’m really ethically bound to not answer someone’s homework problem.
Bhanuka Isuru
@bhanuka96
okay sir
Green Appers, Inc.
@GreenAppers
Has anyone considered taking inspiration from C++11 move semantics for feature implementing moving objects between Dart isolates? (This is what we need for multithreaded apps)
Bhanuka Isuru
@bhanuka96
Unhandled Exception: Converting object to an encodable object failed: Photography
https://stackoverflow.com/q/56734067/9139407
Green Appers, Inc.
@GreenAppers
Android release builds of tweetnacl app made with Flutter v1.5.4-hotfix.2 have a devastating bug that causes the encryption to derive the wrong public key for a private key. I narrowed the issue down to the _pack25519 function after https://github.com/jspschool/tweetnacl-dart/blob/master/lib/src/tweetnacl_base.dart#L1503 Then it went Heisenbug. (After I added debugPrint()s to the rest of _pack25519 the issue stopped reproducing) It occurs only in release mode Android builds, not debug on the same device, and never on iOS. It doesn't occur with Flutter 1.7.8+hotfix.3.
Green Appers, Inc.
@GreenAppers
If anyone doing any crypto, I highly recommended that you run unit tests on objective test vectors in your app. Some bugs will only show up in release builds.
That's how I'm moving forward. Not abandoning Dart yet, but running unit tests in my app on startup.
based on the fact that placement of debugPrints changes the result of arithmetic calculations, I'd say this has to be a Dart bug. maybe even an already fixed bug since it doesn't happen with 1.7. that's not to say it won't be back with 1.9, it could not really be fixed but just hibernating under random conditions of the release
Green Appers, Inc.
@GreenAppers
Btw just for reference, I put the above comments into a bug here: jspschool/tweetnacl-dart#3 I can still reproduce the issue (only on Android devices) so maybe eventually we'll figure out if it's been certainly fixed.
sahar jadoa
@sahar_jadoa_twitter
Hello All
sahar jadoa
@sahar_jadoa_twitter
I am using stripe_js package, I am trying to Send optional elements (name, address_line1, address_city ...) when creating the token.
I have been trying to attach optional fields when creating the token but still can't find the solution.
The issue came when we try to upgrade from stripe_js v2 to v3. I implemented the code same way here in repo here https://github.com/apptreesoftware/stripe_js/tree/master/example
And worked fine, but I tried to attach those elements when create the token
Future getToken(form, [tokenData]) async {
    form.addEventListener(
    'submit',
    allowInterop((event) {
      event.preventDefault();

      Map options = new Map();
      options["name"]  = 'Sample';
      options["address_line1"] = 'street 1234';
      options["address_country"] = 'US';

      dynamic extraOptions = JSON.encode(options);

      stripeElement.createToken(card, JSON.decode(extraOptions)).then(
        allowInterop((result) {
          if (result.error != null) {
            // Inform the user if there was an error
            var errorElement = document.getElementById('card-errors');
            errorElement.text = result.error.message;
          } else {
            // Send the token to your server
            _token.add(result.token.id);
          }
        }),
      );
    }),
  );
  }

I used JSON encode and decode to avoid exception

TypeError: Converting circular structure to JSON

However the code above did generate the token with (card number, cvc, exp-date and postal code) but not the other fields!

Would you please help me on this?

sahar jadoa
@sahar_jadoa_twitter
note that I am using https://js.stripe.com/v3/
bahariFatemeh
@bahariFatemeh
Hi,are there pointer variables in dart? Would you give me docs about it please?
Randal L. Schwartz
@RandalSchwartz
what do you mean “pointer variable”?
bahariFatemeh
@bahariFatemeh
@RandalSchwartz variables that point to variable FE in c++ , double *a , compiler give it 4 byte and when we write a=new double, a
a refer to 8 free bytes of ram .
Green Appers, Inc.
@GreenAppers
Is there anyway to read Stdin one character at a time?
As in not line buffered. I think on many OS that might mean a call to tcsetattr() and/or a call putting pty in raw mode. I don't see that anything like that is available.
Randal L. Schwartz
@RandalSchwartz
This channel is about dart-atom, not dart in general.
I think you want dart-lang/sdk
Green Appers, Inc.
@GreenAppers
Ah, sorry. Thanks!
Glenn Michael Mejias
@glennmichaelmejias
what do you call the double dot in dart?
Paint()..strokeWidth=2..color=Colors.black
what is it called? or the term?
thanks
in advance
Randal L. Schwartz
@RandalSchwartz
Cascade. But this isn't a question about the dart plugin for atom.
Glenn Michael Mejias
@glennmichaelmejias
@RandalSchwartz what do you mean about the isn't a question about the dart plugin for atom?
Randal L. Schwartz
@RandalSchwartz
It's a general Dart question.
Scott
@ScottS2017
I just logged into Gitter after a long time away and I see this is now Dart-atom? I'm still subscribed to it as dartlang. Where are we sending general dart questions now?
and I thought sdk was for contributors?