class: center, middle, inverse, title-slide # Aggregation and JOINs ## Computational Statistics
& Operations Research ###
Janus Valberg-Madsen
### 2019-03-25 @ Aalborg University --- # Recap of last time - Introduction to relational databases - Basic syntax - How to use psql and pgAdmin --- # Today's topics - Summarising data - Using data from multiple tables with `JOIN` - How to construct and use _subqueries_ ??? Today we will dive into SQL queries involving data from multiple sources and how to get just the information you need from the database. - We'll look at how to produce different kinds of summaries, both on whole tables and on a by-group basis - More complex queries involving selecting from tables multiple times - Joining tables together to match related tuples from different sources - Dealing with missing values --- layout: false class: snowstorm, middle, center # Summarising data computing a single result from a set of input values ??? To summarise data means to calculate aggregate results from many rows into few or a single row. --- ## What is a summary? ```sql SELECT summary_function(expr) [AS new_name] [, ... ] FROM table [ GROUP BY grouping_variables ] ``` .pull-left[ A _summary function_ aggregates a set of values into one single value (summary) ![:center 95%](input/figs/summary-function.png) ] .pull-right[ Use the `GROUP BY` clause to create summaries on a by-group basis ![:center 95%](input/figs/grouped-summary.png) ] .footnote[ (image source: [Data Wrangling cheat sheet by RStudio](https://www.rstudio.com/wp-content/uploads/2015/02/data-wrangling-cheatsheet.pdf)) ] ??? More often than not, you don't want to pull out data as-is from your database, but rather calculate some summaries exposing some insight. The basic syntax for that is as shown: in the column list of `SELECT`, you make calls to so-called _summary functions_, optionally grouping the input values by one or more variables. --- ## Summary functions .pull-left[ - `count(*)`: the number of input rows - `count(expr)`: the number of rows where `expr` is not null - `avg(expr)`: the average of the input values - `sum(expr)`: the sum of the input values - `max(expr)`: the maximum input value - `min(expr)`: the minimum input value ] .pull-right[ - `bool_and(expr)`: true if all input values are true - `bool_or(expr)`: true if at least one input value is true - `corr(Y, X)`: correlation coefficient between X and Y - `stddev(expr)`: standard deviation of input values - `variance(expr)`: variance of input values ] .footnote[ Many more are available, see the [documentation](https://www.postgresql.org/docs/current/functions-aggregate.html) ] ??? Here is a quick overview of some of the summary functions that you'll likely need to use. Many more are available. --- ## Filtering on summaries: the HAVING clause - `WHERE`: filter using a condition on individual rows, before grouping - `HAVING`: filter using a condition on aggregations, after grouping ??? When you work with grouped data, you may wish to filter on either individual rows or groups. The `WHERE` clause, which you saw last time, does the former, and the `HAVING` clause does the latter. -- ```sql SELECT carrier, count(*) FROM flights WHERE origin = 'JFK' GROUP BY carrier HAVING min(distance) > 1000; ``` The carriers whose flights from JFK airport all fly at least 1000 miles to reach their destinations, and their respective number of flights ??? Here is a small example of the usage of `HAVING`. -- Syntax rule of thumb: - `WHERE` goes _before_ `GROUP BY` (filter before grouping) - `HAVING` goes _after_ `GROUP BY` (filter after grouping) --- layout: false class: snowstorm, middle, center # Combining data from different tables how to use the JOIN clause --- ## What is a join? .pull-left[ `JOIN`: clause for combining relations. .footnote[.pull-left[ In the examples in this section of the slides (which I've borrowed from [r4ds.had.co.nz](https://r4ds.had.co.nz)), the tables used are: - `x`, with columns: `key` and `val_x` - `y`, with columns: `key` and `val_y` ]] ] .pull-right[ ```sql x JOIN_TYPE y [ JOIN_CONDITION ] ``` ![:center 40%](https://raw.githubusercontent.com/hadley/r4ds/master/diagrams/join-setup.png) .center[⬇] ![:center 50%](https://raw.githubusercontent.com/hadley/r4ds/master/diagrams/join-setup2.png) ] ??? An SQL `JOIN` clause is an instruction to combine columns from several tables in a database. The code snippet should be read as: "Join `x` and `y` together with `JOIN_TYPE` optionally conditioning on `JOIN_CONDITION`" On the following slides, we'll look at the concrete `JOIN_TYPE` and `JOIN_CONDITION` you can use. The figures for the different types of joins will use dots and lines to denote the data that will be returned. --- ## Cross join `x CROSS JOIN y` ➡ cartesian product of the rows in `x` and `y` ```sql SELECT * FROM x CROSS JOIN y; SELECT * FROM x, y; ``` If - `x` has dimensions `\(n_x \times m_x\)`, and - `y` has dimensions `\(n_y \times m_y\)`, then their cross product has dimensions `\(n_x n_y \times (m_x + m_y)\)` ??? The official PostgreSQL documentation groups the types of joins into two: - cross join - qualified join The `CROSS JOIN` between `x` and `y` is simply the table you get by taking all columns of both and return all possible combinations of rows --- ## Qualified joins ```sql SELECT * FROM x { [INNER] | { LEFT | RIGHT | FULL } [OUTER] } JOIN y ON boolean_expression; SELECT * FROM x { [INNER] | { LEFT | RIGHT | FULL } [OUTER] } JOIN y USING ( join column list ); SELECT * FROM x NATURAL { [INNER] | { LEFT | RIGHT | FULL } [OUTER] } JOIN y; ``` ??? In contrast to the cross join, the _qualified joins_ only return rows from the two tables which are considering to be "matching", given some condition that evaluates to a boolean value. The code snippet shown is from the documentation, and it should be read like this: - For elements in braces `{ ... | ... }`, exactly one of the candidates (delimited by a `|`) must be present - Elements in brackets `[ ... ]` are optional - Each row in the snippet corresponds to a different way of specifying the join condition --- ## Qualified joins: INNER JOIN ```sql SELECT * FROM x JOIN y ON x.key = y.key; SELECT * FROM x INNER JOIN y USING (key); SELECT * FROM x NATURAL JOIN y; ``` .pull-left[ ![:center 90%](https://raw.githubusercontent.com/hadley/r4ds/master/diagrams/join-inner.png) ] .pull-right[ ![:center 90%](https://raw.githubusercontent.com/hadley/r4ds/master/diagrams/join-one-to-many.png) ] ??? An `INNER JOIN` is the join that selects records found in both `x` and `y`. That means, that for each row of `x`, the joined table has a row for each row in `y` that satisfies the join condition with that `x`-row. For example: - on the left, both `x` and `y` has keys `1` and `2`, so the resulting inner join contains a row for each of these two keys with all the remaining columns from the respective tables - on the right, `x` has duplicate keys, so the matching rows from `y` are duplicated (if both tables have multiple keys, you get the cross product of the matching rows) **[covering the example snippets]** - `INNER JOIN` is the default join type that PostgreSQL uses, if you just type `JOIN`; the keyword `ON` lets you match columns with qualified names (i.e. `table.colum`) - the keyword `USING` can be used when the columns being matched have the same name in the two tables - The `NATURAL` keyword is shorthand for `USING` all the common column names; if there are no common column names, it produces a cross join --- ## Qualified joins: OUTER JOIN .left-balanced[ ![:center 100%](https://raw.githubusercontent.com/hadley/r4ds/master/diagrams/join-outer.png) ] .right-balanced[ ```sql -- left outer joins SELECT * FROM x LEFT JOIN y ON x.key = y.key; SELECT * FROM x LEFT OUTER JOIN y USING (key); SELECT * FROM x NATURAL LEFT JOIN y; ```
 ```sql -- right outer joins SELECT * FROM x RIGHT JOIN y ON x.key = y.key; SELECT * FROM x RIGHT OUTER JOIN y USING (key); SELECT * FROM x NATURAL RIGHT JOIN y; ```
 ```sql -- full outer joins SELECT * FROM x FULL JOIN y ON x.key = y.key; SELECT * FROM x FULL OUTER JOIN y USING (key); SELECT * FROM x NATURAL FULL JOIN y; ``` ] ??? An `OUTER JOIN` takes all the rows for one or both of the source tables, depending on type, and adds missing values where the join condition was not met. The `OUTER` keyword is completely optional, as it is already implied by the keywords `LEFT`, `RIGHT`, and `FULL`. - `LEFT JOIN`: all the rows of `x`, with the columns of `y` padded with `NULL` for non-matching keys - `RIGHT JOIN`: same as left join, expect with the roles of `x` and `y` reversed - `FULL JOIN`: all rows of both tables, with the columns of both padded with `NULL` whenever they have non-matching keys, respectively --- ## Qualified joins: alternative visual representation ![:center 75%](https://www.cmascenter.org/cost/images/join_types.png) .footnote[(image source: [cmascenter.org](https://www.cmascenter.org/cost/sql_basics.html))] ??? Oftentimes in literature, you see the different types of joins represented as Venn diagrams, alluding to mathematical sets. Think of these sets as sets of keys; different tables often have different colums, so the set interpretation doesn't make a lot of sense when considering whole rows --- layout: true ## Useful joins without dedicated syntax ??? The semi join and the anti join do not have their own syntax in PostgreSQL. Instead, the query planner may or may not use these joins for optimisation purposes (we will see an example of that in Lecture 04). However, in R (`dplyr`), they _do_ have syntax, which we shall see in Lecture 03. In _R for Data Science_, Hadley Wickham calls these types of joins _filtering joins_. ## Semi join The semi join selects all rows from `x` that have a matching key in `y`, but without adding any data from `y`. This can be achieved in PostgreSQL using a nested query, in which you simply identify the rows in `y` that have matching keys. Notice the `SELECT 1 FROM y` line; the actual data selected from `y` doesn't matter, as it isn't used anyway, so you can select anything you want here (including `*`). ## Anti join The anti join is the opposite of the semi join. It selects all rows from `x` that do _not_ have a matching key in `y`. --- .pull-left[ ```sql -- semi join SELECT * FROM x WHERE EXISTS ( SELECT 1 FROM y WHERE x.key = y.key ); ``` ![:center 100%](https://raw.githubusercontent.com/hadley/r4ds/master/diagrams/join-semi.png) ] .pull-right[ ```sql -- anti join SELECT * FROM x WHERE NOT EXISTS ( SELECT 1 FROM y WHERE x.key = y.key ) ``` ![:center 100%](https://raw.githubusercontent.com/hadley/r4ds/master/diagrams/join-anti.png) ] --- count: false .pull-left[ ```sql -- semi join SELECT * FROM x WHERE EXISTS ( * SELECT 1 FROM y * WHERE x.key = y.key ); ``` ![:center 100%](https://raw.githubusercontent.com/hadley/r4ds/master/diagrams/join-semi.png) ] .pull-right[ ```sql -- anti join SELECT * FROM x WHERE NOT EXISTS ( * SELECT 1 FROM y * WHERE x.key = y.key ) ``` ![:center 100%](https://raw.githubusercontent.com/hadley/r4ds/master/diagrams/join-anti.png) ] ??? ## Subquery? This inner query is an example of what's called a _subquery_. **[next slide]** --- layout: false name: subqueries class: snowstorm, middle, center # Subqueries queries nested inside another query, enclosed in parentheses ??? A subquery is also called an _inner query_ or _inner select_. Such an expression can be in many different cases: - after a `FROM` clause in place of a table - after a binary operator, if the subquery returns only one value - after an array comparison function, if the subquery returns only one column The last case is one you'll see often, so let's explore that a bit --- layout: true ## Subquery expressions --- .left-column[ ### EXISTS ] .right-column[ ```sql SELECT * FROM flights WHERE EXISTS (SELECT 1 FROM planes WHERE tailnum = flights.tailnum); ``` Selects the flights where the plane's tail number is recorded in the `planes` table. ```sql SELECT * FROM flights WHERE NOT EXISTS (SELECT 1 FROM planes WHERE tailnum = flights.tailnum); ``` Selects the flights that do _not_ have a corresponding entry in the `planes` table ] ??? An `EXISTS` expression can be used to make semi and anti joins, as demonstrated on the previous slide. Here is an example using the `nycflights13` data. --- name: subquery-in .left-column[ ### EXISTS ### IN ] .right-column[ ```sql SELECT * FROM flights WHERE tailnum IN (SELECT tailnum FROM planes WHERE manufacturer = 'EMBRAER'); ``` All the flights flown by a plane manufactured by EMBRAER ```sql SELECT * FROM flights WHERE tailnum NOT IN (SELECT tailnum FROM planes WHERE seats < 50); ``` All the flights flown by larger planes (i.e. 50 or more seats) ] ??? An `IN` expression can for example be used to make a filtering join, where you condition on additionally filtered data from another table. There is actually a subtle error on the slide; can you identify it? ➡ the last sentence; in addition to all flights flown by larger planes, the second query will also return the ~50,000 flights flown by planes that don't have a corresponding entry in the `planes` table --- .left-column[ ### EXISTS ### IN ### ANY/SOME ] .right-column[ ```sql SELECT * FROM airports WHERE alt >= ANY (SELECT MAX(alt) FROM airports GROUP BY tzone); ``` The airports that have an altitude higher or equal to the maximum altitude of any time zone. The keyword `SOME` is an alias for `ANY`. ] --- .left-column[ ### EXISTS ### IN ### ANY/SOME ### ALL ] .right-column[ ```sql SELECT * FROM airports WHERE alt >= ALL (SELECT AVG(alt) FROM airports GROUP BY tzone); ``` The airports that have an altitude higher or equal to _all_ the average altitudes by time zone. ] --- layout: true ## WITH queries The `WITH` clause is used to build _common table expressions_ (CTE), which can be thought of as temporary tables that exists for just one query. ??? If you have a query with a lot of subqueries, it might be beneficial for organisational purposes to use CTEs, especially if you end up using a subquery multiple times. Here is a (contrived) example to illustrate it; --- --- ```sql WITH agg_tbl1 AS (SELECT AVG(dep_delay) AS avg_dep_delay, AVG(air_time) AS avg_air_time FROM flights GROUP BY origin ), ``` ??? - The `WITH` clause goes before the `SELECT`; here, we define a temporary table called `agg_tbl1`, calculating the average `dep_delay` and `air_time` by `origin`. We can define as many of these as we like, separated by commas. --- ```sql WITH agg_tbl1 AS (SELECT AVG(dep_delay) AS avg_dep_delay, AVG(air_time) AS avg_air_time FROM flights GROUP BY origin ), agg_tbl2 AS (SELECT MIN(avg_dep_delay) AS min_avg_dep_delay, MIN(avg_air_time) AS min_avg_air_time FROM agg_tbl1 ) ``` ??? - The `WITH` clause goes before the `SELECT`; here, we define a temporary table called `agg_tbl1`, calculating the average `dep_delay` and `air_time` by `origin`. We can define as many of these as we like, separated by commas. - After the comma, we define `agg_tbl2`, where we calculate the minimums of the quantities just calculated in `agg_tbl1`. --- ```sql WITH agg_tbl1 AS (SELECT AVG(dep_delay) AS avg_dep_delay, AVG(air_time) AS avg_air_time FROM flights GROUP BY origin ), agg_tbl2 AS (SELECT MIN(avg_dep_delay) AS min_avg_dep_delay, MIN(avg_air_time) AS min_avg_air_time FROM agg_tbl1 ) SELECT * FROM flights WHERE dep_delay < (SELECT min_avg_dep_delay FROM agg_tbl2) AND air_time < (SELECT min_avg_air_time FROM agg_tbl2); ``` The flights where both the delay on departure and air time are below all the averages by origin. ??? - The `WITH` clause goes before the `SELECT`; here, we define a temporary table called `agg_tbl1`, calculating the average `dep_delay` and `air_time` by `origin`. We can define as many of these as we like, separated by commas. - After the comma, we define `agg_tbl2`, where we calculate the minimums of the quantities just calculated in `agg_tbl1`. - Finally, the actual `SELECT` expression that brings it all together. So what was the purpose of it? Instead of having two subqueries, where we group by and summarise the `flights` data, we instead do it once and reference it twice, using a CTE. --- layout: false # A word on NULLs `NULL` is a special marker that indicates a value does not exist in the database. ??? The concept of nulls in SQL is similar to that of `NA` in R. It is a marker of missingness, not a value in itself. -- To test if a value is null: - ❌ `value = NULL` (returns `NULL`) - ✅ `value IS NULL` (similar to `is.na` in R) ??? Since it is a special marker, you need special syntax to test for nulls. -- ```sql -- XOR join SELECT * FROM x FULL JOIN y USING (key) WHERE x.key IS NULL OR y.key IS NULL; ``` ??? An example where it can be used: an "XOR" join, i.e. the rows in `x` or `y`, where they don't have keys in common. -- To control where nulls are placed when ordering a column: - `ORDER BY col NULLS FIRST` - `ORDER BY col NULLS LAST` --- layout: false name: exercises # Exercises .pull-left[ Today's [sqlzoo.net](https://sqlzoo.net) exercises are: - [4 SELECT within SELECT](https://sqlzoo.net/wiki/SELECT_within_SELECT_Tutorial) ([+quiz](https://sqlzoo.net/wiki/Nested_SELECT_Quiz)) - [5 SUM and COUNT](https://sqlzoo.net/wiki/SUM_and_COUNT) ([+quiz](https://sqlzoo.net/wiki/SUM_and_COUNT_Quiz)) - [6 JOIN](https://sqlzoo.net/wiki/The_JOIN_operation) ([+quiz](https://sqlzoo.net/wiki/JOIN_Quiz)) - [8 Using NULL](https://sqlzoo.net/wiki/Using_Null) ([+quiz](https://sqlzoo.net/wiki/Using_Null_Quiz)) ] .pull-right[ Additional exercises for the fast learners: 1. Fix the error on [this slide](#subquery-in) That is, show the flights with planes that _are known_ to have 50 or more seats 2. Show flights with planes that have flown at least 100 flights 3. What does it mean for a flight to have a missing `tailnum`? What do the tail numbers that don't have a matching record in `planes` have in common? (hint: one variable explains ~91% of the problems) ] ??? Hint for extra exercise 3: check `?nycflights13::planes` --- layout: false name: links class: polarnight # Links 🔗 - Course home page: <https://janusvm.github.com/aau-csor-db> - These slides: <https://janusvm.github.com/aau-csor-db/slides/02-aggregation> - Relevant pages from the PostgreSQL docs: - Aggregate functions: <https://www.postgresql.org/docs/current/functions-aggregate.html> - Table expressions: <https://www.postgresql.org/docs/current/queries-table-expressions.html> - `WITH` queries: <https://www.postgresql.org/docs/current/queries-with.html> - Functions reference (SQLzoo): <https://sqlzoo.net/wiki/Functions_Reference> - R For Data Science: <https://r4ds.had.co.nz> - Section _Relational data_: <https://r4ds.had.co.nz/relational-data.html>


