text:
---
layout: page
title: "Rate My History"
permalink: /RateMyHistory/
date: 2016-04-26 10:00:00
color: green
---

### Rate My Histroy

This project was a team project where we had to all work together to create a website that can be used to fulfill a purpose relevant to students. We developed a website similar to Rate My Professor but instead rated historical events. We chose to do this topic because it provides an easy way to pick a research or thesis topic that interests you. We used Python, JavaScript, html, and CSS to develop the website. SocketIO was implemented to run login, add events, suggest events, and a chat room.

### Our Database

We had to develop a database that contained all of our historical events. Users could suggest or add events (dependent on privileges) to the database.

``` Python

DROP TABLE IF EXISTS events;
CREATE TABLE events (
    ID serial NOT NULL,
    Name varchar(50)  NOT NULL default '',
    Location varchar(50) NOT NULL default '',
    Description varchar(500) NOT NULL default '',
    Year date,
    Rating integer,
    Views integer NOT NULL default 0,
    PRIMARY KEY  (ID)
) ;

INSERT INTO events (Name, Location, Description, Year, Views) Values
('Watergate Break-in', 'Watergate Hotel. Washington, D.C.','Five men connected to Nixon''s reelection campaign broke into the Democratic National Committee Headquarters and were caught by a security guard.', '1972-6-17', 10),
('Ford pardons Nixon', 'White House, Washington D.C.', 'President Gerald Ford pardons Nixon after Nixon resigns from office and Ford takes the presidency. Ford pardons Nixon ''for all crimes he ''committed or may have committed'' while in office''. ', '1974-9-8', 15),
('Boston Tea Party', 'Boston, Massachusetts', 'Defying the Tea Act, the Sons of Liberty disguised as Native Americans poured an entire shipment of tea into the Boston Harbor.','1773-12-16', 82),
('Battle of Waterloo', 'Waterloo, Netherlands (present-day Belgium)', 'Napolean Bonaparte was defeated and ended his reign as Emperor of the French.', '1815-7-18', 3),
('The Jungle', 'N/A', 'A book written by socialist Upton Sinclair and published in 1904. It promoted the idea of socialism. Readers only retained the disgusting allegations about the meatpacking industrys'' practices. Led to the passage of The Pure Food and Drugs Act of 1906 and the Federal Meat Inspection Act.', '1905-2-25', 5),
('Triangle Shirtwaist Fire', 'New York City, New York', 'A fire in the Triangle Shirtwaist Company 10-story factory building that killed 145 workers. Demonstrated the horrible labor conditions and fire regulations in the early twentieth century. Although the Triangle Shirtwaist Factory Company owners were not indicted on manslaughter charges from their workers'' deaths, it led to the passage of the Sullivan-Hoey Fire Prevention Law in October of 1911 and other reforms.', '1911-3-25', 19),
('Flying Machine', 'Kitty Hawk, North Carolina', 'The first successfule powered airplane invented by Wilbur and Orville Wright.', '1903-12-17', 34),
('Apollo 11', 'Moon', 'First American flight into space and landing of humans on the Moon under President John F. Kennedy''s administration. Astronauts Neil Armstrong, Edwin "Buzz" Aldrin stepped on the Moon.', '1969-7-20', 67);

--
-- Table structure for table people
--

DROP TABLE IF EXISTS people;
CREATE TABLE people (
    ID serial NOT NULL,
    Name varchar(50) NOT NULL default '',
    Birth date,
    Death date,
    Description varchar(500) NOT NULL default '',
    Rating integer,
    Views integer NOT NULL default 0,
    PRIMARY KEY (ID)
);

INSERT INTO people (Name, Birth, Death, Description, Views) Values
('Elizabeth I', '1533-9-7', '1603-3-24', 'Queen of England for 45 years and last Tudor monarch.', 10),
('Christopher Columbus', '1451-9-26', '1506-5-20', 'Italian explorer who reached the New World in 1492. Established a permanent contact of the Old World to the New World.', 82),
('Benito Mussolini', '1883-7-29', '1945-4-28', 'A Facist dictator in Italy during World War II. Created the Facist Party in Italy and was its leader from 1922 to 1943. Allied with Nazi Germany and Japan during World War II.', 23),
('Theodore Roosevelt', '1858-10-27', '1919-1-6', 'Served as the 26th President of the United States from 1901 to 1909. Avid reader, author, historian, naturalist, explorer, and soldier. With the assasination of Present William McKinley, Theodore Roosevelt became the youngest man in history at the age of 42, to become president. Passed the Pure Food and Drugs Act of 1906 and Federal Meat Inspection Act of 1906 after reading The Jungle by Upton Sinclair.', 32),
('Wilbur Wright', '1867-4-16', '1912-5-30', 'Wilbur and his brother, Orville were the inventors and builders of the first airplane.', 14),
('Orville Wright', '1871-8-19', '1948-1-30', 'Orville and his brother, Wilbur were the inventors and builders of the first airplane.', 15),
('Upton Sinclair', '1878-9-20', '1968-11-25', 'A socialist and author of the notable muckraker novel, The Jungle. Exposed the working conditions and the meat packing industries'' practices during the early twentieth century. Readers only focused on the horrible conditions that directly impacted them. The purpose of the novel was to promote socialism.', 48),
('John F. Kennedy', '1917-5-29', '1963-11-22', '35th President of the United States of America and was assassinated on November 22, 1963. Under his presidency was the Cuban Missile Crisis, Bay of Pigs Invasion, establishment of the Peace Corps, Civil Rights Movement, construction of the Berlin Wall, beginning of the Space Race including space flight of Apollo 11.', 1917),
('Neil Armstrong', '1930-8-5', '2012-8-25', 'American astronaut and person to walk on the Moon from the Apollo 11 mission along with Edwin "Buzz" Aldrin.', 1),
('Edwin "Buzz" Aldrin', '1930-1-20', NULL, 'American astronaut and person to walk on the Moon from the Apollo 11 mission along with Neil Armstrong.', 0),
('Rosa Parks', '1913-2-4', '2005-10-24', 'Civil Rights activist who refused to give up her seat on a bus to a white passenger in Montgomery, Alabama. Prompted the Montgomery boycott and other events to end racial segregation int he United States.', 0),
('Martin Luther King, Jr.', '1929-1-15', '1968-4-4', 'Baptist minister and Civil Rights activist who started the Movement in the mid-1950s in the United States. Spoke the infamous "I Have a Dream" speech on the steps of the Washington Monument in Washington, D.C. on August 28, 1963. Talked with E.D. Nixon and other NAACP leaders about Rosa Parks and her arrest and organized a citywide bus boycott. John F. Kennedy phone called Coretta Scott King when Martin Luther King, Jr. was in jail. Was assassinated by James Earl Ray on April 4, 1968.', 0);

```
I found this project to be a great team building exercise. It allowed everyone to simultaneously edit and add code using Github capabilities. This was difficult because everyone had different coding styles and techniques, but it was fun challenge to try to merge those techniques in a cohesive manner.


text:
# OPFLearn Framework

## Dataset Creation Method Overview

OPFLearn uses an efficient methodology to representatively sample from significant portions of the AC OPF feasible load space.
This methodology finds load samples by uniformly sampling from a convex set, the input space, which contains an AC OPF feasible set.
Samples are then tested for AC OPF feasibility and are added to the dataset if they are feasible.
The convex set is reduced throughout sampling by constructing separating hyperplanes to increase the likelihood of sampling feasible load profiles.

A flowchart of the OPFLearn framework can be seen below,

```@raw html
<div style="background-color:white; display:block; margin-left:auto; margin-right:auto; width:80%" >
<img src='../assets/flowchart.svg' style="display:block; margin-left:auto; margin-right:auto" width="100%" alt='OPFLearn flowchart'>
</div>
```

The loop exits when one of the given stopping conditions is met.
Generally, this stopping criteria is the number of desired samples in the dataset.

Example iterations of this process are illustrated below where SOC represents the relaxed AC OPF feasible load space and AC represents the true AC OPF feasible load space.

```@raw html
<div style="background-color:white; display:block; margin-left:auto; margin-right:auto; width:50%" >
<img src="../assets/procedure.svg" style="display:block; margin-left:auto; margin-right:auto" width="100%" alt="Iteration example">
</div>
```

**Steps from top left to bottom right:**

(1) Find the Chebyshev center to use as the initial point, $x_0$. Generate a random direction vector and travel a random distance along this vector to find a new load sample, $x_l$.

(2) Check if $x_l$ is AC OPF feasible. If it is not feasible, find the nearest relaxed feasible point, $x_l^*$. Because $\hat{x}_l \ne {x}_l^*$ define a new infeasibility certificate at $x_l^*$ with normal, $\vec{n} = \hat{x}_l - {x}_l^*$.

(3) Gather a new sample, $x_l$, as in Step 1. Check if the new sampled load is AC OPF feasible. Here, it is not, so the nearest relaxed feasible point is found. $\hat{x}_l = x^*_l$ so discard this sample.

(4) Sample a new load profile, $x_l$, as in Step 1, but starting from the last point, now $x_0$. Check if $x_l$ is AC OPF feasible. $x_l$ is AC OPF feasible, so store $x_l$ and its AC OPF optimal solution.

## Framework

OPFLearn was developed to allow the user to specify functions for modular parts of the dataset creation process.
The following operations in the OPFLearn framework can be provided by the user.
- **Initial Sampling Space**: The A and b matrices defining a polytope, Ax ≤ b.
- **Sampling Method**: A function to sample network load profiles given the current sampling space and nominal load.
- **AC OPF Relaxations**: The AC OPF problem relaxations used to find the maximum load demands and nearest feasible loads.
- **Optimization Solvers**: Solvers used to solve the relaxed and nonconvex AC OPF problems.

### Initial Sampling Space

The initial sampling space can be specified by provided A and b matrices that define a polytope, Ax ≤ b.
By default this sampling space is initialized with the following constraints,
- The active demand is less than the found maximum individual load bus demand values,
- The active demand is greater than zero,
- The reactive demand is greater than zero,
- The reactive demand is limited by the specified minimum power factor (default: 0.7071),
- The total active load is less than the sum of generator active power ratings.

