Stockholm Marathon
Stockholm SWE
Website: www.stockholmmarathon.se/start/
Race Winners
(41 runnings)
2:40:19 2:37:28 2:31:35 2:33:52 2:34:14 09 Jun 2007
2:20:56
2:37:03
03 Jun 2006
2:17:01
2:36:37
04 Jun 2005
2:13:30
2:41:28
05 Jun 2004
2:16:12
2:35:14
14 Jun 2003
2:18:14
2:35:07
08 Jun 2002
2:18:20
2:33:48
09 Jun 2001
2:18:17
2:29:55
03 Jun 2000
2:18:49
2:37:57
12 Jun 1999
2:14:52
2:36:55
07 Jun 1998
2:16:12
2:37:39
07 Jun 1997
2:17:22
2:33:26
01 Jun 1996
2:15:05
2:36:40
10 Jun 1995
2:14:29
2:33:03
04 Jun 1994
2:14:06
2:40:34
05 Jun 1993
2:16:30
2:37:58
30 May 1992
2:15:58
2:39:10
01 Jun 1991
2:12:38
2:36:15
02 Jun 1990
2:13:04
2:37:07
03 Jun 1989
2:13:34
2:33:26
04 Jun 1988
2:14:26
2:28:24
30 May 1987
2:13:52
2:35:14
07 Jun 1986
2:12:33
2:34:42
01 Jun 1985
2:17:18
2:36:43
02 Jun 1984
2:13:47
2:34:13
04 Jun 1983
2:11:37
2:36:58
05 Jun 1982
2:19:20
2:34:26
15 Aug 1981
2:13:26
2:41:34
23 Aug 1980
2:15:49
2:38:45
04 Aug 1979
2:17:35
2:47:06
01 Jun
2019
2:10:10
Nigussie Sahlesilassie (ETH)
(nc)
2:33:38
Aberash Fayesa (ETH) (nc)
02 Jun
2018
2:13:30
Lawi Kiptui (KEN)
(nc)
2:40:28
Mikaela Larsson (SWE) (nc)
03 Jun
2017
2:11:36
Abraha Milaw Assefa (ETH)
(nc)
2:35:45
Konjit Tilahun Biruk
(ETH) (nc)
04 Jun
2016
2:10:58
Stanley Kipchirchir Koech (KEN)
(nc)
2:31:46
Jane Moraa Onyangi (KEN) (nc)
30 May
2015
2:18:22
Yekeber Bayabel Gesese (ETH) (nc)
2:34:14
Isabella Andersson-7 (nc)
31 May
2014
2:13:21
Benjamin Bitok (KEN) (nc)
2:32:28
Isabella Andersson-6 (nc)
01 Jun
2013
2:16:13
Shume Gerbada Eticha-2 (nc)
2:33:49
Isabella Andersson-5 (nc)
02 Jun
2012
2:19:16
Methal Abu Thorees Drais
(JOR) (nc)
Derebe Godana Gebissa (ETH)
(nc)
28 May
2011
2:14:07
Shume Gerbada Eticha (ETH)
(nc)
Isabella Andersson-4 (nc)
05 Jun
2010
2:12:48
Joseph Langat Kimeli (KEN)
(nc)
Isabella
Andersson-3 (nc)
30 May
2009
2:15:35
Paul Kogo Kipkemei (KEN)
(nc)
Isabella
Andersson-2 (nc)
31 May
2008
2:16:03
Willy Kimutai (KEN) (nc)
Isabella Andersson (SWE) (nc)
Phillip Bandwe-2 (nc)
Kirsten Otterbu (NOR) (nc)
Phillip Bandwe (ZIM) (nc)
Anna Rahm (SWE) (nc)
Kasirai Sita (ZIM) (nc)
Faustina Maria Ramos (ESP) (nc)
Joseph Riri (KEN) (nc)
Rita Cheptoo (KEN) (nc)
Josphat Chemjor (KEN) (nc)
Marie Soderstrom-3 (nc)
My Tahar Echchadli (MAR) (nc)
Lena Gavelin (SWE) (nc)
Anders Szalkai (SWE) (nc)
Esther Kiplagat (KEN) (nc)
Alfred Shemveta-2
(nc)
Marie Soderstrom-2
(nc)
Alfred Shemveta (SWE)
(nc)
Marie Soderstrom (SWE)
(nc)
Martin Ojuku (KEN)
(nc)
Grete Kirkeberg-3
(nc)
Benson Masya (KEN)
(nc)
Anita Hakenstad (NOR)
(nc)
Tesfaye Bekele-2
(nc)
Grete Kirkeberg-2
(nc)
Ake Eriksson-2
(nc)
Ingmarie Nilsson (SWE)
(nc)
Tesfaye Bekele (ETH)
(nc)
Irina Sklarenko (UKR)
(nc)
Daniel Mbuli (RSA)
(nc)
Grete Kirkeberg (NOR)
(nc)
Hugh Jones-2
(nc)
Linda Milo (BEL)
(nc)
Ake Eriksson (SWE)
(nc)
Midde Hamrin-2
(nc)
Simon Robert Naali (TAN)
(nc
Midde Hamrin (SWE)
(nc
David Clarke (ENG)
(nc)
Evy Palm-3
(nc)
Suleiman Nyambui (TAN)
(nc)
Grete Waitz (NOR)
(nc)
Kevin Forster (ENG)
(nc)
Evy Palm-2
(nc)
Kjell-Erik Stahl-2
(nc)
Evy Palm (SWE)
(nc)
Tommy Persson (SWE)
(nc)
Jeannette Nordgren (SWE)
(nc)
Agapius Masong (TAN)
(nc)
Ria VanLandeghem (BEL)
(nc)
Hugh Jones (ENG)
(nc)
Tuulikki Räisänen (SWE)
(nc)
Kjell-Erik Stahl (SWE)
(nc)
Ingrid Kristiansen-3
(nc)
Bill Rodgers (USA)
Ingrid Kristiansen-2
Jeff Wells (USA)
Ingrid Kristiansen (NOR)
Jukka Toivola (FIN)
Heide Brenner (GER)
Notes: Race currently known as ASICS Stockholm Marathon.
(nc) => national championships
2019 Adhanom Abraha was the national champion (6th place, 2:16:48
2019 Mikaela Larsson was the national champion (3rd place, 2:36:23
2018 Mustafa Mohamed was the national champion (6th place, 2:27:39
2017 Martin Öhman was the national champion (11th place, 2:24:11)
2017 Mikaela Larson was the national champion (6th place, 2:42:21)
2016 Lars Sodergard was the national champion (10th place, 2:25:37)
2016 Isabella Andersson was the national champion (2nd place, 2:35:47)
2015 Fredrik Johansson was the national champion (3rd place, 2:23:05)
2014 David Nilsson was the national champion (11th place, 2:27:00)
2013 Mustafa Mohamed was the national champion (4th place, 2:20:08)
2012 Fredrik Uhrborn was the national champion (5th place, 2:26:36)
2012 Charlotte Karlsson was the national champion (4th place, 2:48:37)
2011 David Nilsson was the national champion (10th place, 2:23:59)
2010 Erik Petersson was the national champion (8th place, 2:23:46)
2009 Said Regragui was the national champion (3rd place, 2:22:57)
2008 Said Regragui was the national champion (9th place, 2:25:25)
2007 Kent Claesson was the national champion (9th place, 2:28:20)
2007 Anna Rahm was the national champion (2nd place, 2:39:02)
2006 Kent Claesson was the national champion (3rd place, 2:22:23)
2005 Said Regragui was the national champion (4th place, 2:18:38)
2005 Malin Ewerlöf was the national champion (3rd place, 2:44:38)
2004 Alfred Shemveta was the national champion (6th place, 2:21:55)
2004 Susanne Johansson was the national champion (5th place, 2:50:30)
2003 Said Regragui was the national champion (3rd place, 2:19:55)
2002 Alfred Shemveta was the national champion (2nd place, 2:20:52)
2001 Marie Soderstrom was the national champion (2nd place, 2:31:28)
1998 Anders Szalkai was the national champion (2nd place, 2:16:33)
1998 Jennifer Åkerberg was the national champion (2nd place, 2:39:27)
1997 Anders Szalkai was the national champion (3rd place, 2:19:17)
1997 Annika Nyberger was the national champion (5th place, 2:46:23)
1996 Anders Szalkai was the national champion (4th place, 2:15:53)
1996 Ingmarie Nilsson was the national champion (2nd place, 2:38:44)
1994 Anders Szalkai was the national champion (2nd place, 2:16:02)
1994 Midde Hamrin was the national champion (2nd place, 2:46:58)
1993 Jörgen Mårtensson was the national champion (5th place, 2:19:01)
1993 Liz Hjalmarsson was the national champion (5th place, 2:46:23)
1992 Carl-Johan Olofsgård was the national champion (8th place, 2:22:39)
1992 Liz Hjalmarsson was the national champion (4th place, 2:45:05)
1990 Åke Eriksson was the national champion (3rd place, 2:15:38)
1989 Kjell-Erik Stahl was the national champion (4th place, 2:15:07)
1988 Sören Hellmark was the national champion (3rd place, 2:16:41)
1988 Jutta Pedersen was the national champion (2nd place, 2:42:11)
1987 Göran Högberg was the national champion (2nd place, 2:13:59)
1984 Tommy Persson was the national champion (3rd place, 2:13:47)
1984 Evy Palm was the national champion (3rd place, 2:39:38)
1983 Kjell-Erik Stahl was the national champion (5th place, 2:12:49)
1982 Meeri Bodelid was the national champion (2nd place, 2:49:32)
Most Wins
(1979-date)
Men
2
Kjell-Erik Stahl (SWE)
1982,1986
.
Hugh Jones (ENG)
1983,1992
.
Ake Eriksson (SWE)
1991,1995
.
Tesfaye Bekele (ETH)
1994,1996
.
Alfred Shemveta (SWE)
1999-2000
.
Phillip Bandwe (ZIM)
2006-07
Women
6
Isabella Andersson (SWE)
2008-11,2013-14
Prize Money
(ADR qualified runners)
Year Men Women Total 2017 $20,730 $21,075 $41,805 2016 24,000 18,500 42,500 2015 22,535 19,605 42,140 2014 24,295 22,200 46,495 2013 22,265 21,205 43,470 2012 20,055 19,365 39,420 2011 26,935 25,315 52,250 2010 19,280 18,280 38,560 2009 21,100 20,290 41,390 .... 2003 19,375 20,410 39,785 2002 5,175 5,175 10,350 2001 13,095 14,125 27,220 .... 1999 19,545 16,115 35,660 1998 19,870 15,710 35,580 1997 23,300 n/a 23,300 1996 9,520 2,720 12,240 .... 1994 25,900 7,000 32,900 Sums $336,975 $268,090 $605,065
Race Time Bias (sec/km)
Year Men Women 2016 n/c +3.7 2015 n/c +3.0 2014 +4.4 n/c .... 2011 n/c +3.6 .... n/c +5.2 2008 +6.4 +6.1 2007 +11.9 n/c 2006 n/c +5.2 2005 +0.0 +6.6 2004 +4.7 n/c 2003 n/c +2.6 2002 +10.3 n/c 2001 +0.2 +0.9 2000 +4.6 +1.9 1999 -0.1 +1.5 1998 +3.8 +1.3 1997 +5.7 n/c 1996 -0.2 n/c 1995 -2.1 n/c 1994 +0.4 n/c .... 1991 -2.0 n/c 1990 +0.3 +3.7 1989 -0.1 n/c 1988 +0.9 n/c 1987 -0.0 n/c .... 1984 -0.3 -1.8 1983 -3.6 +3.0 Avgs +2.0 +3.1
Competitive Level (1990-date)
Year Men Women 2017<PHONE_NUMBER> 364 76 2015 20 166 2014<PHONE_NUMBER><PHONE_NUMBER> 256 n/c 2011<PHONE_NUMBER><PHONE_NUMBER> 82 n/c 2008<PHONE_NUMBER><PHONE_NUMBER><PHONE_NUMBER> 268 15 2004 253 n/c 2003<PHONE_NUMBER><PHONE_NUMBER><PHONE_NUMBER><PHONE_NUMBER><PHONE_NUMBER><PHONE_NUMBER><PHONE_NUMBER> 271 n/c 1995 368 n/c 1994 294 n/c
Quality Performances through 2019
Men <2:11 2 <2:12 7 <2:13 17 <2:14 33 <2:15 49 Women <2:30 2 <2:32 5 <2:34 13 <2:36 29 <2:38 53 <2:40 67
Finishers
Year Men Women M+F 2019 8796 3555 12351 2018 10380 4260 14640 2017 9041 3531 12572 2016 9482 3407 12889 2015 10903 3930 14833 2014 11953 4123 16076 2013 11759 3920 15679 2012 11344 3343 14687 2011 11842 3329 15171 2010 11412 3269 14681 2009 10674 3044 13718 2008 10512 3029 13541 2007 9574 2796 12370 2006 10128 2813 12941 2005 10036 2665 12701 2004 9974 2732 12706 2003 9785 2368 12153 2002 8688 2035 10723 2001 8423 1758 10181 2000 8272 1653 9925 1999 8253 1531 9784 1998 8468 1450 9918 1997 7678 1171 8849 1996 6901 928 7829 1995 7226 831 8057 1994 7146 765 7911 1993 7364 801 8165 1992 8062 793 8855 1991 8446 808 9254 1990 7844 665 8509 1989 8523 717 9240 1988 10115 747 10862 1987 8351 522 8873 1986 9492 574 10086 1985 9214 570 9784 1984 9989 593 10582 1983 8636 380 9016 1982 6993 264 7257 1981 5728 189 5917 1980 3998 134 4132 1979 1747 52 1799 Sums<PHONE_NUMBER>5 439197 M/F 4.77
Stockholm Extra Marathon
Race Winners
(2 runnings)
05 Jun 1983
2:33:20
2:59:46
06 Jun 1982
2:37:05
3:17:27
Note: The Stockholm Extramaran was held the day after the regular Stockholm Marathon for those runners who could
not receive an entry to the Stockholm Marathon. The race used a different course, the same as used for the 1912
Olympic Marathon (out-and-back) with 2 km added to bring it up to 42.2 km.
Claes Gustafsson (SWE)
Jean Folan (SWE)
Åke Lutner (SWE)
Berit Edengren (SWE)
Last Updated on 03 Jun 2019 mp
Contributors: Malcolm Heyworth, Birger Fält (10), Klaas Loonstra (20), Ulf Saletti


|
Spanish
Guitar
(Toni Braxton) |
|
A
smoky room, a small café
They come to hear you play And drink and dance the night away I sit out in the crowd And close my eyes Dream you're mine But you don't know You don't even know that I am there I wish that I was in your arms Like that Spanish guitar And you would play me through the night 'Till the dawn I wish you'd hold me in your arms Like that Spanish guitar All night long, all night long I'd be your song, I'd be your song Steal my heart with every note you play I pray you'll look my way And hold me to your heart someday I long to be the one that you caress with tenderness And you don't know You don't even know that I exist I wish that I was in your arms Like that Spanish guitar And you would play me through the night 'Till the dawn I wish you'd hold me in your arms Like that Spanish guitar All night long, all night long I'd be your song, I'd be your song Te sientas entre la gente Cierras tu ojos Y suenas que soy tuyo Pero yo no siquiera se que estas ahi Me gustaria tenerte entre mis brazos amor I sit out in the crowd And close my eyes Dream you're mine And you don't know You don't even know that I exist I wish that I was in your arms Like that Spanish guitar And you would play me through the night 'Till the dawn I wish you'd hold me in your arms Like that Spanish guitar All night long, all night long I'd be your song, I'd be your song |


pending: initial state, neither fulfilled nor rejected.
fulfilled: meaning that the operation completed successfully.
rejected: meaning that the operation failed.
A pending promise can either be fulfilled with a value, or rejected with a reason (error). When either of these options happens, the associated handlers queued up by a promise’s then method are called.


This article introduces the basic concepts of binary trees, and then works through a series of practice problems with solution code in C/C++ and Java. Binary trees have an elegant recursive pointer structure, so they are a good way to learn recursive pointer algorithms.
A "binary search tree" (BST) or "ordered binary tree" is a type of binary tree where the nodes are arranged in order: for each node, all elements in its left subtree are less-or-equal to the node (<=), and all the elements in its right subtree are greater than the node (>). The tree shown above is a binary search tree -- the "root" node is a 5, and its left subtree nodes (1, 3, 4) are <= 5, and its right subtree nodes (6, 9) are > 5. Recursively, each of the subtrees must also obey the binary search tree constraint: in the (1, 3, 4) subtree, the 3 is the root, the 1 <= 3 and 4 > 3. Watch out for the exact wording in the problems -- a "binary search tree" is different from a "binary tree".
The nodes at the bottom edge of the tree have empty subtrees and are called "leaf" nodes (1, 4, 6) while the others are "internal" nodes (3, 5, 9).
For each problem, there are two things to understand...
In C or C++, the binary tree is built with a node type like this...
struct node {
int data;
struct node* left;
struct node* right;
}
/*
Given a binary tree, return true if a node
with the target data is found in the tree. Recurs
down the tree, chooses the left or right
branch by comparing the target to each node.
*/
static int lookup(struct node* node, int target) {
// 1. Base case == empty tree
// in that case, the target is not found so return false
if (node == NULL) {
return(false);
}
else {
// 2. see if found here
if (target == node->data) return(true);
else {
// 3. otherwise recur down the correct
subtree
if (target < node->data) return(lookup(node->left,
target));
else return(lookup(node->right,
target));
}
}
}
The lookup() algorithm could be written as a while-loop that iterates down the tree. Our version uses recursion to help prepare you for the problems below that require recursion.
// suppose the variable "root" points to the tree
root = change(root);
We take the value returned by change(), and use it as the new value for root. This construct is a little awkward, but it avoids using reference parameters which confuse some C and C++ programmers, and Java does not have reference parameters at all. This allows us to focus on the recursion instead of the pointer mechanics. (For lots of problems that use reference parameters, see CSLibrary #105, Linked List Problems, http://cslibrary.stanford.edu/105/).
2
/ \
1 10
returns the tree...
2
/ \
1 10
/
5
The solution shown here introduces a newNode() helper function that builds a single node. The base-case/recursion structure is similar to the structure in lookup() -- each call checks for the NULL case, looks at the node at hand, and then recurs down the left or right subtree if needed.
/*
Helper function that allocates a new node
with the given data and NULL left and right
pointers.
*/
struct node* NewNode(int data) {
struct node* node = new(struct node);
// "new" is like "malloc"
node->data = data;
node->left = NULL;
node->right = NULL;
return(node);
}
/*
Give a binary search tree and a number, inserts a new node
with the given number in the correct place in the tree.
Returns the new root pointer which the caller should
then use (the standard trick to avoid using reference
parameters).
*/
struct node* insert(struct node* node, int data) {
// 1. If the tree is empty, return a new, single node
if (node == NULL) {
return(newNode(data));
}
else {
// 2. Otherwise, recur down the tree
if (data <= node->data) node->left = insert(node->left,
data);
else node->right = insert(node->right, data);
return(node); // return the (unchanged) node
pointer
}
}
The shape of a binary tree depends very much on the order that the nodes are inserted. In particular, if the nodes are inserted in increasing order (1, 2, 3, 4), the tree nodes just grow to the right leading to a linked list shape where all the left pointers are NULL. A similar thing happens if the nodes are inserted in decreasing order (4, 3, 2, 1). The linked list shape defeats the lg(N) performance. We will not address that issue here, instead focusing on pointers and recursion.
Reading about a data structure is a fine introduction, but at some point the only way to learn is to actually try to solve some problems starting with a blank sheet of paper. To get the most out of these problems, you should at least attempt to solve them before looking at the solution. Even if your solution is not quite right, you will be building up the right skills. With any pointer-based code, it's a good idea to make memory drawings of a a few simple cases to see how the algorithm should work.
2
/ \
1 3
Write the code in three different ways...
struct node* build123() {
int size(struct node* node) {
int maxDepth(struct node* node) {
int minValue(struct node* node) {
4
/ \
2 5
/ \
1 3
Produces the output "1 2 3 4 5". This is known as an "inorder" traversal of the tree.
Hint: For each node, the strategy is: recur left, print the node data, recur right.
void printTree(struct node* node) {
4
/ \
2 5
/ \
1 3
Produces the output "1 3 2 5 4". The description is complex, but the code is simple. This is the sort of bottom-up traversal that would be used, for example, to evaluate an expression tree where a node is an operation like '+' and its subtrees are, recursively, the two subexpressions for the '+'.
void printPostorder(struct node* node) {
5
/ \
4 8
/
/ \
11
13 4
/ \
\
7
2 1
Root-to-leaf paths:
path 1: 5 4 11 7
path 2: 5 4 11 2
path 3: 5 8 13
path 4: 5 8 4 1
For this problem, we will be concerned with the sum of the values of such a path -- for example, the sum of the values on the 5-4-11-7 path is 5 + 4 + 11 + 7 = 27.
Given a binary tree and a sum, return true if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. Return false if no such path can be found. (Thanks to Owen Astrachan for suggesting this problem.)
int hasPathSum(struct node* node, int sum) {
Given a binary tree, print out all of its root-to-leaf paths, one per line.
void printPaths(struct node* node) {
So the tree...
4
/ \
2 5
/ \
1 3
is changed to...
4
/ \
5 2
/ \
3 1
The solution is short, but very recursive. As it happens, this can be accomplished without changing the root node pointer, so the return-the-new-root construct is not necessary. Alternately, if you do not want to change the tree nodes, you may construct and return a new mirror tree based on the original tree.
void mirror(struct node* node) {
So the tree...
2
/ \
1 3
is changed to...
2
/ \
2 3
/ /
1 3
/
1
As with the previous problem, this can be accomplished without changing the root node pointer.
void doubleTree(struct node* node) {
int sameTree(struct node* a, struct node* b) {
Suppose you are building an N node binary search tree with the values 1..N. How many structurally different binary search trees are there that store those values? Write a recursive function that, given the number of distinct values, computes the number of structurally unique binary search trees that store those values. For example, countTrees(4) should return 14, since there are 14 structurally unique binary search trees that store 1, 2, 3, and 4. The base case is easy, and the recursion is short but dense. Your code should not construct any actual trees; it's just a counting problem.
int countTrees(int numKeys) {
a. 5 -> TRUE
/ \
2 7
b. 5 -> FALSE, because the 6 is not ok to the
left of the 5
/ \
6 7
c. 5 -> TRUE
/ \
2 7
/
1
d. 5 -> FALSE, the 6 is ok with the 2, but the
6 is not ok with the 5
/ \
2 7
/ \
1 6
For the first two cases, the right answer can be seen just by comparing
each node to the two nodes immediately below it. However, the fourth case
shows how checking the BST quality may depend on nodes which are several
layers apart -- the 5 and the 6 in that case.
Returns true if a binary tree is a binary search tree.
int isBST(struct node* node) {
/*
Returns true if the given tree is a binary search tree
(efficient version).
*/
int isBST2(struct node* node) {
return(isBSTRecur(node, INT_MIN, INT_MAX));
}
/*
Returns true if the given tree is a BST and its
values are >= min and <= max.
*/
int isBSTRecur(struct node* node, int min, int max) {
root->left = lChild;
root->right= rChild;
return(root);
}
// call newNode() three times, and use only one local variable
struct node* build123b() {
struct node* root = newNode(2);
root->left = newNode(1);
root->right = newNode(3);
return(root);
}
/*
Build 123 by calling insert() three times.
Note that the '2' must be inserted first.
*/
struct node* build123c() {
struct node* root = NULL;
root = insert(root, 2);
root = insert(root, 1);
root = insert(root, 3);
return(root);
}
// use the larger one
if (lDepth > rDepth) return(lDepth+1);
else return(rDepth+1);
}
}
// loop down to find the leftmost leaf
while (current->left != NULL) {
current = current->left;
}
return(current->data);
}
printTree(node->left);
printf("%d ", node->data);
printTree(node->right);
}
// first recur on both subtrees
printTree(node->left);
printTree(node->right);
// then deal with the node
printf("%d ", node->data);
}
Strategy: subtract the node value from the sum when recurring
down,
and check to see if the sum is 0 when you run out of tree.
*/
int hasPathSum(struct node* node, int sum) {
// return true if we run out of tree and sum==0
if (node == NULL) {
return(sum == 0);
}
else {
// otherwise check both subtrees
int subSum = sum - node->data;
return(hasPathSum(node->left, subSum) ||
hasPathSum(node->right,
subSum));
}
}
printPathsRecur(node, path, 0);
}
/*
Recursive helper function -- given a node, and an array containing
the path from the root node up to but not including this
node,
print out all the root-leaf paths.
*/
void printPathsRecur(struct node* node, int path[], int pathLen)
{
if (node==NULL) return;
// append this node to the path array
path[pathLen] = node->data;
pathLen++;
// it's a leaf, so print the path that led to here
if (node->left==NULL && node->right==NULL) {
printArray(path, pathLen);
}
else {
// otherwise try both subtrees
printPathsRecur(node->left, path, pathLen);
printPathsRecur(node->right, path, pathLen);
}
}
// Utility that prints out an array on a line.
void printArray(int ints[], int len) {
int i;
for (i=0; i<len; i++) {
printf("%d ", ints[i]);
}
printf("\n");
}
So the tree...
4
/ \
2 5
/ \
1 3
is changed to...
4
/ \
5 2
/ \
3 1
*/
void mirror(struct node* node) {
if (node==NULL) {
return;
}
else {
struct node* temp;
// do the subtrees
mirror(node->left);
mirror(node->right);
// swap the pointers in this node
temp = node->left;
node->left = node->right;
node->right = temp;
}
}
So the tree...
2
/ \
1 3
Is changed to...
2
/ \
2 3
/ /
1 3
/
1
*/
void doubleTree(struct node* node) {
struct node* oldLeft;
if (node==NULL) return;
// do the subtrees
doubleTree(node->left);
doubleTree(node->right);
// duplicate this node to its left
oldLeft = node->left;
node->left = newNode(node->data);
node->left->left = oldLeft;
}
// 2. both non-empty -> compare them
else if (a!=NULL && b!=NULL) {
return(
a->data == b->data &&
sameTree(a->left, b->left) &&
sameTree(a->right, b->right)
);
}
// 3. one empty, one not -> false
else return(false);
}
Strategy: consider that each value could be the root.
Recursively find the size of the left and right subtrees.
*/
int countTrees(int numKeys) {
if (numKeys <=1) {
return(1);
}
else {
// there will be one value at the root, with
whatever remains
// on the left and right each forming their
own subtrees.
// Iterate through all the values that could
be the root...
int sum = 0;
int left, right, root;
for (root=1; root<=numKeys; root++) {
left = countTrees(root - 1);
right = countTrees(numKeys - root);
// number of possible trees with
this root == left*right
sum += left*right;
}
return(sum);
}
}
// false if the max of the left is > than us
// (bug -- an earlier version had min/max backwards here)
if (node->left!=NULL && maxValue(node->left) > node->data)
return(false);
// false if the min of the right is <= than us
if (node->right!=NULL && minValue(node->right) <=
node->data)
return(false);
// false if, recursively, the left or right is not a BST
if (!isBST(node->left) || !isBST(node->right))
return(false);
// passing all that, it's a BST
return(true);
}
/*
Returns true if the given tree is a BST and its
values are >= min and <= max.
*/
int isBSTUtil(struct node* node, int min, int max) {
if (node==NULL) return(true);
// false if this node violates the min/max constraint
if (node->data<min || node->data>max) return(false);
// otherwise check the subtrees recursively,
// tightening the min or max constraint
return
isBSTUtil(node->left, min, node->data) &&
isBSTUtil(node->right, node->data+1, max)
);
}
In Java, we will have a BinaryTree object that contains a single root pointer. The root pointer points to an internal Node class that behaves just like the node struct in the C/C++ version. The Node class is private -- it is used only for internal storage inside the BinaryTree and is not exposed to clients. With this OOP structure, almost every operation has two methods: a one-line method on the BinaryTree that starts the computation, and a recursive method that works on the Node objects. For the lookup() operation, there is a BinaryTree.lookup() method that the client uses to start a lookup operation. Internal to the BinaryTree class, there is a private recursive lookup(Node) method that implements the recursion down the Node structure. This second, private recursive method is basically the same as the recursive C/C++ functions above -- it takes a Node argument and uses recursion to iterate over the pointer structure.
// BinaryTree.java
public class BinaryTree {
// Root node pointer. Will be null for an empty tree.
private Node root;
/*
--Node--
The binary tree is built using this nested node class.
Each node stores one data element, and has left and
right
sub-tree pointer which may be null.
The node is a "dumb" nested class -- we just use it
for
storage; it does not have any methods.
*/
private static class Node {
Node left;
Node right;
int data;
Node(int newData) {
left = null;
right = null;
data = newData;
}
}
/**
Creates an empty binary tree -- a null root pointer.
*/
public void BinaryTree() {
root = null;
}
/**
Returns true if the given target is in the binary
tree.
Uses a recursive helper.
*/
public boolean lookup(int data) {
return(lookup(root, data));
}
/**
Recursive lookup -- given a node, recur
down searching for the given data.
*/
private boolean lookup(Node node, int data) {
if (node==null) {
return(false);
}
if (data==node.data) {
return(true);
}
else if (data<node.data) {
return(lookup(node.left, data));
}
else {
return(lookup(node.right, data));
}
}
/**
Inserts the given data into the binary tree.
Uses a recursive helper.
*/
public void insert(int data) {
root = insert(root, data);
}
/**
Recursive insert -- given a node pointer, recur down
and
insert the given data into the tree. Returns the new
node pointer (the standard way to communicate
a changed pointer back to the caller).
*/
private Node insert(Node node, int data) {
if (node==null) {
node = new Node(data);
}
else {
if (data <= node.data) {
node.left = insert(node.left,
data);
}
else {
node.right = insert(node.right,
data);
}
}
return(node); // in any case, return the new
pointer to the caller
}
root.left = lChild;
root.right= rChild;
}
/**
Build 123 using only one pointer variable.
*/
public void build123b() {
root = new Node(2);
root.left = new Node(1);
root.right = new Node(3);
}
/**
Build 123 by calling insert() three times.
Note that the '2' must be inserted first.
*/
public void build123c() {
root = null;
root = insert(root, 2);
root = insert(root, 1);
root = insert(root, 3);
}
private int size(Node node) {
if (node == null) return(0);
else {
return(size(node.left) + 1 + size(node.right));
}
}
private int maxDepth(Node node) {
if (node==null) {
return(0);
}
else {
int lDepth = maxDepth(node.left);
int rDepth = maxDepth(node.right);
// use the larger + 1
return(Math.max(lDepth, rDepth) + 1);
}
}
/**
Finds the min value in a non-empty binary search tree.
*/
private int minValue(Node node) {
Node current = node;
while (current.left != null) {
current = current.left;
}
return(current.data);
}
private void printTree(Node node) {
if (node == null) return;
// left, node itself, right
printTree(node.left);
System.out.print(node.data + " ");
printTree(node.right);
}
public void printPostorder(Node node) {
if (node == null) return;
// first recur on both subtrees
printPostorder(node.left);
printPostorder(node.right);
// then deal with the node
System.out.print(node.data + " ");
}
Strategy: subtract the node value from the sum when recurring
down,
and check to see if the sum is 0 when you run out of tree.
*/
public boolean hasPathSum(int sum) {
return( hasPathSum(root, sum) );
}
boolean hasPathSum(Node node, int sum) {
// return true if we run out of tree and sum==0
if (node == null) {
return(sum == 0);
}
else {
// otherwise check both subtrees
int subSum = sum - node.data;
return(hasPathSum(node.left, subSum) || hasPathSum(node.right,
subSum));
}
}
/**
Recursive printPaths helper -- given a node, and an array
containing
the path from the root node up to but not including this
node,
prints out all the root-leaf paths.
*/
private void printPaths(Node node, int[] path, int pathLen) {
if (node==null) return;
// append this node to the path array
path[pathLen] = node.data;
pathLen++;
// it's a leaf, so print the path that led to here
if (node.left==null && node.right==null) {
printArray(path, pathLen);
}
else {
// otherwise try both subtrees
printPaths(node.left, path, pathLen);
printPaths(node.right, path, pathLen);
}
}
/**
Utility that prints ints from an array on one line.
*/
private void printArray(int[] ints, int len) {
int i;
for (i=0; i<len; i++) {
System.out.print(ints[i] + " ");
}
System.out.println();
}
/**
Changes the tree into its mirror image.
So the tree...
4
/ \
2 5
/ \
1 3
is changed to...
4
/ \
5 2
/ \
3 1
Uses a recursive helper that recurs over the tree,
swapping the left/right pointers.
*/
public void mirror() {
mirror(root);
}
private void mirror(Node node) {
if (node != null) {
// do the sub-trees
mirror(node.left);
mirror(node.right);
// swap the left/right pointers
Node temp = node.left;
node.left = node.right;
node.right = temp;
}
}
So the tree...
2
/ \
1 3
Is changed to...
2
/ \
2 3
/ /
1 3
/
1
Uses a recursive helper to recur over the tree
and insert the duplicates.
*/
public void doubleTree() {
doubleTree(root);
}
private void doubleTree(Node node) {
Node oldLeft;
if (node == null) return;
// do the subtrees
doubleTree(node.left);
doubleTree(node.right);
// duplicate this node to its left
oldLeft = node.left;
node.left = new Node(node.data);
node.left.left = oldLeft;
}
/**
Recursive helper -- recurs down two trees in parallel,
checking to see if they are identical.
*/
boolean sameTree(Node a, Node b) {
// 1. both empty -> true
if (a==null && b==null) return(true);
// 2. both non-empty -> compare them
else if (a!=null && b!=null) {
return(
a.data == b.data &&
sameTree(a.left, b.left) &&
sameTree(a.right, b.right)
);
}
// 3. one empty, one not -> false
else return(false);
}
Strategy: consider that each value could be the root.
Recursively find the size of the left and right subtrees.
*/
public static int countTrees(int numKeys) {
if (numKeys <=1) {
return(1);
}
else {
// there will be one value at the root, with
whatever remains
// on the left and right each forming their
own subtrees.
// Iterate through all the values that could
be the root...
int sum = 0;
int left, right, root;
for (root=1; root<=numKeys; root++) {
left = countTrees(root-1);
right = countTrees(numKeys - root);
// number of possible trees with
this root == left*right
sum += left*right;
}
return(sum);
}
}
/**
Recursive helper -- checks if a tree is a BST
using minValue() and maxValue() (not efficient).
*/
private boolean isBST(Node node) {
if (node==null) return(true);
// do the subtrees contain values that do not
// agree with the node?
if (node.left!=null && maxValue(node.left) > node.data)
return(false);
if (node.right!=null && minValue(node.right) <=
node.data) return(false);
// check that the subtrees themselves are ok
return( isBST(node.left) && isBST(node.right) );
}
/**
Efficient BST helper -- Given a node, and min and max values,
recurs down the tree to verify that it is a BST, and that
all
its nodes are within the min..max range. Works in O(n) time
--
visits each node only once.
*/
private boolean isBST2(Node node, int min, int max) {
if (node==null) {
return(true);
}
else {
// left should be in range min...node.data
boolean leftOk = isBST2(node.left, min, node.data);
// if the left is not ok, bail out
if (!leftOk) return(false);
// right should be in range node.data+1..max
boolean rightOk = isBST2(node.right, node.data+1,
max);
return(rightOk);
}
}


JNU protests: Students take out demonstration march, traffic hit in South Delhi
by PTIJNU students took out the protest march to the Rashtrapati Bhavan demanding an appointment with the president, who is also the visitor of the university, to seek his intervention in the hostel fee hike issue
Traffic movement was slow at various intersections in South Delhi due to a protest march taken out by JNU students against the hostel fee hike on Monday.
"Due to the demonstration, the traffic movement is affected on road leading to Dhaula Kuan from AIIMS. The commuters should avoid the route," the Delhi Traffic Police tweeted.
"The traffic movement on Africa Avenue was slow and the route from Bhikaji Cama Place is obstructed. Kindly avoid this stretch," the police said.
JNU students took out the protest march to the Rashtrapati Bhavan demanding an appointment with the president, who is also the visitor of the university, to seek his intervention in the hostel fee hike issue.
Earlier in the day, traffic movement was closed on Baba Gangnath Marg to Sarojni Nagar depot, Africa Avenue road, both carriageway of Sant Nagar depot and Hyatt to Leela Hotel due to demonstration.
Traffic was diverted from Leela Hotel towards INA.
Also read: JNU students' union protest fee hike, university's 'anti-student' policies
Also read: JNU announces partial roll-back in fee hike amid student protests


AdFreeYoutube Developers look at youtube and find the best videos. Then they get the code and put here. There are no ads that are before the video


I graduated from Douglass High School in the year 2015
For my college experience I attend The Alcorn State University. I attend this HBCU for two years and came back home to attend SouthWest Community College.
Now I am currently taking up a trade to learn how to be an Software Developer. I attend the first evert Coding boot camp in Memphis,TN known as Code-Crew School


Next: Converting earleme to Earley set ID, Previous: The fully general input model, Up: Advanced input models [Contents][Index]
One variation of the fully general model is the one-codepoint-per-earleme input model, usually called the codepoint-per-earleme input model.
Most input models may be called token-per-earleme input models. That is, they are models in which every token is exactly one earleme long.
In the codepoint-per-earleme model, every codepoint will be treated as being exactly one earleme in length. If a token is more than one codepoint in length, that token will span earlemes. In the codepoint-per-earleme model, tokens may be ambiguous, and they may overlap.
When a codepoint-per-earleme model of input is used, there may be many earlemes at which no tokens start. For example, in a straightforward codepoint-per-earleme implementation of a grammar for a language that allows comments, no tokens will start at any earlemes which correspond to character locations inside a comment.
Codepoint-per-earleme input model have seen a lot of use,
but mainly for experimental and toy grammars.
Their disadvantage is efficiency — the requirement of one call
of marpa_r_alternative()
for each codepoint can make them
substantially more expensive than input models which allow multiple
codepoints per earleme.


const ( FileSizeBytesDefault int64 = 64 * 1024 * 1024 // 64MB BufferSizeBytesDefault int64 = 1024 * 1024 // 1MB )
var ( ErrCRC = errors.New("wal: crc verification failed") ErrWriteOnly = errors.New("wal: in WRITE mode") ErrReadOnly = errors.New("wal: in READ mode") ErrWALAlreadyExists = errors.New("wal: is already exists") )
func Repair(logger api.Logger, dirPath string) error
Repair tries to repair the last file of a WAL, in case an Open() comes back with a io.ErrUnexpectedEOF, which indicates the possibility to fix the WAL.
After a crash, the last log file in the WAL may be left in a state where an attempt tp reopen will result in the last Read() returning an error. This is because of several reasons: - we use pre-allocated / recycled files, the files have a "garbage" tail - the last write may have been torn - the failure might have occurred when the log file was being prepared (no anchor)
The Repair() tries to repair the last file of the wal by truncating after the last good record. Before doing so it copies the bad file to a side location for later analysis by operators.
logger: reference to a Logger implementation. dirPath: directory path of the WAL. return: an error if repair was not successful.
type LogRecordCRC uint32
LogRecordHeader contains the LogRecordLength (lower 32 bits) and LogRecordCRC (upper 32 bits).
type LogRecordHeader uint64
type LogRecordLength uint32
type LogRecordReader struct {
// contains filtered or unexported fields
}
func NewLogRecordReader(logger api.Logger, fileName string) (*LogRecordReader, error)
func (r *LogRecordReader) CRC() uint32
func (r *LogRecordReader) Close() error
func (r *LogRecordReader) Read() (*protos.LogRecord, error)
type Options struct { FileSizeBytes int64 BufferSizeBytes int64 }
func DefaultOptions() *Options
DefaultOptions returns the set of default options.
func (o *Options) String() string
WriteAheadLogFile is a simple implementation of a write ahead log (WAL).
The WAL is composed of a sequence of frames. Each frame contains: - a header (uint64) - payload: a record of type LogRecord, marshaled to bytes, and padded with zeros to 8B boundary.
The 64 bit header is made of two parts: - length of the marshaled LogRecord (not including pad bytes), in the lower 32 bits. - a crc32 of the data: marshaled record bytes + pad bytes, in the upper 32 bits.
The WAL is written to a sequence of files: <index>.wal, where index uint64=1,2,3...; represented in fixed-width hex format, e.g.<PHONE_NUMBER>000001.wal
The WAL has two modes: append, and read.
When a WAL is first created, it is in append mode. When an existing WAL is opened, it is in read mode, and will change to append mode only after ReadAll() is invoked.
In append mode the WAL can accept Append() and TruncateTo() calls. The WAL must be closed after use to release all resources.
type WriteAheadLogFile struct {
// contains filtered or unexported fields
}
func Create(logger api.Logger, dirPath string, options *Options) (*WriteAheadLogFile, error)
Create will create a new WAL, if it does not exist, or an error if it already exists.
logger: reference to a Logger implementation. dirPath: directory path of the WAL. options: a structure containing Options, or nil, for default options.
return: pointer to a WAL, ErrWALAlreadyExists if WAL already exists or other errors
func InitializeAndReadAll(logger api.Logger, walDir string, options *Options) (writeAheadLog *WriteAheadLogFile, initialState [][]byte, err error)
func Open(logger api.Logger, dirPath string, options *Options) (*WriteAheadLogFile, error)
Open will open an existing WAL, if it exists, or an error if it does not exist.
After opening, the WAL is in read mode, and expects a call to ReadAll(). An attempt to write (e.g. Append, TruncateTo) will result in an error.
logger: reference to a Logger implementation. dirPath: directory path of the WAL. options: a structure containing Options, or nil, for default options.
return: pointer to a WAL, or an error
func (w *WriteAheadLogFile) Append(data []byte, truncateTo bool) error
Append a data item to the end of the WAL and indicate whether this entry is a truncation point.
The data item will be added to the log, and internally marked with a flag that indicates whether it is a truncation point. The log implementation may truncate all preceding data items, not including this one.
data: the data to be appended to the log. Cannot be nil or empty. truncateTo: whether all records preceding this one, but not including it, can be truncated from the log.
func (w *WriteAheadLogFile) CRC() uint32
CRC returns the last CRC written to the log file.
func (w *WriteAheadLogFile) Close() error
Close the files and directory of the WAL, and release all resources.
func (w *WriteAheadLogFile) ReadAll() ([][]byte, error)
ReadAll the data items from the latest truncation point to the end of the log. This method can be called only at the beginning of the WAL lifecycle, right after Open(). After a successful invocation the WAL moves to write mode, and is ready to Append().
In case of failure:
- an error of type io.ErrUnexpectedEOF is returned when the WAL can possibly be repaired by truncating the last log file after the last good record. - all other errors indicate that the WAL is either - is closed, or - is in write mode, or - is corrupted beyond the simple repair measure described above.
func (w *WriteAheadLogFile) TruncateTo() error
TruncateTo appends a control record in which the TruncateTo flag is true. This marks that every record prior to this one can be safely truncated from the log.


Imports and Exports Within United States
UCB MIDS w209.3 Spring 2018
Daniel Balack, Felix Tsui, Keri Wheatley
In Conclusion
blah blah blah
Who We Are


Jackson Pollock
Pollock's greatness lies in developing one of the most radical abstract styles in the history of modern art, detaching line from color, redefining the categories of drawing and painting, and finding new means to describe pictorial space.
His radical methods and growing reputation quickly caught the attention of the mass media. In 1949, Life magazine ran a feature story posing the question: "Jackson Pollock: Is he the greatest living painter in the United States?"
To this day, Pollock is known as a leader in the most important 20th century American art movements.
The risks and the creative approaches he took, led future artists to create with passion, as opposed to trying to follow set boundaries or guidelines.
"The painting has a life of its own. I try to let it come through."
-- Jackson Pollock


Slides and videos will be available soon
Talks:
Thanks to
Thanks to Dixons Retail we had free food for eveyrone.
Talks:
Thanks to Dixons Retail we had free food for eveyrone.
Our goal is to create a community of php programmers in Brno. In doing so we are organizing events where developers can listen to talks, chat, have a good beer and most importantly have a good time together.
We try to organize meetup every 2 months. Usually these meetups are sponsored by different sponsors who provide free food for all attendees
If you would like to have a speach at some event or you are interested in sponsorship, do not hesitate to contact me and we can discuss details. You can find me on Google+ or send me an e-mail to zapletal.jakub (at) gmail.com.


Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.
For the best experience please use the latest Chrome, Safari or Firefox browser.
Harikrishna R<EMAIL_ADDRESS>Klar Systems Private Limited
My name is Harikrishna. I'm an embedded systems engineer. My background is in audio systems -- music, compression/decompression, enhancement, that sort of thing -- but I've also done some imaging stuff and a little bit of video analytics. In the last two years, I have been running my own firm, Klar Systems, along with a two of my friends and co-founders. We build IoT products, create frameworks for IoT, and we're also helping Jigsaw Academy create an introductory course on IoT.
Image source: Wikipedia
In the years that I spent at Texas Instruments, for the most part, as an APplications Engineer, I saw IoT evolve and take shape. What I saw was chips get cheaper, more powerful and less power hungry with each generation, following Moore's Law. Now, everyone has heard about Moore's Law and people mostly imagined it as being applicable to chips that power PCs and Laptop -- you know -- Intel, AMD and maybe other server class chips and super computers and so forth. But that's not the only thing that was going on. When I started my careed at Texas Instruments, they were already the world leaders in Digital Signal Processors and the fastest one we had back then -- this is the year 2000 -- ran at a 150 MHz and could do 2 32-bit MAC every cycle. By 2006, these things were running at 1 GHz+ and doing 4 64-bit MAC MAC. So at at raw level, you'd gotten a 80 times speed up in 6 years! There is a point on this graph, maybe around 2000 at which mass adoption of smartphones became inevitable. I mean we didn't know about skype or instagram or whatapp -- we had no way to figure out what people would do with all this compting power in their pocket. In fact, most people who thought about it felt it would mostly be used by business executive types -- who needed to go do a lot of meetings and wouldn't want to lug a laptop. They were wrong. In two ways. Most people buying smartphones are regular guys who want to browse and whatsapp and play games. And business executives continue to lug their laptops in and out of each meeting. Anyway my point is it was not just Intel processors that got faster due to Moore's Law. It was all processors. And when the processers that powered your phone passed a certain threshold, those phones became smart phones.
... are everywhere!
Today that same process is making microcontrollerS faster and more powerful. And microcontrollers are ever where. Already. Today. They are in pretty much every equipment around you. From refregirators, microwave ovens, dishwashers, washing machines, elevators, gensets, weighing machines, electronic safes, ... I mean we are surrounded by microcontrolers. FOr the most part, these have been quiet workhorses -- substituting custom circuitry with more flexible and cheaper programmable designs. And now microcontrollers are on the verge of crossing a threshold in terms of their capabilities.
The second trend driving IoT is connectivity. Broadband adoption, the worldwide availability of 3G and 4G wireless data, cheaper, smarter, networking equipment -- many of us are running home networks that are more complex than what some small companies had 15-20 years back -- with routers, repeaters and bridges. And this is being augmented by other wireless technologies from NFS and Bluetooth to LoRa and other innvotive uses of the radio spectrum. Basically, there is a solution at every feasible intersection of power vs bandwidth vs range. And connectivity continues to become more cheaper and pervasive.
The Internet of Things and Sensors and Actuators!
Finally, you have sensors. To me this is hugely significant. Vint Cerf, the “Father of the Internet,” called IoT the "internet of sensors". And in a way, the central point of my talk today is about this trend. This is actually a interlinked set of little noticed trends. First: pretty much anything you may want to measure, can now be measured digitally. Weight - now you have digital scales. Temperature -- we have digital thermometers. Pressure, humidity -- same thing. And also for a a bunch of things we couldn't have meaured before -- accelaration, proximity, pedometer, not to CMOS sensors for imaging. Even the traditional sensors we have known -- mics, imaging sensors, have gotten a lot smaller and a lot cheapers. This is made possile by a variety of advances, mostly in semi-conductor technologies -- things like MEMS. An average smarthone today has a dozen sensors. And partly as a result - we'll consume more than one and half a billion smartphones this year -- they have all gotten cheaper. In some cases 100X cheaper in the last 10 years.
50 billion connected devices by 2020
28 billion connected devices by 2021
26 billion connected devices by 2020
Right now we're already at 15 billion connected devices.
So these things are all happening -- and you can look at these trends and make the projections. It's quite easy. The 20 billion connected devices that we're going to have is not so much unbelieveble as inevitable. [How many think IoT is going to be big "in the near future"?] The problem is we have no way of knowing what these devices are going to be doing. Anymore than someone could have foreseen the various uses we find for our smartphones. And I think the reason most people think that IoT is overhyped is because of this gap in our ability to forsee. [How many think IoT is overhyped?] I'm not saying IoT is not hyped. Of course it is -- and some very crazy predictions are being made that will be way off the mark. But, it hard to see that we'll stop here. The trends underlying this phenomenon are secure.
A lot of peopel to fill this gap in our understanding will often look from the top-down. Look at some big problem we're facing -- I don't know -- in health care or maybe smart cities or perhaps traditional industries like retail - and try to see how these devies can be used in that context. This is a valid approach -- but prolematic, Because you can't be specific. I don't mean to play the cynic hear. I'm just saying, these exercises in imagination are good for developing your imagination. They are unlikely to predict outcomes. How a society adopts a particular technology is a complex non-linear path. Instead, what I prefer to do is look at it from the bottom up. I look at the the possibilities that are opeing up -- as they are opening up -- and try and understand those technological capabilities that we can bring to bear on a problem. i.e., focus on the toolkit, and when do encounter a problem, you can pull out the most appropriat etool from your tool kit.
And I prefer concrete examples to vague abstractions. So that's why I did this demo (even though it doesn't work very well...). And I thought: why don't I explain how this works. If you get nothing else out of this workshop: you'll get at least a sense of how this sort of problem can be approached. And hopefully it adds to your tool kit. Maybe not directly, may be it does so by leading you in some related directions... I don't know. In any case, it gets you closer on the path of adding to this technological progress, rather than merely watching or, worse, participating in the hype cycle. [So how many of you think that this is a complex algo?] OK, so let's open the hood.
Yeah it's actually quite simple. Six steps. Each one fairly basic. Let's begin at the beginning. The camera I have here is a Logitech [FIXME]. Megapixel webcam. Not very expensive -- not cheap stuff either. About 1500 rupees or so. Hunt for a deal this Diwali -- I hear our favorite online retail giants are gearing up for battle this season -- you may get something like it under 1000, I think.
| Columns | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | 2 | 3 | ... | 1278 | 1279 | |||||
| Rows | 0 | ... | |||||||||
| 1 | ... | ||||||||||
| 2 | ... | ||||||||||
| 3 | ... | ||||||||||
| ... | ... | ||||||||||
| 718 | ... | ||||||||||
| 719 | ... |
1280 columns * 720 rows → 921600 pixels/image
What this gives me is a 1280x720 image at upto 30 FPS, so called 720p video. Now that sounds impressive. But those of you who are photograhy enthusiasts or have tried to comparison shop for mid- to high-end cameras, you guys would have figured out very quickky that image quality is not about the pixel count. It depends of very many things -- the optics, the size of the sensor, the type of image stabilization, and so forth. And in the grand scheme of things, what we have here is poor-man's HD image. I mean technically it is HD, but that's about it. So this is what we get: 1280 columns, 720 rows, and...
| Pixel | ||
| R= | G= | B= |
921600 pixels/image × 24 bits/pixel → 2.6 MB
2.6 MB @ 30 frames/second → ~600 mbps [uncompressed]
...each pixel is a 24 bit number -- 8 bits each for the red, green and blue planes. That's a total of 2.6 MB per uncomressed image. And at 30 FPS, we are looking at more than 600 mbps. HD video stream! That's a large amount of data, but in practice, when streaming over the network, we compress this stream. And compression ratios of 200 times is often possible with h.264, especially when you have low motion video. So when you are streaming, it becomes 3-4 mbps.
100 cycles/pixel @ 30 fps → ~2.7 GHz
@ 3 fps → 270 MHz
(one frame every 333 ms)
But in our case, we want to be processing this whole image in its uncompressed form. Just a few years ago this was an impossible torrent of data. If were to spend say 100 cpu cycles per pixel -- and that's not hard to do -- that won't take more than 10 lines of code in a high level language -- you'll end up needing 2.7 GHz. You either need a very powerful processor or some custom circuitry. Well, fortunately for us, with video there's a very simple option. Just drop the frame rate. If you were OK with processing this stream at 3 frames per second, instead of 30 -- straightaway the CPU requirement drops 10 fold. But what that means is that you get only one image for 300 ms. In other words, you need to hold you phone up for at least a third of a second to make sure we get it. That's not hard -- most people will hold it up for a few seconds. Even a low-end platform -- say the raspberry pi -- which has a single core ARM processor running at 800 MHz can handle this quite easily. We are not using a RaspPi here - we'll come to our compute platform later. Just wanted to give you a sense of the problem size.
Gray = 0.2989 × R + 0.5870 × G + 0.1140 × B
OK, so we have the image. What next. Well, we're not really interested in a color image. We want to look for black phones. So first thing we do, we convert it to a gray scale image. i.e., for 24 bits per pixel, it drops to 8 bits per pixel. And the process involves a straightforward weighter sum of the RG abd B values. The 8 bit alue we have goes from 0 to 255. 0 is perfect dark and 255 is perfect bright.
Output = 1, if above threshold; 0, otherwise
Second, we want to threshold this image. In other words make it a binary black and white image. Remember, we are interested only in the black portions. Now, there's a problem here. If we looked only for perfectly black pixels, we won't find many. [Explain why]. So we need to have a threshold, some number, below which we decide a pixel is black. Let's try that [process of tuning]. So we have a problem.
Set and tune two thresholds: high and low
Needs to be implemented recursively or over multiple passes. Somewhat expensive.
So to get past this we use a technique called hyteresis thresholding. Hyteresis refers to a stateful process in which the output lags behind the input. In the context of image processing, the way this works is, we have two thresholds. One high, one low. So what we're saying is, everything below the low threshold is definitely black. Everything above the high threshold is definitely not black. For pixels with a value in between -- they are considered black provided they have at least one black neighbour.
Pass:
OK, so think about this. You start with an image and mark all the pixels.  Pixels that lie between the threshold. You then grow the black regions by encompassing all the questionable pixels nearby in a progressive manner. This is a recursive process. This is a special case of a problem that arises frequently in what is generally called image segmentation. Whenever you have a picture that you want to break up into different regions or objects. There are multiple different ways to go about this, but I just took a brute force approach here. So with this we get two thresholds to tweak and a little bit of tweaking lets us get to a just right number.
Next we can find our regions of interest from this binary image. I used a library called tracking.js do this. Tracking.js returns a list of black boxes it found in the image. We look at each nox and eliminate candidates based on size and aspect ratio.  You know, things that are part of the background. More enhancements are possible: by this point it is all just logic on the list of boxes you have. You can smothen the counts. Eliminate spurious boxes (those that don't show up for more than 1 or 2 frames). And so on. Well. That's all there is to it. [So how many still find this too complex?] Right, it does not take a Ph D or a big team to put togather something like this. Well, if you did have a lot of Ph. D. working for you, you could definitely do a much, much better job. For one thing, I wouldn't have had to ask you to raise your phone. I could just asked you to raise you hands and done gesture recognition.
XKCD: http://xkcd.com/1425/
That's possible today, but requires more than just an ad hoc approach we used here. We would have needed machine learning. Now keep in mind, it is not necessarily more complex in terms of computation. Just harder to conceptualize, design, configure and make into a working systme. Actually much much much more harder...
And here's the best part about this demo. I'm doing this whole thing inside a browser. That's right! It is 100% javascript code. You know, a few years back, I'd have been embarrased to say I was coding in javascript. And the idea that you could do HD video processing in JS would have sounded hilariously absurd. Yet, here we are. The story of how JS moved from a toy language used to control dropdown menus to one where a significant amount of backend code is being done with it, would fill a talk by itself. In short, it is about a bunch of companies --chiefly google, but also yahoo, Apple - who came togather with the opensource community to supercharge open web technologies. And the thing that really flipped the switch for JS was Google's V8 engine. A superfast "engine" for JS. They made it when they launched their chrome browser. They wanted to make interactive web applications faster. But since that time, V8 has gone everywhere. It been used in the chromimum browser, of course, databases such as mongoDB and couchbase, and most importantly in Nodejs, which is now, in many ways, the fastest growing backend technology for web apps. Anyhow, the point is we've gotten to a stage where we can do credible amounts of processing, even HD video processing, right inside a browser -- on the client side.
Combining cheap sensors, microcontrollers, and connectivity will:
Anyhow, back to the topic at hand. IoT technologies can help us extract data from the real world in contexts and quantities that we do not corrently expect. I mean, think about it: when you say big data today, you're mostly dealing with data that arises inside of computer sustems. You know, click streams, transations. I don't mean to say there are not other sources of data. But with IoT you have this possibility where a great deal of the information you have around you, can be digitized and processed.
By en:User:Cburnett - Own workThis vector image was created with Inkscape., CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=1496858
Now, keep in my we used a CMOS sensor for this demo. A CMOS imaging sensor is developed with a very specific applications in mind. Photography and videography. Still images and video. They are meant to mimic human visual perception. They are meant to plug in as input to the awesome human vision system. Everything about this webcam is designed with the ultimate human consumption of the image in mind. The pixels are designed with specific sensitivities, and placed in a so called Bayer array. The scan speed is tuned to play well ith human persistence of vision and so forth. But human vision is nothing like computer vision.
Source: https://www.rit.edu
We do a lot of processing in our brain, a lot of extrapolation from context that gives us meaning from whatever raw data it is our retina is getting from the outside world. I'm sure you've all seen multiple illusions that help convince of it. This one is my favorite. No matter how hard you look at it you can't tell they are the same size right? So my point is given that computer vision is not the same as human vision, would we be better off using a sensor tuned for making computer vision tasks easier? Instead of relying on a sensor designed to show pretty pictures to human eyes?
http://www.stemmer-imaging.co.uk/en/products/category/3d-laser-scanning-sensor/ https://industrial.omron.us/en/products/vision-sensors-systems http://showcase.designnews.com/content/ivu-plus-touch-screen-vision-sensors http://www.ifm.com/ifmus/web/application-story-vision.htm Yes! The answer is a definte yes!. You have IR sensors, xray sensors, scanning sensors, all manner of stuff. But, these sensor are useless for applicaitons outside of CV -- they are not good for taking a selfie -- so no mass market -- which means they are very,very expensive. Which is why most current research focuses on doing CV using regular CMOS sensors. And you can find many instances of such innvotive uses of existing sensors. Such a regular mic being used t monitor[more examples FIXME]
Source: Wikipedia
One interesting example of a custom made vision sensor getting into the hands of the consumers comes to us from the world of gaming -- Microsoft's kinect. For those of you who don't know, microsoft introduced these as an accessory to their very successful gaming platform - the Xbox 360 -- back in 2010. This is a device that alows you to play games on the teh Xbox 360 just by moving. They used the catch phrase "you are the controller". You just stand in from of it and you avatar is inside the game, doing exactly what you are doing. The kinect used a techniqu called structured lighting. What it does is, it project a grid over the scene. The grid is invisible because it is IR, but the CMOS imaging sensor on teh kinect can see it. So when you stand in from of it it, the grid is distorted by you.
Source: automodellingandvideomapping
And so it becomes easy for an algorithm to look for lines and decide the shape behind the distortion.
 So after the kinect was released, it was only a short time before people figured out how to read the data from it. It helped that it used a regular USB connector. And you can find multiple innvotive projects around it. People have built 3D scanners. Software that can read sign language. All manner of interesting UI concepts and so forth. Then in 2014, MS came out with the XBOX one. And this time they bundled a kinect along with the game controller. This version of the kinect was even better than the last one. It has what is called a time of flight sensor. That is a type of thing that gives you the depth of each point of the image in addition to the picture itself. This very advanced sensor sells for under $100! Most industrial cameras cost 1000s of dollars.
Image Source: U.S. Dept. of Transportation
So it is wise to build on top of consumer tech. Take the case of traffic sensors. of these things is to help guage the amount of traffic, and the speed of its movement thru secotions of the highway. And this is how it looks. [Explain how it works] [Will never be made cheaper or miniaturized] Google Traffic debuted in 2007. [How google traffic works]
e.g., Self-driving cars use CMOS + Lidar + Radar + Ultrasonic + Infrared + ...
So what can we do about the noise -- without increasing the cost of the system. Well we can use input from another sensor. I could have used another camera, matbe placed half way up the aisle for example, Or I can use some othe rdata point to validata this one. For example I have this device here. Or, I can use some other sensor. Ideally, something that has an error rate uncorrelated with the this one error rate. This is sometimes called sensor fusion.
The most famous use of it is in driverless cars -- which combine cmos, lidar, radar and IR. Each of these sensors by themselves have catastrophic error rates. Put them all togather and you have reasonable chance of avoiding disaster scenarios. Well at least that's the hope. It didn't work out so well on that Tesla that met with an accident this July. First reported fatality on a self-driven car. [Tell the story] For the workshop today, I have my own little experimet with Sensor Fusion. [Switch to demo screen] This is a regular wi-fi router. But it is running custom firmware. And it is able to tell me how many phones are there in this room. Well not quite. It gives me a list of unique MAC addresses. [explain]
People use this to track crowds. I even found a company that implemented an attendance system based on this. I mean thik obout the possibilities here. You can implement web-site style analytics for a retail store. You can count the numbe rof people who came in, how much time each one spent there, whether any are repeat customers, ... Again there'll be a fair bit of inaccuracy. Many peopel turn wifi off, some carry two phone and so on. But it wil hard to argue that this data is without value.
Actually, there are a great many possibilities for data collection in the RF spectrum. Everyone knows that there are all sorts of RF transmissions around us, from AM/FM radio to line-of-sight microwave that fill the air. In the past, receiving most of these signals has meant having to design an analog circuit carefully designed to pick out and demodulate the frequency of interest. Now more often than not, we can use radios which have a lot of configurability, and in some cases are fully programmable. The demo I showed you used DD-WRT, the open source firmware for routers. You can also use it to modify your WiFi's power-levels, used it as part of a mesh network, bridge and so forth. The RTL-SDR project used a DVB-T chipset from RealTek -- these were meant to go into set-top boxes and then somehow managed to figure out how to get access oto the intermediate frequency signals. This allows it to be used in a variety of ways -- from sniffing GSM signals to listing for the ISS. The great thing about teh RTL SDR is that you can pick one up for about $15 or so. The next price point, in the world of SDRs, is $500.
I was one of the early buyers of fitbit. Not because I had any intention of wanting to lead a healthy life style. But it was cool technology. This is a perfect example of what I'm talking about here. I think they adapted an accelerometer that was first used in Nintendo's Wii remote, and subsequently in many phones. And then repurposed it to count steps. And since then it, and the device category itself have come a long way. Yet to this date, if you look at amazon reviews of fit bit, or for that matter any other pedometer, accuracy is still a major concern. OK, accuracy here is not about whether it is within 1% or within 10% of the actual number of steps you took. I remember once wearing it on a long drive to Chennai. I was just driving a car right? The fit bit thought I had done something like 5 or 6000 steps in the space of that 6 hour drive. They have since added more sensors that try to detect if you are in a moving vehicle and then correct for it and so on. This is a tough problem and things have gotten better over time. What I find heartwarming is that an entre new product category was launched on the back of some poor data from sensors designed for use in a completely different context, and it has helped millions of people around the world. And I hope you'll agree with me that this neededn't be the last such device. There are many possibilities around us. Thanks you.
Time to summarize. It's wiser to seek patterns in approximate data than to seek perfect data. Smarter to build applciations on top of the data you have rather than design it around teh data that you really want. The urge to seek perfect data is actually quite dangerous. I mean, think about what would happen if we were to go about the traffic monitoring the same way that the US did. Th eevel of investment and the waste of resources... And just seeking a cheaper sensor is not an answer. Even if you make it 10X cheaper, you'd be paying $100s per intersection instead of $1000s. That's all. Still very expensive. And won't buy you much. This lesson is important in the context of everything we are trying to do today for smart cities and so forth. I'm far more excited about out-of-spec uses of sensors, and tapping data from unconventional sources. And I hope yu are too. We looked at several examples. And there are several more out there. Dirty data does not represent a trade off. It is what there is, and what we need to build our analysis around. I'm not offering a solution or even a broad class of solution. My purpose today was to help motivate some lateral thinking on data accuracy vs data availability. If you think about it, in the big data context, availability is preferable to accuracy almost every time. Almost every time.
Follow-ups<EMAIL_ADDRESS>Use a spacebar or arrow keys to navigate


Quickly make background color transparent.
This app grab color of top left corner pixel as reference & turn opacity of every pixel that has same color to 0. (note: this is not perfect ! I'm using this tool to prep base image for my code annotation.)
Made by @kosamari. Code on github.


{% extends "lfs_lab_cert_tracker/base.html" %} {% load static %} {% block content %}
The LFS Training Record Management System (TRMS) aims to collect and keep track of the training records required for all students, staffs and faculties that are working in LFS. This system will ensure that people working in specific space or area in LFS receive the appropriate training catered to the work environment.


lomb: Lomb-Scargle Periodogram
Computes the Lomb-Scargle Periodogram for unevenly sampled time series. Includes a randomization procedure to obtain reliable p-values.
| Version: |
1.1 |
| Published: |
2018-12-07 |
| Author: |
Thomas Ruf, partially based on C original by Press et al. (Numerical Recipes) |
| Maintainer: |
Thomas Ruf <Thomas.Ruf at vetmeduni.ac.at> |
| License: |
GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| NeedsCompilation: |
no |
| Citation: |
lomb citation info |
| In views: |
TimeSeries |
| CRAN checks: |
lomb results |
Downloads:
Reverse dependencies:
Linking:
Please use the canonical form
https://CRAN.R-project.org/package=lomb
to link to this page.


Numbers 22:40
And Balak offered oxen and sheep, and sent to Balaam, and to the princes that were with him.


Module: Playbooks¶
The ThreatConnect TcEx App Framework provides common helper methods to write a Playbooks App. The Playbooks
module provides all required methods to communicate with upstream and downstream Apps.
Understanding Playbooks¶
A Playbook App is a single component of a Playbook. These Apps are intended to be reusable, standalone components with minimum functionality to solve a single purpose. Multiple Playbook Apps will make up a Playbook that solves a use case. For more information on Playbook methodology and functionality, refer to the Playbooks documentation at: https://docs.threatconnect.com/en/latest/rest_api/playbooks/playbooks.html.
Playbook Flow¶
As a Playbook starts execution, each App will have input and output variables. The input variables can be user-provided data or output from an upstream App. The App’s input and output variables are defined in the App-Deployment Configuration file of the App. A downstream App has access to all output variables from any upstream Apps.
Note
An upstream App is an App that has completed execution prior to the current App’s execution.
Input Variables¶
Inputs to an App can be static user data or dynamic output variables from a trigger or upstream App. The Playbooks
module provides the read
method for pulling dynamic data from an upstream App. The read
method will automatically determine the variable type for the App developer. If user data was passed instead of the output variable, the read
will return the unaltered string.
Tip
The read
method will also handle mixed-type data by automatically calling the read_embedded
method when a mixed-type variable is identified.
Output Variables¶
Playbook Apps write output variables for downstream Apps. The Playbooks
module provides the create
method for writing output variables. However, output variables should only be written when requested by a downstream App. The requested variables are passed in the args.tc_playbook_out_variables
argument as a CSV string. The Playbooks
module provides the create_output
method that will validate that a downstream App requested the output variable before writing.
Hint
In most cases, the create_output
method is the best way to write output variables.
Variable Types¶
When output variables are passed to the input of an App, the variable type is defined. In some cases it is useful to know the type of variable passed. The Playbooks
module provides the variable_type
method that will return the variable type.
Binary
BinaryArray
KeyValue
KeyValueArray
String
StringArray
TCEntity
TCEntityArray
Note
For more information on Playbook variable types or updated types, see the Playbooks documentation.


Evolutionary game theory - solutions¶
Assume the frequency dependent selection model for a population with two types of individuals: $x=(x_1, x_2)$ such that $x_1 + x_2 = 1$. Obtain all the stable distribution for the sytem defined by the following fitness functions:
For all of the functions in question, $x=(0, 1)$ and $x=(1, 0)$ are equilibria. There is a 3rd potential equilibria given by $f_1(x) = f_2(x)$. This is bookwork: https://vknight.org/gt/chapters/11/#Frequency-dependent-selection
$f_1(x)=x_1 - x_2\qquad f_2(x)=x_2 - 2 x_1$
$f_1(x)=f_2(x)\Rightarrow x_1 - x_2 = x_2 - 2x_1 \Rightarrow 3x_1 = 2x_2$ which gives (using the fact that $x_1 + x_2=1$ single solution: $(x_1, x_2)=(2/5, 3/5)$
import sympy as sym
x_1 = sym.symbols("x_1")
sym.solveset(3 * x_1 - 2 * (1 - x_1), x_1)
B
. $f_1(x)=x_1x_2 - x_2\qquad f_2(x)=x_2 - x_1 + 1/2$
$f_1(x)=f_2(x)\Rightarrow x_1x_2 - x_2 = x_2 - x_1 + 1/2$ setting $x=x_1$ so that $1 - x = x_2$ gives: $x - x ^ 2 - 1 + x = 1 - x - x + 1/2$ which corresponds to:
$$-x ^ 2 + 4 x - 5/2=0$$This has solution $x=2 \pm \sqrt{6}/2$, thus $(x_1, x_2) = (2 + \sqrt{6}/2, -1 + \sqrt{6}/2)$ is the only set of solutions for which $1 \geq x_1 \geq 0$ and $1\geq x_2 \geq 0$.
x = sym.symbols("x", positive=True)
res = sym.solveset(- x ** 2 + 4 * x - sym.S(5) / 2, x)
res
for sol in list(res):
print(sol, float(sol), float(1 - sol))
C
. $f_1(x)=x_1 ^ 2 \qquad f_2(x)=x_2^2$
$f_1(x)=f_2(x)\Rightarrow x_1 = \pm x_2$ which has a single solution $(x_1, x_2)=(1/2, 1/2)$.
2
. For the following games, obtain all the stable distributions for the evolutionary game:
For bother of these we aim to find $x$ such that $(1, 0)Ax^T=(0, 1)Ax^T$.
$A = \begin{pmatrix}2 & 4 \\ 5 & 3\end{pmatrix}$
$(1, 0)Ax^T=(0, 1)Ax^T\Rightarrow 2x+4(1-x)=5x+3(1-x)\Rightarrow x=1/4$
$A = \begin{pmatrix}1 & 0 \\ 0 & 1\end{pmatrix}$
$(1, 0)Ax^T=(0, 1)Ax^T\Rightarrow x=1-x\Rightarrow x=1/2$
3
. Define:
mutated population.
Bookwork: https://vknight.org/gt/chapters/11/#Mutated-population
Evolutionary stable strategies
Bookwork: https://vknight.org/gt/chapters/11/#Evolutionary-Stable-Strategies
4
. State and prove the general condition for ESS theorem.
Bookwork: https://vknight.org/gt/chapters/11/#General-condition-for-ESS
5
. Using the general condition for ESS theorem identify what strategies are evolutionarily stable for the games of question 2.
For both these games we start by identifying the Nash equilibria:
$(A, A^T) = (\begin{pmatrix}2 & \underline{4} \\ \underline{5} & 3\end{pmatrix}, \begin{pmatrix}2 & \underline{5} \\ \underline{4} & 3\end{pmatrix})$
The pure NE are given by $\{((1, 0), (0, 1)), ((0, 1), (1, 0))\}$, these are not symmetric so do not correspond to ESS. The mixed nash equilibrium corresonds to the stationary point calculated previously: $x=1/4$.
For a general $y$, we have $u(x, x)=u(y,x)$ (by the defnining calculation of $x$). Thus, we look at the second condition:
$$u(x, y)=1/4(2y+4(1-y)) + 3/4(5y+3(1-y))=1/4(4-2y) + 1/4(6y+9)=1/4(4y+13)$$
$$u(y, y)=y(2y+4(1-y)) + (1-y)(5y+3(1-y))=y(4-2y) + (1-y)(2y+3)=-4y^2+3y+3$$
thus:
$$u(x, y) - u(y, y) = 4y^2 - 2y + 1/4=\frac{(4y-1)^2}{4}$$
which is $>0$ for $y\ne 1/4$, thus $x=(1/4, 3/4)$ is an ESS.
$(A, A^T) = (\begin{pmatrix}\underline{1} & 0 \\ 0 & \underline{1}\end{pmatrix}, \begin{pmatrix}\underline{1} & 0 \\ 0 & \underline{1}\end{pmatrix})$
The pure NE are given by $\{((1, 0), (1, 0)), ((0, 1), (0, 1))\}$, these are symmetric, for both we have $u(x, x)=1$ which will be $>u(y, x)$ for all $y\ne x$ as $x$ is a best response to itself. Thus, these are both ESS.
We now consider $x=1/2$. For a general $y$, we have $u(x, x)=u(y,x)$ (by the defnining calculation of $x$). Thus, we look at the second condition:
$$u(x, y)=1/2(y + 1 - y)=1/2$$
$$u(y, y)=y^2 + (1-y)^2=2y^2-2y+1$$
thus:
$$u(x, y) - u(y, y) = -2y^2 + 2 y - 1/2=-\frac{(2y-1)^2}{2}$$
which is $<0$ for $y\ne 1/2$, thus $x=(1/2, 1/2)$ is not an ESS.


-
Empowering Women
empoweringwomenandgirls.tumblr.com
Theo Sowa "If we want to change the world, we must bring African women to the table, listen to their voices, and include them - not marginalize ...
-
CGI 2014 Annual Meeting by Clinton Global Initiative
new.livestream.com
Watch Clinton Global Initiative's CGI 2014 Annual Meeting on Livestream.com. Hosted by President Bill Clinton, Secretary Clinton, and Chelsea ...
-
Empowering Women
empoweringwomenandgirls.tumblr.com
Celebrating the people empowering women and girls around the world who inspire me, Melinda Gates. Who inspires you?
-
Saving lives in childbirth: do we have a game changer?
www.impatientoptimists.org
A multi-year research program is underway in 120 public hospitals across Uttar Pradesh. The BetterBirth trial aims to rigorously test whether ...
-
Walter Isaacson on the women of ENIAC
fortune.com
The revolutionary computing machine had switches that needed resetting, a seemingly menial job. Today we call it programming.
-
It's All About The Girls: Is The World Listening To Them?
www.npr.org
More than 500 girls living in poverty have lent their voices to Girl Declaration, a campaign urging world leaders to include the needs of girls in ...
-
USAID is incubating start-ups to tackle poverty problems
www.latimes.com
With his nifty PowerPoint slides and carefully crafted pitch, Yashraj Khaitan might be mistaken for any other fast-talking, code-savvy Bay Area ...
-
7 Famous Quotes You Definitely Didn't Know Were From Women
www.forbes.com
“Genius is one percent inspiration and 99 percent perspiration,” said Thomas Edison. The quote immaculately and succinctly captures the ingredients ...
-
The true true size of Africa
www.economist.com
LAST month Kai Krause, a computer-graphics guru, caused a stir with a map entitled "The True Size of Africa", which showed the outlines of other ...
-
Watch: The NDTV Dialogues with Melinda Gates - The Art Of Giving
www.ndtv.com
This week on The NDTV Dialogues, the co-chair of the 'Bill & Melinda Gates Foundation', Melinda Gates, shares her big ideas and talks about the ...
-
Where the Gates Foundations' $50 million to fight Ebola is going | Al ...
america.aljazeera.com
Dr. Sue Desmond-Hellmann, chief executive of the Bill and Melinda Gates Foundation discusses what the real fight is
-
New supplemental awards apply sex and gender lens to NIH-funded research
nih.gov
Investment sets the stage for a transformative shift in science.
-
Empowering Women
empoweringwomenandgirls.tumblr.com
Julie Gerberding, MD, MPH I’ve come across many physicians who dedicate their lives to others, but I want to call out one person I respect very much. ...
-
Trends in donor spending on gender in development - Development Initiatives
devinit.org
Trends in donor spending on gender in development. At the forthcoming 2014 UN General Assembly (UNGA), governments, donors and civil society will be ...
-
Empowering Women
empoweringwomenandgirls.tumblr.com
Nick Kristof and Sheryl WuDunn In their book “Half the Sky,” Nick and Sheryl take readers on a journey through Asia and Africa and introduce them to ...
-
Emma Watson HeForShe Speech at the United Nations | UN Women 2014
www.youtube.com
UN Women Global Goodwill Ambassador, Emma Watson, delivers her moving remarks during the HeForShe Special Event at United Nations Headquarters in New ...
-
Empowering Women
empoweringwomenandgirls.tumblr.com
Sharmila Devi I met Sharmila and her baby daughter Babita on a trip to northern India in 2013. Like all mothers, Sharmila wanted to provide the best ...
-
When women take the lead
www.trust.org
Social enterprise is becoming a natural home for the female entrepreneur
-
19 ways to beat malaria
www.theguardian.com
Prevention, treatment, research and diagnosis - our panel say we need to invest in them all to eradicate the disease
-
What does your country really think about breastfeeding?
www.dailymail.co.uk
A new survey of 13,262 mothers and pregnant women aged 18 to 40 looked at how perceptions of nursing are different from country to country.
-
10 Emerging Women Entrepreneurs To Watch In Africa
www.forbes.com
Meet 10 young emerging women entrepreneurs in Africa
-
Social Good Summit 2014 - Social Good Summit
mashable.com
The Social Good Summit is a two-day conference examining the impact of technology and new media on social good initiatives around the world. Held ...
-
Kudumbashree: Kerala's all-women Rs 2,262 crore savings group finances ...
articles.economictimes.indiatimes.com
In 2007, Bindu Pallichal, a homemaker from the Pravachambalam village near Thiruvananthapuram, decided to turn entrepreneur. She began to experiment ...
-
Tanzania: Vodacom Offers Free Messaging Services to Mothers
allafrica.com
MS Asha Othmani 32, does not have to worry about her ante-natal visits or when to take her malaria medication if need be. For, she and many other ...
-
Spirulina: a luxury health food and a panacea for malnutrition
www.theguardian.com
In the West spirulina is a niche healthfood product, but it can be used to fight malnutrition and empower the farmers in developing countries
-
Ending Extreme Poverty Photo Contest
www.flickr.com
Various USAID Missions, project implementing partners and USG agencies submitted photos for the first Frontiers in Development "Ending Extreme ...
-
For Girls, Sports Are More Than 'Just A Game'
www.huffingtonpost.com
Among the most effective tools in the girls' leadership tool box, believe it or not, is a ball. Put a girl who has never played soccer or volleyball ...
-
India's Sanitation Crisis Is Trapping Women In A Cycle Of Violence
www.forbes.com
Today in India, it is easier to get a mobile phone than find a toilet. How can a country that has more Internet users than the U.S., still not ...


Toggle navigation
Carry 6 Packer Fantasy League
Account
Reset Password
Log In
Log Out
Dashboard
Leaderboard
My Points
Predict
Fixtures
Results
Rules
Republics
Hoek
Tjom
Saag
Dublin
Wankers
Yard
Palace
Oord
Bach
Country Members
Oude Molen
Dashboard
Kwottie Overview
Dashboard
Make sure you have cookies enabled if your name doesn't display above after a few seconds.
QOTD
0
Kwottie Results Today
Results
View your points
Fixtures
Match
Date
Time
Teams
View all fixtures


Toggle navigation
Brainblaze Analytics
Facebook
Twitter
Github
Words replaced per day (past week)
Parts of speech replaced
Word Conversions by recency
Before
After
Renounce
Abnegate
Guilty
Peccant
Common
Plebeian
Resilience
Mettle
Mischievous
Maleficent
Beggar
Mendicant
Rich
Opulent
Promise
Covenant
Translucent
Pellucid
Sleepy
Somnolent
Deceit
Subterfuge
Definitions checked per day
Notes go down here
Built with ♥ by
Keen IO


Full Name: Lucy Chang Birthday: 12/31 Three interesting things: Been to 15 national parks. Never had diet coke. More than 3 years in Intuit


video.c File Reference
Include dependency graph for video.c:
Functions | |
| AR_VIDEO_MODULE | arVideoGetDefaultModule (void) |
| int | arVideoOpen (const char *config) |
| int | arVideoOpenAsync (const char *config, void(*callback)(void *), void *userdata) |
| int | arVideoClose (void) |
| int | arVideoDispOption (void) |
| AR_VIDEO_MODULE | arVideoGetModule (void) |
| int | arVideoGetId (ARUint32 *id0, ARUint32 *id1) |
| int | arVideoGetSize (int *x, int *y) |
| int | arVideoGetPixelSize (void) |
| AR_PIXEL_FORMAT | arVideoGetPixelFormat (void) |
| AR2VideoBufferT * | arVideoGetImage (void) |
| Get a frame image from the video module. More... | |
| int | arVideoCapStart (void) |
| Start video capture. Each call to arVideoCapStart must be balanced with a call to arVideoCapStop. More... | |
| int | arVideoCapStartAsync (AR_VIDEO_FRAME_READY_CALLBACK callback, void *userdata) |
| Start video capture with asynchronous notification of new frame arrival. More... | |
| int | arVideoCapStop (void) |
| Stop video capture. Each call to arVideoCapStop must match a call to arVideoCapStart. More... | |
| int | arVideoGetParami (int paramName, int *value) |
| Get value of an integer parameter from active video module. More... | |
| int | arVideoSetParami (int paramName, int value) |
| Set value of an integer parameter in active video module. More... | |
| int | arVideoGetParamd (int paramName, double *value) |
| Get value of a double-precision floating-point parameter from active video module. More... | |
| int | arVideoSetParamd (int paramName, double value) |
| Set value of a double-precision floating-point parameter in active video module. More... | |
| int | arVideoGetParams (int paramName, char **value) |
| Get value of a string parameter from active video module. More... | |
| int | arVideoSetParams (int paramName, const char *value) |
| Get value of a string parameter in active video module. More... | |
| int | arVideoSaveParam (char *filename) |
| int | arVideoLoadParam (char *filename) |
| int | arVideoSetBufferSize (const int width, const int height) |
| int | arVideoGetBufferSize (int *width, int *height) |
| int | arVideoGetCParam (ARParam *cparam) |
| int | arVideoGetCParamAsync (void(*callback)(const ARParam *, void *), void *userdata) |
| int | arVideoUtilGetPixelSize (const AR_PIXEL_FORMAT arPixelFormat) |
| const char * | arVideoUtilGetPixelFormatName (const AR_PIXEL_FORMAT arPixelFormat) |
Function Documentation
| int arVideoCapStart | ( | void | ) |
Start video capture. Each call to arVideoCapStart must be balanced with a call to arVideoCapStop.
- See also
- arVideoCapStop
Here is the call graph for this function:
| int arVideoCapStartAsync | ( | AR_VIDEO_FRAME_READY_CALLBACK | callback, |
| void * | userdata | ||
| ) |
Start video capture with asynchronous notification of new frame arrival.
- Parameters
-
callback A function to call when a new frame arrives. This function may be called anytime until the function arVideoCapStop has been called successfully. The callback may occur on a different thread to the calling thread and it is up to the user to synchronise the callback with any procedures that must run on the main thread, a rendering thread, or other arbitrary thread. userdata Optional user data pointer which will be passed to the callback as a parameter. May be NULL.
Here is the call graph for this function:
| int arVideoCapStop | ( | void | ) |
Stop video capture. Each call to arVideoCapStop must match a call to arVideoCapStart.
- See also
- arVideoCapStart
Here is the call graph for this function:
| int arVideoClose | ( | void | ) |
Here is the call graph for this function:
| int arVideoDispOption | ( | void | ) |
Here is the call graph for this function:
Here is the call graph for this function:
| AR_VIDEO_MODULE arVideoGetDefaultModule | ( | void | ) |
| AR2VideoBufferT* arVideoGetImage | ( | void | ) |
Get a frame image from the video module.
- Returns
- NULL if no image was available, or a pointer to an AR2VideoBufferT holding the image. The returned pointer remains valid until either the next call to arVideoGetImage, or a call to arVideoCapStop.
Here is the call graph for this function:
| AR_VIDEO_MODULE arVideoGetModule | ( | void | ) |
Here is the call graph for this function:
Get value of a double-precision floating-point parameter from active video module.
- Parameters
-
paramName Name of parameter to get, as defined in <AR6/ARVideo/video.h> value Pointer to double, which will be filled with the value of the parameter.
- Returns
- -1 in case of error, 0 in case of no error.
Here is the call graph for this function:
Get value of an integer parameter from active video module.
- Parameters
-
paramName Name of parameter to get, as defined in <AR6/ARVideo/video.h> value Pointer to integer, which will be filled with the value of the parameter.
- Returns
- -1 in case of error, 0 in case of no error.
Here is the call graph for this function:
Get value of a string parameter from active video module.
- Parameters
-
paramName Name of parameter to get, as defined in <AR6/ARVideo/video.h> value Pointer to pointer, which will be filled with a pointer to a C-string (nul-terminated, UTF-8) containing the value of the parameter. The string returned is allocated internally, and it is the responsibility of the caller to call free() on the returned value.
- Returns
- -1 in case of error, 0 in case of no error.
Here is the call graph for this function:
| AR_PIXEL_FORMAT arVideoGetPixelFormat | ( | void | ) |
Here is the call graph for this function:
| int arVideoGetPixelSize | ( | void | ) |
Here is the call graph for this function:
| int arVideoLoadParam | ( | char * | filename | ) |
Here is the call graph for this function:
| int arVideoOpen | ( | const char * | config | ) |
Here is the call graph for this function:
| int arVideoOpenAsync | ( | const char * | config, |
| void(*)(void *) | callback, | ||
| void * | userdata | ||
| ) |
Here is the call graph for this function:
| int arVideoSaveParam | ( | char * | filename | ) |
Here is the call graph for this function:
Here is the call graph for this function:
Set value of a double-precision floating-point parameter in active video module.
- Parameters
-
paramName Name of parameter to set, as defined in <AR6/ARVideo/video.h> value Double value to set the parameter to.
- Returns
- -1 in case of error, 0 in case of no error.
Here is the call graph for this function:
Set value of an integer parameter in active video module.
- Parameters
-
paramName Name of parameter to set, as defined in <AR6/ARVideo/video.h> value Integer value to set the parameter to.
- Returns
- -1 in case of error, 0 in case of no error.
Here is the call graph for this function:
Get value of a string parameter in active video module.
- Parameters
-
paramName Name of parameter to set, as defined in <AR6/ARVideo/video.h> value Pointer to C-string (nul-terminated, UTF-8) containing the value to set the parameter to.
- Returns
- -1 in case of error, 0 in case of no error.
Here is the call graph for this function:
| const char* arVideoUtilGetPixelFormatName | ( | const AR_PIXEL_FORMAT | arPixelFormat | ) |
| int arVideoUtilGetPixelSize | ( | const AR_PIXEL_FORMAT | arPixelFormat | ) |


[[extend "layout.html"]] [[ # notice [[... are yatl tags and they contain pure python code, rendered server side # while {{... are vue tags and they contain vue/js code, rendered client side ]] You have been here [[= session.get('counter') ]] times There are {{ items.length }} todo items Add {{item.info}} Done!


|
AutoYams
Automatic Yams with OpenCV dice detection
|
Advanced configuration page. More...
#include <ConfigPage.h>
Public Member Functions | |
| ConfigPage (AutoYams *app, VideoCaptureWindow *ref) | |
| Default constructor. More... | |
| virtual void | handle () override |
| Method called when page is selected in pagination. More... | |
| virtual bool | pressOkButton () override |
| Method called when 'OK' button is pressed. More... | |
| virtual void | selectDevice (int index) override |
| Method called when a new device is selected. More... | |
| virtual void | selectConfig (int index) override |
| Method called when a new config is selected. More... | |
| virtual void | changeBrightness (int value) override |
| Method called when brightness is changed. More... | |
| virtual void | changeContrast (int value) override |
| Method called when contrast is changed. More... | |
| virtual void | changeFramerate (int value) override |
| Method called when framerate is changed. More... | |
| virtual void | changeZoom (double value) override |
| Method called when zoom/scale is changed. More... | |
| Public Member Functions inherited from AdvancedPage | |
| AdvancedPage (int id, AutoYams *app, VideoCaptureWindow *ref) | |
| Default constructor. More... | |
| Public Member Functions inherited from Page | |
| Page (int id, AutoYams *ref=0) | |
| Default constructor. More... | |
Private Slots | |
| void | updateConfigCB () |
| Update list of all existing configs. More... | |
| void | addConfig () |
| Add and declare a new config in manager. More... | |
| void | setConfig () |
| Attach specific config to current Device. More... | |
| void | setDefaultDevice () |
| Change default device to current device. More... | |
| void | setDefaultConfig () |
| Change default config of the current device. More... | |
Additional Inherited Members | |
| Protected Attributes inherited from AdvancedPage | |
| VideoCaptureWindow * | wnd |
| Protected Attributes inherited from Page | |
| AutoYams * | app |
| int | ID |
Advanced configuration page.
Page used in Video Window to handle any configuration related action.
| ConfigPage::ConfigPage | ( | AutoYams * | app, |
| VideoCaptureWindow * | ref | ||
| ) |
Default constructor.
| app | Reference of the current application window |
| ref | Reference of the current Video Window of Application |
Specifiy required data to build reference for the page connection to UI & window event elements (slots & signals).
|
privateslot |
Add and declare a new config in manager.
Search for the current file name displayed in the page Edit, create a new file of this name if nothing is found, then declare it in manager and attach it with its name as surename on the current device.
|
inlineoverridevirtual |
Method called when brightness is changed.
| value | Value of the new brightness from original Slider |
Called in Video Window when brightness is modified through center-right Brightness Slider in Config Page.
Implements AdvancedPage.
|
inlineoverridevirtual |
Method called when contrast is changed.
| value | Value of the new contrast from original Slider |
Called in Video Window when contrast is modified through center-right Contrast Slider in Config Page.
Implements AdvancedPage.
|
inlineoverridevirtual |
Method called when framerate is changed.
| value | Value of the new framerate from original Slider |
Called in Video Window when framerate is modified through center-right Framerate Slider in Config Page.
Implements AdvancedPage.
|
inlineoverridevirtual |
Method called when zoom/scale is changed.
| value | Value of the new zoom/scale from original Slider |
Called in Video Window when zoom/scale is modified through center-right Zoom/scale Slider in Config Page.
Implements AdvancedPage.
|
overridevirtual |
|
overridevirtual |
Method called when 'OK' button is pressed.
Called in Video Window when the 'OK' button is pressed in Config Page.
Implements AdvancedPage.
|
inlineoverridevirtual |
Method called when a new config is selected.
| index | Index of newly selected config in original Combobox |
Called in Video Window when a new config is selected in the center-right Config Combobox on Config Page.
Implements AdvancedPage.
|
inlineoverridevirtual |
Method called when a new device is selected.
| index | Index of newly selected device in original Combobox |
Called in Video Window when a new device is selected in the center-right Device Combobox on Config Page.
Implements AdvancedPage.
|
privateslot |
Attach specific config to current Device.
Take the Edit text as surename, verify if the current device already got a configuration under the same surename, if not, attach the configuration in page Combobox to the device even if it DOES already exist under another surename.
|
privateslot |
Change default config of the current device.
Change and store current configuration of the current device in root object of the manager so, every time current device is selected, its default configuration will start with him.
|
privateslot |
Change default device to current device.
Change and store current device in root object of the manager so, every time the application is started, the default device will be started and ready to use.
|
privateslot |
Update list of all existing configs.
Search in manager the list of all declared configurations and display them in a Combobox.


Recent schedule and plans
To-do list:
learn html & css to improve my homepage.
write the sis paper as soon as possible.