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
class Box | |
###* | |
Class for representing a box. A box is specified as a top, right, bottom | |
and left. | |
@constructor | |
@param {Object} options Options object to hold top, right, bottom | |
and left values. | |
### |
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
describe 'Box', -> | |
beforeEach -> | |
box = new Box | |
top : 200 | |
right : 400 | |
bottom : 400 | |
left : 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
window.IDE.appControllers.helloworld = function() { | |
time = new Date().toString().match(/(\d\d:\d\d:\d\d)/)[0]; | |
view = new KDCustomHTMLView({ | |
tagName: 'h2', | |
partial: 'HELLO WORLD APP LOADED at ' + time + ' !!!' | |
}); | |
return view; | |
} |
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
//import the selenium web driver | |
var webdriver = require('selenium-webdriver'); | |
var chromeCapabilities = webdriver.Capabilities.chrome(); | |
//setting chrome options to start the browser fully maximized | |
var chromeOptions = { | |
'args': ['--test-type', '--start-maximized'] | |
}; | |
chromeCapabilities.set('chromeOptions', chromeOptions); | |
var driver = new webdriver.Builder().withCapabilities(chromeCapabilities).build(); |
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 fio = {}; | |
fio.deneme = function(xxx){ | |
alert(xxx); | |
} | |
var oldfunction = fio.deneme; | |
fio.deneme = function(){ |
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 tags = {}; | |
$("*").each(function(item) { | |
if (!tags[this.tagName]) { | |
tags[this.tagName] = 0; | |
} | |
tags[this.tagName]++; | |
}); | |
console.dir(tags); |
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
<!DOCTYPE> | |
<html> | |
<head> | |
<title>YSlow Notes</title> | |
<style type="text/css"> | |
body { margin: 0; padding: 0; background: #F6F6F6; font-size: 13px; color: #333; font-family: Arial; } | |
h2 { margin: 0; padding-left: 15px; font-size: 18px; border-bottom: 1px dotted #5F5F5F; color: #872929; } | |
p { margin: 0; padding: 5px 15px 30px; } | |
</style> | |
</head> |
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
.panelNode-script { background-color: #EFEFE7; color: black; cursor: default; font-family: Monaco,Monospace,Courier New !important; font-size: 12px; } | |
.sourceRow.hovered { background-color: #EEEEEE; } | |
.sourceLine { background: none no-repeat scroll 2px 0 #EEEEEE; border-bottom: 1px solid #EEEEEE; border-right: 1px solid #CCCCCC; color: #888888; } | |
.sourceLine:hover { text-decoration: none; } | |
.scriptTooltip { background: none repeat scroll 0 0 LightYellow; border: 1px solid #CBE087; color: #000000; } | |
.sourceRow[exeline="true"] { background-color: lightgoldenrodyellow; outline: 1px solid #D9D9B6; } | |
.js-comment { color: gray; font-size: 11px; } | |
.whitespace { color: blue; } | |
.js-variable { color: #7C3A99; } | |
.js-punctuation { color: black; } |
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 events = data.events; | |
var date = {}; | |
for (var i = 0, ii = events.length; i < ii; i++) { | |
if (!date[events[i]['date']]) { | |
date[events[i]['date']] = []; | |
}; | |
date[events[i]['date']].push(events[i]); | |
} | |
console.log(date); |
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
// Divide by 10 and round it, then multiply by 10. | |
var x = 136; | |
console.log(Math.round(x / 10) * 10); | |