Add "my changes" to the article

my changes:

capatilize 'T' for "title" on line #1
change localetitle to "العنوان" on line #3
change "الاعداد العائمة" to "الاعداد العشرية" on line #14
change "الشخصيات" to "الرموز" on line #15
change "اكتب منطقي" to " القيم المنطقية" on line #16
change "سلبية و ايجابية" to " سالبة و موجبة" on the second line on line #22
add (byte) on line #24, to clairfy more
added translation on lines 28-36
added (short) on line #39
added translation on lines 41-51
changed "الباحث" to "العدد الصحيح" and added (integer) on line #54
added translation on lines 58-66
add (long) on line # 69
added transaltion on lines 73-81
change "ارقام عائمة" to " اعداد عشرية" on line #87
added (float) on line #91
added translation from line 95-112
added (double) on line #115

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the master branch of freeCodeCamp.
[x] None of my changes are plagiarized from another source without proper attribution.
[x] My article does not contain shortened URLs or affiliate links.

If your pull request closes a GitHub issue, replace the XXXXX below with the issue number.
Closes #XXXXX

I hope that my changes will be added to the explanation of data types to make it more informative

Thank you for your contribution to the page! 👍
We're happy to accept these changes, and look forward to future contributions. 🎉


ThirdPartyResource clients use AC namespace

This change is

Reviewed 3 of 3 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable

Fixes #192

Reviewed 7 of 7 files at r2.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable

Review status: all files reviewed at latest revision, 1 unresolved discussion.

cmd/get-status.go, line 42 at r2 (raw file):

	}

	c, err := client.New(url, nil)

I'd really like to see separate client.NewForNamespace(url) here and to not use pointers to ns string. I do believe that nil as marker of absent parameter should be avoided whenever possible. Otherwise cod looks good.

Comments from Reviewable

Review status: 3 of 5 files reviewed at latest revision, 1 unresolved discussion.

Comments from Reviewable

Reviewed 3 of 7 files at r2, 3 of 4 files at r3.
Review status: all files reviewed at latest revision, 1 unresolved discussion, some commit checks failed.

Comments from Reviewable


WIP: support platforms other than AMSR2

Declining in favor of https://github.com/nsidc/seaice_ecdr/pull/94. Better branch name.


Using the interface to extract frames

Hi. Thank you for your work. I'm trying to use the interface to extract the frames from the videos, which I placed in JAAD\JAAD_clips. I'm giving the root folder (\JAAD) as the data path, but the images are not being extracted to the images folder. The images folder and sub-folders are all created normally but the frames are saved in the root folder. And only the frames for video 1 are saved, while the rest aren't.
Could this be a Windows issue?

Hello, am facing the same problem. Were you able to solve it? Should I modify the "extract_and_save_images" function within jaad_data.py?

Hi @Christoph9402,
Are you getting any errors? What is your directory structure? What are you providing as the jaad_path?
I just tested the code for extraction provided in the README and it worked for me.
This is my directory structure:
JAAD
            JAAD_clips
            annotations
            ...

jaad_path is the absolute path to the top JAAD directory (e.g. /home/user/JAAD).
If you are still having trouble, you can also try using the bash script. It does the same thing.

I used the bash script on Google Colab and it worked @Christoph9402

Thanks for the replies, I found a way to make it work :)

Hi Christoph, I'm glad to hear that you made it work! Could you please share your solution?

It seems the line 202 is wrong.
https://github.com/ykotseruba/JAAD/blob/cbae4329df2e3b3cf653eade493c5f647c126d10/jaad_data.py#L202
It should be img_path = join(save_images_path, "{:05d}.png".format(frame_num)).

Thank you @johnny12150, this does seem to be an issue. I pushed the changes.


the comment in cpp file can't align with chinese character

VSCode Version: Code 1.14.2 (cb82febafda0c8c199b9201ad274e25d9a76874e, 2017-07-19T23:34:09.706Z)
OS Version: Windows_NT ia32 10.0.15063
Extensions:

Extension
Author (truncated)
Version

logcat
abh
0.0.7

code-gnu-global
aus
0.2.2

GBKtoUTF8
buk
0.0.2

compulim-vscode-dictionary
Com
0.0.5

xml
Dot
1.9.2

java-debug
DSn
0.0.2

vscode-javac
geo
0.0.46

CppSnippets
har
0.0.12

start-git-bash
McC
1.2.1

vscode-csscomb
mrm
4.0.1

cpptools
ms-
0.12.2

PowerShell
ms-
1.4.1

vscode-icons
rob
7.12.0

vscode-header-source
ryz
1.1.0

code-settings-sync
Sha
2.8.2

guides
spy
0.8.4

java-imports-snippets
tus
0.0.1

java-snippets
tus
0.0.1

cmake
twx
0.0.17

vscode-react-native
vsm
0.4.1

change-case
wma
1.0.0

plsql-language
xyz
1.0.4

vscode-proto3
zxh
0.1.2

see the attach pic：

but view it in other editors, it's Ok.
source code:
match_processors.zip

Please use a fixed width font where all characters have the same width.

Sorry, I can't find the setting.

You can find the font setting here:


Add flags to the toptimes

I hope Mr. SDK would help with this once he'll get a free time, since toptimes it's his script and I have no idea how it works.

Robson. may be able to help with this. He did it for CrF (rip) server.

 Challenge accepted


Update to current docker files as used in the integration tests

The two code generators used for the GraphQL server and for the single page application have integration test suites that use Docker to run the tests.
The respective Docker files are more up to date than those within this Starter-Pack. Please update the files accordingly.
Expected work time: 2h

Closed for a long time ago


About mouse "Sensitivity"

Hello,
I have successfully checked "Disable cursor acceleration & sensitivity".
Using two monitors of 1080p and 4K (both 27"), I'm constantly doubling or halving my DPI (with Logitech app) to keep the same speed in real life.
I would like to add back just a bit of Acceleration only (let's say 0.3), however now Sensitivity is altering my mouse speed (even when Acceleration is set to 0).
So what does Sensitivity mean ?
It looks like a DPI multiplier but why doesn't it act linear ?
Is there a neutral value or a way to disable it while keeping a bit of Acceleration ?
Thank you for helping me :)

Thank you for your feedback!
In v0.6.0-beta.6, I normalized cursor sensitivity and made it linear. Would you like to check if LinearMouse now works as you expected? You may upgrade LinearMouse to that version by checking "Include beta" in the Preferences.

Nice ! Well actually now I'm used to 0 acceleration and not sure anymore if I want some back, getting rid of my addiction thanks to you :)

Since v0.6.0 has been out for a few weeks and no one has reported any issues, I'll close this issue.
Feel free to reopen this issue if you have further questions. :)

