// jQuery
$(document).ready(function() {
// code
})
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
// Node.js CheatSheet. | |
// Download the Node.js source code or a pre-built installer for your platform, and start developing today. | |
// Download: http://nodejs.org/download/ | |
// More: http://nodejs.org/api/all.html | |
// 0. Synopsis. | |
// http://nodejs.org/api/synopsis.html |
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
// O(n^2) - time complexity | |
// O(1) - space complexity | |
// insertion sort | |
function insertionSort(arr){ | |
// start loop from the second element in the Array | |
for (var i=1; i<arr.length; i++){ | |
// store current elem | |
var temp = arr[i]; | |
// start comparing current elem to the previous |
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
// O(log(n)) - time complexity | |
// O(n) - space complexity | |
function binarySearch(arr,val){ | |
if (arr.length === 0){return -1;} | |
var li = 0; | |
var hi = arr.length-1; | |
while(li<=hi){ | |
var mid = Math.floor(li+(hi-li)/2); |
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 SLL(){ | |
this.head = null; | |
} | |
function Node(val){ | |
this.val = val; | |
this.next = null; | |
} |
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 { | |
text-align: center; | |
background: #5c5c5c url("http://gorbachenko.byethost18.com/assets/background_picture.png") ; | |
background-size: cover; | |
background-position: center top left; | |
color: white; | |
font-family: helvetica; | |
} | |
p { | |
font-size: 22px; |
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
header { | |
text-align: center; | |
background: url('http://gorbachenko.byethost18.com/assets/blog_bg2.png'); | |
background-size: cover; | |
color: white; | |
} | |
a { | |
text-decoration: none; | |
color: white; | |
} |
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 { | |
font-family: helvetica, sans-serif; | |
margin: 0 auto; | |
/*max-width: 600px;*/ | |
background: #232323; | |
} | |
div { | |
height: 200px; | |
background-size: cover; | |
position: relative; |
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
//Objects | |
var literalObject = { | |
name: "literalObject", | |
property1: "some data", //string | |
property2: 3, // number | |
property3: [], //array | |
property4: {}, | |
method1: function(){ | |
var result = []; | |
for (var prop in this) { |
NewerOlder