SlideShare uma empresa Scribd logo
1 de 85
Baixar para ler offline
Variables and Functions
• level 1 •
A Beautiful Programming Language
✦ Least amount of code to solve problems
✦ Readable and Understandable
✦ Easy to Maintain
?
✦ Least amount of code to solve problems
✦ Readable and Understandable
✦ Easy to Maintain
compiles into
http://jashkenas.github.com/coffee-script/
http://jashkenas.github.com/coffee-script/
CoffeeScript JavaScript
CoffeeScript
JavaScript
Variables
No semicolons
var message;
message = "Ready for some Coffee?";
alert(message);
message = "Ready for some Coffee?"
alert(message)
No variable declarations
Variables and Functions
function coffee() {
return confirm("Ready for some Coffee?");
}
Variables and Functions
✦ Named Functions
2 ways to create Functions in JS
var coffee = function() {
return confirm("Ready for some Coffee?");
}
✦ Function Expressions
coffee();
Both called with
Variables and Functions
We only use Function Expressions
coffee = ->
confirm "Ready for some Coffee?"
var coffee = function() {
return confirm("Ready for some Coffee?");
}
1 tab or 2 spaces indented
-> converts to function() {
Always has a return value
Variables and Functions
Returning a String
answer = confirm "Ready for some Coffee?"
coffee = ->
"Your answer is " + answer
var answer;
var coffee;
coffee = function() {
answer = confirm("Ready for some Coffee?");
return "Your answer is " + answer;
}
"Your answer is #{answer}"
same as
Variables and Functions
Function Parameters
answer = confirm message
coffee = (message) ->
var answer;
var coffee;
return "Your answer is " + answer;
}
"Your answer is #{answer}"
coffee = function( ) {
answer = confirm( );
message
message
Variables and Functions
Calling Functions
coffee = (message) ->
coffee = ->
coffee = (message, other) ->
coffee()
coffee("Yo")
coffee "Yo"
coffee("Yo", 2)
coffee "Yo", 2
parenthesis optional
Variables and Functions
Function Parameters
coffee = (message) ->
answer = confirm message
"Your answer is #{answer}"
parenthesis on everything
but the outermost call
coffeealert "Ready for some Coffee?"( )
Variables and Functions
Optional Parameters
answer = confirm message
"Your answer is #{answer}"
coffeealert
"Ready for some Coffee?"
()
If we want a default message
coffee = (message ) ->=
coffeealert ( )"Want some Decaf?"
Variables and Functions
Optional Parameters
answer = confirm message
"Your answer is #{answer}"
"Ready for some Coffee?"coffee = (message ) ->=
var coffee;
coffee = function(message) {
var answer;
if (message == null) {
message = "Ready for some Coffee?";
}
answer = confirm(message);
return "Your answer is " + answer;
}
Variables and Functions
The CoffeeScript Compiler (optional)
$ npm install -g coffee-script
1. Install Node.js http://nodejs.org/
2. Install npm http://npmjs.org/
3.
$ coffee -h
Usage: coffee [options] path/to/script.coffee
-c, --compile compile to JavaScript and save as .js files
-i, --interactive run an interactive CoffeeScript REPL
-o, --output set the directory for compiled JavaScript
-w, --watch watch scripts for changes, and recompile
-p, --print print the compiled JavaScript to stdout
-e, --eval compile a string from the command line
Variables and Functions
Command Line Examples
$ coffee -c test.coffee Creates test.js
$ coffee -cw test.coffee
Every time test.coffee is
updated re-compile.
$ coffee -c src -o js
Compile all .coffee files in the
src dir into the js dir.
$ coffee -wc src -o js
Every time a file is updated
re-compile.
Variables and Functions
CoffeeScript TextMate Bundle
https://github.com/jashkenas/coffee-script-tmbundle
&SublimeText2
name author URL
Information density Arenamontanus http://www.flickr.com/photos/arenamontanus/535807315
Paper Writings: Quotes Lucia.. http://www.flickr.com/photos/angelic0devil6/2104607220
Sütterlin ninastoessinger http://www.flickr.com/photos/ninastoessinger/4713004390
FF DIN Round: ‘Round Pieces’FontFont http://www.flickr.com/photos/fontfont/4840584146
Sonnet 18 Jinx! http://www.flickr.com/photos/span112/3041263205
Creative Commons
download the slides
use the hints
Applied jQuery
• level 2 •
jQuery to CoffeeScript
Applied jQuery
jQuery(function($) {
function changeTab(e) {
e.preventDefault();
$("#tabs li a.active").removeClass("active");
$(this).addClass("active");
$("#tabs ul li a").click(changeTab);
});
}
jQuery ($) -> $ ->or
* If no other libraries are using $
*
jQuery to CoffeeScript
Applied jQuery
function changeTab(e) {
e.preventDefault()
$("#tabs li a.active").removeClass("active")
$(this).addClass("active")
$("#tabs ul li a").click(changeTab)
})
}
$ ->
changeTab = (e) ->
;
;
;
;
;
jQuery to CoffeeScript
Applied jQuery
e.preventDefault()
$("#tabs li a.active").removeClass("active")
$(this).addClass("active")
$("#tabs ul li a").click(changeTab)
})
}
$ ->
changeTab = (e) ->
Remove all semicolons and curly brackets
;
;
;
;
;
jQuery to CoffeeScript
Applied jQuery
$ ->
changeTab = (e) ->
e.preventDefault()
$("#tabs li a.active").removeClass("active")
$(this).addClass("active")
$("#tabs ul li a").click(changeTab)
Optionally remove parenthesis
jQuery to CoffeeScript
Applied jQuery
$ ->
changeTab = (e) ->
e.preventDefault()
$("#tabs li a.active").removeClass "active"
$(this).addClass "active"
$("#tabs ul li a").click changeTab
$(@).addClass "active"
same as
@ = this
jQuery to CoffeeScript
Applied jQuery
$ ->
changeTab = (e) ->
e.preventDefault()
$("#tabs li a.active").removeClass "active"
$("#tabs ul li a").click changeTab
$(@).addClass "active"
jQuery(function($) {
function changeTab(e) {
e.preventDefault();
$("#tabs li a.active").removeClass("active");
$(this).addClass("active");
$("#tabs ul li a").click(changeTab);
});
}
jQuery to CoffeeScript
Applied jQuery
$("#tabs #error a").click(function (e){
e.preventDefault();
});
$("#tabs #error a").click (e) ->
e.preventDefault()
$('#confirm').queue(function() {
$(this).dequeue();
});
$("#confirm").queue ->
$(@).dequeue()
jQuery to CoffeeScript
Applied jQuery
function showNumberOfFlights(e) {
var num_flights = $(this).data('flights');
$(this).append("<span>" + num_flights +"</span>");
$("#tabs span.tooltip").show();
}
showNumberOfFlights = (e) ->
num_flights = $(@).data 'flights'
$(@).append "<span>#{flights}</span>"
$("#tabs span.tooltip").show()
Conditionals & Operators
• level 3 •
If Statement
Parenthesis
if age < 18
alert 'Under age'
if (age < 18) {
alert('Under age');
}
Conditionals & Operators
Optional
alert 'Under age' if age < 18
if age < 18 then alert 'Under age'
If Else Statement
if age < 18
alert 'Under age'
if (age < 18) {
alert('Under age');
} else {
alert('of age');
}
else
alert 'of age'
if age < 18 then alert 'Under age' else alert 'of age'
Conditionals & Operators
No Ternary Operator
Operators
CoffeeScript JavaScript
===== is
!==isnt
not !
!=
and &&
or ||
true yes on true
false no off false
Conditionals & Operators
Operator Examples & Unless
addCaffeine() if not Decaf()
if paid() and coffee() is on then pour()
addCaffeine() unless Decaf()
if (paid() && coffee() === true) {
pour();
}
Conditionals & Operators
Chained Comparisons
if (2 < newLevel && newLevel < 5) {
alert("In Range!");
}
if 2 < newLevel < 5
alert "In Range!"
Conditionals & Operators
Switch Statements
var message = (function() {
switch (cupsOfCoffee) {
case 0:
return 'Asleep';
case 1:
return 'Eyes Open';
case 2:
return 'Buzzed';
default:
return 'Dangerous';
}
})();
message = switch cupsOfCoffee
when 0 then 'Asleep'
when 1 then 'Eyes Open'
when 2 then 'Buzzed'
else 'Dangerous
Conditionals & Operators
Existential Operators
cupsOfCoffeeHow do we check to see that
isn’t defined and isn’t null?
if (typeof cupsOfCoffee !== "undefined" && cupsOfCoffee !== null) {
alert('it exists!');
}
if cupsOfCoffee?
alert 'it exists!'
alert 'it exists!' if cupsOfCoffee?
Conditionals & Operators
Existential Operators
cupsOfCoffeeSet to Zero unless previously set
if not cupsOfCoffee?
cupsOfCoffee = 0
cupsOfCoffee = 0 unless cupsOfCoffee?
cupsOfCoffee ?= 0
Conditionals & Operators
Existential Operators
brew()Call on
if coffeePot?
coffeePot.brew()
coffeePot only if it exists
coffeePot?.brew()
vehicle.start_engine?().shift_gear?()
Only call function if it exists
in Ruby “try()”
Conditionals & Operators
Arrays, Objects, Iteration
• level 4 •
Ranges
Arrays, Objects, Iteration
range = [1..4]
var range = [1, 2, 3, 4];
range = [1...4]
var range = [1, 2, 3];
With three dots excludes the end
start = 5
end = 10
range = [start..end]
Variables & Subsets
[5, 6, 7, 8, 9, 10]
range[1..4]
[6, 7, 8, 9]
range[1...range.length]
[6, 7, 8, 9, 10]
range[1..-1]
Arrays
storeLocations = [
'Orlando'
'Winter Park'
'Sanford'
]
storeLocations = ['Orlando', 'Winter Park', 'Sanford']
Can use new lines instead of commas
Arrays, Objects, Iteration
Loops
storeLocations = ['Orlando', 'Winter Park', 'Sanford']
storeLocations.forEach (location, index) ->
alert "Location: #{location}"
Arrays, Objects, Iteration
storeLocations.forEach(function(location, index) {
return alert("Location: " + location);
});
Loops
storeLocations = ['Orlando', 'Winter Park', 'Sanford']
storeLocations.forEach (location, index) ->
alert "Location: #{location}"
for location in storeLocations
alert "Location: #{location}"
alert "Location: #{location}" for location in storeLocations
This is a list comprehension
Arrays, Objects, Iteration
List Comprehensions
storeLocations = ['Orlando', 'Winter Park', 'Sanford']
Add “, FL” to each storeLocation
it’s an expression
"#{loc}, FL" for loc in storeLocations
['Orlando, FL', 'Winter Park, FL', 'Sanford, FL']
storeLocations = ("#{loc}, FL" for loc in storeLocations)
the parenthesis are important
geoLocate(loc) for loc in storeLocations when loc isnt 'Sanford'
filter (expression)
List Comprehensions
storeLocations = ['Orlando', 'Winter Park', 'Sanford']
it’s an expression
Create new array without Sanford
['Orlando', 'Winter Park']
newLocs = []
for loc in storeLocations
newLocs.push loc if loc isnt 'Sanford'
same as
newLocs = (loc for loc in storeLocations when loc isnt 'Sanford')
Splats
'Looking for Starducks in Orlando'
same as
searchLocations = (brand, cities...) ->
"looking for #{brand} in #{cities.join(',')}"
For a variable number of arguments
searchLocations 'Starducks', 'Orlando'
searchLocations 'Starducks', 'Orlando', 'Winter Park'
'Looking for Starducks in Orlando, Winter Park'
params = ['Starducks', 'Orlando', 'Winter Park']
searchLocations(params...)
curly braces optional
Objects
Objects are lists of keys & values (hash)
coffee = { name: 'French', strength: 1 }
coffee = name: 'French', strength: 1
coffee =
name: 'French'
strength: 1
commas optional
Arrays, Objects, Iteration
Objects
coffee =
name: 'French'
strength: 1
brew: -> alert("brewing #{@name}")
var coffee = {
name: 'French',
strength: 1,
brew: function() {
return alert("brewing " + this.name);
}
};
coffee.brew()
called with
Arrays, Objects, Iteration
Objects
coffee =
name: 'French'
strength: 1
brew: -> alert("brewing #{@name}")
pour: (amount=1) ->
if amount is 1
"Poured a single cup"
else
"Poured #{amount} cups"
pour: function(amount) {
if (amount == null) amount = 1;
if (amount === 1) {
return "Poured a single cup";
} else {
return "Poured " + amount + " cups";
}
Arrays, Objects, Iteration
Careful with your Indenting!
coffee =
name: 'French'
strength: 1
coffee = {
name: 'French'
};
({
strength: 1
})
indent issues!
Arrays, Objects, Iteration
Complex Objects
coffees =
french:
strength: 1
in_stock: 20
italian:
strength: 2
in_stock: 12
decaf:
strength: 0
in_stock: 8
var coffees = {
french: {
strength: 1,
in_stock: 20
},
italian: {
strength: 2,
in_stock: 12
},
decaf: {
strength: 0,
in_stock: 0
}
};
coffees.italian.in_stock
_stock
12
Arrays, Objects, Iteration
Object Iteration with of
coffees =
french:
strength: 1
in_stock: 20
italian:
strength: 2
in_stock: 12
decaf:
strength: 0
in_stock: 0
_stock
"#{coffee} has #{attrs.in_stock}" for coffee, attrs of coffees
["french has 20", "italian has 12", "decaf has 0"]
KEY VALUE
iterating over object
Object Iteration with of
_stock
"#{coffee} has #{attrs.in_stock}" for coffee, attrs of coffees
["french has 20", "italian has 12", "decaf has 0"]
for coffee, attrs of coffees
"#{coffee} has #{attrs.in_stock}"
"french has 20, italian has 12"
to_print.join ", "
same as
"#{coffee} has #{attrs.in_stock}"
to_print = for coffee, attrs of coffees when attrs.in_stock > 0
Arrays, Objects, Iteration
Object Iteration with of
_stock
"#{coffee} has #{attrs.in_stock}"
to_print = for coffee, attrs of coffees when attrs.in_stock > 0
var attrs, coffee, to_print;
to_print = (function() {
var _results;
_results = [];
for (coffee in coffees) {
attrs = coffees[coffee];
if (attrs.in_stock > 0) _results.push("" + coffee + " has "
+ attrs.in_stock);
}
return _results;
})();
to_print.join(", ")
to_print.join ", "
Applied jQuery, Part 2
• level 5 •
Object Simplicity
Applied jQuery, Part 2
$("#tabs ul li a").bind({
click: changeTab,
mouseenter: showNumberOfFlights,
mouseleave: hideNumberOfFlights
});
$("#tabs ul li a").bind
click: changeTab
mouseenter: showNumberOfFlights
mouseleave: hideNumberOfFlights
A Complex Example
showFlights = (activeDiv) ->
$("#tabs div").hide()
function showFlights(activeDiv) {
$("#tabs div").hide();
if (fetchingFlights) {
fetchingFlights.abort();
}
fetchingFlights = $.ajax('/flights', {
data: { date: activeDiv },
cache: false,
error: function(result) {
if (result.statusText != "abort") {
$('#tabs #error').show();
}
}
});
}
{
Applied jQuery, Part 2
showFlights = (activeDiv) ->
$("#tabs div").hide()
if (fetchingFlights) {
fetchingFlights.abort();
}
fetchingFlights = $.ajax('/flights', {
data: { date: activeDiv },
cache: false,
error: function(result) {
if (result.statusText != "abort") {
$('#tabs #error').show();
}
}
});
}
if fetchingFlights
fetchingFlights.abort()
A Complex Example
{
Applied jQuery, Part 2
showFlights = (activeDiv) ->
$("#tabs div").hide()
fetchingFlights = $.ajax('/flights', {
data: { date: activeDiv },
cache: false,
error: function(result) {
if (result.statusText != "abort") {
$('#tabs #error').show();
}
}
});
}
if fetchingFlights
fetchingFlights.abort()
fetchingFlights = $.ajax '/flights'
data:
date: activeDiv
cache: false
A Complex Example
{
Applied jQuery, Part 2
showFlights = (activeDiv) ->
$("#tabs div").hide()
error: function(result) {
if (result.statusText != "abort") {
$('#tabs #error').show();
}
}
});
}
if fetchingFlights
fetchingFlights.abort()
fetchingFlights = $.ajax '/flights'
data:
date: activeDiv
cache: false
A Complex Example
{ error: (result) ->
if result.statusText isnt "abort"
$('#tabs #error').show()
Applied jQuery, Part 2
showFlights = (activeDiv) ->
$("#tabs div").hide()
if fetchingFlights
fetchingFlights.abort()
fetchingFlights = $.ajax '/flights'
data:
date: activeDiv
cache: false
A Complex Example
error: (result) ->
if result.statusText isnt "abort"
$('#tabs #error').show()
46 Less Characters!
Applied jQuery, Part 2
Mind Bending Comprehensions
if (stops == '2+' || flight.routing == 0) {
filteredFlights.push(flight);
}
});
var filteredFlights = [];
$.each(currentFlights, function(index, flight) {
$.each currentFlights, (index, flight) ->
if stops is '2+' or flight.routing is 0
filteredFlights.push flight
filteredFlights = []
Applied jQuery, Part 2
Mind Bending Comprehensions
$.each currentFlights, (index, flight) ->
if stops is '2+' or flight.routing is 0
filteredFlights.push flight
filteredFlights =
(flight for flight in currentFlights when stops is '2+' or
flight.routing is 0)
Applied jQuery, Part 2
filteredFlights = []
Object Orientation
• level 6 •
Remember the Coffee Object?
Object Orientation
coffee =
name: 'French'
strength: 1
brew: -> alert "brewing #{@name}"
pour: (amount=1) ->
if amount is 1
"Poured a single cup"
else
"Poured #{amount} cups"
Constructors & Properties
class Coffee
constructor: (name, strength=1) ->
class Coffee
constructor: (@name, @strength=1) ->
same as
@name = name
@strength = strength
Object Orientation
called when instantiated
Constructors & Properties
class Coffee
constructor: (@name, @strength=1) ->
brew: -> alert "brewing #{@name}"
pour: (amount=1) ->
if amount is 1
"Poured a single cup"
else
"Poured #{amount} cups"
french = new Coffee("French", 2)
french.brew()
Object Orientation
Inheritance
class Coffee
constructor: (@name, @strength=1) ->
brew: -> alert "brewing #{@name}"
class MaxgoodHouse extends Coffee
constructor: (@name, @strength=0) ->
@brand = "Maxgood House"
boring = new MaxgoodHouse("Boring")
boring.brew()
Object Orientation
Inheritance
class MaxgoodHouse extends Coffee
constructor: (@name, @strength=0) ->
@brand = "Maxgood House"
boring = new MaxgoodHouse("Boring")
boring.brew()
brew: -> alert "Brewing #{@brand} #{@name}"
Object Orientation
Inheritance
class MaxgoodHouse extends Coffee
constructor: (@name, @strength=0) ->
@brand = "Maxgood House"
boring = new MaxgoodHouse("Boring")
boring.pour()
brew: -> alert "Brewing #{@brand} #{@name}"
pour: (amount=1) ->
"#{super(amount)}, but it sucks"
Object Orientation
The Fat Arrow
@inventory @nameand
Looking for property of the dom element
called
Error!
$("#pour-#{@name}").click (event)
class Coffee
constructor: (@name, @strength=1, @inventory=0) ->
pourClick: ->
if @inventory isnt 0
@inventory -= 1
alert "Poured a cup of #{@name}"
->
Object Orientation
The Fat Arrow
Binds to current value of ‘this’
$("#pour-#{@name}").click (event)
class Coffee
constructor: (@name, @strength=1, @inventory=0) ->
pourClick: ->
if @inventory isnt 0
@inventory -= 1
alert "Poured a cup of #{@name}"
=>
Object Orientation
Using a Class for Encapsulation
class SelectFlights
{ var selectFlights = {
fetchingFlights : null,
init : function() {
$("#tabs ul li a").bind({
click: this.changeTab
});
$("#tabs #error a").click(function (event){
e.preventDefault();
this.showFlights($("#tabs li a.active").attr("href"));
});
},
showFlights : function(activeDiv) { },
changeTab : function(event) { }
});
Object Orientation
Using a Class for Encapsulation
class SelectFlights
{
fetchingFlights : null,
init : function() {
$("#tabs ul li a").bind({
click: this.changeTab
});
$("#tabs #error a").click(function (event){
e.preventDefault();
this.showFlights($("#tabs li a.active").attr("href"));
});
},
showFlights : function(activeDiv) { },
changeTab : function(event) { }
constructor: (@fetchingFlights=null) ->
});
Object Orientation
Using a Class for Encapsulation
class SelectFlights
{
$("#tabs ul li a").bind({
click: this.changeTab
});
$("#tabs #error a").click(function (event){
e.preventDefault();
this.showFlights($("#tabs li a.active").attr("href"));
});
},
showFlights : function(activeDiv) { },
changeTab : function(event) { }
$("#tabs ul li a").bind
click: @changeTab
});
Object Orientation
constructor: (@fetchingFlights=null) ->
Using a Class for Encapsulation
class SelectFlights
{
$("#tabs #error a").click(function (event){
e.preventDefault();
this.showFlights($("#tabs li a.active").attr("href"));
});
},
showFlights : function(activeDiv) { },
changeTab : function(event) { }
$("#tabs ul li a").bind
click: @changeTab
$("#tabs #error a").click (event) =>
event.preventDefault()
@showFlights $("#tabs li a.active").attr("href")
});
Object Orientation
constructor: (@fetchingFlights=null) ->
Using a Class for Encapsulation
class SelectFlights
{
showFlights : function(activeDiv) { },
changeTab : function(event) { }
$("#tabs ul li a").bind
click: @changeTab
$("#tabs #error a").click (event) =>
event.preventDefault()
@showFlights $("#tabs li a.active").attr("href")
changeTab : (event) =>
showFlights : (activeDiv) ->
});
Object Orientation
constructor: (@fetchingFlights=null) ->
Using a Class for Encapsulation
class SelectFlights
$("#tabs ul li a").bind
click: @changeTab
$("#tabs #error a").click (event) =>
event.preventDefault()
@showFlights $("#tabs li a.active").attr("href")
changeTab : (event) =>
showFlights : (activeDiv) ->
selectFlights = new SelectFlights()
Object Orientation
constructor: (@fetchingFlights=null) ->
test

