text:
---
title: Palindrome Algorithms in JavaScript
date: "2020-05-15T10:52:18+09:00"
description: 'Going over several ways of solving the classic "is this string a palindrome" algorithm'
---

This post goes in depth into my thought process when solving algorithm problems. There will be code. The code will be written in JavaScript. If that doesn't appeal to you then turn back now.

If you're a beginner coder, then I hope this post will help you gain some insight into how to tackle algorithms. If you're unfamiliar with JavaScript, I hope you'll be able to pick up some new syntax or built-in methods and add them to your repertoire. If you're already a JavaScript expert and leetcode master, then I encourage you to message me about what areas I could improve.

## Defining the problem

If you're not familiar, a palindrome is a word or phrase that retains its spelling even when reversed, the quintessential example being "race car." Go ahead, confirm that it's a palindrome. You can flip it around however many times you like, the letters will always come in the same order: r-a-c-e-c-a-r.

I'm not quite sure why, but as far as algorithm problems go, this one comes up quite often. One thing I do know is that depending on the language you code it in, there are many approaches that you could take, so it's good to keep the space and time complexity of your solution in mind (as with all algorithms).

I'm going to go over several solutions in JavaScript. The function signature looks like this:

```javascript
/**
 * @param {string} str
 * @return {boolean}
 */
function isPalindrome(str) {}
```

## A simple (and inefficient) solution

Let's start with an approach that is easy to understand conceptually. The thought process goes like this: we need to determine whether `str` is the same as itself reversed, so why not start by reversing it?

So how can we reverse a string? A decrementing for loop could do the trick.

```javascript
let reversed = "";
for (let i = str.length - 1; i > -1; i--) {
  reversed += str[i];
}
```

That's all well and good, but we have to use `let` in order to reassign `reversed` for each character in `str`. I prefer to avoid reassignment when possible to help with readability and reduce the mental load of having to follow all the mutations of a variable.

Here's a way to reverse it all in one line, chaining together some built-in string and array methods.

```javascript
const reversed = str.split("").reverse().join("");
```

In case you're unfamiliar, `split` is a string method that returns an array of strings generated by splitting the parent at each occurrence of the specified delimiter. `reverse` does what it says on the tin, it reverses the sorting of an array. Then `join` is the opposite of split, it turns an array of strings into a single string, connecting those array elements together with the specified delimiter. In our case, the delimiter is an empty string, so `str` will be turned into an array of single-character strings, reversed, then joined back together again.

Now that we have `reversed`, we can simply compare it to `str`, and we have our solution. If they're the same, it's a palindrome. Altogether, here's the solution.

```javascript
function isPalindrome(str) {
  const reversed = str.split("").reverse().join("");
  return str === reversed;
}
```

One thing this solution really has going for it is readability. Two lines and you're done - does `str` equal itself `reversed`? It can't get much easier to understand than that. But, you may have noticed that I titled this section in a way that implies it's not very good. So what gives?

The biggest issue with this approach is the amount of space it requires. When the function is called, the computer already has space carved out in memory to store `str`, and then it needs to carve out another equally large chunk of memory to store `reversed`. In the case of an input like "racecar" it's trivial, but imagine the input string were the entire text of some novel you picked up off the shelf. Chances are good that if you looked at the first letter of the first word of the book, then looked at the last letter of the last word, that they are not the same. There's no reason to even look at any of the other letters, you can definitively determine that the novel's text is not a palindrome right there. But with the algorithm above, we store a reversed copy of all the characters in memory, just in case!

Let's see if we can't reduce our memory requirements.

## No copies

This time we're going to write `isPalindrome` without a `reversed` variable. It would be ideal if we could solve the problem only using the string that's been passed to us.

I already hinted at the algorithm we're going to use in the paragraph above about the case of a very long input string. If you were to pick up a book and determine if its text were a palindrome, you'd start by looking at the first letter and comparing it to the last letter. If they were the same, you'd go to the second letter and compare it to the second-to-last letter, and so on... If you miraculously reached the end of the book without finding a mismatch, then congratulations, that novel's a palindrome (and you have a lot of time on your hands).

Let's try to emulate that approach in code. In order to loop through each character in the string, we're going to use a for loop, comparing the front index of `str` to the corresponding back index along the way. In the case that they aren't the same, we can immediately return false without wasting time checking the rest of the characters.

```javascript
for (let front = 0; front < str.length; front++) {
  const back = str.length - 1 - front; // `front` places from the back
  if (str[front] !== str[back]) {
    return false;
  }
}
```

This is already starting to look good. But you may have noticed that there is one small optimization that can be made. In the current implementation, once the loop passes the halfway-point, it starts to make the same comparisons over again, just with `front` and `back` swapped. If it never finds a mismatch, then each pairing will end up being checked twice. So the optimization is to stop the loop once it has reached the midpoint of the string, because it's definitely a palindrome if the loop makes it there.

```javascript
for (let front = 0; front < str.length / 2; front++) {
  // same as above
}
```

Now `front` will increment from index 0 while `back` decrements from the last index, and they'll eventually meet at the midway point.

The final solutions looks like this:

```javascript
function isPalindrome(str) {
  for (let front = 0; front < str.length / 2; front++) {
    const back = str.length - 1 - front;
    if (str[front] !== str[back]) {
      return false;
    }
  }
  return true;
}
```

## Leveling up

The algorithms above work on the assumption that all characters are counted the same, including spaces, punctuation, and capitalization. But what if I only wanted to look at the _spelling_ of the word or phrase. For example, what if we wanted our algorithm to count all of the following as valid palindromes?

```
race car
racecar
Race Car
rAcEcAr!!!!
r!a@c#e$c%a^r
r      a     ce car
```

Now we're going to have to go back to the drawing board.

Let's start again with the opposed indexes approach, tracking two indexes that move from opposite ends toward the middle of the string. But we'll need to make a modification here. With an input like `r a c ecar`, the midway point of the string is _not_ the midway point of the letters ('e'). Since we can't be sure about the midway point of the actual letters we care about, we'll use a while loop instead of a for loop, which will allow us to have more control over updating the indexes.

```javascript
// runs the same as the for loop above
let front = 0;
let back = str.length - 1;
while (front < back) {
  if (str[front] !== str[back]) {
    return false;
  }
  front++;
  back--;
}
```

But now we've run into the first roadblock. In the case of `race car`, this algorithm will return false when comparing the letter "e" at index 4 with the space at index 5.

So we need to have a way to check if the character we're looking at is a valid letter of the alphabet. This way we can ignore all non-alpha characters (spaces, punctuation, etc.). A regular expression should do the what we need.

```javascript
const alpha = /[A-Za-z]/;
```

And now let's modify the while loop so that it skips to the next index when it finds a non-alpha character.

```javascript
while (front < back) {
  if (!alpha.test(str[front])) {
    front++;
    continue;
  }
  if (!alpha.test(str[back])) {
    back--;
    continue;
  }

  if (str[front] !== str[back]) {
    return false;
  }
  front++;
  back--;
}
```

The first two if blocks will increment `front` and decrement `back` until both of them are at an index containing a letter. Then those letters will be compared in the third if block, returning false if they're not the same. If they are the same, then it goes on to the next set of characters and continues the loop.

Now we have handled all non-alpha characters, but we still haven't handled capitalization. As I said before, I'd like `Race car` to count as a palindrome too. Let's change the comparison at the end of the while loop so that it doesn't account for case. This is simple enough to do by leveraging the string method `toLowerCase()` (although `toUpperCase()` could be used in the same way).

```javascript
if (str[front].toLowerCase() !== str[back].toLowerCase()) {
  return false;
}
```

Putting it all together, here's the final solution.

```javascript
function isPalindrome(str) {
  const alpha = /[A-Za-z]/;

  let front = 0;
  let back = str.length - 1;
  while (front < back) {
    if (!alpha.test(str[front])) {
      front++;
      continue;
    }
    if (!alpha.test(str[back])) {
      back--;
      continue;
    }

    if (str[front].toLowerCase() !== str[back].toLowerCase()) {
      return false;
    }
    front++;
    back--;
  }
  return true;
}
```

branch_name: refs/heads/production

gha_language: JavaScript


text:
# Use Borges DB as metadata on Engine instead of config files inside siva files.

| Field | Value |
| --- | --- |
| ENIP | 2 |
| Title | Use Borges DB as metadata on Engine instead of config files inside siva files. |
| Author | Antonio Navarro |
| Status | Rejected |
| Created | 2017-11-15 |
| Updated | 2017-11-21 |
| Target version | 0.X |

## Abstract

In our current pipeline,
the element that is in charge of fetch and organize repositories over root-repositories ([Borges][2]) is already creating a database with a lot of useful metadata about the repositories.
With this ENIP we want to use that metadata to improve Engine performance.

## Rationale

Borges is creating a new row per repository fetched.
The actual schema is:

|Column|Type|Description|
|---|---|---|
|ID|ULID|Unique ULID for a repository |
|CreatedAt|Timestamp||
|UpdatedAt|Timestamp||
|Endpoints|Array[String]|Endpoints is a slice of valid git endpoints to reach this repository. For example, git://host/my/repo.git and https://host/my/repo.git. They are meant to be endpoints of the same exact repository, and not mirrors.|
|FetchStatus|String|Actual status of the repository, it can be "not_found", "fetched", "pending" and "fetching"|
|FetchedAt|Timestamp|FetchedAt is the timestamp of the last time this repository was fetched and archived in our repository storage successfully.|
|FetchedErrorAt|Timestamp|FetchErrorAt is the timestamp of the last fetch error, if any.|
|LastCommitAt|Timestamp|LastCommitAt is the last commit time found in this repository.|
|References|JsonB|References is the current slice of references as present in our repository storage.|
|IsFork|Boolean|IsFork stores if this repository is a fork or not. It can be nil if we don't know.|

The content of the References Json is:

|Column|Type|Description|
|---|---|---|
|Name|String|Name is the full reference name.|
|Hash|Array[Byte]|Hash is the hash of the reference.|
|Init|Array[Byte]|Init is the hash of the init commit reached from this reference.|
|Roots|Array[Array[Byte]]|Roots is a slice of the hashes of all root commits reachable from this reference.|
|Time|Timestamp|Time is the time of the commit this reference points too.|

The JDBC connector returns [json and jsonb types as String][1],
so we should apply a defined function to parse as a StructType to be able to query internal content.

## Specification

Create new method on the Engine that able us to register the "repositories" and "references" tables as views from a JDBC datasource.
We should call that methods something related with Borges because this functionality is heavily sticked to it.
Example: `fromBorgesMetadata(options)`

Because of "references" is one of the columns of the "repositories" table,
we should create a view from a query that applies the `from_json()` function,
and expand the result to make a new table with all the reference elements of the arrays.

As first approach, the actual table schemas will be preserved and data mapped to that schema.
Actually, the schema can be modified if the main columns,
the ones used to join data between tables,
are preserved.

The "repositories" view will filter all repositories that are not in *fetched* status to avoid consistency problems with the existing rooted-repositories.

We also need to check if the names for special references (HEAD and master) are specified at the same way as they are specified into rooted-repositories.

The actual logic to generate the repository id on the Engine will be reused to get that data from Borges table.

## Alternatives

The actual Spark API allows us to create a DataFrame from any JDBC connection.

## Impact

New method on the Engine to use Borges views instead of standard ones.

## References
- [Borges][2]
- [json and jsonb types are returned as String][1]

[1]: https://github.com/apache/spark/blob/0c0ad436ad909364915b910867d08262c62bc95d/sql/core/src/main/scala/org/apache/spark/sql/jdbc/PostgresDialect.scala#L58
[2]: https://github.com/src-d/borges

