text:
---
layout: post
title:      "Sql Lite with Java's ORM Hibernate"
date:       2021-07-08 17:33:32 -0400
permalink:  sql_lite_with_javas_orm_hibernate
---

Following ought to give an idea how grateful the ROR people (& others using EOF/WO or other OO languages) must be to not have to deal with this.

Following is the [source folder](https://github.com/mrarthurwhite/SqlLiteWJavaORMDemo) rather elaborate directory structure for the simplest database connection & create, update, read call:

![directory structure](https://mrarthurwhite.github.io/SqlLiteWJavaORMDemo/img/directory_structure.jpg)

If you look at the github repo above here are some important files that go into making this connection with the db. Firstly the configuration file (`hibernate.cfg.xml`):

```
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
 "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
 "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
	<session-factory>
		<!-- Database connection settings -->
		<!-- https://www.srccodes.com/annotation-based-hibernate-hello-world-example-using-maven-build-tool-and-sqlite-database/ -->
		<property name="connection.driver_class">org.sqlite.JDBC</property>
		<!-- Following should create a test database in your present directory -->
		<property name="connection.url">jdbc:sqlite:./db/test.db</property>
		<property name="connection.username"></property>
		<property name="connection.password"></property>
		<!-- JDBC connection pool (use the built-in) -->
		<property name="connection.pool_size">1</property>

		<!-- SQL dialect : https://gist.github.com/rppowell-lasfs/f0e3b2d18c3be03ada38a3e367eaf1b8 -->
		<property name="dialect">org.hibernate.dialect.SQLiteDialect</property>

		<!-- Enable Hibernate's automatic session context management -->
		<property name="current_session_context_class">thread</property>

		<!-- Disable the second-level cache -->
		<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>

		<!-- Echo all executed SQL to stdout -->
		<property name="show_sql">true</property>

		<!-- Drop and re-create the database schema on startup -->
		<property name="hbm2ddl.auto">update</property>

		<!-- Mapping files -->
		<mapping resource="user.hbm.xml" />

	</session-factory>
</hibernate-configuration>
```

As can be seen from above that is just the configuration file listing the connection with the db, the driver and the `sql lite dialect`. This is just one line in a file in ROR.

There is then the mapping file (something ROR developers may never have to deal with (`user.hbml.xml`).

```
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>
	<class name="com.test.db.model.User" table="users">
		<id name="userid" type="int" column="userid">
			<generator class="increment" />
		</id>
		<property name="firstName">
			<column name="firstname" />
		</property>
	</class>
</hibernate-mapping>

```

If you make an error in any of the xml file the IDE is unlikely to find it at compile time but you will get a large chunk of red error messages in the console at run time (oh the wonders of using "enterprise development tools"). Explaning the boiler plate code and its various options may take several pages but most of it is required .

Then there is the model file filled with more boilerplate & getters & setters at that (this may be familiar and is usually a few lines of code with some validation relationship definitions) `user.java`:
```
package com.test.db.model;

public class User {

	private int userid;
	private String firstName;

	public int getUserid() {
		return userid;
	}
	public void setUserid(int userid) {
		this.userid = userid;
	}
	public String getFirstName() {
		return firstName;
	}
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}
	@Override
	public String toString() {
		return "User [userid=" + userid + ", firstName=" + firstName
				+  "]";
	}

}
```

Now comes the "data access object" or the DAO layer which does the DB accessing within transactions and session objects (outside of it gives errors), again something unfamiliar to most ROR folk who do not have to deal with this:

`UserDAO.java`

```
package com.test.db.dao;
import java.util.ArrayList;
import java.util.List;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.Transaction;
import com.test.db.model.User;
import com.test.db.util.HibernateUtil;

public class UserDao {

	public void addUser(User user) {
		Transaction trns = null;
		Session session = HibernateUtil.getSessionFactory().openSession();
		try {
			trns = session.beginTransaction();
			session.save(user);
			session.getTransaction().commit();
		} catch (RuntimeException e) {
			if (trns != null) {
				trns.rollback();
			}
			e.printStackTrace();
		} finally {
			session.flush();
			session.close();
		}
	}

	public void deleteUser(int userid) {
		Transaction trns = null;
		Session session = HibernateUtil.getSessionFactory().openSession();
		try {
			trns = session.beginTransaction();
			User user = (User) session.load(User.class, new Integer(userid));
			session.delete(user);
			session.getTransaction().commit();
		} catch (RuntimeException e) {
			if (trns != null) {
				trns.rollback();
			}
			e.printStackTrace();
		} finally {
			session.flush();
			session.close();
		}
	}

	public void updateUser(User user) {
		Transaction trns = null;
		Session session = HibernateUtil.getSessionFactory().openSession();
		try {
			trns = session.beginTransaction();
			session.update(user);
			session.getTransaction().commit();
		} catch (RuntimeException e) {
			if (trns != null) {
				trns.rollback();
			}
			e.printStackTrace();
		} finally {
			session.flush();
			session.close();
		}
	}

	public List<User> getAllUsers() {
		List<User> users = new ArrayList<User>();
		Transaction trns = null;
		Session session = HibernateUtil.getSessionFactory().openSession();
		try {
			trns = session.beginTransaction();
			users = session.createQuery("from User").list();
		} catch (RuntimeException e) {
			e.printStackTrace();
		} finally {
			session.flush();
			session.close();
		}
		return users;
	}

	public User getUserById(int userid) {
		User user = null;
		Transaction trns = null;
		Session session = HibernateUtil.getSessionFactory().openSession();
		try {
			trns = session.beginTransaction();
			String queryString = "from User where id = :id";
			Query query = session.createQuery(queryString);
			query.setInteger("id", userid);
			user = (User) query.uniqueResult();
		} catch (RuntimeException e) {
			e.printStackTrace();
		} finally {
			session.flush();
			session.close();
		}
		return user;
	}
}

```

The above is taken care of by the various `active records` methods. I was going to skip the `HibernateUtils.java` because you may view it in the repo and in the previous posts but then I may as well include it after tormenting you with all the above, its purpose is to make creating of a `hibernate session` object easier:

```
package com.test.db.util;

import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public class HibernateUtil {
	private static final SessionFactory sessionFactory = buildSessionFactory();

	private static SessionFactory buildSessionFactory() {
		try {
			// Create the SessionFactory from hibernate.cfg.xml
			return new Configuration().configure().buildSessionFactory();
		} catch (Throwable ex) {
			// Make sure you log the exception, as it might be swallowed
			System.err.println("Initial SessionFactory creation failed." + ex);
			throw new ExceptionInInitializerError(ex);
		}
	}

	public static SessionFactory getSessionFactory() {
		return sessionFactory;
	}
}

```
Anyways all of the above to get one record inserted so:

![contents of db](https://mrarthurwhite.github.io/SqlLiteWJavaORMDemo/img/db_contents.jpg)

And the above is done with the following business logic:
```
package com.test.db;

import com.test.db.dao.UserDao;
import com.test.db.model.User;
public class App {

	public static void main(String[] args) {
		UserDao dao = new UserDao();
		// Add new user
		User user = new User();
		user.setFirstName("Arthur");
		dao.addUser(user);
}

```

Readers might be wondering why go through all the trouble of an ORM ? Does it defeat the purpose of having an ORM if there are so many moving parts increasing the propensity for errors? Why write  a hundred lines of boilerplate code for 2/3 lines of creating a record? These questions may not occur to an ROR developer who truly creates little boilerplate but focuses more on the business logic.

The following attempts a many to many relationship with another table entity (addresses).

The repo is here [src](https://github.com/mrarthurwhite/JavaORMwInMemoryDBM2M).

For many-to-many relationship we have users with multiple addresses and each address having multiple users.

The following is the schema of the DB: `USER <->> USER_ADDRESS<<-> ADDRESS`

Following is the outline for more detail:
USER               USER_ADDRESS                ADDRESS
USER_ID    <->>  [USER_ID, ADDRESS_ID]  <<->   ADDRESS_ID

The directory structure is similar except for a few more files:
![file directory structure]( https://mrarthurwhite.github.io/JavaORMwInMemoryDBM2M/imgs/directory_structure.jpg)

The `App.java` file is what makes the calls to the entities:
```
package com.test.db;

import java.util.HashSet;
import java.util.Set;

import com.test.db.dao.UserDao;
import com.test.db.model.User;
import com.test.db.model.Address;
public class App {

	public static void main(String[] args) {
		UserDao userDao = new UserDao();
		// Create new user
		User user = new User();
			user.setFirstName("Arthur");
		// Create addresses
			Set<Address> addresses = new HashSet<Address>();
			addresses.add(new Address("1 Prosperity Lane, Bergen, Norway"));
			addresses.add(new Address("1 Success Dr, London, UK"));
			addresses.add(new Address("1 Victory Lane, Zurich, Switzerland"));
		user.setAddresses(addresses);
		// add the user to the DB
		userDao.addUser(user);

		// Get all users
		 userDao.printAllUsers();

	}
}
```

Following is the addition & difference in the `UserDAO.java` because all transactions with the DB have to be enclosed in the session & try catch block:
```

	public List<User> printAllUsers(){
		List<User> allUsers = new ArrayList<User>();
		Transaction trns = null;
		Session session = HibernateUtil.getSessionFactory().openSession();
		try {
			trns = session.beginTransaction();
			// the typical "from Employee" does not seem to be working
			Criteria c = session.createCriteria(User.class);
			Criterion c1 = (Restrictions.like("firstName", "%"));
			c.add(c1);
			allUsers = c.list();
			System.out.println( getUsersAddresses(allUsers) );
		} catch (RuntimeException e) {
			e.printStackTrace();
		} finally {
			session.flush();
			session.close();
		}
		return allUsers;

	}

	private String getUsersAddresses( List<User> users) {
		String list_of_users_w_addresses = "";
		User user ;
		Address addy;
		for (int i = 0 ; i < users.size();i++) {
			user = users.get(i);
			list_of_users_w_addresses = list_of_users_w_addresses + user.toString();
			Set<Address> addys = user.getAddresses();
			Iterator addyIt = addys.iterator();
			while (addyIt.hasNext()){
				addy = (Address) addyIt.next();
				list_of_users_w_addresses = list_of_users_w_addresses + " " +addy + "\n";
			}
		}
		return list_of_users_w_addresses;
	}
```

The mapping file  `address.hbm.xml` :
```
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
	"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
	"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>

<class name="com.test.db.model.Address" table="ADDRESS">
	<meta attribute="class-description">
		This class contains address details.
	</meta>
	<id name="addressId" type="long" column="ADDRESS_ID">
		<generator class="native"/>
	</id>
	<property name="address" type="string" column="address"/>

	 <set name="users" table="USER_ADDRESS" cascade="all">
            <key column="ADDRESS_ID" />
            <many-to-many column="USER_ID"  class="com.test.db.model.User" />
     </set>

</class>

</hibernate-mapping>
```

And then `user.hbm.xml`:

```
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>
	<class name="com.test.db.model.User" table="USERS">
		<id name="userid" type="int" column="userid">
			<generator class="increment" />
		</id>
		<property name="firstName">
			<column name="firstname" />
		</property>

		<set name="addresses" table="USER_ADDRESS" cascade="all">
            <key column="USER_ID" />
            <many-to-many column="ADDRESS_ID"  class="com.test.db.model.Address" />
        </set>
	</class>
</hibernate-mapping>
```

Following is the console output :
![console output ]( https://mrarthurwhite.github.io/JavaORMwInMemoryDBM2M/imgs/console_output.jpg)

And following are the screenshots from the database:
![users ]( https://mrarthurwhite.github.io/JavaORMwInMemoryDBM2M/imgs/users.jpg)

![user_address ]( https://mrarthurwhite.github.io/JavaORMwInMemoryDBM2M/imgs/user_address.jpg)

![addresses]( https://mrarthurwhite.github.io/JavaORMwInMemoryDBM2M/imgs/addresses.jpg)

extension: markdown


text:
---
id: cli
title: CLI
sidebar_label: CLI
---

To get all options for the CLI use `themis --help`.

## Usage
Themis takes a space separated set of paths to modules and options.

### `-c, --config [configPath]`
Load a [config file](./config-file).

### `--strategy [mergeStrategy]`
Path to a node module exposing a merge strategy. Read more about merge strategies [here](./merge-strategy).

### `-b, --build`
Fetch the introspection schemas for remote modules and store the locally with the module. Locally stored schemas will then be used at startup to derive the remote executable schema from.

### `--pretty`
When fetching remote schemas they can be formatted to check them into SCM and track changes in the schemas more easily.

### `-t, --test`
Run the tests in the current working directory (cwd) with jest and nock, by default matching tests with `*.(test|spec).jsx?` or in a `__tests__` folder.

### `-m, --mock`
Will add mock resolver functions with the `mocks` object exported from a module.

### `-n, --nock`
Run in `nock mode` to replay recorded external requests by modules on a per query basis.

### `-r, --record`
Use with `--nock --record` to record all external requests made by modules during a query. This can be used for offline development or testing.

license: MIT

repository: spring-media/themis-graphql

branch_name: refs/heads/master

extension: md

gha_language: JavaScript

gha_license_id: MIT

license_type: permissive

repo_name: spring-media/themis-graphql


text:
---
layout: post
title: "DIY RC Receiver (Serial PPM)"
date: 2012-08-02 17:43
comments: true
categories: [Electronics, Multirotor, Arduino, Radio]
---

When I was first getting into multirotors, I didn't have an RC transmitter and receiver pair to control a quadcopter with. But I *did* have a couple [XBees](https://www.sparkfun.com/products/8664) and a [Saitek PC USB Joystick](http://www.amazon.com/gp/product/B0000AW9RE/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=B0000AW9RE&linkCode=as2&tag=appdelinc-20). So, I made my own RC setup and I'll show you how.

{% youtube wR0TUg2AFl8 %}

# History

## Mark I: Initial Prototype

My first version was very rudimentary. It was an XBee Series 1 and an Arduino nano on the quadcopter side and on the computer side was the joystick, an [FTDI Basic](https://www.sparkfun.com/products/9716) and another XBee. The Ardunio nano was running a simple sketch which took serial commands in the form of 6 bytes in the range of 0-250 and a terminator byte, 254. The sketch interprets each of the first 6 bytes as a value to output on one pin, using the Arduino Servo library. To test it out, I plugged 6 servos into their respective pins and moved the joystick around and pushed buttons.

## Mark II: Out of range kill switch

The biggest thing I was worried about was stepping on the gas and my quadcopter flying out of range and then off forever, to be found by highway workers, or worse -- seeing on the news that "some mysterious device fell out of the sky and hit an unsuspecting person in the face". So, I added some code to check if the receiver has gotten an update in the last two seconds, and if not, kill the throttle and disarm. It was originally written to auto-land, but I felt that it was too dangerous for both bystanders and the quad itself to have the motors (with *blades*!) spinning for ~20 seconds after control has been lost.

## Mark III: Sum PPM

While chatting with some fellas and gals in the freenode #multiwii channel and I heard about "Sum PPM", also known as "Serial PPM". It's a version of [Pulse Position Modulation](http://en.wikipedia.org/wiki/Pulse-position_modulation), the PWM protocol used to control a servo. The length of a pulse (how long the line is high) determines the servo's position. The range is 1000 microseconds to 2000 microseconds. Which degrees the servo points to for each value is determined by whether it's a 180° servo, or a 360° model.

Sum PPM squeeze all of the channels onto one wire instead of one wire for each channel. The first pulse will be for the first channel, the second pulse for the second channel and so on. It knows which channel is which, by having an extra long pulse of 5000 or more microseconds after all the channels have pulsed. The pulse following the long "sync" pulse is channel 0. So a full datagram for 4 channels may look something like this:

    __-- 1000µs --___-- 1200µs --___-- 2000µs --___-- 1500µs --___-- 5100µs --__

The other big difference in this revision is I bought an [Arduino pro mini](https://www.sparkfun.com/products/11113) and soldered it directly to an [XBee breakout board](https://www.sparkfun.com/products/9132). This reduced the size by about 4x.

## Mark IV: Deadbug

I thought this would be the final version. I have a bunch of DIP ATmega328 chips, so I decided to solder one up [deadbug](http://en.wikipedia.org/wiki/Point-to-point_construction)-style. It worked great and was much smaller than an Arduino Nano, but looked like... well, a dead bug! It just kinda hung there inline with the wires and there wasn't really a nice way to keep it attached to the frame besides a rubber band. I also globbed it with hot glue to strengthen the connections and prevent shorts.

![Deadbug](https://github.com/mattwilliamson/aimatt.com/raw/gh-pages/images/posts/ppm-receiver/deadbug.jpg)

## Mark V: Yes, this many revisions!

The major difference here is that I decided to switch to using a [Roving Networks RN-XV Wifly Module](https://www.sparkfun.com/products/10822). It fits in an XBee footprint which means I don't have to change my receiver at all and I don't need the XBee or the FTDI adapter on the laptop. Wifi has similar range to a Series 1 XBee anyway.

Here's what the current model looks like:

![Receiver Top](https://github.com/mattwilliamson/aimatt.com/raw/gh-pages/images/posts/ppm-receiver/top.jpg)

![Receiver Bottom](https://github.com/mattwilliamson/aimatt.com/raw/gh-pages/images/posts/ppm-receiver/bottom.jpg)

# Usage

## Compatibility

I have tested it and it works on both [MultiWii](http://www.multiwii.com/) and [Aeroquad](http://aeroquad.com/) when the configuration is set for Futubu. It looks like this in MultiWii:

```c
#define SERIAL_SUM_PPM   ROLL,PITCH,THROTTLE,YAW,AUX1,AUX2,AUX3,AUX4 //For Robe/Hitec/Futaba
```

## How to make your own

I am currently considering designing a board which will fit an XBee pin-compatible radio and have a built in microcontroller if there is enough interest. But if you want to make one yourself, you'll need:

* [Saitek USB Joystick](http://www.amazon.com/gp/product/B0000AW9RE/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=B0000AW9RE&linkCode=as2&tag=appdelinc-20)
* A [Wifly Module](https://www.sparkfun.com/products/10822)
* An [Arduino pro mini](https://www.sparkfun.com/products/11113)
* An [XBee explorer](https://www.sparkfun.com/products/9132)
* 4 pins worth of [male header strip](https://www.sparkfun.com/products/116)
* The Arduino sketch at from [my github repo](https://github.com/mattwilliamson/Arduino-RC-Receiver/blob/master/serial_ppm_rx_ino/serial_ppm_rx_ino.ino)
* [Servo wire](https://www.sparkfun.com/products/8738), male-end (I think I cut mine off a dead servo)
* Soldering Iron/Solder
* Hot glue gun

The pins of the XBee explorer and the Arduino Pro Mini line up perfectly. With the Arduino Mini facing down, put the headers into the serial port (pins GND, VCC, RXI, TXO) and solder them in. I would put the short end of headers into the Arduino side. The pins will be sticking out of the bottom of the Arduino when you are done. This is a good time to upload the serial PPM sketch using an [FTDI Basic](https://www.sparkfun.com/products/9716).

Now, strip the ends of the male side of the servo cable. Then, with the Arduino Mini facing down, solder BLACK into GND on the Arduino, RED to VCC and WHITE to Arduino PIN 9. Make sure the wires are coming out of the bottom of the Arduino. This is so when we hot glue the boards together, the hot glue will hold the cable in place and reduce stress on the solder joints.

Flip the Arduino over. Slide the explorer on the headers, facing up. Make sure GND matches up with GND on both boards. Put some hot glue between the boards to help them stick together. Solder the explorer onto the headers. They are now permanently joined! You should have something like this:

![Receiver Bottom](https://github.com/mattwilliamson/aimatt.com/raw/gh-pages/images/posts/ppm-receiver/side.jpg)

## Use it!

Set up your XBee or WiFly chip and insert it into the receiver. Get the code from [joystick.py](https://github.com/mattwilliamson/Arduino-RC-Receiver/blob/master/joystick.py) and make sure the [pygame](http://www.pygame.org/install.html) python module is installed.

![Plugged In](https://github.com/mattwilliamson/aimatt.com/raw/gh-pages/images/posts/ppm-receiver/pluggedin.jpg)

If you are using a WiFly, make sure you set it up to do Ad-Hoc WiFi network and then connect to it from your computer once it is plugged in. Make sure the following line is uncommented when using a WifFly:

    SERIAL_PORT = 'socket://<IP_ADDRESS>:2000'

![Wifi](https://github.com/mattwilliamson/aimatt.com/raw/gh-pages/images/posts/ppm-receiver/wifi.png)

Plug the receiver into your quadcopter. If you are running MultiWii, the signal (white wire) should be connected to `DIGITAL 2` on an ATmega328 Arduino or `DIGITAL 19` on a Mega.

Plug in your joystick and run `joystick.py`. It may take a minute to establish an IP address after connecting and you may see "no route to host". Keep trying until it works. Once it does, you'll see the values being sent to the receiver printed out every couple seconds to make sure it's still alive. And you should be getting PPM output on your quad.

![joystick.py](https://github.com/mattwilliamson/aimatt.com/raw/gh-pages/images/posts/ppm-receiver/console.png)

The receiver status LED will blink until it begins receiving commands and then will be solid.

-----

Hve Fun! Here's a few "flights" using one of the early versions:

{% youtube _Q5dbNigOiQ %}

Let me know in the comments if designing a custom board for purchase is something you are interested in.


text:
<!--#echo json="package.json" key="name" underline="=" -->
ubborg-bundled-optional-bundles-pmb
===================================
<!--/#echo -->

<!--#echo json="package.json" key="description" -->
Helps make bundles that are collections of all the other bundles in the same
directory.
<!--/#echo -->

API
---

Currently unstable.

Usage
-----

See `ubborg-usecase-rescuedisk-pmb` for usage examples.

<!--#toc stop="scan" -->

Known issues
------------

* Needs more/better tests and docs.

License
-------
<!--#echo json="package.json" key=".license" -->
ISC
<!--/#echo -->

license: ISC


text:
Handlebars.Net [![Build Status](https://travis-ci.org/rexm/Handlebars.Net.svg?branch=master)](https://travis-ci.org/rexm/Handlebars.Net)
==============

Blistering-fast [Handlebars.js templates](http://handlebarsjs.com) in your .NET application.

>Handlebars.js is an extension to the Mustache templating language created by Chris Wanstrath. Handlebars.js and Mustache are both logicless templating languages that keep the view and the code separated like we all know they should be.

Check out the [handlebars.js documentation](http://handlebarsjs.com) for how to write Handlebars templates.

Handlebars.Net doesn't use a scripting engine to run a Javascript library - it **compiles Handlebars templates directly to IL bytecode**. It also mimics the JS library's API as closely as possible.

##Install

    nuget install Handlebars.Net

##Usage

```c#
string source =
@"<div class=""entry"">
  <h1>{{title}}</h1>
  <div class=""body"">
    {{body}}
  </div>
</div>";

var template = Handlebars.Compile(source);

var data = new {
    title = "My new post",
    body = "This is my first post!"
};

var result = template(data);

/* Would render:
<div class="entry">
  <h1>My New Post</h1>
  <div class="body">
    This is my first post!
  </div>
</div>
*/
```

###Registering Partials
```c#
string source =
@"<h2>Names</h2>
{{#names}}
  {{> user}}
{{/names}}";

string partialSource =
@"<strong>{{name}}</strong>";

using (var reader = new StringReader(partialSource))
{
  var partialTemplate = Handlebars.Compile(reader);
  Handlebars.RegisterTemplate("user", partialTemplate);
}

var template = Handlebars.Compile(source);

var data = new {
  names = new [] {
    new {
        name = "Karen"
    },
    new {
        name = "Jon"
    }
  }
};

var result = template(data);

/* Would render:
<h2>Names</h2>
  <strong>Karen</strong>
  <strong>Jon</strong>
*/
```

###Registering Helpers
```c#
Handlebars.RegisterHelper("link_to", (writer, context, parameters) => {
  writer.WriteSafeString("<a href='" + context.url + "'>" + context.text + "</a>");
});

string source = @"Click here: {{link_to}}";

var template = Handlebars.Compile(source);

var data = new {
    url = "https://github.com/rexm/handlebars.net",
    text = "Handlebars.Net"
};

var result = template(data);

/* Would render:
Click here: <a href='https://github.com/rexm/handlebars.net'>Handlebars.Net</a>
*/
```

This will expect your views to be in the /Views folder like so:

```
Views\layout.hbs                |<--shared as in \Views
Views\partials\somepartial.hbs   <--shared as in  \Views\partials
Views\{Controller}\{Action}.hbs
Views\{Controller}\{Action}\partials\somepartial.hbs
```

##Performance
Compared to rendering, compiling is a fairly intensive process. While both are still measured in millseconds, compilation accounts for the most of that time by far. So, it is generally ideal to compile once and cache the resulting function to be re-used for the life of your process.

##Future roadmap

- [ ] **Add unit tests!**
- [x] [Support for sub-expressions](https://github.com/rexm/Handlebars.Net/issues/48)
- [ ] `lookup`, `log`, and `helperMissing` helpers
- [x] [Support for whitespace control](https://github.com/rexm/Handlebars.Net/issues/52)
- [ ] MVC view engine
- [ ] Nancy view engine

##Contributing

Pull requests are welcome! The guidelines are pretty straightforward:
- Only add capabilities that are already in the Mustache / Handlebars specs
- Avoid dependencies outside of the .NET BCL
- Maintain cross-platform compatibility (.NET/Mono; Windows/OSX/Linux/etc)
- Follow the established code format


text:
# Changelog

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/extension-utils bumped from ^0.1.20 to ^0.1.21
    * @looker/sdk bumped from ^23.0.0 to ^23.2.0

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/extension-utils bumped from ^0.1.22 to ^0.1.23
    * @looker/sdk bumped from ^23.4.0 to ^23.6.0

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/extension-utils bumped from ^0.1.23 to ^0.1.24
    * @looker/sdk bumped from ^23.6.0 to ^23.8.0

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/extension-utils bumped from ^0.1.24 to ^0.1.25
    * @looker/sdk bumped from ^23.8.0 to ^23.8.1

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/code-editor bumped from ^0.1.28 to ^0.1.29
    * @looker/extension-utils bumped from ^0.1.25 to ^0.1.26
    * @looker/sdk bumped from ^23.8.1 to ^23.10.0
    * @looker/sdk-codegen bumped from ^21.8.0 to ^21.8.1
    * @looker/sdk-rtl bumped from ^21.6.0 to ^21.6.1

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/extension-utils bumped from ^0.1.26 to ^0.1.27
    * @looker/sdk bumped from ^23.10.0 to ^23.12.0

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/extension-utils bumped from ^0.1.27 to ^0.1.28
    * @looker/sdk bumped from ^23.12.0 to ^23.14.1

## [0.9.45](https://github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.44...run-it-v0.9.45) (2023-03-31)

### Features

* embed playground ([#1280](https://github.com/looker-open-source/sdk-codegen/issues/1280)) ([28f1218](https://github.com/looker-open-source/sdk-codegen/commit/28f121830f116da59b7f1cd248433c15c98cc56e))

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/extension-utils bumped from ^0.1.21 to ^0.1.22
    * @looker/sdk bumped from ^23.2.0 to ^23.4.0

## [0.9.43](https://github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.42...run-it-v0.9.43) (2023-02-22)

### Features

* keep all body parameters toggle in API Explorer requests ([#1245](https://github.com/looker-open-source/sdk-codegen/issues/1245)) ([043ed3f](https://github.com/looker-open-source/sdk-codegen/commit/043ed3ff12cba4f821604b5b668d7301ed4aa6d1))
* track request time if the transport doesn't ([#1231](https://github.com/looker-open-source/sdk-codegen/issues/1231)) ([a0e31a4](https://github.com/looker-open-source/sdk-codegen/commit/a0e31a41c1075b653fc8a2bf44b297ff98b41c72))

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/code-editor bumped from ^0.1.27 to ^0.1.28
    * @looker/extension-utils bumped from ^0.1.19 to ^0.1.20
    * @looker/sdk bumped from ^22.20.1 to ^23.0.0
    * @looker/sdk-codegen bumped from ^21.7.4 to ^21.8.0
    * @looker/sdk-rtl bumped from ^21.5.0 to ^21.6.0

### [0.9.42](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.41...run-it-v0.9.42) (2022-12-09)

### Features

* add request time tracking ([#1223](https://www.github.com/looker-open-source/sdk-codegen/issues/1223)) ([2aefe06](https://www.github.com/looker-open-source/sdk-codegen/commit/2aefe064d668e02f3af95202e4667036cba01979))

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/code-editor bumped from ^0.1.26 to ^0.1.27
    * @looker/extension-utils bumped from ^0.1.18 to ^0.1.19
    * @looker/sdk bumped from ^22.20.0 to ^22.20.1
    * @looker/sdk-codegen bumped from ^21.7.3 to ^21.7.4
    * @looker/sdk-rtl bumped from ^21.4.0 to ^21.5.0

### [0.9.41](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.40...run-it-v0.9.41) (2022-11-10)

### Bug Fixes

* oauth support in APIX when embedded in another app ([#1198](https://www.github.com/looker-open-source/sdk-codegen/issues/1198)) ([c464d2f](https://www.github.com/looker-open-source/sdk-codegen/commit/c464d2f24c7f8e7d282208efd00feaaba216fe3e))

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/code-editor bumped from ^0.1.25 to ^0.1.26
    * @looker/extension-utils bumped from ^0.1.17 to ^0.1.18
    * @looker/sdk bumped from ^22.18.0 to ^22.20.0
    * @looker/sdk-codegen bumped from ^21.7.2 to ^21.7.3

### [0.9.40](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.39...run-it-v0.9.40) (2022-10-17)

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/code-editor bumped from ^0.1.24 to ^0.1.25
    * @looker/extension-utils bumped from ^0.1.16 to ^0.1.17
    * @looker/sdk bumped from ^22.16.0 to ^22.18.0
    * @looker/sdk-codegen bumped from ^21.7.1 to ^21.7.2

### [0.9.39](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.38...run-it-v0.9.39) (2022-09-21)

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/extension-utils bumped from ^0.1.15 to ^0.1.16
    * @looker/sdk bumped from ^22.14.0 to ^22.16.0

### [0.9.38](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.37...run-it-v0.9.38) (2022-09-21)

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/extension-utils bumped from ^0.1.14 to ^0.1.15
    * @looker/sdk bumped from ^22.12.1 to ^22.14.0

### [0.9.37](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.36...run-it-v0.9.37) (2022-09-21)

### Features

* copy link button for search ([#1120](https://www.github.com/looker-open-source/sdk-codegen/issues/1120)) ([d6e0c37](https://www.github.com/looker-open-source/sdk-codegen/commit/d6e0c37ae36b1ff4129cf3bb30f8462f4aa49b0d))
* error document retrieval in API Explorer ([#1161](https://www.github.com/looker-open-source/sdk-codegen/issues/1161)) ([89a94e1](https://www.github.com/looker-open-source/sdk-codegen/commit/89a94e167b8a3e1aa662c0b5de7c585b3eac2f13))

### Bug Fixes

* whitespace under CollapserCard child components ([#1162](https://www.github.com/looker-open-source/sdk-codegen/issues/1162)) ([89fbf29](https://www.github.com/looker-open-source/sdk-codegen/commit/89fbf2911701b598bf9d673cef00e790a1bc8207))

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/code-editor bumped from ^0.1.23 to ^0.1.24
    * @looker/extension-utils bumped from ^0.1.13 to ^0.1.14
    * @looker/sdk bumped from ^22.10.1 to ^22.12.1
    * @looker/sdk-codegen bumped from ^21.7.0 to ^21.7.1
    * @looker/sdk-rtl bumped from ^21.3.4 to ^21.4.0

### [0.9.36](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.35...run-it-v0.9.36) (2022-07-29)

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/code-editor bumped from ^0.1.22 to ^0.1.23
    * @looker/extension-utils bumped from ^0.1.12 to ^0.1.13
    * @looker/sdk bumped from ^22.10.0 to ^22.10.1
    * @looker/sdk-codegen bumped from ^21.6.0 to ^21.7.0

### [0.9.35](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.34...run-it-v0.9.35) (2022-07-14)

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/extension-utils bumped from ^0.1.11 to ^0.1.12
    * @looker/sdk bumped from ^22.8.0 to ^22.10.0

### [0.9.34](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.33...run-it-v0.9.34) (2022-07-13)

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/extension-utils bumped from ^0.1.10 to ^0.1.11
    * @looker/sdk bumped from ^22.6.0 to ^22.8.0

### [0.9.33](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.32...run-it-v0.9.33) (2022-07-07)

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/code-editor bumped from ^0.1.21 to ^0.1.22
    * @looker/extension-utils bumped from ^0.1.9 to ^0.1.10
    * @looker/sdk bumped from ^22.4.2 to ^22.6.0
    * @looker/sdk-codegen bumped from ^21.5.2 to ^21.6.0
    * @looker/sdk-rtl bumped from ^21.3.3 to ^21.3.4

### [0.9.32](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.31...run-it-v0.9.32) (2022-04-07)

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/code-editor bumped from ^0.1.20 to ^0.1.21
    * @looker/extension-utils bumped from ^0.1.8 to ^0.1.9
    * @looker/sdk bumped from ^22.4.1 to ^22.4.2
    * @looker/sdk-codegen bumped from ^21.5.1 to ^21.5.2
    * @looker/sdk-rtl bumped from ^21.3.2 to ^21.3.3

### [0.9.31](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.30...run-it-v0.9.31) (2022-04-07)

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/code-editor bumped from ^0.1.19 to ^0.1.20
    * @looker/extension-utils bumped from ^0.1.7 to ^0.1.8
    * @looker/sdk bumped from ^22.4.0 to ^22.4.1
    * @looker/sdk-codegen bumped from ^21.5.0 to ^21.5.1

### [0.9.30](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.29...run-it-v0.9.30) (2022-03-24)

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/extension-utils bumped from ^0.1.6 to ^0.1.7
    * @looker/sdk bumped from ^22.2.0 to ^22.4.0

### [0.9.29](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.28...run-it-v0.9.29) (2022-03-04)

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/code-editor bumped from ^0.1.18 to ^0.1.19
    * @looker/extension-utils bumped from ^0.1.5 to ^0.1.6
    * @looker/sdk-codegen bumped from ^21.4.0 to ^21.5.0

### [0.9.28](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.27...run-it-v0.9.28) (2022-02-18)

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/extension-utils bumped from ^0.1.4 to ^0.1.5
    * @looker/sdk bumped from ^22.0.0 to ^22.2.0

### [0.9.27](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.26...run-it-v0.9.27) (2022-02-14)

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/code-editor bumped from ^0.1.17 to ^0.1.18
    * @looker/extension-utils bumped from ^0.1.3 to ^0.1.4
    * @looker/sdk-codegen bumped from ^21.3.2 to ^21.4.0

### [0.9.26](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.23...run-it-v0.9.26) (2022-01-27)

### Features

* add http method to IRawResponse ([#925](https://www.github.com/looker-open-source/sdk-codegen/issues/925)) ([25cef47](https://www.github.com/looker-open-source/sdk-codegen/commit/25cef47fa61a5f15565560b48f5e0c45a0cd9b44))
* OAuthConfigProvider ([209f399](https://www.github.com/looker-open-source/sdk-codegen/commit/209f399a089beb28405a178d3dc8f769478ae97b))

### Bug Fixes

* hackathon build ([#915](https://www.github.com/looker-open-source/sdk-codegen/issues/915)) ([67df146](https://www.github.com/looker-open-source/sdk-codegen/commit/67df1465d1ec04709c0c20d9a1b157f9199f795e))

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/sdk bumped from ^21.20.0 to ^21.20.1

### [0.9.26](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.25...run-it-v0.9.26) (2021-12-20)

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/code-editor bumped from ^0.1.16 to ^0.1.17
    * @looker/extension-utils bumped from ^0.1.2 to ^0.1.3
    * @looker/sdk-codegen bumped from ^21.3.0 to ^21.3.1
    * @looker/sdk-rtl bumped from ^21.3.0 to ^21.3.1

### [0.9.25](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.24...run-it-v0.9.25) (2021-12-16)

### Features

* add http method to IRawResponse ([#925](https://www.github.com/looker-open-source/sdk-codegen/issues/925)) ([25cef47](https://www.github.com/looker-open-source/sdk-codegen/commit/25cef47fa61a5f15565560b48f5e0c45a0cd9b44))

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/code-editor bumped from ^0.1.15 to ^0.1.16
    * @looker/extension-utils bumped from ^0.1.1 to ^0.1.2
    * @looker/sdk-codegen bumped from ^21.2.1 to ^21.3.0
    * @looker/sdk-rtl bumped from ^21.2.0 to ^21.3.0

### [0.9.24](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.23...run-it-v0.9.24) (2021-12-06)

### Features

* OAuthConfigProvider ([209f399](https://www.github.com/looker-open-source/sdk-codegen/commit/209f399a089beb28405a178d3dc8f769478ae97b))

### Bug Fixes

* hackathon build ([#915](https://www.github.com/looker-open-source/sdk-codegen/issues/915)) ([67df146](https://www.github.com/looker-open-source/sdk-codegen/commit/67df1465d1ec04709c0c20d9a1b157f9199f795e))

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/code-editor bumped from ^0.1.14 to ^0.1.15
    * @looker/extension-utils bumped from ^0.1.0 to ^0.1.1
    * @looker/sdk-codegen bumped from ^21.2.0 to ^21.2.1

### [0.9.23](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.22...run-it-v0.9.23) (2021-11-10)

### Features

* create @looker/extension-utils ([#886](https://www.github.com/looker-open-source/sdk-codegen/issues/886)) ([9d1720d](https://www.github.com/looker-open-source/sdk-codegen/commit/9d1720d9a4cec00c45195dd9c716d9a2a929264f))
* enforce required body parameters for RunIt ([#883](https://www.github.com/looker-open-source/sdk-codegen/issues/883)) ([a4dfb3c](https://www.github.com/looker-open-source/sdk-codegen/commit/a4dfb3cd318de65f78f89df5b55e9daf61c42826))

### Bug Fixes

* show a helpful message when sdk call syntax generation fails ([#879](https://www.github.com/looker-open-source/sdk-codegen/issues/879)) ([1e9348b](https://www.github.com/looker-open-source/sdk-codegen/commit/1e9348b797c2f3760d03c1f94c60f18e534e8298))

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/sdk bumped from ^21.18.1 to ^21.20.0
    * @looker/sdk-codegen bumped from ^21.1.1 to ^21.2.0
    * @looker/code-editor bumped from ^0.1.13 to ^0.1.14
    * @looker/sdk-rtl bumped from ^21.1.1 to ^21.2.0

### [0.9.22](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.21...run-it-v0.9.22) (2021-10-27)

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/sdk bumped from ^21.18.0 to ^21.18.1
    * @looker/sdk-codegen bumped from ^21.1.0 to ^21.1.1
    * @looker/code-editor bumped from ^0.1.12 to ^0.1.13
    * @looker/sdk-rtl bumped from ^21.1.0 to ^21.1.1

### [0.9.21](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.20...run-it-v0.9.21) (2021-10-24)

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/sdk bumped from ^21.16.0 to ^21.18.0
    * @looker/code-editor bumped from ^0.1.11 to ^0.1.12

### [0.9.20](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.19...run-it-v0.9.20) (2021-10-19)

### Features

* closest path match for API Explorer ([#811](https://www.github.com/looker-open-source/sdk-codegen/issues/811)) ([45fd26f](https://www.github.com/looker-open-source/sdk-codegen/commit/45fd26fb0f325fa90edfec72f835ed3a79b9afeb))
* lots of RunIt form cleanup ([#814](https://www.github.com/looker-open-source/sdk-codegen/issues/814)) ([e92eae8](https://www.github.com/looker-open-source/sdk-codegen/commit/e92eae8fc127a0aa99545ca9c577152c08d59000))
* makeTheCall for Kotlin and type tagging ([#833](https://www.github.com/looker-open-source/sdk-codegen/issues/833)) ([2ca950e](https://www.github.com/looker-open-source/sdk-codegen/commit/2ca950e16c9c172d3e67de58261df16e424efaa3))
* Use agenda data for the Hackathon home page ([#842](https://www.github.com/looker-open-source/sdk-codegen/issues/842)) ([0da2523](https://www.github.com/looker-open-source/sdk-codegen/commit/0da25239c3f108cb684309818c33c91c2a7c3278))

### Bug Fixes

* logic for 2D JSON data detection ([#840](https://www.github.com/looker-open-source/sdk-codegen/issues/840)) ([3d18b93](https://www.github.com/looker-open-source/sdk-codegen/commit/3d18b9359e16aa4923f825e748f82a6049f02062))
* remove body from REST call if no body elements are defined ([#841](https://www.github.com/looker-open-source/sdk-codegen/issues/841)) ([eb1731f](https://www.github.com/looker-open-source/sdk-codegen/commit/eb1731f2e2d3911fe5044e06321eb9712ddfa419))
* request content initialization and filtering for RunIt requests ([#852](https://www.github.com/looker-open-source/sdk-codegen/issues/852)) ([474ee93](https://www.github.com/looker-open-source/sdk-codegen/commit/474ee9365dafe6549826a9f627ac0a79dc0e9a56))
* validateBody for API Explorer ([#846](https://www.github.com/looker-open-source/sdk-codegen/issues/846)) ([d1f203c](https://www.github.com/looker-open-source/sdk-codegen/commit/d1f203c3d843adb76217a750c0f414c608ceab0f))

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/sdk bumped from ^21.14.0 to ^21.16.0
    * @looker/sdk-codegen bumped from ^21.0.25 to ^21.1.0
    * @looker/code-editor bumped from ^0.1.10 to ^0.1.11
    * @looker/sdk-rtl bumped from ^21.0.20 to ^21.1.0

### [0.9.19](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.18...run-it-v0.9.19) (2021-09-01)

### Features

* http response explorer for RunIt ([#800](https://www.github.com/looker-open-source/sdk-codegen/issues/800)) ([3f273ea](https://www.github.com/looker-open-source/sdk-codegen/commit/3f273ea7f849dafece8f4f5f60558021ecd41705))
* new configuration UI for API Explorer ([#803](https://www.github.com/looker-open-source/sdk-codegen/issues/803)) ([e6c67d1](https://www.github.com/looker-open-source/sdk-codegen/commit/e6c67d1211b412d4ce83127c9f7a8f091e3cf27f))

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/sdk bumped from ^21.12.0 to ^21.14.0
    * @looker/sdk-codegen bumped from ^21.0.24 to ^21.0.25
    * @looker/code-editor bumped from ^0.1.9 to ^0.1.10
    * @looker/sdk-rtl bumped from ^21.0.19 to ^21.0.20

### [0.9.18](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.17...run-it-v0.9.18) (2021-08-11)

### Features

* fetch API specifications for stand-alone API Explorer ([#789](https://www.github.com/looker-open-source/sdk-codegen/issues/789)) ([f7be1fb](https://www.github.com/looker-open-source/sdk-codegen/commit/f7be1fb589570137c5ab39304910c57f721de8fb))

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/sdk-codegen bumped from ^21.0.23 to ^21.0.24
    * @looker/code-editor bumped from ^0.1.8 to ^0.1.9

### [0.9.17](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.16...run-it-v0.9.17) (2021-08-06)

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/sdk bumped from ^21.10.2 to ^21.12.0

### [0.9.16](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.15...run-it-v0.9.16) (2021-07-30)

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/sdk bumped from ^21.10.1 to ^21.10.2
    * @looker/sdk-codegen bumped from ^21.0.22 to ^21.0.23
    * @looker/code-editor bumped from ^0.1.7 to ^0.1.8
    * @looker/sdk-rtl bumped from ^21.0.18 to ^21.0.19

### [0.9.15](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.14...run-it-v0.9.15) (2021-07-15)

### Bug Fixes

* bullet proof APIX response handling ([#754](https://www.github.com/looker-open-source/sdk-codegen/issues/754)) ([b2a018a](https://www.github.com/looker-open-source/sdk-codegen/commit/b2a018a62e4a1acd837b6861c3e3d26c7af385bd))

### [0.9.14](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.13...run-it-v0.9.14) (2021-07-09)

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/sdk bumped from ^21.10.0 to ^21.10.1
    * @looker/sdk-codegen bumped from ^21.0.21 to ^21.0.22
    * @looker/code-editor bumped from ^0.1.6 to ^0.1.7
    * @looker/sdk-rtl bumped from ^21.0.17 to ^21.0.18

### [0.9.13](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.12...run-it-v0.9.13) (2021-07-08)

### Bug Fixes

* extension-api-explorer build ([#740](https://www.github.com/looker-open-source/sdk-codegen/issues/740)) ([1697883](https://www.github.com/looker-open-source/sdk-codegen/commit/16978836f42d8c755031a3438eeee1e9c1a743e6))

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/sdk bumped from ^21.8.3 to ^21.10.0
    * @looker/sdk-codegen bumped from ^21.0.20 to ^21.0.21
    * @looker/code-editor bumped from ^0.1.5 to ^0.1.6
    * @looker/sdk-rtl bumped from ^21.0.16 to ^21.0.17

### [0.9.12](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.11...run-it-v0.9.12) (2021-07-02)

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/sdk bumped from ^21.8.2 to ^21.8.3
    * @looker/sdk-codegen bumped from ^21.0.19 to ^21.0.20
    * @looker/code-editor bumped from ^0.1.4 to ^0.1.5
    * @looker/sdk-rtl bumped from ^21.0.15 to ^21.0.16

### [0.9.11](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.10...run-it-v0.9.11) (2021-07-01)

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/sdk bumped from ^21.8.1 to ^21.8.2
    * @looker/sdk-codegen bumped from ^21.0.18 to ^21.0.19
    * @looker/code-editor bumped from ^0.1.3 to ^0.1.4
    * @looker/sdk-rtl bumped from ^21.0.14 to ^21.0.15

### [0.9.10](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.9...run-it-v0.9.10) (2021-06-30)

### Features

* refactor Markdown out to @looker/code-editor ([#699](https://www.github.com/looker-open-source/sdk-codegen/issues/699)) ([f3c16e2](https://www.github.com/looker-open-source/sdk-codegen/commit/f3c16e2a162266545ba3086a0a1dddd0cb79195f))
* syntax highlight application/sql responses ([#718](https://www.github.com/looker-open-source/sdk-codegen/issues/718)) ([28a1bbe](https://www.github.com/looker-open-source/sdk-codegen/commit/28a1bbedb04f500a12e2c5a0fe304919139e6638))

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/sdk bumped from ^21.8.0 to ^21.8.1
    * @looker/sdk-codegen bumped from ^21.0.17 to ^21.0.18
    * @looker/code-editor bumped from ^0.1.2 to ^0.1.3
    * @looker/sdk-rtl bumped from ^21.0.13 to ^21.0.14

### [0.9.9](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.8...run-it-v0.9.9) (2021-06-17)

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/sdk bumped from ^21.6.1 to ^21.8.0

### [0.9.8](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.7...run-it-v0.9.8) (2021-06-16)

### Features

* reduce size of apix bundle ([#676](https://www.github.com/looker-open-source/sdk-codegen/issues/676)) ([0d74f6a](https://www.github.com/looker-open-source/sdk-codegen/commit/0d74f6a7814b509416a9d2558c16439a4859b543))
* show original spec in API Explorer ([#686](https://www.github.com/looker-open-source/sdk-codegen/issues/686)) ([2bfb014](https://www.github.com/looker-open-source/sdk-codegen/commit/2bfb0147f2947680a784ef3118192b1e7590b296))

### Bug Fixes

* sync design-tokens/icons dependency constraint ([eb1a427](https://www.github.com/looker-open-source/sdk-codegen/commit/eb1a427d3c90bec44b2aac542783c3cda4810c0e))
* sync design-tokens/icons dependency constraint ([eb1a427](https://www.github.com/looker-open-source/sdk-codegen/commit/eb1a427d3c90bec44b2aac542783c3cda4810c0e))

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/sdk bumped from ^21.6.0 to ^21.6.1
    * @looker/sdk-codegen bumped from ^21.0.16 to ^21.0.17
    * @looker/code-editor bumped from ^0.1.1 to ^0.1.2

### [0.9.7](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.6...run-it-v0.9.7) (2021-05-05)

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/sdk bumped from ^21.4.3 to ^21.6.0
    * @looker/sdk-codegen bumped from ^21.0.15 to ^21.0.16
    * @looker/code-editor bumped from ^0.1.0 to ^0.1.1
    * @looker/sdk-rtl bumped from ^21.0.12 to ^21.0.13

### [0.9.6](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.5...run-it-v0.9.6) (2021-04-27)

### Features

* APIX now uses google font appropriately ([#636](https://www.github.com/looker-open-source/sdk-codegen/issues/636)) ([ed932d6](https://www.github.com/looker-open-source/sdk-codegen/commit/ed932d6744fd3c102bfff7417643667bb57aee00))
* extension framework identifies looker host type ([#634](https://www.github.com/looker-open-source/sdk-codegen/issues/634)) ([c6c6f64](https://www.github.com/looker-open-source/sdk-codegen/commit/c6c6f64bf4d2ec5eef4ac2f082868f80d11a180d))

### [0.9.5](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.4...run-it-v0.9.5) (2021-04-27)

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/sdk bumped from ^21.4.2 to ^21.4.3
    * @looker/sdk-codegen bumped from ^21.0.14 to ^21.0.15
    * @looker/code-editor bumped from ^0.0.1 to ^0.0.2

### [0.9.4](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.3...run-it-v0.9.4) (2021-04-26)

### Features

* adds editor functionality to CodeDisplay ([#615](https://www.github.com/looker-open-source/sdk-codegen/issues/615)) ([b256d14](https://www.github.com/looker-open-source/sdk-codegen/commit/b256d14c279e47f531c8291d11146d07a7b5ad94))

### Bug Fixes

* remove deprecated object attribute reference in APIX tests ([#622](https://www.github.com/looker-open-source/sdk-codegen/issues/622)) ([581b351](https://www.github.com/looker-open-source/sdk-codegen/commit/581b3511fdc8431f80d54fd315a12192ceb86382))

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/sdk bumped from ^21.4.1 to ^21.4.2
    * @looker/sdk-codegen bumped from ^21.0.13 to ^21.0.14

### [0.9.3](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.2...run-it-v0.9.3) (2021-04-21)

### Features

* introduces prism-editor package; implements read-only usage ([#588](https://www.github.com/looker-open-source/sdk-codegen/issues/588)) ([863c88d](https://www.github.com/looker-open-source/sdk-codegen/commit/863c88dfb0569f7c829602acee2404e1c840097e))

### Bug Fixes

* updated TypeScript, C#, Go language names in codeGenerators.ts ([#610](https://www.github.com/looker-open-source/sdk-codegen/issues/610)) ([13fb42b](https://www.github.com/looker-open-source/sdk-codegen/commit/13fb42b6bfa651a137e75b04fc6ee00620705ede))

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/sdk-codegen bumped from ^21.0.12 to ^21.0.13

### [0.9.2](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.1...run-it-v0.9.2) (2021-04-15)

### Features

* remember user's SDK language preference ([#567](https://www.github.com/looker-open-source/sdk-codegen/issues/567)) ([faa2511](https://www.github.com/looker-open-source/sdk-codegen/commit/faa25113d87072875ec5fb718da7eb10e0a518e4))

### Bug Fixes

* extends runit response height and fixes response models scrolling ([#558](https://www.github.com/looker-open-source/sdk-codegen/issues/558)) ([61627ce](https://www.github.com/looker-open-source/sdk-codegen/commit/61627ce282c1f7e4eaf082ccd66466060d2e7b98))
* RunIt request overflow  ([#565](https://www.github.com/looker-open-source/sdk-codegen/issues/565)) ([38665ac](https://www.github.com/looker-open-source/sdk-codegen/commit/38665ac40b6abc20557db66d0dc536c347c6a862))

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/sdk bumped from ^21.4.0 to ^21.4.1
    * @looker/sdk-codegen bumped from ^21.0.11 to ^21.0.12
    * @looker/sdk-rtl bumped from ^21.0.11 to ^21.0.12

### [0.9.1](https://www.github.com/looker-open-source/sdk-codegen/compare/run-it-v0.9.0...run-it-v0.9.1) (2021-04-02)

### Features

* Added --versions option to the code generator ([#514](https://www.github.com/looker-open-source/sdk-codegen/issues/514)) ([ee6f3e8](https://www.github.com/looker-open-source/sdk-codegen/commit/ee6f3e8f55e300df1a75c9be89b47f067bc08dee))

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @looker/sdk bumped from ^21.0.10 to ^21.4.0
    * @looker/sdk-codegen bumped from ^21.0.10 to ^21.0.11
    * @looker/sdk-codegen-utils bumped from ^21.0.10 to ^21.0.11
    * @looker/sdk-rtl bumped from ^21.0.10 to ^21.0.11

repository: looker-open-source/sdk-codegen

branch_name: refs/heads/main

gha_language: TypeScript

repo_name: looker-open-source/sdk-codegen


text:
The Mongoose OS command line tool
=================================

## Installing on Windows

Download and run [pre-built mos.exe](https://mongoose-os.com/downloads/mos-release/win/mos.exe).

## Installing on Ubuntu Linux

Use PPA:

```bash
$ sudo add-apt-repository ppa:mongoose-os/mos
$ sudo apt-get update
$ sudo apt-get install mos
```

Note: to use the very latest version instead of the released one, the last
command should be `sudo apt-get install mos-latest`

## Installing on Arch Linux

Use PKGBUILD:

```bash
$ git clone https://github.com/cesanta/mos-tool
$ cd mos-tool/mos/archlinux_pkgbuild/mos-release
$ makepkg
$ pacman -U ./mos-*.tar.xz
```

Note: to use the very latest version from the git repo, instead of the released
one, invoke `makepkg` from `mos-tool/mos/archlinux_pkgbuild/mos-latest`.

## Installing Mac OS

Use homebrew:

```bash
$ brew tap cesanta/mos
$ brew install mos
```

## Building manually

Minimal required Go version is 1.8.

Go and other required tools can be installed on Ubuntu 16.10 as follows:

```bash
sudo apt install golang-go build-essential python python-git libftdi-dev
```

Make sure you have `GOPATH` set, and `PATH` should contain `$GOPATH/bin`.
It can be done by adding this to your `~/.bashrc`:

```bash
export GOPATH="$HOME/go"
export PATH="$PATH:$GOPATH/bin"
```

Install govendor:

```bash
go get github.com/kardianos/govendor
```

Now clone the `mos-tool` repository into the proper location and `cd` to it

```bash
git clone https://github.com/cesanta/mos-tool $GOPATH/src/cesanta.com
cd $GOPATH/src/cesanta.com
```

Fetch all vendored packages and save them under the `vendor` dir:

```
$ govendor sync -v
```

Now, `mos` tool can be built:

```
make -C mos install
```

It will produce the binary `$GOPATH/bin/mos`.

## Changelog

See [release notes for this repo](https://github.com/cesanta/mos-tool/releases).

Up to version 1.25, mos tool was located under the
[mongoose-os](https://github.com/cesanta/mongoose-os) repo, so its changelog
can be found in [mongoose-os release notes](https://github.com/cesanta/mongoose-os/releases).

repository: meticulousCraftman/mos

gha_license_id: NOASSERTION

repo_name: meticulousCraftman/mos


text:
# Node, Gulp, Livereload

The goal of this project is to alleviate the front-end setup by providing a reusable container with Node, Gulp & LiveReload installed with LiveReload running on container startup.
By default, Gulp is watching changes to *.html files in ./src, so if you edit ./src/index.html, you're browser should refresh (don't forget to activate your browser plugin).
When you use .bashrc as provided in this repo, you can run gulp, npm, node and other commands inside the buildtools container from your host terminal.

## Getting started
* Change the environment values in .env as needed.
    * SRC_DIR_HOST should point to the directory that contains your source files, including gulpfile.js.
    * SRC_DIR_HOST can be left unchanged.
* Run `docker-compose up --build -d`.
* Add an alias in your .bashrc that executes the gulp command inside the container.
(Technically it's not an alias but a function. Have a look in .bashrc (in this repo) for more inspiration).
    ```
    # ~/.bashrc

    function gulp() {
        args=$@
        docker exec -it $(docker ps -aqf "name=buildtools") sh -c "gulp $args"
    }
    ```
* Close and reopen your host terminal or run `source ~/.bashrc`
* Run `gulp` from your host terminal.

Note: With the alias installed, your gulp commands will be forwarded to the buildtools container.
So if you're workflow mixed local gulp commands with container gulp commands, you should change the alias name e.g. gulpc (Gulp container).

## Troubleshooting
Issue: You run `gulp` in the terminal and get error:
> Local modules not found in /var/www/src

Solution:
`npm install` is still running in the container (first run only).
Wait a few minutes until it's finished: you'll see node_modules appear in $SRC_DIR_HOST when Node is done installing.

## Extra info regarding entrypoint/CMD-script: setup-node.sh

The container will run through setup-node.sh each time the container starts.
It will only execute all steps during the first run, future container instances will have the dependencies available in the mapped volume.

Script actions:

1. Run 'npm install' if a package.json file is present but no node_modules directory.
2. Install Gulp with CLI if not yet exists.
3. Install Gulp Livereload if not yet exists.
4. Prevents the container from closing.

repository: progonkpa/docker-symfony

repo_name: progonkpa/docker-symfony


text:
---
layout: default
---

# 1995-07-31 - Re: building libraries

## Header Data

From: Alex Tang<EMAIL_ADDRESS>To<EMAIL_ADDRESS>(Bill Stewart)

Message Hash: 46c2c38e90884f5015f5de4499126a2bd8ef744f7cb18e95c6d4bafbb910e45e

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1995-07-31 13:48:30 UTC

Raw Date: Mon, 31 Jul 95 06:48:30 PDT

## Raw message

```
{% raw  %}From: Alex Tang<EMAIL_ADDRESS>Date: Mon, 31 Jul 95 06:48:30 PDT
To<EMAIL_ADDRESS>(Bill Stewart)
Subject: Re: building libraries
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

On Mon Jul 31 01:25:04 1995: you scribbled...
>
> At 08:40 PM 7/28/95 -0400, Alex Tang wrote:
> >> The answer is to have some non-USA entity build shareable full fledged
> >> full powered crypto libraries and provide them for free for the rest of
> >> the world and for all machines.
> >Wouldn't there still be licensing issues to deal with (in the states at
> >least)??  I'm sure RSA would claim that the package would be in violation
> >of the licensing...
>
> If you did everything in an RSAREF-compatible manner, that would help;
> I think somebody outside the US has written an RSAREF-clone.
> Some problems include building programs that have generic-callout hooks
> instead of crypto-specific hooks (so that they don't get bitten by ITAR),
> while still maintaining reasonable efficiency and convenience.

Yeah, this would work for everyone except commercial institutions within
the states.  They'd have to get a license agreement for RSA.

...alex...

     Alex Tang<EMAIL_ADDRESS> http://petrified.cic.net/~altitude
   CICNet: Unix Support / InfoSystems Services / WebMaster / Programmer
       Viz-It!: Software Developer (Check out http://vizit.cic.net)
  UM-ITD: TaX.500 Developer (Check out http://petrified.cic.net/tax500)
Unofficial SSL/HTTPD FAQ: http://petrified.cic.net/~altitude/ssl/ssl.saga.html

{% endraw %}
```

## Thread

+ Return to [July 1995](/archive/1995/07)
+ Return to [August 1995](/archive/1995/08)

+ Return to "[Alex Tang <altitude@CIC.Net>](/authors/alex_tang_altitude_at_cic_net_)"
+ Return to "[Ray Arachelian <sunder@escape.com>](/authors/ray_arachelian_sunder_at_escape_com_)"
+ Return to<EMAIL_ADDRESS>(Bill Stewart)](/authors/stewarts_at_ix_netcom_com_bill_stewart_)"

+ 1995-07-31 (Sun, 30 Jul 95 22:24:12 PDT) - [Re: building libraries](/archive/1995/07/14bd441987b41c24c7fb960b3dc4e83ee4525b2f1f5ee914d8d110ba9c88f9c6) -<EMAIL_ADDRESS>(Bill Stewart)_
  + 1995-07-31 (Mon, 31 Jul 95 06:48:30 PDT) - Re: building libraries - _Alex Tang<EMAIL_ADDRESS>    + 1995-08-03 (Thu, 3 Aug 95 08:49:52 PDT) - [Re: building libraries](/archive/1995/08/ccb52c145aebe24f502dee8c69962f525e3d86b2904e8bbdbeb2c2dea87a75ac) - _Ray Arachelian<EMAIL_ADDRESS>  + 1995-08-03 (Thu, 3 Aug 95 08:48:35 PDT) - [Re: building libraries](/archive/1995/08/d19688df0ff2f2d980f6b17ba58dc2c76c4b427fa3504a59b32547c32ca3a211) - _Ray Arachelian<EMAIL_ADDRESS>


text:
# Save Gudetama Typing Game

Welcome to the Save Gudetama typing game! The typing game for "adults."

In 'Save Gudetama' users type as fast as they can to save their Gudetama. If they type fast enough you can save your own Gudetama and watch as your opponent's gudetama gets crushed to eggy-goo by a pile of bricks! Challenge your friends, enjoy the 8-bit design and retro-themes /sounds. We really enjoyed building this project, your feedback is welcomed!

![Alt Text](./output.gif)

In this project we built multiplayer functionality to enhance the gameplay of the 'Save Gudetama' typing game. Players are now able to authenticate with Facebook, create & enter game rooms to chat and play 'Save Gudetama' with their friends.

## Features
- Responsive web design with web and mobile views
- User Authentication via Facebook
- Real-time client to client communication
- Fun gameplay!
- Lobby, chat, matchmaking

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

1. Fork the github repo
2. In the root directory, run the following scripts in node
  - 'npm run react-dev'
  - 'npm run server-dev'
  - 'npm install'
3. Generate a local SSL certificate (we used this article! --> https://medium.freecodecamp.org/how-to-get-https-working-on-your-local-development-environment-in-5-minutes-7af615770eec)
4. Setup a developer account on Facebook to facillitate oauth.
5. Create an oauth application in the Facebook developer console.
6. Navigate to https://localhost:5000/ on your browser to test and enjoy!

### Prerequisites

What things you need to install the software and how to install them

```
Node (>9.8.0)
Web-browser (Chrome preferred, limited testing on alternative browsers)

```

### Installing

A step by step series of examples that tell you how to get a development env running

Install the required dependencies.

```
npm install
```

Run the server using the provided script

```
npm run server-dev
```

Run the server using the provided script

```
npm run react-dev
```

Create a .env file with the following information --> NOTE: the file should literally be titled '.env'

The information in this file with facillitate configuration for authentication with facebook as well as connecting to the DB instance!

```
APP_ID = 'insert your data'
APP_SECRET = 'insert your data'
DB_LOCATION = 'insert your data'
DB_USERNAME = 'insert your data'
DB_PASS = 'insert your data'
CALLBACK_URL = 'insert your data'
```

## Deployment

We used heroku to deploy this code!

In order to deploy your own version, you need to:
1. Set up an SQL database - we used AWS RDS to persist our data
2. Set up a Facebook oauth application
3. Configure the .env file
4. Install Heroku terminal utilities

## Built With

* [React](https://reactjs.org/) - Used to render the client application
* [React Spring](https://github.com/drcmda/react-spring) - Used to animate certain functionality
* [React Router](https://www.npmjs.com/package/react-router) - Used to generate distinct views at virtual endpoints
* [Express](https://expressjs.com/) - Framework leveraged to create and run server
* [Passport JS](http://www.passportjs.org/) - Authentication framework
* [Passport Facebook](http://www.passportjs.org/docs/facebook/) - Configuration framework used with passport to authenticate with Facebook.
* [Sockets.io](http://sockets.io/) - Used to facillitate realtime communication between client and server.
* [Axios](http://axios.io/) - Used to facillitate HTTP requests from client to server and vice-versa.
* [Emojis-mart](https://github.com/missive/emoji-mart) - Framework used to get emoji data reliably.
* [React Emoji Picker](https://www.npmjs.com/package/emoji-picker-react) - Slick emoji selector component integrated into chat.
* [MySQL](https://www.npmjs.com/package/mysql) - Used to configure and query SQL database.

## Authors

* **John Cynn** - *Lobby, chat, matchmaking, authentication, gameplay enhancements* - [jcynn12](https://github.com/jcynn12)
* **Philip Gonzalez** - *Lobby, chat, matchmaking, authentication, gameplay enhancements* - [p-gonzo](https://github.com/p-gonzo)
* **Nick Rogers** - *Lobby, chat, matchmaking, authentication, gameplay enhancements* - [rogersanick](https://github.com/rogersanick)

## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

## Acknowledgments

* Team Iron Man for letting us build on top of their wonderful gameplay! https://github.com/IronMan-HR/IronMan-HR

* **Scott McCreary** - *Original game functionality* - [scottmccreary](https://github.com/scottmccreary)
* **Lina Lei** - *Original game functionality* - [lina-lei](https://github.com/lina-lei)
* **Koichi Sakamaki** - *Original game functionality* - [jcynn12](https://github.com/Drive2blue)

repository: Job-it/Save-Gudetama

repo_name: Job-it/Save-Gudetama


text:
# Example of running FAST tests for DVWA in Bamboo

This is an example of Wallarm FAST running security tests in the Bamboo 7.0.3 pipeline. The target application is DVWA.

## Quick start with the example

1. Fork this repository.
2. Create the FAST node and copy a token value by the [link](https://us1.my.wallarm.com/testing/nodes).
3. Add a copied token as the `WALLARM_API_TOKEN` global variable in Bamboo.
4. Create a plan with the name **FAST** in Bamboo.
5. Link forked repository to Bamboo enabling the **Allow Bamboo to scan this repository for YAML and Java Specs** option.
6. Add webhook URL specified in the **Linked repository** > **Bamboo Specs** section to the forked repository.
7. Proceed to the **Specs status** tab and click **Scan** to check Bamboo configuration files and run the plan.

## Useful links

- More about Wallarm FAST: https://wallarm.com/products/fast
- More about Azure DevOps: https://docs.microsoft.com/en-us/azure/devops/
- DVWA application's source code: https://github.com/wallarm/fast-example-dvwa
- Full FAST documentation: https://docs.fast.wallarm.com

Try Wallarm FAST now: https://fast.wallarm.com/signup

gha_language: Java


text:
Schedule extension for Yii 1.1
==============================

This extension is the port of omnilight/yii2-scheduling (https://github.com/omnilight/yii2-scheduling)

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

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require anonymous-php/yii-scheduling "*"
```

or add

```json
"anonymous-php/yii-scheduling": "*"
```

to the `require` section of your composer.json.

Description
-----------

This project is inspired by the Laravel's Schedule component and tries to bring it's simplicity to the Yii framework.
Quote from Laravel's documentation:

```
In the past, developers have generated a Cron entry for each console command they wished to schedule.
However, this is a headache. Your console schedule is no longer in source control,
and you must SSH into your server to add the Cron entries. Let's make our lives easier.
```

After installation you have to create console command extending `Anonymous\Scheduling\ScheduleCommand` class
and implement `schedule()` method with your jobs inside:

```php
<?php

class ScheduleCommand extends \Anonymous\Scheduling\ScheduleCommand
{
    protected function schedule(Schedule $schedule)
    {
        $schedule->command('foo')->monthly();
    }
}
```

When setup will be finished just put single line into crontab:

```
* * * * * php /path/to/yii yii schedule run 1>> /dev/null 2>&1
```

You can put your schedule into the `schedule.php` file, or add it withing bootstrapping of your extension or
application

Schedule examples
-----------------

This extension is support all features of Laravel's Schedule, except environments and maintance mode.

**Scheduling Closures**

```php
$schedule->call(function()
{
    // Do some task...

})->hourly();
```

**Scheduling Terminal Commands**

```php
$schedule->exec('composer self-update')->daily();
```

**Running command of your application**

```php
$schedule->command('migrate')->cron('* * * * *');
```

**Frequent Jobs**

```php
$schedule->command('foo')->everyFiveMinutes();

$schedule->command('foo')->everyTenMinutes();

$schedule->command('foo')->everyThirtyMinutes();
```

**Daily Jobs**

```php
$schedule->command('foo')->daily();
```

**Daily Jobs At A Specific Time (24 Hour Time)**

```php
$schedule->command('foo')->dailyAt('15:00');
```

**Twice Daily Jobs**

```php
$schedule->command('foo')->twiceDaily();
```

**Job That Runs Every Weekday**

```php
$schedule->command('foo')->weekdays();
```

**Weekly Jobs**

```php
$schedule->command('foo')->weekly();

// Schedule weekly job for specific day (0-6) and time...
$schedule->command('foo')->weeklyOn(1, '8:00');
```

**Monthly Jobs**

```php
$schedule->command('foo')->monthly();
```

**Job That Runs On Specific Days**

```php
$schedule->command('foo')->mondays();
$schedule->command('foo')->tuesdays();
$schedule->command('foo')->wednesdays();
$schedule->command('foo')->thursdays();
$schedule->command('foo')->fridays();
$schedule->command('foo')->saturdays();
$schedule->command('foo')->sundays();
```

**Only Allow Job To Run When Callback Is True**

```php
$schedule->command('foo')->monthly()->when(function()
{
    return true;
});
```

**E-mail The Output Of A Scheduled Job**

```php
$schedule->command('foo')->sendOutputTo($filePath)->processOutput(function ($textBody, $app)
{
    if (trim($textBody) === '' ) {
        return;
    }

    $app->mailer
        ->compose()
        ->setTextBody($textBody)
        ->setSubject('Cronjob notification')
<EMAIL_ADDRESS>        ->send();
});
```

**Preventing Task Overlaps**

```php
$schedule->command('foo')->withoutOverlapping();
```
Used by default `FileMutex` or 'mutex' application component (https://github.com/yiisoft/mutex)

**Running Tasks On One Server**

>To utilize this feature, you must config mutex in the application component, except the FileMutex:  `Yiisoft\Mutex\MysqlMutex`,`Yiisoft\Mutex\PgsqlMutex`,`Yiisoft\Mutex\OracleMutex` or `Yiisoft\Mutex\RedisMutex`. In addition, all servers must be communicating with the same central db/cache server.

Below shows the redis mutex demo:

```php

'components' => [
    'mutex' => [
        'class' => 'Yiisoft\Mutex\RedisMutex',
        'redis' => [
            'hostname' => 'localhost',
            'port' => 6379,
            'database' => 0,
        ]
    ],
],
```

```php
$schedule->command('report generate')
                ->fridays()
                ->at('17:00')
                ->onOneServer();
```

Using addition functions
------------------------

If you want to use `thenPing` method of the Event, you should add the following string to the `composer.json` of your app:
```
"guzzlehttp/guzzle": "~5.0"
```

Note about timezones
--------------------

Please note, that this is PHP extension, so it use timezone defined in php config or in your Yii's configuration file,
so set them correctly.

repository: anonymous-php/yii-scheduling

repo_name: anonymous-php/yii-scheduling


text:
# GoFindMe Project
### Project Cari Orang Hilang dan DPO

***
## **Tutorial Install This Project**

***

First, download clone repository gofindme to your local machine:
```
https://github.com/Jokers01/GoFindMe.git
```

Second, install the requirements:

```
pip install -r requirements.txt
```

Third, apply the migrations:

```
python manage.py migrate
```

Fourth, run the development server:

```
python manage.py runserver
```

The project will be available at <IP_ADDRESS>:8000.

Thank You. :)

gha_language: HTML


text:
[![PyPI version](https://badge.fury.io/py/PyALE.svg)](https://badge.fury.io/py/PyALE)
[![Build Status](https://travis-ci.org/DanaJomar/PyALE.svg?branch=master)](https://travis-ci.org/DanaJomar/PyALE)
[![codecov](https://codecov.io/gh/DanaJomar/PyALE/branch/master/graph/badge.svg)](https://codecov.io/gh/DanaJomar/PyALE)

# PyALE

**ALE**: Accumulated Local Effects <br>
A python implementation of the ALE plots based on the implementation of the R package [ALEPlot](https://github.com/cran/ALEPlot/blob/master/R/ALEPlot.R)

## Installation:
Via pip `pip install PyALE`

## Features:
The end goal is to be able to create the ALE plots whether was the feature numeric or categorical.

### For numeric features:
The package offers the possibility to
* Compute and plot the effect of one numeric feature (1D ALE)
    * including the option to compute a confidence interval of the effect.
* Compute and plot the effect of two numeric features (2D ALE)

### For categorical features:
Since python models work with numeric features only, categorical variables are often encoded by one of two methods, either with integer encoding (when the categories have a natural ordering of some sort e.g., days of the week) or with one-hot-encoding (when the categories do not have ordering e.g., colors). The package offers the option to compute and plot the effect of such features, including the option to compute a confidence interval of the effect. In this case the use has two options:

* For integer encoding: the user can plot the effect of the feature as a discrete feature
    * does not need additional preparation steps
* For one-hot-encoding: or any other custom encoding, the package, starting from version 1.1, offers the possibility to pass a custom encoding function to categorical (or string) features.
    * in this case the user must provide
        * a function that encodes the raw feature
        * a data set that includes the raw feature instead of the encoded one (including all other features used for training)
        * a list of all predictors used for training the model

The package by default uses the ordering assigned to the given categorical feature, however, if the feature does not have an assigned ordering, then the categories of the feature will be ordered by their similarities based on the distribution of the other features in each category.

## Usage with examples:
* First prepare the data and train a model.

  * To explore the different features in this package, we choose one categorical feature to one-hot-encode, and we'll use integer encoding for the rest.
  * Full code and other examples can be found in [Examples](https://htmlpreview.github.io/?https://github.com/DanaJomar/PyALE/blob/master/examples/Examples.html)

* For the following examples we train a random forest to predict the price of diamonds with the following data

  ```python
  X[features]
  ```

  | carat | cut_code | clarity_code | depth | table | x    | y    | z    | D    | E    | F    | G    | H    | I    | J    |
  | ----- | -------- | ------------ | ----- | ----- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- |
  | 0.23  | 4        | 1            | 61.5  | 55.0  | 3.95 | 3.98 | 2.43 | 0.0  | 1.0  | 0.0  | 0.0  | 0.0  | 0.0  | 0.0  |
  | 0.21  | 3        | 2            | 59.8  | 61.0  | 3.89 | 3.84 | 2.31 | 0.0  | 1.0  | 0.0  | 0.0  | 0.0  | 0.0  | 0.0  |
  | 0.23  | 1        | 4            | 56.9  | 65.0  | 4.05 | 4.07 | 2.31 | 0.0  | 1.0  | 0.0  | 0.0  | 0.0  | 0.0  | 0.0  |
  | 0.29  | 3        | 3            | 62.4  | 58.0  | 4.20 | 4.23 | 2.63 | 0.0  | 0.0  | 0.0  | 0.0  | 0.0  | 1.0  | 0.0  |
  | 0.31  | 1        | 1            | 63.3  | 58.0  | 4.34 | 4.35 | 2.75 | 0.0  | 0.0  | 0.0  | 0.0  | 0.0  | 0.0  | 1.0  |

* import the generic function `ale` from the package

  ```python
  from PyALE import ale
  ```

* start analysing the effects of your features

  * **1D ALE plot for numeric continuous feature**

    ```python
    ## 1D - continuous - no CI
    ale_eff = ale(
        X=X[features], model=model, feature=["carat"], grid_size=50, include_CI=False
    )
    ```

    ![1D ALE Plot](https://raw.githubusercontent.com/DanaJomar/PyALE/master/examples/plots/1D_ALE_Plot_Ex_noCI.jpeg)

    The confidence intervals around the estimated effects are specially important when the sample data is small, which is why as an example plot for the confidence intervals we'll take a random sample of the dataset

    ```python
    ## 1D - continuous - with 95% CI
    random.seed(123)
    X_sample = X[features].loc[random.sample(X.index.to_list(), 1000), :]
    ale_eff = ale(
        X=X_sample, model=model, feature=["carat"], grid_size=50, include_CI=True, C=0.95
    )
    ```

    ![1D ALE Plot with CI](https://raw.githubusercontent.com/DanaJomar/PyALE/master/examples/plots/1D_ALE_Plot_Ex_withCI.jpeg)

  * **1D ALE plot for numeric discrete feature**

    ```python
    ## 1D - discrete
    ale_eff = ale(X=X[features], model=model, feature=["cut_code"])
    ```

    ![1D ALE Plot Disc](https://raw.githubusercontent.com/DanaJomar/PyALE/master/examples/plots/1D_ALE_Plot_Discrete_Ex.jpeg)

  * **1D ALE plot for [one-hot-encoded] categorical feature**

    In this case, it is not enough to use `X[features]` (that was used for training), because it does not contain the original feature, we have to replace the encoding with the raw feature, and then  we need to  pass a custom encoding function (in our example the function`onehot_encode`) and a list or array of all used predictors (in our example the list `features`)

    ```python
    ## remove the one-hot-encoding columns and add the original -raw- feature
    ## since X already has the raw feature it is enough to drop its encoding columns
    X_feat_raw = X.drop(coded_feature.columns.to_list(), axis=1, inplace=False).copy()

    ## 1D - categorical
    ale_eff = ale(
        X=X_feat_raw,
        model=model,
        feature=["color"],
        encode_fun=onehot_encode,
        predictors=features,
    )
    ```

    ![1D ALE Plot Cat](https://raw.githubusercontent.com/DanaJomar/PyALE/master/examples/plots/1D_ALE_Plot_Categorical_Ex.jpeg)

  Note that the function `ale` has detected the right feature type in all three cases, however, the user can always specify the feature type if she/he thinks that the function did not detect the expected type.

* **2D ALE plot for numeric features**

  ```python
  ## 2D - continuous
  ale_eff = ale(X=X[features], model=model, feature=["z", "table"], grid_size=100)
  ```

  ![2D ALE Plot](https://raw.githubusercontent.com/DanaJomar/PyALE/master/examples/plots/2D_ALE_Plot_Ex.jpeg)

## Interpretation:

```python
random.seed(123)
X_sample = X[features].loc[random.sample(X.index.to_list(), 1000), :]
ale_contin = ale(
    X=X_sample,
    model=model,
    feature=["carat"],
    feature_type="continuous",
    grid_size=5,
    include_CI=True,
    C=0.95,
)
```

![1D ALE Plot](https://raw.githubusercontent.com/DanaJomar/PyALE/master/examples/plots/interpretation_Ex.jpeg)

For continuous variables the algorithm cuts the feature to bins starting from the minimum value and ending with the maximum value of the feature, then computes the average difference in prediction when the value of the feature moves between the edges of each bin, finally returns the centered cumulative sum of these averages (and the confidence interval of the differences - optional).

```python
ale_contin
```
|  carat  |    eff      | size   | lowerCI_95%   | upperCI_95%   |
| ------  | ----------- | ------ | -----------   | -----------   |
| 0.23    |-1721.408141 |   0.0  |          NaN  |          NaN  |
| 0.35    |-1633.405685 | 203.0  | -1650.042600  | -1616.768770  |
| 0.55    |-1242.989786 | 204.0  | -1275.489577  | -1210.489995  |
| 0.90    |  176.838662 | 213.0  |   125.162929  |   228.514394  |
| 1.14    | 1521.617690 | 182.0  |  1351.287932  |  1691.947448  |
| 3.00    | 4467.185422 | 198.0  |  4115.599415  |  4818.771429  |

What interests us when interpreting the results is the difference in the effect between the edges of the bins, in this example one can say that the value of the prediction increases by approximately 2946 (`4467 - 1521`) when the carat increases from 1.14 to 3.00, as can be seen in the last two lines. With this in mind we can see that the values of the confidence interval only makes sense starting from the second value (the upper edge of the first bin) and could also be compared with the eff value of the previous row as to give an idea of how much this difference can fluctuate (e.g., for the bin `(1.14, 3.00]` between 2764 and 3127 with 95% certainty).

The lower edge of the first bin is in fact the minimum value of the feature in the given data, and it belongs to the first bin (unlike the following bins which contain the upper edge but not the lower). The size column contains the number of data points in the bin ending with the feature value in the corresponding row and starting with value before it (e.g., the bin `(1.14, 3.00]` has `198` data points). The rug at the bottom of the generated plot shows the distribution of the data points.

For categoricals or variables with discrete values the interpretation is similar and we also get the average difference in prediction, but instead of bins each value will be replaced once with the value before it and once with the value after it.

```python
ale_discr = ale(
    X=X_sample,
    model=model,
    feature=["cut_code"],
    feature_type="discrete",
    include_CI=True,
    C=0.95,
)
```

![1D ALE Plot](https://raw.githubusercontent.com/DanaJomar/PyALE/master/examples/plots/interpretation_discr_Ex.jpeg)

We can also think of it from the perspective of bins as follows, every bin contains two consecutive values (or categories) from the feature, for example with the `cut` feature the bins are `[0, 1]`, `[1, 2]`, `[2, 3]`, `[3, 4]`, and what interests us is still the difference in the effect between the edges of the bins, as well as the range in which this difference fluctuate when taking the confidence interval into consideration. That being said the `size` column contains the number of data points in this category (**not** ~~the size of the data sample in the bin~~ anymore), this means to get the sample size in the bin one has to sum up the sample size of each value in it (e.g., in `[0, 1]` there is 38 + 82 data points). The bars in the background of the generated plot shows the size of the sample in each category/value.

```python
ale_discr
```

| cut |        eff  | size  | lowerCI_95%  | upperCI_95% |
| --- | ----------- | ----- | -----------  | ----------- |
|0    | -90.799533  |   38  |         NaN  |         NaN |
|1    | -70.106933  |   82  |  -81.689547  |  -58.524319 |
|2    | -41.629904  |  204  |  -51.675662  |  -31.584146 |
|3    | -33.406766  |  276  |  -41.209584  |  -25.603949 |
|4    |  67.279797  |  400  |   52.097705  |   82.461888 |

## Development
* Installing the package in edit mode could be done with `pip install -e`
* `unittest` is used for running the tests
* `coverage` is used to get the code coverage, which is not an installation requirement of this package, however will be installed if the dev flag was added to pip call i.e., `pip install -e ".[dev]"`
* To get the code coverage report run
    `coverage run -m --source=PyALE unittest discover -v` then
    * for a fast report in the shell : `coverage report`
    * for a detailed html report: `coverage html`
* The versions of the packages used during the development process are freezed in requirements.txt

### Possible Future Improvements

* Support for classification models (at the moment this is only possible with a workaround. See [ALE plots for classification models](https://htmlpreview.github.io/?https://github.com/DanaJomar/PyALE/blob/master/examples/ALE%20plots%20for%20classification%20models.html))

### Ref.
* https://cran.r-project.org/web/packages/ALEPlot/vignettes/AccumulatedLocalEffectPlot.pdf

* https://christophm.github.io/interpretable-ml-book/ale.html

repository: matthiasgruber/PyALE

repo_name: matthiasgruber/PyALE


text:
+++
uniqueid = "Vr5JvLTlfIii7UlA0Y6p"
title = "Learn the commutative property of addition | MathBRIX"
pagetitle = "Forward, Backward: Commutative property of addition"
description = "In this exercise, kids learn about the commutative property of addition, discovering that numbers can be added in any order to get the same result."
pagedescription = "In this exercise, kids learn about the commutative property of addition, discovering that numbers can be added in any order to get the same result."
slug = "forward-backward-commutative-property-of-addition"
url = "/1st-grade/forward-backward-commutative-property-of-addition"
grade = "1st Grade"
category = "Operations and Algebraic Thinking"
gametype = "BRIX_MASTER"
subgametype = "COMMUTATIVE_IN_20_2_NUMBERS_ALT"
image = "commutative-in-20-2-numbers-alt"
+++

repository: MathBRIX/brochure-site

repo_name: MathBRIX/brochure-site


text:
# Chef Server Release Notes

This document contains an overview of significant customer-facing changes
in the release. For a detailed list of changed components, refer to
[CHANGELOG.md](CHANGELOG.md).

This document contains release notes for the current release and all patches.
For prior releases, see [PRIOR\_RELEASE\_NOTES.md](PRIOR_RELEASE_NOTES.md).

## 12.6.0

### Chef Server
  * Fixed false failures for postgres preflight check.
  * Fixed bug where public\_key\_read\_access group was not properly being respected for access on org-scoped user and client public key reads.
  * Update licensing handling to make licensing information easier to find (see [here](https://www.chef.io/blog/2016/04/26/changes-to-how-chef-products-handle-licenses/)).

repository: DavidAlphaFox/chef-server

repo_name: DavidAlphaFox/chef-server