text:
For the recipes create view, I've decided to use class-based views instead of function based because when I had the whole code in one function, it was too much of a mess. On the other hand, the class-base view gave the ability to separate the code and make it more readable and maintainable. Let's see how it'll look like.

`recipes/views.py`
```python
from django.shortcuts import render, redirect
from django.views.generic import CreateView

from .models import Recipe, Category, Ingredient, Instruction
from .forms import RecipeForm, IngredientFormSet, InstructionFormSet

...

class RecipeCreateView(CreateView):
	template_name = 'create_recipe.html'
	form_class = RecipeForm
	success_url = 'recipe-details'
```

Before we go any further, I want you to try this view. So create a new template called `create_recipe.html` in the `templates`folder and display the form in it.

`recipes/templates/create_recipe.html`
```html
{{form}}
```

Then create a url for this view.

`recipes/urls.py`
```python
urlpatterns = [
    ...
    path('create/recipe/', views.RecipeCreateView.as_view(), name="recipe-create"),
]
```

Notice that in this url we added `as_view()` unlike the two other paths. The reason is that `RecipeCreateView` is a class-based view. So, for any class-based view you need to add `as_view` when setting the path for the url.

Now run the server and go to this url `<IP_ADDRESS>:8000/create/recipe/`. You should see the `RecipeForm` that we created (and not a very pretty one) without neither the ingredient nor the instruction formsets that we created.

Now that you've seen what the output is I'll start explaining what we've done and what we need to do.

All we did was create this view
```python
class RecipeCreateView(CreateView):
	template_name = 'create_recipe.html'
	form_class = RecipeForm
	success_url = 'recipe-details'
```