In MacOS, in order to completely disable mouse acceleration you should set mouse sensitivity to 0 in MacOS Settings. Then you just can play with DPI of your mouse to get more comfortable mouse sensitivity. No additional software required for this (except, possible, mouse specific).
I've used LiearMouse for turning off mouse acceleration, then I got to know that it can be disable in MacOS itself.


Fixes for framework support

Added a few fixes to get rid of warnings/errors when built as a framework with cocoapods.
Bumped version since I'll need a new pod released.
See https://github.com/wordpress-mobile/WordPress-iOS/issues/4434
Needs Review: @jleandroperez

@koke thanks a lot for the PR sir!
:shipit:


Fix issues with our custom release of Express-PouchDB

We currently use a custom release of Express-PouchDB because the master release (from PouchDB-Server's monorepo) is on the floor. We have run into some bugs when using the latest versions of PouchDB there and so we are using an older version but that older version has its own problems. So we really need to fix the issues with master so we can run on the latest.

Closing in favor of #1464


[BEAM-121] Add DisplayData for combine transforms

Moved to apache/incubator-beam: https://github.com/apache/incubator-beam/pull/126


Invalid locale 'mk_MK' for Macedonian language

Steps to Reproduce

Creating a custom locale 'mk_MK' for Macedonian (unsupported by default) by using this official example. Ends up looking like this
Adding the delegate to localizationsDelegates like this

Logs
E/flutter ( 8700): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: Invalid argument(s): Invalid locale 'mk_MK'
E/flutter ( 8700): #0      Intl._throwLocaleError (package:intl/intl.dart:240:5)
E/flutter ( 8700): #1      Intl.verifiedLocale (package:intl/intl.dart:234:21)
E/flutter ( 8700): #2      new DateFormat (file:///Users/gjavonovski/lib/flutter/.pub-cache/hosted/pub.dartlang.org/intl-0.15.7/lib/src/intl/date_format.dart:246:20)
E/flutter ( 8700): #3      _MkMaterialLocalizationsDelegate.load (package:mojvozduh_flutter/localization/MkMaterialLocalizationDelegate.dart:23:30)
E/flutter ( 8700): <asynchronous suspension>
E/flutter ( 8700): #4      _loadAll (package:flutter/src/widgets/localizations.dart:57:49)
E/flutter ( 8700): #5      _LocalizationsState.load (package:flutter/src/widgets/localizations.dart:508:62)
E/flutter ( 8700): #6      _LocalizationsState.didUpdateWidget (package:flutter/src/widgets/localizations.dart:497:7)
E/flutter ( 8700): #7      StatefulElement.update (package:flutter/src/widgets/framework.dart:3879:58)
E/flutter ( 8700): #8      Element.updateChild (package:flutter/src/widgets/framework.dart:2748:15)
E/flutter ( 8700): #9      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3747:16)
E/flutter ( 8700): #10     Element.rebuild (package:flutter/src/widgets/framework.dart:3559:5)
E/flutter ( 8700): #11     ProxyElement.update (package:flutter/src/widgets/framework.dart:4006:5)
E/flutter ( 8700): #12     Element.updateChild (package:flutter/src/widgets/framework.dart:2748:15)
E/flutter ( 8700): #13     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3747:16)
E/flutter ( 8700): #14     Element.rebuild (package:flutter/src/widgets/framework.dart:3559:5)
E/flutter ( 8700): #15     StatefulElement.update (package:flutter/src/widgets/framework.dart:3894:5)
E/flutter ( 8700): #16     Element.updateChild (package:flutter/src/widgets/framework.dart:2748:15)
E/flutter ( 8700): #17     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3747:16)
E/flutter ( 8700): #18     Element.rebuild (package:flutter/src/widgets/framework.dart:3559:5)
E/flutter ( 8700): #19     ProxyElement.update (package:flutter/src/widgets/framework.dart:4006:5)
E/flutter ( 8700): #20     Element.updateChild (package:flutter/src/widgets/framework.dart:2748:15)
E/flutter ( 8700): #21     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3747:16)
E/flutter ( 8700): #22     Element.rebuild (package:flutter/src/widgets/framework.dart:3559:5)
E/flutter ( 8700): #23     StatefulElement.update (package:flutter/src/widgets/framework.dart:3894:5)
E/flutter ( 8700): #24     Element.updateChild (package:flutter/src/widgets/framework.dart:2748:15)
E/flutter ( 8700): #25     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3747:16)
E/flutter ( 8700): #26     Element.rebuild (package:flutter/src/widgets/framework.dart:3559:5)
E/flutter ( 8700): #27     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2273:33)
E/flutter ( 8700): #28     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:700:20)
E/flutter ( 8700): #29     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:268:5)
E/flutter ( 8700): #30     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:988:15)
E/flutter ( 8700): #31     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:928:9)
E/flutter ( 8700): #32     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:840:5)
E/flutter ( 8700): #33     _rootRun (dart:async/zone.dart:1124:13)
E/flutter ( 8700): #34     _CustomZone.run (dart:async/zone.dart:1021:19)
E/flutter ( 8700): #35     _CustomZone.runGuarded (dart:async/zone.dart:923:7)
E/flutter ( 8700): #36     _invoke (dart:ui/hooks.dart:209:10)
E/flutter ( 8700): #37     _drawFrame (dart:ui/hooks.dart:168:3)

Nothing connected in flutter analyze output
[✓] Flutter (Channel stable, v1.2.1, on Mac OS X 10.14.4 18E227, locale en-NL)
    • Flutter version 1.2.1 at /Users/gjavonovski/lib/flutter
    • Framework revision 8661d8aecd (3 months ago), 2019-02-14 19:19:53 -0800
    • Engine revision 3757390fa4
    • Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/gjavonovski/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /Users/gjavonovski/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[!] iOS toolchain - develop for iOS devices (Xcode 10.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.2.1, Build version 10E1001
    • ios-deploy 1.9.4
    • CocoaPods version 1.6.0

[✓] Android Studio (version 3.4)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 35.2.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[✓] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)

Thanks for the report; we'll look into it.

I got the same issue, invalid locale ml_IN for Malayalam language. I also follow official example from flutter website as jovanovski said above and the logs are same.

I have a temporary, but unsustainable workaround:
  @override
  Future<MaterialLocalizations> load(Locale locale) async {
    final String localeName = intl.Intl.canonicalizedLocale(locale.toString());
//    await intl.initializeDateFormatting(localeName, null); // Make sure to comment this out if following the official guide otherwise you will encounter random failures with "Cannot write to unmodifiable Map" error
    return SynchronousFuture<MaterialLocalizations>(
      MkMaterialLocalizations(
        localeName: localeName,
        fullYearFormat: intl.DateFormat('y', "en_US"), // Changed here from "mk_MK" to "en_US" or any other supported locale
        mediumDateFormat: intl.DateFormat('EEE, MMM d', "en_US"), // Same here
        longDateFormat: intl.DateFormat('EEEE, MMMM d, y', "en_US"), // Same here
        yearMonthFormat: intl.DateFormat('MMMM y', "en_US"), // Same here
        decimalFormat: intl.NumberFormat('#,##0.###', "en_US"), // Same here
        twoDigitZeroPaddedFormat: intl.NumberFormat('00', "en_US"), // Same here
      ),
    );
  }

Not all libraries like this, so an official fix would be much better.

Thank you @jovanovski. the temporary workaround is OK. Yeah like you said an official fix would be much better.

I've tried your app, albeit with a main that specified supportedLocales, and did not encounter any problems: https://gist.github.com/HansMuller/b357cbf7c04d4e7c24411ba1ec675973.
The app's pubspec.yaml includes a dependency on the Dart intl package (version 0.15.8) and the flutter_localizations package:
dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    sdk: flutter
  intl: 0.15.8

I'm running on the current "tip of tree" version of Flutter.

The problem occur when changing the language while running the application. otherwise no problem.

could you check this one app it shows error alternatively. first time shows error then select same language again no problem.

I wasn't able to see the app at https://bitbucket.org/akhilpaulnp/app_localization/src/master/. After a couple of refreshes and retries I still get:

Having trouble showing that directory
Normally, you'd see the directory here, but something didn't go right.

please do => git clone https://bitbucket.org/akhilpaulnp/app_localization.git
and run the app and check the log. if you got any problem while clone the app please let me know. I will share it through any other medium.

I got the same issue implementing custom locale.
Workaround listed above works only in static (start application with any locale already selected), but doesn't work if app locale changed by user ("Cannot write to unmodifiable Map" error).

@totalerex Did you remove await intl.initializeDateFormatting(localeName, null); this line?
@HansMuller Do you think we'll have any updates on this soon?

@jovanovski , yes i tried this way,
but I also need date/number formatting for my locale already present in intl package, I need user option to change locale, so...
If we can fix/workaround "Cannot write to unmodifiable Map" exception it would be also OK, as for me.
I have created more generic bug - #33375 , there are some investigations and my current workaround described.

This is really causing some issues, now on locales such as mk I have to force en_US dates which look bad :(

Could this be related issue (different locale though):
Invalid argument(s): Invalid locale 'be_BY'
Intl._throwLocaleError (Intl.java:239)
Intl.verifiedLocale (Intl.java:233)
Intl.verifiedLocale (Intl.java:218)
DateTimeFormatter.init:_shortDateFormat (DateTimeFormatter.java:4)
DateTimeFormatter.get:_shortDateFormat (DateTimeFormatter.java:4)
DateTimeFormatter.toShortDateString (DateTimeFormatter.java:20)

I found this from my Crashlytics errors (so it happens on end user's device).
Exception occurs in my code here:
class DateTimeFormatter {
  static final _shortDateFormat = DateFormat.yMd();
...

Yes it is! It's just an unsupported locale in Flutter.
This is really giving my app a bad user experience, since dates are now in en_US while the whole app is in another locale.
@HansMuller Is anything planned for this? Can I somehow help in adding the mk_MK locale to Flutter?

Hi @jovanovski,
mk_MK seems to be supported. Tried with current master 1.20.0-3.0.pre.142 - all strings are translated.

code sample
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';

void main() => runApp(MaterialApp(
  home: MyApp(),
  localizationsDelegates: [
    GlobalMaterialLocalizations.delegate,
  ],
  supportedLocales: [
    const Locale('en', 'US'),
    const Locale('mk', 'MK'),
  ],
  theme: ThemeData.light().copyWith(
    primaryColor: Colors.green,
  ),
));

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {

  @override
  Widget build(BuildContext context) {
    return SafeArea(
      child: Scaffold(
          body: Center(
              child: RaisedButton(
                child: Text("datepicker"),
                onPressed: () async {
                  await showDatePicker(
                    initialDatePickerMode: DatePickerMode.day,
                    context: context,
                    firstDate: DateTime.now().subtract(Duration(days: 36500)),
                    lastDate: DateTime.now().add(Duration(days: 36500)),
                    initialDate: DateTime.now(),
                    locale: Locale('mk', 'MK'),
                    builder: (BuildContext context, Widget child) {
                      return Theme(
                        data: Theme.of(context),
                        child: child,
                        isMaterialAppTheme: true,
                      );
                    },
                  );
                },
              )
          )
      ),
    );
  }
}

Closing as fixed. Please comment here or file a new issue if I'm wrong


Option for ordering in head? font faces loaded before fonts are loaded, results in annoying warning

Is there any option to define an order of the head stuff? Or to define specific stuff to be loaded at the end of head?
I have the problem, that i use vueuse/head for my font face definitions in style tag and also for preloading of the fonts.
But the font faces get loaded before the fonts. That results in following warning

Because there is no font face definition AFTER the font loading.
It can be fixed when the style tag with font face definition is at the very end of head. But i don't find a configuration how to achieve this with vueuse/head.
I think there are use cases where the order in the head can be important.
Note: using vueuse/head with SSR

maybe you can ensure for the ordering in the head that files with preloading come first?

@antfu I'm getting bit by this issue too.   I am inserting theme CSS files with useHead but they are ending up at the bottom of the head element, so they are overriding things like Tailwind.  Need some sort of option to put things at the top of the head in my case.

PR welcome and I will review.

See https://github.com/vueuse/head#render-priority
If you're server-side rendering then it should solve it. Feel free to re-open the issue if you need non-SSR support

@harlan-zw first... thank you!!! i think i need both, server side and client side support. When i check what's delivered by the server it's looking good, but than on client side it is still the other way round and still with the console warnings.

Hm okay thanks for the feedback, I'll re-open this
The issue why it's SSR only is that the patching nodes with ordering client side is not possible without doing some re-engineering of how the DOM updates work, I'll see what I can do

With any of the v1 RC versions, the client side can also be ordered.
Going to close, let me know if you have any issues with it.


Sort CSS output?

Otherwise, it appears that it's kinda random and the diffs are really weird. If they could be sorted then maybe they'd stay in the same place? It's unclear. I think that this could help with that though...

I think that this is no longer an issue.

@kentcdodds would it be possible to reopen this? I just integrated storyshots/storybook jest testing and I use this utility so my glamor css names are 'stable' between CI runs (awesome) but sadly I had to turn it off because I get diffs where the order of the .glamor-* changes
example:
 - .glamor-3,
    - [data-glamor-3] {
    -   font-size: 13px;
    -   line-height: 17px;
    -   color: rgba(0, 0, 0, 0.75);
    -   -webkit-font-smoothing: antialiased;
    -   text-rendering: optimizeLegibility;
    -   font-family: OpenSans;
    -   font-weight: 600;
    - }
    -
      .glamor-4,
      [data-glamor-4] {
        font-size: 13px;
        line-height: 17px;
        color: rgba(0, 0, 0, 0.75);
    @@ -58,10 +47,21 @@
        -webkit-flex-direction: row;
        -webkit-box-lines: multiple;
        -webkit-flex-wrap: wrap;
      }

    + .glamor-3,
    + [data-glamor-3] {
    +   font-size: 13px;
    +   line-height: 17px;
    +   color: rgba(0, 0, 0, 0.75);
    +   -webkit-font-smoothing: antialiased;
    +   text-rendering: optimizeLegibility;
    +   font-family: OpenSans;
    +   font-weight: 600;
    + }
    +

which causes my snapshot to fail

Huh, that's odd. I've not had any trouble with things for several months. It's surprising to me that you'd see this. I'm guessing that there's some sort of race condition that's leading to some styles getting registered with glamor earlier/later locally than it does on CI.
If you don't mind, could you fork this project and try sorting things and see how that works in your project? Then I'll try it out on mine and see whether this is something we should try.

I'll open the issue again if we decide to do something about it :+1:

hmm. So if i hand edit the file in my node_modules this works: (https://github.com/keybase/jest-glamor-react/pull/2) but trying to build it locally it fails for some reason. Anyways, thats my quick and dirty fix which does sort the output in ascending order instead of being kinda random. Not optimized but minimally invasive

Hmmm... That looks fine. But I'm still not 100% certain I want to do it. Could you figure out how to make it build locally. I'd love it if you could publish something to npm (@your-username/temp-jest-glamor-react or something) and I can try that out on my project to see how it goes.

ok i figured it out. I was trying to do this all inside my node_modules and installing with yarn to build the dist added some sub dependencies which freaked my project out.
so you should be able to change your package.json to use
    "jest-glamor-react": "git://github.com/keybase/jest-glamor-react#sort-styles-off-of-312",

and it should work

Ok, cool. I'll give it a try when I get some time.

@kentcdodds no rush, just a one-time gentle nudge
:)

Thanks for the nudge @chrisnojima. Sorry I haven't gotten to it yet. Now I'm on a long break. Not sure when I'll get to it. If you can have some other folks try it though and find it favorable then I'll merge it without trying it myself 👌

@chrisnojima
I had the same problem with emotion. The problem was that if the order of your tests somehow different (async, running single it() rather than whole test suite), then the order of styles will be different too.
I fixed it by using this:
const { sheet, flush } = require("emotion");

afterEach(() => {
    flush();
});

may it'll help

Ah yes, I have to do that with glamor as well 👍

Cool, finally got around to implementing this on our side and I think it does stabilize it. thanks!


Built-in functions (e.g. isFinite) type guard and accepting null | undefined (strictNullChecks)

TypeScript Version:  2.0.0
Code
// --strictNullChecks
interface IExample {
  value?: number;
}

let example: IExample = {};
if (isFinite(example.value)) { // Accept possibly `undefined`
  let a = example.value; // Narrow to `number`
}

Expected behavior:

isFinite should accept number | null | undefined rather than strictly number.
isFinite should act as a type guard.

Actual behavior:
Won't compile because isFinite is not accepting undefined and is not a type guard.
Proposal:
Change:
declare function isFinite(number: number): boolean;
To:
declare function isFinite(number: number | null | undefined): number is number;
I'm pretty sure there are other functions that could use the same love.
I don't mind putting in some hours if this is an accepted direction to take. Let me know :)

Be sure to read contributing.md for instructions on how to make lib.d.ts changes

isFinite(null) actually returns true (null gets coerced to 0)

isFinite(null) actually returns true (null gets coerced to 0)

JavaScript (╯°□°)╯︵ ┻━┻
It's probably best to not allow null, then?

isFinite('0') also returns true. Number.isFinite('0') returns false, but is only available in ES6 land.
Since these functions can take any type for input, I'd like to see the parameter type changed to any.

What are people passing a string to isFinite attempting to determine about that string?

For isFinite, I suppose the developer is trying to determine if the input can be coerced into a finite number.
For Number.isFinite, I am reading in an any and doing a runtime check to ensure the value is a finite number, so not NaN, Infinity, '0' or null.

any is the accurate representation of the spec. but we opted into making strict to catch cases more error cases, that otherwise would be masked by coercion, e.g. isFinite(getNumber) instead if isFinite(getNumber()). I suppose changing the type to number|string|null|undefined would be safer.

It would also be useful if it returned a type predicate.
isFinite(number: number|string|null|undefined): number is number;

@athasach it can't do that, because it coerces its argument. All isFinite (the global) tells you is if the coerced version of the argument parsed to a finite value; isFinite("30") is true but "30" is not a number

@RyanCavanaugh I should have specified Number.isFinite, which doesn’t coerce the value as far as I know.

Bumping this. According to the spec, Number.isFinite and similar Number do not throw, nor do they specify type constraints.
https://www.ecma-international.org/ecma-262/10.0/index.html#sec-number.isfinite
If Type(number) is not Number, return false.
If number is NaN, +∞, or -∞, return false.
Otherwise, return true.

That's it. Very simple. There are is no reason for this and similar functions to be constrained as such as these constraints do not follow the spec itself. This isn't a huge deal as it's easy to extend the types, e.g.
interface NumberConstructor {
  isFinite(v?: any): v is number
}

this can definitely be improved. for example when doing:
function secondsSinceX(x: number | undefined): number {
  if (Number.isFinite(x)) {
    assert(x > 1)
...
  }
...
}

typescript warns me about the x in the assert that Object is possibly 'undefined'. but x cannot possibly be undefined in this case.

typescript warns me about the x in the assert that Object is possibly 'undefined'. but x cannot possibly be undefined in this case.

I agree. Reported as a new issue here; https://github.com/microsoft/TypeScript/issues/43792

I use if (!Number.isFinite(myVar)) throw new Error("Wrong"); and typescript complains later that myVar could be undefined, but Number.isFinite() catches that in Javascript. It's a bug.
This issue https://github.com/Microsoft/TypeScript/issues/15527 was closed automatically but never fixed.

The problem is that type guard needs to work for all values of the specified type, not just a subset (otherwise you would get wrong narrowed type in the else branch, even though it could still be a number).
See this issue about better type guards that would allow it: https://github.com/microsoft/TypeScript/issues/15048

Can this be fixed please? Number.isFinite yielding true somehow makes TS think it might still be a number

@Juraj-Masiar Sorry, I just saw this.
I still don't understand, the Number.isFinite(myVar) still could never be undefined, and it still complains that it could be. Shouldn't TypeScript handle this natively, like it does with typeof, since it's a native function?
@monfera is having a similar problem.

The first half of the issue, at least for Number.isFinite, seems to be solved by now: it can take an unknown arg. Playground:
const n:unknown = "klkjl"

// expected to fail
console.log(n + 1) // squiggly under n

// expected to pass, and it does
if(typeof n === 'number') console.log(n + 1) // no squiggly under n

// expected to pass, but it does not
if(Number.isFinite(n)) console.log(n + 1) // no squiggly under the first occurrence but there's a squiggly under the second

I feel utterly defeated by TS when having to type if(typeof n === 'number' && Number.isFinite(n)) ... It's a "TS you had one job" moment, it looks so trivial (Number.isFinite yields true: it is a number), and this issue has been open for 5 years. TS is not just a JS overlay, it alters the way we write code, usually for the better, but can sometimes degrade runtime code quality via requiring extra hoops and adding code noise and payload bulk. I wish that the semantics of the JS substrate, governed by standards, get increased respect especially in low hanging fruit situations like this

If I understand the problem correctly, the issue with the "else" branch.
Sure, if the number is finite then it's obviously not undefined, but if it's not finite, what is the type? What type should TypeScript use in the else branch?
function isFinite(x: number): x is number {
  return Number.isFinite(x);
}
// let's say you have a number that can be finite, or not
const x: number = Math.random() < 0.5 ? Infinity : 42;
if (isFinite(x)) {
    const finiteNumber: number = x;
}
else {
    const neverNumber: never = x;   // WHAT??? Exactly! The "x" has now "never" type :(
}

See in the playground.

The urgent and trivial (to humans and machines to infer) thing would be the then branch, it'd be useful even if the else branch can't narrow. I don't propose numeric value related semantics (Infinity vs 42) as that can become NP hard, just solving the self-explanatory part. Thanks @Juraj-Masiar for the link to the one-sided type guards, I had no idea there were architectural limitations that blocked these

As far as I can understand this issue, my recent troubles with this issue, the current implementation of TypeScript (4.5.4), and the specifications of ECMAScript on the matter, both typings are wrong and should look something more like:
isFinite:
/**
 * Determines whether a supplied number is finite.
 * @param number Any numeric value.
 */
- declare function isFinite(number: number): boolean;
+ declare function isFinite(number: unknown): boolean;

Let num be ? ToNumber(number).
If num is NaN, +∞𝔽, or -∞𝔽, return false.
Otherwise, return true.

— 19.2.2 isFinite, ECMA-262

NumberConstructor.isFinite:
/**
 * Returns true if passed value is finite.
 * Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a
 * number. Only finite values of the type number, result in true.
 * @param number A numeric value.
 */
- isFinite(number: unknown): boolean;
+ isFinite(number: unknown): number is number;

If Type(number) is not Number, return false.
If number is NaN, +∞𝔽, or -∞𝔽, return false.
Otherwise, return true.

— <IP_ADDRESS> Number.isFinite, ECMA-262

This has come up in a bunch of other issues and the current behavior is definitely preferable to this proposal. The proposal to swap them (Number.isFinite and isFinite) is actually backwards from what you want. See #4002

Just to spell it out: If you have an honest-to-goodness number and you pass it to isFinite, you'll get back sensible results (isFinite(32) is true, isFinite(Infinity) is false). If you have some arbitrary other value, the results from isFinite aren't sensible:
isFinite returns true for values like:

"Infinity" but not "infinity"
""
[]
[""]
true and false
new Date()
null but not undefined

The only thing these values have in common is that they'll coerce to a finite number under +, but you don't want to do that, because the output of that operation doesn't make any sense. Call parseInt / parseFloat depending on what you want to do; those operations are sensible and will give you a result you can pass to isFinite.
The opposite is true of Number.isFinite; it doesn't coerce its argument and sensibly returns false for all those inputs. Thus it's safe to use it for anything, since it only returns true for things that actually are numbers.

why is this issue closed. Number.isFinite() is still not typed correctly

why is this issue closed? Number.isFinite() is still not typed correctly

In what sense? Can you be more specific?

Added https://github.com/microsoft/TypeScript/wiki/FAQ#numberisfinite-and-numberisnan-are-typed-correctly

@RyanCavanaugh
const x: number | undefined = undefined;
const foo: number | undefined = Number.isFinite(x) ? x * 2 : undefined

results in warning: 'x' is possibly 'undefined'., but actually Number.isFinite(undefined) returns false so we would not reach x * 2.


python3 error "argument list too long" when building the container.

When trying to use this, I get a python error.  I have used the updated URL referenced in PR: https://github.com/prenone/platformio-vscode-devcontainer/pull/5
=> ERROR [dev_container_auto_added_stage_label 4/4] RUN python3 -c "$(cu  0.5s
------
 > [dev_container_auto_added_stage_label 4/4] RUN python3 -c "$(curl -fsSL https
://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-pla
tformio.py)":
0.497 /bin/sh: 1: python3: Argument list too long
------
Dockerfile-with-features:32
--------------------
  30 |
  31 |
  32 | >>> RUN python3 -c "$(curl -fsSL https://raw.githubusercontent.com/platfo
rmio/platformio-core-installer/master/get-platformio.py)"
  33 |
  34 |
--------------------
ERROR: failed to solve: process "/bin/sh -c python3 -c \"$(curl -fsSL https://ra
w.githubusercontent.com/platformio/platformio-core-installer/master/get-platform
io.py)\"" did not complete successfully: exit code: 126

Seems the script is too big... maybe it would be better to download it and then execute it.
Btw sorry for disappearing, I have approved #5 and will fix this tonight.

I created a new branch but I am unable to test it right now, if anyone could give it a try I would be happy to merge it asap

FYI - I got platform.io working with the following Dockerfile and adding the python feature to devcontainer.json.  After that I just have the platform.io extension handle the rest.
ARG VARIANT=20-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-${VARIANT}

RUN <<EOF
  apt-get update
  export DEBIAN_FRONTEND=noninteractive
  apt-get -y install --no-install-recommends \
    clang \
    udev

  curl -fsSL https://raw.githubusercontent.com/platformio/platformio-core/develop/platformio/assets/system/99-platformio-udev.rules | sudo tee /etc/udev/rules.d/99-platformio-udev.rules
  service udev restart
  usermod -a -G dialout node
  usermod -a -G plugdev node

EOF

	"features": {
		"ghcr.io/devcontainers/features/python:1": {},
	}
}

