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
'use strict'; | |
/** | |
* cAPS lOCK | |
* | |
* зАЧЕМ НУЖНА КЛАВИША cAPS lOCK? | |
* Caps Lock — клавиша компьютерной клавиатуры, предназначенная для автоматической (постоянной) смены регистра | |
* букв со строчных на прописные. Будучи случайно нажатой, она приводит к последствиям вроде первого абзаца в | |
* условии этой задачи. | |
* |
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
'use strict'; | |
/** | |
* Выборы | |
* | |
* В стране Бялечинск начались выборы президента, в которых участвуют n кандидатов. | |
* Страна состоит из m городов. Известно, сколько человек в каждом городе проголосовало за каждого кандидата. | |
* | |
* Система выборов в стране имеет необычный вид. На первом этапе выборов подводятся итоги голосованя по городам: | |
* считается, что в городе победил тот кандидат, за которого было отдано наибольшее количество голосов в этом городе, |
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
'use strict'; | |
/** | |
* Слишком длинные слова | |
* | |
* Иногда некоторые слова вроде «localization» или «internationalization» настолько длинны, | |
* что их весьма утомительно писать много раз в каком либо тексте. | |
* | |
* Будем считать слово слишком длинным, если его длина строго больше 10 символов. | |
* Все слишком длинные слова можно заменить специальной аббревиатурой. |
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
'use strict'; | |
/** | |
* Красивый год | |
* | |
* А знали ли Вы забавный факт о том, что 2013 год является первым годом после далекого 1987 года, | |
* в котором все цифры различны? | |
* | |
* Теперь же Вам предлагается решить следующую задачу: задан номер года, найдите наименьший номер года, | |
* который строго больше заданного и в котором все цифры различны. |
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
'use strict'; | |
/** | |
* Double Cola | |
* | |
* Шелдон, Леонард, Пенни, Раджеш и Говард стоят в очереди к автомату по продаже баночек с напитком «Double Cola», | |
* других людей в очереди нет. Первый в очереди (Шелдон) покупает баночку, выпивает ее содержимое и раздваивается! | |
* Получившиеся два Шелдона встают в конец очереди. Затем следующий в очереди (Леонард) покупает баночку, | |
* выпивает и встает в конец очереди в двойном экземпляре, и так далее. Этот процесс продолжается до бесконечности. | |
* |
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
heroku login | |
heroku create | |
// heroku config:set NPM_CONFIG_PRODUCTION=false | |
git push heroku master | |
heroku open |
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
// imports es6 | |
import defaultMember from "module-name"; | |
import * as name from "module-name"; | |
import { member } from "module-name"; | |
import { member as alias } from "module-name"; | |
import { member1 , member2 } from "module-name"; | |
import { member1 , member2 as alias2 } from "module-name"; | |
import defaultMember from "module-name"; | |
import defaultMember, * as name from "module-name"; | |
import "module-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
const webpack = require('webpack') | |
const ExtractTextPlugin = require('extract-text-webpack-plugin') | |
const path = require('path') | |
const sourcePath = path.resolve(__dirname, 'public') | |
const isProduction = process.env.NODE_ENV === 'production' | |
const stats = { | |
assets: true, |
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
1. // isPrime - Returns true or false, indicating whether the given number is prime. | |
isPrime(0) // false | |
isPrime(1) // false | |
isPrime(17) // true | |
isPrime(10000000000000) // false | |
2. // factorial - Returns a number that is the factorial of the given number. | |
factorial(0) // 1 | |
factorial(1) // 1 | |
factorial(6) // 720 |
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 {VRInstance} from 'react-vr-web' | |
import * as SimpleRaycaster from 'simple-raycaster' | |
function init (bundle, parent, options) { | |
const vr = new VRInstance(bundle, 'gdg_reactvr', parent, { | |
raycasters: [ | |
SimpleRaycaster // Add SimpleRaycaster to the options | |
], | |
cursorVisibility: 'visible', // Add cursorVisibility | |
...options |