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
searchString = "hello z World!" | |
joinWordsToSearch = (words)->words.join(".{0,5}") | |
getModifiedWords = (words, modificator)-> | |
modifiedWords = words.slice() | |
modifiedWords[i] = modificator(word) for word, i in modifiedWords | |
modifiedWords |
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
# NOT FINISHED | |
# It works, but not good, for such transformation waiting hyperloop | |
topOffset = 30 | |
previousOffset = 0 | |
previousFirstVisibleItem = 0 | |
previousOffsetY = 30 | |
previousMoveDirection = "down" | |
upCounter = 0 |
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
previousMoveDirection = "down" | |
previousItem = 0 | |
upCounter = 0 | |
downCounter = 0 | |
$.eventList.addEventListener "scroll", (event) -> | |
moveDirection = "down" | |
currentItem = parseInt event.firstVisibleItem | |
if currentItem is previousItem |
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
convertFlatObject = (objectToFlat)-> | |
flatObject = {} | |
convertValue = (flatObject, key, value)-> | |
if value isnt null and value isnt undefined | |
if typeof value is "string" or typeof value is "number" | |
flatObject[key] = value | |
else if typeof value is "object" | |
flatSubObject = convertFlatObject value |
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
var statusColumnOffset = 0; | |
var range = SpreadsheetApp.getActiveSheet().getDataRange(); | |
function setRowColors() { | |
for (var i = 0; i < range.getLastRow(); i++) { | |
findFrodOfIP(i); | |
} | |
} | |
function findFrodOfIP(ipIndex) { |
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
var win = Titanium.UI.createWindow({ | |
backgroundColor: "#ffffff", | |
title: "win" | |
}); | |
// animations | |
var animateLeft = Ti.UI.createAnimation({ | |
left: -520, | |
transform: Ti.UI.create2DMatrix({rotate: 60}), | |
opacity: 0, |
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
moment = require "moment" | |
crypto = require "crypto" | |
TelegramBot = require('node-telegram-bot-api') | |
token = require("./config").token | |
Place = require "../models/place" | |
EventType = require "../models/event-type" | |
Event = require "../models/event" |
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
".fa" : { | |
font : { | |
fontFamily: Alloy.Globals.FONT_AWESOME_FONT_FAMILY, | |
fontSize : 12 | |
} | |
} | |
".fa-10" : { | |
font : { | |
fontFamily: Alloy.Globals.FONT_AWESOME_FONT_FAMILY, |
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
/* | |
getNormalizedWordsArray("Hello, my name is Igor. What are you doing?:)") | |
>>> ["Hello", ",", " ", "my", " ", "name", " ", "is", " ", "Igor", ".", " ", "What", " ", "are", " ", "you", " ", "doing", "?:)"] | |
*/ | |
function getNormalizedWordsArray(phrase) { | |
const punctuationRegEx = /[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,\-.\/:;<=>?@\[\]^_`{|}~]/g; | |
const spaceRegEx = /\s+/g; | |
const digitRegEx = /\d/g; | |
const wordRegEx = /\w/g; |
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
input#fileToUpload(type='file', onchange='angular.element(this).scope().uploadFile(this.files[0])') |