Looks good, if you can make a PR I will be happy to merge


Interpreted closures mixed with "binary" functions don't capture values correctly

The following test case TestIssue1634 in interp/interp_eval_test.go triggers an unexpected result
func TestIssue1634(t *testing.T) {
	TLogf := t.Logf

	type CPE struct {
		E string
	}

	type CP struct {
		Es []*CPE
	}

	type Child struct {
		I int
		E string
		F func() string
	}

	FL := func(children []*Child) []string {
		s := []string{}
		for _, child := range children {
			s = append(s, child.F())
		}
		return s
	}

	R := func(i int, eE string, f func() string) *Child {
		TLogf("inside R: %d, %s", i, eE)
		return &Child{
			I: i,
			E: eE,
			F: f,
		}
	}

	var CpL func(cp *CP) []string
	// Having this on a line by itself makes it easy to copy into the interpreted
	// code below.
	CpL = func(cp *CP) []string {
		var ch []*Child
		for i, e := range cp.Es {
			i, e := i, e
			ch = append(ch,
				R(i, e.E, func() string {
					TLogf("inside R's f: %d, %v", i, e.E)
					return e.E
				}),
			)
		}
		return FL(ch)
	}

	var Cp *CP
	initCp := func() {
		Cp = &CP{
			Es: []*CPE{
				{E: "foo"},
				{E: "bar"},
				{E: "baz"},
			},
		}
	}
	initCp()

	// Verify that this works in standard Go
	t.Logf("Standard Go:")
	s := CpL(Cp)
	if expected, got := []string{"foo", "bar", "baz"}, s; !reflect.DeepEqual(expected, got) {
		t.Fatalf("Standard Go: CpL: Expected %v, got %v", expected, got)
	}

	i := interp.New(interp.Options{})
	err := i.Use(stdlib.Symbols)
	if err != nil {
		t.Fatalf("i.Use: Expected nil, got %v", err)
	}
	i.Use(interp.Exports{
		"pkg/pkg": {
			// vars
			"Cp":    reflect.ValueOf(&Cp).Elem(),
			"CpL":   reflect.ValueOf(&CpL).Elem(),
			"TLogf": reflect.ValueOf(&TLogf).Elem(),

			// funcs
			"FL": reflect.ValueOf(FL),
			"R":  reflect.ValueOf(R),

			// types
			"CP":    reflect.ValueOf((*CP)(nil)),
			"Child": reflect.ValueOf((*Child)(nil)),
		},
	})
	i.ImportUsed()

	initCp()
	_, err = i.Eval(`
package main

import . "pkg"

func main() {
	CpL = func(cp *CP) []string {
		var ch []*Child
		for i, e := range cp.Es {
			i, e := i, e
			ch = append(ch,
				R(i, e.E, func() string {
					TLogf("inside R's f: %d, %v", i, e.E)
					return e.E
				}),
			)
		}
		return FL(ch)
	}
}
	`)
	if err != nil {
		t.Fatalf("i.Eval: Expected nil, got %v", err)
	}
	t.Logf("Interpreted Go:")
	s = CpL(Cp)
	if expected, got := []string{"foo", "bar", "baz"}, s; !reflect.DeepEqual(expected, got) {
		t.Fatalf("Interpreted Go CpL: Expected %v, got %v", expected, got)
	}
}