repository: syllogy/jgit-spark-connector

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: syllogy/jgit-spark-connector


text:
## Tutorial From Udemy About React And Redux

This was a project in the Modern React with redux course from Udemy, so far this course has been very rewarding.

```
	> npm install
	> npm start
```

goto openweathermap.org and request a new api. Then in the root of the project

```
  > touch apikey.js
```

In the api key file

```
  export default const API_KEY = <YOUR API KEY HERE> ;
```

### The Purpose of this app is to take user input and return the relevant weather data from the API.

license: MIT


text:
# Jobs

Some resources in the Librato API allow you to make requests which will take longer to complete than is reasonable for a single request-response cycle. These resources will respond with a job which you can use to follow progress and final state of the request.

Requests which start jobs will respond with an HTTP status code of `202 Accepted`. They will also include the URI to query for job status as a `Location:` response header.

#### Job Properties

Jobs can be queried for their current state and other status information. They have the following properties:

Property | Definition
-------- | ----------
id | Each job has a unique numeric ID.
state | Reflects the current status of the job, will be one of `queued`, `working`, `complete` `failed`, or `canceled`.
progress
`optional` | a floating point number from `0.0-100.0` reflecting how close to completion the job is currently.
output
`optional` | if the job results in output it will be available in this field.
errors
`optional` | if the job results in any errors they will be available in this field.

## Retrieve a Job

>Check status for job qith the `id` 123456:

```shell
curl \
  -i \
  -u $LIBRATO_USERNAME:$LIBRATO_TOKEN \
  -X GET \
  'https://metrics-api.librato.com/v1/jobs/123456'
```

```ruby
Not available
```

>Response properties may vary depending on the state of the job. Some jobs may only report `id` and `state`, so you are encouraged to consider `state` authoritative rather than relying on the presence of other properties (`errors` or `progress` for example).

>Job in progress:

```json
{
  "id": 123456,
  "state": "working",
  "progress": 31.56
}
```

>Job which has completed successfully:

```json
{
  "id": 123456,
  "state": "complete",
  "progress": 100.0
}
```

>A queued job which has not started yet:

```json
{
  "id": 123456,
  "state": "queued"
}
```

>A job that has failed:

```json
{
  "id": 123456,
  "state": "failed",
  "errors": {
    "name": [
      "is invalid"
    ]
  }
}
```

