node
Code gist.github.com This sample code is also a solution to the problem at the following URL of atcoder. * https://atcoder.jp/contests/abc178/tasks/abc178_b The code receive input parameters formatted as below from stdin. 1 2 1 1 3 5 -4 -2…
Premise Do you have such an experience that a bug was entered by neglecting exclusive control during asynchronous process with Promise at node? If you want to implement exclusive control, you have to use some library which you'll find out …
Environment Node ( TypeScript ) Google Analytics universal-analytics Premise Normally, in order to track pageview with Google Analytics, it is necessary to embed the tracking code in client-side JavaScript and execute it in the browser. Th…
Environment React Native mobx react-native-extended-stylesheet Code gist.github.com react-native-extended-stylesheet provides EStyleSheet.build which compile variables to reuse any style in EStyleSheet.create. (e.g. $dark087) And by using …
Environment node Code Recursion gist.github.com Reduce gist.github.com Note Typically, reduce is faster than recursion, and more simple.
Environment node Code gist.github.com The value returned by the then function can be received in a variable with await.
Environment React Native react-native-keyboard-accessory NativeBase node Code gist.github.com If the software keyboard is visible ( when you'll input Textarea ), the Button is enabled. Otherwise, the Button is disabled. Typically, The timi…
Environment React Native node Premise When there is a utility function you'd like to use in common during each components, you can do it easily via props by using HOC. Using common.js which provides common utility functions has the fault a…
Environment React Native React Navigation ( react-navigation ) lodash Prerequisites If we have the following Navigator structure: ScreenA ScreenB ScreenC ScreenD TabScreenA StackScreenA StackScreenB TabScreenB StackScreenC StackScreenD Tab…
Environment Salesforce node jsforce lodash Premise We can't solve this problem with using report. So, I'll show you the solution which using node ( with jsforce and lodash ). Code gist.github.com Code's Summary The summary of the process i…
Environment Apex Prerequisites We can not access An Extended @AuraEnabled method from Aura ( node ) as below. gist.github.com AuraHelper.js can't access c:getAccounts. So, this code is not work. Code The solution is to change SubClass as b…
Prerequisites There are two arrays has multiple elements as below. array1 is [ { "mail": "shinchi@its-all-writing.com", "hobby": "Walking" }, { "mail": "shinchi@its-all-writing.com", "hobby": "Playing the Bamboo Flute" }, { "mail": "kazuyo…
Prerequisites There are arrays has multiple elements as below. [ { "name": "SHINCHI, Takahiro", "mail": "shinchi@its-all-writing.com", "hobby": "Walking" }, { "name": "SHINCHI, Takahiro", "mail": "shinchi.xx@gmail.com", "hobby": "Playing t…
It's simple. You can use jsforce for this purpose. The describe method returns sObject's meta data. The environment and code is below. Enviroment node jsforce lodash Code const jsforce = require('jsforce'); const lodash = require('lodash')…
Prerequisites There are arrays has multiple elements as below. const mergeableArray = [ { 'age': 18, 'status': true }, { 'hobby': 'fishing' }, { 'status': null } ]; const unmergeableArray = [ { 'age': 18, 'status': true }, { 'hobby': 'fish…