This class is inheriting from [`CreateView`](http://ccbv.co.uk/projects/Django/2.2/django.views.generic.edit/CreateView/). This class has many attributes and methods that do much of the work for us and all we have to do is give it some pieces of information. In our case, we had to give it the `template_name` which is the template that it should display. We also gave it the `form_class` which is the form that we want it to display. Finally, we gave it the `success_url` which is the name of the path that we want it to redirect to after the form was successfully submitted. The cool thing is we didn't need to write most of the code that we usually do when making any create view. However, what was automagically generated by the class view isn't exactly what we want.

The most obvious change that we need to do is add both the ingredient and instruction `formset`s to the equation. So, we'll need some of the methods that `CreateView` has.

The big question is...what methods should we override?

To answer this question, we need to understand what we want to change and customize in this view.

I'll write the things that we need to change right under the dancing potato, but don't scroll down immediately. Take the time to actually think about it.

![dancing potato](https://media1.tenor.com/images/61497871ab091f01703a3f1a624fb3c4/tenor.gif?itemid=11684043)

The first thing that we want is when the user requests the recipe create page, he sees the recipe form, the ingredient formset, and the instruction formset. Right now we're only displaying the recipe form because that's the only form that is being sent through the context dictionary to the template. So, we need to send those two formsets through the context dictionary to the template to show them to the user. Take a look at this [reference](http://ccbv.co.uk/projects/Django/2.2/django.views.generic.edit/CreateView/) and look at all the available methods that we can override and guess which one we'll need to override. I'll give you a hint...When the user makes a **get** request, the three forms should be sent through the context dictionary.

If the hint wasn't hinty enough, the method is `get`.

### get()

`recipes/views.py`
```python
class RecipeCreateView(CreateView):
	template_name = 'create_recipe.html'
	form_class = RecipeForm
	success_url = 'recipe-details'

	def get(self, request, *args, **kwargs):
		self.object = None

		form = self.get_form()
		ingredient_form = IngredientFormSet()
		instruction_form = InstructionFormSet()

		return self.render_to_response(
			self.get_context_data(form=form, ingredient_form=ingredient_form, instruction_form=instruction_form)
		)

```

The change that we made is very simple. All we did is add these two formsets.
```py
		ingredient_form = IngredientFormSet()
		instruction_form = InstructionFormSet()
```

I'll explain what each line is doing in details below. If you don't really care about these details, you can skip the next few lines right until the dancing potato.

```py
	self.object = None
```

In this line we're instantiating a new attribute to our class called `object`. We're doing that because the `CreateView` expects this attribute to exist because other methods that this class is using is using this attribute. Since the recipe is still not created, the `object` attribute is set to `None` in any other case it would be set to the recipe object that we're manipulating.

```py
	form = self.get_form()
	ingredient_form = IngredientFormSet()
	instruction_form = InstructionFormSet()
```

In these three lines we're just saving our forms into variables. The only part that might be confusing is the first line. This line is equivalent to this
```py
form = RecipeForm()
```

What `self.get_form()` is doing is basically retrieving the `form_class` that we specified as an attribute in the class which in this case was `RecipeForm`. The reason we used `form = self.get_form()` instead of `form = RecipeForm()` is because I didn't want to write the form name manually everytime I want to use it in this class (this won't be the only method we're overriding). Imagine this scenario, you or one of your teammates decided to change the form name for whatever reason or you want the exact same code for another view. You will need to go through each time you wrote the form's name and change it. However, in this case you just change the `form_class` attribute. So, the `CreateView` class is giving the option to make the code better so why waste it.

Finally, we have this line
```py
	return self.render_to_response(
		self.get_context_data(form=form, ingredient_form=ingredient_form, instruction_form=instruction_form)
	)
```

This line has two methods that the `CreateView` class has. The first one is `render_to_response`. This method takes the context dictionary and renders the template specified in the `template_name` attribute with the context dictionary.

So, this line is equivelant to this
```py
return render(self.request, self.template_name,
			self.get_context_data(form=form, ingredient_form=ingredient_form, instruction_form=instruction_form)
		)
```

Now, let's take a look at the other method `get_context_data`. All this method does is take whatever arguments you give it and put them all in a dictionary.

So, this line would be equivelant to this
```py
	return render(self.request, self.template_name,{"form":form, "ingredient_form":ingredient_form, "instruction_form":instruction_form})
```

![dancing potato](https://media1.tenor.com/images/61497871ab091f01703a3f1a624fb3c4/tenor.gif?itemid=11684043)

Just for the sake of actually seeing the forms, change your template to this
`recipes/templates/create_recipe.html`
```html
{{form}}
<hr>
{{ingredient_form}}
<hr>
{{instruction_form}}
```

The next method that we need to override is the `post` method. This is where we specify what happens when the user submits the form. Right now what will happen is a recipe object will get created without any ingredients or instructions plus we need to set the owner of the recipe too.

### post()

`recipes/views.py`
```py
class RecipeCreateView(CreateView):
	template_name = 'create_recipe.html'
	form_class = RecipeForm
	success_url = 'recipe-details'

	...

	def post(self, request, *args, **kwargs):
		self.object = None
		form_class = self.get_form_class()
		form = form_class(request.POST, request.FILES)
		ingredient_form = IngredientFormSet(self.request.POST)
		instruction_form = InstructionFormSet(self.request.POST)
		if (form.is_valid() and ingredient_form.is_valid() and instruction_form.is_valid()):
			return self.form_valid(form, ingredient_form, instruction_form)
		else:
			return self.form_invalid(form, ingredient_form, instruction_form)
```

I'll explain what each line is doing except for any lines that we're explained before. If you're not interested in these details skip to the dancing potato.

We'll start from the second line
```py
	form_class = self.get_form_class()
	form = form_class(request.POST, request.FILES)
```

What we did here was get the `form_class`. The difference between getting the `form_class` and getting the `form` just like we did in the get method is that `get_form` returns this `RecipeForm()` and `get_form_class()` returns this `RecipeForm`. In the get we wanted a new empty form from `RecipeForm` so the first option was perfect. But in the post method we wanted an intance of `RecipeForm` to fill with the data received through the post request. So, we got the `form_class` and then used it to get a form filled with the data received from the post request.

So, those two line are equivelant to this
```py
form = RecipeForm(request.POST, request.FILES)
```

One more thing, we have both `request.POST` and `request.FILES` because the user will upload an image through the form, so we need to get the files as well.

I'll skip down to the if statement
```py
if (form.is_valid() and ingredient_form.is_valid() and instruction_form.is_valid()):
	return self.form_valid(form, ingredient_form, instruction_form)
else:
	return self.form_invalid(form, ingredient_form, instruction_form)
```

This if statement is checking if all forms are valid. If they are it'll call the `form_valid` method, otherwise the `form_invalid` method.

So, if all forms were valid we want to save the recipe with its ingredients and instructions and then redirect to the `success_url`. Logically, this is what the `form_valid` should do.

On the other hand, if one of the forms was invalid, send the forms back to the template and show the errors to the user and that's what `form_invalid` should do.

But both of these methods are only working on the recipe form without the ingredients and instructions. So, we'll need to override those too.

Note, we could've written the code for saving the forms and the redirection here in the post method with ever mentioning or overriding the `form_valid` and `form_invalid` methods, but I like to seperate things so bear with me.

![bear](https://media.giphy.com/media/l2QDSQ8zZcc4hqUTe/giphy.gif)

### form_valid()

`recipes/views.py`
```py
class RecipeCreateView(CreateView):
	template_name = 'create_recipe.html'
	form_class = RecipeForm
	success_url = 'recipe-details'

	...

	def form_valid(self, form, ingredient_form, instruction_form):
		object = form.save(commit=False)
		object.owner = self.request.user
		object.save()
		ingredient_form.instance = object
		ingredient_form.save()
		instruction_form.instance = object
		instruction_form.save()
		return redirect(self.success_url, object.slug)
```

This one is pretty straight forward.

```py
object = form.save(commit=False)
object.owner = self.request.user
object.save()
```

In the first line we're creating the recipe object without saving it to the database by setting `commit=False`. We did that because we wanted to set the `owner` first which is what we've done in the second line. Finally, we saved it to the databse.

```py
ingredient_form.instance = object
ingredient_form.save()
instruction_form.instance = object
instruction_form.save()
```

In those four lines, we're setting the `instance` for all the created ingredients and instructions. By `instance` I mean the `Recipe` object that they're related to through the `ForeignKey` relationship. And then we saved both the created ingredients and instructions to the database.

Do keep in mind that `instance` is an attribute that the `inline formset` has to make it easier for us to connect the two objects to each other (`Recipe` and `Ingredient` or `Recipe` and `Instruction`) and it is **NOT** an attribute or a field that the model has.

At the end, we're just redirecting the recipe details page where the url takes one argument which is the recipes slug.
```py
return redirect(self.success_url, object.slug)
```

### form_invalid()

`recipes/views.py`
```py

class RecipeCreateView(CreateView):
	template_name = 'create_recipe.html'
	form_class = RecipeForm
	success_url = 'recipe-details'

	...

	def form_invalid(self, form, ingredient_form, instruction_form):
		return self.render_to_response(
			self.get_context_data(form=form, ingredient_form=ingredient_form, instruction_form=instruction_form)
		)
```

This method is just rendering the template again because the forms were invalid.

At the end you should have this
`recipes/views.py`
```py
from django.shortcuts import render, redirect
from django.views.generic import CreateView

from .models import Recipe, Category, Ingredient, Instruction
from .forms import RecipeForm, IngredientFormSet, InstructionFormSet

...

class RecipeCreateView(CreateView):
	template_name = 'create_recipe.html'
	form_class = RecipeForm
	success_url = 'recipe-details'

	def get(self, request, *args, **kwargs):
		self.object = None

		form = self.get_form()
		ingredient_form = IngredientFormSet()
		instruction_form = InstructionFormSet()

		return self.render_to_response(self.get_context_data(form=form, ingredient_form=ingredient_form, instruction_form=instruction_form))

	def post(self, request, *args, **kwargs):
		self.object = None
		form_class = self.get_form_class()
		form = form_class(request.POST, request.FILES)
		ingredient_form = IngredientFormSet(request.POST)
		instruction_form = InstructionFormSet(request.POST)
		if (form.is_valid() and ingredient_form.is_valid() and
			instruction_form.is_valid()):
			return self.form_valid(form, ingredient_form, instruction_form)
		else:
			return self.form_invalid(form, ingredient_form, instruction_form)

	def form_valid(self, form, ingredient_form, instruction_form):
		object = form.save(commit=False)
		object.owner = self.request.user
		object.save()
		ingredient_form.instance = object
		ingredient_form.save()
		instruction_form.instance = object
		instruction_form.save()
		return redirect(self.success_url, object.slug)

	def form_invalid(self, form, ingredient_form, instruction_form):
		return self.render_to_response(
			self.get_context_data(form=form,
								  ingredient_form=ingredient_form,
								  instruction_form=instruction_form))
```

And we're finally done from this view

![phew](https://media.giphy.com/media/Oj5w7lOaR5ieNpuBhn/giphy.gif)


text:
# Pig Latin Translator

#### A webpage created to Pig Latin sentence from a plain English sentence. 6/12/2019

#### By **Mike Lofgren**

## Description

A webpage created with jQuery, CSS and HTML to translate an English sentence to a Pig Latin sentence.
This webpage utilizes jQuery with switch statements and CSS styles for hide and show.
A user inputs a sentence without numbers or special characters.
It runs the input through the back end logic and returns a sentence of Pig Latin from a plain English sentence.

### Specs
| Spec                  Input|     Output          |                          |
| :------------------------- | :------------------ | :---------------------- |
| User input is 1, returns I | 1                   | I                       |
|User input is 5, returns V  | 5                   | V                       |

## Setup/Installation Requirements

1. To run this program, clone repository from this GitHub.
2. Open file in a web browser such as Google Chrome.
3. Type an English sentence without numbers or special characters and click the "Translate!" button.
4. It tells you a Pig Latin sentence based on your plain English.
5. The bootstrap file should be under "css" folder of project and jQuery file should be under "js" directory.

## Known Bugs
* No known bugs at this time.

## Technologies Used
  * HTML
  * CSS (bootstrap 3.3.7 which is available in https://getbootstrap.com/docs/3.3/)
  * Javascript
  * jQuery-3.4.1 (https://jquery.com/download/)

## Support and contact details

If there are any questions, bugs or concerns, please contact<EMAIL_ADDRESS>
### License

*This software is licensed under the MIT license*

Copyright (c) 2019 **Mike Lofgren**

license: MIT

repository: mikearino/template

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: mikearino/template


text:
Copy of  `lformaggia/clang-format-hooks.git` on github, a fork of  barisione/clang-format-hooks. It contains the original codes but also `PACS_clang-format`, that you hve to copy into `.clang-format` in the main directory of the example if you want it to have clang-config to use the proper configuration file:

``` bash
cp PACS_clang_config ../.clang_config
```

Then you can use the `apply-format` script or install the git hook following the instructions on the `README.md` file.

If you wan to use instead the `git clang-format` utility using the style file you must copy and rename `PACS_clang-format` as explained above and do in your repo:

``` bash
git config clangFormat.style file
```
This way git knows that has to use clang-format with the option `style=file` with which `clang-format` uses the first `.clang-format`  located in one of the parent directories of the source file (that's why you put it in the main directory of your project.).

# Note: you mast have clang, or at least clang-format, properly installed in your system!

repository: lformaggia/clang-format-hooks

gha_license_id: MIT

repo_name: lformaggia/clang-format-hooks


text:
# <img src="https://rawgithub.com/dam5s/aspen/master/images/aspen.svg" width="200px" />

Aspen is a JUnit runner for Kotlin. It's inspired by Ruby's RSpec syntax,
the default DSL has a lot more restrictions, but you can create your own DSL if it does not fit your needs.

## Gradle usage

```gradle
dependencies {
    testImplementation "com.github.dam5s.aspen:aspen:2.1.0"
    testImplementation "com.github.dam5s.aspen:aspen-spring:2.1.0"
}

repositories {
    maven { url 'https://jitpack.io' }
}
```

You can also download the JAR files from the release and add them to your path.

## Example

If you were to use AssertJ for assertions.

```kotlin
class CompanyControllerTest: Test({

    val mockRepo = mock(CompanyRepository::class.java)
    val controller = CompanyController(mockRepo)

    useRule(MyAwesomeRule())

    before {
        reset(mockRepo)
    }

    describe("#create") {
        test {
            val company = Company(name = "Wayne Enterprises")
            doReturn(company).upon(mockRepo).create(any())

            val response = controller.create("Wayne Ent.")

            assertThat(response).isEqualTo(Response(company, true))
            verify(mockRepo).create("Wayne Ent.")
        }

        test("repository creation error") {
            doReturn(null).upon(mockRepo).create(any())

            val response = controller.create("Wayne Ent.")

            assertThat(response).isEqualTo(Response(null as Company?, false))
        }
    }
})
```

You can focus a test by prefixing changing `test` to `ftest`. Then only this or these tests get run.
For example running the tests above after replacing the second test with

```kotlin
ftest("repository creation error") {
    doReturn(null).upon(mockRepo).create(anyString())

    val response = controller.create("Wayne Ent.")

    assertThat(response).isEqualTo(Response(null as Company?, false))
}
```

Only that second test will get run.

Writing table based tests (a.k.a. Parameterized tests) can be as simple as the following

```kotlin
class ReservationTestExample : Test({

    describe("#amount") {
        class AmountData
        (name: String, val status: Status, val amount: Int) : TestData(name)

        val data = listOf(
            AmountData("when status is OPEN", Status.OPEN, 0),
            AmountData("when status is STARTED", Status.STARTED, 0),
            AmountData("when status is BILLED", Status.BILLED, 100),
            AmountData("when status is PAID", Status.PAID, 100)
        )

        tableTest(data) {
            assertThat(Reservation(status).amount()).isEqualTo(amount)
        }
    }
})
```

## Restrictions

There can only be one `before` block and it has to be at the top level.
`describe` blocks can only contain `test` blocks and they cannot be nested further.
Unlike RSpec, there are no `it` blocks. We are trying to encourage having expressive assertions
that should describe correctly your expectations.

## Why all these restrictions?

The goal of this library is to make your tests a little easier to organize.
But we do believe that the JUnit style is sufficient for testing and
encourages making your test code clear and easy to read, so we are not adding any unnecessary complexity.

## But I want my own DSL!

We tried to make custom Domain Specific Languages easy to write.
You can see an example of a second DSL we created allowing nesting by following these links:

 * [Implementation](https://github.com/dam5s/aspen/blob/master/libraries/aspen/src/main/kotlin/io/damo/aspen/NestedTest.kt)
 * [Usage](https://github.com/dam5s/aspen/blob/master/libraries/aspen/src/test/kotlin/aspen/examples/NestedTestExample.kt)

## Spring Support

Aspen supports Spring!

```kotlin
@RunWith(SpringTestTreeRunner::class)
@SpringApplicationConfiguration(ExampleApplication::class)
@WebIntegrationTest("server.port:0")
class SpringApplicationTest : Test({

    val message: String = inject("myMessage")
    val port = injectValue("local.server.port", Int::class)

    val client = OkHttpClient()

    test("GET /hello") {
        val request = Request.Builder()
            .url("http://localhost:$port/hello")
            .build()

        val response = client.newCall(request).execute()

        val body = response.body().string()
        assertThat(body).isEqualTo("""{"hello":"$message"}""")
    }
})
```

## More examples

You will find actually up-to-date examples that are part of our test suite in the following locations:

 * [Plain Java](https://github.com/dam5s/aspen/tree/master/libraries/aspen/src/test/kotlin/aspen/examples)
 * [Spring Application](https://github.com/dam5s/aspen/tree/master/libraries/aspen-spring/src/test/kotlin/aspen/spring/examples)

## Blog posts

 * [Kotlin testing with Aspen and Aspen Spring](https://medium.com/@its_damo/kotlin-testing-with-aspen-and-aspen-spring-59a3d211a374)
 * [Testing Kotlin with a custom DSL for Aspen](https://medium.com/@its_damo/testing-kotlin-with-a-custom-dsl-for-aspen-ab4b04efe77a)

gha_language: Kotlin


text:
# Places Autocomplete Service

To build and start service you should do only
```
docker-compose build && docker-compose up
```

After that you could test it via curl

```
curl -vd '{"term":"Flo", "locale":"en", "types": ["city", "airport"]}' \
-H "Content-Type: application/json" \
-X POST http://<IP_ADDRESS>:8080
```

There is no tests due to lack of time for the exercise. If that's the issue I can write tests shortly.

repository: rustwizard/tpa

gha_language: Go

repo_name: rustwizard/tpa


text:
---
layout: post
title:      "Web-Security"
date:       2019-09-05 15:17:14 -0400
permalink: Web-Security
---

We are always reading in the new about security breach by some group of hackers and it seems like a never-ending battle between the white hats and the blackhats. That being said all developers must be secutriy-minded and secure our app and not blame the users.

## Password encryption
> Bcrypt is a password hashing function designed by Niels Provos and David Mazières, based on the Blowfish cipher, and presented at USENIX in 1999.[1] Besides incorporating a salt to protect against rainbow table attacks, bcrypt is an adaptive function: over time, the iteration count can be increased to make it slower, so it remains resistant to brute-force search attacks even with increasing computation power.(https://www.wikipedia.org/)

In other words, it creates a hash  [check it out here](https://www.movable-type.co.uk/scripts/sha256.html) made up of your password and adding a salt or some random characters using the SHA-256 algorithm.

``hash(salt + password)    #=> <really unique hash>``

   This makes the process irreversible and an attacker cant get our password from the DB. So then how are we able to login and be authenticated?

In rails , we store the salt or kind of a key for the user inside the table, when a user logins in we retrieve the salt and we encrypt the entered password (and the salt) and see if it matches the stored password.

All we need to do is  just add this abstracted line to the user model.
``has_secure_password``

which is really doing this!

Why do we need to salt , what are we gaining ?

An attacker could really just create a database using the same algorithm of hashes running all possible passwords. Then just try to get a match against our database. So we add salt which is 4 random characters that are unknown to the attacker. We store this in the user column and the end of the hash to retrieve.

Now that we have created an encrypted password what else can we do?
* Require users to sign up and log in to access our app helps us keep track of “bad users which we can ban”
* Having a security audit
* There are many more ideas to implement but  that will be for future blogs

[Google](https://www.bleepingcomputer.com/news/google/google-chrome-to-warn-if-logins-are-found-in-a-data-breach/) Has come out with an extension to chrome that will search your credentials against know breached user name and password but how are they doing this?

 I'm not 100 per cent sure but i think they are hashing your password and matching them against breached hashes but I would   <a<EMAIL_ADDRESS>to hear your opinion  ?

All the best,

Simcha Greenbaum

**References**

* [Bcrypt](https://github.com/codahale/bcrypt-ruby)
* [Firefox-fix](https://www.troyhunt.com/were-baking-have-i-been-pwned-into-firefox-and-1password/)
* [Google](https://www.bleepingcomputer.com/news/google/google-chrome-to-warn-if-logins-are-found-in-a-data-breach/)

extension: markdown

gha_language: JavaScript


text:
**Twitch.TV Commercial Runner for Starcraft 2**

The commercial runner is made to assist players and casters by setting up a customizable schedule for playing commercials. Commercials are played a game completes.

**Downloads**

[You can download the latest version here.](http://willeddins.com/starcraft-commercial-player/)


text:
# bigquery-public-data:crypto_bitcoin

## Tables

| Name | Columns | Description | Type |
| ---- | ------- | ------- | ---- |
| [blocks](blocks.md) | 13 | All blocks.
Data is exported using https://github.com/blockchain-etl/bitcoin-etl | TABLE |
| [inputs](inputs.md) | 14 | Inputs from all transactions.
Data is exported using https://github.com/blockchain-etl/bitcoin-etl | VIEW |
| [outputs](outputs.md) | 11 | Outputs from all transactions.
Data is exported using https://github.com/blockchain-etl/bitcoin-etl | VIEW |
| [transactions](transactions.md) | 34 | All transactions.
Data is exported using https://github.com/blockchain-etl/bitcoin-etl
 | TABLE |

## Relations

![er](schema.svg)

---

> Generated by [tbls](https://github.com/k1LoW/tbls)

branch_name: refs/heads/main


text:
apt-cache pkgnames | grep php7

For example, if you want to deploy your application based on the LAMP stack, usually, you can install the below packages after installing Apache:
sudo apt-get install -y apache2
sudo apt-get install -y php7.0 libapache2-mod-php7.0 php7.0-cli php7.0-common php7.0-mbstring php7.0-gd php7.0-intl php7.0-xml php7.0-mysql php7.0-mcrypt php7.0-zip

Alternatively, if you want to deploy your application based on the LEMP stack, you can install the following packages after installing Nginx:
sudo apt-get install -y nginx
sudo apt-get install -y php7.0 php7.0-fpm php7.0-cli php7.0-common php7.0-mbstring php7.0-gd php7.0-intl php7.0-xml php7.0-mysql php7.0-mcrypt php7.0-zip

php -v

The main config file of PHP 7.0 will be saved as /etc/php/7.0/apache2/php.ini (Apache) or /etc/php/7.0/fpm/php.ini (Nginx). You can use the vi text editor to modify relevant settings in that file.

sudo vi /etc/php/7.0/apache2/php.ini
or
sudo vi /etc/php/7.0/fpm/php.ini

Remember to restart Apache or Nginx if you make any changes to that file or any other PHP config files:
sudo systemctl restart apache2.service
or
sudo systemctl restart nginx.service php7.0-fpm.service

repository: magiccash/KnowContainer

repo_name: magiccash/KnowContainer


text:
# berightthere_android
An Android client implementation for [berightthere](https://github.com/mwvdev/berightthere) written in Kotlin.

## Main overview
Supports starting a trip with various transport modes. Provides an overview over previous trips and allows swiping to delete.

## An ongoing trip
Supports sharing the trip using the Android share intent. Screen automatically zooms out to contain route unless deactivated by moving / zooming.


text:
Run mongo in Kubernetes with replicaset using scripts

1. First create the PersistentVolume and PersistentVolumeClaim
    ```
    kubectl apply -f mongo-persistent-storage.yaml
    ```

2. Now create the statefulset
    ```
    kubectl apply -f mongo-statefulset-replicaset.yaml
    ```

3. Verify the deployment
    ```
    kubectl get all
    ```

As described here, but on Local/Custom kubernetes cluster:

https://github.com/pkdone/gke-mongodb-demo

repository: LogicalSapien/docker-kubernetes-samples

repo_name: LogicalSapien/docker-kubernetes-samples


text:
# Think Active Web

A web interface for creating, managing and running ThinkActive deployments. It is a [Vue](https://vuejs.org) webapp using [npm](https://www.npmjs.com/) packages, written using
[JavaScript](https://developer.mozilla.org/bm/docs/Web/JavaScript),
[Sass](https://sass-lang.com/) and [Pug](https://pugjs.org/api/getting-started.html),
linted with [ESLint](https://eslint.org/), built with
[Webpack](https://webpack.js.org/) and deployed through
[Docker](https://www.docker.com/).

## Features

* Setup and configure deployments
* Manage devices on a deployment
* Download files related to a deployment

## Work In Progress

* Tablet View – A view of a deployment to be shown on a tablet in-class
* Present View – A view of a deployment to be present by an instructor/teacher
* User Management – Add and manage users in organisations, then create deployments under them

## Project Structure

| Path | Info |
| ---- | ---- |
| `/build`  | The Webpack configuration and build scripts, generated using the [vue-cli](https://github.com/vuejs/vue-cli) |
| `/config` | Configurations for different versions of the build i.e production vs dev |
| `/src` | The actual source code for the webapp |
| `/src/api` | Files for interacting with/mocking the Gabber API |
| `/src/apps` | Wrappers for the different sub-apps, i.e web vs tablet vs present  |
| `/src/assets` | Non-JavaScript assets to be compiled into the app, included in from vue components |
| `/src/components` | Vue single file components (.vue), grouped by the type of thing they are |
| `/src/events` | Vue [event busses](https://alligator.io/vuejs/global-event-bus/) |
| `/src/layouts` | Vue components which solely layout content using `<slot>` elements |
| `/src/mixins` | Vue [mixins](https://vuejs.org/v2/guide/mixins.html) |
| `/src/pages` | Vue components that are directly routed to by the router |
| `/src/router` | The [vue-router](https://router.vuejs.org/en/) and its routes |
| `/src/store` | The [vue-store](https://vuex.vuejs.org/en/) and its modules |
| `/src/constants.js` | Cross project constant values for easy `import<EMAIL_ADDRESS>|
| `/static` | Static assets that are served along side the compiled source |

The entrypoint to the app is `/src/main.js`, if you follow the dependancies from there you should work out structure of the app.

## Api Integration

The app uses an [ApiInterface](/src/api/ApiInterface) to interact with a live/mock api so they can easily be switch out for testing.
It uses the `MOCK_API` and `API_URL` config variables to decide if it is using the mock version or not.

### Master / Child Page Controllers

Each main page of the app is split into separate master / children page controllers. Within the master page controller you should maintain current state of the Vuex Store via Api requests and within the child controller you should use the Vuewx getters and setters in order to maintain state and reduce API requests.

#### Example
An example of this can be seen in `/src/pages/org/OrgRootPage.vue` which persists the state of the current organisation being accessed by the user. As the user navigates through the child routes (i.e. `/src/pages/org/OrgHomePage.vue`) the current active organisation, associated organisationMembers, organisationDevices are initially loaded by the `OrgRootPage.vue` and then added to the `/src/store/state.js`. Children then interact with the Vuex Store to add / remove / update the active data.

## Creating Api endpoints

The app uses [Vuex Mutations](https://vuex.vuejs.org/guide/mutations.html) to manage the current state of currently viewed organisational data (such as active deployments, active devices etc). Updating this data is achieved through API requests (see Api Integration) which interact with the [thinkactive.io-api project](https://openlab.ncl.ac.uk/gitlab/thinkactive.io/thinkactive.io-api).

**You must implement a mock interface and a live interface** which retrieves data from the API and then mutates the stored state in the Vuex controller.

To access the api interface use `this.$.api.functionName` in your master page controller to make the API request (see Master / Children Page Controllers). Once this data has been saved to the store, children components access the data via the Vuex store.

Creating endpoints requires you to add the function to the `ApiInterface.js` and the subclasses of `MockApi.js` and `LiveApi.js`. It is recommended that you make use of the `Generator.js` and `mock.js` to create dummy data for the `MockApi.js` interface.

Implementing endpoints in this app requires that you modify the following files:

| Path | Info |
| ---- | ---- |
| `/src/api/ApiInterface.js` | Add your custom api function here (use `this.notImplemented()` to identify unimplemented endpoints) |
| `/src/api/MockApi.js` | Add your mock function to retrieve mock data  |
| `/src/api/LiveApi.js` | Add your REST request here using `this.endpoint(REQUEST_TYPE, ENDPOINT)` |
| `/src/api/Generator.js` | Create a generator to create mock object responses for the API |
| `/src/api/mock.js` | Create a function for retrieving multiple of the generator mock objects |

Implementing Vuex getters and setters requires that you modify the following files:

| Path | Info |
| ---- | ---- |
| `/src/constants.js` | Add your Vuex store constant here |
| `/src/store/getters.js` | Add getter function here to retrieve constant |
| `/src/store/mutations.js` | Add setter function here to update constant |
| `/src/store/state.js` | Add your constant variable here |

### Example creation of Api endpoint
For an example implementation view commit [7b74a094](https://openlab.ncl.ac.uk/gitlab/thinkactive.io/thinkactive.io-web-2/commit/7b74a094961e48a41b84ec922a7dcd1ea90cd7d3)

## Deployment

The app uses Docker to deploy the app. When you set the version using `npm version ...`
it will automatically build and push a new version of the app to the docker registry.
To do this is uses the [Dockerfile](/Dockerfile) to build the web assets and then runs [Nginx](https://www.nginx.com/) to server the generated files. To tag the docker image it uses the [REGISTRY](/REGISTRY) file and the [package.json](/package.json)'s version.

## Dev commands

```bash
# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report

# run unit tests
npm test
```

## Deployment Build

This repo uses a CI to build the web into a docker image, ready to be deployed.
Whenever a commit is pushed with an git tag it builds an image for that commit.
To tag the commit, use the `npm version ...` command which updates the package
version and commits the `package.json` tagged with the new version.

```bash
# Update the npm version
# > Make sure to run without unstaged changes
npm version # patch | minor | major | prepatch | preminor | prerelease
```

**Extras**

```bash
# If using a dist-tag i.e. beta, use `npm prerelease` to increment subversions
npm version 1.0.0-beta.1  # 1.0.0-beta.1
npm version prerelease    # 1.0.0-beta.2

# To experiment with npm version
mkdir test_dir
cd test_dir
npm init -y
npm version # ...
```

## Deployment Config

To configure the deployment, use the `CONFIG_KEYS` environment variable.
Which should be a csv of environment variables you want inserted,
the variables are inserted at `window.CONFIG.YOUR_VAR`.

You should use the [ConfigMixin](/src/mixins/ConfigMixin.js) to access variables which falls back to `process.env` (where webpack config is).

```yml
environment:
  CONFIG_KEYS: MOCK_API,API_URL
  API_URL: https://api.thinkactive.io
  MOCK_API: true
```

For more about the deployment see the [stack repo](https://openlab.ncl.ac.uk/gitlab/thinkactive.io/thinkactive.io-stack).

---

For a detailed explanation on how the project was setup, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).

repository: digitalinteraction/thinkactive-web

repo_name: digitalinteraction/thinkactive-web


text:
# storpug Landing Page

A static landing page built with Pug, Gulp, and Love

## Prerequisites

* This project requires Nodejs v6.x and npm v3.10.x and up
* The `firebase-tools` package is recommended (a local version is installed to node_modules)

## Local Development

First, download this repo.

```bash
git clone git@github.com:storpug/storpug-lp.git
```

Second, install dependencies using `npm`.

```bash
cd storpug-lp
npm install
```

Third, acquire the `prod.conf.json` file for this project. This file contains API keys and other secrets. Put it in the `config` directory. An example file is provided for formatting purposes. See `dev.conf.json`.

Now, build the project and watch for changes. The build files go in the `dist` folder. Any changes to the `src` files trigger a re-build. Open a browser to `http://localhost:8080` to view the site. We use the `http-server` package to create a local http server.

Run:

```bash
npm run serve
```

Note: if you just want to watch the project and not start a server, run:

```bash
npm run watch
```

## Deployment

Before deploying, we must initialize the project with Firebase. Run the command `firebase init`. Look for the storpug project and set it up to use the `dist` folder as the public folder.

When ready, we simply run an `npm` command to deploy.

Run:

```bash
npm run build
npm run deploy
```

## Enjoy!

Go make magic happen. Solve some problems.

## Credits

We couldn't have done it without these folks:

* Nodejs
* npm
* Pug
* Gulp
* Firebase
* Freepik
* UglifyJs
* Imagemin
* Google Fonts
* Bootstrap
* http://shegy.pl/
* http://unsplash.com/

## License

MIT

repository: storagepug/storpug-lp

repo_name: storagepug/storpug-lp


text:
# Gem/Repo Statistics

![version](https://img.shields.io/gem/v/tcp-client)
![downloads](https://img.shields.io/gem/dt/tcp-client)
![downloads](https://img.shields.io/gem/dtv/tcp-client)

![license](https://img.shields.io/github/license/mblumtritt/tcp-client)
![stars](https://img.shields.io/github/stars/mblumtritt/tcp-client)
![watchers](https://img.shields.io/github/watchers/mblumtritt/tcp-client)
![forks](https://img.shields.io/github/forks/mblumtritt/tcp-client)

![issues](https://img.shields.io/github/issues/mblumtritt/tcp-client)
![closed issues](https://img.shields.io/github/issues-closed/mblumtritt/tcp-client)
![pull-requests](https://img.shields.io/github/issues-pr/mblumtritt/tcp-client)
![closed pull-requests](https://img.shields.io/github/issues-pr-closed/mblumtritt/tcp-client)

![last commit](https://img.shields.io/github/last-commit/mblumtritt/tcp-client/main)
![files](https://img.shields.io/github/directory-file-count/mblumtritt/tcp-client)
![build status](https://img.shields.io/github/workflow/status/mblumtritt/tcp-client/Test)
![dependencies](https://img.shields.io/librariesio/github/mblumtritt/tcp-client)

![commit activity](https://img.shields.io/github/commit-activity/m/mblumtritt/tcp-client)

repository: mblumtritt/tcp-client

gha_language: Ruby

repo_name: mblumtritt/tcp-client


text:
# Netrice
Simple Single Element CSS Spinners/Loaders

## TODO

- [X] Github pages Website (https://benolot.github.io/netrice)
- [X] Add proper documentation for contributors (See Contributing.md)
- [X] Add proper documentation for users (How to use)
- [ ] Investigate and setup SCSS quality checks
- [ ] Issue template
- [ ] Make colours and sizing and speed controlable with classes
- [ ] Make github pages site mobile friendly
- [ ] Make all loaders block elements to ensure they work out of the box with `<i>` tags instead of `<div>` tags

## Usage

See the [Documentation](https://benolot.github.io/netrice) for details.

Example usage: `<div class="netrice-circle"></div>` or `<div class="netrice-square-folding"></div>`

repository: benolot/netrice

repo_name: benolot/netrice


text:
# reddit-bot-stream-example

## What is this?

This repo provides an example of a Reddit bot built in Node.js.

Specifically, we are looking at a stream of newly posted comments on reddit, and doing something with their contents.

This is achieved through [Snoowrap](https://www.npmjs.com/package/snoowrap) as a Node.js wrapper for the Reddit API, and [Snoostorm](https://www.npmjs.com/package/snoostorm) as a way to easily access the stream of Reddit comments through Snoowrap.

## Install

`npm i`

Create `.env` at root with the following variables, specific to your Reddit app: https://www.reddit.com/prefs/apps/

```
CLIENT_ID=***
CLIENT_SECRET=***
REDDIT_USER=***
REDDIT_PASS=***
```

## Usage

Running the bot

`npm start`


text:
---
layout: post
title: 317 - Shortest Distance from All Buildings
date: 2015-12-16 22:42:54.000000000 -05:00
tags:
- Leetcode
categories:
- Matrix
author: Jason
---
You want to build a house on an empty land which reaches all buildings in the shortest amount of distance. You are given a 2D grid of values 0, 1 or 2. The distance is calculated using Manhattan Distance, where distance(p1, p2) = |p2.x - p1.x| + |p2.y - p1.y|.

* Each 0 marks an empty land which you can pass by freely.
* Each 1 marks a building which you cannot pass through.
* Each 2 marks an obstacle which you cannot pass through.

``` python
class Solution:
    def shortestDistance(self, grid: List[List[int]]) -> int:
        if not grid:
            return 0

        row, col = len(grid), len(grid[0])
        dist_dict = [[0] * col for _ in range(row)]
        count_dict = [[0] * col for _ in range(row)]
        buildings = 0

        def bfs(queue, visited):
            while queue:
                i, j, distance = queue.pop(0)
                dist_dict[i][j] += distance
                count_dict[i][j] += 1
                for new_i, new_j in (i + 1, j), (i - 1, j), (i, j - 1), (i, j + 1):
                    if 0 <= new_i < row and 0 <= new_j < col and grid[new_i][new_j] == 0 and not visited[new_i][new_j]:
                        visited[new_i][new_j] = True
                        queue.append([new_i, new_j, distance + 1])

        for i in range(row):
            for j in range(col):
                if grid[i][j] == 1:
                    buildings += 1
                    visited = [[False] * col for _ in range(row)]
                    dfs([[i, j, 0]], visited)

        candidates = [dist_dict[i][j] for i in range(row) for j in range(col) if grid[i][j] == 0 and count_dict[i][j] == buildings]
        return min(candidates) if candidates else -1
```


text:
Cellular Automata 2D
=====================
Small C# application created to get a credit on my university. Project has implemented Cellular Automata 2D with The Game of Life mode.

## How it works?
This is simple application with GUI, all what you need to do is compile the project and set correct values using dropdowns, textboxes and by mouse clicks on the canvas.

Project contains 500x500 grid, but you can simply adjust this in `Interface.cs`. Implementation is really scalable and flexible.

## Is it properly implementation?
Yes, but there can be some edge cases where apllication can be crashed.

## Can I use it?
Sure, the code is shared on MIT License. However, **I would be grateful for a star** in the project.

## What has been used to created it?
Software created with love to coding in Cracow.
* IDE: Visual Studio 2017,
* OS: Windows 10.

## Can we talk about the implementation?
Sure. I am open to teach you and make the code clearer, so you can reach the goal.

## Shared on The MIT License (MIT)
Copyright © `2018` `Filip Zarębiński`

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the “Software”), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.


text:
## [0.1.3] - 2018-04-23
### Added
- CocoaPods podspec

## [0.1.2] - 2018-01-30
### Added
- GDPR compliance mechanism for MSAL logs and telemetry through PII enabled/disabled flags
- Sample app in Swift

### Corrected
- Nullability identifiers in some classes

## [0.1.1] - 2017-05-10
### Changed
- MSAL for ObjC no longer targets test slice by default (#195)

## [0.1.0] - 2017-05-08
### Added
- Initial BUILD Preview Release of MSAL for ObjC!
- The initial MSAL for ObjC preview only support iOS 9 and later. macOS support will later.
- Support for native client token acquisition using `MSALPublicClientApplication`
- Interactive auth support using `SFSafariViewController`
- iOS Keychain token caching
- Logging via registered callback in `MSALLogger`
- Telemetry events via registered callback in `MSALTelemetry`

repository: sharetechnology/myAudios

repo_name: sharetechnology/myAudios


text:
# weatherApp
App that fetches the weather data for given position

## Getting Started

### Installing
Just clone this folder by

```
git clone https://github.com/GiovanniFerrara/weatherApp.git
```

and run "npm" install to install the dependencies

## Usage

First register at "https://darksky.net/dev" and get your API key. Then add it as a environmental variable to the app with name of weatherApiKey, by typing in the command line:
```
export weatherApiKey = <your weather key>
```
Register and get your API key for google localization services. Then add it as a environmental variable as well by typing in the command line:
```
export localizationApiKey = <your google key>
```
Now you can use the app by command line just typing: node app.js -your city or adress- -when you wanna know-

Where:
```
<when you wanna know>  ==> 0 (today), 1 (tomorrow), 2 (after tomorrow) ...

<your city>  ==> 90100 (Postal code), Palermo, Street Ballarò 99
```

For example, if I want to fecth the weather in Castelvetrano of today:
```
node app.js Castelvetrano 0

//OR JUST

node app.js Castelvetrano

```
Or the weather in Katowice of tomorrow:
```
node app.js Katowice 1
```

 Built With

* [Node]( https://nodejs.org/it/) JavaScript runtime
* [Request](https://www.npmjs.com/package/yargs) - NPM Dependency

## Version 1

## Author

* **Giovanni Ferrara* - [Linkedin Profile](https://www.linkedin.com/in/giovanni-marco-ferrara-6aa458137/)

## License
MIT

repository: GiovanniFerrara/weatherApp

repo_name: GiovanniFerrara/weatherApp


text:
## Setup

To run the integration tests, there is some manual setup involved:

1. `geth`, `childchain` and `watcher` need to be running. See [elixir-omg](https://github.com/omisego/elixir-omg) for instructions.
2. Create and populate `.env` file in the root of `omg-js`. See `env.docker.example` as an example.
3. Geth `eth.accounts[0]` must have a blank password and hold some test ETH.
4. The test ERC20 contract must be deployed, and its address added to your environment. You can do this by running `npm run deploy-test-erc20` from the `packages/integration-tests` directory. The ERC20 contract address appears in the resulting output. Add this to your `.env` file.
5. Finally, run the tests

## Running Tests

There are 2 options to run the test suite
1. The quickest option is to run them in parallel using `npm run parallel-test`.
2. The slowest option is to run them all in sequence using `npm run sequence-test`

## Returning Test Funds

Each test file uses its own dedicated faucet (identified by the FAUCET_SALT defined in your test config). If you need to return these funds back to the fund account, you can run `npm run cleanup-faucets`.

*Childchain funds will be returned to the fundAccount's childchain account.

Note that some funds may fail to be returned:
1. Not having enough balance to cover transaction gas costs
2. Not having an ETH UTXO to cover fees on the childchain

## Important

- If running the full test suite, you must be running against contracts that have a minimum exit period of at least 120 seconds.


text:
## Celebrity Birds and Meandering Paths

## This week was awesome
- I had a great week; I'm about to do a meditation seminar in which we were asked when we will be happy, or what do we need to be happy?
I honestly couldn't think of anything. In my current state, with my past week, and especially new friends from all my experiences this summer,
I am. There is nothing I can think about at the moment, except besides some sushi, when the sushi place opens :)
- I'm literally having the time of my life, and I am very happy and grateful. My mind is clear, and focused, and I have felt so respected,
seen, and loved here.
- I was talking with a fellow grad student who told me about how happy they were this week, too, and I couldn't help but just feel so happy to
be a part of that, and to have a new friend. Once again, I have a partner in crime; we hang out together and I went to help her take some photos
for her school; she is fortunate to be at a school that will celebrate her achievements this summer, and I enjoyed being a part of helping her do that.
These past few weeks, I have had experienced so much joy just being part of healthier, lovely communities
that share my interests.

## About journeys
- I've been listening to a lot of Illenium these days, and there was one artiste's collaboration I really enjoyed, and was dismayed (but not surprised,
since I did live life over there for many years) to hear that she was struggling, even after having found some success on a television show.
To be honest, the article
had been written during a low-point in their life, where they felt like a failure for not being "successful" (very common in LA because
everyone is measuring themselves by their last success, which makes it harder to appreciate the entire journey of successes), and someone pointed out to them that
success is a journey. I understand that the pandemic has affected many artists, too, so I don't know how things have continued with this person,
but when I first heard them, I couldn't help just repeating their song over and over. I do that with a lot of music, dig deep into the artwork
of the album, research lyrics, want to find out what is the last album the sound engineer mixed. In high school, songs would play on music channels
and I knew the names of every director of each video, and the geneology of who mixed what, could tell apart their mixing styles just by listening.
I guess it's not a coicidence that I do research now; it's the perfect mix of creative and technical for my mind.
- In LA, one of my coworkers used to talk about how some of the best musicians (or artists) have been in a lot of pain, and that that is what we
respond to in their work, that is what is relatable or what moves us. But they are still stuck with the pain, the emptiness, the dark ball that
won't go away, the struggle in which some days are better than others. On some days, it overshadows even the highs of the journey. Like my friend
said, "the film industry doesn't kick anyone out. People leave when they can't take the pain of rejection anymore". The hard part is picking
yourself up and continuing.
- I'm thinking about how I walked away from a couple offers last year, and even hearing in one interview an interviewer tell me that he "would
have taken the offer" (because big company names cloud our judgment rather than what is the company giving you the opportunity to do?),
but that I definitely made the right choice. Not only that, but I've been very happy with everything.
- I have mentors, I have friends, I have peers who want to see me succeed, and who are succeeding, too. As someone put it after a session, "I feel
hopeful". I know that there was a time when some people who are distinguished (or not) who made judgments on my ability to succeed or to even be in this field, but to
be honest, they don't matter anymore, because I am doing the thing anyways. Persistence.

## I met a bird
- Oh, I met a celebrity this week, and made more new friends. I'm still *very busy*, as usual, so there is a growing list of persons who have
emailed me that I haven't responded to, and I'm super sorry, but some things have a priority right now, and I'm working on those things first.

## Here are some photos

## This week
- I have nothing to say besides, I hope you have the courage to go out and live your dream.  I hope
you find happiness and support. Pay the rest no heed.

## And that's it


text:
# Location Tagging

CloudMine supports attaching location information to objects so they can be searched using typical geospatial queries. To store this data, you must make use of the special `CMLocation` class and set the latitude and longitude within that object. When it is saved to CloudMine, it will automatically be indexed properly for later searching. See our [Geo Querying](#/rest_api#geo-queries) documentation for an example of how to search these fields.

```csharp
PatientRecord pr = new PatientRecord () {
	FirstName = "Jane",
	LastName = "Doe",
	SocialSecurityNumber = "333-22-4444"
};

// assume `user` has been created and logged in successfully already
Task<CMObjectResponse> objResponse =
	userObjSrvc.SetUserObject <CareProvider> (user, cp);

objResponse.Wait ();
```

repository: mujiansu/CloudMineSDK-CSharp

repo_name: mujiansu/CloudMineSDK-CSharp


text:
[![NPM version](https://badge.fury.io/js/hypernpm.svg)](http://badge.fury.io/js/hypernpm)

hypernpm
=========

Use keyboard shortcuts to run npm script commands.

## Install

To install, edit `~/.hyper.js` and add `"hypernpm"` to `plugins`:

```js
plugins: [
  "hypernpm",
]
```

## Use

**Shortcut:** `ALT + <NUM>`
**NUM:** 0 to 9 (inclusive)

#### Defaults

* ALT + 1: `npm install`
* ALT + 2: `npm test`

## Configuration

To configure, edit `~/.hyper.js` and add `hypernpm` to `config`:

Define 0 to 9 keys and attach it to some package.json script command.

Example:

```js
{
    config: {
        hypernpm: {
            1: "lint",
            5: "test"
        }
    }
}
```

*Note: Any invalid configurations will be silently ignored.*

repository: novascreen/hypernpm

repo_name: novascreen/hypernpm


text:
# Discrete decay and Half-life
Discrete-time approach for decay with a certain half-life.

This code is based on the Tau-leaping approximate method which is used for simulations of stochastic systems.
Please see details of Tau-leaping here: https://en.wikipedia.org/wiki/Tau-leaping.
The Half-life is the time required for a quantity to reduce to half its initial value, see https://en.wikipedia.org/wiki/Half-life.

Given the half-life of a population and time-step size for the decay, we set the probability of an individual to be selected. This indicates the probability to either keep or not the selected individual under a Poisson distributed random variable. The time-step can be selected as a resolution parameter, the smaller time-step the higher resolution of decay. The population is any discrete quantity. The initial population size is consistent with the "law of large numbers". The higher the initial population the better behavior of the discrete decay.

The probability of elimination (dying) is given by(code): prob_dying = 1 - np.exp(-L * step_long), where L = np.log(2)/Half_life.

This probability is taken to select individuals to continue for the next time-step or not (live/die).
On each time-step (step_long), individuals are uniformly randomly selected to be eliminated.

The file "Test_half_life_decay.py" sets different examples using this approach. The function is called from the file "py_funct_discrete_decay.py".

In the "Figs" carpet you can see different examples of time-step selection for a half-life of 72h with a population of 10000.

gha_language: Python


text:
## Loading

`Loading` provides loading animation which can has custom size.

### Example

- The size of icon

  Default is `24px` and can be configured by setting `size`.

  ```html
  <cube-loading></cube-loading>
  <cube-loading :size="28"></cube-loading>
  <cube-loading :size="40"></cube-loading>
  ```

### Props configuration

| Attribute | Description | Type | Default |
| - | - | - | - |
| size | the size of loading icon, unit px | Number | 24 |


text:
# **RStudio EvangelionUnit01 theme** <img src="./img/Evaunit01.png" width="50">

EvangelionUnit01 color theme for RStudio.

## Overview

This repo contains RStudio theme file that make your RStudio editor EvangelionUnit01 color theme.

From Rstudio version 1.2, you can create your own custom themes without having to overwrite an existing one. Check out the [RStudio IDE Custom Theme Support](https://blog.rstudio.com/2018/10/29/rstudio-ide-custom-theme-support/)  for an instruction.

## Feature & Image

### Syntax highlighting in RStudio

![sample_code](./img/sample_code.png)

Sample code is using [Fira Code Retina](https://github.com/tonsky/FiraCode)

## Requirement

![RStudiobadge](https://img.shields.io/static/v1?label=RStudio&message=version%20>=1.2&logoColor=9cf&color=9cf&logo=RStudio&style=plastic)

RStudio 1.2.x or higher

## Installation

### 1. Installation via RStudio

- If you have RStudio >=v1.2, you can directly import the .rstheme file into RStudio settings.

   See [RStudio IDE Custom Theme Support](https://blog.rstudio.com/2018/10/29/rstudio-ide-custom-theme-support/) for a pictorial step-by-step, or creating custom themes for RStudio if you want to learn more.

- To download and apply the theme, run the following code in RStudio.

```R
rstudioapi::addTheme("https://raw.githubusercontent.com/takemal-studio/RStudio_EvangelionUnit01_theme/master/EvangelionUnit01.rstheme", apply = TRUE)

# To install, but not apply the theme, just switch the apply argument to FALSE.
```

### 2. Manual Installation & Changing Theme

- If you switch the apply argument to FALSE or the steps above don't work, you can manually download the `EvangelionUnit01.rstheme` file and place it in `.R/rstudio/themes` in your R home directory.

- To change your current theme, select the theme by going to `Tools > Global Options > Appearance > Editor theme`

## Recommended RStudio settings for EvangelionUnit01 theme

- Enable: `Tools -> Global Options -> Code -> Display -> Highlight selected line`
- Enable: `Tools -> Global Options -> Code -> Display -> Show margin (Marzin column [80])`
- Enable: `Tools -> Global Options -> Code -> Display -> Show indent Guides`
- Enable: `Tools -> Global Options -> Code -> Display -> Show syntax highlighting in console input`
- Enable: `Tools -> Global Options -> Code -> Display -> Highlight R function calls`

## Uninstallation

To uninstall (removing from the list of available themes) EvangelionUnit01 theme, execute the following code:

```R
rstudioapi::removeTheme("EvangelionUnit01")
```

or delete `EvangelionUnit01.rstheme` file from `.R/rstudio/themes` in your R home directory.

## Supported Platforms

EvangelionUnit01 theme has only been tested on **Windows**. Feedback from other platforms welcome.

## Author

takemal-studio

## License

- MIT
  - see LICENSE


text:
---
layout: post
published: true
title: 'Solidity 0.4.4 Release Announcement'
date: '2016-11-01'
author: Solidity Team
category: Releases
---

This is a bugfix release that fixes a storage corruption that appears when multiple variables are stored in the same slot ([details](https://blog.soliditylang.org/2016/11/01/security-alert-solidity-variables-can-overwritten-storage/)).

**Bugfixes:**
- Type checker: forbid signed exponential that led to an incorrect use of EXP opcode.
- Code generator: properly clean higher order bytes before storing in storage.

A big thank you to all contributors who helped make this release possible!

Download the new version of Solidity [here](https://github.com/ethereum/solidity/releases/tag/v0.4.4).

repository: ethereum/solidity-blog

gha_language: HTML

repo_name: ethereum/solidity-blog


text:
# Raw Files Plugin for [DocPad](http://docpad.org)

<!-- BADGES/ -->

[![Build Status](https://img.shields.io/travis/docpad/docpad-plugin-raw/master.svg)](http://travis-ci.org/docpad/docpad-plugin-raw "Check this project's build status on TravisCI")
[![NPM version](https://img.shields.io/npm/v/docpad-plugin-raw.svg)](https://npmjs.org/package/docpad-plugin-raw "View this project on NPM")
[![NPM downloads](https://img.shields.io/npm/dm/docpad-plugin-raw.svg)](https://npmjs.org/package/docpad-plugin-raw "View this project on NPM")
[![Dependency Status](https://img.shields.io/david/docpad/docpad-plugin-raw.svg)](https://david-dm.org/docpad/docpad-plugin-raw)
[![Dev Dependency Status](https://img.shields.io/david/dev/docpad/docpad-plugin-raw.svg)](https://david-dm.org/docpad/docpad-plugin-raw#info=devDependencies)<br/>
[![Gratipay donate button](https://img.shields.io/gratipay/docpad.svg)](https://www.gratipay.com/docpad/ "Donate weekly to this project using Gratipay")
[![Flattr donate button](https://img.shields.io/badge/flattr-donate-yellow.svg)](http://flattr.com/thing/344188/balupton-on-Flattr "Donate monthly to this project using Flattr")
[![PayPayl donate button](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QB8GQPZAH84N6 "Donate once-off to this project using Paypal")
[![BitCoin donate button](https://img.shields.io/badge/bitcoin-donate-yellow.svg)](https://coinbase.com/checkouts/9ef59f5479eec1d97d63382c9ebcb93a "Donate once-off to this project using BitCoin")
[![Wishlist browse button](https://img.shields.io/badge/wishlist-donate-yellow.svg)](http://amzn.com/w/2F8TXKSNAFG4V "Buy an item on our wishlist for us")

<!-- /BADGES -->

Copies all files in the raw directory to out.  Useful for large files that cause out of memory error when placed in files directory.

## Install

```
docpad install raw
```

## Configuration
Set as many sources as you want. Path should be relative to the `src` directory. The out folder specified in your [docpad configuration file](http://docpad.org/docs/config) is used for the destination.

If no configuration is specified, defaults to `raw` folder

```
# ...
plugins:
    raw:
        raw:
            src: 'raw'
        app:
            src: 'app'
# ...
```

You can also specify copy options as specified by [ncp package](https://github.com/AvianFlu/ncp):

```
# ...
plugins:
    raw:
        raw:
            src: 'raw'
            options:
                dereference: true    # default in our plugin is `true`
                clobber: false       # default in our plugin is `false`
# ...
```

You can also use a shell command instead of the ncp package if you want:

```
# ...
plugins:
    raw:
        raw:
            command: ['rsync', '-a', './src/raw/', './out/']
# ...
```

<!-- HISTORY/ -->

## History
[Discover the change history by heading on over to the `HISTORY.md` file.](https://github.com/docpad/docpad-plugin-raw/blob/master/HISTORY.md#files)

<!-- /HISTORY -->

<!-- CONTRIBUTE/ -->

## Contribute

[Discover how you can contribute by heading on over to the `CONTRIBUTING.md` file.](https://github.com/docpad/docpad-plugin-raw/blob/master/CONTRIBUTING.md#files)

<!-- /CONTRIBUTE -->

<!-- BACKERS/ -->

## Backers

### Maintainers

These amazing people are maintaining this project:

- Benjamin Lupton<EMAIL_ADDRESS>(https://github.com/balupton)
- J. Harshbarger <> (https://github.com/hypercubed)

### Sponsors

No sponsors yet! Will you be the first?

[![Gratipay donate button](https://img.shields.io/gratipay/docpad.svg)](https://www.gratipay.com/docpad/ "Donate weekly to this project using Gratipay")
[![Flattr donate button](https://img.shields.io/badge/flattr-donate-yellow.svg)](http://flattr.com/thing/344188/balupton-on-Flattr "Donate monthly to this project using Flattr")
[![PayPayl donate button](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QB8GQPZAH84N6 "Donate once-off to this project using Paypal")
[![BitCoin donate button](https://img.shields.io/badge/bitcoin-donate-yellow.svg)](https://coinbase.com/checkouts/9ef59f5479eec1d97d63382c9ebcb93a "Donate once-off to this project using BitCoin")
[![Wishlist browse button](https://img.shields.io/badge/wishlist-donate-yellow.svg)](http://amzn.com/w/2F8TXKSNAFG4V "Buy an item on our wishlist for us")

### Contributors

These amazing people have contributed code to this project:

- [Benjamin Lupton](https://github.com/balupton<EMAIL_ADDRESS>— [view contributions](https://github.com/docpad/docpad-plugin-raw/commits?author=balupton)
- [Hypercubed](https://github.com/Hypercubed) — [view contributions](https://github.com/docpad/docpad-plugin-raw/commits?author=Hypercubed)
- [Marcus Stong](https://github.com/stongo<EMAIL_ADDRESS>— [view contributions](https://github.com/docpad/docpad-plugin-raw/commits?author=stongo)
- [nsonnad](https://github.com/nsonnad) — [view contributions](https://github.com/docpad/docpad-plugin-raw/commits?author=nsonnad)
- [RobLoach](https://github.com/RobLoach) — [view contributions](https://github.com/docpad/docpad-plugin-raw/commits?author=RobLoach)

[Become a contributor!](https://github.com/docpad/docpad-plugin-raw/blob/master/CONTRIBUTING.md#files)

<!-- /BACKERS -->

<!-- LICENSE/ -->

## License

Unless stated otherwise all works are:

- Copyright © 2013+ J. Harshbarger <> (https://github.com/hypercubed)

and licensed under:

- The incredibly [permissive](http://en.wikipedia.org/wiki/Permissive_free_software_licence) [MIT License](http://opensource.org/licenses/mit-license.php)

<!-- /LICENSE -->

url: https://raw.githubusercontent.com/butterfill/research/c54fbc8776742ea2c570bccfdbe0d6bc7f4145d9/mindgrad 2016 response to sam clark on modules/www.slides/node_modules/docpad-plugin-raw/README.md

repository: butterfill/research

gha_language: Pug

repo_name: butterfill/research


text:
---
id: version-0.2.7-alpha-install-vasern
title: Installation
original_id: install-vasern
---

Vasern is available on Android and iOS. The following steps will help you install Vasern into your
React Native project.

## Install Vasern

---

Make sure you have [created React Native app](https://facebook.github.io/react-native/docs/getting-started.html). Navigate to React Native directory, and be ready to run commands on Terminal (MacOS) or Command Promp (Window).

#### 1. Install using NPM:

```ssh
$ npm install --save vasern
```

#### 2. Link Vasern library to your project:

- **Automatic linking - for iOS and Android, run command**:

    ```ssh
    $ react-native link vasern
    ```

- **Manually - for iOS**:

    - Browse to _"node_packages/vasern/vasern/ios"_, and drag "_Vasern.xcodeproj_" to "_Libraries_" directory on your project in XCode.

    - Add "_libVasern.a_" to "_Build Phase_" > "_Link Binary with Libraries_"

- **Manual linking - for Android**:

    1. Open file ``android/app/build.gradle`` from your android main app directory, add ``vasern`` dependency:

        ```diff
        dependencies {
        +   compile project(':vasern')

            implementation fileTree(dir: "libs", include: ["*.jar"])
            implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
            implementation "com.facebook.react:react-native:+"  // From node_modules
        }
        ```
    2. Open file ``android/setting.gradle``

        ```diff
        include ':app'

        + include ':vasern'
        + project(':vasern').projectDir = new File(rootProject.projectDir, '../node_modules/vasern/android')
        ```

    3. Open `android/app/src/main/java/com/your-app-name/MainApplication.java`, add the `RNVasernPackage` dependency.

        ```diff

        // Add this line after "import android.app.Application;"
        + import com.ambistudio.vasern.RNVasernPackage;

        // Add "new RNVasernPackage()" in "getPackages()" method
        @Override
        protected List<ReactPackage> getPackages() {
            return Arrays.<ReactPackage>asList(
                new MainReactPackage(),
            +    new RNVasernPackage()
            );
        }
        ```

#### 3. Close Metro Bundle, rebuild and restart project.

# What's next?

Learn about [Supported Data Types](supported-data-types.md) or start [Writing Schema](write-schema.md).

repository: vasern/vasern

gha_license_id: NOASSERTION

repo_name: vasern/vasern


text:
Tourphoria is a complete solution for Travel Agency Business Website and Management System with Booking Engine. This CMS Includes almost everything you need to make a travel agency business website, management system and booking engine. Clients can book any package very easily and no need for registration to complete the order. Paypal and stripe are integrated for easy payment transaction. It has many important sections whice are important for any travel agency business website and everything is fully dynamic. This system is fully responsive for any device. Admin can manage complete website without single line of coding knowledge.

## Table of contents
* [General info](#general-info)
* [Demo](#demo)
* [Screenshots](#screenshots)
* [Technologies](#technologies)
* [Setup](#setup)
* [Features](#features)
* [Status](#status)
* [Contact](#contact)
* [License](#license)

## General info

## Demo

## Screenshots

## Technologies
* Wordpress - version 5.6

## Setup

## Features

## Status
Project is: _finished_

## Contact
<EMAIL_ADDRESS>
## License
MIT License

repository: aniskchaou/TOURPHORIA-CMS

repo_name: aniskchaou/TOURPHORIA-CMS


text:
### [CVE-2006-0829](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-0829)
![](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

Cross-site scripting vulnerability in E-Blah Platinum 9.7 allows remote attackers to inject arbitrary web script or HTML via the referer (HTTP_REFERER), which is not sanitized when the log file is viewed by the administrator using "Click Log".

### POC

#### Reference
- http://evuln.com/vulns/83/summary.html
- http://securityreason.com/securityalert/528

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

repository: trickest/cve

repo_name: trickest/cve


text:
# Component for [React](https://reactjs.org/).

You can use 1500 digitized musical instruments and percussions from free sound library to build musical application with React framework.

## Examples

- [how to preload and play an instrument](https://surikov.github.io/midi-sounds-react-examples/examples/midi-sounds-example1/build)
- [how to preload and play a drum](https://surikov.github.io/midi-sounds-react-examples/examples/midi-sounds-example2/build)
- [how to create selectable list of instruments and delay for loading](https://surikov.github.io/midi-sounds-react-examples/examples/midi-sounds-example3/build)
- [how to create selectable list of drum](https://surikov.github.io/midi-sounds-react-examples/examples/midi-sounds-example4/build)
- [how to play short musical fragments](https://surikov.github.io/midi-sounds-react-examples/examples/midi-sounds-example5/build)
- [how to create sequencer](https://surikov.github.io/midi-sounds-react-examples/examples/midi-sounds-example6/build)
- [how to use strumming](https://surikov.github.io/midi-sounds-react-examples/examples/midi-sounds-example7/build)
- [how to use strumming for guitar music](https://surikov.github.io/midi-sounds-react-examples/examples/midi-sounds-example8/build)
- [how to programmatically change properties of sound](https://surikov.github.io/midi-sounds-react-examples/examples/midi-sounds-example9/build)
- [how to attach sounds to piano keys](https://surikov.github.io/midi-sounds-react-examples/examples/midi-sounds-example10/build)
- [how to use independed channels](https://surikov.github.io/midi-sounds-react-examples/examples/midi-sounds-example11/build)

[Sources of all examples](https://github.com/surikov/midi-sounds-react-examples/tree/master/examples)

## Tutorial

Open Node.js command line window.

Create React application from [https://reactjs.org/tutorial/tutorial.html](https://reactjs.org/tutorial/tutorial.html)

Modify package.json to add dependency to **midi-sounds-react** component

```
{
  "name": "my-test",
  "version": "0.1.0",
  "private": true,
  "homepage": "https://myserver",
  "dependencies": {
    "react": "^16.2.0",
    "react-dom": "^16.2.0",
    "react-scripts": "1.1.0",
    "midi-sounds-react": "^1.2.45"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  }
}
```

Install dependencies

```
npm install
```

Start application

```
npm start
```

Navigate browser to http://localhost:3000

Modify src/App.js to add an Component and button.

```js
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import MIDISounds from 'midi-sounds-react';

class App extends Component {
  playTestInstrument() {
		this.midiSounds.playChordNow(3, [60], 2.5);
	}
  render() {
    return (
      <div className="App">
        <header className="App-header">
          <img src={logo} className="App-logo" alt="logo" />
          <h1 className="App-title">Welcome to midi-sounds-react example 1</h1>
        </header>
        <p className="App-intro">Press Play to play instrument sound.</p>
		<p><button onClick={this.playTestInstrument.bind(this)}>Play</button></p>
		<MIDISounds ref={(ref) => (this.midiSounds = ref)} appElementName="root" instruments={[3]} />
      </div>
    );
  }
}

export default App;
```
### Main parts

```js
import MIDISounds from 'midi-sounds-react';
```

- import **midi-sounds-react** component

```html
<MIDISounds
	ref={(ref) => (this.midiSounds = ref)}
	appElementName="root" instruments={[3]}
	/>
```

- insert component into page

```js
this.midiSounds.playChordNow(3, [60], 2.5);
```

- play sound

See [live example](https://surikov.github.io/midi-sounds-react-examples/examples/midi-sounds-example1/build), download example from [https://github.com/surikov/midi-sounds-react-examples](https://github.com/surikov/midi-sounds-react-examples).

## Reference

### Component parameters

```html
<MIDISounds
	ref={(ref) => (this.midiSounds = ref)}
	appElementName="root"
	instruments={[111]}
	drums={[2,33]}
	/>
```

- this.midiSounds - variable to use component from code
- appElementName - name of main div of application
- instruments - array of instruments to preload
- drums - array of drums to preload

### Initializing

MIDISounds will be initialized after first render. Use componentDidMount to rerender page with initialized component.

```js
componentDidMount() {
		console.log('rerender after init');
		this.setState(this.state);
	}
```

[Live example](https://surikov.github.io/midi-sounds-react-examples/examples/midi-sounds-example4/build)

### Play continuous note sounds

Use this.midiSounds.player.queueWaveTable to start sound and return reference to envelope.

Use envelope.cancel() to stop sound.

[Live example](https://surikov.github.io/midi-sounds-react-examples/examples/midi-sounds-example10/build)

### List of drums

Use this.midiSounds.player.loader.drumsKeys() to get array of drums.

Use this.midiSounds.player.loader.drumInfo(i).title to get readable drum name.

[Live example](https://surikov.github.io/midi-sounds-react-examples/examples/midi-sounds-example4/build)

### List of instruments

Use this.midiSounds.player.loader.instrumentKeys() to get array of drums.

Use this.midiSounds.player.loader.instrumentInfo(i).title to get readable drum name.

[Live example](https://surikov.github.io/midi-sounds-react-examples/examples/midi-sounds-example3/build)

### Load instrument

Use this.midiSounds.cacheInstrument and this.midiSounds.cacheDrum to start instrument and drum loading.

Use this.midiSounds.player.loader.waitLoad to wait till all instruments and drums are loaded.

[Live example](https://surikov.github.io/midi-sounds-react-examples/examples/midi-sounds-example3/build)

### Change instrument and drum volume

Use setInstrumentVolume(instrument, volume) and setDrumVolume(drum, volume)

[Live example](https://surikov.github.io/midi-sounds-react-examples/examples/midi-sounds-example9/build)

### Change Master Volume

Use setMasterVolume(n).

[Live example](https://surikov.github.io/midi-sounds-react-examples/examples/midi-sounds-example9/build)

### Change Echo Level

Use setEchoLevel(value).

[Live example](https://surikov.github.io/midi-sounds-react-examples/examples/midi-sounds-example9/build)

### Change Equalizer

- setBand32(level)
- setBand64(level)
- setBand128(level)
- setBand256(level)
- setBand512(level)
- setBand1k(level)
- setBand2k(level)
- setBand4k(level)
- setBand8k(level)
- setBand16k(level)

[Live example](https://surikov.github.io/midi-sounds-react-examples/examples/midi-sounds-example9/build)

### Cancel all sounds

Use cancelQueue()

### Time

Use contextTime() to get current time of Audio context.

How to calculate musical durations

```
var bpm = 120;
var N = 4 * 60 / bpm;
var duration16th = N/16;
```

### Play drums

- playDrumsAt(when, drums)
- playDrumsNow(drums)

parameters

- when - time
- drums - array of drum numbers

### Play instruments

- playChordNow(instrument, pitches, duration)
- playChordAt(when, instrument, pitches, duration)
- playStrumUpNow(instrument, pitches, duration)
- playStrumUpAt(when, instrument, pitches, duration)
- playStrumDownAt(when, instrument, pitches, duration)
- playStrumDownNow(instrument, pitches, duration)
- playSnapNow(instrument, pitches, duration)
- playSnapAt(when, instrument, pitches, duration)

parameters

- when - time
- instrument - number of instrument
- pitches - array of pitches
- duration - durations

### Play beat

```
playBeatAt(when, beat, bpm)
```

- when - time
- beat - array of drums and chords
- bpm - beats per minute

Example of beat array
```
[
	[
		drum1
		,drum2
	]
	,[
		[guitar,[S6+1,S5+3,S4+3],1/4,down]
		[bass,[S6+1,S5+3,S4+3],1/4]
	]
]
```
- drum1, drum2 - numbers of drums
- guitar, bass - numbers of instruments
- [S6+1,S5+3,S4+3] and [S6+1,S5+3,S4+3] - array with pitches
- 1/4 - duration as part of full note for the bpm
- down - 1|2|3 for strum down, strum up or snap

### Play loop

```
startPlayLoop(beats, bpm, density, fromBeat)
```

- beats - array of beat arrays
- bpm - beats per minute
- dencity - duration of row at array
- fromBeat - start beat number

Use stopPlayLoop() to cancel play.

[Live example](https://surikov.github.io/midi-sounds-react-examples/examples/midi-sounds-example9/build)

## How to get help

Feel free to ask any help at project [issues](https://github.com/surikov/midi-sounds-react/issues).

repository: ryan-seit/drumblr-frontend

repo_name: ryan-seit/drumblr-frontend


text:
# iOS10AdaptationTips
iOS10适配系列教程（学习交流群：561873398）

相关链接： [《iOS9适配系列教程》]( https://github.com/ChenYilong/iOS9AdaptationTips ) 。

## Notification
### LocalNotification

iOS Version | iOS10  | iOS9
-------------|--------------|-------------
Request Authorization |  ![enter image description here](http://a65.tinypic.com/fbicjt.jpg) | ![enter image description here](http://i67.tinypic.com/spulac.jpg)
In Background | ![enter image description here](http://a67.tinypic.com/ve3dy8.jpg) | ![enter image description here](http://i65.tinypic.com/oh253c.jpg)
Lock Screen |  ![enter image description here](http://a64.tinypic.com/33vf39i.jpg) | ![enter image description here](http://i63.tinypic.com/28l6uwy.jpg)
If Repeat by default |  ![enter image description here](http://a64.tinypic.com/33vf39i.jpg) |![enter image description here](http://i67.tinypic.com/98t75s.jpg)
 3D Touch |  ![enter image description here](http://a67.tinypic.com/dorw3b.jpg) | not support

Someone may have the same question with this guy:
![enter image description here](http://a65.tinypic.com/2roqpw1.jpg)

It is impossible for the first question, but local notification may be the best way to help you In terms of waking the app at a certain time, even a certain place.

If your iPhone installed Foursquare-app, you will deliver notification when you enters or leaves a geographic region. How to do that?