Mais conteúdo relacionado

Mais procurados

10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)arcware
 
Practical Protocols with Associated Types
Practical Protocols with Associated TypesPractical Protocols with Associated Types
Practical Protocols with Associated TypesNatasha Murashev
 
Django Celery - A distributed task queue
Django Celery - A distributed task queueDjango Celery - A distributed task queue
Django Celery - A distributed task queueAlex Eftimie
 
Test like a pro with Ember.js
Test like a pro with Ember.jsTest like a pro with Ember.js
Test like a pro with Ember.jsMike North
 
O que há de novo no Rails 3 - Ruby on Rails no Mundo Real - 23may2010
O que há de novo no Rails 3 - Ruby on Rails no Mundo Real - 23may2010O que há de novo no Rails 3 - Ruby on Rails no Mundo Real - 23may2010
O que há de novo no Rails 3 - Ruby on Rails no Mundo Real - 23may2010Plataformatec
 
Rails2 Pr
Rails2 PrRails2 Pr
Rails2 Prxibbar
 
Php Unit With Zend Framework Zendcon09
Php Unit With Zend Framework   Zendcon09Php Unit With Zend Framework   Zendcon09
Php Unit With Zend Framework Zendcon09Michelangelo van Dam
 
JavaScript Unit Testing with Jasmine
JavaScript Unit Testing with JasmineJavaScript Unit Testing with Jasmine
JavaScript Unit Testing with JasmineRaimonds Simanovskis
 