The occupational traffic permit is one of the most important things in the company when carrying out freight transport. In fact, it is a prerequisite for doing business traffic at all.
The occupational traffic permit is one of the most important things in the company when carrying out freight transport. In fact, it is a prerequisite for doing business traffic at all.
Here you get the best featured in the world and you can do the best thing when carrying out freight transport. In fact, it is a
Customer
The occupational traffic permit is one things in the company How do you a commercial traffic permit for freight transport to your business?
Provider
The occupational traffic permit is one things in the company How do you a commercial traffic permit for freight transport to your business?


Contact the court
If you are under 18 you need to email or phone the court. Claimants cannot submit a claim against someone under 18 so you may be able to have the claim stopped.
Money Claims
<EMAIL_ADDRESS>Telephone: 0300 123 7050
Monday to Friday, 9am to 5pm
Find out about call charges (opens in a new window)
You might be able to get advice about the claim from Citizens Advice (opens in a new window).


var snack = new Snackbar();
Click on example to view:
snack.message('Hello World');
snack.stickyMessage('Acknowledge me!');
snack.success('You did it!');
snack.error("Something didn't work");
snack.warn("I'd be careful if I were you...");
snack.message("My special snackbar", {class: 'my-snackbar your-snackbar'})
snack.message("QUICK!", {time: 500})


 They look like other books on the shelf, what makes them special.
You see a book you have on your shelf at home, and decided to flip through it to see what the difference is. When you get it in your hand you realize that your copy is not nearly as thick as this one. When you open it up you find that it has bigger type than yours, much bigger type!
An older lady walks up beside you and asks if you are going to check it out. You tell her no while handing it over to her.


pywinauto.tests.comparetoreffont¶
Compare against reference font test
What is checked This test checks all the parameters of the font for the control against the font for the reference control. If any value is different then this is reported as a bug. Here is a list of all the possible values that are tested: lfFaceName The name of the font lfHeight The height of the font lfWidth Average width of characters lfEscapement Angle of text lfOrientation Another angle for the text! lfWeight How bold the text is lfItalic If the font is italic lfUnderline If the font is underlined lfStrikeOut If the font is struck out lfCharSet The character set of the font lfOutPrecision The output precision lfClipPrecision The clipping precision lfQuality The output quality lfPitchAndFamily The pitch and family
How is it checked Each property of the font for the control being tested is compared against the equivalent property of the reference control font for equality.
When is a bug reported For each property of the font that is not identical to the reference font a bug is reported. So for example if the Font Face has changed and the text is bold then (at least) 2 bugs will be reported.
Bug Extra Information The bug contains the following extra information Name Description ValueType What value is incorrect (see above), String Ref The reference value converted to a string, String Loc The localised value converted to a string, String
Is Reference dialog needed This test will not run if the reference controls are not available.
False positive bug reports Running this test for Asian languages will result in LOTS and LOTS of false positives, because the font HAS to change for the localised text to display properly.
Test Identifier The identifier for this test/bug is “CompareToRefFont”
pywinauto.tests.comparetoreffont.
CompareToRefFontTest
(windows)¶Compare the font to the font of the reference control