Returns information for a specific job. All jobs will return their `id` and `state`. Some jobs may also return one or more [optional properties](#jobs).

#### HTTP Request

`GET https://metrics-api.librato.com/v1/jobs/:id`

#### About Jobs

Jobs are spawned by other resources in the Librato API when an operation will take longer to complete than is allowed by a single request-response cycle.


text:
# Simple NLP Operations

A project for basic text operations for begginers.

## Project Description

In this project, we apply some simple NLP operations for a given random script. The text file has been gatherd from the website of http://www.randomtextgenerator.com/. The operations are detecting the frequency of each word in the tex and obtaining the frequency of a user input word if it exist in the text.

First, we read the script file and eliminate all punctuation marks between words. Then we defined a word detector function to
find each word and put it in a location list to be able to find the individual frequencies.

Following, we defined the distribution function to be able to determine the number of the frequencies of the words.

The program has 3 outcomes once we run it. You could find the frequency of each word in the text or you may enter a word from the text and then obtain the number of the frequency of that particular sample word. Or you may quit from the program.

## Execution

To execute the program, you need to have Python 3.x and an editor. If you do not have Python installed yet, it is highly recommended that you install the Anaconda distribution of Python, which already has the above packages and more included. Make sure that you select the Python 3.X installer and not the Python 2.7 installer.


text:
## Intro to Mapping Data
###Parsons: Journalism + Design
###[Web Coding for Interactive Design](https://github.com/auremoser/web-coding)
**October 7th, 2015**

![Satellite](https://raw.githubusercontent.com/auremoser/web-coding/master/_imgs/losing.jpg)
ProPublica, [_Losing Ground_](http://projects.propublica.org/louisiana/).

Find this document here:

* Gist: <http://tinyurl.com/wc-webmaps>

### Outline

1. Mapping Basics
	+ You are Here.
	+ Types + Topics
	+ Anatomy of a Webmap
2. Mapping Data
	+ Data + Date Formats
	+ Collecting + Sync Tables
	+ Storing
3. Mapping Tools
	+ Examples
	+ Tour of the interface
	+ APIs / JS Libs
  	+ Data Import + Sync Tables
	+ Customizing UI + CartoCSS
4. Creating Custom Maps
    + Mapping in the Editor
	+ Mapping in Code
		+ Python
		+ Node
		+ R
5. Building A Narrative
	+ Case Study 1: [NYC Building Choropleth Map](http://cdb.io/1Nvepxt)
	+ Case Study 2: [NYC Bikelane Category Map](http://cdb.io/1J4MvVW)
	+ Cast Study 3: [Multivariate Data Map App](http://bikestorming.com/)
	+ Tell Time/Stories: Odyssey + Torque
	+ Partner Graphics: Graphs + Charts
	+ Bl.ocks for Mapping display
6. Parsons](https://raw.githubusercontent.com/auremoser/web-coding/master/_imgs/map.jpg)

Where are you? If I gave you directions here, you could say you were at

> 63 5th Ave, New York, NY 10003

But if I wanted to describe the location as a point on a map, I might describe the same location using latitude and longitude:

> 40° 73' 53.04", -73° 99' 41.35"

It reads as "40 degrees, 73 minutes and 53.04 seconds, negative 73 degrees, 99 minutes and 41.35 seconds"

We describe locations with a [spatiotemporal notation](https://en.wikipedia.org/wiki/Longitude_(book)), it's also somewhat obscure. So let's describe the same place using longitude and longitude but using decimal degrees instead of minutes and seconds. There are a number of conversion tools available online to do this:

> 40.735304, -73.994135

###Types + Topics

![Gallery of maps](https://raw.githubusercontent.com/auremoser/gdi-webmap/master/img/gallery.jpg)

There are many different types of map you can make, browse [this gallery](https://cartodb.com/gallery/) to view some options. Most maps illustrate some kind of geospatial change.

**DYNAMIC MAPSs**
![Time Travel Map](https://raw.githubusercontent.com/auremoser/hasadna/master/img/rainbow.jpg)

Source: [Time Travel Between Counties](http://mdweaver.github.io/times_year/), Carto.JS

**WEATHER MAPS**
![Realtime Precipitation](https://raw.githubusercontent.com/auremoser/140realtime/master/img/precip.jpg)

Source: [Realtime Precipitation Map](https://team.cartodb.com/u/andrew/viz/13062538-b129-11e4-a9f5-0e9d821ea90d/embed_map) | [NOAA Weather data](http://www.srh.noaa.gov/ridge2/RFC_Precip/)

![Realtime Climate Tracking](https://raw.githubusercontent.com/auremoser/140realtime/master/img/climate.jpg)

Source: [Vizonomy + NOAA collaboration on Asterra's Climate Dashboard](http://coast.noaa.gov/digitalcoast/stories/vizonomy)

**TRAFFIC MAPS**
![Realtime Traffic Map](https://raw.githubusercontent.com/auremoser/140realtime/master/img/muni-animated.gif)

Source: [Traffic Change Data for SF](https://publicdata-transit.firebaseio.com/sf-muni) | [Municipal Traffic in SF App](http://track-sf-muni.cartodb.io/) | [CartoDB + Firebase](https://www.firebase.com/blog/2015-04-10-realtime-maps-cartodb-firebase.html)

**CRISIS MONITORING MAPS**

[![Realtime Earthquake Map](http://i.imgur.com/n5pVfee.png)](https://team.cartodb.com/u/eschbacher/viz/8075e1f2-33c5-11e5-bd0a-0e4fddd5de28/embed_map)

Source: [Andy's Earthquake Workshop](https://gist.github.com/ohasselblad/4c6b8dc877dc6c870322)

**DATA SEARCH TOOLS**
![GDELT Geographic News Search Tool](https://raw.githubusercontent.com/auremoser/140realtime/master/img/gdelt.jpg)

Source: [GDELT Geographic News Search Tool](http://gns.gdeltproject.org/)

Journalists have used the [GDELT](http://gdeltproject.org/) data to [track wildlife crime](http://news.nationalgeographic.com/2015/07/150706-wildlife-crime-technology-poaching-endangered-animals/), and the [spread of the Islamic State in the Middle East](http://foreignpolicy.com/2015/06/19/islamc-state-big-data-middle-east/) among other things.

You can fork the GDELT hourly synced data set from the CartoDB DataLibrary and add it as a layer on your map or use the [Geographic Search Tool](http://blog.gdeltproject.org/announcing-gdelt-geographic-news-search/) linked above to search for tags of interest.

**CHART GRAPHICS**

![County Chart](https://raw.githubusercontent.com/auremoser/hasadna/master/img/chart.jpg)

Source: [Geogia County Car Crash Counts](http://bl.ocks.org/auremoser/6236a61e5383ab0bc71d), C3.JS

**COMPARISON NARRATIVE**

![Michael's Syrian Refugee visualization](https://raw.githubusercontent.com/auremoser/images/master/syria.jpg)
[Map population by relative density](http://projects.aljazeera.com/2013/syrias-refugees/)

* Maps give you more context than most visualizations.
* They allow you to apply data to a recognizable topography.

**Sources**

* [**CartoDB**](cartodb.com): light open source library and graphical user interface application for hosting and visualizing geospatial data
* [**ChartJS**](http://www.chartjs.org/): light library for creating charts and graphs
* [**GDELT**](http://gdeltproject.org/): the global database of events languages and tones

### Anatomy of a WebMap

![Webmap Gif](https://raw.githubusercontent.com/auremoser/gdi-webmap/master/img/slippy.gif)

Maps are composed of:

####1. Tiles (often)

![Stamen Tiles](https://raw.githubusercontent.com/auremoser/gdi-webmap/master/img/stamen.jpg)

Tiles are 256x256 pixels squares that plot one next to the other to stitch together a pseudo-seamless image; the tiles draw dynamically as you focus and zoom in on your map so that the map draws on a continuous canvas

![zoom pyramid](https://raw.githubusercontent.com/auremoser/gdi-webmap/master/img/pyramid.jpeg)

####2. Feature Layers

Map layers that populate on top of your basemap

####3. Javascript/HTML/CSS for rendering on the web

With these languages you can publish your map with the basetiles loaded and your data layers appropriately geocoded; with javascript you can also add to the interactivity of your map, revealing metadata in the tooltips

### Mapping Data
#### Formats + Free Sources

You can get geospatial data for your feature layers in lots of places, here's a [nice resource with a list of common data formats that you might encounter](http://gisgeography.com/gis-formats/). Here are some examples.

* [Columbia University GeoSpatial Datasets](http://library.columbia.edu/locations/dssc/data/nyc.html)
* [Curated List of NYC Data](https://nycitymap.wordpress.com/2014/11/18/nycgeo-data/)
* [NYC DOT DataFeeds](http://www.nyc.gov/html/dot/html/about/datafeeds.shtml)
* [NYC Open Data Portal](https://nycopendata.socrata.com/)
* [Beta NYC's NYC Open Data Sources](http://bit.ly/nyc-data-resources)
* [NYC Citizen Complaint Review Board](http://www.nyc.gov/html/ccrb/html/news/statistics.shtml)
* [Federal Data Resources](https://etherpad.mozilla.org/fed-data)
* [Awesome Public Datasets](https://github.com/caesar0301/awesome-public-datasets)

#### Collecting + Sync Tables

We'll be collecting data from multiple sources. Most of which are available in [the repository](https://github.com/auremoser/gdi-webmap/) where our data will be stored. In this case, point (library), lines (bikelanes), and polygons (building footprints).

**BIKELANES**

* [NYC Open Data](https://nycopendata.socrata.com/)

**LIBRARIES**
* OSM: Open StreetMap + [Overpass Turbo](http://overpass-turbo.eu/)

![Overpass](https://raw.githubusercontent.com/auremoser/gdi-webmap/master/img/turbo.jpg)

You can read more about Overpass on the [Open Street Map Wiki](http://wiki.openstreetmap.org/wiki/Overpass_turbo).

Steps:
* Pan manually to an area in OverPass Turbo
* Go to the "Wizard"
* Look up the appropriate OSM tag in the OSM wiki
* Search for "amenity=library" or whatever
* Export your data as GeoJson or KML
* Upload into CartoDB or another interface

Notes:
* only nodes, only ways, only relations (-> limit so it doesn't map data you're not interested in)
* search for something that is too large it freezes (-> define your bounding box)

![Turbo Interface](https://raw.githubusercontent.com/auremoser/gdi-webmap/master/img/overpass.jpg)

**BUILDINGS**
* CartoDB Data Library

![Data Library](https://raw.githubusercontent.com/auremoser/gdi-webmap/master/img/datalibrary.jpg)

* [NYC Pluto Data Downloader](http://chriswhong.github.io/plutoplus/)

![NYC Pluto Downloader](https://raw.githubusercontent.com/auremoser/gdi-webmap/master/img/pluto.jpg)

There are lots of geospatial data formats that may or may not be easy to parse. Here's [a short list](http://docs.cartodb.com/cartodb-editor.html#supported-file-formats) of ones that are commonly imported into CartoDB.

#### Case Study 1: Libraries!

So let's take a look at this library data. You want to lead people to all of the libraries in NYC. You can use the kml file [here in the data folder](https://github.com/auremoser/web-coding/tree/master/_practice/data/libraries.kml).

You can get the libraries from OSM or NYC Open Data but let's go with the KML from OSM that we extracted with OverPass.

`.kml` which is a notation for XML that first made popular by Google Earth before becoming standardized. Google Mapping Products happily use kml files. Check to see how the locations are described:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2"><Document>
<name>overpass-turbo.eu export</name>
<description>Filtered OSM data converted to KML by overpass turbo.
Copyright: The data included in this document is from www.openstreetmap.org. The data is made available under ODbL.
Timestamp: 2015-08-19T17:02:03Z</description>
<Placemark><name>SC Williams Library</name><Polygon>
	<outerBoundaryIs>
		<LinearRing><coordinates>-74.0254348,40.7450718 -74.0255769,40.7445846 -74.0251885,40.7445156 -74.0251471,40.7446466 -74.0251306,40.7446862 -74.0250324,40.7450032 -74.0254348,40.7450718</coordinates>
		</LinearRing>
	</outerBoundaryIs></Polygon><ExtendedData><Data name="@id"><value>way/26974141</value></Data>
	<Data name="amenity"><value>library</value></Data>
	...
```

Notice that the point coordinates are in the format <coordinates>longitude, latitude</latitude>. Some geoformats are long, lat and others are long, lat. This makes everyone sad.

When coordinates cannot easily be parsed they go to "null island," a fictional place at coordinates (0,0).

![Null-island](https://raw.githubusercontent.com/auremoser/gdi-webmap/master/img/null_island.jpg)

In a bit, we'll show how you can convert, process and use a file like this to plot data on your map!

#### Storing

CartoDB is a PostGres database in the cloud, which means it handles a lot of your backend data needs and allows you to query for data and pull those data and basemap tiles into your front-end code.

You can also store your data in Github, or in another service that makes it web accessible. Read more about [that here](https://github.com/blog/1541-geojson-rendering-improvements) and [here](https://github.com/blog/1528-there-s-a-map-for-that).

### Mapping Tools

![Logos](https://raw.githubusercontent.com/auremoser/gdi-webmap/master/img/logos.jpg)

There are loads of ways to approach a map here are a few approaches to mapping the same dataset.

#### Map Making Exercise

We can make a map with the libraries data, or other data in the [gdi data folder](https://github.com/auremoser/web-coding/tree/master/_practice/data) for this workshop.

**Using Google Maps**

* <https://www.google.com/maps/d/>
* create account if you don't already have a Gmail account
* click on Import Map in top left hand menu (or My Maps -> Create map in some Google Maps UIs)
* upload `libraries.kml`
* explore changing the map features if you would like

**Using Mapbox**

* <https://mapbox.com/>
* create account if you don't already have a Mapbox account
* click on the Data tab at the top right hand corner of the screen; * click on import
* upload `libraries.kml`
* select map features if you would like then click on Import Features
explore changing the map features if you would like

**Using CartoDB**

* <https://cartodb.com/>
* create account if you don't already have a CartoDB account, [use this URL](https://cartodb.com/signup?plan=academy) to get boosted features
* click on Create Map; select Map View at the top of the screen
* click on the '+' or Add Layer option at the top of the right side menu
* upload `libraries.kml`
* explore changing the map features if you would like

**Using Leaflet**

You can also make a map from scratch using Leaflet.js (http://leafletjs.com/) to attach a set of points to a map made of tiles provided by OpenStreetMap.

You will first need to convert your kml file into GeoJSON (although I have both in the [data folder](https://github.com/auremoser/web-coding/tree/master/_practice/data)) for this workshop.

GeoJSON is a file format that is easily digestable by JavaScript. If you have a data format (shp, kml) that is not geojson you can convert it to the right format for your code with [GeoJSON.io](http://geojson.io/)/

* go to http://geojson.io/
* from the menu *Open* select *File* and upload our kml file: https://github.com/copystar/do15/blob/master/combined-library-data.kml
* notice how GeoJSON looks like in the side-menu

```
{
  "type": "FeatureCollection",
  "generator": "overpass-turbo",
  "copyright": "The data included in this document is from www.openstreetmap.org. The data is made available under ODbL.",
  "timestamp": "2015-08-19T17:02:03Z",
  "features": [
    {
      "type": "Feature",
      "id": "way/26974141",
      "properties": {
        "@id": "way/26974141",
        "amenity": "library",
        "designation": "Library",
        "name": "SC Williams Library"
      },
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              -74.0254348,
              40.7450718
            ],

```

* after the map is drawn, from the menu *Save*, select *GeoJSON"
* refer to "Adding GeoJSON to Leaflet with Link Relations" : http://lyzidiamond.com/posts/osgeo-august-meeting/ to find the HTML that use can use as a template that will import GeoJSON into a map created by Leaflet.js
* use *http://{s}.tile.osm.org/{z}/{x}/{y}.png* for your map tiles
* use libraries.geojson for your geojson layer: https://github.com/auremoser/gdi-webmap/blob/master/libraries.geojson
* explore changing the map features if you would like using Leaflet.js: http://leafletjs.com/

#### Examples
+ [Alcatraz Escape Revisited](http://www.washingtonpost.com/news/morning-mix/wp/2014/12/15/the-alcatraz-escapees-could-have-survived-and-this-interactive-model-proves-it/)
+ [LA Sheriff Election Results](http://graphics.latimes.com/2014-la-sheriff-primary-map/)
+ [Starwars Galaxy Map](http://www.swgalaxymap.com/)
+ [Demonstrations in Brazil](http://blog.cartodb.com/mapping-the-world-ongoing-demonstrations-in-brazil/)
+ [Global Forest Watch](http://www.globalforestwatch.org/map/3/15.00/27.00/ALL/grayscale/loss,forestgain?begin=2001-01-01&end=2013-12-31&threshold=30)
+ [Urban Reviewer](http://www.urbanreviewer.org/#map=12/40.7400/-73.9998&sidebar=plans)

![urban-interface](https://raw.githubusercontent.com/auremoser/uofm-2015/master/img/urban.png)

![urban-reviewer](https://raw.githubusercontent.com/auremoser/nicar-test/master/img/urban_reviewer_code_example.png)

#### Tour of the interface

We'll use CartoDB for the subsequent exercises because of it's flexibility, support for SQL and JS, and backend handling for data management and geocoding.

![int-data](https://raw.githubusercontent.com/auremoser/nicar-test/master/img/int-data.jpg)
![int-upload](https://raw.githubusercontent.com/auremoser/nicar-test/master/img/int-upload.jpg)
![int-vis](https://raw.githubusercontent.com/auremoser/nicar-test/master/img/int-viz.jpg)
![int-share](https://raw.githubusercontent.com/auremoser/nicar-test/master/img/int-share.jpg)

#### APIs / JS Libs
You can read more about the [CartoDB APIs and JS Library here](http://docs.cartodb.com/cartodb-platform.html)

* [CartoJS](http://docs.cartodb.com/cartodb-platform/cartodb-js.html) - JS library for interacting with CartoDB
* [Maps API](http://docs.cartodb.com/cartodb-platform/maps-api.html) - generate public/private maps with data hosted on your CDB account
* [SQL API](http://docs.cartodb.com/cartodb-platform/sql-api.html) - run sql in your code to dynamically filter/request/query your mapped data stored in CartoDB via http calls
* [Import API](http://docs.cartodb.com/cartodb-platform/import-api.html) - push data to your CartoDB Account

#### Data Import + Sync Tables

**Geospatial data** is info that ids a geolocation and its characteristic features/frontiers, typically represented by points, lines, polygons, and/or complex geographic features.

**Issues:**
+ Comes in multiple formats ([supported formats for CartoDB](http://docs.cartodb.com/cartodb-editor.html#supported-file-formats))
+ Sources uncertain
+ Contains errors
+ etc.

**Geocoding + SQL/PostGIS**
The most basic SQL statement is:

```sql
SELECT * FROM table_name
```
1. `SELECT` is what you're requesting (required)
2. `FROM` is where the data is located (required)
3. `WHERE` is the filter on the data you're requesting (optional)
4. `GROUP BY` and `ORDER BY` are optional additions, you can read more about aggregate/other functions below.

There are two special columns in CartoDB:

1. `the_geom`
2. `the_geom_webmercator`

The first of these is in the units of standard latitude/longitude, while the second is a projection based on the [original Mercator projection](http://en.wikipedia.org/wiki/Mercator_projection) but [optimized for the web](http://en.wikipedia.org/wiki/Web_Mercator).

If you want to run SQL commands and see your map update, make sure to `SELECT` the `the_geom_webmercator` because this is the column that's used for mapping--the other is more of a convenience column since most datasets use lat/long.

**Sync Tables**

![Sync Tables](https://raw.githubusercontent.com/auremoser/140realtime/master/img/sync.png)

The Editor is especially setup to process realtime data updates via [sync tables](http://blog.cartodb.com/synced-tables-create-real-time-maps-from-data-anywhere/).

You can import data that lives online via a URL, and set it to pull and update your map at regular intervals.

Check the [file types supported](http://docs.cartodb.com/cartodb-editor.html#supported-file-formats) in sync tables; keep in mind that it also works with dropbox + google drive.

Notes:

* to auto-geocode a sync table, verify that it contains the following:
	* country column, a latitude column and a separate longitude column
	* a column of IP addresses
* to edit sync tables you need to be disconnected from the datasource, so during syncing, you can use SQL to manipulate the dataset on the fly
* you can create sync tables in both the Editor and via the Import API

#### Customizing UI + CartoCSS

![Basemaps](https://raw.githubusercontent.com/auremoser/140realtime/master/img/basemaps.jpg)

You have myriad customization options in the in-browser editor:

* `sql` - run sql and postgis functions across your data
* `wizard` - adjust the type, colors and fills in your map
* `infowindow` - create hovers, tooltips with information from your datatables
* `css` - customize the css and style of your map outside the wizard
* `legends` - create keys for your map
* `filters` - filter the data without sql

Likewise, many types of visualizations:

+ **Simple** -- most basic visualization
+ **Cluster** -- counts number of points within a certain binned region
+ **Choropleth** -- makes a histogram of your data and gives bins different colors depending on the color ramp chosen
+ **Category** -- color data based on unique category (works best for a handful of unique types)
+ **Bubble** -- size markers based on column values
+ **Intensity** -- colors by density
+ **Density** -- data aggregated by number of points within a hexagon
+ **Torque** -- temporal visualization of data
+ **Heat** -- more fluid map of concentration; emphasis on far over near-view

### Creating Custom Maps

![Pluto Editor](https://raw.githubusercontent.com/auremoser/gdi-webmap/master/img/pluto-wizard.jpg)

#### Mapping in the Editor
The Editor GUI allows you to select your visualization "type" and customize color palettes, design details, and otherwise set the tone for your map. It also gives you ways to run sql and set your cartocss in the browser before you input those things as templates in your code.

##### Styles

* **Marker Fill:** change the size, color, and opacity of all markers
* **Marker Stroke:** change the width, color, and opacity of every marker's border
* **Composite Operation:** change the color of markers when they overlap
* **Label Text:** Text appearing by a marker (can be from columns)

##### Infowindows/hovers

![Infowindow options](https://raw.githubusercontent.com/auremoser/gdi-webmap/master/img/pluto-info.jpg)

+ Select which column data appear in infowindow by toggling column on
+ Customize further by selecting HTML-view

##### Basemaps

![Basemap options](https://raw.githubusercontent.com/ohasselblad/workshops/gh-pages/img/alaska/basemap_options.png)

Check out the base [CartoDB Basemaps from Stamen](https://github.com/stamen/cartodb-basemaps).

#### Mapping in Code

##### Python
Use the [CartoDB Python module](https://github.com/Vizzuality/cartodb-python) to create and update tables; check out [Andy's IPythonNB demos](http://nbviewer.ipython.org/gist/ohasselblad/b2475c95a23c5e070264).

##### Node
Use the [CartoDB Uploader](https://www.npmjs.com/package/cartodb-uploader) package available in NPM for working in Node.js

##### R
Use Kyle Walker's [R2CartoDB](https://rpubs.com/walkerke/r2cartodb) project to create and update tables in R.

### Building a Narrative

#### Case Study 1: [NYC Building Choropleth Map](http://cdb.io/1Nvepxt)

The data folder includes some point (libraries), line (bikelanes), and polygons (building footprints) for NYC. You can make a map with any one of these, or a dataset of your choosing.

Let's try the Building Footprint Data, making something like [this](http://cdb.io/1Nvepxt).

* Navigate to your Data Library in CartoDB
* Search for 'PLUTO' and select the NYC data; or Use the NYC PLUTO data Downloader linked above
* "Connect Dataset"
* "Create Map"
* Adjust aspects in the GUI

![Pluto Map](https://raw.githubusercontent.com/auremoser/gdi-webmap/master/img/pluto-M.jpg)

**EXPLORE THE DATA**

![Pluto Data](https://raw.githubusercontent.com/auremoser/gdi-webmap/master/img/pluto-D.jpg)

**CHANGE YOUR BASEMAP**

![Pluto Basemap](https://raw.githubusercontent.com/auremoser/gdi-webmap/master/img/pluto-basemap.jpg)

**MAKE A CHOROPLETH IN THE WIZARD**

![Pluto Editor](https://raw.githubusercontent.com/auremoser/gdi-webmap/master/img/pluto-wizard.jpg)

**STYLE IT WITH CARTOCSS**

![Pluto Data](https://raw.githubusercontent.com/auremoser/gdi-webmap/master/img/pluto-css.jpg)

**CREATE TOOLTIPS AND LEGENDS**

![Pluto Legend](https://raw.githubusercontent.com/auremoser/gdi-webmap/master/img/pluto-legend.jpg)

#### Case Study 2: [NYC Bikelane Category Map](http://cdb.io/1J4MvVW)

Let's try the Bikelane Data, making something like [this](http://cdb.io/1J4MvVW).

* Go to the [Class Repo](https://github.com/auremoser/web-coding/tree/master/_practice/data)
* Clone the repository to access the biklane data
* Upload it to CartoDB

**EXPLORE THE DATA**

![Bike Data](https://raw.githubusercontent.com/auremoser/gdi-webmap/master/img/bike-d.jpg)

**CHANGE YOUR BASEMAP**

![Bike Basemap](https://raw.githubusercontent.com/auremoser/gdi-webmap/master/img/bike-basemap.jpg)

**MAKE A CATEGORY MAP IN THE WIZARD**

![Bike Editor](https://raw.githubusercontent.com/auremoser/gdi-webmap/master/img/bike-wizard.jpg)

**STYLE IT WITH CARTOCSS**

![Bike CSS](https://raw.githubusercontent.com/auremoser/gdi-webmap/master/img/bike-css.jpg)

**CREATE TOOLTIPS AND LEGENDS**

![Bike Info](https://raw.githubusercontent.com/auremoser/gdi-webmap/master/img/bike-legend.jpg)

You can publish your map as is via the "Share" button in the interface, but if you would like to build a more custom version you can use the JS libraries and APIs mentioned above, and use CartoDB as your Data Store.

In the [class repo](https://github.com/auremoser/web-coding/tree/master/_practice/maps), you'll find a template for making your map as a site online:

* [index.html](https://github.com/auremoser/web-coding/blob/master/_practice/maps/index.html): setting up your map div and canvas
* [main.js](https://github.com/auremoser/web-coding/blob/master/_practice/maps/main.js): pulling in your basemap, cartodb feature layers and other details

If you run this locally, you'll get a map that looks like this:

![Bike Map](https://raw.githubusercontent.com/auremoser/gdi-webmap/master/img/bike.jpg)

Here's an example of [BikeData from Madrid](http://bl.ocks.org/auremoser/6e984c0ff866e04686c8) modified with SQL and hosted on Github.

When you upload your data, my co-worker worked on a little tool to study your dataset and suggest "interesting maps" to you in the GUI, to aid in your exploration of the tool. It'll be a little modal in the lower left corner and will produce demo maps with pre-fab SQL and CSS like this:

![Pecan](https://raw.githubusercontent.com/auremoser/gdi-webmap/master/img/bike-pecan.jpg)

Likewise, here's a demo of how to create selectors that reload data in CartoDB: <http://bl.ocks.org/ohasselblad/e5e438b4e83a4c1d12e9>

#### Cast Study 3: [Multivariate Data Map App](http://bikestorming.com/)
Bikestorming is a mobile app for urban cycling built with open data on CartoDB with MapBox Baselayers. They extract from public and social data sources to build both the iOS app and their open data portal for bike info.

![Bkx Data Store](https://raw.githubusercontent.com/auremoser/gdi-webmap/master/img/bkx-profile.jpg)

![Bkx Mobile screens](https://raw.githubusercontent.com/auremoser/gdi-webmap/master/img/bkx.jpg)

![BiciDB](https://raw.githubusercontent.com/auremoser/gdi-webmap/master/img/bicidb.jpg)

#### Tell Time/Stories: Odyssey + Torque

Outside of the CartoJS library, we have others to help you build dynamic narrative with your data.

**Maps that tell Time** - **[Torque](http://docs.cartodb.com/tutorials/introduction_torque.html)**

![Realtime Traffic Map](https://raw.githubusercontent.com/auremoser/140realtime/master/img/muni-animated.gif)

Source: [Traffic Change Data for SF](https://publicdata-transit.firebaseio.com/sf-muni)
Demo: [Municipal Traffic in SF App](http://track-sf-muni.cartodb.io/)
Blog: [CartoDB + Firebase](https://www.firebase.com/blog/2015-04-10-realtime-maps-cartodb-firebase.html)

1. [Demonstrations in Brazil](http://blog.cartodb.com/mapping-the-world-ongoing-demonstrations-in-brazil/)
2. [Animal migration patterns](http://robbykraft.github.io/AnimalTrack/)
3. [Diwali Celebrated](http://bl.ocks.org/anonymous/raw/b9b7c7d6de1c6398e435/)
4. [Ramadan Tweets w/OdysseyJS](http://bl.ocks.org/anonymous/raw/2f1e9a5a74ceeb88e977/)
5. [Alcatraz Escapees](http://www.washingtonpost.com/news/morning-mix/wp/2014/12/15/the-alcatraz-escapees-could-have-survived-and-this-interactive-model-proves-it/?tid=hp_mm&hpid=z3)
6. [Lynching and the Press](http://yale.cartodb.com/u/mdweaver/viz/ffd06ece-8545-11e4-a898-0e018d66dc29/embed_map)

![Twitter Import](http://i.imgur.com/d3GSSYQ.gif)

**Maps that tell Stories** - **[Odyssey JS](http://cartodb.github.io/odyssey.js/index.html)**

1. [*Al Jazeera*: Israeli-Palestinian Conflict by Tweets](http://stream.aljazeera.com/projects/socialmediaconversation/)
2. [The Sounds of 11M](http://www.cadenaser.com/sonidos-11m/)
3. [Berlin Wall Historic Tour](http://bl.ocks.org/namessanti/raw/d5cf706f68b7c6dce9a3/#3)

#### Partner Graphics: Graphs + Charts

You can use CartoDB's SQL API to query your data and pull it into any charting library of your choosing.

You can easily wire up a chart of pollution data for example, set it as a sync table to update continuously, [check the code here](http://bl.ocks.org/auremoser/6c51769ef05b812690fc).

![chart](https://raw.githubusercontent.com/auremoser/hasadna/master/img/7-chart.jpg)

Learn more about it [here](http://docs.cartodb.com/tips-and-tricks.html#charts--graphs)!

Here are some examples:

Type | Title | Link/Demo | BlogPost
---- |------ | --------- | ---------
[Chart.js](http://www.chartjs.org/) Bar Graph | Traffic Data| [Aurelia's Block](http://bl.ocks.org/auremoser/af95a29cd76267d3925e)
[Highcharts](http://www.highcharts.com/) | Sensor Data  | [Github](https://github.com/auremoser/VitalSigns-water/) / [Demo](http://auremoser.github.io/VitalSigns-water/)  | [MOW Post](http://blog.cartodb.com/map-of-the-week-pulse-plotting/)
[Highcharts](http://www.highcharts.com/) | Weather Data | [Aurelia's Block](http://bl.ocks.org/auremoser/96b70f6dbcc724ecc973) | [Tutorial](https://stackedit.io/viewer#!provider=gist&gistId=e2d4f0f0b71f258f3ac9&filename=beirut.md)
[Chart.js](http://www.chartjs.org/) Line Graph | Tornado Data  | [Andrew's Block](http://bl.ocks.org/andrewxhill/9134155)
[Plot.ly](https://plot.ly/) | Earthquake Data  | [Plotly Tutorial](https://plot.ly/ipython-notebooks/cartodb/) | [CartoDB Blog](http://blog.cartodb.com/plotly/)

### Resources

![XKCD](https://raw.githubusercontent.com/auremoser/gdi-webmap/master/img/xkcd.jpg)

#### GeoSpatial Data

1. [Local Data Resources](http://bit.ly/nyc-data-resources)
2. [National Data Resources](https://etherpad.mozilla.org/fed-data)

#### Mapping + CartoDB

1. [Map Academy](http://academy.cartodb.com)
    + [CartoDB.js](http://academy.cartodb.com/courses/03-cartodbjs-ground-up/lesson-3.html) -- build a web app to visualize your data, allowing for user interaction
	+ [SQL and PostGIS](http://academy.cartodb.com/courses/04-sql-postgis.html)
2. [CartoDB Tutorials](http://docs.cartodb.com/tutorials.html)
3. [CartoDB Editor Documentation](http://docs.cartodb.com/cartodb-editor.html)
4. [CartoDB APIs](http://docs.cartodb.com/cartodb-platform.html)
5. [Community help on StackExchange](http://gis.stackexchange.com/questions/tagged/cartodb)
6. [CartoDB Map Gallery](http://cartodb.com/gallery/)
7. [CartoDB Bootstrap Template by Chris Wong](https://github.com/chriswhong/cartodb-github-template)
8. [Listing of Map Data Formats](http://gisgeography.com/gis-formats/)

#### Visualization
1. [Charting Tools Repository](https://github.com/auremoser/chart-tools)
2. [Workshops @ CartoDB](http://cartodb.github.io/training/)
3. [Recommended tools for Visualizations](http://selection.datavisualization.ch/)
4. [Perception Concerns](https://github.com/tmcw/perception)
5. [Gestalt Theory](http://emeeks.github.io/gestaltdataviz/section1.html)
6. [Color Brewer](http://colorbrewer2.org/) or [Geocolor](http://geocolor.io/)


text:
---
type: rule
archivedreason:
title: Do you avoid replying to all when you are only BCC'd?
guid: 8c22bd4c-cfdf-4642-872c-a7fe2c251114
uri: do-you-avoid-replying-to-all-when-you-are-only-bcced
created: 2009-04-03T08:15:29.0000000Z
authors:
- title: Adam Cogan
  url: https://ssw.com.au/people/adam-cogan
- title: Cameron Shaw
  url: https://ssw.com.au/people/cameron-shaw
related: []
redirects: []

---

If you receive email via BCC, other recipients are not aware that you were sent a copy so it's actually a VERY BAD idea to Reply All in this case. It's ok to reply to the message you were BCC'd on, but it's not ok to send your reply to the people on TO or CC list. Only the sender should receive replies from BCC'd people.

<!--endintro-->
 This extends even further to the person using BCC in the 1st place. Generally when using BCC, you should always pause to make sure you are doing the right thing.
![](DontReplyAll.jpg)

9 times out of 10, you will find that your motivation for using BCC is something less than fully candid... and it's almost always better to use CC or forward instead.

branch_name: refs/heads/main

gha_language: TSQL


text:
### [CVE-2021-28002](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-28002)
![](https://img.shields.io/static/v1?label=Product&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=brighgreen)

### Description

A persistent cross-site scripting vulnerability was discovered in the Excerpt parameter in Textpattern CMS 4.9.0 which allows remote attackers to execute arbitrary code via a crafted payload entered into the URL field. The vulnerability is triggered by users visiting the 'Articles' page.

### POC

#### Reference
- https://www.exploit-db.com/exploits/49617

#### Github
No PoCs found on GitHub currently.

repository: trickest/cve

gha_language: HTML

gha_license_id: MIT

repo_name: trickest/cve


text:
# Steam Idle

> A simple tool for idling games on Steam.

[![Steam Idle Demo](https://j.gifs.com/3lnDgQ.gif)](https://www.youtube.com/watch?v=C91TULNSYa4)

A tool that let you idle any game in your Steam library.

## Download

Visit the [releases](https://github.com/DevNvll/Steam-Idle/releases "Releases")  page.
*Windows Only.*

## Dev
#### this is for development only. If you don't know what it is, you probably don't need this section
The application is built on [electron](http://electron.atom.io/ "Electron").

Install dependencies.
```
$ npm install
or
$ yarn
```
To start the application, run:
```
$ npm start:watch
```

## Build

```
$ npm run dist
```

Builds the app for Windows using [electron-builder](https://github.com/electron-userland/electron-builder/).

## License

MIT © [Henrick Mello](https://github.com/DevNvll)

repository: RomanHargrave/Steam-Idle

repo_name: RomanHargrave/Steam-Idle


text:
# Hostname to IP

Python script to find the ip addresses of a list of hostnames. The script will handle unknown host names as well.

Usage: hostname_to_ip.py in_file out_file

    in_file: The filename that contains a list of hostnames with 1 hostname per line.
    out_file: The filename where you want to output to go. The output will be in the form of
    hostname, ip per line.

```python hostname_to_ip.py test.txt results.txt```

test.txt contents:
```
google.com
asdlfjlsdasfasdfasf.com
yahoo.com
localhost
```

results.txt contents:
```
google.com, <IP_ADDRESS>
asdlfjlsdasfasdfasf.com, Unknown host
yahoo.com, <IP_ADDRESS>
localhost, <IP_ADDRESS>

```


text:
# ParticleSim
A Python GUI for visual, interactive simulations of physics concepts. This GUI uses the pygame library.

# Requirements to Run
- Python 3
- pygame

# How to Run It
To run the GUI, git clone this repository and then run main.py, which is the main menu to get to all the GUI cases. To go back from any specific point-particle simulation case, just exit out of the GUI by clicking the red X button, and you will be back to the main menu. To toggle between dark and light mode, just press the D-Key on the main menu!

# Helping Out
If you want to make another point-particle simulation case, make sure to add that as a different class in the SimCases folder


text:
# FAQ

Q: Is it compulsory to add 'created_at' and 'updated_at' fields in CRUD item table ?

A: No, it's not compulsory. If you don't need these fields, just add the following line to your model :

	public $timestamps = false;

Q: How can I create a drop down field with reference to another CRUD item. Also how can I show that field in list of records ?

A: You can use the 'options' method to pass the values from another table to drop down fields. This method gets an array of key/values, for example if the name    of the model you want to get the values from is 'Company', you can define your field like this :

	$this->edit->add('field-name', 'label', 'select')->options(\Company::lists("name", "id")->all());

Q: How can I display data which is fetched from more than one table in CRUD ?

A: If for example we need to obtain `material` and `category` of each `product`, we need to modify the grid in `ProductController` and add this line :

	$grid = DataGrid::source(Product::with('category','material'));

In the `Product` model the following modifications should be made:

	class Product extends \Eloquent
	{
		protected $table = 'products';

		public function category() {
			return $this->belongsTo('Category', 'category_id');
		}

		public function material() {
			return $this->belongsTo('Material', 'material_id');
		}
	}

Q: How can I save data into two related tables in CRUD ?

A: You just need to add the fields of the related table by specifying their relation in field name section of 'add' method, for example :

     $this->edit = \DataEdit::source(new \App\ModelName());
     $this->edit->add('relation.fieldname', 'Field Label', 'text');

Q: How can I preprocess some data before storing it in CRUD ? What would be the suggested way of doing it ?

A: You should use model events, for example for storing secure password values you can use the 'creating' model event :

	public function edit($entity) {

		parent::edit($entity);
		\App\Modelname::creating(function($data) {
			$data->password = Hash::make(\Request::input('password'));
		});

		$this->edit = \DataEdit::source(new Modelname());

		$this->edit->label('Edit User');

		$this->edit->add('password', 'Password', 'text');

		return $this->returnEditView();
	}

Q: How can I add a blank option in select box field in CRUD ?

A: The options function gets an array so you can just add an index to the array before passing it.

To add a blank option to the Edit view:

	$options = Department::lists("name", "id")->all();
	array_unshift($options, '');

	$this->edit = \DataEdit::source(new Category());
	$this->edit->add('parent_id', 'Department', 'select')->options($options);

To add a blank option on the Search View:

	$options = Department::lists("name", "id")->all();
	$blank_option = array(""=>"Please select a department");
	$department_options = $blank_option + $options;

	$this->filter->add('parent_id', 'Department', 'select')->options($department_options);

This will code will produce a dropdown box that looks like this:

	<select>
		<option selected> Please select a deparment </option>
		<option value="1"> Accounting Department </option>
		<option value="2"> Finance Department </option>
		<option value="3"> Engineering Department </option>
		...
	</select>

Q: How can I remove item from admin menu?

A: You can use link controller in admin and remove it from there or use phpmyadmin and remove the record from link table

repository: flaxandteal/laravel-panel-docs

repo_name: flaxandteal/laravel-panel-docs


text:
Tuple as Inline Rule
--------------------

.Net Tuple<...> class can be used to define one-rule non-terms without explicitly defining corresponding class.

Example:

[Operative("make-dict")]
public void MakeDict(List<Tuple<Sym, Num>> pairs) { ... }

Will match following inputs:
	(make-dict Jhon 33 Mary 25 John 50)
	(make-dict)

This input will cause error because there is odd argument count in operative:
	(make-dict Jhon 33 Mary 25 John)

repository: sucaba/IronTextLibrary

repo_name: sucaba/IronTextLibrary


text:
---
layout: page
title:  "'Solidworks is my favorite video game'"
---
After a couple months of design, our CAD model is starting to take its final form!
![](/img/posts/2019-2-10-cad/render2.png)

The fist weapon isn't modeled yet, but most everything else is included. Forks let us get under our opponents and hit them with our ~60lb blade while the back end (aptly named Butt.sldasm) keeps our electronics safe. Note the fully invertable design.

"But what if you fight a horizontal spinner?"

![](/img/posts/2019-2-10-cad/config.png)

![](/img/posts/2019-2-10-cad/render1.png)

An detachable AR500 wedge lets us deflect nasty horizontal spinners while keeping our front safe. The backup forks on the top make sure that we're still slightly invertable.

With the CAD mostly done, we're finally ready to start manufacturing parts. Will our waterjet ever forgive us after we're done with it? Stay tuned to find out.


text:
---
title: Media Commercials 25-4-18
layout: post
author: monty.sanders
permalink: /media-commercials-25-4-18/
source-id: 1P4PptKAh7IUWdoXC4DMtbffIIUWANjhLDCbUWg2lXIk
published: true
---

    Title
    Media Commercial
    Date
    25/04/18

    Starting point:
    To watch the Kia hamster commercial.

    Target for this lesson?
    To understand the meaning of this commercial ( the target audience and  what is the subtext of it).

    Did I reach my target?
    Yes, as I understood why Kia made that commercial.

    How did you use your learning habits this week?

    Persevering
    Whilst thinking about why the commercial's meaning, I had to persevere, as when I first watched it, I had no clue what the meaning of it was, so I had to try and think about it more.

    Questioning?
    Without questioning myself, I wouldn’t have known what the hidden messages of the commercial were.

    Independence
    I was independent, when thinking about the whole range of target audiences that the commercial could be aimed at.

    Reflecting

    Engagement
    I engaged, when I was concentrating on watching the commercial, so I could think of the hidden messages of it.

    What could have gone better in your learning?

    I could have thought of more people who the commercial was aimed for.

    What changes do you need to make to improve your learning next time?

    Concentrate more on the commercial.


text:
# Env Tracker Spec

## Overview

- Creates a git repo that lives in `~/.et`
- Each project gets its own git repo, similar to how prm works.
- The `.etconfig/` directory is its own git repo as well - to follow the spirit of the whole thing
  - `.etconfig/project-mapping`

- Each project is registered in `~/.et/$current_directory` by default
    - If there is a conflict, then fail hard and ask for a specific name
    - `~/.et` must be a flat directory. No subdirectories allowed. This allows us to read all of the project infos without a mast config file or something
- The project directories in `~/.et` mirrors the corresponding project structure. E.g. `~/src/my-project/client/app/env.json` maps to `~/.et/my-github-username/my-project/client/app/env.json`

- ET does not provide support for pushing the tracking repos to remotes.
    - These are meant to be private files, so push to remote at your own risk

- ~~Optionally adds a postcommit hook to your git repo to remind you if you have unsaved changes to your env files~~
- Add commit hook to automatically commit changes in a post-commit hook

# Commands defined by the et application

# Version 1 - Basics, tracking and untracking
- `init [project_name='parent_directory_name'] [parent_directory='.']` Registers a new project. Inuits the name/namespace from the git configuration
  - if `$ET_HOME` doesn't exist, creates it
  - optionally allow user to specify a parent directory.
  - optionally allow user to specify name.
  - force the user to specify a name if the current dirname is already taken
  - allow user to set `auto-commit=false` to omit registering the post-commit hook
- `track filename` Registers an untracked file - rename to add
- `untrack filename` Unregisters a tracked file and moved it back - rename to rm
- Git commit hook that looks for changes in the follower dir and automatically commits changes
    - commit message contains the branch you were on when you committed and the actual commit message.
    - follower directory should mirror upstream branches, because it would be prohibitively complicated to try to keep track of everything, like a merge happening on a remote and deleting the branch.

# Version 2 - Env Tracker meta commands
- Convert commands to use a proper python command line tool
- `info` Display information about the current project
- `list` List all of the projects being tracked
    - Or should it list all of the tracked files???
- `rmproject` untracks all tracked files and removes the tracked directory
- `mvproject` rename a project
- `auto-commit=false` option for tracking a file which means the file is not automatically commited on commit hook

# Version 3 - Git
- `commit` - accepts `-m`; git commits all of the env files in the current project. To
- `status` - Show if there are any changes that need to be committed
- `copy` - not sure how this would work - handles renaming a github project

Follower directory structure

Hmm... You don't even need the parent directory to be under parent control technically
If parent dir is not under source control, it's essentially a symlinking tool,
    but finding the project root dir to identify relative paths is a bit more complicated I guess.

 Maybe check for changes and flag changes to the tracked files.
Maybe we can hook branch checkouts and changes and automatically commit changes to the tracked files or something.

repository: pnw/env-tracker

repo_name: pnw/env-tracker


text:
1. This sample required that you add your Service Bus connection string to
   the "Microsoft.ServiceBus.ConnectionString" Azure configuration setting.
2. The sample will automatically create a Service Bus queue called ProcessingQueue
   using the connection string you supplied. If the queue already existed the sample
   will reuse the queue.
3. Make sure Microsoft.ServiceBus.MessagingPerformanceCounters.man and RegisterMessagingPerfCounter.cmd
   is copied as part of deployment by setting
   - Build Action = Content
   - Copy To Output Directory = Copy if Newer
4. If you intend to run this code as an actual Azure deployment, please make sure
   you also setup a storage account instead of using UseDevelopmentStorage=true.
5. Once your application is deployed and running the Diagnostics monitor will begin collecting
   performance counters and persisting that data to Azure storage. You can use tools such as
   Server Explorer in Visual Studio,  Azure Storage Explorer, or Azure Diagnostics Manager by
   Cerebrata to view the performance counters data in the WADPerformanceCountersTable table.
   You can also programatically query the Table service to get the data as well.
   For more information please refer to http://msdn.microsoft.com/en-us/library/azure/dn535595.aspx

repository: Azure/azure-service-bus

repo_name: Azure/azure-service-bus


text:
# Bayesian Function-on-Scalar Quantile Regression

A method to perform Bayesian function-on-scalar quantile regression, i.e., Bayesian FQR. The proposed method is applicable to data sets given the _N_ by _T_ matrix of response functions _Y_ and _N_ by _p_ design matrix _X_.

This repository provides
- a set of MATLAB scripts to implement our proposed Bayesian FQR model (adjusted or unadjusted), and the naïve pointwise Bayesian quantile regression;
- R scripts to implement the bootstrap-based approaches which were compared to our proposed model in the paper;
- the code to reproduce all the figures in the paper;
- the code to adjust for block effects from the preprocessed mass spectrometry data and to generate the simulation datasets.

File structure:
- The subfolder "BayesianFQR/" contains a set of MATLAB scripts to implement the Bayesian FQR model with discrete wavelet transform (DWT) on regression coefficient functions and a horseshoe prior on wavelet coefficients.
- The subfolder "BayesianFQR_corrected_likelihood/" contains a set of MATLAB scripts to implement the adjusted version of the Bayesian FQR model using sandwich likelihood correction (see Section 2.4 in the paper) with discrete wavelet transform (DWT) on regression coefficient functions and a horseshoe prior on wavelet coefficients.
- The subfolder "BayesianQR/" contains a set of MATLAB scripts to implement the naïve pointwise Bayesian quantile regression using asymmetric Laplace likelihood.
- The subfolder "Code for dwt and idwt/" contains the MATLAB scripts to perform DWT and inverse DWT.
- In the subfolder "realdata/", the file "ProteomicsData.mat" stores the raw and preprocessed pancreatic cancer mass spectrometry data, and the file "model.mat" stores the block effect adjusted mass spectra _Y_, design matrix _X_, spectral locations _x_0_ (in Daltons) and DWT specs. This subfolder also includes the MATLAB code to adjust for block effects, and scripts to implement our proposed Bayesian FQR and various alternatives on the mass spectrometry dataset.
- The subfolders "simulations_continuous_x/" contain the scripts to generate simulation datasets and to implement our proposed model and alternative methods.
- Other subfolders not described above contain auxiliary functions that need to be used when running the scripts above.

## Dependency
- For our proposed method: MATLAB version 2016b or later (wavelet toolbox needed).
- For selected other methods: R version 3.2.2 or later (the package “quantreg” needed).

## Example
Below is an example to run Bayesian FQR on one simulation dataset.

```

% Load in the dataset
% Note that the input data must be a structure array that at least includes the _N_ by _T_ data matrix _Y_, the _N_ by _p_ design matrix _X_, the sample size _N_, the grid size _T_, the number of regressors _p_, and a structure array _wavespecs_ that includes the DWT and iDWT information.
% Before running Bayesian FQR, please make sure your input data have the same structure as the following example, and refer to "simulations_continuous_x/simdata2.m" to see how to generate such a structure array in MATLAB.
load('simulations_continuous_x/data/model1.mat');

% Add the path of the functions needed to run Bayesian FQR
addpath('BayesianFQR');

% Specify MCMCspecs, the quantile level desired, and the random seed for reproducibility.
MCMCspecs.minVC=1e-6;
MCMCspecs.maxO=1e20;
MCMCspecs.B=2000;
MCMCspecs.burnin=2000;
MCMCspecs.thin=3;
MCMCspecs.blocksize=2000;

qt=0.9;
seed=100;

% Call Bayesian FQR and get posterior samples
% It takes about 15 minutes to run on a 64-bit operating system with 2 processors and 32GB RAM.
result=FQR_HS(model, qt, MCMCspecs, seed);
MCMC_betat=result.MCMC_betat;

% MCMC_P is a _B_ by _T_ matrix containing _B_ posterior samples for the regression coefficient function coding the group difference.
MCMC_P=MCMC_betat(:,(model.T+1):end);

```

## Reproducibility

All the figures in the paper can be reproduced by running the provided code. Note that to reproduce Table 2 that summarizes the simulation performance for various methods, the posterior (or bootstrap) samples obtained by each approach at each considered quantile level based on the 100 replicate datasets are needed. Please refer to ```Reproducibility.md``` for more details about how to fully reproduce results in the paper.

## Reference

Yusha Liu, Meng Li and Jeffrey S. Morris (2019). Function-on-Scalar Quantile Regression with Application to Mass Spectrometry Proteomics Data. <https://arxiv.org/abs/1809.00266>


text:
> import vobject
>
> import phonenumbers

1. Read existing vcf file
2. Parse for numbers and emails
3. Normalize format (E.146 or RFC 3966?)
4. Output

---

Links
* https://stackoverflow.com/questions/35825919/vcard-parser-with-python
* https://www.geeksforgeeks.org/phonenumbers-module-in-python/
* https://numverify.com/
* https://stackoverflow.com/questions/41925/is-there-a-standard-for-storing-normalized-phone-numbers-in-a-database
* https://github.com/mcpar-land/vcfer

repository: jauderho/zz-spam

repo_name: jauderho/zz-spam


text:
# Les nouveaux espaces de la notation musicale

This repository contains the web site of a working group on music notation and representation, which was supported by the [AFIM](http://www.afim-asso.org/) (Association Francophone d'Informatique Musicale).
The work of this group led to the creation of the [TENOR conference](https://www.tenor-conference.org/).

------

repository: tenor-conference/notation

repo_name: tenor-conference/notation


text:
# vcd_inserted_media

[back](../vcd.md)

### Index

- [Example Usage](#example-usage)
- [Variables](#variables)
- [Resource](#resource)
- [Outputs](#outputs)

### Terraform

```terraform
terraform {
  required_providers {
    vcd = ">= 3.2.0"
  }
}
```

[top](#index)

### Example Usage

```terraform
module "vcd_inserted_media" {
  source = "./modules/vcd/r/vcd_inserted_media"

  # catalog - (required) is a type of string
  catalog = null
  # eject_force - (optional) is a type of bool
  eject_force = null
  # name - (required) is a type of string
  name = null
  # org - (optional) is a type of string
  org = null
  # vapp_name - (required) is a type of string
  vapp_name = null
  # vdc - (optional) is a type of string
  vdc = null
  # vm_name - (required) is a type of string
  vm_name = null
}
```

[top](#index)

### Variables

```terraform
variable "catalog" {
  description = "(required) - catalog name where to find media file"
  type        = string
}

variable "eject_force" {
  description = "(optional) - When ejecting answers automatically to question yes"
  type        = bool
  default     = null
}

variable "name" {
  description = "(required) - media name to use"
  type        = string
}

variable "org" {
  description = "(optional) - The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organizations"
  type        = string
  default     = null
}

variable "vapp_name" {
  description = "(required) - vApp to use"
  type        = string
}

variable "vdc" {
  description = "(optional) - The name of VDC to use, optional if defined at provider level"
  type        = string
  default     = null
}

variable "vm_name" {
  description = "(required) - VM in vApp in which media will be inserted or ejected"
  type        = string
}
```

[top](#index)

### Resource

```terraform
resource "vcd_inserted_media" "this" {
  # catalog - (required) is a type of string
  catalog = var.catalog
  # eject_force - (optional) is a type of bool
  eject_force = var.eject_force
  # name - (required) is a type of string
  name = var.name
  # org - (optional) is a type of string
  org = var.org
  # vapp_name - (required) is a type of string
  vapp_name = var.vapp_name
  # vdc - (optional) is a type of string
  vdc = var.vdc
  # vm_name - (required) is a type of string
  vm_name = var.vm_name
}
```

[top](#index)

### Outputs

```terraform
output "id" {
  description = "returns a string"
  value       = vcd_inserted_media.this.id
}

output "this" {
  value = vcd_inserted_media.this
}
```

[top](#index)

repository: chadwickalex/tfwriter

repo_name: chadwickalex/tfwriter


text:
These are the playbooks I used to deploy podified CloudForms on quicklab on OpenShift with metrics deployed.  I've updated it to automatically add both the provider and metrics to the appliance.

Currently, I recommend only using this playbook on the master node, as it will need to restart master services if it's your first deploy.  More info as to why can be found on the [product doc](https://access.redhat.com/documentation/en-us/red_hat_cloudforms/4.6/html-single/installing_red_hat_cloudforms_on_openshift_container_platform/index#preparing-for-deployment)

I got the templates from the [openshift github repo](https://github.com/openshift/openshift-ansible/tree/master/roles/openshift_examples/files/examples) and the OSE Red Hat online training course for installing metrics.

The environment you need is OSE 3.7. This setup is assuming you're using dynamic provisioning. Manual PV setup can be found at the offical [openshift-ansible github](https://github.com/openshift/openshift-ansible/tree/master/roles/openshift_examples/files/examples/v3.7/cfme-templates).

Also, don't forget to set the hosts in both the playbook and in your hosts/inventory file

Here's the command to run if you want to use cfme46:
ansible-playbook cfme46/cfme46-ose.yaml

You can toggle hawkular on and off by setting the hawkular_metrics var in the cmfe46-ose.yaml file.

You can change the project name by changing the project_name variable.

You can change the username and password by changing login_credentials variable.  The default is system:admin.

You can also add a user to cluster admin by defining cluster_admin variable.

You can also choose whether or not to add the openshift provider by toggling that variable as well. It is on by default.
* DISCLAIMER: This will INSTALL the EPEL repo in order to install pip to add the openshift provider through the manageiq api if you toggle this option on.

repository: rh-dluong/cfme-deploy-on-ose

repo_name: rh-dluong/cfme-deploy-on-ose


text:
SkiaPerf Server
===============

Reads Skia performance data from databases and serves interactive dashboards
for easy exploration and annotations.

Server Setup
============

Please refer to compute_engine_scripts/perfserver/README under the repo for
instructions on creating and destroying the instance. The rest of this document
is what to do once the instance is created.

  gcutil --project=google.com:skia-buildbots addinstance skia-testing-b \
    --zone=us-central2-b --external_ip_address=<IP_ADDRESS> \
    --service_account=default \
    --service_account_scopes="bigquery,storage-full" \
    --network=default --machine_type=n1-highmem-8 --image=backports-debian-7-wheezy-v20140904 \
    --persistent_boot_disk

SSH into the instance

  gcutil --project=google.com:skia-buildbots ssh --ssh_user=default skia-testing-b

Do the first time
=================

The following things only need to be done once.

1. SSH into the server as default.
2. sudo apt-get install git
3. git clone https://skia.googlesource.com/buildbot
4. cd ~/buildbot/perf/setup
5. ./perf_setup.sh

Change /etc/monit/monitrc to:

    set daemon 2

then run the following so it applies:

    sudo /etc/init.d/monit restart

Then restart squid to pick up the new config file:

    sudo /etc/init.d/squid3 restart

This means that monit will poll every two seconds that our application is up
and running.

Metadata
========

Secrets that we need at runtime are stored in the metadata server.

All of the metadata must be set at one time, i.e. if you change one piece of
metadata you need to write all the values, even the old unchanged metadata
values. The current set of metadata required is:

  * apikey - The API Key found on this page
    https://console.developers.google.com/project/31977622648/apiui/credential
    Used for access to the project hosting API.
  * readwrite - The MySQL readwrite password. Stored in http://valentine,
    search for "skiaperf".
  * cookiesalt - A bit of entropy to use for hashing the users email address
    in the cookie as used for login. Store in http://valentine, search for "skiaperf".
  * clientid and clientsecret - The Client ID and Secret used in the OAuth flow
    for login. The values come from the following page, which is also the
    place to set valid Redirect URLs.

      https://console.developers.google.com/project/31977622648/apiui/credential

To set the metadata use:

    gcutil --project=google.com:skia-buildbots setinstancemetadata skia-testing-b \
      --metadata=apikey:[apikey value] \
      --metadata=readwrite:[readwrite value] \
      --metadata=cookiesalt:[cookiesalt value] \
      --metadata=clientid:[clientid value] \
      --metadata=clientsecret:[clientsecret value] \
      --fingerprint=[metadata fingerprint]

You can find the current metadata fingerprint by running:

    gcutil --project=google.com:skia-buildbots getinstance skia-testing-b

Or you can just use the web UI in the console to set metadata values.

To update the code
==================

1. SSH into the server as default.
2. cd ~/buildbot/perf/setup
3. git pull
4. ./perf_setup.sh

Developing
==========

The easiest way to develop should be to do:

    go get -u skia.googlesource.com/buildbot.git/perf/go/...

Which will fetch the repository into the right location and
download dependencies.

Then to build everything:

    cd $GOPATH/src/skia.googlesource.com/buildbot.git/perf
    make all

Make sure the $GOPATH/bin is on your path so that you can easily run the
executables after they are generated.

To run the tests:

    make test

repository: weaver-viii/skia-buildbot

repo_name: weaver-viii/skia-buildbot


text:
---

id: verifier-policy

title: "Verifier Policy"

scopeid: essifLab

type: concept

typeid: verifier-policy

stage: draft

hoverText: "Verifier Policy --  a Digital Policy that enables an operational Verifier component to function according to the rules of its Policy Governor."

---

:::info Editor's note

TNO (or others) to provide the content of this file.

:::

### Related Concepts

- %%Digital Policy|digital-policy%%

- %%Policy Governor|policy-governor%%

- %%Verifier|verifier%%

repository: trustoverip/ctwg-sandbox

repo_name: trustoverip/ctwg-sandbox


text:
---
title: Love the Nikon 7900
author: ajordens
layout: post
permalink: /2005/08/love-the-nikon-7900/
categories:
  - General Discussions
---
Couple things, I’ve had about a 150 images on my flash card for sometime now and have finally uploaded them to [Flickr][1]. One of these days I’ll create some more actual image sets in Organizr but until then you’re on your own.

The first set is from Victoria’s Symphony Splash event (fireworks included) that occured a few weeks back, and the second set is from the Parksville Sandcastle competition that finished up last weekend.

I’ve only had my Nikon 7900 for about 5 or 6 months but I absolutely love it. As you can tell by my picture taking abilities, I’m not a photographer by any stretch of the imagination (I’m a total point and clicker to boot). However, I do like how the fireworks pictures turned out. That was my first attempt at messing with the camera’s presets.

 [1]: http://www.flickr.com/photos/adamjordens/


text:
# Shrine-Flutter-App
This project is part of my practicing project of 100daysofcode challenge.
#100daysofcode repo link - https://github.com/Kyawkhaing444/100-days-of-code

### Day 21: July 23, 2020

**Today's Progress**: Added a menu on the back layer and branded icon, and finished the final version of the shrine app.

**Link to work:** https://github.com/Kyawkhaing444/Shrine-Flutter-App

![Shire version 3](https://media0.giphy.com/media/TKXgfyFD16Y2pKZTQH/giphy.gif)

### Day 20: July 22, 2020

**Today's Progress**: Added backdrop menu and modified the custom shape for the front layer (Home Page).(ShrineApp)

**Link to work:** https://github.com/Kyawkhaing444/Shrine-Flutter-App

### Day 19: July 21, 2020

**Today's Progress**: Added custom shape for all buttons and custom layout for my shrine app.

**Link to work:** https://github.com/Kyawkhaing444/Shrine-Flutter-App

![Shire version 3](https://user-images.githubusercontent.com/34454546/88046716-7b187000-cb76-11ea-8e4b-8b32ec20efa8.gif)

### Day 18: July 20, 2020

**Today's Progress**: Added custom color theme and custom text theme for my shrine.

**Link to work:** https://github.com/Kyawkhaing444/Shrine-Flutter-App

**Output Image**

![Shire version 3](https://user-images.githubusercontent.com/34454546/87951034-173a6c80-cace-11ea-93dc-d8d07ce094d9.gif)

### Day 17: July 18, 2020

**Today's Progress**: I have completed my Flutter e-commerce app (Shrine) version 2 ( added HomePage and Navigation Bar).

**Link to work:** https://github.com/Kyawkhaing444/Shrine-Flutter-App

**Output Image**

![Shire_version_2](https://user-images.githubusercontent.com/34454546/87853996-85e3c280-c934-11ea-8805-2d1d570a7961.gif)

repository: gafuku/Shrine-Flutter-App

repo_name: gafuku/Shrine-Flutter-App


text:
#Swift and Perfect Server on Linux with Vagrant

##NOTE

This is no longer maintained, as I much prefer the [Vapor](https://github.com/qutheory/vapor) Swift Web Framework.

##Introduction

This is `Vagrantfile` that builds a Ubuntu 15.10 virtual machine with open source [Swift](http://swift.org) and the Swift server [Perfect](https://github.com/PerfectlySoft/Perfect).

I'm far from a Vagrant specialist and welcome any PRs!

##Instructions

###Installation

1. Ensure you have [Vagrant](https://www.vagrantup.com) configured.
2. Clone this repository:
`git clone https://github.com/mpclarkson/perfect-swift-ubuntu`
3. Open the folder:
`cd perfect-swift-linux`
4. Install the virtual machine:
`vagrant up`
5. SSH into it:
`vagrant ssh`
6. Start the PerfectServer:
`cd /vagrant && perfectserverhttp`

###PerfectServer Examples

All of the [Examples](https://github.com/PerfectlySoft/Perfect/tree/master/Examples) are built and are accessible at http://<IP_ADDRESS>:8181/

###Swift REPL

You can access the swift REPL simply by typing `swift`

##Author

By [Matthew Clarkson](http://mpclarkson.github.io/) from [Hilenium](http://hilenium.com). Tweet me [@matt_clarkson](https://twitter.com/matt_clarkson)

repository: nawar/perfect-swift-linux

repo_name: nawar/perfect-swift-linux


text:
---
title: |
    454. The Morning Light - Church Hymnal 1941
metadata:
    description: |
        Church Hymnal 1941 454. The Morning Light.  The morning light is breaking,  The darkness disappears;  The sons of earth are waking  To penitential tears;  Each breeze that sweeps the ocean  Brings tidings from afar  Of nations in commotion,  Prepared for Zion's war.
    keywords:  |
        Church Hymnal 1941, adventhymnals, advent hymnals, The Morning Light, The morning light is breaking.
    author: Brian Onang'o
---

#### Advent Hymnals
## 454. THE MORNING LIGHT
####  Church Hymnal 1941,

```txt
1.
The morning light is breaking,
The darkness disappears;
The sons of earth are waking
To penitential tears;
Each breeze that sweeps the ocean
Brings tidings from afar
Of nations in commotion,
Prepared for Zion's war.

2.
See heathen nations bending
Before the God we love,
And thousand hearts ascending
In gratitude above;
While sinners, now confessing,
The gospel call obey,
And seek the Saviour's blessing,
A nation in a day.

3.
Blest river of salvation,
Pursue thy onward way;
Flow thou to every nation,
Nor in thy richness stay
Stay not till all the lowly,
Triumphant reach their home;
Stay not till all the holy
Proclaim, "The Lord is come!"

```

- |   -  |
-------------|------------|
Title | The Morning Light |
Key | B♭ Major |
Titles | undefined |
First Line | The morning light is breaking |
Author | Samuel F. Smith
Year | 1941
Composer| George J. Webb |
Hymnal|  - |
Tune| WEBB |
Metrical pattern | |
# Stanzas |  |
Chorus |  |
Chorus Type |  |
Subjects | The Church and Doctrines: Ministry and Missions |
Texts | undefined |
Print Texts |
Scripture Song |  |

repository: GospelSounders/adventhymnals

repo_name: GospelSounders/adventhymnals


text:
All right, let's get up
our picture of the earth.
The earth is pretty awesome.
I'm a geologist, so I get
pretty psyched about this,
but the earth is great.
It's powerful, it's dynamic,
it's constantly changing.
It's a pretty exciting place to live.
But I want to share with you guys today
my perspective as a geologist
in how understanding earth's past
can help inform and guide
decisions that we make today
about how to sustainably live
on earth's surface.
So there's a lot of exciting things
that go on on the surface of the earth.
If we zoom in here a little bit,
I want to talk to you guys a little bit
about one of the things that happens.
Material get shuffled around
earth's surface all the time,
and one of the big thing that happens
is material from high mountains
gets eroded and transported
and deposited in the sea.
And this process is ongoing all the time,
and it has huge effects
on how the landscape works.
So this example here in south India --
we have some of the biggest
mountains in the world,
and you can see in this satellite photo
rivers transporting material
from those mountains out to the sea.
You can think of these rivers
like bulldozers.
They're basically taking these mountains
and pushing them down towards the sea.
We'll give you guys an example here.
So we zoom in a little bit.
I want to talk to you guys
specifically about a river.
We can see these beautiful patterns
that the rivers make
as they're pushing material
down to the sea,
but these patterns aren't static.

So an example of this
is this is the Kosi River.
So the Kosi River
has this nice c-shaped pathway,
and it exits the big mountains of Nepal
carrying with it a ton of material,
a lot of sediments that's being
eroded from the high mountains,
and it spreads out across India
and moves this material.
So we're going to zoom in to this area
and I'm going to tell you a little bit
about what happened with the Kosi.
It's an example of how dynamic
these systems can be.
So this is a satellite image
from August of 2008,
and this satellite image is colored
so that vegetations or plants
show up as green
and water shows up as blue.
So here again you can see
that c-shaped pathway
that this river takes as it exits Nepal.
And now this is monsoon season.
August is monsoon season
in this region of the world,
and anyone that lives near a river
is no stranger to flooding
and the hazards and inconveniences
at minimum that are associated with that.
But something interesting
happened in 2008,
and this river moved in a way
that's very different.
It flooded in a way that's very
different than it normally does.
So the Kosi River is flowing down here,
but sometimes as these rivers
are bulldozing sediment,
they kind of get clogged,
and these clogs can
actually cause the rivers
to shift their course dramatically.
So this satellite image
is from just two weeks later.
Here's the previous pathway,
that c-shaped pathway,
and you notice it's not blue anymore.
But now what we have is this blue pathway
that cuts down the middle
of the field of view here.
What happened is
the Kosi River jumped its banks,
and for reference,
the scale bar here is 40 miles.
This river moved
over 30 miles very abruptly.
So this river got clogged
and it jumped its banks.
Here's an image from about a week later,
and you can see
these are the previous pathways,
and you can see this process
of river-jumping continues
as this river moves farther away
from its major course.
So you can imagine
in landscapes like this,
where rivers move around frequently,
it's really important to understand when,
where and how they're going to jump.
But these kinds of processes
also happen a lot closer to home as well.
So in the United States,
we have the Mississippi River
that drains most of the continental US.
It pushes material
from the Rocky Mountains
and from the Great Plains.
It drains it and moves it
all the way across America
and dumps it out in the Gulf of Mexico.
So this is the course of the Mississippi
that we're familiar with today,
but it didn't always flow
in this direction.
If we use the geologic record,
we can reconstruct
where it went in the past.
So for example, this red area here
is where we know the Mississippi River
flowed and deposited material
about 4,600 years ago.
Then about 3,500 years ago it moved
to follow the course
outlined here in orange.
And it kept moving and it keeps moving.
So here's about 2,000 years ago,
a thousand years ago,
700 years ago.
And it was only
as recently as 500 years ago
that it occupied the pathway
that we're familiar with today.
So these processes are really important,
and especially here, this delta area,
where these river-jumping events
in the Mississippi
are building land at the interface
of the land and the sea.
This is really valuable real estate,
and deltas like this are some of the most
densely populated areas on our planet.
So understanding the dynamics
of these landscapes,
how they formed and how they will
continue to change in the future
is really important
for the people that live there.
So rivers also wiggle.
These are sort of bigger jumps
that we've been talking about.
I want to show you guys
some river wiggles here.
So we're going to fly down
to the Amazon River basin,
and here again we have a big river system
that is draining and moving and plowing
material from the Andean Mountains,
transporting it across South America
and dumping it out
into the Atlantic Ocean.
So if we zoom in here, you guys
can see these nice, curvy river pathways.
Again, they're really beautiful,
but again, they're not static.
These rivers wiggle around.
We can use satellite imagery
over the last 30 or so years
to actually monitor how these change.
So take a minute and just watch
any bend or curve in this river,
and you'll see it doesn't stay
in the same place for very long.
It changes and evolves
and warps its pattern.
If you look in this area in particular,
I want you guys to notice
there's a sort of a loop in the river
that gets completely cut off.
It's almost like a whip cracking
and snaps off the pathway
of the river at a certain spot.
So just for reference, again,
in this location, that river
changed its course over four miles
over the course of a season or two.
So the landscapes
that we live in on earth,
as this material
is being eroded from the mountains
and transported to the sea,
are wiggling around all the time.
They're changing all the time,
and we need to be able
to understand these processes
so we can manage and live
sustainably on these landscapes.
But it's hard to do
if the only information we have
is what's going on today
at earth's surface.
Right? We don't have
a lot of observations.
We only have 30 years' worth
of satellite photos, for example.
We need more observations
to understand these processes more.
And additionally, we need to know
how these landscapes are going
to respond to changing climate
and to changing land use
as we continue to occupy
and modify earth's surface.
So this is where the rocks come in.
So as rivers flow,
as they're bulldozing material
from the mountains to the sea,
sometimes bits of sand and clay
and rock get stuck in the ground.
And that stuff that gets stuck
in the ground gets buried,
and through time, we get
big, thick accumulations of sediments
that eventually turn into rocks.
What this means is that we can
go to places like this,
where we see big, thick stacks
of sedimentary rocks,
and go back in time
and see what the landscapes
looked like in the past.
We can do this to help reconstruct
and understand
how earth landscapes evolve.
This is pretty convenient, too,
because the earth has had
sort of an epic history. Right?
So this video here
is a reconstruction of paleogeography
for just the first
600 million years of earth's history.
So just a little bit of time here.
So as the plates move around,
we know climate has changed,
sea level has changed,
we have a lot of different
types of landscapes
and different types of environments
that we can go back --
if we have a time machine --
we can go back and look at,
and we do indeed have a time machine
because we can look at the rocks
that were deposited at these times.
So I'm going to give you
an example of this
and take you to a special
time in earth's past.
About 55 million years ago,
there was a really abrupt warming event,
and what happened was
a whole bunch of carbon dioxide
was released into earth's atmosphere,
and it caused a rapid
and pretty extreme global warming event.
And when I say warm, I mean pretty warm,
that there were things
like crocodiles and palm trees
as far north as Canada
and as far south as Patagonia.
So this was a pretty warm time
and it happened really abruptly.
So what we can do
is we can go back and find rocks
that were deposited at this time
and reconstruct how the landscape changed
in response to this warming event.
So here, yay, rocks.

(Laughter)

Here's a pile of rocks.
This yellow blob here,
this is actually a fossil river,
so just like this cartoon I showed,
these are deposits that were
laid down 55 million years ago.
As geologists, we can go
and look at these up close
and reconstruct the landscape.
So here's another example.
The yellow blob here is a fossil river.
Here's another one above it.
We can go and look in detail
and make measurements and observations,
and we can measure features.
For example, the features
I just highlighted there
tell us that this particular river
was probably about three feet deep.
You could wade
across this cute little stream
if you were walking around
55 million years ago.
The reddish stuff that's above
and below those channels,
those are ancient soil deposits.
So we can look at those to tell us
what lived and grew on the landscape
and to understand how these rivers
were interacting with their floodplains.
So we can look in detail
and reconstruct with some specificity
how these rivers flowed
and what the landscapes looked like.
So when we do this
for this particular place
at this time,
if we look what happened
before this abrupt warming event,
the rivers kind of carved their way
down from the mountains to the sea,
and they looked maybe similar to what
I showed you in the Amazon River basin.
But right at the onset
of this climate change event,
the rivers change dramatically.
All of a sudden they got much broader,
and they started to slide back and forth
across the landscape more readily.
Eventually, the rivers reverted
back to a state that was more similar
to what they would have looked like
before this climate event,
but it took a long, long time.
So we can go back in earth's time
and do these kinds of reconstructions
and understand how
earth's landscape has changed
in response to a climate event like this
or a land use event.
So some of the ways that rivers change
or the reasons that rivers change
their pattern and their movements
is because of things like with extra water
falling on the land's surface
when climate is hotter,
we can move more sediment
and erode more sediment,
and that changes how rivers behave.
So ultimately,
as long as earth's surface is our home,
we need to carefully manage
the resources and risks
associated with living
in dynamic environments.
And I think the only way
we can really do that sustainably
is if we include information
about how landscapes evolved
and behaved in earth's past.
Thank you.

(Applause)

repository: prewittdavon/TEDVis

gha_language: Python

repo_name: prewittdavon/TEDVis


text:
# Spatial RGB

## What

- Arduino
- 3 sonars
- 3 colors in the spectrum
- RGB LED strip
- Magic!

## Building

To run this project, you need Arduino Pro Mini, or Nano (those $2 eBay clones will work perfectly).
You can also try to use a genuine Arduino, even larger (UNO), though I haven't tried that.

To flash the firmware, run `make flash`. Adjust the Makefile as needed. Naturally, you'll need
`avr-gcc` and `avrdude` installed (and Linux or OSX).

Make sure the correct Serial device is defined in the Makefile (`/dev/ttyUSB0` or other - it tends
to be something really strange on OSX).

## Hardware

- RGB LED strip with WS2812 or WS2812B. It's set up for a 30-led strip, adjust as needed.

- Sonars: HC-SR04 (you can get them on eBay)

Wiring is configured in the C file at the top - adjust pin numbers however you like.

repository: MightyPork/arduino-spatial-rgb

repo_name: MightyPork/arduino-spatial-rgb


text:
I am the WAGetTextTranslator, I manage translations that are imported from `.mo` files.

I am responsible for:
* Managing all available translators (1 translator per set of files with multiple locales)
* Translate for a given locale

My collaborators are:

WAMOFile is a class representing the `.mo` file and needed for the actual translation.

WALocale represents the locale.

WALocalizationContext is a class that uses me a lot in order to translate.

Public API and Key Messages

```
WAGetTextTranslator
		createTranslatorFor: 'seaside-gettext-example'
		fromFiles: (FileLocator imageDirectory / 'some' / 'path' / 'to' / 'mo' / 'files') asFileReference
```
See implementation details about some conventions for the path to `.mo` files.

Internal Representation and Key Implementation Points.

    Instance Variables
	moFiles:		`{'en'->WAMOfile, 'nl-BE'->WAMOFile}` (the locale strings are examples)

Implementation details, conventions about the path for `.mo` files:

A path to `.mo` files expects the following structure:

"
 * nl_BE
  * LC_MESSAGES
   * seaside-gettext-example.mo
 * fr
  * LC_MESSAGES
   * seaside-gettext-example.mo
 * de_CH
  * LC_MESSAGES
   * seaside-gettext-example.mo
 * en
  * LC_MESSAGES
   * seaside-gettext-example.mo
"

Note: the locale names are examples, "seaside-gettext-example" is also an example name. LC_MESSAGES is not an example that is how it should be called.

repository: SeasideSt/Seaside

gha_language: Smalltalk

repo_name: SeasideSt/Seaside


text:
# Change Log

All Notable changes to `graze/dog-statsd` will be documented in this file

## v0.3 - 2017-05-18

### Added
 - Added A StreamWriter which has an exponential back-off when attempting to send the udp messages to prevent blocking
 - Added An echo server for functional testing
 - Added a fix for sending long messages
 - Added Histogram method

## v0.2 - 2016-03-02

### Added
 - Added default tags to be sent with every request
 - Added a Dockerfile

### Changed
 - Renamed the option `throwConnectionExceptions` to `throwExceptions`

## v0.1 - 2015-11-04

### Added
 - Initial release

repository: graze/dog-statsd

gha_language: PHP

gha_license_id: NOASSERTION

repo_name: graze/dog-statsd