text:
class: frontpage

Front-End Web Development

12 Arrays and loops

---

## Agenda

- Use arrays and loops in JavaScript to manage collections of data.
- Invoke array methods to manipulate the contents of an array.
- Practice all the JS syntax we've learned

---

## Data Types

We've seen a few different data types already.

- Strings eg. `'Hello'`, `'abc'`
- Numbers eg. `1`, `2`, `0.5`, `-66`, `Infinity`, `NaN`
- Booleans eg. `true`, `false`
- Functions

And there's a two more that we haven't

- Arrays
- Objects

---

## Arrays

Think of arrays as containers of multiple pieces of data. Technically, an array is an ordered collection of data types combined into one variable.
Each item in an array is assigned an index value based on its position. These index values allow us to access individual elements within the array.

```javascript
const fruits = ['banana', 'orange', 'apple'];
//                  0   ,     1   ,    2
```

You make an array using a set of square brackets.

Inside the brackets, each value must be separated by a comma.

---

## Arrays

### Accessing values

```javascript
const fruits = ['banana', 'orange', 'apple'];
fruits[0]; // will output "banana"
fruits[1]; // will output "orange"
fruits[2]; // will output "apple"
```

Access array items using square brackets around their index values. It's pretty simple — just remember that the first index value is always zero!

---

## Arrays

### Why Do Arrays Matter?

Arrays are one of just two types of data 'containers' in JavaScript (the other is objects). As a result, much of the data we use comes in the form of arrays.

Arrays come from three main places:

- The DOM (with `querySelectorAll` and `getElementsByClassName`)
- API responses (information received from other web applications)
- Databases

One of the most common arrays you'll work with in JS is an array of elements from the document using `querySelectorAll()`

```javascript
const buttons = document.querySelectorAll('.button');

typeof buttons; // this will return “object”

buttons[0]; // gives the first button element
buttons[1]; // gives the second button etc.
```

---

## Arrays

### Properties and Methods