2013 - Nate Abele: HTTP ALL THE THINGS: Simplificando aplicaciones respetando...
2013 - Nate Abele: HTTP ALL THE THINGS: Simplificando aplicaciones respetando...2013 - Nate Abele: HTTP ALL THE THINGS: Simplificando aplicaciones respetando...
2013 - Nate Abele: HTTP ALL THE THINGS: Simplificando aplicaciones respetando...PHP Conference Argentina
 
Painless Javascript Unit Testing
Painless Javascript Unit TestingPainless Javascript Unit Testing
Painless Javascript Unit TestingBenjamin Wilson
 
関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐいHisateru Tanaka
 
Your own (little) gem: building an online business with Ruby
Your own (little) gem: building an online business with RubyYour own (little) gem: building an online business with Ruby
Your own (little) gem: building an online business with RubyLindsay Holmwood
 
Europython 2011 - Playing tasks with Django & Celery
Europython 2011 - Playing tasks with Django & CeleryEuropython 2011 - Playing tasks with Django & Celery
Europython 2011 - Playing tasks with Django & CeleryMauro Rocco
 
Isomorphic App Development with Ruby and Volt - Rubyconf2014
Isomorphic App Development with Ruby and Volt - Rubyconf2014Isomorphic App Development with Ruby and Volt - Rubyconf2014
Isomorphic App Development with Ruby and Volt - Rubyconf2014ryanstout
 
