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
$(document).ready(function() { | |
$("div").dblClick(function() { | |
$(this).fadeOut("fast"); | |
}); | |
}); |
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
$(document).ready(function() { | |
$("div").mouseenter(function() { | |
$(this).fadeTo("fast", 1); | |
}); | |
$("div").mouseleave(function() { | |
$(this).fadeTo("fast", 0.25); | |
}); | |
}); |
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 arr = [2,5,1,0] | |
addVar = 0, | |
n = arr.length, | |
i = 0, j = 0; | |
for (i = 1; i < n; i++) | |
for(j = 0; j < n - i; j++) | |
if (arr[j]>arr[j+1]) { | |
addVar=arr[j+1] | |
arr[j+1]=arr[j]; | |
arr[j]=addVar; |
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 i, j, | |
arr = [2,5,1,0], | |
max = 0, | |
n = arr.length; | |
for (i = 1; i < n; i++) | |
for (j = 0; j < n - 1 ; j++) { | |
max = arr[j + 1]; | |
if (arr[j] > max) { |
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 myFirstModule = require("./myFirstModule"); | |
myFirstModule.start(); |
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 arr = [7,3,1,2,2,1,7,1,1,1,4], arrObj = {}; | |
function elementCount(arr) { | |
var i = 0, prop, name; | |
for (i = 0; i < arr.length; i++) { | |
name = arr[i]; | |
if (!arrObj[name]) { | |
arrObj[name] = 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
function Animal(name) { | |
this.name = name; | |
this.getName = function() { | |
console.log(this.name); | |
} | |
} | |
function Cat(name) { | |
this.name = name; | |
this.meow = function() { |
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
body { | |
background-color: #000080; | |
color: #0FF; | |
} | |
a { | |
color: #0FF; | |
} | |
.cmd-button { |
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 fs = require('fs'); | |
var buf = fs.readFileSync('les01.js');//process.argv[2] | |
var str = buf.toString(); | |
var arr = str.split("\n"); | |
console.log(arr.length - 1); |
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
/* module update cloud commander */ | |
(function(){ | |
'use strict'; | |
if(!global.cloudcmd) | |
return console.log( | |
'# update.js' + '\n' + | |
'# -----------' + '\n' + | |
'# Module is part of Cloud Commander,' + '\n' + |
OlderNewer