<?php
/**
* @author Exadra37 <exadra37atgmailpointcom>
* @since 2014/07/02
*/
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
import json | |
import os | |
json_data = open("top5.json").read() | |
data = json.loads(json_data) | |
data = data["feed"] | |
data = data['data'] | |
print data[1]['link'] |
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
import json | |
import os | |
json_data = open("top5.json").read() | |
data = json.loads(json_data) | |
data = data["feed"] | |
data = data['data'] | |
print data[1]['link'] |
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
0 - Weather Victoria - 162.400 | |
1 - CVARS Repeater - 146.680 | |
2 - CVARS Repeater - 145.470 | |
3 - CVARS Repeater - 442.600 | |
10 - Shawnigan RCMP - 142.425 | |
11 - Shawnigan RCMP - 141.1500 | |
12 - Shawnigan RCMP - 141.180 | |
13 - Shawnigan RCMP - 141.210 | |
14 - Shawnigan RCMP - 141.300 | |
15 - Shawnigan RCMP - 414.310 |
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
package main | |
import ( | |
"fmt" | |
"golang.org/x/net/html" | |
"net/http" | |
"os" | |
"strings" | |
) |
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
package main | |
import ( | |
"fmt" | |
"github.com/PuerkitoBio/goquery" | |
"log" | |
"strings" | |
) | |
=
is not assignment in Elixir. More like an assertion.- Succeeds if it can find a way of making left side equal to right side.
a = 1 #1
a + 3 #1
In thise cases the lef side is a variable and right side is an integer literal. So to make the match it binds the variable to the integer.
- String concatenation:
- Once a variable a list such as
[1, 2 ,3]
you know it will always reference those same variables (until you rebind the variable). - What if you need to add 100 to each element in
[1, 2, 3]
? Elixir produces a copy of the original, containing the new values.
This uses the [ head | tail ]
operator to build a new list with head
as the first element and tail
as the rest:
list1 = [3, 2, 1]
Represent numbers, names, ranges and regular expressions.
Can be written as:
- decimal (1234).
OlderNewer