PHP 8.1 - What's new and changed
PHP 8.1 - What's new and changedPHP 8.1 - What's new and changed
PHP 8.1 - What's new and changedAyesh Karunaratne
 

Mais procurados (20)

10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
 
Practical Protocols with Associated Types
Practical Protocols with Associated TypesPractical Protocols with Associated Types
Practical Protocols with Associated Types
 
Zend Framework
Zend FrameworkZend Framework
Zend Framework
 
Django Celery - A distributed task queue
Django Celery - A distributed task queueDjango Celery - A distributed task queue
Django Celery - A distributed task queue
 
Test like a pro with Ember.js
Test like a pro with Ember.jsTest like a pro with Ember.js
Test like a pro with Ember.js
 
O que há de novo no Rails 3 - Ruby on Rails no Mundo Real - 23may2010
O que há de novo no Rails 3 - Ruby on Rails no Mundo Real - 23may2010O que há de novo no Rails 3 - Ruby on Rails no Mundo Real - 23may2010
O que há de novo no Rails 3 - Ruby on Rails no Mundo Real - 23may2010
 
Laravel tips-2019-04
Laravel tips-2019-04Laravel tips-2019-04
Laravel tips-2019-04
 
Spring data jpa simple example_스프링학원/자바학원추천/구로IT학원/자바학원
Spring data jpa simple example_스프링학원/자바학원추천/구로IT학원/자바학원Spring data jpa simple example_스프링학원/자바학원추천/구로IT학원/자바학원
Spring data jpa simple example_스프링학원/자바학원추천/구로IT학원/자바학원
 
Rails2 Pr
Rails2 PrRails2 Pr
Rails2 Pr
 
Refactoring Infrastructure Code
Refactoring Infrastructure CodeRefactoring Infrastructure Code
Refactoring Infrastructure Code
 
Php Unit With Zend Framework Zendcon09
Php Unit With Zend Framework   Zendcon09Php Unit With Zend Framework   Zendcon09
Php Unit With Zend Framework Zendcon09
 
JavaScript Unit Testing with Jasmine
JavaScript Unit Testing with JasmineJavaScript Unit Testing with Jasmine
JavaScript Unit Testing with Jasmine
 
2013 - Nate Abele: HTTP ALL THE THINGS: Simplificando aplicaciones respetando...
2013 - Nate Abele: HTTP ALL THE THINGS: Simplificando aplicaciones respetando...2013 - Nate Abele: HTTP ALL THE THINGS: Simplificando aplicaciones respetando...
2013 - Nate Abele: HTTP ALL THE THINGS: Simplificando aplicaciones respetando...
 
Painless Javascript Unit Testing
Painless Javascript Unit TestingPainless Javascript Unit Testing
Painless Javascript Unit Testing
 
関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい
 
Your own (little) gem: building an online business with Ruby
Your own (little) gem: building an online business with RubyYour own (little) gem: building an online business with Ruby
Your own (little) gem: building an online business with Ruby
 
Europython 2011 - Playing tasks with Django & Celery
Europython 2011 - Playing tasks with Django & CeleryEuropython 2011 - Playing tasks with Django & Celery
Europython 2011 - Playing tasks with Django & Celery
 
Isomorphic App Development with Ruby and Volt - Rubyconf2014
Isomorphic App Development with Ruby and Volt - Rubyconf2014Isomorphic App Development with Ruby and Volt - Rubyconf2014
Isomorphic App Development with Ruby and Volt - Rubyconf2014
 
Volt 2015
Volt 2015Volt 2015
Volt 2015
 
PHP 8.1 - What's new and changed
PHP 8.1 - What's new and changedPHP 8.1 - What's new and changed
PHP 8.1 - What's new and changed
 

Destaque

Herbal penghilang rasa nyeri
Herbal penghilang rasa nyeriHerbal penghilang rasa nyeri
Herbal penghilang rasa nyeriLina Lubis
 
Nuevo presentación de microsoft power point
Nuevo presentación de microsoft power pointNuevo presentación de microsoft power point
Nuevo presentación de microsoft power pointSteffanyL
 
Final cut self_assessment
Final cut self_assessmentFinal cut self_assessment
Final cut self_assessmentKaylee Marie
 
Penyuntikkan insulin
Penyuntikkan insulinPenyuntikkan insulin
Penyuntikkan insulinLina Lubis
 
The Changing Nature of Brand Experience in Higher Education
The Changing Nature of Brand Experience in Higher EducationThe Changing Nature of Brand Experience in Higher Education
The Changing Nature of Brand Experience in Higher EducationJoel Pattison
 
Patrick presentation (1)
Patrick presentation (1)Patrick presentation (1)
Patrick presentation (1)Chijioke Unaeze
 
Drink and Drive Alcohol Detection
Drink and Drive Alcohol DetectionDrink and Drive Alcohol Detection
Drink and Drive Alcohol DetectionNandha_Gopal
 

Destaque (16)

Herbal penghilang rasa nyeri
Herbal penghilang rasa nyeriHerbal penghilang rasa nyeri
Herbal penghilang rasa nyeri
 
Nuevo presentación de microsoft power point
Nuevo presentación de microsoft power pointNuevo presentación de microsoft power point
Nuevo presentación de microsoft power point
 
test
testtest
test
 
test
testtest
test
 
test
testtest
test
 
Dev api deck_dan_v1
Dev api deck_dan_v1Dev api deck_dan_v1
Dev api deck_dan_v1
 
Final cut self_assessment
Final cut self_assessmentFinal cut self_assessment
Final cut self_assessment
 
Penyuntikkan insulin
Penyuntikkan insulinPenyuntikkan insulin
Penyuntikkan insulin
 
PropelAds
PropelAdsPropelAds
PropelAds
 
test
testtest
test
 
Ageandacquisitionnew
AgeandacquisitionnewAgeandacquisitionnew
Ageandacquisitionnew
 
Spin planes
Spin planesSpin planes
Spin planes
 
The Changing Nature of Brand Experience in Higher Education
The Changing Nature of Brand Experience in Higher EducationThe Changing Nature of Brand Experience in Higher Education
The Changing Nature of Brand Experience in Higher Education
 
Patrick presentation (1)
Patrick presentation (1)Patrick presentation (1)
Patrick presentation (1)
 
Drink and Drive Alcohol Detection
Drink and Drive Alcohol DetectionDrink and Drive Alcohol Detection
Drink and Drive Alcohol Detection
 
Telefon
TelefonTelefon
Telefon
 

Semelhante a test

Coffeescript - take a sip of code
Coffeescript - take a sip of codeCoffeescript - take a sip of code
Coffeescript - take a sip of codeDimitris Tsironis
 
Introduction to CoffeeScript
Introduction to CoffeeScriptIntroduction to CoffeeScript
Introduction to CoffeeScriptStalin Thangaraj
 
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and JasmineSingle Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and JasminePaulo Ragonha
 
Coffee scriptisforclosers nonotes
Coffee scriptisforclosers nonotesCoffee scriptisforclosers nonotes
Coffee scriptisforclosers nonotesBrandon Satrom
 
Ruby Metaprogramming
Ruby MetaprogrammingRuby Metaprogramming
Ruby MetaprogrammingThaichor Seng
 
Ruby/Rails
Ruby/RailsRuby/Rails
Ruby/Railsrstankov
 
Damn Fine CoffeeScript
Damn Fine CoffeeScriptDamn Fine CoffeeScript
Damn Fine CoffeeScriptniklal
 
Chaining et composition de fonctions avec lodash / underscore
Chaining et composition de fonctions avec lodash / underscoreChaining et composition de fonctions avec lodash / underscore
Chaining et composition de fonctions avec lodash / underscoreNicolas Carlo
 
Real life-coffeescript
Real life-coffeescriptReal life-coffeescript
Real life-coffeescriptDavid Furber
 
CoffeeScript-Ruby-Tuesday
CoffeeScript-Ruby-TuesdayCoffeeScript-Ruby-Tuesday
CoffeeScript-Ruby-TuesdayEddie Kao
 
The $path to knowledge: What little it take to unit-test Perl.
The $path to knowledge: What little it take to unit-test Perl.The $path to knowledge: What little it take to unit-test Perl.
The $path to knowledge: What little it take to unit-test Perl.Workhorse Computing
 
Chaining and function composition with lodash / underscore
Chaining and function composition with lodash / underscoreChaining and function composition with lodash / underscore
Chaining and function composition with lodash / underscoreNicolas Carlo
 
CoffeeScript & Jasmine - MadJS February 2012
CoffeeScript & Jasmine - MadJS February 2012CoffeeScript & Jasmine - MadJS February 2012
CoffeeScript & Jasmine - MadJS February 2012Matt Gauger
 