Expected result
All tests pass; interpreted output matches compiled output

Got
% go test ./interp -run TestIssue1634
--- FAIL: TestIssue1634 (0.01s)
    interp_eval_test.go:2104: Standard Go:
    interp_eval_test.go:2066: inside R: 0, foo
    interp_eval_test.go:2066: inside R: 1, bar
    interp_eval_test.go:2066: inside R: 2, baz
    interp_eval_test.go:2083: inside R's f: 0, foo
    interp_eval_test.go:2083: inside R's f: 1, bar
    interp_eval_test.go:2083: inside R's f: 2, baz
    interp_eval_test.go:2158: Interpreted Go:
    interp_eval_test.go:2066: inside R: 0, foo
    interp_eval_test.go:2066: inside R: 1, bar
    interp_eval_test.go:2066: inside R: 2, baz
    value.go:596: inside R's f: 2, baz
    value.go:596: inside R's f: 2, baz
    value.go:596: inside R's f: 2, baz
    interp_eval_test.go:2161: Interpreted Go CpL: Expected [foo bar baz], got [baz baz baz]
FAIL
FAIL    github.com/traefik/yaegi/interp 0.365s
FAIL

Yaegi Version
381e045
Additional Notes
No response

Pulling the closure that captures the loop variables out of the arglist of the "binary" function R works, if that helps:
Change this:
for i, e := range cp.Es {
	i, e := i, e
	ch = append(ch,
		// breaks
		R(i, e.E, func() string {
			TLogf("inside R's f: %d, %v", i, e.E)
			return e.E
		}),
	)
}

