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> | |
| </head> | |
| <body> | |
| <svg id="container"></svg> | |
| <script src="http://cdnjs.cloudflare.com/ajax/libs/d3/3.0.1/d3.v3.min.js"></script> |
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> | |
| <style> | |
| .page { display: none } | |
| .active.page { display: block } | |
| </style> | |
| </head> |
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 Product = function(name, price) { | |
| this.price = price; | |
| this.name = name; | |
| this.apply_discount = function(pct) { | |
| this.name *= (1-pct); | |
| }; | |
| }; | |
| var p1 = new Product('foo', 20); |
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
| casper.options.verbose = true; | |
| casper.options.logLevel = 'error'; | |
| casper.options.waitTimeout = 5000; | |
| casper.on('error', function(err) { | |
| this.echo('----> ERROR <----'); | |
| }); | |
| casper.test.begin('Testing errors', function(test) { | |
| var url = 'http://www.ynonperek.com/static/test.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
| #include "mainwindow.h" | |
| #include "ui_mainwindow.h" | |
| MainWindow::MainWindow(QWidget *parent) : | |
| QMainWindow(parent), | |
| ui(new Ui::MainWindow) | |
| { | |
| ui->setupUi(this); | |
| QObject::connect(ui->listWidget, SIGNAL(itemActivated(QListWidgetItem*)), |
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
| /** | |
| * Namespaces in JavaScript are defined using objects | |
| * We'll start from the global object and define nested | |
| * namespaces within. | |
| * | |
| * All namespaces are accessible from every other JS file using | |
| * their fully qualified name starting from global. | |
| * i.e. global.myapp.data.number = 5; | |
| */ |
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
| use strict; | |
| use warnings; | |
| use v5.14; | |
| package Contacts; | |
| sub init { | |
| my %data; | |
| return \%data; | |
| } |
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
| { | |
| "name": "day12", | |
| "version": "0.0.1", | |
| "private": true, | |
| "dependencies": { | |
| "express" : "*" | |
| } | |
| } |
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 http = require('http'); | |
| var handler = function(req, res) { | |
| res.write('Hello Node'); | |
| res.end(); | |
| }; | |
| var server = http.createServer( handler ); | |
| server.listen(8080 ); |
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
| use strict; | |
| use warnings; | |
| use v5.14; | |
| my $RE_PATTERN = qr { | |
| # | |
| # This is a cool regular pattern | |
| # | |
| # DIGIT DIIGT DIGIT Ends with an x | |
| [0-9] [0-9] [0-9] x$ |