Semelhante a test (20)

Coffeescript slides
Coffeescript slidesCoffeescript slides
Coffeescript slides
 
Quick coffeescript
Quick coffeescriptQuick coffeescript
Quick coffeescript
 
Coffeescript - take a sip of code
Coffeescript - take a sip of codeCoffeescript - take a sip of code
Coffeescript - take a sip of code
 
Introduction to CoffeeScript
Introduction to CoffeeScriptIntroduction to CoffeeScript
Introduction to CoffeeScript
 
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and JasmineSingle Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
 
Coffee scriptisforclosers nonotes
Coffee scriptisforclosers nonotesCoffee scriptisforclosers nonotes
Coffee scriptisforclosers nonotes
 
Why ruby
Why rubyWhy ruby
Why ruby
 
Ruby Metaprogramming
Ruby MetaprogrammingRuby Metaprogramming
Ruby Metaprogramming
 
Ruby/Rails
Ruby/RailsRuby/Rails
Ruby/Rails
 
kRouter
kRouterkRouter
kRouter
 
CoffeeScript
CoffeeScriptCoffeeScript
CoffeeScript
 
Damn Fine CoffeeScript
Damn Fine CoffeeScriptDamn Fine CoffeeScript
Damn Fine CoffeeScript
 
Chaining et composition de fonctions avec lodash / underscore
Chaining et composition de fonctions avec lodash / underscoreChaining et composition de fonctions avec lodash / underscore
Chaining et composition de fonctions avec lodash / underscore
 
CakePHP
CakePHPCakePHP
CakePHP
 
Real life-coffeescript
Real life-coffeescriptReal life-coffeescript
Real life-coffeescript
 
Overview of CoffeeScript
Overview of CoffeeScriptOverview of CoffeeScript
Overview of CoffeeScript
 
CoffeeScript-Ruby-Tuesday
CoffeeScript-Ruby-TuesdayCoffeeScript-Ruby-Tuesday
CoffeeScript-Ruby-Tuesday
 
The $path to knowledge: What little it take to unit-test Perl.
The $path to knowledge: What little it take to unit-test Perl.The $path to knowledge: What little it take to unit-test Perl.
The $path to knowledge: What little it take to unit-test Perl.
 
Chaining and function composition with lodash / underscore
Chaining and function composition with lodash / underscoreChaining and function composition with lodash / underscore
Chaining and function composition with lodash / underscore
 
CoffeeScript & Jasmine - MadJS February 2012
CoffeeScript & Jasmine - MadJS February 2012CoffeeScript & Jasmine - MadJS February 2012
CoffeeScript & Jasmine - MadJS February 2012
 

Último

Call Girls Nashik Gayatri 7001305949 Independent Escort Service Nashik
Call Girls Nashik Gayatri 7001305949 Independent Escort Service NashikCall Girls Nashik Gayatri 7001305949 Independent Escort Service Nashik
Call Girls Nashik Gayatri 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
VIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur Escorts
VIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur EscortsVIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur Escorts
VIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
VIP Call Girls Asansol Ananya 8250192130 Independent Escort Service Asansol
VIP Call Girls Asansol Ananya 8250192130 Independent Escort Service AsansolVIP Call Girls Asansol Ananya 8250192130 Independent Escort Service Asansol
VIP Call Girls Asansol Ananya 8250192130 Independent Escort Service AsansolRiya Pathan
 
Book Call Girls in Panchpota - 8250192130 | 24x7 Service Available Near Me
Book Call Girls in Panchpota - 8250192130 | 24x7 Service Available Near MeBook Call Girls in Panchpota - 8250192130 | 24x7 Service Available Near Me
Book Call Girls in Panchpota - 8250192130 | 24x7 Service Available Near Meanamikaraghav4
 
(Dipika) Call Girls in Bangur ! 8250192130 ₹2999 Only and Free Hotel Delivery...
(Dipika) Call Girls in Bangur ! 8250192130 ₹2999 Only and Free Hotel Delivery...(Dipika) Call Girls in Bangur ! 8250192130 ₹2999 Only and Free Hotel Delivery...
(Dipika) Call Girls in Bangur ! 8250192130 ₹2999 Only and Free Hotel Delivery...Riya Pathan
 
Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...
Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...
Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...aamir
 
Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...
Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...
Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...Riya Pathan
 
Beyond Bar & Club Udaipur CaLL GiRLS 09602870969
Beyond Bar & Club Udaipur CaLL GiRLS 09602870969Beyond Bar & Club Udaipur CaLL GiRLS 09602870969
Beyond Bar & Club Udaipur CaLL GiRLS 09602870969Apsara Of India
 
Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...
Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...
Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...Riya Pathan
 
GV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICE
GV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICEGV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICE
GV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICEApsara Of India
 
↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...
↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...
↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...noor ahmed
 
Call Girls In Goa 9316020077 Goa Call Girl By Indian Call Girls Goa
Call Girls In Goa  9316020077 Goa  Call Girl By Indian Call Girls GoaCall Girls In Goa  9316020077 Goa  Call Girl By Indian Call Girls Goa
Call Girls In Goa 9316020077 Goa Call Girl By Indian Call Girls Goasexy call girls service in goa
 
Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...
Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...
Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...anamikaraghav4
 
Air-Hostess Call Girls Shobhabazar | 8250192130 At Low Cost Cash Payment Booking
Air-Hostess Call Girls Shobhabazar | 8250192130 At Low Cost Cash Payment BookingAir-Hostess Call Girls Shobhabazar | 8250192130 At Low Cost Cash Payment Booking
Air-Hostess Call Girls Shobhabazar | 8250192130 At Low Cost Cash Payment BookingRiya Pathan
 
VIP Call Girls Darjeeling Aaradhya 8250192130 Independent Escort Service Darj...
VIP Call Girls Darjeeling Aaradhya 8250192130 Independent Escort Service Darj...VIP Call Girls Darjeeling Aaradhya 8250192130 Independent Escort Service Darj...
VIP Call Girls Darjeeling Aaradhya 8250192130 Independent Escort Service Darj...Neha Kaur
 
Low Rate Call Girls Ajmer Anika 8250192130 Independent Escort Service Ajmer
Low Rate Call Girls Ajmer Anika 8250192130 Independent Escort Service AjmerLow Rate Call Girls Ajmer Anika 8250192130 Independent Escort Service Ajmer
Low Rate Call Girls Ajmer Anika 8250192130 Independent Escort Service AjmerRiya Pathan
 
Independent Hatiara Escorts ✔ 8250192130 ✔ Full Night With Room Online Bookin...
Independent Hatiara Escorts ✔ 8250192130 ✔ Full Night With Room Online Bookin...Independent Hatiara Escorts ✔ 8250192130 ✔ Full Night With Room Online Bookin...
Independent Hatiara Escorts ✔ 8250192130 ✔ Full Night With Room Online Bookin...Riya Pathan
 
Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...
Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...
Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...Riya Pathan
 

Último (20)

Call Girls Nashik Gayatri 7001305949 Independent Escort Service Nashik
Call Girls Nashik Gayatri 7001305949 Independent Escort Service NashikCall Girls Nashik Gayatri 7001305949 Independent Escort Service Nashik
Call Girls Nashik Gayatri 7001305949 Independent Escort Service Nashik
 
Goa Call Girls 9316020077 Call Girls In Goa By Russian Call Girl in goa
Goa Call Girls 9316020077 Call Girls  In Goa By Russian Call Girl in goaGoa Call Girls 9316020077 Call Girls  In Goa By Russian Call Girl in goa
Goa Call Girls 9316020077 Call Girls In Goa By Russian Call Girl in goa
 
VIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur Escorts
VIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur EscortsVIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur Escorts
VIP Call Girls Nagpur Megha Call 7001035870 Meet With Nagpur Escorts
 
VIP Call Girls Asansol Ananya 8250192130 Independent Escort Service Asansol
VIP Call Girls Asansol Ananya 8250192130 Independent Escort Service AsansolVIP Call Girls Asansol Ananya 8250192130 Independent Escort Service Asansol
VIP Call Girls Asansol Ananya 8250192130 Independent Escort Service Asansol
 
Book Call Girls in Panchpota - 8250192130 | 24x7 Service Available Near Me
Book Call Girls in Panchpota - 8250192130 | 24x7 Service Available Near MeBook Call Girls in Panchpota - 8250192130 | 24x7 Service Available Near Me
Book Call Girls in Panchpota - 8250192130 | 24x7 Service Available Near Me
 