Evening 10 Series 2018 Event 7
| Sul 2 |
22 May 18 |
|
10 |
miles |
| Name |
Position |
Road bike |
Actual Time |
Avg. mph |
| |
|
|
|
|
| Carl
Dyson |
1 |
|
00:22:37 |
26.53 |
| Timothy Smith |
2 |
|
00:23:05 |
25.99 |
| Josh van
Nierop |
3 |
|
00:23:34 |
25.46 |
| James
Lowe |
4 |
|
00:23:41 |
25.33 |
| Hans van
Nierop |
5 |
|
00:24:27 |
24.54 |
| Lawrence
Cox |
6 |
|
00:24:34 |
24.42 |
| Jonathan
Durnin |
7 |
|
00:24:35 |
24.41 |
| Peter
Bentley |
8 |
|
00:24:50 |
24.16 |
| Gary
Roberts |
9 |
|
00:25:22 |
23.65 |
| Adrian
Killworth |
10 |
|
00:25:31 |
23.51 |
| Julian
Middleton |
11 |
|
00:25:33 |
23.48 |
| Chris
Dainty |
12 |
|
00:25:49 |
23.24 |
| David
Wilson |
13 |
|
00:26:00 |
23.08 |
| Richard
Mortimer |
14 |
|
00:26:15 |
22.86 |
| Bill
Barrie |
15 |
|
00:26:25 |
22.71 |
| Linda
Hubbard |
16 |
|
00:26:37 |
22.54 |
| Roger
Kockelbergh |
17 |
|
00:26:57 |
22.26 |
| Ian
Murdey |
18 |
|
00:27:16 |
22.00 |
| Chris
Lydall |
19 |
|
00:27:24 |
21.90 |
| Mitchell
James |
19 |
|
00:27:24 |
21.90 |
| Simon
Ward |
21 |
|
00:27:27 |
21.86 |
| Mike Ives |
22 |
1 |
00:27:41 |
21.67 |
| John
Beatty |
23 |
|
00:27:48 |
21.58 |
| David
Reay |
24 |
|
00:28:00 |
21.43 |
| Matthew
Vallins |
25 |
2 |
00:28:18 |
21.20 |
| Dan High |
26 |
3 |
00:28:29 |
21.06 |
| David
Bayliss |
27 |
|
00:28:34 |
21.00 |
| Ray
Taylor |
28 |
|
00:28:45 |
20.87 |
| Ben
Noakes |
28 |
|
00:28:45 |
20.87 |
| Stewart
Holland |
30 |
4 |
00:28:55 |
20.75 |
| Vic
Barnett |
31 |
5 |
00:28:56 |
20.74 |
| Jennifer
Clegg |
32 |
|
00:29:35 |
20.28 |
| Thomas
Blake |
33 |
6 |
00:29:47 |
20.15 |
| Jamie
Lydall |
34 |
|
00:30:02 |
19.98 |
| Stefano
Caprioli |
35 |
|
00:30:03 |
19.97 |
| Charlie
Simpson |
36 |
7 |
00:30:04 |
19.96 |
| Steve
Alden |
37 |
|
00:30:58 |
19.38 |
| Huw
Wilson |
38 |
8 |
00:31:23 |
19.12 |
| Paula
Moore |
39 |
9 |
00:31:29 |
19.06 |
| Lorna
Marlow |
40 |
10 |
00:32:34 |
18.42 |
| William
Perkins |
41 |
11 |
00:32:50 |
18.27 |
| Claire Moore |
42 |
12 |
00:33:10 |
18.09 |
| John
Davidson |
43 |
13 |
00:33:14 |
18.05 |
| William
Lowe |
44 |
14 |
00:35:36 |
16.85 |
| Sophie
Ward |
45 |
15 |
00:38:45 |
15.48 |
|
|
|
|
|


React or VanillaJs?
Context
User Experience
Development
Reliability
Maintainability
Testability
Performance
What about the backend?
Conclusion
Context
User Experience
Development
Reliability
Maintainability
Testability
Performance
What about the backend?
Conclusion
Thanks!


Go to the source code of this file.
Define Documentation
| #define TaskRegisterHiFreq |
( |
|
m | ) |
(g_HiFreqTasks |= (m)) |
| #define TaskRegisterInput |
( |
|
m | ) |
(g_InputTasks |= (m)) |
| #define TaskRegisterOutput |
( |
|
m | ) |
(g_OutputTask |= (m)) |
Function Documentation
| void NxtBtnTask |
( |
__inout NXTBTN & |
nxtbtn | ) |
|
This function processes the changed buttons and sends button event notifications.
- Parameters:
-
| nxtbtn | Points to the NXTBTN structure. |
Definition at line 215 of file task.h.
This function initializes the robot task tables.
Definition at line 65 of file task.h.
| void TaskProcessHiFreq |
( |
| ) |
|
This function dispatches all the registered high frequency tasks. This function dispatches all the registered high frequency tasks.
Definition at line 191 of file task.h.
| bool TaskRegHiFreq |
( |
__in long |
module, |
|
|
__in void & |
context |
|
) |
| |
This function registers a high frequency robot task.
- Parameters:
-
| module | Specifies the module that has a high frequency task. |
| context | Spcifies the context of the task. |
- Returns:
- Returns true if successful, false if the task table is full.
Definition at line 99 of file task.h.
| bool TaskRegInput |
( |
__in long |
module, |
|
|
__in void & |
context |
|
) |
| |
This function registers a robot input task.
- Parameters:
-
| module | Specifies the module that has an input task. |
| context | Spcifies the context of the task. |
- Returns:
- Returns true if successful, false if the task table is full.
Definition at line 130 of file task.h.
| bool TaskRegOutput |
( |
__in long |
module, |
|
|
__in void & |
context |
|
) |
| |
This function registers a robot output task.
- Parameters:
-
| module | Specifies the module that has an output task. |
| context | Spcifies the context of the task. |
- Returns:
- Returns true if successful, false if the task table is full.
Definition at line 161 of file task.h.
Variable Documentation


Login
The username or password is incorrect.
Remember me
Sign in
Forgot the password?
Don't have an account?
Sign up here


| Methods |
public
|
__construct(array $headers = [])
Headerbag constructor.
|
#
|
public
|
all(string ...$exceptions): array
Return all headers with exceptions converted to friendly case.
Return all headers with exceptions converted to friendly case.
Overrides
Overriden by
|
#
|
public
|
selected(string ...$keys): array
Return selected headers converted to friendly case.
Return selected headers converted to friendly case.
Overrides
|
#
|
public
|
replace(array|ArrayBag $parameters): static
Replace headers converted to friendly case.
Replace headers converted to friendly case.
Overrides
Overriden by
|
#
|
public
|
merge(array|ArrayBag $parameters): static
Merge headers converted to friendly case.
Merge headers converted to friendly case.
Overrides
Overriden by
|
#
|
public
|
set(string $key, mixed $value): static
Set a header key/value pair converted to friendly case.
Set a header key/value pair converted to friendly case.
Overrides
Overriden by
|
#
|
public
|
get(string $key, mixed $default = null): mixed
Get a header value based on header name.
Get a header value based on header name.
Overrides
|
#
|
public
|
has(string $key): bool
Check if a header exists.
Check if a header exists.
Overrides
|
#
|
public
|
delete(string $key): static
Delete a header.
|
#
|
public
|
find(...$order): ?string
Find first occurance with value.
Find first occurance with value.
|
#
|
public
|
cacheControl(): CacheControl
Return cache control directive container.
Return cache control directive container.
|
#
|
public
|
__toString(): string
Return headers compiled as a string.
Return headers compiled as a string.
Implements
|
#
|


WITNESS LIST Revenue & Public Education Funding, Select Committee April 15, 1997-11:00A Proposed Draft on HB 4 On: Comer, Teresa (Comptroller's Office) Daugherty, Craig (Comptroller's Office) Hamilton, Billy (Comptroller's Office) Nance, James (Legislative Council) Reissig, Mike (Comptroller's Office) Wilson, Dan (Comptroller's Office) Wooten, Tim (Comptroller's Office)


'Out to Sea'
A movie review by Walter Frith
The talents of Jack Lemmon and Walter Matthau are terrific. They probably have more comic chemistry between the two of them than any other comedy team working today. They are about four weeks into making a sequel to 1968's 'The Odd Couple' which is scheduled to be released next year to celebrate the 30th anniversary of the first film. 'Grumpy Old Men' (1993) and 'Grumpier Old Men' (1995) are hilarious parodies on finding love late in life and both actors excelled in those movies as well as they did many years ago in 'The Fortune Cookie' (1966) for which Matthau won the Oscar as Best Supporting Actor. Lemmon directed Matthau in a touching and poignant story of elderly life in 'Kotch' (1971) for which Matthau was nominated for Best Actor.
'Out to Sea' has the two buddies playing brothers in law. Lemmon was married to Matthau's sister and she is now deceased and widower Lemmon reluctantly goes on a cruise with Matthau and innocently searches for love while Matthau's got (quote) "lonely rich broads" (unquote) on his mind. Upon arriving aboard the cruise ship, Matthau informs Lemmon that instead of paying for the cruise, he signed them both up as dance hosts. Lemmon is outraged and tries to get off the ship before it sails to no avail.
This movie has all the fun of a jack in the box with jokes popping up everywhere and the comedy is equally funny both verbally and physically as Lemmon and Matthau avoid giving the film edge and cruise along smoothly (almost effortlessly) in their comic genius much in the way they did in the 'Grumpy' movies but their characters are much different and much more attractive. Director Martha Coolidge does an excellent job of keeping the timing intact in all the routines and the closing credits feature outstanding and hilarious outakes which are only appropriate to show in comedy films. To dislike this film would be difficult because its simplicity and wholesome appeal is equal to spending a quiet afternoon with your grandparents. It's a joy.
Other cast members include Dyan Cannon, Brent Spiner, Gloria DeHaven, Elaine Stritch, Hal Linden and dancing legend Donald O'Connor.
OUT OF 5> * * * 1/2
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


