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
// bad way | |
button.addEventListener('click', function (e) { | |
// something | |
}); | |
// this is bad as removeEventListener needs to have | |
// the function originally used in creation passed back | |
// correct way | |
var handler = function (e) { | |
// something |
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
Ti.APP | |
close | |
pause | |
resume | |
proximity | |
Ti.UI.DashboardView | |
delete | |
dragStart | |
dragEnd |
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 mongoose = require('mongoose'); | |
mongoose.connect('mongodb://localhost/bookmarks'); | |
var db=mongoose.connection; | |
db.on('error', console.error.bind(console, 'connection error:')); | |
db.once('open', function callback () { | |
console.log('Running'); | |
var Users = mongoose.model('users', { name: String, lastname: String, yas: Number, yer: String }); |
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 http = require('http'); | |
var mongoose = require('mongoose'); | |
var Schema = mongoose.Schema; | |
var userSchema = new Schema({ name: String, lastname: String, yas: Number, yer: String }); | |
http.createServer(function (req, res) { | |
res.writeHead(200, {'Content-Type': 'application/json; charset=utf-8'}); |
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
[{"resimURL":"www.google.com.tr","haberbasligi":"haber başlık0","habericerik":"Haber içerik0","tarih":"2014-05-11T20:06:42.581Z","yazar":"Nazir"},{"resimURL":"www.google.com.tr","haberbasligi":"haber başlık1","habericerik":"Haber içerik1","tarih":"2014-05-11T20:06:42.582Z","yazar":"Nazir"},{"resimURL":"www.google.com.tr","haberbasligi":"haber başlık2","habericerik":"Haber içerik2","tarih":"2014-05-11T20:06:42.582Z","yazar":"Nazir"},{"resimURL":"www.google.com.tr","haberbasligi":"haber başlık3","habericerik":"Haber içerik3","tarih":"2014-05-11T20:06:42.582Z","yazar":"Nazir"},{"resimURL":"www.google.com.tr","haberbasligi":"haber başlık4","habericerik":"Haber içerik4","tarih":"2014-05-11T20:06:42.582Z","yazar":"Nazir"},{"resimURL":"www.google.com.tr","haberbasligi":"haber başlık5","habericerik":"Haber içerik5","tarih":"2014-05-11T20:06:42.582Z","yazar":"Nazir"},{"resimURL":"www.google.com.tr","haberbasligi":"haber başlık6","habericerik":"Haber içerik6","tarih":"2014-05-11T20:06:42.582Z","yazar":"Nazir"},{"resimU |
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 express, cons, mongoclient, app,Server; | |
express = require('express'); | |
cons = require('consolidate'); | |
MongoClient = require('mongodb').MongoClient; | |
Server=require('mongodb').Server; | |
app = express(); | |
app.engine('html',cons.swig); |
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=title | |
meta(name='viewport', content='width=device-width, initial-scale=1.0') | |
link(rel="stylesheet", href='//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css') | |
link(rel="stylesheet", href='/css/style.css') | |
script(src='http://code.jquery.com/jquery.js') | |
script(src='js/bootstrap.min.js') | |
body |
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
#include <dht.h> | |
dht DHT; | |
#define DHT11_PIN 5 | |
void setup() | |
{ |
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
# Ubuntu node | |
sudo apt-get install nodejs nodejs-legacy | |
# Or Chris Lea's PPA Node (more up to date) | |
sudo add-apt-repository ppa:chris-lea/node.js | |
sudo apt-get update | |
sudo apt-get install nodejs | |
sudo apt-get install build-essential | |
npm install serialport |
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
npm install express |