(Dipika) Call Girls in Bangur ! 8250192130 ₹2999 Only and Free Hotel Delivery...
(Dipika) Call Girls in Bangur ! 8250192130 ₹2999 Only and Free Hotel Delivery...(Dipika) Call Girls in Bangur ! 8250192130 ₹2999 Only and Free Hotel Delivery...
(Dipika) Call Girls in Bangur ! 8250192130 ₹2999 Only and Free Hotel Delivery...
 
Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...
Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...
Nayabad Call Girls ✔ 8005736733 ✔ Hot Model With Sexy Bhabi Ready For Sex At ...
 
Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...
Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...
Private Call Girls Durgapur - 8250192130 Escorts Service with Real Photos and...
 
Beyond Bar & Club Udaipur CaLL GiRLS 09602870969
Beyond Bar & Club Udaipur CaLL GiRLS 09602870969Beyond Bar & Club Udaipur CaLL GiRLS 09602870969
Beyond Bar & Club Udaipur CaLL GiRLS 09602870969
 
Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...
Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...
Housewife Call Girls Sonagachi - 8250192130 Booking and charges genuine rate ...
 
GV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICE
GV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICEGV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICE
GV'S 24 CLUB & BAR CONTACT 09602870969 CALL GIRLS IN UDAIPUR ESCORT SERVICE
 
↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...
↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...
↑Top Model (Kolkata) Call Girls Sonagachi ⟟ 8250192130 ⟟ High Class Call Girl...
 
Call Girls In Goa 9316020077 Goa Call Girl By Indian Call Girls Goa
Call Girls In Goa  9316020077 Goa  Call Girl By Indian Call Girls GoaCall Girls In Goa  9316020077 Goa  Call Girl By Indian Call Girls Goa
Call Girls In Goa 9316020077 Goa Call Girl By Indian Call Girls Goa
 
Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...
Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...
Russian Call Girl South End Park - Call 8250192130 Rs-3500 with A/C Room Cash...
 
Air-Hostess Call Girls Shobhabazar | 8250192130 At Low Cost Cash Payment Booking
Air-Hostess Call Girls Shobhabazar | 8250192130 At Low Cost Cash Payment BookingAir-Hostess Call Girls Shobhabazar | 8250192130 At Low Cost Cash Payment Booking
Air-Hostess Call Girls Shobhabazar | 8250192130 At Low Cost Cash Payment Booking
 
VIP Call Girls Darjeeling Aaradhya 8250192130 Independent Escort Service Darj...
VIP Call Girls Darjeeling Aaradhya 8250192130 Independent Escort Service Darj...VIP Call Girls Darjeeling Aaradhya 8250192130 Independent Escort Service Darj...
VIP Call Girls Darjeeling Aaradhya 8250192130 Independent Escort Service Darj...
 
Low Rate Call Girls Ajmer Anika 8250192130 Independent Escort Service Ajmer
Low Rate Call Girls Ajmer Anika 8250192130 Independent Escort Service AjmerLow Rate Call Girls Ajmer Anika 8250192130 Independent Escort Service Ajmer
Low Rate Call Girls Ajmer Anika 8250192130 Independent Escort Service Ajmer
 
Call Girls Chirag Delhi Delhi WhatsApp Number 9711199171
Call Girls Chirag Delhi Delhi WhatsApp Number 9711199171Call Girls Chirag Delhi Delhi WhatsApp Number 9711199171
Call Girls Chirag Delhi Delhi WhatsApp Number 9711199171
 
Independent Hatiara Escorts ✔ 8250192130 ✔ Full Night With Room Online Bookin...
Independent Hatiara Escorts ✔ 8250192130 ✔ Full Night With Room Online Bookin...Independent Hatiara Escorts ✔ 8250192130 ✔ Full Night With Room Online Bookin...
Independent Hatiara Escorts ✔ 8250192130 ✔ Full Night With Room Online Bookin...
 
Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...
Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...
Low Rate Call Girls Gulbarga Anika 8250192130 Independent Escort Service Gulb...
 

