This file contains 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
Замыкание в functional component | |
function CustomForm ({handleSubmit}) { | |
let inputElement | |
return ( | |
<form onSubmit={() => handleSubmit(inputElement.value)}> | |
<input | |
type='text' | |
ref={(input) => inputElement = input} /> | |
<button type='submit'>Submit</button> |
This file contains 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
const data = [ | |
{ id: 2, name: 'элемент', count: 0}, | |
{ id: 1, name: 'элемент', count: 0}, | |
{ id: 0, name: 'элемент', count: 0} | |
] | |
const appendItem = () => { | |
data.unshift({ | |
id: data.length, | |
name: 'элемент', |
This file contains 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 { | |
express, | |
appConfig | |
} from './modules'; | |
const root = express.Router(); | |
/* GET home page. */ | |
root.get('/onboard', function (req, res) { |
This file contains 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 { | |
seraph, | |
boltDriver, | |
to | |
} from '../modules'; | |
export function getCreatedBy({uuid}) { | |
var cypher = 'MATCH (n {uuid: {uuid}})-[r:CREATED_BY]->(m)' | |
+ 'RETURN m'; | |
return new Promise((resolve, reject) => { |
This file contains 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 { | |
express, | |
aws, | |
multer, | |
multerS3, | |
body | |
} from './modules'; | |
import { | |
login, |
This file contains 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, {Component} from 'react'; | |
import {reduxForm, addArrayValue} from 'redux-form'; | |
import Switch from './switch'; | |
import Scroll from './../atoms/scroll'; | |
import PureInput from '../atoms/pure-input'; | |
import PureDeepInput from '../atoms/pure-deep-input'; | |
import PureSelect from '../atoms/pure-select'; | |
import Location from '../atoms/location'; | |
import validate from './validate-deep'; | |
import {dispatchSaveOrgContact} from '../../lib/edit-org'; |
This file contains 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
var React = require('react'), | |
scripts = require('./js/jsonld/scripts'); | |
//var Main = require('./main'); | |
var Preloader = React.createClass({ | |
// | |
propTypes: { | |
data: React.PropTypes.array.isRequired, | |
new: React.PropTypes.object.isRequired |
This file contains 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
var forms = 'рубль,рубля,рублей'.split(',') | |
/* Алгориииитм! */ | |
function getForm(x) { | |
var x10 = x % 10, x100 = x % 100, form = 2 // рублей | |
if (x10 == 1 && x100 != 11) | |
form = 0 // рубль | |
else if (x10 > 1 && x10 < 5 && (x100 < 10 || x100 > 21)) | |
form = 1 // рубля |
This file contains 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
var settingJson = '../settings.json'; | |
var settings = []; | |
var dataObject = {}; | |
var phpUrl = 'upload.php'; | |
$(function () { |
This file contains 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
var createView = function(settings, type){ | |
var template, | |
context; | |
if(type == 'documents'){ | |
/** Рисуем шаблон документов **/ | |
var documentFormat = []; |
NewerOlder