Skip to content

Instantly share code, notes, and snippets.

View dev-two's full-sized avatar
🐁
(sneaking)

Andrey dev-two

🐁
(sneaking)
View GitHub Profile
@dev-two
dev-two / file1.js
Last active July 12, 2019 10:47
Some strange gist
{
languages: () => [
{ name: 'typescript', func: typescript },
{ name: 'scss', func: scss },
{ name: 'javascript', func: javascript }
]
}
@dev-two
dev-two / MultilineTextInput.js
Last active July 15, 2019 13:52 — forked from catchin/MultilineTextInput.js
This is a workaround for the buggy react-native TextInput multiline on Android. Inspired by the comments on https://github.com/facebook/react-native/issues/12717.
import React, {PropTypes, PureComponent} from 'react';
import {TextInput} from 'react-native';
import debounce from 'debounce';
/**
* This is a workaround for the buggy react-native TextInput multiline on Android.
*
* Can be removed once https://github.com/facebook/react-native/issues/12717
* is fixed.
*
var n = prompt('Введите число n');
if(n != null && typeof n != 'object') {
var result = 0;
for (var i = 0; i <= n; i++) {
result = result + i
}
alert(`Сумма в чисел в последовательности от 0 до ${n} равна ${result}`)
} else {
alert('Это не число')