test

  • 1.
  • 3. A Beautiful Programming Language ✦ Least amount of code to solve problems ✦ Readable and Understandable ✦ Easy to Maintain ?
  • 4. ✦ Least amount of code to solve problems ✦ Readable and Understandable ✦ Easy to Maintain compiles into
  • 8. Variables No semicolons var message; message = "Ready for some Coffee?"; alert(message); message = "Ready for some Coffee?" alert(message) No variable declarations Variables and Functions
  • 9. function coffee() { return confirm("Ready for some Coffee?"); } Variables and Functions ✦ Named Functions 2 ways to create Functions in JS var coffee = function() { return confirm("Ready for some Coffee?"); } ✦ Function Expressions coffee(); Both called with
  • 10. Variables and Functions We only use Function Expressions coffee = -> confirm "Ready for some Coffee?" var coffee = function() { return confirm("Ready for some Coffee?"); } 1 tab or 2 spaces indented -> converts to function() { Always has a return value
  • 11. Variables and Functions Returning a String answer = confirm "Ready for some Coffee?" coffee = -> "Your answer is " + answer var answer; var coffee; coffee = function() { answer = confirm("Ready for some Coffee?"); return "Your answer is " + answer; } "Your answer is #{answer}" same as
  • 12. Variables and Functions Function Parameters answer = confirm message coffee = (message) -> var answer; var coffee; return "Your answer is " + answer; } "Your answer is #{answer}" coffee = function( ) { answer = confirm( ); message message
  • 13. Variables and Functions Calling Functions coffee = (message) -> coffee = -> coffee = (message, other) -> coffee() coffee("Yo") coffee "Yo" coffee("Yo", 2) coffee "Yo", 2 parenthesis optional
  • 14. Variables and Functions Function Parameters coffee = (message) -> answer = confirm message "Your answer is #{answer}" parenthesis on everything but the outermost call coffeealert "Ready for some Coffee?"( )
  • 15. Variables and Functions Optional Parameters answer = confirm message "Your answer is #{answer}" coffeealert "Ready for some Coffee?" () If we want a default message coffee = (message ) ->= coffeealert ( )"Want some Decaf?"
  • 16. Variables and Functions Optional Parameters answer = confirm message "Your answer is #{answer}" "Ready for some Coffee?"coffee = (message ) ->= var coffee; coffee = function(message) { var answer; if (message == null) { message = "Ready for some Coffee?"; } answer = confirm(message); return "Your answer is " + answer; }
  • 17. Variables and Functions The CoffeeScript Compiler (optional) $ npm install -g coffee-script 1. Install Node.js http://nodejs.org/ 2. Install npm http://npmjs.org/ 3. $ coffee -h Usage: coffee [options] path/to/script.coffee -c, --compile compile to JavaScript and save as .js files -i, --interactive run an interactive CoffeeScript REPL -o, --output set the directory for compiled JavaScript -w, --watch watch scripts for changes, and recompile -p, --print print the compiled JavaScript to stdout -e, --eval compile a string from the command line
  • 18. Variables and Functions Command Line Examples $ coffee -c test.coffee Creates test.js $ coffee -cw test.coffee Every time test.coffee is updated re-compile. $ coffee -c src -o js Compile all .coffee files in the src dir into the js dir. $ coffee -wc src -o js Every time a file is updated re-compile.
  • 19. Variables and Functions CoffeeScript TextMate Bundle https://github.com/jashkenas/coffee-script-tmbundle &SublimeText2
  • 20. name author URL Information density Arenamontanus http://www.flickr.com/photos/arenamontanus/535807315 Paper Writings: Quotes Lucia.. http://www.flickr.com/photos/angelic0devil6/2104607220 Sütterlin ninastoessinger http://www.flickr.com/photos/ninastoessinger/4713004390 FF DIN Round: ‘Round Pieces’FontFont http://www.flickr.com/photos/fontfont/4840584146 Sonnet 18 Jinx! http://www.flickr.com/photos/span112/3041263205 Creative Commons
  • 23. jQuery to CoffeeScript Applied jQuery jQuery(function($) { function changeTab(e) { e.preventDefault(); $("#tabs li a.active").removeClass("active"); $(this).addClass("active"); $("#tabs ul li a").click(changeTab); }); } jQuery ($) -> $ ->or * If no other libraries are using $ *
  • 24. jQuery to CoffeeScript Applied jQuery function changeTab(e) { e.preventDefault() $("#tabs li a.active").removeClass("active") $(this).addClass("active") $("#tabs ul li a").click(changeTab) }) } $ -> changeTab = (e) -> ; ; ; ; ;
  • 25. jQuery to CoffeeScript Applied jQuery e.preventDefault() $("#tabs li a.active").removeClass("active") $(this).addClass("active") $("#tabs ul li a").click(changeTab) }) } $ -> changeTab = (e) -> Remove all semicolons and curly brackets ; ; ; ; ;
  • 26. jQuery to CoffeeScript Applied jQuery $ -> changeTab = (e) -> e.preventDefault() $("#tabs li a.active").removeClass("active") $(this).addClass("active") $("#tabs ul li a").click(changeTab) Optionally remove parenthesis
  • 27. jQuery to CoffeeScript Applied jQuery $ -> changeTab = (e) -> e.preventDefault() $("#tabs li a.active").removeClass "active" $(this).addClass "active" $("#tabs ul li a").click changeTab $(@).addClass "active" same as @ = this
  • 28. jQuery to CoffeeScript Applied jQuery $ -> changeTab = (e) -> e.preventDefault() $("#tabs li a.active").removeClass "active" $("#tabs ul li a").click changeTab $(@).addClass "active" jQuery(function($) { function changeTab(e) { e.preventDefault(); $("#tabs li a.active").removeClass("active"); $(this).addClass("active"); $("#tabs ul li a").click(changeTab); }); }
  • 29. jQuery to CoffeeScript Applied jQuery $("#tabs #error a").click(function (e){ e.preventDefault(); }); $("#tabs #error a").click (e) -> e.preventDefault() $('#confirm').queue(function() { $(this).dequeue(); }); $("#confirm").queue -> $(@).dequeue()
  • 30. jQuery to CoffeeScript Applied jQuery function showNumberOfFlights(e) { var num_flights = $(this).data('flights'); $(this).append("<span>" + num_flights +"</span>"); $("#tabs span.tooltip").show(); } showNumberOfFlights = (e) -> num_flights = $(@).data 'flights' $(@).append "<span>#{flights}</span>" $("#tabs span.tooltip").show()
  • 31.
  • 33. If Statement Parenthesis if age < 18 alert 'Under age' if (age < 18) { alert('Under age'); } Conditionals & Operators Optional alert 'Under age' if age < 18 if age < 18 then alert 'Under age'
  • 34. If Else Statement if age < 18 alert 'Under age' if (age < 18) { alert('Under age'); } else { alert('of age'); } else alert 'of age' if age < 18 then alert 'Under age' else alert 'of age' Conditionals & Operators No Ternary Operator
  • 35. Operators CoffeeScript JavaScript ===== is !==isnt not ! != and && or || true yes on true false no off false Conditionals & Operators
  • 36. Operator Examples & Unless addCaffeine() if not Decaf() if paid() and coffee() is on then pour() addCaffeine() unless Decaf() if (paid() && coffee() === true) { pour(); } Conditionals & Operators
  • 37. Chained Comparisons if (2 < newLevel && newLevel < 5) { alert("In Range!"); } if 2 < newLevel < 5 alert "In Range!" Conditionals & Operators
  • 38. Switch Statements var message = (function() { switch (cupsOfCoffee) { case 0: return 'Asleep'; case 1: return 'Eyes Open'; case 2: return 'Buzzed'; default: return 'Dangerous'; } })(); message = switch cupsOfCoffee when 0 then 'Asleep' when 1 then 'Eyes Open' when 2 then 'Buzzed' else 'Dangerous Conditionals & Operators
  • 39. Existential Operators cupsOfCoffeeHow do we check to see that isn’t defined and isn’t null? if (typeof cupsOfCoffee !== "undefined" && cupsOfCoffee !== null) { alert('it exists!'); } if cupsOfCoffee? alert 'it exists!' alert 'it exists!' if cupsOfCoffee? Conditionals & Operators
  • 40. Existential Operators cupsOfCoffeeSet to Zero unless previously set if not cupsOfCoffee? cupsOfCoffee = 0 cupsOfCoffee = 0 unless cupsOfCoffee? cupsOfCoffee ?= 0 Conditionals & Operators
  • 41. Existential Operators brew()Call on if coffeePot? coffeePot.brew() coffeePot only if it exists coffeePot?.brew() vehicle.start_engine?().shift_gear?() Only call function if it exists in Ruby “try()” Conditionals & Operators
  • 42.
  • 44. Ranges Arrays, Objects, Iteration range = [1..4] var range = [1, 2, 3, 4]; range = [1...4] var range = [1, 2, 3]; With three dots excludes the end start = 5 end = 10 range = [start..end] Variables & Subsets [5, 6, 7, 8, 9, 10] range[1..4] [6, 7, 8, 9] range[1...range.length] [6, 7, 8, 9, 10] range[1..-1]
  • 45. Arrays storeLocations = [ 'Orlando' 'Winter Park' 'Sanford' ] storeLocations = ['Orlando', 'Winter Park', 'Sanford'] Can use new lines instead of commas Arrays, Objects, Iteration
  • 46. Loops storeLocations = ['Orlando', 'Winter Park', 'Sanford'] storeLocations.forEach (location, index) -> alert "Location: #{location}" Arrays, Objects, Iteration storeLocations.forEach(function(location, index) { return alert("Location: " + location); });
  • 47. Loops storeLocations = ['Orlando', 'Winter Park', 'Sanford'] storeLocations.forEach (location, index) -> alert "Location: #{location}" for location in storeLocations alert "Location: #{location}" alert "Location: #{location}" for location in storeLocations This is a list comprehension Arrays, Objects, Iteration
  • 48. List Comprehensions storeLocations = ['Orlando', 'Winter Park', 'Sanford'] Add “, FL” to each storeLocation it’s an expression "#{loc}, FL" for loc in storeLocations ['Orlando, FL', 'Winter Park, FL', 'Sanford, FL'] storeLocations = ("#{loc}, FL" for loc in storeLocations) the parenthesis are important geoLocate(loc) for loc in storeLocations when loc isnt 'Sanford' filter (expression)
  • 49. List Comprehensions storeLocations = ['Orlando', 'Winter Park', 'Sanford'] it’s an expression Create new array without Sanford ['Orlando', 'Winter Park'] newLocs = [] for loc in storeLocations newLocs.push loc if loc isnt 'Sanford' same as newLocs = (loc for loc in storeLocations when loc isnt 'Sanford')
  • 50. Splats 'Looking for Starducks in Orlando' same as searchLocations = (brand, cities...) -> "looking for #{brand} in #{cities.join(',')}" For a variable number of arguments searchLocations 'Starducks', 'Orlando' searchLocations 'Starducks', 'Orlando', 'Winter Park' 'Looking for Starducks in Orlando, Winter Park' params = ['Starducks', 'Orlando', 'Winter Park'] searchLocations(params...)
  • 51. curly braces optional Objects Objects are lists of keys & values (hash) coffee = { name: 'French', strength: 1 } coffee = name: 'French', strength: 1 coffee = name: 'French' strength: 1 commas optional Arrays, Objects, Iteration
  • 52. Objects coffee = name: 'French' strength: 1 brew: -> alert("brewing #{@name}") var coffee = { name: 'French', strength: 1, brew: function() { return alert("brewing " + this.name); } }; coffee.brew() called with Arrays, Objects, Iteration
  • 53. Objects coffee = name: 'French' strength: 1 brew: -> alert("brewing #{@name}") pour: (amount=1) -> if amount is 1 "Poured a single cup" else "Poured #{amount} cups" pour: function(amount) { if (amount == null) amount = 1; if (amount === 1) { return "Poured a single cup"; } else { return "Poured " + amount + " cups"; } Arrays, Objects, Iteration
  • 54. Careful with your Indenting! coffee = name: 'French' strength: 1 coffee = { name: 'French' }; ({ strength: 1 }) indent issues! Arrays, Objects, Iteration
  • 55. Complex Objects coffees = french: strength: 1 in_stock: 20 italian: strength: 2 in_stock: 12 decaf: strength: 0 in_stock: 8 var coffees = { french: { strength: 1, in_stock: 20 }, italian: { strength: 2, in_stock: 12 }, decaf: { strength: 0, in_stock: 0 } }; coffees.italian.in_stock _stock 12 Arrays, Objects, Iteration
  • 56. Object Iteration with of coffees = french: strength: 1 in_stock: 20 italian: strength: 2 in_stock: 12 decaf: strength: 0 in_stock: 0 _stock "#{coffee} has #{attrs.in_stock}" for coffee, attrs of coffees ["french has 20", "italian has 12", "decaf has 0"] KEY VALUE iterating over object
  • 57. Object Iteration with of _stock "#{coffee} has #{attrs.in_stock}" for coffee, attrs of coffees ["french has 20", "italian has 12", "decaf has 0"] for coffee, attrs of coffees "#{coffee} has #{attrs.in_stock}" "french has 20, italian has 12" to_print.join ", " same as "#{coffee} has #{attrs.in_stock}" to_print = for coffee, attrs of coffees when attrs.in_stock > 0 Arrays, Objects, Iteration
  • 58. Object Iteration with of _stock "#{coffee} has #{attrs.in_stock}" to_print = for coffee, attrs of coffees when attrs.in_stock > 0 var attrs, coffee, to_print; to_print = (function() { var _results; _results = []; for (coffee in coffees) { attrs = coffees[coffee]; if (attrs.in_stock > 0) _results.push("" + coffee + " has " + attrs.in_stock); } return _results; })(); to_print.join(", ") to_print.join ", "
  • 59.
  • 60. Applied jQuery, Part 2 • level 5 •
  • 61. Object Simplicity Applied jQuery, Part 2 $("#tabs ul li a").bind({ click: changeTab, mouseenter: showNumberOfFlights, mouseleave: hideNumberOfFlights }); $("#tabs ul li a").bind click: changeTab mouseenter: showNumberOfFlights mouseleave: hideNumberOfFlights
  • 62. A Complex Example showFlights = (activeDiv) -> $("#tabs div").hide() function showFlights(activeDiv) { $("#tabs div").hide(); if (fetchingFlights) { fetchingFlights.abort(); } fetchingFlights = $.ajax('/flights', { data: { date: activeDiv }, cache: false, error: function(result) { if (result.statusText != "abort") { $('#tabs #error').show(); } } }); } { Applied jQuery, Part 2
  • 63. showFlights = (activeDiv) -> $("#tabs div").hide() if (fetchingFlights) { fetchingFlights.abort(); } fetchingFlights = $.ajax('/flights', { data: { date: activeDiv }, cache: false, error: function(result) { if (result.statusText != "abort") { $('#tabs #error').show(); } } }); } if fetchingFlights fetchingFlights.abort() A Complex Example { Applied jQuery, Part 2
  • 64. showFlights = (activeDiv) -> $("#tabs div").hide() fetchingFlights = $.ajax('/flights', { data: { date: activeDiv }, cache: false, error: function(result) { if (result.statusText != "abort") { $('#tabs #error').show(); } } }); } if fetchingFlights fetchingFlights.abort() fetchingFlights = $.ajax '/flights' data: date: activeDiv cache: false A Complex Example { Applied jQuery, Part 2
  • 65. showFlights = (activeDiv) -> $("#tabs div").hide() error: function(result) { if (result.statusText != "abort") { $('#tabs #error').show(); } } }); } if fetchingFlights fetchingFlights.abort() fetchingFlights = $.ajax '/flights' data: date: activeDiv cache: false A Complex Example { error: (result) -> if result.statusText isnt "abort" $('#tabs #error').show() Applied jQuery, Part 2
  • 66. showFlights = (activeDiv) -> $("#tabs div").hide() if fetchingFlights fetchingFlights.abort() fetchingFlights = $.ajax '/flights' data: date: activeDiv cache: false A Complex Example error: (result) -> if result.statusText isnt "abort" $('#tabs #error').show() 46 Less Characters! Applied jQuery, Part 2
  • 67. Mind Bending Comprehensions if (stops == '2+' || flight.routing == 0) { filteredFlights.push(flight); } }); var filteredFlights = []; $.each(currentFlights, function(index, flight) { $.each currentFlights, (index, flight) -> if stops is '2+' or flight.routing is 0 filteredFlights.push flight filteredFlights = [] Applied jQuery, Part 2
  • 68. Mind Bending Comprehensions $.each currentFlights, (index, flight) -> if stops is '2+' or flight.routing is 0 filteredFlights.push flight filteredFlights = (flight for flight in currentFlights when stops is '2+' or flight.routing is 0) Applied jQuery, Part 2 filteredFlights = []
  • 69.
  • 71. Remember the Coffee Object? Object Orientation coffee = name: 'French' strength: 1 brew: -> alert "brewing #{@name}" pour: (amount=1) -> if amount is 1 "Poured a single cup" else "Poured #{amount} cups"
  • 72. Constructors & Properties class Coffee constructor: (name, strength=1) -> class Coffee constructor: (@name, @strength=1) -> same as @name = name @strength = strength Object Orientation called when instantiated
  • 73. Constructors & Properties class Coffee constructor: (@name, @strength=1) -> brew: -> alert "brewing #{@name}" pour: (amount=1) -> if amount is 1 "Poured a single cup" else "Poured #{amount} cups" french = new Coffee("French", 2) french.brew() Object Orientation
  • 74. Inheritance class Coffee constructor: (@name, @strength=1) -> brew: -> alert "brewing #{@name}" class MaxgoodHouse extends Coffee constructor: (@name, @strength=0) -> @brand = "Maxgood House" boring = new MaxgoodHouse("Boring") boring.brew() Object Orientation
  • 75. Inheritance class MaxgoodHouse extends Coffee constructor: (@name, @strength=0) -> @brand = "Maxgood House" boring = new MaxgoodHouse("Boring") boring.brew() brew: -> alert "Brewing #{@brand} #{@name}" Object Orientation
  • 76. Inheritance class MaxgoodHouse extends Coffee constructor: (@name, @strength=0) -> @brand = "Maxgood House" boring = new MaxgoodHouse("Boring") boring.pour() brew: -> alert "Brewing #{@brand} #{@name}" pour: (amount=1) -> "#{super(amount)}, but it sucks" Object Orientation
  • 77. The Fat Arrow @inventory @nameand Looking for property of the dom element called Error! $("#pour-#{@name}").click (event) class Coffee constructor: (@name, @strength=1, @inventory=0) -> pourClick: -> if @inventory isnt 0 @inventory -= 1 alert "Poured a cup of #{@name}" -> Object Orientation
  • 78. The Fat Arrow Binds to current value of ‘this’ $("#pour-#{@name}").click (event) class Coffee constructor: (@name, @strength=1, @inventory=0) -> pourClick: -> if @inventory isnt 0 @inventory -= 1 alert "Poured a cup of #{@name}" => Object Orientation
  • 79. Using a Class for Encapsulation class SelectFlights { var selectFlights = { fetchingFlights : null, init : function() { $("#tabs ul li a").bind({ click: this.changeTab }); $("#tabs #error a").click(function (event){ e.preventDefault(); this.showFlights($("#tabs li a.active").attr("href")); }); }, showFlights : function(activeDiv) { }, changeTab : function(event) { } }); Object Orientation
  • 80. Using a Class for Encapsulation class SelectFlights { fetchingFlights : null, init : function() { $("#tabs ul li a").bind({ click: this.changeTab }); $("#tabs #error a").click(function (event){ e.preventDefault(); this.showFlights($("#tabs li a.active").attr("href")); }); }, showFlights : function(activeDiv) { }, changeTab : function(event) { } constructor: (@fetchingFlights=null) -> }); Object Orientation
  • 81. Using a Class for Encapsulation class SelectFlights { $("#tabs ul li a").bind({ click: this.changeTab }); $("#tabs #error a").click(function (event){ e.preventDefault(); this.showFlights($("#tabs li a.active").attr("href")); }); }, showFlights : function(activeDiv) { }, changeTab : function(event) { } $("#tabs ul li a").bind click: @changeTab }); Object Orientation constructor: (@fetchingFlights=null) ->
  • 82. Using a Class for Encapsulation class SelectFlights { $("#tabs #error a").click(function (event){ e.preventDefault(); this.showFlights($("#tabs li a.active").attr("href")); }); }, showFlights : function(activeDiv) { }, changeTab : function(event) { } $("#tabs ul li a").bind click: @changeTab $("#tabs #error a").click (event) => event.preventDefault() @showFlights $("#tabs li a.active").attr("href") }); Object Orientation constructor: (@fetchingFlights=null) ->
  • 83. Using a Class for Encapsulation class SelectFlights { showFlights : function(activeDiv) { }, changeTab : function(event) { } $("#tabs ul li a").bind click: @changeTab $("#tabs #error a").click (event) => event.preventDefault() @showFlights $("#tabs li a.active").attr("href") changeTab : (event) => showFlights : (activeDiv) -> }); Object Orientation constructor: (@fetchingFlights=null) ->
  • 84. Using a Class for Encapsulation class SelectFlights $("#tabs ul li a").bind click: @changeTab $("#tabs #error a").click (event) => event.preventDefault() @showFlights $("#tabs li a.active").attr("href") changeTab : (event) => showFlights : (activeDiv) -> selectFlights = new SelectFlights() Object Orientation constructor: (@fetchingFlights=null) ->