To this:
for i, e := range cp.Es {
	i, e := i, e
	// works
	f := func() string {
		TLogf("inside R's f: %d, %v", i, e.E)
		return e.E
	}
	ch = append(ch, R(i, e.E, f))
}

Also, I think that the fact that these are loop variables is a red herring, I think this is probably a problem with any closure being passed as a literal to a "binary" function.
Unfortunately, the code I'm playing with is awash with such things. :)

This issue is very general -- we encountered it as well, and were also able to work around it by assigning a variable to the funLit function literal.
This suggests that the general solution is to add an exec to a funcLit that makes a new reflect.Value copy of the func lit in the frame.  Ideally it would detect the outer context of being passed as an arg to another function (doable), in a for loop (probably pretty hard in general).
I just experimented with this and it doesn't seem to work:
in run.go:
func funcLitCopy(n *node) {
	next := getExec(n.tnext)
	n.exec = func(f *frame) bltn {
		ov := f.data[n.findex]
		nv := reflect.New(ov.Type()).Elem()
		nv.Set(ov)
		f.data[n.findex] = nv
		return next
	}
}
in cfg.go, post-processing:
		case funcLit:
			n.types, n.scope = sc.types, sc
			sc = sc.pop()
			err = genRun(n)
			n.gen = funcLitCopy

