Skip to content

Instantly share code, notes, and snippets.

// 0x3fffffff => 1073741823
function rShift(value, shift) {
return (((value >>> shift) & 0x3fffffff) | ((value << (30-shift) & 0x3fffffff)));
}
function solution(N) {
var len = 28;
var shift = 0;
//taks 3
//http://pasteboard.co/2DY4NjCM.png
// damn...
function isHeavy(i) {
var sum = 0, len = 0, num = i;
while (num > 0) {
sum = sum + num % 10;
num = num - num % 10;
function solution(A) {
if (A.length === 1) return 0;
var len = A.length,
result = 0;
// how many pairs of coins we have now
for(var i = 0; i < len - 1; i++) {
if (A[i] === A[i+1]) {
result++;
function solution(A) {
if (A.length === 1) return 0;
var len = A.length, result = 0, revers = 0;
for(var l = 0; l < len; l++) {
var count = 0;
if (l > 0) {
function solution(A) {
// if no pair return
if (A.length === 1) return 0;
var len = A.length, result = 0, revers = 0;
// loop over pairs
for(var l = 0; l < len; l++) {
var count = 0;
// check
// task1
function solution(A) {
var pos = 0;
var len = 0;
while(A[pos] !== -1){
len++;
pos = A[pos];
}
return len;
// task1
function solution(A) {
var pos = 0;
var len = A[pos] !== -1 ? 1 : 0;
// if -1 last node
while(A[pos] !== -1 && A[pos] !== undefined){
len++;
pos = A[pos];
}
Welcome to the Emacs shell
~/efecte/SUMA-5622/webapps/equipment/efecte_refresh/test/e2e_tests $ cd ..
~/efecte/SUMA-5622/webapps/equipment/efecte_refresh/test $ cd ..
~/efecte/SUMA-5622/webapps/equipment/efecte_refresh $ grunt protractor:c
Running "protractor:c" (protractor) task
Using the selenium server at http://localhost:4444/wd/hub
[launcher] Running 1 instances of WebDriverterminate other session
Paint: 50 { value: 76.203857421875,
unit: 'ms',
Welcome to the Emacs shell
~/efecte/SUMA-5622/webapps/equipment/efecte_refresh/test/e2e_tests $ cd ..
~/efecte/SUMA-5622/webapps/equipment/efecte_refresh/test $ cd ..
~/efecte/SUMA-5622/webapps/equipment/efecte_refresh $ grunt protractor:c
Running "protractor:c" (protractor) task
Using the selenium server at http://localhost:4444/wd/hub
[launcher] Running 1 instances of WebDriverterminate other session
list 50 { numAnimationFrames:
{ value: 443,
==== TEST CI
* Our Test Suit
-- Jasmine () ui
-- ProtractorJS () ui
-- jUnit () be
** Hardware