--- layout: post title: Textmate errors using rspec.tmbundle & RVM date: 2012-03-31 13:26:09.000000000 -07:00 type: post published: true status: publish categories: tags: [] meta: _edit_last: '1' author: login: admin email<EMAIL_ADDRESS>display_name: admin first_name: Carina C. last_name: Zon ---
Out of the box, rspec.tmbundle doesn't always interact smoothly with TextMate and RVM. Here's how to fix a few errors TextMate may generate:
/Users/your-username/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- spec/autorun (LoadError) from /Users/your-username/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from /Users/your-username/Library/Application Support/TextMate/Bundles/rspec.tmbundle/Support/lib/rspec/mate.rb:43:in `rescue in ' from /Users/your-username/Library/Application Support/TextMate/Bundles/rspec.tmbundle/Support/lib/rspec/mate.rb:40:in `' from :29:in `require' from :29:in `require' from /tmp/textmate-command-12490.rb:2:in `'
TextMate's rspec bundle is looking for a rspec-tm file in the project root directory, specifying which version of Rspec to be using. --rspec-version 2.9.0
, for instance.
RVM needs rvm-auto-ruby
, a project .rvmrc, or a wrapper. Set the .rvmrc to something like rvm use 1.9.3@this-projects-gemset
, for instance. (MiniTest is fine with me just using rvm-auto-ruby, while Rspec is also needing the .rvmrc for some reason. So if you're still getting errors, try combining solutions.)
rspec.tmbundle may also need you to set RUBYOPT to "rubygems".


Acknowledgements
I have two mentors; Ruby and Snowcrash. Ruby is my "big picture" mentor and inspiration; he helped me set up my text editor and GitHub and this particular page on Netlify. Snowcrash was there when I started it all, and he is my support with the technical, miniscule struggles that occur in the coding process. I'm very grateful for them. Thank you!
Dev things I like
| HTML | In Hungarian, "span" is a slang for a friend. Let's just say HTML and I are ‹span›s. |
| CSS | I follow Ana Tudor on Twitter because I admire her "CSS only" codes. It's mindblowing how much you can achieve if you know a bit more than just basic CSS. CSS masters need no JavaScript. Only a preprocessor. And that's very independent! |
| JavaScript | One of the most defining moments of my coding adventure was when I did my first clickable, toggleable button with JS. The feeling when you did something and the browser responds... That's when I decided to grit my teeth through all errors and missing semicolons. Because the result is always exhilarating. |
| jQuery | I am sad because I am supposed to use vanilla JavaScript without jQuery so I wanted to give it a mention. |
| Sass | My boyfriend and I are making a webpage for my mother (it's a Christmas gift), and it's built on Jekyll which uses Sass, so I feel like it's the perfect opportunity to familiarize myself with this cutie. |
Free time things I like
Social science
My research interest is evangelicalism in Hungary. My Master's thesis was about the political themes that make it to the forefront of Hungarian evangelical discussions.
I'm also interested in the good and fair treatment of
- our environment,
- women & minorities,
- poor people & employees.
Daily exercise
I walk every day! Minimum 5 kilometers, but preferably more. I get very sad when I don't get to do it.
I'm super fond of biking too. (I have a bike tattoo.) One of my favorite summers was when we went on a bike trip around the Lake Balaton with my friends.
Coding
I code because it's fun.
It's fun to be in control! When you code, there is no external factor to blame. If it works, it's your success. If it doesn't, it's on you to fix it. I started to code in the summer of 2017 and it soon became an important free time fun for me.
I'm currently enrolled in the Google Scholarship for the Udacity Front-end Web Development Nanodegree, so I now have a lot of soon-to-be programmer acquaintances. It's really inspiring.
People
I don't spend enough time with friends ever since I work, so I figured I'd mention my two kickass social scientist best friends who have been watching my back since 2012.
Reddit Playdate
Playdate is a gamer community. They've got a Discord group where I pretend to be a moderator. I have surprisingly fond feelings for this group of people. Despite being rough around the edges, they are extremely supportive, and full of pretty intelligent people. If you ever feel like playing video games or just finding some new friends, just check the link and join our Discord group. .
Netflix & Cinema
Let's see some examples of what I like!
- Movies that feature female life stories ( Hidden Figures, Pawlikowski's Ida, Almodóvar's Julieta),
- series related to social science e.g. How to Get Away with Murder and Dear White People,
- Marvel movies.
I really like going to the cinema, so if you don't know how to socialize with me, you just need to pick a movie.
Random pictures
Here is my dog. This is where I practice adding images to a site, and how images react to different positioning methods. You can click the buttons of course! Isn't JavaScript amazing?


Before Change
raise NotImplementedError(
"The Frechet mean with adaptive gradient descent is only"
" implemented for lists of vectors, and not matrices.")
n_points = gs.shape(points)[0]
if n_points == 1:
return points
if weights is None:
weights = gs.ones((n_points, 1))
weights = gs.array(weights)
weights = gs.to_ndarray(weights, to_ndim=2, axis=1)
sum_weights = gs.sum(weights)
if init_point is None:
After Change
"The Frechet mean with adaptive gradient descent is only"
" implemented for lists of vectors, and not matrices.")
n_points = 1
if gs.ndim(points) == 2:
n_points = gs.shape(points)[0]
if n_points == 1:
return points
if weights is None:
weights = gs.ones((n_points,))
//weights = gs.array(weights)
//weights = gs.to_ndarray(weights, to_ndim=2, axis=1)


SEND
Index
Return to Main Contents
Example
NAME
send, sendto, sendmsg - send a message from a socket
SYNOPSIS
#include <lwip/socket.h>
int send(int s, const void *msg, int len,
unsigned int flags);
int sendto(int s, const void *msg, int len,
unsigned int flags, const struct sockaddr *to, int tolen);
DESCRIPTION
Send, and sendto, are used to transmit a message to another
socket. Send may be used only when the socket is in a connected
state, while sendto may be used at any time.
The address of the target is given by to with tolen specifying
its size. The length of the message is given by len.
If the message is too long to pass atomically through the underlying protocol,
the error EMSGSIZE is returned, and the message is not transmitted.
No indication of failure to deliver is implicit in a
send.
Locally detected errors are indicated by a return value of -1.
If no messages space is available at the socket to hold the message to be
transmitted, then send normally blocks, unless the socket has been
placed in non-blocking I/O mode.
The flags parameter may include one or more of the following:
-
#define MSG_OOB 0x1 /* process out-of-band data */
#define MSG_DONTROUTE 0x4 /* bypass routing, use direct interface */
The flag MSG_OOB is used to send out-of-band data on sockets
that support this notion (e.g. SOCK_STREAM); the underlying protocol
must also support out-of-band data.
MSG_DONTROUTE is usually used only by diagnostic or routing programs.
See recv for a description of the
msghdr structure.
RETURN VALUES
The call returns the number of characters sent, or -1 if an error occurred.
ERRORS
- EINVAL
- Invalid Arguments
- ENOTSOCK
- The argument s is not a socket.
Not Supported
- EFAULT
- An invalid user space address was specified for a parameter. Not Supported
- EMSGSIZE
- The socket requires that message be sent atomically, and the size
of the message to be sent made this impossible. Not Supported
- EWOULDBLOCK Not Supported
- The socket is marked non-blocking and the requested operation
would block.
- ENOBUFS
- The system was unable to allocate an internal buffer.
The operation may succeed when buffers become available.
- ENOBUFS
- The output queue for a network interface was full.
This generally indicates that the interface has stopped sending,
but may be caused by transient congestion.
SEE ALSO
recv,
getsockopt,
socket,
write
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- RETURN VALUES
-
- ERRORS
-
- SEE ALSO
-


Amazon Kinesis Data Firehose DeliveryStream ElasticsearchDestinationConfiguration
The ElasticsearchDestinationConfiguration
property type specifies an Amazon Elasticsearch Service (Amazon ES) domain that Amazon
Kinesis Data Firehose (Kinesis Data Firehose) delivers data to.
ElasticsearchDestinationConfiguration
is a property of the AWS::KinesisFirehose::DeliveryStream resource.
Syntax
JSON
{ "BufferingHints" : BufferingHints, "CloudWatchLoggingOptions" : CloudWatchLoggingOptions, "DomainARN" :
String
, "IndexName" :String
, "IndexRotationPeriod" :String
, "ProcessingConfiguration" : ProcessingConfiguration, "RetryOptions" : RetryOptions, "RoleARN" :String
, "S3BackupMode" :String
, "S3Configuration" : S3Configuration, "TypeName" :String
}
YAML
BufferingHints: BufferingHints CloudWatchLoggingOptions: CloudWatchLoggingOptions DomainARN:
String
IndexName:String
IndexRotationPeriod:String
ProcessingConfiguration: ProcessingConfiguration RetryOptions: RetryOptions RoleARN:String
S3BackupMode:String
S3Configuration: S3Configuration TypeName:String
Properties
BufferingHints
-
Configures how Kinesis Data Firehose buffers incoming data while delivering it to the Amazon ES domain.
Required: Yes
CloudWatchLoggingOptions
-
The Amazon CloudWatch Logs logging options for the delivery stream.
Required: No
Type: CloudWatchLoggingOptions
DomainARN
-
The Amazon Resource Name (ARN) of the Amazon ES domain that Kinesis Data Firehose delivers data to.
Required: Yes
Type: String
IndexName
-
The name of the Elasticsearch index to which Kinesis Data Firehose adds data for indexing.
Required: Yes
Type: String
IndexRotationPeriod
-
The frequency of Elasticsearch index rotation. If you enable index rotation, Kinesis Data Firehose appends a portion of the UTC arrival timestamp to the specified index name, and rotates the appended timestamp accordingly. For more information, see Index Rotation for the Amazon ES Destination in the Amazon Kinesis Data Firehose Developer Guide.
Required: Yes
Type: String
ProcessingConfiguration
-
The data processing configuration for the Kinesis Data Firehose delivery stream.
Required: No
Type: ProcessingConfiguration
RetryOptions
-
The retry behavior when Kinesis Data Firehose is unable to deliver data to Amazon ES.
Required: Yes
RoleARN
-
The Amazon Resource Name (ARN) of the IAM role to be assumed by Kinesis Data Firehose for calling the Amazon ES Configuration API and for indexing documents.
For more information, see Grant Kinesis Data Firehose Access to an Amazon S3 Destination in the Amazon Kinesis Data Firehose Developer Guide and Amazon Resource Names (ARNs) and AWS Service Namespaces in the Amazon Web Services General Reference.
Required: Yes
Type: String
S3BackupMode
-
The condition under which Kinesis Data Firehose delivers data to Amazon Simple Storage Service (Amazon S3). You can send Amazon S3 all documents (all data) or only the documents that Kinesis Data Firehose could not deliver to the Amazon ES destination. For more information and valid values, see the
S3BackupMode
content for the ElasticsearchDestinationConfiguration data type in the Amazon Kinesis Data Firehose API Reference.Required: Yes
Type: String
S3Configuration
-
The S3 bucket where Kinesis Data Firehose backs up incoming data.
Required: Yes
TypeName
-
The Elasticsearch type name that Amazon ES adds to documents when indexing data.
Required: Yes
Type: String


What You’ll Do
As a member of this dynamic and fast-paced team, you will perform cross-functional data engineering and analysis in a big data environment.
Specific responsibilities include:
- Collect and organize data requirements and processes
- Work with data engineers to ensure the availability of accurate and timely data
- Perform impact assessment and deep-dive analysis in collaboration with stakeholders to ensure data integrity, consistency, usability, and completeness
- Write SQL for data support for business processes and ETL in Hadoop
- Identify patterns and trends and communicate them to stakeholders
- Assess usability of new data sources
- Apply statistical analysis to quantify impact of business processes.
- Extract patterns and actionable insights from data.
Top Skills Required
Demonstrate ability and job history of
- Predictive Analytics
- Modeling of Predictive Analytics
- Statistics Background
- SQL, HADOOP and SPARK Experience
Qualification
- Bachelor’s degree or equivalent
- Strong statistical foundation including descriptive analysis and hypothesis testing
- Creative problem solver – ability to identify and analyze complex patterns
- Effective communicator with both technical and non-technical audiences.
- Proficient in SQL and at least one programming (or scripting) language SPARK, HADOOP


Fork me on GitHub
startext.js
Make your own animated intro with startext.js within one minute!
Type in your text lines and press the finish button. A new tab will be created with your animation, which you can bookmark.
show/hide options
Options
background option:
IMAGE
COLOR
IMAGE
background image:
font-family:
explosion strength [0, 1]:
transition speed [0, 1]:
pause [in ms]:
replay
Page 1
animation:
STARS
STARS
ROTATION
SCALE
line 1:
line 2:
add page
add line
remove last page
finish


Maintenance Platform provides home appliance services for your needs. When it comes to finding an appliance repair company you can trust in your home, Maintenance Platform meets all the qualifications. From TV, refrigerator, stove, oven to geyser, washing machine any kind of home appliances that you want to install or uninstall, repair, shift, gas charge everything can be done by Maintenance Platform’s professional and reliable technicians.
Maintenance Platform is one of the most renowned names in Dhaka
when it comes to AC installation/uninstallations, repairing, gas
charging and other basic and master AC services.
AC
installation:
AC has become a necessity in Dhaka’s weather. From window AC to
split AC all types of AC both indoor and outdoor installation are
done by our most trusted and experienced technicians.
AC
uninstallation:
Maintenance Platform provides AC uninstallation service for all
types of AC for both Indoor and Outdoor as well as Window.
AC
servicing:
Maintenance Platform also provides basic and master AC servicing
and maintenance. AC maintenance and regular check ups can increase
the effectiveness and efficiency of AC’s performance. There are
two kind of AC servicing. One is
General Servicing and another is
Master Servicing.
AC Gas
charging:
Maintenance Platform’s expert technician can help reduce your gas
charging hassel. Gas charging can be hectic for someone who has
little idea about AC gas charging. By booking AC gas charge
service you can just relax and let our expert technicians do the
job.
A microwave oven is an essential household appliance and need to be repaired quickly but trying to repair on your own microwave can be dangerous. Maintenance Platform offer quick and reliable doorstep microwave oven repair in Dhaka.
Maintenance Platform offers all kinds of TV services from installation/uninstallation to any sorts of repairing that needed. Our expert technicians will diagnose your TV’s problem and fix it at a reasonable price.
Maintenance Platform is one of well known washing machine service providers in Dhaka, we have experienced technicians who will analyse your washing machine in details and repair.


Toggle navigation
Vivitap
Vivitap on GitHub �
Vivitap Support
Vivitap support can be reached at
support@vivitap.com


Unfortunately, in practice this is almost never populated. In theory, this is supposed to tell which Activity Graph to show if you bring up the director while in this activity.
The difficulty level of the activity.
The recommended light level for this activity.
A list of location mappings that are affected by this activity. Pulled out of DestinyLocationDefinitions for our/your lookup convenience.
The hash identifiers for Activity Modes relevant to this activity. Note that if this is a playlist, the specific playlist entry chosen will determine the actual activity modes that end up being relevant.
Mapped to DestinyActivityModeDefinition in the manifest.
The activity modes - if any - in enum form. Because we can't seem to escape the enums.
The hash identifier for the Activity Type of this Activity. You may use it to look up the DestinyActivityTypeDefinition for human readable info, but be forewarned: Playlists and many PVP Map Activities will map to generic Activity Types. You'll have to use your knowledge of the Activity Mode being played to get more specific information about what the user is playing.
Mapped to DestinyActivityTypeDefinition in the manifest.
An activity can have many Challenges, of which any subset of them may be active for play at any given period of time. This gives the information about the challenges and data that we use to understand when they're active and what rewards they provide. Sadly, at the moment there's no central definition for challenges: much like "Skulls" were in Destiny 1, these are defined on individual activities and there can be many duplicates/near duplicates across the Destiny 2 ecosystem. I have it in mind to centralize these in a future revision of the API, but we are out of time.
The hash identifier for the Destination on which this Activity is played. Use it to look up the DestinyDestinationDefinition for human readable info about the destination. A Destination can be thought of as a more specific location than a " Place". For instance, if the "Place" is Earth, the "Destination" would be a specific city or region on Earth.
Mapped to DestinyDestinationDefinition in the manifest.
If this activity had an activity mode directly defined on it, this will be the hash of that mode.
Mapped to DestinyActivityModeDefinition in the manifest.
If the activity had an activity mode directly defined on it, this will be the enum value of that mode.
The title, subtitle, and icon for the activity. We do a little post-processing on this to try and account for Activities where the designers have left this data too minimal to determine what activity is actually being played.
This block of data, if it exists, provides information about the guided game experience and restrictions for this activity. If it doesn't exist, the game is not able to be played as a guided game.
The unique identifier for this entity. Guaranteed to be unique for the type of entity, but not globally.
When entities refer to each other in Destiny content, it is this hash that they are referring to.
The index of the entity as it was found in the investment tables.
The list of phases or points of entry into an activity, along with information we can use to determine their gating and availability.
If True, this Activity is actually a Playlist that refers to multiple possible specific Activities and Activity Modes. For instance, a Crucible Playlist may have references to multiple Activities (Maps) with multiple Activity Modes ( specific PvP gameplay modes). If this is true, refer to the playlistItems property for the specific entries in the playlist.
If true, this activity is a PVP activity or playlist.
The set of all possible loadout requirements that could be active for this activity. Only one will be active at any given time, and you can discover which one through activity-associated data such as Milestones that have activity info on them.
This block of data provides information about the Activity's matchmaking attributes: how many people can join and such.
Activities can have Modifiers, as defined in DestinyActivityModifierDefinition. These are references to the modifiers that can be applied to that activity, along with data that we use to determine if that modifier is actually active at any given point in time.
If there are status strings related to the activity and based on internal state of the game, account, or character, then this will be the definition of those strings and the states needed in order for the strings to be shown.
The unadulterated form of the display properties, as they ought to be shown in the Director (if the activity appears in the director).
When Activities are completed, we generate a "Post-Game Carnage Report", or PGCR, with details about what happened in that activity (how many kills someone got, which team won, etc...) We use this image as the background when displaying PGCR information, and often use it when we refer to the Activity in general.
The hash identifier for the "Place" on which this Activity is played. Use it to look up the DestinyPlaceDefinition for human readable info about the Place. A Place is the largest-scoped concept for location information. For instance, if the "Place" is Earth, the "Destination" would be a specific city or region on Earth.
Mapped to DestinyPlaceDefinition in the manifest.
Represents all of the possible activities that could be played in the Playlist, along with information that we can use to determine if they are active at the present time.
If this is true, then there is an entity with this identifier/type combination, but BNet is not yet allowed to show it. Sorry!
If the activity has an icon associated with a specific release (such as a DLC), this is the path to that release's icon.
If the activity will not be visible until a specific and known time, this will be the seconds since the Epoch when it will become visible.
The expected possible rewards for the activity. These rewards may or may not be accessible for an individual player based on their character state, the account state, and even the game's state overall. But it is a useful reference for possible rewards you can earn in the activity. These match up to rewards displayed when you hover over the Activity in the in-game Director, and often refer to Placeholder or "Dummy" items: items that tell you what you can earn in vague terms rather than what you'll specifically be earning (partly because the game doesn't even know what you'll earn specifically until you roll for it at the end)
The title, subtitle, and icon for the activity as determined by Selection Screen data, if there is any for this activity. There won't be data in this field if the activity is never shown in a selection/options screen.
The difficulty tier of the activity.
The static data about Activities in Destiny 2.
Note that an Activity must be combined with an ActivityMode to know - from a Gameplay perspective - what the user is "Playing".
In most PvE activities, this is fairly straightforward. A Story Activity can only be played in the Story Activity Mode.
However, in PvP activities, the Activity alone only tells you the map being played, or the Playlist that the user chose to enter. You'll need to know the Activity Mode they're playing to know that they're playing Mode X on Map Y.
Activity Definitions tell a great deal of information about what could be relevant to a user: what rewards they can earn, what challenges could be performed, what modifiers could be applied. To figure out which of these properties is actually live, you'll need to combine the definition with "Live" data from one of the Destiny endpoints.
Activities also have Activity Types, but unfortunately in Destiny 2 these are even less reliable of a source of information than they were in Destiny 1. I will be looking into ways to provide more reliable sources for type information as time goes on, but for now we're going to have to deal with the limitations. See DestinyActivityTypeDefinition for more information.


Saved-states are just a special case of PO files. The
save_program/[1,2]
predicate will save the execution state
in a file. The state consists of all predicates
and modules except built-in predicates and clauses
of volatile predicates, the current operator
declarations, the current character-conversion mapping,
the values of all writable Prolog flags except those marked as volatile
in ref-lps-flg,
any blackboard data (see ref-mdb-bbd), database data
(see ref-mdb-bas), and profiling data (see Execution Profiling); but no information for source-linked debugging.
A saved-state, can be restored using the restore/1
predicate from within Prolog:
| ?- restore(File).
which will replace the current program state by the one in File.
A saved-state can also be given as an option to the sicstus command:
% sicstus -r File
which will start execution by restoring File.
The save_program/2
predicate can be used to specify an initial goal
that will be run when the saved-state is restored. For example:
| ?- save_program(saved_state,initial_goal([a,b,c])).
When saved_state is loaded initial_goal/1
will be called. This allows
saved-states to be generated that will immediately start running the user's
program when they are restored. In addition to this save_program/2
facility, see also the initialization/1
facility to declare
goal to be executed upon loading (see Initializations).


Zen Chimes
Available Chimes
Chimes active:
Select the chime that will play.
System Configuration
This is a test


{{ partial "header.html" . }}
This site has recently migrated over to a newer framework. You may be experiencing a high number of 404s in this time.


CART
CONTACT
SIGNUP
SHOP
HOME
ECLECTEES
co
CheckoutCount
Price Low - High
Price High - Low
Title A - Z
Title Z - A
CART
Subtotal
£
BuyNow


Much WYSIWYG
Very formatting
Such bolds
Pikachu
Onix
Vulpix
Leberkas pig venison hamburger beef ribs sirloin. Pork shankle pork belly ribeye tri-tip fatback. Pork belly short ribs ribeye andouille brisket pork chop swine biltong meatloaf. Ham hock ground round ball tip swine bacon jowl pig. Pig bacon short loin andouille flank capicola kielbasa pork boudin ham hock tongue meatloaf. Tenderloin ham capicola swine short ribs kevin pork chop chuck kielbasa meatball shoulder.
 Pork shankle pork belly ribeye tri-tip fatback. Pork belly short ribs ribeye andouille brisket pork chop swine biltong meatloaf. Ham hock ground round ball tip swine bacon jowl pig. Pig bacon short loin andouille flank capicola kielbasa pork boudin ham hock tongue meatloaf. Tenderloin ham capicola swine short ribs kevin pork chop chuck kielbasa meatball shoulder.
 Pork shankle pork belly ribeye tri-tip fatback. Pork belly short ribs ribeye andouille brisket pork chop swine biltong meatloaf. Ham hock ground round ball tip swine bacon jowl pig. Pig bacon short loin andouille flank capicola kielbasa pork boudin ham hock tongue meatloaf. Tenderloin ham capicola swine short ribs kevin pork chop chuck kielbasa meatball shoulder.


|
Withering
|
Class containing Enemy details. More...
Public Member Functions | |
| void | Hit () |
| Handles when the Enemy has been hit by the Player Weapon. More... | |
Public Attributes | |
| CharacterStats | myStats |
| The stats of the enemy. More... | |
| CharacterCombat | playerCombat |
| CharacterCombat of the Player. More... | |
| Rigidbody | playerRigidbody |
| Vector3 | moveDirection |
| Direction for the Enemy to move in. More... | |
Private Member Functions | |
| void | Start () |
Class containing Enemy details.
|
private |
| Vector3 Enemy.moveDirection |
Direction for the Enemy to move in.
| CharacterStats Enemy.myStats |
The stats of the enemy.
| CharacterCombat Enemy.playerCombat |
CharacterCombat of the Player.
| Rigidbody Enemy.playerRigidbody |


Mobi is a student organization that aims to engage its members in an active project based learning environment for mobile development while promoting scholastic excellence.
Develop
Entrepreneurial thinking is encouraged as Mobi explores the tools that start-ups are using to make the rapid development process possible in such a fast moving world. These objectives aim to harbor creativity and leadership skills in our members.
Students will be able to apply their knowledge in Programming, Algorithms, Databases, OS, Mobile Systems, Networks, Electrical Engineering, Mechanical Engineering, and Industrial and Graphical Design to their own projects that involve mobile development and product development.
Check out some of our projects!
UTA Radio is, well…awesome. There is no better way to describe it. UTA Radio is an internet radio station that broadcasts live from campus, which in case you didn’t know, is at the University of Texas at Arlington. We developed the iOS and Android apps for the radio station and will be releasing them this semester!
RUFFpatch! A project made for HackDFW that won the Intel IoT challenge and the Connect2.me Web API challenge!
This is an event app where users will be able to open the app and see where events are immediately. Buildings are marked with colored highlighting if there is an event that will occur there soon.
A smart traffic light network that adjusts traffic light schedules to optimize traffic flow, through real-time monitoring and analysis of traffic conditions. Developed by Zedd Mekhaiel and James Staud. Visit the site!
Team
Our Amazing Team
James Staud - El Presidante
Kevin Chung - Vice President
Cameron Moreau - Android Master Race
Anthony Tatowicz - Web Lord
Mary Staud - Public/Human Relations Genius
Ginnie Hsu - Creative Director (AKA Design/Art Mastermind)
Ehis Ojeilu - iOS Program Manager
Bradley Wabbersen - IoT Program Manager
Jay Zhuang - Logistics Director
Gergley Zaruba - Faculty Advisor/Best Professor Ever
About
Mobi has two types of meetings:
Mobi LEARN meetings which are one hour workshops over a specific platform. We usually cover Android, iOS, Web, Design, and Embedded systems.
Our Dev meetings are where Mobi really makes a difference. We spend an hour working on our projects and building products to improve campus life.


The easiest analogy I can think of is a Birthday cake. The cake is the HTML, the icing is the CSS and the extra decorations i.e candles, lollies and writing (which can be arranged as you want) are the DOM. The HTML is the structure, the CSS is the styling and the DOM interprets this information and sometimes displays differently based on other factors.
All HTML elements can be considered as boxes. Boxifying essentially means taking a design and breaking the design layout into boxes. In web development graphic designers may design the layout of the page and hand this over to be coded. The first step then would be to boxify the design by either cutting the image/page up or doing a rough sketch by hand. Generally everything we see on webpages is based on this design regardless of the whether we see the boxes.
The CSS box model is essentially a box that wraps around every HTML element. It consists of: margins, borders, padding, and the actual content. In effect a box (content) in a box (padding) in a box (borders) in a box (margins).


pragma solidity ^0.5.0;
import "openzeppelin-solidity/contracts/ownership/Ownable.sol";
//import "./Ownable.sol";
/**
* @title A contract that can be destroyed by its owner after a delay elapses.
* This contract allows an inheriting contract to be destroyed after
* its owner indicates an intention and then waits for a period
* without changing their mind. All ether contained in the contract
* is forwarded to a nominated beneficiary upon destruction.
* @author https://github.com/hav-noms/
*/
contract Mortal is Ownable {
uint public initiationTime;
bool public selfDestructInitiated;
address payable public selfDestructBeneficiary;
uint public constant SELFDESTRUCT_DELAY = 4 weeks;
/**
* @dev Constructor
* @param _selfDestructBeneficiary The account which will recieve any funds in this contract when killed.
*/
constructor(address payable _selfDestructBeneficiary)
public
{
Erequire(_selfDestructBeneficiary != address(0), "_selfDestructBeneficiary must not be the zero address");
selfDestructBeneficiary = _selfDestructBeneficiary;
emit SelfDestructBeneficiaryUpdated(selfDestructBeneficiary);
}
/**
* @notice Set the beneficiary address of this contract.
* @dev Only the contract owner may call this. The provided beneficiary must be non-null.
* @param _beneficiary The address to pay any eth contained in this contract to upon self-destruction.
*/
function setSelfDestructBeneficiary(address payable _beneficiary)
external
onlyOwner
{
require(_beneficiary != address(0), "Beneficiary must not be the zero address");
selfDestructBeneficiary = _beneficiary;
emit SelfDestructBeneficiaryUpdated(_beneficiary);
}
/**
* @notice Begin the self-destruction counter of this contract.
* Once the delay has elapsed, the contract may be self-destructed.
* @dev Only the contract owner may call this.
*/
function initiateSelfDestruct()
external
onlyOwner
{
initiationTime = now;
selfDestructInitiated = true;
emit SelfDestructInitiated(SELFDESTRUCT_DELAY);
}
/**
* @notice Terminate and reset the self-destruction timer.
* @dev Only the contract owner may call this.
*/
function terminateSelfDestruct()
external
onlyOwner
{
initiationTime = 0;
selfDestructInitiated = false;
emit SelfDestructTerminated();
}
/**
* @notice If the self-destruction delay has elapsed, destroy this contract and
* remit any ether it owns to the beneficiary address.
* @dev Only the contract owner may call this.
*/
function selfDestruct()
external
onlyOwner
{
require(selfDestructInitiated, "Self destruct has not yet been initiated");
require(initiationTime + SELFDESTRUCT_DELAY < now, "Self destruct delay has not yet elapsed");
emit SelfDestructed(selfDestructBeneficiary);
selfdestruct(selfDestructBeneficiary);
}
//-----------------------------------------------------------------
// Events
//-----------------------------------------------------------------
event SelfDestructTerminated();
event SelfDestructed(address beneficiary);
event SelfDestructInitiated(uint selfDestructDelay);
event SelfDestructBeneficiaryUpdated(address newBeneficiary);
}
|


{% extends "layout.html" %} {% comment %} Licensed to Cloudera, Inc. under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Cloudera, Inc. licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. {% endcomment %} {% block title %}Job History{% endblock %} {% block head %} {% endblock %} {% block content %}
| Owner | Name | Submitted | Last known state | |
|---|---|---|---|---|
| {{ submission.owner }} | {{ submission.name }} | {{ submission.submission_date|timesince }} ago | {{ submission.last_seen_state_as_string }} | watch progress |


class Gem::Package::TarWriter
Allows writing of tar files
Public Class Methods
Creates a new TarWriter that will write to
io
# File lib/rubygems/package/tar_writer.rb, line 95 def initialize(io) @io = io @closed = false end
Creates a new TarWriter, yielding it if a block is given
# File lib/rubygems/package/tar_writer.rb, line 78 def self.new(io) writer = super return writer unless block_given? begin yield writer ensure writer.close end nil end
Public Instance Methods
Adds file name
with permissions mode
, and yields
an IO for writing the file to
# File lib/rubygems/package/tar_writer.rb, line 104 def add_file(name, mode) # :yields: io check_closed raise Gem::Package::NonSeekableIO unless @io.respond_to? :pos= name, prefix = split_name name init_pos = @io.pos @io.write "\0" * 512 # placeholder for the header yield RestrictedStream.new(@io) if block_given? size = @io.pos - init_pos - 512 remainder = (512 - (size % 512)) % 512 @io.write "\0" * remainder final_pos = @io.pos @io.pos = init_pos header = Gem::Package::TarHeader.new :name => name, :mode => mode, :size => size, :prefix => prefix, :mtime => Time.now @io.write header @io.pos = final_pos self end
Adds name
with permissions mode
to the tar,
yielding io
for writing the file. The
digest_algorithm
is written to a read-only
name
.sum file following the given file contents containing the
digest name and hexdigest separated by a tab.
The created digest object is returned.
# File lib/rubygems/package/tar_writer.rb, line 142 def add_file_digest name, mode, digest_algorithms # :yields: io digests = digest_algorithms.map do |digest_algorithm| digest = digest_algorithm.new digest_name = if digest.respond_to? :name then digest.name else /::([^:]+)$/ =~ digest_algorithm.name $1 end [digest_name, digest] end digests = Hash[*digests.flatten] add_file name, mode do |io| Gem::Package::DigestIO.wrap io, digests do |digest_io| yield digest_io end end digests end
Adds name
with permissions mode
to the tar,
yielding io
for writing the file. The signer
is
used to add a digest file using its digest_algorithm per #add_file_digest and a
cryptographic signature in name
.sig. If the signer has no key
only the checksum file is added.
Returns the digest.
# File lib/rubygems/package/tar_writer.rb, line 175 def add_file_signed name, mode, signer digest_algorithms = [ signer.digest_algorithm, Digest::SHA512, ].compact.uniq digests = add_file_digest name, mode, digest_algorithms do |io| yield io end signature_digest = digests.values.compact.find do |digest| digest_name = if digest.respond_to? :name then digest.name else /::([^:]+)$/ =~ digest.class.name $1 end digest_name == signer.digest_name end if signer.key then signature = signer.sign signature_digest.digest add_file_simple "#{name}.sig", 0444, signature.length do |io| io.write signature end end digests end
Add file name
with permissions mode
size
bytes long. Yields an IO to
write the file to.
# File lib/rubygems/package/tar_writer.rb, line 212 def add_file_simple(name, mode, size) # :yields: io check_closed name, prefix = split_name name header = Gem::Package::TarHeader.new(:name => name, :mode => mode, :size => size, :prefix => prefix, :mtime => Time.now).to_s @io.write header os = BoundedStream.new @io, size yield os if block_given? min_padding = size - os.written @io.write("\0" * min_padding) remainder = (512 - (size % 512)) % 512 @io.write("\0" * remainder) self end
Adds symlink name
with permissions mode
, linking
to target
.
# File lib/rubygems/package/tar_writer.rb, line 238 def add_symlink(name, target, mode) check_closed name, prefix = split_name name header = Gem::Package::TarHeader.new(:name => name, :mode => mode, :size => 0, :typeflag => "2", :linkname => target, :prefix => prefix, :mtime => Time.now).to_s @io.write header self end
Closes the TarWriter
# File lib/rubygems/package/tar_writer.rb, line 264 def close check_closed @io.write "\0" * 1024 flush @closed = true end
Is the TarWriter closed?
# File lib/rubygems/package/tar_writer.rb, line 276 def closed? @closed end
Flushes the TarWriter's IO
# File lib/rubygems/package/tar_writer.rb, line 283 def flush check_closed @io.flush if @io.respond_to? :flush end
Creates a new directory in the tar file name
with
mode
# File lib/rubygems/package/tar_writer.rb, line 292 def mkdir(name, mode) check_closed name, prefix = split_name(name) header = Gem::Package::TarHeader.new :name => name, :mode => mode, :typeflag => "5", :size => 0, :prefix => prefix, :mtime => Time.now @io.write header self end


The system tray is a specialized area of the desktop where users can access currently running programs. This area may be referred to differently on various operating systems. On Microsoft Windows, the system tray is referred to as the Taskbar Status Area, while on the GNU Network Object Model Environment (GNOME) Desktop it is referred to as the Notification Area. On K Desktop Environment (KDE) this area is referred to as the System Tray. However, on each system the tray area is shared by all applications running on the desktop.
The
java.awt.SystemTray
class introduced in Java™ SE version 6 represents the system tray for a desktop.
The system tray can be accessed by calling the static SystemTray.getSystemTray()
method.
Before calling this method, use the static method
isSupported()
to check that the system tray is supported.
If the system tray is not supported on this platform, the isSupported()
method returns false. If the application attempts to call the getSystemTray()
method in such a case,
the method will throw a java.lang.UnsupportedOperationException
.
An application cannot create an instance of the SystemTray
class.
Only a single instance created within this class can exist, and this instance can be obtained using the
getSystemTray()
method.
The system tray contains one or more tray icons which are added to the tray using the
add(java.awt.TrayIcon)
method.
They can be removed when they are no longer needed with the
remove(java.awt.TrayIcon)
method.
add()
method can throw an AWTException
if the operating system or the Java runtime determines that
the icon cannot be added to the system tray. For example, an AWTException
will be thrown by X-Window desktops if the
system tray does not exist on the desktop.
The
TrayIcon
class functionality goes beyond the icon that is displayed in the tray.
It also includes a text tooltip, a pop-up menu, ballon messages, and a set of listeners associated with it.
A TrayIcon
object generates various mouse events and supports the addition
of corresponding listeners to receive notification of these events.
The TrayIcon
class processes some of the events itself. For example, by default, when a right-click
is performed on the tray icon, it displays the specified pop-up menu.
When a double-click is performed, the TrayIcon
object generates an ActionEvent
to launch an application.
When the mouse pointer hovers over the tray icon, the tooltip is displayed. The icon image
is automatically resized to fit the space allocated for the image on the tray.
The following demo, developed using the AWT package, demonstrates the features of SystemTray and TrayIcon classes.
Unfortunately, the current implementation of the TrayIcon
class provides limited support of the
Swing pop-up menu (the JPopupMenu
class) and does not enable an application
to use all of the capabilities of the javax.swing
package. The workaround proposal for this
issue is described in the Bug Database, see Bug ID
6285881.
bulb.gif
image file in the image
directory.
Compile and run the example, consult the
example index.
The following code snippet shows how to add a tray icon to the system tray and apply a pop-up menu:
... //Check the SystemTray is supported if (!SystemTray.isSupported()) { System.out.println("SystemTray is not supported"); return; } final PopupMenu pop-up = new PopupMenu(); final TrayIcon trayIcon = new TrayIcon(createImage("images/bulb.gif", "tray icon")); final SystemTray tray = SystemTray.getSystemTray(); // Create a pop-up menu components MenuItem aboutItem = new MenuItem("About"); CheckboxMenuItem cb1 = new CheckboxMenuItem("Set auto size"); CheckboxMenuItem cb2 = new CheckboxMenuItem("Set tooltip"); Menu displayMenu = new Menu("Display"); MenuItem errorItem = new MenuItem("Error"); MenuItem warningItem = new MenuItem("Warning"); MenuItem infoItem = new MenuItem("Info"); MenuItem noneItem = new MenuItem("None"); MenuItem exitItem = new MenuItem("Exit"); //Add components to pop-up menu pop-up.add(aboutItem); pop-up.addSeparator(); pop-up.add(cb1); pop-up.add(cb2); pop-up.addSeparator(); pop-up.add(displayMenu); displayMenu.add(errorItem); displayMenu.add(warningItem); displayMenu.add(infoItem); displayMenu.add(noneItem); pop-up.add(exitItem); trayIcon.setPopupMenu(pop-up); try { tray.add(trayIcon); } catch (AWTException e) { System.out.println("TrayIcon could not be added."); } ...
The complete code for this demo is available in the
TrayIconDemo.java
file. This demo also uses the
bulb.gif
image file.
Removing the current limitations on applying Swing components will
enable developers to add such components as JMenuItem
(with image),
JRadioButtonMenuItem
, and JCheckBoxMenuItem
.
Only a single instance created within SystemTray
class can exist.
| Method | Purpose |
|---|---|
| add | Adds a tray icon to the system tray. The tray icon becomes visible in the system tray once it is added. The order in which icons are displayed in a tray is not specified — it is platform- and implementation-dependent. |
| getSystemTray | Gets the SystemTray instance that represents the desktop's tray area.
This method always returns the same instance per application. On some platforms the system tray may not be supported.
Use the isSupported() method to check if the system tray is supported.
|
| isSupported | Returns information as to whether the system tray is supported on the current platform.
In addition to displaying the tray icon, minimal system tray support includes either a
pop-up menu (see the TrayIcon.setPopupMenu(PopupMenu) method) or
an action event (see the TrayIcon.addActionListener(ActionListener) ).
|
A TrayIcon
object represents a tray icon that can
be added to the system tray. A TrayIcon
object can have a tooltip (text), an image, a pop-up menu,
and a set of listeners associated with it.
| Method | Purpose |
|---|---|
| setImageAutoSize | Sets the auto-size property. Auto-size determines whether the tray image is automatically sized
to fit the space allocated for the image on the tray. By default, the auto-size property is set to false .
|
| setPopupMenu | Sets the pop-up menu for this TrayIcon object.
If pop-up is null , no pop-up menu will be associated with this TrayIcon object.
|
| setToolTip | Sets the tooltip string for this TrayIcon object.
The tooltip is displayed automatically when the mouse hovers over the icon.
Setting the tooltip to null removes any tooltip text.
When displayed, the tooltip string may be truncated on some platforms;
the number of characters that may be displayed is platform-dependent.
|
| Example | Where Described | Notes |
|---|---|---|
TrayIconDemo
|
This section | Creates the tray icon in the system tray, adds a pop-up menu to the tray icon. |


With two days remaining before bidding closes, I must remind you of this year's Hooting Yard auction item for the Resonance104.4FM fundraiser. The highest bidder will be immortalised forever by having their name (or that of a loved one) incorporated into the title of an out of print pamphlet by Dobson. And not only that! They will also be invited to attend the Resonance studio for the live broadcast of the show when Mr Key reads the as yet unwritten story on air, and to go and have a cup of tea with him afterwards.
As I write, the top bid is £50, a paltry sum when you consider the prize on offer. And do remember that every penny raised goes straight into the pockets of ResonanceFM, from where it will be disbursed in manifold ways to ensure the continued existence, and improvement, of the world's finest radio station.
There are many other items still to bid for, so do please check on all of them here.


What is Cold Numbers?
Cold Numbers is a fan created set of cards for On the Edge. When a number of us learned that the expansion formerly known as Wetworks (TEFKA WW) was put on hold by Atlas Games, we decided to satisfy our need for new cards ourselves. The name was spawned from the subject of a letter from John Nephew explaining why TEFKA WW wasn't possible. (Anyone have a copy of that letter?)
There is a mailing list on which we discuss the set. You can subscribe to it by sending a message to
<EMAIL_ADDRESS>with an empty subject
line and 'Subscibe cold_numbers 'Your_Real_Name'' in the first line of the message.
Alternatively, you can deal with a real human being at
<EMAIL_ADDRESS>The digests of the list are stored at the digest storage depot.
All the cards so far designed can be found at the Cold Numbers Web Page.
Please feel free to help us in this project....artists especially!


-Lao Tzu


Which wind direction is impacting PM2.5 measurement the most?
Wind direction is one of the most important elements in impacting the PM2.5 measurement. From which we know where the pollution is coming from or blowing away. The graph is created in the following three different PM2.5 levels: “under 35 µg/m^3”, which is within the US EPA standard level and healthy, “between 35 to 150 µg/m^3”, and “over 150 µg/m^3” , which consider “Unhealthy” in Air quality index (AQI) value. You can click on the buttons and explore the wind direction at each PM2.5 levels! The parameter in the middle showing the level you are currently on.


Code 128 Encoder example
This example does not use the font, but instead uses the output method "weights" to render the barcode to a canvas
type some Text:


Probably YOU too bought the kindle to read those pdfs that you having been stashing in your hard drive and wondering when you will get to read them. YOU too considered it would be fantastic to read them, a single device for only books. Consider this no calumny to the device. But PDFs are seriously not its cup of tea. Mercurial, YOU might be seeing the way the PDF is rendered on the crisp screen. All those toggling and finger gymnastics to get to the line. Dah! I too didn’t seem comfortable.
Next came the fever of converting them to funny formats like .mobi etc that made a nicely indented book look like a unorganised vomit of words.
I tried assiduously to somehow read and lost interest until I stumbled upon a slick python library pyPDF while solving a problem with printing PDFs.
Clip the borders and Light you shall see !
Kindle does automatically clip borders but it retains the primordial page number which limits the usability and since, it also indexes the page number anyway, even if I remove it using some python script it wont hurt.
So, This is what kindify does. Its a command line python utility that simply takes the pdf you intent to read and returns a PDF with the same name but -kindified appended to its file name to be read on the Kindle.
The only dependency is pyPDF .
Install PyPDF using pip :
pip install pypdf
Now clone the github repository:
git clone https://github.com/IndianTinker/kindify.git
Now, paste the PDF in the kindify directory and run the command:
python kindify.py yourPdfName.pdf
An interactive menu will pop up with list of some famous book houses that have predefined cropping parameters. You can always choose the custom one to suit your needs or edit the predefined ones to suit your needs.
Lets see the magic in this sample from Orielly. Before the script the PDF renders as follows:
And after the script
There is a difference between the two images. Clearly the second one is a bit more clear. So, yet again Python saves the day!
Cheers!
Rohit


I Am Zambia Project
This project started as an assignement for my System Analysis and Design class for the IS program. We were supposed to find a system that could be improved in an organization then conduct a comprehensive analysis and create a formal proposal for improvements. We found a local non-profit, I Am Zambia, and saw many improvements that could be made to their volunteer onboarding process. We analyzed the current process and designed a new system that would be much simpler to use, while also saving them time and money. Though the project could have ended there, my group felt passionate enough about the cause that we decided to build a prototype recruiting website to show how the improvements we had proposed could be implemented.
- The Church of Jesus Christ of Latter-day Saints, Volunteer Representative (Oct 2016 - Oct 2018)
- Taught Christian principles to hundreds of families and individuals and held free weekly English lessons for the community
- Led monthly regional conferences of 30+ volunteers which led to increased efficiency and volunteer success
- Managed residency documentation, travel logistics and planned meetings for 260 volunteers as Executive Secretary


First Refactor
In our first pass through the project we will just focus on breaking it up into more modular components, breaking apart the variables from the code, and cleaning up the base directory by moving out any files or templates into sub-directories.
-
Break
main.yml
into 3 purpose based playbooks -
Create a
site.yml
wrapper to allow a full deploy with 1 run ofansible-playbook
-
Break out the variables into separate files
-
Clean up the project directory
-
Move any templates into a
./templates
directory and update playbooks -
Move any files (e.g. used by
copy
module or similar) into a./files
directory and update playbooks
-
Refactor Approach
-
Make a refactor
git
branchEven if you don’t use
git
or other SCM (Source Code Management) tool it is a very good place to start. This will give you safety, and confidence, to make major changes with little to no risk. We’ll introduce basic git commands as we go along.git checkout -b refactor-pass-01
Sample OutputSwitched to a new branch 'refactor-pass-01'
cp main.yml provision_database_tier.yml cp main.yml provision_app_tier.yml cp main.yml provision_load_balancer_tier.yml
-
Edit each file so it contains only the appropriate play
Using the editor of your choice,
vim
is installed, delete the redundant extra plays from each of your new files. Your objective is to have 3 focussed playbooks which do 1 tier each.You can verify you haven’t introduced syntax errors by checking with
ansible-playbook --syntax-check
ansible-playbook --syntax-check *.yml
Sample Outputplaybook: main.yml playbook: provision_app_tier.yml playbook: provision_database_tier.yml playbook: provision_load_balancer_tier.yml playbook: teardown-app.yml
Linters such as
yamllint
,ansible-lint
, andansible-review
are outside the scope of this particular stage If you are curious to try then installpython3
and the usepip3
to installansible-review
sudo pip3 install ansible-review yamllint
Output omitted for brevity and yes using
sudo
forpip3
is a bad practice but a useful shortcut for now (use virtualenvs orpip3 install --user
and link to/usr/local/bin
would be better but a few more steps)Try it on your new playbooksansible-review provision*.yml
Sample OutputWARN: Best practice "Playbooks should not contain logic (vars, tasks, handlers)" not met: provision_database_tier.yml:2: [EXTRA0008] tasks should not be required in a play WARN: Best practice "Playbooks should not contain logic (vars, tasks, handlers)" not met: ....
Lots of warnings but no errors - lets return to those warnings later.
-
Wrap your 3 playbooks in a
site.yml
usingimport_playbook
cat site.yml
Sample Output- import_playbook: provision_database_tier.yml - import_playbook: provision_app_tier.yml - import_playbook: provision_load_balancer_tier.yml
-
Verify your new
site.yml
(if necessary runansible-playbook teardown.yml
first to delete the install)ansible-playbook site.yml
Success (hopefully) - now cleanup and move on to the next stage
A git
Digression
Now we have made some changes, added some files/playbooks, amd main.yml
is redundant it would be nice to snapshot our progress in git
.
This allows us to move forward confidently, and yet revert or recover back to a known good state
-
Configure some
git
global variablesFeel free to use whatever values you want below
git config --global user.email<EMAIL_ADDRESS>git config --global user.name "tok" git config -l
Sample<EMAIL_ADDRESS>(1) user.name=tok (2) core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true remote.origin.url=https://github.com/tonykay/ansible_flask_app_loader_all_in_one.git remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* branch.main.remote=origin branch.main.merge=refs/heads/main
Your changes have been applied
-
Your email
-
Your name
-
-
Now cleanup your repo and commit your changes
git rm main.yml git add --all git commit -m "Refactored and removed main.yml to site.yml"
Sample Output[refactor-pass-01 a61fb5c] Refactored and removed main.yml to site.yml 5 files changed, 300 insertions(+), 296 deletions(-) delete mode 100644 main.yml create mode 100644 provision_app_tier.yml create mode 100644 provision_database_tier.yml create mode 100644 provision_load_balancer_tier.yml create mode 100644 site.yml
You can check on your changes and state with git status
and view the commit history withgit log
Refactoring the Variables
It is, generally, a bad practice to store code and configuration together, and your 3 playbooks are full of variables. Variables, or vars, can change frequently and being able to modify these or supply alternatives simply is very powerful. In a mature codebase the playbooks, roles, and collections may become predominately read-only in day to day use with the var or inputs changing far more frequently.
-
Break each set of vars out into separate "var files".
There are a number of places we could put them and many ways we can read them back into our playbooks. However in this case the simplest and easiest option is to move them into files in a
group_vars
directory. Each file will take the name of itsgroup
postfixed by.yml
and Ansible will automatically include it at run time.-
make the
group_vars
directorymkdir group_vars
-
Remind yourself of your
group
namesansible-inventory --graph
Sample Output@all: |--@internal: | |--@app_servers: | | |--app-01 | | |--app-02 | |--@database_servers: | | |--appdb1 | |--@load_balancers: | | |--frontend |--@ungrouped:
-
Copy your playbooks into
group_vars
using thegroup
names above postfixed with.yml
cp provision_database_tier.yml group_vars/database_servers.yml cp provision_app_tier.yml group_vars/app_servers.yml cp provision_load_balancer_tier.yml group_vars/load_balancers.yml
-
Cleanup each new variable file
-
Delete all non variable lines including
vars:
-
Fix the indentation, aligning the vars with column 1
This is a quick and simple way to ensure you get all the vars accurately across. Basically you are copying the playbooks over, and the stripping everything out other the the vars themselves. It is very common practice in ansible to start with a playbook and then refactor into more modular components by copying and cleaning up into a more composed structure.
vim
is extremely good at these types of operationsTable 1. vim command mode
optionsCommand Function ndd
Delete n lines (
ex
mode is even more powerful)n<<
allows you to change indentation levels over n multiple lines
For example your files should look like this:
head group_vars/database_servers.yml
Sample Outputpostgres_rhel7_repo: "https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm" postgres_packages: - postgresql10 - postgresql10-server - postgresql10-contrib - postgresql10-libs postgres_library: python-psycopg2 postgres_10_data_dir: /var/lib/pgsql/10/data postgres_10_bin_path: /usr/pgsql-10/bin
-
-
Now remove the vars from each of your playbooks
Edit each playbook removing the
vars:
section completely
-
-
Test your changes remembering to run
ansible-playbook teardown.yml
first if necessaryansible-playbook site.yml
Your, slowly getting better,
site.yml
should run successfully. If not debug, fix, until successful.YAML at first appears very fussy about indentation etc but soon this becomes natural. Adopt a consistent style as when creating lists for example you have 2 indentation styles to chose from. ansible-playbook <playbook-name> --syntax-check
us useful andpip3
can also installyamllint
-
Finally
commit
your changesgit add --all git commit -m "Refactored all vars to group_vars"
Sample Output[refactor-pass-01 9399a27] Refactored all vars to group_vars 6 files changed, 53 insertions(+), 54 deletions(-) create mode 100644 group_vars/app_servers.yml create mode 100644 group_vars/database_servers.yml create mode 100644 group_vars/load_balancers.yml
-
Examine your
git
history withgit log
git log
Sample Outputcommit 9399a277637e74cc9ccb167daa464d6b813dd552 Author: tok<EMAIL_ADDRESS>Date: Thu Jul 23 17:58:42 2020 +0000 Refactored all vars to group_vars commit a61fb5ce457e88759a8a63cdf4b938c9df73581e Author: tok<EMAIL_ADDRESS>Date: Thu Jul 23 17:10:22 2020 +0000 Refactored and removed main.yml to site.yml commit 531439bee9f84c1068be761e5c10fa65ad4abb7a Author: Tony<EMAIL_ADDRESS>Date: Tue Jul 21 13:30:19 2020 -0600 ....
Notice you also see my own earlier commits in the history prior to your own work
Clean Up your Templates
The root directory of your project is a bit cluttered, including several template files.
-
Make a
templates
sub-directorymkdir templates
-
Move all the jinja template files (ending
.j2
)mv *.j2 templates
-
All your playbooks now have an incorrect path
|
Sample Output
|
-
Fix each of the
src:
lines above to include thetemplates
sub-directory in the path -
Validate your work by running
ansible-playbook teardown-app.yml
and thenansible-playbook site.yml
-
Before committing your changes use
git status
to see the changes.git diff
will show the details of your editsgit status
Sample Output# On branch refactor-pass-01 # Changes not staged for commit: # (use "git add/rm <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # deleted: flask_service.j2 # deleted: haproxy.cfg.j2 # deleted: launch_resource_hub.j2 # deleted: pg_hba.conf.j2 # modified: provision_app_tier.yml # modified: provision_database_tier.yml # modified: provision_load_balancer_tier.yml # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # templates/ no changes added to commit (use "git add" and/or "git commit -a")
-
Save your changes with
git add
andgit commit
git add --all git commit -am "Cleaned up jinja templates to templates directory"
Sample Output[refactor-pass-01 7e0d63a] Cleaned up jinja templates to templates directory 7 files changed, 4 insertions(+), 4 deletions(-) rename flask_service.j2 => templates/flask_service.j2 (100%) rename haproxy.cfg.j2 => templates/haproxy.cfg.j2 (100%) rename launch_resource_hub.j2 => templates/launch_resource_hub.j2 (100%) rename pg_hba.conf.j2 => templates/pg_hba.conf.j2 (100%)
-
Finally
merge
you changes into yourmain
branchgit checkout main git merge refactor-pass-01
Sample OutputUpdating 531439b..7e0d63a Fast-forward group_vars/app_servers.yml | 26 ++++++++++++ group_vars/database_servers.yml | 24 +++++++++++ group_vars/load_balancers.yml | 3 ++ main.yml | 296 --------------------------------------------------------------------------------------------------------- provision_app_tier.yml | 77 +++++++++++++++++++++++++++++++++++ provision_database_tier.yml | 85 +++++++++++++++++++++++++++++++++++++++ provision_load_balancer_tier.yml | 81 +++++++++++++++++++++++++++++++++++++ site.yml | 3 ++ flask_service.j2 => templates/flask_service.j2 | 0 haproxy.cfg.j2 => templates/haproxy.cfg.j2 | 0 launch_resource_hub.j2 => templates/launch_resource_hub.j2 | 0 pg_hba.conf.j2 => templates/pg_hba.conf.j2 | 0 12 files changed, 299 insertions(+), 296 deletions(-) create mode 100644 group_vars/app_servers.yml create mode 100644 group_vars/database_servers.yml create mode 100644 group_vars/load_balancers.yml delete mode 100644 main.yml create mode 100644 provision_app_tier.yml create mode 100644 provision_database_tier.yml create mode 100644 provision_load_balancer_tier.yml create mode 100644 site.yml rename flask_service.j2 => templates/flask_service.j2 (100%) rename haproxy.cfg.j2 => templates/haproxy.cfg.j2 (100%) rename launch_resource_hub.j2 => templates/launch_resource_hub.j2 (100%) rename pg_hba.conf.j2 => templates/pg_hba.conf.j2 (100%)
Solution
I’ve deliberately created a second repo with a solution, to avoid the temptation of just checking out the relevant commit/tag/branch (more on them later). Meanwhile it can be found here
Next Steps
Congratulations, you know have a cleaner codebase that is more modular and easier to maintain. However it is still a bit "clunky" and it would be awkward for another team to "borrow" say your Postgres playbook.
The next step will be to move your playbooks, and some of the vars into reusable roles.


"You and I, as citizens, have the obligation to shape the debates of our time — not only with the votes we cast, but with the voices we lift in defense of our most ancient values and enduring ideals"
"There is not a liberal America and a conservative America - there is the United States of America. There is not a black America and a white America and latino America and asian America - there's the United States of America."
If you would like to learn a bit more about President Obama, check out this biography.
Created for the Tribute Page task on freecodecamp.com. Coded by Larry G.