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
(async function(){ | |
const shareExecution = (callback) => { | |
let loading; | |
return async function () { | |
if (!loading) { | |
loading = callback(); | |
loading.finally(() => loading = null) | |
} | |
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
#set($fileName = $NAME) | |
#set($className = ${StringUtils.removeAndHump($fileName.replaceAll("\W", "_"))}) | |
#set($entityName = $className.substring(0, 1).toLowerCase() + $className.substring(1)) | |
const {logDebug, logInfo, logError} = require("/app/utils"); | |
const componentName = '${className}'; |
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 sourceMapper = require('./sourceMapper'); | |
var logger; | |
function log(message) { | |
if (logger) { | |
logger.info(`[fc][alloy.jmk]: ${message}`); | |
} | |
} |
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 ListView = require('android.widget.ListView'); | |
const View = require('android.view.View'); | |
const ViewGroup = require('android.view.ViewGroup'); | |
(function (tiList) { | |
const listWrapper = new View(tiList); | |
const nativeListView = ViewGroup.cast(listWrapper).getChildAt(1); | |
const list = ListView.cast(nativeListView); | |
list.smoothScrollToPositionFromTop((itemIndex + 1 /* 1st section*/), 0, 100); |
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
// https://jira.appcelerator.org/browse/TIMOB-12291 | |
/* | |
[DEBUG] sqliteBridgeBottleneckTest.compareQueries() start | |
[DEBUG] testCommonWay() start | |
[DEBUG] testCommonWay() loop:100 complete in 5087 ms | |
[DEBUG] testGroupConcat() start | |
[DEBUG] testGroupConcat() loop:100 complete in 844 ms | |
[DEBUG] testRs2JSON() start | |
[DEBUG] testRs2JSON() loop:100 complete in 3253 ms |
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
exports.compareQueries = function () { | |
testCommonWay(); | |
testGroupConcat(); | |
}; | |
const TEST_QUERY_EXEC_COUNT = 50; | |
function testCommonWay() { | |
const startTime = new Date(); | |
Ti.API.debug(`testCommonWay() start`); |
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
Alloy | |
Require(src='components/common/base-window/BaseWindow') | |
Require#loader(src="components/common/horizontal-scroller/LoadingContainer") | |
Require#eventMap(src="components/event/map/EventMap", bind_onLoad="(()=> $.loader.onload())") | |
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 createFunctionsSet = {}; | |
function buildCreatorFor(tagName, controllerName) { | |
const createFuntionName = `create${tagName}`; | |
createFunctionsSet[createFuntionName] = function (args) { | |
return Alloy.createController(controllerName, args).getView(); | |
} | |
} | |
buildCreatorFor('BaseWindow', 'components/common/base-window/BaseWindow'); |
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 moment = require('moment'); | |
const Promise = require('bluebird'); | |
const _ = require('underscore'); | |
const {Logger} = require('../logger'); | |
const translator = require('./translators'); | |
let translationQueue = []; | |
let isProcessing = false; |
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
(function(){ | |
class A { | |
static getInstance() { | |
if (!this.hasOwnProperty('_instance')) { | |
this._instance = new this; | |
console.log(`new instance of ${this._instance}`); | |
} | |
return this._instance; | |
} |
NewerOlder