The default initial sampling space is impacted by the following arguments,
- 'pl_max': The maximum active load for each load in the system. By default this is found with an optimization problem.
- 'pl_min': The minimum active load for each load in the system. By default this is 0.
- 'pf_min': A single number or array with values for each load in the system indicating the minimum power factor.
- 'pf_lagging': A boolean indicating if the power factor of loads are only lagging (inductive), or can be lagging or leading (inductive or capacitive).

### Sampling Method

A function for sampling load profiles from the sample space can be provided to the dataset creation functions through the `sampler` argument.
This function must accept four required arguments A, b, x0, n_samples, where A & b define the sampling space as a polytope (Ax<b), x0 is a point within the sampling space, and n_samples is the number of samples to produce.
Additionally the function can accept any number of optional arguments, which can be provided through the `sampler_opts` arguments as a dictionary mapping optional argument names as symbols to the desired parameter (e.g. :method => "hitandrun").

By default OPFLearn uses a [hit and run sample method translated from MATLAB (Copyright (c) 2011, Tim Benham).](https://www.mathworks.com/matlabcentral/fileexchange/34208-uniform-distribution-over-a-convex-polytope?s_tid=prof_contriblnk)

!!! note
	Note only the hit and run methods (hitandrun & achr) in the OPFLearn [`sample_polytope_cprnd`](@ref) function have been extensively tested.

### AC OPF Relaxations

The relaxations to formulate relaxed AC OPF problems can be specified with the `model_type` argument for dataset creation functions.
Most relaxations available in the PowerModels.jl package can be used. A list of these [PowerModels relaxations can be found here](https://lanl-ansi.github.io/PowerModels.jl/stable/formulation-details/#Quadratic-Relaxations).
By default OPFLearn uses [a Strengthened QC-Relaxation](https://lanl-ansi.github.io/PowerModels.jl/stable/formulation-details/#PowerModels.QCLSPowerModel), 'PowerModels.QCLSPowerModel'.

!!! note
	Note that for conic relaxations, such as PowerModels.SDPWRMPowerModel, a non-default solver will likely need for be used.

### Optimization Solvers

The solvers used for solving the relaxed and nonconvex AC OPF problems can be specified with `r_solver` and `opf_solver`, respectively.
By default [IPOPT](https://github.com/jump-dev/Ipopt.jl) is used to solve all AC OPF problems.

## Additional Dataset Creation Arguments

A complete list of arguments for the `create_samples` can be found in the functions documentation,

```@docs
create_samples
```

### Stopping Criteria

The criteria used to stop sampling can be set to include any of the following,
- K: The maximum number of samples
- U: 1/U indicates the maximum number of samples since the last unique active set found
- S: 1/S indicates the maximum number of samples since the last sample was saved to the dataset
- V: 1/V indicates the maximum number of samples since the last feasible sample increased the variance of its unique active set
- T: The maximum amount of time for the creation of the dataset
- max_iter: The maximum amount of total iterations when creating the dataset

When multiple criteria are used, sampling will stop when any one of the used criteria are satisfied.
To exclude the maximum number of samples criteria set K to Inf (np.Inf in Python).

branch_name: refs/heads/main

extension: md

license_type: permissive


text:
MyBikeLane Toronto
======================

The open-source rebuild of the [@gwhalin](https://twitter.com/gwhalin)'s MyBikeLane.com using Ruby on Rails.

### Available Sites ####
- **[Stable, Live Production Site](http://www.mybikelane.to/)**
- [Bleeding-Edge, Testing Site](http://staging.mybikelane.to/)

Upcoming Features
----------------------

These features are listed in no particular order:

- Ability to sync existing accounts to Twitter, Facebook, Google logins
- Google and Facebook login support
- User donor badge
- AJAX-Driven / instant picture upload support
- Cropping, rotating photos
- International support
- Easier mobile / smartphone support
- Developer API
- User profiles
- User profiles privacy settings
- Awards / Leaderboards
- Better Statistics
- Better UI design
- Logo

A Word on Funding
----------------------

I know it's a silly project, but it does cost me money to run. If you have enjoyed using the site please consider [buying me a cup of coffee](http://www.mybikelane.to/page/support-mybikelane-toronto).

Questions or Problems?
----------------------

Have a suggestion, bug, or problem? [Contact<EMAIL_ADDRESS>
**Developers:** If you have any issues with MyBikeLane Toronto, please add an [issue on GitHub](https://github.com/f3ndot/my-bike-lane/issues) or fork the project and send a pull request.

Development
-----------

Developed with Ruby 2 or higher. You'll want to get Ruby on your system using RVM, RBenv, what-have-you.

__As a requirement for image uploading to work, you'll need ImageMagick or GraphicsMagick command-line tool installed.__ You can check if you have it installed by running

```
$ convert -version
Version: ImageMagick 6.8.9-7 Q16 x86_64 2014-09-11 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules
Delegates: bzlib fftw freetype jng jpeg lcms ltdl lzma png tiff xml zlib
```

If you don't have it, it's pretty easy to install on Linux. Mac users can use Homebrew:

```
brew install imagemagick
```

Install all the dependencies for the app by running Bundler's install command. (run `gem install bundle` first if `bundle` doesn't exist in your PATH)

```
bundle install --without staging production
```

Once this succeeds, bootstrap the Rails app database (development uses SQLite3):

First define your development database configuation (create the file `config/database.yml`):

```yml
development:
  adapter: sqlite3
  database: db/development.sqlite3
  pool: 5
  timeout: 5000
```

Note: You must NOT have an environment variable called DATABASE_URL, as it will confuse Rails.
Then bootstrap it with the seed data and schema:

```
bundle exec rake db:setup
```

Ok! You're ready to start developing. Start the server by invoking:

```
bundle exec rails server
```

For more specifics, read up on the [Ruby on Rails 3.2.21](http://guides.rubyonrails.org/v3.2.21/) documentation

Special Thanks
----------------------

My thanks to [Greg Whalin](https://twitter.com/gwhalin) for founding MyBikeLane and maintaining it for so long.

License
----------------------

Copyright (c) 2014 Justin A. S. Bull

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.

license: MIT

repository: credil/my-bike-lane

branch_name: refs/heads/master

repo_name: credil/my-bike-lane


text:
# Release API

The Release app exposes information about GOV.UK applications a RESTful API.

Current implemented endpoints are oulined below:

## Show Application: GET `/applications/:id.json`

Get information about a specific application where `:id` is the application shortname.

### Success Response

Code: `200 OK`

Examples:
```json
{
   "name": "Smart Answers",
   "shortname": "smartanswers",
   "archived": false,
   "deploy_freeze": true,
   "notes": "",
   "repository_url": "https://github.com/alphagov/smart-answers",
}
```

repository: alphagov/release

gha_language: Ruby

gha_license_id: MIT

repo_name: alphagov/release


text:
# BeamNG.drive - KISS Multiplayer

## From their [Github](https://github.com/TheHellBox/KISS-multiplayer)

Server settings such as the map can be changed in the `config.json` file. Port is automatically set on each boot.

repository: parkervcp/eggs

gha_language: Lua

repo_name: parkervcp/eggs


text:
---
layout: page
title: Background
permalink: /background/
---

  I plan to leverage my diverse skills and experiences in the areas of
  linguistics, counseling, customer service, engineering sales, etc
  to become a resourceful and unique developer.

  Linguistics

  At

    Aichi Shukutoku University

  in Japan, I majored in Linguistics, with a specialization in Syntax.

  Syntactical analysis is performed in our natural languages when we analyze
  each part of the sentence and how it functions within the sentence.
  Computer language does a similar thing via lexical analysis.

  Because both syntactical analysis and lexical analysis are similar,
  understanding how natural languages work is useful in understanding
  computer languages.

  Counseling

  At

    Waikato Institute of Technology

  in New Zealand, I obtained a certificate in Counseling.
  As part of my Counseling major, I assisted young people experiencing
  difficulties with empowerment, coping and self-care to identify best
  solutions for moving forward and progressing in life.

  Counseling skills can be useful in programming when working with clients
  to assist them in identifying their programming needs and collaboratively
  working with the clients to deliver a quality and meaningful product.

  Sales and engineering

  Because of my desire to use my counseling skills to work in sales and
  my burgeoning interest in technology, I sought and landed a job as a
  salesperson with

    ESTIC
  ,
  an industrial machinary corporation in central Japan. In this role, I promoted

    hand-held, high-precision nutrunner systems

  to Japan's top auto-makers, including Toyota and Honda.
  I acquired not only sales and customer service skills,
  but also some insight into mechanical and software engineering through
  working with clients and in-house engineers.

  Computer programming

  Shortly after moving to the United States, I met a professional programmer
  at a rock climbing gym. His passion for coding inspired me to research the
  field.

  I not only realized that programming was the career field
  that I was interested in pursuing, but also realized that my past education
  and job experiences were, in a sense, bread crumbs leading to a career in programming.

  Without hesitation, I enrolled in a Computer Science program at

    University of the District of Columbia
  .


text:
## 0.3.0

Runner only release

* Minimal reset style: no padding, system sans fonts
* Load and run scripts in order

## 0.2.1, 2016-09-08

* Default height

## 0.2.0, 2016-08-23

* Read and write both `block.metadata.text` and `block.text`
* Add UI to set `height`: saves to html, block, and metadata
* Support link

## 0.1.0, 2016-08-23

* Saves text to `block.text` (instead of `metadata`)

repository: the-grid/ed-userhtml

repo_name: the-grid/ed-userhtml


text:
# Use Python to generate test file

This code uses the test fixture from GPT3Tokenizer, runs it through HuggingFace transformer and generates a test file that compares the tokens line by line.

Note: the HuggingFace tokenizer adds start and end of sequence tokens but GPT3Tokenizer does not.

## Setup

In the root folder:

```bash
composer install
```

(this setups the vendor/ folder)

Setup a virtualenv / conda install and do:

```bash
pip install transformers
```

## Usage

```bash
python generate_test.py
```

This will create (or re-create) ../tests/TokenizerTest.php

(To run the tests do `composer test` in the root folder.)

repository: Textualization/RophertaTokenizer

repo_name: Textualization/RophertaTokenizer


text:
---
title: 482. Father, Lead Me Day by Day - Seventh Day Adventist Hymnal
metadata:
    description: |
      SDAH 482. Father, Lead Me Day by Day. 1. Father, lead me day by day, Ever in Thine own sweet way; Teach me to be pure and true; Show me what I ought to do.
    keywords:  |
      SDAH, Seventh Day Adventist Hymnal, adventhymnals, advent hymnals, Father, Lead Me Day by Day, Father, lead me day by day,
    author: Brian Onang'o
---

#### Advent Hymnals
## 482. FATHER, LEAD ME DAY BY DAY
#### Seventh Day Adventist Hymnal

```txt

1.
Father, lead me day by day,
Ever in Thine own sweet way;
Teach me to be pure and true;
Show me what I ought to do.

2.
When in danger, make me brave;
Make me know that Thou canst save;
Keep me safe by Thy dear side;
Let me in Thy love abide.

3.
When tempted to do wrong,
Make me steadfast, wise, and strong;
And when all alone I stand,
Shield me with Thy mighty hand.

4.
May I do the good I know,
Be Thy loving child below,
Then at last go home to Thee,
Evermore Thy child to be.

```

- |   -  |
-------------|------------|
Title | Father, Lead Me Day by Day |
Key |  |
Titles | undefined |
First Line | Father, lead me day by day, |
Author |
Year |
Composer|  |
Hymnal|  - |
Tune|  |
Metrical pattern | |
# Stanzas |  |
Chorus |  |
Chorus Type |  |
Subjects |  |
Texts |  |
Print Texts |
Scripture Song |  |

repository: GospelSounders/adventhymnals

repo_name: GospelSounders/adventhymnals


text:
How to run drupal related modules test cases.
Summary :-

To run test cases in drupal module we need build drupal core package and drupal complete framework which include one database,apache server,and core package itself.
There are 3 type of tests in drupal unit,functional,intergration. For unit test we dont need drupal full framework like database.
Unit test does not use database testing.
Copy following files into VM thats needed to run docker file succesfully.

1) automate_drupal.sh.txt
2) Dockerfile.drupal.ubi
3) drupal.zip
4) drupal_schema.sql
Rename 2 files:-

#cp Dockerfile.drupal.ubi Dockerfile
#cp automate_drupal.sh.txt automate_drupal.sh
#chmod +x automate_drupal.sh
Now create an image from dockerfile (Dockerfile.drupal.ubi i.e Dockerfile)

 #docker build -t drupal_image .
 #docker images
Then run a container using that image.

#docker run -it -d drupal_image /bin/bash
#docker ps
#docker exec -it 69cabf536f6f /bin/bash
Live drupal webserver will be available at http://:8081

After that we need to run below command inside container.Run it in single command . Step 1 will take sometime to exec.

Step 1:-

su - postgres -c 'if [[ $(psql -l | grep dru2_pg) ]]; then     echo "Database already configured..."; else    /usr/pgsql-13/bin/pg_ctl -D /var/lib/pgsql/13/data/ start;     /usr/pgsql-13/bin/createdb -T template0 dru2_pg;     psql dru2_pg < /opt/app-root/src/drupal_schema.sql; fi'
Step 2:-

/usr/sbin/httpd -k start;
Go to :-

#cd /opt/app-root/src/drupal/modules
Clone the module which you wanted to test :-

#git clone https://git.drupalcode.org/project/better_exposed_filters.git
#git checkout <versions>
Follow automate_drupal.sh for more detail:-

#cd /opt/app-root/src/drupal

 bash-4.4#yum install -y git php php-json php-dom php-mbstring zip unzip gd gd-devel php-gd php-pdo php-mysqlnd
 bash-4.4#php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && php composer-setup.php --install-dir=/bin --filename=composer
 bash-4.4#composer require --dev phpunit/phpunit --with-all-dependencies ^8  --no-interaction

 bash-4.4# composer install

#cd /opt/app-root/src/drupal/modules/better_exposed_filters
bash-4.4# pwd
/opt/app-root/src/drupal/modules/better_exposed_filters

#composer require --dev drush/drush
bash-4.4# ./vendor/bin/drush pm:enable

cd /opt/app-root/src/drupal/core
bash-4.4# pwd
  /opt/app-root/src/drupal/core
RUN Test Kernel/Functional:-
bash-4.4# ../vendor/phpunit/phpunit/phpunit ../modules/better_exposed_filters/tests/
Test output
bash-4.4# pwd /opt/app-root/src/drupal bash-4.4# composer install

Drupal\Composer\Composer::ensureComposerVersion Installing dependencies from lock file (including require-dev) Verifying lock file contents can be installed on current platform. Nothing to install, update or remove Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead. Package webmozart/path-util is abandoned, you should avoid using it. Use symfony/filesystem instead. Generating autoload files Drupal\Core\Composer\Composer::preAutoloadDump Hardening vendor directory with .htaccess and web.config files. 82 packages you are using are looking for funding. Use the composer fund command to find out more! drupal/drupal: This package is meant for core development, and not intended to be used for production sites. See: https://www.drupal.org/node/3082474 Cleaning installed packages. bash-4.4# cd core/ bash-4.4# clear bash-4.4# pwd /opt/app-root/src/drupal/core

bash-4.4# ../vendor/bin/phpunit ../modules/better_exposed_filters/tests/src/Unit
PHPUnit 8.5.27 #StandWithUkraine

Testing ../modules/better_exposed_filters/tests/src/Unit
.................                                                 17 / 17 (100%)

Time: 2.19 seconds, Memory: 4.00 MB

OK (17 tests, 17 assertions)

Remaining self deprecation notices (17)

  17x: Drupal\Tests\UnitTestCase::assertArrayEquals() is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. Use ::assertEquals(), ::assertEqualsCanonicalizing(), or ::assertSame() instead. See https://www.drupal.org/node/3136304
    6x in BetterExposedFiltersHelperUnitTest::testRewriteOptions from Drupal\Tests\better_exposed_filters\Unit
    4x in BetterExposedFiltersHelperUnitTest::testRewriteTaxonomy from Drupal\Tests\better_exposed_filters\Unit
    3x in BetterExposedFiltersHelperUnitTest::testRewriteReorderOptions from Drupal\Tests\better_exposed_filters\Unit
    3x in BetterExposedFiltersHelperUnitTest::testSortOptions from Drupal\Tests\better_exposed_filters\Unit
    1x in BetterExposedFiltersHelperUnitTest::testSortNestedOptions from Drupal\Tests\better_exposed_filters\Unit

	bash-4.4# ../vendor/phpunit/phpunit/phpunit ../modules/better_exposed_filters/tests
PHPUnit 8.5.27 #StandWithUkraine

Testing ../modules/better_exposed_filters/tests
SSS..................................                             37 / 37 (100%)

Time: 4.32 minutes, Memory: 6.00 MB

OK, but incomplete, skipped, or risky tests!
Tests: 37, Assertions: 259, Skipped: 3.

Remaining self deprecation notices (42)

  17x: Drupal\Tests\UnitTestCase::assertArrayEquals() is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. Use ::assertEquals(), ::assertEqualsCanonicalizing(), or ::assertSame() instead. See https://www.drupal.org/node/3136304
    6x in BetterExposedFiltersHelperUnitTest::testRewriteOptions from Drupal\Tests\better_exposed_filters\Unit
    4x in BetterExposedFiltersHelperUnitTest::testRewriteTaxonomy from Drupal\Tests\better_exposed_filters\Unit
    3x in BetterExposedFiltersHelperUnitTest::testRewriteReorderOptions from Drupal\Tests\better_exposed_filters\Unit
    3x in BetterExposedFiltersHelperUnitTest::testSortOptions from Drupal\Tests\better_exposed_filters\Unit
    1x in BetterExposedFiltersHelperUnitTest::testSortNestedOptions from Drupal\Tests\better_exposed_filters\Unit

  4x: AssertLegacyTrait::assertEqual() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertEquals() instead. See https://www.drupal.org/node/3129738
    1x in FilterWidgetKernelTest::testSortFilterOptions from Drupal\Tests\better_exposed_filters\Kernel\Plugin\filter
    1x in SortWidgetKernelTest::testCombineSortOptions from Drupal\Tests\better_exposed_filters\Kernel\Plugin\sort
    1x in SortWidgetKernelTest::testCombineRewriteSortOptions from Drupal\Tests\better_exposed_filters\Kernel\Plugin\sort
    1x in SortWidgetKernelTest::testResetSortOptions from Drupal\Tests\better_exposed_filters\Kernel\Plugin\sort

  3x: The Drupal\Tests\better_exposed_filters\FunctionalJavascript\BetterExposedFiltersTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426
    3x in DrupalListener::startTest from Drupal\Tests\Listeners

  3x: The Drupal\Tests\better_exposed_filters\Kernel\Plugin\sort\SortWidgetKernelTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426
    3x in DrupalListener::startTest from Drupal\Tests\Listeners

  2x: The Drupal\Tests\better_exposed_filters\Kernel\BetterExposedFiltersKernelTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426
    2x in DrupalListener::startTest from Drupal\Tests\Listeners

  2x: The Drupal\Tests\better_exposed_filters\Kernel\Plugin\filter\FilterWidgetKernelTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426
    2x in DrupalListener::startTest from Drupal\Tests\Listeners

  2x: The Drupal\Tests\better_exposed_filters\Kernel\Plugin\filter\HiddenFilterWidgetKernelTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426
    2x in DrupalListener::startTest from Drupal\Tests\Listeners

  2x: The Drupal\Tests\better_exposed_filters\Kernel\Plugin\filter\RadioButtonsFilterWidgetKernelTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426
    2x in DrupalListener::startTest from Drupal\Tests\Listeners

  1x: AssertLegacyTrait::assertNotEqual() is deprecated in drupal:8.0.0 and is removed from drupal:10.0.0. Use $this->assertNotEquals() instead. See https://www.drupal.org/node/3129738
    1x in FilterWidgetKernelTest::testSortFilterOptions from Drupal\Tests\better_exposed_filters\Kernel\Plugin\filter

  1x: The Drupal\Tests\better_exposed_filters\Kernel\Plugin\filter\LinksFilterWidgetKernelTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426
    1x in DrupalListener::startTest from Drupal\Tests\Listeners

  1x: The Drupal\Tests\better_exposed_filters\Kernel\Plugin\filter\SingleFilterWidgetKernelTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426
    1x in DrupalListener::startTest from Drupal\Tests\Listeners

  1x: The Drupal\Tests\better_exposed_filters\Kernel\Plugin\pager\LinksPagerWidgetKernelTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426
    1x in DrupalListener::startTest from Drupal\Tests\Listeners

  1x: The Drupal\Tests\better_exposed_filters\Kernel\Plugin\pager\RadioButtonsPagerWidgetKernelTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426
    1x in DrupalListener::startTest from Drupal\Tests\Listeners

  1x: The Drupal\Tests\better_exposed_filters\Kernel\Plugin\sort\LinksSortWidgetKernelTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426
    1x in DrupalListener::startTest from Drupal\Tests\Listeners

  1x: The Drupal\Tests\better_exposed_filters\Kernel\Plugin\sort\RadioButtonsSortWidgetKernelTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426
    1x in DrupalListener::startTest from Drupal\Tests\Listeners

	script output:
	**************************************
	Cloning into 'better_exposed_filters'...
remote: Enumerating objects: 3902, done.
remote: Counting objects: 100% (161/161), done.
remote: Compressing objects: 100% (83/83), done.
remote: Total 3902 (delta 93), reused 129 (delta 73), pack-reused 3741
Receiving objects: 100% (3902/3902), 711.94 KiB | 5.93 MiB/s, done.
Resolving deltas: 100% (2253/2253), done.
Note: switching to '8.x-5.0'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 0225b9d Issue #3182069 by vetal4ik, Yury N, pareshpatel, aludescher: Date picker no longer works with date range filters
PHP Warning:  PHP Startup: Unable to load dynamic library 'mongodb.so' (tried: /usr/lib64/php/modules/mongodb.so (/usr/lib64/php/modules/mongodb.so: undefined symbol: _zval_ptr_dtor), /usr/lib64/php/modules/mongodb.so.so (/usr/lib64/php/modules/mongodb.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'mongodb.so' (tried: /usr/lib64/php/modules/mongodb.so (/usr/lib64/php/modules/mongodb.so: undefined symbol: _zval_ptr_dtor), /usr/lib64/php/modules/mongodb.so.so (/usr/lib64/php/modules/mongodb.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'mongodb.so' (tried: /usr/lib64/php/modules/mongodb.so (/usr/lib64/php/modules/mongodb.so: undefined symbol: _zval_ptr_dtor), /usr/lib64/php/modules/mongodb.so.so (/usr/lib64/php/modules/mongodb.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'mongodb.so' (tried: /usr/lib64/php/modules/mongodb.so (/usr/lib64/php/modules/mongodb.so: undefined symbol: _zval_ptr_dtor), /usr/lib64/php/modules/mongodb.so.so (/usr/lib64/php/modules/mongodb.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'mongodb.so' (tried: /usr/lib64/php/modules/mongodb.so (/usr/lib64/php/modules/mongodb.so: undefined symbol: _zval_ptr_dtor), /usr/lib64/php/modules/mongodb.so.so (/usr/lib64/php/modules/mongodb.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHPUnit 7.5.20 by Sebastian Bergmann and contributors.

Testing ../modules/better_exposed_filters/tests/src/Unit
.................                                                 17 / 17 (100%)

Time: 662 ms, Memory: 4.00 MB

OK (17 tests, 17 assertions)
------------------better_exposed_filters:install_&_test_both_success-------------------------

gha_language: Shell


text:
#[Using processor-cache affinity in shared memory multiprocessor scheduling](https://eds-a-ebscohost-com.prx.library.gatech.edu/eds/detail/detail?sid=0295c83e-0e22-463f-9664-dbe19ed1f13d%40sessionmgr4008&vid=0&hid=4205&bdata=JnNpdGU9ZWRzLWxpdmUmc2NvcGU9c2l0ZQ%3d%3d#AN=edselc.2-52.0-0027541973&db=edselc)

## Key ideas
* Take advantage of processor cache to schedule tasks
* Investigate how affinity affects schedulers

## Forms of affinity
* How fast the task runs given heterogeneous processors (uncommon)
* How the processor cache affects processor performance
* Processor may have resources (I/O..) associated with it

## Cache reload transient
* The burst of cache misses that happens on the first run of a task

## Cache footprint
* Group of cache blocks used by task
* Measurements in this paper do not take into account false data sharing

## The policies examined
* First come first served
* Fixed processor
* Last processor
  * The last processor that ran a task is where it'll run the next time
* Minimum intervening
  * Before scheduling, compute the number of tasks waiting to run in all processors
  * Task will be scheduled to the processor with the minimum number of waiting tasks
* Limited minimum intervening
  * Same as MI but limiting the number of tasks a processor can have affinity with
* LMI routing
  * Same as LMI, but the scheduling decision happens when task becomes
    schedulable, not when processor is idle
  * For each processor, compute the sum of all tasks in queue + sum of intervening
    tasks
  * Task gets scheduled for the minimum of the measurement above

## Comparison and discussion (largely skipped)
* LMIR very similar to FP - which provides usually the best throughput
* However significant differences between LMIR and other MI policies
only show up when the number of tasks is very high.

license: Unlicense

url: https://raw.githubusercontent.com/dLobatog/paper-notes/460e5cc8d6d9c3959caac31f01a71ebd83b24bf1/Using processor cache affinity in shared memory multiprocessor scheduling.md

repository: dLobatog/paper-notes

repo_name: dLobatog/paper-notes


text:
# ascii-themes CLI for Node.js
CLI Interface to Generate Themed ASCII Art

Supports 287 fonts from [Figlet](http://www.figlet.org/) and 18 themes from [VS Code](https://code.visualstudio.com/). To see supported fonts and themes run `npx ascii-themes support`.

## Usage

```
npx ascii-themes generate text
```

![ASCII Themes Text](https://raw.githubusercontent.com/AlexLakatos/ascii-themes/master/ascii-themes-text.png)

- Optional flags:
  - `--font` The Figlet Font to use. Defaults to 'Slant Relief'.
  - `--themeName` The VS Code theme to use. Defaults to 'Monokai Dimmed'.
  - `--horizontalLayout` The horizontal layout to use for the Figlet Font. Defaults to 'default'.
  - `--verticalLayout` The vertical layout to use for the Figlet Font. Defaults to 'default'.

## Interactive Mode

The CLI has 2 interactive modes:

```
npx ascii-themes -i
```

Will allow you to select from the available commands (generate, support, interactive) and input the flags for them via text prompts.

```
npx ascii-themes interactive
```

Will allow you to input the text and select from a list the available fonts, themes and layouts.

repository: AlexLakatos/ascii-themes

gha_language: JavaScript

repo_name: AlexLakatos/ascii-themes


text:
Roma-dev
========

Roma game development package
This game must be played in a terminal

save this folder to your desktop

in windows

1. Install python
2. Open cmd by typing it into the search bar
3. Type c:/path/to/Roma.py
4. Enjoy

in OS X to play this game

1. Go to finder
2. Go to applications
3. Go to utilities
4. Click on the terminal icon
5. Enter the command {python Desktop/Roma/Roma.py}
	without the curly brackets
6. Enjoy

in Linux to play this game

1. Find your distro of choice terminal
2. Type python2 /path/to/Roma.py
3. Enjoy

repository: Constantrock/Roma-dev

repo_name: Constantrock/Roma-dev


text:
---
layout: page
title: fmi, serverless collectives
description: high-performance message passing and collective communication
img: /assets/img/fmi/overview.png
github: spcl/fmi
paper1: copik2022fmi
paper1_description: Paper @ ICS' 23
importance: 3
category: serverless
---

While serverless functions provide high scalability and elastic resource management,
the lack of fast and cheap communication is a major limitation of applying serverless
computing to distributed applications. Without direct communication and group operations,
functions must use cloud storage, resulting in cost and performance overheads.

  Function Message Interface: an MPI-like interface for many channels of inter-function communication.

FaaS Message Interface (FMI) overcomes these limitations
by offering and high-performance framework for general-purpose peer-to-peer
and collective communication in FaaS applications.
FMI provides portable communication with performance closer to that offered by high-performance systems.

[The system implementation](https://github.com/spcl/fami) is available on an open-source license - try it today!
It supports AWS Lambda, and support for other cloud platforms is coming in the future.

branch_name: refs/heads/source

extension: markdown


text:
# Assertions

Most of your tests will assert against your Ember app's UI. After visiting a route and interacting with the app, and after Mirage handles any requests, you'll assert that your UI is in the state you expect it to be.

But sometimes even if your UI looks consistent, your app may have a bug on account of sending the wrong data to your server.

To address this class of issues, you can assert against the state of your Mirage server within your tests, right alongside your UI assertions. This will give you more confidence that your Ember app is sending over the correct data to your backend.

## Asserting against Mirage's database

The simplest way to assert that your Ember app is sending over the correct data to your backend is to assert against Mirage's database. If the correct data makes it there, you'll have confidence not only that the JSON payloads from your Ember app are correct, but that your Mirage route handlers are behaving as you expect.

Here's an example:

```js
test("I can change the lesson's title", async function(assert) {
  this.server.create('lesson', { title: 'My First Lesson' })

  await visit('/');
  await click('.Edit')
  await fillIn('input', 'Updated lesson');
  await click('.Save');

  // Assert against our app's UI
  assert.dom('h1').hasText('Updated lesson');

  // Also check that the data was "persisted" to our backend
  assert.equal(this.server.db.lessons[0].title, 'Updated lesson');
});
```

This is a great way to gain some extra confidence that your Ember app is sending over the data you expect.

## Asserting against Mirage Models

It can also be useful to assert against Mirage's ORM models, to verify things like updates to your model's relationships:

```js
test('I can add a tag to a post', async function(assert) {
  let programming = this.server.create('tag', { name: 'Programming' });
  let post = this.server.create('post');

  await visit(`/posts/${post.id}/edit`);
  await select('.tags', 'Programming');
  await click('.save');

  assert.dom().includesText('Saved!');
  assert.equal(post.reload().tagIds.includes(programming.id));
});
```

The `reload` method on Mirage models will rehydrate them with any new database data since they were instantiated, allowing you to verify that your route handler logic worked as expected.

Asserting against models is basically another way to verify Mirage's database data is correct.

## Asserting against handled requests and responses

You can also assert against the actual HTTP requests and responses that are made during your test.

To do this, first enable [Pretender's `trackedRequests` feature](https://github.com/pretenderjs/pretender#tracking-requests) by enabling the `trackRequests` environment option:

```js
// config/environment.js
module.exports = function(environment) {
  if (environment === 'test') {
    ENV['ember-cli-mirage'] = {
      trackRequests: true
    };
  }
}
```

This feature is disabled by default to avoid memory issues during long development sessions.

Now Mirage will track every request (along with the associated response) and make them available to you via `server.pretender.handledRequests`. That way you can assert against requests in that array at the end of your test.

```js
test("I can filter the table", async function(assert) {
  this.server.createList('movie', 5, { genre: 'Sci-Fi' });
  this.server.createList('movie', 3, { genre: 'Drama' });

  await visit('/');
  await select('.genre', 'Sci-Fi');

  // Assert against our app's UI
  assert.dom('tr').exists({ count: 5 });

  // Also assert against the HTTP request count & query
  let requests = this.server.pretender.handledRequests;
  assert.equal(requests.length, 1);
  assert.deepEqual(requests[0].queryParams, { 'filter[genre]': 'Sci-Fi' });
});
```

In general we recommend asserting against Mirage's database and your UI, as the specifics of your app's HTTP requests should be considered implementation details of the behavior you're actually interested in verifying. But there's certainly valid reasons to drop down and assert against HTTP data.

---

And with that, you've completed the main portion of the guides! Read on to see some advanced use cases and configuration options, or head over to the API docs to see how to use Mirage's various classes.

repository: jrjohnson/ember-cli-mirage

gha_language: Perl

repo_name: jrjohnson/ember-cli-mirage


text:
# .NET Core logging extension for log4net

Package: [chimera.extensions.logging.log4net](http://www.nuget.org/packages/chimera.extensions.logging.log4net)
[![NuGet](http://img.shields.io/nuget/v/chimera.extensions.logging.log4net.svg)](http://www.nuget.org/packages/chimera.extensions.logging.log4net)

[log4net](https://github.com/apache/log4net) logger provider for [Microsoft.Extensions.Logging](https://github.com/aspnet/Logging). Compatible with ASP.NET Core and .NET Core official release (dotnet).

Routes .NET Core log messages to log4net. Refer to the [wiki](https://github.com/RoamingLost/Chimera.Extensions.Logging.Log4Net/wiki) for more information.

## How to use

1. Add dependency in project.json
    ```json
     "dependencies": {
        "chimera.extensions.logging.log4net": "1.1.1"
      }
    ```

2. Create log4net.config in root of your project file, see [log4net.config example](https://logging.apache.org/log4net/release/manual/configuration.html)
3. In Startup.cs add in `Configure`

    ```c#
    using Chimera.Extensions.Logging.Log4Net;

    public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
    {
        //add log4net to .NET Core
        loggerFactory.AddLog4Net();
    ```

gha_language: C#


text:
# HFRAdapter - Easy as it should be :)
==============

Header + Footer + Parallax + Loading + Less Boilerplate code Adapter

## I tried to make it easier to deal with RecyclerView Adapter

Screenshots:
--------

// SOON

## Usage :

Java:
``` java

	// The adaoter class looks like this:
	public class ParallaxHFRAdapterTest extends ParallaxHFRAdapter<String, MyViewHolder> {

	    public ParallaxHFRAdapterTest(List<String> items) {
	        super(items);
	    }

	    public ParallaxHFRAdapterTest() {}

	    @Override
	    protected void onBindItemViewHolder(MyViewHolder viewHolder, int position, int type) {
	        viewHolder.bind(getItem(position));
	    }

	    @Override
	    protected MyViewHolder viewHolder(View view, int type) {
	        return new MyViewHolder(view);
	    }

	    @Override
	    protected int layoutId(int type) {
	        return R.layout.item_text;
	    }
	}

	// in the activity
    public class MainActivity extends Activity {
		private RecyclerView recyclerView;
		private ParallaxHFRAdapterTest parallaxHfAdapter;

	    @Override
	    protected void onCreate(Bundle savedInstanceState) {
	        super.onCreate(savedInstanceState);
	        setContentView(R.layout.activity_hfradapter);

	        recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
	        recyclerView.setLayoutManager(new ALinearLayoutManager(this));
	        parallaxHfAdapter = new ParallaxHFRAdapterTest(getItems());
	        recyclerView.setAdapter(parallaxHfAdapter);

            parallaxHfAdapter.addHeader(this, R.layout.v_header);
	        parallaxHfAdapter.addFooter(this, R.layout.v_footer);
	        parallaxHfAdapter.setLoadingView(this, R.layout.v_loading);
	        parallaxHfAdapter.setParallaxHeader(true);
	        parallaxHfAdapter.setParallaxFooter(true);

	    }
   }
```

Install
--------

You can install using Gradle:

```gradle
	repositories {
	    maven { url "https://jitpack.io" }
	}
	dependencies {
	    implementation 'com.github.iballan:hfradapter:1.0.10'
	}
```

### TODO:

- [x] Add Scroll aware RecyclerView
- [ ] Add Screenshots
- [ ] Add Example of Scroll aware RecyclerView
- [ ] Test AutoLoadMore listener
- [ ] Test Scroll aware RecyclerView (MBRecyclerView)

Contact me:
--------

Twitter: [@mbh01t](https://twitter.com/mbh01t)

Github: [iballan](https://github.com/iballan)

Website: [www.mbh01.com](http://mbh01.com)

Credits:
--------

License
--------

    Copyright 2017 Mohamad Ballan.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

repository: iballan/hfradapter

repo_name: iballan/hfradapter


text:
# Html Multi Page

> Html Multi Page using Webpack 5

As a SPA Developer, I want to have multiple html pages with separated assets, so that I can build a multi page site

## Before and After

Before and after for Html Multi Page using Webpack 5

  Before
  After

  ![Before](shot-before.png 'Before screenshot')

  ![After](shot-after.png 'After screenshot')

## Development

Run VSCode Live Server on index.html or open in your browser

```bash
# cd [YouCustomDevFolder]
git clone git@github.com:klueless-html-samples/HtmlMultiPage.git && cd HtmlMultiPage

npm install

# use a command to open index.html in browser.
# this is how I setup my Mac alias for chrome
# alias chrome="open -a Google\ Chrome"
chrome index.html
```

## License

The code is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

## Copyright

Copyright (c) David Cruwys. See [MIT License](LICENSE.txt) for further details.


text:
#### Simple news system

Author: HybridMind
Version: 0.0.1

### Description:
Very small news system that is integrated with phpBB. Very small admin panel, which has the following functions - add, edit and delete news. The settings are made in includes/config.php and you need to put the path to the forum and the information about the database.

The system is made for integration into a written site, there is no design for this I will not give a demo.


text:
ca
==

Purpose
-------

Cellular automata simulator in Python.

I created this for two personal purposes. One is to get insight in cellular
automata. The second is to have a reference model for hardware
implementations.

Installation
------------

You can install by cloning with `git clone`.

If you prefer not to use git, just download the source code directory as a zip file. After unzipping, make sure to rename the top-level directory to `ca`. This is because the code is implemented as a Python package, with `ca` as the top-level package name.

Usage
-----
At the top level in the `ca` directory, there are a number of games you can play using the Python interpreter. The easiest is to do this from the directory that has the `ca` directory. For example:

    python ca/fireworks.py

This should work without requiring changes to your `$PYTHONPATH`.

You can create your own games by subclassing the `generations` base class. See the existing games for examples.

Issues
------

Even though `Tkinter` is part of the standard Python library, you may have to install additional packages to make the gui work. This is because `Tkinter` is really an interface to `Tcl/Tk`, and these packages have to be installed also. On ubuntu, the following should work:

    sudo apt-get install tcl-dev tk-dev python-tk

Author
------
Jan Decaluwe 2012

repository: cordoval/ca

repo_name: cordoval/ca


text:
# Composing Features and Behaviours in the Elm Architecture

by Fred Daoud - foxdonut, [@foxdonut00](https://twitter.com/foxdonut00)

**New 2016-04-08**: [Part 5: Connecting With External JavaScript](https://github.com/foxdonut/adventures-reactive-web-dev/tree/elm-050-external-port/client-elm#connecting-with-external-javascript)

Questions as Github issues, and corrections or suggestions for improvement as Github pull requests,
are welcome.

## What is this article about?

I wrote this article out of wondering how to organize code that follows the Elm architecture. I
wanted to divide the code for parts of a page (call them components, sections, blocks, etc., I'll
call them features from here on out) into their own directories. I wanted each feature to be
independent of the others, but find a way for them to communicate information with each other.
Finally, I wanted to see if I could group some of these features together to assemble larger
features, while still keeping the same pattern of inter-feature communication.

I also did not want to reinvent the wheel, so I am not replacing `StartApp`. In fact, each feature
is built with `StartApp` and is itself an `App`. They are assembled together to form the final `App`
that is used in the top-level `Main`.

Some disclaimers: I only recently started learning Elm, and do not claim to be an expert.
Furthermore, I do not claim to have invented any of the ideas presented in this article. The purpose
is simply to put together what I feel are the best parts of what I have learned from
[The Elm Architecture](https://github.com/evancz/elm-architecture-tutorial/),
[Cycle.js](http://cycle.js.org/model-view-intent.html),
[RxJS](https://github.com/Reactive-Extensions/RxJS),
[Redux](http://redux.js.org/docs/introduction/ThreePrinciples.html), and others.

That being said, my goal is to explain an approach to organize Elm code into _features_, where each
feature is part of a page and is decoupled from other features, and to connect these features with
_behaviours_. Behaviours are "what happens next" during a View -> Action -> Signal -> Update -> View
cycle. Specifically, we want to be able to

- Create features: each feature should be self-contained and independent of other features.
- Chain events: _after this happens, that should happen next_.
- Connect features with signals: _after this happens, notify all other features that want to be notified_,
without needing to "know" what those other features are. Features react to events: _do something
when **this** happens_, without needing to "know" which feature made **this** happen.
- Build a large feature out of smaller features: useful to make a group of features reusable as a
whole, without having to re-create the group each time.
- Be able to connect to external JavaScript code and exchange data in both directions.

This will hopefully become clear when we dig into it and look at the code. What's important to know
before reading on is that I assume knowledge of The Elm Architecture, because I build on top of that
and will not go over the Elm Architecture itself. Please refer to
[The Elm Architecture](https://github.com/evancz/elm-architecture-tutorial/)
and [The Elm Tutorial](http://www.elm-tutorial.org/).

## Example Overview

I will use a simple Todo list application as an example. The application is on a single page, with a
list of todos and a form, allowing for creating, editing, and deleting todos. We'll add a summary at
the bottom which shows the total number of todos and the average priority. Finally, we'll add a
section at the top that shows the highest and lowest priority of the todo list.

<img src="images/todo-example.png" width="400"/>

The application is backed by a server that accepts requests, using JSON as the data exchange format.
The server is implemented with [Koa](http://koajs.com/). I won't go into the details of the server
implementation since it is not the focus of this article.

## Running the Application

The instructions to run the example application are the same as for all of the other examples, so
please follow the
[top level instructions](https://github.com/foxdonut/adventures-reactive-web-dev/tree/master#requirements).

## Article

The article is divided into five parts, each in a separate branch:

- [Part 1: Creating a Feature](https://github.com/foxdonut/adventures-reactive-web-dev/tree/elm-010-todolist-feature/client-elm#creating-a-feature)
- [Part 2: Connecting Features Together](https://github.com/foxdonut/adventures-reactive-web-dev/tree/elm-020-todoform-feature/client-elm#connecting-features-together)
- [Part 3: Multiple Listeners](https://github.com/foxdonut/adventures-reactive-web-dev/tree/elm-030-todosummary-feature/client-elm#multiple-listeners)
- [Part 4: Composing Features](https://github.com/foxdonut/adventures-reactive-web-dev/tree/elm-040-todominmax-feature/client-elm#composing-features)
- [Part 5: Connecting With External JavaScript](https://github.com/foxdonut/adventures-reactive-web-dev/tree/elm-050-external-port/client-elm#connecting-with-external-javascript)

The code in master is the same as in Part 4. (Not Part 5, because that is a demonstration of using
external JavaScript, but is not the main example.)

Questions as Github issues, and corrections or suggestions for improvement as Github pull requests, are welcome.

If you enjoy this article, consider [tweeting](https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Fgithub.com%2Ffoxdonut%2Fadventures-reactive-web-dev%2Ftree%2Fmaster%2Fclient-elm&text=Composing%20Features%20and%20Behaviours%20in%20the%20Elm%20Architecture&tw_p=tweetbutton&url=http%3A%2F%2Fgithub.com%2Ffoxdonut%2Fadventures-reactive-web-dev%2Ftree%2Fmaster%2Fclient-elm&via=foxdonut00) it to your followers.

repository: rrevanth/adventures-reactive-web-dev

repo_name: rrevanth/adventures-reactive-web-dev


text:
# Housing Project

Disputes between landlords and tenants often involve disorganized timelines and technical legal documents. Delays caused by a lack of legal knowledge before adjudicating bodies waste time and money.

We are building an interactive questionnaire that collects responses from a tenant with issues and evidence (fact pattern) and provides them with a document to provide to the relevant authority (landlord, tenant board, attorney, etc.). The questionnaire is guided by interviews conducted by the UofT Legal Hackers chapter with help from Downtown Legal Services (DLS) at the University of Toronto

## Running
- Download [Docker](https://docs.docker.com/install/).
- Install Docassemble using `docker run -d -p 80:80 -p 443:443 --env DAPYTHONVERSION=3 jhpyle/docassemble` (full documentation with troubleshooting can be found [here](https://docassemble.org/docs/docker.html)).
- At this point, you should be able to navigate to your localhost by opening either http://localhost or http://<IP_ADDRESS> in your browser. You should be presented with the Docassemble home page. If not, consult the troubleshooting section of the Docassemble documentation.
- Download this repository as a .zip file.
- Follow the instructions to setup the package from [Docassemble](https://docassemble.org/docs/packages.html#zip_install)

## Author

- William Boan<EMAIL_ADDRESS>- Govind Mohan<EMAIL_ADDRESS>


text:
---
layout: post
title: "Dynamic content caching based on attributes in Drupal 7"
subtitle: "Simple code to maximise your varnish hitrate"
excerpt: "Out of the box, Drupal 7 comes with the ability to set the global cache lifetime for all pages on the site, this often is not enough for complex sites."
header-img: "img/cache-attributes.jpg"
permalink: /article/dynamic-content-caching-based-on-attributes-in-drupal-7/
author: "Sean Hamlin"
categories:
- tutorial
tags:
- drupal
- drupalplanet
- performance
- caching
- varnish
---

Out of the box, Drupal 7 comes with the ability to set the global cache lifetime for all pages on the site. I find this works generally quite well with small sites with not a lot of content or complex caching requirements. Pantheon have a nice write up on the performance settings page that comes with Drupal 7 core and what each of the settings mean.

**N.B.** In this article I am assuming you are running some form of reverse proxy (e.g. varnish) in front of Drupal (most Drupal managed cloud vendors like Acquia or Pantheon provide varnish as a part of it's offering as standard).

## The problem with Drupal 7 core settings

What happens when you are running a large site, with a very long tail of content? All of a sudden running a global cache TTL of 10 minutes can result in a very poor hit rate in varnish. Having a poor hit rate in varnish ultimately means your web servers end up doing more work, which often leads to having to shell out for additional hardware.

Generally, faced with this issue, you have 2 options:

## 1) Varnish with purging

In this option, you set a global high cache TTL, so that all content lives in varnish for an excessively long time (say 12 hours), and when certain events occur (say a news article gets published), then purge requests occur telling varnish to drop certain URLs from it's cache. I don't want to go into detail to much on this, but I will say there are a number of drawbacks with this approach:

* When you publish 1 node, often this node can potentially appear on dozens of pages (e.g. on landing pages as a teaser, or in a view), this means the purge rules get overly complex in a hurry. If you ever re-architect a portion of the site, often this means hundreds of purge rules need to be rewritten and tested, this can be very costly.
* Running a CDN (e.g. Akamai, or Cloudflare) can complicate things further, as you need to purge varnish first, then the CDN *and never in the reverse order*, else the CDN will end up caching the stale content all over again
* Having exposed filters on the page means you will need to use bans in varnish (to utlise regex), this is another topic for another day
* All too often, content editors resort to *nuking the varnish cache from orbit* and dropping the whole lot when the rules do not function as desired. This is especially bad as it means all the content in there needs to be entirely rebuilt again. This can (and often does) take down busy sites when it occurs in production.

## 2) Varnish with intelligent cache TTLs

Another option to which I want to discuss in this blog post is around using the attributes of the node in order to determine at runtime how long this piece of content should be cached in varnish.

Attributes you can use to help you work out the most effective cache TTL:

* content type
* content created age (now - created)
* recency of most recent revision
* when the last comment was made
* current time of day
* any other attribute of the node

What do I mean by this? Well let's say you run a large digital media organisation, and publish hundreds of fresh news articles per day, but after a week or so, they generally get no edits done to them at all. Your cache TTL rules could be:

* if content type == 'news_article' then
* if age < 1 week, then the cache TTL inherits from the global configuration
* else if age > 1 week, then increase cache TTL to 1 week

This way, your new content is able to get upgrades quite promptly, and your long tail of older news articles have a massively inflated cache TTL, meaning your varnish server should really be able to help out here. It is important to note, that these rules apply at a node by node level, and can be made to suit your business requirements.

### Modules out there already

I had a look around on Drupal.org to see what others had done in this area in the past, I was genuinely surprised at the lack of modules in this area, here is a short summary:

* cacheexclude - used to exclude certain URLs from cache, kind of the opposite of what we want here.
* max_age - an (abandoned?) Drupal 6 module that aimed to provide different cache TTLs per content type in addition to the site wide default. This is close to what we want, there even is a patch to help port the module to Drupal 7.

### Example code

Rather than using any existing contrib modules, the code required to do what we want is very simple. Here is some simple custom code that can be used as a starting point for your code:

{% highlight php %}
<?php
/**
 * Implements hook_page_build().
 *
 * Responsible for setting the cache TTL based on the content attributes.
 */
function MYMODULE_page_build(&$page) {
  $node = menu_get_object('node');
  if (drupal_page_is_cacheable() && isset($node)) {
    $age_since_last_change = REQUEST_TIME - $node->changed;

    switch ($node->type) {
      case 'news_article' :
        // If the news article has not been edited in a week, then set the cache
        // TTL to a week.
        if ($age_since_last_change > 604800) {
          $max_age = 604800;
          drupal_add_http_header('Cache-Control', 'public,max-age=' . $max_age);
          drupal_add_http_header('Expires', gmdate(DATE_RFC1123, REQUEST_TIME + $max_age));
        }
        break;
    }
  }
}
?>
{% endhighlight %}

The above example is simple, but hopefully gives you a taste of what can be achieved with very little code.

### How to test your code

I have a few cURL aliases in my .bashrc that will come in handy if you do a lot of this type of thing:

{% highlight bash %}
# cURL
function curlh() { curl -sLIXGET "$@"; }
function curlc() { curl -sLIXGET "$@" | grep -E -i "^(Cache-Control|Age|Expires|Set-Cookie|X-Cache|X-Varnish|X-Hits|Vary)"; }
{% endhighlight %}

So if you are after all response headers you can:

{% highlight bash %}
$ curlh www.example.com
HTTP/1.1 200 OK
Accept-Ranges: bytes
Cache-Control: max-age=604800
Content-Type: text/html
Date: Sun, 06 Sep 2015 22:52:40 GMT
Etag: "359670651"
Expires: Sun, 13 Sep 2015 22:52:40 GMT
Last-Modified: Fri, 09 Aug 2013 23:54:35 GMT
Server: ECS (cpm/F9D5)
X-Cache: HIT
x-ec-custom-error: 1
Content-Length: 1270
Connection: Keep-Alive
Age: 2265
{% endhighlight %}

If you just want the relevant caching response headers:

{% highlight bash %}
$ curlc www.example.com
Cache-Control: max-age=604800
Expires: Sun, 13 Sep 2015 22:52:40 GMT
X-Cache: HIT
Age: 2249
{% endhighlight %}

### What this technique relies on

1. **Expectation setting** - you will need to ensure all content authors and stakeholders are aware what this means. If a really old news article is edited, there potentially will be lag before the changes are live.
1. **Enough RAM in varnish** to house all your objects. If you are RAM constrained, and are seeing a lot of evictions at present, then this technique will not have the impact you will want it to. You might be better to upsize varnish first, then look at this technique.

## Comments

I am keen to hear what other large websites do in the area, especially around multiple layers of external cache invalidation and/or if custom cache TTL headers are used. Also if you know of any other contrib modules that can help here, let me know.

gha_language: HTML


text:
[![banner](https://raw.githubusercontent.com/oceanprotocol/art/master/github/repo-banner%402x.png)](https://oceanprotocol.com)

Ocean Protocol Contracts

> 🐙 Smart contracts for Ocean Protocol v3

[![Build Status](https://travis-ci.com/oceanprotocol/ocean-contracts.svg?token=soMi2nNfCZq19zS1Rx4i&branch=master)](https://travis-ci.com/oceanprotocol/ocean-contracts)
 [![codecov](https://codecov.io/gh/oceanprotocol/contracts/branch/master/graph/badge.svg?token=31SZX1V4ZJ)](https://codecov.io/gh/oceanprotocol/contracts)

---

**This is in alpha state and you can expect running into problems. If you run into them, please open up a [new issue](/issues).**

---

A high level overview of OceanProtocol contracts:

![image](https://user-images.githubusercontent.com/5428661/92893688-31cbfa80-f41a-11ea-845c-2c94ecc978f1.png)

**Table of Contents**

- [Get Started](#get-started)
- [Usage](#usage)
  - [Local development](#local-development)
- [Testing](#testing)
- [Code Linting](#code-linting)
- [Networks](#networks)
  - [Testnets](#testnets)
- [Documentation](#documentation)
- [Contributing](#contributing)
- [Prior Art](#prior-art)
- [License](#license)

## Get Started

For quick installation of the contract `ABIs`:

```bash
npm i @oceanprotocol/contracts
```

### Usage
For more details about how to use ocean contracts, please refer to the quick start section in [ocean-lib-js](https://github.com/oceanprotocol/ocean-lib-js#-quick-start) and [ocean-lib-py](https://github.com/oceanprotocol/ocean-lib-py#quickstart).

### Local development

For local development of the `contracts` setup the development environment on your machine as follows:

As a pre-requisite, you need:

- Node.js v12+
- npm

Clone the project and install all dependencies:

```bash
git clone git@github.com:oceanprotocol/ocean-contracts.git
cd ocean-contracts/

# install packages
npm i

# to compile contracts
npm run compile
```

## Testing

Run tests with

```bash
# for unit tests
npm run test:unit

# for test coverage
npm run test:cover
```

## Code Linting

Linting is setup for `JavaScript` with [ESLint](https://eslint.org) & Solidity with [Ethlint](https://github.com/duaraghav8/Ethlint).

```bash
# to check lint issues
npm run lint
```

Code style is enforced through the CI test process, builds will fail if there're any linting errors.

## Networks

### Testnets

For local development, start a local testnet using `ganache-cli`, then run:

```bash
npm run deploy
```

Or depoly ocean-contracts on `rinkeby` network as follows:
```
export MNEMONIC='YOUR MNEMONIC SHOULD BE HERE'
# If you are using remote test or main net using Infura
export INFURA_TOKEN='GET INFURA_TOKEN FROM INFURA PLATFORM'
npm run deploy:rinkeby
```
After the deployment, check out the [address.json](artifacts/address.json) file containing the deployed contracts addresses.

Checkout the supported deployment(s) on these [networks](docs/README.md#deployments).

## Documentation

To use generate documentation via `solidity-docgen` please run:

```bash
npm run doc:generate
```

* [Release Process](docs/RELEASE_PROCESS.md)
* [Core Documentation](docs/contracts)

## Contributing

See the page titled "[Ways to Contribute](https://docs.oceanprotocol.com/concepts/contributing/)" in the Ocean Protocol documentation.

## Prior Art

This project builds on top of the work done in open source projects:
- [OpenZeppelin/openzeppelin-contracts](https://github.com/OpenZeppelin/openzeppelin-contracts)

## License

```
Copyright 2020 Ocean Protocol Foundation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```


text:
![Express API Boilerplate](https://i.imgur.com/P0ug3Qc.png)
#
[![Known Vulnerabilities](https://snyk.io/test/github/gagepielsticker/Express-API-Boilerplate/badge.svg)](https://snyk.io/test/github/gagepielsticker/Express-API-Boilerplate/)
[![License](https://img.shields.io/badge/license-MIT-green)](https://github.com/GagePielsticker/Express-API-Boilerplate/blob/master/LICENSE.md)
[![Build Status](https://travis-ci.org/GagePielsticker/Express-API-Boilerplate.svg?branch=master)](https://travis-ci.org/GagePielsticker/Express-API-Boilerplate)
![GitHub last commit](https://img.shields.io/github/last-commit/gagepielsticker/Express-API-Boilerplate)

## Foreword

This is a boilerplate to help quickly throw up "internal use / private" style semi-secure REST api's. It comes packaged with Mongoose, express, helmet, and a whole host of security features. All of this can be configured in the settings file located in `src/settings/api_settings.json`.

This does not garuntee complete and utter security. This is just a simple boilerplate to throw up a **semi-secure** api. To achieve absolute security you must take several steps outside of this code such as server hardening, reverse proxies, firewall rules, and many other things. This is strictly a boilerplate if you want to quickly throw up api's without necessarily having to worry about immediate security vulnerabilities presented in express apps.

## Security offered
- HelmetJS middleware security for headers which includes these enabled defaultly
- - ContentSecurityPolicy
- - dnsPrefetchControl
- - expectCt
- - frameguard
- - hidePoweredBy
- - hsts
- - ieNoOpen
- - noSniff
- - PermittedCrossDomainPolicies
- - referrerPolic
- - xssFilter
- Key authentication if used by private seperate application (optional)
- Packaged with an express-validator in the routes to validate params
- XSS filter middleware to sanitize req.body, req.query, and req.params as well as manual filtration.
- Time based attack protection on the private key
- HaProxy loadbalancing if utilizing docker

## Running
To use this download and extract files as normal and navigate to the root folder (not src). Then type `npm i` in console to install the dependencies. Once they are installed you will want to run the app through the `npm start` script.

Alternatively you can run the `docker-compose up` script to utilize haproxy loadbalancing & containers.

## Dependencies
- Express (main framework)
- Helmet (some header protection/safe defaults)
- xss-clean (xss filtration)
- Express-validator (route data validating)
- Mongoose (databasing)
- safe-compare (time based comparison protection)

## Dev-Dependencies
- Jest (unit testing framework)

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

All code must follow standardjs principles. Keep documentation thorough as well.

![GitHub stars](https://img.shields.io/github/stars/gagepielsticker/Express-API-Boilerplate?style=social)
![GitHub followers](https://img.shields.io/github/followers/gagepielsticker?style=social)

repository: Karbust/Express-API-Boilerplate

repo_name: Karbust/Express-API-Boilerplate


text:
# Change Log

## 2.2.2

- [NEW] Fix import snippet (thanks [@ww-michael](https://github.com/ww-michael))

## 2.2.1

- [NEW] Fix README badge

## 2.2.0

- [NEW] Add dashboard snippet (thanks [@ww-michael](https://github.com/ww-michael))
- [NEW] Add import snippet
- [NEW] Add ipdb snippet
- [NEW] Add chatter snippet
- [NEW] Add return action snippets
- [IMP] Improve models and views snippets using regex

## 2.1.0

- [NEW] Add self.user.company_id snippet
- [NEW] Add if-else snippet
- [NEW] Add elif snippet

## 2.0.0

- [NEW] Add odoo snippet
- [NEW] Add group snippet
- [NEW] Add TransientModel snippet
- [IMP] Simplify 'data' tag snippet
- [NEW] Add report template tags (t-if, t-call, t-foreach, t-field e etc)
- [NEW] Add github action support
- [DEL] Remove travisci support
- [IMP] Update contributing instructions and README info
- [NEW] Add new logo

## 1.0.1

- [IMP] Improve README

## 1.0.0

- [NEW] Add constrain method snippet (thanks [@elmerdpadilla](https://github.com/elmerdpadilla))
- [FIX] HTML to Html field constructor (thanks [@oscars8a](https://github.com/oscars8a))

## 0.9.0

- [NEW] Add unlink method snippet
- [FIX] early close data tag (thanks [@oscars8a](https://github.com/oscars8a))
- [IMP] Add XML version tag (thanks [@oscars8a](https://github.com/oscars8a))

## 0.8.0

- [FIX] Fix string paramter of Selection field snippet
- [NEW] Add 'data' tag snippet
- [NEW] Add 'statusbar' snippet
- [IMP] Improve README

## 0.7.1

- [FIX] Fix api.multi in snippet of write method

## 0.7.0

- [NEW] Add field snippets
- [FIX] Fix tag in 'oxpathattr'

## 0.6.1

- [FIX] Remove 'required' tag from fields
- [FIX] Fix type of field Text snippet
- [FIX] Fix type of field Selection snippet

## 0.6.0

- [NEW] Add xpath attributes snippets
- [IMP] Move '@' to outside xpath snippet variable
- [NEW] Add graph and graph inherit views snippets
- [FIX] Fix name tag value in tree view snippet
- [FIX] Fix name tag in search view snippets
- [IMP] Simplify tree, form, search and graph views
- [NEW] Add pivot and pivot inherit views snippets
- [NEW] Add kanban and kanban inherit views snippets
- [NEW] Add calendar and calendar inherit views snippets
- [NEW] Add gantt and gantt inherit views snippets
- [FIX] Fix onchange description on README

## 0.5.0

- [NEW] Add button box snippet
- [NEW] Add button snippet
- [FIX] Remove tag '<sheet>' from inherit tree snippet
- [NEW] Add search and search inherit views

## 0.4.0

- [NEW] Add ir cron snippet
- [NEW] Add menu action snippet
- [NEW] Add menu categoty snippet
- [NEW] Add menu root snippet
- [NEW] Add notebook page snippets
- [NEW] Add notebook snippet
- [NEW] Add ir.action.act_window snippets
- [IMP] Update install instruction

## 0.3.0

- [NEW] Add snippets to method create, write, compute and onchange.

## 0.2.2

- [FIX] XML snippets not working.

## 0.2.1
- [NEW] Add line in all Python snippets.

## 0.2.0

- [NEW] Form (new and inherit) XML snippets.
- [NEW] Tree (new and inherit) XML snippets.
- [NEW] Xpath XML snippet.
- [IMP] Snippets name of model and relational fields.

## 0.1.1

- [FIX] Fix Many2one, many2many and one2many parameter.
- [FIX] Fix Snippets of some fields.

## 0.1.0

- Initial release.

repository: mstuttgart/vscode-odoo-snippets

repo_name: mstuttgart/vscode-odoo-snippets


text:
# ember-cli-polymer-toolchain
Ember CLI Toolchain for Polymer 1.X

##Installation locally

In this project's directory make available via npm:
```
npm link
```

In parent app's directory link package:
```
npm link ember-cli-polymer-toolchain
```

Install additional packages in parent app via bower:
```
bower install --save Polymer/polymer
bower install --save webcomponentsjs
```

repository: kategengler/ember-cli-polymer-toolchain

branch_name: refs/heads/develop

repo_name: kategengler/ember-cli-polymer-toolchain


text:
# monashunited.com.au

[![build_status](https://github.com/monashunited/monashunited.com.au/workflows/ci/badge.svg)](https://github.com/monashunited/monashunited.com.au/actions?workflow=ci)
[![github license](https://img.shields.io/github/license/monashunited/monashunited.com.au)](https://github.com/monashunited/monashunited.com.au)
[![github issues](https://img.shields.io/github/issues/monashunited/monashunited.com.au)](https://github.com/monashunited/monashunited.com.au)
[![github last commit](https://img.shields.io/github/last-commit/monashunited/monashunited.com.au)](https://github.com/monashunited/monashunited.com.au)
[![github repo size](https://img.shields.io/github/repo-size/monashunited/monashunited.com.au)](https://github.com/monashunited/monashunited.com.au)

Project site project updates and knowledge articles.

## Markdown Cheatsheet

When creating pages in this repo use the markdown syntax, you can find syntax here:

* [Markdown Cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet)

## Icons

Icons can be selected form here [Fontawesome](http://fontawesome.io/icons/)

## Getting Started

* setup ```ruby```

* install dependecies run

```bash
./install.sh
```

* run server while editing

```bash
./serve.sh
```

### On Windows

On windows, for best results use docker for everything.

```powershell
#POWERSHELL
docker run -it --rm -p 4000:4000 -p 35729:35729 -v ${pwd}:/build/source:rw aemdesign/centos-java-buildpack bash --login

cd source/
rvm install "ruby-2.6.3"
gem install jekyll bundler jemoji nokogiri -n /usr/local/bin
bundle install
bundle exec jekyll serve --host <IP_ADDRESS> --livereload --force_polling

```

## Google Ads

Config is located in `_data/advertising.yml` html should not need to be changed and located in `_includes/adds/adsense.html`

## Project Structure Description

Following is the description of important sections in the project.

* `assets` - folder for all assets that appear on the site
* `_posts` - location for all Blog posts, add your markdown here and create a subfolder in `assests` for all your images etc
* `_layouts` - templates for pages
* `_pages` - admin pages for site
* `_data` - data config for page modules
* `_config.yml` - primary config for whole site

Additional Notes

* all items with `_` (underscore) are essentially hidden.
* to add new sections and items to navigation `_config.yml` and `_data/navigation.yml` should be updated

## Dev Notes

### Ports

update `dev.port` and `dev-livereload.port` with ports you want to run dev server.


text:
# Reproduction of traefik `Database sync error`

## Summary

This setup is:

- GKE (Kubernetes)
- Consul (3 replicas)
- Traefik (1 replica) + Let's encrypt ACME using `gcloud` dns + dashboard
- Hello world app
- Ingresses for hello and traefik https urls

Traefik is almost but not quite HA in this setup - I started reproducing the `Database sync error` noted in https://github.com/containous/traefik/issues/3487 so I stopped to reproduce.

## Prerequisites

1. Setup a GCP account
1. `gcloud auth login`
1. Setup a domain in gcloud dns with your domain configured
1. Edit `environments/foo/.env` and set the `DOMAIN` and `GOOGLE_CLOUD_PROJECT`
1. Setup a terminal window with `. ./use foo`
1. Create the cluster with

```bash
./scripts/cluster/create
./scripts/cluster/create-namespace
./scripts/cluster/switch
```

## Manually created cluster resources

### Consul secret

1. install consul locally on the PATH from https://www.consul.io/downloads.html
2. `consul keygen`
3. add `CONSUL_GOSSIP_KEY=xx` to `~/.gcp/${GOOGLE_CLOUD_PROJECT}/production.env`
4. run `./components/consul/scripts/secret`

### Traefik resources

1. run `./components/traefik/scripts/service-account`
1. run `./components/traefik/scripts/key`
1. run `./components/traefik/scripts/secret`
1. run `./components/traefik/scripts/secret-dashboard`
1. run `./components/traefik/scripts/reserve-ip`
1. Get reserved ip and replace `manifest.yml` `<IP_ADDRESS>` with your ip

## Apply the manifest

```
kubectl apply -f manifest.yml
```

## Post-setup Traefik notes

When bootstrapping, a number of things will happen and traefik will not be running properly.

1. `consul` must be up and running before job can complete
1. `traefik-storeconfig` job must complete before traefik can run successfully
1. `traefik` will start, but it won't be in a good state. Delete the traefik pod to let it restart
1. Try some urls including hello and traefik. This is the part where you are going to see:

```bash
time="2018-08-21T19:02:24Z" level=error msg="Datastore sync error: Object lock value: expected 7ff59879-849a-436b-bb9d-cfdc36658806, got 83e91690-cf4d-40c8-b3ff-6275da8b4ab8, retrying in 364.9962ms"
```

1. Try deleting the traefik pod - you will likely see the same error.
1. After an _extended_ period of time, you will stop getting a default cert error and get a _valid_ (we are using the staging server):

```
NET::ERR_CERT_AUTHORITY_INVALID
Subject: hello.foo.com

Issuer: Fake LE Intermediate X1
```

## TL;DR

We are getting `Datastore sync error` consistently when bootstrapping a new Traefik with a key value store. Deleting the pod will only increase the backoff in the log message from 300s to 500s (it seems).

## Structure

We use ksonnet, so it was easiest to setup this reproduction similarly. This reproduction does not use ksonnet, but the `manifest.yml` was generated locally from my real ksonnet resources for consul, traefik, and hello world.


text:
# MultiRangeSliderView

MultiRangeSliderView is a MultiSliderView with some added functionality. It is intented to be used as a sample-portion-specifier tool when overlayed on top of for example a SoundFileView.

* ThumbLength can be set individually per slider. Controllable by holding **shift**.
* Each slider has a startRange-maximum. Controllable by holding **ctrl**.
* Each slider has a endRange-minimum. Controllable by holding **alt**.
* All values are readable by getting the sliders array variable.
* use .sliderValues_([0.3,0.5,0.9]) to make new sliders.

## TODO:

* Make support for vertical flow style.
* Include more setters and getters

repository: JoeriBultheel/MultiRangeSliderView

repo_name: JoeriBultheel/MultiRangeSliderView


text:
# Release Notes for PoshSemanticVersion

All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/) for
official project tracking. For technical reasons, the module version
number cannot be expressed using Semantic Versioning.

## 1.4.0 - 2017-12-03
### Features
- Added aliases for exported commands
- Added alias properties "PreReleaseLabel" and "BuildLabel" to match PowerShell v6.x native SemanticVersion type.

## 1.3.0 - 2017-11-12
### Features
- Compare-SemanticVersion now takes pipeline input.
- Improved feedback messages provided by Test-SemanticVersion when using -Verbose.
- Improved error messages on all functions.

### Fixes
- New-SemanticVersion: multiple objects can now be piped to this function.

### Deprecated
- Compare-SemanticVersion: The "AreCompatible" property is now an alias to "IsCompatible". The "AreCompatible"
  property will be removed when the next major version of this module is released.

## 1.2.0 - 2017-11-01
### Features
- Test-SemanticVersion provides useful feedback messages if a Semantic Version is invalid and the -Verbose switch
  is used.

### Fixes
- Test-SemanticVersion correctly accepts pipeline input of more than one string.

## 1.1.0 - 2017-10-30
### Features
- Step-SemanticVersion can increment prerelease and build using optional label parameter.

## 1.0.0 - 2017-10-10
### Features
- New-SemanticVersion: Creates a new semantic version.
- Test-SemanticVersion: Test if a input value is a valid semantic version string.
- Compare-SemanticVersion: Compare two semantic versions to determine precedence.
- Step-SemanticVersion: Increment a semantic version number based on a type of change.

repository: mvromer/PoshSemanticVersion

repo_name: mvromer/PoshSemanticVersion


text:
# \TasksApi

All URIs are relative to *http://localhost/__api__*

Method | HTTP request | Description
------------- | ------------- | -------------
[**GetTask**](TasksApi.md#GetTask) | **Get** /v1/experimental/tasks/{id} | Get task details

## GetTask

> Task GetTask(ctx, id).First(first).Wait(wait).Execute()

Get task details

### Example

```go
package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    id := "id_example" // string | The identifier of the desired task.
    first := int32(56) // int32 | The first line of output to include in the response. The value `0` indicates that all lines should be returned.  Values less than `0` are not permitted. Values greater than the total number of lines produced by the task are not permitted.  (optional) (default to 0)
    wait := int32(56) // int32 | The number of seconds to wait for task completion before responding. The current state of the task is returned once the task completes or this time elapses.  Values less than `0` or greater than `20` are not permitted.  (optional) (default to 0)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.TasksApi.GetTask(context.Background(), id).First(first).Wait(wait).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TasksApi.GetTask``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetTask`: Task
    fmt.Fprintf(os.Stdout, "Response from `TasksApi.GetTask`: %v\n", resp)
}
```

### Path Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string** | The identifier of the desired task.  |

### Other Parameters

Other parameters are passed through a pointer to a apiGetTaskRequest struct via the builder pattern

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------

 **first** | **int32** | The first line of output to include in the response. The value `0` indicates that all lines should be returned.  Values less than `0` are not permitted. Values greater than the total number of lines produced by the task are not permitted.  | [default to 0]
 **wait** | **int32** | The number of seconds to wait for task completion before responding. The current state of the task is returned once the task completes or this time elapses.  Values less than `0` or greater than `20` are not permitted.  | [default to 0]

### Return type

[**Task**](Task.md)

### Authorization

[apiKey](../README.md#apiKey)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)

repository: shmileee/rstudio-connect-api-client-go

repo_name: shmileee/rstudio-connect-api-client-go