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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css" /> | |
<style> | |
body { padding-top: 80px; } | |
</style> | |
</head> | |
<body> |
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
<!DOCTYPE html> | |
<html ng-app="MyApp"> | |
<head> | |
<title>CoolShop</title> | |
<style> | |
.item label { | |
margin: 10px; | |
display: inline-block; | |
min-width: 250px; | |
} |
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 Fixtures(opts) { | |
var self = this; | |
opts = opts || {}; | |
self.base = opts.base ? opts.base : ""; | |
self._cache = {}; | |
self.fixture_id = opts.fixture_id || "fixture"; | |
self.el; | |
return { |
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 assert = chai.assert; | |
describe('Sinon', function() { | |
describe('spies', function() { | |
it('should keep count', function() { | |
// fill code here | |
spy(); | |
spy(); | |
spy(); |
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
// Karma configuration | |
// Generated on Sun Sep 22 2013 11:31:34 GMT+0300 (IDT) | |
module.exports = function(config) { | |
config.set({ | |
// base path, that will be used to resolve files and exclude | |
basePath: '', | |
preprocessors: { |
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 testRetryCounter = 0; | |
var assert = chai.assert; | |
$.ajax = function(opts) { | |
testRetryCounter++; | |
setTimeout(opts.error, 0); | |
}; | |
describe('Data', function() { | |
describe('#sendData()', 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
var testRetryCounter = 0; | |
var assert = chai.assert; | |
$.ajax = function(opts) { | |
testRetryCounter++; | |
setTimeout(opts.error, 0); | |
}; | |
var real_setTimeout = setTimeout; |
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(global, $) { | |
function PersonalData() { | |
var numRetries = 3; | |
var sendData = function() { | |
$.ajax({ | |
url: '/api/data', | |
type: 'POST', | |
error: function(err) { |
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
#include "typer.h" | |
#include <QDebug> | |
Typer::Typer(QObject *parent) : | |
QObject(parent) | |
{ | |
m_text = "The quick brown fox jumps over the lazy dog"; | |
m_idx = 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
QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL", "products"); | |
bool ok = db.open(); |