This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import PropTypes from 'prop-types'; | |
| import DeviceInfo from 'react-native-device-info'; | |
| import { Platform, KeyboardAvoidingView } from 'react-native'; | |
| import s from './styles'; | |
| const phoneModel = DeviceInfo.getModel(); | |
| const isIphoneX = () => phoneModel === 'iPhone X'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import io from 'socket.io-client/dist/socket.io'; | |
| import config from '../config'; | |
| class SocketsApi { | |
| constructor() { | |
| this.socket = null; | |
| } | |
| initialize(token) { | |
| this.socket = io(config.api_url, { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function isJSON(text) { | |
| // console.log(text) | |
| if (/^[\],:{}\s]*$/.test(text.replace(/\\["\\\/bfnrtu]/g, '@') | |
| .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']') | |
| .replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) { | |
| return true; | |
| } else { | |
| return false; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "workbench.panel.location": "bottom", | |
| "terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe", | |
| "editor.tabCompletion": true, | |
| "editor.quickSuggestions": { | |
| "other": true, | |
| "comments": true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import './polyfills'; | |
| export default class Validator { | |
| constructor(selector) { | |
| this.forms = selector; | |
| this.validationParams = []; | |
| this.init(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $$('*').map(A=>A.style.outline=`1px solid hsl(${(A+A).length*9},99%,50%`) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ul { | |
| font: 14px Verdana, Geneva, sans-serif; | |
| text-align: justify; | |
| /* Обнуляем для родителя*/ | |
| line-height: 0; | |
| font-size: 1px; /* 1px для Opera */ | |
| /* Лекарство для IE6-7*/ | |
| text-justify: newspaper; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function handleResponse(obj, arrayyOfObjects) { | |
| var object = obj; | |
| var newObj = {}; | |
| var keyArray = []; | |
| var arrayEl = ''; | |
| arrayyOfObjects.forEach(function(el) { | |
| for (var key in el) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default function noise(x, y, z) { | |
| var p = new Array(512) | |
| var permutation = [ 151,160,137,91,90,15, | |
| 131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23, | |
| 190, 6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33, | |
| 88,237,149,56,87,174,20,125,136,171,168, 68,175,74,165,71,134,139,48,27,166, | |
| 77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Enable switching celsius/f | |
| var tempUnit = "c"; | |
| $('#switchBtn').on("click", function() { | |
| var tempEl = $('#temp'); | |
| var tempVal = parseFloat(tempEl[0].innerHTML); | |
| if(tempUnit=="f"){ |