Every HTML page we make here will follow the same pattern:
<!DOCTYPE html>
<html>
</html>
- Doctype - tells the browser which version of HTML we are using. We will only be writing modern HTML, so we only need DOCTYPE html.
{ | |
"channels": [ | |
{ | |
"number": 78, | |
"name": "Zombie Bass", | |
"num_of_listeners": 1, | |
"created_at": "2012-03-21T04:04:36Z", | |
"updated_at": "2012-04-20T01:21:12Z" | |
}, | |
] |
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"identifier = %d", 5, nil]; | |
[Channel objectsWithPredicate: predicate]; |
class MyClass | |
def value | |
"VALUE!" | |
end | |
def do_something | |
puts defined?(value) # Outputs "method" | |
puts value # Outputs "VALUE!" | |
if false | |
value = 'abcdef' # Should not execute |
def pascal(c: Int, r: Int): Int = { | |
if (r < 1 || c < 1 || (c == r)) 1 // handles top of the triangle, and the sides | |
else pascal(c - 1, r - 1) + pascal(c, r - 1) | |
} | |
def pascal(c: Int, r: Int): Int = { | |
if (c == 0 || r == 0 || r == c) 1 else pascal(c - 1, r - 1) + pascal(c, r - 1) | |
} |
def balance(chars: List[Char]): Boolean = { | |
val l = '(' | |
val r = ')' | |
def helper(left: Int, right: Int, c: List[Char]): Boolean = { | |
if (c.isEmpty) | |
(left - right) == 0 | |
else { | |
if (right > left) false |
Every HTML page we make here will follow the same pattern:
<!DOCTYPE html>
<html>
</html>