- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
- They are the people who get things done. Effective Engineers produce results.
var Singleton = (function(){ | |
var _instance; | |
function init() { | |
function privateMethod() {} | |
var privateVariable = "42"; | |
var privateRandomX = Math.random(); | |
return { | |
publicMethod: function() {}, | |
publicProperty: "23", | |
getRandomX: function() { return privateRandomX; } |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
<!DOCTYPE html> | |
<html> | |
<head> | |
<link href="//aveline.oss.aliyuncs.com/themes/its-compiling/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css"> | |
<link href="//fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css"> | |
</head> | |
<body> | |
<div class="wrapper"> |
#include <iostream> | |
using namespace std; | |
bool updateProcess(int pct) | |
{ | |
cout << pct << "% complete...\n"; | |
return (true); | |
} |
const int datalen=32; | |
const int dbN=3; | |
const int stages=4; | |
/* interface array, put your signal data here and | |
pure signal is returned here after filtering*/ | |
double dataio[datalen]; | |
double data[datalen];// main data arrays | |
double har[stages][datalen]; | |
double gar[stages][datalen]; |
(function($) { | |
$.extend($.expr[':'], { | |
group: function(element, index, matches, set) { | |
var num = parseInt(matches[3], 10); | |
if (isNaN(num)){ | |
return false; | |
} | |
return index % num < num; | |
}, | |
//$.fn.cycle.defaults.random = true; | |
$(document).ready(function(){ | |
$('#books').cycle({ | |
timeout: 1000, | |
delay: -1000, // (1) | |
speed: 1500, | |
pause: true, | |
before: function(){ |
$(document).ready(function(){ | |
$('div.chapter a[href*="wikipedia"]').attr({ | |
rel: 'external', | |
title: function() { | |
return 'Learn about ' + $(this).text() + ' at Wikipedia.'; | |
}, | |
id: function(index, oldValue) { | |
return 'wikilink-' + index; | |
} | |
}); |
$(document).ready(function(){ | |
$('#selected-plays > li li').addClass('special'); | |
$('tr').each(function(){ | |
$(this).children('td:eq(2)').addClass('year'); | |
}); | |
$('tr:contains(Tragedy)').first().addClass('special'); | |
$('a').parent().siblings().andSelf().addClass('afterlink'); |