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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.clone(); |
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 updateCondition() { | |
try { | |
if ($scope.data && $scope.data.values[0]) { | |
$scope.members.rightOperand.value = $scope.data.values[0]; | |
} | |
if (_.contains(['reference', 'static'], $scope.members.rightOperand['@type'])) { | |
if ($scope.data.values[0].open && ($scope.members.rightOperand.open = $scope.data.values[0].open)) { | |
$scope.members.rightOperand.value = 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
it('user should filter results by advance con e-mail', function() { | |
var s = new tools.commonPageObj(); | |
s.get(); | |
s.setSearchInput('Julie'); | |
s.doGlobalSearch(); | |
s.openBasicPanel(); | |
s.isModalDisplayed('.modal-rw-basic', true); | |
s.isAdvanceConBtnActive(false); | |
s.selectTemlateBasicPanel('Person'); |
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 updateValuesAfterCreationRefferedDC(targetAttributeId,updateCallBack){ | |
if(queue.length > 0){ | |
var queueLast = queue[queue.length-1]; | |
if(queueLast.randomKey === $stateParams.randomKey){ | |
if(queueLast.scope.data.gaId == targetAttributeId && queueLast != null){ | |
if(queueLast.refferedDCId != null){ | |
updateCallBack(queueLast.refferedDCId); | |
} | |
queue.pop(); | |
} |
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
;; Turn off mouse interface early in startup to avoid momentary display | |
(if (fboundp 'menu-bar-mode) (menu-bar-mode -1)) | |
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1)) | |
(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1)) | |
;; No splash screen please ... jeez | |
(setq inhibit-startup-message t) | |
(mouse-wheel-mode t) |
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
{ | |
"folder": null, | |
"module": null, | |
"templates": [{ | |
"id": "64", | |
"name": "Alert", | |
"code": "bhd", | |
"allowingFolderIds": ["110"] | |
}], | |
"searchKey": 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
var _DC_ID = null; | |
function _getRetMsg() { | |
var ret = ''; | |
switch ($state.current.name) { | |
case 'workspace.datacard.edit': | |
case 'bg-data.module.datacard.edit': | |
_DC_ID = $stateParams.id; | |
ret = 'dc edit ws'; | |
break; | |
case 'workspace.datacard.transform': |
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 stooges = [{name: 'curly', age: 25}, {name: 'moe', age: 21}, {name: 'larry', age: 23}]; | |
var youngest = _.chain(stooges) | |
.sortBy(function(stooge){ return stooge.age; }) | |
.map(function(stooge){ return stooge.name + ' is ' + stooge.age; }) | |
.first() | |
.value(); | |
== "moe is 21" | |
== and with Arrow functions |
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 solution(A) { | |
// you can use console.log for debugging purposes, i.e. | |
// console.log('this is debug message'); | |
// write your code in JavaScript (ECMA-262, 5th edition) | |
if (A.length === 1) return 0; | |
var len = A.length, | |
result = 0; | |
// how many pairs of coins we have now |
OlderNewer