[Reference code](https://codepen.io/pataruco/pen/pojXdqQ)

---

## Arrays

### Properties and Methods

#### `.length`

```javascript
const fruits = ['banana', 'orange', 'apple'];
fruits.length;
// => 3
```

Use the `.length` property to figure out how many items are in your array. This is very useful when we need to look through the whole array with a loop.

---

## Arrays

### Properties and Methods

#### `.indexOf()`

```javascript
const fruits = ['banana', 'orange', 'apple'];

fruits.indexOf('orange');
// will return the number 1
```

Use `.indexOf()` to see the index value of any item in the array.

---

## Arrays

### Properties and Methods

#### `.push()`

```javascript
const fruits = ['orange'];

fruits.push('kiwi');
// fruits is now: ["orange", "kiwi"];
```

Use `.push()` to see the index value of any item in the array.

---

## Arrays

### Properties and Methods

#### `.unshift()`

```javascript
const fruits = ['orange', 'kiwi'];

fruits.unshift('cherry');
// fruits is now: ["cherry", "orange", "kiwi"];
```

The `.unshift` method adds the item inside the parentheses to the beginning of the array.

---

## Arrays

### Properties and Methods

#### `.pop()`

```javascript
const fruits = ['banana', 'orange', 'apple'];

fruits.pop();
// fruits is now: ["banana", "orange"];
```

The `.pop` method removes the last item in the array. Can you hear the sound effect when you pop an item off?

---

## Arrays

### Properties and Methods

#### `.shift()`

```javascript
const fruits = ['banana', 'orange'];

fruits.shift();
// fruits is now: ["orange"];
```

The `.shift` method removes the first item in the array. This one just quietly shifts off into the night.

---

## Arrays

### Properties and Methods

#### `.splice()`

##### Removing

```javascript
const fruits = ['cherry', 'orange', 'kiwi'];

fruits.splice(1, 1);
// fruits is now: ["cherry", "kiwi"];
```

The `.splice` method removes specific items from the array.

The first number indicates the index where removal begins, and the second number indicates the total number of items to remove.

---

## Arrays

### Properties and Methods

#### `.splice()`

##### Adding

```javascript
fruits = ['cherry', 'kiwi'];

fruits.splice(1, 0, 'pear');
// 1st value = index value for splice
// 2nd value = number of items to remove
// 3rd value = item to be added to array
// fruits is now: ["cherry", "pear", "kiwi"];
```

If you use a third value in the `.splice` method, it will add that value into your array at the location indicated by the first value.

---

## Arrays

### Properties and Methods

#### `.reverse()`

```javascript
const fruits = ["cherry", "pear", "kiwi"];

const fruits.reverse();
// fruits is now: ["kiwi", "pear", "cherry"];
```

True to its name, the `.reverse` method reverses the order of all items in the array. It doesn't add or delete anything.

---

## Arrays

### Properties and Methods

#### `.join()`

```javascript
const fruits = ['kiwi', 'pear', 'cherry'];

const fruitsList = fruits.join(' and ');
// fruitsList is: "kiwi and pear and cherry";
```

`.join` combines all the items in the array together into a string. If given a string as a parameter, `.join` will place the given string in between the elements.

---

## Loops

A control flow statement allowing for the repeated execution of a code block until a specific condition is reached.

### Why Loops?

- Loops take advantage of what computers do best: evaluate instructions across organised sets of data very quickly.
- Computers excel when working in isolated patterns, which is exactly how a loop works.
- Avoid needlessly copying or re-typing code by repeating it in a loop.

[Reference code](https://codepen.io/pataruco/pen/eYpweoa)

---

## Loops

### An Iterator, Terminator, and Incrementer Walk Into a Loop...

A for loop is similar to an `if` statement but with more conditions. When creating a for loop, we need to make three declarations:

- Define a variable to act as our iterator, typically named `i`.
- Establish a condition for the loop to stop, called the terminating condition.
- Increment the iterator variable (or decrement, if the loop goes backward).

```javascript
for (let i = 0; i < 10; i++) {
  console.log(i);
}
// outputs 0,1,2,3,4,5,6,7,8,9
```

---

## Loops

### Loops + Arrays: A Classic Combination

Notice the highlighted terminating condition. The array's length limits the number of loops.

```javascript
const myArray = ['John', 'Benjamin', 'Victor', 'Serrao'];

for (let i = 0; i < myArray.length; i++) {
  console.log(myArray[i]);
}
// outputs each name in the list, one at a time
```

---

## Loops

### `.forEach` loop

The `forEach` loop, a cousin of the for loop, executes a function for each item in an array. It's particularly useful when working with collections of DOM elements.

```javascript
const buttons = document.querySelectorAll('.button'); // array (like)

buttons.forEach(function (button) {
  // the button variable references the current array item
  button.addEventListener('click', doSomething);
});
```

---

## `return`-ing to Functions

Programs with multiple, reusable functions that process and return data are the next step in your journey.

```javascript
function addThings(val1, val2) {
  return val1 + val2;
}

let result = addThings(1, 2);
console.log(result);
```

---

## `return` + Conditions

Functions will often have conditions that change the nature of their output.

```javascript
function addThings(val1, val2) {
  if (val1 >= 10) {
    return val1 + val2;
  }
  return 0;
}

console.log(addThings(11, 2));
console.log(addThings(7, 5));
```

---

## Practical Application

These examples may seem kind of silly (they are!), but that's because our data is static.

Loops and functions become more important when we handle **live data** from APIs and databases, because they help us deal with information we haven't defined ourselves!
We'll see this in action in a future lesson…!

---

## Lab 🧪

## Arrays and loops

> [Starter code](https://github.com/rjkerrison/fewd/raw/master/labs/array-loops/array-loops-starter-code.zip)

???

[Solution code](https://github.com/rjkerrison/fewd/raw/master/labs/array-loops/array-loops-solution-code.zip)

---

.row[
.column[

## Key Takeaways

> Use Loops to Handle Arrays

- Arrays can contain any amount of any data type.
- Loops create dynamic, DRY code for iterating.
- Use for loops for a specific number of iterations and while loops for unknown quantities.
  ]
  .column[

## For Next Time

Animations in CSS and JS

- We’ll venture back to CSS and learn about transforms, transitions, and animations
- We’ll also combine these with JS to create some impressive effects!

]
]

---

class: frontpage

Front-End Web Development

End of presentation

repository: andrekovac/fewd

repo_name: andrekovac/fewd


text:
## Installation

You can install it via [composer](https://getcomposer.org/)

    $ composer require mustafaomar/laravel-fileuploader

## Publishing

Publishing config file `fileuploader.php`
```bash
php artisan vendor:publish --tag=fileuploader-config
```

If you intend to store urls in database via this package, you need to publish the migration and model
```bash
php artisan vendor:publish --tag=fileuploader-migrations
```

If you want publish all
```bash
php artisan vendor:publish --provider="FileUploader\FileUploaderServiceProvider"
```

## Configuration

**`disk`**: A filesystem's disk

**`model`**: The model class

**`url_column`**: The name of the column you want to store the image link

## Usage

There are serveral ways to start using `laravel-fileuploader`

### Uploadable trait

You can use `Uploadable` in your controller and we're done, you now have access to the `uploader` method, example.

TestController.php

```php
use FileUploader\Traits\Uploadable;

class TestController extends Controller
{
    use Uploadable;

    public function store(Request $request)
    {
        $this->uploader()->save($request->file('image'))->to('/products');
    }
}
```

**Notice**: This image will be saved to the storage, and to be more specific it depends on how you're configuring the disk option in the `fileuploader.php` and the default disk is `public`
So, this file will be stored in: `/laravel-app/storage/app/public/products/[hashname]`

#### Getting the url

You may want to get the url to store it in the database, you can return the url as following.

```php
public function store(Request $request)
{
    $this->uploader()->save($request->file('image'))->to('/products')->getUrl(); // /storage/products/[hashname]
}
```

Now you can use `asset(URL)` method to show this image somewhere.

You can also quickly pass the image to the `uploader` method as the first argument, and path as the second.

```php
$this->uploader($request->image, '/products')->getUrl();
```

### Using Facade

```php
use FileUploader\Facades\FileUploader;

public function store(Request $request)
{
    $url = FileUploader::save($request->file('image'))->to('/products')->getUrl();
}
```

### Using app and make method

Just wanted to mention that you can use `make` method to resolve the `fileuploader` from the container.

```php
public function store(Request $request)
{
    app()->make('file.uploader')->save($request->file('images'))->to('/path/to');

    // OR
    app('file.uploader')->save($request->file('images'))->to('/path/to');
}
```

## Saving many files at once

You can of course, pass an array of images to the `uploader` method or using `saveMany` method, let's give it a try.

```php
public function store(Request $request)
{
    $this->uploader($request->images, '/products');

    // OR

    $this->uploader()->saveMany($request->file('images'))->to('/products')->getUrls(); // Returns: \Illuminate\Support\Collection
}
```

## Saving urls in database

You can save the files in disk and save the generated urls in the database with one line of code, just don't forget to publish the migrations

**Notice**: I assume you have a model for example `Product` and each product has many images, and in order make this work

you have to add a relation within that `Product` like so:

```php

// Product.php

public function media()
{
    return $this->morphMany(Media::class, 'mediable');
}
```

Now you have to pass the newly created `Product` model to `toDatabase` method, see this example

Notice If you want to add other columns to media table feel free to do that, then you will need to pass these additional columns to `toDatabase` method as the second paramater

```php
public function store(Request $request)
{
    $product = Product::create($request->all());

    $this->uploader($request->file('images'), '/products')
         ->toDatabase($product, [
            'other_column' => $request->other_column
         ]);
}
```

Sometimes you may want to get the urls and do whatever you want with them.

```php
public function store(Request $request)
{
    $product = Product::create($request->all());

    $product->media()->saveMany(
        $this->uploader($request->file('images'), '/products')->getUrls()
             ->map(function ($url) {
                return new MyMediaClass(['media_url' => $url]);
             });
    );
}
```

license: MIT

repository: themustafaomar/laravel-fileuploader

branch_name: refs/heads/main

extension: md

license_type: permissive

repo_name: themustafaomar/laravel-fileuploader


text:
# Services, Providers and Factories

Services, providers and factories are still massively confusing in AngularJS, but in principle, a service and a factory are just shorthands to the more verbose provider declaration.

```
myModule.provider('aProvider', function() {

    // This is a PROVIDER

    this.$get = function() {

        // This is a FACTORY

        return new function() {

	    	// This is a SERVICE

	    	this.doSomething = function() {
	        	return 'Hi!';
	    	};
        };
    };
});

```

## Services and Factories

So, the factory above is equivalent to:

```
myModule.factory('aFactory', function() {

    return new function() {
        this.doSomething = function() {
	    return 'Hi!';
	};
    };
});
```

And, the service above is equivalent to:

```
myModule.service('aService', function() {

    this.doSomething = function() {
        return 'Hi!';
    };
};
```

But in reality, you can use both a service or a factory, just remember:
* For a service, the function you write will be `new`ed up: `new myService()`
* For a factory, the function that you write will be invoked: `myFactory()`

They're all singletons. Angular goes to this trouble with Dependency Injection to ensure that is true.

## Dependency Injection

If you wish to inject dependencies into your service or factory, remember that if you add these dependencies to the provider, they will not resolve. This is because providers are created at an earlier stage in Angular's lifecycle. It's their role to provide services!

But within a `provider` function, you can use `$inject` (or the more verbose `['myDependency], function(myDependency) {... }]` syntax:

```
myModule.provider('aProvider', function() {
    this.$get = function($document) {
        return new SuperService($document[0].body); // Just doing something with the injected dependency here.
    };
    this.$get.$inject = ['$document'];
});
```

branch_name: refs/heads/master


text:
# Sri Lanka Border Ribbon
Showcase your ‘Sri Lankanness’ with the Sri Lankan Flag Ribbon on your website footer. It’s an easy to implement footer ribbon to show how much Sri Lankan you are. Best suited for a product Made in Sri Lanka.

![Image of Sri Lanka Border Ribbon](https://raw.githubusercontent.com/thisarumahadurage/sri-lanka-border-ribbon/master/demo/img/ribbon.png)

## How to use
1. Download `slbr.min.css` from `dist`
2. Link `slbr.min.css` as a stylesheet to your HTML/PHP file <br>
```html
<link rel="stylesheet" href="dist/slbr.min.css">
```
3. Add class `.slbr` to `<div>`
```html
<div class="slbr"></div>
```

## Usages

* [GymPal](https://www.gympal.io) - Used in the footer
* [Thisaru Mahadurage](http://www.thisaru.com) - Used in the footer

repository: thisarumahadurage/sri-lanka

repo_name: thisarumahadurage/sri-lanka


text:
# books-manager
Node app to check for new books based on search queries

## Install
```
yarn global add https://github.com/namannehra/books-manager
```

## Update
```
yarn global upgrade books-manager
```

**Warning:** Always backup the database file before updating. New versions may
not be compatible with old database. If app stops working after update then try
deleting the database file.

## Commands

### `domain [<domain>]`
Get or set the domain of *books website*. Domain must be set before using the
app for the first time.
```
$ books-manager domain google.com
$ books-manager domain
google.com
```

### `add`
Add entry.

| Option | Query parameter |
|--------|-----------------|
| `-a`   | artists         |
| `-c`   | characters      |
| `-g`   | groups          |
| `-l`   | languages       |
| `-p`   | parodies        |
| `-t`   | tags            |
```
$ books-manager add -t "story arc" military -l english
```

### `list`
List entries.
```
$ books-manager list
```

### `remove <number>`
Remove entry.
```
$ books-manager remove 1
```

### `update [<number1> <number2> ...]`
Update entries. If used without numbers then update all entries.
```
$ books-manager update 1 2 3
$ books-manager update
```

### `read [<number1> <number2> ...]`
Mark the last books of search entry as read. If used without numbers then mark
last books of all queries as read.
```
$ books-manager read 1 2 3
$ books-manager read
```

### `sort`
Sort entries based on total books.

## Output
Output is displayed in following format.
```
<number>. <query> - <link> <unread-count>
 | <unread-book-1-name> - <unread-book-1-link>
 | <unread-book-2-name> - <unread-book-2-link>
 | <unread-book-2-name> - <unread-book-2-link>
```
- `<unread-count>` is not shown if it's zero.
- Unread books are not shown if `<unread-count>` is greater than 3.

## Database file
Data is stored in `books-manager.json` at user's home directory.

repository: namannehra/books-manager

repo_name: namannehra/books-manager


text:
Project: /_project.yaml
Book: /_book.yaml

# Finding Non-Hermetic Behavior in WORKSPACE Rules

{% include "_buttons.html" %}

In the following, a host machine is the machine where Bazel runs.

When using remote execution, the actual build and/or test steps are not
happening on the host machine, but are instead sent off to the remote execution
system. However, the steps involved in resolving workspace rules are happening
on the host machine. If your workspace rules access information about the
host machine for use during execution, your build is likely to break due to
incompatibilities between the environments.

As part of [adapting Bazel rules for remote
execution](/remote/rules), you need to find such workspace rules
and fix them. This page describes how to find potentially problematic workspace
rules using the workspace log.

## Finding non-hermetic rules {:#nonhermetic-rules}

[Workspace rules](/reference/be/workspace) allow the developer to add dependencies to
external workspaces, but they are rich enough to allow arbitrary processing to
happen in the process. All related commands are happening locally and can be a
potential source of non-hermeticity. Usually non-hermetic behavior is
introduced through
[`repository_ctx`](/rules/lib/builtins/repository_ctx) which allows interacting
with the host machine.

Starting with Bazel 0.18, you can get a log of some potentially non-hermetic
actions by adding the flag `--experimental_workspace_rules_log_file=[PATH]` to
your Bazel command. Here `[PATH]` is a filename under which the log will be
created.

Things to note:

* the log captures the events as they are executed. If some steps are
  cached, they will not show up in the log, so to get a full result, don't
  forget to run `bazel clean --expunge` beforehand.

* Sometimes functions might be re-executed, in which case the related
  events will show up in the log multiple times.

* Workspace rules  currently only log Starlark events.

  Note: These particular rules do not cause hermiticity concerns as long
  as a hash is specified.

To find what was executed during workspace initialization:

1.  Run `bazel clean --expunge`. This command will clean your local cache and
    any cached repositories, ensuring that all initialization will be re-run.

2.  Add `--experimental_workspace_rules_log_file=/tmp/workspacelog` to your
    Bazel command and run the build.

    This produces a binary proto file listing messages of type
    [WorkspaceEvent](https://source.bazel.build/bazel/+/master:src/main/java/com/google/devtools/build/lib/bazel/debug/workspace_log.proto?q=WorkspaceEvent)

3.  Download the Bazel source code and navigate to the Bazel folder by using
    the command below. You need the source code to be able to parse the
    workspace log with the
    [workspacelog parser](https://source.bazel.build/bazel/+/master:src/tools/workspacelog/).

    ```posix-terminal
    git clone https://github.com/bazelbuild/bazel.git

    cd bazel
    ```

4.  In the Bazel source code repo, convert the whole workspace log to text.

    ```posix-terminal
    bazel build src/tools/workspacelog:parser

    bazel-bin/src/tools/workspacelog/parser --log_path=/tmp/workspacelog > /tmp/workspacelog.txt
    ```

5.  The output may be quite verbose and include output from built in Bazel
    rules.

    To exclude specific rules from the output, use `--exclude_rule` option.
    For example:

    ```posix-terminal
    bazel build src/tools/workspacelog:parser

    bazel-bin/src/tools/workspacelog/parser --log_path=/tmp/workspacelog \
        --exclude_rule "//external:local_config_cc" \
        --exclude_rule "//external:dep" > /tmp/workspacelog.txt
    ```

5.  Open `/tmp/workspacelog.txt` and check for unsafe operations.

The log consists of
[WorkspaceEvent](https://source.bazel.build/bazel/+/master:src/main/java/com/google/devtools/build/lib/bazel/debug/workspace_log.proto?q=WorkspaceEvent)
messages outlining certain potentially non-hermetic actions performed on a
[`repository_ctx`](/rules/lib/builtins/repository_ctx).

The actions that have been highlighted as potentially non-hermetic are as follows:

* `execute`: executes an arbitrary command on the host environment. Check if
  these may introduce any dependencies on the host environment.

* `download`, `download_and_extract`: to ensure hermetic builds, make sure
  that sha256 is specified

* `file`, `template`: this is not non-hermetic in itself, but may be a mechanism
  for introducing dependencies on the host environment into the repository.
  Ensure that you understand where the input comes from, and that it does not
  depend on the host environment.

* `os`: this is not non-hermetic in itself, but an easy way to get dependencies
  on the host environment. A hermetic build would generally not call this.
  In evaluating whether your usage is hermetic, keep in mind that this is
  running on the host and not on the workers. Getting environment specifics
  from the host is generally not a good idea for remote builds.

* `symlink`: this is normally safe, but look for red flags. Any symlinks to
  outside the repository or to an absolute path would cause problems on the
  remote worker. If the symlink is created based on host machine properties
  it would probably be problematic as well.

* `which`: checking for programs installed on the host is usually problematic
  since the workers may have different configurations.

repository: bazelbuild/bazel

gha_language: Java

repo_name: bazelbuild/bazel


text:
---
layout: page-breadcrumbs.html
template: topic-landing
title: Alternative Ways to Start Your Career
concurrence: complete
relatedlinks:
  - heading:
    links:
    - url: /education/work-learn/workstudy/
      title: Work Study
      description: This program allows you to use your GI Bill for higher education while working for VA.
    - url: https://www.dol.gov/apprenticeship/
      title: On-the-Job Training and Apprenticeships
      description: VA makes GI Bill payments to employers while you learn a vocational trade through a certification course or union training. During this time, you may receive military housing allowance benefits.
    - url: /education/work-learn/non-college-degree-program/
      title: Non-College Degree Programs
      description: The GI Bill may pay all or a portion of your tuition, as well as providing a books and supplies stipend and a monthly housing allowance, while you get your training at an approved institution.
    - url: /education/work-learn/co-op-training/
      title: Co-op Training
      description: The GI Bill provides educational assistance for programs that require periods of work alternating with periods of full-time education.
    - url: /education/work-learn/non-traditional/
      title: Non-Traditional Options
      description: The GI Bill supplements distance learning and correspondence courses, which can be helpful if you need to attend some or all courses remotely because you are balancing work and education.
    - url: /education/advanced-training-and-certifications/entrepreneurship-training/
      title: Entrepreneurship Training
      description: You can start or grow your own business using skills you learned in the military in combination with business-management training. You may receive reimbursement through the GI Bill for approved entrepreneurship courses.
    - url: http://mycareeratva.va.gov/library/55
      title: Internships
      description: Internships can advance your career and expand your network while you further your education.
    - url: http://www.volunteer.va.gov/
      title: Volunteer Work and Community Service
      description: Community involvement and service are productive ways to network with civilians and open the door to future employment possibilities.
  - heading: Resources for Job Seekers
    links:
    - url: /employment/job-seekers/skills-translator
      title: Military Skills Translator
      description: Use this tool to convert your military experience into civilian language that hiring managers can easily understand.
    - url: /employment/job-seekers/create-resume
      title: Resume Builder
      description: Use this tool to build a civilian or federal resume.
    - url: https://www.careeronestop.org/JobSearch/job-search.aspx
      title: Job Search
      description: Search the Veterans Job Bank to find the right position for you.
---

<div class="va-introtext">

There are many ways for you to launch your civilian career and continue your education at the same time, and many options other than traditional education programs.

</div>

repository: jennilynhowell/vets-website

repo_name: jennilynhowell/vets-website


text:
---
title: On the Server
page_title: On the Server - RadAutoCompleteBox
description: Check our Web Forms article about On the Server.
slug: autocompletebox/working-with-entries/on-the-server
tags: on,the,server
published: True
position: 0
---

# On the Server

The following case scenario gives an insight into the AutoCompleteBoxEntry collection when working with the selected entries	of RadAutoCompleteBox on the server.

##

````ASPNET
<telerik:RadButton RenderMode="Lightweight" runat="server" ID="RadButton1" OnClick="RadButton1_Click" Text="Get selected entries" />

<asp:Label runat="server" ID="Label1" />

<telerik:RadAutoCompleteBox RenderMode="Lightweight" ID="RadAutoCompleteBox1" runat="server" AllowCustomEntry="true"
	InputType="Token" Delimiter=";" DataSourceID="SqlDataSource1" DataTextField="Name"
	DataValueField="ID">
</telerik:RadAutoCompleteBox>

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TelerikConnectionString %>"
	SelectCommand="SELECT [ID], [NAME] FROM [Cities]"></asp:SqlDataSource>
````

````C#

protected void RadAutoCompleteBox1_EntryAdded(object sender, AutoCompleteEntryEventArgs e)
{
	Label1.Text = e.Entry.Text + " was added.";
}

````
````VB

Protected Sub RadButton1_Click(sender As Object, e As EventArgs)
	For Each entry As AutoCompleteBoxEntry In RadAutoCompleteBox1.Entries
		Label1.Text += entry.Text + ": " + entry.Value + ", "
	Next
End Sub

````

# See Also

 * [Add/remove tokens from the AutoCompleteBoxEntry collectionon the server.](https://demos.telerik.com/aspnet-ajax/autocompletebox/examples/programming/addremove/defaultcs.aspx)

repository: telerik/ajax-docs

gha_language: C#

repo_name: telerik/ajax-docs


text:
---
title: Into the Ebersberger Forst
date: 2019-3-9
category: hiking
blurb:
layout: post
location: Ebersberger Forst
elevation: 400
---

Since moving out of the city I'd wanted to walk through the local
forest, which impressed me very much. I've since learned it's the
largest forest in the flat-lands of Germany ([wikipedia](https://de.wikipedia.org/wiki/Ebersberger_Forst)). 90 square kilometers without any homes, 77 square kilometers of
which belongs to the state. Here is an interesting note:

> Dies zeigt sich auch sprachlich in den lokalen Bezeichnungen für die
> Landkreisbewohner süd-östlich („Innerhoizer“) und nordwestlich des
> Forstes („Draußerhoizer“), jeweils aus Sicht der Kreisstadt Ebersberg.

This makes sense to me...now having walked through to the broad, crisp view
of mountains from the heights above Ebersberg. They are "inside," nestled between
the forest and mountains to the south. How strange, these Draußerhoizer must
have seemed. Now of course, with cars, such interesting distinctions tend
to be forgotten.

I was inclined to be upset at the grid-pattern of roads through the forest,
but I suppose it gets a pass due to antiquity alone. Below is a map from
1866, and things are exactly the same ([wikipedia link](https://de.wikipedia.org/wiki/Ebersberger_Forst#/media/File:Urpositionsblaetter_Bayern_blatt_695.jpg)):

{% image https://upload.wikimedia.org/wikipedia/commons/f/fa/Urpositionsblaetter_Bayern_blatt_695.jpg %}

{% image /cmaimages/2019/typical-parking-lot-sign_33458536388_o.jpg %}
Typical parking lot sign

In fact the *Geräumte* paths were made in the middle of the 18th century.
This makes sense: science, and it's vision of solving complexity through subdivision
was taking it's grip on minds. I experience the grid as a kind of violence.
I should have sympathy though. Nature then was bigger, and threatened to overwhelm.
If you feel *that way*, you might take comfort in a grid that pins down the untamed
in place.

There is even a ghost story - the "*weisse Frau*" who long haunted the road between
Markt Schwaben and Ebersberg. Drivers would notice a light in the little
*Hubertus Kapelle* on the side of the road. If they stopped it would again be
dark, or, worse, they may see her. I'm sure someone came for her in the end, though.

----

I set out immediately crestfallen because I found that my trusty old compass was broken.
Drat! My goal was to follow a bearing across the forest ignoring the roads. However,
I rode my bike to the local sporting goods store, and believe it or not they still had
a *compass*, that archaic and forgotten device. Actually they had two. Now only one -
*so hurry!*

I made the 5 kilometer bike ride to the parking lot at Schwaberwegen. Using my map,
I composed a bearing of slightly more south than east, making for the *Forsthaus
St. Hubertus*, and then to the *Ludwighöhe* beyond. I dialed this into the compass,
and resolved to check my progress after an hours walk by checking the gps in my
phone. Yes, I'm a bit of a baby, but *one with aspirations!*

{% image /cmaimages/2019/my-bearing-for-2-hours_46419552015_o.jpg %}
My bearing for 2 hours

For the first half hour I was not enjoying the forest floor very much. Continually
bent forward under branches, in and out of brushy copses, with a never-ending
series of bulldozer tracks, brambles, sticks. Through "trackless" forest I wanted
to go, but the whole place appeared to have been the playground of demons with
power machinery for 50 years. I guess that's pretty much the truth? I grimaced --
never before had the term "working forest" seemed so much like the term "working girl."
Behind each muddy track I saw the ill-formed desires of people surrounding the
forest. "WANT!" they screamed, and so some poor schlub started up his diesel-fueled
device and extracted some shareholder value from the nearby forest. Sigh.

However, the forest is big enough to suffer without being wholly beaten.
Eventually I came to taller trees, with moss on the ground. I could walk tall again and
see further. Travel by compass is easier when you can navigate by a sight in the
middle or far distance. I practiced my ability to hold a clear mental vision,
losing sight of the oddly leaning tree or snowpatch that was my next destination,
and remaking it in my mind with slightly different angles and lighting...how it
might look when I arrive 40 seconds later. I was continually watched by hunter
stands, "thrones" for the lords of the forest. As for people there was, of course,
no one.

{% image /cmaimages/2019/img_20190309_134728jpg_46611067014_o.jpg %}
Trail in the south

{% image /cmaimages/2019/finally-on-a-trail_46611066504_o.jpg %}
Finally on a trail

I checked my phone after an hour, and was about where I expected to be. Cool! In the next
hour I just missed a large clearing on the west side, and turned out to be due west
of the *Forsthaus* by probably 15 minutes. I adjusted my bearing to move more eastward,
then came to beautiful hills in the forest. At some point a collection of wild boars
silently fled my approach to the west. At the end of 2.5 hours, I was in the hilly
southern part of the forest near the Egglburger See. I turned on the gps to track
the rest of the day, and really enjoyed this southern upland. As usual, hills protect
nature from human interference.

I ate my lunch at a "meditation bench" just below the *Ludwigshöhe*. The view of mountains
was fantastic. The Wilder Kaiser Range in particular looked great from here.

{% image /cmaimages/2019/my-lunch-spot_47334415361_o.jpg %}
My lunch spot

I went up the lookout tower, my legs tired from the long walk. I followed a hikers trail
(well marked) to the Forsthaus Hubertus 5 kilometers distant -- this was very enjoyable.
I'd like to run this trail later. The Haus was in it's "winter sleep" according to a sign
posted near the door.

{% image /cmaimages/2019/looking-south-from-the-aussichtsturm_47334416261_o.jpg %}
Looking south from the Aussichtsturm.

{% image /cmaimages/2019/looking-northwest-into-the-forest_46419554035_o.jpg %}
Looking northwest into the forest

From here I went due west into a special wildlife reserve. The trail was still asthetically
pleasing, and deep glimpses into forest mystery were always possible. I listened to
"Humidity," Robert Rich's ode to organic growth on faraway planets. Or maybe on lonely
biological outcroppings deep within -- hard to tell!

Finally though I had to pay the piper for the long and fascinating walk with the traversal
of 4 kilometers of deadly-boring straight road on tired legs. Back to my bike, then
riding home as the rain began.

It was about 25 kilometers of walking through the forest, 10 kilometers on the bike.
Elevation gain about 400 meters overall. I started walking at 11 am, and was on the
return journey at about 2:30. I reached my bike at 5 pm.

repository: ripsawridge/site

gha_language: JavaScript

repo_name: ripsawridge/site


text:
---
vid: KHV040
title: Exposed Run Inside Container
categories: [Remote Code Execution]
---

# {{ page.vid }} - {{ page.title }}

## Issue description

An attacker could run arbitrary commands on a container via the kubelet's `/run` endpoint. This endpoint is exposed as part of the kubelet's debug handlers.

## Remediation

Disable `--enable-debugging-handlers` kubelet flag.

## References

- [kubelet server code](https://github.com/kubernetes/kubernetes/blob/4a6935b31fcc4d1498c977d90387e02b6b93288f/pkg/kubelet/server/server.go)
- [Kubelet - options](https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/#options)


text:
AI Forecast using LTSM

It basically takes some smartmeter data (5 cols, > 12mil. instances, cols: id, device_name, property, value, timestamp) and creates a custom forecast based on selected window.
The file is available in .py and .ipynb format, so you can choose according to your preferences.

Please notice that once you load up the smartmeter data, there are inputs created on the timestamp col like wd_input (the weekday of the timestamp), as well as a cos(inus) and sin(us)
time inputs, giving the model the ability to keep track of the daytime of each instance. Finally, the inputs are merged to an input df, standardized and differenced.
After that, some functions are used to give the user the ability to use time windows from the data. Based on these, the model generates forecasts.

The first models created are a simple baseline model, used for evaluating the performance of the later on built LSTM model. The baseline model simply shifts the values by t=1. Hence,
there is no t=0 and each timestamp uses the value from t-1.
Finally, there's the 2-layer plain vanilla LSTM. After 11 epochs, I reached a loss of 10.86 which is rather mediocre. However, the main idea here is to build a basic forecasting model
for which this seems appropriate.

repository: JeromeBlanchet/ai

repo_name: JeromeBlanchet/ai


text:
## androtools

Android Malware static & dynamic analysis tool<br>
Network Traffic, Simliarity Check, Automatic Action on Virtual Device

### How to use?

Just execute this!
```
python2.7 androtools.py filename.apk output.html
```

#### Project Manager
@bunseokbot
- UpRoot, Inc.
- Sejong University, Major of Computer and Information Security 15'

repository: Primekun/androtools

repo_name: Primekun/androtools


text:
#Emberjs Reference
___

## Tutorials

- [Ember.js Guides](http://emberjs.com/guides/getting-started/)
 or you can get from [here](https://leanpub.com/emberjsguides/read)

- [Ember CLI](http://www.ember-cli.com/)

- [Getting Started with Ember.js](http://twbrandt.github.io/2013/02/11/Ember-Quick_Start_Guide/)  by Tom Brandt

- [Ember.js Code-Walkthrough (Video)](http://www.lukaszielinski.de/blog/posts/2013/02/23/ember-dot-js-code-walkthrough-video/)- Another Programming Blog

- [Ember.js Screencasts](http://www.embercasts.com/) - embercasts

- [Heretical Guide To Ember JS](http://gilesbowkett.blogspot.com/2013/06/heretical-guide-to-ember-js.html) by GILES BOWKETT

## Books
- [Ember.js in Action](http://www.amazon.com/Ember-js-Action-Joachim-Haagen-Skeie/dp/1617291455) by Joachim Haagen Skeie

- [Mastering Ember.js](http://www.amazon.com/Mastering-Ember-js-Mitchel-Kelonye/dp/1783981989/ref=pd_bxgy_b_text_y) by Mitchel Kelonye

- [Developing an Ember.js Edge](http://www.amazon.com/Developing-Ember-js-Edge-Jamie-White-ebook/dp/B00JETLW32/ref=sr_1_9?s=books&ie=UTF8&qid=1427061463&sr=1-9&keywords=emberjs) by Jamie White, Matthew Beale, Christopher Sansone, Wesley Workman, Bradley Priest

- [The Ember.js Way (Developer's Library)](http://www.amazon.com/Ember-js-Way-Developers-Library/dp/0321994531/ref=sr_1_8?s=books&ie=UTF8&qid=1427061463&sr=1-8&keywords=emberjs) by Brian Cardarella, Alex Navasardyan

- [ember-cli-101](https://leanpub.com/ember-cli-101)
## Courses & Videoes
- [Warming Up With Ember.js](https://www.codeschool.com/courses/warming-up-with-ember-js) by Code School

- [Ember.js
Fundamentals](http://www.pluralsight.com/courses/emberjs-fundamentals) by Pluralsight

- [Ember for Beginners](http://code.tutsplus.com/courses/ember-for-beginners) by Tuts

- [Up and Running with Ember.js](http://www.lynda.com/Emberjs-tutorials/Up-Running-Emberjs/178116-2.html) by Lynda

- [Ember 101 Video Series](http://ember101.com/videos/001-intro-and-binding-data-to-templates) by ember101

## EmberConf
- [EmberConf 2015](https://github.com/poteto/emberconf-2015)

## Github,Forum,Blogs
- [EmberWatch](http://emberwatch.com/)
- [Robin Ward’s blog AKA Evil Trout](http://eviltrout.com/)
- [nerdyworm](http://nerdyworm.com/) and his [github](https://github.com/nerdyworm)
- [ember.js posts](https://www.airpair.com/posts/tag/ember.js) by Airpair
- [The Road to Ember 2.0](https://github.com/emberjs/rfcs/pull/15)
- [Ember JSBin Examples on Gist](https://gist.github.com/rwjblue/8816372)


text:
# Everything New(s)
Built over the course of two days using Node.js, Express, Sequelize, PostgreSQL, React, Redux, and React-Redux, Everything New(s) uses the News API to allow users to view and save top stories from worldwide media outlets.

## Main Technologies Used
* [Node.js](https://nodejs.org/en/)
* [Express](https://expressjs.com/)
* [PostgreSQL](https://www.postgresql.org/) and [Sequelize](http://docs.sequelizejs.com/)
* [React](https://reactjs.org/) and [Redux](https://redux.js.org/)

## Installation
To install the project, fork the project to your github and clone a copy onto your local machine. Run `npm install` to install project dependencies.

### News API Setup
In order to make API calls to the News API endpoints, you'll need to register to obtain an api-key: https://newsapi.org/

### secrets.js Setup
Create a secrets.js file in the main project folder. You'll want to add your API key and an alphanumeric string to use as your session secret. The express-session module will hash your string and use it to sign the session ID cookie.

```javascript

process.env.API_KEY = *your api key here*;
process.env.SESSION_SECRET = *your session secret here*

```

### Database Setup
You'll need manually create a PostgreSQL database to store users' data (ids and saved articles). If you have PostgreSQL installed globally, in your terminal run the command:

`createdb polis`

to intialize an empty database.

### Initializing A Local Server
Once you've completed the above, you're ready to start a local server. Run `npm start-dev` to start the server, compile JSX into JavaScript, and bundle the front-end app.

In your browser, navigate to `http://localhost:8080/` and the app should be up and running.

### Running Tests
To run tests, you'll need to set up a test PostgreSQL datbase. In your terminal, run the command:

`createdb test-polis`

Tests can be run by typing:

`npm run test`

## Authors
Anjali Merchant

## Acknowledgments
[Fullstack Academy's Boilermaker](https://github.com/FullstackAcademy/boilermaker) was used as a template for this app.

repository: anjiemerchant/news

gha_license_id: MIT

repo_name: anjiemerchant/news


text:
# IfSharp
F# implementation for [iPython](http://ipython.org). View the [Feature Notebook](http://nbviewer.ipython.org/github/BayardRock/IfSharp/blob/master/Feature%20Notebook.ipynb) for some of the features that are included.

# Getting Started
1. Install [Anaconda](http://continuum.io/downloads)
2. Install [IPython](http://ipython.org/install.html)
3. Run: "ipython profile create ifsharp" in your user directory
4. Open the iF# solution file, restore nuget packages, and compile it
5. Copy the files from IfSharp\ipython-profile to the iFSharp profile directory
6. Open up the copied "ipython_config.py" file and change "..\\bin\\ifsharp.exe" to the path of your compiled ifsharp executable.
7. Run: "ipython notebook --profile ifsharp" to launch the notebook process with the F# kernel.

# Screens
![Intellisense Example #1](https://raw.github.com/BayardRock/IfSharp/master/docs/files/img/intellisense-1.png "Intellisense Example #1")
![Intellisense Example #2](https://raw.github.com/BayardRock/IfSharp/master/docs/files/img/intellisense-2.png "Intellisense Example #2")

repository: hihihippp/IfSharp

repo_name: hihihippp/IfSharp


text:
# 11-sql_queries_101
Class exercise - practicing sql queries

Link to directions for this class exercise:
https://github.com/nashville-software-school/node-milestones/blob/master/01-foundations/exercises/11-sql_queries_01.md

NOTE: This exercise was completed using DB Browser for SQLite, which states it does not support JOIN for OUTER, RIGHT or FULL

NOTE: The exercise has been revisted to include doing the queries via javascript using npm sqlite3.  The redundancy of queries created redudancies in the database.


text:
# laser-triangulation
- Implement Halcon's sheet-of-light 3D reconstruction demo with OpenCV

- The name of the Halcon demo is calibrate_sheet_of_light_calplate.hdev

## Tools used:
- OpenCV (4.5.3)
- CMake (3.21.0)

# Usage
1. Copy all images into a folder, name it as "images".
2. Move the folder to the same directory of the demo executable.
3. Run the demo executable.

## [Download](https://drive.google.com/file/d/1AW4xb54XKZ9XV_aJdCeAZJG_-yoiyfAF/view?usp=sharing) images

# Source code in "src" folder

- Code written when in development and test
  - calibrate_camera.cc Camera calibration.
  - calibrate_laser.cc Laser plane calibration.
  - calibrate_movement.cc Movement of the platform calibration.
  - extract.cc Laser line extraction.
  - scan.cc Reconstruction from images.
- Static library "utils" code
  - laser_triangulation.h The header
  - fit_3d_plane.cc
  - extract_laser_line.cc
  - reconstruction.cc
  - back_projection.cc Project image points to camera coordinate.
  - write_ply.cc Output result to PLY format.
- Final demo code: calibrate_sheet_of_light_calplate.cc

Reconstructed connection rod displayed in Matlab.

![Reconstructed object display in Matlab](connection_rod_3d.png)

# Issues
- Laser line extraction method is not accurate and robust.


text:
# MMIF

Repository for MMIF specifications, MMIF schema and the CLAMS vocabulary.

To create a new version use the `build.py` script:

```bash
$ python build.py
```

This creates a new version in `docs/VERSION` where the version is taken from the `VERSION` file.

### Local build and preview

HTML files generated from `build.py` will be deployed to a github.io page. The base webpage where all the versioned specifications reside is deployed via the `jekyll` engine. That is, to test and preview a local build, one needs to install `jekyll` for local serving, which in turn, requires ruby. Install ruby following [this documentation](https://www.ruby-lang.org/en/documentation/installation/). `jekyll` wants ruby>=2.5, but ruby is shipped with `bundle/bundler` (*THE* dependency management utility for ruby) only since 2.6, hence installing 2.6 or newer is preferred. For 2.5, one needs to manually install bundler after installing ruby.

Once ruby and bundler are ready,

1. `bundle env | grep Bin` # this is where jekyll is installed
1. `cd docs`
1. `rm Gemfile.lock`
1. `bundle install`
1. `jekyll serve` # if the bundle Bin dir is not in your `$PATH`, use absolute path to jekyll binary

should give you a running instance of the MMIF specification website at localhost:4000.

Note that the starting jekyll will download website theme and L&F from the internet (Specifically from https://github.com/clamsproject/website-theme ). So you need an internet connection to get the full preview locally. To start jekyll without a connection (and lose styles) you need to comment `remote_theme` config line from `docs/_config.yaml` file before running the jekyll command.

### Checklist for deployment

List of things to do when creating a new version:

- [ ] Update the `VERSION` file.
- [ ] Run the build.py script. This will automatically do the following:
  - Collect all changes (schema, vocabulary and specifications)
  - Update `specifications/index.md` to replace version numbers.
  - Update all the sample files so they all have the right version number.
  - Update VERSIONS list in `docs/_config.yml`.
  - Update `docs/index.md` (date at the bottom).
- [ ] Test all examples to see whether they match the schema.
- [ ] Check all pages
- [ ] Final updates to `CHANGELOG.md`.
- [ ] Submit all changes (including ones that were made automatically, like the changes to the config file in the documentation directory) and merge to the main branch.

repository: clamsproject/mmif

branch_name: refs/heads/develop

gha_language: Python

repo_name: clamsproject/mmif


text:
# Google Desktop Apps for Mac OS X
We all use Google Apps everyday-Docs, Sheets, Gmail, Drive, etc.

Wouldn't it be nice to have your Gmail as an application that can remain open without needing to load Chrome and navigate to Gmail? Well that is the purpose of creating these various desktop Google Apps.

The first idea for this came from [/u/chriskol](https://github.com/chriskol) who created the first Google Docs and Keep versions. I discovered his github page when I realized that Google took Google Keep off the Chrome Web Store as an app to use on your desktop, opting to just make it available in the browser. I brought his code for Docs and Keep over to this repo to put everything in one centralized place.

Below is a list of all the apps currently available and instructions on how to download them. The quickest way to get them is to just head over to a site that was created to make them super easy to download: [**Google Apps for Mac**](https://www.googleappsformac.com).

# List of Google Apps Available
**Core Google Apps**
* [Google](https://github.com/landek/Google-Desktop-Apps-for-Mac-OS-X/tree/master/Google)
* [Gmail](https://github.com/landek/Google-Desktop-Apps-for-Mac-OS-X/tree/master/Gmail)
* [Inbox](https://github.com/landek/Google-Desktop-Apps-for-Mac-OS-X/tree/master/Inbox)
* [Drive](https://github.com/landek/Google-Desktop-Apps-for-Mac-OS-X/tree/master/Drive)
* [Maps](https://github.com/landek/Google-Desktop-Apps-for-Mac-OS-X/tree/master/Maps)
* [Web Store](https://github.com/landek/Google-Desktop-Apps-for-Mac-OS-X/tree/master/Chrome%20Web%20Store)

**Google Drive-Associated Apps**
* [Docs](https://github.com/landek/Google-Desktop-Apps-for-Mac-OS-X/tree/master/Docs)
* [Sheets](https://github.com/landek/Google-Desktop-Apps-for-Mac-OS-X/tree/master/Sheets)
* [Slides](https://github.com/landek/Google-Desktop-Apps-for-OS-X/tree/master/Slides)
* [Forms](https://github.com/landek/Google-Desktop-Apps-for-Mac-OS-X/tree/master/Forms)

**Calendar, Notes, & To-Do Apps**
* [Calendar](https://github.com/landek/Google-Desktop-Apps-for-Mac-OS-X/tree/master/Calendar)
* [Keep](https://github.com/landek/Google-Desktop-Apps-for-Mac-OS-X/tree/master/Keep)
* [Tasks](https://github.com/landek/Google-Desktop-Apps-for-Mac-OS-X/tree/master/Tasks)

**Entertainment & Fun, & Education Apps**
* [Youtube](https://github.com/landek/Google-Desktop-Apps-for-Mac-OS-X/tree/master/Youtube)
* [Photos](https://github.com/landek/Google-Desktop-Apps-for-Mac-OS-X/tree/master/Photos)
* [Google Music](https://github.com/landek/Google-Desktop-Apps-for-Mac-OS-X/tree/master/Music)
* [Youtube Kids](https://github.com/landek/Google-Desktop-Apps-for-Mac-OS-X/tree/master/Youtube%20Kids)
* [Express](https://github.com/landek/Google-Desktop-Apps-for-Mac-OS-X/tree/master/Express)

**Educational Apps**
* [Classroom](https://github.com/landek/Google-Desktop-Apps-for-Mac-OS-X/tree/master/Classroom)
* [Scholar](https://github.com/landek/Google-Desktop-Apps-for-Mac-OS-X/tree/master/Scholar)
* [Earth](https://github.com/landek/Google-Desktop-Apps-for-Mac-OS-X/tree/master/Earth)

**Business & Data Apps**
* [Cloud Console](https://github.com/landek/Google-Desktop-Apps-for-Mac-OS-X/tree/master/Cloud%20Console)
* [Blogger](https://github.com/landek/Google-Desktop-Apps-for-Mac-OS-X/tree/master/Blogger)
* [Analytics](https://github.com/landek/Google-Desktop-Apps-for-Mac-OS-X/tree/master/Analytics)
* [Adwords](https://github.com/landek/Google-Desktop-Apps-for-Mac-OS-X/tree/master/Adwords)
* [Adsense](https://github.com/landek/Google-Desktop-Apps-for-Mac-OS-X/tree/master/Adsense)
* [Optimize](https://github.com/landek/Google-Desktop-Apps-for-Mac-OS-X/tree/master/Optimize)
* [Surveys](https://github.com/landek/Google-Desktop-Apps-for-Mac-OS-X/tree/master/Surveys)

# How Do I Download One, Two, or All of them?
**You have two options:**
1. Download the apps from the website: [Google Apps for Mac](https://www.googleappsformac.com). (The easy option)
2. Download the .zip files from this github repo. (The barely harder option)

**Downloading from Github**
1. Download all the apps by downloading the folder in this repo called [**Download Apps**](https://github.com/landek/Google-Desktop-Apps-for-Mac-OS-X/tree/master/Download%20Apps)
--That folder has a .zip file that contains the app. Just un-zip and use!
2. Download individual apps by going to the individual folders for each application and download the .zip file in the folder. You do _not_ need to download the whole folder, just the .zip file, i.e. inside the Gmail folder you'd download [**Gmail.zip**](https://github.com/landek/Google-Desktop-Apps-for-Mac-OS-X/blob/master/Gmail/Gmail.zip) and unzip it.

**Click the image below to watch an ~60 second Youtube video on how to download, open, and modify your security settings to allow the apps to open**
[![How to Download](https://github.com/landek/Google-Desktop-Apps-for-Mac-OS-X/blob/master/youtubevideoscreenshot.png)](https://youtu.be/RQSgiJPDGfg)

# Opening Apps from an Unidentified Developer!
**Important final step to use the apps**
Due to the fact that I am an "unidentified" developer by Apple, you'll need to go into your "Security & Privacy" settings in System Preferences after unzipping and double-clicking on the app you download. Once in there, you'll see on the main page a little dialog box asking if you want to open the app anyway. The video below that shows how to download and open apps also shows how you navigate the security settings.

# How were these all made?
It is really simple. They are built with Javascript and MacGap, just one line of code to wrap the particular Google app in a window on your desktop. All made possible by [MacGap](https://github.com/MacGapProject/MacGap2). Build your own wrapper for an HTML5 app using instructions on [MacGap-rb](https://github.com/maccman/macgap-rb).

# Why don't you have X app available?
Most likely because it wouldn't play nice with the MacGap wrapper and/or it isn't too popular of an app. Feel free to send me an email or post a feature request in the issues for an app you'd like to see.

# I can't get X app to work on my computer?
Bummer. Just post the description of the problem in the issues and we'll figure it out.

repository: landek/Google-Desktop-Apps-for-Mac-OS-X

repo_name: landek/Google-Desktop-Apps-for-Mac-OS-X


text:
# CSS Conditional Rules

https://www.w3.org/TR/css3-conditional/

CSS Conditional Rules Module Level 3

W3C Candidate Recommendation 4 April 2013

url: https://raw.githubusercontent.com/xgqfrms/learning/6562e085b5826e7706a74af700fd6800b9af3fe7/DOM/DOM Style Object/CSS Conditional Rules/readme.md

repository: xgqfrms/learning

branch_name: refs/heads/gh-pages

repo_name: xgqfrms/learning


text:
# APA Data Requester (server)

This is primarily a toy project to teach myself about React and Redux. The outcome will be a simple single page web app that enables Australian citizens to request data held about them under the Australian Privacy Act by the Australian federal Police.

[![Build Status](https://travis-ci.org/davesag/apa-data-requester.svg?branch=master)](https://travis-ci.org/davesag/apa-data-requester)

See [the corresponding client project](https://github.com/davesag/apa-data-requester-client).

## Background

The [Australian Privacy Act](https://www.oaic.gov.au/privacy-law/privacy-act/) allows Australian citizens to access personal information held about themselves by Australian companies and government agencies including the Australian Federal Police. You can request documents such as criminal records, investigation records and other data (with a few exceptions). To access these documents you simply lodge a `Privacy Request` with the Australian Federal Police. This can be done by emailing [privacy<EMAIL_ADDRESS>with the following information:

* Your full name
* Date of birth
* Current residential address
* Contact details, such as email or phone number,
* Details as to the information you are seeking
* Some valid photo ID

If you are a journalist, you could supply the following wording:

"Under the terms of the Australian Privacy Act, I request access to all documents held by the AFP mentioning my name related to referrals to the AFP for investigation regarding leaks to me in my capacity as a journalist for [publication name]."

If you are not a journalist you could use this wording instead:

"Under the terms of the Australian Privacy Act, I request access to all documents held by the AFP mentioning my name, created between [date] and [date]."

The AFP then has 30 days to respond. It has internal access to a simple to use name search database and is able to pull up records by name if asked. If you are not satisfied with the response you get, or you don't think the AFP handed over all the information you believe they have that concerns you, then you can file a privacy complaint, and the Privacy Commissioner can consider whether to investigate the matter. The filing of these subsequent complaints is out of scope for this project however.

### Links

* http://www.crikey.com.au/2016/04/15/how-to-know-if-the-afp-is-spying-on-you-or-your-sources/ (My inspiration for this project)
* http://www.theguardian.com/media/2016/feb/12/the-afp-and-me-how-one-of-my-asylum-stories-sparked-a-200-page-police-investigation
* http://www.theguardian.com/world/2016/apr/14/federal-police-admit-seeking-access-to-reporters-metadata-without-warrant

# Development

This is, at heart, a toy project, whose aim is to teach myself to use Redux and React in a non-trivial way.

## Pre-requisites

* [NodeJS 6.5.0] or better. `brew install node` or even better use [NVM](https://github.com/creationix/nvm) and `nvm install 6.5.0`

Run `npm install` to install all the dependencies.

## To test

Both the unit and the integration tests

```sh
npm run test:all
```

Just the unit tests

```sh
npm test
```

just the integration tests

```sh
npm run test:integration
```

## To debug

You can [debug NodeJS apps using Chrome](http://blog.andrewray.me/how-to-debug-mocha-tests-with-chrome/).

### Setup

* Install [node-inspector] via `npm install -g node-inspector`.

### Then to do the debugging

* open a new tab in your terminal and run `node-inspector`
* in your original terminal run `npm run test:debug`
* open Chrome and point it at https://localhost:8080/debug?port=5858

repository: davesag/apa-data-requester

repo_name: davesag/apa-data-requester


text:
# Design

## Learning objectives

- `.map`
- `.reduce`
- `.slice`
- `.splice`
- `.filter`
- `.sort`
- `.reverse`

## Out of scope

- anything that explicitly loops an array (array-loops)
- anything that returns a boolean (array-analysis)
- anything that implicitly loops
  - `indexOf`
  - `find`
  - `findIndex`
  - `includes`
  - etc.
- basic array manipulation (push, pop, etc.)

## Concepts

- `array-transformations`

## Prerequisites

- `arrays` as it covers the basics
- `callbacks` as most methods require a callback
- `arrow-functions` as they are often used to write the callbacks
- `conditionals` because they are needed in the callback functions

## Notes

The introduction for the exercise deliberately does not show how to sort numbers.
If the student attempts to sort without a custom comparison function, the test cases will fail and make them think.

repository: tejasbubane/xjavascript

repo_name: tejasbubane/xjavascript


text:
# SalesforceFTPConnector
## Download files from FTP using Salesforce HTTPRequest

In order to use this application take care to have:
1) Heroku free account
2) JDK 8 installed locally
3) Maven 3 installed locally
4) Heroku CLI
5) Git

After you have everything required, run commands listed below:
1) git clone https://github.com/Nara7788/SalesforceFTPConnector.git
2) cd SalesforceFTPConnector
3) heroku login
4) heroku create
   - Go to heroku dashboard and copy your new application name (it will be something similar to "infinite-mesa-47733").
   - Go to cloned repo and in pom.xml and in element <appName></appName> replace app name to yours.
5) mvn clean heroku:deploy-war
6) After successful deployment go to Salesforce `Remote Site Settings` in Setup and add new endpoint with link to your heroku app.

Thats it. You may test your app by running next script in Anonymous Apex:

```java
String url = 'https://infinite-mesa-47733.herokuapp.com/SalesforceFTPConnector'; //replace with your app URL
Http h = new Http();
HttpRequest req = new HttpRequest();
req.setEndpoint(url);
req.setMethod('POST');
req.setHeader('server', 'test.rebex.net');
req.setHeader('port', '21');
req.setHeader('user', 'demo');
req.setHeader('pass', 'password');
req.setHeader('filedir', '/pub/example/ConsoleClient.png');
req.setTimeout(120000);
HttpResponse res = h.send(req);

ContentVersion cont = new ContentVersion();
cont.Title = 'ConsoleClient';
cont.PathOnClient = 'ConsoleClient.png';
cont.VersionData = res.getBodyAsBlob();
cont.Origin = 'H';
insert cont;
```

Go to Salesforce -> Files -> All files, and check out new image you have recently downloaded from FTP! Have fun. ;)


text:
# os-pywf

[![Build Status](https://www.travis-ci.org/cfhamlet/os-pywf.svg?branch=main)](https://www.travis-ci.org/cfhamlet/os-pywf)
[![codecov](https://codecov.io/gh/cfhamlet/os-pywf/branch/main/graph/badge.svg)](https://codecov.io/gh/cfhamlet/os-pywf)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/os-pywf.svg)](https://pypi.python.org/pypi/os-pywf)
[![PyPI](https://img.shields.io/pypi/v/os-pywf.svg)](https://pypi.python.org/pypi/os-pywf)

[Workflow](https://github.com/sogou/workflow) and it's Python binding [PyWorkflow](https://github.com/sogou/pyworkflow) are great async frameworks.

This project is trying to explore the power of Workflow, provide command line tools and high level APIs for real world development.

## Install

```
pip install os-pywf
```

## Commands

``os-pywf`` command can be used after installation. You can get help information with ``--help`` option.  Global settings of Workflow can be specified, ENVs is not supported yet.

The subcommands with *planning* tag will be developed later, can not be used right now.

```
$ os-pywf --help
Usage: os-pywf [OPTIONS] COMMAND [ARGS]...

  Command line tool for os-pywf.

Options:
  --version                       Show the version and exit.
  Workflow:                       Workflow global settings.
    --compute-threads INTEGER     Number of compute threads.  [default: 4]
    --handler-threads INTEGER     Number of handler threads.  [default: 4]
    --poller-threads INTEGER      Number of poller threads.  [default: 4]
    --dns-threads INTEGER         Number of dns threads.  [default: 4]
    --dns-ttl-default INTEGER     Default seconds of dns ttl.  [default:
                                  43200]

    --dns-ttl-min INTEGER         Min seconds of dns ttl.  [default: 180]
    --max-connections INTEGER     Max number of connections.  [default: 200]
    --connection-timeout INTEGER  Connect timeout(ms).  [default: 10000]
    --response-timeout INTEGER    Response timeout(ms).  [default: 10000]
    --ssl-connect-timeout INTEGER
                                  SSL connect timeout(ms).  [default: 10000]
  --help                          Show this message and exit.

Commands:
  curl    HTTP client inspired by curl (beta).
  mysql   MySQL client (planning).
  proxy   HTTP proxy (planning).
  redis   Redis client (planning).
  run     Run runnable objects of pywf (planning).
  spider  Web spider (planning).
  web     Web server (planning).
```

### curl

This subcommand is inspired by curl. It works as curl and provides more useful features especially invoke Python function as response callback, which make it flexible and easy to extend.

```
$ os-pywf curl --help
Usage: os-pywf curl [OPTIONS] [URLS]...

  HTTP client inspired by curl (beta).

Options:
  Curl options:                   Options same as curl.
    -0, --http1.0                 Use HTTP 1.0
    -A, --user-agent TEXT         User-Agent to send to server.  [default: os-
                                  pywf/0.0.1]

    -b, --cookie TEXT             String or file to read cookies from.
    -c, --cookie-jar FILENAME     Write cookies to this file after operation.
    -d, --data TEXT               HTTP POST data.
    --data-urlencode TEXT         HTTP POST data url encoded.
    -e, --referer TEXT            Referer URL.
    -F, --form TEXT               Specify HTTP multipart POST data.
    -H, --header TEXT             Custom header to pass to server.
    -L, --location                Follow redirects.
    --max-filesize INTEGER        Maximum data size (in bytes) to download.
    --max-redirs INTEGER          Maximum number of redirects allowed.
                                  [default: 30]

    -u, --user TEXT               Specify the user name and password to use
                                  for  server  authentication.

    --no-keepalive                Disable keepalive.
    --retry INTEGER               Maximum retries when request fail.
                                  [default: 0]

    --retry-delay FLOAT           Time between two retries(s).  [default: 0]
    -x, --proxy TEXT              Specify proxy.
    -X, --request [DELETE|GET|HEAD|OPTIONS|PATCH|POST|PUT]
                                  Request method. [default: GET]
  Additional options:             Additional options.
    --send-timeout FLOAT          Send request timeout(s).  [default: -1]
    --receive-timeout FLOAT       Receive response timeout(s).  [default: -1]
    --startup TEXT                Function invoked when startup.  [default:
                                  os_pywf.commands.curl.startup]

    --cleanup TEXT                Function invoked when cleanup.  [default:
                                  os_pywf.commands.curl.cleanup]

    --callback TEXT               Function invoked when response received.
                                  [default: os_pywf.commands.curl.callback]

    --errback TEXT                Function invoked when request fail (callback
                                  will be invoked when no errback).

    --parallel                    Send requests parallelly.
    --log-level [CRITICAL|ERROR|WARNING|INFO|DEBUG]
                                  Log level.  [default: INFO]
    --debug                       Enable debug mode.
  --help                          Show this message and exit.
```

Example:

```
# app.py
def callback(task, request, response):
    print(request, response)
```

```
os-pywf curl http://www.example.com/ --callback app.callback
```

Features:

* Same options as curl, command line can be used by curl directly
* Support HTTP version 1.0/1.1
* Auto manipulate cookies. Cookies can be specified by command line or read from file. Cookies can be saved to file
* Support post urlencode data
* Support upload files as multipart form
* Support redirect. Response history can be accessed with [response.history](https://docs.python-requests.org/en/master/api/#requests.Response.history)
* Support retry and retry interval.  The program can be quickly canceled when retrying
* All requests can be send parallelly (async not multithread)
* Custom startup/cleanup/callback/errback function as plugins
* Callback with request and response parameters of the most famous [Requests](https://github.com/psf/requests) library
* Support auto decompress response data (v0.0.2)
* Support set proxy for http (not https) request (v0.0.3)
* Generate requests from callback and download continuously (v0.0.4)

Issues/Not support:

* Configure proxy
* Use your own cert
* Ctrl+C to quit program slowly when downloading slow response

The command provides two types of options, **curl options** and **additional options**. Run ``os-pywf curl --help`` to get the full help information.

**curl options** are same as the options of curl.  Usage can be found on man page of curl and help descriptions.

**additional options** enhance curl and provide additional features.

* ``--send-timeout``, send request timeout (second), default (-1) is no timeout

* ``--receive-timeout``, receive response timeout (second), default (-1) behavior depends on some other settings such as response timeout

* ``--startup``, a function invoked when startup, before download pages. The function have only one parameter which is the series or the parallel of Workflow

* ``--cleanup``, a function invoked when cleanup, after all downloads finish. The function have only one parameter same as startup function

    ```
    # app.py
    def startup(runner):
        pass

    def cleanup(runner):
        pass
    ```

    ```
    os-pywf curl http://www.example.com/ --startup app.startup --cleanup app.cleanup
    ```

* ``--callback``,  ``--errback`` functions invoked when response received or fail, see [more details](#callbackerrback)

* ``--parallel``,  requests will be send parallelly. Attention, the framework is asynchronous, all callback/errback invoked in one thread. Block operations in callback/errback will block the whole world

## APIs

### os_pywf.http.client

This module provides hight level HTTP client APIs. Inspired by the most famous Python HTTP library [Requests](https://github.com/psf/requests), the APIs are nearly the same.

All of the request APIs do not send request and block wait response, they all return HttpTask object for Workflow and invoke callback function when response downloaded.

We wrap the PyWorkflow HttpTask and provide more convenient callback with [request](https://docs.python-requests.org/en/master/api/#requests.PreparedRequest) and [response](https://docs.python-requests.org/en/master/api/#requests.Response) as additional parameters, they all typical instance of Requests library as you know.

```
import pywf
from os_pywf.http import client

def callback(task, request, response):
    print(request, response)

task = client.get("http://www.example.com/", callback=callback)
task.start()
pywf.wait_finish()
```

We provide more useful features which PyWorkflow not support directly:

* session with cookies persistence
* redirect responses history
* retry interval and quick cancel
* authentication
* post urlencode data and multipart files upload
* auto decompress response data (v0.0.2)
* set proxy for http (not https) request (v0.0.3)

You can use Session to configure same settings of  a group tasks, it also auto manipulate cookies and provide cancel function to cancel all tasks create by the same session. You can create Session as normal class or as a context manager:

```
import pywf
from os_pywf.http import client
from os_pywf.utils import create_series_work

def callback(task, request, response):
    print(request, response)

series = create_series_work()
headers = {"User-Agent": "os-pywf/beta"}
with client.Session(headers=headers, callback=callback) as session:
    for url in ["http://www.example.com/", "http://httpbin.org/"]:
        task = session.get(url)
        series.push_back(task)
series.start()
pywf.wait_finish()
```

Session can be canceled, when canceled the tasks created by the session which not started  will be destroyed, running task will still run until finish but callback will not invoked.

```
...
# register cancel for Ctrl+C
with client.Session() as session:
    def _cancel(signum, frame):
        session.cancel()
    for sig in (signal.SIGTERM, signal.SIGINT):
        signal.signal(sig, _cancel)
...
```

#### callback/errback

For callback async type of Workflow, we provide two functions as request/session parameters for framework: callback and errback

We wrap PyWorkflow with most famous Python HTTP library [Requests](https://github.com/psf/requests) and provide more powerful callback and errback

* **callback**, invoked when response received,  three parameters: task, request, response

    ```
    def callback(task, request, response):
        pass
    ```
    * **task**, the PyWorkflow HttpTask object
    * **request**,  [requests.PreparedRequest](https://docs.python-requests.org/en/master/api/#requests.PreparedRequest) object, it is the original request even though there are retries and redirects
    * **response**, [requests.Response](https://docs.python-requests.org/en/master/api/#requests.Response) object, it is the final response when there are retries and redirects.  You can get all the response when redirect occur. If not set errback function, the response will be ``os_pywf.exceptions.Failure`` object when transaction fail (all HTTP response treat as success)

* **errback**, invoked when transaction fail. It can be ignored, all of the response and fail will invoke callback function, three parameters: task, request, failure

    ```
    def errback(task, request, failure):
        pass
    ```

    * **task**, the PyWorkflow HttpTask object
    * **request**, same as the parameter of callback
    * **Failure**, ``os_pywf.exceptions.Failure`` object, it has two properties: exception and value. The value property maybe None or [requests.Response](https://docs.python-requests.org/en/master/api/#requests.Response) depends on the fail situation

* both callback and errback can have return value (from v0.0.4) for framework to schedule. There are several types object can be returned

    * ``str``，must be URL，it will be wrapped with session as HttpTask and add to the head of the series
    * ``requests.Request``, it will be wrapped with session as HttpTask and add to the head of the series
    * ``requests.PreparedRequest``, it will be wrapped **without** session as HttpTask and add to the head of the series
    * ``pywf.SubTask``, it will be add to the head of the series
    * ``list``, the elements will be treated as above object add to the head of the series from last to first
    * ``tuple``, first element treated as above object, second element will add to the tail of the series

### os_pywf.utils

* **create_series_work**, wrap the create_series_work of PyWorkflow, you can pass arbitrary tasks to create series.

* **create_timer_task**, wrap the create_timer_task of PyWorkflow. It split the wait time into small time pieces, so it can be canceled as soon as possible.

  You can pass a threading.Event object as cancel parameter.

### os_pywf.exceptions

* **Failure**, failure for usually for errback, two properties: exception and value. The real value object depend on fail situation
* **WFException**, exception about task fail,  two properties: state and code. state come from ``task.get_state()``, code come from ``task.get_error()``. You can get human readable error string by  use built-in str function.

## Unit Tests

```
sh scripts/test.sh
```

## License

MIT licensed.

repository: cfhamlet/os-pywf

repo_name: cfhamlet/os-pywf


text:
# Etoile is a premium blogging Jekyll theme

Etoile was developed by [PressApps](https://pressapps.co), theme [live demo](https://etoile.jekyll.plus/) available.

## Features

* Live Search
* Image lightbox
* Contact form (FormSpree)
* Image lightbox and slider
* Disqus comments for posts
* Configurable home page
* Optimised for [GitHub](https://pages.github.com/) pages
* RSS feed
* SEO tags
* Google Analytics

## Installation

Install the dependencies with [Bundler](http://bundler.io/):

```bash
bundle install
```

Run the following to generate your site:
```bash
bundle exec jekyll serve
```

You can find more on [Deployment Methods](https://jekyllrb.com/docs/deployment-methods/) page on Jekyll website.

## Setup

### Site and author details
Add your site and author details in `_config.yml`:
```yaml
# Site settings
title:              Étoile
description:        Magazine Jekyll theme for writers and bloggers.
url:                # Site base hostname & protocol, e.g. http://example.com
baseurl:            "" # Site subpath, e.g. /blog
logo_image:
  dark:             # Dark logo e.g logo-dark.svg upload to /uploads/ folder, used in header, mobile navigation and page sidebar About widget
  light:            # Light logo e.g. logo-light.svg upload to /uploads/ folder, used in footer About widget
permalink:          /:title/ # Permalink URLs structure, for permalink style options see: https://jekyllrb.com/docs/permalinks/
date_format:        "%B %-d, %Y" # refer to http://shopify.github.io/liquid/filters/date/ if you want to customize this
uploads:            /uploads/ # Path to post content assets directory i.e post images, pdfs etc
paginate:           7 # Number of posts displayed on blog page
paginate_path:      "/blog/:num/" # Blog path
google_analytics:   # Google analytics code, get your code here https://www.google.com/analytics/
disqus:
  shortname:        # Disqus comments shortname, requires Disqus account https://disqus.com/

instagram_accesstoken: # Generate token here: http://instagram.pixelunion.net/

footer:             # Default footer image settings
  copyright:        Made by a <a href="https://ivanchromjak.com/">human</a> somewhere on the planet earth.
```

### Navigation Bar
Set in the main navigation links in `_data/navbar_primary.yml`:
```yaml
- title: About
  url: /about/
```

### Widgets
Set in the page sidebar and footer sidebar widgets in `_data/sidebars.yml`. Chose from the following widgets: `categories`, `recent`, `authors`, `about`, links. Edit copyright notice in about widget in `_config.yml`:
```yaml
footer:
    copyright:
```

### Enabling comments (via Disqus)

Optionally, if you have a Disqus account, you can tell Jekyll to use it to show a comments section below each post. To enable it, add the following lines to your Jekyll site:

```yaml
disqus:
    shortname: my_disqus_shortname
```

You can find out more about Disqus' shortnames [here](https://help.disqus.com/customer/portal/articles/466208).

Comments are enabled by default and will only appear in production, i.e., `JEKYLL_ENV=production`. If you don't want to display comments for a particular post you can disable them by adding `comments: false` to that post's YAML Front Matter.

### Google Analytics

To enable Google Anaytics, add the following lines to your Jekyll site:

```yaml
  google_analytics: UA-NNNNNNNN-N
```

Google Analytics will only appear in production, i.e., `JEKYLL_ENV=production`

### Contact Form (via FormSpree)

Submit the form and confirm your email address at [FormSpree](https://formspree.io/). Then add the following code to page content:

```
{% include formspree.html<EMAIL_ADDRESS>redirect="/thanks/" %}
```

### Update favicon

You can find the current favicon (favicon.png) inside the theme `/uploads/` directory, just replace it with your new favicon.

## Posts

To create a new post, you can create a new markdown file inside the `_posts` directory by following the recommended file naming format:
```
YEAR-MONTH-DAY-title.MARKUP
```
Where `YEAR` is a four-digit number, `MONTH` and `DAY` are both two-digit numbers, and `MARKUP` is the file extension representing the format used in the file. For example, the following are examples of valid post filenames:

```
2011-12-31-new-years-eve-is-awesome.md
2012-09-12-how-to-write-a-blog.md
```

Post requires front matter, everything in between the first and second --- are part of the YAML Front Matter, and everything after the second --- will be rendered with Markdown and show up as “Content”.
The following is a post file with different configurations you can add as example:

```yaml
---
title: Best tech companies to work for in 2019
image: post-image.jpg       # Upload the image to uploads directory
categories: [business]      # Same as category post tag
tag: [spotlight, featured]  # Optional: spotlight tag adds post to spotlight section, featured tag add post to featured section
hidden: true                # Optional: exlude the post from blog page posts
author: sarah               # Reference author username
---
```

You can rebuild the site in many different ways, but the most common way is to run `bundle exec jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.

To keep things more organized you can organize post images in subdirectiories e.g. `/uploads/2019/01/`.

### Adding images
To add an image to a post or page use the following codes:
Local image from `/uploads/` directory:
```yaml
{% include image.html img="girl.jpg" alt="Alt for image" caption="Girl on a rock" %}
```
External wide image with lightbox:
```yaml
{% include image.html img="https://source.unsplash.com/TT-ROxWj9nA.jpg" lightbox="true" alt="Alt for image" caption="Image in lightbox" %}
```

### Responsive Videos
Embed local videos:
```html
<video controls playsinline uk-video="automute: true">
    <source src="http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4" type="video/mp4">
    <source src="http://www.quirksmode.org/html5/videos/big_buck_bunny.ogv" type="video/ogg">
</video>
```
Embed YouTube videos:
```html
<iframe src="http://www.youtube.com/embed/YE7VzlLtp-4?autoplay=0&showinfo=0&rel=0&modestbranding=1&playsinline=1" width="600" height="340" frameborder="0" allowfullscreen uk-responsive uk-video="automute: true"></iframe>
```

To create a draft post, create the post file under the `_drafts` directory, and you can find more information in [Working with Drafts](https://jekyllrb.com/docs/drafts/).

## Home Page

To create a home page, just create a `index.md` file inside the root directory. The following is a YAML Front Matter example for a page:

```yaml
---
layout: full
---
```

Home page sections are created using includes that can be easily rearranged and modified, e.g.:
```
{% include section-ad.html image="welcome.png" alt="Buy Étoile Jekyll Theme" width="" url="https://themeforest.net/user/pressapps/portfolio" blank="true" %}

{% include section-featured.html title="Featured Story" %}

{% include section-spotlight.html title="Spotlight" %}

{% include section-mailchimp.html title="Newsletter Signup" text="Sign up for our weekly newsletter through Mailchimp and stay up to date with what is happening in the city." button_text="Support Us" %}

{% include section-latest.html title="Latest Articles" limit="4" more="More Articles" %}

{% include section-ad.html title="Advertisement" image="https://via.placeholder.com/800x180/f4f4f4/fff.png?text=+" url="#" blank="true" %}

{% include section-authors.html title="Our Contributors" %}

{% include section-instagram.html title="Latest On Instagram" cols="4" count="4" gutter="true" %}

{% include section-cta.html title="Want To Contribute?" text="We are looking for writers from all walks of life to contribute to out blog, if you have something to say get in touch." button_text="Contact Us" button_url="/contact/" blank="true" %}

{% include section-author.html author="john" title="Hello, I am Jane! Welcome to my blog." %}
```

## Authors

To create an author, create a new post inside the `_authors` directory and add the following YAML Front Matter:
```
---
title:          John Nolten
username:       john
image:          avatar_john.jpg
bio:            Writer at WorkBox Publishing, parent, aminal lover and avid coffee drinker.
email<EMAIL_ADDRESS>website:        https://mysite.com
facebook:       https://www.facebook.com/
flickr:         https://www.flickr.com/
dribbble:       https://dribbble.com/
github:         https://github.com/
reddit:         https://www.reddit.com/
instagram:      https://www.instagram.com/
linkedin:       https://www.linkedin.com/
pinterest:      https://www.pinterest.com
twitter:        https://twitter.com/
vimeo:          https://vimeo.com/
youtube:        https://www.youtube.com/
---
```

Add post content and upload author `avatar_john.jpg` avatar to `uploads` folder.

## Categories

To create a category, create a new post inside the `_category` directory and add the following YAML Front Matter:
```
---
tag: business
permalink: "/category/business/"
---
```

## Customization

To modify the primary color, open `/assets/css/main.scss` and replace the `#de7a93` color value:
```scss
// Modify primary template color
$global-primary-background: #de7a93;
```

To modify the fonts, open `/assets/css/main.scss` and modify the following values:
```scss
// Modify body font
$global-font-family: 'Lora', serif;
// Modify article title font
$aticle-title-font-family: 'ZCOOL XiaoWei', serif;
```

Edit the embedded Google fonts in `/_includes_/head-custom.html`.

Further style customisation can be done in the following files:
```
/_sass/theme/mixins.scss
/_sass/theme/variables.scss
/assets/css/main.scss
```

## Development

Install [UIkit](https://getuikit.com/) font end framework dependency via Npm:
```bash
npm install
```
Enable live browser reload with the following:
```bash
bundle exec jekyll s --livereload
```

## Credits and Sources

- Google analytics https://www.google.com/analytics/
- UIkit front end framework https://getuikit.com/
- Unsplash images https://unsplash.com/
- Jekyll CML https://jekyllrb.com/

## Support
Customer support is provided through our Envato profile page [contact form](https://themeforest.net/user/pressapps) for up to six months from the purchase date and is provided Monday to Friday during the business week. We aim to answer all support requests daily, most are handled within 48h.

repository: theballot/etoile

repo_name: theballot/etoile


text:
# units-of-measure
A DSL for type-safe dimensional analysis and unit conversion in Kotlin.

### Usage
Please look at this [sample code](https://github.com/kunalsheth/units-of-measure/blob/master/demo/src/main/kotlin/info/kunalsheth/units/sample/Sample.kt) for DSL usage.
Configuration documentation can be found on the [wiki](http://kunalsheth.info/units-of-measure/wiki).

Also take a look at this [sample project](https://github.com/kunalsheth/uom-example-project) for more advanced usage and configuration.

### Gradle Installation
In `./build.gradle`:
```groovy
buildscript {
    repositories {
        maven { url 'http://repo.kunalsheth.info/' }
    }
    dependencies {
        classpath 'info.kunalsheth.units:plugin:5.2.4'
    }
}
apply plugin: 'info.kunalsheth.units.gradle'

apply from: 'units-of-measure.gradle'
```

In `./units-of-measure.gradle`:
```groovy
generateUnitsOfMeasure {
    // do all configuration here
}
sourceSets.main.kotlin.srcDir generateUnitsOfMeasure.generatedSrcDir
compileKotlin.dependsOn(generateUnitsOfMeasure) // may vary
```

### Background
Type-safe dimensional analysis and unit conversion can be extremely beneficial to a team. From personal experience, using type-safe calculations result in:
- Faster Development — IDE autocomplete provides meaningful predictions, rather than just listing every number in scope.
- Cleaner Code — Variable names will be of a reasonable length now that unit information is documented by the type.
- Higher Confidence — All unit/dimension related bugs will show up at compile time. Debugging is less difficult and time-consuming.

units-of-measure's novel, metaprogramming approach to the problem makes it:
1) _Incredibly_ Extendable — Adding new functionality is as simple as adding a line to your build file. No tedious "hand-coding" is required.
2) Small — You only generate what you need. You are not forced to bundle every conceivable unit, quantity, and dimension with your app.
3) Bug Resistant — Programming by hand is error prone and time-consuming. Code generation can ensure correctness.

### Todo List
- [x] Make it work.
- [x] Generate implicit relationships as well.
- [x] Make annotations easier to write and manage.
- [x] Add support for unit conversions.
- [x] Add docs. ([wiki](http://kunalsheth.info/units-of-measure/wiki))
- [x] Add metric prefixes.
- [x] Multiplatform.
- [x] Stronger support for generic use (`Quantity<This, IntegralOfThis, DerivativeOfThis>`)
- [ ] Generic reciprocal functions?
- [ ] Optimize for faster compilation and runtime.
- [ ] Benchmark performance hit in contrast to primitives. (Can someone help me with this?)