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
| 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
| 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
| 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
| 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
| 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
| # 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
| 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
| class AbstractService | |
| constructor: (@cloud)-> | |
| defaultSearchCondition: (searchCondition = {})-> | |
| searchCondition.response_json_depth or= 3 | |
| searchCondition | |
| buildArrowQueryString: (methodName)=> "/v1/#{@apiName}/#{methodName}.json" | |
| getObjectsFromResponse: (response)=> response?.response?[@apiName] or [] |
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
| args = arguments or [{}] | |
| args = args[0] | |
| humanizeDuration = (eventDuration)-> | |
| eventMDuration = Alloy.Globals.Moment.duration(eventDuration, 'seconds'); | |
| eventDurationString = "" | |
| if eventMDuration.days() > 0 | |
| eventDurationString += " " + Alloy.Globals.Moment.duration(eventMDuration.days(), 'days').humanize() | |
| if eventMDuration.hours() > 0 | |
| eventDurationString += " " + Alloy.Globals.Moment.duration(eventMDuration.hours(), 'hours').humanize() |