unfortunately, in this test:
func TestForRangeClosure(t *testing.T) {
	i := New(Options{})
	_, err := i.Eval(`
func main() {
	fs := []func()
	for i := range 3 {
		println(i, &i)
		fs = append(fs, func() { println(i, &i) })
	}
	for _, f := range fs {
		f()
	}
}
`)
	if err != nil {
		t.Error(err)
	}
}

it triggers a "reflect.Value.Call: call of nil function" -- presumably copying the reflect value doesn't do what one might have hoped it would?
it would probably make more sense to figure out what the process of defining a new var for the funcLit is actually accomplishing, and then just replicate that in the exec.  apparently making a reflect clone is not it..

finally found and fixed the issue!  in run.go, see comments at the end:
func genFunctionWrapper(n *node) func(*frame) reflect.Value {
	var def *node
	var ok bool

	if def, ok = n.val.(*node); !ok {
		return genValueAsFunctionWrapper(n)
	}

	start := def.child[3].start
	numRet := len(def.typ.ret)
	var rcvr func(*frame) reflect.Value

	if n.recv != nil {
		rcvr = genValueRecv(n)
	}
	funcType := n.typ.TypeOf()
	value := genValue(n)

	return func(f *frame) reflect.Value {
		v := value(f)
		if v.Kind() == reflect.Func {
			// per #1634, if v is already a func, then don't re-wrap!  critically, the original wrapping
			// clones the frame, whereas the one here (below) does _not_ clone the frame, so it doesn't
			// generate the proper closure capture effects!
			// this path is the same as genValueAsFunctionWrapper which is the path taken above if
			// the value has an associated node, which happens when you do f := func() ..
			return v
		}
...

the tests reveal that this does break a defer test, so it needs to be further qualified somehow, but at least the crux of the issue here is clear.

Fixed by https://github.com/traefik/yaegi/pull/1646. Thanks, @rcoreilly!


bug: anchorScroll doesn't work with collection-repeat

Type: bug
Platform: all
Type: bug
Platform: all
Type: bug
Platform: all
See this pen: http://codepen.io/jason314/pen/VYOKPx
BTW: For some reason this pen only renders in Safari and Chrome on Mac OS X, not Firefox. Can't figure out why.
using v1.0.0-rc.2 for my own static example. Same problem.
 1 self.anchorScroll = function(shouldAnimate) {
 2  self.resize().then(function() {
 3     var hash = $location.hash();
 4     var elm = hash && $document[0].getElementById(hash);
 5     if (!(hash && elm)) {
 6        scrollView.scrollTo(0, 0, !!shouldAnimate);
 7        return;
 8     }
 9     var curElm = elm;
10     var scrollLeft = 0, scrollTop = 0, levelsClimbed = 0;
11     do {
12        if (curElm !== null)
13          scrollLeft += curElm.offsetLeft;
14        if (curElm !== null)
15          scrollTop += curElm.offsetTop;
16        curElm = curElm.offsetParent;
17        levelsClimbed++;
18     }
19     while (curElm.attributes != self.element.attributes && curElm.offsetParent);
20     scrollView.scrollTo(scrollLeft, scrollTop, !!shouldAnimate);
21  });
22 };

I found two problems with with using anchorScroll and collection-repeat. ng-repeat works perfectly.
I'm using an 1000 element array. Each anchor id is "item-i"
(1) Can only go to anchor that is within the item-render-buffer window

if outside, line 4 resolves elem to null

(2) If the anchor does resolve in the render buffer the scrollTop
at line 19 is a tiny number, e.g. 1. So the scrolling does not
occur
<ion-content delegate-handle="mainScroll">
 <ion-list>
  <ion-item collection-repeat="item in main.items"
    [item-render-buffer="N"]
    id="item-{{item}}">
    {{item}}
  </ion-item>
 </ion-list>
</ion-content>

Q: How can collection-repeat be used to window into dynamically acquired data -- not a static array.
collection-repeat requires an array of static data. I don't understand how this constraint would allow collection-repeat to work with a very common use case — dynamically loading data from a server. I have a server API than can return a window [i,j] of data elements from a very large data set, let's say 10,000. I want to show a list UI that shows a 50 element range - i.e. elements i to i+49. How, if collection-repeat is bound to static data, can it be used to window against a very large data size. It seems to me that the render buffer code needs to call user-provided a user provided function to request a range of data. Am I missing something here?

Greetings @jasonwinshell-br!
My sensors indicate that you need to update your issue through our custom issue form. We are now requiring all issues to be submitted this way, to ensure that we have all of the information necessary to fix them as quickly as possible.
Click Here To Update Your Issue
I will have no choice but to close this issue if it is not resubmitted through the form. Please fill out the rest of the form, so that I may use my friendly robot powers to assist you.
Thank you!

This is my first bug report through the issues form. Please forgive the bug:bug:bug :-o

Sorry, colection-repeat doesn't support anchor scrolling. To maximize performance, some things had to be foregone and that's one of them.
Collection-repeat should resize if data is added or removed from your array. If it does not, a $scope.$apply() may be necessary depending on how your controller is structured.
If you're having trouble with that part, it's better something for the forums.  As for the anchor scrolling, sorry, no dice.

Hello. I am facing the same problem. and I read #3547 too.
I am very clear that that collection-repeat doesn't support anchor scrolling completely.
In both case looks like you are discussing about anchor scrolling to an item which is NOT in the current ScrollView? this makes obvious sense CAN NOT do scrolling because of how collection-repeat works, the item is just not in the html DOM..
and here is my question, in my case, should be able to anchor scroll to an item which is in theview (buffer) already?
the test result is: only can anchor scroll to n-first rendered buffered item. but if you scroll to others item to get your scroll target be displayed ( get it into the DOM), you still cannot anchor scroll to it. (you can test this using @jasonwinshell-br  's codepen , remember changing the actual ng-repeat to collection-repeat first ).


Q: It is not clear if this always keeps all files on the device.

From the readme it is not clear if this always downloads copies to the device or just lists the files and access them on-demand (with caching for already downloaded files).
I have many many things on my drive and I don't want to download all of it to every machine I use.  Is this possible?

Yes. You should set stream_large_files=true so that files larger than large_file_threshold_mb will not be cached.

Awesome, apparently I was hit by a temporary blindness :)
Thanks for quick reply!


Make default future callback configurable

@dzikoysk: you know what would be great
@dzikoysk: this defaultFutureCallback is finally no longer in Context, so it could be moved to configuration
@dzikoysk: so people can register custom types for all requests

This could either be configured though JavalinConfig or JavalinConfig#ContextResolvers (it is related to context after all):
Context resolver:
Javalin.create { config ->
    config.contextResolvers { resolvers ->
        resolvers.defaultFutureCallback = { result ->
            when (result) {
                is Unit -> {}
                is InputStream -> ctx.result(result)
                is String -> ctx.result(result)
                is Any -> ctx.json(result)
            }
        }
    }
}

Base config:
Javalin.create { config ->
    config.defaultFutureCallback = { result ->
        when (result) {
            is Unit -> {}
            is InputStream -> ctx.result(result)
            is String -> ctx.result(result)
            is Any -> ctx.json(result)
        }
    }
}

This has even been released.


Remove all the warnings from the new 'stake' section.

We've had to add DFI code again to the app. This comes with 1000 different warnings like always. It'd be good to clean them up.

I'd like to give that a go. Are you able to direct me to which file(s) I'll need to clean the code from?

Hey @BrightReach, i think you can work on this one, as no feedback from @fstar for a long time.
To see warnings simply "yarn start" and you will have bunch of them in logs:
./src/features/stake/sections/StakePools.js
  Line 113:62:   Unexpected mix of '&&' and '||'  no-mixed-operators
  Line 113:99:   Unexpected mix of '&&' and '||'  no-mixed-operators
  Line 113:99:   Unexpected mix of '||' and '&&'  no-mixed-operators
  Line 113:125:  Unexpected mix of '||' and '&&'  no-mixed-operators
  Line 113:160:  Unexpected mix of '||' and '&&'  no-mixed-operators
  Line 113:186:  Unexpected mix of '||' and '&&'  no-mixed-operators

./src/features/vault/components/Pool/Pool.js
  Line 1:46:   'useEffect' is defined but never used         no-unused-vars
  Line 12:10:  'useFetchPoolData' is defined but never used  no-unused-vars

./src/features/stake/sections/StakePool.js
  Line 43:14:   'i18n' is assigned a value but never used

@roman-monk Was this successfully assigned? If not, I'm happy to tackle it as further introduction to the codebase.

Take it please!

@roman-monk Cool, ready to start. Do you want/need to assign me? I see no way to explicitly "take" the issue.


Empty payload when pass nullable payload in getAction

Version: 6.1.2
Actually, the getAction util could be response to an object without payload property.  It should return an object with payload property.
However, I think that this property should return the payload with null if he receives a null or undefined knowing that one reducer can't be undefined. What do you think?
Steps to Reproduce
const caseA = getAction(null, false);
const caseB = getAction(undefined, false);

Expected Behavior
{
  type: ...,
  payload: null
}

Actual Behavior
{
  type: ...
}

Hi @franciscomorais, thanks for the feedback and for making a PR. I appreciate the proactivity.
FThis is by design and documented in the wiki:

...when you resolve with null or undefined, the payload property is not included. It would be redundant to include it.

I'm OK with revisiting the design, but can you elaborate on why this is important to you? What's the goal of this change / the problem you're solving? Is it a philosophical argument about the design or is there a technical argument / use case?

Hi @franciscomorais, just following up.

Hi @pburtchaell, we have a "REST API request middleware" build over redux-promise-middleware that we use to simplify creating request actions. We resolve the API request response which is then stored in a reducer.
In cases where endpoints respond with 204 and no data we're forced to make the promise resolve with an empty object, while we'd like to resolve null, as that would make more sense, but doing so makes the reducer throw, as redux doesn't allow reducers to have undefined as their state.


[apsi] Remove version locks which caused conflicts when seal was updated.

Taking https://github.com/microsoft/vcpkg/pull/29193 instead.


Changing Event Set with Existing MMA Installations

If the event set is changed on the connector page, does that change make it down to the device? Or is any configuration required at the device level for an event set change? We have several instances where existing MMA agents are installed and we will be adding a second workspace ID for log collection using this connector. Will changing the event set level for the security events connector affect other workspace settings on existing MMA installations?
Also, thank you guys for the prompt responses to all of my questions!

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

ID: 2e0c8df1-852c-a3b2-96e1-4af8981e3cf9
Version Independent ID: 2d4a7e2c-dcb2-dcdd-0ae2-374b6443e224
Content: Connect Windows security event data to Azure Sentinel
Content Source: articles/sentinel/connect-windows-security-events.md
Service: azure-sentinel
Sub-service: azure-sentinel
GitHub Login: @yelevin
Microsoft Alias: yelevin

@johnjohnjohn87 Thanks for the question. We  will update you shortly.

@johnjohnjohn87 We are trying to get clarity on this from the backend team and will update the same on the thread. My apologies for the delay at this point.

@johnjohnjohn87 The Monitoring agent send all the data to the workspace. But the rules are set per workspace and the data gets sanitized before being written to the log analytics workspace . There is no change required at the device level if you change the event set level for the security events connector and it wont change the settings on other workspace. We will now close this issue . Should you have any further query or you see any anomalous behavior , please feel free to tag me to your reply .
Thank you.


Adding Yobiiq B.V. SD-1001 Smoke Detector template

@dhakke Thank you for your contribution! Do you consider adding the converters for electricity metering? Meanwhile I will ask @artem-barysh-dev to improve your converter a bit. We are in progress of creating more precise guidelines for converter development.

@ashvayka We are in the progress of adding the other device types as well.

@dhakke At the moment we are refactoring your converter. Please hold on with other PR's until we will provide an updated version. It will be much easier to extend and support updated version. I believe it will be ready today. One thing to notice is the actual payload decoding. Your sample payload contains "AXVkAgsAAwAABAAABQAABgAA" data. But there is no terace of actual decoding of this data.

We need the decoding function to add support of the same device to other integrations (other network server vendors)

We need the decoding function to add support of the same device to other integrations (other network server vendors)

We are working on adding Things Stack Industries / Community and LorIOT

Do you have any documentation on payload data decoding? We were not able to find it on your website

Sorry, i don't see any emails from you. Please send it to<EMAIL_ADDRESS>if possible.

@dhakke Hello, I found a repository yesterday that most likely contains the date decoding for the device you added to our repository. I wanted to double-check with you to confirm if this is the correct one. I’ve attached the link below:
https://github.com/Yobiiq-BV/yobiiq-decoders/blob/main/IQ-SD1001/IQ-SD1001.js

@artem-barysh-dev correct.

@dhakke Thank you, I will analyze how you decode the data and implement this logic in our repository.

@artem-barysh-dev we have adjusted the decoding a bit and switched it to TBEL.
See the latest commits to https://github.com/Yobiiq-BV/data-converters where we also added ThingsStackIndustries / Community.

Hi @artem-barysh-dev @ashvayka
We are encountering an issue with the downlink converter in our Loriot integration.
Specifically, the HEX string data in the downlink converter is being transformed into its ASCII string before being sent via HTTP POST to Loriot. For example, FF0000 is converted to<PHONE_NUMBER>30
Any guidance on resolving this would be greatly appreciated.

@dhakke Thank you for the details on the issue. To assist you effectively, could you please push your current code for the Loriot downlink converter? We’ll review it and provide you with feedback or adjustments to help resolve the HEX to ASCII conversion problem.

@artem-barysh-dev i have pushed the converters in a new pull request.

@dhakke Thank you, I have reviewed your pull request. At this time, I have made some changes to your integration with ChirpStack, which you can see in the pull request—I will attach the link below. I will provide you with more information about the changes in the integrations later. Currently, I have modified the downlink in ChirpStack (payloads format; rewritten the converter to tbel; we also have a standard for naming keys, for example, we use eui instead of devEui; also, don't forget about the metadata file).
Link - https://github.com/thingsboard/data-converters/pull/35


C#: Add global:: namespace to generated source

Adds global:: to the fully qualified types in source generators to prevent ambiguity.

Fixes https://github.com/godotengine/godot/issues/69038

Thanks!


Automatically hide window when there are no entries

Make it transparent whenever there is no cards open, right now it obscures buffs in default position. Might also be useful for some people if there is an option to enable click through when there is no info shown too. Option to set it on the bottom of the screen opening upwards would be nice too.

An option will be added to automatically hide the window when there are no entries and show it again when there's a new entry. Your last suggestion is great, but it should probably be a separate issue to keep track of it :)

Thank you, I opened a new entry with that. The app looks great so far, can't wait for that whispers assistance enhancement :)


[WIP] Add RLPD to solve discrete cartpole

Description
Describe your changes in detail.

closed as REDQLoss has no discrete variant and that is necessary for RLPD implementation. see #2